var IR = Object.defineProperty;
var NR = (t, e, r) => e in t ? IR(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
var io = (t, e, r) => (NR(t, typeof e != "symbol" ? e + "" : e, r), r);
var Ol = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function BR(t) {
var e = t.default;
if (typeof e == "function") {
var r = function() {
return e.apply(this, arguments);
};
r.prototype = e.prototype;
} else
r = {};
return Object.defineProperty(r, "__esModule", { value: !0 }), Object.keys(t).forEach(function(n) {
var i = Object.getOwnPropertyDescriptor(t, n);
Object.defineProperty(r, n, i.get ? i : {
enumerable: !0,
get: function() {
return t[n];
}
});
}), r;
}
function Za(t) {
throw new Error('Could not dynamically require "' + t + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
}
var Vw = { exports: {} };
(function(t, e) {
(function(r, n) {
t.exports = n();
})(Ol, function() {
var r;
function n() {
return r.apply(null, arguments);
}
function i(g) {
return g instanceof Array || Object.prototype.toString.call(g) === "[object Array]";
}
function a(g) {
return g != null && Object.prototype.toString.call(g) === "[object Object]";
}
function s(g, E) {
return Object.prototype.hasOwnProperty.call(g, E);
}
function o(g) {
if (Object.getOwnPropertyNames)
return Object.getOwnPropertyNames(g).length === 0;
for (var E in g)
if (s(g, E))
return;
return 1;
}
function l(g) {
return g === void 0;
}
function u(g) {
return typeof g == "number" || Object.prototype.toString.call(g) === "[object Number]";
}
function h(g) {
return g instanceof Date || Object.prototype.toString.call(g) === "[object Date]";
}
function d(g, E) {
for (var I = [], O = g.length, G = 0; G < O; ++G)
I.push(E(g[G], G));
return I;
}
function f(g, E) {
for (var I in E)
s(E, I) && (g[I] = E[I]);
return s(E, "toString") && (g.toString = E.toString), s(E, "valueOf") && (g.valueOf = E.valueOf), g;
}
function p(g, E, I, O) {
return Ir(g, E, I, O, !0).utc();
}
function m(g) {
return g._pf == null && (g._pf = { empty: !1, unusedTokens: [], unusedInput: [], overflow: -2, charsLeftOver: 0, nullInput: !1, invalidEra: null, invalidMonth: null, invalidFormat: !1, userInvalidated: !1, iso: !1, parsedDateParts: [], era: null, meridiem: null, rfc2822: !1, weekdayMismatch: !1 }), g._pf;
}
function _(g) {
if (g._isValid == null) {
var E = m(g), I = b.call(E.parsedDateParts, function(O) {
return O != null;
}), I = !isNaN(g._d.getTime()) && E.overflow < 0 && !E.empty && !E.invalidEra && !E.invalidMonth && !E.invalidWeekday && !E.weekdayMismatch && !E.nullInput && !E.invalidFormat && !E.userInvalidated && (!E.meridiem || E.meridiem && I);
if (g._strict && (I = I && E.charsLeftOver === 0 && E.unusedTokens.length === 0 && E.bigHour === void 0), Object.isFrozen != null && Object.isFrozen(g))
return I;
g._isValid = I;
}
return g._isValid;
}
function y(g) {
var E = p(NaN);
return g != null ? f(m(E), g) : m(E).userInvalidated = !0, E;
}
var b = Array.prototype.some || function(g) {
for (var E = Object(this), I = E.length >>> 0, O = 0; O < I; O++)
if (O in E && g.call(this, E[O], O, E))
return !0;
return !1;
}, x = n.momentProperties = [], k = !1;
function T(g, E) {
var I, O, G, ht = x.length;
if (l(E._isAMomentObject) || (g._isAMomentObject = E._isAMomentObject), l(E._i) || (g._i = E._i), l(E._f) || (g._f = E._f), l(E._l) || (g._l = E._l), l(E._strict) || (g._strict = E._strict), l(E._tzm) || (g._tzm = E._tzm), l(E._isUTC) || (g._isUTC = E._isUTC), l(E._offset) || (g._offset = E._offset), l(E._pf) || (g._pf = m(E)), l(E._locale) || (g._locale = E._locale), 0 < ht)
for (I = 0; I < ht; I++)
l(G = E[O = x[I]]) || (g[O] = G);
return g;
}
function C(g) {
T(this, g), this._d = new Date(g._d != null ? g._d.getTime() : NaN), this.isValid() || (this._d = new Date(NaN)), k === !1 && (k = !0, n.updateOffset(this), k = !1);
}
function M(g) {
return g instanceof C || g != null && g._isAMomentObject != null;
}
function S(g) {
n.suppressDeprecationWarnings === !1 && typeof console < "u" && console.warn && console.warn("Deprecation warning: " + g);
}
function R(g, E) {
var I = !0;
return f(function() {
if (n.deprecationHandler != null && n.deprecationHandler(null, g), I) {
for (var O, G, ht = [], vt = arguments.length, Mt = 0; Mt < vt; Mt++) {
if (O = "", typeof arguments[Mt] == "object") {
for (G in O += `
[` + Mt + "] ", arguments[0])
s(arguments[0], G) && (O += G + ": " + arguments[0][G] + ", ");
O = O.slice(0, -2);
} else
O = arguments[Mt];
ht.push(O);
}
S(g + `
Arguments: ` + Array.prototype.slice.call(ht).join("") + `
` + new Error().stack), I = !1;
}
return E.apply(this, arguments);
}, E);
}
var A = {};
function L(g, E) {
n.deprecationHandler != null && n.deprecationHandler(g, E), A[g] || (S(E), A[g] = !0);
}
function v(g) {
return typeof Function < "u" && g instanceof Function || Object.prototype.toString.call(g) === "[object Function]";
}
function B(g, E) {
var I, O = f({}, g);
for (I in E)
s(E, I) && (a(g[I]) && a(E[I]) ? (O[I] = {}, f(O[I], g[I]), f(O[I], E[I])) : E[I] != null ? O[I] = E[I] : delete O[I]);
for (I in g)
s(g, I) && !s(E, I) && a(g[I]) && (O[I] = f({}, O[I]));
return O;
}
function w(g) {
g != null && this.set(g);
}
n.suppressDeprecationWarnings = !1, n.deprecationHandler = null;
var D = Object.keys || function(g) {
var E, I = [];
for (E in g)
s(g, E) && I.push(E);
return I;
};
function N(g, E, I) {
var O = "" + Math.abs(g);
return (0 <= g ? I ? "+" : "" : "-") + Math.pow(10, Math.max(0, E - O.length)).toString().substr(1) + O;
}
var z = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g, X = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, ct = {}, J = {};
function Y(g, E, I, O) {
var G = typeof O == "string" ? function() {
return this[O]();
} : O;
g && (J[g] = G), E && (J[E[0]] = function() {
return N(G.apply(this, arguments), E[1], E[2]);
}), I && (J[I] = function() {
return this.localeData().ordinal(G.apply(this, arguments), g);
});
}
function $(g, E) {
return g.isValid() ? (E = lt(E, g.localeData()), ct[E] = ct[E] || function(I) {
for (var O, G = I.match(z), ht = 0, vt = G.length; ht < vt; ht++)
J[G[ht]] ? G[ht] = J[G[ht]] : G[ht] = (O = G[ht]).match(/\[[\s\S]/) ? O.replace(/^\[|\]$/g, "") : O.replace(/\\/g, "");
return function(Mt) {
for (var Vt = "", Ot = 0; Ot < vt; Ot++)
Vt += v(G[Ot]) ? G[Ot].call(Mt, I) : G[Ot];
return Vt;
};
}(E), ct[E](g)) : g.localeData().invalidDate();
}
function lt(g, E) {
var I = 5;
function O(G) {
return E.longDateFormat(G) || G;
}
for (X.lastIndex = 0; 0 <= I && X.test(g); )
g = g.replace(X, O), X.lastIndex = 0, --I;
return g;
}
var ut = {};
function W(g, E) {
var I = g.toLowerCase();
ut[I] = ut[I + "s"] = ut[E] = g;
}
function tt(g) {
return typeof g == "string" ? ut[g] || ut[g.toLowerCase()] : void 0;
}
function K(g) {
var E, I, O = {};
for (I in g)
s(g, I) && (E = tt(I)) && (O[E] = g[I]);
return O;
}
var it = {};
function Z(g, E) {
it[g] = E;
}
function V(g) {
return g % 4 == 0 && g % 100 != 0 || g % 400 == 0;
}
function Q(g) {
return g < 0 ? Math.ceil(g) || 0 : Math.floor(g);
}
function q(E) {
var E = +E, I = 0;
return I = E != 0 && isFinite(E) ? Q(E) : I;
}
function U(g, E) {
return function(I) {
return I != null ? (j(this, g, I), n.updateOffset(this, E), this) : F(this, g);
};
}
function F(g, E) {
return g.isValid() ? g._d["get" + (g._isUTC ? "UTC" : "") + E]() : NaN;
}
function j(g, E, I) {
g.isValid() && !isNaN(I) && (E === "FullYear" && V(g.year()) && g.month() === 1 && g.date() === 29 ? (I = q(I), g._d["set" + (g._isUTC ? "UTC" : "") + E](I, g.month(), yt(I, g.month()))) : g._d["set" + (g._isUTC ? "UTC" : "") + E](I));
}
var P = /\d/, fe = /\d\d/, et = /\d{3}/, hs = /\d{4}/, Ea = /[+-]?\d{6}/, at = /\d\d?/, It = /\d\d\d\d?/, Lt = /\d\d\d\d\d\d?/, Rt = /\d{1,3}/, Ca = /\d{1,4}/, Ta = /[+-]?\d{1,6}/, Ct = /\d+/, pt = /[+-]?\d+/, mt = /Z|[+-]\d\d:?\d\d/gi, _t = /Z|[+-]\d\d(?::?\d\d)?/gi, Tt = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;
function ft(g, E, I) {
Ht[g] = v(E) ? E : function(O, G) {
return O && I ? I : E;
};
}
function le(g, E) {
return s(Ht, g) ? Ht[g](E._strict, E._locale) : new RegExp(Dt(g.replace("\\", "").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function(I, O, G, ht, vt) {
return O || G || ht || vt;
})));
}
function Dt(g) {
return g.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&");
}
var Ht = {}, $t = {};
function Qt(g, E) {
var I, O, G = E;
for (typeof g == "string" && (g = [g]), u(E) && (G = function(ht, vt) {
vt[E] = q(ht);
}), O = g.length, I = 0; I < O; I++)
$t[g[I]] = G;
}
function we(g, E) {
Qt(g, function(I, O, G, ht) {
G._w = G._w || {}, E(I, G._w, G, ht);
});
}
var Gt, Ft = 0, zt = 1, wt = 2, bt = 3, Et = 4, kt = 5, Ut = 6, gt = 7, he = 8;
function yt(g, E) {
if (isNaN(g) || isNaN(E))
return NaN;
var I = (E % (I = 12) + I) % I;
return g += (E - I) / 12, I == 1 ? V(g) ? 29 : 28 : 31 - I % 7 % 2;
}
Gt = Array.prototype.indexOf || function(g) {
for (var E = 0; E < this.length; ++E)
if (this[E] === g)
return E;
return -1;
}, Y("M", ["MM", 2], "Mo", function() {
return this.month() + 1;
}), Y("MMM", 0, 0, function(g) {
return this.localeData().monthsShort(this, g);
}), Y("MMMM", 0, 0, function(g) {
return this.localeData().months(this, g);
}), W("month", "M"), Z("month", 8), ft("M", at), ft("MM", at, fe), ft("MMM", function(g, E) {
return E.monthsShortRegex(g);
}), ft("MMMM", function(g, E) {
return E.monthsRegex(g);
}), Qt(["M", "MM"], function(g, E) {
E[zt] = q(g) - 1;
}), Qt(["MMM", "MMMM"], function(g, E, I, O) {
O = I._locale.monthsParse(g, O, I._strict), O != null ? E[zt] = O : m(I).invalidMonth = g;
});
var re = "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), _e = "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"), ge = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/, be = Tt, Te = Tt;
function Wt(g, E) {
var I;
if (g.isValid()) {
if (typeof E == "string") {
if (/^\d+$/.test(E))
E = q(E);
else if (!u(E = g.localeData().monthsParse(E)))
return;
}
I = Math.min(g.date(), yt(g.year(), E)), g._d["set" + (g._isUTC ? "UTC" : "") + "Month"](E, I);
}
}
function ae(g) {
return g != null ? (Wt(this, g), n.updateOffset(this, !0), this) : F(this, "Month");
}
function ye() {
function g(vt, Mt) {
return Mt.length - vt.length;
}
for (var E, I = [], O = [], G = [], ht = 0; ht < 12; ht++)
E = p([2e3, ht]), I.push(this.monthsShort(E, "")), O.push(this.months(E, "")), G.push(this.months(E, "")), G.push(this.monthsShort(E, ""));
for (I.sort(g), O.sort(g), G.sort(g), ht = 0; ht < 12; ht++)
I[ht] = Dt(I[ht]), O[ht] = Dt(O[ht]);
for (ht = 0; ht < 24; ht++)
G[ht] = Dt(G[ht]);
this._monthsRegex = new RegExp("^(" + G.join("|") + ")", "i"), this._monthsShortRegex = this._monthsRegex, this._monthsStrictRegex = new RegExp("^(" + O.join("|") + ")", "i"), this._monthsShortStrictRegex = new RegExp("^(" + I.join("|") + ")", "i");
}
function ue(g) {
return V(g) ? 366 : 365;
}
Y("Y", 0, 0, function() {
var g = this.year();
return g <= 9999 ? N(g, 4) : "+" + g;
}), Y(0, ["YY", 2], 0, function() {
return this.year() % 100;
}), Y(0, ["YYYY", 4], 0, "year"), Y(0, ["YYYYY", 5], 0, "year"), Y(0, ["YYYYYY", 6, !0], 0, "year"), W("year", "y"), Z("year", 1), ft("Y", pt), ft("YY", at, fe), ft("YYYY", Ca, hs), ft("YYYYY", Ta, Ea), ft("YYYYYY", Ta, Ea), Qt(["YYYYY", "YYYYYY"], Ft), Qt("YYYY", function(g, E) {
E[Ft] = g.length === 2 ? n.parseTwoDigitYear(g) : q(g);
}), Qt("YY", function(g, E) {
E[Ft] = n.parseTwoDigitYear(g);
}), Qt("Y", function(g, E) {
E[Ft] = parseInt(g, 10);
}), n.parseTwoDigitYear = function(g) {
return q(g) + (68 < q(g) ? 1900 : 2e3);
};
var Su = U("FullYear", !0);
function Ui(g, E, I, O, G, ht, vt) {
var Mt;
return g < 100 && 0 <= g ? (Mt = new Date(g + 400, E, I, O, G, ht, vt), isFinite(Mt.getFullYear()) && Mt.setFullYear(g)) : Mt = new Date(g, E, I, O, G, ht, vt), Mt;
}
function Or(g) {
var E;
return g < 100 && 0 <= g ? ((E = Array.prototype.slice.call(arguments))[0] = g + 400, E = new Date(Date.UTC.apply(null, E)), isFinite(E.getUTCFullYear()) && E.setUTCFullYear(g)) : E = new Date(Date.UTC.apply(null, arguments)), E;
}
function Ie(g, E, I) {
return I = 7 + E - I, I - (7 + Or(g, 0, I).getUTCDay() - E) % 7 - 1;
}
function se(g, vt, Mt, O, G) {
var ht, vt = 1 + 7 * (vt - 1) + (7 + Mt - O) % 7 + Ie(g, O, G), Mt = vt <= 0 ? ue(ht = g - 1) + vt : vt > ue(g) ? (ht = g + 1, vt - ue(g)) : (ht = g, vt);
return { year: ht, dayOfYear: Mt };
}
function $e(g, E, I) {
var O, G, ht = Ie(g.year(), E, I), ht = Math.floor((g.dayOfYear() - ht - 1) / 7) + 1;
return ht < 1 ? O = ht + _r(G = g.year() - 1, E, I) : ht > _r(g.year(), E, I) ? (O = ht - _r(g.year(), E, I), G = g.year() + 1) : (G = g.year(), O = ht), { week: O, year: G };
}
function _r(g, G, I) {
var O = Ie(g, G, I), G = Ie(g + 1, G, I);
return (ue(g) - O + G) / 7;
}
Y("w", ["ww", 2], "wo", "week"), Y("W", ["WW", 2], "Wo", "isoWeek"), W("week", "w"), W("isoWeek", "W"), Z("week", 5), Z("isoWeek", 5), ft("w", at), ft("ww", at, fe), ft("W", at), ft("WW", at, fe), we(["w", "ww", "W", "WW"], function(g, E, I, O) {
E[O.substr(0, 1)] = q(g);
});
function He(g, E) {
return g.slice(E, 7).concat(g.slice(0, E));
}
Y("d", 0, "do", "day"), Y("dd", 0, 0, function(g) {
return this.localeData().weekdaysMin(this, g);
}), Y("ddd", 0, 0, function(g) {
return this.localeData().weekdaysShort(this, g);
}), Y("dddd", 0, 0, function(g) {
return this.localeData().weekdays(this, g);
}), Y("e", 0, 0, "weekday"), Y("E", 0, 0, "isoWeekday"), W("day", "d"), W("weekday", "e"), W("isoWeekday", "E"), Z("day", 11), Z("weekday", 11), Z("isoWeekday", 11), ft("d", at), ft("e", at), ft("E", at), ft("dd", function(g, E) {
return E.weekdaysMinRegex(g);
}), ft("ddd", function(g, E) {
return E.weekdaysShortRegex(g);
}), ft("dddd", function(g, E) {
return E.weekdaysRegex(g);
}), we(["dd", "ddd", "dddd"], function(g, E, I, O) {
O = I._locale.weekdaysParse(g, O, I._strict), O != null ? E.d = O : m(I).invalidWeekday = g;
}), we(["d", "e", "E"], function(g, E, I, O) {
E[O] = q(g);
});
var Xe = "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), qt = "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"), st = "Su_Mo_Tu_We_Th_Fr_Sa".split("_"), At = Tt, Nt = Tt, Jt = Tt;
function ze() {
function g(Ot, de) {
return de.length - Ot.length;
}
for (var E, I, O, G = [], ht = [], vt = [], Mt = [], Vt = 0; Vt < 7; Vt++)
O = p([2e3, 1]).day(Vt), E = Dt(this.weekdaysMin(O, "")), I = Dt(this.weekdaysShort(O, "")), O = Dt(this.weekdays(O, "")), G.push(E), ht.push(I), vt.push(O), Mt.push(E), Mt.push(I), Mt.push(O);
G.sort(g), ht.sort(g), vt.sort(g), Mt.sort(g), this._weekdaysRegex = new RegExp("^(" + Mt.join("|") + ")", "i"), this._weekdaysShortRegex = this._weekdaysRegex, this._weekdaysMinRegex = this._weekdaysRegex, this._weekdaysStrictRegex = new RegExp("^(" + vt.join("|") + ")", "i"), this._weekdaysShortStrictRegex = new RegExp("^(" + ht.join("|") + ")", "i"), this._weekdaysMinStrictRegex = new RegExp("^(" + G.join("|") + ")", "i");
}
function Oe() {
return this.hours() % 12 || 12;
}
function Fe(g, E) {
Y(g, 0, 0, function() {
return this.localeData().meridiem(this.hours(), this.minutes(), E);
});
}
function vr(g, E) {
return E._meridiemParse;
}
Y("H", ["HH", 2], 0, "hour"), Y("h", ["hh", 2], 0, Oe), Y("k", ["kk", 2], 0, function() {
return this.hours() || 24;
}), Y("hmm", 0, 0, function() {
return "" + Oe.apply(this) + N(this.minutes(), 2);
}), Y("hmmss", 0, 0, function() {
return "" + Oe.apply(this) + N(this.minutes(), 2) + N(this.seconds(), 2);
}), Y("Hmm", 0, 0, function() {
return "" + this.hours() + N(this.minutes(), 2);
}), Y("Hmmss", 0, 0, function() {
return "" + this.hours() + N(this.minutes(), 2) + N(this.seconds(), 2);
}), Fe("a", !0), Fe("A", !1), W("hour", "h"), Z("hour", 13), ft("a", vr), ft("A", vr), ft("H", at), ft("h", at), ft("k", at), ft("HH", at, fe), ft("hh", at, fe), ft("kk", at, fe), ft("hmm", It), ft("hmmss", Lt), ft("Hmm", It), ft("Hmmss", Lt), Qt(["H", "HH"], bt), Qt(["k", "kk"], function(g, E, I) {
g = q(g), E[bt] = g === 24 ? 0 : g;
}), Qt(["a", "A"], function(g, E, I) {
I._isPm = I._locale.isPM(g), I._meridiem = g;
}), Qt(["h", "hh"], function(g, E, I) {
E[bt] = q(g), m(I).bigHour = !0;
}), Qt("hmm", function(g, E, I) {
var O = g.length - 2;
E[bt] = q(g.substr(0, O)), E[Et] = q(g.substr(O)), m(I).bigHour = !0;
}), Qt("hmmss", function(g, E, I) {
var O = g.length - 4, G = g.length - 2;
E[bt] = q(g.substr(0, O)), E[Et] = q(g.substr(O, 2)), E[kt] = q(g.substr(G)), m(I).bigHour = !0;
}), Qt("Hmm", function(g, E, I) {
var O = g.length - 2;
E[bt] = q(g.substr(0, O)), E[Et] = q(g.substr(O));
}), Qt("Hmmss", function(g, E, I) {
var O = g.length - 4, G = g.length - 2;
E[bt] = q(g.substr(0, O)), E[Et] = q(g.substr(O, 2)), E[kt] = q(g.substr(G));
}), Tt = U("Hours", !0);
var Ve, Wi = { calendar: { sameDay: "[Today at] LT", nextDay: "[Tomorrow at] LT", nextWeek: "dddd [at] LT", lastDay: "[Yesterday at] LT", lastWeek: "[Last] dddd [at] LT", sameElse: "L" }, longDateFormat: { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, invalidDate: "Invalid date", ordinal: "%d", dayOfMonthOrdinalParse: /\d{1,2}/, relativeTime: { future: "in %s", past: "%s ago", s: "a few seconds", ss: "%d seconds", m: "a minute", mm: "%d minutes", h: "an hour", hh: "%d hours", d: "a day", dd: "%d days", w: "a week", ww: "%d weeks", M: "a month", MM: "%d months", y: "a year", yy: "%d years" }, months: re, monthsShort: _e, week: { dow: 0, doy: 6 }, weekdays: Xe, weekdaysMin: st, weekdaysShort: qt, meridiemParse: /[ap]\.?m?\.?/i }, Ee = {}, bi = {};
function _u(g) {
return g && g.toLowerCase().replace("_", "-");
}
function _l(g) {
for (var E, I, O, G, ht = 0; ht < g.length; ) {
for (E = (G = _u(g[ht]).split("-")).length, I = (I = _u(g[ht + 1])) ? I.split("-") : null; 0 < E; ) {
if (O = xn(G.slice(0, E).join("-")))
return O;
if (I && I.length >= E && function(vt, Mt) {
for (var Vt = Math.min(vt.length, Mt.length), Ot = 0; Ot < Vt; Ot += 1)
if (vt[Ot] !== Mt[Ot])
return Ot;
return Vt;
}(G, I) >= E - 1)
break;
E--;
}
ht++;
}
return Ve;
}
function xn(g) {
var E;
if (Ee[g] === void 0 && !0 && t && t.exports && g.match("^[^/\\\\]*$") != null)
try {
E = Ve._abbr, Za("./locale/" + g), Xt(E);
} catch {
Ee[g] = null;
}
return Ee[g];
}
function Xt(g, E) {
return g && ((E = l(E) ? ce(g) : te(g, E)) ? Ve = E : typeof console < "u" && console.warn && console.warn("Locale " + g + " not found. Did you forget to load it?")), Ve._abbr;
}
function te(g, E) {
if (E === null)
return delete Ee[g], null;
var I, O = Wi;
if (E.abbr = g, Ee[g] != null)
L("defineLocaleOverride", "use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."), O = Ee[g]._config;
else if (E.parentLocale != null)
if (Ee[E.parentLocale] != null)
O = Ee[E.parentLocale]._config;
else {
if ((I = xn(E.parentLocale)) == null)
return bi[E.parentLocale] || (bi[E.parentLocale] = []), bi[E.parentLocale].push({ name: g, config: E }), null;
O = I._config;
}
return Ee[g] = new w(B(O, E)), bi[g] && bi[g].forEach(function(G) {
te(G.name, G.config);
}), Xt(g), Ee[g];
}
function ce(g) {
var E;
if (!(g = g && g._locale && g._locale._abbr ? g._locale._abbr : g))
return Ve;
if (!i(g)) {
if (E = xn(g))
return E;
g = [g];
}
return _l(g);
}
function Pt(g) {
var E = g._a;
return E && m(g).overflow === -2 && (E = E[zt] < 0 || 11 < E[zt] ? zt : E[wt] < 1 || E[wt] > yt(E[Ft], E[zt]) ? wt : E[bt] < 0 || 24 < E[bt] || E[bt] === 24 && (E[Et] !== 0 || E[kt] !== 0 || E[Ut] !== 0) ? bt : E[Et] < 0 || 59 < E[Et] ? Et : E[kt] < 0 || 59 < E[kt] ? kt : E[Ut] < 0 || 999 < E[Ut] ? Ut : -1, m(g)._overflowDayOfYear && (E < Ft || wt < E) && (E = wt), m(g)._overflowWeeks && E === -1 && (E = gt), m(g)._overflowWeekday && E === -1 && (E = he), m(g).overflow = E), g;
}
var Ge = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, rt = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, os = /Z|[+-]\d\d(?::?\d\d)?/, ot = [["YYYYYY-MM-DD", /[+-]\d{6}-\d\d-\d\d/], ["YYYY-MM-DD", /\d{4}-\d\d-\d\d/], ["GGGG-[W]WW-E", /\d{4}-W\d\d-\d/], ["GGGG-[W]WW", /\d{4}-W\d\d/, !1], ["YYYY-DDD", /\d{4}-\d{3}/], ["YYYY-MM", /\d{4}-\d\d/, !1], ["YYYYYYMMDD", /[+-]\d{10}/], ["YYYYMMDD", /\d{8}/], ["GGGG[W]WWE", /\d{4}W\d{3}/], ["GGGG[W]WW", /\d{4}W\d{2}/, !1], ["YYYYDDD", /\d{7}/], ["YYYYMM", /\d{6}/, !1], ["YYYY", /\d{4}/, !1]], Fr = [["HH:mm:ss.SSSS", /\d\d:\d\d:\d\d\.\d+/], ["HH:mm:ss,SSSS", /\d\d:\d\d:\d\d,\d+/], ["HH:mm:ss", /\d\d:\d\d:\d\d/], ["HH:mm", /\d\d:\d\d/], ["HHmmss.SSSS", /\d\d\d\d\d\d\.\d+/], ["HHmmss,SSSS", /\d\d\d\d\d\d,\d+/], ["HHmmss", /\d\d\d\d\d\d/], ["HHmm", /\d\d\d\d/], ["HH", /\d\d/]], vu = /^\/?Date\((-?\d+)/i, N0 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/, xu = { UT: 0, GMT: 0, EDT: -240, EST: -300, CDT: -300, CST: -360, MDT: -360, MST: -420, PDT: -420, PST: -480 };
function ku(g) {
var E, I, O, G, ht, vt, Vt = g._i, Mt = Ge.exec(Vt) || rt.exec(Vt), Vt = ot.length, Ot = Fr.length;
if (Mt) {
for (m(g).iso = !0, E = 0, I = Vt; E < I; E++)
if (ot[E][1].exec(Mt[1])) {
G = ot[E][0], O = ot[E][2] !== !1;
break;
}
if (G == null)
g._isValid = !1;
else {
if (Mt[3]) {
for (E = 0, I = Ot; E < I; E++)
if (Fr[E][1].exec(Mt[3])) {
ht = (Mt[2] || " ") + Fr[E][0];
break;
}
if (ht == null)
return void (g._isValid = !1);
}
if (O || ht == null) {
if (Mt[4]) {
if (!os.exec(Mt[4]))
return void (g._isValid = !1);
vt = "Z";
}
g._f = G + (ht || "") + (vt || ""), vl(g);
} else
g._isValid = !1;
}
} else
g._isValid = !1;
}
function fr(g, E, I, O, G, ht) {
return g = [function(vt) {
vt = parseInt(vt, 10);
{
if (vt <= 49)
return 2e3 + vt;
if (vt <= 999)
return 1900 + vt;
}
return vt;
}(g), _e.indexOf(E), parseInt(I, 10), parseInt(O, 10), parseInt(G, 10)], ht && g.push(parseInt(ht, 10)), g;
}
function _i(g) {
var E, I, O, G, ht = N0.exec(g._i.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").replace(/^\s\s*/, "").replace(/\s\s*$/, ""));
ht ? (E = fr(ht[4], ht[3], ht[2], ht[5], ht[6], ht[7]), I = ht[1], O = E, G = g, I && qt.indexOf(I) !== new Date(O[0], O[1], O[2]).getDay() ? (m(G).weekdayMismatch = !0, G._isValid = !1) : (g._a = E, g._tzm = (I = ht[8], O = ht[9], G = ht[10], I ? xu[I] : O ? 0 : 60 * (((I = parseInt(G, 10)) - (O = I % 100)) / 100) + O), g._d = Or.apply(null, g._a), g._d.setUTCMinutes(g._d.getUTCMinutes() - g._tzm), m(g).rfc2822 = !0)) : g._isValid = !1;
}
function vi(g, E, I) {
return g != null ? g : E != null ? E : I;
}
function ls(g) {
var E, I, O, G, ht, vt, Mt, Vt, Ot, de, ne, Ze = [];
if (!g._d) {
for (O = g, G = new Date(n.now()), I = O._useUTC ? [G.getUTCFullYear(), G.getUTCMonth(), G.getUTCDate()] : [G.getFullYear(), G.getMonth(), G.getDate()], g._w && g._a[wt] == null && g._a[zt] == null && ((G = (O = g)._w).GG != null || G.W != null || G.E != null ? (Vt = 1, Ot = 4, ht = vi(G.GG, O._a[Ft], $e(De(), 1, 4).year), vt = vi(G.W, 1), ((Mt = vi(G.E, 1)) < 1 || 7 < Mt) && (de = !0)) : (Vt = O._locale._week.dow, Ot = O._locale._week.doy, ne = $e(De(), Vt, Ot), ht = vi(G.gg, O._a[Ft], ne.year), vt = vi(G.w, ne.week), G.d != null ? ((Mt = G.d) < 0 || 6 < Mt) && (de = !0) : G.e != null ? (Mt = G.e + Vt, (G.e < 0 || 6 < G.e) && (de = !0)) : Mt = Vt), vt < 1 || vt > _r(ht, Vt, Ot) ? m(O)._overflowWeeks = !0 : de != null ? m(O)._overflowWeekday = !0 : (ne = se(ht, vt, Mt, Vt, Ot), O._a[Ft] = ne.year, O._dayOfYear = ne.dayOfYear)), g._dayOfYear != null && (G = vi(g._a[Ft], I[Ft]), (g._dayOfYear > ue(G) || g._dayOfYear === 0) && (m(g)._overflowDayOfYear = !0), de = Or(G, 0, g._dayOfYear), g._a[zt] = de.getUTCMonth(), g._a[wt] = de.getUTCDate()), E = 0; E < 3 && g._a[E] == null; ++E)
g._a[E] = Ze[E] = I[E];
for (; E < 7; E++)
g._a[E] = Ze[E] = g._a[E] == null ? E === 2 ? 1 : 0 : g._a[E];
g._a[bt] === 24 && g._a[Et] === 0 && g._a[kt] === 0 && g._a[Ut] === 0 && (g._nextDay = !0, g._a[bt] = 0), g._d = (g._useUTC ? Or : Ui).apply(null, Ze), ht = g._useUTC ? g._d.getUTCDay() : g._d.getDay(), g._tzm != null && g._d.setUTCMinutes(g._d.getUTCMinutes() - g._tzm), g._nextDay && (g._a[bt] = 24), g._w && g._w.d !== void 0 && g._w.d !== ht && (m(g).weekdayMismatch = !0);
}
}
function vl(g) {
if (g._f === n.ISO_8601)
ku(g);
else if (g._f === n.RFC_2822)
_i(g);
else {
g._a = [], m(g).empty = !0;
for (var E, I, O, G, ht, vt = "" + g._i, Mt = vt.length, Vt = 0, Ot = lt(g._f, g._locale).match(z) || [], de = Ot.length, ne = 0; ne < de; ne++)
I = Ot[ne], (E = (vt.match(le(I, g)) || [])[0]) && (0 < (O = vt.substr(0, vt.indexOf(E))).length && m(g).unusedInput.push(O), vt = vt.slice(vt.indexOf(E) + E.length), Vt += E.length), J[I] ? (E ? m(g).empty = !1 : m(g).unusedTokens.push(I), O = I, ht = g, (G = E) != null && s($t, O) && $t[O](G, ht._a, ht, O)) : g._strict && !E && m(g).unusedTokens.push(I);
m(g).charsLeftOver = Mt - Vt, 0 < vt.length && m(g).unusedInput.push(vt), g._a[bt] <= 12 && m(g).bigHour === !0 && 0 < g._a[bt] && (m(g).bigHour = void 0), m(g).parsedDateParts = g._a.slice(0), m(g).meridiem = g._meridiem, g._a[bt] = function(Ze, dr, jn) {
return jn == null ? dr : Ze.meridiemHour != null ? Ze.meridiemHour(dr, jn) : Ze.isPM != null ? ((Ze = Ze.isPM(jn)) && dr < 12 && (dr += 12), dr = Ze || dr !== 12 ? dr : 0) : dr;
}(g._locale, g._a[bt], g._meridiem), (Mt = m(g).era) !== null && (g._a[Ft] = g._locale.erasConvertYear(Mt, g._a[Ft])), ls(g), Pt(g);
}
}
function wu(g) {
var E, I, O, G = g._i, ht = g._f;
return g._locale = g._locale || ce(g._l), G === null || ht === void 0 && G === "" ? y({ nullInput: !0 }) : (typeof G == "string" && (g._i = G = g._locale.preparse(G)), M(G) ? new C(Pt(G)) : (h(G) ? g._d = G : i(ht) ? function(vt) {
var Mt, Vt, Ot, de, ne, Ze, dr = !1, jn = vt._f.length;
if (jn === 0)
return m(vt).invalidFormat = !0, vt._d = new Date(NaN);
for (de = 0; de < jn; de++)
ne = 0, Ze = !1, Mt = T({}, vt), vt._useUTC != null && (Mt._useUTC = vt._useUTC), Mt._f = vt._f[de], vl(Mt), _(Mt) && (Ze = !0), ne = (ne += m(Mt).charsLeftOver) + 10 * m(Mt).unusedTokens.length, m(Mt).score = ne, dr ? ne < Ot && (Ot = ne, Vt = Mt) : (Ot == null || ne < Ot || Ze) && (Ot = ne, Vt = Mt, Ze && (dr = !0));
f(vt, Vt || Mt);
}(g) : ht ? vl(g) : l(ht = (G = g)._i) ? G._d = new Date(n.now()) : h(ht) ? G._d = new Date(ht.valueOf()) : typeof ht == "string" ? (I = G, (E = vu.exec(I._i)) !== null ? I._d = new Date(+E[1]) : (ku(I), I._isValid === !1 && (delete I._isValid, _i(I), I._isValid === !1 && (delete I._isValid, I._strict ? I._isValid = !1 : n.createFromInputFallback(I))))) : i(ht) ? (G._a = d(ht.slice(0), function(vt) {
return parseInt(vt, 10);
}), ls(G)) : a(ht) ? (E = G)._d || (O = (I = K(E._i)).day === void 0 ? I.date : I.day, E._a = d([I.year, I.month, O, I.hour, I.minute, I.second, I.millisecond], function(vt) {
return vt && parseInt(vt, 10);
}), ls(E)) : u(ht) ? G._d = new Date(ht) : n.createFromInputFallback(G), _(g) || (g._d = null), g));
}
function Ir(g, E, I, O, G) {
var ht = {};
return E !== !0 && E !== !1 || (O = E, E = void 0), I !== !0 && I !== !1 || (O = I, I = void 0), (a(g) && o(g) || i(g) && g.length === 0) && (g = void 0), ht._isAMomentObject = !0, ht._useUTC = ht._isUTC = G, ht._l = I, ht._i = g, ht._f = E, ht._strict = O, (G = new C(Pt(wu(G = ht))))._nextDay && (G.add(1, "d"), G._nextDay = void 0), G;
}
function De(g, E, I, O) {
return Ir(g, E, I, O, !1);
}
n.createFromInputFallback = R("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.", function(g) {
g._d = new Date(g._i + (g._useUTC ? " UTC" : ""));
}), n.ISO_8601 = function() {
}, n.RFC_2822 = function() {
}, It = R("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/", function() {
var g = De.apply(null, arguments);
return this.isValid() && g.isValid() ? g < this ? this : g : y();
}), Lt = R("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/", function() {
var g = De.apply(null, arguments);
return this.isValid() && g.isValid() ? this < g ? this : g : y();
});
function jr(g, E) {
var I, O;
if (!(E = E.length === 1 && i(E[0]) ? E[0] : E).length)
return De();
for (I = E[0], O = 1; O < E.length; ++O)
E[O].isValid() && !E[O][g](I) || (I = E[O]);
return I;
}
var Hi = ["year", "quarter", "month", "week", "day", "hour", "minute", "second", "millisecond"];
function Hn(E) {
var E = K(E), I = E.year || 0, O = E.quarter || 0, G = E.month || 0, ht = E.week || E.isoWeek || 0, vt = E.day || 0, Mt = E.hour || 0, Vt = E.minute || 0, Ot = E.second || 0, de = E.millisecond || 0;
this._isValid = function(ne) {
var Ze, dr, jn = !1, V0 = Hi.length;
for (Ze in ne)
if (s(ne, Ze) && (Gt.call(Hi, Ze) === -1 || ne[Ze] != null && isNaN(ne[Ze])))
return !1;
for (dr = 0; dr < V0; ++dr)
if (ne[Hi[dr]]) {
if (jn)
return !1;
parseFloat(ne[Hi[dr]]) !== q(ne[Hi[dr]]) && (jn = !0);
}
return !0;
}(E), this._milliseconds = +de + 1e3 * Ot + 6e4 * Vt + 1e3 * Mt * 60 * 60, this._days = +vt + 7 * ht, this._months = +G + 3 * O + 12 * I, this._data = {}, this._locale = ce(), this._bubble();
}
function Gi(g) {
return g instanceof Hn;
}
function kn(g) {
return g < 0 ? -1 * Math.round(-1 * g) : Math.round(g);
}
function xl(g, E) {
Y(g, 0, 0, function() {
var I = this.utcOffset(), O = "+";
return I < 0 && (I = -I, O = "-"), O + N(~~(I / 60), 2) + E + N(~~I % 60, 2);
});
}
xl("Z", ":"), xl("ZZ", ""), ft("Z", _t), ft("ZZ", _t), Qt(["Z", "ZZ"], function(g, E, I) {
I._useUTC = !0, I._tzm = cs(_t, g);
});
var to = /([\+\-]|\d\d)/gi;
function cs(g, I) {
var I = (I || "").match(g);
return I === null ? null : (I = 60 * (g = ((I[I.length - 1] || []) + "").match(to) || ["-", 0, 0])[1] + q(g[2])) === 0 ? 0 : g[0] === "+" ? I : -I;
}
function wn(g, E) {
var I;
return E._isUTC ? (E = E.clone(), I = (M(g) || h(g) ? g : De(g)).valueOf() - E.valueOf(), E._d.setTime(E._d.valueOf() + I), n.updateOffset(E, !1), E) : De(g).local();
}
function B0(g) {
return -Math.round(g._d.getTimezoneOffset());
}
function E_() {
return !!this.isValid() && this._isUTC && this._offset === 0;
}
n.updateOffset = function() {
};
var TR = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/, ER = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
function Gn(g, E) {
var I, O = g, G = null;
return Gi(g) ? O = { ms: g._milliseconds, d: g._days, M: g._months } : u(g) || !isNaN(+g) ? (O = {}, E ? O[E] = +g : O.milliseconds = +g) : (G = TR.exec(g)) ? (I = G[1] === "-" ? -1 : 1, O = { y: 0, d: q(G[wt]) * I, h: q(G[bt]) * I, m: q(G[Et]) * I, s: q(G[kt]) * I, ms: q(kn(1e3 * G[Ut])) * I }) : (G = ER.exec(g)) ? (I = G[1] === "-" ? -1 : 1, O = { y: us(G[2], I), M: us(G[3], I), w: us(G[4], I), d: us(G[5], I), h: us(G[6], I), m: us(G[7], I), s: us(G[8], I) }) : O == null ? O = {} : typeof O == "object" && ("from" in O || "to" in O) && (E = function(ht, vt) {
var Mt;
return !ht.isValid() || !vt.isValid() ? { milliseconds: 0, months: 0 } : (vt = wn(vt, ht), ht.isBefore(vt) ? Mt = C_(ht, vt) : ((Mt = C_(vt, ht)).milliseconds = -Mt.milliseconds, Mt.months = -Mt.months), Mt);
}(De(O.from), De(O.to)), (O = {}).ms = E.milliseconds, O.M = E.months), G = new Hn(O), Gi(g) && s(g, "_locale") && (G._locale = g._locale), Gi(g) && s(g, "_isValid") && (G._isValid = g._isValid), G;
}
function us(g, E) {
return g = g && parseFloat(g.replace(",", ".")), (isNaN(g) ? 0 : g) * E;
}
function C_(g, E) {
var I = {};
return I.months = E.month() - g.month() + 12 * (E.year() - g.year()), g.clone().add(I.months, "M").isAfter(E) && --I.months, I.milliseconds = +E - +g.clone().add(I.months, "M"), I;
}
function S_(g, E) {
return function(I, O) {
var G;
return O === null || isNaN(+O) || (L(E, "moment()." + E + "(period, number) is deprecated. Please use moment()." + E + "(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."), G = I, I = O, O = G), A_(this, Gn(I, O), g), this;
};
}
function A_(g, vt, I, O) {
var G = vt._milliseconds, ht = kn(vt._days), vt = kn(vt._months);
g.isValid() && (O = O == null || O, vt && Wt(g, F(g, "Month") + vt * I), ht && j(g, "Date", F(g, "Date") + ht * I), G && g._d.setTime(g._d.valueOf() + G * I), O && n.updateOffset(g, ht || vt));
}
Gn.fn = Hn.prototype, Gn.invalid = function() {
return Gn(NaN);
}, re = S_(1, "add"), Xe = S_(-1, "subtract");
function M_(g) {
return typeof g == "string" || g instanceof String;
}
function CR(g) {
return M(g) || h(g) || M_(g) || u(g) || function(E) {
var I = i(E), O = !1;
return I && (O = E.filter(function(G) {
return !u(G) && M_(E);
}).length === 0), I && O;
}(g) || function(E) {
var I, O, G = a(E) && !o(E), ht = !1, vt = ["years", "year", "y", "months", "month", "M", "days", "day", "d", "dates", "date", "D", "hours", "hour", "h", "minutes", "minute", "m", "seconds", "second", "s", "milliseconds", "millisecond", "ms"], Mt = vt.length;
for (I = 0; I < Mt; I += 1)
O = vt[I], ht = ht || s(E, O);
return G && ht;
}(g) || g == null;
}
function Tu(g, G) {
if (g.date() < G.date())
return -Tu(G, g);
var I = 12 * (G.year() - g.year()) + (G.month() - g.month()), O = g.clone().add(I, "months"), G = G - O < 0 ? (G - O) / (O - g.clone().add(I - 1, "months")) : (G - O) / (g.clone().add(1 + I, "months") - O);
return -(I + G) || 0;
}
function L_(g) {
return g === void 0 ? this._locale._abbr : ((g = ce(g)) != null && (this._locale = g), this);
}
n.defaultFormat = "YYYY-MM-DDTHH:mm:ssZ", n.defaultFormatUtc = "YYYY-MM-DDTHH:mm:ss[Z]", st = R("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.", function(g) {
return g === void 0 ? this.localeData() : this.locale(g);
});
function R_() {
return this._locale;
}
var I_ = 126227808e5;
function eo(g, E) {
return (g % E + E) % E;
}
function N_(g, E, I) {
return g < 100 && 0 <= g ? new Date(g + 400, E, I) - I_ : new Date(g, E, I).valueOf();
}
function B_(g, E, I) {
return g < 100 && 0 <= g ? Date.UTC(g + 400, E, I) - I_ : Date.UTC(g, E, I);
}
function D0(g, E) {
return E.erasAbbrRegex(g);
}
function O0() {
for (var g = [], E = [], I = [], O = [], G = this.eras(), ht = 0, vt = G.length; ht < vt; ++ht)
E.push(Dt(G[ht].name)), g.push(Dt(G[ht].abbr)), I.push(Dt(G[ht].narrow)), O.push(Dt(G[ht].name)), O.push(Dt(G[ht].abbr)), O.push(Dt(G[ht].narrow));
this._erasRegex = new RegExp("^(" + O.join("|") + ")", "i"), this._erasNameRegex = new RegExp("^(" + E.join("|") + ")", "i"), this._erasAbbrRegex = new RegExp("^(" + g.join("|") + ")", "i"), this._erasNarrowRegex = new RegExp("^(" + I.join("|") + ")", "i");
}
function Eu(g, E) {
Y(0, [g, g.length], 0, E);
}
function D_(g, E, I, O, G) {
var ht;
return g == null ? $e(this, O, G).year : (ht = _r(g, O, G), function(vt, Mt, Vt, Ot, de) {
return vt = se(vt, Mt, Vt, Ot, de), Mt = Or(vt.year, 0, vt.dayOfYear), this.year(Mt.getUTCFullYear()), this.month(Mt.getUTCMonth()), this.date(Mt.getUTCDate()), this;
}.call(this, g, E = ht < E ? ht : E, I, O, G));
}
Y("N", 0, 0, "eraAbbr"), Y("NN", 0, 0, "eraAbbr"), Y("NNN", 0, 0, "eraAbbr"), Y("NNNN", 0, 0, "eraName"), Y("NNNNN", 0, 0, "eraNarrow"), Y("y", ["y", 1], "yo", "eraYear"), Y("y", ["yy", 2], 0, "eraYear"), Y("y", ["yyy", 3], 0, "eraYear"), Y("y", ["yyyy", 4], 0, "eraYear"), ft("N", D0), ft("NN", D0), ft("NNN", D0), ft("NNNN", function(g, E) {
return E.erasNameRegex(g);
}), ft("NNNNN", function(g, E) {
return E.erasNarrowRegex(g);
}), Qt(["N", "NN", "NNN", "NNNN", "NNNNN"], function(g, E, I, O) {
O = I._locale.erasParse(g, O, I._strict), O ? m(I).era = O : m(I).invalidEra = g;
}), ft("y", Ct), ft("yy", Ct), ft("yyy", Ct), ft("yyyy", Ct), ft("yo", function(g, E) {
return E._eraYearOrdinalRegex || Ct;
}), Qt(["y", "yy", "yyy", "yyyy"], Ft), Qt(["yo"], function(g, E, I, O) {
var G;
I._locale._eraYearOrdinalRegex && (G = g.match(I._locale._eraYearOrdinalRegex)), I._locale.eraYearOrdinalParse ? E[Ft] = I._locale.eraYearOrdinalParse(g, G) : E[Ft] = parseInt(g, 10);
}), Y(0, ["gg", 2], 0, function() {
return this.weekYear() % 100;
}), Y(0, ["GG", 2], 0, function() {
return this.isoWeekYear() % 100;
}), Eu("gggg", "weekYear"), Eu("ggggg", "weekYear"), Eu("GGGG", "isoWeekYear"), Eu("GGGGG", "isoWeekYear"), W("weekYear", "gg"), W("isoWeekYear", "GG"), Z("weekYear", 1), Z("isoWeekYear", 1), ft("G", pt), ft("g", pt), ft("GG", at, fe), ft("gg", at, fe), ft("GGGG", Ca, hs), ft("gggg", Ca, hs), ft("GGGGG", Ta, Ea), ft("ggggg", Ta, Ea), we(["gggg", "ggggg", "GGGG", "GGGGG"], function(g, E, I, O) {
E[O.substr(0, 2)] = q(g);
}), we(["gg", "GG"], function(g, E, I, O) {
E[O] = n.parseTwoDigitYear(g);
}), Y("Q", 0, "Qo", "quarter"), W("quarter", "Q"), Z("quarter", 7), ft("Q", P), Qt("Q", function(g, E) {
E[zt] = 3 * (q(g) - 1);
}), Y("D", ["DD", 2], "Do", "date"), W("date", "D"), Z("date", 9), ft("D", at), ft("DD", at, fe), ft("Do", function(g, E) {
return g ? E._dayOfMonthOrdinalParse || E._ordinalParse : E._dayOfMonthOrdinalParseLenient;
}), Qt(["D", "DD"], wt), Qt("Do", function(g, E) {
E[wt] = q(g.match(at)[0]);
}), Ca = U("Date", !0), Y("DDD", ["DDDD", 3], "DDDo", "dayOfYear"), W("dayOfYear", "DDD"), Z("dayOfYear", 4), ft("DDD", Rt), ft("DDDD", et), Qt(["DDD", "DDDD"], function(g, E, I) {
I._dayOfYear = q(g);
}), Y("m", ["mm", 2], 0, "minute"), W("minute", "m"), Z("minute", 14), ft("m", at), ft("mm", at, fe), Qt(["m", "mm"], Et);
var wa, hs = U("Minutes", !1), Ta = (Y("s", ["ss", 2], 0, "second"), W("second", "s"), Z("second", 15), ft("s", at), ft("ss", at, fe), Qt(["s", "ss"], kt), U("Seconds", !1));
for (Y("S", 0, 0, function() {
return ~~(this.millisecond() / 100);
}), Y(0, ["SS", 2], 0, function() {
return ~~(this.millisecond() / 10);
}), Y(0, ["SSS", 3], 0, "millisecond"), Y(0, ["SSSS", 4], 0, function() {
return 10 * this.millisecond();
}), Y(0, ["SSSSS", 5], 0, function() {
return 100 * this.millisecond();
}), Y(0, ["SSSSSS", 6], 0, function() {
return 1e3 * this.millisecond();
}), Y(0, ["SSSSSSS", 7], 0, function() {
return 1e4 * this.millisecond();
}), Y(0, ["SSSSSSSS", 8], 0, function() {
return 1e5 * this.millisecond();
}), Y(0, ["SSSSSSSSS", 9], 0, function() {
return 1e6 * this.millisecond();
}), W("millisecond", "ms"), Z("millisecond", 16), ft("S", Rt, P), ft("SS", Rt, fe), ft("SSS", Rt, et), wa = "SSSS"; wa.length <= 9; wa += "S")
ft(wa, Ct);
function SR(g, E) {
E[Ut] = q(1e3 * ("0." + g));
}
for (wa = "S"; wa.length <= 9; wa += "S")
Qt(wa, SR);
Ea = U("Milliseconds", !1), Y("z", 0, 0, "zoneAbbr"), Y("zz", 0, 0, "zoneName"), P = C.prototype;
function O_(g) {
return g;
}
P.add = re, P.calendar = function(I, G) {
arguments.length === 1 && (arguments[0] ? CR(arguments[0]) ? (I = arguments[0], G = void 0) : function(ht) {
for (var vt = a(ht) && !o(ht), Mt = !1, Vt = ["sameDay", "nextDay", "lastDay", "nextWeek", "lastWeek", "sameElse"], Ot = 0; Ot < Vt.length; Ot += 1)
Mt = Mt || s(ht, Vt[Ot]);
return vt && Mt;
}(arguments[0]) && (G = arguments[0], I = void 0) : G = I = void 0);
var I = I || De(), O = wn(I, this).startOf("day"), O = n.calendarFormat(this, O) || "sameElse", G = G && (v(G[O]) ? G[O].call(this, I) : G[O]);
return this.format(G || this.localeData().calendar(O, this, De(I)));
}, P.clone = function() {
return new C(this);
}, P.diff = function(g, E, I) {
var O, G, ht;
if (!this.isValid())
return NaN;
if (!(O = wn(g, this)).isValid())
return NaN;
switch (G = 6e4 * (O.utcOffset() - this.utcOffset()), E = tt(E)) {
case "year":
ht = Tu(this, O) / 12;
break;
case "month":
ht = Tu(this, O);
break;
case "quarter":
ht = Tu(this, O) / 3;
break;
case "second":
ht = (this - O) / 1e3;
break;
case "minute":
ht = (this - O) / 6e4;
break;
case "hour":
ht = (this - O) / 36e5;
break;
case "day":
ht = (this - O - G) / 864e5;
break;
case "week":
ht = (this - O - G) / 6048e5;
break;
default:
ht = this - O;
}
return I ? ht : Q(ht);
}, P.endOf = function(g) {
var E, I;
if ((g = tt(g)) === void 0 || g === "millisecond" || !this.isValid())
return this;
switch (I = this._isUTC ? B_ : N_, g) {
case "year":
E = I(this.year() + 1, 0, 1) - 1;
break;
case "quarter":
E = I(this.year(), this.month() - this.month() % 3 + 3, 1) - 1;
break;
case "month":
E = I(this.year(), this.month() + 1, 1) - 1;
break;
case "week":
E = I(this.year(), this.month(), this.date() - this.weekday() + 7) - 1;
break;
case "isoWeek":
E = I(this.year(), this.month(), this.date() - (this.isoWeekday() - 1) + 7) - 1;
break;
case "day":
case "date":
E = I(this.year(), this.month(), this.date() + 1) - 1;
break;
case "hour":
E = this._d.valueOf(), E += 36e5 - eo(E + (this._isUTC ? 0 : 6e4 * this.utcOffset()), 36e5) - 1;
break;
case "minute":
E = this._d.valueOf(), E += 6e4 - eo(E, 6e4) - 1;
break;
case "second":
E = this._d.valueOf(), E += 1e3 - eo(E, 1e3) - 1;
break;
}
return this._d.setTime(E), n.updateOffset(this, !0), this;
}, P.format = function(g) {
return g = g || (this.isUtc() ? n.defaultFormatUtc : n.defaultFormat), g = $(this, g), this.localeData().postformat(g);
}, P.from = function(g, E) {
return this.isValid() && (M(g) && g.isValid() || De(g).isValid()) ? Gn({ to: this, from: g }).locale(this.locale()).humanize(!E) : this.localeData().invalidDate();
}, P.fromNow = function(g) {
return this.from(De(), g);
}, P.to = function(g, E) {
return this.isValid() && (M(g) && g.isValid() || De(g).isValid()) ? Gn({ from: this, to: g }).locale(this.locale()).humanize(!E) : this.localeData().invalidDate();
}, P.toNow = function(g) {
return this.to(De(), g);
}, P.get = function(g) {
return v(this[g = tt(g)]) ? this[g]() : this;
}, P.invalidAt = function() {
return m(this).overflow;
}, P.isAfter = function(g, E) {
return g = M(g) ? g : De(g), !(!this.isValid() || !g.isValid()) && ((E = tt(E) || "millisecond") === "millisecond" ? this.valueOf() > g.valueOf() : g.valueOf() < this.clone().startOf(E).valueOf());
}, P.isBefore = function(g, E) {
return g = M(g) ? g : De(g), !(!this.isValid() || !g.isValid()) && ((E = tt(E) || "millisecond") === "millisecond" ? this.valueOf() < g.valueOf() : this.clone().endOf(E).valueOf() < g.valueOf());
}, P.isBetween = function(g, E, I, O) {
return g = M(g) ? g : De(g), E = M(E) ? E : De(E), !!(this.isValid() && g.isValid() && E.isValid()) && ((O = O || "()")[0] === "(" ? this.isAfter(g, I) : !this.isBefore(g, I)) && (O[1] === ")" ? this.isBefore(E, I) : !this.isAfter(E, I));
}, P.isSame = function(I, E) {
var I = M(I) ? I : De(I);
return !(!this.isValid() || !I.isValid()) && ((E = tt(E) || "millisecond") === "millisecond" ? this.valueOf() === I.valueOf() : (I = I.valueOf(), this.clone().startOf(E).valueOf() <= I && I <= this.clone().endOf(E).valueOf()));
}, P.isSameOrAfter = function(g, E) {
return this.isSame(g, E) || this.isAfter(g, E);
}, P.isSameOrBefore = function(g, E) {
return this.isSame(g, E) || this.isBefore(g, E);
}, P.isValid = function() {
return _(this);
}, P.lang = st, P.locale = L_, P.localeData = R_, P.max = Lt, P.min = It, P.parsingFlags = function() {
return f({}, m(this));
}, P.set = function(g, E) {
if (typeof g == "object")
for (var I = function(ht) {
var vt, Mt = [];
for (vt in ht)
s(ht, vt) && Mt.push({ unit: vt, priority: it[vt] });
return Mt.sort(function(Vt, Ot) {
return Vt.priority - Ot.priority;
}), Mt;
}(g = K(g)), O = I.length, G = 0; G < O; G++)
this[I[G].unit](g[I[G].unit]);
else if (v(this[g = tt(g)]))
return this[g](E);
return this;
}, P.startOf = function(g) {
var E, I;
if ((g = tt(g)) === void 0 || g === "millisecond" || !this.isValid())
return this;
switch (I = this._isUTC ? B_ : N_, g) {
case "year":
E = I(this.year(), 0, 1);
break;
case "quarter":
E = I(this.year(), this.month() - this.month() % 3, 1);
break;
case "month":
E = I(this.year(), this.month(), 1);
break;
case "week":
E = I(this.year(), this.month(), this.date() - this.weekday());
break;
case "isoWeek":
E = I(this.year(), this.month(), this.date() - (this.isoWeekday() - 1));
break;
case "day":
case "date":
E = I(this.year(), this.month(), this.date());
break;
case "hour":
E = this._d.valueOf(), E -= eo(E + (this._isUTC ? 0 : 6e4 * this.utcOffset()), 36e5);
break;
case "minute":
E = this._d.valueOf(), E -= eo(E, 6e4);
break;
case "second":
E = this._d.valueOf(), E -= eo(E, 1e3);
break;
}
return this._d.setTime(E), n.updateOffset(this, !0), this;
}, P.subtract = Xe, P.toArray = function() {
var g = this;
return [g.year(), g.month(), g.date(), g.hour(), g.minute(), g.second(), g.millisecond()];
}, P.toObject = function() {
var g = this;
return { years: g.year(), months: g.month(), date: g.date(), hours: g.hours(), minutes: g.minutes(), seconds: g.seconds(), milliseconds: g.milliseconds() };
}, P.toDate = function() {
return new Date(this.valueOf());
}, P.toISOString = function(g) {
if (!this.isValid())
return null;
var E = (g = g !== !0) ? this.clone().utc() : this;
return E.year() < 0 || 9999 < E.year() ? $(E, g ? "YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]" : "YYYYYY-MM-DD[T]HH:mm:ss.SSSZ") : v(Date.prototype.toISOString) ? g ? this.toDate().toISOString() : new Date(this.valueOf() + 60 * this.utcOffset() * 1e3).toISOString().replace("Z", $(E, "Z")) : $(E, g ? "YYYY-MM-DD[T]HH:mm:ss.SSS[Z]" : "YYYY-MM-DD[T]HH:mm:ss.SSSZ");
}, P.inspect = function() {
if (!this.isValid())
return "moment.invalid(/* " + this._i + " */)";
var g, E = "moment", I = "";
return this.isLocal() || (E = this.utcOffset() === 0 ? "moment.utc" : "moment.parseZone", I = "Z"), E = "[" + E + '("]', g = 0 <= this.year() && this.year() <= 9999 ? "YYYY" : "YYYYYY", this.format(E + g + "-MM-DD[T]HH:mm:ss.SSS" + (I + '[")]'));
}, typeof Symbol < "u" && Symbol.for != null && (P[Symbol.for("nodejs.util.inspect.custom")] = function() {
return "Moment<" + this.format() + ">";
}), P.toJSON = function() {
return this.isValid() ? this.toISOString() : null;
}, P.toString = function() {
return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ");
}, P.unix = function() {
return Math.floor(this.valueOf() / 1e3);
}, P.valueOf = function() {
return this._d.valueOf() - 6e4 * (this._offset || 0);
}, P.creationData = function() {
return { input: this._i, format: this._f, locale: this._locale, isUTC: this._isUTC, strict: this._strict };
}, P.eraName = function() {
for (var g, E = this.localeData().eras(), I = 0, O = E.length; I < O; ++I)
if (g = this.clone().startOf("day").valueOf(), E[I].since <= g && g <= E[I].until || E[I].until <= g && g <= E[I].since)
return E[I].name;
return "";
}, P.eraNarrow = function() {
for (var g, E = this.localeData().eras(), I = 0, O = E.length; I < O; ++I)
if (g = this.clone().startOf("day").valueOf(), E[I].since <= g && g <= E[I].until || E[I].until <= g && g <= E[I].since)
return E[I].narrow;
return "";
}, P.eraAbbr = function() {
for (var g, E = this.localeData().eras(), I = 0, O = E.length; I < O; ++I)
if (g = this.clone().startOf("day").valueOf(), E[I].since <= g && g <= E[I].until || E[I].until <= g && g <= E[I].since)
return E[I].abbr;
return "";
}, P.eraYear = function() {
for (var g, E, I = this.localeData().eras(), O = 0, G = I.length; O < G; ++O)
if (g = I[O].since <= I[O].until ? 1 : -1, E = this.clone().startOf("day").valueOf(), I[O].since <= E && E <= I[O].until || I[O].until <= E && E <= I[O].since)
return (this.year() - n(I[O].since).year()) * g + I[O].offset;
return this.year();
}, P.year = Su, P.isLeapYear = function() {
return V(this.year());
}, P.weekYear = function(g) {
return D_.call(this, g, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData()._week.doy);
}, P.isoWeekYear = function(g) {
return D_.call(this, g, this.isoWeek(), this.isoWeekday(), 1, 4);
}, P.quarter = P.quarters = function(g) {
return g == null ? Math.ceil((this.month() + 1) / 3) : this.month(3 * (g - 1) + this.month() % 3);
}, P.month = ae, P.daysInMonth = function() {
return yt(this.year(), this.month());
}, P.week = P.weeks = function(g) {
var E = this.localeData().week(this);
return g == null ? E : this.add(7 * (g - E), "d");
}, P.isoWeek = P.isoWeeks = function(g) {
var E = $e(this, 1, 4).week;
return g == null ? E : this.add(7 * (g - E), "d");
}, P.weeksInYear = function() {
var g = this.localeData()._week;
return _r(this.year(), g.dow, g.doy);
}, P.weeksInWeekYear = function() {
var g = this.localeData()._week;
return _r(this.weekYear(), g.dow, g.doy);
}, P.isoWeeksInYear = function() {
return _r(this.year(), 1, 4);
}, P.isoWeeksInISOWeekYear = function() {
return _r(this.isoWeekYear(), 1, 4);
}, P.date = Ca, P.day = P.days = function(g) {
if (!this.isValid())
return g != null ? this : NaN;
var E, I, O = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
return g != null ? (E = g, I = this.localeData(), g = typeof E != "string" ? E : isNaN(E) ? typeof (E = I.weekdaysParse(E)) == "number" ? E : null : parseInt(E, 10), this.add(g - O, "d")) : O;
}, P.weekday = function(g) {
if (!this.isValid())
return g != null ? this : NaN;
var E = (this.day() + 7 - this.localeData()._week.dow) % 7;
return g == null ? E : this.add(g - E, "d");
}, P.isoWeekday = function(g) {
return this.isValid() ? g != null ? (E = g, I = this.localeData(), I = typeof E == "string" ? I.weekdaysParse(E) % 7 || 7 : isNaN(E) ? null : E, this.day(this.day() % 7 ? I : I - 7)) : this.day() || 7 : g != null ? this : NaN;
var E, I;
}, P.dayOfYear = function(g) {
var E = Math.round((this.clone().startOf("day") - this.clone().startOf("year")) / 864e5) + 1;
return g == null ? E : this.add(g - E, "d");
}, P.hour = P.hours = Tt, P.minute = P.minutes = hs, P.second = P.seconds = Ta, P.millisecond = P.milliseconds = Ea, P.utcOffset = function(g, E, I) {
var O, G = this._offset || 0;
if (!this.isValid())
return g != null ? this : NaN;
if (g == null)
return this._isUTC ? G : B0(this);
if (typeof g == "string") {
if ((g = cs(_t, g)) === null)
return this;
} else
Math.abs(g) < 16 && !I && (g *= 60);
return !this._isUTC && E && (O = B0(this)), this._offset = g, this._isUTC = !0, O != null && this.add(O, "m"), G !== g && (!E || this._changeInProgress ? A_(this, Gn(g - G, "m"), 1, !1) : this._changeInProgress || (this._changeInProgress = !0, n.updateOffset(this, !0), this._changeInProgress = null)), this;
}, P.utc = function(g) {
return this.utcOffset(0, g);
}, P.local = function(g) {
return this._isUTC && (this.utcOffset(0, g), this._isUTC = !1, g && this.subtract(B0(this), "m")), this;
}, P.parseZone = function() {
var g;
return this._tzm != null ? this.utcOffset(this._tzm, !1, !0) : typeof this._i == "string" && ((g = cs(mt, this._i)) != null ? this.utcOffset(g) : this.utcOffset(0, !0)), this;
}, P.hasAlignedHourOffset = function(g) {
return !!this.isValid() && (g = g ? De(g).utcOffset() : 0, (this.utcOffset() - g) % 60 == 0);
}, P.isDST = function() {
return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset();
}, P.isLocal = function() {
return !!this.isValid() && !this._isUTC;
}, P.isUtcOffset = function() {
return !!this.isValid() && this._isUTC;
}, P.isUtc = E_, P.isUTC = E_, P.zoneAbbr = function() {
return this._isUTC ? "UTC" : "";
}, P.zoneName = function() {
return this._isUTC ? "Coordinated Universal Time" : "";
}, P.dates = R("dates accessor is deprecated. Use date instead.", Ca), P.months = R("months accessor is deprecated. Use month instead", ae), P.years = R("years accessor is deprecated. Use year instead", Su), P.zone = R("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/", function(g, E) {
return g != null ? (this.utcOffset(g = typeof g != "string" ? -g : g, E), this) : -this.utcOffset();
}), P.isDSTShifted = R("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information", function() {
if (!l(this._isDSTShifted))
return this._isDSTShifted;
var g, E = {};
return T(E, this), (E = wu(E))._a ? (g = (E._isUTC ? p : De)(E._a), this._isDSTShifted = this.isValid() && 0 < function(I, O, G) {
for (var ht = Math.min(I.length, O.length), vt = Math.abs(I.length - O.length), Mt = 0, Vt = 0; Vt < ht; Vt++)
(G && I[Vt] !== O[Vt] || !G && q(I[Vt]) !== q(O[Vt])) && Mt++;
return Mt + vt;
}(E._a, g.toArray())) : this._isDSTShifted = !1, this._isDSTShifted;
}), fe = w.prototype;
function Cu(g, E, I, ht) {
var G = ce(), ht = p().set(ht, E);
return G[I](ht, g);
}
function F_(g, E, I) {
if (u(g) && (E = g, g = void 0), g = g || "", E != null)
return Cu(g, E, I, "month");
for (var O = [], G = 0; G < 12; G++)
O[G] = Cu(g, G, I, "month");
return O;
}
function F0(g, E, I, O) {
E = (typeof g == "boolean" ? u(E) && (I = E, E = void 0) : (E = g, g = !1, u(I = E) && (I = E, E = void 0)), E || "");
var G, ht = ce(), vt = g ? ht._week.dow : 0, Mt = [];
if (I != null)
return Cu(E, (I + vt) % 7, O, "day");
for (G = 0; G < 7; G++)
Mt[G] = Cu(E, (G + vt) % 7, O, "day");
return Mt;
}
fe.calendar = function(g, E, I) {
return v(g = this._calendar[g] || this._calendar.sameElse) ? g.call(E, I) : g;
}, fe.longDateFormat = function(g) {
var E = this._longDateFormat[g], I = this._longDateFormat[g.toUpperCase()];
return E || !I ? E : (this._longDateFormat[g] = I.match(z).map(function(O) {
return O === "MMMM" || O === "MM" || O === "DD" || O === "dddd" ? O.slice(1) : O;
}).join(""), this._longDateFormat[g]);
}, fe.invalidDate = function() {
return this._invalidDate;
}, fe.ordinal = function(g) {
return this._ordinal.replace("%d", g);
}, fe.preparse = O_, fe.postformat = O_, fe.relativeTime = function(g, E, I, O) {
var G = this._relativeTime[I];
return v(G) ? G(g, E, I, O) : G.replace(/%d/i, g);
}, fe.pastFuture = function(g, E) {
return v(g = this._relativeTime[0 < g ? "future" : "past"]) ? g(E) : g.replace(/%s/i, E);
}, fe.set = function(g) {
var E, I;
for (I in g)
s(g, I) && (v(E = g[I]) ? this[I] = E : this["_" + I] = E);
this._config = g, this._dayOfMonthOrdinalParseLenient = new RegExp((this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + "|" + /\d{1,2}/.source);
}, fe.eras = function(g, E) {
for (var I, O = this._eras || ce("en")._eras, G = 0, ht = O.length; G < ht; ++G) {
switch (typeof O[G].since) {
case "string":
I = n(O[G].since).startOf("day"), O[G].since = I.valueOf();
break;
}
switch (typeof O[G].until) {
case "undefined":
O[G].until = 1 / 0;
break;
case "string":
I = n(O[G].until).startOf("day").valueOf(), O[G].until = I.valueOf();
break;
}
}
return O;
}, fe.erasParse = function(g, E, I) {
var O, G, ht, vt, Mt, Vt = this.eras();
for (g = g.toUpperCase(), O = 0, G = Vt.length; O < G; ++O)
if (ht = Vt[O].name.toUpperCase(), vt = Vt[O].abbr.toUpperCase(), Mt = Vt[O].narrow.toUpperCase(), I)
switch (E) {
case "N":
case "NN":
case "NNN":
if (vt === g)
return Vt[O];
break;
case "NNNN":
if (ht === g)
return Vt[O];
break;
case "NNNNN":
if (Mt === g)
return Vt[O];
break;
}
else if (0 <= [ht, vt, Mt].indexOf(g))
return Vt[O];
}, fe.erasConvertYear = function(g, E) {
var I = g.since <= g.until ? 1 : -1;
return E === void 0 ? n(g.since).year() : n(g.since).year() + (E - g.offset) * I;
}, fe.erasAbbrRegex = function(g) {
return s(this, "_erasAbbrRegex") || O0.call(this), g ? this._erasAbbrRegex : this._erasRegex;
}, fe.erasNameRegex = function(g) {
return s(this, "_erasNameRegex") || O0.call(this), g ? this._erasNameRegex : this._erasRegex;
}, fe.erasNarrowRegex = function(g) {
return s(this, "_erasNarrowRegex") || O0.call(this), g ? this._erasNarrowRegex : this._erasRegex;
}, fe.months = function(g, E) {
return g ? (i(this._months) ? this._months : this._months[(this._months.isFormat || ge).test(E) ? "format" : "standalone"])[g.month()] : i(this._months) ? this._months : this._months.standalone;
}, fe.monthsShort = function(g, E) {
return g ? (i(this._monthsShort) ? this._monthsShort : this._monthsShort[ge.test(E) ? "format" : "standalone"])[g.month()] : i(this._monthsShort) ? this._monthsShort : this._monthsShort.standalone;
}, fe.monthsParse = function(g, E, I) {
var O, G;
if (this._monthsParseExact)
return function(ne, vt, Mt) {
var Vt, Ot, de, ne = ne.toLocaleLowerCase();
if (!this._monthsParse)
for (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = [], Vt = 0; Vt < 12; ++Vt)
de = p([2e3, Vt]), this._shortMonthsParse[Vt] = this.monthsShort(de, "").toLocaleLowerCase(), this._longMonthsParse[Vt] = this.months(de, "").toLocaleLowerCase();
return Mt ? vt === "MMM" ? (Ot = Gt.call(this._shortMonthsParse, ne)) !== -1 ? Ot : null : (Ot = Gt.call(this._longMonthsParse, ne)) !== -1 ? Ot : null : vt === "MMM" ? (Ot = Gt.call(this._shortMonthsParse, ne)) !== -1 || (Ot = Gt.call(this._longMonthsParse, ne)) !== -1 ? Ot : null : (Ot = Gt.call(this._longMonthsParse, ne)) !== -1 || (Ot = Gt.call(this._shortMonthsParse, ne)) !== -1 ? Ot : null;
}.call(this, g, E, I);
for (this._monthsParse || (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = []), O = 0; O < 12; O++)
if (G = p([2e3, O]), I && !this._longMonthsParse[O] && (this._longMonthsParse[O] = new RegExp("^" + this.months(G, "").replace(".", "") + "$", "i"), this._shortMonthsParse[O] = new RegExp("^" + this.monthsShort(G, "").replace(".", "") + "$", "i")), I || this._monthsParse[O] || (G = "^" + this.months(G, "") + "|^" + this.monthsShort(G, ""), this._monthsParse[O] = new RegExp(G.replace(".", ""), "i")), I && E === "MMMM" && this._longMonthsParse[O].test(g) || I && E === "MMM" && this._shortMonthsParse[O].test(g) || !I && this._monthsParse[O].test(g))
return O;
}, fe.monthsRegex = function(g) {
return this._monthsParseExact ? (s(this, "_monthsRegex") || ye.call(this), g ? this._monthsStrictRegex : this._monthsRegex) : (s(this, "_monthsRegex") || (this._monthsRegex = Te), this._monthsStrictRegex && g ? this._monthsStrictRegex : this._monthsRegex);
}, fe.monthsShortRegex = function(g) {
return this._monthsParseExact ? (s(this, "_monthsRegex") || ye.call(this), g ? this._monthsShortStrictRegex : this._monthsShortRegex) : (s(this, "_monthsShortRegex") || (this._monthsShortRegex = be), this._monthsShortStrictRegex && g ? this._monthsShortStrictRegex : this._monthsShortRegex);
}, fe.week = function(g) {
return $e(g, this._week.dow, this._week.doy).week;
}, fe.firstDayOfYear = function() {
return this._week.doy;
}, fe.firstDayOfWeek = function() {
return this._week.dow;
}, fe.weekdays = function(g, E) {
return E = i(this._weekdays) ? this._weekdays : this._weekdays[g && g !== !0 && this._weekdays.isFormat.test(E) ? "format" : "standalone"], g === !0 ? He(E, this._week.dow) : g ? E[g.day()] : E;
}, fe.weekdaysMin = function(g) {
return g === !0 ? He(this._weekdaysMin, this._week.dow) : g ? this._weekdaysMin[g.day()] : this._weekdaysMin;
}, fe.weekdaysShort = function(g) {
return g === !0 ? He(this._weekdaysShort, this._week.dow) : g ? this._weekdaysShort[g.day()] : this._weekdaysShort;
}, fe.weekdaysParse = function(g, E, I) {
var O, G;
if (this._weekdaysParseExact)
return function(ne, vt, Mt) {
var Vt, Ot, de, ne = ne.toLocaleLowerCase();
if (!this._weekdaysParse)
for (this._weekdaysParse = [], this._shortWeekdaysParse = [], this._minWeekdaysParse = [], Vt = 0; Vt < 7; ++Vt)
de = p([2e3, 1]).day(Vt), this._minWeekdaysParse[Vt] = this.weekdaysMin(de, "").toLocaleLowerCase(), this._shortWeekdaysParse[Vt] = this.weekdaysShort(de, "").toLocaleLowerCase(), this._weekdaysParse[Vt] = this.weekdays(de, "").toLocaleLowerCase();
return Mt ? vt === "dddd" ? (Ot = Gt.call(this._weekdaysParse, ne)) !== -1 ? Ot : null : vt === "ddd" ? (Ot = Gt.call(this._shortWeekdaysParse, ne)) !== -1 ? Ot : null : (Ot = Gt.call(this._minWeekdaysParse, ne)) !== -1 ? Ot : null : vt === "dddd" ? (Ot = Gt.call(this._weekdaysParse, ne)) !== -1 || (Ot = Gt.call(this._shortWeekdaysParse, ne)) !== -1 || (Ot = Gt.call(this._minWeekdaysParse, ne)) !== -1 ? Ot : null : vt === "ddd" ? (Ot = Gt.call(this._shortWeekdaysParse, ne)) !== -1 || (Ot = Gt.call(this._weekdaysParse, ne)) !== -1 || (Ot = Gt.call(this._minWeekdaysParse, ne)) !== -1 ? Ot : null : (Ot = Gt.call(this._minWeekdaysParse, ne)) !== -1 || (Ot = Gt.call(this._weekdaysParse, ne)) !== -1 || (Ot = Gt.call(this._shortWeekdaysParse, ne)) !== -1 ? Ot : null;
}.call(this, g, E, I);
for (this._weekdaysParse || (this._weekdaysParse = [], this._minWeekdaysParse = [], this._shortWeekdaysParse = [], this._fullWeekdaysParse = []), O = 0; O < 7; O++)
if (G = p([2e3, 1]).day(O), I && !this._fullWeekdaysParse[O] && (this._fullWeekdaysParse[O] = new RegExp("^" + this.weekdays(G, "").replace(".", "\\.?") + "$", "i"), this._shortWeekdaysParse[O] = new RegExp("^" + this.weekdaysShort(G, "").replace(".", "\\.?") + "$", "i"), this._minWeekdaysParse[O] = new RegExp("^" + this.weekdaysMin(G, "").replace(".", "\\.?") + "$", "i")), this._weekdaysParse[O] || (G = "^" + this.weekdays(G, "") + "|^" + this.weekdaysShort(G, "") + "|^" + this.weekdaysMin(G, ""), this._weekdaysParse[O] = new RegExp(G.replace(".", ""), "i")), I && E === "dddd" && this._fullWeekdaysParse[O].test(g) || I && E === "ddd" && this._shortWeekdaysParse[O].test(g) || I && E === "dd" && this._minWeekdaysParse[O].test(g) || !I && this._weekdaysParse[O].test(g))
return O;
}, fe.weekdaysRegex = function(g) {
return this._weekdaysParseExact ? (s(this, "_weekdaysRegex") || ze.call(this), g ? this._weekdaysStrictRegex : this._weekdaysRegex) : (s(this, "_weekdaysRegex") || (this._weekdaysRegex = At), this._weekdaysStrictRegex && g ? this._weekdaysStrictRegex : this._weekdaysRegex);
}, fe.weekdaysShortRegex = function(g) {
return this._weekdaysParseExact ? (s(this, "_weekdaysRegex") || ze.call(this), g ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex) : (s(this, "_weekdaysShortRegex") || (this._weekdaysShortRegex = Nt), this._weekdaysShortStrictRegex && g ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex);
}, fe.weekdaysMinRegex = function(g) {
return this._weekdaysParseExact ? (s(this, "_weekdaysRegex") || ze.call(this), g ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex) : (s(this, "_weekdaysMinRegex") || (this._weekdaysMinRegex = Jt), this._weekdaysMinStrictRegex && g ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex);
}, fe.isPM = function(g) {
return (g + "").toLowerCase().charAt(0) === "p";
}, fe.meridiem = function(g, E, I) {
return 11 < g ? I ? "pm" : "PM" : I ? "am" : "AM";
}, Xt("en", { eras: [{ since: "0001-01-01", until: 1 / 0, offset: 1, name: "Anno Domini", narrow: "AD", abbr: "AD" }, { since: "0000-12-31", until: -1 / 0, offset: 1, name: "Before Christ", narrow: "BC", abbr: "BC" }], dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, ordinal: function(g) {
var E = g % 10;
return g + (q(g % 100 / 10) === 1 ? "th" : E == 1 ? "st" : E == 2 ? "nd" : E == 3 ? "rd" : "th");
} }), n.lang = R("moment.lang is deprecated. Use moment.locale instead.", Xt), n.langData = R("moment.langData is deprecated. Use moment.localeData instead.", ce);
var ji = Math.abs;
function P_(g, E, I, O) {
return E = Gn(E, I), g._milliseconds += O * E._milliseconds, g._days += O * E._days, g._months += O * E._months, g._bubble();
}
function q_(g) {
return g < 0 ? Math.floor(g) : Math.ceil(g);
}
function V_(g) {
return 4800 * g / 146097;
}
function P0(g) {
return 146097 * g / 4800;
}
function $i(g) {
return function() {
return this.as(g);
};
}
Rt = $i("ms"), et = $i("s"), re = $i("m"), Lt = $i("h"), It = $i("d"), Xe = $i("w"), Tt = $i("M"), hs = $i("Q"), Ta = $i("y");
function fs(g) {
return function() {
return this.isValid() ? this._data[g] : NaN;
};
}
var Ea = fs("milliseconds"), Ca = fs("seconds"), Su = fs("minutes"), fe = fs("hours"), AR = fs("days"), MR = fs("months"), LR = fs("years"), Xi = Math.round, ro = { ss: 44, s: 45, m: 45, h: 22, d: 26, w: null, M: 11 };
function RR(g, E, I, O) {
var Ot = Gn(g).abs(), de = Xi(Ot.as("s")), G = Xi(Ot.as("m")), ht = Xi(Ot.as("h")), vt = Xi(Ot.as("d")), Mt = Xi(Ot.as("M")), Vt = Xi(Ot.as("w")), Ot = Xi(Ot.as("y")), de = (de <= I.ss ? ["s", de] : de < I.s && ["ss", de]) || G <= 1 && ["m"] || G < I.m && ["mm", G] || ht <= 1 && ["h"] || ht < I.h && ["hh", ht] || vt <= 1 && ["d"] || vt < I.d && ["dd", vt];
return (de = (de = I.w != null ? de || Vt <= 1 && ["w"] || Vt < I.w && ["ww", Vt] : de) || Mt <= 1 && ["M"] || Mt < I.M && ["MM", Mt] || Ot <= 1 && ["y"] || ["yy", Ot])[2] = E, de[3] = 0 < +g, de[4] = O, function(ne, Ze, dr, jn, V0) {
return V0.relativeTime(Ze || 1, !!dr, ne, jn);
}.apply(null, de);
}
var q0 = Math.abs;
function no(g) {
return (0 < g) - (g < 0) || +g;
}
function Au() {
if (!this.isValid())
return this.localeData().invalidDate();
var g, E, I, O, G, ht, vt, Mt = q0(this._milliseconds) / 1e3, Vt = q0(this._days), Ot = q0(this._months), de = this.asSeconds();
return de ? (g = Q(Mt / 60), E = Q(g / 60), Mt %= 60, g %= 60, I = Q(Ot / 12), Ot %= 12, O = Mt ? Mt.toFixed(3).replace(/\.?0+$/, "") : "", G = no(this._months) !== no(de) ? "-" : "", ht = no(this._days) !== no(de) ? "-" : "", vt = no(this._milliseconds) !== no(de) ? "-" : "", (de < 0 ? "-" : "") + "P" + (I ? G + I + "Y" : "") + (Ot ? G + Ot + "M" : "") + (Vt ? ht + Vt + "D" : "") + (E || g || Mt ? "T" : "") + (E ? vt + E + "H" : "") + (g ? vt + g + "M" : "") + (Mt ? vt + O + "S" : "")) : "P0D";
}
var Be = Hn.prototype;
return Be.isValid = function() {
return this._isValid;
}, Be.abs = function() {
var g = this._data;
return this._milliseconds = ji(this._milliseconds), this._days = ji(this._days), this._months = ji(this._months), g.milliseconds = ji(g.milliseconds), g.seconds = ji(g.seconds), g.minutes = ji(g.minutes), g.hours = ji(g.hours), g.months = ji(g.months), g.years = ji(g.years), this;
}, Be.add = function(g, E) {
return P_(this, g, E, 1);
}, Be.subtract = function(g, E) {
return P_(this, g, E, -1);
}, Be.as = function(g) {
if (!this.isValid())
return NaN;
var E, I, O = this._milliseconds;
if ((g = tt(g)) === "month" || g === "quarter" || g === "year")
switch (E = this._days + O / 864e5, I = this._months + V_(E), g) {
case "month":
return I;
case "quarter":
return I / 3;
case "year":
return I / 12;
}
else
switch (E = this._days + Math.round(P0(this._months)), g) {
case "week":
return E / 7 + O / 6048e5;
case "day":
return E + O / 864e5;
case "hour":
return 24 * E + O / 36e5;
case "minute":
return 1440 * E + O / 6e4;
case "second":
return 86400 * E + O / 1e3;
case "millisecond":
return Math.floor(864e5 * E) + O;
default:
throw new Error("Unknown unit " + g);
}
}, Be.asMilliseconds = Rt, Be.asSeconds = et, Be.asMinutes = re, Be.asHours = Lt, Be.asDays = It, Be.asWeeks = Xe, Be.asMonths = Tt, Be.asQuarters = hs, Be.asYears = Ta, Be.valueOf = function() {
return this.isValid() ? this._milliseconds + 864e5 * this._days + this._months % 12 * 2592e6 + 31536e6 * q(this._months / 12) : NaN;
}, Be._bubble = function() {
var g = this._milliseconds, E = this._days, I = this._months, O = this._data;
return 0 <= g && 0 <= E && 0 <= I || g <= 0 && E <= 0 && I <= 0 || (g += 864e5 * q_(P0(I) + E), I = E = 0), O.milliseconds = g % 1e3, g = Q(g / 1e3), O.seconds = g % 60, g = Q(g / 60), O.minutes = g % 60, g = Q(g / 60), O.hours = g % 24, E += Q(g / 24), I += g = Q(V_(E)), E -= q_(P0(g)), g = Q(I / 12), I %= 12, O.days = E, O.months = I, O.years = g, this;
}, Be.clone = function() {
return Gn(this);
}, Be.get = function(g) {
return g = tt(g), this.isValid() ? this[g + "s"]() : NaN;
}, Be.milliseconds = Ea, Be.seconds = Ca, Be.minutes = Su, Be.hours = fe, Be.days = AR, Be.weeks = function() {
return Q(this.days() / 7);
}, Be.months = MR, Be.years = LR, Be.humanize = function(g, E) {
if (!this.isValid())
return this.localeData().invalidDate();
var I = !1, O = ro;
return typeof g == "object" && (E = g, g = !1), typeof g == "boolean" && (I = g), typeof E == "object" && (O = Object.assign({}, ro, E), E.s != null && E.ss == null && (O.ss = E.s - 1)), g = this.localeData(), E = RR(this, !I, O, g), I && (E = g.pastFuture(+this, E)), g.postformat(E);
}, Be.toISOString = Au, Be.toString = Au, Be.toJSON = Au, Be.locale = L_, Be.localeData = R_, Be.toIsoString = R("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)", Au), Be.lang = st, Y("X", 0, 0, "unix"), Y("x", 0, 0, "valueOf"), ft("x", pt), ft("X", /[+-]?\d+(\.\d{1,3})?/), Qt("X", function(g, E, I) {
I._d = new Date(1e3 * parseFloat(g));
}), Qt("x", function(g, E, I) {
I._d = new Date(q(g));
}), n.version = "2.29.4", r = De, n.fn = P, n.min = function() {
return jr("isBefore", [].slice.call(arguments, 0));
}, n.max = function() {
return jr("isAfter", [].slice.call(arguments, 0));
}, n.now = function() {
return Date.now ? Date.now() : +new Date();
}, n.utc = p, n.unix = function(g) {
return De(1e3 * g);
}, n.months = function(g, E) {
return F_(g, E, "months");
}, n.isDate = h, n.locale = Xt, n.invalid = y, n.duration = Gn, n.isMoment = M, n.weekdays = function(g, E, I) {
return F0(g, E, I, "weekdays");
}, n.parseZone = function() {
return De.apply(null, arguments).parseZone();
}, n.localeData = ce, n.isDuration = Gi, n.monthsShort = function(g, E) {
return F_(g, E, "monthsShort");
}, n.weekdaysMin = function(g, E, I) {
return F0(g, E, I, "weekdaysMin");
}, n.defineLocale = te, n.updateLocale = function(g, E) {
var I, O;
return E != null ? (O = Wi, Ee[g] != null && Ee[g].parentLocale != null ? Ee[g].set(B(Ee[g]._config, E)) : (E = B(O = (I = xn(g)) != null ? I._config : O, E), I == null && (E.abbr = g), (O = new w(E)).parentLocale = Ee[g], Ee[g] = O), Xt(g)) : Ee[g] != null && (Ee[g].parentLocale != null ? (Ee[g] = Ee[g].parentLocale, g === Xt() && Xt(g)) : Ee[g] != null && delete Ee[g]), Ee[g];
}, n.locales = function() {
return D(Ee);
}, n.weekdaysShort = function(g, E, I) {
return F0(g, E, I, "weekdaysShort");
}, n.normalizeUnits = tt, n.relativeTimeRounding = function(g) {
return g === void 0 ? Xi : typeof g == "function" && (Xi = g, !0);
}, n.relativeTimeThreshold = function(g, E) {
return ro[g] !== void 0 && (E === void 0 ? ro[g] : (ro[g] = E, g === "s" && (ro.ss = E - 1), !0));
}, n.calendarFormat = function(g, E) {
return (g = g.diff(E, "days", !0)) < -6 ? "sameElse" : g < -1 ? "lastWeek" : g < 0 ? "lastDay" : g < 1 ? "sameDay" : g < 2 ? "nextDay" : g < 7 ? "nextWeek" : "sameElse";
}, n.prototype = P, n.HTML5_FMT = { DATETIME_LOCAL: "YYYY-MM-DDTHH:mm", DATETIME_LOCAL_SECONDS: "YYYY-MM-DDTHH:mm:ss", DATETIME_LOCAL_MS: "YYYY-MM-DDTHH:mm:ss.SSS", DATE: "YYYY-MM-DD", TIME: "HH:mm", TIME_SECONDS: "HH:mm:ss", TIME_MS: "HH:mm:ss.SSS", WEEK: "GGGG-[W]WW", MONTH: "YYYY-MM" }, n;
});
})(Vw);
const ai = Vw.exports, Ki = {
trace: 0,
debug: 1,
info: 2,
warn: 3,
error: 4,
fatal: 5
}, H = {
trace: (...t) => {
},
debug: (...t) => {
},
info: (...t) => {
},
warn: (...t) => {
},
error: (...t) => {
},
fatal: (...t) => {
}
}, $b = function(t = "fatal") {
let e = Ki.fatal;
typeof t == "string" ? (t = t.toLowerCase(), t in Ki && (e = Ki[t])) : typeof t == "number" && (e = t), H.trace = () => {
}, H.debug = () => {
}, H.info = () => {
}, H.warn = () => {
}, H.error = () => {
}, H.fatal = () => {
}, e <= Ki.fatal && (H.fatal = console.error ? console.error.bind(console, Ln("FATAL"), "color: orange") : console.log.bind(console, "\x1B[35m", Ln("FATAL"))), e <= Ki.error && (H.error = console.error ? console.error.bind(console, Ln("ERROR"), "color: orange") : console.log.bind(console, "\x1B[31m", Ln("ERROR"))), e <= Ki.warn && (H.warn = console.warn ? console.warn.bind(console, Ln("WARN"), "color: orange") : console.log.bind(console, "\x1B[33m", Ln("WARN"))), e <= Ki.info && (H.info = console.info ? console.info.bind(console, Ln("INFO"), "color: lightblue") : console.log.bind(console, "\x1B[34m", Ln("INFO"))), e <= Ki.debug && (H.debug = console.debug ? console.debug.bind(console, Ln("DEBUG"), "color: lightgreen") : console.log.bind(console, "\x1B[32m", Ln("DEBUG"))), e <= Ki.trace && (H.trace = console.debug ? console.debug.bind(console, Ln("TRACE"), "color: lightgreen") : console.log.bind(console, "\x1B[32m", Ln("TRACE")));
}, Ln = (t) => `%c${ai().format("ss.SSS")} : ${t} : `;
var Xb = {};
Object.defineProperty(Xb, "__esModule", { value: !0 });
var qi = Xb.sanitizeUrl = void 0, DR = /^([^\w]*)(javascript|data|vbscript)/im, OR = /(\w+)(^\w|;)?/g, FR = /[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim, PR = /^([^:]+):/gm, qR = [".", "/"];
function VR(t) {
return qR.indexOf(t[0]) > -1;
}
function zR(t) {
return t.replace(OR, function(e, r) {
return String.fromCharCode(r);
});
}
function YR(t) {
var e = zR(t || "").replace(FR, "").trim();
if (!e)
return "about:blank";
if (VR(e))
return e;
var r = e.match(PR);
if (!r)
return e;
var n = r[0];
return DR.test(n) ? "about:blank" : e;
}
qi = Xb.sanitizeUrl = YR;
function tr(t, e) {
return t == null || e == null ? NaN : t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN;
}
function zw(t, e) {
return t == null || e == null ? NaN : e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN;
}
function l1(t) {
let e, r, n;
t.length !== 2 ? (e = tr, r = (o, l) => tr(t(o), l), n = (o, l) => t(o) - l) : (e = t === tr || t === zw ? t : UR, r = t, n = t);
function i(o, l, u = 0, h = o.length) {
if (u < h) {
if (e(l, l) !== 0)
return h;
do {
const d = u + h >>> 1;
r(o[d], l) < 0 ? u = d + 1 : h = d;
} while (u < h);
}
return u;
}
function a(o, l, u = 0, h = o.length) {
if (u < h) {
if (e(l, l) !== 0)
return h;
do {
const d = u + h >>> 1;
r(o[d], l) <= 0 ? u = d + 1 : h = d;
} while (u < h);
}
return u;
}
function s(o, l, u = 0, h = o.length) {
const d = i(o, l, u, h - 1);
return d > u && n(o[d - 1], l) > -n(o[d], l) ? d - 1 : d;
}
return { left: i, center: s, right: a };
}
function UR() {
return 0;
}
function Yw(t) {
return t === null ? NaN : +t;
}
function* Uw(t, e) {
if (e === void 0)
for (let r of t)
r != null && (r = +r) >= r && (yield r);
else {
let r = -1;
for (let n of t)
(n = e(n, ++r, t)) != null && (n = +n) >= n && (yield n);
}
}
const Ww = l1(tr), Hw = Ww.right, WR = Ww.left, HR = l1(Yw).center, Us = Hw;
function GR(t, e) {
if (!((e = +e) >= 0))
throw new RangeError("invalid r");
let r = t.length;
if (!((r = Math.floor(r)) >= 0))
throw new RangeError("invalid length");
if (!r || !e)
return t;
const n = Kb(e), i = t.slice();
return n(t, i, 0, r, 1), n(i, t, 0, r, 1), n(t, i, 0, r, 1), t;
}
const Gw = jw(Kb), jR = jw($R);
function jw(t) {
return function(e, r, n = r) {
if (!((r = +r) >= 0))
throw new RangeError("invalid rx");
if (!((n = +n) >= 0))
throw new RangeError("invalid ry");
let { data: i, width: a, height: s } = e;
if (!((a = Math.floor(a)) >= 0))
throw new RangeError("invalid width");
if (!((s = Math.floor(s !== void 0 ? s : i.length / a)) >= 0))
throw new RangeError("invalid height");
if (!a || !s || !r && !n)
return e;
const o = r && t(r), l = n && t(n), u = i.slice();
return o && l ? (ao(o, u, i, a, s), ao(o, i, u, a, s), ao(o, u, i, a, s), so(l, i, u, a, s), so(l, u, i, a, s), so(l, i, u, a, s)) : o ? (ao(o, i, u, a, s), ao(o, u, i, a, s), ao(o, i, u, a, s)) : l && (so(l, i, u, a, s), so(l, u, i, a, s), so(l, i, u, a, s)), e;
};
}
function ao(t, e, r, n, i) {
for (let a = 0, s = n * i; a < s; )
t(e, r, a, a += n, 1);
}
function so(t, e, r, n, i) {
for (let a = 0, s = n * i; a < n; ++a)
t(e, r, a, a + s, n);
}
function $R(t) {
const e = Kb(t);
return (r, n, i, a, s) => {
i <<= 2, a <<= 2, s <<= 2, e(r, n, i + 0, a + 0, s), e(r, n, i + 1, a + 1, s), e(r, n, i + 2, a + 2, s), e(r, n, i + 3, a + 3, s);
};
}
function Kb(t) {
const e = Math.floor(t);
if (e === t)
return XR(t);
const r = t - e, n = 2 * t + 1;
return (i, a, s, o, l) => {
if (!((o -= l) >= s))
return;
let u = e * a[s];
const h = l * e, d = h + l;
for (let f = s, p = s + h; f < p; f += l)
u += a[Math.min(o, f)];
for (let f = s, p = o; f <= p; f += l)
u += a[Math.min(o, f + h)], i[f] = (u + r * (a[Math.max(s, f - d)] + a[Math.min(o, f + d)])) / n, u -= a[Math.max(s, f - h)];
};
}
function XR(t) {
const e = 2 * t + 1;
return (r, n, i, a, s) => {
if (!((a -= s) >= i))
return;
let o = t * n[i];
const l = s * t;
for (let u = i, h = i + l; u < h; u += s)
o += n[Math.min(a, u)];
for (let u = i, h = a; u <= h; u += s)
o += n[Math.min(a, u + l)], r[u] = o / e, o -= n[Math.max(i, u - l)];
};
}
function c1(t, e) {
let r = 0;
if (e === void 0)
for (let n of t)
n != null && (n = +n) >= n && ++r;
else {
let n = -1;
for (let i of t)
(i = e(i, ++n, t)) != null && (i = +i) >= i && ++r;
}
return r;
}
function KR(t) {
return t.length | 0;
}
function ZR(t) {
return !(t > 0);
}
function QR(t) {
return typeof t != "object" || "length" in t ? t : Array.from(t);
}
function JR(t) {
return (e) => t(...e);
}
function tI(...t) {
const e = typeof t[t.length - 1] == "function" && JR(t.pop());
t = t.map(QR);
const r = t.map(KR), n = t.length - 1, i = new Array(n + 1).fill(0), a = [];
if (n < 0 || r.some(ZR))
return a;
for (; ; ) {
a.push(i.map((o, l) => t[l][o]));
let s = n;
for (; ++i[s] === r[s]; ) {
if (s === 0)
return e ? a.map(e) : a;
i[s--] = 0;
}
}
}
function eI(t, e) {
var r = 0, n = 0;
return Float64Array.from(t, e === void 0 ? (i) => r += +i || 0 : (i) => r += +e(i, n++, t) || 0);
}
function $w(t, e) {
let r = 0, n, i = 0, a = 0;
if (e === void 0)
for (let s of t)
s != null && (s = +s) >= s && (n = s - i, i += n / ++r, a += n * (s - i));
else {
let s = -1;
for (let o of t)
(o = e(o, ++s, t)) != null && (o = +o) >= o && (n = o - i, i += n / ++r, a += n * (o - i));
}
if (r > 1)
return a / (r - 1);
}
function Xw(t, e) {
const r = $w(t, e);
return r && Math.sqrt(r);
}
function Ql(t, e) {
let r, n;
if (e === void 0)
for (const i of t)
i != null && (r === void 0 ? i >= i && (r = n = i) : (r > i && (r = i), n < i && (n = i)));
else {
let i = -1;
for (let a of t)
(a = e(a, ++i, t)) != null && (r === void 0 ? a >= a && (r = n = a) : (r > a && (r = a), n < a && (n = a)));
}
return [r, n];
}
class wr {
constructor() {
this._partials = new Float64Array(32), this._n = 0;
}
add(e) {
const r = this._partials;
let n = 0;
for (let i = 0; i < this._n && i < 32; i++) {
const a = r[i], s = e + a, o = Math.abs(e) < Math.abs(a) ? e - (s - a) : a - (s - e);
o && (r[n++] = o), e = s;
}
return r[n] = e, this._n = n + 1, this;
}
valueOf() {
const e = this._partials;
let r = this._n, n, i, a, s = 0;
if (r > 0) {
for (s = e[--r]; r > 0 && (n = s, i = e[--r], s = n + i, a = i - (s - n), !a); )
;
r > 0 && (a < 0 && e[r - 1] < 0 || a > 0 && e[r - 1] > 0) && (i = a * 2, n = s + i, i == n - s && (s = n));
}
return s;
}
}
function rI(t, e) {
const r = new wr();
if (e === void 0)
for (let n of t)
(n = +n) && r.add(n);
else {
let n = -1;
for (let i of t)
(i = +e(i, ++n, t)) && r.add(i);
}
return +r;
}
function nI(t, e) {
const r = new wr();
let n = -1;
return Float64Array.from(
t,
e === void 0 ? (i) => r.add(+i || 0) : (i) => r.add(+e(i, ++n, t) || 0)
);
}
class dc extends Map {
constructor(e, r = Qw) {
if (super(), Object.defineProperties(this, { _intern: { value: /* @__PURE__ */ new Map() }, _key: { value: r } }), e != null)
for (const [n, i] of e)
this.set(n, i);
}
get(e) {
return super.get(ym(this, e));
}
has(e) {
return super.has(ym(this, e));
}
set(e, r) {
return super.set(Kw(this, e), r);
}
delete(e) {
return super.delete(Zw(this, e));
}
}
class Ss extends Set {
constructor(e, r = Qw) {
if (super(), Object.defineProperties(this, { _intern: { value: /* @__PURE__ */ new Map() }, _key: { value: r } }), e != null)
for (const n of e)
this.add(n);
}
has(e) {
return super.has(ym(this, e));
}
add(e) {
return super.add(Kw(this, e));
}
delete(e) {
return super.delete(Zw(this, e));
}
}
function ym({ _intern: t, _key: e }, r) {
const n = e(r);
return t.has(n) ? t.get(n) : r;
}
function Kw({ _intern: t, _key: e }, r) {
const n = e(r);
return t.has(n) ? t.get(n) : (t.set(n, r), r);
}
function Zw({ _intern: t, _key: e }, r) {
const n = e(r);
return t.has(n) && (r = t.get(n), t.delete(n)), r;
}
function Qw(t) {
return t !== null && typeof t == "object" ? t.valueOf() : t;
}
function Ro(t) {
return t;
}
function Jw(t, ...e) {
return il(t, Ro, Ro, e);
}
function t9(t, ...e) {
return il(t, Array.from, Ro, e);
}
function e9(t, e) {
for (let r = 1, n = e.length; r < n; ++r)
t = t.flatMap((i) => i.pop().map(([a, s]) => [...i, a, s]));
return t;
}
function iI(t, ...e) {
return e9(t9(t, ...e), e);
}
function aI(t, e, ...r) {
return e9(n9(t, e, ...r), r);
}
function r9(t, e, ...r) {
return il(t, Ro, e, r);
}
function n9(t, e, ...r) {
return il(t, Array.from, e, r);
}
function sI(t, ...e) {
return il(t, Ro, i9, e);
}
function oI(t, ...e) {
return il(t, Array.from, i9, e);
}
function i9(t) {
if (t.length !== 1)
throw new Error("duplicate key");
return t[0];
}
function il(t, e, r, n) {
return function i(a, s) {
if (s >= n.length)
return r(a);
const o = new dc(), l = n[s++];
let u = -1;
for (const h of a) {
const d = l(h, ++u, a), f = o.get(d);
f ? f.push(h) : o.set(d, [h]);
}
for (const [h, d] of o)
o.set(h, i(d, s));
return e(o);
}(t, 0);
}
function a9(t, e) {
return Array.from(e, (r) => t[r]);
}
function mm(t, ...e) {
if (typeof t[Symbol.iterator] != "function")
throw new TypeError("values is not iterable");
t = Array.from(t);
let [r] = e;
if (r && r.length !== 2 || e.length > 1) {
const n = Uint32Array.from(t, (i, a) => a);
return e.length > 1 ? (e = e.map((i) => t.map(i)), n.sort((i, a) => {
for (const s of e) {
const o = Io(s[i], s[a]);
if (o)
return o;
}
})) : (r = t.map(r), n.sort((i, a) => Io(r[i], r[a]))), a9(t, n);
}
return t.sort(Zb(r));
}
function Zb(t = tr) {
if (t === tr)
return Io;
if (typeof t != "function")
throw new TypeError("compare is not a function");
return (e, r) => {
const n = t(e, r);
return n || n === 0 ? n : (t(r, r) === 0) - (t(e, e) === 0);
};
}
function Io(t, e) {
return (t == null || !(t >= t)) - (e == null || !(e >= e)) || (t < e ? -1 : t > e ? 1 : 0);
}
function lI(t, e, r) {
return (e.length !== 2 ? mm(r9(t, e, r), ([n, i], [a, s]) => tr(i, s) || tr(n, a)) : mm(Jw(t, r), ([n, i], [a, s]) => e(i, s) || tr(n, a))).map(([n]) => n);
}
var cI = Array.prototype, uI = cI.slice;
function Mu(t) {
return () => t;
}
var bm = Math.sqrt(50), _m = Math.sqrt(10), vm = Math.sqrt(2);
function As(t, e, r) {
var n, i = -1, a, s, o;
if (e = +e, t = +t, r = +r, t === e && r > 0)
return [t];
if ((n = e < t) && (a = t, t = e, e = a), (o = No(t, e, r)) === 0 || !isFinite(o))
return [];
if (o > 0) {
let l = Math.round(t / o), u = Math.round(e / o);
for (l * o < t && ++l, u * o > e && --u, s = new Array(a = u - l + 1); ++i < a; )
s[i] = (l + i) * o;
} else {
o = -o;
let l = Math.round(t * o), u = Math.round(e * o);
for (l / o < t && ++l, u / o > e && --u, s = new Array(a = u - l + 1); ++i < a; )
s[i] = (l + i) / o;
}
return n && s.reverse(), s;
}
function No(t, e, r) {
var n = (e - t) / Math.max(0, r), i = Math.floor(Math.log(n) / Math.LN10), a = n / Math.pow(10, i);
return i >= 0 ? (a >= bm ? 10 : a >= _m ? 5 : a >= vm ? 2 : 1) * Math.pow(10, i) : -Math.pow(10, -i) / (a >= bm ? 10 : a >= _m ? 5 : a >= vm ? 2 : 1);
}
function pc(t, e, r) {
var n = Math.abs(e - t) / Math.max(0, r), i = Math.pow(10, Math.floor(Math.log(n) / Math.LN10)), a = n / i;
return a >= bm ? i *= 10 : a >= _m ? i *= 5 : a >= vm && (i *= 2), e < t ? -i : i;
}
function s9(t, e, r) {
let n;
for (; ; ) {
const i = No(t, e, r);
if (i === n || i === 0 || !isFinite(i))
return [t, e];
i > 0 ? (t = Math.floor(t / i) * i, e = Math.ceil(e / i) * i) : i < 0 && (t = Math.ceil(t * i) / i, e = Math.floor(e * i) / i), n = i;
}
}
function Qb(t) {
return Math.ceil(Math.log(c1(t)) / Math.LN2) + 1;
}
function z_() {
var t = Ro, e = Ql, r = Qb;
function n(i) {
Array.isArray(i) || (i = Array.from(i));
var a, s = i.length, o, l, u = new Array(s);
for (a = 0; a < s; ++a)
u[a] = t(i[a], a, i);
var h = e(u), d = h[0], f = h[1], p = r(u, d, f);
if (!Array.isArray(p)) {
const b = f, x = +p;
if (e === Ql && ([d, f] = s9(d, f, x)), p = As(d, f, x), p[0] <= d && (l = No(d, f, x)), p[p.length - 1] >= f)
if (b >= f && e === Ql) {
const k = No(d, f, x);
isFinite(k) && (k > 0 ? f = (Math.floor(f / k) + 1) * k : k < 0 && (f = (Math.ceil(f * -k) + 1) / -k));
} else
p.pop();
}
for (var m = p.length; p[0] <= d; )
p.shift(), --m;
for (; p[m - 1] > f; )
p.pop(), --m;
var _ = new Array(m + 1), y;
for (a = 0; a <= m; ++a)
y = _[a] = [], y.x0 = a > 0 ? p[a - 1] : d, y.x1 = a < m ? p[a] : f;
if (isFinite(l)) {
if (l > 0)
for (a = 0; a < s; ++a)
(o = u[a]) != null && d <= o && o <= f && _[Math.min(m, Math.floor((o - d) / l))].push(i[a]);
else if (l < 0) {
for (a = 0; a < s; ++a)
if ((o = u[a]) != null && d <= o && o <= f) {
const b = Math.floor((d - o) * l);
_[Math.min(m, b + (p[b] <= o))].push(i[a]);
}
}
} else
for (a = 0; a < s; ++a)
(o = u[a]) != null && d <= o && o <= f && _[Us(p, o, 0, m)].push(i[a]);
return _;
}
return n.value = function(i) {
return arguments.length ? (t = typeof i == "function" ? i : Mu(i), n) : t;
}, n.domain = function(i) {
return arguments.length ? (e = typeof i == "function" ? i : Mu([i[0], i[1]]), n) : e;
}, n.thresholds = function(i) {
return arguments.length ? (r = typeof i == "function" ? i : Array.isArray(i) ? Mu(uI.call(i)) : Mu(i), n) : r;
}, n;
}
function Bo(t, e) {
let r;
if (e === void 0)
for (const n of t)
n != null && (r < n || r === void 0 && n >= n) && (r = n);
else {
let n = -1;
for (let i of t)
(i = e(i, ++n, t)) != null && (r < i || r === void 0 && i >= i) && (r = i);
}
return r;
}
function Jb(t, e) {
let r, n = -1, i = -1;
if (e === void 0)
for (const a of t)
++i, a != null && (r < a || r === void 0 && a >= a) && (r = a, n = i);
else
for (let a of t)
(a = e(a, ++i, t)) != null && (r < a || r === void 0 && a >= a) && (r = a, n = i);
return n;
}
function gc(t, e) {
let r;
if (e === void 0)
for (const n of t)
n != null && (r > n || r === void 0 && n >= n) && (r = n);
else {
let n = -1;
for (let i of t)
(i = e(i, ++n, t)) != null && (r > i || r === void 0 && i >= i) && (r = i);
}
return r;
}
function t3(t, e) {
let r, n = -1, i = -1;
if (e === void 0)
for (const a of t)
++i, a != null && (r > a || r === void 0 && a >= a) && (r = a, n = i);
else
for (let a of t)
(a = e(a, ++i, t)) != null && (r > a || r === void 0 && a >= a) && (r = a, n = i);
return n;
}
function u1(t, e, r = 0, n = t.length - 1, i) {
for (i = i === void 0 ? Io : Zb(i); n > r; ) {
if (n - r > 600) {
const l = n - r + 1, u = e - r + 1, h = Math.log(l), d = 0.5 * Math.exp(2 * h / 3), f = 0.5 * Math.sqrt(h * d * (l - d) / l) * (u - l / 2 < 0 ? -1 : 1), p = Math.max(r, Math.floor(e - u * d / l + f)), m = Math.min(n, Math.floor(e + (l - u) * d / l + f));
u1(t, e, p, m, i);
}
const a = t[e];
let s = r, o = n;
for (kl(t, r, e), i(t[n], a) > 0 && kl(t, r, n); s < o; ) {
for (kl(t, s, o), ++s, --o; i(t[s], a) < 0; )
++s;
for (; i(t[o], a) > 0; )
--o;
}
i(t[r], a) === 0 ? kl(t, r, o) : (++o, kl(t, o, n)), o <= e && (r = o + 1), e <= o && (n = o - 1);
}
return t;
}
function kl(t, e, r) {
const n = t[e];
t[e] = t[r], t[r] = n;
}
function o9(t, e = tr) {
let r, n = !1;
if (e.length === 1) {
let i;
for (const a of t) {
const s = e(a);
(n ? tr(s, i) > 0 : tr(s, s) === 0) && (r = a, i = s, n = !0);
}
} else
for (const i of t)
(n ? e(i, r) > 0 : e(i, i) === 0) && (r = i, n = !0);
return r;
}
function yc(t, e, r) {
if (t = Float64Array.from(Uw(t, r)), !!(n = t.length)) {
if ((e = +e) <= 0 || n < 2)
return gc(t);
if (e >= 1)
return Bo(t);
var n, i = (n - 1) * e, a = Math.floor(i), s = Bo(u1(t, a).subarray(0, a + 1)), o = gc(t.subarray(a + 1));
return s + (o - s) * (i - a);
}
}
function l9(t, e, r = Yw) {
if (!!(n = t.length)) {
if ((e = +e) <= 0 || n < 2)
return +r(t[0], 0, t);
if (e >= 1)
return +r(t[n - 1], n - 1, t);
var n, i = (n - 1) * e, a = Math.floor(i), s = +r(t[a], a, t), o = +r(t[a + 1], a + 1, t);
return s + (o - s) * (i - a);
}
}
function c9(t, e, r) {
if (t = Float64Array.from(Uw(t, r)), !!(n = t.length)) {
if ((e = +e) <= 0 || n < 2)
return t3(t);
if (e >= 1)
return Jb(t);
var n, i = Math.floor((n - 1) * e), a = (o, l) => Io(t[o], t[l]), s = u1(Uint32Array.from(t, (o, l) => l), i, 0, n - 1, a);
return o9(s.subarray(0, i + 1), (o) => t[o]);
}
}
function hI(t, e, r) {
return Math.ceil((r - e) / (2 * (yc(t, 0.75) - yc(t, 0.25)) * Math.pow(c1(t), -1 / 3)));
}
function fI(t, e, r) {
return Math.ceil((r - e) * Math.cbrt(c1(t)) / (3.49 * Xw(t)));
}
function dI(t, e) {
let r = 0, n = 0;
if (e === void 0)
for (let i of t)
i != null && (i = +i) >= i && (++r, n += i);
else {
let i = -1;
for (let a of t)
(a = e(a, ++i, t)) != null && (a = +a) >= a && (++r, n += a);
}
if (r)
return n / r;
}
function pI(t, e) {
return yc(t, 0.5, e);
}
function gI(t, e) {
return c9(t, 0.5, e);
}
function* yI(t) {
for (const e of t)
yield* e;
}
function e3(t) {
return Array.from(yI(t));
}
function mI(t, e) {
const r = new dc();
if (e === void 0)
for (let a of t)
a != null && a >= a && r.set(a, (r.get(a) || 0) + 1);
else {
let a = -1;
for (let s of t)
(s = e(s, ++a, t)) != null && s >= s && r.set(s, (r.get(s) || 0) + 1);
}
let n, i = 0;
for (const [a, s] of r)
s > i && (i = s, n = a);
return n;
}
function bI(t, e = _I) {
const r = [];
let n, i = !1;
for (const a of t)
i && r.push(e(n, a)), n = a, i = !0;
return r;
}
function _I(t, e) {
return [t, e];
}
function Da(t, e, r) {
t = +t, e = +e, r = (i = arguments.length) < 2 ? (e = t, t = 0, 1) : i < 3 ? 1 : +r;
for (var n = -1, i = Math.max(0, Math.ceil((e - t) / r)) | 0, a = new Array(i); ++n < i; )
a[n] = t + n * r;
return a;
}
function vI(t, e = tr) {
if (typeof t[Symbol.iterator] != "function")
throw new TypeError("values is not iterable");
let r = Array.from(t);
const n = new Float64Array(r.length);
e.length !== 2 && (r = r.map(e), e = tr);
const i = (o, l) => e(r[o], r[l]);
let a, s;
return Uint32Array.from(r, (o, l) => l).sort(e === tr ? (o, l) => Io(r[o], r[l]) : Zb(i)).forEach((o, l) => {
const u = i(o, a === void 0 ? o : a);
u >= 0 ? ((a === void 0 || u > 0) && (a = o, s = l), n[o] = s) : n[o] = NaN;
}), n;
}
function xI(t, e = tr) {
let r, n = !1;
if (e.length === 1) {
let i;
for (const a of t) {
const s = e(a);
(n ? tr(s, i) < 0 : tr(s, s) === 0) && (r = a, i = s, n = !0);
}
} else
for (const i of t)
(n ? e(i, r) < 0 : e(i, i) === 0) && (r = i, n = !0);
return r;
}
function u9(t, e = tr) {
if (e.length === 1)
return t3(t, e);
let r, n = -1, i = -1;
for (const a of t)
++i, (n < 0 ? e(a, a) === 0 : e(a, r) < 0) && (r = a, n = i);
return n;
}
function kI(t, e = tr) {
if (e.length === 1)
return Jb(t, e);
let r, n = -1, i = -1;
for (const a of t)
++i, (n < 0 ? e(a, a) === 0 : e(a, r) > 0) && (r = a, n = i);
return n;
}
function wI(t, e) {
const r = u9(t, e);
return r < 0 ? void 0 : r;
}
const TI = h9(Math.random);
function h9(t) {
return function(r, n = 0, i = r.length) {
let a = i - (n = +n);
for (; a; ) {
const s = t() * a-- | 0, o = r[a + n];
r[a + n] = r[s + n], r[s + n] = o;
}
return r;
};
}
function EI(t, e) {
let r = 0;
if (e === void 0)
for (let n of t)
(n = +n) && (r += n);
else {
let n = -1;
for (let i of t)
(i = +e(i, ++n, t)) && (r += i);
}
return r;
}
function f9(t) {
if (!(a = t.length))
return [];
for (var e = -1, r = gc(t, CI), n = new Array(r); ++e < r; )
for (var i = -1, a, s = n[e] = new Array(a); ++i < a; )
s[i] = t[i][e];
return n;
}
function CI(t) {
return t.length;
}
function SI() {
return f9(arguments);
}
function AI(t, e) {
if (typeof e != "function")
throw new TypeError("test is not a function");
let r = -1;
for (const n of t)
if (!e(n, ++r, t))
return !1;
return !0;
}
function MI(t, e) {
if (typeof e != "function")
throw new TypeError("test is not a function");
let r = -1;
for (const n of t)
if (e(n, ++r, t))
return !0;
return !1;
}
function LI(t, e) {
if (typeof e != "function")
throw new TypeError("test is not a function");
const r = [];
let n = -1;
for (const i of t)
e(i, ++n, t) && r.push(i);
return r;
}
function RI(t, e) {
if (typeof t[Symbol.iterator] != "function")
throw new TypeError("values is not iterable");
if (typeof e != "function")
throw new TypeError("mapper is not a function");
return Array.from(t, (r, n) => e(r, n, t));
}
function II(t, e, r) {
if (typeof e != "function")
throw new TypeError("reducer is not a function");
const n = t[Symbol.iterator]();
let i, a, s = -1;
if (arguments.length < 3) {
if ({ done: i, value: r } = n.next(), i)
return;
++s;
}
for (; { done: i, value: a } = n.next(), !i; )
r = e(r, a, ++s, t);
return r;
}
function NI(t) {
if (typeof t[Symbol.iterator] != "function")
throw new TypeError("values is not iterable");
return Array.from(t).reverse();
}
function BI(t, ...e) {
t = new Ss(t);
for (const r of e)
for (const n of r)
t.delete(n);
return t;
}
function DI(t, e) {
const r = e[Symbol.iterator](), n = new Ss();
for (const i of t) {
if (n.has(i))
return !1;
let a, s;
for (; ({ value: a, done: s } = r.next()) && !s; ) {
if (Object.is(i, a))
return !1;
n.add(a);
}
}
return !0;
}
function OI(t, ...e) {
t = new Ss(t), e = e.map(FI);
t:
for (const r of t)
for (const n of e)
if (!n.has(r)) {
t.delete(r);
continue t;
}
return t;
}
function FI(t) {
return t instanceof Ss ? t : new Ss(t);
}
function d9(t, e) {
const r = t[Symbol.iterator](), n = /* @__PURE__ */ new Set();
for (const i of e) {
const a = Y_(i);
if (n.has(a))
continue;
let s, o;
for (; { value: s, done: o } = r.next(); ) {
if (o)
return !1;
const l = Y_(s);
if (n.add(l), Object.is(a, l))
break;
}
}
return !0;
}
function Y_(t) {
return t !== null && typeof t == "object" ? t.valueOf() : t;
}
function PI(t, e) {
return d9(e, t);
}
function qI(...t) {
const e = new Ss();
for (const r of t)
for (const n of r)
e.add(n);
return e;
}
function VI(t) {
return t;
}
var dh = 1, ph = 2, xm = 3, Fl = 4, U_ = 1e-6;
function zI(t) {
return "translate(" + t + ",0)";
}
function YI(t) {
return "translate(0," + t + ")";
}
function UI(t) {
return (e) => +t(e);
}
function WI(t, e) {
return e = Math.max(0, t.bandwidth() - e * 2) / 2, t.round() && (e = Math.round(e)), (r) => +t(r) + e;
}
function HI() {
return !this.__axis;
}
function h1(t, e) {
var r = [], n = null, i = null, a = 6, s = 6, o = 3, l = typeof window < "u" && window.devicePixelRatio > 1 ? 0 : 0.5, u = t === dh || t === Fl ? -1 : 1, h = t === Fl || t === ph ? "x" : "y", d = t === dh || t === xm ? zI : YI;
function f(p) {
var m = n == null ? e.ticks ? e.ticks.apply(e, r) : e.domain() : n, _ = i == null ? e.tickFormat ? e.tickFormat.apply(e, r) : VI : i, y = Math.max(a, 0) + o, b = e.range(), x = +b[0] + l, k = +b[b.length - 1] + l, T = (e.bandwidth ? WI : UI)(e.copy(), l), C = p.selection ? p.selection() : p, M = C.selectAll(".domain").data([null]), S = C.selectAll(".tick").data(m, e).order(), R = S.exit(), A = S.enter().append("g").attr("class", "tick"), L = S.select("line"), v = S.select("text");
M = M.merge(M.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor")), S = S.merge(A), L = L.merge(A.append("line").attr("stroke", "currentColor").attr(h + "2", u * a)), v = v.merge(A.append("text").attr("fill", "currentColor").attr(h, u * y).attr("dy", t === dh ? "0em" : t === xm ? "0.71em" : "0.32em")), p !== C && (M = M.transition(p), S = S.transition(p), L = L.transition(p), v = v.transition(p), R = R.transition(p).attr("opacity", U_).attr("transform", function(B) {
return isFinite(B = T(B)) ? d(B + l) : this.getAttribute("transform");
}), A.attr("opacity", U_).attr("transform", function(B) {
var w = this.parentNode.__axis;
return d((w && isFinite(w = w(B)) ? w : T(B)) + l);
})), R.remove(), M.attr("d", t === Fl || t === ph ? s ? "M" + u * s + "," + x + "H" + l + "V" + k + "H" + u * s : "M" + l + "," + x + "V" + k : s ? "M" + x + "," + u * s + "V" + l + "H" + k + "V" + u * s : "M" + x + "," + l + "H" + k), S.attr("opacity", 1).attr("transform", function(B) {
return d(T(B) + l);
}), L.attr(h + "2", u * a), v.attr(h, u * y).text(_), C.filter(HI).attr("fill", "none").attr("font-size", 10).attr("font-family", "sans-serif").attr("text-anchor", t === ph ? "start" : t === Fl ? "end" : "middle"), C.each(function() {
this.__axis = T;
});
}
return f.scale = function(p) {
return arguments.length ? (e = p, f) : e;
}, f.ticks = function() {
return r = Array.from(arguments), f;
}, f.tickArguments = function(p) {
return arguments.length ? (r = p == null ? [] : Array.from(p), f) : r.slice();
}, f.tickValues = function(p) {
return arguments.length ? (n = p == null ? null : Array.from(p), f) : n && n.slice();
}, f.tickFormat = function(p) {
return arguments.length ? (i = p, f) : i;
}, f.tickSize = function(p) {
return arguments.length ? (a = s = +p, f) : a;
}, f.tickSizeInner = function(p) {
return arguments.length ? (a = +p, f) : a;
}, f.tickSizeOuter = function(p) {
return arguments.length ? (s = +p, f) : s;
}, f.tickPadding = function(p) {
return arguments.length ? (o = +p, f) : o;
}, f.offset = function(p) {
return arguments.length ? (l = +p, f) : l;
}, f;
}
function p9(t) {
return h1(dh, t);
}
function GI(t) {
return h1(ph, t);
}
function g9(t) {
return h1(xm, t);
}
function jI(t) {
return h1(Fl, t);
}
var $I = { value: () => {
} };
function Ws() {
for (var t = 0, e = arguments.length, r = {}, n; t < e; ++t) {
if (!(n = arguments[t] + "") || n in r || /[\s.]/.test(n))
throw new Error("illegal type: " + n);
r[n] = [];
}
return new gh(r);
}
function gh(t) {
this._ = t;
}
function XI(t, e) {
return t.trim().split(/^|\s+/).map(function(r) {
var n = "", i = r.indexOf(".");
if (i >= 0 && (n = r.slice(i + 1), r = r.slice(0, i)), r && !e.hasOwnProperty(r))
throw new Error("unknown type: " + r);
return { type: r, name: n };
});
}
gh.prototype = Ws.prototype = {
constructor: gh,
on: function(t, e) {
var r = this._, n = XI(t + "", r), i, a = -1, s = n.length;
if (arguments.length < 2) {
for (; ++a < s; )
if ((i = (t = n[a]).type) && (i = KI(r[i], t.name)))
return i;
return;
}
if (e != null && typeof e != "function")
throw new Error("invalid callback: " + e);
for (; ++a < s; )
if (i = (t = n[a]).type)
r[i] = W_(r[i], t.name, e);
else if (e == null)
for (i in r)
r[i] = W_(r[i], t.name, null);
return this;
},
copy: function() {
var t = {}, e = this._;
for (var r in e)
t[r] = e[r].slice();
return new gh(t);
},
call: function(t, e) {
if ((i = arguments.length - 2) > 0)
for (var r = new Array(i), n = 0, i, a; n < i; ++n)
r[n] = arguments[n + 2];
if (!this._.hasOwnProperty(t))
throw new Error("unknown type: " + t);
for (a = this._[t], n = 0, i = a.length; n < i; ++n)
a[n].value.apply(e, r);
},
apply: function(t, e, r) {
if (!this._.hasOwnProperty(t))
throw new Error("unknown type: " + t);
for (var n = this._[t], i = 0, a = n.length; i < a; ++i)
n[i].value.apply(e, r);
}
};
function KI(t, e) {
for (var r = 0, n = t.length, i; r < n; ++r)
if ((i = t[r]).name === e)
return i.value;
}
function W_(t, e, r) {
for (var n = 0, i = t.length; n < i; ++n)
if (t[n].name === e) {
t[n] = $I, t = t.slice(0, n).concat(t.slice(n + 1));
break;
}
return r != null && t.push({ name: e, value: r }), t;
}
var km = "http://www.w3.org/1999/xhtml";
const wm = {
svg: "http://www.w3.org/2000/svg",
xhtml: km,
xlink: "http://www.w3.org/1999/xlink",
xml: "http://www.w3.org/XML/1998/namespace",
xmlns: "http://www.w3.org/2000/xmlns/"
};
function Xc(t) {
var e = t += "", r = e.indexOf(":");
return r >= 0 && (e = t.slice(0, r)) !== "xmlns" && (t = t.slice(r + 1)), wm.hasOwnProperty(e) ? { space: wm[e], local: t } : t;
}
function ZI(t) {
return function() {
var e = this.ownerDocument, r = this.namespaceURI;
return r === km && e.documentElement.namespaceURI === km ? e.createElement(t) : e.createElementNS(r, t);
};
}
function QI(t) {
return function() {
return this.ownerDocument.createElementNS(t.space, t.local);
};
}
function f1(t) {
var e = Xc(t);
return (e.local ? QI : ZI)(e);
}
function JI() {
}
function d1(t) {
return t == null ? JI : function() {
return this.querySelector(t);
};
}
function tN(t) {
typeof t != "function" && (t = d1(t));
for (var e = this._groups, r = e.length, n = new Array(r), i = 0; i < r; ++i)
for (var a = e[i], s = a.length, o = n[i] = new Array(s), l, u, h = 0; h < s; ++h)
(l = a[h]) && (u = t.call(l, l.__data__, h, a)) && ("__data__" in l && (u.__data__ = l.__data__), o[h] = u);
return new an(n, this._parents);
}
function y9(t) {
return t == null ? [] : Array.isArray(t) ? t : Array.from(t);
}
function eN() {
return [];
}
function r3(t) {
return t == null ? eN : function() {
return this.querySelectorAll(t);
};
}
function rN(t) {
return function() {
return y9(t.apply(this, arguments));
};
}
function nN(t) {
typeof t == "function" ? t = rN(t) : t = r3(t);
for (var e = this._groups, r = e.length, n = [], i = [], a = 0; a < r; ++a)
for (var s = e[a], o = s.length, l, u = 0; u < o; ++u)
(l = s[u]) && (n.push(t.call(l, l.__data__, u, s)), i.push(l));
return new an(n, i);
}
function n3(t) {
return function() {
return this.matches(t);
};
}
function m9(t) {
return function(e) {
return e.matches(t);
};
}
var iN = Array.prototype.find;
function aN(t) {
return function() {
return iN.call(this.children, t);
};
}
function sN() {
return this.firstElementChild;
}
function oN(t) {
return this.select(t == null ? sN : aN(typeof t == "function" ? t : m9(t)));
}
var lN = Array.prototype.filter;
function cN() {
return Array.from(this.children);
}
function uN(t) {
return function() {
return lN.call(this.children, t);
};
}
function hN(t) {
return this.selectAll(t == null ? cN : uN(typeof t == "function" ? t : m9(t)));
}
function fN(t) {
typeof t != "function" && (t = n3(t));
for (var e = this._groups, r = e.length, n = new Array(r), i = 0; i < r; ++i)
for (var a = e[i], s = a.length, o = n[i] = [], l, u = 0; u < s; ++u)
(l = a[u]) && t.call(l, l.__data__, u, a) && o.push(l);
return new an(n, this._parents);
}
function b9(t) {
return new Array(t.length);
}
function dN() {
return new an(this._enter || this._groups.map(b9), this._parents);
}
function zh(t, e) {
this.ownerDocument = t.ownerDocument, this.namespaceURI = t.namespaceURI, this._next = null, this._parent = t, this.__data__ = e;
}
zh.prototype = {
constructor: zh,
appendChild: function(t) {
return this._parent.insertBefore(t, this._next);
},
insertBefore: function(t, e) {
return this._parent.insertBefore(t, e);
},
querySelector: function(t) {
return this._parent.querySelector(t);
},
querySelectorAll: function(t) {
return this._parent.querySelectorAll(t);
}
};
function pN(t) {
return function() {
return t;
};
}
function gN(t, e, r, n, i, a) {
for (var s = 0, o, l = e.length, u = a.length; s < u; ++s)
(o = e[s]) ? (o.__data__ = a[s], n[s] = o) : r[s] = new zh(t, a[s]);
for (; s < l; ++s)
(o = e[s]) && (i[s] = o);
}
function yN(t, e, r, n, i, a, s) {
var o, l, u = /* @__PURE__ */ new Map(), h = e.length, d = a.length, f = new Array(h), p;
for (o = 0; o < h; ++o)
(l = e[o]) && (f[o] = p = s.call(l, l.__data__, o, e) + "", u.has(p) ? i[o] = l : u.set(p, l));
for (o = 0; o < d; ++o)
p = s.call(t, a[o], o, a) + "", (l = u.get(p)) ? (n[o] = l, l.__data__ = a[o], u.delete(p)) : r[o] = new zh(t, a[o]);
for (o = 0; o < h; ++o)
(l = e[o]) && u.get(f[o]) === l && (i[o] = l);
}
function mN(t) {
return t.__data__;
}
function bN(t, e) {
if (!arguments.length)
return Array.from(this, mN);
var r = e ? yN : gN, n = this._parents, i = this._groups;
typeof t != "function" && (t = pN(t));
for (var a = i.length, s = new Array(a), o = new Array(a), l = new Array(a), u = 0; u < a; ++u) {
var h = n[u], d = i[u], f = d.length, p = _N(t.call(h, h && h.__data__, u, n)), m = p.length, _ = o[u] = new Array(m), y = s[u] = new Array(m), b = l[u] = new Array(f);
r(h, d, _, y, b, p, e);
for (var x = 0, k = 0, T, C; x < m; ++x)
if (T = _[x]) {
for (x >= k && (k = x + 1); !(C = y[k]) && ++k < m; )
;
T._next = C || null;
}
}
return s = new an(s, n), s._enter = o, s._exit = l, s;
}
function _N(t) {
return typeof t == "object" && "length" in t ? t : Array.from(t);
}
function vN() {
return new an(this._exit || this._groups.map(b9), this._parents);
}
function xN(t, e, r) {
var n = this.enter(), i = this, a = this.exit();
return typeof t == "function" ? (n = t(n), n && (n = n.selection())) : n = n.append(t + ""), e != null && (i = e(i), i && (i = i.selection())), r == null ? a.remove() : r(a), n && i ? n.merge(i).order() : i;
}
function kN(t) {
for (var e = t.selection ? t.selection() : t, r = this._groups, n = e._groups, i = r.length, a = n.length, s = Math.min(i, a), o = new Array(i), l = 0; l < s; ++l)
for (var u = r[l], h = n[l], d = u.length, f = o[l] = new Array(d), p, m = 0; m < d; ++m)
(p = u[m] || h[m]) && (f[m] = p);
for (; l < i; ++l)
o[l] = r[l];
return new an(o, this._parents);
}
function wN() {
for (var t = this._groups, e = -1, r = t.length; ++e < r; )
for (var n = t[e], i = n.length - 1, a = n[i], s; --i >= 0; )
(s = n[i]) && (a && s.compareDocumentPosition(a) ^ 4 && a.parentNode.insertBefore(s, a), a = s);
return this;
}
function TN(t) {
t || (t = EN);
function e(d, f) {
return d && f ? t(d.__data__, f.__data__) : !d - !f;
}
for (var r = this._groups, n = r.length, i = new Array(n), a = 0; a < n; ++a) {
for (var s = r[a], o = s.length, l = i[a] = new Array(o), u, h = 0; h < o; ++h)
(u = s[h]) && (l[h] = u);
l.sort(e);
}
return new an(i, this._parents).order();
}
function EN(t, e) {
return t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN;
}
function CN() {
var t = arguments[0];
return arguments[0] = this, t.apply(null, arguments), this;
}
function SN() {
return Array.from(this);
}
function AN() {
for (var t = this._groups, e = 0, r = t.length; e < r; ++e)
for (var n = t[e], i = 0, a = n.length; i < a; ++i) {
var s = n[i];
if (s)
return s;
}
return null;
}
function MN() {
let t = 0;
for (const e of this)
++t;
return t;
}
function LN() {
return !this.node();
}
function RN(t) {
for (var e = this._groups, r = 0, n = e.length; r < n; ++r)
for (var i = e[r], a = 0, s = i.length, o; a < s; ++a)
(o = i[a]) && t.call(o, o.__data__, a, i);
return this;
}
function IN(t) {
return function() {
this.removeAttribute(t);
};
}
function NN(t) {
return function() {
this.removeAttributeNS(t.space, t.local);
};
}
function BN(t, e) {
return function() {
this.setAttribute(t, e);
};
}
function DN(t, e) {
return function() {
this.setAttributeNS(t.space, t.local, e);
};
}
function ON(t, e) {
return function() {
var r = e.apply(this, arguments);
r == null ? this.removeAttribute(t) : this.setAttribute(t, r);
};
}
function FN(t, e) {
return function() {
var r = e.apply(this, arguments);
r == null ? this.removeAttributeNS(t.space, t.local) : this.setAttributeNS(t.space, t.local, r);
};
}
function PN(t, e) {
var r = Xc(t);
if (arguments.length < 2) {
var n = this.node();
return r.local ? n.getAttributeNS(r.space, r.local) : n.getAttribute(r);
}
return this.each((e == null ? r.local ? NN : IN : typeof e == "function" ? r.local ? FN : ON : r.local ? DN : BN)(r, e));
}
function i3(t) {
return t.ownerDocument && t.ownerDocument.defaultView || t.document && t || t.defaultView;
}
function qN(t) {
return function() {
this.style.removeProperty(t);
};
}
function VN(t, e, r) {
return function() {
this.style.setProperty(t, e, r);
};
}
function zN(t, e, r) {
return function() {
var n = e.apply(this, arguments);
n == null ? this.style.removeProperty(t) : this.style.setProperty(t, n, r);
};
}
function YN(t, e, r) {
return arguments.length > 1 ? this.each((e == null ? qN : typeof e == "function" ? zN : VN)(t, e, r == null ? "" : r)) : Ms(this.node(), t);
}
function Ms(t, e) {
return t.style.getPropertyValue(e) || i3(t).getComputedStyle(t, null).getPropertyValue(e);
}
function UN(t) {
return function() {
delete this[t];
};
}
function WN(t, e) {
return function() {
this[t] = e;
};
}
function HN(t, e) {
return function() {
var r = e.apply(this, arguments);
r == null ? delete this[t] : this[t] = r;
};
}
function GN(t, e) {
return arguments.length > 1 ? this.each((e == null ? UN : typeof e == "function" ? HN : WN)(t, e)) : this.node()[t];
}
function _9(t) {
return t.trim().split(/^|\s+/);
}
function a3(t) {
return t.classList || new v9(t);
}
function v9(t) {
this._node = t, this._names = _9(t.getAttribute("class") || "");
}
v9.prototype = {
add: function(t) {
var e = this._names.indexOf(t);
e < 0 && (this._names.push(t), this._node.setAttribute("class", this._names.join(" ")));
},
remove: function(t) {
var e = this._names.indexOf(t);
e >= 0 && (this._names.splice(e, 1), this._node.setAttribute("class", this._names.join(" ")));
},
contains: function(t) {
return this._names.indexOf(t) >= 0;
}
};
function x9(t, e) {
for (var r = a3(t), n = -1, i = e.length; ++n < i; )
r.add(e[n]);
}
function k9(t, e) {
for (var r = a3(t), n = -1, i = e.length; ++n < i; )
r.remove(e[n]);
}
function jN(t) {
return function() {
x9(this, t);
};
}
function $N(t) {
return function() {
k9(this, t);
};
}
function XN(t, e) {
return function() {
(e.apply(this, arguments) ? x9 : k9)(this, t);
};
}
function KN(t, e) {
var r = _9(t + "");
if (arguments.length < 2) {
for (var n = a3(this.node()), i = -1, a = r.length; ++i < a; )
if (!n.contains(r[i]))
return !1;
return !0;
}
return this.each((typeof e == "function" ? XN : e ? jN : $N)(r, e));
}
function ZN() {
this.textContent = "";
}
function QN(t) {
return function() {
this.textContent = t;
};
}
function JN(t) {
return function() {
var e = t.apply(this, arguments);
this.textContent = e == null ? "" : e;
};
}
function tB(t) {
return arguments.length ? this.each(t == null ? ZN : (typeof t == "function" ? JN : QN)(t)) : this.node().textContent;
}
function eB() {
this.innerHTML = "";
}
function rB(t) {
return function() {
this.innerHTML = t;
};
}
function nB(t) {
return function() {
var e = t.apply(this, arguments);
this.innerHTML = e == null ? "" : e;
};
}
function iB(t) {
return arguments.length ? this.each(t == null ? eB : (typeof t == "function" ? nB : rB)(t)) : this.node().innerHTML;
}
function aB() {
this.nextSibling && this.parentNode.appendChild(this);
}
function sB() {
return this.each(aB);
}
function oB() {
this.previousSibling && this.parentNode.insertBefore(this, this.parentNode.firstChild);
}
function lB() {
return this.each(oB);
}
function cB(t) {
var e = typeof t == "function" ? t : f1(t);
return this.select(function() {
return this.appendChild(e.apply(this, arguments));
});
}
function uB() {
return null;
}
function hB(t, e) {
var r = typeof t == "function" ? t : f1(t), n = e == null ? uB : typeof e == "function" ? e : d1(e);
return this.select(function() {
return this.insertBefore(r.apply(this, arguments), n.apply(this, arguments) || null);
});
}
function fB() {
var t = this.parentNode;
t && t.removeChild(this);
}
function dB() {
return this.each(fB);
}
function pB() {
var t = this.cloneNode(!1), e = this.parentNode;
return e ? e.insertBefore(t, this.nextSibling) : t;
}
function gB() {
var t = this.cloneNode(!0), e = this.parentNode;
return e ? e.insertBefore(t, this.nextSibling) : t;
}
function yB(t) {
return this.select(t ? gB : pB);
}
function mB(t) {
return arguments.length ? this.property("__data__", t) : this.node().__data__;
}
function bB(t) {
return function(e) {
t.call(this, e, this.__data__);
};
}
function _B(t) {
return t.trim().split(/^|\s+/).map(function(e) {
var r = "", n = e.indexOf(".");
return n >= 0 && (r = e.slice(n + 1), e = e.slice(0, n)), { type: e, name: r };
});
}
function vB(t) {
return function() {
var e = this.__on;
if (!!e) {
for (var r = 0, n = -1, i = e.length, a; r < i; ++r)
a = e[r], (!t.type || a.type === t.type) && a.name === t.name ? this.removeEventListener(a.type, a.listener, a.options) : e[++n] = a;
++n ? e.length = n : delete this.__on;
}
};
}
function xB(t, e, r) {
return function() {
var n = this.__on, i, a = bB(e);
if (n) {
for (var s = 0, o = n.length; s < o; ++s)
if ((i = n[s]).type === t.type && i.name === t.name) {
this.removeEventListener(i.type, i.listener, i.options), this.addEventListener(i.type, i.listener = a, i.options = r), i.value = e;
return;
}
}
this.addEventListener(t.type, a, r), i = { type: t.type, name: t.name, value: e, listener: a, options: r }, n ? n.push(i) : this.__on = [i];
};
}
function kB(t, e, r) {
var n = _B(t + ""), i, a = n.length, s;
if (arguments.length < 2) {
var o = this.node().__on;
if (o) {
for (var l = 0, u = o.length, h; l < u; ++l)
for (i = 0, h = o[l]; i < a; ++i)
if ((s = n[i]).type === h.type && s.name === h.name)
return h.value;
}
return;
}
for (o = e ? xB : vB, i = 0; i < a; ++i)
this.each(o(n[i], e, r));
return this;
}
function w9(t, e, r) {
var n = i3(t), i = n.CustomEvent;
typeof i == "function" ? i = new i(e, r) : (i = n.document.createEvent("Event"), r ? (i.initEvent(e, r.bubbles, r.cancelable), i.detail = r.detail) : i.initEvent(e, !1, !1)), t.dispatchEvent(i);
}
function wB(t, e) {
return function() {
return w9(this, t, e);
};
}
function TB(t, e) {
return function() {
return w9(this, t, e.apply(this, arguments));
};
}
function EB(t, e) {
return this.each((typeof e == "function" ? TB : wB)(t, e));
}
function* CB() {
for (var t = this._groups, e = 0, r = t.length; e < r; ++e)
for (var n = t[e], i = 0, a = n.length, s; i < a; ++i)
(s = n[i]) && (yield s);
}
var s3 = [null];
function an(t, e) {
this._groups = t, this._parents = e;
}
function Hs() {
return new an([[document.documentElement]], s3);
}
function SB() {
return this;
}
an.prototype = Hs.prototype = {
constructor: an,
select: tN,
selectAll: nN,
selectChild: oN,
selectChildren: hN,
filter: fN,
data: bN,
enter: dN,
exit: vN,
join: xN,
merge: kN,
selection: SB,
order: wN,
sort: TN,
call: CN,
nodes: SN,
node: AN,
size: MN,
empty: LN,
each: RN,
attr: PN,
style: YN,
property: GN,
classed: KN,
text: tB,
html: iB,
raise: sB,
lower: lB,
append: cB,
insert: hB,
remove: dB,
clone: yB,
datum: mB,
on: kB,
dispatch: EB,
[Symbol.iterator]: CB
};
function St(t) {
return typeof t == "string" ? new an([[document.querySelector(t)]], [document.documentElement]) : new an([[t]], s3);
}
function AB(t) {
return St(f1(t).call(document.documentElement));
}
var MB = 0;
function T9() {
return new Tm();
}
function Tm() {
this._ = "@" + (++MB).toString(36);
}
Tm.prototype = T9.prototype = {
constructor: Tm,
get: function(t) {
for (var e = this._; !(e in t); )
if (!(t = t.parentNode))
return;
return t[e];
},
set: function(t, e) {
return t[this._] = e;
},
remove: function(t) {
return this._ in t && delete t[this._];
},
toString: function() {
return this._;
}
};
function E9(t) {
let e;
for (; e = t.sourceEvent; )
t = e;
return t;
}
function Cn(t, e) {
if (t = E9(t), e === void 0 && (e = t.currentTarget), e) {
var r = e.ownerSVGElement || e;
if (r.createSVGPoint) {
var n = r.createSVGPoint();
return n.x = t.clientX, n.y = t.clientY, n = n.matrixTransform(e.getScreenCTM().inverse()), [n.x, n.y];
}
if (e.getBoundingClientRect) {
var i = e.getBoundingClientRect();
return [t.clientX - i.left - e.clientLeft, t.clientY - i.top - e.clientTop];
}
}
return [t.pageX, t.pageY];
}
function LB(t, e) {
return t.target && (t = E9(t), e === void 0 && (e = t.currentTarget), t = t.touches || [t]), Array.from(t, (r) => Cn(r, e));
}
function p1(t) {
return typeof t == "string" ? new an([document.querySelectorAll(t)], [document.documentElement]) : new an([y9(t)], s3);
}
const RB = { passive: !1 }, mc = { capture: !0, passive: !1 };
function z0(t) {
t.stopImmediatePropagation();
}
function ko(t) {
t.preventDefault(), t.stopImmediatePropagation();
}
function g1(t) {
var e = t.document.documentElement, r = St(t).on("dragstart.drag", ko, mc);
"onselectstart" in e ? r.on("selectstart.drag", ko, mc) : (e.__noselect = e.style.MozUserSelect, e.style.MozUserSelect = "none");
}
function y1(t, e) {
var r = t.document.documentElement, n = St(t).on("dragstart.drag", null);
e && (n.on("click.drag", ko, mc), setTimeout(function() {
n.on("click.drag", null);
}, 0)), "onselectstart" in r ? n.on("selectstart.drag", null) : (r.style.MozUserSelect = r.__noselect, delete r.__noselect);
}
const Lu = (t) => () => t;
function Em(t, {
sourceEvent: e,
subject: r,
target: n,
identifier: i,
active: a,
x: s,
y: o,
dx: l,
dy: u,
dispatch: h
}) {
Object.defineProperties(this, {
type: { value: t, enumerable: !0, configurable: !0 },
sourceEvent: { value: e, enumerable: !0, configurable: !0 },
subject: { value: r, enumerable: !0, configurable: !0 },
target: { value: n, enumerable: !0, configurable: !0 },
identifier: { value: i, enumerable: !0, configurable: !0 },
active: { value: a, enumerable: !0, configurable: !0 },
x: { value: s, enumerable: !0, configurable: !0 },
y: { value: o, enumerable: !0, configurable: !0 },
dx: { value: l, enumerable: !0, configurable: !0 },
dy: { value: u, enumerable: !0, configurable: !0 },
_: { value: h }
});
}
Em.prototype.on = function() {
var t = this._.on.apply(this._, arguments);
return t === this._ ? this : t;
};
function IB(t) {
return !t.ctrlKey && !t.button;
}
function NB() {
return this.parentNode;
}
function BB(t, e) {
return e == null ? { x: t.x, y: t.y } : e;
}
function DB() {
return navigator.maxTouchPoints || "ontouchstart" in this;
}
function OB() {
var t = IB, e = NB, r = BB, n = DB, i = {}, a = Ws("start", "drag", "end"), s = 0, o, l, u, h, d = 0;
function f(T) {
T.on("mousedown.drag", p).filter(n).on("touchstart.drag", y).on("touchmove.drag", b, RB).on("touchend.drag touchcancel.drag", x).style("touch-action", "none").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
}
function p(T, C) {
if (!(h || !t.call(this, T, C))) {
var M = k(this, e.call(this, T, C), T, C, "mouse");
!M || (St(T.view).on("mousemove.drag", m, mc).on("mouseup.drag", _, mc), g1(T.view), z0(T), u = !1, o = T.clientX, l = T.clientY, M("start", T));
}
}
function m(T) {
if (ko(T), !u) {
var C = T.clientX - o, M = T.clientY - l;
u = C * C + M * M > d;
}
i.mouse("drag", T);
}
function _(T) {
St(T.view).on("mousemove.drag mouseup.drag", null), y1(T.view, u), ko(T), i.mouse("end", T);
}
function y(T, C) {
if (!!t.call(this, T, C)) {
var M = T.changedTouches, S = e.call(this, T, C), R = M.length, A, L;
for (A = 0; A < R; ++A)
(L = k(this, S, T, C, M[A].identifier, M[A])) && (z0(T), L("start", T, M[A]));
}
}
function b(T) {
var C = T.changedTouches, M = C.length, S, R;
for (S = 0; S < M; ++S)
(R = i[C[S].identifier]) && (ko(T), R("drag", T, C[S]));
}
function x(T) {
var C = T.changedTouches, M = C.length, S, R;
for (h && clearTimeout(h), h = setTimeout(function() {
h = null;
}, 500), S = 0; S < M; ++S)
(R = i[C[S].identifier]) && (z0(T), R("end", T, C[S]));
}
function k(T, C, M, S, R, A) {
var L = a.copy(), v = Cn(A || M, C), B, w, D;
if ((D = r.call(T, new Em("beforestart", {
sourceEvent: M,
target: f,
identifier: R,
active: s,
x: v[0],
y: v[1],
dx: 0,
dy: 0,
dispatch: L
}), S)) != null)
return B = D.x - v[0] || 0, w = D.y - v[1] || 0, function N(z, X, ct) {
var J = v, Y;
switch (z) {
case "start":
i[R] = N, Y = s++;
break;
case "end":
delete i[R], --s;
case "drag":
v = Cn(ct || X, C), Y = s;
break;
}
L.call(
z,
T,
new Em(z, {
sourceEvent: X,
subject: D,
target: f,
identifier: R,
active: Y,
x: v[0] + B,
y: v[1] + w,
dx: v[0] - J[0],
dy: v[1] - J[1],
dispatch: L
}),
S
);
};
}
return f.filter = function(T) {
return arguments.length ? (t = typeof T == "function" ? T : Lu(!!T), f) : t;
}, f.container = function(T) {
return arguments.length ? (e = typeof T == "function" ? T : Lu(T), f) : e;
}, f.subject = function(T) {
return arguments.length ? (r = typeof T == "function" ? T : Lu(T), f) : r;
}, f.touchable = function(T) {
return arguments.length ? (n = typeof T == "function" ? T : Lu(!!T), f) : n;
}, f.on = function() {
var T = a.on.apply(a, arguments);
return T === a ? f : T;
}, f.clickDistance = function(T) {
return arguments.length ? (d = (T = +T) * T, f) : Math.sqrt(d);
}, f;
}
function al(t, e, r) {
t.prototype = e.prototype = r, r.constructor = t;
}
function Kc(t, e) {
var r = Object.create(t.prototype);
for (var n in e)
r[n] = e[n];
return r;
}
function Qa() {
}
var Ls = 0.7, Do = 1 / Ls, wo = "\\s*([+-]?\\d+)\\s*", bc = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", Li = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", FB = /^#([0-9a-f]{3,8})$/, PB = new RegExp(`^rgb\\(${wo},${wo},${wo}\\)$`), qB = new RegExp(`^rgb\\(${Li},${Li},${Li}\\)$`), VB = new RegExp(`^rgba\\(${wo},${wo},${wo},${bc}\\)$`), zB = new RegExp(`^rgba\\(${Li},${Li},${Li},${bc}\\)$`), YB = new RegExp(`^hsl\\(${bc},${Li},${Li}\\)$`), UB = new RegExp(`^hsla\\(${bc},${Li},${Li},${bc}\\)$`), H_ = {
aliceblue: 15792383,
antiquewhite: 16444375,
aqua: 65535,
aquamarine: 8388564,
azure: 15794175,
beige: 16119260,
bisque: 16770244,
black: 0,
blanchedalmond: 16772045,
blue: 255,
blueviolet: 9055202,
brown: 10824234,
burlywood: 14596231,
cadetblue: 6266528,
chartreuse: 8388352,
chocolate: 13789470,
coral: 16744272,
cornflowerblue: 6591981,
cornsilk: 16775388,
crimson: 14423100,
cyan: 65535,
darkblue: 139,
darkcyan: 35723,
darkgoldenrod: 12092939,
darkgray: 11119017,
darkgreen: 25600,
darkgrey: 11119017,
darkkhaki: 12433259,
darkmagenta: 9109643,
darkolivegreen: 5597999,
darkorange: 16747520,
darkorchid: 10040012,
darkred: 9109504,
darksalmon: 15308410,
darkseagreen: 9419919,
darkslateblue: 4734347,
darkslategray: 3100495,
darkslategrey: 3100495,
darkturquoise: 52945,
darkviolet: 9699539,
deeppink: 16716947,
deepskyblue: 49151,
dimgray: 6908265,
dimgrey: 6908265,
dodgerblue: 2003199,
firebrick: 11674146,
floralwhite: 16775920,
forestgreen: 2263842,
fuchsia: 16711935,
gainsboro: 14474460,
ghostwhite: 16316671,
gold: 16766720,
goldenrod: 14329120,
gray: 8421504,
green: 32768,
greenyellow: 11403055,
grey: 8421504,
honeydew: 15794160,
hotpink: 16738740,
indianred: 13458524,
indigo: 4915330,
ivory: 16777200,
khaki: 15787660,
lavender: 15132410,
lavenderblush: 16773365,
lawngreen: 8190976,
lemonchiffon: 16775885,
lightblue: 11393254,
lightcoral: 15761536,
lightcyan: 14745599,
lightgoldenrodyellow: 16448210,
lightgray: 13882323,
lightgreen: 9498256,
lightgrey: 13882323,
lightpink: 16758465,
lightsalmon: 16752762,
lightseagreen: 2142890,
lightskyblue: 8900346,
lightslategray: 7833753,
lightslategrey: 7833753,
lightsteelblue: 11584734,
lightyellow: 16777184,
lime: 65280,
limegreen: 3329330,
linen: 16445670,
magenta: 16711935,
maroon: 8388608,
mediumaquamarine: 6737322,
mediumblue: 205,
mediumorchid: 12211667,
mediumpurple: 9662683,
mediumseagreen: 3978097,
mediumslateblue: 8087790,
mediumspringgreen: 64154,
mediumturquoise: 4772300,
mediumvioletred: 13047173,
midnightblue: 1644912,
mintcream: 16121850,
mistyrose: 16770273,
moccasin: 16770229,
navajowhite: 16768685,
navy: 128,
oldlace: 16643558,
olive: 8421376,
olivedrab: 7048739,
orange: 16753920,
orangered: 16729344,
orchid: 14315734,
palegoldenrod: 15657130,
palegreen: 10025880,
paleturquoise: 11529966,
palevioletred: 14381203,
papayawhip: 16773077,
peachpuff: 16767673,
peru: 13468991,
pink: 16761035,
plum: 14524637,
powderblue: 11591910,
purple: 8388736,
rebeccapurple: 6697881,
red: 16711680,
rosybrown: 12357519,
royalblue: 4286945,
saddlebrown: 9127187,
salmon: 16416882,
sandybrown: 16032864,
seagreen: 3050327,
seashell: 16774638,
sienna: 10506797,
silver: 12632256,
skyblue: 8900331,
slateblue: 6970061,
slategray: 7372944,
slategrey: 7372944,
snow: 16775930,
springgreen: 65407,
steelblue: 4620980,
tan: 13808780,
teal: 32896,
thistle: 14204888,
tomato: 16737095,
turquoise: 4251856,
violet: 15631086,
wheat: 16113331,
white: 16777215,
whitesmoke: 16119285,
yellow: 16776960,
yellowgreen: 10145074
};
al(Qa, Wa, {
copy(t) {
return Object.assign(new this.constructor(), this, t);
},
displayable() {
return this.rgb().displayable();
},
hex: G_,
formatHex: G_,
formatHex8: WB,
formatHsl: HB,
formatRgb: j_,
toString: j_
});
function G_() {
return this.rgb().formatHex();
}
function WB() {
return this.rgb().formatHex8();
}
function HB() {
return C9(this).formatHsl();
}
function j_() {
return this.rgb().formatRgb();
}
function Wa(t) {
var e, r;
return t = (t + "").trim().toLowerCase(), (e = FB.exec(t)) ? (r = e[1].length, e = parseInt(e[1], 16), r === 6 ? $_(e) : r === 3 ? new Sr(e >> 8 & 15 | e >> 4 & 240, e >> 4 & 15 | e & 240, (e & 15) << 4 | e & 15, 1) : r === 8 ? Ru(e >> 24 & 255, e >> 16 & 255, e >> 8 & 255, (e & 255) / 255) : r === 4 ? Ru(e >> 12 & 15 | e >> 8 & 240, e >> 8 & 15 | e >> 4 & 240, e >> 4 & 15 | e & 240, ((e & 15) << 4 | e & 15) / 255) : null) : (e = PB.exec(t)) ? new Sr(e[1], e[2], e[3], 1) : (e = qB.exec(t)) ? new Sr(e[1] * 255 / 100, e[2] * 255 / 100, e[3] * 255 / 100, 1) : (e = VB.exec(t)) ? Ru(e[1], e[2], e[3], e[4]) : (e = zB.exec(t)) ? Ru(e[1] * 255 / 100, e[2] * 255 / 100, e[3] * 255 / 100, e[4]) : (e = YB.exec(t)) ? Z_(e[1], e[2] / 100, e[3] / 100, 1) : (e = UB.exec(t)) ? Z_(e[1], e[2] / 100, e[3] / 100, e[4]) : H_.hasOwnProperty(t) ? $_(H_[t]) : t === "transparent" ? new Sr(NaN, NaN, NaN, 0) : null;
}
function $_(t) {
return new Sr(t >> 16 & 255, t >> 8 & 255, t & 255, 1);
}
function Ru(t, e, r, n) {
return n <= 0 && (t = e = r = NaN), new Sr(t, e, r, n);
}
function o3(t) {
return t instanceof Qa || (t = Wa(t)), t ? (t = t.rgb(), new Sr(t.r, t.g, t.b, t.opacity)) : new Sr();
}
function Oo(t, e, r, n) {
return arguments.length === 1 ? o3(t) : new Sr(t, e, r, n == null ? 1 : n);
}
function Sr(t, e, r, n) {
this.r = +t, this.g = +e, this.b = +r, this.opacity = +n;
}
al(Sr, Oo, Kc(Qa, {
brighter(t) {
return t = t == null ? Do : Math.pow(Do, t), new Sr(this.r * t, this.g * t, this.b * t, this.opacity);
},
darker(t) {
return t = t == null ? Ls : Math.pow(Ls, t), new Sr(this.r * t, this.g * t, this.b * t, this.opacity);
},
rgb() {
return this;
},
clamp() {
return new Sr(ws(this.r), ws(this.g), ws(this.b), Yh(this.opacity));
},
displayable() {
return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
},
hex: X_,
formatHex: X_,
formatHex8: GB,
formatRgb: K_,
toString: K_
}));
function X_() {
return `#${xs(this.r)}${xs(this.g)}${xs(this.b)}`;
}
function GB() {
return `#${xs(this.r)}${xs(this.g)}${xs(this.b)}${xs((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
}
function K_() {
const t = Yh(this.opacity);
return `${t === 1 ? "rgb(" : "rgba("}${ws(this.r)}, ${ws(this.g)}, ${ws(this.b)}${t === 1 ? ")" : `, ${t})`}`;
}
function Yh(t) {
return isNaN(t) ? 1 : Math.max(0, Math.min(1, t));
}
function ws(t) {
return Math.max(0, Math.min(255, Math.round(t) || 0));
}
function xs(t) {
return t = ws(t), (t < 16 ? "0" : "") + t.toString(16);
}
function Z_(t, e, r, n) {
return n <= 0 ? t = e = r = NaN : r <= 0 || r >= 1 ? t = e = NaN : e <= 0 && (t = NaN), new Xn(t, e, r, n);
}
function C9(t) {
if (t instanceof Xn)
return new Xn(t.h, t.s, t.l, t.opacity);
if (t instanceof Qa || (t = Wa(t)), !t)
return new Xn();
if (t instanceof Xn)
return t;
t = t.rgb();
var e = t.r / 255, r = t.g / 255, n = t.b / 255, i = Math.min(e, r, n), a = Math.max(e, r, n), s = NaN, o = a - i, l = (a + i) / 2;
return o ? (e === a ? s = (r - n) / o + (r < n) * 6 : r === a ? s = (n - e) / o + 2 : s = (e - r) / o + 4, o /= l < 0.5 ? a + i : 2 - a - i, s *= 60) : o = l > 0 && l < 1 ? 0 : s, new Xn(s, o, l, t.opacity);
}
function Uh(t, e, r, n) {
return arguments.length === 1 ? C9(t) : new Xn(t, e, r, n == null ? 1 : n);
}
function Xn(t, e, r, n) {
this.h = +t, this.s = +e, this.l = +r, this.opacity = +n;
}
al(Xn, Uh, Kc(Qa, {
brighter(t) {
return t = t == null ? Do : Math.pow(Do, t), new Xn(this.h, this.s, this.l * t, this.opacity);
},
darker(t) {
return t = t == null ? Ls : Math.pow(Ls, t), new Xn(this.h, this.s, this.l * t, this.opacity);
},
rgb() {
var t = this.h % 360 + (this.h < 0) * 360, e = isNaN(t) || isNaN(this.s) ? 0 : this.s, r = this.l, n = r + (r < 0.5 ? r : 1 - r) * e, i = 2 * r - n;
return new Sr(
Y0(t >= 240 ? t - 240 : t + 120, i, n),
Y0(t, i, n),
Y0(t < 120 ? t + 240 : t - 120, i, n),
this.opacity
);
},
clamp() {
return new Xn(Q_(this.h), Iu(this.s), Iu(this.l), Yh(this.opacity));
},
displayable() {
return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
},
formatHsl() {
const t = Yh(this.opacity);
return `${t === 1 ? "hsl(" : "hsla("}${Q_(this.h)}, ${Iu(this.s) * 100}%, ${Iu(this.l) * 100}%${t === 1 ? ")" : `, ${t})`}`;
}
}));
function Q_(t) {
return t = (t || 0) % 360, t < 0 ? t + 360 : t;
}
function Iu(t) {
return Math.max(0, Math.min(1, t || 0));
}
function Y0(t, e, r) {
return (t < 60 ? e + (r - e) * t / 60 : t < 180 ? r : t < 240 ? e + (r - e) * (240 - t) / 60 : e) * 255;
}
const S9 = Math.PI / 180, A9 = 180 / Math.PI, Wh = 18, M9 = 0.96422, L9 = 1, R9 = 0.82521, I9 = 4 / 29, To = 6 / 29, N9 = 3 * To * To, jB = To * To * To;
function B9(t) {
if (t instanceof ri)
return new ri(t.l, t.a, t.b, t.opacity);
if (t instanceof Si)
return O9(t);
t instanceof Sr || (t = o3(t));
var e = G0(t.r), r = G0(t.g), n = G0(t.b), i = U0((0.2225045 * e + 0.7168786 * r + 0.0606169 * n) / L9), a, s;
return e === r && r === n ? a = s = i : (a = U0((0.4360747 * e + 0.3850649 * r + 0.1430804 * n) / M9), s = U0((0.0139322 * e + 0.0971045 * r + 0.7141733 * n) / R9)), new ri(116 * i - 16, 500 * (a - i), 200 * (i - s), t.opacity);
}
function $B(t, e) {
return new ri(t, 0, 0, e == null ? 1 : e);
}
function Hh(t, e, r, n) {
return arguments.length === 1 ? B9(t) : new ri(t, e, r, n == null ? 1 : n);
}
function ri(t, e, r, n) {
this.l = +t, this.a = +e, this.b = +r, this.opacity = +n;
}
al(ri, Hh, Kc(Qa, {
brighter(t) {
return new ri(this.l + Wh * (t == null ? 1 : t), this.a, this.b, this.opacity);
},
darker(t) {
return new ri(this.l - Wh * (t == null ? 1 : t), this.a, this.b, this.opacity);
},
rgb() {
var t = (this.l + 16) / 116, e = isNaN(this.a) ? t : t + this.a / 500, r = isNaN(this.b) ? t : t - this.b / 200;
return e = M9 * W0(e), t = L9 * W0(t), r = R9 * W0(r), new Sr(
H0(3.1338561 * e - 1.6168667 * t - 0.4906146 * r),
H0(-0.9787684 * e + 1.9161415 * t + 0.033454 * r),
H0(0.0719453 * e - 0.2289914 * t + 1.4052427 * r),
this.opacity
);
}
}));
function U0(t) {
return t > jB ? Math.pow(t, 1 / 3) : t / N9 + I9;
}
function W0(t) {
return t > To ? t * t * t : N9 * (t - I9);
}
function H0(t) {
return 255 * (t <= 31308e-7 ? 12.92 * t : 1.055 * Math.pow(t, 1 / 2.4) - 0.055);
}
function G0(t) {
return (t /= 255) <= 0.04045 ? t / 12.92 : Math.pow((t + 0.055) / 1.055, 2.4);
}
function D9(t) {
if (t instanceof Si)
return new Si(t.h, t.c, t.l, t.opacity);
if (t instanceof ri || (t = B9(t)), t.a === 0 && t.b === 0)
return new Si(NaN, 0 < t.l && t.l < 100 ? 0 : NaN, t.l, t.opacity);
var e = Math.atan2(t.b, t.a) * A9;
return new Si(e < 0 ? e + 360 : e, Math.sqrt(t.a * t.a + t.b * t.b), t.l, t.opacity);
}
function XB(t, e, r, n) {
return arguments.length === 1 ? D9(t) : new Si(r, e, t, n == null ? 1 : n);
}
function Gh(t, e, r, n) {
return arguments.length === 1 ? D9(t) : new Si(t, e, r, n == null ? 1 : n);
}
function Si(t, e, r, n) {
this.h = +t, this.c = +e, this.l = +r, this.opacity = +n;
}
function O9(t) {
if (isNaN(t.h))
return new ri(t.l, 0, 0, t.opacity);
var e = t.h * S9;
return new ri(t.l, Math.cos(e) * t.c, Math.sin(e) * t.c, t.opacity);
}
al(Si, Gh, Kc(Qa, {
brighter(t) {
return new Si(this.h, this.c, this.l + Wh * (t == null ? 1 : t), this.opacity);
},
darker(t) {
return new Si(this.h, this.c, this.l - Wh * (t == null ? 1 : t), this.opacity);
},
rgb() {
return O9(this).rgb();
}
}));
var F9 = -0.14861, l3 = 1.78277, c3 = -0.29227, m1 = -0.90649, _c = 1.97294, J_ = _c * m1, t5 = _c * l3, e5 = l3 * c3 - m1 * F9;
function KB(t) {
if (t instanceof Ts)
return new Ts(t.h, t.s, t.l, t.opacity);
t instanceof Sr || (t = o3(t));
var e = t.r / 255, r = t.g / 255, n = t.b / 255, i = (e5 * n + J_ * e - t5 * r) / (e5 + J_ - t5), a = n - i, s = (_c * (r - i) - c3 * a) / m1, o = Math.sqrt(s * s + a * a) / (_c * i * (1 - i)), l = o ? Math.atan2(s, a) * A9 - 120 : NaN;
return new Ts(l < 0 ? l + 360 : l, o, i, t.opacity);
}
function si(t, e, r, n) {
return arguments.length === 1 ? KB(t) : new Ts(t, e, r, n == null ? 1 : n);
}
function Ts(t, e, r, n) {
this.h = +t, this.s = +e, this.l = +r, this.opacity = +n;
}
al(Ts, si, Kc(Qa, {
brighter(t) {
return t = t == null ? Do : Math.pow(Do, t), new Ts(this.h, this.s, this.l * t, this.opacity);
},
darker(t) {
return t = t == null ? Ls : Math.pow(Ls, t), new Ts(this.h, this.s, this.l * t, this.opacity);
},
rgb() {
var t = isNaN(this.h) ? 0 : (this.h + 120) * S9, e = +this.l, r = isNaN(this.s) ? 0 : this.s * e * (1 - e), n = Math.cos(t), i = Math.sin(t);
return new Sr(
255 * (e + r * (F9 * n + l3 * i)),
255 * (e + r * (c3 * n + m1 * i)),
255 * (e + r * (_c * n)),
this.opacity
);
}
}));
function P9(t, e, r, n, i) {
var a = t * t, s = a * t;
return ((1 - 3 * t + 3 * a - s) * e + (4 - 6 * a + 3 * s) * r + (1 + 3 * t + 3 * a - 3 * s) * n + s * i) / 6;
}
function q9(t) {
var e = t.length - 1;
return function(r) {
var n = r <= 0 ? r = 0 : r >= 1 ? (r = 1, e - 1) : Math.floor(r * e), i = t[n], a = t[n + 1], s = n > 0 ? t[n - 1] : 2 * i - a, o = n < e - 1 ? t[n + 2] : 2 * a - i;
return P9((r - n / e) * e, s, i, a, o);
};
}
function V9(t) {
var e = t.length;
return function(r) {
var n = Math.floor(((r %= 1) < 0 ? ++r : r) * e), i = t[(n + e - 1) % e], a = t[n % e], s = t[(n + 1) % e], o = t[(n + 2) % e];
return P9((r - n / e) * e, i, a, s, o);
};
}
const b1 = (t) => () => t;
function z9(t, e) {
return function(r) {
return t + r * e;
};
}
function ZB(t, e, r) {
return t = Math.pow(t, r), e = Math.pow(e, r) - t, r = 1 / r, function(n) {
return Math.pow(t + n * e, r);
};
}
function _1(t, e) {
var r = e - t;
return r ? z9(t, r > 180 || r < -180 ? r - 360 * Math.round(r / 360) : r) : b1(isNaN(t) ? e : t);
}
function QB(t) {
return (t = +t) == 1 ? Ar : function(e, r) {
return r - e ? ZB(e, r, t) : b1(isNaN(e) ? r : e);
};
}
function Ar(t, e) {
var r = e - t;
return r ? z9(t, r) : b1(isNaN(t) ? e : t);
}
const vc = function t(e) {
var r = QB(e);
function n(i, a) {
var s = r((i = Oo(i)).r, (a = Oo(a)).r), o = r(i.g, a.g), l = r(i.b, a.b), u = Ar(i.opacity, a.opacity);
return function(h) {
return i.r = s(h), i.g = o(h), i.b = l(h), i.opacity = u(h), i + "";
};
}
return n.gamma = t, n;
}(1);
function Y9(t) {
return function(e) {
var r = e.length, n = new Array(r), i = new Array(r), a = new Array(r), s, o;
for (s = 0; s < r; ++s)
o = Oo(e[s]), n[s] = o.r || 0, i[s] = o.g || 0, a[s] = o.b || 0;
return n = t(n), i = t(i), a = t(a), o.opacity = 1, function(l) {
return o.r = n(l), o.g = i(l), o.b = a(l), o + "";
};
};
}
var U9 = Y9(q9), JB = Y9(V9);
function u3(t, e) {
e || (e = []);
var r = t ? Math.min(e.length, t.length) : 0, n = e.slice(), i;
return function(a) {
for (i = 0; i < r; ++i)
n[i] = t[i] * (1 - a) + e[i] * a;
return n;
};
}
function W9(t) {
return ArrayBuffer.isView(t) && !(t instanceof DataView);
}
function tD(t, e) {
return (W9(e) ? u3 : H9)(t, e);
}
function H9(t, e) {
var r = e ? e.length : 0, n = t ? Math.min(r, t.length) : 0, i = new Array(n), a = new Array(r), s;
for (s = 0; s < n; ++s)
i[s] = Ja(t[s], e[s]);
for (; s < r; ++s)
a[s] = e[s];
return function(o) {
for (s = 0; s < n; ++s)
a[s] = i[s](o);
return a;
};
}
function G9(t, e) {
var r = new Date();
return t = +t, e = +e, function(n) {
return r.setTime(t * (1 - n) + e * n), r;
};
}
function Dn(t, e) {
return t = +t, e = +e, function(r) {
return t * (1 - r) + e * r;
};
}
function j9(t, e) {
var r = {}, n = {}, i;
(t === null || typeof t != "object") && (t = {}), (e === null || typeof e != "object") && (e = {});
for (i in e)
i in t ? r[i] = Ja(t[i], e[i]) : n[i] = e[i];
return function(a) {
for (i in r)
n[i] = r[i](a);
return n;
};
}
var Cm = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, j0 = new RegExp(Cm.source, "g");
function eD(t) {
return function() {
return t;
};
}
function rD(t) {
return function(e) {
return t(e) + "";
};
}
function h3(t, e) {
var r = Cm.lastIndex = j0.lastIndex = 0, n, i, a, s = -1, o = [], l = [];
for (t = t + "", e = e + ""; (n = Cm.exec(t)) && (i = j0.exec(e)); )
(a = i.index) > r && (a = e.slice(r, a), o[s] ? o[s] += a : o[++s] = a), (n = n[0]) === (i = i[0]) ? o[s] ? o[s] += i : o[++s] = i : (o[++s] = null, l.push({ i: s, x: Dn(n, i) })), r = j0.lastIndex;
return r < e.length && (a = e.slice(r), o[s] ? o[s] += a : o[++s] = a), o.length < 2 ? l[0] ? rD(l[0].x) : eD(e) : (e = l.length, function(u) {
for (var h = 0, d; h < e; ++h)
o[(d = l[h]).i] = d.x(u);
return o.join("");
});
}
function Ja(t, e) {
var r = typeof e, n;
return e == null || r === "boolean" ? b1(e) : (r === "number" ? Dn : r === "string" ? (n = Wa(e)) ? (e = n, vc) : h3 : e instanceof Wa ? vc : e instanceof Date ? G9 : W9(e) ? u3 : Array.isArray(e) ? H9 : typeof e.valueOf != "function" && typeof e.toString != "function" || isNaN(e) ? j9 : Dn)(t, e);
}
function nD(t) {
var e = t.length;
return function(r) {
return t[Math.max(0, Math.min(e - 1, Math.floor(r * e)))];
};
}
function iD(t, e) {
var r = _1(+t, +e);
return function(n) {
var i = r(n);
return i - 360 * Math.floor(i / 360);
};
}
function v1(t, e) {
return t = +t, e = +e, function(r) {
return Math.round(t * (1 - r) + e * r);
};
}
var r5 = 180 / Math.PI, Sm = {
translateX: 0,
translateY: 0,
rotate: 0,
skewX: 0,
scaleX: 1,
scaleY: 1
};
function $9(t, e, r, n, i, a) {
var s, o, l;
return (s = Math.sqrt(t * t + e * e)) && (t /= s, e /= s), (l = t * r + e * n) && (r -= t * l, n -= e * l), (o = Math.sqrt(r * r + n * n)) && (r /= o, n /= o, l /= o), t * n < e * r && (t = -t, e = -e, l = -l, s = -s), {
translateX: i,
translateY: a,
rotate: Math.atan2(e, t) * r5,
skewX: Math.atan(l) * r5,
scaleX: s,
scaleY: o
};
}
var Nu;
function aD(t) {
const e = new (typeof DOMMatrix == "function" ? DOMMatrix : WebKitCSSMatrix)(t + "");
return e.isIdentity ? Sm : $9(e.a, e.b, e.c, e.d, e.e, e.f);
}
function sD(t) {
return t == null || (Nu || (Nu = document.createElementNS("http://www.w3.org/2000/svg", "g")), Nu.setAttribute("transform", t), !(t = Nu.transform.baseVal.consolidate())) ? Sm : (t = t.matrix, $9(t.a, t.b, t.c, t.d, t.e, t.f));
}
function X9(t, e, r, n) {
function i(u) {
return u.length ? u.pop() + " " : "";
}
function a(u, h, d, f, p, m) {
if (u !== d || h !== f) {
var _ = p.push("translate(", null, e, null, r);
m.push({ i: _ - 4, x: Dn(u, d) }, { i: _ - 2, x: Dn(h, f) });
} else
(d || f) && p.push("translate(" + d + e + f + r);
}
function s(u, h, d, f) {
u !== h ? (u - h > 180 ? h += 360 : h - u > 180 && (u += 360), f.push({ i: d.push(i(d) + "rotate(", null, n) - 2, x: Dn(u, h) })) : h && d.push(i(d) + "rotate(" + h + n);
}
function o(u, h, d, f) {
u !== h ? f.push({ i: d.push(i(d) + "skewX(", null, n) - 2, x: Dn(u, h) }) : h && d.push(i(d) + "skewX(" + h + n);
}
function l(u, h, d, f, p, m) {
if (u !== d || h !== f) {
var _ = p.push(i(p) + "scale(", null, ",", null, ")");
m.push({ i: _ - 4, x: Dn(u, d) }, { i: _ - 2, x: Dn(h, f) });
} else
(d !== 1 || f !== 1) && p.push(i(p) + "scale(" + d + "," + f + ")");
}
return function(u, h) {
var d = [], f = [];
return u = t(u), h = t(h), a(u.translateX, u.translateY, h.translateX, h.translateY, d, f), s(u.rotate, h.rotate, d, f), o(u.skewX, h.skewX, d, f), l(u.scaleX, u.scaleY, h.scaleX, h.scaleY, d, f), u = h = null, function(p) {
for (var m = -1, _ = f.length, y; ++m < _; )
d[(y = f[m]).i] = y.x(p);
return d.join("");
};
};
}
var K9 = X9(aD, "px, ", "px)", "deg)"), Z9 = X9(sD, ", ", ")", ")"), oD = 1e-12;
function n5(t) {
return ((t = Math.exp(t)) + 1 / t) / 2;
}
function lD(t) {
return ((t = Math.exp(t)) - 1 / t) / 2;
}
function cD(t) {
return ((t = Math.exp(2 * t)) - 1) / (t + 1);
}
const Q9 = function t(e, r, n) {
function i(a, s) {
var o = a[0], l = a[1], u = a[2], h = s[0], d = s[1], f = s[2], p = h - o, m = d - l, _ = p * p + m * m, y, b;
if (_ < oD)
b = Math.log(f / u) / e, y = function(S) {
return [
o + S * p,
l + S * m,
u * Math.exp(e * S * b)
];
};
else {
var x = Math.sqrt(_), k = (f * f - u * u + n * _) / (2 * u * r * x), T = (f * f - u * u - n * _) / (2 * f * r * x), C = Math.log(Math.sqrt(k * k + 1) - k), M = Math.log(Math.sqrt(T * T + 1) - T);
b = (M - C) / e, y = function(S) {
var R = S * b, A = n5(C), L = u / (r * x) * (A * cD(e * R + C) - lD(C));
return [
o + L * p,
l + L * m,
u * A / n5(e * R + C)
];
};
}
return y.duration = b * 1e3 * e / Math.SQRT2, y;
}
return i.rho = function(a) {
var s = Math.max(1e-3, +a), o = s * s, l = o * o;
return t(s, o, l);
}, i;
}(Math.SQRT2, 2, 4);
function J9(t) {
return function(e, r) {
var n = t((e = Uh(e)).h, (r = Uh(r)).h), i = Ar(e.s, r.s), a = Ar(e.l, r.l), s = Ar(e.opacity, r.opacity);
return function(o) {
return e.h = n(o), e.s = i(o), e.l = a(o), e.opacity = s(o), e + "";
};
};
}
const uD = J9(_1);
var hD = J9(Ar);
function fD(t, e) {
var r = Ar((t = Hh(t)).l, (e = Hh(e)).l), n = Ar(t.a, e.a), i = Ar(t.b, e.b), a = Ar(t.opacity, e.opacity);
return function(s) {
return t.l = r(s), t.a = n(s), t.b = i(s), t.opacity = a(s), t + "";
};
}
function tT(t) {
return function(e, r) {
var n = t((e = Gh(e)).h, (r = Gh(r)).h), i = Ar(e.c, r.c), a = Ar(e.l, r.l), s = Ar(e.opacity, r.opacity);
return function(o) {
return e.h = n(o), e.c = i(o), e.l = a(o), e.opacity = s(o), e + "";
};
};
}
const eT = tT(_1);
var dD = tT(Ar);
function rT(t) {
return function e(r) {
r = +r;
function n(i, a) {
var s = t((i = si(i)).h, (a = si(a)).h), o = Ar(i.s, a.s), l = Ar(i.l, a.l), u = Ar(i.opacity, a.opacity);
return function(h) {
return i.h = s(h), i.s = o(h), i.l = l(Math.pow(h, r)), i.opacity = u(h), i + "";
};
}
return n.gamma = e, n;
}(1);
}
const pD = rT(_1);
var x1 = rT(Ar);
function nT(t, e) {
e === void 0 && (e = t, t = Ja);
for (var r = 0, n = e.length - 1, i = e[0], a = new Array(n < 0 ? 0 : n); r < n; )
a[r] = t(i, i = e[++r]);
return function(s) {
var o = Math.max(0, Math.min(n - 1, Math.floor(s *= n)));
return a[o](s - o);
};
}
function gD(t, e) {
for (var r = new Array(e), n = 0; n < e; ++n)
r[n] = t(n / (e - 1));
return r;
}
var Fo = 0, Pl = 0, wl = 0, iT = 1e3, jh, ql, $h = 0, Rs = 0, k1 = 0, xc = typeof performance == "object" && performance.now ? performance : Date, aT = typeof window == "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(t) {
setTimeout(t, 17);
};
function Zc() {
return Rs || (aT(yD), Rs = xc.now() + k1);
}
function yD() {
Rs = 0;
}
function kc() {
this._call = this._time = this._next = null;
}
kc.prototype = w1.prototype = {
constructor: kc,
restart: function(t, e, r) {
if (typeof t != "function")
throw new TypeError("callback is not a function");
r = (r == null ? Zc() : +r) + (e == null ? 0 : +e), !this._next && ql !== this && (ql ? ql._next = this : jh = this, ql = this), this._call = t, this._time = r, Am();
},
stop: function() {
this._call && (this._call = null, this._time = 1 / 0, Am());
}
};
function w1(t, e, r) {
var n = new kc();
return n.restart(t, e, r), n;
}
function sT() {
Zc(), ++Fo;
for (var t = jh, e; t; )
(e = Rs - t._time) >= 0 && t._call.call(void 0, e), t = t._next;
--Fo;
}
function i5() {
Rs = ($h = xc.now()) + k1, Fo = Pl = 0;
try {
sT();
} finally {
Fo = 0, bD(), Rs = 0;
}
}
function mD() {
var t = xc.now(), e = t - $h;
e > iT && (k1 -= e, $h = t);
}
function bD() {
for (var t, e = jh, r, n = 1 / 0; e; )
e._call ? (n > e._time && (n = e._time), t = e, e = e._next) : (r = e._next, e._next = null, e = t ? t._next = r : jh = r);
ql = t, Am(n);
}
function Am(t) {
if (!Fo) {
Pl && (Pl = clearTimeout(Pl));
var e = t - Rs;
e > 24 ? (t < 1 / 0 && (Pl = setTimeout(i5, t - xc.now() - k1)), wl && (wl = clearInterval(wl))) : (wl || ($h = xc.now(), wl = setInterval(mD, iT)), Fo = 1, aT(i5));
}
}
function Mm(t, e, r) {
var n = new kc();
return e = e == null ? 0 : +e, n.restart((i) => {
n.stop(), t(i + e);
}, e, r), n;
}
function _D(t, e, r) {
var n = new kc(), i = e;
return e == null ? (n.restart(t, e, r), n) : (n._restart = n.restart, n.restart = function(a, s, o) {
s = +s, o = o == null ? Zc() : +o, n._restart(function l(u) {
u += i, n._restart(l, i += s, o), a(u);
}, s, o);
}, n.restart(t, e, r), n);
}
var vD = Ws("start", "end", "cancel", "interrupt"), xD = [], oT = 0, Lm = 1, Rm = 2, yh = 3, a5 = 4, Im = 5, mh = 6;
function T1(t, e, r, n, i, a) {
var s = t.__transition;
if (!s)
t.__transition = {};
else if (r in s)
return;
kD(t, r, {
name: e,
index: n,
group: i,
on: vD,
tween: xD,
time: a.time,
delay: a.delay,
duration: a.duration,
ease: a.ease,
timer: null,
state: oT
});
}
function f3(t, e) {
var r = hi(t, e);
if (r.state > oT)
throw new Error("too late; already scheduled");
return r;
}
function Vi(t, e) {
var r = hi(t, e);
if (r.state > yh)
throw new Error("too late; already running");
return r;
}
function hi(t, e) {
var r = t.__transition;
if (!r || !(r = r[e]))
throw new Error("transition not found");
return r;
}
function kD(t, e, r) {
var n = t.__transition, i;
n[e] = r, r.timer = w1(a, 0, r.time);
function a(u) {
r.state = Lm, r.timer.restart(s, r.delay, r.time), r.delay <= u && s(u - r.delay);
}
function s(u) {
var h, d, f, p;
if (r.state !== Lm)
return l();
for (h in n)
if (p = n[h], p.name === r.name) {
if (p.state === yh)
return Mm(s);
p.state === a5 ? (p.state = mh, p.timer.stop(), p.on.call("interrupt", t, t.__data__, p.index, p.group), delete n[h]) : +h < e && (p.state = mh, p.timer.stop(), p.on.call("cancel", t, t.__data__, p.index, p.group), delete n[h]);
}
if (Mm(function() {
r.state === yh && (r.state = a5, r.timer.restart(o, r.delay, r.time), o(u));
}), r.state = Rm, r.on.call("start", t, t.__data__, r.index, r.group), r.state === Rm) {
for (r.state = yh, i = new Array(f = r.tween.length), h = 0, d = -1; h < f; ++h)
(p = r.tween[h].value.call(t, t.__data__, r.index, r.group)) && (i[++d] = p);
i.length = d + 1;
}
}
function o(u) {
for (var h = u < r.duration ? r.ease.call(null, u / r.duration) : (r.timer.restart(l), r.state = Im, 1), d = -1, f = i.length; ++d < f; )
i[d].call(t, h);
r.state === Im && (r.on.call("end", t, t.__data__, r.index, r.group), l());
}
function l() {
r.state = mh, r.timer.stop(), delete n[e];
for (var u in n)
return;
delete t.__transition;
}
}
function Es(t, e) {
var r = t.__transition, n, i, a = !0, s;
if (!!r) {
e = e == null ? null : e + "";
for (s in r) {
if ((n = r[s]).name !== e) {
a = !1;
continue;
}
i = n.state > Rm && n.state < Im, n.state = mh, n.timer.stop(), n.on.call(i ? "interrupt" : "cancel", t, t.__data__, n.index, n.group), delete r[s];
}
a && delete t.__transition;
}
}
function wD(t) {
return this.each(function() {
Es(this, t);
});
}
function TD(t, e) {
var r, n;
return function() {
var i = Vi(this, t), a = i.tween;
if (a !== r) {
n = r = a;
for (var s = 0, o = n.length; s < o; ++s)
if (n[s].name === e) {
n = n.slice(), n.splice(s, 1);
break;
}
}
i.tween = n;
};
}
function ED(t, e, r) {
var n, i;
if (typeof r != "function")
throw new Error();
return function() {
var a = Vi(this, t), s = a.tween;
if (s !== n) {
i = (n = s).slice();
for (var o = { name: e, value: r }, l = 0, u = i.length; l < u; ++l)
if (i[l].name === e) {
i[l] = o;
break;
}
l === u && i.push(o);
}
a.tween = i;
};
}
function CD(t, e) {
var r = this._id;
if (t += "", arguments.length < 2) {
for (var n = hi(this.node(), r).tween, i = 0, a = n.length, s; i < a; ++i)
if ((s = n[i]).name === t)
return s.value;
return null;
}
return this.each((e == null ? TD : ED)(r, t, e));
}
function d3(t, e, r) {
var n = t._id;
return t.each(function() {
var i = Vi(this, n);
(i.value || (i.value = {}))[e] = r.apply(this, arguments);
}), function(i) {
return hi(i, n).value[e];
};
}
function lT(t, e) {
var r;
return (typeof e == "number" ? Dn : e instanceof Wa ? vc : (r = Wa(e)) ? (e = r, vc) : h3)(t, e);
}
function SD(t) {
return function() {
this.removeAttribute(t);
};
}
function AD(t) {
return function() {
this.removeAttributeNS(t.space, t.local);
};
}
function MD(t, e, r) {
var n, i = r + "", a;
return function() {
var s = this.getAttribute(t);
return s === i ? null : s === n ? a : a = e(n = s, r);
};
}
function LD(t, e, r) {
var n, i = r + "", a;
return function() {
var s = this.getAttributeNS(t.space, t.local);
return s === i ? null : s === n ? a : a = e(n = s, r);
};
}
function RD(t, e, r) {
var n, i, a;
return function() {
var s, o = r(this), l;
return o == null ? void this.removeAttribute(t) : (s = this.getAttribute(t), l = o + "", s === l ? null : s === n && l === i ? a : (i = l, a = e(n = s, o)));
};
}
function ID(t, e, r) {
var n, i, a;
return function() {
var s, o = r(this), l;
return o == null ? void this.removeAttributeNS(t.space, t.local) : (s = this.getAttributeNS(t.space, t.local), l = o + "", s === l ? null : s === n && l === i ? a : (i = l, a = e(n = s, o)));
};
}
function ND(t, e) {
var r = Xc(t), n = r === "transform" ? Z9 : lT;
return this.attrTween(t, typeof e == "function" ? (r.local ? ID : RD)(r, n, d3(this, "attr." + t, e)) : e == null ? (r.local ? AD : SD)(r) : (r.local ? LD : MD)(r, n, e));
}
function BD(t, e) {
return function(r) {
this.setAttribute(t, e.call(this, r));
};
}
function DD(t, e) {
return function(r) {
this.setAttributeNS(t.space, t.local, e.call(this, r));
};
}
function OD(t, e) {
var r, n;
function i() {
var a = e.apply(this, arguments);
return a !== n && (r = (n = a) && DD(t, a)), r;
}
return i._value = e, i;
}
function FD(t, e) {
var r, n;
function i() {
var a = e.apply(this, arguments);
return a !== n && (r = (n = a) && BD(t, a)), r;
}
return i._value = e, i;
}
function PD(t, e) {
var r = "attr." + t;
if (arguments.length < 2)
return (r = this.tween(r)) && r._value;
if (e == null)
return this.tween(r, null);
if (typeof e != "function")
throw new Error();
var n = Xc(t);
return this.tween(r, (n.local ? OD : FD)(n, e));
}
function qD(t, e) {
return function() {
f3(this, t).delay = +e.apply(this, arguments);
};
}
function VD(t, e) {
return e = +e, function() {
f3(this, t).delay = e;
};
}
function zD(t) {
var e = this._id;
return arguments.length ? this.each((typeof t == "function" ? qD : VD)(e, t)) : hi(this.node(), e).delay;
}
function YD(t, e) {
return function() {
Vi(this, t).duration = +e.apply(this, arguments);
};
}
function UD(t, e) {
return e = +e, function() {
Vi(this, t).duration = e;
};
}
function WD(t) {
var e = this._id;
return arguments.length ? this.each((typeof t == "function" ? YD : UD)(e, t)) : hi(this.node(), e).duration;
}
function HD(t, e) {
if (typeof e != "function")
throw new Error();
return function() {
Vi(this, t).ease = e;
};
}
function GD(t) {
var e = this._id;
return arguments.length ? this.each(HD(e, t)) : hi(this.node(), e).ease;
}
function jD(t, e) {
return function() {
var r = e.apply(this, arguments);
if (typeof r != "function")
throw new Error();
Vi(this, t).ease = r;
};
}
function $D(t) {
if (typeof t != "function")
throw new Error();
return this.each(jD(this._id, t));
}
function XD(t) {
typeof t != "function" && (t = n3(t));
for (var e = this._groups, r = e.length, n = new Array(r), i = 0; i < r; ++i)
for (var a = e[i], s = a.length, o = n[i] = [], l, u = 0; u < s; ++u)
(l = a[u]) && t.call(l, l.__data__, u, a) && o.push(l);
return new Bi(n, this._parents, this._name, this._id);
}
function KD(t) {
if (t._id !== this._id)
throw new Error();
for (var e = this._groups, r = t._groups, n = e.length, i = r.length, a = Math.min(n, i), s = new Array(n), o = 0; o < a; ++o)
for (var l = e[o], u = r[o], h = l.length, d = s[o] = new Array(h), f, p = 0; p < h; ++p)
(f = l[p] || u[p]) && (d[p] = f);
for (; o < n; ++o)
s[o] = e[o];
return new Bi(s, this._parents, this._name, this._id);
}
function ZD(t) {
return (t + "").trim().split(/^|\s+/).every(function(e) {
var r = e.indexOf(".");
return r >= 0 && (e = e.slice(0, r)), !e || e === "start";
});
}
function QD(t, e, r) {
var n, i, a = ZD(e) ? f3 : Vi;
return function() {
var s = a(this, t), o = s.on;
o !== n && (i = (n = o).copy()).on(e, r), s.on = i;
};
}
function JD(t, e) {
var r = this._id;
return arguments.length < 2 ? hi(this.node(), r).on.on(t) : this.each(QD(r, t, e));
}
function tO(t) {
return function() {
var e = this.parentNode;
for (var r in this.__transition)
if (+r !== t)
return;
e && e.removeChild(this);
};
}
function eO() {
return this.on("end.remove", tO(this._id));
}
function rO(t) {
var e = this._name, r = this._id;
typeof t != "function" && (t = d1(t));
for (var n = this._groups, i = n.length, a = new Array(i), s = 0; s < i; ++s)
for (var o = n[s], l = o.length, u = a[s] = new Array(l), h, d, f = 0; f < l; ++f)
(h = o[f]) && (d = t.call(h, h.__data__, f, o)) && ("__data__" in h && (d.__data__ = h.__data__), u[f] = d, T1(u[f], e, r, f, u, hi(h, r)));
return new Bi(a, this._parents, e, r);
}
function nO(t) {
var e = this._name, r = this._id;
typeof t != "function" && (t = r3(t));
for (var n = this._groups, i = n.length, a = [], s = [], o = 0; o < i; ++o)
for (var l = n[o], u = l.length, h, d = 0; d < u; ++d)
if (h = l[d]) {
for (var f = t.call(h, h.__data__, d, l), p, m = hi(h, r), _ = 0, y = f.length; _ < y; ++_)
(p = f[_]) && T1(p, e, r, _, f, m);
a.push(f), s.push(h);
}
return new Bi(a, s, e, r);
}
var iO = Hs.prototype.constructor;
function aO() {
return new iO(this._groups, this._parents);
}
function sO(t, e) {
var r, n, i;
return function() {
var a = Ms(this, t), s = (this.style.removeProperty(t), Ms(this, t));
return a === s ? null : a === r && s === n ? i : i = e(r = a, n = s);
};
}
function cT(t) {
return function() {
this.style.removeProperty(t);
};
}
function oO(t, e, r) {
var n, i = r + "", a;
return function() {
var s = Ms(this, t);
return s === i ? null : s === n ? a : a = e(n = s, r);
};
}
function lO(t, e, r) {
var n, i, a;
return function() {
var s = Ms(this, t), o = r(this), l = o + "";
return o == null && (l = o = (this.style.removeProperty(t), Ms(this, t))), s === l ? null : s === n && l === i ? a : (i = l, a = e(n = s, o));
};
}
function cO(t, e) {
var r, n, i, a = "style." + e, s = "end." + a, o;
return function() {
var l = Vi(this, t), u = l.on, h = l.value[a] == null ? o || (o = cT(e)) : void 0;
(u !== r || i !== h) && (n = (r = u).copy()).on(s, i = h), l.on = n;
};
}
function uO(t, e, r) {
var n = (t += "") == "transform" ? K9 : lT;
return e == null ? this.styleTween(t, sO(t, n)).on("end.style." + t, cT(t)) : typeof e == "function" ? this.styleTween(t, lO(t, n, d3(this, "style." + t, e))).each(cO(this._id, t)) : this.styleTween(t, oO(t, n, e), r).on("end.style." + t, null);
}
function hO(t, e, r) {
return function(n) {
this.style.setProperty(t, e.call(this, n), r);
};
}
function fO(t, e, r) {
var n, i;
function a() {
var s = e.apply(this, arguments);
return s !== i && (n = (i = s) && hO(t, s, r)), n;
}
return a._value = e, a;
}
function dO(t, e, r) {
var n = "style." + (t += "");
if (arguments.length < 2)
return (n = this.tween(n)) && n._value;
if (e == null)
return this.tween(n, null);
if (typeof e != "function")
throw new Error();
return this.tween(n, fO(t, e, r == null ? "" : r));
}
function pO(t) {
return function() {
this.textContent = t;
};
}
function gO(t) {
return function() {
var e = t(this);
this.textContent = e == null ? "" : e;
};
}
function yO(t) {
return this.tween("text", typeof t == "function" ? gO(d3(this, "text", t)) : pO(t == null ? "" : t + ""));
}
function mO(t) {
return function(e) {
this.textContent = t.call(this, e);
};
}
function bO(t) {
var e, r;
function n() {
var i = t.apply(this, arguments);
return i !== r && (e = (r = i) && mO(i)), e;
}
return n._value = t, n;
}
function _O(t) {
var e = "text";
if (arguments.length < 1)
return (e = this.tween(e)) && e._value;
if (t == null)
return this.tween(e, null);
if (typeof t != "function")
throw new Error();
return this.tween(e, bO(t));
}
function vO() {
for (var t = this._name, e = this._id, r = hT(), n = this._groups, i = n.length, a = 0; a < i; ++a)
for (var s = n[a], o = s.length, l, u = 0; u < o; ++u)
if (l = s[u]) {
var h = hi(l, e);
T1(l, t, r, u, s, {
time: h.time + h.delay + h.duration,
delay: 0,
duration: h.duration,
ease: h.ease
});
}
return new Bi(n, this._parents, t, r);
}
function xO() {
var t, e, r = this, n = r._id, i = r.size();
return new Promise(function(a, s) {
var o = { value: s }, l = { value: function() {
--i === 0 && a();
} };
r.each(function() {
var u = Vi(this, n), h = u.on;
h !== t && (e = (t = h).copy(), e._.cancel.push(o), e._.interrupt.push(o), e._.end.push(l)), u.on = e;
}), i === 0 && a();
});
}
var kO = 0;
function Bi(t, e, r, n) {
this._groups = t, this._parents = e, this._name = r, this._id = n;
}
function uT(t) {
return Hs().transition(t);
}
function hT() {
return ++kO;
}
var Zi = Hs.prototype;
Bi.prototype = uT.prototype = {
constructor: Bi,
select: rO,
selectAll: nO,
selectChild: Zi.selectChild,
selectChildren: Zi.selectChildren,
filter: XD,
merge: KD,
selection: aO,
transition: vO,
call: Zi.call,
nodes: Zi.nodes,
node: Zi.node,
size: Zi.size,
empty: Zi.empty,
each: Zi.each,
on: JD,
attr: ND,
attrTween: PD,
style: uO,
styleTween: dO,
text: yO,
textTween: _O,
remove: eO,
tween: CD,
delay: zD,
duration: WD,
ease: GD,
easeVarying: $D,
end: xO,
[Symbol.iterator]: Zi[Symbol.iterator]
};
const wO = (t) => +t;
function TO(t) {
return t * t;
}
function EO(t) {
return t * (2 - t);
}
function s5(t) {
return ((t *= 2) <= 1 ? t * t : --t * (2 - t) + 1) / 2;
}
function CO(t) {
return t * t * t;
}
function SO(t) {
return --t * t * t + 1;
}
function Nm(t) {
return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;
}
var p3 = 3, AO = function t(e) {
e = +e;
function r(n) {
return Math.pow(n, e);
}
return r.exponent = t, r;
}(p3), MO = function t(e) {
e = +e;
function r(n) {
return 1 - Math.pow(1 - n, e);
}
return r.exponent = t, r;
}(p3), o5 = function t(e) {
e = +e;
function r(n) {
return ((n *= 2) <= 1 ? Math.pow(n, e) : 2 - Math.pow(2 - n, e)) / 2;
}
return r.exponent = t, r;
}(p3), fT = Math.PI, dT = fT / 2;
function LO(t) {
return +t == 1 ? 1 : 1 - Math.cos(t * dT);
}
function RO(t) {
return Math.sin(t * dT);
}
function l5(t) {
return (1 - Math.cos(fT * t)) / 2;
}
function Ha(t) {
return (Math.pow(2, -10 * t) - 9765625e-10) * 1.0009775171065494;
}
function IO(t) {
return Ha(1 - +t);
}
function NO(t) {
return 1 - Ha(t);
}
function c5(t) {
return ((t *= 2) <= 1 ? Ha(1 - t) : 2 - Ha(t - 1)) / 2;
}
function BO(t) {
return 1 - Math.sqrt(1 - t * t);
}
function DO(t) {
return Math.sqrt(1 - --t * t);
}
function u5(t) {
return ((t *= 2) <= 1 ? 1 - Math.sqrt(1 - t * t) : Math.sqrt(1 - (t -= 2) * t) + 1) / 2;
}
var Bm = 4 / 11, OO = 6 / 11, FO = 8 / 11, PO = 3 / 4, qO = 9 / 11, VO = 10 / 11, zO = 15 / 16, YO = 21 / 22, UO = 63 / 64, Bu = 1 / Bm / Bm;
function WO(t) {
return 1 - wc(1 - t);
}
function wc(t) {
return (t = +t) < Bm ? Bu * t * t : t < FO ? Bu * (t -= OO) * t + PO : t < VO ? Bu * (t -= qO) * t + zO : Bu * (t -= YO) * t + UO;
}
function HO(t) {
return ((t *= 2) <= 1 ? 1 - wc(1 - t) : wc(t - 1) + 1) / 2;
}
var g3 = 1.70158, GO = function t(e) {
e = +e;
function r(n) {
return (n = +n) * n * (e * (n - 1) + n);
}
return r.overshoot = t, r;
}(g3), jO = function t(e) {
e = +e;
function r(n) {
return --n * n * ((n + 1) * e + n) + 1;
}
return r.overshoot = t, r;
}(g3), h5 = function t(e) {
e = +e;
function r(n) {
return ((n *= 2) < 1 ? n * n * ((e + 1) * n - e) : (n -= 2) * n * ((e + 1) * n + e) + 2) / 2;
}
return r.overshoot = t, r;
}(g3), Po = 2 * Math.PI, y3 = 1, m3 = 0.3, $O = function t(e, r) {
var n = Math.asin(1 / (e = Math.max(1, e))) * (r /= Po);
function i(a) {
return e * Ha(- --a) * Math.sin((n - a) / r);
}
return i.amplitude = function(a) {
return t(a, r * Po);
}, i.period = function(a) {
return t(e, a);
}, i;
}(y3, m3), f5 = function t(e, r) {
var n = Math.asin(1 / (e = Math.max(1, e))) * (r /= Po);
function i(a) {
return 1 - e * Ha(a = +a) * Math.sin((a + n) / r);
}
return i.amplitude = function(a) {
return t(a, r * Po);
}, i.period = function(a) {
return t(e, a);
}, i;
}(y3, m3), XO = function t(e, r) {
var n = Math.asin(1 / (e = Math.max(1, e))) * (r /= Po);
function i(a) {
return ((a = a * 2 - 1) < 0 ? e * Ha(-a) * Math.sin((n - a) / r) : 2 - e * Ha(a) * Math.sin((n + a) / r)) / 2;
}
return i.amplitude = function(a) {
return t(a, r * Po);
}, i.period = function(a) {
return t(e, a);
}, i;
}(y3, m3), KO = {
time: null,
delay: 0,
duration: 250,
ease: Nm
};
function ZO(t, e) {
for (var r; !(r = t.__transition) || !(r = r[e]); )
if (!(t = t.parentNode))
throw new Error(`transition ${e} not found`);
return r;
}
function QO(t) {
var e, r;
t instanceof Bi ? (e = t._id, t = t._name) : (e = hT(), (r = KO).time = Zc(), t = t == null ? null : t + "");
for (var n = this._groups, i = n.length, a = 0; a < i; ++a)
for (var s = n[a], o = s.length, l, u = 0; u < o; ++u)
(l = s[u]) && T1(l, t, e, u, s, r || ZO(l, e));
return new Bi(n, this._parents, t, e);
}
Hs.prototype.interrupt = wD;
Hs.prototype.transition = QO;
var JO = [null];
function tF(t, e) {
var r = t.__transition, n, i;
if (r) {
e = e == null ? null : e + "";
for (i in r)
if ((n = r[i]).state > Lm && n.name === e)
return new Bi([[t]], JO, e, +i);
}
return null;
}
const $0 = (t) => () => t;
function eF(t, {
sourceEvent: e,
target: r,
selection: n,
mode: i,
dispatch: a
}) {
Object.defineProperties(this, {
type: { value: t, enumerable: !0, configurable: !0 },
sourceEvent: { value: e, enumerable: !0, configurable: !0 },
target: { value: r, enumerable: !0, configurable: !0 },
selection: { value: n, enumerable: !0, configurable: !0 },
mode: { value: i, enumerable: !0, configurable: !0 },
_: { value: a }
});
}
function rF(t) {
t.stopImmediatePropagation();
}
function X0(t) {
t.preventDefault(), t.stopImmediatePropagation();
}
var d5 = { name: "drag" }, K0 = { name: "space" }, oo = { name: "handle" }, lo = { name: "center" };
const { abs: p5, max: Pr, min: qr } = Math;
function g5(t) {
return [+t[0], +t[1]];
}
function Dm(t) {
return [g5(t[0]), g5(t[1])];
}
var bh = {
name: "x",
handles: ["w", "e"].map(Tc),
input: function(t, e) {
return t == null ? null : [[+t[0], e[0][1]], [+t[1], e[1][1]]];
},
output: function(t) {
return t && [t[0][0], t[1][0]];
}
}, _h = {
name: "y",
handles: ["n", "s"].map(Tc),
input: function(t, e) {
return t == null ? null : [[e[0][0], +t[0]], [e[1][0], +t[1]]];
},
output: function(t) {
return t && [t[0][1], t[1][1]];
}
}, nF = {
name: "xy",
handles: ["n", "w", "e", "s", "nw", "ne", "sw", "se"].map(Tc),
input: function(t) {
return t == null ? null : Dm(t);
},
output: function(t) {
return t;
}
}, Qi = {
overlay: "crosshair",
selection: "move",
n: "ns-resize",
e: "ew-resize",
s: "ns-resize",
w: "ew-resize",
nw: "nwse-resize",
ne: "nesw-resize",
se: "nwse-resize",
sw: "nesw-resize"
}, y5 = {
e: "w",
w: "e",
nw: "ne",
ne: "nw",
se: "sw",
sw: "se"
}, m5 = {
n: "s",
s: "n",
nw: "sw",
ne: "se",
se: "ne",
sw: "nw"
}, iF = {
overlay: 1,
selection: 1,
n: null,
e: 1,
s: null,
w: -1,
nw: -1,
ne: 1,
se: 1,
sw: -1
}, aF = {
overlay: 1,
selection: 1,
n: -1,
e: null,
s: 1,
w: null,
nw: -1,
ne: -1,
se: 1,
sw: 1
};
function Tc(t) {
return { type: t };
}
function sF(t) {
return !t.ctrlKey && !t.button;
}
function oF() {
var t = this.ownerSVGElement || this;
return t.hasAttribute("viewBox") ? (t = t.viewBox.baseVal, [[t.x, t.y], [t.x + t.width, t.y + t.height]]) : [[0, 0], [t.width.baseVal.value, t.height.baseVal.value]];
}
function lF() {
return navigator.maxTouchPoints || "ontouchstart" in this;
}
function Z0(t) {
for (; !t.__brush; )
if (!(t = t.parentNode))
return;
return t.__brush;
}
function cF(t) {
return t[0][0] === t[1][0] || t[0][1] === t[1][1];
}
function uF(t) {
var e = t.__brush;
return e ? e.dim.output(e.selection) : null;
}
function hF() {
return b3(bh);
}
function fF() {
return b3(_h);
}
function dF() {
return b3(nF);
}
function b3(t) {
var e = oF, r = sF, n = lF, i = !0, a = Ws("start", "brush", "end"), s = 6, o;
function l(y) {
var b = y.property("__brush", _).selectAll(".overlay").data([Tc("overlay")]);
b.enter().append("rect").attr("class", "overlay").attr("pointer-events", "all").attr("cursor", Qi.overlay).merge(b).each(function() {
var k = Z0(this).extent;
St(this).attr("x", k[0][0]).attr("y", k[0][1]).attr("width", k[1][0] - k[0][0]).attr("height", k[1][1] - k[0][1]);
}), y.selectAll(".selection").data([Tc("selection")]).enter().append("rect").attr("class", "selection").attr("cursor", Qi.selection).attr("fill", "#777").attr("fill-opacity", 0.3).attr("stroke", "#fff").attr("shape-rendering", "crispEdges");
var x = y.selectAll(".handle").data(t.handles, function(k) {
return k.type;
});
x.exit().remove(), x.enter().append("rect").attr("class", function(k) {
return "handle handle--" + k.type;
}).attr("cursor", function(k) {
return Qi[k.type];
}), y.each(u).attr("fill", "none").attr("pointer-events", "all").on("mousedown.brush", f).filter(n).on("touchstart.brush", f).on("touchmove.brush", p).on("touchend.brush touchcancel.brush", m).style("touch-action", "none").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
}
l.move = function(y, b, x) {
y.tween ? y.on("start.brush", function(k) {
h(this, arguments).beforestart().start(k);
}).on("interrupt.brush end.brush", function(k) {
h(this, arguments).end(k);
}).tween("brush", function() {
var k = this, T = k.__brush, C = h(k, arguments), M = T.selection, S = t.input(typeof b == "function" ? b.apply(this, arguments) : b, T.extent), R = Ja(M, S);
function A(L) {
T.selection = L === 1 && S === null ? null : R(L), u.call(k), C.brush();
}
return M !== null && S !== null ? A : A(1);
}) : y.each(function() {
var k = this, T = arguments, C = k.__brush, M = t.input(typeof b == "function" ? b.apply(k, T) : b, C.extent), S = h(k, T).beforestart();
Es(k), C.selection = M === null ? null : M, u.call(k), S.start(x).brush(x).end(x);
});
}, l.clear = function(y, b) {
l.move(y, null, b);
};
function u() {
var y = St(this), b = Z0(this).selection;
b ? (y.selectAll(".selection").style("display", null).attr("x", b[0][0]).attr("y", b[0][1]).attr("width", b[1][0] - b[0][0]).attr("height", b[1][1] - b[0][1]), y.selectAll(".handle").style("display", null).attr("x", function(x) {
return x.type[x.type.length - 1] === "e" ? b[1][0] - s / 2 : b[0][0] - s / 2;
}).attr("y", function(x) {
return x.type[0] === "s" ? b[1][1] - s / 2 : b[0][1] - s / 2;
}).attr("width", function(x) {
return x.type === "n" || x.type === "s" ? b[1][0] - b[0][0] + s : s;
}).attr("height", function(x) {
return x.type === "e" || x.type === "w" ? b[1][1] - b[0][1] + s : s;
})) : y.selectAll(".selection,.handle").style("display", "none").attr("x", null).attr("y", null).attr("width", null).attr("height", null);
}
function h(y, b, x) {
var k = y.__brush.emitter;
return k && (!x || !k.clean) ? k : new d(y, b, x);
}
function d(y, b, x) {
this.that = y, this.args = b, this.state = y.__brush, this.active = 0, this.clean = x;
}
d.prototype = {
beforestart: function() {
return ++this.active === 1 && (this.state.emitter = this, this.starting = !0), this;
},
start: function(y, b) {
return this.starting ? (this.starting = !1, this.emit("start", y, b)) : this.emit("brush", y), this;
},
brush: function(y, b) {
return this.emit("brush", y, b), this;
},
end: function(y, b) {
return --this.active === 0 && (delete this.state.emitter, this.emit("end", y, b)), this;
},
emit: function(y, b, x) {
var k = St(this.that).datum();
a.call(
y,
this.that,
new eF(y, {
sourceEvent: b,
target: l,
selection: t.output(this.state.selection),
mode: x,
dispatch: a
}),
k
);
}
};
function f(y) {
if (o && !y.touches || !r.apply(this, arguments))
return;
var b = this, x = y.target.__data__.type, k = (i && y.metaKey ? x = "overlay" : x) === "selection" ? d5 : i && y.altKey ? lo : oo, T = t === _h ? null : iF[x], C = t === bh ? null : aF[x], M = Z0(b), S = M.extent, R = M.selection, A = S[0][0], L, v, B = S[0][1], w, D, N = S[1][0], z, X, ct = S[1][1], J, Y, $ = 0, lt = 0, ut, W = T && C && i && y.shiftKey, tt, K, it = Array.from(y.touches || [y], (at) => {
const It = at.identifier;
return at = Cn(at, b), at.point0 = at.slice(), at.identifier = It, at;
});
Es(b);
var Z = h(b, arguments, !0).beforestart();
if (x === "overlay") {
R && (ut = !0);
const at = [it[0], it[1] || it[0]];
M.selection = R = [[
L = t === _h ? A : qr(at[0][0], at[1][0]),
w = t === bh ? B : qr(at[0][1], at[1][1])
], [
z = t === _h ? N : Pr(at[0][0], at[1][0]),
J = t === bh ? ct : Pr(at[0][1], at[1][1])
]], it.length > 1 && F(y);
} else
L = R[0][0], w = R[0][1], z = R[1][0], J = R[1][1];
v = L, D = w, X = z, Y = J;
var V = St(b).attr("pointer-events", "none"), Q = V.selectAll(".overlay").attr("cursor", Qi[x]);
if (y.touches)
Z.moved = U, Z.ended = j;
else {
var q = St(y.view).on("mousemove.brush", U, !0).on("mouseup.brush", j, !0);
i && q.on("keydown.brush", P, !0).on("keyup.brush", et, !0), g1(y.view);
}
u.call(b), Z.start(y, k.name);
function U(at) {
for (const It of at.changedTouches || [at])
for (const Lt of it)
Lt.identifier === It.identifier && (Lt.cur = Cn(It, b));
if (W && !tt && !K && it.length === 1) {
const It = it[0];
p5(It.cur[0] - It[0]) > p5(It.cur[1] - It[1]) ? K = !0 : tt = !0;
}
for (const It of it)
It.cur && (It[0] = It.cur[0], It[1] = It.cur[1]);
ut = !0, X0(at), F(at);
}
function F(at) {
const It = it[0], Lt = It.point0;
var Rt;
switch ($ = It[0] - Lt[0], lt = It[1] - Lt[1], k) {
case K0:
case d5: {
T && ($ = Pr(A - L, qr(N - z, $)), v = L + $, X = z + $), C && (lt = Pr(B - w, qr(ct - J, lt)), D = w + lt, Y = J + lt);
break;
}
case oo: {
it[1] ? (T && (v = Pr(A, qr(N, it[0][0])), X = Pr(A, qr(N, it[1][0])), T = 1), C && (D = Pr(B, qr(ct, it[0][1])), Y = Pr(B, qr(ct, it[1][1])), C = 1)) : (T < 0 ? ($ = Pr(A - L, qr(N - L, $)), v = L + $, X = z) : T > 0 && ($ = Pr(A - z, qr(N - z, $)), v = L, X = z + $), C < 0 ? (lt = Pr(B - w, qr(ct - w, lt)), D = w + lt, Y = J) : C > 0 && (lt = Pr(B - J, qr(ct - J, lt)), D = w, Y = J + lt));
break;
}
case lo: {
T && (v = Pr(A, qr(N, L - $ * T)), X = Pr(A, qr(N, z + $ * T))), C && (D = Pr(B, qr(ct, w - lt * C)), Y = Pr(B, qr(ct, J + lt * C)));
break;
}
}
X < v && (T *= -1, Rt = L, L = z, z = Rt, Rt = v, v = X, X = Rt, x in y5 && Q.attr("cursor", Qi[x = y5[x]])), Y < D && (C *= -1, Rt = w, w = J, J = Rt, Rt = D, D = Y, Y = Rt, x in m5 && Q.attr("cursor", Qi[x = m5[x]])), M.selection && (R = M.selection), tt && (v = R[0][0], X = R[1][0]), K && (D = R[0][1], Y = R[1][1]), (R[0][0] !== v || R[0][1] !== D || R[1][0] !== X || R[1][1] !== Y) && (M.selection = [[v, D], [X, Y]], u.call(b), Z.brush(at, k.name));
}
function j(at) {
if (rF(at), at.touches) {
if (at.touches.length)
return;
o && clearTimeout(o), o = setTimeout(function() {
o = null;
}, 500);
} else
y1(at.view, ut), q.on("keydown.brush keyup.brush mousemove.brush mouseup.brush", null);
V.attr("pointer-events", "all"), Q.attr("cursor", Qi.overlay), M.selection && (R = M.selection), cF(R) && (M.selection = null, u.call(b)), Z.end(at, k.name);
}
function P(at) {
switch (at.keyCode) {
case 16: {
W = T && C;
break;
}
case 18: {
k === oo && (T && (z = X - $ * T, L = v + $ * T), C && (J = Y - lt * C, w = D + lt * C), k = lo, F(at));
break;
}
case 32: {
(k === oo || k === lo) && (T < 0 ? z = X - $ : T > 0 && (L = v - $), C < 0 ? J = Y - lt : C > 0 && (w = D - lt), k = K0, Q.attr("cursor", Qi.selection), F(at));
break;
}
default:
return;
}
X0(at);
}
function et(at) {
switch (at.keyCode) {
case 16: {
W && (tt = K = W = !1, F(at));
break;
}
case 18: {
k === lo && (T < 0 ? z = X : T > 0 && (L = v), C < 0 ? J = Y : C > 0 && (w = D), k = oo, F(at));
break;
}
case 32: {
k === K0 && (at.altKey ? (T && (z = X - $ * T, L = v + $ * T), C && (J = Y - lt * C, w = D + lt * C), k = lo) : (T < 0 ? z = X : T > 0 && (L = v), C < 0 ? J = Y : C > 0 && (w = D), k = oo), Q.attr("cursor", Qi[x]), F(at));
break;
}
default:
return;
}
X0(at);
}
}
function p(y) {
h(this, arguments).moved(y);
}
function m(y) {
h(this, arguments).ended(y);
}
function _() {
var y = this.__brush || { selection: null };
return y.extent = Dm(e.apply(this, arguments)), y.dim = t, y;
}
return l.extent = function(y) {
return arguments.length ? (e = typeof y == "function" ? y : $0(Dm(y)), l) : e;
}, l.filter = function(y) {
return arguments.length ? (r = typeof y == "function" ? y : $0(!!y), l) : r;
}, l.touchable = function(y) {
return arguments.length ? (n = typeof y == "function" ? y : $0(!!y), l) : n;
}, l.handleSize = function(y) {
return arguments.length ? (s = +y, l) : s;
}, l.keyModifiers = function(y) {
return arguments.length ? (i = !!y, l) : i;
}, l.on = function() {
var y = a.on.apply(a, arguments);
return y === a ? l : y;
}, l;
}
var b5 = Math.abs, co = Math.cos, uo = Math.sin, pT = Math.PI, Du = pT / 2, _5 = pT * 2, v5 = Math.max, Q0 = 1e-12;
function J0(t, e) {
return Array.from({ length: e - t }, (r, n) => t + n);
}
function pF(t) {
return function(e, r) {
return t(
e.source.value + e.target.value,
r.source.value + r.target.value
);
};
}
function gF() {
return _3(!1, !1);
}
function yF() {
return _3(!1, !0);
}
function mF() {
return _3(!0, !1);
}
function _3(t, e) {
var r = 0, n = null, i = null, a = null;
function s(o) {
var l = o.length, u = new Array(l), h = J0(0, l), d = new Array(l * l), f = new Array(l), p = 0, m;
o = Float64Array.from({ length: l * l }, e ? (_, y) => o[y % l][y / l | 0] : (_, y) => o[y / l | 0][y % l]);
for (let _ = 0; _ < l; ++_) {
let y = 0;
for (let b = 0; b < l; ++b)
y += o[_ * l + b] + t * o[b * l + _];
p += u[_] = y;
}
p = v5(0, _5 - r * l) / p, m = p ? r : _5 / l;
{
let _ = 0;
n && h.sort((y, b) => n(u[y], u[b]));
for (const y of h) {
const b = _;
if (t) {
const x = J0(~l + 1, l).filter((k) => k < 0 ? o[~k * l + y] : o[y * l + k]);
i && x.sort((k, T) => i(k < 0 ? -o[~k * l + y] : o[y * l + k], T < 0 ? -o[~T * l + y] : o[y * l + T]));
for (const k of x)
if (k < 0) {
const T = d[~k * l + y] || (d[~k * l + y] = { source: null, target: null });
T.target = { index: y, startAngle: _, endAngle: _ += o[~k * l + y] * p, value: o[~k * l + y] };
} else {
const T = d[y * l + k] || (d[y * l + k] = { source: null, target: null });
T.source = { index: y, startAngle: _, endAngle: _ += o[y * l + k] * p, value: o[y * l + k] };
}
f[y] = { index: y, startAngle: b, endAngle: _, value: u[y] };
} else {
const x = J0(0, l).filter((k) => o[y * l + k] || o[k * l + y]);
i && x.sort((k, T) => i(o[y * l + k], o[y * l + T]));
for (const k of x) {
let T;
if (y < k ? (T = d[y * l + k] || (d[y * l + k] = { source: null, target: null }), T.source = { index: y, startAngle: _, endAngle: _ += o[y * l + k] * p, value: o[y * l + k] }) : (T = d[k * l + y] || (d[k * l + y] = { source: null, target: null }), T.target = { index: y, startAngle: _, endAngle: _ += o[y * l + k] * p, value: o[y * l + k] }, y === k && (T.source = T.target)), T.source && T.target && T.source.value < T.target.value) {
const C = T.source;
T.source = T.target, T.target = C;
}
}
f[y] = { index: y, startAngle: b, endAngle: _, value: u[y] };
}
_ += m;
}
}
return d = Object.values(d), d.groups = f, a ? d.sort(a) : d;
}
return s.padAngle = function(o) {
return arguments.length ? (r = v5(0, o), s) : r;
}, s.sortGroups = function(o) {
return arguments.length ? (n = o, s) : n;
}, s.sortSubgroups = function(o) {
return arguments.length ? (i = o, s) : i;
}, s.sortChords = function(o) {
return arguments.length ? (o == null ? a = null : (a = pF(o))._ = o, s) : a && a._;
}, s;
}
const Om = Math.PI, Fm = 2 * Om, ys = 1e-6, bF = Fm - ys;
function Pm() {
this._x0 = this._y0 = this._x1 = this._y1 = null, this._ = "";
}
function ts() {
return new Pm();
}
Pm.prototype = ts.prototype = {
constructor: Pm,
moveTo: function(t, e) {
this._ += "M" + (this._x0 = this._x1 = +t) + "," + (this._y0 = this._y1 = +e);
},
closePath: function() {
this._x1 !== null && (this._x1 = this._x0, this._y1 = this._y0, this._ += "Z");
},
lineTo: function(t, e) {
this._ += "L" + (this._x1 = +t) + "," + (this._y1 = +e);
},
quadraticCurveTo: function(t, e, r, n) {
this._ += "Q" + +t + "," + +e + "," + (this._x1 = +r) + "," + (this._y1 = +n);
},
bezierCurveTo: function(t, e, r, n, i, a) {
this._ += "C" + +t + "," + +e + "," + +r + "," + +n + "," + (this._x1 = +i) + "," + (this._y1 = +a);
},
arcTo: function(t, e, r, n, i) {
t = +t, e = +e, r = +r, n = +n, i = +i;
var a = this._x1, s = this._y1, o = r - t, l = n - e, u = a - t, h = s - e, d = u * u + h * h;
if (i < 0)
throw new Error("negative radius: " + i);
if (this._x1 === null)
this._ += "M" + (this._x1 = t) + "," + (this._y1 = e);
else if (d > ys)
if (!(Math.abs(h * o - l * u) > ys) || !i)
this._ += "L" + (this._x1 = t) + "," + (this._y1 = e);
else {
var f = r - a, p = n - s, m = o * o + l * l, _ = f * f + p * p, y = Math.sqrt(m), b = Math.sqrt(d), x = i * Math.tan((Om - Math.acos((m + d - _) / (2 * y * b))) / 2), k = x / b, T = x / y;
Math.abs(k - 1) > ys && (this._ += "L" + (t + k * u) + "," + (e + k * h)), this._ += "A" + i + "," + i + ",0,0," + +(h * f > u * p) + "," + (this._x1 = t + T * o) + "," + (this._y1 = e + T * l);
}
},
arc: function(t, e, r, n, i, a) {
t = +t, e = +e, r = +r, a = !!a;
var s = r * Math.cos(n), o = r * Math.sin(n), l = t + s, u = e + o, h = 1 ^ a, d = a ? n - i : i - n;
if (r < 0)
throw new Error("negative radius: " + r);
this._x1 === null ? this._ += "M" + l + "," + u : (Math.abs(this._x1 - l) > ys || Math.abs(this._y1 - u) > ys) && (this._ += "L" + l + "," + u), r && (d < 0 && (d = d % Fm + Fm), d > bF ? this._ += "A" + r + "," + r + ",0,1," + h + "," + (t - s) + "," + (e - o) + "A" + r + "," + r + ",0,1," + h + "," + (this._x1 = l) + "," + (this._y1 = u) : d > ys && (this._ += "A" + r + "," + r + ",0," + +(d >= Om) + "," + h + "," + (this._x1 = t + r * Math.cos(i)) + "," + (this._y1 = e + r * Math.sin(i))));
},
rect: function(t, e, r, n) {
this._ += "M" + (this._x0 = this._x1 = +t) + "," + (this._y0 = this._y1 = +e) + "h" + +r + "v" + +n + "h" + -r + "Z";
},
toString: function() {
return this._;
}
};
var _F = Array.prototype.slice;
function ds(t) {
return function() {
return t;
};
}
function vF(t) {
return t.source;
}
function xF(t) {
return t.target;
}
function x5(t) {
return t.radius;
}
function kF(t) {
return t.startAngle;
}
function wF(t) {
return t.endAngle;
}
function TF() {
return 0;
}
function EF() {
return 10;
}
function gT(t) {
var e = vF, r = xF, n = x5, i = x5, a = kF, s = wF, o = TF, l = null;
function u() {
var h, d = e.apply(this, arguments), f = r.apply(this, arguments), p = o.apply(this, arguments) / 2, m = _F.call(arguments), _ = +n.apply(this, (m[0] = d, m)), y = a.apply(this, m) - Du, b = s.apply(this, m) - Du, x = +i.apply(this, (m[0] = f, m)), k = a.apply(this, m) - Du, T = s.apply(this, m) - Du;
if (l || (l = h = ts()), p > Q0 && (b5(b - y) > p * 2 + Q0 ? b > y ? (y += p, b -= p) : (y -= p, b += p) : y = b = (y + b) / 2, b5(T - k) > p * 2 + Q0 ? T > k ? (k += p, T -= p) : (k -= p, T += p) : k = T = (k + T) / 2), l.moveTo(_ * co(y), _ * uo(y)), l.arc(0, 0, _, y, b), y !== k || b !== T)
if (t) {
var C = +t.apply(this, arguments), M = x - C, S = (k + T) / 2;
l.quadraticCurveTo(0, 0, M * co(k), M * uo(k)), l.lineTo(x * co(S), x * uo(S)), l.lineTo(M * co(T), M * uo(T));
} else
l.quadraticCurveTo(0, 0, x * co(k), x * uo(k)), l.arc(0, 0, x, k, T);
if (l.quadraticCurveTo(0, 0, _ * co(y), _ * uo(y)), l.closePath(), h)
return l = null, h + "" || null;
}
return t && (u.headRadius = function(h) {
return arguments.length ? (t = typeof h == "function" ? h : ds(+h), u) : t;
}), u.radius = function(h) {
return arguments.length ? (n = i = typeof h == "function" ? h : ds(+h), u) : n;
}, u.sourceRadius = function(h) {
return arguments.length ? (n = typeof h == "function" ? h : ds(+h), u) : n;
}, u.targetRadius = function(h) {
return arguments.length ? (i = typeof h == "function" ? h : ds(+h), u) : i;
}, u.startAngle = function(h) {
return arguments.length ? (a = typeof h == "function" ? h : ds(+h), u) : a;
}, u.endAngle = function(h) {
return arguments.length ? (s = typeof h == "function" ? h : ds(+h), u) : s;
}, u.padAngle = function(h) {
return arguments.length ? (o = typeof h == "function" ? h : ds(+h), u) : o;
}, u.source = function(h) {
return arguments.length ? (e = h, u) : e;
}, u.target = function(h) {
return arguments.length ? (r = h, u) : r;
}, u.context = function(h) {
return arguments.length ? (l = h == null ? null : h, u) : l;
}, u;
}
function CF() {
return gT();
}
function SF() {
return gT(EF);
}
var AF = Array.prototype, yT = AF.slice;
function MF(t, e) {
return t - e;
}
function LF(t) {
for (var e = 0, r = t.length, n = t[r - 1][1] * t[0][0] - t[r - 1][0] * t[0][1]; ++e < r; )
n += t[e - 1][1] * t[e][0] - t[e - 1][0] * t[e][1];
return n;
}
const Ma = (t) => () => t;
function RF(t, e) {
for (var r = -1, n = e.length, i; ++r < n; )
if (i = IF(t, e[r]))
return i;
return 0;
}
function IF(t, e) {
for (var r = e[0], n = e[1], i = -1, a = 0, s = t.length, o = s - 1; a < s; o = a++) {
var l = t[a], u = l[0], h = l[1], d = t[o], f = d[0], p = d[1];
if (NF(l, d, e))
return 0;
h > n != p > n && r < (f - u) * (n - h) / (p - h) + u && (i = -i);
}
return i;
}
function NF(t, e, r) {
var n;
return BF(t, e, r) && DF(t[n = +(t[0] === e[0])], r[n], e[n]);
}
function BF(t, e, r) {
return (e[0] - t[0]) * (r[1] - t[1]) === (r[0] - t[0]) * (e[1] - t[1]);
}
function DF(t, e, r) {
return t <= e && e <= r || r <= e && e <= t;
}
function OF() {
}
var Ji = [
[],
[[[1, 1.5], [0.5, 1]]],
[[[1.5, 1], [1, 1.5]]],
[[[1.5, 1], [0.5, 1]]],
[[[1, 0.5], [1.5, 1]]],
[[[1, 1.5], [0.5, 1]], [[1, 0.5], [1.5, 1]]],
[[[1, 0.5], [1, 1.5]]],
[[[1, 0.5], [0.5, 1]]],
[[[0.5, 1], [1, 0.5]]],
[[[1, 1.5], [1, 0.5]]],
[[[0.5, 1], [1, 0.5]], [[1.5, 1], [1, 1.5]]],
[[[1.5, 1], [1, 0.5]]],
[[[0.5, 1], [1.5, 1]]],
[[[1, 1.5], [1.5, 1]]],
[[[0.5, 1], [1, 1.5]]],
[]
];
function qm() {
var t = 1, e = 1, r = Qb, n = l;
function i(u) {
var h = r(u);
if (Array.isArray(h))
h = h.slice().sort(MF);
else {
const d = Ql(u), f = pc(d[0], d[1], h);
h = As(Math.floor(d[0] / f) * f, Math.floor(d[1] / f - 1) * f, h);
}
return h.map((d) => a(u, d));
}
function a(u, h) {
var d = [], f = [];
return s(u, h, function(p) {
n(p, u, h), LF(p) > 0 ? d.push([p]) : f.push(p);
}), f.forEach(function(p) {
for (var m = 0, _ = d.length, y; m < _; ++m)
if (RF((y = d[m])[0], p) !== -1) {
y.push(p);
return;
}
}), {
type: "MultiPolygon",
value: h,
coordinates: d
};
}
function s(u, h, d) {
var f = new Array(), p = new Array(), m, _, y, b, x, k;
for (m = _ = -1, b = u[0] >= h, Ji[b << 1].forEach(T); ++m < t - 1; )
y = b, b = u[m + 1] >= h, Ji[y | b << 1].forEach(T);
for (Ji[b << 0].forEach(T); ++_ < e - 1; ) {
for (m = -1, b = u[_ * t + t] >= h, x = u[_ * t] >= h, Ji[b << 1 | x << 2].forEach(T); ++m < t - 1; )
y = b, b = u[_ * t + t + m + 1] >= h, k = x, x = u[_ * t + m + 1] >= h, Ji[y | b << 1 | x << 2 | k << 3].forEach(T);
Ji[b | x << 3].forEach(T);
}
for (m = -1, x = u[_ * t] >= h, Ji[x << 2].forEach(T); ++m < t - 1; )
k = x, x = u[_ * t + m + 1] >= h, Ji[x << 2 | k << 3].forEach(T);
Ji[x << 3].forEach(T);
function T(C) {
var M = [C[0][0] + m, C[0][1] + _], S = [C[1][0] + m, C[1][1] + _], R = o(M), A = o(S), L, v;
(L = p[R]) ? (v = f[A]) ? (delete p[L.end], delete f[v.start], L === v ? (L.ring.push(S), d(L.ring)) : f[L.start] = p[v.end] = { start: L.start, end: v.end, ring: L.ring.concat(v.ring) }) : (delete p[L.end], L.ring.push(S), p[L.end = A] = L) : (L = f[A]) ? (v = p[R]) ? (delete f[L.start], delete p[v.end], L === v ? (L.ring.push(S), d(L.ring)) : f[v.start] = p[L.end] = { start: v.start, end: L.end, ring: v.ring.concat(L.ring) }) : (delete f[L.start], L.ring.unshift(M), f[L.start = R] = L) : f[R] = p[A] = { start: R, end: A, ring: [M, S] };
}
}
function o(u) {
return u[0] * 2 + u[1] * (t + 1) * 4;
}
function l(u, h, d) {
u.forEach(function(f) {
var p = f[0], m = f[1], _ = p | 0, y = m | 0, b, x = h[y * t + _];
p > 0 && p < t && _ === p && (b = h[y * t + _ - 1], f[0] = p + (d - b) / (x - b) - 0.5), m > 0 && m < e && y === m && (b = h[(y - 1) * t + _], f[1] = m + (d - b) / (x - b) - 0.5);
});
}
return i.contour = a, i.size = function(u) {
if (!arguments.length)
return [t, e];
var h = Math.floor(u[0]), d = Math.floor(u[1]);
if (!(h >= 0 && d >= 0))
throw new Error("invalid size");
return t = h, e = d, i;
}, i.thresholds = function(u) {
return arguments.length ? (r = typeof u == "function" ? u : Array.isArray(u) ? Ma(yT.call(u)) : Ma(u), i) : r;
}, i.smooth = function(u) {
return arguments.length ? (n = u ? l : OF, i) : n === l;
}, i;
}
function FF(t) {
return t[0];
}
function PF(t) {
return t[1];
}
function qF() {
return 1;
}
function VF() {
var t = FF, e = PF, r = qF, n = 960, i = 500, a = 20, s = 2, o = a * 3, l = n + o * 2 >> s, u = i + o * 2 >> s, h = Ma(20);
function d(x) {
var k = new Float32Array(l * u), T = Math.pow(2, -s), C = -1;
for (const w of x) {
var M = (t(w, ++C, x) + o) * T, S = (e(w, C, x) + o) * T, R = +r(w, C, x);
if (M >= 0 && M < l && S >= 0 && S < u) {
var A = Math.floor(M), L = Math.floor(S), v = M - A - 0.5, B = S - L - 0.5;
k[A + L * l] += (1 - v) * (1 - B) * R, k[A + 1 + L * l] += v * (1 - B) * R, k[A + 1 + (L + 1) * l] += v * B * R, k[A + (L + 1) * l] += (1 - v) * B * R;
}
}
return Gw({ data: k, width: l, height: u }, a * T), k;
}
function f(x) {
var k = d(x), T = h(k), C = Math.pow(2, 2 * s);
return Array.isArray(T) || (T = As(Number.MIN_VALUE, Bo(k) / C, T)), qm().size([l, u]).thresholds(T.map((M) => M * C))(k).map((M, S) => (M.value = +T[S], p(M)));
}
f.contours = function(x) {
var k = d(x), T = qm().size([l, u]), C = Math.pow(2, 2 * s), M = (S) => {
S = +S;
var R = p(T.contour(k, S * C));
return R.value = S, R;
};
return Object.defineProperty(M, "max", { get: () => Bo(k) / C }), M;
};
function p(x) {
return x.coordinates.forEach(m), x;
}
function m(x) {
x.forEach(_);
}
function _(x) {
x.forEach(y);
}
function y(x) {
x[0] = x[0] * Math.pow(2, s) - o, x[1] = x[1] * Math.pow(2, s) - o;
}
function b() {
return o = a * 3, l = n + o * 2 >> s, u = i + o * 2 >> s, f;
}
return f.x = function(x) {
return arguments.length ? (t = typeof x == "function" ? x : Ma(+x), f) : t;
}, f.y = function(x) {
return arguments.length ? (e = typeof x == "function" ? x : Ma(+x), f) : e;
}, f.weight = function(x) {
return arguments.length ? (r = typeof x == "function" ? x : Ma(+x), f) : r;
}, f.size = function(x) {
if (!arguments.length)
return [n, i];
var k = +x[0], T = +x[1];
if (!(k >= 0 && T >= 0))
throw new Error("invalid size");
return n = k, i = T, b();
}, f.cellSize = function(x) {
if (!arguments.length)
return 1 << s;
if (!((x = +x) >= 1))
throw new Error("invalid cell size");
return s = Math.floor(Math.log(x) / Math.LN2), b();
}, f.thresholds = function(x) {
return arguments.length ? (h = typeof x == "function" ? x : Array.isArray(x) ? Ma(yT.call(x)) : Ma(x), f) : h;
}, f.bandwidth = function(x) {
if (!arguments.length)
return Math.sqrt(a * (a + 1));
if (!((x = +x) >= 0))
throw new Error("invalid bandwidth");
return a = (Math.sqrt(4 * x * x + 1) - 1) / 2, b();
}, f;
}
const da = 11102230246251565e-32, Vr = 134217729, zF = (3 + 8 * da) * da;
function td(t, e, r, n, i) {
let a, s, o, l, u = e[0], h = n[0], d = 0, f = 0;
h > u == h > -u ? (a = u, u = e[++d]) : (a = h, h = n[++f]);
let p = 0;
if (d < t && f < r)
for (h > u == h > -u ? (s = u + a, o = a - (s - u), u = e[++d]) : (s = h + a, o = a - (s - h), h = n[++f]), a = s, o !== 0 && (i[p++] = o); d < t && f < r; )
h > u == h > -u ? (s = a + u, l = s - a, o = a - (s - l) + (u - l), u = e[++d]) : (s = a + h, l = s - a, o = a - (s - l) + (h - l), h = n[++f]), a = s, o !== 0 && (i[p++] = o);
for (; d < t; )
s = a + u, l = s - a, o = a - (s - l) + (u - l), u = e[++d], a = s, o !== 0 && (i[p++] = o);
for (; f < r; )
s = a + h, l = s - a, o = a - (s - l) + (h - l), h = n[++f], a = s, o !== 0 && (i[p++] = o);
return (a !== 0 || p === 0) && (i[p++] = a), p;
}
function YF(t, e) {
let r = e[0];
for (let n = 1; n < t; n++)
r += e[n];
return r;
}
function Qc(t) {
return new Float64Array(t);
}
const UF = (3 + 16 * da) * da, WF = (2 + 12 * da) * da, HF = (9 + 64 * da) * da * da, ho = Qc(4), k5 = Qc(8), w5 = Qc(12), T5 = Qc(16), $r = Qc(4);
function GF(t, e, r, n, i, a, s) {
let o, l, u, h, d, f, p, m, _, y, b, x, k, T, C, M, S, R;
const A = t - i, L = r - i, v = e - a, B = n - a;
T = A * B, f = Vr * A, p = f - (f - A), m = A - p, f = Vr * B, _ = f - (f - B), y = B - _, C = m * y - (T - p * _ - m * _ - p * y), M = v * L, f = Vr * v, p = f - (f - v), m = v - p, f = Vr * L, _ = f - (f - L), y = L - _, S = m * y - (M - p * _ - m * _ - p * y), b = C - S, d = C - b, ho[0] = C - (b + d) + (d - S), x = T + b, d = x - T, k = T - (x - d) + (b - d), b = k - M, d = k - b, ho[1] = k - (b + d) + (d - M), R = x + b, d = R - x, ho[2] = x - (R - d) + (b - d), ho[3] = R;
let w = YF(4, ho), D = WF * s;
if (w >= D || -w >= D || (d = t - A, o = t - (A + d) + (d - i), d = r - L, u = r - (L + d) + (d - i), d = e - v, l = e - (v + d) + (d - a), d = n - B, h = n - (B + d) + (d - a), o === 0 && l === 0 && u === 0 && h === 0) || (D = HF * s + zF * Math.abs(w), w += A * h + B * o - (v * u + L * l), w >= D || -w >= D))
return w;
T = o * B, f = Vr * o, p = f - (f - o), m = o - p, f = Vr * B, _ = f - (f - B), y = B - _, C = m * y - (T - p * _ - m * _ - p * y), M = l * L, f = Vr * l, p = f - (f - l), m = l - p, f = Vr * L, _ = f - (f - L), y = L - _, S = m * y - (M - p * _ - m * _ - p * y), b = C - S, d = C - b, $r[0] = C - (b + d) + (d - S), x = T + b, d = x - T, k = T - (x - d) + (b - d), b = k - M, d = k - b, $r[1] = k - (b + d) + (d - M), R = x + b, d = R - x, $r[2] = x - (R - d) + (b - d), $r[3] = R;
const N = td(4, ho, 4, $r, k5);
T = A * h, f = Vr * A, p = f - (f - A), m = A - p, f = Vr * h, _ = f - (f - h), y = h - _, C = m * y - (T - p * _ - m * _ - p * y), M = v * u, f = Vr * v, p = f - (f - v), m = v - p, f = Vr * u, _ = f - (f - u), y = u - _, S = m * y - (M - p * _ - m * _ - p * y), b = C - S, d = C - b, $r[0] = C - (b + d) + (d - S), x = T + b, d = x - T, k = T - (x - d) + (b - d), b = k - M, d = k - b, $r[1] = k - (b + d) + (d - M), R = x + b, d = R - x, $r[2] = x - (R - d) + (b - d), $r[3] = R;
const z = td(N, k5, 4, $r, w5);
T = o * h, f = Vr * o, p = f - (f - o), m = o - p, f = Vr * h, _ = f - (f - h), y = h - _, C = m * y - (T - p * _ - m * _ - p * y), M = l * u, f = Vr * l, p = f - (f - l), m = l - p, f = Vr * u, _ = f - (f - u), y = u - _, S = m * y - (M - p * _ - m * _ - p * y), b = C - S, d = C - b, $r[0] = C - (b + d) + (d - S), x = T + b, d = x - T, k = T - (x - d) + (b - d), b = k - M, d = k - b, $r[1] = k - (b + d) + (d - M), R = x + b, d = R - x, $r[2] = x - (R - d) + (b - d), $r[3] = R;
const X = td(z, w5, 4, $r, T5);
return T5[X - 1];
}
function Ou(t, e, r, n, i, a) {
const s = (e - a) * (r - i), o = (t - i) * (n - a), l = s - o;
if (s === 0 || o === 0 || s > 0 != o > 0)
return l;
const u = Math.abs(s + o);
return Math.abs(l) >= UF * u ? l : -GF(t, e, r, n, i, a, u);
}
const E5 = Math.pow(2, -52), Fu = new Uint32Array(512);
class Xh {
static from(e, r = ZF, n = QF) {
const i = e.length, a = new Float64Array(i * 2);
for (let s = 0; s < i; s++) {
const o = e[s];
a[2 * s] = r(o), a[2 * s + 1] = n(o);
}
return new Xh(a);
}
constructor(e) {
const r = e.length >> 1;
if (r > 0 && typeof e[0] != "number")
throw new Error("Expected coords to contain numbers.");
this.coords = e;
const n = Math.max(2 * r - 5, 0);
this._triangles = new Uint32Array(n * 3), this._halfedges = new Int32Array(n * 3), this._hashSize = Math.ceil(Math.sqrt(r)), this._hullPrev = new Uint32Array(r), this._hullNext = new Uint32Array(r), this._hullTri = new Uint32Array(r), this._hullHash = new Int32Array(this._hashSize).fill(-1), this._ids = new Uint32Array(r), this._dists = new Float64Array(r), this.update();
}
update() {
const { coords: e, _hullPrev: r, _hullNext: n, _hullTri: i, _hullHash: a } = this, s = e.length >> 1;
let o = 1 / 0, l = 1 / 0, u = -1 / 0, h = -1 / 0;
for (let L = 0; L < s; L++) {
const v = e[2 * L], B = e[2 * L + 1];
v < o && (o = v), B < l && (l = B), v > u && (u = v), B > h && (h = B), this._ids[L] = L;
}
const d = (o + u) / 2, f = (l + h) / 2;
let p = 1 / 0, m, _, y;
for (let L = 0; L < s; L++) {
const v = ed(d, f, e[2 * L], e[2 * L + 1]);
v < p && (m = L, p = v);
}
const b = e[2 * m], x = e[2 * m + 1];
p = 1 / 0;
for (let L = 0; L < s; L++) {
if (L === m)
continue;
const v = ed(b, x, e[2 * L], e[2 * L + 1]);
v < p && v > 0 && (_ = L, p = v);
}
let k = e[2 * _], T = e[2 * _ + 1], C = 1 / 0;
for (let L = 0; L < s; L++) {
if (L === m || L === _)
continue;
const v = XF(b, x, k, T, e[2 * L], e[2 * L + 1]);
v < C && (y = L, C = v);
}
let M = e[2 * y], S = e[2 * y + 1];
if (C === 1 / 0) {
for (let B = 0; B < s; B++)
this._dists[B] = e[2 * B] - e[0] || e[2 * B + 1] - e[1];
bo(this._ids, this._dists, 0, s - 1);
const L = new Uint32Array(s);
let v = 0;
for (let B = 0, w = -1 / 0; B < s; B++) {
const D = this._ids[B];
this._dists[D] > w && (L[v++] = D, w = this._dists[D]);
}
this.hull = L.subarray(0, v), this.triangles = new Uint32Array(0), this.halfedges = new Uint32Array(0);
return;
}
if (Ou(b, x, k, T, M, S) < 0) {
const L = _, v = k, B = T;
_ = y, k = M, T = S, y = L, M = v, S = B;
}
const R = KF(b, x, k, T, M, S);
this._cx = R.x, this._cy = R.y;
for (let L = 0; L < s; L++)
this._dists[L] = ed(e[2 * L], e[2 * L + 1], R.x, R.y);
bo(this._ids, this._dists, 0, s - 1), this._hullStart = m;
let A = 3;
n[m] = r[y] = _, n[_] = r[m] = y, n[y] = r[_] = m, i[m] = 0, i[_] = 1, i[y] = 2, a.fill(-1), a[this._hashKey(b, x)] = m, a[this._hashKey(k, T)] = _, a[this._hashKey(M, S)] = y, this.trianglesLen = 0, this._addTriangle(m, _, y, -1, -1, -1);
for (let L = 0, v, B; L < this._ids.length; L++) {
const w = this._ids[L], D = e[2 * w], N = e[2 * w + 1];
if (L > 0 && Math.abs(D - v) <= E5 && Math.abs(N - B) <= E5 || (v = D, B = N, w === m || w === _ || w === y))
continue;
let z = 0;
for (let $ = 0, lt = this._hashKey(D, N); $ < this._hashSize && (z = a[(lt + $) % this._hashSize], !(z !== -1 && z !== n[z])); $++)
;
z = r[z];
let X = z, ct;
for (; ct = n[X], Ou(D, N, e[2 * X], e[2 * X + 1], e[2 * ct], e[2 * ct + 1]) >= 0; )
if (X = ct, X === z) {
X = -1;
break;
}
if (X === -1)
continue;
let J = this._addTriangle(X, w, n[X], -1, -1, i[X]);
i[w] = this._legalize(J + 2), i[X] = J, A++;
let Y = n[X];
for (; ct = n[Y], Ou(D, N, e[2 * Y], e[2 * Y + 1], e[2 * ct], e[2 * ct + 1]) < 0; )
J = this._addTriangle(Y, w, ct, i[w], -1, i[Y]), i[w] = this._legalize(J + 2), n[Y] = Y, A--, Y = ct;
if (X === z)
for (; ct = r[X], Ou(D, N, e[2 * ct], e[2 * ct + 1], e[2 * X], e[2 * X + 1]) < 0; )
J = this._addTriangle(ct, w, X, -1, i[X], i[ct]), this._legalize(J + 2), i[ct] = J, n[X] = X, A--, X = ct;
this._hullStart = r[w] = X, n[X] = r[Y] = w, n[w] = Y, a[this._hashKey(D, N)] = w, a[this._hashKey(e[2 * X], e[2 * X + 1])] = X;
}
this.hull = new Uint32Array(A);
for (let L = 0, v = this._hullStart; L < A; L++)
this.hull[L] = v, v = n[v];
this.triangles = this._triangles.subarray(0, this.trianglesLen), this.halfedges = this._halfedges.subarray(0, this.trianglesLen);
}
_hashKey(e, r) {
return Math.floor(jF(e - this._cx, r - this._cy) * this._hashSize) % this._hashSize;
}
_legalize(e) {
const { _triangles: r, _halfedges: n, coords: i } = this;
let a = 0, s = 0;
for (; ; ) {
const o = n[e], l = e - e % 3;
if (s = l + (e + 2) % 3, o === -1) {
if (a === 0)
break;
e = Fu[--a];
continue;
}
const u = o - o % 3, h = l + (e + 1) % 3, d = u + (o + 2) % 3, f = r[s], p = r[e], m = r[h], _ = r[d];
if ($F(
i[2 * f],
i[2 * f + 1],
i[2 * p],
i[2 * p + 1],
i[2 * m],
i[2 * m + 1],
i[2 * _],
i[2 * _ + 1]
)) {
r[e] = _, r[o] = f;
const b = n[d];
if (b === -1) {
let k = this._hullStart;
do {
if (this._hullTri[k] === d) {
this._hullTri[k] = e;
break;
}
k = this._hullPrev[k];
} while (k !== this._hullStart);
}
this._link(e, b), this._link(o, n[s]), this._link(s, d);
const x = u + (o + 1) % 3;
a < Fu.length && (Fu[a++] = x);
} else {
if (a === 0)
break;
e = Fu[--a];
}
}
return s;
}
_link(e, r) {
this._halfedges[e] = r, r !== -1 && (this._halfedges[r] = e);
}
_addTriangle(e, r, n, i, a, s) {
const o = this.trianglesLen;
return this._triangles[o] = e, this._triangles[o + 1] = r, this._triangles[o + 2] = n, this._link(o, i), this._link(o + 1, a), this._link(o + 2, s), this.trianglesLen += 3, o;
}
}
function jF(t, e) {
const r = t / (Math.abs(t) + Math.abs(e));
return (e > 0 ? 3 - r : 1 + r) / 4;
}
function ed(t, e, r, n) {
const i = t - r, a = e - n;
return i * i + a * a;
}
function $F(t, e, r, n, i, a, s, o) {
const l = t - s, u = e - o, h = r - s, d = n - o, f = i - s, p = a - o, m = l * l + u * u, _ = h * h + d * d, y = f * f + p * p;
return l * (d * y - _ * p) - u * (h * y - _ * f) + m * (h * p - d * f) < 0;
}
function XF(t, e, r, n, i, a) {
const s = r - t, o = n - e, l = i - t, u = a - e, h = s * s + o * o, d = l * l + u * u, f = 0.5 / (s * u - o * l), p = (u * h - o * d) * f, m = (s * d - l * h) * f;
return p * p + m * m;
}
function KF(t, e, r, n, i, a) {
const s = r - t, o = n - e, l = i - t, u = a - e, h = s * s + o * o, d = l * l + u * u, f = 0.5 / (s * u - o * l), p = t + (u * h - o * d) * f, m = e + (s * d - l * h) * f;
return { x: p, y: m };
}
function bo(t, e, r, n) {
if (n - r <= 20)
for (let i = r + 1; i <= n; i++) {
const a = t[i], s = e[a];
let o = i - 1;
for (; o >= r && e[t[o]] > s; )
t[o + 1] = t[o--];
t[o + 1] = a;
}
else {
const i = r + n >> 1;
let a = r + 1, s = n;
Tl(t, i, a), e[t[r]] > e[t[n]] && Tl(t, r, n), e[t[a]] > e[t[n]] && Tl(t, a, n), e[t[r]] > e[t[a]] && Tl(t, r, a);
const o = t[a], l = e[o];
for (; ; ) {
do
a++;
while (e[t[a]] < l);
do
s--;
while (e[t[s]] > l);
if (s < a)
break;
Tl(t, a, s);
}
t[r + 1] = t[s], t[s] = o, n - a + 1 >= s - r ? (bo(t, e, a, n), bo(t, e, r, s - 1)) : (bo(t, e, r, s - 1), bo(t, e, a, n));
}
}
function Tl(t, e, r) {
const n = t[e];
t[e] = t[r], t[r] = n;
}
function ZF(t) {
return t[0];
}
function QF(t) {
return t[1];
}
const C5 = 1e-6;
class ks {
constructor() {
this._x0 = this._y0 = this._x1 = this._y1 = null, this._ = "";
}
moveTo(e, r) {
this._ += `M${this._x0 = this._x1 = +e},${this._y0 = this._y1 = +r}`;
}
closePath() {
this._x1 !== null && (this._x1 = this._x0, this._y1 = this._y0, this._ += "Z");
}
lineTo(e, r) {
this._ += `L${this._x1 = +e},${this._y1 = +r}`;
}
arc(e, r, n) {
e = +e, r = +r, n = +n;
const i = e + n, a = r;
if (n < 0)
throw new Error("negative radius");
this._x1 === null ? this._ += `M${i},${a}` : (Math.abs(this._x1 - i) > C5 || Math.abs(this._y1 - a) > C5) && (this._ += "L" + i + "," + a), n && (this._ += `A${n},${n},0,1,1,${e - n},${r}A${n},${n},0,1,1,${this._x1 = i},${this._y1 = a}`);
}
rect(e, r, n, i) {
this._ += `M${this._x0 = this._x1 = +e},${this._y0 = this._y1 = +r}h${+n}v${+i}h${-n}Z`;
}
value() {
return this._ || null;
}
}
class Vm {
constructor() {
this._ = [];
}
moveTo(e, r) {
this._.push([e, r]);
}
closePath() {
this._.push(this._[0].slice());
}
lineTo(e, r) {
this._.push([e, r]);
}
value() {
return this._.length ? this._ : null;
}
}
class mT {
constructor(e, [r, n, i, a] = [0, 0, 960, 500]) {
if (!((i = +i) >= (r = +r)) || !((a = +a) >= (n = +n)))
throw new Error("invalid bounds");
this.delaunay = e, this._circumcenters = new Float64Array(e.points.length * 2), this.vectors = new Float64Array(e.points.length * 2), this.xmax = i, this.xmin = r, this.ymax = a, this.ymin = n, this._init();
}
update() {
return this.delaunay.update(), this._init(), this;
}
_init() {
const { delaunay: { points: e, hull: r, triangles: n }, vectors: i } = this, a = this.circumcenters = this._circumcenters.subarray(0, n.length / 3 * 2);
for (let p = 0, m = 0, _ = n.length, y, b; p < _; p += 3, m += 2) {
const x = n[p] * 2, k = n[p + 1] * 2, T = n[p + 2] * 2, C = e[x], M = e[x + 1], S = e[k], R = e[k + 1], A = e[T], L = e[T + 1], v = S - C, B = R - M, w = A - C, D = L - M, N = (v * D - B * w) * 2;
if (Math.abs(N) < 1e-9) {
let z = 1e9;
const X = n[0] * 2;
z *= Math.sign((e[X] - C) * D - (e[X + 1] - M) * w), y = (C + A) / 2 - z * D, b = (M + L) / 2 + z * w;
} else {
const z = 1 / N, X = v * v + B * B, ct = w * w + D * D;
y = C + (D * X - B * ct) * z, b = M + (v * ct - w * X) * z;
}
a[m] = y, a[m + 1] = b;
}
let s = r[r.length - 1], o, l = s * 4, u, h = e[2 * s], d, f = e[2 * s + 1];
i.fill(0);
for (let p = 0; p < r.length; ++p)
s = r[p], o = l, u = h, d = f, l = s * 4, h = e[2 * s], f = e[2 * s + 1], i[o + 2] = i[l] = d - f, i[o + 3] = i[l + 1] = h - u;
}
render(e) {
const r = e == null ? e = new ks() : void 0, { delaunay: { halfedges: n, inedges: i, hull: a }, circumcenters: s, vectors: o } = this;
if (a.length <= 1)
return null;
for (let h = 0, d = n.length; h < d; ++h) {
const f = n[h];
if (f < h)
continue;
const p = Math.floor(h / 3) * 2, m = Math.floor(f / 3) * 2, _ = s[p], y = s[p + 1], b = s[m], x = s[m + 1];
this._renderSegment(_, y, b, x, e);
}
let l, u = a[a.length - 1];
for (let h = 0; h < a.length; ++h) {
l = u, u = a[h];
const d = Math.floor(i[u] / 3) * 2, f = s[d], p = s[d + 1], m = l * 4, _ = this._project(f, p, o[m + 2], o[m + 3]);
_ && this._renderSegment(f, p, _[0], _[1], e);
}
return r && r.value();
}
renderBounds(e) {
const r = e == null ? e = new ks() : void 0;
return e.rect(this.xmin, this.ymin, this.xmax - this.xmin, this.ymax - this.ymin), r && r.value();
}
renderCell(e, r) {
const n = r == null ? r = new ks() : void 0, i = this._clip(e);
if (i === null || !i.length)
return;
r.moveTo(i[0], i[1]);
let a = i.length;
for (; i[0] === i[a - 2] && i[1] === i[a - 1] && a > 1; )
a -= 2;
for (let s = 2; s < a; s += 2)
(i[s] !== i[s - 2] || i[s + 1] !== i[s - 1]) && r.lineTo(i[s], i[s + 1]);
return r.closePath(), n && n.value();
}
*cellPolygons() {
const { delaunay: { points: e } } = this;
for (let r = 0, n = e.length / 2; r < n; ++r) {
const i = this.cellPolygon(r);
i && (i.index = r, yield i);
}
}
cellPolygon(e) {
const r = new Vm();
return this.renderCell(e, r), r.value();
}
_renderSegment(e, r, n, i, a) {
let s;
const o = this._regioncode(e, r), l = this._regioncode(n, i);
o === 0 && l === 0 ? (a.moveTo(e, r), a.lineTo(n, i)) : (s = this._clipSegment(e, r, n, i, o, l)) && (a.moveTo(s[0], s[1]), a.lineTo(s[2], s[3]));
}
contains(e, r, n) {
return r = +r, r !== r || (n = +n, n !== n) ? !1 : this.delaunay._step(e, r, n) === e;
}
*neighbors(e) {
const r = this._clip(e);
if (r)
for (const n of this.delaunay.neighbors(e)) {
const i = this._clip(n);
if (i) {
t:
for (let a = 0, s = r.length; a < s; a += 2)
for (let o = 0, l = i.length; o < l; o += 2)
if (r[a] == i[o] && r[a + 1] == i[o + 1] && r[(a + 2) % s] == i[(o + l - 2) % l] && r[(a + 3) % s] == i[(o + l - 1) % l]) {
yield n;
break t;
}
}
}
}
_cell(e) {
const { circumcenters: r, delaunay: { inedges: n, halfedges: i, triangles: a } } = this, s = n[e];
if (s === -1)
return null;
const o = [];
let l = s;
do {
const u = Math.floor(l / 3);
if (o.push(r[u * 2], r[u * 2 + 1]), l = l % 3 === 2 ? l - 2 : l + 1, a[l] !== e)
break;
l = i[l];
} while (l !== s && l !== -1);
return o;
}
_clip(e) {
if (e === 0 && this.delaunay.hull.length === 1)
return [this.xmax, this.ymin, this.xmax, this.ymax, this.xmin, this.ymax, this.xmin, this.ymin];
const r = this._cell(e);
if (r === null)
return null;
const { vectors: n } = this, i = e * 4;
return n[i] || n[i + 1] ? this._clipInfinite(e, r, n[i], n[i + 1], n[i + 2], n[i + 3]) : this._clipFinite(e, r);
}
_clipFinite(e, r) {
const n = r.length;
let i = null, a, s, o = r[n - 2], l = r[n - 1], u, h = this._regioncode(o, l), d, f = 0;
for (let p = 0; p < n; p += 2)
if (a = o, s = l, o = r[p], l = r[p + 1], u = h, h = this._regioncode(o, l), u === 0 && h === 0)
d = f, f = 0, i ? i.push(o, l) : i = [o, l];
else {
let m, _, y, b, x;
if (u === 0) {
if ((m = this._clipSegment(a, s, o, l, u, h)) === null)
continue;
[_, y, b, x] = m;
} else {
if ((m = this._clipSegment(o, l, a, s, h, u)) === null)
continue;
[b, x, _, y] = m, d = f, f = this._edgecode(_, y), d && f && this._edge(e, d, f, i, i.length), i ? i.push(_, y) : i = [_, y];
}
d = f, f = this._edgecode(b, x), d && f && this._edge(e, d, f, i, i.length), i ? i.push(b, x) : i = [b, x];
}
if (i)
d = f, f = this._edgecode(i[0], i[1]), d && f && this._edge(e, d, f, i, i.length);
else if (this.contains(e, (this.xmin + this.xmax) / 2, (this.ymin + this.ymax) / 2))
return [this.xmax, this.ymin, this.xmax, this.ymax, this.xmin, this.ymax, this.xmin, this.ymin];
return i;
}
_clipSegment(e, r, n, i, a, s) {
for (; ; ) {
if (a === 0 && s === 0)
return [e, r, n, i];
if (a & s)
return null;
let o, l, u = a || s;
u & 8 ? (o = e + (n - e) * (this.ymax - r) / (i - r), l = this.ymax) : u & 4 ? (o = e + (n - e) * (this.ymin - r) / (i - r), l = this.ymin) : u & 2 ? (l = r + (i - r) * (this.xmax - e) / (n - e), o = this.xmax) : (l = r + (i - r) * (this.xmin - e) / (n - e), o = this.xmin), a ? (e = o, r = l, a = this._regioncode(e, r)) : (n = o, i = l, s = this._regioncode(n, i));
}
}
_clipInfinite(e, r, n, i, a, s) {
let o = Array.from(r), l;
if ((l = this._project(o[0], o[1], n, i)) && o.unshift(l[0], l[1]), (l = this._project(o[o.length - 2], o[o.length - 1], a, s)) && o.push(l[0], l[1]), o = this._clipFinite(e, o))
for (let u = 0, h = o.length, d, f = this._edgecode(o[h - 2], o[h - 1]); u < h; u += 2)
d = f, f = this._edgecode(o[u], o[u + 1]), d && f && (u = this._edge(e, d, f, o, u), h = o.length);
else
this.contains(e, (this.xmin + this.xmax) / 2, (this.ymin + this.ymax) / 2) && (o = [this.xmin, this.ymin, this.xmax, this.ymin, this.xmax, this.ymax, this.xmin, this.ymax]);
return o;
}
_edge(e, r, n, i, a) {
for (; r !== n; ) {
let s, o;
switch (r) {
case 5:
r = 4;
continue;
case 4:
r = 6, s = this.xmax, o = this.ymin;
break;
case 6:
r = 2;
continue;
case 2:
r = 10, s = this.xmax, o = this.ymax;
break;
case 10:
r = 8;
continue;
case 8:
r = 9, s = this.xmin, o = this.ymax;
break;
case 9:
r = 1;
continue;
case 1:
r = 5, s = this.xmin, o = this.ymin;
break;
}
(i[a] !== s || i[a + 1] !== o) && this.contains(e, s, o) && (i.splice(a, 0, s, o), a += 2);
}
if (i.length > 4)
for (let s = 0; s < i.length; s += 2) {
const o = (s + 2) % i.length, l = (s + 4) % i.length;
(i[s] === i[o] && i[o] === i[l] || i[s + 1] === i[o + 1] && i[o + 1] === i[l + 1]) && (i.splice(o, 2), s -= 2);
}
return a;
}
_project(e, r, n, i) {
let a = 1 / 0, s, o, l;
if (i < 0) {
if (r <= this.ymin)
return null;
(s = (this.ymin - r) / i) < a && (l = this.ymin, o = e + (a = s) * n);
} else if (i > 0) {
if (r >= this.ymax)
return null;
(s = (this.ymax - r) / i) < a && (l = this.ymax, o = e + (a = s) * n);
}
if (n > 0) {
if (e >= this.xmax)
return null;
(s = (this.xmax - e) / n) < a && (o = this.xmax, l = r + (a = s) * i);
} else if (n < 0) {
if (e <= this.xmin)
return null;
(s = (this.xmin - e) / n) < a && (o = this.xmin, l = r + (a = s) * i);
}
return [o, l];
}
_edgecode(e, r) {
return (e === this.xmin ? 1 : e === this.xmax ? 2 : 0) | (r === this.ymin ? 4 : r === this.ymax ? 8 : 0);
}
_regioncode(e, r) {
return (e < this.xmin ? 1 : e > this.xmax ? 2 : 0) | (r < this.ymin ? 4 : r > this.ymax ? 8 : 0);
}
}
const JF = 2 * Math.PI, fo = Math.pow;
function tP(t) {
return t[0];
}
function eP(t) {
return t[1];
}
function rP(t) {
const { triangles: e, coords: r } = t;
for (let n = 0; n < e.length; n += 3) {
const i = 2 * e[n], a = 2 * e[n + 1], s = 2 * e[n + 2];
if ((r[s] - r[i]) * (r[a + 1] - r[i + 1]) - (r[a] - r[i]) * (r[s + 1] - r[i + 1]) > 1e-10)
return !1;
}
return !0;
}
function nP(t, e, r) {
return [t + Math.sin(t + e) * r, e + Math.cos(t - e) * r];
}
class v3 {
static from(e, r = tP, n = eP, i) {
return new v3("length" in e ? iP(e, r, n, i) : Float64Array.from(aP(e, r, n, i)));
}
constructor(e) {
this._delaunator = new Xh(e), this.inedges = new Int32Array(e.length / 2), this._hullIndex = new Int32Array(e.length / 2), this.points = this._delaunator.coords, this._init();
}
update() {
return this._delaunator.update(), this._init(), this;
}
_init() {
const e = this._delaunator, r = this.points;
if (e.hull && e.hull.length > 2 && rP(e)) {
this.collinear = Int32Array.from({ length: r.length / 2 }, (f, p) => p).sort((f, p) => r[2 * f] - r[2 * p] || r[2 * f + 1] - r[2 * p + 1]);
const l = this.collinear[0], u = this.collinear[this.collinear.length - 1], h = [r[2 * l], r[2 * l + 1], r[2 * u], r[2 * u + 1]], d = 1e-8 * Math.hypot(h[3] - h[1], h[2] - h[0]);
for (let f = 0, p = r.length / 2; f < p; ++f) {
const m = nP(r[2 * f], r[2 * f + 1], d);
r[2 * f] = m[0], r[2 * f + 1] = m[1];
}
this._delaunator = new Xh(r);
} else
delete this.collinear;
const n = this.halfedges = this._delaunator.halfedges, i = this.hull = this._delaunator.hull, a = this.triangles = this._delaunator.triangles, s = this.inedges.fill(-1), o = this._hullIndex.fill(-1);
for (let l = 0, u = n.length; l < u; ++l) {
const h = a[l % 3 === 2 ? l - 2 : l + 1];
(n[l] === -1 || s[h] === -1) && (s[h] = l);
}
for (let l = 0, u = i.length; l < u; ++l)
o[i[l]] = l;
i.length <= 2 && i.length > 0 && (this.triangles = new Int32Array(3).fill(-1), this.halfedges = new Int32Array(3).fill(-1), this.triangles[0] = i[0], s[i[0]] = 1, i.length === 2 && (s[i[1]] = 0, this.triangles[1] = i[1], this.triangles[2] = i[1]));
}
voronoi(e) {
return new mT(this, e);
}
*neighbors(e) {
const { inedges: r, hull: n, _hullIndex: i, halfedges: a, triangles: s, collinear: o } = this;
if (o) {
const d = o.indexOf(e);
d > 0 && (yield o[d - 1]), d < o.length - 1 && (yield o[d + 1]);
return;
}
const l = r[e];
if (l === -1)
return;
let u = l, h = -1;
do {
if (yield h = s[u], u = u % 3 === 2 ? u - 2 : u + 1, s[u] !== e)
return;
if (u = a[u], u === -1) {
const d = n[(i[e] + 1) % n.length];
d !== h && (yield d);
return;
}
} while (u !== l);
}
find(e, r, n = 0) {
if (e = +e, e !== e || (r = +r, r !== r))
return -1;
const i = n;
let a;
for (; (a = this._step(n, e, r)) >= 0 && a !== n && a !== i; )
n = a;
return a;
}
_step(e, r, n) {
const { inedges: i, hull: a, _hullIndex: s, halfedges: o, triangles: l, points: u } = this;
if (i[e] === -1 || !u.length)
return (e + 1) % (u.length >> 1);
let h = e, d = fo(r - u[e * 2], 2) + fo(n - u[e * 2 + 1], 2);
const f = i[e];
let p = f;
do {
let m = l[p];
const _ = fo(r - u[m * 2], 2) + fo(n - u[m * 2 + 1], 2);
if (_ < d && (d = _, h = m), p = p % 3 === 2 ? p - 2 : p + 1, l[p] !== e)
break;
if (p = o[p], p === -1) {
if (p = a[(s[e] + 1) % a.length], p !== m && fo(r - u[p * 2], 2) + fo(n - u[p * 2 + 1], 2) < d)
return p;
break;
}
} while (p !== f);
return h;
}
render(e) {
const r = e == null ? e = new ks() : void 0, { points: n, halfedges: i, triangles: a } = this;
for (let s = 0, o = i.length; s < o; ++s) {
const l = i[s];
if (l < s)
continue;
const u = a[s] * 2, h = a[l] * 2;
e.moveTo(n[u], n[u + 1]), e.lineTo(n[h], n[h + 1]);
}
return this.renderHull(e), r && r.value();
}
renderPoints(e, r) {
r === void 0 && (!e || typeof e.moveTo != "function") && (r = e, e = null), r = r == null ? 2 : +r;
const n = e == null ? e = new ks() : void 0, { points: i } = this;
for (let a = 0, s = i.length; a < s; a += 2) {
const o = i[a], l = i[a + 1];
e.moveTo(o + r, l), e.arc(o, l, r, 0, JF);
}
return n && n.value();
}
renderHull(e) {
const r = e == null ? e = new ks() : void 0, { hull: n, points: i } = this, a = n[0] * 2, s = n.length;
e.moveTo(i[a], i[a + 1]);
for (let o = 1; o < s; ++o) {
const l = 2 * n[o];
e.lineTo(i[l], i[l + 1]);
}
return e.closePath(), r && r.value();
}
hullPolygon() {
const e = new Vm();
return this.renderHull(e), e.value();
}
renderTriangle(e, r) {
const n = r == null ? r = new ks() : void 0, { points: i, triangles: a } = this, s = a[e *= 3] * 2, o = a[e + 1] * 2, l = a[e + 2] * 2;
return r.moveTo(i[s], i[s + 1]), r.lineTo(i[o], i[o + 1]), r.lineTo(i[l], i[l + 1]), r.closePath(), n && n.value();
}
*trianglePolygons() {
const { triangles: e } = this;
for (let r = 0, n = e.length / 3; r < n; ++r)
yield this.trianglePolygon(r);
}
trianglePolygon(e) {
const r = new Vm();
return this.renderTriangle(e, r), r.value();
}
}
function iP(t, e, r, n) {
const i = t.length, a = new Float64Array(i * 2);
for (let s = 0; s < i; ++s) {
const o = t[s];
a[s * 2] = e.call(n, o, s, t), a[s * 2 + 1] = r.call(n, o, s, t);
}
return a;
}
function* aP(t, e, r, n) {
let i = 0;
for (const a of t)
yield e.call(n, a, i, t), yield r.call(n, a, i, t), ++i;
}
var S5 = {}, rd = {}, nd = 34, El = 10, id = 13;
function bT(t) {
return new Function("d", "return {" + t.map(function(e, r) {
return JSON.stringify(e) + ": d[" + r + '] || ""';
}).join(",") + "}");
}
function sP(t, e) {
var r = bT(t);
return function(n, i) {
return e(r(n), i, t);
};
}
function A5(t) {
var e = /* @__PURE__ */ Object.create(null), r = [];
return t.forEach(function(n) {
for (var i in n)
i in e || r.push(e[i] = i);
}), r;
}
function hn(t, e) {
var r = t + "", n = r.length;
return n < e ? new Array(e - n + 1).join(0) + r : r;
}
function oP(t) {
return t < 0 ? "-" + hn(-t, 6) : t > 9999 ? "+" + hn(t, 6) : hn(t, 4);
}
function lP(t) {
var e = t.getUTCHours(), r = t.getUTCMinutes(), n = t.getUTCSeconds(), i = t.getUTCMilliseconds();
return isNaN(t) ? "Invalid Date" : oP(t.getUTCFullYear()) + "-" + hn(t.getUTCMonth() + 1, 2) + "-" + hn(t.getUTCDate(), 2) + (i ? "T" + hn(e, 2) + ":" + hn(r, 2) + ":" + hn(n, 2) + "." + hn(i, 3) + "Z" : n ? "T" + hn(e, 2) + ":" + hn(r, 2) + ":" + hn(n, 2) + "Z" : r || e ? "T" + hn(e, 2) + ":" + hn(r, 2) + "Z" : "");
}
function E1(t) {
var e = new RegExp('["' + t + `
\r]`), r = t.charCodeAt(0);
function n(d, f) {
var p, m, _ = i(d, function(y, b) {
if (p)
return p(y, b - 1);
m = y, p = f ? sP(y, f) : bT(y);
});
return _.columns = m || [], _;
}
function i(d, f) {
var p = [], m = d.length, _ = 0, y = 0, b, x = m <= 0, k = !1;
d.charCodeAt(m - 1) === El && --m, d.charCodeAt(m - 1) === id && --m;
function T() {
if (x)
return rd;
if (k)
return k = !1, S5;
var M, S = _, R;
if (d.charCodeAt(S) === nd) {
for (; _++ < m && d.charCodeAt(_) !== nd || d.charCodeAt(++_) === nd; )
;
return (M = _) >= m ? x = !0 : (R = d.charCodeAt(_++)) === El ? k = !0 : R === id && (k = !0, d.charCodeAt(_) === El && ++_), d.slice(S + 1, M - 1).replace(/""/g, '"');
}
for (; _ < m; ) {
if ((R = d.charCodeAt(M = _++)) === El)
k = !0;
else if (R === id)
k = !0, d.charCodeAt(_) === El && ++_;
else if (R !== r)
continue;
return d.slice(S, M);
}
return x = !0, d.slice(S, m);
}
for (; (b = T()) !== rd; ) {
for (var C = []; b !== S5 && b !== rd; )
C.push(b), b = T();
f && (C = f(C, y++)) == null || p.push(C);
}
return p;
}
function a(d, f) {
return d.map(function(p) {
return f.map(function(m) {
return h(p[m]);
}).join(t);
});
}
function s(d, f) {
return f == null && (f = A5(d)), [f.map(h).join(t)].concat(a(d, f)).join(`
`);
}
function o(d, f) {
return f == null && (f = A5(d)), a(d, f).join(`
`);
}
function l(d) {
return d.map(u).join(`
`);
}
function u(d) {
return d.map(h).join(t);
}
function h(d) {
return d == null ? "" : d instanceof Date ? lP(d) : e.test(d += "") ? '"' + d.replace(/"/g, '""') + '"' : d;
}
return {
parse: n,
parseRows: i,
format: s,
formatBody: o,
formatRows: l,
formatRow: u,
formatValue: h
};
}
var Gs = E1(","), _T = Gs.parse, cP = Gs.parseRows, uP = Gs.format, hP = Gs.formatBody, fP = Gs.formatRows, dP = Gs.formatRow, pP = Gs.formatValue, js = E1(" "), vT = js.parse, gP = js.parseRows, yP = js.format, mP = js.formatBody, bP = js.formatRows, _P = js.formatRow, vP = js.formatValue;
function xP(t) {
for (var e in t) {
var r = t[e].trim(), n, i;
if (!r)
r = null;
else if (r === "true")
r = !0;
else if (r === "false")
r = !1;
else if (r === "NaN")
r = NaN;
else if (!isNaN(n = +r))
r = n;
else if (i = r.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/))
kP && !!i[4] && !i[7] && (r = r.replace(/-/g, "/").replace(/T/, " ")), r = new Date(r);
else
continue;
t[e] = r;
}
return t;
}
const kP = new Date("2019-01-01T00:00").getHours() || new Date("2019-07-01T00:00").getHours();
function wP(t) {
if (!t.ok)
throw new Error(t.status + " " + t.statusText);
return t.blob();
}
function TP(t, e) {
return fetch(t, e).then(wP);
}
function EP(t) {
if (!t.ok)
throw new Error(t.status + " " + t.statusText);
return t.arrayBuffer();
}
function CP(t, e) {
return fetch(t, e).then(EP);
}
function SP(t) {
if (!t.ok)
throw new Error(t.status + " " + t.statusText);
return t.text();
}
function C1(t, e) {
return fetch(t, e).then(SP);
}
function xT(t) {
return function(e, r, n) {
return arguments.length === 2 && typeof r == "function" && (n = r, r = void 0), C1(e, r).then(function(i) {
return t(i, n);
});
};
}
function AP(t, e, r, n) {
arguments.length === 3 && typeof r == "function" && (n = r, r = void 0);
var i = E1(t);
return C1(e, r).then(function(a) {
return i.parse(a, n);
});
}
var MP = xT(_T), LP = xT(vT);
function RP(t, e) {
return new Promise(function(r, n) {
var i = new Image();
for (var a in e)
i[a] = e[a];
i.onerror = n, i.onload = function() {
r(i);
}, i.src = t;
});
}
function IP(t) {
if (!t.ok)
throw new Error(t.status + " " + t.statusText);
if (!(t.status === 204 || t.status === 205))
return t.json();
}
function NP(t, e) {
return fetch(t, e).then(IP);
}
function x3(t) {
return (e, r) => C1(e, r).then((n) => new DOMParser().parseFromString(n, t));
}
const BP = x3("application/xml");
var DP = x3("text/html"), OP = x3("image/svg+xml");
function FP(t, e) {
var r, n = 1;
t == null && (t = 0), e == null && (e = 0);
function i() {
var a, s = r.length, o, l = 0, u = 0;
for (a = 0; a < s; ++a)
o = r[a], l += o.x, u += o.y;
for (l = (l / s - t) * n, u = (u / s - e) * n, a = 0; a < s; ++a)
o = r[a], o.x -= l, o.y -= u;
}
return i.initialize = function(a) {
r = a;
}, i.x = function(a) {
return arguments.length ? (t = +a, i) : t;
}, i.y = function(a) {
return arguments.length ? (e = +a, i) : e;
}, i.strength = function(a) {
return arguments.length ? (n = +a, i) : n;
}, i;
}
function PP(t) {
const e = +this._x.call(null, t), r = +this._y.call(null, t);
return kT(this.cover(e, r), e, r, t);
}
function kT(t, e, r, n) {
if (isNaN(e) || isNaN(r))
return t;
var i, a = t._root, s = { data: n }, o = t._x0, l = t._y0, u = t._x1, h = t._y1, d, f, p, m, _, y, b, x;
if (!a)
return t._root = s, t;
for (; a.length; )
if ((_ = e >= (d = (o + u) / 2)) ? o = d : u = d, (y = r >= (f = (l + h) / 2)) ? l = f : h = f, i = a, !(a = a[b = y << 1 | _]))
return i[b] = s, t;
if (p = +t._x.call(null, a.data), m = +t._y.call(null, a.data), e === p && r === m)
return s.next = a, i ? i[b] = s : t._root = s, t;
do
i = i ? i[b] = new Array(4) : t._root = new Array(4), (_ = e >= (d = (o + u) / 2)) ? o = d : u = d, (y = r >= (f = (l + h) / 2)) ? l = f : h = f;
while ((b = y << 1 | _) === (x = (m >= f) << 1 | p >= d));
return i[x] = a, i[b] = s, t;
}
function qP(t) {
var e, r, n = t.length, i, a, s = new Array(n), o = new Array(n), l = 1 / 0, u = 1 / 0, h = -1 / 0, d = -1 / 0;
for (r = 0; r < n; ++r)
isNaN(i = +this._x.call(null, e = t[r])) || isNaN(a = +this._y.call(null, e)) || (s[r] = i, o[r] = a, i < l && (l = i), i > h && (h = i), a < u && (u = a), a > d && (d = a));
if (l > h || u > d)
return this;
for (this.cover(l, u).cover(h, d), r = 0; r < n; ++r)
kT(this, s[r], o[r], t[r]);
return this;
}
function VP(t, e) {
if (isNaN(t = +t) || isNaN(e = +e))
return this;
var r = this._x0, n = this._y0, i = this._x1, a = this._y1;
if (isNaN(r))
i = (r = Math.floor(t)) + 1, a = (n = Math.floor(e)) + 1;
else {
for (var s = i - r || 1, o = this._root, l, u; r > t || t >= i || n > e || e >= a; )
switch (u = (e < n) << 1 | t < r, l = new Array(4), l[u] = o, o = l, s *= 2, u) {
case 0:
i = r + s, a = n + s;
break;
case 1:
r = i - s, a = n + s;
break;
case 2:
i = r + s, n = a - s;
break;
case 3:
r = i - s, n = a - s;
break;
}
this._root && this._root.length && (this._root = o);
}
return this._x0 = r, this._y0 = n, this._x1 = i, this._y1 = a, this;
}
function zP() {
var t = [];
return this.visit(function(e) {
if (!e.length)
do
t.push(e.data);
while (e = e.next);
}), t;
}
function YP(t) {
return arguments.length ? this.cover(+t[0][0], +t[0][1]).cover(+t[1][0], +t[1][1]) : isNaN(this._x0) ? void 0 : [[this._x0, this._y0], [this._x1, this._y1]];
}
function Jr(t, e, r, n, i) {
this.node = t, this.x0 = e, this.y0 = r, this.x1 = n, this.y1 = i;
}
function UP(t, e, r) {
var n, i = this._x0, a = this._y0, s, o, l, u, h = this._x1, d = this._y1, f = [], p = this._root, m, _;
for (p && f.push(new Jr(p, i, a, h, d)), r == null ? r = 1 / 0 : (i = t - r, a = e - r, h = t + r, d = e + r, r *= r); m = f.pop(); )
if (!(!(p = m.node) || (s = m.x0) > h || (o = m.y0) > d || (l = m.x1) < i || (u = m.y1) < a))
if (p.length) {
var y = (s + l) / 2, b = (o + u) / 2;
f.push(
new Jr(p[3], y, b, l, u),
new Jr(p[2], s, b, y, u),
new Jr(p[1], y, o, l, b),
new Jr(p[0], s, o, y, b)
), (_ = (e >= b) << 1 | t >= y) && (m = f[f.length - 1], f[f.length - 1] = f[f.length - 1 - _], f[f.length - 1 - _] = m);
} else {
var x = t - +this._x.call(null, p.data), k = e - +this._y.call(null, p.data), T = x * x + k * k;
if (T < r) {
var C = Math.sqrt(r = T);
i = t - C, a = e - C, h = t + C, d = e + C, n = p.data;
}
}
return n;
}
function WP(t) {
if (isNaN(h = +this._x.call(null, t)) || isNaN(d = +this._y.call(null, t)))
return this;
var e, r = this._root, n, i, a, s = this._x0, o = this._y0, l = this._x1, u = this._y1, h, d, f, p, m, _, y, b;
if (!r)
return this;
if (r.length)
for (; ; ) {
if ((m = h >= (f = (s + l) / 2)) ? s = f : l = f, (_ = d >= (p = (o + u) / 2)) ? o = p : u = p, e = r, !(r = r[y = _ << 1 | m]))
return this;
if (!r.length)
break;
(e[y + 1 & 3] || e[y + 2 & 3] || e[y + 3 & 3]) && (n = e, b = y);
}
for (; r.data !== t; )
if (i = r, !(r = r.next))
return this;
return (a = r.next) && delete r.next, i ? (a ? i.next = a : delete i.next, this) : e ? (a ? e[y] = a : delete e[y], (r = e[0] || e[1] || e[2] || e[3]) && r === (e[3] || e[2] || e[1] || e[0]) && !r.length && (n ? n[b] = r : this._root = r), this) : (this._root = a, this);
}
function HP(t) {
for (var e = 0, r = t.length; e < r; ++e)
this.remove(t[e]);
return this;
}
function GP() {
return this._root;
}
function jP() {
var t = 0;
return this.visit(function(e) {
if (!e.length)
do
++t;
while (e = e.next);
}), t;
}
function $P(t) {
var e = [], r, n = this._root, i, a, s, o, l;
for (n && e.push(new Jr(n, this._x0, this._y0, this._x1, this._y1)); r = e.pop(); )
if (!t(n = r.node, a = r.x0, s = r.y0, o = r.x1, l = r.y1) && n.length) {
var u = (a + o) / 2, h = (s + l) / 2;
(i = n[3]) && e.push(new Jr(i, u, h, o, l)), (i = n[2]) && e.push(new Jr(i, a, h, u, l)), (i = n[1]) && e.push(new Jr(i, u, s, o, h)), (i = n[0]) && e.push(new Jr(i, a, s, u, h));
}
return this;
}
function XP(t) {
var e = [], r = [], n;
for (this._root && e.push(new Jr(this._root, this._x0, this._y0, this._x1, this._y1)); n = e.pop(); ) {
var i = n.node;
if (i.length) {
var a, s = n.x0, o = n.y0, l = n.x1, u = n.y1, h = (s + l) / 2, d = (o + u) / 2;
(a = i[0]) && e.push(new Jr(a, s, o, h, d)), (a = i[1]) && e.push(new Jr(a, h, o, l, d)), (a = i[2]) && e.push(new Jr(a, s, d, h, u)), (a = i[3]) && e.push(new Jr(a, h, d, l, u));
}
r.push(n);
}
for (; n = r.pop(); )
t(n.node, n.x0, n.y0, n.x1, n.y1);
return this;
}
function KP(t) {
return t[0];
}
function ZP(t) {
return arguments.length ? (this._x = t, this) : this._x;
}
function QP(t) {
return t[1];
}
function JP(t) {
return arguments.length ? (this._y = t, this) : this._y;
}
function S1(t, e, r) {
var n = new k3(e == null ? KP : e, r == null ? QP : r, NaN, NaN, NaN, NaN);
return t == null ? n : n.addAll(t);
}
function k3(t, e, r, n, i, a) {
this._x = t, this._y = e, this._x0 = r, this._y0 = n, this._x1 = i, this._y1 = a, this._root = void 0;
}
function M5(t) {
for (var e = { data: t.data }, r = e; t = t.next; )
r = r.next = { data: t.data };
return e;
}
var un = S1.prototype = k3.prototype;
un.copy = function() {
var t = new k3(this._x, this._y, this._x0, this._y0, this._x1, this._y1), e = this._root, r, n;
if (!e)
return t;
if (!e.length)
return t._root = M5(e), t;
for (r = [{ source: e, target: t._root = new Array(4) }]; e = r.pop(); )
for (var i = 0; i < 4; ++i)
(n = e.source[i]) && (n.length ? r.push({ source: n, target: e.target[i] = new Array(4) }) : e.target[i] = M5(n));
return t;
};
un.add = PP;
un.addAll = qP;
un.cover = VP;
un.data = zP;
un.extent = YP;
un.find = UP;
un.remove = WP;
un.removeAll = HP;
un.root = GP;
un.size = jP;
un.visit = $P;
un.visitAfter = XP;
un.x = ZP;
un.y = JP;
function kr(t) {
return function() {
return t;
};
}
function Oa(t) {
return (t() - 0.5) * 1e-6;
}
function tq(t) {
return t.x + t.vx;
}
function eq(t) {
return t.y + t.vy;
}
function rq(t) {
var e, r, n, i = 1, a = 1;
typeof t != "function" && (t = kr(t == null ? 1 : +t));
function s() {
for (var u, h = e.length, d, f, p, m, _, y, b = 0; b < a; ++b)
for (d = S1(e, tq, eq).visitAfter(o), u = 0; u < h; ++u)
f = e[u], _ = r[f.index], y = _ * _, p = f.x + f.vx, m = f.y + f.vy, d.visit(x);
function x(k, T, C, M, S) {
var R = k.data, A = k.r, L = _ + A;
if (R) {
if (R.index > f.index) {
var v = p - R.x - R.vx, B = m - R.y - R.vy, w = v * v + B * B;
w < L * L && (v === 0 && (v = Oa(n), w += v * v), B === 0 && (B = Oa(n), w += B * B), w = (L - (w = Math.sqrt(w))) / w * i, f.vx += (v *= w) * (L = (A *= A) / (y + A)), f.vy += (B *= w) * L, R.vx -= v * (L = 1 - L), R.vy -= B * L);
}
return;
}
return T > p + L || M < p - L || C > m + L || S < m - L;
}
}
function o(u) {
if (u.data)
return u.r = r[u.data.index];
for (var h = u.r = 0; h < 4; ++h)
u[h] && u[h].r > u.r && (u.r = u[h].r);
}
function l() {
if (!!e) {
var u, h = e.length, d;
for (r = new Array(h), u = 0; u < h; ++u)
d = e[u], r[d.index] = +t(d, u, e);
}
}
return s.initialize = function(u, h) {
e = u, n = h, l();
}, s.iterations = function(u) {
return arguments.length ? (a = +u, s) : a;
}, s.strength = function(u) {
return arguments.length ? (i = +u, s) : i;
}, s.radius = function(u) {
return arguments.length ? (t = typeof u == "function" ? u : kr(+u), l(), s) : t;
}, s;
}
function nq(t) {
return t.index;
}
function L5(t, e) {
var r = t.get(e);
if (!r)
throw new Error("node not found: " + e);
return r;
}
function iq(t) {
var e = nq, r = d, n, i = kr(30), a, s, o, l, u, h = 1;
t == null && (t = []);
function d(y) {
return 1 / Math.min(o[y.source.index], o[y.target.index]);
}
function f(y) {
for (var b = 0, x = t.length; b < h; ++b)
for (var k = 0, T, C, M, S, R, A, L; k < x; ++k)
T = t[k], C = T.source, M = T.target, S = M.x + M.vx - C.x - C.vx || Oa(u), R = M.y + M.vy - C.y - C.vy || Oa(u), A = Math.sqrt(S * S + R * R), A = (A - a[k]) / A * y * n[k], S *= A, R *= A, M.vx -= S * (L = l[k]), M.vy -= R * L, C.vx += S * (L = 1 - L), C.vy += R * L;
}
function p() {
if (!!s) {
var y, b = s.length, x = t.length, k = new Map(s.map((C, M) => [e(C, M, s), C])), T;
for (y = 0, o = new Array(b); y < x; ++y)
T = t[y], T.index = y, typeof T.source != "object" && (T.source = L5(k, T.source)), typeof T.target != "object" && (T.target = L5(k, T.target)), o[T.source.index] = (o[T.source.index] || 0) + 1, o[T.target.index] = (o[T.target.index] || 0) + 1;
for (y = 0, l = new Array(x); y < x; ++y)
T = t[y], l[y] = o[T.source.index] / (o[T.source.index] + o[T.target.index]);
n = new Array(x), m(), a = new Array(x), _();
}
}
function m() {
if (!!s)
for (var y = 0, b = t.length; y < b; ++y)
n[y] = +r(t[y], y, t);
}
function _() {
if (!!s)
for (var y = 0, b = t.length; y < b; ++y)
a[y] = +i(t[y], y, t);
}
return f.initialize = function(y, b) {
s = y, u = b, p();
}, f.links = function(y) {
return arguments.length ? (t = y, p(), f) : t;
}, f.id = function(y) {
return arguments.length ? (e = y, f) : e;
}, f.iterations = function(y) {
return arguments.length ? (h = +y, f) : h;
}, f.strength = function(y) {
return arguments.length ? (r = typeof y == "function" ? y : kr(+y), m(), f) : r;
}, f.distance = function(y) {
return arguments.length ? (i = typeof y == "function" ? y : kr(+y), _(), f) : i;
}, f;
}
const aq = 1664525, sq = 1013904223, R5 = 4294967296;
function oq() {
let t = 1;
return () => (t = (aq * t + sq) % R5) / R5;
}
function lq(t) {
return t.x;
}
function cq(t) {
return t.y;
}
var uq = 10, hq = Math.PI * (3 - Math.sqrt(5));
function fq(t) {
var e, r = 1, n = 1e-3, i = 1 - Math.pow(n, 1 / 300), a = 0, s = 0.6, o = /* @__PURE__ */ new Map(), l = w1(d), u = Ws("tick", "end"), h = oq();
t == null && (t = []);
function d() {
f(), u.call("tick", e), r < n && (l.stop(), u.call("end", e));
}
function f(_) {
var y, b = t.length, x;
_ === void 0 && (_ = 1);
for (var k = 0; k < _; ++k)
for (r += (a - r) * i, o.forEach(function(T) {
T(r);
}), y = 0; y < b; ++y)
x = t[y], x.fx == null ? x.x += x.vx *= s : (x.x = x.fx, x.vx = 0), x.fy == null ? x.y += x.vy *= s : (x.y = x.fy, x.vy = 0);
return e;
}
function p() {
for (var _ = 0, y = t.length, b; _ < y; ++_) {
if (b = t[_], b.index = _, b.fx != null && (b.x = b.fx), b.fy != null && (b.y = b.fy), isNaN(b.x) || isNaN(b.y)) {
var x = uq * Math.sqrt(0.5 + _), k = _ * hq;
b.x = x * Math.cos(k), b.y = x * Math.sin(k);
}
(isNaN(b.vx) || isNaN(b.vy)) && (b.vx = b.vy = 0);
}
}
function m(_) {
return _.initialize && _.initialize(t, h), _;
}
return p(), e = {
tick: f,
restart: function() {
return l.restart(d), e;
},
stop: function() {
return l.stop(), e;
},
nodes: function(_) {
return arguments.length ? (t = _, p(), o.forEach(m), e) : t;
},
alpha: function(_) {
return arguments.length ? (r = +_, e) : r;
},
alphaMin: function(_) {
return arguments.length ? (n = +_, e) : n;
},
alphaDecay: function(_) {
return arguments.length ? (i = +_, e) : +i;
},
alphaTarget: function(_) {
return arguments.length ? (a = +_, e) : a;
},
velocityDecay: function(_) {
return arguments.length ? (s = 1 - _, e) : 1 - s;
},
randomSource: function(_) {
return arguments.length ? (h = _, o.forEach(m), e) : h;
},
force: function(_, y) {
return arguments.length > 1 ? (y == null ? o.delete(_) : o.set(_, m(y)), e) : o.get(_);
},
find: function(_, y, b) {
var x = 0, k = t.length, T, C, M, S, R;
for (b == null ? b = 1 / 0 : b *= b, x = 0; x < k; ++x)
S = t[x], T = _ - S.x, C = y - S.y, M = T * T + C * C, M < b && (R = S, b = M);
return R;
},
on: function(_, y) {
return arguments.length > 1 ? (u.on(_, y), e) : u.on(_);
}
};
}
function dq() {
var t, e, r, n, i = kr(-30), a, s = 1, o = 1 / 0, l = 0.81;
function u(p) {
var m, _ = t.length, y = S1(t, lq, cq).visitAfter(d);
for (n = p, m = 0; m < _; ++m)
e = t[m], y.visit(f);
}
function h() {
if (!!t) {
var p, m = t.length, _;
for (a = new Array(m), p = 0; p < m; ++p)
_ = t[p], a[_.index] = +i(_, p, t);
}
}
function d(p) {
var m = 0, _, y, b = 0, x, k, T;
if (p.length) {
for (x = k = T = 0; T < 4; ++T)
(_ = p[T]) && (y = Math.abs(_.value)) && (m += _.value, b += y, x += y * _.x, k += y * _.y);
p.x = x / b, p.y = k / b;
} else {
_ = p, _.x = _.data.x, _.y = _.data.y;
do
m += a[_.data.index];
while (_ = _.next);
}
p.value = m;
}
function f(p, m, _, y) {
if (!p.value)
return !0;
var b = p.x - e.x, x = p.y - e.y, k = y - m, T = b * b + x * x;
if (k * k / l < T)
return T < o && (b === 0 && (b = Oa(r), T += b * b), x === 0 && (x = Oa(r), T += x * x), T < s && (T = Math.sqrt(s * T)), e.vx += b * p.value * n / T, e.vy += x * p.value * n / T), !0;
if (p.length || T >= o)
return;
(p.data !== e || p.next) && (b === 0 && (b = Oa(r), T += b * b), x === 0 && (x = Oa(r), T += x * x), T < s && (T = Math.sqrt(s * T)));
do
p.data !== e && (k = a[p.data.index] * n / T, e.vx += b * k, e.vy += x * k);
while (p = p.next);
}
return u.initialize = function(p, m) {
t = p, r = m, h();
}, u.strength = function(p) {
return arguments.length ? (i = typeof p == "function" ? p : kr(+p), h(), u) : i;
}, u.distanceMin = function(p) {
return arguments.length ? (s = p * p, u) : Math.sqrt(s);
}, u.distanceMax = function(p) {
return arguments.length ? (o = p * p, u) : Math.sqrt(o);
}, u.theta = function(p) {
return arguments.length ? (l = p * p, u) : Math.sqrt(l);
}, u;
}
function pq(t, e, r) {
var n, i = kr(0.1), a, s;
typeof t != "function" && (t = kr(+t)), e == null && (e = 0), r == null && (r = 0);
function o(u) {
for (var h = 0, d = n.length; h < d; ++h) {
var f = n[h], p = f.x - e || 1e-6, m = f.y - r || 1e-6, _ = Math.sqrt(p * p + m * m), y = (s[h] - _) * a[h] * u / _;
f.vx += p * y, f.vy += m * y;
}
}
function l() {
if (!!n) {
var u, h = n.length;
for (a = new Array(h), s = new Array(h), u = 0; u < h; ++u)
s[u] = +t(n[u], u, n), a[u] = isNaN(s[u]) ? 0 : +i(n[u], u, n);
}
}
return o.initialize = function(u) {
n = u, l();
}, o.strength = function(u) {
return arguments.length ? (i = typeof u == "function" ? u : kr(+u), l(), o) : i;
}, o.radius = function(u) {
return arguments.length ? (t = typeof u == "function" ? u : kr(+u), l(), o) : t;
}, o.x = function(u) {
return arguments.length ? (e = +u, o) : e;
}, o.y = function(u) {
return arguments.length ? (r = +u, o) : r;
}, o;
}
function gq(t) {
var e = kr(0.1), r, n, i;
typeof t != "function" && (t = kr(t == null ? 0 : +t));
function a(o) {
for (var l = 0, u = r.length, h; l < u; ++l)
h = r[l], h.vx += (i[l] - h.x) * n[l] * o;
}
function s() {
if (!!r) {
var o, l = r.length;
for (n = new Array(l), i = new Array(l), o = 0; o < l; ++o)
n[o] = isNaN(i[o] = +t(r[o], o, r)) ? 0 : +e(r[o], o, r);
}
}
return a.initialize = function(o) {
r = o, s();
}, a.strength = function(o) {
return arguments.length ? (e = typeof o == "function" ? o : kr(+o), s(), a) : e;
}, a.x = function(o) {
return arguments.length ? (t = typeof o == "function" ? o : kr(+o), s(), a) : t;
}, a;
}
function yq(t) {
var e = kr(0.1), r, n, i;
typeof t != "function" && (t = kr(t == null ? 0 : +t));
function a(o) {
for (var l = 0, u = r.length, h; l < u; ++l)
h = r[l], h.vy += (i[l] - h.y) * n[l] * o;
}
function s() {
if (!!r) {
var o, l = r.length;
for (n = new Array(l), i = new Array(l), o = 0; o < l; ++o)
n[o] = isNaN(i[o] = +t(r[o], o, r)) ? 0 : +e(r[o], o, r);
}
}
return a.initialize = function(o) {
r = o, s();
}, a.strength = function(o) {
return arguments.length ? (e = typeof o == "function" ? o : kr(+o), s(), a) : e;
}, a.y = function(o) {
return arguments.length ? (t = typeof o == "function" ? o : kr(+o), s(), a) : t;
}, a;
}
function mq(t) {
return Math.abs(t = Math.round(t)) >= 1e21 ? t.toLocaleString("en").replace(/,/g, "") : t.toString(10);
}
function Kh(t, e) {
if ((r = (t = e ? t.toExponential(e - 1) : t.toExponential()).indexOf("e")) < 0)
return null;
var r, n = t.slice(0, r);
return [
n.length > 1 ? n[0] + n.slice(2) : n,
+t.slice(r + 1)
];
}
function qo(t) {
return t = Kh(Math.abs(t)), t ? t[1] : NaN;
}
function bq(t, e) {
return function(r, n) {
for (var i = r.length, a = [], s = 0, o = t[0], l = 0; i > 0 && o > 0 && (l + o + 1 > n && (o = Math.max(1, n - l)), a.push(r.substring(i -= o, i + o)), !((l += o + 1) > n)); )
o = t[s = (s + 1) % t.length];
return a.reverse().join(e);
};
}
function _q(t) {
return function(e) {
return e.replace(/[0-9]/g, function(r) {
return t[+r];
});
};
}
var vq = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
function Vo(t) {
if (!(e = vq.exec(t)))
throw new Error("invalid format: " + t);
var e;
return new A1({
fill: e[1],
align: e[2],
sign: e[3],
symbol: e[4],
zero: e[5],
width: e[6],
comma: e[7],
precision: e[8] && e[8].slice(1),
trim: e[9],
type: e[10]
});
}
Vo.prototype = A1.prototype;
function A1(t) {
this.fill = t.fill === void 0 ? " " : t.fill + "", this.align = t.align === void 0 ? ">" : t.align + "", this.sign = t.sign === void 0 ? "-" : t.sign + "", this.symbol = t.symbol === void 0 ? "" : t.symbol + "", this.zero = !!t.zero, this.width = t.width === void 0 ? void 0 : +t.width, this.comma = !!t.comma, this.precision = t.precision === void 0 ? void 0 : +t.precision, this.trim = !!t.trim, this.type = t.type === void 0 ? "" : t.type + "";
}
A1.prototype.toString = function() {
return this.fill + this.align + this.sign + this.symbol + (this.zero ? "0" : "") + (this.width === void 0 ? "" : Math.max(1, this.width | 0)) + (this.comma ? "," : "") + (this.precision === void 0 ? "" : "." + Math.max(0, this.precision | 0)) + (this.trim ? "~" : "") + this.type;
};
function xq(t) {
t:
for (var e = t.length, r = 1, n = -1, i; r < e; ++r)
switch (t[r]) {
case ".":
n = i = r;
break;
case "0":
n === 0 && (n = r), i = r;
break;
default:
if (!+t[r])
break t;
n > 0 && (n = 0);
break;
}
return n > 0 ? t.slice(0, n) + t.slice(i + 1) : t;
}
var wT;
function kq(t, e) {
var r = Kh(t, e);
if (!r)
return t + "";
var n = r[0], i = r[1], a = i - (wT = Math.max(-8, Math.min(8, Math.floor(i / 3))) * 3) + 1, s = n.length;
return a === s ? n : a > s ? n + new Array(a - s + 1).join("0") : a > 0 ? n.slice(0, a) + "." + n.slice(a) : "0." + new Array(1 - a).join("0") + Kh(t, Math.max(0, e + a - 1))[0];
}
function I5(t, e) {
var r = Kh(t, e);
if (!r)
return t + "";
var n = r[0], i = r[1];
return i < 0 ? "0." + new Array(-i).join("0") + n : n.length > i + 1 ? n.slice(0, i + 1) + "." + n.slice(i + 1) : n + new Array(i - n.length + 2).join("0");
}
const N5 = {
"%": (t, e) => (t * 100).toFixed(e),
b: (t) => Math.round(t).toString(2),
c: (t) => t + "",
d: mq,
e: (t, e) => t.toExponential(e),
f: (t, e) => t.toFixed(e),
g: (t, e) => t.toPrecision(e),
o: (t) => Math.round(t).toString(8),
p: (t, e) => I5(t * 100, e),
r: I5,
s: kq,
X: (t) => Math.round(t).toString(16).toUpperCase(),
x: (t) => Math.round(t).toString(16)
};
function B5(t) {
return t;
}
var D5 = Array.prototype.map, O5 = ["y", "z", "a", "f", "p", "n", "\xB5", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
function TT(t) {
var e = t.grouping === void 0 || t.thousands === void 0 ? B5 : bq(D5.call(t.grouping, Number), t.thousands + ""), r = t.currency === void 0 ? "" : t.currency[0] + "", n = t.currency === void 0 ? "" : t.currency[1] + "", i = t.decimal === void 0 ? "." : t.decimal + "", a = t.numerals === void 0 ? B5 : _q(D5.call(t.numerals, String)), s = t.percent === void 0 ? "%" : t.percent + "", o = t.minus === void 0 ? "\u2212" : t.minus + "", l = t.nan === void 0 ? "NaN" : t.nan + "";
function u(d) {
d = Vo(d);
var f = d.fill, p = d.align, m = d.sign, _ = d.symbol, y = d.zero, b = d.width, x = d.comma, k = d.precision, T = d.trim, C = d.type;
C === "n" ? (x = !0, C = "g") : N5[C] || (k === void 0 && (k = 12), T = !0, C = "g"), (y || f === "0" && p === "=") && (y = !0, f = "0", p = "=");
var M = _ === "$" ? r : _ === "#" && /[boxX]/.test(C) ? "0" + C.toLowerCase() : "", S = _ === "$" ? n : /[%p]/.test(C) ? s : "", R = N5[C], A = /[defgprs%]/.test(C);
k = k === void 0 ? 6 : /[gprs]/.test(C) ? Math.max(1, Math.min(21, k)) : Math.max(0, Math.min(20, k));
function L(v) {
var B = M, w = S, D, N, z;
if (C === "c")
w = R(v) + w, v = "";
else {
v = +v;
var X = v < 0 || 1 / v < 0;
if (v = isNaN(v) ? l : R(Math.abs(v), k), T && (v = xq(v)), X && +v == 0 && m !== "+" && (X = !1), B = (X ? m === "(" ? m : o : m === "-" || m === "(" ? "" : m) + B, w = (C === "s" ? O5[8 + wT / 3] : "") + w + (X && m === "(" ? ")" : ""), A) {
for (D = -1, N = v.length; ++D < N; )
if (z = v.charCodeAt(D), 48 > z || z > 57) {
w = (z === 46 ? i + v.slice(D + 1) : v.slice(D)) + w, v = v.slice(0, D);
break;
}
}
}
x && !y && (v = e(v, 1 / 0));
var ct = B.length + v.length + w.length, J = ct < b ? new Array(b - ct + 1).join(f) : "";
switch (x && y && (v = e(J + v, J.length ? b - w.length : 1 / 0), J = ""), p) {
case "<":
v = B + v + w + J;
break;
case "=":
v = B + J + v + w;
break;
case "^":
v = J.slice(0, ct = J.length >> 1) + B + v + w + J.slice(ct);
break;
default:
v = J + B + v + w;
break;
}
return a(v);
}
return L.toString = function() {
return d + "";
}, L;
}
function h(d, f) {
var p = u((d = Vo(d), d.type = "f", d)), m = Math.max(-8, Math.min(8, Math.floor(qo(f) / 3))) * 3, _ = Math.pow(10, -m), y = O5[8 + m / 3];
return function(b) {
return p(_ * b) + y;
};
}
return {
format: u,
formatPrefix: h
};
}
var Pu, M1, w3;
ET({
thousands: ",",
grouping: [3],
currency: ["$", ""]
});
function ET(t) {
return Pu = TT(t), M1 = Pu.format, w3 = Pu.formatPrefix, Pu;
}
function CT(t) {
return Math.max(0, -qo(Math.abs(t)));
}
function ST(t, e) {
return Math.max(0, Math.max(-8, Math.min(8, Math.floor(qo(e) / 3))) * 3 - qo(Math.abs(t)));
}
function AT(t, e) {
return t = Math.abs(t), e = Math.abs(e) - t, Math.max(0, qo(e) - qo(t)) + 1;
}
var ee = 1e-6, Ec = 1e-12, Se = Math.PI, ar = Se / 2, Zh = Se / 4, sn = Se * 2, Ue = 180 / Se, ie = Se / 180, Ne = Math.abs, sl = Math.atan, on = Math.atan2, Zt = Math.cos, qu = Math.ceil, MT = Math.exp, zm = Math.hypot, Qh = Math.log, ad = Math.pow, jt = Math.sin, On = Math.sign || function(t) {
return t > 0 ? 1 : t < 0 ? -1 : 0;
}, Lr = Math.sqrt, T3 = Math.tan;
function LT(t) {
return t > 1 ? 0 : t < -1 ? Se : Math.acos(t);
}
function ln(t) {
return t > 1 ? ar : t < -1 ? -ar : Math.asin(t);
}
function F5(t) {
return (t = jt(t / 2)) * t;
}
function Je() {
}
function Jh(t, e) {
t && q5.hasOwnProperty(t.type) && q5[t.type](t, e);
}
var P5 = {
Feature: function(t, e) {
Jh(t.geometry, e);
},
FeatureCollection: function(t, e) {
for (var r = t.features, n = -1, i = r.length; ++n < i; )
Jh(r[n].geometry, e);
}
}, q5 = {
Sphere: function(t, e) {
e.sphere();
},
Point: function(t, e) {
t = t.coordinates, e.point(t[0], t[1], t[2]);
},
MultiPoint: function(t, e) {
for (var r = t.coordinates, n = -1, i = r.length; ++n < i; )
t = r[n], e.point(t[0], t[1], t[2]);
},
LineString: function(t, e) {
Ym(t.coordinates, e, 0);
},
MultiLineString: function(t, e) {
for (var r = t.coordinates, n = -1, i = r.length; ++n < i; )
Ym(r[n], e, 0);
},
Polygon: function(t, e) {
V5(t.coordinates, e);
},
MultiPolygon: function(t, e) {
for (var r = t.coordinates, n = -1, i = r.length; ++n < i; )
V5(r[n], e);
},
GeometryCollection: function(t, e) {
for (var r = t.geometries, n = -1, i = r.length; ++n < i; )
Jh(r[n], e);
}
};
function Ym(t, e, r) {
var n = -1, i = t.length - r, a;
for (e.lineStart(); ++n < i; )
a = t[n], e.point(a[0], a[1], a[2]);
e.lineEnd();
}
function V5(t, e) {
var r = -1, n = t.length;
for (e.polygonStart(); ++r < n; )
Ym(t[r], e, 1);
e.polygonEnd();
}
function Kn(t, e) {
t && P5.hasOwnProperty(t.type) ? P5[t.type](t, e) : Jh(t, e);
}
var tf = new wr(), ef = new wr(), RT, IT, Um, Wm, Hm, Di = {
point: Je,
lineStart: Je,
lineEnd: Je,
polygonStart: function() {
tf = new wr(), Di.lineStart = wq, Di.lineEnd = Tq;
},
polygonEnd: function() {
var t = +tf;
ef.add(t < 0 ? sn + t : t), this.lineStart = this.lineEnd = this.point = Je;
},
sphere: function() {
ef.add(sn);
}
};
function wq() {
Di.point = Eq;
}
function Tq() {
NT(RT, IT);
}
function Eq(t, e) {
Di.point = NT, RT = t, IT = e, t *= ie, e *= ie, Um = t, Wm = Zt(e = e / 2 + Zh), Hm = jt(e);
}
function NT(t, e) {
t *= ie, e *= ie, e = e / 2 + Zh;
var r = t - Um, n = r >= 0 ? 1 : -1, i = n * r, a = Zt(e), s = jt(e), o = Hm * s, l = Wm * a + o * Zt(i), u = o * n * jt(i);
tf.add(on(u, l)), Um = t, Wm = a, Hm = s;
}
function Cq(t) {
return ef = new wr(), Kn(t, Di), ef * 2;
}
function rf(t) {
return [on(t[1], t[0]), ln(t[2])];
}
function Is(t) {
var e = t[0], r = t[1], n = Zt(r);
return [n * Zt(e), n * jt(e), jt(r)];
}
function Vu(t, e) {
return t[0] * e[0] + t[1] * e[1] + t[2] * e[2];
}
function zo(t, e) {
return [t[1] * e[2] - t[2] * e[1], t[2] * e[0] - t[0] * e[2], t[0] * e[1] - t[1] * e[0]];
}
function sd(t, e) {
t[0] += e[0], t[1] += e[1], t[2] += e[2];
}
function zu(t, e) {
return [t[0] * e, t[1] * e, t[2] * e];
}
function nf(t) {
var e = Lr(t[0] * t[0] + t[1] * t[1] + t[2] * t[2]);
t[0] /= e, t[1] /= e, t[2] /= e;
}
var Qe, dn, rr, An, ms, BT, DT, Eo, Jl, La, ga, sa = {
point: Gm,
lineStart: z5,
lineEnd: Y5,
polygonStart: function() {
sa.point = FT, sa.lineStart = Sq, sa.lineEnd = Aq, Jl = new wr(), Di.polygonStart();
},
polygonEnd: function() {
Di.polygonEnd(), sa.point = Gm, sa.lineStart = z5, sa.lineEnd = Y5, tf < 0 ? (Qe = -(rr = 180), dn = -(An = 90)) : Jl > ee ? An = 90 : Jl < -ee && (dn = -90), ga[0] = Qe, ga[1] = rr;
},
sphere: function() {
Qe = -(rr = 180), dn = -(An = 90);
}
};
function Gm(t, e) {
La.push(ga = [Qe = t, rr = t]), e < dn && (dn = e), e > An && (An = e);
}
function OT(t, e) {
var r = Is([t * ie, e * ie]);
if (Eo) {
var n = zo(Eo, r), i = [n[1], -n[0], 0], a = zo(i, n);
nf(a), a = rf(a);
var s = t - ms, o = s > 0 ? 1 : -1, l = a[0] * Ue * o, u, h = Ne(s) > 180;
h ^ (o * ms < l && l < o * t) ? (u = a[1] * Ue, u > An && (An = u)) : (l = (l + 360) % 360 - 180, h ^ (o * ms < l && l < o * t) ? (u = -a[1] * Ue, u < dn && (dn = u)) : (e < dn && (dn = e), e > An && (An = e))), h ? t < ms ? En(Qe, t) > En(Qe, rr) && (rr = t) : En(t, rr) > En(Qe, rr) && (Qe = t) : rr >= Qe ? (t < Qe && (Qe = t), t > rr && (rr = t)) : t > ms ? En(Qe, t) > En(Qe, rr) && (rr = t) : En(t, rr) > En(Qe, rr) && (Qe = t);
} else
La.push(ga = [Qe = t, rr = t]);
e < dn && (dn = e), e > An && (An = e), Eo = r, ms = t;
}
function z5() {
sa.point = OT;
}
function Y5() {
ga[0] = Qe, ga[1] = rr, sa.point = Gm, Eo = null;
}
function FT(t, e) {
if (Eo) {
var r = t - ms;
Jl.add(Ne(r) > 180 ? r + (r > 0 ? 360 : -360) : r);
} else
BT = t, DT = e;
Di.point(t, e), OT(t, e);
}
function Sq() {
Di.lineStart();
}
function Aq() {
FT(BT, DT), Di.lineEnd(), Ne(Jl) > ee && (Qe = -(rr = 180)), ga[0] = Qe, ga[1] = rr, Eo = null;
}
function En(t, e) {
return (e -= t) < 0 ? e + 360 : e;
}
function Mq(t, e) {
return t[0] - e[0];
}
function U5(t, e) {
return t[0] <= t[1] ? t[0] <= e && e <= t[1] : e < t[0] || t[1] < e;
}
function Lq(t) {
var e, r, n, i, a, s, o;
if (An = rr = -(Qe = dn = 1 / 0), La = [], Kn(t, sa), r = La.length) {
for (La.sort(Mq), e = 1, n = La[0], a = [n]; e < r; ++e)
i = La[e], U5(n, i[0]) || U5(n, i[1]) ? (En(n[0], i[1]) > En(n[0], n[1]) && (n[1] = i[1]), En(i[0], n[1]) > En(n[0], n[1]) && (n[0] = i[0])) : a.push(n = i);
for (s = -1 / 0, r = a.length - 1, e = 0, n = a[r]; e <= r; n = i, ++e)
i = a[e], (o = En(n[1], i[0])) > s && (s = o, Qe = i[0], rr = n[1]);
}
return La = ga = null, Qe === 1 / 0 || dn === 1 / 0 ? [[NaN, NaN], [NaN, NaN]] : [[Qe, dn], [rr, An]];
}
var Vl, af, sf, of, lf, cf, uf, hf, jm, $m, Xm, PT, qT, Kr, Zr, Qr, Jn = {
sphere: Je,
point: E3,
lineStart: W5,
lineEnd: H5,
polygonStart: function() {
Jn.lineStart = Nq, Jn.lineEnd = Bq;
},
polygonEnd: function() {
Jn.lineStart = W5, Jn.lineEnd = H5;
}
};
function E3(t, e) {
t *= ie, e *= ie;
var r = Zt(e);
Jc(r * Zt(t), r * jt(t), jt(e));
}
function Jc(t, e, r) {
++Vl, sf += (t - sf) / Vl, of += (e - of) / Vl, lf += (r - lf) / Vl;
}
function W5() {
Jn.point = Rq;
}
function Rq(t, e) {
t *= ie, e *= ie;
var r = Zt(e);
Kr = r * Zt(t), Zr = r * jt(t), Qr = jt(e), Jn.point = Iq, Jc(Kr, Zr, Qr);
}
function Iq(t, e) {
t *= ie, e *= ie;
var r = Zt(e), n = r * Zt(t), i = r * jt(t), a = jt(e), s = on(Lr((s = Zr * a - Qr * i) * s + (s = Qr * n - Kr * a) * s + (s = Kr * i - Zr * n) * s), Kr * n + Zr * i + Qr * a);
af += s, cf += s * (Kr + (Kr = n)), uf += s * (Zr + (Zr = i)), hf += s * (Qr + (Qr = a)), Jc(Kr, Zr, Qr);
}
function H5() {
Jn.point = E3;
}
function Nq() {
Jn.point = Dq;
}
function Bq() {
VT(PT, qT), Jn.point = E3;
}
function Dq(t, e) {
PT = t, qT = e, t *= ie, e *= ie, Jn.point = VT;
var r = Zt(e);
Kr = r * Zt(t), Zr = r * jt(t), Qr = jt(e), Jc(Kr, Zr, Qr);
}
function VT(t, e) {
t *= ie, e *= ie;
var r = Zt(e), n = r * Zt(t), i = r * jt(t), a = jt(e), s = Zr * a - Qr * i, o = Qr * n - Kr * a, l = Kr * i - Zr * n, u = zm(s, o, l), h = ln(u), d = u && -h / u;
jm.add(d * s), $m.add(d * o), Xm.add(d * l), af += h, cf += h * (Kr + (Kr = n)), uf += h * (Zr + (Zr = i)), hf += h * (Qr + (Qr = a)), Jc(Kr, Zr, Qr);
}
function Oq(t) {
Vl = af = sf = of = lf = cf = uf = hf = 0, jm = new wr(), $m = new wr(), Xm = new wr(), Kn(t, Jn);
var e = +jm, r = +$m, n = +Xm, i = zm(e, r, n);
return i < Ec && (e = cf, r = uf, n = hf, af < ee && (e = sf, r = of, n = lf), i = zm(e, r, n), i < Ec) ? [NaN, NaN] : [on(r, e) * Ue, ln(n / i) * Ue];
}
function po(t) {
return function() {
return t;
};
}
function Km(t, e) {
function r(n, i) {
return n = t(n, i), e(n[0], n[1]);
}
return t.invert && e.invert && (r.invert = function(n, i) {
return n = e.invert(n, i), n && t.invert(n[0], n[1]);
}), r;
}
function Zm(t, e) {
return [Ne(t) > Se ? t + Math.round(-t / sn) * sn : t, e];
}
Zm.invert = Zm;
function C3(t, e, r) {
return (t %= sn) ? e || r ? Km(j5(t), $5(e, r)) : j5(t) : e || r ? $5(e, r) : Zm;
}
function G5(t) {
return function(e, r) {
return e += t, [e > Se ? e - sn : e < -Se ? e + sn : e, r];
};
}
function j5(t) {
var e = G5(t);
return e.invert = G5(-t), e;
}
function $5(t, e) {
var r = Zt(t), n = jt(t), i = Zt(e), a = jt(e);
function s(o, l) {
var u = Zt(l), h = Zt(o) * u, d = jt(o) * u, f = jt(l), p = f * r + h * n;
return [
on(d * i - p * a, h * r - f * n),
ln(p * i + d * a)
];
}
return s.invert = function(o, l) {
var u = Zt(l), h = Zt(o) * u, d = jt(o) * u, f = jt(l), p = f * i - d * a;
return [
on(d * i + f * a, h * r + p * n),
ln(p * r - h * n)
];
}, s;
}
function zT(t) {
t = C3(t[0] * ie, t[1] * ie, t.length > 2 ? t[2] * ie : 0);
function e(r) {
return r = t(r[0] * ie, r[1] * ie), r[0] *= Ue, r[1] *= Ue, r;
}
return e.invert = function(r) {
return r = t.invert(r[0] * ie, r[1] * ie), r[0] *= Ue, r[1] *= Ue, r;
}, e;
}
function YT(t, e, r, n, i, a) {
if (!!r) {
var s = Zt(e), o = jt(e), l = n * r;
i == null ? (i = e + n * sn, a = e - l / 2) : (i = X5(s, i), a = X5(s, a), (n > 0 ? i < a : i > a) && (i += n * sn));
for (var u, h = i; n > 0 ? h > a : h < a; h -= l)
u = rf([s, -o * Zt(h), -o * jt(h)]), t.point(u[0], u[1]);
}
}
function X5(t, e) {
e = Is(e), e[0] -= t, nf(e);
var r = LT(-e[1]);
return ((-e[2] < 0 ? -r : r) + sn - ee) % sn;
}
function Fq() {
var t = po([0, 0]), e = po(90), r = po(6), n, i, a = { point: s };
function s(l, u) {
n.push(l = i(l, u)), l[0] *= Ue, l[1] *= Ue;
}
function o() {
var l = t.apply(this, arguments), u = e.apply(this, arguments) * ie, h = r.apply(this, arguments) * ie;
return n = [], i = C3(-l[0] * ie, -l[1] * ie, 0).invert, YT(a, u, h, 1), l = { type: "Polygon", coordinates: [n] }, n = i = null, l;
}
return o.center = function(l) {
return arguments.length ? (t = typeof l == "function" ? l : po([+l[0], +l[1]]), o) : t;
}, o.radius = function(l) {
return arguments.length ? (e = typeof l == "function" ? l : po(+l), o) : e;
}, o.precision = function(l) {
return arguments.length ? (r = typeof l == "function" ? l : po(+l), o) : r;
}, o;
}
function UT() {
var t = [], e;
return {
point: function(r, n, i) {
e.push([r, n, i]);
},
lineStart: function() {
t.push(e = []);
},
lineEnd: Je,
rejoin: function() {
t.length > 1 && t.push(t.pop().concat(t.shift()));
},
result: function() {
var r = t;
return t = [], e = null, r;
}
};
}
function vh(t, e) {
return Ne(t[0] - e[0]) < ee && Ne(t[1] - e[1]) < ee;
}
function Yu(t, e, r, n) {
this.x = t, this.z = e, this.o = r, this.e = n, this.v = !1, this.n = this.p = null;
}
function WT(t, e, r, n, i) {
var a = [], s = [], o, l;
if (t.forEach(function(m) {
if (!((_ = m.length - 1) <= 0)) {
var _, y = m[0], b = m[_], x;
if (vh(y, b)) {
if (!y[2] && !b[2]) {
for (i.lineStart(), o = 0; o < _; ++o)
i.point((y = m[o])[0], y[1]);
i.lineEnd();
return;
}
b[0] += 2 * ee;
}
a.push(x = new Yu(y, m, null, !0)), s.push(x.o = new Yu(y, null, x, !1)), a.push(x = new Yu(b, m, null, !1)), s.push(x.o = new Yu(b, null, x, !0));
}
}), !!a.length) {
for (s.sort(e), K5(a), K5(s), o = 0, l = s.length; o < l; ++o)
s[o].e = r = !r;
for (var u = a[0], h, d; ; ) {
for (var f = u, p = !0; f.v; )
if ((f = f.n) === u)
return;
h = f.z, i.lineStart();
do {
if (f.v = f.o.v = !0, f.e) {
if (p)
for (o = 0, l = h.length; o < l; ++o)
i.point((d = h[o])[0], d[1]);
else
n(f.x, f.n.x, 1, i);
f = f.n;
} else {
if (p)
for (h = f.p.z, o = h.length - 1; o >= 0; --o)
i.point((d = h[o])[0], d[1]);
else
n(f.x, f.p.x, -1, i);
f = f.p;
}
f = f.o, h = f.z, p = !p;
} while (!f.v);
i.lineEnd();
}
}
}
function K5(t) {
if (!!(e = t.length)) {
for (var e, r = 0, n = t[0], i; ++r < e; )
n.n = i = t[r], i.p = n, n = i;
n.n = i = t[0], i.p = n;
}
}
function od(t) {
return Ne(t[0]) <= Se ? t[0] : On(t[0]) * ((Ne(t[0]) + Se) % sn - Se);
}
function HT(t, e) {
var r = od(e), n = e[1], i = jt(n), a = [jt(r), -Zt(r), 0], s = 0, o = 0, l = new wr();
i === 1 ? n = ar + ee : i === -1 && (n = -ar - ee);
for (var u = 0, h = t.length; u < h; ++u)
if (!!(f = (d = t[u]).length))
for (var d, f, p = d[f - 1], m = od(p), _ = p[1] / 2 + Zh, y = jt(_), b = Zt(_), x = 0; x < f; ++x, m = T, y = M, b = S, p = k) {
var k = d[x], T = od(k), C = k[1] / 2 + Zh, M = jt(C), S = Zt(C), R = T - m, A = R >= 0 ? 1 : -1, L = A * R, v = L > Se, B = y * M;
if (l.add(on(B * A * jt(L), b * S + B * Zt(L))), s += v ? R + A * sn : R, v ^ m >= r ^ T >= r) {
var w = zo(Is(p), Is(k));
nf(w);
var D = zo(a, w);
nf(D);
var N = (v ^ R >= 0 ? -1 : 1) * ln(D[2]);
(n > N || n === N && (w[0] || w[1])) && (o += v ^ R >= 0 ? 1 : -1);
}
}
return (s < -ee || s < ee && l < -Ec) ^ o & 1;
}
function GT(t, e, r, n) {
return function(i) {
var a = e(i), s = UT(), o = e(s), l = !1, u, h, d, f = {
point: p,
lineStart: _,
lineEnd: y,
polygonStart: function() {
f.point = b, f.lineStart = x, f.lineEnd = k, h = [], u = [];
},
polygonEnd: function() {
f.point = p, f.lineStart = _, f.lineEnd = y, h = e3(h);
var T = HT(u, n);
h.length ? (l || (i.polygonStart(), l = !0), WT(h, qq, T, r, i)) : T && (l || (i.polygonStart(), l = !0), i.lineStart(), r(null, null, 1, i), i.lineEnd()), l && (i.polygonEnd(), l = !1), h = u = null;
},
sphere: function() {
i.polygonStart(), i.lineStart(), r(null, null, 1, i), i.lineEnd(), i.polygonEnd();
}
};
function p(T, C) {
t(T, C) && i.point(T, C);
}
function m(T, C) {
a.point(T, C);
}
function _() {
f.point = m, a.lineStart();
}
function y() {
f.point = p, a.lineEnd();
}
function b(T, C) {
d.push([T, C]), o.point(T, C);
}
function x() {
o.lineStart(), d = [];
}
function k() {
b(d[0][0], d[0][1]), o.lineEnd();
var T = o.clean(), C = s.result(), M, S = C.length, R, A, L;
if (d.pop(), u.push(d), d = null, !!S) {
if (T & 1) {
if (A = C[0], (R = A.length - 1) > 0) {
for (l || (i.polygonStart(), l = !0), i.lineStart(), M = 0; M < R; ++M)
i.point((L = A[M])[0], L[1]);
i.lineEnd();
}
return;
}
S > 1 && T & 2 && C.push(C.pop().concat(C.shift())), h.push(C.filter(Pq));
}
}
return f;
};
}
function Pq(t) {
return t.length > 1;
}
function qq(t, e) {
return ((t = t.x)[0] < 0 ? t[1] - ar - ee : ar - t[1]) - ((e = e.x)[0] < 0 ? e[1] - ar - ee : ar - e[1]);
}
const Qm = GT(
function() {
return !0;
},
Vq,
Yq,
[-Se, -ar]
);
function Vq(t) {
var e = NaN, r = NaN, n = NaN, i;
return {
lineStart: function() {
t.lineStart(), i = 1;
},
point: function(a, s) {
var o = a > 0 ? Se : -Se, l = Ne(a - e);
Ne(l - Se) < ee ? (t.point(e, r = (r + s) / 2 > 0 ? ar : -ar), t.point(n, r), t.lineEnd(), t.lineStart(), t.point(o, r), t.point(a, r), i = 0) : n !== o && l >= Se && (Ne(e - n) < ee && (e -= n * ee), Ne(a - o) < ee && (a -= o * ee), r = zq(e, r, a, s), t.point(n, r), t.lineEnd(), t.lineStart(), t.point(o, r), i = 0), t.point(e = a, r = s), n = o;
},
lineEnd: function() {
t.lineEnd(), e = r = NaN;
},
clean: function() {
return 2 - i;
}
};
}
function zq(t, e, r, n) {
var i, a, s = jt(t - r);
return Ne(s) > ee ? sl((jt(e) * (a = Zt(n)) * jt(r) - jt(n) * (i = Zt(e)) * jt(t)) / (i * a * s)) : (e + n) / 2;
}
function Yq(t, e, r, n) {
var i;
if (t == null)
i = r * ar, n.point(-Se, i), n.point(0, i), n.point(Se, i), n.point(Se, 0), n.point(Se, -i), n.point(0, -i), n.point(-Se, -i), n.point(-Se, 0), n.point(-Se, i);
else if (Ne(t[0] - e[0]) > ee) {
var a = t[0] < e[0] ? Se : -Se;
i = r * a / 2, n.point(-a, i), n.point(0, i), n.point(a, i);
} else
n.point(e[0], e[1]);
}
function jT(t) {
var e = Zt(t), r = 6 * ie, n = e > 0, i = Ne(e) > ee;
function a(h, d, f, p) {
YT(p, t, r, f, h, d);
}
function s(h, d) {
return Zt(h) * Zt(d) > e;
}
function o(h) {
var d, f, p, m, _;
return {
lineStart: function() {
m = p = !1, _ = 1;
},
point: function(y, b) {
var x = [y, b], k, T = s(y, b), C = n ? T ? 0 : u(y, b) : T ? u(y + (y < 0 ? Se : -Se), b) : 0;
if (!d && (m = p = T) && h.lineStart(), T !== p && (k = l(d, x), (!k || vh(d, k) || vh(x, k)) && (x[2] = 1)), T !== p)
_ = 0, T ? (h.lineStart(), k = l(x, d), h.point(k[0], k[1])) : (k = l(d, x), h.point(k[0], k[1], 2), h.lineEnd()), d = k;
else if (i && d && n ^ T) {
var M;
!(C & f) && (M = l(x, d, !0)) && (_ = 0, n ? (h.lineStart(), h.point(M[0][0], M[0][1]), h.point(M[1][0], M[1][1]), h.lineEnd()) : (h.point(M[1][0], M[1][1]), h.lineEnd(), h.lineStart(), h.point(M[0][0], M[0][1], 3)));
}
T && (!d || !vh(d, x)) && h.point(x[0], x[1]), d = x, p = T, f = C;
},
lineEnd: function() {
p && h.lineEnd(), d = null;
},
clean: function() {
return _ | (m && p) << 1;
}
};
}
function l(h, d, f) {
var p = Is(h), m = Is(d), _ = [1, 0, 0], y = zo(p, m), b = Vu(y, y), x = y[0], k = b - x * x;
if (!k)
return !f && h;
var T = e * b / k, C = -e * x / k, M = zo(_, y), S = zu(_, T), R = zu(y, C);
sd(S, R);
var A = M, L = Vu(S, A), v = Vu(A, A), B = L * L - v * (Vu(S, S) - 1);
if (!(B < 0)) {
var w = Lr(B), D = zu(A, (-L - w) / v);
if (sd(D, S), D = rf(D), !f)
return D;
var N = h[0], z = d[0], X = h[1], ct = d[1], J;
z < N && (J = N, N = z, z = J);
var Y = z - N, $ = Ne(Y - Se) < ee, lt = $ || Y < ee;
if (!$ && ct < X && (J = X, X = ct, ct = J), lt ? $ ? X + ct > 0 ^ D[1] < (Ne(D[0] - N) < ee ? X : ct) : X <= D[1] && D[1] <= ct : Y > Se ^ (N <= D[0] && D[0] <= z)) {
var ut = zu(A, (-L + w) / v);
return sd(ut, S), [D, rf(ut)];
}
}
}
function u(h, d) {
var f = n ? t : Se - t, p = 0;
return h < -f ? p |= 1 : h > f && (p |= 2), d < -f ? p |= 4 : d > f && (p |= 8), p;
}
return GT(s, o, a, n ? [0, -t] : [-Se, t - Se]);
}
function Uq(t, e, r, n, i, a) {
var s = t[0], o = t[1], l = e[0], u = e[1], h = 0, d = 1, f = l - s, p = u - o, m;
if (m = r - s, !(!f && m > 0)) {
if (m /= f, f < 0) {
if (m < h)
return;
m < d && (d = m);
} else if (f > 0) {
if (m > d)
return;
m > h && (h = m);
}
if (m = i - s, !(!f && m < 0)) {
if (m /= f, f < 0) {
if (m > d)
return;
m > h && (h = m);
} else if (f > 0) {
if (m < h)
return;
m < d && (d = m);
}
if (m = n - o, !(!p && m > 0)) {
if (m /= p, p < 0) {
if (m < h)
return;
m < d && (d = m);
} else if (p > 0) {
if (m > d)
return;
m > h && (h = m);
}
if (m = a - o, !(!p && m < 0)) {
if (m /= p, p < 0) {
if (m > d)
return;
m > h && (h = m);
} else if (p > 0) {
if (m < h)
return;
m < d && (d = m);
}
return h > 0 && (t[0] = s + h * f, t[1] = o + h * p), d < 1 && (e[0] = s + d * f, e[1] = o + d * p), !0;
}
}
}
}
}
var zl = 1e9, Uu = -zl;
function L1(t, e, r, n) {
function i(u, h) {
return t <= u && u <= r && e <= h && h <= n;
}
function a(u, h, d, f) {
var p = 0, m = 0;
if (u == null || (p = s(u, d)) !== (m = s(h, d)) || l(u, h) < 0 ^ d > 0)
do
f.point(p === 0 || p === 3 ? t : r, p > 1 ? n : e);
while ((p = (p + d + 4) % 4) !== m);
else
f.point(h[0], h[1]);
}
function s(u, h) {
return Ne(u[0] - t) < ee ? h > 0 ? 0 : 3 : Ne(u[0] - r) < ee ? h > 0 ? 2 : 1 : Ne(u[1] - e) < ee ? h > 0 ? 1 : 0 : h > 0 ? 3 : 2;
}
function o(u, h) {
return l(u.x, h.x);
}
function l(u, h) {
var d = s(u, 1), f = s(h, 1);
return d !== f ? d - f : d === 0 ? h[1] - u[1] : d === 1 ? u[0] - h[0] : d === 2 ? u[1] - h[1] : h[0] - u[0];
}
return function(u) {
var h = u, d = UT(), f, p, m, _, y, b, x, k, T, C, M, S = {
point: R,
lineStart: B,
lineEnd: w,
polygonStart: L,
polygonEnd: v
};
function R(N, z) {
i(N, z) && h.point(N, z);
}
function A() {
for (var N = 0, z = 0, X = p.length; z < X; ++z)
for (var ct = p[z], J = 1, Y = ct.length, $ = ct[0], lt, ut, W = $[0], tt = $[1]; J < Y; ++J)
lt = W, ut = tt, $ = ct[J], W = $[0], tt = $[1], ut <= n ? tt > n && (W - lt) * (n - ut) > (tt - ut) * (t - lt) && ++N : tt <= n && (W - lt) * (n - ut) < (tt - ut) * (t - lt) && --N;
return N;
}
function L() {
h = d, f = [], p = [], M = !0;
}
function v() {
var N = A(), z = M && N, X = (f = e3(f)).length;
(z || X) && (u.polygonStart(), z && (u.lineStart(), a(null, null, 1, u), u.lineEnd()), X && WT(f, o, N, a, u), u.polygonEnd()), h = u, f = p = m = null;
}
function B() {
S.point = D, p && p.push(m = []), C = !0, T = !1, x = k = NaN;
}
function w() {
f && (D(_, y), b && T && d.rejoin(), f.push(d.result())), S.point = R, T && h.lineEnd();
}
function D(N, z) {
var X = i(N, z);
if (p && m.push([N, z]), C)
_ = N, y = z, b = X, C = !1, X && (h.lineStart(), h.point(N, z));
else if (X && T)
h.point(N, z);
else {
var ct = [x = Math.max(Uu, Math.min(zl, x)), k = Math.max(Uu, Math.min(zl, k))], J = [N = Math.max(Uu, Math.min(zl, N)), z = Math.max(Uu, Math.min(zl, z))];
Uq(ct, J, t, e, r, n) ? (T || (h.lineStart(), h.point(ct[0], ct[1])), h.point(J[0], J[1]), X || h.lineEnd(), M = !1) : X && (h.lineStart(), h.point(N, z), M = !1);
}
x = N, k = z, T = X;
}
return S;
};
}
function Wq() {
var t = 0, e = 0, r = 960, n = 500, i, a, s;
return s = {
stream: function(o) {
return i && a === o ? i : i = L1(t, e, r, n)(a = o);
},
extent: function(o) {
return arguments.length ? (t = +o[0][0], e = +o[0][1], r = +o[1][0], n = +o[1][1], i = a = null, s) : [[t, e], [r, n]];
}
};
}
var Jm, tb, xh, kh, Yo = {
sphere: Je,
point: Je,
lineStart: Hq,
lineEnd: Je,
polygonStart: Je,
polygonEnd: Je
};
function Hq() {
Yo.point = jq, Yo.lineEnd = Gq;
}
function Gq() {
Yo.point = Yo.lineEnd = Je;
}
function jq(t, e) {
t *= ie, e *= ie, tb = t, xh = jt(e), kh = Zt(e), Yo.point = $q;
}
function $q(t, e) {
t *= ie, e *= ie;
var r = jt(e), n = Zt(e), i = Ne(t - tb), a = Zt(i), s = jt(i), o = n * s, l = kh * r - xh * n * a, u = xh * r + kh * n * a;
Jm.add(on(Lr(o * o + l * l), u)), tb = t, xh = r, kh = n;
}
function $T(t) {
return Jm = new wr(), Kn(t, Yo), +Jm;
}
var eb = [null, null], Xq = { type: "LineString", coordinates: eb };
function ff(t, e) {
return eb[0] = t, eb[1] = e, $T(Xq);
}
var Z5 = {
Feature: function(t, e) {
return df(t.geometry, e);
},
FeatureCollection: function(t, e) {
for (var r = t.features, n = -1, i = r.length; ++n < i; )
if (df(r[n].geometry, e))
return !0;
return !1;
}
}, Q5 = {
Sphere: function() {
return !0;
},
Point: function(t, e) {
return J5(t.coordinates, e);
},
MultiPoint: function(t, e) {
for (var r = t.coordinates, n = -1, i = r.length; ++n < i; )
if (J5(r[n], e))
return !0;
return !1;
},
LineString: function(t, e) {
return tv(t.coordinates, e);
},
MultiLineString: function(t, e) {
for (var r = t.coordinates, n = -1, i = r.length; ++n < i; )
if (tv(r[n], e))
return !0;
return !1;
},
Polygon: function(t, e) {
return ev(t.coordinates, e);
},
MultiPolygon: function(t, e) {
for (var r = t.coordinates, n = -1, i = r.length; ++n < i; )
if (ev(r[n], e))
return !0;
return !1;
},
GeometryCollection: function(t, e) {
for (var r = t.geometries, n = -1, i = r.length; ++n < i; )
if (df(r[n], e))
return !0;
return !1;
}
};
function df(t, e) {
return t && Q5.hasOwnProperty(t.type) ? Q5[t.type](t, e) : !1;
}
function J5(t, e) {
return ff(t, e) === 0;
}
function tv(t, e) {
for (var r, n, i, a = 0, s = t.length; a < s; a++) {
if (n = ff(t[a], e), n === 0 || a > 0 && (i = ff(t[a], t[a - 1]), i > 0 && r <= i && n <= i && (r + n - i) * (1 - Math.pow((r - n) / i, 2)) < Ec * i))
return !0;
r = n;
}
return !1;
}
function ev(t, e) {
return !!HT(t.map(Kq), XT(e));
}
function Kq(t) {
return t = t.map(XT), t.pop(), t;
}
function XT(t) {
return [t[0] * ie, t[1] * ie];
}
function Zq(t, e) {
return (t && Z5.hasOwnProperty(t.type) ? Z5[t.type] : df)(t, e);
}
function rv(t, e, r) {
var n = Da(t, e - ee, r).concat(e);
return function(i) {
return n.map(function(a) {
return [i, a];
});
};
}
function nv(t, e, r) {
var n = Da(t, e - ee, r).concat(e);
return function(i) {
return n.map(function(a) {
return [a, i];
});
};
}
function KT() {
var t, e, r, n, i, a, s, o, l = 10, u = l, h = 90, d = 360, f, p, m, _, y = 2.5;
function b() {
return { type: "MultiLineString", coordinates: x() };
}
function x() {
return Da(qu(n / h) * h, r, h).map(m).concat(Da(qu(o / d) * d, s, d).map(_)).concat(Da(qu(e / l) * l, t, l).filter(function(k) {
return Ne(k % h) > ee;
}).map(f)).concat(Da(qu(a / u) * u, i, u).filter(function(k) {
return Ne(k % d) > ee;
}).map(p));
}
return b.lines = function() {
return x().map(function(k) {
return { type: "LineString", coordinates: k };
});
}, b.outline = function() {
return {
type: "Polygon",
coordinates: [
m(n).concat(
_(s).slice(1),
m(r).reverse().slice(1),
_(o).reverse().slice(1)
)
]
};
}, b.extent = function(k) {
return arguments.length ? b.extentMajor(k).extentMinor(k) : b.extentMinor();
}, b.extentMajor = function(k) {
return arguments.length ? (n = +k[0][0], r = +k[1][0], o = +k[0][1], s = +k[1][1], n > r && (k = n, n = r, r = k), o > s && (k = o, o = s, s = k), b.precision(y)) : [[n, o], [r, s]];
}, b.extentMinor = function(k) {
return arguments.length ? (e = +k[0][0], t = +k[1][0], a = +k[0][1], i = +k[1][1], e > t && (k = e, e = t, t = k), a > i && (k = a, a = i, i = k), b.precision(y)) : [[e, a], [t, i]];
}, b.step = function(k) {
return arguments.length ? b.stepMajor(k).stepMinor(k) : b.stepMinor();
}, b.stepMajor = function(k) {
return arguments.length ? (h = +k[0], d = +k[1], b) : [h, d];
}, b.stepMinor = function(k) {
return arguments.length ? (l = +k[0], u = +k[1], b) : [l, u];
}, b.precision = function(k) {
return arguments.length ? (y = +k, f = rv(a, i, 90), p = nv(e, t, y), m = rv(o, s, 90), _ = nv(n, r, y), b) : y;
}, b.extentMajor([[-180, -90 + ee], [180, 90 - ee]]).extentMinor([[-180, -80 - ee], [180, 80 + ee]]);
}
function Qq() {
return KT()();
}
function Jq(t, e) {
var r = t[0] * ie, n = t[1] * ie, i = e[0] * ie, a = e[1] * ie, s = Zt(n), o = jt(n), l = Zt(a), u = jt(a), h = s * Zt(r), d = s * jt(r), f = l * Zt(i), p = l * jt(i), m = 2 * ln(Lr(F5(a - n) + s * l * F5(i - r))), _ = jt(m), y = m ? function(b) {
var x = jt(b *= m) / _, k = jt(m - b) / _, T = k * h + x * f, C = k * d + x * p, M = k * o + x * u;
return [
on(C, T) * Ue,
on(M, Lr(T * T + C * C)) * Ue
];
} : function() {
return [r * Ue, n * Ue];
};
return y.distance = m, y;
}
const Cc = (t) => t;
var ld = new wr(), rb = new wr(), ZT, QT, nb, ib, Ia = {
point: Je,
lineStart: Je,
lineEnd: Je,
polygonStart: function() {
Ia.lineStart = tV, Ia.lineEnd = rV;
},
polygonEnd: function() {
Ia.lineStart = Ia.lineEnd = Ia.point = Je, ld.add(Ne(rb)), rb = new wr();
},
result: function() {
var t = ld / 2;
return ld = new wr(), t;
}
};
function tV() {
Ia.point = eV;
}
function eV(t, e) {
Ia.point = JT, ZT = nb = t, QT = ib = e;
}
function JT(t, e) {
rb.add(ib * t - nb * e), nb = t, ib = e;
}
function rV() {
JT(ZT, QT);
}
const iv = Ia;
var Uo = 1 / 0, pf = Uo, Sc = -Uo, gf = Sc, nV = {
point: iV,
lineStart: Je,
lineEnd: Je,
polygonStart: Je,
polygonEnd: Je,
result: function() {
var t = [[Uo, pf], [Sc, gf]];
return Sc = gf = -(pf = Uo = 1 / 0), t;
}
};
function iV(t, e) {
t < Uo && (Uo = t), t > Sc && (Sc = t), e < pf && (pf = e), e > gf && (gf = e);
}
const yf = nV;
var ab = 0, sb = 0, Yl = 0, mf = 0, bf = 0, _o = 0, ob = 0, lb = 0, Ul = 0, tE, eE, Ei, Ci, Zn = {
point: Ns,
lineStart: av,
lineEnd: sv,
polygonStart: function() {
Zn.lineStart = oV, Zn.lineEnd = lV;
},
polygonEnd: function() {
Zn.point = Ns, Zn.lineStart = av, Zn.lineEnd = sv;
},
result: function() {
var t = Ul ? [ob / Ul, lb / Ul] : _o ? [mf / _o, bf / _o] : Yl ? [ab / Yl, sb / Yl] : [NaN, NaN];
return ab = sb = Yl = mf = bf = _o = ob = lb = Ul = 0, t;
}
};
function Ns(t, e) {
ab += t, sb += e, ++Yl;
}
function av() {
Zn.point = aV;
}
function aV(t, e) {
Zn.point = sV, Ns(Ei = t, Ci = e);
}
function sV(t, e) {
var r = t - Ei, n = e - Ci, i = Lr(r * r + n * n);
mf += i * (Ei + t) / 2, bf += i * (Ci + e) / 2, _o += i, Ns(Ei = t, Ci = e);
}
function sv() {
Zn.point = Ns;
}
function oV() {
Zn.point = cV;
}
function lV() {
rE(tE, eE);
}
function cV(t, e) {
Zn.point = rE, Ns(tE = Ei = t, eE = Ci = e);
}
function rE(t, e) {
var r = t - Ei, n = e - Ci, i = Lr(r * r + n * n);
mf += i * (Ei + t) / 2, bf += i * (Ci + e) / 2, _o += i, i = Ci * t - Ei * e, ob += i * (Ei + t), lb += i * (Ci + e), Ul += i * 3, Ns(Ei = t, Ci = e);
}
const ov = Zn;
function nE(t) {
this._context = t;
}
nE.prototype = {
_radius: 4.5,
pointRadius: function(t) {
return this._radius = t, this;
},
polygonStart: function() {
this._line = 0;
},
polygonEnd: function() {
this._line = NaN;
},
lineStart: function() {
this._point = 0;
},
lineEnd: function() {
this._line === 0 && this._context.closePath(), this._point = NaN;
},
point: function(t, e) {
switch (this._point) {
case 0: {
this._context.moveTo(t, e), this._point = 1;
break;
}
case 1: {
this._context.lineTo(t, e);
break;
}
default: {
this._context.moveTo(t + this._radius, e), this._context.arc(t, e, this._radius, 0, sn);
break;
}
}
},
result: Je
};
var cb = new wr(), cd, iE, aE, Wl, Hl, _f = {
point: Je,
lineStart: function() {
_f.point = uV;
},
lineEnd: function() {
cd && sE(iE, aE), _f.point = Je;
},
polygonStart: function() {
cd = !0;
},
polygonEnd: function() {
cd = null;
},
result: function() {
var t = +cb;
return cb = new wr(), t;
}
};
function uV(t, e) {
_f.point = sE, iE = Wl = t, aE = Hl = e;
}
function sE(t, e) {
Wl -= t, Hl -= e, cb.add(Lr(Wl * Wl + Hl * Hl)), Wl = t, Hl = e;
}
const lv = _f;
function oE() {
this._string = [];
}
oE.prototype = {
_radius: 4.5,
_circle: cv(4.5),
pointRadius: function(t) {
return (t = +t) !== this._radius && (this._radius = t, this._circle = null), this;
},
polygonStart: function() {
this._line = 0;
},
polygonEnd: function() {
this._line = NaN;
},
lineStart: function() {
this._point = 0;
},
lineEnd: function() {
this._line === 0 && this._string.push("Z"), this._point = NaN;
},
point: function(t, e) {
switch (this._point) {
case 0: {
this._string.push("M", t, ",", e), this._point = 1;
break;
}
case 1: {
this._string.push("L", t, ",", e);
break;
}
default: {
this._circle == null && (this._circle = cv(this._radius)), this._string.push("M", t, ",", e, this._circle);
break;
}
}
},
result: function() {
if (this._string.length) {
var t = this._string.join("");
return this._string = [], t;
} else
return null;
}
};
function cv(t) {
return "m0," + t + "a" + t + "," + t + " 0 1,1 0," + -2 * t + "a" + t + "," + t + " 0 1,1 0," + 2 * t + "z";
}
function hV(t, e) {
var r = 4.5, n, i;
function a(s) {
return s && (typeof r == "function" && i.pointRadius(+r.apply(this, arguments)), Kn(s, n(i))), i.result();
}
return a.area = function(s) {
return Kn(s, n(iv)), iv.result();
}, a.measure = function(s) {
return Kn(s, n(lv)), lv.result();
}, a.bounds = function(s) {
return Kn(s, n(yf)), yf.result();
}, a.centroid = function(s) {
return Kn(s, n(ov)), ov.result();
}, a.projection = function(s) {
return arguments.length ? (n = s == null ? (t = null, Cc) : (t = s).stream, a) : t;
}, a.context = function(s) {
return arguments.length ? (i = s == null ? (e = null, new oE()) : new nE(e = s), typeof r != "function" && i.pointRadius(r), a) : e;
}, a.pointRadius = function(s) {
return arguments.length ? (r = typeof s == "function" ? s : (i.pointRadius(+s), +s), a) : r;
}, a.projection(t).context(e);
}
function fV(t) {
return {
stream: tu(t)
};
}
function tu(t) {
return function(e) {
var r = new ub();
for (var n in t)
r[n] = t[n];
return r.stream = e, r;
};
}
function ub() {
}
ub.prototype = {
constructor: ub,
point: function(t, e) {
this.stream.point(t, e);
},
sphere: function() {
this.stream.sphere();
},
lineStart: function() {
this.stream.lineStart();
},
lineEnd: function() {
this.stream.lineEnd();
},
polygonStart: function() {
this.stream.polygonStart();
},
polygonEnd: function() {
this.stream.polygonEnd();
}
};
function S3(t, e, r) {
var n = t.clipExtent && t.clipExtent();
return t.scale(150).translate([0, 0]), n != null && t.clipExtent(null), Kn(r, t.stream(yf)), e(yf.result()), n != null && t.clipExtent(n), t;
}
function R1(t, e, r) {
return S3(t, function(n) {
var i = e[1][0] - e[0][0], a = e[1][1] - e[0][1], s = Math.min(i / (n[1][0] - n[0][0]), a / (n[1][1] - n[0][1])), o = +e[0][0] + (i - s * (n[1][0] + n[0][0])) / 2, l = +e[0][1] + (a - s * (n[1][1] + n[0][1])) / 2;
t.scale(150 * s).translate([o, l]);
}, r);
}
function A3(t, e, r) {
return R1(t, [[0, 0], e], r);
}
function M3(t, e, r) {
return S3(t, function(n) {
var i = +e, a = i / (n[1][0] - n[0][0]), s = (i - a * (n[1][0] + n[0][0])) / 2, o = -a * n[0][1];
t.scale(150 * a).translate([s, o]);
}, r);
}
function L3(t, e, r) {
return S3(t, function(n) {
var i = +e, a = i / (n[1][1] - n[0][1]), s = -a * n[0][0], o = (i - a * (n[1][1] + n[0][1])) / 2;
t.scale(150 * a).translate([s, o]);
}, r);
}
var uv = 16, dV = Zt(30 * ie);
function hv(t, e) {
return +e ? gV(t, e) : pV(t);
}
function pV(t) {
return tu({
point: function(e, r) {
e = t(e, r), this.stream.point(e[0], e[1]);
}
});
}
function gV(t, e) {
function r(n, i, a, s, o, l, u, h, d, f, p, m, _, y) {
var b = u - n, x = h - i, k = b * b + x * x;
if (k > 4 * e && _--) {
var T = s + f, C = o + p, M = l + m, S = Lr(T * T + C * C + M * M), R = ln(M /= S), A = Ne(Ne(M) - 1) < ee || Ne(a - d) < ee ? (a + d) / 2 : on(C, T), L = t(A, R), v = L[0], B = L[1], w = v - n, D = B - i, N = x * w - b * D;
(N * N / k > e || Ne((b * w + x * D) / k - 0.5) > 0.3 || s * f + o * p + l * m < dV) && (r(n, i, a, s, o, l, v, B, A, T /= S, C /= S, M, _, y), y.point(v, B), r(v, B, A, T, C, M, u, h, d, f, p, m, _, y));
}
}
return function(n) {
var i, a, s, o, l, u, h, d, f, p, m, _, y = {
point: b,
lineStart: x,
lineEnd: T,
polygonStart: function() {
n.polygonStart(), y.lineStart = C;
},
polygonEnd: function() {
n.polygonEnd(), y.lineStart = x;
}
};
function b(R, A) {
R = t(R, A), n.point(R[0], R[1]);
}
function x() {
d = NaN, y.point = k, n.lineStart();
}
function k(R, A) {
var L = Is([R, A]), v = t(R, A);
r(d, f, h, p, m, _, d = v[0], f = v[1], h = R, p = L[0], m = L[1], _ = L[2], uv, n), n.point(d, f);
}
function T() {
y.point = b, n.lineEnd();
}
function C() {
x(), y.point = M, y.lineEnd = S;
}
function M(R, A) {
k(i = R, A), a = d, s = f, o = p, l = m, u = _, y.point = k;
}
function S() {
r(d, f, h, p, m, _, a, s, i, o, l, u, uv, n), y.lineEnd = T, T();
}
return y;
};
}
var yV = tu({
point: function(t, e) {
this.stream.point(t * ie, e * ie);
}
});
function mV(t) {
return tu({
point: function(e, r) {
var n = t(e, r);
return this.stream.point(n[0], n[1]);
}
});
}
function bV(t, e, r, n, i) {
function a(s, o) {
return s *= n, o *= i, [e + t * s, r - t * o];
}
return a.invert = function(s, o) {
return [(s - e) / t * n, (r - o) / t * i];
}, a;
}
function fv(t, e, r, n, i, a) {
if (!a)
return bV(t, e, r, n, i);
var s = Zt(a), o = jt(a), l = s * t, u = o * t, h = s / t, d = o / t, f = (o * r - s * e) / t, p = (o * e + s * r) / t;
function m(_, y) {
return _ *= n, y *= i, [l * _ - u * y + e, r - u * _ - l * y];
}
return m.invert = function(_, y) {
return [n * (h * _ - d * y + f), i * (p - d * _ - h * y)];
}, m;
}
function zi(t) {
return R3(function() {
return t;
})();
}
function R3(t) {
var e, r = 150, n = 480, i = 250, a = 0, s = 0, o = 0, l = 0, u = 0, h, d = 0, f = 1, p = 1, m = null, _ = Qm, y = null, b, x, k, T = Cc, C = 0.5, M, S, R, A, L;
function v(N) {
return R(N[0] * ie, N[1] * ie);
}
function B(N) {
return N = R.invert(N[0], N[1]), N && [N[0] * Ue, N[1] * Ue];
}
v.stream = function(N) {
return A && L === N ? A : A = yV(mV(h)(_(M(T(L = N)))));
}, v.preclip = function(N) {
return arguments.length ? (_ = N, m = void 0, D()) : _;
}, v.postclip = function(N) {
return arguments.length ? (T = N, y = b = x = k = null, D()) : T;
}, v.clipAngle = function(N) {
return arguments.length ? (_ = +N ? jT(m = N * ie) : (m = null, Qm), D()) : m * Ue;
}, v.clipExtent = function(N) {
return arguments.length ? (T = N == null ? (y = b = x = k = null, Cc) : L1(y = +N[0][0], b = +N[0][1], x = +N[1][0], k = +N[1][1]), D()) : y == null ? null : [[y, b], [x, k]];
}, v.scale = function(N) {
return arguments.length ? (r = +N, w()) : r;
}, v.translate = function(N) {
return arguments.length ? (n = +N[0], i = +N[1], w()) : [n, i];
}, v.center = function(N) {
return arguments.length ? (a = N[0] % 360 * ie, s = N[1] % 360 * ie, w()) : [a * Ue, s * Ue];
}, v.rotate = function(N) {
return arguments.length ? (o = N[0] % 360 * ie, l = N[1] % 360 * ie, u = N.length > 2 ? N[2] % 360 * ie : 0, w()) : [o * Ue, l * Ue, u * Ue];
}, v.angle = function(N) {
return arguments.length ? (d = N % 360 * ie, w()) : d * Ue;
}, v.reflectX = function(N) {
return arguments.length ? (f = N ? -1 : 1, w()) : f < 0;
}, v.reflectY = function(N) {
return arguments.length ? (p = N ? -1 : 1, w()) : p < 0;
}, v.precision = function(N) {
return arguments.length ? (M = hv(S, C = N * N), D()) : Lr(C);
}, v.fitExtent = function(N, z) {
return R1(v, N, z);
}, v.fitSize = function(N, z) {
return A3(v, N, z);
}, v.fitWidth = function(N, z) {
return M3(v, N, z);
}, v.fitHeight = function(N, z) {
return L3(v, N, z);
};
function w() {
var N = fv(r, 0, 0, f, p, d).apply(null, e(a, s)), z = fv(r, n - N[0], i - N[1], f, p, d);
return h = C3(o, l, u), S = Km(e, z), R = Km(h, S), M = hv(S, C), D();
}
function D() {
return A = L = null, v;
}
return function() {
return e = t.apply(this, arguments), v.invert = e.invert && B, w();
};
}
function I3(t) {
var e = 0, r = Se / 3, n = R3(t), i = n(e, r);
return i.parallels = function(a) {
return arguments.length ? n(e = a[0] * ie, r = a[1] * ie) : [e * Ue, r * Ue];
}, i;
}
function _V(t) {
var e = Zt(t);
function r(n, i) {
return [n * e, jt(i) / e];
}
return r.invert = function(n, i) {
return [n / e, ln(i * e)];
}, r;
}
function lE(t, e) {
var r = jt(t), n = (r + jt(e)) / 2;
if (Ne(n) < ee)
return _V(t);
var i = 1 + r * (2 * n - r), a = Lr(i) / n;
function s(o, l) {
var u = Lr(i - 2 * n * jt(l)) / n;
return [u * jt(o *= n), a - u * Zt(o)];
}
return s.invert = function(o, l) {
var u = a - l, h = on(o, Ne(u)) * On(u);
return u * n < 0 && (h -= Se * On(o) * On(u)), [h / n, ln((i - (o * o + u * u) * n * n) / (2 * n))];
}, s;
}
function vf() {
return I3(lE).scale(155.424).center([0, 33.6442]);
}
function cE() {
return vf().parallels([29.5, 45.5]).scale(1070).translate([480, 250]).rotate([96, 0]).center([-0.6, 38.7]);
}
function vV(t) {
var e = t.length;
return {
point: function(r, n) {
for (var i = -1; ++i < e; )
t[i].point(r, n);
},
sphere: function() {
for (var r = -1; ++r < e; )
t[r].sphere();
},
lineStart: function() {
for (var r = -1; ++r < e; )
t[r].lineStart();
},
lineEnd: function() {
for (var r = -1; ++r < e; )
t[r].lineEnd();
},
polygonStart: function() {
for (var r = -1; ++r < e; )
t[r].polygonStart();
},
polygonEnd: function() {
for (var r = -1; ++r < e; )
t[r].polygonEnd();
}
};
}
function xV() {
var t, e, r = cE(), n, i = vf().rotate([154, 0]).center([-2, 58.5]).parallels([55, 65]), a, s = vf().rotate([157, 0]).center([-3, 19.9]).parallels([8, 18]), o, l, u = { point: function(f, p) {
l = [f, p];
} };
function h(f) {
var p = f[0], m = f[1];
return l = null, n.point(p, m), l || (a.point(p, m), l) || (o.point(p, m), l);
}
h.invert = function(f) {
var p = r.scale(), m = r.translate(), _ = (f[0] - m[0]) / p, y = (f[1] - m[1]) / p;
return (y >= 0.12 && y < 0.234 && _ >= -0.425 && _ < -0.214 ? i : y >= 0.166 && y < 0.234 && _ >= -0.214 && _ < -0.115 ? s : r).invert(f);
}, h.stream = function(f) {
return t && e === f ? t : t = vV([r.stream(e = f), i.stream(f), s.stream(f)]);
}, h.precision = function(f) {
return arguments.length ? (r.precision(f), i.precision(f), s.precision(f), d()) : r.precision();
}, h.scale = function(f) {
return arguments.length ? (r.scale(f), i.scale(f * 0.35), s.scale(f), h.translate(r.translate())) : r.scale();
}, h.translate = function(f) {
if (!arguments.length)
return r.translate();
var p = r.scale(), m = +f[0], _ = +f[1];
return n = r.translate(f).clipExtent([[m - 0.455 * p, _ - 0.238 * p], [m + 0.455 * p, _ + 0.238 * p]]).stream(u), a = i.translate([m - 0.307 * p, _ + 0.201 * p]).clipExtent([[m - 0.425 * p + ee, _ + 0.12 * p + ee], [m - 0.214 * p - ee, _ + 0.234 * p - ee]]).stream(u), o = s.translate([m - 0.205 * p, _ + 0.212 * p]).clipExtent([[m - 0.214 * p + ee, _ + 0.166 * p + ee], [m - 0.115 * p - ee, _ + 0.234 * p - ee]]).stream(u), d();
}, h.fitExtent = function(f, p) {
return R1(h, f, p);
}, h.fitSize = function(f, p) {
return A3(h, f, p);
}, h.fitWidth = function(f, p) {
return M3(h, f, p);
}, h.fitHeight = function(f, p) {
return L3(h, f, p);
};
function d() {
return t = e = null, h;
}
return h.scale(1070);
}
function uE(t) {
return function(e, r) {
var n = Zt(e), i = Zt(r), a = t(n * i);
return a === 1 / 0 ? [2, 0] : [
a * i * jt(e),
a * jt(r)
];
};
}
function eu(t) {
return function(e, r) {
var n = Lr(e * e + r * r), i = t(n), a = jt(i), s = Zt(i);
return [
on(e * a, n * s),
ln(n && r * a / n)
];
};
}
var N3 = uE(function(t) {
return Lr(2 / (1 + t));
});
N3.invert = eu(function(t) {
return 2 * ln(t / 2);
});
function kV() {
return zi(N3).scale(124.75).clipAngle(180 - 1e-3);
}
var B3 = uE(function(t) {
return (t = LT(t)) && t / jt(t);
});
B3.invert = eu(function(t) {
return t;
});
function wV() {
return zi(B3).scale(79.4188).clipAngle(180 - 1e-3);
}
function ru(t, e) {
return [t, Qh(T3((ar + e) / 2))];
}
ru.invert = function(t, e) {
return [t, 2 * sl(MT(e)) - ar];
};
function TV() {
return hE(ru).scale(961 / sn);
}
function hE(t) {
var e = zi(t), r = e.center, n = e.scale, i = e.translate, a = e.clipExtent, s = null, o, l, u;
e.scale = function(d) {
return arguments.length ? (n(d), h()) : n();
}, e.translate = function(d) {
return arguments.length ? (i(d), h()) : i();
}, e.center = function(d) {
return arguments.length ? (r(d), h()) : r();
}, e.clipExtent = function(d) {
return arguments.length ? (d == null ? s = o = l = u = null : (s = +d[0][0], o = +d[0][1], l = +d[1][0], u = +d[1][1]), h()) : s == null ? null : [[s, o], [l, u]];
};
function h() {
var d = Se * n(), f = e(zT(e.rotate()).invert([0, 0]));
return a(s == null ? [[f[0] - d, f[1] - d], [f[0] + d, f[1] + d]] : t === ru ? [[Math.max(f[0] - d, s), o], [Math.min(f[0] + d, l), u]] : [[s, Math.max(f[1] - d, o)], [l, Math.min(f[1] + d, u)]]);
}
return h();
}
function Wu(t) {
return T3((ar + t) / 2);
}
function fE(t, e) {
var r = Zt(t), n = t === e ? jt(t) : Qh(r / Zt(e)) / Qh(Wu(e) / Wu(t)), i = r * ad(Wu(t), n) / n;
if (!n)
return ru;
function a(s, o) {
i > 0 ? o < -ar + ee && (o = -ar + ee) : o > ar - ee && (o = ar - ee);
var l = i / ad(Wu(o), n);
return [l * jt(n * s), i - l * Zt(n * s)];
}
return a.invert = function(s, o) {
var l = i - o, u = On(n) * Lr(s * s + l * l), h = on(s, Ne(l)) * On(l);
return l * n < 0 && (h -= Se * On(s) * On(l)), [h / n, 2 * sl(ad(i / u, 1 / n)) - ar];
}, a;
}
function EV() {
return I3(fE).scale(109.5).parallels([30, 30]);
}
function Ac(t, e) {
return [t, e];
}
Ac.invert = Ac;
function CV() {
return zi(Ac).scale(152.63);
}
function dE(t, e) {
var r = Zt(t), n = t === e ? jt(t) : (r - Zt(e)) / (e - t), i = r / n + t;
if (Ne(n) < ee)
return Ac;
function a(s, o) {
var l = i - o, u = n * s;
return [l * jt(u), i - l * Zt(u)];
}
return a.invert = function(s, o) {
var l = i - o, u = on(s, Ne(l)) * On(l);
return l * n < 0 && (u -= Se * On(s) * On(l)), [u / n, i - On(n) * Lr(s * s + l * l)];
}, a;
}
function SV() {
return I3(dE).scale(131.154).center([0, 13.9389]);
}
var tc = 1.340264, ec = -0.081106, rc = 893e-6, nc = 3796e-6, xf = Lr(3) / 2, AV = 12;
function D3(t, e) {
var r = ln(xf * jt(e)), n = r * r, i = n * n * n;
return [
t * Zt(r) / (xf * (tc + 3 * ec * n + i * (7 * rc + 9 * nc * n))),
r * (tc + ec * n + i * (rc + nc * n))
];
}
D3.invert = function(t, e) {
for (var r = e, n = r * r, i = n * n * n, a = 0, s, o, l; a < AV && (o = r * (tc + ec * n + i * (rc + nc * n)) - e, l = tc + 3 * ec * n + i * (7 * rc + 9 * nc * n), r -= s = o / l, n = r * r, i = n * n * n, !(Ne(s) < Ec)); ++a)
;
return [
xf * t * (tc + 3 * ec * n + i * (7 * rc + 9 * nc * n)) / Zt(r),
ln(jt(r) / xf)
];
};
function MV() {
return zi(D3).scale(177.158);
}
function O3(t, e) {
var r = Zt(e), n = Zt(t) * r;
return [r * jt(t) / n, jt(e) / n];
}
O3.invert = eu(sl);
function LV() {
return zi(O3).scale(144.049).clipAngle(60);
}
function RV() {
var t = 1, e = 0, r = 0, n = 1, i = 1, a = 0, s, o, l = null, u, h, d, f = 1, p = 1, m = tu({
point: function(T, C) {
var M = k([T, C]);
this.stream.point(M[0], M[1]);
}
}), _ = Cc, y, b;
function x() {
return f = t * n, p = t * i, y = b = null, k;
}
function k(T) {
var C = T[0] * f, M = T[1] * p;
if (a) {
var S = M * s - C * o;
C = C * s + M * o, M = S;
}
return [C + e, M + r];
}
return k.invert = function(T) {
var C = T[0] - e, M = T[1] - r;
if (a) {
var S = M * s + C * o;
C = C * s - M * o, M = S;
}
return [C / f, M / p];
}, k.stream = function(T) {
return y && b === T ? y : y = m(_(b = T));
}, k.postclip = function(T) {
return arguments.length ? (_ = T, l = u = h = d = null, x()) : _;
}, k.clipExtent = function(T) {
return arguments.length ? (_ = T == null ? (l = u = h = d = null, Cc) : L1(l = +T[0][0], u = +T[0][1], h = +T[1][0], d = +T[1][1]), x()) : l == null ? null : [[l, u], [h, d]];
}, k.scale = function(T) {
return arguments.length ? (t = +T, x()) : t;
}, k.translate = function(T) {
return arguments.length ? (e = +T[0], r = +T[1], x()) : [e, r];
}, k.angle = function(T) {
return arguments.length ? (a = T % 360 * ie, o = jt(a), s = Zt(a), x()) : a * Ue;
}, k.reflectX = function(T) {
return arguments.length ? (n = T ? -1 : 1, x()) : n < 0;
}, k.reflectY = function(T) {
return arguments.length ? (i = T ? -1 : 1, x()) : i < 0;
}, k.fitExtent = function(T, C) {
return R1(k, T, C);
}, k.fitSize = function(T, C) {
return A3(k, T, C);
}, k.fitWidth = function(T, C) {
return M3(k, T, C);
}, k.fitHeight = function(T, C) {
return L3(k, T, C);
}, k;
}
function F3(t, e) {
var r = e * e, n = r * r;
return [
t * (0.8707 - 0.131979 * r + n * (-0.013791 + n * (3971e-6 * r - 1529e-6 * n))),
e * (1.007226 + r * (0.015085 + n * (-0.044475 + 0.028874 * r - 5916e-6 * n)))
];
}
F3.invert = function(t, e) {
var r = e, n = 25, i;
do {
var a = r * r, s = a * a;
r -= i = (r * (1.007226 + a * (0.015085 + s * (-0.044475 + 0.028874 * a - 5916e-6 * s))) - e) / (1.007226 + a * (0.015085 * 3 + s * (-0.044475 * 7 + 0.028874 * 9 * a - 5916e-6 * 11 * s)));
} while (Ne(i) > ee && --n > 0);
return [
t / (0.8707 + (a = r * r) * (-0.131979 + a * (-0.013791 + a * a * a * (3971e-6 - 1529e-6 * a)))),
r
];
};
function IV() {
return zi(F3).scale(175.295);
}
function P3(t, e) {
return [Zt(e) * jt(t), jt(e)];
}
P3.invert = eu(ln);
function NV() {
return zi(P3).scale(249.5).clipAngle(90 + ee);
}
function q3(t, e) {
var r = Zt(e), n = 1 + Zt(t) * r;
return [r * jt(t) / n, jt(e) / n];
}
q3.invert = eu(function(t) {
return 2 * sl(t);
});
function BV() {
return zi(q3).scale(250).clipAngle(142);
}
function V3(t, e) {
return [Qh(T3((ar + e) / 2)), -t];
}
V3.invert = function(t, e) {
return [-e, 2 * sl(MT(t)) - ar];
};
function DV() {
var t = hE(V3), e = t.center, r = t.rotate;
return t.center = function(n) {
return arguments.length ? e([-n[1], n[0]]) : (n = e(), [n[1], -n[0]]);
}, t.rotate = function(n) {
return arguments.length ? r([n[0], n[1], n.length > 2 ? n[2] + 90 : 90]) : (n = r(), [n[0], n[1], n[2] - 90]);
}, r([0, 0, 90]).scale(159.155);
}
function OV(t, e) {
return t.parent === e.parent ? 1 : 2;
}
function FV(t) {
return t.reduce(PV, 0) / t.length;
}
function PV(t, e) {
return t + e.x;
}
function qV(t) {
return 1 + t.reduce(VV, 0);
}
function VV(t, e) {
return Math.max(t, e.y);
}
function zV(t) {
for (var e; e = t.children; )
t = e[0];
return t;
}
function YV(t) {
for (var e; e = t.children; )
t = e[e.length - 1];
return t;
}
function UV() {
var t = OV, e = 1, r = 1, n = !1;
function i(a) {
var s, o = 0;
a.eachAfter(function(f) {
var p = f.children;
p ? (f.x = FV(p), f.y = qV(p)) : (f.x = s ? o += t(f, s) : 0, f.y = 0, s = f);
});
var l = zV(a), u = YV(a), h = l.x - t(l, u) / 2, d = u.x + t(u, l) / 2;
return a.eachAfter(n ? function(f) {
f.x = (f.x - a.x) * e, f.y = (a.y - f.y) * r;
} : function(f) {
f.x = (f.x - h) / (d - h) * e, f.y = (1 - (a.y ? f.y / a.y : 1)) * r;
});
}
return i.separation = function(a) {
return arguments.length ? (t = a, i) : t;
}, i.size = function(a) {
return arguments.length ? (n = !1, e = +a[0], r = +a[1], i) : n ? null : [e, r];
}, i.nodeSize = function(a) {
return arguments.length ? (n = !0, e = +a[0], r = +a[1], i) : n ? [e, r] : null;
}, i;
}
function WV(t) {
var e = 0, r = t.children, n = r && r.length;
if (!n)
e = 1;
else
for (; --n >= 0; )
e += r[n].value;
t.value = e;
}
function HV() {
return this.eachAfter(WV);
}
function GV(t, e) {
let r = -1;
for (const n of this)
t.call(e, n, ++r, this);
return this;
}
function jV(t, e) {
for (var r = this, n = [r], i, a, s = -1; r = n.pop(); )
if (t.call(e, r, ++s, this), i = r.children)
for (a = i.length - 1; a >= 0; --a)
n.push(i[a]);
return this;
}
function $V(t, e) {
for (var r = this, n = [r], i = [], a, s, o, l = -1; r = n.pop(); )
if (i.push(r), a = r.children)
for (s = 0, o = a.length; s < o; ++s)
n.push(a[s]);
for (; r = i.pop(); )
t.call(e, r, ++l, this);
return this;
}
function XV(t, e) {
let r = -1;
for (const n of this)
if (t.call(e, n, ++r, this))
return n;
}
function KV(t) {
return this.eachAfter(function(e) {
for (var r = +t(e.data) || 0, n = e.children, i = n && n.length; --i >= 0; )
r += n[i].value;
e.value = r;
});
}
function ZV(t) {
return this.eachBefore(function(e) {
e.children && e.children.sort(t);
});
}
function QV(t) {
for (var e = this, r = JV(e, t), n = [e]; e !== r; )
e = e.parent, n.push(e);
for (var i = n.length; t !== r; )
n.splice(i, 0, t), t = t.parent;
return n;
}
function JV(t, e) {
if (t === e)
return t;
var r = t.ancestors(), n = e.ancestors(), i = null;
for (t = r.pop(), e = n.pop(); t === e; )
i = t, t = r.pop(), e = n.pop();
return i;
}
function tz() {
for (var t = this, e = [t]; t = t.parent; )
e.push(t);
return e;
}
function ez() {
return Array.from(this);
}
function rz() {
var t = [];
return this.eachBefore(function(e) {
e.children || t.push(e);
}), t;
}
function nz() {
var t = this, e = [];
return t.each(function(r) {
r !== t && e.push({ source: r.parent, target: r });
}), e;
}
function* iz() {
var t = this, e, r = [t], n, i, a;
do
for (e = r.reverse(), r = []; t = e.pop(); )
if (yield t, n = t.children)
for (i = 0, a = n.length; i < a; ++i)
r.push(n[i]);
while (r.length);
}
function z3(t, e) {
t instanceof Map ? (t = [void 0, t], e === void 0 && (e = oz)) : e === void 0 && (e = sz);
for (var r = new Bs(t), n, i = [r], a, s, o, l; n = i.pop(); )
if ((s = e(n.data)) && (l = (s = Array.from(s)).length))
for (n.children = s, o = l - 1; o >= 0; --o)
i.push(a = s[o] = new Bs(s[o])), a.parent = n, a.depth = n.depth + 1;
return r.eachBefore(pE);
}
function az() {
return z3(this).eachBefore(lz);
}
function sz(t) {
return t.children;
}
function oz(t) {
return Array.isArray(t) ? t[1] : null;
}
function lz(t) {
t.data.value !== void 0 && (t.value = t.data.value), t.data = t.data.data;
}
function pE(t) {
var e = 0;
do
t.height = e;
while ((t = t.parent) && t.height < ++e);
}
function Bs(t) {
this.data = t, this.depth = this.height = 0, this.parent = null;
}
Bs.prototype = z3.prototype = {
constructor: Bs,
count: HV,
each: GV,
eachAfter: $V,
eachBefore: jV,
find: XV,
sum: KV,
sort: ZV,
path: QV,
ancestors: tz,
descendants: ez,
leaves: rz,
links: nz,
copy: az,
[Symbol.iterator]: iz
};
function wh(t) {
return t == null ? null : gE(t);
}
function gE(t) {
if (typeof t != "function")
throw new Error();
return t;
}
function bs() {
return 0;
}
function yo(t) {
return function() {
return t;
};
}
const cz = 1664525, uz = 1013904223, dv = 4294967296;
function Y3() {
let t = 1;
return () => (t = (cz * t + uz) % dv) / dv;
}
function hz(t) {
return typeof t == "object" && "length" in t ? t : Array.from(t);
}
function fz(t, e) {
let r = t.length, n, i;
for (; r; )
i = e() * r-- | 0, n = t[r], t[r] = t[i], t[i] = n;
return t;
}
function dz(t) {
return yE(t, Y3());
}
function yE(t, e) {
for (var r = 0, n = (t = fz(Array.from(t), e)).length, i = [], a, s; r < n; )
a = t[r], s && mE(s, a) ? ++r : (s = gz(i = pz(i, a)), r = 0);
return s;
}
function pz(t, e) {
var r, n;
if (ud(e, t))
return [e];
for (r = 0; r < t.length; ++r)
if (Hu(e, t[r]) && ud(Gl(t[r], e), t))
return [t[r], e];
for (r = 0; r < t.length - 1; ++r)
for (n = r + 1; n < t.length; ++n)
if (Hu(Gl(t[r], t[n]), e) && Hu(Gl(t[r], e), t[n]) && Hu(Gl(t[n], e), t[r]) && ud(bE(t[r], t[n], e), t))
return [t[r], t[n], e];
throw new Error();
}
function Hu(t, e) {
var r = t.r - e.r, n = e.x - t.x, i = e.y - t.y;
return r < 0 || r * r < n * n + i * i;
}
function mE(t, e) {
var r = t.r - e.r + Math.max(t.r, e.r, 1) * 1e-9, n = e.x - t.x, i = e.y - t.y;
return r > 0 && r * r > n * n + i * i;
}
function ud(t, e) {
for (var r = 0; r < e.length; ++r)
if (!mE(t, e[r]))
return !1;
return !0;
}
function gz(t) {
switch (t.length) {
case 1:
return yz(t[0]);
case 2:
return Gl(t[0], t[1]);
case 3:
return bE(t[0], t[1], t[2]);
}
}
function yz(t) {
return {
x: t.x,
y: t.y,
r: t.r
};
}
function Gl(t, e) {
var r = t.x, n = t.y, i = t.r, a = e.x, s = e.y, o = e.r, l = a - r, u = s - n, h = o - i, d = Math.sqrt(l * l + u * u);
return {
x: (r + a + l / d * h) / 2,
y: (n + s + u / d * h) / 2,
r: (d + i + o) / 2
};
}
function bE(t, e, r) {
var n = t.x, i = t.y, a = t.r, s = e.x, o = e.y, l = e.r, u = r.x, h = r.y, d = r.r, f = n - s, p = n - u, m = i - o, _ = i - h, y = l - a, b = d - a, x = n * n + i * i - a * a, k = x - s * s - o * o + l * l, T = x - u * u - h * h + d * d, C = p * m - f * _, M = (m * T - _ * k) / (C * 2) - n, S = (_ * y - m * b) / C, R = (p * k - f * T) / (C * 2) - i, A = (f * b - p * y) / C, L = S * S + A * A - 1, v = 2 * (a + M * S + R * A), B = M * M + R * R - a * a, w = -(Math.abs(L) > 1e-6 ? (v + Math.sqrt(v * v - 4 * L * B)) / (2 * L) : B / v);
return {
x: n + M + S * w,
y: i + R + A * w,
r: w
};
}
function pv(t, e, r) {
var n = t.x - e.x, i, a, s = t.y - e.y, o, l, u = n * n + s * s;
u ? (a = e.r + r.r, a *= a, l = t.r + r.r, l *= l, a > l ? (i = (u + l - a) / (2 * u), o = Math.sqrt(Math.max(0, l / u - i * i)), r.x = t.x - i * n - o * s, r.y = t.y - i * s + o * n) : (i = (u + a - l) / (2 * u), o = Math.sqrt(Math.max(0, a / u - i * i)), r.x = e.x + i * n - o * s, r.y = e.y + i * s + o * n)) : (r.x = e.x + r.r, r.y = e.y);
}
function gv(t, e) {
var r = t.r + e.r - 1e-6, n = e.x - t.x, i = e.y - t.y;
return r > 0 && r * r > n * n + i * i;
}
function yv(t) {
var e = t._, r = t.next._, n = e.r + r.r, i = (e.x * r.r + r.x * e.r) / n, a = (e.y * r.r + r.y * e.r) / n;
return i * i + a * a;
}
function Gu(t) {
this._ = t, this.next = null, this.previous = null;
}
function _E(t, e) {
if (!(a = (t = hz(t)).length))
return 0;
var r, n, i, a, s, o, l, u, h, d, f;
if (r = t[0], r.x = 0, r.y = 0, !(a > 1))
return r.r;
if (n = t[1], r.x = -n.r, n.x = r.r, n.y = 0, !(a > 2))
return r.r + n.r;
pv(n, r, i = t[2]), r = new Gu(r), n = new Gu(n), i = new Gu(i), r.next = i.previous = n, n.next = r.previous = i, i.next = n.previous = r;
t:
for (l = 3; l < a; ++l) {
pv(r._, n._, i = t[l]), i = new Gu(i), u = n.next, h = r.previous, d = n._.r, f = r._.r;
do
if (d <= f) {
if (gv(u._, i._)) {
n = u, r.next = n, n.previous = r, --l;
continue t;
}
d += u._.r, u = u.next;
} else {
if (gv(h._, i._)) {
r = h, r.next = n, n.previous = r, --l;
continue t;
}
f += h._.r, h = h.previous;
}
while (u !== h.next);
for (i.previous = r, i.next = n, r.next = n.previous = n = i, s = yv(r); (i = i.next) !== n; )
(o = yv(i)) < s && (r = i, s = o);
n = r.next;
}
for (r = [n._], i = n; (i = i.next) !== n; )
r.push(i._);
for (i = yE(r, e), l = 0; l < a; ++l)
r = t[l], r.x -= i.x, r.y -= i.y;
return i.r;
}
function mz(t) {
return _E(t, Y3()), t;
}
function bz(t) {
return Math.sqrt(t.value);
}
function _z() {
var t = null, e = 1, r = 1, n = bs;
function i(a) {
const s = Y3();
return a.x = e / 2, a.y = r / 2, t ? a.eachBefore(mv(t)).eachAfter(hd(n, 0.5, s)).eachBefore(bv(1)) : a.eachBefore(mv(bz)).eachAfter(hd(bs, 1, s)).eachAfter(hd(n, a.r / Math.min(e, r), s)).eachBefore(bv(Math.min(e, r) / (2 * a.r))), a;
}
return i.radius = function(a) {
return arguments.length ? (t = wh(a), i) : t;
}, i.size = function(a) {
return arguments.length ? (e = +a[0], r = +a[1], i) : [e, r];
}, i.padding = function(a) {
return arguments.length ? (n = typeof a == "function" ? a : yo(+a), i) : n;
}, i;
}
function mv(t) {
return function(e) {
e.children || (e.r = Math.max(0, +t(e) || 0));
};
}
function hd(t, e, r) {
return function(n) {
if (i = n.children) {
var i, a, s = i.length, o = t(n) * e || 0, l;
if (o)
for (a = 0; a < s; ++a)
i[a].r += o;
if (l = _E(i, r), o)
for (a = 0; a < s; ++a)
i[a].r -= o;
n.r = l + o;
}
};
}
function bv(t) {
return function(e) {
var r = e.parent;
e.r *= t, r && (e.x = r.x + t * e.x, e.y = r.y + t * e.y);
};
}
function vE(t) {
t.x0 = Math.round(t.x0), t.y0 = Math.round(t.y0), t.x1 = Math.round(t.x1), t.y1 = Math.round(t.y1);
}
function nu(t, e, r, n, i) {
for (var a = t.children, s, o = -1, l = a.length, u = t.value && (n - e) / t.value; ++o < l; )
s = a[o], s.y0 = r, s.y1 = i, s.x0 = e, s.x1 = e += s.value * u;
}
function vz() {
var t = 1, e = 1, r = 0, n = !1;
function i(s) {
var o = s.height + 1;
return s.x0 = s.y0 = r, s.x1 = t, s.y1 = e / o, s.eachBefore(a(e, o)), n && s.eachBefore(vE), s;
}
function a(s, o) {
return function(l) {
l.children && nu(l, l.x0, s * (l.depth + 1) / o, l.x1, s * (l.depth + 2) / o);
var u = l.x0, h = l.y0, d = l.x1 - r, f = l.y1 - r;
d < u && (u = d = (u + d) / 2), f < h && (h = f = (h + f) / 2), l.x0 = u, l.y0 = h, l.x1 = d, l.y1 = f;
};
}
return i.round = function(s) {
return arguments.length ? (n = !!s, i) : n;
}, i.size = function(s) {
return arguments.length ? (t = +s[0], e = +s[1], i) : [t, e];
}, i.padding = function(s) {
return arguments.length ? (r = +s, i) : r;
}, i;
}
var xz = { depth: -1 }, _v = {}, fd = {};
function kz(t) {
return t.id;
}
function wz(t) {
return t.parentId;
}
function Tz() {
var t = kz, e = wz, r;
function n(i) {
var a = Array.from(i), s = t, o = e, l, u, h, d, f, p, m, _, y = /* @__PURE__ */ new Map();
if (r != null) {
const b = a.map((T, C) => Ez(r(T, C, i))), x = b.map(vv), k = new Set(b).add("");
for (const T of x)
k.has(T) || (k.add(T), b.push(T), x.push(vv(T)), a.push(fd));
s = (T, C) => b[C], o = (T, C) => x[C];
}
for (h = 0, l = a.length; h < l; ++h)
u = a[h], p = a[h] = new Bs(u), (m = s(u, h, i)) != null && (m += "") && (_ = p.id = m, y.set(_, y.has(_) ? _v : p)), (m = o(u, h, i)) != null && (m += "") && (p.parent = m);
for (h = 0; h < l; ++h)
if (p = a[h], m = p.parent) {
if (f = y.get(m), !f)
throw new Error("missing: " + m);
if (f === _v)
throw new Error("ambiguous: " + m);
f.children ? f.children.push(p) : f.children = [p], p.parent = f;
} else {
if (d)
throw new Error("multiple roots");
d = p;
}
if (!d)
throw new Error("no root");
if (r != null) {
for (; d.data === fd && d.children.length === 1; )
d = d.children[0], --l;
for (let b = a.length - 1; b >= 0 && (p = a[b], p.data === fd); --b)
p.data = null;
}
if (d.parent = xz, d.eachBefore(function(b) {
b.depth = b.parent.depth + 1, --l;
}).eachBefore(pE), d.parent = null, l > 0)
throw new Error("cycle");
return d;
}
return n.id = function(i) {
return arguments.length ? (t = wh(i), n) : t;
}, n.parentId = function(i) {
return arguments.length ? (e = wh(i), n) : e;
}, n.path = function(i) {
return arguments.length ? (r = wh(i), n) : r;
}, n;
}
function Ez(t) {
t = `${t}`;
let e = t.length;
return hb(t, e - 1) && !hb(t, e - 2) && (t = t.slice(0, -1)), t[0] === "/" ? t : `/${t}`;
}
function vv(t) {
let e = t.length;
if (e < 2)
return "";
for (; --e > 1 && !hb(t, e); )
;
return t.slice(0, e);
}
function hb(t, e) {
if (t[e] === "/") {
let r = 0;
for (; e > 0 && t[--e] === "\\"; )
++r;
if ((r & 1) === 0)
return !0;
}
return !1;
}
function Cz(t, e) {
return t.parent === e.parent ? 1 : 2;
}
function dd(t) {
var e = t.children;
return e ? e[0] : t.t;
}
function pd(t) {
var e = t.children;
return e ? e[e.length - 1] : t.t;
}
function Sz(t, e, r) {
var n = r / (e.i - t.i);
e.c -= n, e.s += r, t.c += n, e.z += r, e.m += r;
}
function Az(t) {
for (var e = 0, r = 0, n = t.children, i = n.length, a; --i >= 0; )
a = n[i], a.z += e, a.m += e, e += a.s + (r += a.c);
}
function Mz(t, e, r) {
return t.a.parent === e.parent ? t.a : r;
}
function Th(t, e) {
this._ = t, this.parent = null, this.children = null, this.A = null, this.a = this, this.z = 0, this.m = 0, this.c = 0, this.s = 0, this.t = null, this.i = e;
}
Th.prototype = Object.create(Bs.prototype);
function Lz(t) {
for (var e = new Th(t, 0), r, n = [e], i, a, s, o; r = n.pop(); )
if (a = r._.children)
for (r.children = new Array(o = a.length), s = o - 1; s >= 0; --s)
n.push(i = r.children[s] = new Th(a[s], s)), i.parent = r;
return (e.parent = new Th(null, 0)).children = [e], e;
}
function Rz() {
var t = Cz, e = 1, r = 1, n = null;
function i(u) {
var h = Lz(u);
if (h.eachAfter(a), h.parent.m = -h.z, h.eachBefore(s), n)
u.eachBefore(l);
else {
var d = u, f = u, p = u;
u.eachBefore(function(x) {
x.x < d.x && (d = x), x.x > f.x && (f = x), x.depth > p.depth && (p = x);
});
var m = d === f ? 1 : t(d, f) / 2, _ = m - d.x, y = e / (f.x + m + _), b = r / (p.depth || 1);
u.eachBefore(function(x) {
x.x = (x.x + _) * y, x.y = x.depth * b;
});
}
return u;
}
function a(u) {
var h = u.children, d = u.parent.children, f = u.i ? d[u.i - 1] : null;
if (h) {
Az(u);
var p = (h[0].z + h[h.length - 1].z) / 2;
f ? (u.z = f.z + t(u._, f._), u.m = u.z - p) : u.z = p;
} else
f && (u.z = f.z + t(u._, f._));
u.parent.A = o(u, f, u.parent.A || d[0]);
}
function s(u) {
u._.x = u.z + u.parent.m, u.m += u.parent.m;
}
function o(u, h, d) {
if (h) {
for (var f = u, p = u, m = h, _ = f.parent.children[0], y = f.m, b = p.m, x = m.m, k = _.m, T; m = pd(m), f = dd(f), m && f; )
_ = dd(_), p = pd(p), p.a = u, T = m.z + x - f.z - y + t(m._, f._), T > 0 && (Sz(Mz(m, u, d), u, T), y += T, b += T), x += m.m, y += f.m, k += _.m, b += p.m;
m && !pd(p) && (p.t = m, p.m += x - b), f && !dd(_) && (_.t = f, _.m += y - k, d = u);
}
return d;
}
function l(u) {
u.x *= e, u.y = u.depth * r;
}
return i.separation = function(u) {
return arguments.length ? (t = u, i) : t;
}, i.size = function(u) {
return arguments.length ? (n = !1, e = +u[0], r = +u[1], i) : n ? null : [e, r];
}, i.nodeSize = function(u) {
return arguments.length ? (n = !0, e = +u[0], r = +u[1], i) : n ? [e, r] : null;
}, i;
}
function I1(t, e, r, n, i) {
for (var a = t.children, s, o = -1, l = a.length, u = t.value && (i - r) / t.value; ++o < l; )
s = a[o], s.x0 = e, s.x1 = n, s.y0 = r, s.y1 = r += s.value * u;
}
var xE = (1 + Math.sqrt(5)) / 2;
function kE(t, e, r, n, i, a) {
for (var s = [], o = e.children, l, u, h = 0, d = 0, f = o.length, p, m, _ = e.value, y, b, x, k, T, C, M; h < f; ) {
p = i - r, m = a - n;
do
y = o[d++].value;
while (!y && d < f);
for (b = x = y, C = Math.max(m / p, p / m) / (_ * t), M = y * y * C, T = Math.max(x / M, M / b); d < f; ++d) {
if (y += u = o[d].value, u < b && (b = u), u > x && (x = u), M = y * y * C, k = Math.max(x / M, M / b), k > T) {
y -= u;
break;
}
T = k;
}
s.push(l = { value: y, dice: p < m, children: o.slice(h, d) }), l.dice ? nu(l, r, n, i, _ ? n += m * y / _ : a) : I1(l, r, n, _ ? r += p * y / _ : i, a), _ -= y, h = d;
}
return s;
}
const wE = function t(e) {
function r(n, i, a, s, o) {
kE(e, n, i, a, s, o);
}
return r.ratio = function(n) {
return t((n = +n) > 1 ? n : 1);
}, r;
}(xE);
function Iz() {
var t = wE, e = !1, r = 1, n = 1, i = [0], a = bs, s = bs, o = bs, l = bs, u = bs;
function h(f) {
return f.x0 = f.y0 = 0, f.x1 = r, f.y1 = n, f.eachBefore(d), i = [0], e && f.eachBefore(vE), f;
}
function d(f) {
var p = i[f.depth], m = f.x0 + p, _ = f.y0 + p, y = f.x1 - p, b = f.y1 - p;
y < m && (m = y = (m + y) / 2), b < _ && (_ = b = (_ + b) / 2), f.x0 = m, f.y0 = _, f.x1 = y, f.y1 = b, f.children && (p = i[f.depth + 1] = a(f) / 2, m += u(f) - p, _ += s(f) - p, y -= o(f) - p, b -= l(f) - p, y < m && (m = y = (m + y) / 2), b < _ && (_ = b = (_ + b) / 2), t(f, m, _, y, b));
}
return h.round = function(f) {
return arguments.length ? (e = !!f, h) : e;
}, h.size = function(f) {
return arguments.length ? (r = +f[0], n = +f[1], h) : [r, n];
}, h.tile = function(f) {
return arguments.length ? (t = gE(f), h) : t;
}, h.padding = function(f) {
return arguments.length ? h.paddingInner(f).paddingOuter(f) : h.paddingInner();
}, h.paddingInner = function(f) {
return arguments.length ? (a = typeof f == "function" ? f : yo(+f), h) : a;
}, h.paddingOuter = function(f) {
return arguments.length ? h.paddingTop(f).paddingRight(f).paddingBottom(f).paddingLeft(f) : h.paddingTop();
}, h.paddingTop = function(f) {
return arguments.length ? (s = typeof f == "function" ? f : yo(+f), h) : s;
}, h.paddingRight = function(f) {
return arguments.length ? (o = typeof f == "function" ? f : yo(+f), h) : o;
}, h.paddingBottom = function(f) {
return arguments.length ? (l = typeof f == "function" ? f : yo(+f), h) : l;
}, h.paddingLeft = function(f) {
return arguments.length ? (u = typeof f == "function" ? f : yo(+f), h) : u;
}, h;
}
function Nz(t, e, r, n, i) {
var a = t.children, s, o = a.length, l, u = new Array(o + 1);
for (u[0] = l = s = 0; s < o; ++s)
u[s + 1] = l += a[s].value;
h(0, o, t.value, e, r, n, i);
function h(d, f, p, m, _, y, b) {
if (d >= f - 1) {
var x = a[d];
x.x0 = m, x.y0 = _, x.x1 = y, x.y1 = b;
return;
}
for (var k = u[d], T = p / 2 + k, C = d + 1, M = f - 1; C < M; ) {
var S = C + M >>> 1;
u[S] < T ? C = S + 1 : M = S;
}
T - u[C - 1] < u[C] - T && d + 1 < C && --C;
var R = u[C] - k, A = p - R;
if (y - m > b - _) {
var L = p ? (m * A + y * R) / p : y;
h(d, C, R, m, _, L, b), h(C, f, A, L, _, y, b);
} else {
var v = p ? (_ * A + b * R) / p : b;
h(d, C, R, m, _, y, v), h(C, f, A, m, v, y, b);
}
}
}
function Bz(t, e, r, n, i) {
(t.depth & 1 ? I1 : nu)(t, e, r, n, i);
}
const Dz = function t(e) {
function r(n, i, a, s, o) {
if ((l = n._squarify) && l.ratio === e)
for (var l, u, h, d, f = -1, p, m = l.length, _ = n.value; ++f < m; ) {
for (u = l[f], h = u.children, d = u.value = 0, p = h.length; d < p; ++d)
u.value += h[d].value;
u.dice ? nu(u, i, a, s, _ ? a += (o - a) * u.value / _ : o) : I1(u, i, a, _ ? i += (s - i) * u.value / _ : s, o), _ -= u.value;
}
else
n._squarify = l = kE(e, n, i, a, s, o), l.ratio = e;
}
return r.ratio = function(n) {
return t((n = +n) > 1 ? n : 1);
}, r;
}(xE);
function Oz(t) {
for (var e = -1, r = t.length, n, i = t[r - 1], a = 0; ++e < r; )
n = i, i = t[e], a += n[1] * i[0] - n[0] * i[1];
return a / 2;
}
function Fz(t) {
for (var e = -1, r = t.length, n = 0, i = 0, a, s = t[r - 1], o, l = 0; ++e < r; )
a = s, s = t[e], l += o = a[0] * s[1] - s[0] * a[1], n += (a[0] + s[0]) * o, i += (a[1] + s[1]) * o;
return l *= 3, [n / l, i / l];
}
function Pz(t, e, r) {
return (e[0] - t[0]) * (r[1] - t[1]) - (e[1] - t[1]) * (r[0] - t[0]);
}
function qz(t, e) {
return t[0] - e[0] || t[1] - e[1];
}
function xv(t) {
const e = t.length, r = [0, 1];
let n = 2, i;
for (i = 2; i < e; ++i) {
for (; n > 1 && Pz(t[r[n - 2]], t[r[n - 1]], t[i]) <= 0; )
--n;
r[n++] = i;
}
return r.slice(0, n);
}
function Vz(t) {
if ((r = t.length) < 3)
return null;
var e, r, n = new Array(r), i = new Array(r);
for (e = 0; e < r; ++e)
n[e] = [+t[e][0], +t[e][1], e];
for (n.sort(qz), e = 0; e < r; ++e)
i[e] = [n[e][0], -n[e][1]];
var a = xv(n), s = xv(i), o = s[0] === a[0], l = s[s.length - 1] === a[a.length - 1], u = [];
for (e = a.length - 1; e >= 0; --e)
u.push(t[n[a[e]][2]]);
for (e = +o; e < s.length - l; ++e)
u.push(t[n[s[e]][2]]);
return u;
}
function zz(t, e) {
for (var r = t.length, n = t[r - 1], i = e[0], a = e[1], s = n[0], o = n[1], l, u, h = !1, d = 0; d < r; ++d)
n = t[d], l = n[0], u = n[1], u > a != o > a && i < (s - l) * (a - u) / (o - u) + l && (h = !h), s = l, o = u;
return h;
}
function Yz(t) {
for (var e = -1, r = t.length, n = t[r - 1], i, a, s = n[0], o = n[1], l = 0; ++e < r; )
i = s, a = o, n = t[e], s = n[0], o = n[1], i -= s, a -= o, l += Math.hypot(i, a);
return l;
}
const Dr = Math.random, Uz = function t(e) {
function r(n, i) {
return n = n == null ? 0 : +n, i = i == null ? 1 : +i, arguments.length === 1 ? (i = n, n = 0) : i -= n, function() {
return e() * i + n;
};
}
return r.source = t, r;
}(Dr), Wz = function t(e) {
function r(n, i) {
return arguments.length < 2 && (i = n, n = 0), n = Math.floor(n), i = Math.floor(i) - n, function() {
return Math.floor(e() * i + n);
};
}
return r.source = t, r;
}(Dr), U3 = function t(e) {
function r(n, i) {
var a, s;
return n = n == null ? 0 : +n, i = i == null ? 1 : +i, function() {
var o;
if (a != null)
o = a, a = null;
else
do
a = e() * 2 - 1, o = e() * 2 - 1, s = a * a + o * o;
while (!s || s > 1);
return n + i * o * Math.sqrt(-2 * Math.log(s) / s);
};
}
return r.source = t, r;
}(Dr), Hz = function t(e) {
var r = U3.source(e);
function n() {
var i = r.apply(this, arguments);
return function() {
return Math.exp(i());
};
}
return n.source = t, n;
}(Dr), TE = function t(e) {
function r(n) {
return (n = +n) <= 0 ? () => 0 : function() {
for (var i = 0, a = n; a > 1; --a)
i += e();
return i + a * e();
};
}
return r.source = t, r;
}(Dr), Gz = function t(e) {
var r = TE.source(e);
function n(i) {
if ((i = +i) == 0)
return e;
var a = r(i);
return function() {
return a() / i;
};
}
return n.source = t, n;
}(Dr), jz = function t(e) {
function r(n) {
return function() {
return -Math.log1p(-e()) / n;
};
}
return r.source = t, r;
}(Dr), $z = function t(e) {
function r(n) {
if ((n = +n) < 0)
throw new RangeError("invalid alpha");
return n = 1 / -n, function() {
return Math.pow(1 - e(), n);
};
}
return r.source = t, r;
}(Dr), Xz = function t(e) {
function r(n) {
if ((n = +n) < 0 || n > 1)
throw new RangeError("invalid p");
return function() {
return Math.floor(e() + n);
};
}
return r.source = t, r;
}(Dr), EE = function t(e) {
function r(n) {
if ((n = +n) < 0 || n > 1)
throw new RangeError("invalid p");
return n === 0 ? () => 1 / 0 : n === 1 ? () => 1 : (n = Math.log1p(-n), function() {
return 1 + Math.floor(Math.log1p(-e()) / n);
});
}
return r.source = t, r;
}(Dr), W3 = function t(e) {
var r = U3.source(e)();
function n(i, a) {
if ((i = +i) < 0)
throw new RangeError("invalid k");
if (i === 0)
return () => 0;
if (a = a == null ? 1 : +a, i === 1)
return () => -Math.log1p(-e()) * a;
var s = (i < 1 ? i + 1 : i) - 1 / 3, o = 1 / (3 * Math.sqrt(s)), l = i < 1 ? () => Math.pow(e(), 1 / i) : () => 1;
return function() {
do {
do
var u = r(), h = 1 + o * u;
while (h <= 0);
h *= h * h;
var d = 1 - e();
} while (d >= 1 - 0.0331 * u * u * u * u && Math.log(d) >= 0.5 * u * u + s * (1 - h + Math.log(h)));
return s * h * l() * a;
};
}
return n.source = t, n;
}(Dr), CE = function t(e) {
var r = W3.source(e);
function n(i, a) {
var s = r(i), o = r(a);
return function() {
var l = s();
return l === 0 ? 0 : l / (l + o());
};
}
return n.source = t, n;
}(Dr), SE = function t(e) {
var r = EE.source(e), n = CE.source(e);
function i(a, s) {
return a = +a, (s = +s) >= 1 ? () => a : s <= 0 ? () => 0 : function() {
for (var o = 0, l = a, u = s; l * u > 16 && l * (1 - u) > 16; ) {
var h = Math.floor((l + 1) * u), d = n(h, l - h + 1)();
d <= u ? (o += h, l -= h, u = (u - d) / (1 - d)) : (l = h - 1, u /= d);
}
for (var f = u < 0.5, p = f ? u : 1 - u, m = r(p), _ = m(), y = 0; _ <= l; ++y)
_ += m();
return o + (f ? y : l - y);
};
}
return i.source = t, i;
}(Dr), Kz = function t(e) {
function r(n, i, a) {
var s;
return (n = +n) == 0 ? s = (o) => -Math.log(o) : (n = 1 / n, s = (o) => Math.pow(o, n)), i = i == null ? 0 : +i, a = a == null ? 1 : +a, function() {
return i + a * s(-Math.log1p(-e()));
};
}
return r.source = t, r;
}(Dr), Zz = function t(e) {
function r(n, i) {
return n = n == null ? 0 : +n, i = i == null ? 1 : +i, function() {
return n + i * Math.tan(Math.PI * e());
};
}
return r.source = t, r;
}(Dr), Qz = function t(e) {
function r(n, i) {
return n = n == null ? 0 : +n, i = i == null ? 1 : +i, function() {
var a = e();
return n + i * Math.log(a / (1 - a));
};
}
return r.source = t, r;
}(Dr), Jz = function t(e) {
var r = W3.source(e), n = SE.source(e);
function i(a) {
return function() {
for (var s = 0, o = a; o > 16; ) {
var l = Math.floor(0.875 * o), u = r(l)();
if (u > o)
return s + n(l - 1, o / u)();
s += l, o -= u;
}
for (var h = -Math.log1p(-e()), d = 0; h <= o; ++d)
h -= Math.log1p(-e());
return s + d;
};
}
return i.source = t, i;
}(Dr), tY = 1664525, eY = 1013904223, kv = 1 / 4294967296;
function rY(t = Math.random()) {
let e = (0 <= t && t < 1 ? t / kv : Math.abs(t)) | 0;
return () => (e = tY * e + eY | 0, kv * (e >>> 0));
}
function qn(t, e) {
switch (arguments.length) {
case 0:
break;
case 1:
this.range(t);
break;
default:
this.range(e).domain(t);
break;
}
return this;
}
function ba(t, e) {
switch (arguments.length) {
case 0:
break;
case 1: {
typeof t == "function" ? this.interpolator(t) : this.range(t);
break;
}
default: {
this.domain(t), typeof e == "function" ? this.interpolator(e) : this.range(e);
break;
}
}
return this;
}
const fb = Symbol("implicit");
function N1() {
var t = new dc(), e = [], r = [], n = fb;
function i(a) {
let s = t.get(a);
if (s === void 0) {
if (n !== fb)
return n;
t.set(a, s = e.push(a) - 1);
}
return r[s % r.length];
}
return i.domain = function(a) {
if (!arguments.length)
return e.slice();
e = [], t = new dc();
for (const s of a)
t.has(s) || t.set(s, e.push(s) - 1);
return i;
}, i.range = function(a) {
return arguments.length ? (r = Array.from(a), i) : r.slice();
}, i.unknown = function(a) {
return arguments.length ? (n = a, i) : n;
}, i.copy = function() {
return N1(e, r).unknown(n);
}, qn.apply(i, arguments), i;
}
function H3() {
var t = N1().unknown(void 0), e = t.domain, r = t.range, n = 0, i = 1, a, s, o = !1, l = 0, u = 0, h = 0.5;
delete t.unknown;
function d() {
var f = e().length, p = i < n, m = p ? i : n, _ = p ? n : i;
a = (_ - m) / Math.max(1, f - l + u * 2), o && (a = Math.floor(a)), m += (_ - m - a * (f - l)) * h, s = a * (1 - l), o && (m = Math.round(m), s = Math.round(s));
var y = Da(f).map(function(b) {
return m + a * b;
});
return r(p ? y.reverse() : y);
}
return t.domain = function(f) {
return arguments.length ? (e(f), d()) : e();
}, t.range = function(f) {
return arguments.length ? ([n, i] = f, n = +n, i = +i, d()) : [n, i];
}, t.rangeRound = function(f) {
return [n, i] = f, n = +n, i = +i, o = !0, d();
}, t.bandwidth = function() {
return s;
}, t.step = function() {
return a;
}, t.round = function(f) {
return arguments.length ? (o = !!f, d()) : o;
}, t.padding = function(f) {
return arguments.length ? (l = Math.min(1, u = +f), d()) : l;
}, t.paddingInner = function(f) {
return arguments.length ? (l = Math.min(1, f), d()) : l;
}, t.paddingOuter = function(f) {
return arguments.length ? (u = +f, d()) : u;
}, t.align = function(f) {
return arguments.length ? (h = Math.max(0, Math.min(1, f)), d()) : h;
}, t.copy = function() {
return H3(e(), [n, i]).round(o).paddingInner(l).paddingOuter(u).align(h);
}, qn.apply(d(), arguments);
}
function AE(t) {
var e = t.copy;
return t.padding = t.paddingOuter, delete t.paddingInner, delete t.paddingOuter, t.copy = function() {
return AE(e());
}, t;
}
function nY() {
return AE(H3.apply(null, arguments).paddingInner(1));
}
function iY(t) {
return function() {
return t;
};
}
function kf(t) {
return +t;
}
var wv = [0, 1];
function tn(t) {
return t;
}
function db(t, e) {
return (e -= t = +t) ? function(r) {
return (r - t) / e;
} : iY(isNaN(e) ? NaN : 0.5);
}
function aY(t, e) {
var r;
return t > e && (r = t, t = e, e = r), function(n) {
return Math.max(t, Math.min(e, n));
};
}
function sY(t, e, r) {
var n = t[0], i = t[1], a = e[0], s = e[1];
return i < n ? (n = db(i, n), a = r(s, a)) : (n = db(n, i), a = r(a, s)), function(o) {
return a(n(o));
};
}
function oY(t, e, r) {
var n = Math.min(t.length, e.length) - 1, i = new Array(n), a = new Array(n), s = -1;
for (t[n] < t[0] && (t = t.slice().reverse(), e = e.slice().reverse()); ++s < n; )
i[s] = db(t[s], t[s + 1]), a[s] = r(e[s], e[s + 1]);
return function(o) {
var l = Us(t, o, 1, n) - 1;
return a[l](i[l](o));
};
}
function iu(t, e) {
return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());
}
function B1() {
var t = wv, e = wv, r = Ja, n, i, a, s = tn, o, l, u;
function h() {
var f = Math.min(t.length, e.length);
return s !== tn && (s = aY(t[0], t[f - 1])), o = f > 2 ? oY : sY, l = u = null, d;
}
function d(f) {
return f == null || isNaN(f = +f) ? a : (l || (l = o(t.map(n), e, r)))(n(s(f)));
}
return d.invert = function(f) {
return s(i((u || (u = o(e, t.map(n), Dn)))(f)));
}, d.domain = function(f) {
return arguments.length ? (t = Array.from(f, kf), h()) : t.slice();
}, d.range = function(f) {
return arguments.length ? (e = Array.from(f), h()) : e.slice();
}, d.rangeRound = function(f) {
return e = Array.from(f), r = v1, h();
}, d.clamp = function(f) {
return arguments.length ? (s = f ? !0 : tn, h()) : s !== tn;
}, d.interpolate = function(f) {
return arguments.length ? (r = f, h()) : r;
}, d.unknown = function(f) {
return arguments.length ? (a = f, d) : a;
}, function(f, p) {
return n = f, i = p, h();
};
}
function G3() {
return B1()(tn, tn);
}
function ME(t, e, r, n) {
var i = pc(t, e, r), a;
switch (n = Vo(n == null ? ",f" : n), n.type) {
case "s": {
var s = Math.max(Math.abs(t), Math.abs(e));
return n.precision == null && !isNaN(a = ST(i, s)) && (n.precision = a), w3(n, s);
}
case "":
case "e":
case "g":
case "p":
case "r": {
n.precision == null && !isNaN(a = AT(i, Math.max(Math.abs(t), Math.abs(e)))) && (n.precision = a - (n.type === "e"));
break;
}
case "f":
case "%": {
n.precision == null && !isNaN(a = CT(i)) && (n.precision = a - (n.type === "%") * 2);
break;
}
}
return M1(n);
}
function es(t) {
var e = t.domain;
return t.ticks = function(r) {
var n = e();
return As(n[0], n[n.length - 1], r == null ? 10 : r);
}, t.tickFormat = function(r, n) {
var i = e();
return ME(i[0], i[i.length - 1], r == null ? 10 : r, n);
}, t.nice = function(r) {
r == null && (r = 10);
var n = e(), i = 0, a = n.length - 1, s = n[i], o = n[a], l, u, h = 10;
for (o < s && (u = s, s = o, o = u, u = i, i = a, a = u); h-- > 0; ) {
if (u = No(s, o, r), u === l)
return n[i] = s, n[a] = o, e(n);
if (u > 0)
s = Math.floor(s / u) * u, o = Math.ceil(o / u) * u;
else if (u < 0)
s = Math.ceil(s * u) / u, o = Math.floor(o * u) / u;
else
break;
l = u;
}
return t;
}, t;
}
function j3() {
var t = G3();
return t.copy = function() {
return iu(t, j3());
}, qn.apply(t, arguments), es(t);
}
function LE(t) {
var e;
function r(n) {
return n == null || isNaN(n = +n) ? e : n;
}
return r.invert = r, r.domain = r.range = function(n) {
return arguments.length ? (t = Array.from(n, kf), r) : t.slice();
}, r.unknown = function(n) {
return arguments.length ? (e = n, r) : e;
}, r.copy = function() {
return LE(t).unknown(e);
}, t = arguments.length ? Array.from(t, kf) : [0, 1], es(r);
}
function RE(t, e) {
t = t.slice();
var r = 0, n = t.length - 1, i = t[r], a = t[n], s;
return a < i && (s = r, r = n, n = s, s = i, i = a, a = s), t[r] = e.floor(i), t[n] = e.ceil(a), t;
}
function Tv(t) {
return Math.log(t);
}
function Ev(t) {
return Math.exp(t);
}
function lY(t) {
return -Math.log(-t);
}
function cY(t) {
return -Math.exp(-t);
}
function uY(t) {
return isFinite(t) ? +("1e" + t) : t < 0 ? 0 : t;
}
function hY(t) {
return t === 10 ? uY : t === Math.E ? Math.exp : (e) => Math.pow(t, e);
}
function fY(t) {
return t === Math.E ? Math.log : t === 10 && Math.log10 || t === 2 && Math.log2 || (t = Math.log(t), (e) => Math.log(e) / t);
}
function Cv(t) {
return (e, r) => -t(-e, r);
}
function $3(t) {
const e = t(Tv, Ev), r = e.domain;
let n = 10, i, a;
function s() {
return i = fY(n), a = hY(n), r()[0] < 0 ? (i = Cv(i), a = Cv(a), t(lY, cY)) : t(Tv, Ev), e;
}
return e.base = function(o) {
return arguments.length ? (n = +o, s()) : n;
}, e.domain = function(o) {
return arguments.length ? (r(o), s()) : r();
}, e.ticks = (o) => {
const l = r();
let u = l[0], h = l[l.length - 1];
const d = h < u;
d && ([u, h] = [h, u]);
let f = i(u), p = i(h), m, _;
const y = o == null ? 10 : +o;
let b = [];
if (!(n % 1) && p - f < y) {
if (f = Math.floor(f), p = Math.ceil(p), u > 0) {
for (; f <= p; ++f)
for (m = 1; m < n; ++m)
if (_ = f < 0 ? m / a(-f) : m * a(f), !(_ < u)) {
if (_ > h)
break;
b.push(_);
}
} else
for (; f <= p; ++f)
for (m = n - 1; m >= 1; --m)
if (_ = f > 0 ? m / a(-f) : m * a(f), !(_ < u)) {
if (_ > h)
break;
b.push(_);
}
b.length * 2 < y && (b = As(u, h, y));
} else
b = As(f, p, Math.min(p - f, y)).map(a);
return d ? b.reverse() : b;
}, e.tickFormat = (o, l) => {
if (o == null && (o = 10), l == null && (l = n === 10 ? "s" : ","), typeof l != "function" && (!(n % 1) && (l = Vo(l)).precision == null && (l.trim = !0), l = M1(l)), o === 1 / 0)
return l;
const u = Math.max(1, n * o / e.ticks().length);
return (h) => {
let d = h / a(Math.round(i(h)));
return d * n < n - 0.5 && (d *= n), d <= u ? l(h) : "";
};
}, e.nice = () => r(RE(r(), {
floor: (o) => a(Math.floor(i(o))),
ceil: (o) => a(Math.ceil(i(o)))
})), e;
}
function IE() {
const t = $3(B1()).domain([1, 10]);
return t.copy = () => iu(t, IE()).base(t.base()), qn.apply(t, arguments), t;
}
function Sv(t) {
return function(e) {
return Math.sign(e) * Math.log1p(Math.abs(e / t));
};
}
function Av(t) {
return function(e) {
return Math.sign(e) * Math.expm1(Math.abs(e)) * t;
};
}
function X3(t) {
var e = 1, r = t(Sv(e), Av(e));
return r.constant = function(n) {
return arguments.length ? t(Sv(e = +n), Av(e)) : e;
}, es(r);
}
function NE() {
var t = X3(B1());
return t.copy = function() {
return iu(t, NE()).constant(t.constant());
}, qn.apply(t, arguments);
}
function Mv(t) {
return function(e) {
return e < 0 ? -Math.pow(-e, t) : Math.pow(e, t);
};
}
function dY(t) {
return t < 0 ? -Math.sqrt(-t) : Math.sqrt(t);
}
function pY(t) {
return t < 0 ? -t * t : t * t;
}
function K3(t) {
var e = t(tn, tn), r = 1;
function n() {
return r === 1 ? t(tn, tn) : r === 0.5 ? t(dY, pY) : t(Mv(r), Mv(1 / r));
}
return e.exponent = function(i) {
return arguments.length ? (r = +i, n()) : r;
}, es(e);
}
function Z3() {
var t = K3(B1());
return t.copy = function() {
return iu(t, Z3()).exponent(t.exponent());
}, qn.apply(t, arguments), t;
}
function gY() {
return Z3.apply(null, arguments).exponent(0.5);
}
function Lv(t) {
return Math.sign(t) * t * t;
}
function yY(t) {
return Math.sign(t) * Math.sqrt(Math.abs(t));
}
function BE() {
var t = G3(), e = [0, 1], r = !1, n;
function i(a) {
var s = yY(t(a));
return isNaN(s) ? n : r ? Math.round(s) : s;
}
return i.invert = function(a) {
return t.invert(Lv(a));
}, i.domain = function(a) {
return arguments.length ? (t.domain(a), i) : t.domain();
}, i.range = function(a) {
return arguments.length ? (t.range((e = Array.from(a, kf)).map(Lv)), i) : e.slice();
}, i.rangeRound = function(a) {
return i.range(a).round(!0);
}, i.round = function(a) {
return arguments.length ? (r = !!a, i) : r;
}, i.clamp = function(a) {
return arguments.length ? (t.clamp(a), i) : t.clamp();
}, i.unknown = function(a) {
return arguments.length ? (n = a, i) : n;
}, i.copy = function() {
return BE(t.domain(), e).round(r).clamp(t.clamp()).unknown(n);
}, qn.apply(i, arguments), es(i);
}
function DE() {
var t = [], e = [], r = [], n;
function i() {
var s = 0, o = Math.max(1, e.length);
for (r = new Array(o - 1); ++s < o; )
r[s - 1] = l9(t, s / o);
return a;
}
function a(s) {
return s == null || isNaN(s = +s) ? n : e[Us(r, s)];
}
return a.invertExtent = function(s) {
var o = e.indexOf(s);
return o < 0 ? [NaN, NaN] : [
o > 0 ? r[o - 1] : t[0],
o < r.length ? r[o] : t[t.length - 1]
];
}, a.domain = function(s) {
if (!arguments.length)
return t.slice();
t = [];
for (let o of s)
o != null && !isNaN(o = +o) && t.push(o);
return t.sort(tr), i();
}, a.range = function(s) {
return arguments.length ? (e = Array.from(s), i()) : e.slice();
}, a.unknown = function(s) {
return arguments.length ? (n = s, a) : n;
}, a.quantiles = function() {
return r.slice();
}, a.copy = function() {
return DE().domain(t).range(e).unknown(n);
}, qn.apply(a, arguments);
}
function OE() {
var t = 0, e = 1, r = 1, n = [0.5], i = [0, 1], a;
function s(l) {
return l != null && l <= l ? i[Us(n, l, 0, r)] : a;
}
function o() {
var l = -1;
for (n = new Array(r); ++l < r; )
n[l] = ((l + 1) * e - (l - r) * t) / (r + 1);
return s;
}
return s.domain = function(l) {
return arguments.length ? ([t, e] = l, t = +t, e = +e, o()) : [t, e];
}, s.range = function(l) {
return arguments.length ? (r = (i = Array.from(l)).length - 1, o()) : i.slice();
}, s.invertExtent = function(l) {
var u = i.indexOf(l);
return u < 0 ? [NaN, NaN] : u < 1 ? [t, n[0]] : u >= r ? [n[r - 1], e] : [n[u - 1], n[u]];
}, s.unknown = function(l) {
return arguments.length && (a = l), s;
}, s.thresholds = function() {
return n.slice();
}, s.copy = function() {
return OE().domain([t, e]).range(i).unknown(a);
}, qn.apply(es(s), arguments);
}
function FE() {
var t = [0.5], e = [0, 1], r, n = 1;
function i(a) {
return a != null && a <= a ? e[Us(t, a, 0, n)] : r;
}
return i.domain = function(a) {
return arguments.length ? (t = Array.from(a), n = Math.min(t.length, e.length - 1), i) : t.slice();
}, i.range = function(a) {
return arguments.length ? (e = Array.from(a), n = Math.min(t.length, e.length - 1), i) : e.slice();
}, i.invertExtent = function(a) {
var s = e.indexOf(a);
return [t[s - 1], t[s]];
}, i.unknown = function(a) {
return arguments.length ? (r = a, i) : r;
}, i.copy = function() {
return FE().domain(t).range(e).unknown(r);
}, qn.apply(i, arguments);
}
var gd = new Date(), yd = new Date();
function Tr(t, e, r, n) {
function i(a) {
return t(a = arguments.length === 0 ? new Date() : new Date(+a)), a;
}
return i.floor = function(a) {
return t(a = new Date(+a)), a;
}, i.ceil = function(a) {
return t(a = new Date(a - 1)), e(a, 1), t(a), a;
}, i.round = function(a) {
var s = i(a), o = i.ceil(a);
return a - s < o - a ? s : o;
}, i.offset = function(a, s) {
return e(a = new Date(+a), s == null ? 1 : Math.floor(s)), a;
}, i.range = function(a, s, o) {
var l = [], u;
if (a = i.ceil(a), o = o == null ? 1 : Math.floor(o), !(a < s) || !(o > 0))
return l;
do
l.push(u = new Date(+a)), e(a, o), t(a);
while (u < a && a < s);
return l;
}, i.filter = function(a) {
return Tr(function(s) {
if (s >= s)
for (; t(s), !a(s); )
s.setTime(s - 1);
}, function(s, o) {
if (s >= s)
if (o < 0)
for (; ++o <= 0; )
for (; e(s, -1), !a(s); )
;
else
for (; --o >= 0; )
for (; e(s, 1), !a(s); )
;
});
}, r && (i.count = function(a, s) {
return gd.setTime(+a), yd.setTime(+s), t(gd), t(yd), Math.floor(r(gd, yd));
}, i.every = function(a) {
return a = Math.floor(a), !isFinite(a) || !(a > 0) ? null : a > 1 ? i.filter(n ? function(s) {
return n(s) % a === 0;
} : function(s) {
return i.count(0, s) % a === 0;
}) : i;
}), i;
}
var wf = Tr(function() {
}, function(t, e) {
t.setTime(+t + e);
}, function(t, e) {
return e - t;
});
wf.every = function(t) {
return t = Math.floor(t), !isFinite(t) || !(t > 0) ? null : t > 1 ? Tr(function(e) {
e.setTime(Math.floor(e / t) * t);
}, function(e, r) {
e.setTime(+e + r * t);
}, function(e, r) {
return (r - e) / t;
}) : wf;
};
const pb = wf;
var Rv = wf.range;
const ca = 1e3, Fn = ca * 60, ua = Fn * 60, Ds = ua * 24, Q3 = Ds * 7, Iv = Ds * 30, md = Ds * 365;
var PE = Tr(function(t) {
t.setTime(t - t.getMilliseconds());
}, function(t, e) {
t.setTime(+t + e * ca);
}, function(t, e) {
return (e - t) / ca;
}, function(t) {
return t.getUTCSeconds();
});
const Fa = PE;
var Nv = PE.range, qE = Tr(function(t) {
t.setTime(t - t.getMilliseconds() - t.getSeconds() * ca);
}, function(t, e) {
t.setTime(+t + e * Fn);
}, function(t, e) {
return (e - t) / Fn;
}, function(t) {
return t.getMinutes();
});
const J3 = qE;
var mY = qE.range, VE = Tr(function(t) {
t.setTime(t - t.getMilliseconds() - t.getSeconds() * ca - t.getMinutes() * Fn);
}, function(t, e) {
t.setTime(+t + e * ua);
}, function(t, e) {
return (e - t) / ua;
}, function(t) {
return t.getHours();
});
const t4 = VE;
var bY = VE.range, zE = Tr(
(t) => t.setHours(0, 0, 0, 0),
(t, e) => t.setDate(t.getDate() + e),
(t, e) => (e - t - (e.getTimezoneOffset() - t.getTimezoneOffset()) * Fn) / Ds,
(t) => t.getDate() - 1
);
const au = zE;
var _Y = zE.range;
function $s(t) {
return Tr(function(e) {
e.setDate(e.getDate() - (e.getDay() + 7 - t) % 7), e.setHours(0, 0, 0, 0);
}, function(e, r) {
e.setDate(e.getDate() + r * 7);
}, function(e, r) {
return (r - e - (r.getTimezoneOffset() - e.getTimezoneOffset()) * Fn) / Q3;
});
}
var Wo = $s(0), Mc = $s(1), YE = $s(2), UE = $s(3), Os = $s(4), WE = $s(5), HE = $s(6), Bv = Wo.range, vY = Mc.range, xY = YE.range, kY = UE.range, wY = Os.range, TY = WE.range, EY = HE.range, GE = Tr(function(t) {
t.setDate(1), t.setHours(0, 0, 0, 0);
}, function(t, e) {
t.setMonth(t.getMonth() + e);
}, function(t, e) {
return e.getMonth() - t.getMonth() + (e.getFullYear() - t.getFullYear()) * 12;
}, function(t) {
return t.getMonth();
});
const e4 = GE;
var CY = GE.range, r4 = Tr(function(t) {
t.setMonth(0, 1), t.setHours(0, 0, 0, 0);
}, function(t, e) {
t.setFullYear(t.getFullYear() + e);
}, function(t, e) {
return e.getFullYear() - t.getFullYear();
}, function(t) {
return t.getFullYear();
});
r4.every = function(t) {
return !isFinite(t = Math.floor(t)) || !(t > 0) ? null : Tr(function(e) {
e.setFullYear(Math.floor(e.getFullYear() / t) * t), e.setMonth(0, 1), e.setHours(0, 0, 0, 0);
}, function(e, r) {
e.setFullYear(e.getFullYear() + r * t);
});
};
const Ga = r4;
var SY = r4.range, jE = Tr(function(t) {
t.setUTCSeconds(0, 0);
}, function(t, e) {
t.setTime(+t + e * Fn);
}, function(t, e) {
return (e - t) / Fn;
}, function(t) {
return t.getUTCMinutes();
});
const n4 = jE;
var AY = jE.range, $E = Tr(function(t) {
t.setUTCMinutes(0, 0, 0);
}, function(t, e) {
t.setTime(+t + e * ua);
}, function(t, e) {
return (e - t) / ua;
}, function(t) {
return t.getUTCHours();
});
const i4 = $E;
var MY = $E.range, XE = Tr(function(t) {
t.setUTCHours(0, 0, 0, 0);
}, function(t, e) {
t.setUTCDate(t.getUTCDate() + e);
}, function(t, e) {
return (e - t) / Ds;
}, function(t) {
return t.getUTCDate() - 1;
});
const su = XE;
var LY = XE.range;
function Xs(t) {
return Tr(function(e) {
e.setUTCDate(e.getUTCDate() - (e.getUTCDay() + 7 - t) % 7), e.setUTCHours(0, 0, 0, 0);
}, function(e, r) {
e.setUTCDate(e.getUTCDate() + r * 7);
}, function(e, r) {
return (r - e) / Q3;
});
}
var Ho = Xs(0), Lc = Xs(1), KE = Xs(2), ZE = Xs(3), Fs = Xs(4), QE = Xs(5), JE = Xs(6), Dv = Ho.range, RY = Lc.range, IY = KE.range, NY = ZE.range, BY = Fs.range, DY = QE.range, OY = JE.range, tC = Tr(function(t) {
t.setUTCDate(1), t.setUTCHours(0, 0, 0, 0);
}, function(t, e) {
t.setUTCMonth(t.getUTCMonth() + e);
}, function(t, e) {
return e.getUTCMonth() - t.getUTCMonth() + (e.getUTCFullYear() - t.getUTCFullYear()) * 12;
}, function(t) {
return t.getUTCMonth();
});
const a4 = tC;
var FY = tC.range, s4 = Tr(function(t) {
t.setUTCMonth(0, 1), t.setUTCHours(0, 0, 0, 0);
}, function(t, e) {
t.setUTCFullYear(t.getUTCFullYear() + e);
}, function(t, e) {
return e.getUTCFullYear() - t.getUTCFullYear();
}, function(t) {
return t.getUTCFullYear();
});
s4.every = function(t) {
return !isFinite(t = Math.floor(t)) || !(t > 0) ? null : Tr(function(e) {
e.setUTCFullYear(Math.floor(e.getUTCFullYear() / t) * t), e.setUTCMonth(0, 1), e.setUTCHours(0, 0, 0, 0);
}, function(e, r) {
e.setUTCFullYear(e.getUTCFullYear() + r * t);
});
};
const ja = s4;
var PY = s4.range;
function eC(t, e, r, n, i, a) {
const s = [
[Fa, 1, ca],
[Fa, 5, 5 * ca],
[Fa, 15, 15 * ca],
[Fa, 30, 30 * ca],
[a, 1, Fn],
[a, 5, 5 * Fn],
[a, 15, 15 * Fn],
[a, 30, 30 * Fn],
[i, 1, ua],
[i, 3, 3 * ua],
[i, 6, 6 * ua],
[i, 12, 12 * ua],
[n, 1, Ds],
[n, 2, 2 * Ds],
[r, 1, Q3],
[e, 1, Iv],
[e, 3, 3 * Iv],
[t, 1, md]
];
function o(u, h, d) {
const f = h < u;
f && ([u, h] = [h, u]);
const p = d && typeof d.range == "function" ? d : l(u, h, d), m = p ? p.range(u, +h + 1) : [];
return f ? m.reverse() : m;
}
function l(u, h, d) {
const f = Math.abs(h - u) / d, p = l1(([, , y]) => y).right(s, f);
if (p === s.length)
return t.every(pc(u / md, h / md, d));
if (p === 0)
return pb.every(Math.max(pc(u, h, d), 1));
const [m, _] = s[f / s[p - 1][2] < s[p][2] / f ? p - 1 : p];
return m.every(_);
}
return [o, l];
}
const [rC, nC] = eC(ja, a4, Ho, su, i4, n4), [iC, aC] = eC(Ga, e4, Wo, au, t4, J3);
function bd(t) {
if (0 <= t.y && t.y < 100) {
var e = new Date(-1, t.m, t.d, t.H, t.M, t.S, t.L);
return e.setFullYear(t.y), e;
}
return new Date(t.y, t.m, t.d, t.H, t.M, t.S, t.L);
}
function _d(t) {
if (0 <= t.y && t.y < 100) {
var e = new Date(Date.UTC(-1, t.m, t.d, t.H, t.M, t.S, t.L));
return e.setUTCFullYear(t.y), e;
}
return new Date(Date.UTC(t.y, t.m, t.d, t.H, t.M, t.S, t.L));
}
function Cl(t, e, r) {
return { y: t, m: e, d: r, H: 0, M: 0, S: 0, L: 0 };
}
function sC(t) {
var e = t.dateTime, r = t.date, n = t.time, i = t.periods, a = t.days, s = t.shortDays, o = t.months, l = t.shortMonths, u = Sl(i), h = Al(i), d = Sl(a), f = Al(a), p = Sl(s), m = Al(s), _ = Sl(o), y = Al(o), b = Sl(l), x = Al(l), k = {
a: X,
A: ct,
b: J,
B: Y,
c: null,
d: zv,
e: zv,
f: oU,
g: mU,
G: _U,
H: iU,
I: aU,
j: sU,
L: oC,
m: lU,
M: cU,
p: $,
q: lt,
Q: Wv,
s: Hv,
S: uU,
u: hU,
U: fU,
V: dU,
w: pU,
W: gU,
x: null,
X: null,
y: yU,
Y: bU,
Z: vU,
"%": Uv
}, T = {
a: ut,
A: W,
b: tt,
B: K,
c: null,
d: Yv,
e: Yv,
f: TU,
g: BU,
G: OU,
H: xU,
I: kU,
j: wU,
L: cC,
m: EU,
M: CU,
p: it,
q: Z,
Q: Wv,
s: Hv,
S: SU,
u: AU,
U: MU,
V: LU,
w: RU,
W: IU,
x: null,
X: null,
y: NU,
Y: DU,
Z: FU,
"%": Uv
}, C = {
a: L,
A: v,
b: B,
B: w,
c: D,
d: qv,
e: qv,
f: tU,
g: Pv,
G: Fv,
H: Vv,
I: Vv,
j: KY,
L: JY,
m: XY,
M: ZY,
p: A,
q: $Y,
Q: rU,
s: nU,
S: QY,
u: UY,
U: WY,
V: HY,
w: YY,
W: GY,
x: N,
X: z,
y: Pv,
Y: Fv,
Z: jY,
"%": eU
};
k.x = M(r, k), k.X = M(n, k), k.c = M(e, k), T.x = M(r, T), T.X = M(n, T), T.c = M(e, T);
function M(V, Q) {
return function(q) {
var U = [], F = -1, j = 0, P = V.length, et, at, It;
for (q instanceof Date || (q = new Date(+q)); ++F < P; )
V.charCodeAt(F) === 37 && (U.push(V.slice(j, F)), (at = Ov[et = V.charAt(++F)]) != null ? et = V.charAt(++F) : at = et === "e" ? " " : "0", (It = Q[et]) && (et = It(q, at)), U.push(et), j = F + 1);
return U.push(V.slice(j, F)), U.join("");
};
}
function S(V, Q) {
return function(q) {
var U = Cl(1900, void 0, 1), F = R(U, V, q += "", 0), j, P;
if (F != q.length)
return null;
if ("Q" in U)
return new Date(U.Q);
if ("s" in U)
return new Date(U.s * 1e3 + ("L" in U ? U.L : 0));
if (Q && !("Z" in U) && (U.Z = 0), "p" in U && (U.H = U.H % 12 + U.p * 12), U.m === void 0 && (U.m = "q" in U ? U.q : 0), "V" in U) {
if (U.V < 1 || U.V > 53)
return null;
"w" in U || (U.w = 1), "Z" in U ? (j = _d(Cl(U.y, 0, 1)), P = j.getUTCDay(), j = P > 4 || P === 0 ? Lc.ceil(j) : Lc(j), j = su.offset(j, (U.V - 1) * 7), U.y = j.getUTCFullYear(), U.m = j.getUTCMonth(), U.d = j.getUTCDate() + (U.w + 6) % 7) : (j = bd(Cl(U.y, 0, 1)), P = j.getDay(), j = P > 4 || P === 0 ? Mc.ceil(j) : Mc(j), j = au.offset(j, (U.V - 1) * 7), U.y = j.getFullYear(), U.m = j.getMonth(), U.d = j.getDate() + (U.w + 6) % 7);
} else
("W" in U || "U" in U) && ("w" in U || (U.w = "u" in U ? U.u % 7 : "W" in U ? 1 : 0), P = "Z" in U ? _d(Cl(U.y, 0, 1)).getUTCDay() : bd(Cl(U.y, 0, 1)).getDay(), U.m = 0, U.d = "W" in U ? (U.w + 6) % 7 + U.W * 7 - (P + 5) % 7 : U.w + U.U * 7 - (P + 6) % 7);
return "Z" in U ? (U.H += U.Z / 100 | 0, U.M += U.Z % 100, _d(U)) : bd(U);
};
}
function R(V, Q, q, U) {
for (var F = 0, j = Q.length, P = q.length, et, at; F < j; ) {
if (U >= P)
return -1;
if (et = Q.charCodeAt(F++), et === 37) {
if (et = Q.charAt(F++), at = C[et in Ov ? Q.charAt(F++) : et], !at || (U = at(V, q, U)) < 0)
return -1;
} else if (et != q.charCodeAt(U++))
return -1;
}
return U;
}
function A(V, Q, q) {
var U = u.exec(Q.slice(q));
return U ? (V.p = h.get(U[0].toLowerCase()), q + U[0].length) : -1;
}
function L(V, Q, q) {
var U = p.exec(Q.slice(q));
return U ? (V.w = m.get(U[0].toLowerCase()), q + U[0].length) : -1;
}
function v(V, Q, q) {
var U = d.exec(Q.slice(q));
return U ? (V.w = f.get(U[0].toLowerCase()), q + U[0].length) : -1;
}
function B(V, Q, q) {
var U = b.exec(Q.slice(q));
return U ? (V.m = x.get(U[0].toLowerCase()), q + U[0].length) : -1;
}
function w(V, Q, q) {
var U = _.exec(Q.slice(q));
return U ? (V.m = y.get(U[0].toLowerCase()), q + U[0].length) : -1;
}
function D(V, Q, q) {
return R(V, e, Q, q);
}
function N(V, Q, q) {
return R(V, r, Q, q);
}
function z(V, Q, q) {
return R(V, n, Q, q);
}
function X(V) {
return s[V.getDay()];
}
function ct(V) {
return a[V.getDay()];
}
function J(V) {
return l[V.getMonth()];
}
function Y(V) {
return o[V.getMonth()];
}
function $(V) {
return i[+(V.getHours() >= 12)];
}
function lt(V) {
return 1 + ~~(V.getMonth() / 3);
}
function ut(V) {
return s[V.getUTCDay()];
}
function W(V) {
return a[V.getUTCDay()];
}
function tt(V) {
return l[V.getUTCMonth()];
}
function K(V) {
return o[V.getUTCMonth()];
}
function it(V) {
return i[+(V.getUTCHours() >= 12)];
}
function Z(V) {
return 1 + ~~(V.getUTCMonth() / 3);
}
return {
format: function(V) {
var Q = M(V += "", k);
return Q.toString = function() {
return V;
}, Q;
},
parse: function(V) {
var Q = S(V += "", !1);
return Q.toString = function() {
return V;
}, Q;
},
utcFormat: function(V) {
var Q = M(V += "", T);
return Q.toString = function() {
return V;
}, Q;
},
utcParse: function(V) {
var Q = S(V += "", !0);
return Q.toString = function() {
return V;
}, Q;
}
};
}
var Ov = { "-": "", _: " ", 0: "0" }, Rr = /^\s*\d+/, qY = /^%/, VY = /[\\^$*+?|[\]().{}]/g;
function qe(t, e, r) {
var n = t < 0 ? "-" : "", i = (n ? -t : t) + "", a = i.length;
return n + (a < r ? new Array(r - a + 1).join(e) + i : i);
}
function zY(t) {
return t.replace(VY, "\\$&");
}
function Sl(t) {
return new RegExp("^(?:" + t.map(zY).join("|") + ")", "i");
}
function Al(t) {
return new Map(t.map((e, r) => [e.toLowerCase(), r]));
}
function YY(t, e, r) {
var n = Rr.exec(e.slice(r, r + 1));
return n ? (t.w = +n[0], r + n[0].length) : -1;
}
function UY(t, e, r) {
var n = Rr.exec(e.slice(r, r + 1));
return n ? (t.u = +n[0], r + n[0].length) : -1;
}
function WY(t, e, r) {
var n = Rr.exec(e.slice(r, r + 2));
return n ? (t.U = +n[0], r + n[0].length) : -1;
}
function HY(t, e, r) {
var n = Rr.exec(e.slice(r, r + 2));
return n ? (t.V = +n[0], r + n[0].length) : -1;
}
function GY(t, e, r) {
var n = Rr.exec(e.slice(r, r + 2));
return n ? (t.W = +n[0], r + n[0].length) : -1;
}
function Fv(t, e, r) {
var n = Rr.exec(e.slice(r, r + 4));
return n ? (t.y = +n[0], r + n[0].length) : -1;
}
function Pv(t, e, r) {
var n = Rr.exec(e.slice(r, r + 2));
return n ? (t.y = +n[0] + (+n[0] > 68 ? 1900 : 2e3), r + n[0].length) : -1;
}
function jY(t, e, r) {
var n = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r, r + 6));
return n ? (t.Z = n[1] ? 0 : -(n[2] + (n[3] || "00")), r + n[0].length) : -1;
}
function $Y(t, e, r) {
var n = Rr.exec(e.slice(r, r + 1));
return n ? (t.q = n[0] * 3 - 3, r + n[0].length) : -1;
}
function XY(t, e, r) {
var n = Rr.exec(e.slice(r, r + 2));
return n ? (t.m = n[0] - 1, r + n[0].length) : -1;
}
function qv(t, e, r) {
var n = Rr.exec(e.slice(r, r + 2));
return n ? (t.d = +n[0], r + n[0].length) : -1;
}
function KY(t, e, r) {
var n = Rr.exec(e.slice(r, r + 3));
return n ? (t.m = 0, t.d = +n[0], r + n[0].length) : -1;
}
function Vv(t, e, r) {
var n = Rr.exec(e.slice(r, r + 2));
return n ? (t.H = +n[0], r + n[0].length) : -1;
}
function ZY(t, e, r) {
var n = Rr.exec(e.slice(r, r + 2));
return n ? (t.M = +n[0], r + n[0].length) : -1;
}
function QY(t, e, r) {
var n = Rr.exec(e.slice(r, r + 2));
return n ? (t.S = +n[0], r + n[0].length) : -1;
}
function JY(t, e, r) {
var n = Rr.exec(e.slice(r, r + 3));
return n ? (t.L = +n[0], r + n[0].length) : -1;
}
function tU(t, e, r) {
var n = Rr.exec(e.slice(r, r + 6));
return n ? (t.L = Math.floor(n[0] / 1e3), r + n[0].length) : -1;
}
function eU(t, e, r) {
var n = qY.exec(e.slice(r, r + 1));
return n ? r + n[0].length : -1;
}
function rU(t, e, r) {
var n = Rr.exec(e.slice(r));
return n ? (t.Q = +n[0], r + n[0].length) : -1;
}
function nU(t, e, r) {
var n = Rr.exec(e.slice(r));
return n ? (t.s = +n[0], r + n[0].length) : -1;
}
function zv(t, e) {
return qe(t.getDate(), e, 2);
}
function iU(t, e) {
return qe(t.getHours(), e, 2);
}
function aU(t, e) {
return qe(t.getHours() % 12 || 12, e, 2);
}
function sU(t, e) {
return qe(1 + au.count(Ga(t), t), e, 3);
}
function oC(t, e) {
return qe(t.getMilliseconds(), e, 3);
}
function oU(t, e) {
return oC(t, e) + "000";
}
function lU(t, e) {
return qe(t.getMonth() + 1, e, 2);
}
function cU(t, e) {
return qe(t.getMinutes(), e, 2);
}
function uU(t, e) {
return qe(t.getSeconds(), e, 2);
}
function hU(t) {
var e = t.getDay();
return e === 0 ? 7 : e;
}
function fU(t, e) {
return qe(Wo.count(Ga(t) - 1, t), e, 2);
}
function lC(t) {
var e = t.getDay();
return e >= 4 || e === 0 ? Os(t) : Os.ceil(t);
}
function dU(t, e) {
return t = lC(t), qe(Os.count(Ga(t), t) + (Ga(t).getDay() === 4), e, 2);
}
function pU(t) {
return t.getDay();
}
function gU(t, e) {
return qe(Mc.count(Ga(t) - 1, t), e, 2);
}
function yU(t, e) {
return qe(t.getFullYear() % 100, e, 2);
}
function mU(t, e) {
return t = lC(t), qe(t.getFullYear() % 100, e, 2);
}
function bU(t, e) {
return qe(t.getFullYear() % 1e4, e, 4);
}
function _U(t, e) {
var r = t.getDay();
return t = r >= 4 || r === 0 ? Os(t) : Os.ceil(t), qe(t.getFullYear() % 1e4, e, 4);
}
function vU(t) {
var e = t.getTimezoneOffset();
return (e > 0 ? "-" : (e *= -1, "+")) + qe(e / 60 | 0, "0", 2) + qe(e % 60, "0", 2);
}
function Yv(t, e) {
return qe(t.getUTCDate(), e, 2);
}
function xU(t, e) {
return qe(t.getUTCHours(), e, 2);
}
function kU(t, e) {
return qe(t.getUTCHours() % 12 || 12, e, 2);
}
function wU(t, e) {
return qe(1 + su.count(ja(t), t), e, 3);
}
function cC(t, e) {
return qe(t.getUTCMilliseconds(), e, 3);
}
function TU(t, e) {
return cC(t, e) + "000";
}
function EU(t, e) {
return qe(t.getUTCMonth() + 1, e, 2);
}
function CU(t, e) {
return qe(t.getUTCMinutes(), e, 2);
}
function SU(t, e) {
return qe(t.getUTCSeconds(), e, 2);
}
function AU(t) {
var e = t.getUTCDay();
return e === 0 ? 7 : e;
}
function MU(t, e) {
return qe(Ho.count(ja(t) - 1, t), e, 2);
}
function uC(t) {
var e = t.getUTCDay();
return e >= 4 || e === 0 ? Fs(t) : Fs.ceil(t);
}
function LU(t, e) {
return t = uC(t), qe(Fs.count(ja(t), t) + (ja(t).getUTCDay() === 4), e, 2);
}
function RU(t) {
return t.getUTCDay();
}
function IU(t, e) {
return qe(Lc.count(ja(t) - 1, t), e, 2);
}
function NU(t, e) {
return qe(t.getUTCFullYear() % 100, e, 2);
}
function BU(t, e) {
return t = uC(t), qe(t.getUTCFullYear() % 100, e, 2);
}
function DU(t, e) {
return qe(t.getUTCFullYear() % 1e4, e, 4);
}
function OU(t, e) {
var r = t.getUTCDay();
return t = r >= 4 || r === 0 ? Fs(t) : Fs.ceil(t), qe(t.getUTCFullYear() % 1e4, e, 4);
}
function FU() {
return "+0000";
}
function Uv() {
return "%";
}
function Wv(t) {
return +t;
}
function Hv(t) {
return Math.floor(+t / 1e3);
}
var go, Rc, hC, D1, o4;
fC({
dateTime: "%x, %X",
date: "%-m/%-d/%Y",
time: "%-I:%M:%S %p",
periods: ["AM", "PM"],
days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
});
function fC(t) {
return go = sC(t), Rc = go.format, hC = go.parse, D1 = go.utcFormat, o4 = go.utcParse, go;
}
var dC = "%Y-%m-%dT%H:%M:%S.%LZ";
function PU(t) {
return t.toISOString();
}
var qU = Date.prototype.toISOString ? PU : D1(dC);
const VU = qU;
function zU(t) {
var e = new Date(t);
return isNaN(e) ? null : e;
}
var YU = +new Date("2000-01-01T00:00:00.000Z") ? zU : o4(dC);
const UU = YU;
function WU(t) {
return new Date(t);
}
function HU(t) {
return t instanceof Date ? +t : +new Date(+t);
}
function l4(t, e, r, n, i, a, s, o, l, u) {
var h = G3(), d = h.invert, f = h.domain, p = u(".%L"), m = u(":%S"), _ = u("%I:%M"), y = u("%I %p"), b = u("%a %d"), x = u("%b %d"), k = u("%B"), T = u("%Y");
function C(M) {
return (l(M) < M ? p : o(M) < M ? m : s(M) < M ? _ : a(M) < M ? y : n(M) < M ? i(M) < M ? b : x : r(M) < M ? k : T)(M);
}
return h.invert = function(M) {
return new Date(d(M));
}, h.domain = function(M) {
return arguments.length ? f(Array.from(M, HU)) : f().map(WU);
}, h.ticks = function(M) {
var S = f();
return t(S[0], S[S.length - 1], M == null ? 10 : M);
}, h.tickFormat = function(M, S) {
return S == null ? C : u(S);
}, h.nice = function(M) {
var S = f();
return (!M || typeof M.range != "function") && (M = e(S[0], S[S.length - 1], M == null ? 10 : M)), M ? f(RE(S, M)) : h;
}, h.copy = function() {
return iu(h, l4(t, e, r, n, i, a, s, o, l, u));
}, h;
}
function pC() {
return qn.apply(l4(iC, aC, Ga, e4, Wo, au, t4, J3, Fa, Rc).domain([new Date(2e3, 0, 1), new Date(2e3, 0, 2)]), arguments);
}
function GU() {
return qn.apply(l4(rC, nC, ja, a4, Ho, su, i4, n4, Fa, D1).domain([Date.UTC(2e3, 0, 1), Date.UTC(2e3, 0, 2)]), arguments);
}
function O1() {
var t = 0, e = 1, r, n, i, a, s = tn, o = !1, l;
function u(d) {
return d == null || isNaN(d = +d) ? l : s(i === 0 ? 0.5 : (d = (a(d) - r) * i, o ? Math.max(0, Math.min(1, d)) : d));
}
u.domain = function(d) {
return arguments.length ? ([t, e] = d, r = a(t = +t), n = a(e = +e), i = r === n ? 0 : 1 / (n - r), u) : [t, e];
}, u.clamp = function(d) {
return arguments.length ? (o = !!d, u) : o;
}, u.interpolator = function(d) {
return arguments.length ? (s = d, u) : s;
};
function h(d) {
return function(f) {
var p, m;
return arguments.length ? ([p, m] = f, s = d(p, m), u) : [s(0), s(1)];
};
}
return u.range = h(Ja), u.rangeRound = h(v1), u.unknown = function(d) {
return arguments.length ? (l = d, u) : l;
}, function(d) {
return a = d, r = d(t), n = d(e), i = r === n ? 0 : 1 / (n - r), u;
};
}
function rs(t, e) {
return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown());
}
function gC() {
var t = es(O1()(tn));
return t.copy = function() {
return rs(t, gC());
}, ba.apply(t, arguments);
}
function yC() {
var t = $3(O1()).domain([1, 10]);
return t.copy = function() {
return rs(t, yC()).base(t.base());
}, ba.apply(t, arguments);
}
function mC() {
var t = X3(O1());
return t.copy = function() {
return rs(t, mC()).constant(t.constant());
}, ba.apply(t, arguments);
}
function c4() {
var t = K3(O1());
return t.copy = function() {
return rs(t, c4()).exponent(t.exponent());
}, ba.apply(t, arguments);
}
function jU() {
return c4.apply(null, arguments).exponent(0.5);
}
function bC() {
var t = [], e = tn;
function r(n) {
if (n != null && !isNaN(n = +n))
return e((Us(t, n, 1) - 1) / (t.length - 1));
}
return r.domain = function(n) {
if (!arguments.length)
return t.slice();
t = [];
for (let i of n)
i != null && !isNaN(i = +i) && t.push(i);
return t.sort(tr), r;
}, r.interpolator = function(n) {
return arguments.length ? (e = n, r) : e;
}, r.range = function() {
return t.map((n, i) => e(i / (t.length - 1)));
}, r.quantiles = function(n) {
return Array.from({ length: n + 1 }, (i, a) => yc(t, a / n));
}, r.copy = function() {
return bC(e).domain(t);
}, ba.apply(r, arguments);
}
function F1() {
var t = 0, e = 0.5, r = 1, n = 1, i, a, s, o, l, u = tn, h, d = !1, f;
function p(_) {
return isNaN(_ = +_) ? f : (_ = 0.5 + ((_ = +h(_)) - a) * (n * _ < n * a ? o : l), u(d ? Math.max(0, Math.min(1, _)) : _));
}
p.domain = function(_) {
return arguments.length ? ([t, e, r] = _, i = h(t = +t), a = h(e = +e), s = h(r = +r), o = i === a ? 0 : 0.5 / (a - i), l = a === s ? 0 : 0.5 / (s - a), n = a < i ? -1 : 1, p) : [t, e, r];
}, p.clamp = function(_) {
return arguments.length ? (d = !!_, p) : d;
}, p.interpolator = function(_) {
return arguments.length ? (u = _, p) : u;
};
function m(_) {
return function(y) {
var b, x, k;
return arguments.length ? ([b, x, k] = y, u = nT(_, [b, x, k]), p) : [u(0), u(0.5), u(1)];
};
}
return p.range = m(Ja), p.rangeRound = m(v1), p.unknown = function(_) {
return arguments.length ? (f = _, p) : f;
}, function(_) {
return h = _, i = _(t), a = _(e), s = _(r), o = i === a ? 0 : 0.5 / (a - i), l = a === s ? 0 : 0.5 / (s - a), n = a < i ? -1 : 1, p;
};
}
function _C() {
var t = es(F1()(tn));
return t.copy = function() {
return rs(t, _C());
}, ba.apply(t, arguments);
}
function vC() {
var t = $3(F1()).domain([0.1, 1, 10]);
return t.copy = function() {
return rs(t, vC()).base(t.base());
}, ba.apply(t, arguments);
}
function xC() {
var t = X3(F1());
return t.copy = function() {
return rs(t, xC()).constant(t.constant());
}, ba.apply(t, arguments);
}
function u4() {
var t = K3(F1());
return t.copy = function() {
return rs(t, u4()).exponent(t.exponent());
}, ba.apply(t, arguments);
}
function $U() {
return u4.apply(null, arguments).exponent(0.5);
}
function Ce(t) {
for (var e = t.length / 6 | 0, r = new Array(e), n = 0; n < e; )
r[n] = "#" + t.slice(n * 6, ++n * 6);
return r;
}
const XU = Ce("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"), KU = Ce("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"), ZU = Ce("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"), QU = Ce("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"), JU = Ce("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"), tW = Ce("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"), eW = Ce("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"), rW = Ce("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"), nW = Ce("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"), iW = Ce("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"), We = (t) => U9(t[t.length - 1]);
var kC = new Array(3).concat(
"d8b365f5f5f55ab4ac",
"a6611adfc27d80cdc1018571",
"a6611adfc27df5f5f580cdc1018571",
"8c510ad8b365f6e8c3c7eae55ab4ac01665e",
"8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e",
"8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e",
"8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e",
"5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30",
"5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30"
).map(Ce);
const aW = We(kC);
var wC = new Array(3).concat(
"af8dc3f7f7f77fbf7b",
"7b3294c2a5cfa6dba0008837",
"7b3294c2a5cff7f7f7a6dba0008837",
"762a83af8dc3e7d4e8d9f0d37fbf7b1b7837",
"762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837",
"762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837",
"762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837",
"40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b",
"40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b"
).map(Ce);
const sW = We(wC);
var TC = new Array(3).concat(
"e9a3c9f7f7f7a1d76a",
"d01c8bf1b6dab8e1864dac26",
"d01c8bf1b6daf7f7f7b8e1864dac26",
"c51b7de9a3c9fde0efe6f5d0a1d76a4d9221",
"c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221",
"c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221",
"c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221",
"8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419",
"8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419"
).map(Ce);
const oW = We(TC);
var EC = new Array(3).concat(
"998ec3f7f7f7f1a340",
"5e3c99b2abd2fdb863e66101",
"5e3c99b2abd2f7f7f7fdb863e66101",
"542788998ec3d8daebfee0b6f1a340b35806",
"542788998ec3d8daebf7f7f7fee0b6f1a340b35806",
"5427888073acb2abd2d8daebfee0b6fdb863e08214b35806",
"5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806",
"2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08",
"2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08"
).map(Ce);
const lW = We(EC);
var CC = new Array(3).concat(
"ef8a62f7f7f767a9cf",
"ca0020f4a58292c5de0571b0",
"ca0020f4a582f7f7f792c5de0571b0",
"b2182bef8a62fddbc7d1e5f067a9cf2166ac",
"b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac",
"b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac",
"b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac",
"67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061",
"67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061"
).map(Ce);
const cW = We(CC);
var SC = new Array(3).concat(
"ef8a62ffffff999999",
"ca0020f4a582bababa404040",
"ca0020f4a582ffffffbababa404040",
"b2182bef8a62fddbc7e0e0e09999994d4d4d",
"b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d",
"b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d",
"b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d",
"67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a",
"67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a"
).map(Ce);
const uW = We(SC);
var AC = new Array(3).concat(
"fc8d59ffffbf91bfdb",
"d7191cfdae61abd9e92c7bb6",
"d7191cfdae61ffffbfabd9e92c7bb6",
"d73027fc8d59fee090e0f3f891bfdb4575b4",
"d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4",
"d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4",
"d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4",
"a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695",
"a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695"
).map(Ce);
const hW = We(AC);
var MC = new Array(3).concat(
"fc8d59ffffbf91cf60",
"d7191cfdae61a6d96a1a9641",
"d7191cfdae61ffffbfa6d96a1a9641",
"d73027fc8d59fee08bd9ef8b91cf601a9850",
"d73027fc8d59fee08bffffbfd9ef8b91cf601a9850",
"d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850",
"d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850",
"a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837",
"a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837"
).map(Ce);
const fW = We(MC);
var LC = new Array(3).concat(
"fc8d59ffffbf99d594",
"d7191cfdae61abdda42b83ba",
"d7191cfdae61ffffbfabdda42b83ba",
"d53e4ffc8d59fee08be6f59899d5943288bd",
"d53e4ffc8d59fee08bffffbfe6f59899d5943288bd",
"d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd",
"d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd",
"9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2",
"9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2"
).map(Ce);
const dW = We(LC);
var RC = new Array(3).concat(
"e5f5f999d8c92ca25f",
"edf8fbb2e2e266c2a4238b45",
"edf8fbb2e2e266c2a42ca25f006d2c",
"edf8fbccece699d8c966c2a42ca25f006d2c",
"edf8fbccece699d8c966c2a441ae76238b45005824",
"f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824",
"f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b"
).map(Ce);
const pW = We(RC);
var IC = new Array(3).concat(
"e0ecf49ebcda8856a7",
"edf8fbb3cde38c96c688419d",
"edf8fbb3cde38c96c68856a7810f7c",
"edf8fbbfd3e69ebcda8c96c68856a7810f7c",
"edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b",
"f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b",
"f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b"
).map(Ce);
const gW = We(IC);
var NC = new Array(3).concat(
"e0f3dba8ddb543a2ca",
"f0f9e8bae4bc7bccc42b8cbe",
"f0f9e8bae4bc7bccc443a2ca0868ac",
"f0f9e8ccebc5a8ddb57bccc443a2ca0868ac",
"f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e",
"f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e",
"f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081"
).map(Ce);
const yW = We(NC);
var BC = new Array(3).concat(
"fee8c8fdbb84e34a33",
"fef0d9fdcc8afc8d59d7301f",
"fef0d9fdcc8afc8d59e34a33b30000",
"fef0d9fdd49efdbb84fc8d59e34a33b30000",
"fef0d9fdd49efdbb84fc8d59ef6548d7301f990000",
"fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000",
"fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000"
).map(Ce);
const mW = We(BC);
var DC = new Array(3).concat(
"ece2f0a6bddb1c9099",
"f6eff7bdc9e167a9cf02818a",
"f6eff7bdc9e167a9cf1c9099016c59",
"f6eff7d0d1e6a6bddb67a9cf1c9099016c59",
"f6eff7d0d1e6a6bddb67a9cf3690c002818a016450",
"fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450",
"fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636"
).map(Ce);
const bW = We(DC);
var OC = new Array(3).concat(
"ece7f2a6bddb2b8cbe",
"f1eef6bdc9e174a9cf0570b0",
"f1eef6bdc9e174a9cf2b8cbe045a8d",
"f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d",
"f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b",
"fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b",
"fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858"
).map(Ce);
const _W = We(OC);
var FC = new Array(3).concat(
"e7e1efc994c7dd1c77",
"f1eef6d7b5d8df65b0ce1256",
"f1eef6d7b5d8df65b0dd1c77980043",
"f1eef6d4b9dac994c7df65b0dd1c77980043",
"f1eef6d4b9dac994c7df65b0e7298ace125691003f",
"f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f",
"f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f"
).map(Ce);
const vW = We(FC);
var PC = new Array(3).concat(
"fde0ddfa9fb5c51b8a",
"feebe2fbb4b9f768a1ae017e",
"feebe2fbb4b9f768a1c51b8a7a0177",
"feebe2fcc5c0fa9fb5f768a1c51b8a7a0177",
"feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177",
"fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177",
"fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a"
).map(Ce);
const xW = We(PC);
var qC = new Array(3).concat(
"edf8b17fcdbb2c7fb8",
"ffffcca1dab441b6c4225ea8",
"ffffcca1dab441b6c42c7fb8253494",
"ffffccc7e9b47fcdbb41b6c42c7fb8253494",
"ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84",
"ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84",
"ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58"
).map(Ce);
const kW = We(qC);
var VC = new Array(3).concat(
"f7fcb9addd8e31a354",
"ffffccc2e69978c679238443",
"ffffccc2e69978c67931a354006837",
"ffffccd9f0a3addd8e78c67931a354006837",
"ffffccd9f0a3addd8e78c67941ab5d238443005a32",
"ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32",
"ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529"
).map(Ce);
const wW = We(VC);
var zC = new Array(3).concat(
"fff7bcfec44fd95f0e",
"ffffd4fed98efe9929cc4c02",
"ffffd4fed98efe9929d95f0e993404",
"ffffd4fee391fec44ffe9929d95f0e993404",
"ffffd4fee391fec44ffe9929ec7014cc4c028c2d04",
"ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04",
"ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506"
).map(Ce);
const TW = We(zC);
var YC = new Array(3).concat(
"ffeda0feb24cf03b20",
"ffffb2fecc5cfd8d3ce31a1c",
"ffffb2fecc5cfd8d3cf03b20bd0026",
"ffffb2fed976feb24cfd8d3cf03b20bd0026",
"ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026",
"ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026",
"ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026"
).map(Ce);
const EW = We(YC);
var UC = new Array(3).concat(
"deebf79ecae13182bd",
"eff3ffbdd7e76baed62171b5",
"eff3ffbdd7e76baed63182bd08519c",
"eff3ffc6dbef9ecae16baed63182bd08519c",
"eff3ffc6dbef9ecae16baed64292c62171b5084594",
"f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594",
"f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b"
).map(Ce);
const CW = We(UC);
var WC = new Array(3).concat(
"e5f5e0a1d99b31a354",
"edf8e9bae4b374c476238b45",
"edf8e9bae4b374c47631a354006d2c",
"edf8e9c7e9c0a1d99b74c47631a354006d2c",
"edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32",
"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32",
"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b"
).map(Ce);
const SW = We(WC);
var HC = new Array(3).concat(
"f0f0f0bdbdbd636363",
"f7f7f7cccccc969696525252",
"f7f7f7cccccc969696636363252525",
"f7f7f7d9d9d9bdbdbd969696636363252525",
"f7f7f7d9d9d9bdbdbd969696737373525252252525",
"fffffff0f0f0d9d9d9bdbdbd969696737373525252252525",
"fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000"
).map(Ce);
const AW = We(HC);
var GC = new Array(3).concat(
"efedf5bcbddc756bb1",
"f2f0f7cbc9e29e9ac86a51a3",
"f2f0f7cbc9e29e9ac8756bb154278f",
"f2f0f7dadaebbcbddc9e9ac8756bb154278f",
"f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486",
"fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486",
"fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d"
).map(Ce);
const MW = We(GC);
var jC = new Array(3).concat(
"fee0d2fc9272de2d26",
"fee5d9fcae91fb6a4acb181d",
"fee5d9fcae91fb6a4ade2d26a50f15",
"fee5d9fcbba1fc9272fb6a4ade2d26a50f15",
"fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d",
"fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d",
"fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d"
).map(Ce);
const LW = We(jC);
var $C = new Array(3).concat(
"fee6cefdae6be6550d",
"feeddefdbe85fd8d3cd94701",
"feeddefdbe85fd8d3ce6550da63603",
"feeddefdd0a2fdae6bfd8d3ce6550da63603",
"feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04",
"fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04",
"fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704"
).map(Ce);
const RW = We($C);
function IW(t) {
return t = Math.max(0, Math.min(1, t)), "rgb(" + Math.max(0, Math.min(255, Math.round(-4.54 - t * (35.34 - t * (2381.73 - t * (6402.7 - t * (7024.72 - t * 2710.57))))))) + ", " + Math.max(0, Math.min(255, Math.round(32.49 + t * (170.73 + t * (52.82 - t * (131.46 - t * (176.58 - t * 67.37))))))) + ", " + Math.max(0, Math.min(255, Math.round(81.24 + t * (442.36 - t * (2482.43 - t * (6167.24 - t * (6614.94 - t * 2475.67))))))) + ")";
}
const NW = x1(si(300, 0.5, 0), si(-240, 0.5, 1));
var BW = x1(si(-100, 0.75, 0.35), si(80, 1.5, 0.8)), DW = x1(si(260, 0.75, 0.35), si(80, 1.5, 0.8)), ju = si();
function OW(t) {
(t < 0 || t > 1) && (t -= Math.floor(t));
var e = Math.abs(t - 0.5);
return ju.h = 360 * t - 100, ju.s = 1.5 - 1.5 * e, ju.l = 0.8 - 0.9 * e, ju + "";
}
var $u = Oo(), FW = Math.PI / 3, PW = Math.PI * 2 / 3;
function qW(t) {
var e;
return t = (0.5 - t) * Math.PI, $u.r = 255 * (e = Math.sin(t)) * e, $u.g = 255 * (e = Math.sin(t + FW)) * e, $u.b = 255 * (e = Math.sin(t + PW)) * e, $u + "";
}
function VW(t) {
return t = Math.max(0, Math.min(1, t)), "rgb(" + Math.max(0, Math.min(255, Math.round(34.61 + t * (1172.33 - t * (10793.56 - t * (33300.12 - t * (38394.49 - t * 14825.05))))))) + ", " + Math.max(0, Math.min(255, Math.round(23.31 + t * (557.33 + t * (1225.33 - t * (3574.96 - t * (1073.77 + t * 707.56))))))) + ", " + Math.max(0, Math.min(255, Math.round(27.2 + t * (3211.1 - t * (15327.97 - t * (27814 - t * (22569.18 - t * 6838.66))))))) + ")";
}
function P1(t) {
var e = t.length;
return function(r) {
return t[Math.max(0, Math.min(e - 1, Math.floor(r * e)))];
};
}
const zW = P1(Ce("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));
var YW = P1(Ce("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")), UW = P1(Ce("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")), WW = P1(Ce("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));
function ke(t) {
return function() {
return t;
};
}
const Gv = Math.abs, zr = Math.atan2, aa = Math.cos, HW = Math.max, Co = Math.min, fn = Math.sin, je = Math.sqrt, Yr = 1e-12, $a = Math.PI, Tf = $a / 2, qa = 2 * $a;
function GW(t) {
return t > 1 ? 0 : t < -1 ? $a : Math.acos(t);
}
function jv(t) {
return t >= 1 ? Tf : t <= -1 ? -Tf : Math.asin(t);
}
function jW(t) {
return t.innerRadius;
}
function $W(t) {
return t.outerRadius;
}
function XW(t) {
return t.startAngle;
}
function KW(t) {
return t.endAngle;
}
function ZW(t) {
return t && t.padAngle;
}
function QW(t, e, r, n, i, a, s, o) {
var l = r - t, u = n - e, h = s - i, d = o - a, f = d * l - h * u;
if (!(f * f < Yr))
return f = (h * (e - a) - d * (t - i)) / f, [t + f * l, e + f * u];
}
function Xu(t, e, r, n, i, a, s) {
var o = t - r, l = e - n, u = (s ? a : -a) / je(o * o + l * l), h = u * l, d = -u * o, f = t + h, p = e + d, m = r + h, _ = n + d, y = (f + m) / 2, b = (p + _) / 2, x = m - f, k = _ - p, T = x * x + k * k, C = i - a, M = f * _ - m * p, S = (k < 0 ? -1 : 1) * je(HW(0, C * C * T - M * M)), R = (M * k - x * S) / T, A = (-M * x - k * S) / T, L = (M * k + x * S) / T, v = (-M * x + k * S) / T, B = R - y, w = A - b, D = L - y, N = v - b;
return B * B + w * w > D * D + N * N && (R = L, A = v), {
cx: R,
cy: A,
x01: -h,
y01: -d,
x11: R * (i / C - 1),
y11: A * (i / C - 1)
};
}
function Ef() {
var t = jW, e = $W, r = ke(0), n = null, i = XW, a = KW, s = ZW, o = null;
function l() {
var u, h, d = +t.apply(this, arguments), f = +e.apply(this, arguments), p = i.apply(this, arguments) - Tf, m = a.apply(this, arguments) - Tf, _ = Gv(m - p), y = m > p;
if (o || (o = u = ts()), f < d && (h = f, f = d, d = h), !(f > Yr))
o.moveTo(0, 0);
else if (_ > qa - Yr)
o.moveTo(f * aa(p), f * fn(p)), o.arc(0, 0, f, p, m, !y), d > Yr && (o.moveTo(d * aa(m), d * fn(m)), o.arc(0, 0, d, m, p, y));
else {
var b = p, x = m, k = p, T = m, C = _, M = _, S = s.apply(this, arguments) / 2, R = S > Yr && (n ? +n.apply(this, arguments) : je(d * d + f * f)), A = Co(Gv(f - d) / 2, +r.apply(this, arguments)), L = A, v = A, B, w;
if (R > Yr) {
var D = jv(R / d * fn(S)), N = jv(R / f * fn(S));
(C -= D * 2) > Yr ? (D *= y ? 1 : -1, k += D, T -= D) : (C = 0, k = T = (p + m) / 2), (M -= N * 2) > Yr ? (N *= y ? 1 : -1, b += N, x -= N) : (M = 0, b = x = (p + m) / 2);
}
var z = f * aa(b), X = f * fn(b), ct = d * aa(T), J = d * fn(T);
if (A > Yr) {
var Y = f * aa(x), $ = f * fn(x), lt = d * aa(k), ut = d * fn(k), W;
if (_ < $a && (W = QW(z, X, lt, ut, Y, $, ct, J))) {
var tt = z - W[0], K = X - W[1], it = Y - W[0], Z = $ - W[1], V = 1 / fn(GW((tt * it + K * Z) / (je(tt * tt + K * K) * je(it * it + Z * Z))) / 2), Q = je(W[0] * W[0] + W[1] * W[1]);
L = Co(A, (d - Q) / (V - 1)), v = Co(A, (f - Q) / (V + 1));
}
}
M > Yr ? v > Yr ? (B = Xu(lt, ut, z, X, f, v, y), w = Xu(Y, $, ct, J, f, v, y), o.moveTo(B.cx + B.x01, B.cy + B.y01), v < A ? o.arc(B.cx, B.cy, v, zr(B.y01, B.x01), zr(w.y01, w.x01), !y) : (o.arc(B.cx, B.cy, v, zr(B.y01, B.x01), zr(B.y11, B.x11), !y), o.arc(0, 0, f, zr(B.cy + B.y11, B.cx + B.x11), zr(w.cy + w.y11, w.cx + w.x11), !y), o.arc(w.cx, w.cy, v, zr(w.y11, w.x11), zr(w.y01, w.x01), !y))) : (o.moveTo(z, X), o.arc(0, 0, f, b, x, !y)) : o.moveTo(z, X), !(d > Yr) || !(C > Yr) ? o.lineTo(ct, J) : L > Yr ? (B = Xu(ct, J, Y, $, d, -L, y), w = Xu(z, X, lt, ut, d, -L, y), o.lineTo(B.cx + B.x01, B.cy + B.y01), L < A ? o.arc(B.cx, B.cy, L, zr(B.y01, B.x01), zr(w.y01, w.x01), !y) : (o.arc(B.cx, B.cy, L, zr(B.y01, B.x01), zr(B.y11, B.x11), !y), o.arc(0, 0, d, zr(B.cy + B.y11, B.cx + B.x11), zr(w.cy + w.y11, w.cx + w.x11), y), o.arc(w.cx, w.cy, L, zr(w.y11, w.x11), zr(w.y01, w.x01), !y))) : o.arc(0, 0, d, T, k, y);
}
if (o.closePath(), u)
return o = null, u + "" || null;
}
return l.centroid = function() {
var u = (+t.apply(this, arguments) + +e.apply(this, arguments)) / 2, h = (+i.apply(this, arguments) + +a.apply(this, arguments)) / 2 - $a / 2;
return [aa(h) * u, fn(h) * u];
}, l.innerRadius = function(u) {
return arguments.length ? (t = typeof u == "function" ? u : ke(+u), l) : t;
}, l.outerRadius = function(u) {
return arguments.length ? (e = typeof u == "function" ? u : ke(+u), l) : e;
}, l.cornerRadius = function(u) {
return arguments.length ? (r = typeof u == "function" ? u : ke(+u), l) : r;
}, l.padRadius = function(u) {
return arguments.length ? (n = u == null ? null : typeof u == "function" ? u : ke(+u), l) : n;
}, l.startAngle = function(u) {
return arguments.length ? (i = typeof u == "function" ? u : ke(+u), l) : i;
}, l.endAngle = function(u) {
return arguments.length ? (a = typeof u == "function" ? u : ke(+u), l) : a;
}, l.padAngle = function(u) {
return arguments.length ? (s = typeof u == "function" ? u : ke(+u), l) : s;
}, l.context = function(u) {
return arguments.length ? (o = u == null ? null : u, l) : o;
}, l;
}
var JW = Array.prototype.slice;
function q1(t) {
return typeof t == "object" && "length" in t ? t : Array.from(t);
}
function XC(t) {
this._context = t;
}
XC.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(t, e) {
switch (t = +t, e = +e, this._point) {
case 0:
this._point = 1, this._line ? this._context.lineTo(t, e) : this._context.moveTo(t, e);
break;
case 1:
this._point = 2;
default:
this._context.lineTo(t, e);
break;
}
}
};
function bn(t) {
return new XC(t);
}
function h4(t) {
return t[0];
}
function f4(t) {
return t[1];
}
function ns(t, e) {
var r = ke(!0), n = null, i = bn, a = null;
t = typeof t == "function" ? t : t === void 0 ? h4 : ke(t), e = typeof e == "function" ? e : e === void 0 ? f4 : ke(e);
function s(o) {
var l, u = (o = q1(o)).length, h, d = !1, f;
for (n == null && (a = i(f = ts())), l = 0; l <= u; ++l)
!(l < u && r(h = o[l], l, o)) === d && ((d = !d) ? a.lineStart() : a.lineEnd()), d && a.point(+t(h, l, o), +e(h, l, o));
if (f)
return a = null, f + "" || null;
}
return s.x = function(o) {
return arguments.length ? (t = typeof o == "function" ? o : ke(+o), s) : t;
}, s.y = function(o) {
return arguments.length ? (e = typeof o == "function" ? o : ke(+o), s) : e;
}, s.defined = function(o) {
return arguments.length ? (r = typeof o == "function" ? o : ke(!!o), s) : r;
}, s.curve = function(o) {
return arguments.length ? (i = o, n != null && (a = i(n)), s) : i;
}, s.context = function(o) {
return arguments.length ? (o == null ? n = a = null : a = i(n = o), s) : n;
}, s;
}
function KC(t, e, r) {
var n = null, i = ke(!0), a = null, s = bn, o = null;
t = typeof t == "function" ? t : t === void 0 ? h4 : ke(+t), e = typeof e == "function" ? e : ke(e === void 0 ? 0 : +e), r = typeof r == "function" ? r : r === void 0 ? f4 : ke(+r);
function l(h) {
var d, f, p, m = (h = q1(h)).length, _, y = !1, b, x = new Array(m), k = new Array(m);
for (a == null && (o = s(b = ts())), d = 0; d <= m; ++d) {
if (!(d < m && i(_ = h[d], d, h)) === y)
if (y = !y)
f = d, o.areaStart(), o.lineStart();
else {
for (o.lineEnd(), o.lineStart(), p = d - 1; p >= f; --p)
o.point(x[p], k[p]);
o.lineEnd(), o.areaEnd();
}
y && (x[d] = +t(_, d, h), k[d] = +e(_, d, h), o.point(n ? +n(_, d, h) : x[d], r ? +r(_, d, h) : k[d]));
}
if (b)
return o = null, b + "" || null;
}
function u() {
return ns().defined(i).curve(s).context(a);
}
return l.x = function(h) {
return arguments.length ? (t = typeof h == "function" ? h : ke(+h), n = null, l) : t;
}, l.x0 = function(h) {
return arguments.length ? (t = typeof h == "function" ? h : ke(+h), l) : t;
}, l.x1 = function(h) {
return arguments.length ? (n = h == null ? null : typeof h == "function" ? h : ke(+h), l) : n;
}, l.y = function(h) {
return arguments.length ? (e = typeof h == "function" ? h : ke(+h), r = null, l) : e;
}, l.y0 = function(h) {
return arguments.length ? (e = typeof h == "function" ? h : ke(+h), l) : e;
}, l.y1 = function(h) {
return arguments.length ? (r = h == null ? null : typeof h == "function" ? h : ke(+h), l) : r;
}, l.lineX0 = l.lineY0 = function() {
return u().x(t).y(e);
}, l.lineY1 = function() {
return u().x(t).y(r);
}, l.lineX1 = function() {
return u().x(n).y(e);
}, l.defined = function(h) {
return arguments.length ? (i = typeof h == "function" ? h : ke(!!h), l) : i;
}, l.curve = function(h) {
return arguments.length ? (s = h, a != null && (o = s(a)), l) : s;
}, l.context = function(h) {
return arguments.length ? (h == null ? a = o = null : o = s(a = h), l) : a;
}, l;
}
function tH(t, e) {
return e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN;
}
function eH(t) {
return t;
}
function ZC() {
var t = eH, e = tH, r = null, n = ke(0), i = ke(qa), a = ke(0);
function s(o) {
var l, u = (o = q1(o)).length, h, d, f = 0, p = new Array(u), m = new Array(u), _ = +n.apply(this, arguments), y = Math.min(qa, Math.max(-qa, i.apply(this, arguments) - _)), b, x = Math.min(Math.abs(y) / u, a.apply(this, arguments)), k = x * (y < 0 ? -1 : 1), T;
for (l = 0; l < u; ++l)
(T = m[p[l] = l] = +t(o[l], l, o)) > 0 && (f += T);
for (e != null ? p.sort(function(C, M) {
return e(m[C], m[M]);
}) : r != null && p.sort(function(C, M) {
return r(o[C], o[M]);
}), l = 0, d = f ? (y - u * k) / f : 0; l < u; ++l, _ = b)
h = p[l], T = m[h], b = _ + (T > 0 ? T * d : 0) + k, m[h] = {
data: o[h],
index: l,
value: T,
startAngle: _,
endAngle: b,
padAngle: x
};
return m;
}
return s.value = function(o) {
return arguments.length ? (t = typeof o == "function" ? o : ke(+o), s) : t;
}, s.sortValues = function(o) {
return arguments.length ? (e = o, r = null, s) : e;
}, s.sort = function(o) {
return arguments.length ? (r = o, e = null, s) : r;
}, s.startAngle = function(o) {
return arguments.length ? (n = typeof o == "function" ? o : ke(+o), s) : n;
}, s.endAngle = function(o) {
return arguments.length ? (i = typeof o == "function" ? o : ke(+o), s) : i;
}, s.padAngle = function(o) {
return arguments.length ? (a = typeof o == "function" ? o : ke(+o), s) : a;
}, s;
}
var QC = d4(bn);
function JC(t) {
this._curve = t;
}
JC.prototype = {
areaStart: function() {
this._curve.areaStart();
},
areaEnd: function() {
this._curve.areaEnd();
},
lineStart: function() {
this._curve.lineStart();
},
lineEnd: function() {
this._curve.lineEnd();
},
point: function(t, e) {
this._curve.point(e * Math.sin(t), e * -Math.cos(t));
}
};
function d4(t) {
function e(r) {
return new JC(t(r));
}
return e._curve = t, e;
}
function jl(t) {
var e = t.curve;
return t.angle = t.x, delete t.x, t.radius = t.y, delete t.y, t.curve = function(r) {
return arguments.length ? e(d4(r)) : e()._curve;
}, t;
}
function $v() {
return jl(ns().curve(QC));
}
function Xv() {
var t = KC().curve(QC), e = t.curve, r = t.lineX0, n = t.lineX1, i = t.lineY0, a = t.lineY1;
return t.angle = t.x, delete t.x, t.startAngle = t.x0, delete t.x0, t.endAngle = t.x1, delete t.x1, t.radius = t.y, delete t.y, t.innerRadius = t.y0, delete t.y0, t.outerRadius = t.y1, delete t.y1, t.lineStartAngle = function() {
return jl(r());
}, delete t.lineX0, t.lineEndAngle = function() {
return jl(n());
}, delete t.lineX1, t.lineInnerRadius = function() {
return jl(i());
}, delete t.lineY0, t.lineOuterRadius = function() {
return jl(a());
}, delete t.lineY1, t.curve = function(s) {
return arguments.length ? e(d4(s)) : e()._curve;
}, t;
}
function $l(t, e) {
return [(e = +e) * Math.cos(t -= Math.PI / 2), e * Math.sin(t)];
}
class tS {
constructor(e, r) {
this._context = e, this._x = r;
}
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, r) {
switch (e = +e, r = +r, this._point) {
case 0: {
this._point = 1, this._line ? this._context.lineTo(e, r) : this._context.moveTo(e, r);
break;
}
case 1:
this._point = 2;
default: {
this._x ? this._context.bezierCurveTo(this._x0 = (this._x0 + e) / 2, this._y0, this._x0, r, e, r) : this._context.bezierCurveTo(this._x0, this._y0 = (this._y0 + r) / 2, e, this._y0, e, r);
break;
}
}
this._x0 = e, this._y0 = r;
}
}
class rH {
constructor(e) {
this._context = e;
}
lineStart() {
this._point = 0;
}
lineEnd() {
}
point(e, r) {
if (e = +e, r = +r, this._point++ === 0)
this._x0 = e, this._y0 = r;
else {
const n = $l(this._x0, this._y0), i = $l(this._x0, this._y0 = (this._y0 + r) / 2), a = $l(e, this._y0), s = $l(e, r);
this._context.moveTo(...n), this._context.bezierCurveTo(...i, ...a, ...s);
}
}
}
function eS(t) {
return new tS(t, !0);
}
function rS(t) {
return new tS(t, !1);
}
function nH(t) {
return new rH(t);
}
function iH(t) {
return t.source;
}
function aH(t) {
return t.target;
}
function V1(t) {
let e = iH, r = aH, n = h4, i = f4, a = null, s = null;
function o() {
let l;
const u = JW.call(arguments), h = e.apply(this, u), d = r.apply(this, u);
if (a == null && (s = t(l = ts())), s.lineStart(), u[0] = h, s.point(+n.apply(this, u), +i.apply(this, u)), u[0] = d, s.point(+n.apply(this, u), +i.apply(this, u)), s.lineEnd(), l)
return s = null, l + "" || null;
}
return o.source = function(l) {
return arguments.length ? (e = l, o) : e;
}, o.target = function(l) {
return arguments.length ? (r = l, o) : r;
}, o.x = function(l) {
return arguments.length ? (n = typeof l == "function" ? l : ke(+l), o) : n;
}, o.y = function(l) {
return arguments.length ? (i = typeof l == "function" ? l : ke(+l), o) : i;
}, o.context = function(l) {
return arguments.length ? (l == null ? a = s = null : s = t(a = l), o) : a;
}, o;
}
function sH() {
return V1(eS);
}
function oH() {
return V1(rS);
}
function lH() {
const t = V1(nH);
return t.angle = t.x, delete t.x, t.radius = t.y, delete t.y, t;
}
const cH = je(3), nS = {
draw(t, e) {
const r = je(e + Co(e / 28, 0.75)) * 0.59436, n = r / 2, i = n * cH;
t.moveTo(0, r), t.lineTo(0, -r), t.moveTo(-i, -n), t.lineTo(i, n), t.moveTo(-i, n), t.lineTo(i, -n);
}
}, z1 = {
draw(t, e) {
const r = je(e / $a);
t.moveTo(r, 0), t.arc(0, 0, r, 0, qa);
}
}, iS = {
draw(t, e) {
const r = je(e / 5) / 2;
t.moveTo(-3 * r, -r), t.lineTo(-r, -r), t.lineTo(-r, -3 * r), t.lineTo(r, -3 * r), t.lineTo(r, -r), t.lineTo(3 * r, -r), t.lineTo(3 * r, r), t.lineTo(r, r), t.lineTo(r, 3 * r), t.lineTo(-r, 3 * r), t.lineTo(-r, r), t.lineTo(-3 * r, r), t.closePath();
}
}, aS = je(1 / 3), uH = aS * 2, sS = {
draw(t, e) {
const r = je(e / uH), n = r * aS;
t.moveTo(0, -r), t.lineTo(n, 0), t.lineTo(0, r), t.lineTo(-n, 0), t.closePath();
}
}, oS = {
draw(t, e) {
const r = je(e) * 0.62625;
t.moveTo(0, -r), t.lineTo(r, 0), t.lineTo(0, r), t.lineTo(-r, 0), t.closePath();
}
}, lS = {
draw(t, e) {
const r = je(e - Co(e / 7, 2)) * 0.87559;
t.moveTo(-r, 0), t.lineTo(r, 0), t.moveTo(0, r), t.lineTo(0, -r);
}
}, cS = {
draw(t, e) {
const r = je(e), n = -r / 2;
t.rect(n, n, r, r);
}
}, uS = {
draw(t, e) {
const r = je(e) * 0.4431;
t.moveTo(r, r), t.lineTo(r, -r), t.lineTo(-r, -r), t.lineTo(-r, r), t.closePath();
}
}, hH = 0.8908130915292852, hS = fn($a / 10) / fn(7 * $a / 10), fH = fn(qa / 10) * hS, dH = -aa(qa / 10) * hS, fS = {
draw(t, e) {
const r = je(e * hH), n = fH * r, i = dH * r;
t.moveTo(0, -r), t.lineTo(n, i);
for (let a = 1; a < 5; ++a) {
const s = qa * a / 5, o = aa(s), l = fn(s);
t.lineTo(l * r, -o * r), t.lineTo(o * n - l * i, l * n + o * i);
}
t.closePath();
}
}, vd = je(3), dS = {
draw(t, e) {
const r = -je(e / (vd * 3));
t.moveTo(0, r * 2), t.lineTo(-vd * r, -r), t.lineTo(vd * r, -r), t.closePath();
}
}, pH = je(3), pS = {
draw(t, e) {
const r = je(e) * 0.6824, n = r / 2, i = r * pH / 2;
t.moveTo(0, -r), t.lineTo(i, n), t.lineTo(-i, n), t.closePath();
}
}, Rn = -0.5, In = je(3) / 2, gb = 1 / je(12), gH = (gb / 2 + 1) * 3, gS = {
draw(t, e) {
const r = je(e / gH), n = r / 2, i = r * gb, a = n, s = r * gb + r, o = -a, l = s;
t.moveTo(n, i), t.lineTo(a, s), t.lineTo(o, l), t.lineTo(Rn * n - In * i, In * n + Rn * i), t.lineTo(Rn * a - In * s, In * a + Rn * s), t.lineTo(Rn * o - In * l, In * o + Rn * l), t.lineTo(Rn * n + In * i, Rn * i - In * n), t.lineTo(Rn * a + In * s, Rn * s - In * a), t.lineTo(Rn * o + In * l, Rn * l - In * o), t.closePath();
}
}, yS = {
draw(t, e) {
const r = je(e - Co(e / 6, 1.7)) * 0.6189;
t.moveTo(-r, -r), t.lineTo(r, r), t.moveTo(-r, r), t.lineTo(r, -r);
}
}, Kv = [
z1,
iS,
sS,
cS,
fS,
dS,
gS
], yH = [
z1,
lS,
yS,
pS,
nS,
uS,
oS
];
function mH(t, e) {
let r = null;
t = typeof t == "function" ? t : ke(t || z1), e = typeof e == "function" ? e : ke(e === void 0 ? 64 : +e);
function n() {
let i;
if (r || (r = i = ts()), t.apply(this, arguments).draw(r, +e.apply(this, arguments)), i)
return r = null, i + "" || null;
}
return n.type = function(i) {
return arguments.length ? (t = typeof i == "function" ? i : ke(i), n) : t;
}, n.size = function(i) {
return arguments.length ? (e = typeof i == "function" ? i : ke(+i), n) : e;
}, n.context = function(i) {
return arguments.length ? (r = i == null ? null : i, n) : r;
}, n;
}
function Xa() {
}
function Cf(t, e, r) {
t._context.bezierCurveTo(
(2 * t._x0 + t._x1) / 3,
(2 * t._y0 + t._y1) / 3,
(t._x0 + 2 * t._x1) / 3,
(t._y0 + 2 * t._y1) / 3,
(t._x0 + 4 * t._x1 + e) / 6,
(t._y0 + 4 * t._y1 + r) / 6
);
}
function Y1(t) {
this._context = t;
}
Y1.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:
Cf(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(t, e) {
switch (t = +t, e = +e, this._point) {
case 0:
this._point = 1, this._line ? this._context.lineTo(t, e) : this._context.moveTo(t, 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:
Cf(this, t, e);
break;
}
this._x0 = this._x1, this._x1 = t, this._y0 = this._y1, this._y1 = e;
}
};
function Ps(t) {
return new Y1(t);
}
function mS(t) {
this._context = t;
}
mS.prototype = {
areaStart: Xa,
areaEnd: Xa,
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(t, e) {
switch (t = +t, e = +e, this._point) {
case 0:
this._point = 1, this._x2 = t, this._y2 = e;
break;
case 1:
this._point = 2, this._x3 = t, this._y3 = e;
break;
case 2:
this._point = 3, this._x4 = t, this._y4 = e, this._context.moveTo((this._x0 + 4 * this._x1 + t) / 6, (this._y0 + 4 * this._y1 + e) / 6);
break;
default:
Cf(this, t, e);
break;
}
this._x0 = this._x1, this._x1 = t, this._y0 = this._y1, this._y1 = e;
}
};
function bS(t) {
return new mS(t);
}
function _S(t) {
this._context = t;
}
_S.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(t, e) {
switch (t = +t, e = +e, this._point) {
case 0:
this._point = 1;
break;
case 1:
this._point = 2;
break;
case 2:
this._point = 3;
var r = (this._x0 + 4 * this._x1 + t) / 6, n = (this._y0 + 4 * this._y1 + e) / 6;
this._line ? this._context.lineTo(r, n) : this._context.moveTo(r, n);
break;
case 3:
this._point = 4;
default:
Cf(this, t, e);
break;
}
this._x0 = this._x1, this._x1 = t, this._y0 = this._y1, this._y1 = e;
}
};
function vS(t) {
return new _S(t);
}
function xS(t, e) {
this._basis = new Y1(t), this._beta = e;
}
xS.prototype = {
lineStart: function() {
this._x = [], this._y = [], this._basis.lineStart();
},
lineEnd: function() {
var t = this._x, e = this._y, r = t.length - 1;
if (r > 0)
for (var n = t[0], i = e[0], a = t[r] - n, s = e[r] - i, o = -1, l; ++o <= r; )
l = o / r, this._basis.point(
this._beta * t[o] + (1 - this._beta) * (n + l * a),
this._beta * e[o] + (1 - this._beta) * (i + l * s)
);
this._x = this._y = null, this._basis.lineEnd();
},
point: function(t, e) {
this._x.push(+t), this._y.push(+e);
}
};
const bH = function t(e) {
function r(n) {
return e === 1 ? new Y1(n) : new xS(n, e);
}
return r.beta = function(n) {
return t(+n);
}, r;
}(0.85);
function Sf(t, e, r) {
t._context.bezierCurveTo(
t._x1 + t._k * (t._x2 - t._x0),
t._y1 + t._k * (t._y2 - t._y0),
t._x2 + t._k * (t._x1 - e),
t._y2 + t._k * (t._y1 - r),
t._x2,
t._y2
);
}
function p4(t, e) {
this._context = t, this._k = (1 - e) / 6;
}
p4.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:
Sf(this, this._x1, this._y1);
break;
}
(this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
},
point: function(t, e) {
switch (t = +t, e = +e, this._point) {
case 0:
this._point = 1, this._line ? this._context.lineTo(t, e) : this._context.moveTo(t, e);
break;
case 1:
this._point = 2, this._x1 = t, this._y1 = e;
break;
case 2:
this._point = 3;
default:
Sf(this, t, e);
break;
}
this._x0 = this._x1, this._x1 = this._x2, this._x2 = t, this._y0 = this._y1, this._y1 = this._y2, this._y2 = e;
}
};
const _H = function t(e) {
function r(n) {
return new p4(n, e);
}
return r.tension = function(n) {
return t(+n);
}, r;
}(0);
function g4(t, e) {
this._context = t, this._k = (1 - e) / 6;
}
g4.prototype = {
areaStart: Xa,
areaEnd: Xa,
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(t, e) {
switch (t = +t, e = +e, this._point) {
case 0:
this._point = 1, this._x3 = t, this._y3 = e;
break;
case 1:
this._point = 2, this._context.moveTo(this._x4 = t, this._y4 = e);
break;
case 2:
this._point = 3, this._x5 = t, this._y5 = e;
break;
default:
Sf(this, t, e);
break;
}
this._x0 = this._x1, this._x1 = this._x2, this._x2 = t, this._y0 = this._y1, this._y1 = this._y2, this._y2 = e;
}
};
const vH = function t(e) {
function r(n) {
return new g4(n, e);
}
return r.tension = function(n) {
return t(+n);
}, r;
}(0);
function y4(t, e) {
this._context = t, this._k = (1 - e) / 6;
}
y4.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(t, e) {
switch (t = +t, 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:
Sf(this, t, e);
break;
}
this._x0 = this._x1, this._x1 = this._x2, this._x2 = t, this._y0 = this._y1, this._y1 = this._y2, this._y2 = e;
}
};
const xH = function t(e) {
function r(n) {
return new y4(n, e);
}
return r.tension = function(n) {
return t(+n);
}, r;
}(0);
function m4(t, e, r) {
var n = t._x1, i = t._y1, a = t._x2, s = t._y2;
if (t._l01_a > Yr) {
var o = 2 * t._l01_2a + 3 * t._l01_a * t._l12_a + t._l12_2a, l = 3 * t._l01_a * (t._l01_a + t._l12_a);
n = (n * o - t._x0 * t._l12_2a + t._x2 * t._l01_2a) / l, i = (i * o - t._y0 * t._l12_2a + t._y2 * t._l01_2a) / l;
}
if (t._l23_a > Yr) {
var u = 2 * t._l23_2a + 3 * t._l23_a * t._l12_a + t._l12_2a, h = 3 * t._l23_a * (t._l23_a + t._l12_a);
a = (a * u + t._x1 * t._l23_2a - e * t._l12_2a) / h, s = (s * u + t._y1 * t._l23_2a - r * t._l12_2a) / h;
}
t._context.bezierCurveTo(n, i, a, s, t._x2, t._y2);
}
function kS(t, e) {
this._context = t, this._alpha = e;
}
kS.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(t, e) {
if (t = +t, e = +e, this._point) {
var r = this._x2 - t, n = this._y2 - e;
this._l23_a = Math.sqrt(this._l23_2a = Math.pow(r * r + n * n, this._alpha));
}
switch (this._point) {
case 0:
this._point = 1, this._line ? this._context.lineTo(t, e) : this._context.moveTo(t, e);
break;
case 1:
this._point = 2;
break;
case 2:
this._point = 3;
default:
m4(this, t, 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 = t, this._y0 = this._y1, this._y1 = this._y2, this._y2 = e;
}
};
const kH = function t(e) {
function r(n) {
return e ? new kS(n, e) : new p4(n, 0);
}
return r.alpha = function(n) {
return t(+n);
}, r;
}(0.5);
function wS(t, e) {
this._context = t, this._alpha = e;
}
wS.prototype = {
areaStart: Xa,
areaEnd: Xa,
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(t, e) {
if (t = +t, e = +e, this._point) {
var r = this._x2 - t, n = this._y2 - e;
this._l23_a = Math.sqrt(this._l23_2a = Math.pow(r * r + n * n, this._alpha));
}
switch (this._point) {
case 0:
this._point = 1, this._x3 = t, this._y3 = e;
break;
case 1:
this._point = 2, this._context.moveTo(this._x4 = t, this._y4 = e);
break;
case 2:
this._point = 3, this._x5 = t, this._y5 = e;
break;
default:
m4(this, t, 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 = t, this._y0 = this._y1, this._y1 = this._y2, this._y2 = e;
}
};
const wH = function t(e) {
function r(n) {
return e ? new wS(n, e) : new g4(n, 0);
}
return r.alpha = function(n) {
return t(+n);
}, r;
}(0.5);
function TS(t, e) {
this._context = t, this._alpha = e;
}
TS.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(t, e) {
if (t = +t, e = +e, this._point) {
var r = this._x2 - t, n = this._y2 - e;
this._l23_a = Math.sqrt(this._l23_2a = Math.pow(r * r + n * n, 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:
m4(this, t, 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 = t, this._y0 = this._y1, this._y1 = this._y2, this._y2 = e;
}
};
const TH = function t(e) {
function r(n) {
return e ? new TS(n, e) : new y4(n, 0);
}
return r.alpha = function(n) {
return t(+n);
}, r;
}(0.5);
function ES(t) {
this._context = t;
}
ES.prototype = {
areaStart: Xa,
areaEnd: Xa,
lineStart: function() {
this._point = 0;
},
lineEnd: function() {
this._point && this._context.closePath();
},
point: function(t, e) {
t = +t, e = +e, this._point ? this._context.lineTo(t, e) : (this._point = 1, this._context.moveTo(t, e));
}
};
function CS(t) {
return new ES(t);
}
function Zv(t) {
return t < 0 ? -1 : 1;
}
function Qv(t, e, r) {
var n = t._x1 - t._x0, i = e - t._x1, a = (t._y1 - t._y0) / (n || i < 0 && -0), s = (r - t._y1) / (i || n < 0 && -0), o = (a * i + s * n) / (n + i);
return (Zv(a) + Zv(s)) * Math.min(Math.abs(a), Math.abs(s), 0.5 * Math.abs(o)) || 0;
}
function Jv(t, e) {
var r = t._x1 - t._x0;
return r ? (3 * (t._y1 - t._y0) / r - e) / 2 : e;
}
function xd(t, e, r) {
var n = t._x0, i = t._y0, a = t._x1, s = t._y1, o = (a - n) / 3;
t._context.bezierCurveTo(n + o, i + o * e, a - o, s - o * r, a, s);
}
function Af(t) {
this._context = t;
}
Af.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:
xd(this, this._t0, Jv(this, this._t0));
break;
}
(this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
},
point: function(t, e) {
var r = NaN;
if (t = +t, e = +e, !(t === this._x1 && e === this._y1)) {
switch (this._point) {
case 0:
this._point = 1, this._line ? this._context.lineTo(t, e) : this._context.moveTo(t, e);
break;
case 1:
this._point = 2;
break;
case 2:
this._point = 3, xd(this, Jv(this, r = Qv(this, t, e)), r);
break;
default:
xd(this, this._t0, r = Qv(this, t, e));
break;
}
this._x0 = this._x1, this._x1 = t, this._y0 = this._y1, this._y1 = e, this._t0 = r;
}
}
};
function SS(t) {
this._context = new AS(t);
}
(SS.prototype = Object.create(Af.prototype)).point = function(t, e) {
Af.prototype.point.call(this, e, t);
};
function AS(t) {
this._context = t;
}
AS.prototype = {
moveTo: function(t, e) {
this._context.moveTo(e, t);
},
closePath: function() {
this._context.closePath();
},
lineTo: function(t, e) {
this._context.lineTo(e, t);
},
bezierCurveTo: function(t, e, r, n, i, a) {
this._context.bezierCurveTo(e, t, n, r, a, i);
}
};
function MS(t) {
return new Af(t);
}
function LS(t) {
return new SS(t);
}
function RS(t) {
this._context = t;
}
RS.prototype = {
areaStart: function() {
this._line = 0;
},
areaEnd: function() {
this._line = NaN;
},
lineStart: function() {
this._x = [], this._y = [];
},
lineEnd: function() {
var t = this._x, e = this._y, r = t.length;
if (r)
if (this._line ? this._context.lineTo(t[0], e[0]) : this._context.moveTo(t[0], e[0]), r === 2)
this._context.lineTo(t[1], e[1]);
else
for (var n = t6(t), i = t6(e), a = 0, s = 1; s < r; ++a, ++s)
this._context.bezierCurveTo(n[0][a], i[0][a], n[1][a], i[1][a], t[s], e[s]);
(this._line || this._line !== 0 && r === 1) && this._context.closePath(), this._line = 1 - this._line, this._x = this._y = null;
},
point: function(t, e) {
this._x.push(+t), this._y.push(+e);
}
};
function t6(t) {
var e, r = t.length - 1, n, i = new Array(r), a = new Array(r), s = new Array(r);
for (i[0] = 0, a[0] = 2, s[0] = t[0] + 2 * t[1], e = 1; e < r - 1; ++e)
i[e] = 1, a[e] = 4, s[e] = 4 * t[e] + 2 * t[e + 1];
for (i[r - 1] = 2, a[r - 1] = 7, s[r - 1] = 8 * t[r - 1] + t[r], e = 1; e < r; ++e)
n = i[e] / a[e - 1], a[e] -= n, s[e] -= n * s[e - 1];
for (i[r - 1] = s[r - 1] / a[r - 1], e = r - 2; e >= 0; --e)
i[e] = (s[e] - i[e + 1]) / a[e];
for (a[r - 1] = (t[r] + i[r - 1]) / 2, e = 0; e < r - 1; ++e)
a[e] = 2 * t[e + 1] - i[e + 1];
return [i, a];
}
function IS(t) {
return new RS(t);
}
function U1(t, e) {
this._context = t, this._t = e;
}
U1.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(t, e) {
switch (t = +t, e = +e, this._point) {
case 0:
this._point = 1, this._line ? this._context.lineTo(t, e) : this._context.moveTo(t, e);
break;
case 1:
this._point = 2;
default: {
if (this._t <= 0)
this._context.lineTo(this._x, e), this._context.lineTo(t, e);
else {
var r = this._x * (1 - this._t) + t * this._t;
this._context.lineTo(r, this._y), this._context.lineTo(r, e);
}
break;
}
}
this._x = t, this._y = e;
}
};
function NS(t) {
return new U1(t, 0.5);
}
function BS(t) {
return new U1(t, 0);
}
function DS(t) {
return new U1(t, 1);
}
function Go(t, e) {
if ((s = t.length) > 1)
for (var r = 1, n, i, a = t[e[0]], s, o = a.length; r < s; ++r)
for (i = a, a = t[e[r]], n = 0; n < o; ++n)
a[n][1] += a[n][0] = isNaN(i[n][1]) ? i[n][0] : i[n][1];
}
function jo(t) {
for (var e = t.length, r = new Array(e); --e >= 0; )
r[e] = e;
return r;
}
function EH(t, e) {
return t[e];
}
function CH(t) {
const e = [];
return e.key = t, e;
}
function SH() {
var t = ke([]), e = jo, r = Go, n = EH;
function i(a) {
var s = Array.from(t.apply(this, arguments), CH), o, l = s.length, u = -1, h;
for (const d of a)
for (o = 0, ++u; o < l; ++o)
(s[o][u] = [0, +n(d, s[o].key, u, a)]).data = d;
for (o = 0, h = q1(e(s)); o < l; ++o)
s[h[o]].index = o;
return r(s, h), s;
}
return i.keys = function(a) {
return arguments.length ? (t = typeof a == "function" ? a : ke(Array.from(a)), i) : t;
}, i.value = function(a) {
return arguments.length ? (n = typeof a == "function" ? a : ke(+a), i) : n;
}, i.order = function(a) {
return arguments.length ? (e = a == null ? jo : typeof a == "function" ? a : ke(Array.from(a)), i) : e;
}, i.offset = function(a) {
return arguments.length ? (r = a == null ? Go : a, i) : r;
}, i;
}
function AH(t, e) {
if ((n = t.length) > 0) {
for (var r, n, i = 0, a = t[0].length, s; i < a; ++i) {
for (s = r = 0; r < n; ++r)
s += t[r][i][1] || 0;
if (s)
for (r = 0; r < n; ++r)
t[r][i][1] /= s;
}
Go(t, e);
}
}
function MH(t, e) {
if ((l = t.length) > 0)
for (var r, n = 0, i, a, s, o, l, u = t[e[0]].length; n < u; ++n)
for (s = o = 0, r = 0; r < l; ++r)
(a = (i = t[e[r]][n])[1] - i[0]) > 0 ? (i[0] = s, i[1] = s += a) : a < 0 ? (i[1] = o, i[0] = o += a) : (i[0] = 0, i[1] = a);
}
function LH(t, e) {
if ((i = t.length) > 0) {
for (var r = 0, n = t[e[0]], i, a = n.length; r < a; ++r) {
for (var s = 0, o = 0; s < i; ++s)
o += t[s][r][1] || 0;
n[r][1] += n[r][0] = -o / 2;
}
Go(t, e);
}
}
function RH(t, e) {
if (!(!((s = t.length) > 0) || !((a = (i = t[e[0]]).length) > 0))) {
for (var r = 0, n = 1, i, a, s; n < a; ++n) {
for (var o = 0, l = 0, u = 0; o < s; ++o) {
for (var h = t[e[o]], d = h[n][1] || 0, f = h[n - 1][1] || 0, p = (d - f) / 2, m = 0; m < o; ++m) {
var _ = t[e[m]], y = _[n][1] || 0, b = _[n - 1][1] || 0;
p += y - b;
}
l += d, u += p * d;
}
i[n - 1][1] += i[n - 1][0] = r, l && (r -= u / l);
}
i[n - 1][1] += i[n - 1][0] = r, Go(t, e);
}
}
function OS(t) {
var e = t.map(IH);
return jo(t).sort(function(r, n) {
return e[r] - e[n];
});
}
function IH(t) {
for (var e = -1, r = 0, n = t.length, i, a = -1 / 0; ++e < n; )
(i = +t[e][1]) > a && (a = i, r = e);
return r;
}
function FS(t) {
var e = t.map(PS);
return jo(t).sort(function(r, n) {
return e[r] - e[n];
});
}
function PS(t) {
for (var e = 0, r = -1, n = t.length, i; ++r < n; )
(i = +t[r][1]) && (e += i);
return e;
}
function NH(t) {
return FS(t).reverse();
}
function BH(t) {
var e = t.length, r, n, i = t.map(PS), a = OS(t), s = 0, o = 0, l = [], u = [];
for (r = 0; r < e; ++r)
n = a[r], s < o ? (s += i[n], l.push(n)) : (o += i[n], u.push(n));
return u.reverse().concat(l);
}
function DH(t) {
return jo(t).reverse();
}
const Ku = (t) => () => t;
function OH(t, {
sourceEvent: e,
target: r,
transform: n,
dispatch: i
}) {
Object.defineProperties(this, {
type: { value: t, enumerable: !0, configurable: !0 },
sourceEvent: { value: e, enumerable: !0, configurable: !0 },
target: { value: r, enumerable: !0, configurable: !0 },
transform: { value: n, enumerable: !0, configurable: !0 },
_: { value: i }
});
}
function Ai(t, e, r) {
this.k = t, this.x = e, this.y = r;
}
Ai.prototype = {
constructor: Ai,
scale: function(t) {
return t === 1 ? this : new Ai(this.k * t, this.x, this.y);
},
translate: function(t, e) {
return t === 0 & e === 0 ? this : new Ai(this.k, this.x + this.k * t, this.y + this.k * e);
},
apply: function(t) {
return [t[0] * this.k + this.x, t[1] * this.k + this.y];
},
applyX: function(t) {
return t * this.k + this.x;
},
applyY: function(t) {
return t * this.k + this.y;
},
invert: function(t) {
return [(t[0] - this.x) / this.k, (t[1] - this.y) / this.k];
},
invertX: function(t) {
return (t - this.x) / this.k;
},
invertY: function(t) {
return (t - this.y) / this.k;
},
rescaleX: function(t) {
return t.copy().domain(t.range().map(this.invertX, this).map(t.invert, t));
},
rescaleY: function(t) {
return t.copy().domain(t.range().map(this.invertY, this).map(t.invert, t));
},
toString: function() {
return "translate(" + this.x + "," + this.y + ") scale(" + this.k + ")";
}
};
var W1 = new Ai(1, 0, 0);
qS.prototype = Ai.prototype;
function qS(t) {
for (; !t.__zoom; )
if (!(t = t.parentNode))
return W1;
return t.__zoom;
}
function kd(t) {
t.stopImmediatePropagation();
}
function Ml(t) {
t.preventDefault(), t.stopImmediatePropagation();
}
function FH(t) {
return (!t.ctrlKey || t.type === "wheel") && !t.button;
}
function PH() {
var t = this;
return t instanceof SVGElement ? (t = t.ownerSVGElement || t, t.hasAttribute("viewBox") ? (t = t.viewBox.baseVal, [[t.x, t.y], [t.x + t.width, t.y + t.height]]) : [[0, 0], [t.width.baseVal.value, t.height.baseVal.value]]) : [[0, 0], [t.clientWidth, t.clientHeight]];
}
function e6() {
return this.__zoom || W1;
}
function qH(t) {
return -t.deltaY * (t.deltaMode === 1 ? 0.05 : t.deltaMode ? 1 : 2e-3) * (t.ctrlKey ? 10 : 1);
}
function VH() {
return navigator.maxTouchPoints || "ontouchstart" in this;
}
function zH(t, e, r) {
var n = t.invertX(e[0][0]) - r[0][0], i = t.invertX(e[1][0]) - r[1][0], a = t.invertY(e[0][1]) - r[0][1], s = t.invertY(e[1][1]) - r[1][1];
return t.translate(
i > n ? (n + i) / 2 : Math.min(0, n) || Math.max(0, i),
s > a ? (a + s) / 2 : Math.min(0, a) || Math.max(0, s)
);
}
function YH() {
var t = FH, e = PH, r = zH, n = qH, i = VH, a = [0, 1 / 0], s = [[-1 / 0, -1 / 0], [1 / 0, 1 / 0]], o = 250, l = Q9, u = Ws("start", "zoom", "end"), h, d, f, p = 500, m = 150, _ = 0, y = 10;
function b(D) {
D.property("__zoom", e6).on("wheel.zoom", R, { passive: !1 }).on("mousedown.zoom", A).on("dblclick.zoom", L).filter(i).on("touchstart.zoom", v).on("touchmove.zoom", B).on("touchend.zoom touchcancel.zoom", w).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
}
b.transform = function(D, N, z, X) {
var ct = D.selection ? D.selection() : D;
ct.property("__zoom", e6), D !== ct ? C(D, N, z, X) : ct.interrupt().each(function() {
M(this, arguments).event(X).start().zoom(null, typeof N == "function" ? N.apply(this, arguments) : N).end();
});
}, b.scaleBy = function(D, N, z, X) {
b.scaleTo(D, function() {
var ct = this.__zoom.k, J = typeof N == "function" ? N.apply(this, arguments) : N;
return ct * J;
}, z, X);
}, b.scaleTo = function(D, N, z, X) {
b.transform(D, function() {
var ct = e.apply(this, arguments), J = this.__zoom, Y = z == null ? T(ct) : typeof z == "function" ? z.apply(this, arguments) : z, $ = J.invert(Y), lt = typeof N == "function" ? N.apply(this, arguments) : N;
return r(k(x(J, lt), Y, $), ct, s);
}, z, X);
}, b.translateBy = function(D, N, z, X) {
b.transform(D, function() {
return r(this.__zoom.translate(
typeof N == "function" ? N.apply(this, arguments) : N,
typeof z == "function" ? z.apply(this, arguments) : z
), e.apply(this, arguments), s);
}, null, X);
}, b.translateTo = function(D, N, z, X, ct) {
b.transform(D, function() {
var J = e.apply(this, arguments), Y = this.__zoom, $ = X == null ? T(J) : typeof X == "function" ? X.apply(this, arguments) : X;
return r(W1.translate($[0], $[1]).scale(Y.k).translate(
typeof N == "function" ? -N.apply(this, arguments) : -N,
typeof z == "function" ? -z.apply(this, arguments) : -z
), J, s);
}, X, ct);
};
function x(D, N) {
return N = Math.max(a[0], Math.min(a[1], N)), N === D.k ? D : new Ai(N, D.x, D.y);
}
function k(D, N, z) {
var X = N[0] - z[0] * D.k, ct = N[1] - z[1] * D.k;
return X === D.x && ct === D.y ? D : new Ai(D.k, X, ct);
}
function T(D) {
return [(+D[0][0] + +D[1][0]) / 2, (+D[0][1] + +D[1][1]) / 2];
}
function C(D, N, z, X) {
D.on("start.zoom", function() {
M(this, arguments).event(X).start();
}).on("interrupt.zoom end.zoom", function() {
M(this, arguments).event(X).end();
}).tween("zoom", function() {
var ct = this, J = arguments, Y = M(ct, J).event(X), $ = e.apply(ct, J), lt = z == null ? T($) : typeof z == "function" ? z.apply(ct, J) : z, ut = Math.max($[1][0] - $[0][0], $[1][1] - $[0][1]), W = ct.__zoom, tt = typeof N == "function" ? N.apply(ct, J) : N, K = l(W.invert(lt).concat(ut / W.k), tt.invert(lt).concat(ut / tt.k));
return function(it) {
if (it === 1)
it = tt;
else {
var Z = K(it), V = ut / Z[2];
it = new Ai(V, lt[0] - Z[0] * V, lt[1] - Z[1] * V);
}
Y.zoom(null, it);
};
});
}
function M(D, N, z) {
return !z && D.__zooming || new S(D, N);
}
function S(D, N) {
this.that = D, this.args = N, this.active = 0, this.sourceEvent = null, this.extent = e.apply(D, N), this.taps = 0;
}
S.prototype = {
event: function(D) {
return D && (this.sourceEvent = D), this;
},
start: function() {
return ++this.active === 1 && (this.that.__zooming = this, this.emit("start")), this;
},
zoom: function(D, N) {
return this.mouse && D !== "mouse" && (this.mouse[1] = N.invert(this.mouse[0])), this.touch0 && D !== "touch" && (this.touch0[1] = N.invert(this.touch0[0])), this.touch1 && D !== "touch" && (this.touch1[1] = N.invert(this.touch1[0])), this.that.__zoom = N, this.emit("zoom"), this;
},
end: function() {
return --this.active === 0 && (delete this.that.__zooming, this.emit("end")), this;
},
emit: function(D) {
var N = St(this.that).datum();
u.call(
D,
this.that,
new OH(D, {
sourceEvent: this.sourceEvent,
target: b,
type: D,
transform: this.that.__zoom,
dispatch: u
}),
N
);
}
};
function R(D, ...N) {
if (!t.apply(this, arguments))
return;
var z = M(this, N).event(D), X = this.__zoom, ct = Math.max(a[0], Math.min(a[1], X.k * Math.pow(2, n.apply(this, arguments)))), J = Cn(D);
if (z.wheel)
(z.mouse[0][0] !== J[0] || z.mouse[0][1] !== J[1]) && (z.mouse[1] = X.invert(z.mouse[0] = J)), clearTimeout(z.wheel);
else {
if (X.k === ct)
return;
z.mouse = [J, X.invert(J)], Es(this), z.start();
}
Ml(D), z.wheel = setTimeout(Y, m), z.zoom("mouse", r(k(x(X, ct), z.mouse[0], z.mouse[1]), z.extent, s));
function Y() {
z.wheel = null, z.end();
}
}
function A(D, ...N) {
if (f || !t.apply(this, arguments))
return;
var z = D.currentTarget, X = M(this, N, !0).event(D), ct = St(D.view).on("mousemove.zoom", lt, !0).on("mouseup.zoom", ut, !0), J = Cn(D, z), Y = D.clientX, $ = D.clientY;
g1(D.view), kd(D), X.mouse = [J, this.__zoom.invert(J)], Es(this), X.start();
function lt(W) {
if (Ml(W), !X.moved) {
var tt = W.clientX - Y, K = W.clientY - $;
X.moved = tt * tt + K * K > _;
}
X.event(W).zoom("mouse", r(k(X.that.__zoom, X.mouse[0] = Cn(W, z), X.mouse[1]), X.extent, s));
}
function ut(W) {
ct.on("mousemove.zoom mouseup.zoom", null), y1(W.view, X.moved), Ml(W), X.event(W).end();
}
}
function L(D, ...N) {
if (!!t.apply(this, arguments)) {
var z = this.__zoom, X = Cn(D.changedTouches ? D.changedTouches[0] : D, this), ct = z.invert(X), J = z.k * (D.shiftKey ? 0.5 : 2), Y = r(k(x(z, J), X, ct), e.apply(this, N), s);
Ml(D), o > 0 ? St(this).transition().duration(o).call(C, Y, X, D) : St(this).call(b.transform, Y, X, D);
}
}
function v(D, ...N) {
if (!!t.apply(this, arguments)) {
var z = D.touches, X = z.length, ct = M(this, N, D.changedTouches.length === X).event(D), J, Y, $, lt;
for (kd(D), Y = 0; Y < X; ++Y)
$ = z[Y], lt = Cn($, this), lt = [lt, this.__zoom.invert(lt), $.identifier], ct.touch0 ? !ct.touch1 && ct.touch0[2] !== lt[2] && (ct.touch1 = lt, ct.taps = 0) : (ct.touch0 = lt, J = !0, ct.taps = 1 + !!h);
h && (h = clearTimeout(h)), J && (ct.taps < 2 && (d = lt[0], h = setTimeout(function() {
h = null;
}, p)), Es(this), ct.start());
}
}
function B(D, ...N) {
if (!!this.__zooming) {
var z = M(this, N).event(D), X = D.changedTouches, ct = X.length, J, Y, $, lt;
for (Ml(D), J = 0; J < ct; ++J)
Y = X[J], $ = Cn(Y, this), z.touch0 && z.touch0[2] === Y.identifier ? z.touch0[0] = $ : z.touch1 && z.touch1[2] === Y.identifier && (z.touch1[0] = $);
if (Y = z.that.__zoom, z.touch1) {
var ut = z.touch0[0], W = z.touch0[1], tt = z.touch1[0], K = z.touch1[1], it = (it = tt[0] - ut[0]) * it + (it = tt[1] - ut[1]) * it, Z = (Z = K[0] - W[0]) * Z + (Z = K[1] - W[1]) * Z;
Y = x(Y, Math.sqrt(it / Z)), $ = [(ut[0] + tt[0]) / 2, (ut[1] + tt[1]) / 2], lt = [(W[0] + K[0]) / 2, (W[1] + K[1]) / 2];
} else if (z.touch0)
$ = z.touch0[0], lt = z.touch0[1];
else
return;
z.zoom("touch", r(k(Y, $, lt), z.extent, s));
}
}
function w(D, ...N) {
if (!!this.__zooming) {
var z = M(this, N).event(D), X = D.changedTouches, ct = X.length, J, Y;
for (kd(D), f && clearTimeout(f), f = setTimeout(function() {
f = null;
}, p), J = 0; J < ct; ++J)
Y = X[J], z.touch0 && z.touch0[2] === Y.identifier ? delete z.touch0 : z.touch1 && z.touch1[2] === Y.identifier && delete z.touch1;
if (z.touch1 && !z.touch0 && (z.touch0 = z.touch1, delete z.touch1), z.touch0)
z.touch0[1] = this.__zoom.invert(z.touch0[0]);
else if (z.end(), z.taps === 2 && (Y = Cn(Y, this), Math.hypot(d[0] - Y[0], d[1] - Y[1]) < y)) {
var $ = St(this).on("dblclick.zoom");
$ && $.apply(this, arguments);
}
}
}
return b.wheelDelta = function(D) {
return arguments.length ? (n = typeof D == "function" ? D : Ku(+D), b) : n;
}, b.filter = function(D) {
return arguments.length ? (t = typeof D == "function" ? D : Ku(!!D), b) : t;
}, b.touchable = function(D) {
return arguments.length ? (i = typeof D == "function" ? D : Ku(!!D), b) : i;
}, b.extent = function(D) {
return arguments.length ? (e = typeof D == "function" ? D : Ku([[+D[0][0], +D[0][1]], [+D[1][0], +D[1][1]]]), b) : e;
}, b.scaleExtent = function(D) {
return arguments.length ? (a[0] = +D[0], a[1] = +D[1], b) : [a[0], a[1]];
}, b.translateExtent = function(D) {
return arguments.length ? (s[0][0] = +D[0][0], s[1][0] = +D[1][0], s[0][1] = +D[0][1], s[1][1] = +D[1][1], b) : [[s[0][0], s[0][1]], [s[1][0], s[1][1]]];
}, b.constrain = function(D) {
return arguments.length ? (r = D, b) : r;
}, b.duration = function(D) {
return arguments.length ? (o = +D, b) : o;
}, b.interpolate = function(D) {
return arguments.length ? (l = D, b) : l;
}, b.on = function() {
var D = u.on.apply(u, arguments);
return D === u ? b : D;
}, b.clickDistance = function(D) {
return arguments.length ? (_ = (D = +D) * D, b) : Math.sqrt(_);
}, b.tapDistance = function(D) {
return arguments.length ? (y = +D, b) : y;
}, b;
}
const UH = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
bisect: Us,
bisectRight: Hw,
bisectLeft: WR,
bisectCenter: HR,
ascending: tr,
bisector: l1,
blur: GR,
blur2: Gw,
blurImage: jR,
count: c1,
cross: tI,
cumsum: eI,
descending: zw,
deviation: Xw,
extent: Ql,
Adder: wr,
fsum: rI,
fcumsum: nI,
group: Jw,
flatGroup: iI,
flatRollup: aI,
groups: t9,
index: sI,
indexes: oI,
rollup: r9,
rollups: n9,
groupSort: lI,
bin: z_,
histogram: z_,
thresholdFreedmanDiaconis: hI,
thresholdScott: fI,
thresholdSturges: Qb,
max: Bo,
maxIndex: Jb,
mean: dI,
median: pI,
medianIndex: gI,
merge: e3,
min: gc,
minIndex: t3,
mode: mI,
nice: s9,
pairs: bI,
permute: a9,
quantile: yc,
quantileIndex: c9,
quantileSorted: l9,
quickselect: u1,
range: Da,
rank: vI,
least: xI,
leastIndex: u9,
greatest: o9,
greatestIndex: kI,
scan: wI,
shuffle: TI,
shuffler: h9,
sum: EI,
ticks: As,
tickIncrement: No,
tickStep: pc,
transpose: f9,
variance: $w,
zip: SI,
every: AI,
some: MI,
filter: LI,
map: RI,
reduce: II,
reverse: NI,
sort: mm,
difference: BI,
disjoint: DI,
intersection: OI,
subset: PI,
superset: d9,
union: qI,
InternMap: dc,
InternSet: Ss,
axisTop: p9,
axisRight: GI,
axisBottom: g9,
axisLeft: jI,
brush: dF,
brushX: hF,
brushY: fF,
brushSelection: uF,
chord: gF,
chordTranspose: yF,
chordDirected: mF,
ribbon: CF,
ribbonArrow: SF,
color: Wa,
rgb: Oo,
hsl: Uh,
lab: Hh,
hcl: Gh,
lch: XB,
gray: $B,
cubehelix: si,
contours: qm,
contourDensity: VF,
Delaunay: v3,
Voronoi: mT,
dispatch: Ws,
drag: OB,
dragDisable: g1,
dragEnable: y1,
dsvFormat: E1,
csvParse: _T,
csvParseRows: cP,
csvFormat: uP,
csvFormatBody: hP,
csvFormatRows: fP,
csvFormatRow: dP,
csvFormatValue: pP,
tsvParse: vT,
tsvParseRows: gP,
tsvFormat: yP,
tsvFormatBody: mP,
tsvFormatRows: bP,
tsvFormatRow: _P,
tsvFormatValue: vP,
autoType: xP,
easeLinear: wO,
easeQuad: s5,
easeQuadIn: TO,
easeQuadOut: EO,
easeQuadInOut: s5,
easeCubic: Nm,
easeCubicIn: CO,
easeCubicOut: SO,
easeCubicInOut: Nm,
easePoly: o5,
easePolyIn: AO,
easePolyOut: MO,
easePolyInOut: o5,
easeSin: l5,
easeSinIn: LO,
easeSinOut: RO,
easeSinInOut: l5,
easeExp: c5,
easeExpIn: IO,
easeExpOut: NO,
easeExpInOut: c5,
easeCircle: u5,
easeCircleIn: BO,
easeCircleOut: DO,
easeCircleInOut: u5,
easeBounce: wc,
easeBounceIn: WO,
easeBounceOut: wc,
easeBounceInOut: HO,
easeBack: h5,
easeBackIn: GO,
easeBackOut: jO,
easeBackInOut: h5,
easeElastic: f5,
easeElasticIn: $O,
easeElasticOut: f5,
easeElasticInOut: XO,
blob: TP,
buffer: CP,
dsv: AP,
csv: MP,
tsv: LP,
image: RP,
json: NP,
text: C1,
xml: BP,
html: DP,
svg: OP,
forceCenter: FP,
forceCollide: rq,
forceLink: iq,
forceManyBody: dq,
forceRadial: pq,
forceSimulation: fq,
forceX: gq,
forceY: yq,
formatDefaultLocale: ET,
get format() {
return M1;
},
get formatPrefix() {
return w3;
},
formatLocale: TT,
formatSpecifier: Vo,
FormatSpecifier: A1,
precisionFixed: CT,
precisionPrefix: ST,
precisionRound: AT,
geoArea: Cq,
geoBounds: Lq,
geoCentroid: Oq,
geoCircle: Fq,
geoClipAntimeridian: Qm,
geoClipCircle: jT,
geoClipExtent: Wq,
geoClipRectangle: L1,
geoContains: Zq,
geoDistance: ff,
geoGraticule: KT,
geoGraticule10: Qq,
geoInterpolate: Jq,
geoLength: $T,
geoPath: hV,
geoAlbers: cE,
geoAlbersUsa: xV,
geoAzimuthalEqualArea: kV,
geoAzimuthalEqualAreaRaw: N3,
geoAzimuthalEquidistant: wV,
geoAzimuthalEquidistantRaw: B3,
geoConicConformal: EV,
geoConicConformalRaw: fE,
geoConicEqualArea: vf,
geoConicEqualAreaRaw: lE,
geoConicEquidistant: SV,
geoConicEquidistantRaw: dE,
geoEqualEarth: MV,
geoEqualEarthRaw: D3,
geoEquirectangular: CV,
geoEquirectangularRaw: Ac,
geoGnomonic: LV,
geoGnomonicRaw: O3,
geoIdentity: RV,
geoProjection: zi,
geoProjectionMutator: R3,
geoMercator: TV,
geoMercatorRaw: ru,
geoNaturalEarth1: IV,
geoNaturalEarth1Raw: F3,
geoOrthographic: NV,
geoOrthographicRaw: P3,
geoStereographic: BV,
geoStereographicRaw: q3,
geoTransverseMercator: DV,
geoTransverseMercatorRaw: V3,
geoRotation: zT,
geoStream: Kn,
geoTransform: fV,
cluster: UV,
hierarchy: z3,
Node: Bs,
pack: _z,
packSiblings: mz,
packEnclose: dz,
partition: vz,
stratify: Tz,
tree: Rz,
treemap: Iz,
treemapBinary: Nz,
treemapDice: nu,
treemapSlice: I1,
treemapSliceDice: Bz,
treemapSquarify: wE,
treemapResquarify: Dz,
interpolate: Ja,
interpolateArray: tD,
interpolateBasis: q9,
interpolateBasisClosed: V9,
interpolateDate: G9,
interpolateDiscrete: nD,
interpolateHue: iD,
interpolateNumber: Dn,
interpolateNumberArray: u3,
interpolateObject: j9,
interpolateRound: v1,
interpolateString: h3,
interpolateTransformCss: K9,
interpolateTransformSvg: Z9,
interpolateZoom: Q9,
interpolateRgb: vc,
interpolateRgbBasis: U9,
interpolateRgbBasisClosed: JB,
interpolateHsl: uD,
interpolateHslLong: hD,
interpolateLab: fD,
interpolateHcl: eT,
interpolateHclLong: dD,
interpolateCubehelix: pD,
interpolateCubehelixLong: x1,
piecewise: nT,
quantize: gD,
path: ts,
polygonArea: Oz,
polygonCentroid: Fz,
polygonHull: Vz,
polygonContains: zz,
polygonLength: Yz,
quadtree: S1,
randomUniform: Uz,
randomInt: Wz,
randomNormal: U3,
randomLogNormal: Hz,
randomBates: Gz,
randomIrwinHall: TE,
randomExponential: jz,
randomPareto: $z,
randomBernoulli: Xz,
randomGeometric: EE,
randomBinomial: SE,
randomGamma: W3,
randomBeta: CE,
randomWeibull: Kz,
randomCauchy: Zz,
randomLogistic: Qz,
randomPoisson: Jz,
randomLcg: rY,
scaleBand: H3,
scalePoint: nY,
scaleIdentity: LE,
scaleLinear: j3,
scaleLog: IE,
scaleSymlog: NE,
scaleOrdinal: N1,
scaleImplicit: fb,
scalePow: Z3,
scaleSqrt: gY,
scaleRadial: BE,
scaleQuantile: DE,
scaleQuantize: OE,
scaleThreshold: FE,
scaleTime: pC,
scaleUtc: GU,
scaleSequential: gC,
scaleSequentialLog: yC,
scaleSequentialPow: c4,
scaleSequentialSqrt: jU,
scaleSequentialSymlog: mC,
scaleSequentialQuantile: bC,
scaleDiverging: _C,
scaleDivergingLog: vC,
scaleDivergingPow: u4,
scaleDivergingSqrt: $U,
scaleDivergingSymlog: xC,
tickFormat: ME,
schemeCategory10: XU,
schemeAccent: KU,
schemeDark2: ZU,
schemePaired: QU,
schemePastel1: JU,
schemePastel2: tW,
schemeSet1: eW,
schemeSet2: rW,
schemeSet3: nW,
schemeTableau10: iW,
interpolateBrBG: aW,
schemeBrBG: kC,
interpolatePRGn: sW,
schemePRGn: wC,
interpolatePiYG: oW,
schemePiYG: TC,
interpolatePuOr: lW,
schemePuOr: EC,
interpolateRdBu: cW,
schemeRdBu: CC,
interpolateRdGy: uW,
schemeRdGy: SC,
interpolateRdYlBu: hW,
schemeRdYlBu: AC,
interpolateRdYlGn: fW,
schemeRdYlGn: MC,
interpolateSpectral: dW,
schemeSpectral: LC,
interpolateBuGn: pW,
schemeBuGn: RC,
interpolateBuPu: gW,
schemeBuPu: IC,
interpolateGnBu: yW,
schemeGnBu: NC,
interpolateOrRd: mW,
schemeOrRd: BC,
interpolatePuBuGn: bW,
schemePuBuGn: DC,
interpolatePuBu: _W,
schemePuBu: OC,
interpolatePuRd: vW,
schemePuRd: FC,
interpolateRdPu: xW,
schemeRdPu: PC,
interpolateYlGnBu: kW,
schemeYlGnBu: qC,
interpolateYlGn: wW,
schemeYlGn: VC,
interpolateYlOrBr: TW,
schemeYlOrBr: zC,
interpolateYlOrRd: EW,
schemeYlOrRd: YC,
interpolateBlues: CW,
schemeBlues: UC,
interpolateGreens: SW,
schemeGreens: WC,
interpolateGreys: AW,
schemeGreys: HC,
interpolatePurples: MW,
schemePurples: GC,
interpolateReds: LW,
schemeReds: jC,
interpolateOranges: RW,
schemeOranges: $C,
interpolateCividis: IW,
interpolateCubehelixDefault: NW,
interpolateRainbow: OW,
interpolateWarm: BW,
interpolateCool: DW,
interpolateSinebow: qW,
interpolateTurbo: VW,
interpolateViridis: zW,
interpolateMagma: YW,
interpolateInferno: UW,
interpolatePlasma: WW,
create: AB,
creator: f1,
local: T9,
matcher: n3,
namespace: Xc,
namespaces: wm,
pointer: Cn,
pointers: LB,
select: St,
selectAll: p1,
selection: Hs,
selector: d1,
selectorAll: r3,
style: Ms,
window: i3,
arc: Ef,
area: KC,
line: ns,
pie: ZC,
areaRadial: Xv,
radialArea: Xv,
lineRadial: $v,
radialLine: $v,
pointRadial: $l,
link: V1,
linkHorizontal: sH,
linkVertical: oH,
linkRadial: lH,
symbol: mH,
symbolsStroke: yH,
symbolsFill: Kv,
symbols: Kv,
symbolAsterisk: nS,
symbolCircle: z1,
symbolCross: iS,
symbolDiamond: sS,
symbolDiamond2: oS,
symbolPlus: lS,
symbolSquare: cS,
symbolSquare2: uS,
symbolStar: fS,
symbolTriangle: dS,
symbolTriangle2: pS,
symbolWye: gS,
symbolX: yS,
curveBasisClosed: bS,
curveBasisOpen: vS,
curveBasis: Ps,
curveBumpX: eS,
curveBumpY: rS,
curveBundle: bH,
curveCardinalClosed: vH,
curveCardinalOpen: xH,
curveCardinal: _H,
curveCatmullRomClosed: wH,
curveCatmullRomOpen: TH,
curveCatmullRom: kH,
curveLinearClosed: CS,
curveLinear: bn,
curveMonotoneX: MS,
curveMonotoneY: LS,
curveNatural: IS,
curveStep: NS,
curveStepAfter: DS,
curveStepBefore: BS,
stack: SH,
stackOffsetExpand: AH,
stackOffsetDiverging: MH,
stackOffsetNone: Go,
stackOffsetSilhouette: LH,
stackOffsetWiggle: RH,
stackOrderAppearance: OS,
stackOrderAscending: FS,
stackOrderDescending: NH,
stackOrderInsideOut: BH,
stackOrderNone: jo,
stackOrderReverse: DH,
timeInterval: Tr,
timeMillisecond: pb,
timeMilliseconds: Rv,
utcMillisecond: pb,
utcMilliseconds: Rv,
timeSecond: Fa,
timeSeconds: Nv,
utcSecond: Fa,
utcSeconds: Nv,
timeMinute: J3,
timeMinutes: mY,
timeHour: t4,
timeHours: bY,
timeDay: au,
timeDays: _Y,
timeWeek: Wo,
timeWeeks: Bv,
timeSunday: Wo,
timeSundays: Bv,
timeMonday: Mc,
timeMondays: vY,
timeTuesday: YE,
timeTuesdays: xY,
timeWednesday: UE,
timeWednesdays: kY,
timeThursday: Os,
timeThursdays: wY,
timeFriday: WE,
timeFridays: TY,
timeSaturday: HE,
timeSaturdays: EY,
timeMonth: e4,
timeMonths: CY,
timeYear: Ga,
timeYears: SY,
utcMinute: n4,
utcMinutes: AY,
utcHour: i4,
utcHours: MY,
utcDay: su,
utcDays: LY,
utcWeek: Ho,
utcWeeks: Dv,
utcSunday: Ho,
utcSundays: Dv,
utcMonday: Lc,
utcMondays: RY,
utcTuesday: KE,
utcTuesdays: IY,
utcWednesday: ZE,
utcWednesdays: NY,
utcThursday: Fs,
utcThursdays: BY,
utcFriday: QE,
utcFridays: DY,
utcSaturday: JE,
utcSaturdays: OY,
utcMonth: a4,
utcMonths: FY,
utcYear: ja,
utcYears: PY,
utcTicks: rC,
utcTickInterval: nC,
timeTicks: iC,
timeTickInterval: aC,
timeFormatDefaultLocale: fC,
get timeFormat() {
return Rc;
},
get timeParse() {
return hC;
},
get utcFormat() {
return D1;
},
get utcParse() {
return o4;
},
timeFormatLocale: sC,
isoFormat: VU,
isoParse: UU,
now: Zc,
timer: w1,
timerFlush: sT,
timeout: Mm,
interval: _D,
transition: uT,
active: tF,
interrupt: Es,
zoom: YH,
zoomTransform: qS,
zoomIdentity: W1,
ZoomTransform: Ai
}, Symbol.toStringTag, { value: "Module" }));
/*! @license DOMPurify 2.4.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.0/LICENSE */
function Na(t) {
return Na = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
return typeof e;
} : function(e) {
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
}, Na(t);
}
function yb(t, e) {
return yb = Object.setPrototypeOf || function(n, i) {
return n.__proto__ = i, n;
}, yb(t, e);
}
function WH() {
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 Eh(t, e, r) {
return WH() ? Eh = Reflect.construct : Eh = function(i, a, s) {
var o = [null];
o.push.apply(o, a);
var l = Function.bind.apply(i, o), u = new l();
return s && yb(u, s.prototype), u;
}, Eh.apply(null, arguments);
}
function $n(t) {
return HH(t) || GH(t) || jH(t) || $H();
}
function HH(t) {
if (Array.isArray(t))
return mb(t);
}
function GH(t) {
if (typeof Symbol < "u" && t[Symbol.iterator] != null || t["@@iterator"] != null)
return Array.from(t);
}
function jH(t, e) {
if (!!t) {
if (typeof t == "string")
return mb(t, e);
var r = Object.prototype.toString.call(t).slice(8, -1);
if (r === "Object" && t.constructor && (r = t.constructor.name), r === "Map" || r === "Set")
return Array.from(t);
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))
return mb(t, e);
}
}
function mb(t, e) {
(e == null || e > t.length) && (e = t.length);
for (var r = 0, n = new Array(e); r < e; r++)
n[r] = t[r];
return n;
}
function $H() {
throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
var XH = Object.hasOwnProperty, r6 = Object.setPrototypeOf, KH = Object.isFrozen, ZH = Object.getPrototypeOf, QH = Object.getOwnPropertyDescriptor, cn = Object.freeze, Oi = Object.seal, JH = Object.create, VS = typeof Reflect < "u" && Reflect, Mf = VS.apply, bb = VS.construct;
Mf || (Mf = function(e, r, n) {
return e.apply(r, n);
});
cn || (cn = function(e) {
return e;
});
Oi || (Oi = function(e) {
return e;
});
bb || (bb = function(e, r) {
return Eh(e, $n(r));
});
var tG = oi(Array.prototype.forEach), n6 = oi(Array.prototype.pop), Ll = oi(Array.prototype.push), Ch = oi(String.prototype.toLowerCase), eG = oi(String.prototype.match), Sa = oi(String.prototype.replace), rG = oi(String.prototype.indexOf), nG = oi(String.prototype.trim), Xr = oi(RegExp.prototype.test), wd = iG(TypeError);
function oi(t) {
return function(e) {
for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), i = 1; i < r; i++)
n[i - 1] = arguments[i];
return Mf(t, e, n);
};
}
function iG(t) {
return function() {
for (var e = arguments.length, r = new Array(e), n = 0; n < e; n++)
r[n] = arguments[n];
return bb(t, r);
};
}
function Ae(t, e, r) {
r = r || Ch, r6 && r6(t, null);
for (var n = e.length; n--; ) {
var i = e[n];
if (typeof i == "string") {
var a = r(i);
a !== i && (KH(e) || (e[n] = a), i = a);
}
t[i] = !0;
}
return t;
}
function ps(t) {
var e = JH(null), r;
for (r in t)
Mf(XH, t, [r]) && (e[r] = t[r]);
return e;
}
function Zu(t, e) {
for (; t !== null; ) {
var r = QH(t, e);
if (r) {
if (r.get)
return oi(r.get);
if (typeof r.value == "function")
return oi(r.value);
}
t = ZH(t);
}
function n(i) {
return console.warn("fallback value for", i), null;
}
return n;
}
var i6 = cn(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Td = cn(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Ed = cn(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), aG = cn(["animate", "color-profile", "cursor", "discard", "fedropshadow", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), Cd = cn(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover"]), sG = cn(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), a6 = cn(["#text"]), s6 = cn(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "xmlns", "slot"]), Sd = cn(["accent-height", "accumulate", "additive", "alignment-baseline", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), o6 = cn(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), Qu = cn(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), oG = Oi(/\{\{[\w\W]*|[\w\W]*\}\}/gm), lG = Oi(/<%[\w\W]*|[\w\W]*%>/gm), cG = Oi(/^data-[\-\w.\u00B7-\uFFFF]/), uG = Oi(/^aria-[\-\w]+$/), hG = Oi(
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
), fG = Oi(/^(?:\w+script|data):/i), dG = Oi(
/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
), pG = Oi(/^html$/i), gG = function() {
return typeof window > "u" ? null : window;
}, yG = function(e, r) {
if (Na(e) !== "object" || typeof e.createPolicy != "function")
return null;
var n = null, i = "data-tt-policy-suffix";
r.currentScript && r.currentScript.hasAttribute(i) && (n = r.currentScript.getAttribute(i));
var a = "dompurify" + (n ? "#" + n : "");
try {
return e.createPolicy(a, {
createHTML: function(o) {
return o;
},
createScriptURL: function(o) {
return o;
}
});
} catch {
return console.warn("TrustedTypes policy " + a + " could not be created."), null;
}
};
function zS() {
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : gG(), e = function(st) {
return zS(st);
};
if (e.version = "2.4.0", e.removed = [], !t || !t.document || t.document.nodeType !== 9)
return e.isSupported = !1, e;
var r = t.document, n = t.document, i = t.DocumentFragment, a = t.HTMLTemplateElement, s = t.Node, o = t.Element, l = t.NodeFilter, u = t.NamedNodeMap, h = u === void 0 ? t.NamedNodeMap || t.MozNamedAttrMap : u, d = t.HTMLFormElement, f = t.DOMParser, p = t.trustedTypes, m = o.prototype, _ = Zu(m, "cloneNode"), y = Zu(m, "nextSibling"), b = Zu(m, "childNodes"), x = Zu(m, "parentNode");
if (typeof a == "function") {
var k = n.createElement("template");
k.content && k.content.ownerDocument && (n = k.content.ownerDocument);
}
var T = yG(p, r), C = T ? T.createHTML("") : "", M = n, S = M.implementation, R = M.createNodeIterator, A = M.createDocumentFragment, L = M.getElementsByTagName, v = r.importNode, B = {};
try {
B = ps(n).documentMode ? n.documentMode : {};
} catch {
}
var w = {};
e.isSupported = typeof x == "function" && S && typeof S.createHTMLDocument < "u" && B !== 9;
var D = oG, N = lG, z = cG, X = uG, ct = fG, J = dG, Y = hG, $ = null, lt = Ae({}, [].concat($n(i6), $n(Td), $n(Ed), $n(Cd), $n(a6))), ut = null, W = Ae({}, [].concat($n(s6), $n(Sd), $n(o6), $n(Qu))), tt = Object.seal(Object.create(null, {
tagNameCheck: {
writable: !0,
configurable: !1,
enumerable: !0,
value: null
},
attributeNameCheck: {
writable: !0,
configurable: !1,
enumerable: !0,
value: null
},
allowCustomizedBuiltInElements: {
writable: !0,
configurable: !1,
enumerable: !0,
value: !1
}
})), K = null, it = null, Z = !0, V = !0, Q = !1, q = !1, U = !1, F = !1, j = !1, P = !1, et = !1, at = !1, It = !0, Lt = !1, Rt = "user-content-", Ct = !0, pt = !1, mt = {}, _t = null, Tt = Ae({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]), ft = null, le = Ae({}, ["audio", "video", "img", "source", "image", "track"]), Dt = null, Ht = Ae({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), $t = "http://www.w3.org/1998/Math/MathML", Qt = "http://www.w3.org/2000/svg", we = "http://www.w3.org/1999/xhtml", Gt = we, Ft = !1, zt, wt = ["application/xhtml+xml", "text/html"], bt = "text/html", Et, kt = null, Ut = n.createElement("form"), gt = function(st) {
return st instanceof RegExp || st instanceof Function;
}, he = function(st) {
kt && kt === st || ((!st || Na(st) !== "object") && (st = {}), st = ps(st), zt = wt.indexOf(st.PARSER_MEDIA_TYPE) === -1 ? zt = bt : zt = st.PARSER_MEDIA_TYPE, Et = zt === "application/xhtml+xml" ? function(At) {
return At;
} : Ch, $ = "ALLOWED_TAGS" in st ? Ae({}, st.ALLOWED_TAGS, Et) : lt, ut = "ALLOWED_ATTR" in st ? Ae({}, st.ALLOWED_ATTR, Et) : W, Dt = "ADD_URI_SAFE_ATTR" in st ? Ae(
ps(Ht),
st.ADD_URI_SAFE_ATTR,
Et
) : Ht, ft = "ADD_DATA_URI_TAGS" in st ? Ae(
ps(le),
st.ADD_DATA_URI_TAGS,
Et
) : le, _t = "FORBID_CONTENTS" in st ? Ae({}, st.FORBID_CONTENTS, Et) : Tt, K = "FORBID_TAGS" in st ? Ae({}, st.FORBID_TAGS, Et) : {}, it = "FORBID_ATTR" in st ? Ae({}, st.FORBID_ATTR, Et) : {}, mt = "USE_PROFILES" in st ? st.USE_PROFILES : !1, Z = st.ALLOW_ARIA_ATTR !== !1, V = st.ALLOW_DATA_ATTR !== !1, Q = st.ALLOW_UNKNOWN_PROTOCOLS || !1, q = st.SAFE_FOR_TEMPLATES || !1, U = st.WHOLE_DOCUMENT || !1, P = st.RETURN_DOM || !1, et = st.RETURN_DOM_FRAGMENT || !1, at = st.RETURN_TRUSTED_TYPE || !1, j = st.FORCE_BODY || !1, It = st.SANITIZE_DOM !== !1, Lt = st.SANITIZE_NAMED_PROPS || !1, Ct = st.KEEP_CONTENT !== !1, pt = st.IN_PLACE || !1, Y = st.ALLOWED_URI_REGEXP || Y, Gt = st.NAMESPACE || we, st.CUSTOM_ELEMENT_HANDLING && gt(st.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (tt.tagNameCheck = st.CUSTOM_ELEMENT_HANDLING.tagNameCheck), st.CUSTOM_ELEMENT_HANDLING && gt(st.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (tt.attributeNameCheck = st.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), st.CUSTOM_ELEMENT_HANDLING && typeof st.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (tt.allowCustomizedBuiltInElements = st.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), q && (V = !1), et && (P = !0), mt && ($ = Ae({}, $n(a6)), ut = [], mt.html === !0 && (Ae($, i6), Ae(ut, s6)), mt.svg === !0 && (Ae($, Td), Ae(ut, Sd), Ae(ut, Qu)), mt.svgFilters === !0 && (Ae($, Ed), Ae(ut, Sd), Ae(ut, Qu)), mt.mathMl === !0 && (Ae($, Cd), Ae(ut, o6), Ae(ut, Qu))), st.ADD_TAGS && ($ === lt && ($ = ps($)), Ae($, st.ADD_TAGS, Et)), st.ADD_ATTR && (ut === W && (ut = ps(ut)), Ae(ut, st.ADD_ATTR, Et)), st.ADD_URI_SAFE_ATTR && Ae(Dt, st.ADD_URI_SAFE_ATTR, Et), st.FORBID_CONTENTS && (_t === Tt && (_t = ps(_t)), Ae(_t, st.FORBID_CONTENTS, Et)), Ct && ($["#text"] = !0), U && Ae($, ["html", "head", "body"]), $.table && (Ae($, ["tbody"]), delete K.tbody), cn && cn(st), kt = st);
}, yt = Ae({}, ["mi", "mo", "mn", "ms", "mtext"]), re = Ae({}, ["foreignobject", "desc", "title", "annotation-xml"]), _e = Ae({}, ["title", "style", "font", "a", "script"]), ge = Ae({}, Td);
Ae(ge, Ed), Ae(ge, aG);
var be = Ae({}, Cd);
Ae(be, sG);
var Te = function(st) {
var At = x(st);
(!At || !At.tagName) && (At = {
namespaceURI: we,
tagName: "template"
});
var Nt = Ch(st.tagName), Jt = Ch(At.tagName);
return st.namespaceURI === Qt ? At.namespaceURI === we ? Nt === "svg" : At.namespaceURI === $t ? Nt === "svg" && (Jt === "annotation-xml" || yt[Jt]) : Boolean(ge[Nt]) : st.namespaceURI === $t ? At.namespaceURI === we ? Nt === "math" : At.namespaceURI === Qt ? Nt === "math" && re[Jt] : Boolean(be[Nt]) : st.namespaceURI === we ? At.namespaceURI === Qt && !re[Jt] || At.namespaceURI === $t && !yt[Jt] ? !1 : !be[Nt] && (_e[Nt] || !ge[Nt]) : !1;
}, Wt = function(st) {
Ll(e.removed, {
element: st
});
try {
st.parentNode.removeChild(st);
} catch {
try {
st.outerHTML = C;
} catch {
st.remove();
}
}
}, ae = function(st, At) {
try {
Ll(e.removed, {
attribute: At.getAttributeNode(st),
from: At
});
} catch {
Ll(e.removed, {
attribute: null,
from: At
});
}
if (At.removeAttribute(st), st === "is" && !ut[st])
if (P || et)
try {
Wt(At);
} catch {
}
else
try {
At.setAttribute(st, "");
} catch {
}
}, ye = function(st) {
var At, Nt;
if (j)
st = "" + st;
else {
var Jt = eG(st, /^[\r\n\t ]+/);
Nt = Jt && Jt[0];
}
zt === "application/xhtml+xml" && (st = '
' + st + "");
var ze = T ? T.createHTML(st) : st;
if (Gt === we)
try {
At = new f().parseFromString(ze, zt);
} catch {
}
if (!At || !At.documentElement) {
At = S.createDocument(Gt, "template", null);
try {
At.documentElement.innerHTML = Ft ? "" : ze;
} catch {
}
}
var Oe = At.body || At.documentElement;
return st && Nt && Oe.insertBefore(n.createTextNode(Nt), Oe.childNodes[0] || null), Gt === we ? L.call(At, U ? "html" : "body")[0] : U ? At.documentElement : Oe;
}, ue = function(st) {
return R.call(
st.ownerDocument || st,
st,
l.SHOW_ELEMENT | l.SHOW_COMMENT | l.SHOW_TEXT,
null,
!1
);
}, Ui = function(st) {
return st instanceof d && (typeof st.nodeName != "string" || typeof st.textContent != "string" || typeof st.removeChild != "function" || !(st.attributes instanceof h) || typeof st.removeAttribute != "function" || typeof st.setAttribute != "function" || typeof st.namespaceURI != "string" || typeof st.insertBefore != "function");
}, Or = function(st) {
return Na(s) === "object" ? st instanceof s : st && Na(st) === "object" && typeof st.nodeType == "number" && typeof st.nodeName == "string";
}, Ie = function(st, At, Nt) {
!w[st] || tG(w[st], function(Jt) {
Jt.call(e, At, Nt, kt);
});
}, se = function(st) {
var At;
if (Ie("beforeSanitizeElements", st, null), Ui(st) || Xr(/[\u0080-\uFFFF]/, st.nodeName))
return Wt(st), !0;
var Nt = Et(st.nodeName);
if (Ie("uponSanitizeElement", st, {
tagName: Nt,
allowedTags: $
}), st.hasChildNodes() && !Or(st.firstElementChild) && (!Or(st.content) || !Or(st.content.firstElementChild)) && Xr(/<[/\w]/g, st.innerHTML) && Xr(/<[/\w]/g, st.textContent) || Nt === "select" && Xr(/= 0; --Fe)
Jt.insertBefore(_(ze[Fe], !0), y(st));
}
return Wt(st), !0;
}
return st instanceof o && !Te(st) || (Nt === "noscript" || Nt === "noembed") && Xr(/<\/no(script|embed)/i, st.innerHTML) ? (Wt(st), !0) : (q && st.nodeType === 3 && (At = st.textContent, At = Sa(At, D, " "), At = Sa(At, N, " "), st.textContent !== At && (Ll(e.removed, {
element: st.cloneNode()
}), st.textContent = At)), Ie("afterSanitizeElements", st, null), !1);
}, $e = function(st, At, Nt) {
if (It && (At === "id" || At === "name") && (Nt in n || Nt in Ut))
return !1;
if (!(V && !it[At] && Xr(z, At))) {
if (!(Z && Xr(X, At))) {
if (!ut[At] || it[At]) {
if (!(_r(st) && (tt.tagNameCheck instanceof RegExp && Xr(tt.tagNameCheck, st) || tt.tagNameCheck instanceof Function && tt.tagNameCheck(st)) && (tt.attributeNameCheck instanceof RegExp && Xr(tt.attributeNameCheck, At) || tt.attributeNameCheck instanceof Function && tt.attributeNameCheck(At)) || At === "is" && tt.allowCustomizedBuiltInElements && (tt.tagNameCheck instanceof RegExp && Xr(tt.tagNameCheck, Nt) || tt.tagNameCheck instanceof Function && tt.tagNameCheck(Nt))))
return !1;
} else if (!Dt[At]) {
if (!Xr(Y, Sa(Nt, J, ""))) {
if (!((At === "src" || At === "xlink:href" || At === "href") && st !== "script" && rG(Nt, "data:") === 0 && ft[st])) {
if (!(Q && !Xr(ct, Sa(Nt, J, "")))) {
if (Nt)
return !1;
}
}
}
}
}
}
return !0;
}, _r = function(st) {
return st.indexOf("-") > 0;
}, He = function(st) {
var At, Nt, Jt, ze;
Ie("beforeSanitizeAttributes", st, null);
var Oe = st.attributes;
if (!!Oe) {
var Fe = {
attrName: "",
attrValue: "",
keepAttr: !0,
allowedAttributes: ut
};
for (ze = Oe.length; ze--; ) {
At = Oe[ze];
var vr = At, Ve = vr.name, Wi = vr.namespaceURI;
if (Nt = Ve === "value" ? At.value : nG(At.value), Jt = Et(Ve), Fe.attrName = Jt, Fe.attrValue = Nt, Fe.keepAttr = !0, Fe.forceKeepAttr = void 0, Ie("uponSanitizeAttribute", st, Fe), Nt = Fe.attrValue, !Fe.forceKeepAttr && (ae(Ve, st), !!Fe.keepAttr)) {
if (Xr(/\/>/i, Nt)) {
ae(Ve, st);
continue;
}
q && (Nt = Sa(Nt, D, " "), Nt = Sa(Nt, N, " "));
var Ee = Et(st.nodeName);
if (!!$e(Ee, Jt, Nt)) {
if (Lt && (Jt === "id" || Jt === "name") && (ae(Ve, st), Nt = Rt + Nt), T && Na(p) === "object" && typeof p.getAttributeType == "function" && !Wi)
switch (p.getAttributeType(Ee, Jt)) {
case "TrustedHTML":
Nt = T.createHTML(Nt);
break;
case "TrustedScriptURL":
Nt = T.createScriptURL(Nt);
break;
}
try {
Wi ? st.setAttributeNS(Wi, Ve, Nt) : st.setAttribute(Ve, Nt), n6(e.removed);
} catch {
}
}
}
}
Ie("afterSanitizeAttributes", st, null);
}
}, Xe = function qt(st) {
var At, Nt = ue(st);
for (Ie("beforeSanitizeShadowDOM", st, null); At = Nt.nextNode(); )
Ie("uponSanitizeShadowNode", At, null), !se(At) && (At.content instanceof i && qt(At.content), He(At));
Ie("afterSanitizeShadowDOM", st, null);
};
return e.sanitize = function(qt) {
var st = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, At, Nt, Jt, ze, Oe;
if (Ft = !qt, Ft && (qt = ""), typeof qt != "string" && !Or(qt)) {
if (typeof qt.toString != "function")
throw wd("toString is not a function");
if (qt = qt.toString(), typeof qt != "string")
throw wd("dirty is not a string, aborting");
}
if (!e.isSupported) {
if (Na(t.toStaticHTML) === "object" || typeof t.toStaticHTML == "function") {
if (typeof qt == "string")
return t.toStaticHTML(qt);
if (Or(qt))
return t.toStaticHTML(qt.outerHTML);
}
return qt;
}
if (F || he(st), e.removed = [], typeof qt == "string" && (pt = !1), pt) {
if (qt.nodeName) {
var Fe = Et(qt.nodeName);
if (!$[Fe] || K[Fe])
throw wd("root node is forbidden and cannot be sanitized in-place");
}
} else if (qt instanceof s)
At = ye(""), Nt = At.ownerDocument.importNode(qt, !0), Nt.nodeType === 1 && Nt.nodeName === "BODY" || Nt.nodeName === "HTML" ? At = Nt : At.appendChild(Nt);
else {
if (!P && !q && !U && qt.indexOf("<") === -1)
return T && at ? T.createHTML(qt) : qt;
if (At = ye(qt), !At)
return P ? null : at ? C : "";
}
At && j && Wt(At.firstChild);
for (var vr = ue(pt ? qt : At); Jt = vr.nextNode(); )
Jt.nodeType === 3 && Jt === ze || se(Jt) || (Jt.content instanceof i && Xe(Jt.content), He(Jt), ze = Jt);
if (ze = null, pt)
return qt;
if (P) {
if (et)
for (Oe = A.call(At.ownerDocument); At.firstChild; )
Oe.appendChild(At.firstChild);
else
Oe = At;
return ut.shadowroot && (Oe = v.call(r, Oe, !0)), Oe;
}
var Ve = U ? At.outerHTML : At.innerHTML;
return U && $["!doctype"] && At.ownerDocument && At.ownerDocument.doctype && At.ownerDocument.doctype.name && Xr(pG, At.ownerDocument.doctype.name) && (Ve = "
` + Ve), q && (Ve = Sa(Ve, D, " "), Ve = Sa(Ve, N, " ")), T && at ? T.createHTML(Ve) : Ve;
}, e.setConfig = function(qt) {
he(qt), F = !0;
}, e.clearConfig = function() {
kt = null, F = !1;
}, e.isValidAttribute = function(qt, st, At) {
kt || he({});
var Nt = Et(qt), Jt = Et(st);
return $e(Nt, Jt, At);
}, e.addHook = function(qt, st) {
typeof st == "function" && (w[qt] = w[qt] || [], Ll(w[qt], st));
}, e.removeHook = function(qt) {
if (w[qt])
return n6(w[qt]);
}, e.removeHooks = function(qt) {
w[qt] && (w[qt] = []);
}, e.removeAllHooks = function() {
w = {};
}, e;
}
var Ic = zS();
const mG = (t) => t ? US(t).replace(/\\n/g, "#br#").split("#br#") : [""], YS = (t) => Ic.sanitize(t), l6 = (t, e) => {
var r;
if (((r = e.flowchart) == null ? void 0 : r.htmlLabels) !== !1) {
const n = e.securityLevel;
n === "antiscript" || n === "strict" ? t = YS(t) : n !== "loose" && (t = US(t), t = t.replace(//g, ">"), t = t.replace(/=/g, "="), t = xG(t));
}
return t;
}, li = (t, e) => t && (e.dompurifyConfig ? t = Ic.sanitize(l6(t, e), e.dompurifyConfig).toString() : t = Ic.sanitize(l6(t, e)), t), bG = (t, e) => typeof t == "string" ? li(t, e) : t.flat().map((r) => li(r, e)), H1 = /
/gi, _G = (t) => H1.test(t), vG = (t) => t.split(H1), xG = (t) => t.replace(/#br#/g, "
"), US = (t) => t.replace(H1, "#br#"), kG = (t) => {
let e = "";
return t && (e = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, e = e.replaceAll(/\(/g, "\\("), e = e.replaceAll(/\)/g, "\\)")), e;
}, Mr = (t) => !(t === !1 || ["false", "null", "0"].includes(String(t).trim().toLowerCase())), Va = function(t) {
let e = t;
return t.indexOf("~") !== -1 ? (e = e.replace(/~([^~].*)/, "<$1"), e = e.replace(/~([^~]*)$/, ">$1"), Va(e)) : e;
}, pe = {
getRows: mG,
sanitizeText: li,
sanitizeTextOrArray: bG,
hasBreaks: _G,
splitBreaks: vG,
lineBreakRegex: H1,
removeScript: YS,
getUrl: kG,
evaluate: Mr
}, Sh = {
min: {
r: 0,
g: 0,
b: 0,
s: 0,
l: 0,
a: 0
},
max: {
r: 255,
g: 255,
b: 255,
h: 360,
s: 100,
l: 100,
a: 1
},
clamp: {
r: (t) => t >= 255 ? 255 : t < 0 ? 0 : t,
g: (t) => t >= 255 ? 255 : t < 0 ? 0 : t,
b: (t) => t >= 255 ? 255 : t < 0 ? 0 : t,
h: (t) => t % 360,
s: (t) => t >= 100 ? 100 : t < 0 ? 0 : t,
l: (t) => t >= 100 ? 100 : t < 0 ? 0 : t,
a: (t) => t >= 1 ? 1 : t < 0 ? 0 : t
},
toLinear: (t) => {
const e = t / 255;
return t > 0.03928 ? Math.pow((e + 0.055) / 1.055, 2.4) : e / 12.92;
},
hue2rgb: (t, e, r) => (r < 0 && (r += 1), r > 1 && (r -= 1), r < 1 / 6 ? t + (e - t) * 6 * r : r < 1 / 2 ? e : r < 2 / 3 ? t + (e - t) * (2 / 3 - r) * 6 : t),
hsl2rgb: ({ h: t, s: e, l: r }, n) => {
if (!e)
return r * 2.55;
t /= 360, e /= 100, r /= 100;
const i = r < 0.5 ? r * (1 + e) : r + e - r * e, a = 2 * r - i;
switch (n) {
case "r":
return Sh.hue2rgb(a, i, t + 1 / 3) * 255;
case "g":
return Sh.hue2rgb(a, i, t) * 255;
case "b":
return Sh.hue2rgb(a, i, t - 1 / 3) * 255;
}
},
rgb2hsl: ({ r: t, g: e, b: r }, n) => {
t /= 255, e /= 255, r /= 255;
const i = Math.max(t, e, r), a = Math.min(t, e, r), s = (i + a) / 2;
if (n === "l")
return s * 100;
if (i === a)
return 0;
const o = i - a, l = s > 0.5 ? o / (2 - i - a) : o / (i + a);
if (n === "s")
return l * 100;
switch (i) {
case t:
return ((e - r) / o + (e < r ? 6 : 0)) * 60;
case e:
return ((r - t) / o + 2) * 60;
case r:
return ((t - e) / o + 4) * 60;
default:
return -1;
}
}
}, wG = Sh, TG = {
clamp: (t, e, r) => e > r ? Math.min(e, Math.max(r, t)) : Math.min(r, Math.max(e, t)),
round: (t) => Math.round(t * 1e10) / 1e10
}, EG = TG, CG = {
dec2hex: (t) => {
const e = Math.round(t).toString(16);
return e.length > 1 ? e : `0${e}`;
}
}, SG = CG, AG = {
channel: wG,
lang: EG,
unit: SG
}, xe = AG, Aa = {};
for (let t = 0; t <= 255; t++)
Aa[t] = xe.unit.dec2hex(t);
const Ur = {
ALL: 0,
RGB: 1,
HSL: 2
};
class MG {
constructor() {
this.type = Ur.ALL;
}
get() {
return this.type;
}
set(e) {
if (this.type && this.type !== e)
throw new Error("Cannot change both RGB and HSL channels at the same time");
this.type = e;
}
reset() {
this.type = Ur.ALL;
}
is(e) {
return this.type === e;
}
}
const LG = MG;
class RG {
constructor(e, r) {
this.color = r, this.changed = !1, this.data = e, this.type = new LG();
}
set(e, r) {
return this.color = r, this.changed = !1, this.data = e, this.type.type = Ur.ALL, this;
}
_ensureHSL() {
const e = this.data, { h: r, s: n, l: i } = e;
r === void 0 && (e.h = xe.channel.rgb2hsl(e, "h")), n === void 0 && (e.s = xe.channel.rgb2hsl(e, "s")), i === void 0 && (e.l = xe.channel.rgb2hsl(e, "l"));
}
_ensureRGB() {
const e = this.data, { r, g: n, b: i } = e;
r === void 0 && (e.r = xe.channel.hsl2rgb(e, "r")), n === void 0 && (e.g = xe.channel.hsl2rgb(e, "g")), i === void 0 && (e.b = xe.channel.hsl2rgb(e, "b"));
}
get r() {
const e = this.data, r = e.r;
return !this.type.is(Ur.HSL) && r !== void 0 ? r : (this._ensureHSL(), xe.channel.hsl2rgb(e, "r"));
}
get g() {
const e = this.data, r = e.g;
return !this.type.is(Ur.HSL) && r !== void 0 ? r : (this._ensureHSL(), xe.channel.hsl2rgb(e, "g"));
}
get b() {
const e = this.data, r = e.b;
return !this.type.is(Ur.HSL) && r !== void 0 ? r : (this._ensureHSL(), xe.channel.hsl2rgb(e, "b"));
}
get h() {
const e = this.data, r = e.h;
return !this.type.is(Ur.RGB) && r !== void 0 ? r : (this._ensureRGB(), xe.channel.rgb2hsl(e, "h"));
}
get s() {
const e = this.data, r = e.s;
return !this.type.is(Ur.RGB) && r !== void 0 ? r : (this._ensureRGB(), xe.channel.rgb2hsl(e, "s"));
}
get l() {
const e = this.data, r = e.l;
return !this.type.is(Ur.RGB) && r !== void 0 ? r : (this._ensureRGB(), xe.channel.rgb2hsl(e, "l"));
}
get a() {
return this.data.a;
}
set r(e) {
this.type.set(Ur.RGB), this.changed = !0, this.data.r = e;
}
set g(e) {
this.type.set(Ur.RGB), this.changed = !0, this.data.g = e;
}
set b(e) {
this.type.set(Ur.RGB), this.changed = !0, this.data.b = e;
}
set h(e) {
this.type.set(Ur.HSL), this.changed = !0, this.data.h = e;
}
set s(e) {
this.type.set(Ur.HSL), this.changed = !0, this.data.s = e;
}
set l(e) {
this.type.set(Ur.HSL), this.changed = !0, this.data.l = e;
}
set a(e) {
this.changed = !0, this.data.a = e;
}
}
const IG = RG, NG = new IG({ r: 0, g: 0, b: 0, a: 0 }, "transparent"), G1 = NG, WS = {
re: /^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,
parse: (t) => {
if (t.charCodeAt(0) !== 35)
return;
const e = t.match(WS.re);
if (!e)
return;
const r = e[1], n = parseInt(r, 16), i = r.length, a = i % 4 === 0, s = i > 4, o = s ? 1 : 17, l = s ? 8 : 4, u = a ? 0 : -1, h = s ? 255 : 15;
return G1.set({
r: (n >> l * (u + 3) & h) * o,
g: (n >> l * (u + 2) & h) * o,
b: (n >> l * (u + 1) & h) * o,
a: a ? (n & h) * o / 255 : 1
}, t);
},
stringify: (t) => {
const { r: e, g: r, b: n, a: i } = t;
return i < 1 ? `#${Aa[Math.round(e)]}${Aa[Math.round(r)]}${Aa[Math.round(n)]}${Aa[Math.round(i * 255)]}` : `#${Aa[Math.round(e)]}${Aa[Math.round(r)]}${Aa[Math.round(n)]}`;
}
}, ic = WS, Ah = {
re: /^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,
hueRe: /^(.+?)(deg|grad|rad|turn)$/i,
_hue2deg: (t) => {
const e = t.match(Ah.hueRe);
if (e) {
const [, r, n] = e;
switch (n) {
case "grad":
return xe.channel.clamp.h(parseFloat(r) * 0.9);
case "rad":
return xe.channel.clamp.h(parseFloat(r) * 180 / Math.PI);
case "turn":
return xe.channel.clamp.h(parseFloat(r) * 360);
}
}
return xe.channel.clamp.h(parseFloat(t));
},
parse: (t) => {
const e = t.charCodeAt(0);
if (e !== 104 && e !== 72)
return;
const r = t.match(Ah.re);
if (!r)
return;
const [, n, i, a, s, o] = r;
return G1.set({
h: Ah._hue2deg(n),
s: xe.channel.clamp.s(parseFloat(i)),
l: xe.channel.clamp.l(parseFloat(a)),
a: s ? xe.channel.clamp.a(o ? parseFloat(s) / 100 : parseFloat(s)) : 1
}, t);
},
stringify: (t) => {
const { h: e, s: r, l: n, a: i } = t;
return i < 1 ? `hsla(${xe.lang.round(e)}, ${xe.lang.round(r)}%, ${xe.lang.round(n)}%, ${i})` : `hsl(${xe.lang.round(e)}, ${xe.lang.round(r)}%, ${xe.lang.round(n)}%)`;
}
}, Ju = Ah, Mh = {
colors: {
aliceblue: "#f0f8ff",
antiquewhite: "#faebd7",
aqua: "#00ffff",
aquamarine: "#7fffd4",
azure: "#f0ffff",
beige: "#f5f5dc",
bisque: "#ffe4c4",
black: "#000000",
blanchedalmond: "#ffebcd",
blue: "#0000ff",
blueviolet: "#8a2be2",
brown: "#a52a2a",
burlywood: "#deb887",
cadetblue: "#5f9ea0",
chartreuse: "#7fff00",
chocolate: "#d2691e",
coral: "#ff7f50",
cornflowerblue: "#6495ed",
cornsilk: "#fff8dc",
crimson: "#dc143c",
cyanaqua: "#00ffff",
darkblue: "#00008b",
darkcyan: "#008b8b",
darkgoldenrod: "#b8860b",
darkgray: "#a9a9a9",
darkgreen: "#006400",
darkgrey: "#a9a9a9",
darkkhaki: "#bdb76b",
darkmagenta: "#8b008b",
darkolivegreen: "#556b2f",
darkorange: "#ff8c00",
darkorchid: "#9932cc",
darkred: "#8b0000",
darksalmon: "#e9967a",
darkseagreen: "#8fbc8f",
darkslateblue: "#483d8b",
darkslategray: "#2f4f4f",
darkslategrey: "#2f4f4f",
darkturquoise: "#00ced1",
darkviolet: "#9400d3",
deeppink: "#ff1493",
deepskyblue: "#00bfff",
dimgray: "#696969",
dimgrey: "#696969",
dodgerblue: "#1e90ff",
firebrick: "#b22222",
floralwhite: "#fffaf0",
forestgreen: "#228b22",
fuchsia: "#ff00ff",
gainsboro: "#dcdcdc",
ghostwhite: "#f8f8ff",
gold: "#ffd700",
goldenrod: "#daa520",
gray: "#808080",
green: "#008000",
greenyellow: "#adff2f",
grey: "#808080",
honeydew: "#f0fff0",
hotpink: "#ff69b4",
indianred: "#cd5c5c",
indigo: "#4b0082",
ivory: "#fffff0",
khaki: "#f0e68c",
lavender: "#e6e6fa",
lavenderblush: "#fff0f5",
lawngreen: "#7cfc00",
lemonchiffon: "#fffacd",
lightblue: "#add8e6",
lightcoral: "#f08080",
lightcyan: "#e0ffff",
lightgoldenrodyellow: "#fafad2",
lightgray: "#d3d3d3",
lightgreen: "#90ee90",
lightgrey: "#d3d3d3",
lightpink: "#ffb6c1",
lightsalmon: "#ffa07a",
lightseagreen: "#20b2aa",
lightskyblue: "#87cefa",
lightslategray: "#778899",
lightslategrey: "#778899",
lightsteelblue: "#b0c4de",
lightyellow: "#ffffe0",
lime: "#00ff00",
limegreen: "#32cd32",
linen: "#faf0e6",
magenta: "#ff00ff",
maroon: "#800000",
mediumaquamarine: "#66cdaa",
mediumblue: "#0000cd",
mediumorchid: "#ba55d3",
mediumpurple: "#9370db",
mediumseagreen: "#3cb371",
mediumslateblue: "#7b68ee",
mediumspringgreen: "#00fa9a",
mediumturquoise: "#48d1cc",
mediumvioletred: "#c71585",
midnightblue: "#191970",
mintcream: "#f5fffa",
mistyrose: "#ffe4e1",
moccasin: "#ffe4b5",
navajowhite: "#ffdead",
navy: "#000080",
oldlace: "#fdf5e6",
olive: "#808000",
olivedrab: "#6b8e23",
orange: "#ffa500",
orangered: "#ff4500",
orchid: "#da70d6",
palegoldenrod: "#eee8aa",
palegreen: "#98fb98",
paleturquoise: "#afeeee",
palevioletred: "#db7093",
papayawhip: "#ffefd5",
peachpuff: "#ffdab9",
peru: "#cd853f",
pink: "#ffc0cb",
plum: "#dda0dd",
powderblue: "#b0e0e6",
purple: "#800080",
rebeccapurple: "#663399",
red: "#ff0000",
rosybrown: "#bc8f8f",
royalblue: "#4169e1",
saddlebrown: "#8b4513",
salmon: "#fa8072",
sandybrown: "#f4a460",
seagreen: "#2e8b57",
seashell: "#fff5ee",
sienna: "#a0522d",
silver: "#c0c0c0",
skyblue: "#87ceeb",
slateblue: "#6a5acd",
slategray: "#708090",
slategrey: "#708090",
snow: "#fffafa",
springgreen: "#00ff7f",
tan: "#d2b48c",
teal: "#008080",
thistle: "#d8bfd8",
transparent: "#00000000",
turquoise: "#40e0d0",
violet: "#ee82ee",
wheat: "#f5deb3",
white: "#ffffff",
whitesmoke: "#f5f5f5",
yellow: "#ffff00",
yellowgreen: "#9acd32"
},
parse: (t) => {
t = t.toLowerCase();
const e = Mh.colors[t];
if (!!e)
return ic.parse(e);
},
stringify: (t) => {
const e = ic.stringify(t);
for (const r in Mh.colors)
if (Mh.colors[r] === e)
return r;
}
}, c6 = Mh, HS = {
re: /^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,
parse: (t) => {
const e = t.charCodeAt(0);
if (e !== 114 && e !== 82)
return;
const r = t.match(HS.re);
if (!r)
return;
const [, n, i, a, s, o, l, u, h] = r;
return G1.set({
r: xe.channel.clamp.r(i ? parseFloat(n) * 2.55 : parseFloat(n)),
g: xe.channel.clamp.g(s ? parseFloat(a) * 2.55 : parseFloat(a)),
b: xe.channel.clamp.b(l ? parseFloat(o) * 2.55 : parseFloat(o)),
a: u ? xe.channel.clamp.a(h ? parseFloat(u) / 100 : parseFloat(u)) : 1
}, t);
},
stringify: (t) => {
const { r: e, g: r, b: n, a: i } = t;
return i < 1 ? `rgba(${xe.lang.round(e)}, ${xe.lang.round(r)}, ${xe.lang.round(n)}, ${xe.lang.round(i)})` : `rgb(${xe.lang.round(e)}, ${xe.lang.round(r)}, ${xe.lang.round(n)})`;
}
}, th = HS, BG = {
format: {
keyword: c6,
hex: ic,
rgb: th,
rgba: th,
hsl: Ju,
hsla: Ju
},
parse: (t) => {
if (typeof t != "string")
return t;
const e = ic.parse(t) || th.parse(t) || Ju.parse(t) || c6.parse(t);
if (e)
return e;
throw new Error(`Unsupported color format: "${t}"`);
},
stringify: (t) => !t.changed && t.color ? t.color : t.type.is(Ur.HSL) || t.data.r === void 0 ? Ju.stringify(t) : t.a < 1 || !Number.isInteger(t.r) || !Number.isInteger(t.g) || !Number.isInteger(t.b) ? th.stringify(t) : ic.stringify(t)
}, ya = BG, DG = (t, e) => {
const r = ya.parse(t);
for (const n in e)
r[n] = xe.channel.clamp[n](e[n]);
return ya.stringify(r);
}, GS = DG, OG = (t, e, r = 0, n = 1) => {
if (typeof t != "number")
return GS(t, { a: e });
const i = G1.set({
r: xe.channel.clamp.r(t),
g: xe.channel.clamp.g(e),
b: xe.channel.clamp.b(r),
a: xe.channel.clamp.a(n)
});
return ya.stringify(i);
}, ac = OG, FG = (t, e, r) => {
const n = ya.parse(t), i = n[e], a = xe.channel.clamp[e](i + r);
return i !== a && (n[e] = a), ya.stringify(n);
}, jS = FG, PG = (t, e) => jS(t, "l", e), oe = PG, qG = (t, e) => jS(t, "l", -e), me = qG, VG = (t, e) => {
const r = ya.parse(t), n = {};
for (const i in e)
!e[i] || (n[i] = r[i] + e[i]);
return GS(t, n);
}, xt = VG, zG = (t, e, r = 50) => {
const { r: n, g: i, b: a, a: s } = ya.parse(t), { r: o, g: l, b: u, a: h } = ya.parse(e), d = r / 100, f = d * 2 - 1, p = s - h, _ = ((f * p === -1 ? f : (f + p) / (1 + f * p)) + 1) / 2, y = 1 - _, b = n * _ + o * y, x = i * _ + l * y, k = a * _ + u * y, T = s * d + h * (1 - d);
return ac(b, x, k, T);
}, YG = zG, UG = (t, e = 100) => {
const r = ya.parse(t);
return r.r = 255 - r.r, r.g = 255 - r.g, r.b = 255 - r.b, YG(r, t, e);
}, Yt = UG, en = (t, e) => e ? xt(t, { s: -40, l: 10 }) : xt(t, { s: -40, l: -10 }), j1 = "#ffffff", $1 = "#f2f2f2";
class WG {
constructor() {
this.background = "#f4f4f4", this.darkMode = !1, this.primaryColor = "#fff4dd", this.noteBkgColor = "#fff5ad", this.noteTextColor = "#333", this.THEME_COLOR_LIMIT = 12, this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif', this.fontSize = "16px";
}
updateColors() {
if (this.primaryTextColor = this.primaryTextColor || (this.darkMode ? "#eee" : "#333"), this.secondaryColor = this.secondaryColor || xt(this.primaryColor, { h: -120 }), this.tertiaryColor = this.tertiaryColor || xt(this.primaryColor, { h: 180, l: 5 }), this.primaryBorderColor = this.primaryBorderColor || en(this.primaryColor, this.darkMode), this.secondaryBorderColor = this.secondaryBorderColor || en(this.secondaryColor, this.darkMode), this.tertiaryBorderColor = this.tertiaryBorderColor || en(this.tertiaryColor, this.darkMode), this.noteBorderColor = this.noteBorderColor || en(this.noteBkgColor, this.darkMode), this.noteBkgColor = this.noteBkgColor || "#fff5ad", this.noteTextColor = this.noteTextColor || "#333", this.secondaryTextColor = this.secondaryTextColor || Yt(this.secondaryColor), this.tertiaryTextColor = this.tertiaryTextColor || Yt(this.tertiaryColor), this.lineColor = this.lineColor || Yt(this.background), this.textColor = this.textColor || this.primaryTextColor, this.nodeBkg = this.nodeBkg || this.primaryColor, this.mainBkg = this.mainBkg || this.primaryColor, this.nodeBorder = this.nodeBorder || this.primaryBorderColor, this.clusterBkg = this.clusterBkg || this.tertiaryColor, this.clusterBorder = this.clusterBorder || this.tertiaryBorderColor, this.defaultLinkColor = this.defaultLinkColor || this.lineColor, this.titleColor = this.titleColor || this.tertiaryTextColor, this.edgeLabelBackground = this.edgeLabelBackground || (this.darkMode ? me(this.secondaryColor, 30) : this.secondaryColor), this.nodeTextColor = this.nodeTextColor || this.primaryTextColor, this.actorBorder = this.actorBorder || this.primaryBorderColor, this.actorBkg = this.actorBkg || this.mainBkg, this.actorTextColor = this.actorTextColor || this.primaryTextColor, this.actorLineColor = this.actorLineColor || "grey", this.labelBoxBkgColor = this.labelBoxBkgColor || this.actorBkg, this.signalColor = this.signalColor || this.textColor, this.signalTextColor = this.signalTextColor || this.textColor, this.labelBoxBorderColor = this.labelBoxBorderColor || this.actorBorder, this.labelTextColor = this.labelTextColor || this.actorTextColor, this.loopTextColor = this.loopTextColor || this.actorTextColor, this.activationBorderColor = this.activationBorderColor || me(this.secondaryColor, 10), this.activationBkgColor = this.activationBkgColor || this.secondaryColor, this.sequenceNumberColor = this.sequenceNumberColor || Yt(this.lineColor), this.sectionBkgColor = this.sectionBkgColor || this.tertiaryColor, this.altSectionBkgColor = this.altSectionBkgColor || "white", this.sectionBkgColor = this.sectionBkgColor || this.secondaryColor, this.sectionBkgColor2 = this.sectionBkgColor2 || this.primaryColor, this.excludeBkgColor = this.excludeBkgColor || "#eeeeee", this.taskBorderColor = this.taskBorderColor || this.primaryBorderColor, this.taskBkgColor = this.taskBkgColor || this.primaryColor, this.activeTaskBorderColor = this.activeTaskBorderColor || this.primaryColor, this.activeTaskBkgColor = this.activeTaskBkgColor || oe(this.primaryColor, 23), this.gridColor = this.gridColor || "lightgrey", this.doneTaskBkgColor = this.doneTaskBkgColor || "lightgrey", this.doneTaskBorderColor = this.doneTaskBorderColor || "grey", this.critBorderColor = this.critBorderColor || "#ff8888", this.critBkgColor = this.critBkgColor || "red", this.todayLineColor = this.todayLineColor || "red", this.taskTextColor = this.taskTextColor || this.textColor, this.taskTextOutsideColor = this.taskTextOutsideColor || this.textColor, this.taskTextLightColor = this.taskTextLightColor || this.textColor, this.taskTextColor = this.taskTextColor || this.primaryTextColor, this.taskTextDarkColor = this.taskTextDarkColor || this.textColor, this.taskTextClickableColor = this.taskTextClickableColor || "#003163", this.personBorder = this.personBorder || this.primaryBorderColor, this.personBkg = this.personBkg || this.mainBkg, this.transitionColor = this.transitionColor || this.lineColor, this.transitionLabelColor = this.transitionLabelColor || this.textColor, this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor, this.stateBkg = this.stateBkg || this.mainBkg, this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg, this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor, this.altBackground = this.altBackground || this.tertiaryColor, this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg, this.compositeBorder = this.compositeBorder || this.nodeBorder, this.innerEndBackground = this.nodeBorder, this.errorBkgColor = this.errorBkgColor || this.tertiaryColor, this.errorTextColor = this.errorTextColor || this.tertiaryTextColor, this.transitionColor = this.transitionColor || this.lineColor, this.specialStateColor = this.lineColor, this.cScale0 = this.cScale0 || this.primaryColor, this.cScale1 = this.cScale1 || this.secondaryColor, this.cScale2 = this.cScale2 || this.tertiaryColor, this.cScale3 = this.cScale3 || xt(this.primaryColor, { h: 30 }), this.cScale4 = this.cScale4 || xt(this.primaryColor, { h: 60 }), this.cScale5 = this.cScale5 || xt(this.primaryColor, { h: 90 }), this.cScale6 = this.cScale6 || xt(this.primaryColor, { h: 120 }), this.cScale7 = this.cScale7 || xt(this.primaryColor, { h: 150 }), this.cScale8 = this.cScale8 || xt(this.primaryColor, { h: 210, l: 150 }), this.cScale9 = this.cScale9 || xt(this.primaryColor, { h: 270 }), this.cScale10 = this.cScale10 || xt(this.primaryColor, { h: 300 }), this.cScale11 = this.cScale11 || xt(this.primaryColor, { h: 330 }), this.darkMode)
for (let e = 0; e < this.THEME_COLOR_LIMIT; e++)
this["cScale" + e] = me(this["cScale" + e], 75);
else
for (let e = 0; e < this.THEME_COLOR_LIMIT; e++)
this["cScale" + e] = me(this["cScale" + e], 25);
for (let e = 0; e < this.THEME_COLOR_LIMIT; e++)
this["cScaleInv" + e] = this["cScaleInv" + e] || Yt(this["cScale" + e]);
for (let e = 0; e < this.THEME_COLOR_LIMIT; e++)
this.darkMode ? this["cScalePeer" + e] = this["cScalePeer" + e] || oe(this["cScale" + e], 10) : this["cScalePeer" + e] = this["cScalePeer" + e] || me(this["cScale" + e], 10);
this.scaleLabelColor = this.scaleLabelColor || this.labelTextColor;
for (let e = 0; e < this.THEME_COLOR_LIMIT; e++)
this["cScaleLabel" + e] = this["cScaleLabel" + e] || this.scaleLabelColor;
this.classText = this.classText || this.textColor, this.fillType0 = this.fillType0 || this.primaryColor, this.fillType1 = this.fillType1 || this.secondaryColor, this.fillType2 = this.fillType2 || xt(this.primaryColor, { h: 64 }), this.fillType3 = this.fillType3 || xt(this.secondaryColor, { h: 64 }), this.fillType4 = this.fillType4 || xt(this.primaryColor, { h: -64 }), this.fillType5 = this.fillType5 || xt(this.secondaryColor, { h: -64 }), this.fillType6 = this.fillType6 || xt(this.primaryColor, { h: 128 }), this.fillType7 = this.fillType7 || xt(this.secondaryColor, { h: 128 }), this.pie1 = this.pie1 || this.primaryColor, this.pie2 = this.pie2 || this.secondaryColor, this.pie3 = this.pie3 || this.tertiaryColor, this.pie4 = this.pie4 || xt(this.primaryColor, { l: -10 }), this.pie5 = this.pie5 || xt(this.secondaryColor, { l: -10 }), this.pie6 = this.pie6 || xt(this.tertiaryColor, { l: -10 }), this.pie7 = this.pie7 || xt(this.primaryColor, { h: 60, l: -10 }), this.pie8 = this.pie8 || xt(this.primaryColor, { h: -60, l: -10 }), this.pie9 = this.pie9 || xt(this.primaryColor, { h: 120, l: 0 }), this.pie10 = this.pie10 || xt(this.primaryColor, { h: 60, l: -20 }), this.pie11 = this.pie11 || xt(this.primaryColor, { h: -60, l: -20 }), this.pie12 = this.pie12 || xt(this.primaryColor, { h: 120, l: -10 }), this.pieTitleTextSize = this.pieTitleTextSize || "25px", this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor, this.pieSectionTextSize = this.pieSectionTextSize || "17px", this.pieSectionTextColor = this.pieSectionTextColor || this.textColor, this.pieLegendTextSize = this.pieLegendTextSize || "17px", this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor, this.pieStrokeColor = this.pieStrokeColor || "black", this.pieStrokeWidth = this.pieStrokeWidth || "2px", this.pieOpacity = this.pieOpacity || "0.7", this.requirementBackground = this.requirementBackground || this.primaryColor, this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor, this.requirementBorderSize = this.requirementBorderSize || this.primaryBorderColor, this.requirementTextColor = this.requirementTextColor || this.primaryTextColor, this.relationColor = this.relationColor || this.lineColor, this.relationLabelBackground = this.relationLabelBackground || (this.darkMode ? me(this.secondaryColor, 30) : this.secondaryColor), this.relationLabelColor = this.relationLabelColor || this.actorTextColor, this.git0 = this.git0 || this.primaryColor, this.git1 = this.git1 || this.secondaryColor, this.git2 = this.git2 || this.tertiaryColor, this.git3 = this.git3 || xt(this.primaryColor, { h: -30 }), this.git4 = this.git4 || xt(this.primaryColor, { h: -60 }), this.git5 = this.git5 || xt(this.primaryColor, { h: -90 }), this.git6 = this.git6 || xt(this.primaryColor, { h: 60 }), this.git7 = this.git7 || xt(this.primaryColor, { h: 120 }), this.darkMode ? (this.git0 = oe(this.git0, 25), this.git1 = oe(this.git1, 25), this.git2 = oe(this.git2, 25), this.git3 = oe(this.git3, 25), this.git4 = oe(this.git4, 25), this.git5 = oe(this.git5, 25), this.git6 = oe(this.git6, 25), this.git7 = oe(this.git7, 25)) : (this.git0 = me(this.git0, 25), this.git1 = me(this.git1, 25), this.git2 = me(this.git2, 25), this.git3 = me(this.git3, 25), this.git4 = me(this.git4, 25), this.git5 = me(this.git5, 25), this.git6 = me(this.git6, 25), this.git7 = me(this.git7, 25)), this.gitInv0 = this.gitInv0 || Yt(this.git0), this.gitInv1 = this.gitInv1 || Yt(this.git1), this.gitInv2 = this.gitInv2 || Yt(this.git2), this.gitInv3 = this.gitInv3 || Yt(this.git3), this.gitInv4 = this.gitInv4 || Yt(this.git4), this.gitInv5 = this.gitInv5 || Yt(this.git5), this.gitInv6 = this.gitInv6 || Yt(this.git6), this.gitInv7 = this.gitInv7 || Yt(this.git7), this.branchLabelColor = this.branchLabelColor || (this.darkMode ? "black" : this.labelTextColor), this.gitBranchLabel0 = this.gitBranchLabel0 || this.branchLabelColor, this.gitBranchLabel1 = this.gitBranchLabel1 || this.branchLabelColor, this.gitBranchLabel2 = this.gitBranchLabel2 || this.branchLabelColor, this.gitBranchLabel3 = this.gitBranchLabel3 || this.branchLabelColor, this.gitBranchLabel4 = this.gitBranchLabel4 || this.branchLabelColor, this.gitBranchLabel5 = this.gitBranchLabel5 || this.branchLabelColor, this.gitBranchLabel6 = this.gitBranchLabel6 || this.branchLabelColor, this.gitBranchLabel7 = this.gitBranchLabel7 || this.branchLabelColor, this.tagLabelColor = this.tagLabelColor || this.primaryTextColor, this.tagLabelBackground = this.tagLabelBackground || this.primaryColor, this.tagLabelBorder = this.tagBorder || this.primaryBorderColor, this.tagLabelFontSize = this.tagLabelFontSize || "10px", this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor, this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor, this.commitLabelFontSize = this.commitLabelFontSize || "10px", this.attributeBackgroundColorOdd = this.attributeBackgroundColorOdd || j1, this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || $1;
}
calculate(e) {
if (typeof e != "object") {
this.updateColors();
return;
}
const r = Object.keys(e);
r.forEach((n) => {
this[n] = e[n];
}), this.updateColors(), r.forEach((n) => {
this[n] = e[n];
});
}
}
const HG = (t) => {
const e = new WG();
return e.calculate(t), e;
};
class GG {
constructor() {
this.background = "#333", this.primaryColor = "#1f2020", this.secondaryColor = oe(this.primaryColor, 16), this.tertiaryColor = xt(this.primaryColor, { h: -160 }), this.primaryBorderColor = Yt(this.background), this.secondaryBorderColor = en(this.secondaryColor, this.darkMode), this.tertiaryBorderColor = en(this.tertiaryColor, this.darkMode), this.primaryTextColor = Yt(this.primaryColor), this.secondaryTextColor = Yt(this.secondaryColor), this.tertiaryTextColor = Yt(this.tertiaryColor), this.lineColor = Yt(this.background), this.textColor = Yt(this.background), this.mainBkg = "#1f2020", this.secondBkg = "calculated", this.mainContrastColor = "lightgrey", this.darkTextColor = oe(Yt("#323D47"), 10), this.lineColor = "calculated", this.border1 = "#81B1DB", this.border2 = ac(255, 255, 255, 0.25), this.arrowheadColor = "calculated", this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif', this.fontSize = "16px", this.labelBackground = "#181818", this.textColor = "#ccc", this.THEME_COLOR_LIMIT = 12, this.nodeBkg = "calculated", this.nodeBorder = "calculated", this.clusterBkg = "calculated", this.clusterBorder = "calculated", this.defaultLinkColor = "calculated", this.titleColor = "#F9FFFE", this.edgeLabelBackground = "calculated", this.actorBorder = "calculated", this.actorBkg = "calculated", this.actorTextColor = "calculated", this.actorLineColor = "calculated", this.signalColor = "calculated", this.signalTextColor = "calculated", this.labelBoxBkgColor = "calculated", this.labelBoxBorderColor = "calculated", this.labelTextColor = "calculated", this.loopTextColor = "calculated", this.noteBorderColor = "calculated", this.noteBkgColor = "#fff5ad", this.noteTextColor = "calculated", this.activationBorderColor = "calculated", this.activationBkgColor = "calculated", this.sequenceNumberColor = "black", this.sectionBkgColor = me("#EAE8D9", 30), this.altSectionBkgColor = "calculated", this.sectionBkgColor2 = "#EAE8D9", this.taskBorderColor = ac(255, 255, 255, 70), this.taskBkgColor = "calculated", this.taskTextColor = "calculated", this.taskTextLightColor = "calculated", this.taskTextOutsideColor = "calculated", this.taskTextClickableColor = "#003163", this.activeTaskBorderColor = ac(255, 255, 255, 50), this.activeTaskBkgColor = "#81B1DB", this.gridColor = "calculated", this.doneTaskBkgColor = "calculated", this.doneTaskBorderColor = "grey", this.critBorderColor = "#E83737", this.critBkgColor = "#E83737", this.taskTextDarkColor = "calculated", this.todayLineColor = "#DB5757", this.personBorder = "calculated", this.personBkg = "calculated", this.labelColor = "calculated", this.errorBkgColor = "#a44141", this.errorTextColor = "#ddd";
}
updateColors() {
this.secondBkg = oe(this.mainBkg, 16), this.lineColor = this.mainContrastColor, this.arrowheadColor = this.mainContrastColor, this.nodeBkg = this.mainBkg, this.nodeBorder = this.border1, this.clusterBkg = this.secondBkg, this.clusterBorder = this.border2, this.defaultLinkColor = this.lineColor, this.edgeLabelBackground = oe(this.labelBackground, 25), this.actorBorder = this.border1, this.actorBkg = this.mainBkg, this.actorTextColor = this.mainContrastColor, this.actorLineColor = this.mainContrastColor, this.signalColor = this.mainContrastColor, this.signalTextColor = this.mainContrastColor, this.labelBoxBkgColor = this.actorBkg, this.labelBoxBorderColor = this.actorBorder, this.labelTextColor = this.mainContrastColor, this.loopTextColor = this.mainContrastColor, this.noteBorderColor = this.secondaryBorderColor, this.noteBkgColor = this.secondBkg, this.noteTextColor = this.secondaryTextColor, this.activationBorderColor = this.border1, this.activationBkgColor = this.secondBkg, this.altSectionBkgColor = this.background, this.taskBkgColor = oe(this.mainBkg, 23), this.taskTextColor = this.darkTextColor, this.taskTextLightColor = this.mainContrastColor, this.taskTextOutsideColor = this.taskTextLightColor, this.gridColor = this.mainContrastColor, this.doneTaskBkgColor = this.mainContrastColor, this.taskTextDarkColor = this.darkTextColor, this.transitionColor = this.transitionColor || this.lineColor, this.transitionLabelColor = this.transitionLabelColor || this.textColor, this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor, this.stateBkg = this.stateBkg || this.mainBkg, this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg, this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor, this.altBackground = this.altBackground || "#555", this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg, this.compositeBorder = this.compositeBorder || this.nodeBorder, this.innerEndBackground = this.primaryBorderColor, this.specialStateColor = "#f4f4f4", this.errorBkgColor = this.errorBkgColor || this.tertiaryColor, this.errorTextColor = this.errorTextColor || this.tertiaryTextColor, this.fillType0 = this.primaryColor, this.fillType1 = this.secondaryColor, this.fillType2 = xt(this.primaryColor, { h: 64 }), this.fillType3 = xt(this.secondaryColor, { h: 64 }), this.fillType4 = xt(this.primaryColor, { h: -64 }), this.fillType5 = xt(this.secondaryColor, { h: -64 }), this.fillType6 = xt(this.primaryColor, { h: 128 }), this.fillType7 = xt(this.secondaryColor, { h: 128 }), this.cScale1 = this.cScale1 || "#0b0000", this.cScale2 = this.cScale2 || "#4d1037", this.cScale3 = this.cScale3 || "#3f5258", this.cScale4 = this.cScale4 || "#4f2f1b", this.cScale5 = this.cScale5 || "#6e0a0a", this.cScale6 = this.cScale6 || "#3b0048", this.cScale7 = this.cScale7 || "#995a01", this.cScale8 = this.cScale8 || "#154706", this.cScale9 = this.cScale9 || "#161722", this.cScale10 = this.cScale10 || "#00296f", this.cScale11 = this.cScale11 || "#01629c", this.cScale12 = this.cScale12 || "#010029", this.cScale0 = this.cScale0 || this.primaryColor, this.cScale1 = this.cScale1 || this.secondaryColor, this.cScale2 = this.cScale2 || this.tertiaryColor, this.cScale3 = this.cScale3 || xt(this.primaryColor, { h: 30 }), this.cScale4 = this.cScale4 || xt(this.primaryColor, { h: 60 }), this.cScale5 = this.cScale5 || xt(this.primaryColor, { h: 90 }), this.cScale6 = this.cScale6 || xt(this.primaryColor, { h: 120 }), this.cScale7 = this.cScale7 || xt(this.primaryColor, { h: 150 }), this.cScale8 = this.cScale8 || xt(this.primaryColor, { h: 210 }), this.cScale9 = this.cScale9 || xt(this.primaryColor, { h: 270 }), this.cScale10 = this.cScale10 || xt(this.primaryColor, { h: 300 }), this.cScale11 = this.cScale11 || xt(this.primaryColor, { h: 330 });
for (let e = 0; e < this.THEME_COLOR_LIMIT; e++)
this["cScaleInv" + e] = this["cScaleInv" + e] || Yt(this["cScale" + e]);
for (let e = 0; e < this.THEME_COLOR_LIMIT; e++)
this["cScalePeer" + e] = this["cScalePeer" + e] || oe(this["cScale" + e], 10);
this.scaleLabelColor = this.scaleLabelColor || (this.darkMode ? "black" : this.labelTextColor);
for (let e = 0; e < this.THEME_COLOR_LIMIT; e++)
this["cScaleLabel" + e] = this["cScaleLabel" + e] || this.scaleLabelColor;
for (let e = 0; e < this.THEME_COLOR_LIMIT; e++)
this["pie" + e] = this["cScale" + e];
this.pieTitleTextSize = this.pieTitleTextSize || "25px", this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor, this.pieSectionTextSize = this.pieSectionTextSize || "17px", this.pieSectionTextColor = this.pieSectionTextColor || this.textColor, this.pieLegendTextSize = this.pieLegendTextSize || "17px", this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor, this.pieStrokeColor = this.pieStrokeColor || "black", this.pieStrokeWidth = this.pieStrokeWidth || "2px", this.pieOpacity = this.pieOpacity || "0.7", this.classText = this.primaryTextColor, this.requirementBackground = this.requirementBackground || this.primaryColor, this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor, this.requirementBorderSize = this.requirementBorderSize || this.primaryBorderColor, this.requirementTextColor = this.requirementTextColor || this.primaryTextColor, this.relationColor = this.relationColor || this.lineColor, this.relationLabelBackground = this.relationLabelBackground || (this.darkMode ? me(this.secondaryColor, 30) : this.secondaryColor), this.relationLabelColor = this.relationLabelColor || this.actorTextColor, this.git0 = oe(this.secondaryColor, 20), this.git1 = oe(this.pie2 || this.secondaryColor, 20), this.git2 = oe(this.pie3 || this.tertiaryColor, 20), this.git3 = oe(this.pie4 || xt(this.primaryColor, { h: -30 }), 20), this.git4 = oe(this.pie5 || xt(this.primaryColor, { h: -60 }), 20), this.git5 = oe(this.pie6 || xt(this.primaryColor, { h: -90 }), 10), this.git6 = oe(this.pie7 || xt(this.primaryColor, { h: 60 }), 10), this.git7 = oe(this.pie8 || xt(this.primaryColor, { h: 120 }), 20), this.gitInv0 = this.gitInv0 || Yt(this.git0), this.gitInv1 = this.gitInv1 || Yt(this.git1), this.gitInv2 = this.gitInv2 || Yt(this.git2), this.gitInv3 = this.gitInv3 || Yt(this.git3), this.gitInv4 = this.gitInv4 || Yt(this.git4), this.gitInv5 = this.gitInv5 || Yt(this.git5), this.gitInv6 = this.gitInv6 || Yt(this.git6), this.gitInv7 = this.gitInv7 || Yt(this.git7), this.tagLabelColor = this.tagLabelColor || this.primaryTextColor, this.tagLabelBackground = this.tagLabelBackground || this.primaryColor, this.tagLabelBorder = this.tagBorder || this.primaryBorderColor, this.tagLabelFontSize = this.tagLabelFontSize || "10px", this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor, this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor, this.commitLabelFontSize = this.commitLabelFontSize || "10px", this.attributeBackgroundColorOdd = this.attributeBackgroundColorOdd || oe(this.background, 12), this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || oe(this.background, 2);
}
calculate(e) {
if (typeof e != "object") {
this.updateColors();
return;
}
const r = Object.keys(e);
r.forEach((n) => {
this[n] = e[n];
}), this.updateColors(), r.forEach((n) => {
this[n] = e[n];
});
}
}
const jG = (t) => {
const e = new GG();
return e.calculate(t), e;
};
class $G {
constructor() {
this.background = "#f4f4f4", this.primaryColor = "#ECECFF", this.secondaryColor = xt(this.primaryColor, { h: 120 }), this.secondaryColor = "#ffffde", this.tertiaryColor = xt(this.primaryColor, { h: -160 }), this.primaryBorderColor = en(this.primaryColor, this.darkMode), this.secondaryBorderColor = en(this.secondaryColor, this.darkMode), this.tertiaryBorderColor = en(this.tertiaryColor, this.darkMode), this.primaryTextColor = Yt(this.primaryColor), this.secondaryTextColor = Yt(this.secondaryColor), this.tertiaryTextColor = Yt(this.tertiaryColor), this.lineColor = Yt(this.background), this.textColor = Yt(this.background), this.background = "white", this.mainBkg = "#ECECFF", this.secondBkg = "#ffffde", this.lineColor = "#333333", this.border1 = "#9370DB", this.border2 = "#aaaa33", this.arrowheadColor = "#333333", this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif', this.fontSize = "16px", this.labelBackground = "#e8e8e8", this.textColor = "#333", this.THEME_COLOR_LIMIT = 12, this.nodeBkg = "calculated", this.nodeBorder = "calculated", this.clusterBkg = "calculated", this.clusterBorder = "calculated", this.defaultLinkColor = "calculated", this.titleColor = "calculated", this.edgeLabelBackground = "calculated", this.actorBorder = "calculated", this.actorBkg = "calculated", this.actorTextColor = "black", this.actorLineColor = "grey", this.signalColor = "calculated", this.signalTextColor = "calculated", this.labelBoxBkgColor = "calculated", this.labelBoxBorderColor = "calculated", this.labelTextColor = "calculated", this.loopTextColor = "calculated", this.noteBorderColor = "calculated", this.noteBkgColor = "#fff5ad", this.noteTextColor = "calculated", this.activationBorderColor = "#666", this.activationBkgColor = "#f4f4f4", this.sequenceNumberColor = "white", this.sectionBkgColor = "calculated", this.altSectionBkgColor = "calculated", this.sectionBkgColor2 = "calculated", this.excludeBkgColor = "#eeeeee", this.taskBorderColor = "calculated", this.taskBkgColor = "calculated", this.taskTextLightColor = "calculated", this.taskTextColor = this.taskTextLightColor, this.taskTextDarkColor = "calculated", this.taskTextOutsideColor = this.taskTextDarkColor, this.taskTextClickableColor = "calculated", this.activeTaskBorderColor = "calculated", this.activeTaskBkgColor = "calculated", this.gridColor = "calculated", this.doneTaskBkgColor = "calculated", this.doneTaskBorderColor = "calculated", this.critBorderColor = "calculated", this.critBkgColor = "calculated", this.todayLineColor = "calculated", this.sectionBkgColor = ac(102, 102, 255, 0.49), this.altSectionBkgColor = "white", this.sectionBkgColor2 = "#fff400", this.taskBorderColor = "#534fbc", this.taskBkgColor = "#8a90dd", this.taskTextLightColor = "white", this.taskTextColor = "calculated", this.taskTextDarkColor = "black", this.taskTextOutsideColor = "calculated", this.taskTextClickableColor = "#003163", this.activeTaskBorderColor = "#534fbc", this.activeTaskBkgColor = "#bfc7ff", this.gridColor = "lightgrey", this.doneTaskBkgColor = "lightgrey", this.doneTaskBorderColor = "grey", this.critBorderColor = "#ff8888", this.critBkgColor = "red", this.todayLineColor = "red", this.personBorder = "calculated", this.personBkg = "calculated", this.labelColor = "black", this.errorBkgColor = "#552222", this.errorTextColor = "#552222", this.updateColors();
}
updateColors() {
this.cScale0 = this.cScale0 || this.primaryColor, this.cScale1 = this.cScale1 || this.secondaryColor, this.cScale2 = this.cScale2 || this.tertiaryColor, this.cScale3 = this.cScale3 || xt(this.primaryColor, { h: 30 }), this.cScale4 = this.cScale4 || xt(this.primaryColor, { h: 60 }), this.cScale5 = this.cScale5 || xt(this.primaryColor, { h: 90 }), this.cScale6 = this.cScale6 || xt(this.primaryColor, { h: 120 }), this.cScale7 = this.cScale7 || xt(this.primaryColor, { h: 150 }), this.cScale8 = this.cScale8 || xt(this.primaryColor, { h: 210 }), this.cScale9 = this.cScale9 || xt(this.primaryColor, { h: 270 }), this.cScale10 = this.cScale10 || xt(this.primaryColor, { h: 300 }), this.cScale11 = this.cScale11 || xt(this.primaryColor, { h: 330 }), this["cScalePeer" + 1] = this["cScalePeer" + 1] || me(this.secondaryColor, 45), this["cScalePeer" + 2] = this["cScalePeer" + 2] || me(this.tertiaryColor, 40);
for (let e = 0; e < this.THEME_COLOR_LIMIT; e++)
this["cScale" + e] = me(this["cScale" + e], 10), this["cScalePeer" + e] = this["cScalePeer" + e] || me(this["cScale" + e], 25);
for (let e = 0; e < this.THEME_COLOR_LIMIT; e++)
this["cScaleInv" + e] = this["cScaleInv" + e] || xt(this["cScale" + e], { h: 180 });
if (this.scaleLabelColor = this.scaleLabelColor !== "calculated" && this.scaleLabelColor ? this.scaleLabelColor : this.labelTextColor, this.labelTextColor !== "calculated") {
this.cScaleLabel0 = this.cScaleLabel0 || Yt(this.labelTextColor), this.cScaleLabel3 = this.cScaleLabel3 || Yt(this.labelTextColor);
for (let e = 0; e < this.THEME_COLOR_LIMIT; e++)
this["cScaleLabel" + e] = this["cScaleLabel" + e] || this.labelTextColor;
}
this.nodeBkg = this.mainBkg, this.nodeBorder = this.border1, this.clusterBkg = this.secondBkg, this.clusterBorder = this.border2, this.defaultLinkColor = this.lineColor, this.titleColor = this.textColor, this.edgeLabelBackground = this.labelBackground, this.actorBorder = oe(this.border1, 23), this.actorBkg = this.mainBkg, this.labelBoxBkgColor = this.actorBkg, this.signalColor = this.textColor, this.signalTextColor = this.textColor, this.labelBoxBorderColor = this.actorBorder, this.labelTextColor = this.actorTextColor, this.loopTextColor = this.actorTextColor, this.noteBorderColor = this.border2, this.noteTextColor = this.actorTextColor, this.taskTextColor = this.taskTextLightColor, this.taskTextOutsideColor = this.taskTextDarkColor, this.transitionColor = this.transitionColor || this.lineColor, this.transitionLabelColor = this.transitionLabelColor || this.textColor, this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor, this.stateBkg = this.stateBkg || this.mainBkg, this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg, this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor, this.altBackground = this.altBackground || "#f0f0f0", this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg, this.compositeBorder = this.compositeBorder || this.nodeBorder, this.innerEndBackground = this.nodeBorder, this.specialStateColor = this.lineColor, this.errorBkgColor = this.errorBkgColor || this.tertiaryColor, this.errorTextColor = this.errorTextColor || this.tertiaryTextColor, this.transitionColor = this.transitionColor || this.lineColor, this.classText = this.primaryTextColor, this.fillType0 = this.primaryColor, this.fillType1 = this.secondaryColor, this.fillType2 = xt(this.primaryColor, { h: 64 }), this.fillType3 = xt(this.secondaryColor, { h: 64 }), this.fillType4 = xt(this.primaryColor, { h: -64 }), this.fillType5 = xt(this.secondaryColor, { h: -64 }), this.fillType6 = xt(this.primaryColor, { h: 128 }), this.fillType7 = xt(this.secondaryColor, { h: 128 }), this.pie1 = this.pie1 || this.primaryColor, this.pie2 = this.pie2 || this.secondaryColor, this.pie3 = this.pie3 || xt(this.tertiaryColor, { l: -40 }), this.pie4 = this.pie4 || xt(this.primaryColor, { l: -10 }), this.pie5 = this.pie5 || xt(this.secondaryColor, { l: -30 }), this.pie6 = this.pie6 || xt(this.tertiaryColor, { l: -20 }), this.pie7 = this.pie7 || xt(this.primaryColor, { h: 60, l: -20 }), this.pie8 = this.pie8 || xt(this.primaryColor, { h: -60, l: -40 }), this.pie9 = this.pie9 || xt(this.primaryColor, { h: 120, l: -40 }), this.pie10 = this.pie10 || xt(this.primaryColor, { h: 60, l: -40 }), this.pie11 = this.pie11 || xt(this.primaryColor, { h: -90, l: -40 }), this.pie12 = this.pie12 || xt(this.primaryColor, { h: 120, l: -30 }), this.pieTitleTextSize = this.pieTitleTextSize || "25px", this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor, this.pieSectionTextSize = this.pieSectionTextSize || "17px", this.pieSectionTextColor = this.pieSectionTextColor || this.textColor, this.pieLegendTextSize = this.pieLegendTextSize || "17px", this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor, this.pieStrokeColor = this.pieStrokeColor || "black", this.pieStrokeWidth = this.pieStrokeWidth || "2px", this.pieOpacity = this.pieOpacity || "0.7", this.requirementBackground = this.requirementBackground || this.primaryColor, this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor, this.requirementBorderSize = this.requirementBorderSize || this.primaryBorderColor, this.requirementTextColor = this.requirementTextColor || this.primaryTextColor, this.relationColor = this.relationColor || this.lineColor, this.relationLabelBackground = this.relationLabelBackground || this.labelBackground, this.relationLabelColor = this.relationLabelColor || this.actorTextColor, this.git0 = this.git0 || this.primaryColor, this.git1 = this.git1 || this.secondaryColor, this.git2 = this.git2 || this.tertiaryColor, this.git3 = this.git3 || xt(this.primaryColor, { h: -30 }), this.git4 = this.git4 || xt(this.primaryColor, { h: -60 }), this.git5 = this.git5 || xt(this.primaryColor, { h: -90 }), this.git6 = this.git6 || xt(this.primaryColor, { h: 60 }), this.git7 = this.git7 || xt(this.primaryColor, { h: 120 }), this.darkMode ? (this.git0 = oe(this.git0, 25), this.git1 = oe(this.git1, 25), this.git2 = oe(this.git2, 25), this.git3 = oe(this.git3, 25), this.git4 = oe(this.git4, 25), this.git5 = oe(this.git5, 25), this.git6 = oe(this.git6, 25), this.git7 = oe(this.git7, 25)) : (this.git0 = me(this.git0, 25), this.git1 = me(this.git1, 25), this.git2 = me(this.git2, 25), this.git3 = me(this.git3, 25), this.git4 = me(this.git4, 25), this.git5 = me(this.git5, 25), this.git6 = me(this.git6, 25), this.git7 = me(this.git7, 25)), this.gitInv0 = this.gitInv0 || me(Yt(this.git0), 25), this.gitInv1 = this.gitInv1 || Yt(this.git1), this.gitInv2 = this.gitInv2 || Yt(this.git2), this.gitInv3 = this.gitInv3 || Yt(this.git3), this.gitInv4 = this.gitInv4 || Yt(this.git4), this.gitInv5 = this.gitInv5 || Yt(this.git5), this.gitInv6 = this.gitInv6 || Yt(this.git6), this.gitInv7 = this.gitInv7 || Yt(this.git7), this.gitBranchLabel0 = this.gitBranchLabel0 || Yt(this.labelTextColor), this.gitBranchLabel1 = this.gitBranchLabel1 || this.labelTextColor, this.gitBranchLabel2 = this.gitBranchLabel2 || this.labelTextColor, this.gitBranchLabel3 = this.gitBranchLabel3 || Yt(this.labelTextColor), this.gitBranchLabel4 = this.gitBranchLabel4 || this.labelTextColor, this.gitBranchLabel5 = this.gitBranchLabel5 || this.labelTextColor, this.gitBranchLabel6 = this.gitBranchLabel6 || this.labelTextColor, this.gitBranchLabel7 = this.gitBranchLabel7 || this.labelTextColor, this.tagLabelColor = this.tagLabelColor || this.primaryTextColor, this.tagLabelBackground = this.tagLabelBackground || this.primaryColor, this.tagLabelBorder = this.tagBorder || this.primaryBorderColor, this.tagLabelFontSize = this.tagLabelFontSize || "10px", this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor, this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor, this.commitLabelFontSize = this.commitLabelFontSize || "10px", this.attributeBackgroundColorOdd = this.attributeBackgroundColorOdd || j1, this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || $1;
}
calculate(e) {
if (typeof e != "object") {
this.updateColors();
return;
}
const r = Object.keys(e);
r.forEach((n) => {
this[n] = e[n];
}), this.updateColors(), r.forEach((n) => {
this[n] = e[n];
});
}
}
const XG = (t) => {
const e = new $G();
return e.calculate(t), e;
};
class KG {
constructor() {
this.background = "#f4f4f4", this.primaryColor = "#cde498", this.secondaryColor = "#cdffb2", this.background = "white", this.mainBkg = "#cde498", this.secondBkg = "#cdffb2", this.lineColor = "green", this.border1 = "#13540c", this.border2 = "#6eaa49", this.arrowheadColor = "green", this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif', this.fontSize = "16px", this.tertiaryColor = oe("#cde498", 10), this.primaryBorderColor = en(this.primaryColor, this.darkMode), this.secondaryBorderColor = en(this.secondaryColor, this.darkMode), this.tertiaryBorderColor = en(this.tertiaryColor, this.darkMode), this.primaryTextColor = Yt(this.primaryColor), this.secondaryTextColor = Yt(this.secondaryColor), this.tertiaryTextColor = Yt(this.primaryColor), this.lineColor = Yt(this.background), this.textColor = Yt(this.background), this.THEME_COLOR_LIMIT = 12, this.nodeBkg = "calculated", this.nodeBorder = "calculated", this.clusterBkg = "calculated", this.clusterBorder = "calculated", this.defaultLinkColor = "calculated", this.titleColor = "#333", this.edgeLabelBackground = "#e8e8e8", this.actorBorder = "calculated", this.actorBkg = "calculated", this.actorTextColor = "black", this.actorLineColor = "grey", this.signalColor = "#333", this.signalTextColor = "#333", this.labelBoxBkgColor = "calculated", this.labelBoxBorderColor = "#326932", this.labelTextColor = "calculated", this.loopTextColor = "calculated", this.noteBorderColor = "calculated", this.noteBkgColor = "#fff5ad", this.noteTextColor = "calculated", this.activationBorderColor = "#666", this.activationBkgColor = "#f4f4f4", this.sequenceNumberColor = "white", this.sectionBkgColor = "#6eaa49", this.altSectionBkgColor = "white", this.sectionBkgColor2 = "#6eaa49", this.excludeBkgColor = "#eeeeee", this.taskBorderColor = "calculated", this.taskBkgColor = "#487e3a", this.taskTextLightColor = "white", this.taskTextColor = "calculated", this.taskTextDarkColor = "black", this.taskTextOutsideColor = "calculated", this.taskTextClickableColor = "#003163", this.activeTaskBorderColor = "calculated", this.activeTaskBkgColor = "calculated", this.gridColor = "lightgrey", this.doneTaskBkgColor = "lightgrey", this.doneTaskBorderColor = "grey", this.critBorderColor = "#ff8888", this.critBkgColor = "red", this.todayLineColor = "red", this.personBorder = "calculated", this.personBkg = "calculated", this.labelColor = "black", this.errorBkgColor = "#552222", this.errorTextColor = "#552222";
}
updateColors() {
this.cScale0 = this.cScale0 || this.primaryColor, this.cScale1 = this.cScale1 || this.secondaryColor, this.cScale2 = this.cScale2 || this.tertiaryColor, this.cScale3 = this.cScale3 || xt(this.primaryColor, { h: 30 }), this.cScale4 = this.cScale4 || xt(this.primaryColor, { h: 60 }), this.cScale5 = this.cScale5 || xt(this.primaryColor, { h: 90 }), this.cScale6 = this.cScale6 || xt(this.primaryColor, { h: 120 }), this.cScale7 = this.cScale7 || xt(this.primaryColor, { h: 150 }), this.cScale8 = this.cScale8 || xt(this.primaryColor, { h: 210 }), this.cScale9 = this.cScale9 || xt(this.primaryColor, { h: 270 }), this.cScale10 = this.cScale10 || xt(this.primaryColor, { h: 300 }), this.cScale11 = this.cScale11 || xt(this.primaryColor, { h: 330 }), this["cScalePeer" + 1] = this["cScalePeer" + 1] || me(this.secondaryColor, 45), this["cScalePeer" + 2] = this["cScalePeer" + 2] || me(this.tertiaryColor, 40);
for (let e = 0; e < this.THEME_COLOR_LIMIT; e++)
this["cScale" + e] = me(this["cScale" + e], 10), this["cScalePeer" + e] = this["cScalePeer" + e] || me(this["cScale" + e], 25);
for (let e = 0; e < this.THEME_COLOR_LIMIT; e++)
this["cScaleInv" + e] = this["cScaleInv" + e] || xt(this["cScale" + e], { h: 180 });
this.scaleLabelColor = this.scaleLabelColor !== "calculated" && this.scaleLabelColor ? this.scaleLabelColor : this.labelTextColor;
for (let e = 0; e < this.THEME_COLOR_LIMIT; e++)
this["cScaleLabel" + e] = this["cScaleLabel" + e] || this.scaleLabelColor;
this.nodeBkg = this.mainBkg, this.nodeBorder = this.border1, this.clusterBkg = this.secondBkg, this.clusterBorder = this.border2, this.defaultLinkColor = this.lineColor, this.actorBorder = me(this.mainBkg, 20), this.actorBkg = this.mainBkg, this.labelBoxBkgColor = this.actorBkg, this.labelTextColor = this.actorTextColor, this.loopTextColor = this.actorTextColor, this.noteBorderColor = this.border2, this.noteTextColor = this.actorTextColor, this.taskBorderColor = this.border1, this.taskTextColor = this.taskTextLightColor, this.taskTextOutsideColor = this.taskTextDarkColor, this.activeTaskBorderColor = this.taskBorderColor, this.activeTaskBkgColor = this.mainBkg, this.transitionColor = this.transitionColor || this.lineColor, this.transitionLabelColor = this.transitionLabelColor || this.textColor, this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor, this.stateBkg = this.stateBkg || this.mainBkg, this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg, this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor, this.altBackground = this.altBackground || "#f0f0f0", this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg, this.compositeBorder = this.compositeBorder || this.nodeBorder, this.innerEndBackground = this.primaryBorderColor, this.specialStateColor = this.lineColor, this.errorBkgColor = this.errorBkgColor || this.tertiaryColor, this.errorTextColor = this.errorTextColor || this.tertiaryTextColor, this.transitionColor = this.transitionColor || this.lineColor, this.classText = this.primaryTextColor, this.fillType0 = this.primaryColor, this.fillType1 = this.secondaryColor, this.fillType2 = xt(this.primaryColor, { h: 64 }), this.fillType3 = xt(this.secondaryColor, { h: 64 }), this.fillType4 = xt(this.primaryColor, { h: -64 }), this.fillType5 = xt(this.secondaryColor, { h: -64 }), this.fillType6 = xt(this.primaryColor, { h: 128 }), this.fillType7 = xt(this.secondaryColor, { h: 128 }), this.pie1 = this.pie1 || this.primaryColor, this.pie2 = this.pie2 || this.secondaryColor, this.pie3 = this.pie3 || this.tertiaryColor, this.pie4 = this.pie4 || xt(this.primaryColor, { l: -30 }), this.pie5 = this.pie5 || xt(this.secondaryColor, { l: -30 }), this.pie6 = this.pie6 || xt(this.tertiaryColor, { h: 40, l: -40 }), this.pie7 = this.pie7 || xt(this.primaryColor, { h: 60, l: -10 }), this.pie8 = this.pie8 || xt(this.primaryColor, { h: -60, l: -10 }), this.pie9 = this.pie9 || xt(this.primaryColor, { h: 120, l: 0 }), this.pie10 = this.pie10 || xt(this.primaryColor, { h: 60, l: -50 }), this.pie11 = this.pie11 || xt(this.primaryColor, { h: -60, l: -50 }), this.pie12 = this.pie12 || xt(this.primaryColor, { h: 120, l: -50 }), this.pieTitleTextSize = this.pieTitleTextSize || "25px", this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor, this.pieSectionTextSize = this.pieSectionTextSize || "17px", this.pieSectionTextColor = this.pieSectionTextColor || this.textColor, this.pieLegendTextSize = this.pieLegendTextSize || "17px", this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor, this.pieStrokeColor = this.pieStrokeColor || "black", this.pieStrokeWidth = this.pieStrokeWidth || "2px", this.pieOpacity = this.pieOpacity || "0.7", this.requirementBackground = this.requirementBackground || this.primaryColor, this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor, this.requirementBorderSize = this.requirementBorderSize || this.primaryBorderColor, this.requirementTextColor = this.requirementTextColor || this.primaryTextColor, this.relationColor = this.relationColor || this.lineColor, this.relationLabelBackground = this.relationLabelBackground || this.edgeLabelBackground, this.relationLabelColor = this.relationLabelColor || this.actorTextColor, this.git0 = this.git0 || this.primaryColor, this.git1 = this.git1 || this.secondaryColor, this.git2 = this.git2 || this.tertiaryColor, this.git3 = this.git3 || xt(this.primaryColor, { h: -30 }), this.git4 = this.git4 || xt(this.primaryColor, { h: -60 }), this.git5 = this.git5 || xt(this.primaryColor, { h: -90 }), this.git6 = this.git6 || xt(this.primaryColor, { h: 60 }), this.git7 = this.git7 || xt(this.primaryColor, { h: 120 }), this.darkMode ? (this.git0 = oe(this.git0, 25), this.git1 = oe(this.git1, 25), this.git2 = oe(this.git2, 25), this.git3 = oe(this.git3, 25), this.git4 = oe(this.git4, 25), this.git5 = oe(this.git5, 25), this.git6 = oe(this.git6, 25), this.git7 = oe(this.git7, 25)) : (this.git0 = me(this.git0, 25), this.git1 = me(this.git1, 25), this.git2 = me(this.git2, 25), this.git3 = me(this.git3, 25), this.git4 = me(this.git4, 25), this.git5 = me(this.git5, 25), this.git6 = me(this.git6, 25), this.git7 = me(this.git7, 25)), this.gitInv0 = this.gitInv0 || Yt(this.git0), this.gitInv1 = this.gitInv1 || Yt(this.git1), this.gitInv2 = this.gitInv2 || Yt(this.git2), this.gitInv3 = this.gitInv3 || Yt(this.git3), this.gitInv4 = this.gitInv4 || Yt(this.git4), this.gitInv5 = this.gitInv5 || Yt(this.git5), this.gitInv6 = this.gitInv6 || Yt(this.git6), this.gitInv7 = this.gitInv7 || Yt(this.git7), this.tagLabelColor = this.tagLabelColor || this.primaryTextColor, this.tagLabelBackground = this.tagLabelBackground || this.primaryColor, this.tagLabelBorder = this.tagBorder || this.primaryBorderColor, this.tagLabelFontSize = this.tagLabelFontSize || "10px", this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor, this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor, this.commitLabelFontSize = this.commitLabelFontSize || "10px", this.attributeBackgroundColorOdd = this.attributeBackgroundColorOdd || j1, this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || $1;
}
calculate(e) {
if (typeof e != "object") {
this.updateColors();
return;
}
const r = Object.keys(e);
r.forEach((n) => {
this[n] = e[n];
}), this.updateColors(), r.forEach((n) => {
this[n] = e[n];
});
}
}
const ZG = (t) => {
const e = new KG();
return e.calculate(t), e;
};
class QG {
constructor() {
this.primaryColor = "#eee", this.contrast = "#707070", this.secondaryColor = oe(this.contrast, 55), this.background = "#ffffff", this.tertiaryColor = xt(this.primaryColor, { h: -160 }), this.primaryBorderColor = en(this.primaryColor, this.darkMode), this.secondaryBorderColor = en(this.secondaryColor, this.darkMode), this.tertiaryBorderColor = en(this.tertiaryColor, this.darkMode), this.primaryTextColor = Yt(this.primaryColor), this.secondaryTextColor = Yt(this.secondaryColor), this.tertiaryTextColor = Yt(this.tertiaryColor), this.lineColor = Yt(this.background), this.textColor = Yt(this.background), this.mainBkg = "#eee", this.secondBkg = "calculated", this.lineColor = "#666", this.border1 = "#999", this.border2 = "calculated", this.note = "#ffa", this.text = "#333", this.critical = "#d42", this.done = "#bbb", this.arrowheadColor = "#333333", this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif', this.fontSize = "16px", this.THEME_COLOR_LIMIT = 12, this.nodeBkg = "calculated", this.nodeBorder = "calculated", this.clusterBkg = "calculated", this.clusterBorder = "calculated", this.defaultLinkColor = "calculated", this.titleColor = "calculated", this.edgeLabelBackground = "white", this.actorBorder = "calculated", this.actorBkg = "calculated", this.actorTextColor = "calculated", this.actorLineColor = "calculated", this.signalColor = "calculated", this.signalTextColor = "calculated", this.labelBoxBkgColor = "calculated", this.labelBoxBorderColor = "calculated", this.labelTextColor = "calculated", this.loopTextColor = "calculated", this.noteBorderColor = "calculated", this.noteBkgColor = "calculated", this.noteTextColor = "calculated", this.activationBorderColor = "#666", this.activationBkgColor = "#f4f4f4", this.sequenceNumberColor = "white", this.sectionBkgColor = "calculated", this.altSectionBkgColor = "white", this.sectionBkgColor2 = "calculated", this.excludeBkgColor = "#eeeeee", this.taskBorderColor = "calculated", this.taskBkgColor = "calculated", this.taskTextLightColor = "white", this.taskTextColor = "calculated", this.taskTextDarkColor = "calculated", this.taskTextOutsideColor = "calculated", this.taskTextClickableColor = "#003163", this.activeTaskBorderColor = "calculated", this.activeTaskBkgColor = "calculated", this.gridColor = "calculated", this.doneTaskBkgColor = "calculated", this.doneTaskBorderColor = "calculated", this.critBkgColor = "calculated", this.critBorderColor = "calculated", this.todayLineColor = "calculated", this.personBorder = "calculated", this.personBkg = "calculated", this.labelColor = "black", this.errorBkgColor = "#552222", this.errorTextColor = "#552222";
}
updateColors() {
this.secondBkg = oe(this.contrast, 55), this.border2 = this.contrast, this.cScale0 = this.cScale0 || "#555", this.cScale1 = this.cScale1 || "#F4F4F4", this.cScale2 = this.cScale2 || "#555", this.cScale3 = this.cScale3 || "#BBB", this.cScale4 = this.cScale4 || "#777", this.cScale5 = this.cScale5 || "#999", this.cScale6 = this.cScale6 || "#DDD", this.cScale7 = this.cScale7 || "#FFF", this.cScale8 = this.cScale8 || "#DDD", this.cScale9 = this.cScale9 || "#BBB", this.cScale10 = this.cScale10 || "#999", this.cScale11 = this.cScale11 || "#777";
for (let e = 0; e < this.THEME_COLOR_LIMIT; e++)
this["cScaleInv" + e] = this["cScaleInv" + e] || Yt(this["cScale" + e]);
for (let e = 0; e < this.THEME_COLOR_LIMIT; e++)
this.darkMode ? this["cScalePeer" + e] = this["cScalePeer" + e] || oe(this["cScale" + e], 10) : this["cScalePeer" + e] = this["cScalePeer" + e] || me(this["cScale" + e], 10);
this.scaleLabelColor = this.scaleLabelColor || (this.darkMode ? "black" : this.labelTextColor), this.cScaleLabel0 = this.cScaleLabel0 || this.cScale1, this.cScaleLabel2 = this.cScaleLabel2 || this.cScale1;
for (let e = 0; e < this.THEME_COLOR_LIMIT; e++)
this["cScaleLabel" + e] = this["cScaleLabel" + e] || this.scaleLabelColor;
this.nodeBkg = this.mainBkg, this.nodeBorder = this.border1, this.clusterBkg = this.secondBkg, this.clusterBorder = this.border2, this.defaultLinkColor = this.lineColor, this.titleColor = this.text, this.actorBorder = oe(this.border1, 23), this.actorBkg = this.mainBkg, this.actorTextColor = this.text, this.actorLineColor = this.lineColor, this.signalColor = this.text, this.signalTextColor = this.text, this.labelBoxBkgColor = this.actorBkg, this.labelBoxBorderColor = this.actorBorder, this.labelTextColor = this.text, this.loopTextColor = this.text, this.noteBorderColor = "#999", this.noteBkgColor = "#666", this.noteTextColor = "#fff", this.sectionBkgColor = oe(this.contrast, 30), this.sectionBkgColor2 = oe(this.contrast, 30), this.taskBorderColor = me(this.contrast, 10), this.taskBkgColor = this.contrast, this.taskTextColor = this.taskTextLightColor, this.taskTextDarkColor = this.text, this.taskTextOutsideColor = this.taskTextDarkColor, this.activeTaskBorderColor = this.taskBorderColor, this.activeTaskBkgColor = this.mainBkg, this.gridColor = oe(this.border1, 30), this.doneTaskBkgColor = this.done, this.doneTaskBorderColor = this.lineColor, this.critBkgColor = this.critical, this.critBorderColor = me(this.critBkgColor, 10), this.todayLineColor = this.critBkgColor, this.transitionColor = this.transitionColor || "#000", this.transitionLabelColor = this.transitionLabelColor || this.textColor, this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor, this.stateBkg = this.stateBkg || this.mainBkg, this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg, this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor, this.altBackground = this.altBackground || "#f4f4f4", this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg, this.stateBorder = this.stateBorder || "#000", this.innerEndBackground = this.primaryBorderColor, this.specialStateColor = "#222", this.errorBkgColor = this.errorBkgColor || this.tertiaryColor, this.errorTextColor = this.errorTextColor || this.tertiaryTextColor, this.classText = this.primaryTextColor, this.fillType0 = this.primaryColor, this.fillType1 = this.secondaryColor, this.fillType2 = xt(this.primaryColor, { h: 64 }), this.fillType3 = xt(this.secondaryColor, { h: 64 }), this.fillType4 = xt(this.primaryColor, { h: -64 }), this.fillType5 = xt(this.secondaryColor, { h: -64 }), this.fillType6 = xt(this.primaryColor, { h: 128 }), this.fillType7 = xt(this.secondaryColor, { h: 128 });
for (let e = 0; e < this.THEME_COLOR_LIMIT; e++)
this["pie" + e] = this["cScale" + e];
this.pie12 = this.pie0, this.pieTitleTextSize = this.pieTitleTextSize || "25px", this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor, this.pieSectionTextSize = this.pieSectionTextSize || "17px", this.pieSectionTextColor = this.pieSectionTextColor || this.textColor, this.pieLegendTextSize = this.pieLegendTextSize || "17px", this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor, this.pieStrokeColor = this.pieStrokeColor || "black", this.pieStrokeWidth = this.pieStrokeWidth || "2px", this.pieOpacity = this.pieOpacity || "0.7", this.requirementBackground = this.requirementBackground || this.primaryColor, this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor, this.requirementBorderSize = this.requirementBorderSize || this.primaryBorderColor, this.requirementTextColor = this.requirementTextColor || this.primaryTextColor, this.relationColor = this.relationColor || this.lineColor, this.relationLabelBackground = this.relationLabelBackground || this.edgeLabelBackground, this.relationLabelColor = this.relationLabelColor || this.actorTextColor, this.git0 = me(this.pie1, 25) || this.primaryColor, this.git1 = this.pie2 || this.secondaryColor, this.git2 = this.pie3 || this.tertiaryColor, this.git3 = this.pie4 || xt(this.primaryColor, { h: -30 }), this.git4 = this.pie5 || xt(this.primaryColor, { h: -60 }), this.git5 = this.pie6 || xt(this.primaryColor, { h: -90 }), this.git6 = this.pie7 || xt(this.primaryColor, { h: 60 }), this.git7 = this.pie8 || xt(this.primaryColor, { h: 120 }), this.gitInv0 = this.gitInv0 || Yt(this.git0), this.gitInv1 = this.gitInv1 || Yt(this.git1), this.gitInv2 = this.gitInv2 || Yt(this.git2), this.gitInv3 = this.gitInv3 || Yt(this.git3), this.gitInv4 = this.gitInv4 || Yt(this.git4), this.gitInv5 = this.gitInv5 || Yt(this.git5), this.gitInv6 = this.gitInv6 || Yt(this.git6), this.gitInv7 = this.gitInv7 || Yt(this.git7), this.branchLabelColor = this.branchLabelColor || this.labelTextColor, this.gitBranchLabel0 = this.branchLabelColor, this.gitBranchLabel1 = "white", this.gitBranchLabel2 = this.branchLabelColor, this.gitBranchLabel3 = "white", this.gitBranchLabel4 = this.branchLabelColor, this.gitBranchLabel5 = this.branchLabelColor, this.gitBranchLabel6 = this.branchLabelColor, this.gitBranchLabel7 = this.branchLabelColor, this.tagLabelColor = this.tagLabelColor || this.primaryTextColor, this.tagLabelBackground = this.tagLabelBackground || this.primaryColor, this.tagLabelBorder = this.tagBorder || this.primaryBorderColor, this.tagLabelFontSize = this.tagLabelFontSize || "10px", this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor, this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor, this.commitLabelFontSize = this.commitLabelFontSize || "10px", this.attributeBackgroundColorOdd = this.attributeBackgroundColorOdd || j1, this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || $1;
}
calculate(e) {
if (typeof e != "object") {
this.updateColors();
return;
}
const r = Object.keys(e);
r.forEach((n) => {
this[n] = e[n];
}), this.updateColors(), r.forEach((n) => {
this[n] = e[n];
});
}
}
const JG = (t) => {
const e = new QG();
return e.calculate(t), e;
}, pa = {
base: {
getThemeVariables: HG
},
dark: {
getThemeVariables: jG
},
default: {
getThemeVariables: XG
},
forest: {
getThemeVariables: ZG
},
neutral: {
getThemeVariables: JG
}
}, za = {
theme: "default",
themeVariables: pa.default.getThemeVariables(),
themeCSS: void 0,
maxTextSize: 5e4,
darkMode: !1,
fontFamily: '"trebuchet ms", verdana, arial, sans-serif;',
logLevel: 5,
securityLevel: "strict",
startOnLoad: !0,
arrowMarkerAbsolute: !1,
secure: ["secure", "securityLevel", "startOnLoad", "maxTextSize"],
lazyLoadedDiagrams: [],
deterministicIds: !1,
deterministicIDSeed: void 0,
flowchart: {
diagramPadding: 8,
htmlLabels: !0,
nodeSpacing: 50,
rankSpacing: 50,
curve: "basis",
padding: 15,
useMaxWidth: !0,
defaultRenderer: "dagre-wrapper"
},
sequence: {
hideUnusedParticipants: !1,
activationWidth: 10,
diagramMarginX: 50,
diagramMarginY: 10,
actorMargin: 50,
width: 150,
height: 65,
boxMargin: 10,
boxTextMargin: 5,
noteMargin: 10,
messageMargin: 35,
messageAlign: "center",
mirrorActors: !0,
forceMenus: !1,
bottomMarginAdj: 1,
useMaxWidth: !0,
rightAngles: !1,
showSequenceNumbers: !1,
actorFontSize: 14,
actorFontFamily: '"Open Sans", sans-serif',
actorFontWeight: 400,
noteFontSize: 14,
noteFontFamily: '"trebuchet ms", verdana, arial, sans-serif',
noteFontWeight: 400,
noteAlign: "center",
messageFontSize: 16,
messageFontFamily: '"trebuchet ms", verdana, arial, sans-serif',
messageFontWeight: 400,
wrap: !1,
wrapPadding: 10,
labelBoxWidth: 50,
labelBoxHeight: 20,
messageFont: function() {
return {
fontFamily: this.messageFontFamily,
fontSize: this.messageFontSize,
fontWeight: this.messageFontWeight
};
},
noteFont: function() {
return {
fontFamily: this.noteFontFamily,
fontSize: this.noteFontSize,
fontWeight: this.noteFontWeight
};
},
actorFont: function() {
return {
fontFamily: this.actorFontFamily,
fontSize: this.actorFontSize,
fontWeight: this.actorFontWeight
};
}
},
gantt: {
titleTopMargin: 25,
barHeight: 20,
barGap: 4,
topPadding: 50,
rightPadding: 75,
leftPadding: 75,
gridLineStartPadding: 35,
fontSize: 11,
sectionFontSize: 11,
numberSectionStyles: 4,
axisFormat: "%Y-%m-%d",
useMaxWidth: !0,
topAxis: !1,
useWidth: void 0
},
journey: {
diagramMarginX: 50,
diagramMarginY: 10,
leftMargin: 150,
width: 150,
height: 50,
boxMargin: 10,
boxTextMargin: 5,
noteMargin: 10,
messageMargin: 35,
messageAlign: "center",
bottomMarginAdj: 1,
useMaxWidth: !0,
rightAngles: !1,
taskFontSize: 14,
taskFontFamily: '"Open Sans", sans-serif',
taskMargin: 50,
activationWidth: 10,
textPlacement: "fo",
actorColours: ["#8FBC8F", "#7CFC00", "#00FFFF", "#20B2AA", "#B0E0E6", "#FFFFE0"],
sectionFills: ["#191970", "#8B008B", "#4B0082", "#2F4F4F", "#800000", "#8B4513", "#00008B"],
sectionColours: ["#fff"]
},
class: {
arrowMarkerAbsolute: !1,
dividerMargin: 10,
padding: 5,
textHeight: 10,
useMaxWidth: !0,
defaultRenderer: "dagre-wrapper"
},
state: {
dividerMargin: 10,
sizeUnit: 5,
padding: 8,
textHeight: 10,
titleShift: -15,
noteMargin: 10,
forkWidth: 70,
forkHeight: 7,
miniPadding: 2,
fontSizeFactor: 5.02,
fontSize: 24,
labelHeight: 16,
edgeLengthFactor: "20",
compositTitleSize: 35,
radius: 5,
useMaxWidth: !0,
defaultRenderer: "dagre-wrapper"
},
er: {
diagramPadding: 20,
layoutDirection: "TB",
minEntityWidth: 100,
minEntityHeight: 75,
entityPadding: 15,
stroke: "gray",
fill: "honeydew",
fontSize: 12,
useMaxWidth: !0
},
pie: {
useWidth: void 0,
useMaxWidth: !0
},
requirement: {
useWidth: void 0,
useMaxWidth: !0,
rect_fill: "#f9f9f9",
text_color: "#333",
rect_border_size: "0.5px",
rect_border_color: "#bbb",
rect_min_width: 200,
rect_min_height: 200,
fontSize: 14,
rect_padding: 10,
line_height: 20
},
gitGraph: {
diagramPadding: 8,
nodeLabel: {
width: 75,
height: 100,
x: -25,
y: 0
},
mainBranchName: "main",
mainBranchOrder: 0,
showCommitLabel: !0,
showBranches: !0,
rotateCommitLabel: !0
},
c4: {
useWidth: void 0,
diagramMarginX: 50,
diagramMarginY: 10,
c4ShapeMargin: 50,
c4ShapePadding: 20,
width: 216,
height: 60,
boxMargin: 10,
useMaxWidth: !0,
c4ShapeInRow: 4,
nextLinePaddingX: 0,
c4BoundaryInRow: 2,
personFontSize: 14,
personFontFamily: '"Open Sans", sans-serif',
personFontWeight: "normal",
external_personFontSize: 14,
external_personFontFamily: '"Open Sans", sans-serif',
external_personFontWeight: "normal",
systemFontSize: 14,
systemFontFamily: '"Open Sans", sans-serif',
systemFontWeight: "normal",
external_systemFontSize: 14,
external_systemFontFamily: '"Open Sans", sans-serif',
external_systemFontWeight: "normal",
system_dbFontSize: 14,
system_dbFontFamily: '"Open Sans", sans-serif',
system_dbFontWeight: "normal",
external_system_dbFontSize: 14,
external_system_dbFontFamily: '"Open Sans", sans-serif',
external_system_dbFontWeight: "normal",
system_queueFontSize: 14,
system_queueFontFamily: '"Open Sans", sans-serif',
system_queueFontWeight: "normal",
external_system_queueFontSize: 14,
external_system_queueFontFamily: '"Open Sans", sans-serif',
external_system_queueFontWeight: "normal",
boundaryFontSize: 14,
boundaryFontFamily: '"Open Sans", sans-serif',
boundaryFontWeight: "normal",
messageFontSize: 12,
messageFontFamily: '"Open Sans", sans-serif',
messageFontWeight: "normal",
containerFontSize: 14,
containerFontFamily: '"Open Sans", sans-serif',
containerFontWeight: "normal",
external_containerFontSize: 14,
external_containerFontFamily: '"Open Sans", sans-serif',
external_containerFontWeight: "normal",
container_dbFontSize: 14,
container_dbFontFamily: '"Open Sans", sans-serif',
container_dbFontWeight: "normal",
external_container_dbFontSize: 14,
external_container_dbFontFamily: '"Open Sans", sans-serif',
external_container_dbFontWeight: "normal",
container_queueFontSize: 14,
container_queueFontFamily: '"Open Sans", sans-serif',
container_queueFontWeight: "normal",
external_container_queueFontSize: 14,
external_container_queueFontFamily: '"Open Sans", sans-serif',
external_container_queueFontWeight: "normal",
componentFontSize: 14,
componentFontFamily: '"Open Sans", sans-serif',
componentFontWeight: "normal",
external_componentFontSize: 14,
external_componentFontFamily: '"Open Sans", sans-serif',
external_componentFontWeight: "normal",
component_dbFontSize: 14,
component_dbFontFamily: '"Open Sans", sans-serif',
component_dbFontWeight: "normal",
external_component_dbFontSize: 14,
external_component_dbFontFamily: '"Open Sans", sans-serif',
external_component_dbFontWeight: "normal",
component_queueFontSize: 14,
component_queueFontFamily: '"Open Sans", sans-serif',
component_queueFontWeight: "normal",
external_component_queueFontSize: 14,
external_component_queueFontFamily: '"Open Sans", sans-serif',
external_component_queueFontWeight: "normal",
wrap: !0,
wrapPadding: 10,
personFont: function() {
return {
fontFamily: this.personFontFamily,
fontSize: this.personFontSize,
fontWeight: this.personFontWeight
};
},
external_personFont: function() {
return {
fontFamily: this.external_personFontFamily,
fontSize: this.external_personFontSize,
fontWeight: this.external_personFontWeight
};
},
systemFont: function() {
return {
fontFamily: this.systemFontFamily,
fontSize: this.systemFontSize,
fontWeight: this.systemFontWeight
};
},
external_systemFont: function() {
return {
fontFamily: this.external_systemFontFamily,
fontSize: this.external_systemFontSize,
fontWeight: this.external_systemFontWeight
};
},
system_dbFont: function() {
return {
fontFamily: this.system_dbFontFamily,
fontSize: this.system_dbFontSize,
fontWeight: this.system_dbFontWeight
};
},
external_system_dbFont: function() {
return {
fontFamily: this.external_system_dbFontFamily,
fontSize: this.external_system_dbFontSize,
fontWeight: this.external_system_dbFontWeight
};
},
system_queueFont: function() {
return {
fontFamily: this.system_queueFontFamily,
fontSize: this.system_queueFontSize,
fontWeight: this.system_queueFontWeight
};
},
external_system_queueFont: function() {
return {
fontFamily: this.external_system_queueFontFamily,
fontSize: this.external_system_queueFontSize,
fontWeight: this.external_system_queueFontWeight
};
},
containerFont: function() {
return {
fontFamily: this.containerFontFamily,
fontSize: this.containerFontSize,
fontWeight: this.containerFontWeight
};
},
external_containerFont: function() {
return {
fontFamily: this.external_containerFontFamily,
fontSize: this.external_containerFontSize,
fontWeight: this.external_containerFontWeight
};
},
container_dbFont: function() {
return {
fontFamily: this.container_dbFontFamily,
fontSize: this.container_dbFontSize,
fontWeight: this.container_dbFontWeight
};
},
external_container_dbFont: function() {
return {
fontFamily: this.external_container_dbFontFamily,
fontSize: this.external_container_dbFontSize,
fontWeight: this.external_container_dbFontWeight
};
},
container_queueFont: function() {
return {
fontFamily: this.container_queueFontFamily,
fontSize: this.container_queueFontSize,
fontWeight: this.container_queueFontWeight
};
},
external_container_queueFont: function() {
return {
fontFamily: this.external_container_queueFontFamily,
fontSize: this.external_container_queueFontSize,
fontWeight: this.external_container_queueFontWeight
};
},
componentFont: function() {
return {
fontFamily: this.componentFontFamily,
fontSize: this.componentFontSize,
fontWeight: this.componentFontWeight
};
},
external_componentFont: function() {
return {
fontFamily: this.external_componentFontFamily,
fontSize: this.external_componentFontSize,
fontWeight: this.external_componentFontWeight
};
},
component_dbFont: function() {
return {
fontFamily: this.component_dbFontFamily,
fontSize: this.component_dbFontSize,
fontWeight: this.component_dbFontWeight
};
},
external_component_dbFont: function() {
return {
fontFamily: this.external_component_dbFontFamily,
fontSize: this.external_component_dbFontSize,
fontWeight: this.external_component_dbFontWeight
};
},
component_queueFont: function() {
return {
fontFamily: this.component_queueFontFamily,
fontSize: this.component_queueFontSize,
fontWeight: this.component_queueFontWeight
};
},
external_component_queueFont: function() {
return {
fontFamily: this.external_component_queueFontFamily,
fontSize: this.external_component_queueFontSize,
fontWeight: this.external_component_queueFontWeight
};
},
boundaryFont: function() {
return {
fontFamily: this.boundaryFontFamily,
fontSize: this.boundaryFontSize,
fontWeight: this.boundaryFontWeight
};
},
messageFont: function() {
return {
fontFamily: this.messageFontFamily,
fontSize: this.messageFontSize,
fontWeight: this.messageFontWeight
};
},
person_bg_color: "#08427B",
person_border_color: "#073B6F",
external_person_bg_color: "#686868",
external_person_border_color: "#8A8A8A",
system_bg_color: "#1168BD",
system_border_color: "#3C7FC0",
system_db_bg_color: "#1168BD",
system_db_border_color: "#3C7FC0",
system_queue_bg_color: "#1168BD",
system_queue_border_color: "#3C7FC0",
external_system_bg_color: "#999999",
external_system_border_color: "#8A8A8A",
external_system_db_bg_color: "#999999",
external_system_db_border_color: "#8A8A8A",
external_system_queue_bg_color: "#999999",
external_system_queue_border_color: "#8A8A8A",
container_bg_color: "#438DD5",
container_border_color: "#3C7FC0",
container_db_bg_color: "#438DD5",
container_db_border_color: "#3C7FC0",
container_queue_bg_color: "#438DD5",
container_queue_border_color: "#3C7FC0",
external_container_bg_color: "#B3B3B3",
external_container_border_color: "#A6A6A6",
external_container_db_bg_color: "#B3B3B3",
external_container_db_border_color: "#A6A6A6",
external_container_queue_bg_color: "#B3B3B3",
external_container_queue_border_color: "#A6A6A6",
component_bg_color: "#85BBF0",
component_border_color: "#78A8D8",
component_db_bg_color: "#85BBF0",
component_db_border_color: "#78A8D8",
component_queue_bg_color: "#85BBF0",
component_queue_border_color: "#78A8D8",
external_component_bg_color: "#CCCCCC",
external_component_border_color: "#BFBFBF",
external_component_db_bg_color: "#CCCCCC",
external_component_db_border_color: "#BFBFBF",
external_component_queue_bg_color: "#CCCCCC",
external_component_queue_border_color: "#BFBFBF"
},
mindmap: {
useMaxWidth: !0,
padding: 10,
maxNodeWidth: 200
},
fontSize: 16
};
za.class && (za.class.arrowMarkerAbsolute = za.arrowMarkerAbsolute);
za.gitGraph && (za.gitGraph.arrowMarkerAbsolute = za.arrowMarkerAbsolute);
const $S = (t, e = "") => Object.keys(t).reduce((r, n) => Array.isArray(t[n]) ? r : typeof t[n] == "object" && t[n] !== null ? [...r, e + n, ...$S(t[n], "")] : [...r, e + n], []), tj = $S(za, ""), ej = /[%]{2}[{]\s*(?:(?:(\w+)\s*:|(\w+))\s*(?:(?:(\w+))|((?:(?![}][%]{2}).|\r?\n)*))?\s*)(?:[}][%]{2})?/gi, rj = /\s*%%.*\n/gm, Lf = {}, b4 = function(t, e) {
t = t.replace(ej, "").replace(rj, `
`);
for (const [r, { detector: n }] of Object.entries(Lf))
if (n(t, e))
return r;
throw new Error(`No diagram type detected for text: ${t}`);
}, _4 = (t, e, r) => {
if (Lf[t])
throw new Error(`Detector with key ${t} already exists`);
Lf[t] = { detector: e, loader: r }, H.debug(`Detector with key ${t} added${r ? " with loader" : ""}`);
}, nj = (t) => Lf[t].loader, mr = function(t, e, r) {
const { depth: n, clobber: i } = Object.assign({ depth: 2, clobber: !1 }, r);
return Array.isArray(e) && !Array.isArray(t) ? (e.forEach((a) => mr(t, a, r)), t) : Array.isArray(e) && Array.isArray(t) ? (e.forEach((a) => {
t.indexOf(a) === -1 && t.push(a);
}), t) : typeof t > "u" || n <= 0 ? t != null && typeof t == "object" && typeof e == "object" ? Object.assign(t, e) : e : (typeof e < "u" && typeof t == "object" && typeof e == "object" && Object.keys(e).forEach((a) => {
typeof e[a] == "object" && (t[a] === void 0 || typeof t[a] == "object") ? (t[a] === void 0 && (t[a] = Array.isArray(e[a]) ? [] : {}), t[a] = mr(t[a], e[a], { depth: n - 1, clobber: i })) : (i || typeof t[a] != "object" && typeof e[a] != "object") && (t[a] = e[a]);
}), t);
};
var ij = typeof Ol == "object" && Ol && Ol.Object === Object && Ol, XS = ij, aj = XS, sj = typeof self == "object" && self && self.Object === Object && self, oj = aj || sj || Function("return this")(), fi = oj, Ad, u6;
function ol() {
if (u6)
return Ad;
u6 = 1;
var t = fi, e = t.Symbol;
return Ad = e, Ad;
}
var Md, h6;
function lj() {
if (h6)
return Md;
h6 = 1;
var t = ol(), e = Object.prototype, r = e.hasOwnProperty, n = e.toString, i = t ? t.toStringTag : void 0;
function a(s) {
var o = r.call(s, i), l = s[i];
try {
s[i] = void 0;
var u = !0;
} catch {
}
var h = n.call(s);
return u && (o ? s[i] = l : delete s[i]), h;
}
return Md = a, Md;
}
var Ld, f6;
function cj() {
if (f6)
return Ld;
f6 = 1;
var t = Object.prototype, e = t.toString;
function r(n) {
return e.call(n);
}
return Ld = r, Ld;
}
var Rd, d6;
function Ks() {
if (d6)
return Rd;
d6 = 1;
var t = ol(), e = lj(), r = cj(), n = "[object Null]", i = "[object Undefined]", a = t ? t.toStringTag : void 0;
function s(o) {
return o == null ? o === void 0 ? i : n : a && a in Object(o) ? e(o) : r(o);
}
return Rd = s, Rd;
}
var Id, p6;
function Vn() {
if (p6)
return Id;
p6 = 1;
function t(e) {
var r = typeof e;
return e != null && (r == "object" || r == "function");
}
return Id = t, Id;
}
var Nd, g6;
function ll() {
if (g6)
return Nd;
g6 = 1;
var t = Ks(), e = Vn(), r = "[object AsyncFunction]", n = "[object Function]", i = "[object GeneratorFunction]", a = "[object Proxy]";
function s(o) {
if (!e(o))
return !1;
var l = t(o);
return l == n || l == i || l == r || l == a;
}
return Nd = s, Nd;
}
var uj = fi, hj = uj["__core-js_shared__"], fj = hj, Bd = fj, y6 = function() {
var t = /[^.]+$/.exec(Bd && Bd.keys && Bd.keys.IE_PROTO || "");
return t ? "Symbol(src)_1." + t : "";
}();
function dj(t) {
return !!y6 && y6 in t;
}
var pj = dj, Dd, m6;
function KS() {
if (m6)
return Dd;
m6 = 1;
var t = Function.prototype, e = t.toString;
function r(n) {
if (n != null) {
try {
return e.call(n);
} catch {
}
try {
return n + "";
} catch {
}
}
return "";
}
return Dd = r, Dd;
}
var gj = ll(), yj = pj, mj = Vn(), bj = KS(), _j = /[\\^$.*+?()[\]{}|]/g, vj = /^\[object .+?Constructor\]$/, xj = Function.prototype, kj = Object.prototype, wj = xj.toString, Tj = kj.hasOwnProperty, Ej = RegExp(
"^" + wj.call(Tj).replace(_j, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
);
function Cj(t) {
if (!mj(t) || yj(t))
return !1;
var e = gj(t) ? Ej : vj;
return e.test(bj(t));
}
var Sj = Cj;
function Aj(t, e) {
return t == null ? void 0 : t[e];
}
var Mj = Aj, Lj = Sj, Rj = Mj;
function Ij(t, e) {
var r = Rj(t, e);
return Lj(r) ? r : void 0;
}
var Zs = Ij, Nj = Zs, Bj = Nj(Object, "create"), X1 = Bj, b6 = X1;
function Dj() {
this.__data__ = b6 ? b6(null) : {}, this.size = 0;
}
var Oj = Dj;
function Fj(t) {
var e = this.has(t) && delete this.__data__[t];
return this.size -= e ? 1 : 0, e;
}
var Pj = Fj, qj = X1, Vj = "__lodash_hash_undefined__", zj = Object.prototype, Yj = zj.hasOwnProperty;
function Uj(t) {
var e = this.__data__;
if (qj) {
var r = e[t];
return r === Vj ? void 0 : r;
}
return Yj.call(e, t) ? e[t] : void 0;
}
var Wj = Uj, Hj = X1, Gj = Object.prototype, jj = Gj.hasOwnProperty;
function $j(t) {
var e = this.__data__;
return Hj ? e[t] !== void 0 : jj.call(e, t);
}
var Xj = $j, Kj = X1, Zj = "__lodash_hash_undefined__";
function Qj(t, e) {
var r = this.__data__;
return this.size += this.has(t) ? 0 : 1, r[t] = Kj && e === void 0 ? Zj : e, this;
}
var Jj = Qj, t$ = Oj, e$ = Pj, r$ = Wj, n$ = Xj, i$ = Jj;
function cl(t) {
var e = -1, r = t == null ? 0 : t.length;
for (this.clear(); ++e < r; ) {
var n = t[e];
this.set(n[0], n[1]);
}
}
cl.prototype.clear = t$;
cl.prototype.delete = e$;
cl.prototype.get = r$;
cl.prototype.has = n$;
cl.prototype.set = i$;
var a$ = cl;
function s$() {
this.__data__ = [], this.size = 0;
}
var o$ = s$, Od, _6;
function ul() {
if (_6)
return Od;
_6 = 1;
function t(e, r) {
return e === r || e !== e && r !== r;
}
return Od = t, Od;
}
var l$ = ul();
function c$(t, e) {
for (var r = t.length; r--; )
if (l$(t[r][0], e))
return r;
return -1;
}
var K1 = c$, u$ = K1, h$ = Array.prototype, f$ = h$.splice;
function d$(t) {
var e = this.__data__, r = u$(e, t);
if (r < 0)
return !1;
var n = e.length - 1;
return r == n ? e.pop() : f$.call(e, r, 1), --this.size, !0;
}
var p$ = d$, g$ = K1;
function y$(t) {
var e = this.__data__, r = g$(e, t);
return r < 0 ? void 0 : e[r][1];
}
var m$ = y$, b$ = K1;
function _$(t) {
return b$(this.__data__, t) > -1;
}
var v$ = _$, x$ = K1;
function k$(t, e) {
var r = this.__data__, n = x$(r, t);
return n < 0 ? (++this.size, r.push([t, e])) : r[n][1] = e, this;
}
var w$ = k$, T$ = o$, E$ = p$, C$ = m$, S$ = v$, A$ = w$;
function hl(t) {
var e = -1, r = t == null ? 0 : t.length;
for (this.clear(); ++e < r; ) {
var n = t[e];
this.set(n[0], n[1]);
}
}
hl.prototype.clear = T$;
hl.prototype.delete = E$;
hl.prototype.get = C$;
hl.prototype.has = S$;
hl.prototype.set = A$;
var Z1 = hl, M$ = Zs, L$ = fi, R$ = M$(L$, "Map"), v4 = R$, v6 = a$, I$ = Z1, N$ = v4;
function B$() {
this.size = 0, this.__data__ = {
hash: new v6(),
map: new (N$ || I$)(),
string: new v6()
};
}
var D$ = B$;
function O$(t) {
var e = typeof t;
return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? t !== "__proto__" : t === null;
}
var F$ = O$, P$ = F$;
function q$(t, e) {
var r = t.__data__;
return P$(e) ? r[typeof e == "string" ? "string" : "hash"] : r.map;
}
var Q1 = q$, V$ = Q1;
function z$(t) {
var e = V$(this, t).delete(t);
return this.size -= e ? 1 : 0, e;
}
var Y$ = z$, U$ = Q1;
function W$(t) {
return U$(this, t).get(t);
}
var H$ = W$, G$ = Q1;
function j$(t) {
return G$(this, t).has(t);
}
var $$ = j$, X$ = Q1;
function K$(t, e) {
var r = X$(this, t), n = r.size;
return r.set(t, e), this.size += r.size == n ? 0 : 1, this;
}
var Z$ = K$, Q$ = D$, J$ = Y$, tX = H$, eX = $$, rX = Z$;
function fl(t) {
var e = -1, r = t == null ? 0 : t.length;
for (this.clear(); ++e < r; ) {
var n = t[e];
this.set(n[0], n[1]);
}
}
fl.prototype.clear = Q$;
fl.prototype.delete = J$;
fl.prototype.get = tX;
fl.prototype.has = eX;
fl.prototype.set = rX;
var x4 = fl, ZS = x4, nX = "Expected a function";
function k4(t, e) {
if (typeof t != "function" || e != null && typeof e != "function")
throw new TypeError(nX);
var r = function() {
var n = arguments, i = e ? e.apply(this, n) : n[0], a = r.cache;
if (a.has(i))
return a.get(i);
var s = t.apply(this, n);
return r.cache = a.set(i, s) || a, s;
};
return r.cache = new (k4.Cache || ZS)(), r;
}
k4.Cache = ZS;
var J1 = k4;
const iX = {
curveBasis: Ps,
curveBasisClosed: bS,
curveBasisOpen: vS,
curveLinear: bn,
curveLinearClosed: CS,
curveMonotoneX: MS,
curveMonotoneY: LS,
curveNatural: IS,
curveStep: NS,
curveStepAfter: DS,
curveStepBefore: BS
}, Fd = /[%]{2}[{]\s*(?:(?:(\w+)\s*:|(\w+))\s*(?:(?:(\w+))|((?:(?![}][%]{2}).|\r?\n)*))?\s*)(?:[}][%]{2})?/gi, aX = /\s*(?:(?:(\w+)(?=:):|(\w+))\s*(?:(?:(\w+))|((?:(?![}][%]{2}).|\r?\n)*))?\s*)(?:[}][%]{2})?/gi, sX = function(t, e) {
const r = QS(t, /(?:init\b)|(?:initialize\b)/);
let n = {};
if (Array.isArray(r)) {
const i = r.map((a) => a.args);
qs(i), n = mr(n, [...i]);
} else
n = r.args;
if (n) {
let i = b4(t, e);
["config"].forEach((a) => {
typeof n[a] < "u" && (i === "flowchart-v2" && (i = "flowchart"), n[i] = n[a], delete n[a]);
});
}
return n;
}, QS = function(t, e = null) {
try {
const r = new RegExp(
`[%]{2}(?![{]${aX.source})(?=[}][%]{2}).*
`,
"ig"
);
t = t.trim().replace(r, "").replace(/'/gm, '"'), H.debug(
`Detecting diagram directive${e !== null ? " type:" + e : ""} based on the text:${t}`
);
let n;
const i = [];
for (; (n = Fd.exec(t)) !== null; )
if (n.index === Fd.lastIndex && Fd.lastIndex++, n && !e || e && n[1] && n[1].match(e) || e && n[2] && n[2].match(e)) {
const a = n[1] ? n[1] : n[2], s = n[3] ? n[3].trim() : n[4] ? JSON.parse(n[4].trim()) : null;
i.push({ type: a, args: s });
}
return i.length === 0 && i.push({ type: t, args: null }), i.length === 1 ? i[0] : i;
} catch (r) {
return H.error(
`ERROR: ${r.message} - Unable to parse directive
${e !== null ? " type:" + e : ""} based on the text:${t}`
), { type: null, args: null };
}
}, oX = function(t, e) {
for (let r = 0; r < e.length; r++)
if (e[r].match(t))
return r;
return -1;
}, Ri = (t, e) => {
if (!t)
return e;
const r = `curve${t.charAt(0).toUpperCase() + t.slice(1)}`;
return iX[r] || e;
}, lX = (t, e) => {
const r = t.trim();
if (r)
return e.securityLevel !== "loose" ? qi(r) : r;
}, cX = (t, ...e) => {
const r = t.split("."), n = r.length - 1, i = r[n];
let a = window;
for (let s = 0; s < n; s++)
if (a = a[r[s]], !a)
return;
a[i](...e);
}, Nc = (t, e) => t && e ? Math.sqrt(Math.pow(e.x - t.x, 2) + Math.pow(e.y - t.y, 2)) : 0, uX = (t) => {
let e, r = 0;
t.forEach((a) => {
r += Nc(a, e), e = a;
});
let n = r / 2, i;
return e = void 0, t.forEach((a) => {
if (e && !i) {
const s = Nc(a, e);
if (s < n)
n -= s;
else {
const o = n / s;
o <= 0 && (i = e), o >= 1 && (i = { x: a.x, y: a.y }), o > 0 && o < 1 && (i = {
x: (1 - o) * e.x + o * a.x,
y: (1 - o) * e.y + o * a.y
});
}
}
e = a;
}), i;
}, hX = (t) => t.length === 1 ? t[0] : uX(t), fX = (t, e, r) => {
let n;
H.info("our points", e), e[0] !== r && (e = e.reverse()), e.forEach((h) => {
totalDistance += Nc(h, n), n = h;
});
let a = 25, s;
n = void 0, e.forEach((h) => {
if (n && !s) {
const d = Nc(h, n);
if (d < a)
a -= d;
else {
const f = a / d;
f <= 0 && (s = n), f >= 1 && (s = { x: h.x, y: h.y }), f > 0 && f < 1 && (s = {
x: (1 - f) * n.x + f * h.x,
y: (1 - f) * n.y + f * h.y
});
}
}
n = h;
});
const o = t ? 10 : 5, l = Math.atan2(e[0].y - s.y, e[0].x - s.x), u = { x: 0, y: 0 };
return u.x = Math.sin(l) * o + (e[0].x + s.x) / 2, u.y = -Math.cos(l) * o + (e[0].y + s.y) / 2, u;
}, dX = (t, e, r) => {
let n = JSON.parse(JSON.stringify(r)), i;
H.info("our points", n), e !== "start_left" && e !== "start_right" && (n = n.reverse()), n.forEach((d) => {
i = d;
});
let s = 25 + t, o;
i = void 0, n.forEach((d) => {
if (i && !o) {
const f = Nc(d, i);
if (f < s)
s -= f;
else {
const p = s / f;
p <= 0 && (o = i), p >= 1 && (o = { x: d.x, y: d.y }), p > 0 && p < 1 && (o = {
x: (1 - p) * i.x + p * d.x,
y: (1 - p) * i.y + p * d.y
});
}
}
i = d;
});
const l = 10 + t * 0.5, u = Math.atan2(n[0].y - o.y, n[0].x - o.x), h = { x: 0, y: 0 };
return h.x = Math.sin(u) * l + (n[0].x + o.x) / 2, h.y = -Math.cos(u) * l + (n[0].y + o.y) / 2, e === "start_left" && (h.x = Math.sin(u + Math.PI) * l + (n[0].x + o.x) / 2, h.y = -Math.cos(u + Math.PI) * l + (n[0].y + o.y) / 2), e === "end_right" && (h.x = Math.sin(u - Math.PI) * l + (n[0].x + o.x) / 2 - 5, h.y = -Math.cos(u - Math.PI) * l + (n[0].y + o.y) / 2 - 5), e === "end_left" && (h.x = Math.sin(u) * l + (n[0].x + o.x) / 2 - 5, h.y = -Math.cos(u) * l + (n[0].y + o.y) / 2 - 5), h;
}, Ka = (t) => {
let e = "", r = "";
for (let n = 0; n < t.length; n++)
typeof t[n] < "u" && (t[n].startsWith("color:") || t[n].startsWith("text-align:") ? r = r + t[n] + ";" : e = e + t[n] + ";");
return { style: e, labelStyle: r };
};
let x6 = 0;
const JS = () => (x6++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + x6);
function pX(t) {
let e = "";
const r = "0123456789abcdef", n = r.length;
for (let i = 0; i < t; i++)
e += r.charAt(Math.floor(Math.random() * n));
return e;
}
const tA = (t) => pX(t.length), gX = function() {
return {
x: 0,
y: 0,
fill: void 0,
anchor: "start",
style: "#666",
width: 100,
height: 100,
textMargin: 0,
rx: 0,
ry: 0,
valign: void 0
};
}, yX = function(t, e) {
const r = e.text.replace(pe.lineBreakRegex, " "), n = t.append("text");
n.attr("x", e.x), n.attr("y", e.y), n.style("text-anchor", e.anchor), n.style("font-family", e.fontFamily), n.style("font-size", e.fontSize), n.style("font-weight", e.fontWeight), n.attr("fill", e.fill), typeof e.class < "u" && n.attr("class", e.class);
const i = n.append("tspan");
return i.attr("x", e.x + e.textMargin * 2), i.attr("fill", e.fill), i.text(r), n;
}, eA = J1(
(t, e, r) => {
if (!t || (r = Object.assign(
{ fontSize: 12, fontWeight: 400, fontFamily: "Arial", joinWith: "
" },
r
), pe.lineBreakRegex.test(t)))
return t;
const n = t.split(" "), i = [];
let a = "";
return n.forEach((s, o) => {
const l = Ii(`${s} `, r), u = Ii(a, r);
if (l > e) {
const { hyphenatedStrings: f, remainingWord: p } = mX(s, e, "-", r);
i.push(a, ...f), a = p;
} else
u + l >= e ? (i.push(a), a = s) : a = [a, s].filter(Boolean).join(" ");
o + 1 === n.length && i.push(a);
}), i.filter((s) => s !== "").join(r.joinWith);
},
(t, e, r) => `${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`
), mX = J1(
(t, e, r = "-", n) => {
n = Object.assign(
{ fontSize: 12, fontWeight: 400, fontFamily: "Arial", margin: 0 },
n
);
const i = t.split(""), a = [];
let s = "";
return i.forEach((o, l) => {
const u = `${s}${o}`;
if (Ii(u, n) >= e) {
const d = l + 1, f = i.length === d, p = `${u}${r}`;
a.push(f ? u : p), s = "";
} else
s = u;
}), { hyphenatedStrings: a, remainingWord: s };
},
(t, e, r = "-", n) => `${t}${e}${r}${n.fontSize}${n.fontWeight}${n.fontFamily}`
), _b = function(t, e) {
return e = Object.assign(
{ fontSize: 12, fontWeight: 400, fontFamily: "Arial", margin: 15 },
e
), w4(t, e).height;
}, Ii = function(t, e) {
return e = Object.assign({ fontSize: 12, fontWeight: 400, fontFamily: "Arial" }, e), w4(t, e).width;
}, w4 = J1(
function(t, e) {
e = Object.assign({ fontSize: 12, fontWeight: 400, fontFamily: "Arial" }, e);
const { fontSize: r, fontFamily: n, fontWeight: i } = e;
if (!t)
return { width: 0, height: 0 };
const a = ["sans-serif", n], s = t.split(pe.lineBreakRegex), o = [], l = St("body");
if (!l.remove)
return { width: 0, height: 0, lineHeight: 0 };
const u = l.append("svg");
for (const d of a) {
let f = 0;
const p = { width: 0, height: 0, lineHeight: 0 };
for (const m of s) {
const _ = gX();
_.text = m;
const y = yX(u, _).style("font-size", r).style("font-weight", i).style("font-family", d), b = (y._groups || y)[0][0].getBBox();
p.width = Math.round(Math.max(p.width, b.width)), f = Math.round(b.height), p.height += f, p.lineHeight = Math.round(Math.max(p.lineHeight, f));
}
o.push(p);
}
u.remove();
const h = isNaN(o[1].height) || isNaN(o[1].width) || isNaN(o[1].lineHeight) || o[0].height > o[1].height && o[0].width > o[1].width && o[0].lineHeight > o[1].lineHeight ? 0 : 1;
return o[h];
},
(t, e) => `${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`
), bX = class {
constructor(e, r) {
this.deterministic = e, this.seed = r, this.count = r ? r.length : 0;
}
next() {
return this.deterministic ? this.count++ : Date.now();
}
};
let eh;
const _X = function(t) {
return eh = eh || document.createElement("div"), t = escape(t).replace(/%26/g, "&").replace(/%23/g, "#").replace(/%3B/g, ";"), eh.innerHTML = t, unescape(eh.textContent);
}, qs = (t) => {
if (H.debug("directiveSanitizer called with", t), typeof t == "object" && (t.length ? t.forEach((e) => qs(e)) : Object.keys(t).forEach((e) => {
H.debug("Checking key", e), e.indexOf("__") === 0 && (H.debug("sanitize deleting __ option", e), delete t[e]), e.indexOf("proto") >= 0 && (H.debug("sanitize deleting proto option", e), delete t[e]), e.indexOf("constr") >= 0 && (H.debug("sanitize deleting constr option", e), delete t[e]), e.indexOf("themeCSS") >= 0 && (H.debug("sanitizing themeCss option"), t[e] = Lh(t[e])), e.indexOf("fontFamily") >= 0 && (H.debug("sanitizing fontFamily option"), t[e] = Lh(t[e])), e.indexOf("altFontFamily") >= 0 && (H.debug("sanitizing altFontFamily option"), t[e] = Lh(t[e])), tj.indexOf(e) < 0 ? (H.debug("sanitize deleting option", e), delete t[e]) : typeof t[e] == "object" && (H.debug("sanitize deleting object", e), qs(t[e]));
})), t.themeVariables) {
const e = Object.keys(t.themeVariables);
for (let r = 0; r < e.length; r++) {
const n = e[r], i = t.themeVariables[n];
i && i.match && !i.match(/^[a-zA-Z0-9#,";()%. ]+$/) && (t.themeVariables[n] = "");
}
}
H.debug("After sanitization", t);
}, Lh = (t) => {
let e = 0, r = 0;
for (let n = 0; n < t.length; n++) {
if (e < r)
return "{ /* ERROR: Unbalanced CSS */ }";
t[n] === "{" ? e++ : t[n] === "}" && r++;
}
return e !== r ? "{ /* ERROR: Unbalanced CSS */ }" : t;
};
function T4(t) {
return "str" in t;
}
function vX(t) {
return t instanceof Error ? t.message : String(t);
}
const Re = {
assignWithDepth: mr,
wrapLabel: eA,
calculateTextHeight: _b,
calculateTextWidth: Ii,
calculateTextDimensions: w4,
detectInit: sX,
detectDirective: QS,
isSubstringInArray: oX,
interpolateToCurve: Ri,
calcLabelPosition: hX,
calcCardinalityPosition: fX,
calcTerminalLabelPosition: dX,
formatUrl: lX,
getStylesFromArray: Ka,
generateId: JS,
random: tA,
runFunc: cX,
entityDecode: _X,
initIdGenerator: bX,
directiveSanitizer: qs,
sanitizeCss: Lh
};
var rA = "comm", nA = "rule", iA = "decl", xX = "@import", kX = "@keyframes", wX = Math.abs, E4 = String.fromCharCode;
function aA(t) {
return t.trim();
}
function vb(t, e, r) {
return t.replace(e, r);
}
function TX(t, e) {
return t.indexOf(e);
}
function t0(t, e) {
return t.charCodeAt(e) | 0;
}
function Bc(t, e, r) {
return t.slice(e, r);
}
function Ra(t) {
return t.length;
}
function sA(t) {
return t.length;
}
function rh(t, e) {
return e.push(t), t;
}
var e0 = 1, $o = 1, oA = 0, Pn = 0, gr = 0, dl = "";
function C4(t, e, r, n, i, a, s) {
return { value: t, root: e, parent: r, type: n, props: i, children: a, line: e0, column: $o, length: s, return: "" };
}
function EX() {
return gr;
}
function CX() {
return gr = Pn > 0 ? t0(dl, --Pn) : 0, $o--, gr === 10 && ($o = 1, e0--), gr;
}
function ni() {
return gr = Pn < oA ? t0(dl, Pn++) : 0, $o++, gr === 10 && ($o = 1, e0++), gr;
}
function Cs() {
return t0(dl, Pn);
}
function Rh() {
return Pn;
}
function r0(t, e) {
return Bc(dl, t, e);
}
function xb(t) {
switch (t) {
case 0:
case 9:
case 10:
case 13:
case 32:
return 5;
case 33:
case 43:
case 44:
case 47:
case 62:
case 64:
case 126:
case 59:
case 123:
case 125:
return 4;
case 58:
return 3;
case 34:
case 39:
case 40:
case 91:
return 2;
case 41:
case 93:
return 1;
}
return 0;
}
function SX(t) {
return e0 = $o = 1, oA = Ra(dl = t), Pn = 0, [];
}
function AX(t) {
return dl = "", t;
}
function Pd(t) {
return aA(r0(Pn - 1, kb(t === 91 ? t + 2 : t === 40 ? t + 1 : t)));
}
function MX(t) {
for (; (gr = Cs()) && gr < 33; )
ni();
return xb(t) > 2 || xb(gr) > 3 ? "" : " ";
}
function LX(t, e) {
for (; --e && ni() && !(gr < 48 || gr > 102 || gr > 57 && gr < 65 || gr > 70 && gr < 97); )
;
return r0(t, Rh() + (e < 6 && Cs() == 32 && ni() == 32));
}
function kb(t) {
for (; ni(); )
switch (gr) {
case t:
return Pn;
case 34:
case 39:
t !== 34 && t !== 39 && kb(gr);
break;
case 40:
t === 41 && kb(t);
break;
case 92:
ni();
break;
}
return Pn;
}
function RX(t, e) {
for (; ni() && t + gr !== 47 + 10; )
if (t + gr === 42 + 42 && Cs() === 47)
break;
return "/*" + r0(e, Pn - 1) + "*" + E4(t === 47 ? t : ni());
}
function IX(t) {
for (; !xb(Cs()); )
ni();
return r0(t, Pn);
}
function lA(t) {
return AX(Ih("", null, null, null, [""], t = SX(t), 0, [0], t));
}
function Ih(t, e, r, n, i, a, s, o, l) {
for (var u = 0, h = 0, d = s, f = 0, p = 0, m = 0, _ = 1, y = 1, b = 1, x = 0, k = "", T = i, C = a, M = n, S = k; y; )
switch (m = x, x = ni()) {
case 40:
if (m != 108 && t0(S, d - 1) == 58) {
TX(S += vb(Pd(x), "&", "&\f"), "&\f") != -1 && (b = -1);
break;
}
case 34:
case 39:
case 91:
S += Pd(x);
break;
case 9:
case 10:
case 13:
case 32:
S += MX(m);
break;
case 92:
S += LX(Rh() - 1, 7);
continue;
case 47:
switch (Cs()) {
case 42:
case 47:
rh(NX(RX(ni(), Rh()), e, r), l);
break;
default:
S += "/";
}
break;
case 123 * _:
o[u++] = Ra(S) * b;
case 125 * _:
case 59:
case 0:
switch (x) {
case 0:
case 125:
y = 0;
case 59 + h:
p > 0 && Ra(S) - d && rh(p > 32 ? w6(S + ";", n, r, d - 1) : w6(vb(S, " ", "") + ";", n, r, d - 2), l);
break;
case 59:
S += ";";
default:
if (rh(M = k6(S, e, r, u, h, i, o, k, T = [], C = [], d), a), x === 123)
if (h === 0)
Ih(S, e, M, M, T, a, d, o, C);
else
switch (f) {
case 100:
case 109:
case 115:
Ih(t, M, M, n && rh(k6(t, M, M, 0, 0, i, o, k, i, T = [], d), C), i, C, d, o, n ? T : C);
break;
default:
Ih(S, M, M, M, [""], C, 0, o, C);
}
}
u = h = p = 0, _ = b = 1, k = S = "", d = s;
break;
case 58:
d = 1 + Ra(S), p = m;
default:
if (_ < 1) {
if (x == 123)
--_;
else if (x == 125 && _++ == 0 && CX() == 125)
continue;
}
switch (S += E4(x), x * _) {
case 38:
b = h > 0 ? 1 : (S += "\f", -1);
break;
case 44:
o[u++] = (Ra(S) - 1) * b, b = 1;
break;
case 64:
Cs() === 45 && (S += Pd(ni())), f = Cs(), h = d = Ra(k = S += IX(Rh())), x++;
break;
case 45:
m === 45 && Ra(S) == 2 && (_ = 0);
}
}
return a;
}
function k6(t, e, r, n, i, a, s, o, l, u, h) {
for (var d = i - 1, f = i === 0 ? a : [""], p = sA(f), m = 0, _ = 0, y = 0; m < n; ++m)
for (var b = 0, x = Bc(t, d + 1, d = wX(_ = s[m])), k = t; b < p; ++b)
(k = aA(_ > 0 ? f[b] + " " + x : vb(x, /&\f/g, f[b]))) && (l[y++] = k);
return C4(t, e, r, i === 0 ? nA : o, l, u, h);
}
function NX(t, e, r) {
return C4(t, e, r, rA, E4(EX()), Bc(t, 2, -2), 0);
}
function w6(t, e, r, n) {
return C4(t, e, r, iA, Bc(t, 0, n), Bc(t, n + 1, -1), n);
}
function Rf(t, e) {
for (var r = "", n = sA(t), i = 0; i < n; i++)
r += e(t[i], i, t, e) || "";
return r;
}
function cA(t, e, r, n) {
switch (t.type) {
case xX:
case iA:
return t.return = t.return || t.value;
case rA:
return "";
case kX:
return t.return = t.value + "{" + Rf(t.children, n) + "}";
case nA:
t.value = t.props.join(",");
}
return Ra(r = Rf(t.children, n)) ? t.return = t.value + "{" + r + "}" : "";
}
const BX = "mermaid", DX = "9.2.0-rc9", OX = "Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.", FX = "./dist/mermaid.core.mjs", PX = "./dist/mermaid.core.mjs", qX = "./dist/mermaid.d.ts", VX = "module", zX = {
".": {
require: "./dist/mermaid.min.js",
import: "./dist/mermaid.core.mjs",
types: "./dist/mermaid.d.ts"
},
"./*": "./*"
}, YX = [
"diagram",
"markdown",
"flowchart",
"sequence diagram",
"gantt",
"class diagram",
"git graph"
], UX = {
clean: "rimraf dist",
"build:code": "node .esbuild/esbuild.cjs",
"build:types": "tsc -p ./tsconfig.json --emitDeclarationOnly",
"build:watch": "yarn build:code --watch",
"build:esbuild": 'concurrently "yarn build:code" "yarn build:types"',
build: "yarn clean; yarn build:esbuild",
dev: "node .esbuild/serve.cjs",
"docs:build": "ts-node-esm src/docs.mts",
"docs:verify": "yarn docs:build --verify",
"todo-postbuild": "documentation build src/mermaidAPI.ts src/config.ts src/defaultConfig.ts --shallow -f md --markdown-toc false > src/docs/Setup.md && prettier --write src/docs/Setup.md",
release: "yarn build",
lint: "eslint --cache --ignore-path .gitignore . && yarn lint:jison && prettier --check .",
"lint:fix": "eslint --fix --ignore-path .gitignore . && prettier --write .",
"lint:jison": "ts-node-esm src/jison/lint.mts",
cypress: "cypress run",
"cypress:open": "cypress open",
e2e: "start-server-and-test dev http://localhost:9000/ cypress",
"todo-prepare": 'concurrently "husky install" "yarn build"',
"pre-commit": "lint-staged"
}, WX = {
type: "git",
url: "https://github.com/mermaid-js/mermaid"
}, HX = "Knut Sveidqvist", GX = "MIT", jX = {
ignore: [
"**/parser/*.js",
"dist/**/*.js",
"cypress/**/*.js"
],
globals: [
"page"
]
}, $X = {
"@braintree/sanitize-url": "^6.0.0",
d3: "^7.0.0",
dagre: "^0.8.5",
"dagre-d3": "^0.6.4",
dompurify: "2.4.0",
"fast-clone": "^1.5.13",
graphlib: "^2.1.8",
khroma: "^2.0.0",
lodash: "^4.17.21",
"moment-mini": "^2.24.0",
"non-layered-tidy-tree-layout": "^2.0.2",
stylis: "^4.1.2",
uuid: "^9.0.0"
}, XX = {
"@applitools/eyes-cypress": "^3.25.7",
"@commitlint/cli": "^17.1.2",
"@commitlint/config-conventional": "^17.0.0",
"@types/d3": "^7.4.0",
"@types/dompurify": "^2.3.4",
"@types/eslint": "^8.4.6",
"@types/express": "^4.17.13",
"@types/jsdom": "^20.0.0",
"@types/lodash": "^4.14.185",
"@types/prettier": "^2.7.0",
"@types/stylis": "^4.0.2",
"@types/uuid": "^8.3.4",
"@typescript-eslint/eslint-plugin": "^5.37.0",
"@typescript-eslint/parser": "^5.37.0",
concurrently: "^7.4.0",
coveralls: "^3.1.1",
cypress: "^10.0.0",
"cypress-image-snapshot": "^4.0.1",
documentation: "13.2.0",
esbuild: "^0.15.8",
eslint: "^8.23.1",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-cypress": "^2.12.1",
"eslint-plugin-html": "^7.1.0",
"eslint-plugin-jest": "^27.0.4",
"eslint-plugin-jsdoc": "^39.3.6",
"eslint-plugin-json": "^3.1.0",
"eslint-plugin-markdown": "^3.0.0",
express: "^4.18.1",
globby: "^13.1.2",
husky: "^8.0.0",
"identity-obj-proxy": "^3.0.0",
jison: "^0.4.18",
"js-base64": "3.7.2",
jsdom: "^20.0.0",
"lint-staged": "^13.0.0",
moment: "^2.23.0",
"path-browserify": "^1.0.1",
prettier: "^2.7.1",
"prettier-plugin-jsdoc": "^0.4.2",
remark: "^14.0.2",
rimraf: "^3.0.2",
"start-server-and-test": "^1.12.6",
"ts-node": "^10.9.1",
typescript: "^4.8.3",
"unist-util-flatmap": "^1.0.0"
}, KX = {
d3: "^7.0.0"
}, ZX = [
"dist"
], QX = [
"**/*.css",
"**/*.scss"
], If = {
name: BX,
version: DX,
description: OX,
main: FX,
module: PX,
types: qX,
type: VX,
exports: zX,
keywords: YX,
scripts: UX,
repository: WX,
author: HX,
license: GX,
standard: jX,
dependencies: $X,
devDependencies: XX,
resolutions: KX,
files: ZX,
sideEffects: QX
}, Xo = Object.freeze(za);
let pn = mr({}, Xo), uA, Ko = [], n0 = mr({}, Xo);
const i0 = (t, e) => {
let r = mr({}, t), n = {};
for (let i = 0; i < e.length; i++) {
const a = e[i];
dA(a), n = mr(n, a);
}
if (r = mr(r, n), n.theme && n.theme in pa) {
const i = mr({}, uA), a = mr(
i.themeVariables || {},
n.themeVariables
);
r.theme && r.theme in pa && (r.themeVariables = pa[r.theme].getThemeVariables(a));
}
return n0 = r, r;
}, JX = (t) => (pn = mr({}, Xo), pn = mr(pn, t), t.theme && pa[t.theme] && (pn.themeVariables = pa[t.theme].getThemeVariables(t.themeVariables)), n0 = i0(pn, Ko), pn), tK = (t) => {
uA = mr({}, t);
}, eK = (t) => (pn = mr(pn, t), i0(pn, Ko), pn), hA = () => mr({}, pn), fA = (t) => (mr(n0, t), nt()), nt = () => mr({}, n0), dA = (t) => {
var e;
["secure", ...(e = pn.secure) != null ? e : []].forEach((r) => {
typeof t[r] < "u" && (H.debug(`Denied attempt to modify a secure key ${r}`, t[r]), delete t[r]);
}), Object.keys(t).forEach((r) => {
r.indexOf("__") === 0 && delete t[r];
}), Object.keys(t).forEach((r) => {
typeof t[r] == "string" && (t[r].indexOf("<") > -1 || t[r].indexOf(">") > -1 || t[r].indexOf("url(data:") > -1) && delete t[r], typeof t[r] == "object" && dA(t[r]);
});
}, S4 = (t) => {
t.fontFamily && (t.themeVariables ? t.themeVariables.fontFamily || (t.themeVariables = { fontFamily: t.fontFamily }) : t.themeVariables = { fontFamily: t.fontFamily }), Ko.push(t), i0(pn, Ko);
}, Dc = (t = pn) => {
Ko = [], i0(t, Ko);
}, rK = function(t, e) {
for (let r of e)
t.attr(r[0], r[1]);
}, nK = function(t, e, r) {
let n = /* @__PURE__ */ new Map();
return r ? (n.set("width", "100%"), n.set("style", `max-width: ${e}px;`)) : n.set("width", e), n;
}, di = function(t, e, r, n) {
const i = nK(e, r, n);
rK(t, i);
}, a0 = function(t, e, r, n) {
const i = e.node().getBBox(), a = i.width, s = i.height;
H.info(`SVG bounds: ${a}x${s}`, i);
let o = 0, l = 0;
H.info(`Graph bounds: ${o}x${l}`, t), o = a + r * 2, l = s + r * 2, H.info(`Calculated bounds: ${o}x${l}`), di(e, l, o, n);
const u = `${i.x - r} ${i.y - r} ${i.width + 2 * r} ${i.height + 2 * r}`;
e.attr("viewBox", u);
}, sc = (t) => `g.classGroup text {
fill: ${t.nodeBorder};
fill: ${t.classText};
stroke: none;
font-family: ${t.fontFamily};
font-size: 10px;
.title {
font-weight: bolder;
}
}
.nodeLabel, .edgeLabel {
color: ${t.classText};
}
.edgeLabel .label rect {
fill: ${t.mainBkg};
}
.label text {
fill: ${t.classText};
}
.edgeLabel .label span {
background: ${t.mainBkg};
}
.classTitle {
font-weight: bolder;
}
.node rect,
.node circle,
.node ellipse,
.node polygon,
.node path {
fill: ${t.mainBkg};
stroke: ${t.nodeBorder};
stroke-width: 1px;
}
.divider {
stroke: ${t.nodeBorder};
stroke: 1;
}
g.clickable {
cursor: pointer;
}
g.classGroup rect {
fill: ${t.mainBkg};
stroke: ${t.nodeBorder};
}
g.classGroup line {
stroke: ${t.nodeBorder};
stroke-width: 1;
}
.classLabel .box {
stroke: none;
stroke-width: 0;
fill: ${t.mainBkg};
opacity: 0.5;
}
.classLabel .label {
fill: ${t.nodeBorder};
font-size: 10px;
}
.relation {
stroke: ${t.lineColor};
stroke-width: 1;
fill: none;
}
.dashed-line{
stroke-dasharray: 3;
}
#compositionStart, .composition {
fill: ${t.lineColor} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#compositionEnd, .composition {
fill: ${t.lineColor} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#dependencyStart, .dependency {
fill: ${t.lineColor} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#dependencyStart, .dependency {
fill: ${t.lineColor} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#extensionStart, .extension {
fill: ${t.lineColor} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#extensionEnd, .extension {
fill: ${t.lineColor} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#aggregationStart, .aggregation {
fill: ${t.mainBkg} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#aggregationEnd, .aggregation {
fill: ${t.mainBkg} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#lollipopStart, .lollipop {
fill: ${t.mainBkg} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#lollipopEnd, .lollipop {
fill: ${t.mainBkg} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
.edgeTerminals {
font-size: 11px;
}
`, pA = (t) => `
.entityBox {
fill: ${t.mainBkg};
stroke: ${t.nodeBorder};
}
.attributeBoxOdd {
fill: ${t.attributeBackgroundColorOdd};
stroke: ${t.nodeBorder};
}
.attributeBoxEven {
fill: ${t.attributeBackgroundColorEven};
stroke: ${t.nodeBorder};
}
.relationshipLabelBox {
fill: ${t.tertiaryColor};
opacity: 0.7;
background-color: ${t.tertiaryColor};
rect {
opacity: 0.5;
}
}
.relationshipLine {
stroke: ${t.lineColor};
}
`, gA = () => "", Nf = (t) => `.label {
font-family: ${t.fontFamily};
color: ${t.nodeTextColor || t.textColor};
}
.cluster-label text {
fill: ${t.titleColor};
}
.cluster-label span {
color: ${t.titleColor};
}
.label text,span {
fill: ${t.nodeTextColor || t.textColor};
color: ${t.nodeTextColor || t.textColor};
}
.node rect,
.node circle,
.node ellipse,
.node polygon,
.node path {
fill: ${t.mainBkg};
stroke: ${t.nodeBorder};
stroke-width: 1px;
}
.node .label {
text-align: center;
}
.node.clickable {
cursor: pointer;
}
.arrowheadPath {
fill: ${t.arrowheadColor};
}
.edgePath .path {
stroke: ${t.lineColor};
stroke-width: 2.0px;
}
.flowchart-link {
stroke: ${t.lineColor};
fill: none;
}
.edgeLabel {
background-color: ${t.edgeLabelBackground};
rect {
opacity: 0.5;
background-color: ${t.edgeLabelBackground};
fill: ${t.edgeLabelBackground};
}
text-align: center;
}
.cluster rect {
fill: ${t.clusterBkg};
stroke: ${t.clusterBorder};
stroke-width: 1px;
}
.cluster text {
fill: ${t.titleColor};
}
.cluster span {
color: ${t.titleColor};
}
/* .cluster div {
color: ${t.titleColor};
} */
div.mermaidTooltip {
position: absolute;
text-align: center;
max-width: 200px;
padding: 2px;
font-family: ${t.fontFamily};
font-size: 12px;
background: ${t.tertiaryColor};
border: 1px solid ${t.border2};
border-radius: 2px;
pointer-events: none;
z-index: 100;
}
`, yA = (t) => `
.mermaid-main-font {
font-family: "trebuchet ms", verdana, arial, sans-serif;
font-family: var(--mermaid-font-family);
}
.exclude-range {
fill: ${t.excludeBkgColor};
}
.section {
stroke: none;
opacity: 0.2;
}
.section0 {
fill: ${t.sectionBkgColor};
}
.section2 {
fill: ${t.sectionBkgColor2};
}
.section1,
.section3 {
fill: ${t.altSectionBkgColor};
opacity: 0.2;
}
.sectionTitle0 {
fill: ${t.titleColor};
}
.sectionTitle1 {
fill: ${t.titleColor};
}
.sectionTitle2 {
fill: ${t.titleColor};
}
.sectionTitle3 {
fill: ${t.titleColor};
}
.sectionTitle {
text-anchor: start;
// font-size: ${t.ganttFontSize};
// text-height: 14px;
font-family: 'trebuchet ms', verdana, arial, sans-serif;
font-family: var(--mermaid-font-family);
}
/* Grid and axis */
.grid .tick {
stroke: ${t.gridColor};
opacity: 0.8;
shape-rendering: crispEdges;
text {
font-family: ${t.fontFamily};
fill: ${t.textColor};
}
}
.grid path {
stroke-width: 0;
}
/* Today line */
.today {
fill: none;
stroke: ${t.todayLineColor};
stroke-width: 2px;
}
/* Task styling */
/* Default task */
.task {
stroke-width: 2;
}
.taskText {
text-anchor: middle;
font-family: 'trebuchet ms', verdana, arial, sans-serif;
font-family: var(--mermaid-font-family);
}
// .taskText:not([font-size]) {
// font-size: ${t.ganttFontSize};
// }
.taskTextOutsideRight {
fill: ${t.taskTextDarkColor};
text-anchor: start;
// font-size: ${t.ganttFontSize};
font-family: 'trebuchet ms', verdana, arial, sans-serif;
font-family: var(--mermaid-font-family);
}
.taskTextOutsideLeft {
fill: ${t.taskTextDarkColor};
text-anchor: end;
// font-size: ${t.ganttFontSize};
}
/* Special case clickable */
.task.clickable {
cursor: pointer;
}
.taskText.clickable {
cursor: pointer;
fill: ${t.taskTextClickableColor} !important;
font-weight: bold;
}
.taskTextOutsideLeft.clickable {
cursor: pointer;
fill: ${t.taskTextClickableColor} !important;
font-weight: bold;
}
.taskTextOutsideRight.clickable {
cursor: pointer;
fill: ${t.taskTextClickableColor} !important;
font-weight: bold;
}
/* Specific task settings for the sections*/
.taskText0,
.taskText1,
.taskText2,
.taskText3 {
fill: ${t.taskTextColor};
}
.task0,
.task1,
.task2,
.task3 {
fill: ${t.taskBkgColor};
stroke: ${t.taskBorderColor};
}
.taskTextOutside0,
.taskTextOutside2
{
fill: ${t.taskTextOutsideColor};
}
.taskTextOutside1,
.taskTextOutside3 {
fill: ${t.taskTextOutsideColor};
}
/* Active task */
.active0,
.active1,
.active2,
.active3 {
fill: ${t.activeTaskBkgColor};
stroke: ${t.activeTaskBorderColor};
}
.activeText0,
.activeText1,
.activeText2,
.activeText3 {
fill: ${t.taskTextDarkColor} !important;
}
/* Completed task */
.done0,
.done1,
.done2,
.done3 {
stroke: ${t.doneTaskBorderColor};
fill: ${t.doneTaskBkgColor};
stroke-width: 2;
}
.doneText0,
.doneText1,
.doneText2,
.doneText3 {
fill: ${t.taskTextDarkColor} !important;
}
/* Tasks on the critical line */
.crit0,
.crit1,
.crit2,
.crit3 {
stroke: ${t.critBorderColor};
fill: ${t.critBkgColor};
stroke-width: 2;
}
.activeCrit0,
.activeCrit1,
.activeCrit2,
.activeCrit3 {
stroke: ${t.critBorderColor};
fill: ${t.activeTaskBkgColor};
stroke-width: 2;
}
.doneCrit0,
.doneCrit1,
.doneCrit2,
.doneCrit3 {
stroke: ${t.critBorderColor};
fill: ${t.doneTaskBkgColor};
stroke-width: 2;
cursor: pointer;
shape-rendering: crispEdges;
}
.milestone {
transform: rotate(45deg) scale(0.8,0.8);
}
.milestoneText {
font-style: italic;
}
.doneCritText0,
.doneCritText1,
.doneCritText2,
.doneCritText3 {
fill: ${t.taskTextDarkColor} !important;
}
.activeCritText0,
.activeCritText1,
.activeCritText2,
.activeCritText3 {
fill: ${t.taskTextDarkColor} !important;
}
.titleText {
text-anchor: middle;
font-size: 18px;
fill: ${t.textColor} ;
font-family: 'trebuchet ms', verdana, arial, sans-serif;
font-family: var(--mermaid-font-family);
}
`, mA = () => "", bA = (t) => `
.pieCircle{
stroke: ${t.pieStrokeColor};
stroke-width : ${t.pieStrokeWidth};
opacity : ${t.pieOpacity};
}
.pieTitleText {
text-anchor: middle;
font-size: ${t.pieTitleTextSize};
fill: ${t.pieTitleTextColor};
font-family: ${t.fontFamily};
}
.slice {
font-family: ${t.fontFamily};
fill: ${t.pieSectionTextColor};
font-size:${t.pieSectionTextSize};
// fill: white;
}
.legend text {
fill: ${t.pieLegendTextColor};
font-family: ${t.fontFamily};
font-size: ${t.pieLegendTextSize};
}
`, _A = (t) => `
marker {
fill: ${t.relationColor};
stroke: ${t.relationColor};
}
marker.cross {
stroke: ${t.lineColor};
}
svg {
font-family: ${t.fontFamily};
font-size: ${t.fontSize};
}
.reqBox {
fill: ${t.requirementBackground};
fill-opacity: 100%;
stroke: ${t.requirementBorderColor};
stroke-width: ${t.requirementBorderSize};
}
.reqTitle, .reqLabel{
fill: ${t.requirementTextColor};
}
.reqLabelBox {
fill: ${t.relationLabelBackground};
fill-opacity: 100%;
}
.req-title-line {
stroke: ${t.requirementBorderColor};
stroke-width: ${t.requirementBorderSize};
}
.relationshipLine {
stroke: ${t.relationColor};
stroke-width: 1;
}
.relationshipLabel {
fill: ${t.relationLabelColor};
}
`, vA = (t) => `.actor {
stroke: ${t.actorBorder};
fill: ${t.actorBkg};
}
text.actor > tspan {
fill: ${t.actorTextColor};
stroke: none;
}
.actor-line {
stroke: ${t.actorLineColor};
}
.messageLine0 {
stroke-width: 1.5;
stroke-dasharray: none;
stroke: ${t.signalColor};
}
.messageLine1 {
stroke-width: 1.5;
stroke-dasharray: 2, 2;
stroke: ${t.signalColor};
}
#arrowhead path {
fill: ${t.signalColor};
stroke: ${t.signalColor};
}
.sequenceNumber {
fill: ${t.sequenceNumberColor};
}
#sequencenumber {
fill: ${t.signalColor};
}
#crosshead path {
fill: ${t.signalColor};
stroke: ${t.signalColor};
}
.messageText {
fill: ${t.signalTextColor};
stroke: none;
}
.labelBox {
stroke: ${t.labelBoxBorderColor};
fill: ${t.labelBoxBkgColor};
}
.labelText, .labelText > tspan {
fill: ${t.labelTextColor};
stroke: none;
}
.loopText, .loopText > tspan {
fill: ${t.loopTextColor};
stroke: none;
}
.loopLine {
stroke-width: 2px;
stroke-dasharray: 2, 2;
stroke: ${t.labelBoxBorderColor};
fill: ${t.labelBoxBorderColor};
}
.note {
//stroke: #decc93;
stroke: ${t.noteBorderColor};
fill: ${t.noteBkgColor};
}
.noteText, .noteText > tspan {
fill: ${t.noteTextColor};
stroke: none;
}
.activation0 {
fill: ${t.activationBkgColor};
stroke: ${t.activationBorderColor};
}
.activation1 {
fill: ${t.activationBkgColor};
stroke: ${t.activationBorderColor};
}
.activation2 {
fill: ${t.activationBkgColor};
stroke: ${t.activationBorderColor};
}
.actorPopupMenu {
position: absolute;
}
.actorPopupMenuPanel {
position: absolute;
fill: ${t.actorBkg};
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));
}
.actor-man line {
stroke: ${t.actorBorder};
fill: ${t.actorBkg};
}
.actor-man circle, line {
stroke: ${t.actorBorder};
fill: ${t.actorBkg};
stroke-width: 2px;
}
`, Bf = (t) => `
defs #statediagram-barbEnd {
fill: ${t.transitionColor};
stroke: ${t.transitionColor};
}
g.stateGroup text {
fill: ${t.nodeBorder};
stroke: none;
font-size: 10px;
}
g.stateGroup text {
fill: ${t.textColor};
stroke: none;
font-size: 10px;
}
g.stateGroup .state-title {
font-weight: bolder;
fill: ${t.stateLabelColor};
}
g.stateGroup rect {
fill: ${t.mainBkg};
stroke: ${t.nodeBorder};
}
g.stateGroup line {
stroke: ${t.lineColor};
stroke-width: 1;
}
.transition {
stroke: ${t.transitionColor};
stroke-width: 1;
fill: none;
}
.stateGroup .composit {
fill: ${t.background};
border-bottom: 1px
}
.stateGroup .alt-composit {
fill: #e0e0e0;
border-bottom: 1px
}
.state-note {
stroke: ${t.noteBorderColor};
fill: ${t.noteBkgColor};
text {
fill: ${t.noteTextColor};
stroke: none;
font-size: 10px;
}
}
.stateLabel .box {
stroke: none;
stroke-width: 0;
fill: ${t.mainBkg};
opacity: 0.5;
}
.edgeLabel .label rect {
fill: ${t.labelBackgroundColor};
opacity: 0.5;
}
.edgeLabel .label text {
fill: ${t.transitionLabelColor || t.tertiaryTextColor};
}
.label div .edgeLabel {
color: ${t.transitionLabelColor || t.tertiaryTextColor};
}
.stateLabel text {
fill: ${t.stateLabelColor};
font-size: 10px;
font-weight: bold;
}
.node circle.state-start {
fill: ${t.specialStateColor};
stroke: ${t.specialStateColor};
}
.node .fork-join {
fill: ${t.specialStateColor};
stroke: ${t.specialStateColor};
}
.node circle.state-end {
fill: ${t.innerEndBackground};
stroke: ${t.background};
stroke-width: 1.5
}
.end-state-inner {
fill: ${t.compositeBackground || t.background};
// stroke: ${t.background};
stroke-width: 1.5
}
.node rect {
fill: ${t.stateBkg || t.mainBkg};
stroke: ${t.stateBorder || t.nodeBorder};
stroke-width: 1px;
}
.node polygon {
fill: ${t.mainBkg};
stroke: ${t.stateBorder || t.nodeBorder};;
stroke-width: 1px;
}
#statediagram-barbEnd {
fill: ${t.lineColor};
}
.statediagram-cluster rect {
fill: ${t.compositeTitleBackground};
stroke: ${t.stateBorder || t.nodeBorder};
stroke-width: 1px;
}
.cluster-label, .nodeLabel {
color: ${t.stateLabelColor};
}
.statediagram-cluster rect.outer {
rx: 5px;
ry: 5px;
}
.statediagram-state .divider {
stroke: ${t.stateBorder || t.nodeBorder};
}
.statediagram-state .title-state {
rx: 5px;
ry: 5px;
}
.statediagram-cluster.statediagram-cluster .inner {
fill: ${t.compositeBackground || t.background};
}
.statediagram-cluster.statediagram-cluster-alt .inner {
fill: ${t.altBackground ? t.altBackground : "#efefef"};
}
.statediagram-cluster .inner {
rx:0;
ry:0;
}
.statediagram-state rect.basic {
rx: 5px;
ry: 5px;
}
.statediagram-state rect.divider {
stroke-dasharray: 10,10;
fill: ${t.altBackground ? t.altBackground : "#efefef"};
}
.note-edge {
stroke-dasharray: 5;
}
.statediagram-note rect {
fill: ${t.noteBkgColor};
stroke: ${t.noteBorderColor};
stroke-width: 1px;
rx: 0;
ry: 0;
}
.statediagram-note rect {
fill: ${t.noteBkgColor};
stroke: ${t.noteBorderColor};
stroke-width: 1px;
rx: 0;
ry: 0;
}
.statediagram-note text {
fill: ${t.noteTextColor};
}
.statediagram-note .nodeLabel {
color: ${t.noteTextColor};
}
.statediagram .edgeLabel {
color: red; // ${t.noteTextColor};
}
#dependencyStart, #dependencyEnd {
fill: ${t.lineColor};
stroke: ${t.lineColor};
stroke-width: 1;
}
`, xA = (t) => `.label {
font-family: 'trebuchet ms', verdana, arial, sans-serif;
font-family: var(--mermaid-font-family);
color: ${t.textColor};
}
.mouth {
stroke: #666;
}
line {
stroke: ${t.textColor}
}
.legend {
fill: ${t.textColor};
}
.label text {
fill: #333;
}
.label {
color: ${t.textColor}
}
.face {
${t.faceColor ? `fill: ${t.faceColor}` : "fill: #FFF8DC"};
stroke: #999;
}
.node rect,
.node circle,
.node ellipse,
.node polygon,
.node path {
fill: ${t.mainBkg};
stroke: ${t.nodeBorder};
stroke-width: 1px;
}
.node .label {
text-align: center;
}
.node.clickable {
cursor: pointer;
}
.arrowheadPath {
fill: ${t.arrowheadColor};
}
.edgePath .path {
stroke: ${t.lineColor};
stroke-width: 1.5px;
}
.flowchart-link {
stroke: ${t.lineColor};
fill: none;
}
.edgeLabel {
background-color: ${t.edgeLabelBackground};
rect {
opacity: 0.5;
}
text-align: center;
}
.cluster rect {
}
.cluster text {
fill: ${t.titleColor};
}
div.mermaidTooltip {
position: absolute;
text-align: center;
max-width: 200px;
padding: 2px;
font-family: 'trebuchet ms', verdana, arial, sans-serif;
font-family: var(--mermaid-font-family);
font-size: 12px;
background: ${t.tertiaryColor};
border: 1px solid ${t.border2};
border-radius: 2px;
pointer-events: none;
z-index: 100;
}
.task-type-0, .section-type-0 {
${t.fillType0 ? `fill: ${t.fillType0}` : ""};
}
.task-type-1, .section-type-1 {
${t.fillType0 ? `fill: ${t.fillType1}` : ""};
}
.task-type-2, .section-type-2 {
${t.fillType0 ? `fill: ${t.fillType2}` : ""};
}
.task-type-3, .section-type-3 {
${t.fillType0 ? `fill: ${t.fillType3}` : ""};
}
.task-type-4, .section-type-4 {
${t.fillType0 ? `fill: ${t.fillType4}` : ""};
}
.task-type-5, .section-type-5 {
${t.fillType0 ? `fill: ${t.fillType5}` : ""};
}
.task-type-6, .section-type-6 {
${t.fillType0 ? `fill: ${t.fillType6}` : ""};
}
.task-type-7, .section-type-7 {
${t.fillType0 ? `fill: ${t.fillType7}` : ""};
}
.actor-0 {
${t.actor0 ? `fill: ${t.actor0}` : ""};
}
.actor-1 {
${t.actor1 ? `fill: ${t.actor1}` : ""};
}
.actor-2 {
${t.actor2 ? `fill: ${t.actor2}` : ""};
}
.actor-3 {
${t.actor3 ? `fill: ${t.actor3}` : ""};
}
.actor-4 {
${t.actor4 ? `fill: ${t.actor4}` : ""};
}
.actor-5 {
${t.actor5 ? `fill: ${t.actor5}` : ""};
}
`, kA = (t) => `.person {
stroke: ${t.personBorder};
fill: ${t.personBkg};
}
`, Nh = {
flowchart: Nf,
"flowchart-v2": Nf,
sequence: vA,
gantt: yA,
classDiagram: sc,
"classDiagram-v2": sc,
class: sc,
stateDiagram: Bf,
state: Bf,
info: mA,
pie: bA,
er: pA,
error: gA,
journey: xA,
requirement: _A,
c4: kA
}, wA = (t, e, r) => {
let n = "";
return t in Nh && Nh[t] ? n = Nh[t](r) : H.warn(`No theme found for ${t}`), ` {
font-family: ${r.fontFamily};
font-size: ${r.fontSize};
fill: ${r.textColor}
}
/* Classes common for multiple diagrams */
.error-icon {
fill: ${r.errorBkgColor};
}
.error-text {
fill: ${r.errorTextColor};
stroke: ${r.errorTextColor};
}
.edge-thickness-normal {
stroke-width: 2px;
}
.edge-thickness-thick {
stroke-width: 3.5px
}
.edge-pattern-solid {
stroke-dasharray: 0;
}
.edge-pattern-dashed{
stroke-dasharray: 3;
}
.edge-pattern-dotted {
stroke-dasharray: 2;
}
.marker {
fill: ${r.lineColor};
stroke: ${r.lineColor};
}
.marker.cross {
stroke: ${r.lineColor};
}
svg {
font-family: ${r.fontFamily};
font-size: ${r.fontSize};
}
${n}
${e}
`;
}, iK = (t, e) => {
Nh[t] = e;
}, Xl = H, aK = $b, Zo = nt, sK = (t) => li(t, Zo()), TA = a0, So = {}, Er = (t, e, r, n) => {
Xl.debug(`Registering diagram ${t}`), So[t] && Xl.warn(`Diagram ${t} already registered.`), So[t] = e, r && _4(t, r), iK(t, e.styles), typeof n < "u" && n(Xl, aK, Zo, sK, TA), Xl.debug(`Registered diagram ${t}. ${Object.keys(So).join(", ")} diagrams registered.`);
}, EA = (t) => {
if (Xl.debug(`Getting diagram ${t}. ${Object.keys(So).join(", ")} diagrams registered.`), t in So)
return So[t];
throw new CA(t);
};
class CA extends Error {
constructor(e) {
super(`Diagram ${e} not found.`);
}
}
var wb = function() {
var t = function(C, M, S, R) {
for (S = S || {}, R = C.length; R--; S[C[R]] = M)
;
return S;
}, e = [1, 4], r = [1, 7], n = [1, 5], i = [1, 9], a = [1, 6], s = [2, 6], o = [1, 16], l = [6, 8, 14, 20, 22, 24, 25, 27, 29, 32, 37, 40, 50, 54], u = [8, 14, 20, 22, 24, 25, 27, 29, 32, 37, 40], h = [8, 13, 14, 20, 22, 24, 25, 27, 29, 32, 37, 40], d = [1, 26], f = [6, 8, 14, 50, 54], p = [8, 14, 54], m = [1, 65], _ = [1, 66], y = [1, 67], b = [8, 14, 33, 35, 42, 54], x = {
trace: function() {
},
yy: {},
symbols_: { error: 2, start: 3, eol: 4, directive: 5, GG: 6, document: 7, EOF: 8, ":": 9, DIR: 10, options: 11, body: 12, OPT: 13, NL: 14, line: 15, statement: 16, commitStatement: 17, mergeStatement: 18, cherryPickStatement: 19, acc_title: 20, acc_title_value: 21, acc_descr: 22, acc_descr_value: 23, acc_descr_multiline_value: 24, section: 25, branchStatement: 26, CHECKOUT: 27, ID: 28, BRANCH: 29, ORDER: 30, NUM: 31, CHERRY_PICK: 32, COMMIT_ID: 33, STR: 34, COMMIT_TAG: 35, EMPTYSTR: 36, MERGE: 37, COMMIT_TYPE: 38, commitType: 39, COMMIT: 40, commit_arg: 41, COMMIT_MSG: 42, NORMAL: 43, REVERSE: 44, HIGHLIGHT: 45, openDirective: 46, typeDirective: 47, closeDirective: 48, argDirective: 49, open_directive: 50, type_directive: 51, arg_directive: 52, close_directive: 53, ";": 54, $accept: 0, $end: 1 },
terminals_: { 2: "error", 6: "GG", 8: "EOF", 9: ":", 10: "DIR", 13: "OPT", 14: "NL", 20: "acc_title", 21: "acc_title_value", 22: "acc_descr", 23: "acc_descr_value", 24: "acc_descr_multiline_value", 25: "section", 27: "CHECKOUT", 28: "ID", 29: "BRANCH", 30: "ORDER", 31: "NUM", 32: "CHERRY_PICK", 33: "COMMIT_ID", 34: "STR", 35: "COMMIT_TAG", 36: "EMPTYSTR", 37: "MERGE", 38: "COMMIT_TYPE", 40: "COMMIT", 42: "COMMIT_MSG", 43: "NORMAL", 44: "REVERSE", 45: "HIGHLIGHT", 50: "open_directive", 51: "type_directive", 52: "arg_directive", 53: "close_directive", 54: ";" },
productions_: [0, [3, 2], [3, 2], [3, 3], [3, 4], [3, 5], [7, 0], [7, 2], [11, 2], [11, 1], [12, 0], [12, 2], [15, 2], [15, 1], [16, 1], [16, 1], [16, 1], [16, 2], [16, 2], [16, 1], [16, 1], [16, 1], [16, 2], [26, 2], [26, 4], [19, 3], [19, 5], [19, 5], [19, 5], [19, 5], [18, 2], [18, 4], [18, 4], [18, 4], [18, 6], [18, 6], [18, 6], [18, 6], [18, 6], [18, 6], [18, 8], [18, 8], [18, 8], [18, 8], [18, 8], [18, 8], [17, 2], [17, 3], [17, 3], [17, 5], [17, 5], [17, 3], [17, 5], [17, 5], [17, 5], [17, 5], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 3], [17, 5], [17, 5], [17, 5], [17, 5], [17, 5], [17, 5], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [41, 0], [41, 1], [39, 1], [39, 1], [39, 1], [5, 3], [5, 5], [46, 1], [47, 1], [49, 1], [48, 1], [4, 1], [4, 1], [4, 1]],
performAction: function(M, S, R, A, L, v, B) {
var w = v.length - 1;
switch (L) {
case 3:
return v[w];
case 4:
return v[w - 1];
case 5:
return A.setDirection(v[w - 3]), v[w - 1];
case 7:
A.setOptions(v[w - 1]), this.$ = v[w];
break;
case 8:
v[w - 1] += v[w], this.$ = v[w - 1];
break;
case 10:
this.$ = [];
break;
case 11:
v[w - 1].push(v[w]), this.$ = v[w - 1];
break;
case 12:
this.$ = v[w - 1];
break;
case 17:
this.$ = v[w].trim(), A.setAccTitle(this.$);
break;
case 18:
case 19:
this.$ = v[w].trim(), A.setAccDescription(this.$);
break;
case 20:
A.addSection(v[w].substr(8)), this.$ = v[w].substr(8);
break;
case 22:
A.checkout(v[w]);
break;
case 23:
A.branch(v[w]);
break;
case 24:
A.branch(v[w - 2], v[w]);
break;
case 25:
A.cherryPick(v[w], "", void 0);
break;
case 26:
A.cherryPick(v[w - 2], "", v[w]);
break;
case 27:
case 29:
A.cherryPick(v[w - 2], "", "");
break;
case 28:
A.cherryPick(v[w], "", v[w - 2]);
break;
case 30:
A.merge(v[w], "", "", "");
break;
case 31:
A.merge(v[w - 2], v[w], "", "");
break;
case 32:
A.merge(v[w - 2], "", v[w], "");
break;
case 33:
A.merge(v[w - 2], "", "", v[w]);
break;
case 34:
A.merge(v[w - 4], v[w], "", v[w - 2]);
break;
case 35:
A.merge(v[w - 4], "", v[w], v[w - 2]);
break;
case 36:
A.merge(v[w - 4], "", v[w - 2], v[w]);
break;
case 37:
A.merge(v[w - 4], v[w - 2], v[w], "");
break;
case 38:
A.merge(v[w - 4], v[w - 2], "", v[w]);
break;
case 39:
A.merge(v[w - 4], v[w], v[w - 2], "");
break;
case 40:
A.merge(v[w - 6], v[w - 4], v[w - 2], v[w]);
break;
case 41:
A.merge(v[w - 6], v[w], v[w - 4], v[w - 2]);
break;
case 42:
A.merge(v[w - 6], v[w - 4], v[w], v[w - 2]);
break;
case 43:
A.merge(v[w - 6], v[w - 2], v[w - 4], v[w]);
break;
case 44:
A.merge(v[w - 6], v[w], v[w - 2], v[w - 4]);
break;
case 45:
A.merge(v[w - 6], v[w - 2], v[w], v[w - 4]);
break;
case 46:
A.commit(v[w]);
break;
case 47:
A.commit("", "", A.commitType.NORMAL, v[w]);
break;
case 48:
A.commit("", "", v[w], "");
break;
case 49:
A.commit("", "", v[w], v[w - 2]);
break;
case 50:
A.commit("", "", v[w - 2], v[w]);
break;
case 51:
A.commit("", v[w], A.commitType.NORMAL, "");
break;
case 52:
A.commit("", v[w - 2], A.commitType.NORMAL, v[w]);
break;
case 53:
A.commit("", v[w], A.commitType.NORMAL, v[w - 2]);
break;
case 54:
A.commit("", v[w - 2], v[w], "");
break;
case 55:
A.commit("", v[w], v[w - 2], "");
break;
case 56:
A.commit("", v[w - 4], v[w - 2], v[w]);
break;
case 57:
A.commit("", v[w - 4], v[w], v[w - 2]);
break;
case 58:
A.commit("", v[w - 2], v[w - 4], v[w]);
break;
case 59:
A.commit("", v[w], v[w - 4], v[w - 2]);
break;
case 60:
A.commit("", v[w], v[w - 2], v[w - 4]);
break;
case 61:
A.commit("", v[w - 2], v[w], v[w - 4]);
break;
case 62:
A.commit(v[w], "", A.commitType.NORMAL, "");
break;
case 63:
A.commit(v[w], "", A.commitType.NORMAL, v[w - 2]);
break;
case 64:
A.commit(v[w - 2], "", A.commitType.NORMAL, v[w]);
break;
case 65:
A.commit(v[w - 2], "", v[w], "");
break;
case 66:
A.commit(v[w], "", v[w - 2], "");
break;
case 67:
A.commit(v[w], v[w - 2], A.commitType.NORMAL, "");
break;
case 68:
A.commit(v[w - 2], v[w], A.commitType.NORMAL, "");
break;
case 69:
A.commit(v[w - 4], "", v[w - 2], v[w]);
break;
case 70:
A.commit(v[w - 4], "", v[w], v[w - 2]);
break;
case 71:
A.commit(v[w - 2], "", v[w - 4], v[w]);
break;
case 72:
A.commit(v[w], "", v[w - 4], v[w - 2]);
break;
case 73:
A.commit(v[w], "", v[w - 2], v[w - 4]);
break;
case 74:
A.commit(v[w - 2], "", v[w], v[w - 4]);
break;
case 75:
A.commit(v[w - 4], v[w], v[w - 2], "");
break;
case 76:
A.commit(v[w - 4], v[w - 2], v[w], "");
break;
case 77:
A.commit(v[w - 2], v[w], v[w - 4], "");
break;
case 78:
A.commit(v[w], v[w - 2], v[w - 4], "");
break;
case 79:
A.commit(v[w], v[w - 4], v[w - 2], "");
break;
case 80:
A.commit(v[w - 2], v[w - 4], v[w], "");
break;
case 81:
A.commit(v[w - 4], v[w], A.commitType.NORMAL, v[w - 2]);
break;
case 82:
A.commit(v[w - 4], v[w - 2], A.commitType.NORMAL, v[w]);
break;
case 83:
A.commit(v[w - 2], v[w], A.commitType.NORMAL, v[w - 4]);
break;
case 84:
A.commit(v[w], v[w - 2], A.commitType.NORMAL, v[w - 4]);
break;
case 85:
A.commit(v[w], v[w - 4], A.commitType.NORMAL, v[w - 2]);
break;
case 86:
A.commit(v[w - 2], v[w - 4], A.commitType.NORMAL, v[w]);
break;
case 87:
A.commit(v[w - 6], v[w - 4], v[w - 2], v[w]);
break;
case 88:
A.commit(v[w - 6], v[w - 4], v[w], v[w - 2]);
break;
case 89:
A.commit(v[w - 6], v[w - 2], v[w - 4], v[w]);
break;
case 90:
A.commit(v[w - 6], v[w], v[w - 4], v[w - 2]);
break;
case 91:
A.commit(v[w - 6], v[w - 2], v[w], v[w - 4]);
break;
case 92:
A.commit(v[w - 6], v[w], v[w - 2], v[w - 4]);
break;
case 93:
A.commit(v[w - 4], v[w - 6], v[w - 2], v[w]);
break;
case 94:
A.commit(v[w - 4], v[w - 6], v[w], v[w - 2]);
break;
case 95:
A.commit(v[w - 2], v[w - 6], v[w - 4], v[w]);
break;
case 96:
A.commit(v[w], v[w - 6], v[w - 4], v[w - 2]);
break;
case 97:
A.commit(v[w - 2], v[w - 6], v[w], v[w - 4]);
break;
case 98:
A.commit(v[w], v[w - 6], v[w - 2], v[w - 4]);
break;
case 99:
A.commit(v[w], v[w - 4], v[w - 2], v[w - 6]);
break;
case 100:
A.commit(v[w - 2], v[w - 4], v[w], v[w - 6]);
break;
case 101:
A.commit(v[w], v[w - 2], v[w - 4], v[w - 6]);
break;
case 102:
A.commit(v[w - 2], v[w], v[w - 4], v[w - 6]);
break;
case 103:
A.commit(v[w - 4], v[w - 2], v[w], v[w - 6]);
break;
case 104:
A.commit(v[w - 4], v[w], v[w - 2], v[w - 6]);
break;
case 105:
A.commit(v[w - 2], v[w - 4], v[w - 6], v[w]);
break;
case 106:
A.commit(v[w], v[w - 4], v[w - 6], v[w - 2]);
break;
case 107:
A.commit(v[w - 2], v[w], v[w - 6], v[w - 4]);
break;
case 108:
A.commit(v[w], v[w - 2], v[w - 6], v[w - 4]);
break;
case 109:
A.commit(v[w - 4], v[w - 2], v[w - 6], v[w]);
break;
case 110:
A.commit(v[w - 4], v[w], v[w - 6], v[w - 2]);
break;
case 111:
this.$ = "";
break;
case 112:
this.$ = v[w];
break;
case 113:
this.$ = A.commitType.NORMAL;
break;
case 114:
this.$ = A.commitType.REVERSE;
break;
case 115:
this.$ = A.commitType.HIGHLIGHT;
break;
case 118:
A.parseDirective("%%{", "open_directive");
break;
case 119:
A.parseDirective(v[w], "type_directive");
break;
case 120:
v[w] = v[w].trim().replace(/'/g, '"'), A.parseDirective(v[w], "arg_directive");
break;
case 121:
A.parseDirective("}%%", "close_directive", "gitGraph");
break;
}
},
table: [{ 3: 1, 4: 2, 5: 3, 6: e, 8: r, 14: n, 46: 8, 50: i, 54: a }, { 1: [3] }, { 3: 10, 4: 2, 5: 3, 6: e, 8: r, 14: n, 46: 8, 50: i, 54: a }, { 3: 11, 4: 2, 5: 3, 6: e, 8: r, 14: n, 46: 8, 50: i, 54: a }, { 7: 12, 8: s, 9: [1, 13], 10: [1, 14], 11: 15, 14: o }, t(l, [2, 122]), t(l, [2, 123]), t(l, [2, 124]), { 47: 17, 51: [1, 18] }, { 51: [2, 118] }, { 1: [2, 1] }, { 1: [2, 2] }, { 8: [1, 19] }, { 7: 20, 8: s, 11: 15, 14: o }, { 9: [1, 21] }, t(u, [2, 10], { 12: 22, 13: [1, 23] }), t(h, [2, 9]), { 9: [1, 25], 48: 24, 53: d }, t([9, 53], [2, 119]), { 1: [2, 3] }, { 8: [1, 27] }, { 7: 28, 8: s, 11: 15, 14: o }, { 8: [2, 7], 14: [1, 31], 15: 29, 16: 30, 17: 32, 18: 33, 19: 34, 20: [1, 35], 22: [1, 36], 24: [1, 37], 25: [1, 38], 26: 39, 27: [1, 40], 29: [1, 44], 32: [1, 43], 37: [1, 42], 40: [1, 41] }, t(h, [2, 8]), t(f, [2, 116]), { 49: 45, 52: [1, 46] }, t(f, [2, 121]), { 1: [2, 4] }, { 8: [1, 47] }, t(u, [2, 11]), { 4: 48, 8: r, 14: n, 54: a }, t(u, [2, 13]), t(p, [2, 14]), t(p, [2, 15]), t(p, [2, 16]), { 21: [1, 49] }, { 23: [1, 50] }, t(p, [2, 19]), t(p, [2, 20]), t(p, [2, 21]), { 28: [1, 51] }, t(p, [2, 111], { 41: 52, 33: [1, 55], 34: [1, 57], 35: [1, 53], 38: [1, 54], 42: [1, 56] }), { 28: [1, 58] }, { 33: [1, 59], 35: [1, 60] }, { 28: [1, 61] }, { 48: 62, 53: d }, { 53: [2, 120] }, { 1: [2, 5] }, t(u, [2, 12]), t(p, [2, 17]), t(p, [2, 18]), t(p, [2, 22]), t(p, [2, 46]), { 34: [1, 63] }, { 39: 64, 43: m, 44: _, 45: y }, { 34: [1, 68] }, { 34: [1, 69] }, t(p, [2, 112]), t(p, [2, 30], { 33: [1, 70], 35: [1, 72], 38: [1, 71] }), { 34: [1, 73] }, { 34: [1, 74], 36: [1, 75] }, t(p, [2, 23], { 30: [1, 76] }), t(f, [2, 117]), t(p, [2, 47], { 33: [1, 78], 38: [1, 77], 42: [1, 79] }), t(p, [2, 48], { 33: [1, 81], 35: [1, 80], 42: [1, 82] }), t(b, [2, 113]), t(b, [2, 114]), t(b, [2, 115]), t(p, [2, 51], { 35: [1, 83], 38: [1, 84], 42: [1, 85] }), t(p, [2, 62], { 33: [1, 88], 35: [1, 86], 38: [1, 87] }), { 34: [1, 89] }, { 39: 90, 43: m, 44: _, 45: y }, { 34: [1, 91] }, t(p, [2, 25], { 35: [1, 92] }), { 33: [1, 93] }, { 33: [1, 94] }, { 31: [1, 95] }, { 39: 96, 43: m, 44: _, 45: y }, { 34: [1, 97] }, { 34: [1, 98] }, { 34: [1, 99] }, { 34: [1, 100] }, { 34: [1, 101] }, { 34: [1, 102] }, { 39: 103, 43: m, 44: _, 45: y }, { 34: [1, 104] }, { 34: [1, 105] }, { 39: 106, 43: m, 44: _, 45: y }, { 34: [1, 107] }, t(p, [2, 31], { 35: [1, 109], 38: [1, 108] }), t(p, [2, 32], { 33: [1, 111], 35: [1, 110] }), t(p, [2, 33], { 33: [1, 112], 38: [1, 113] }), { 34: [1, 114], 36: [1, 115] }, { 34: [1, 116] }, { 34: [1, 117] }, t(p, [2, 24]), t(p, [2, 49], { 33: [1, 118], 42: [1, 119] }), t(p, [2, 53], { 38: [1, 120], 42: [1, 121] }), t(p, [2, 63], { 33: [1, 123], 38: [1, 122] }), t(p, [2, 50], { 33: [1, 124], 42: [1, 125] }), t(p, [2, 55], { 35: [1, 126], 42: [1, 127] }), t(p, [2, 66], { 33: [1, 129], 35: [1, 128] }), t(p, [2, 52], { 38: [1, 130], 42: [1, 131] }), t(p, [2, 54], { 35: [1, 132], 42: [1, 133] }), t(p, [2, 67], { 35: [1, 135], 38: [1, 134] }), t(p, [2, 64], { 33: [1, 137], 38: [1, 136] }), t(p, [2, 65], { 33: [1, 139], 35: [1, 138] }), t(p, [2, 68], { 35: [1, 141], 38: [1, 140] }), { 39: 142, 43: m, 44: _, 45: y }, { 34: [1, 143] }, { 34: [1, 144] }, { 34: [1, 145] }, { 34: [1, 146] }, { 39: 147, 43: m, 44: _, 45: y }, t(p, [2, 26]), t(p, [2, 27]), t(p, [2, 28]), t(p, [2, 29]), { 34: [1, 148] }, { 34: [1, 149] }, { 39: 150, 43: m, 44: _, 45: y }, { 34: [1, 151] }, { 39: 152, 43: m, 44: _, 45: y }, { 34: [1, 153] }, { 34: [1, 154] }, { 34: [1, 155] }, { 34: [1, 156] }, { 34: [1, 157] }, { 34: [1, 158] }, { 34: [1, 159] }, { 39: 160, 43: m, 44: _, 45: y }, { 34: [1, 161] }, { 34: [1, 162] }, { 34: [1, 163] }, { 39: 164, 43: m, 44: _, 45: y }, { 34: [1, 165] }, { 39: 166, 43: m, 44: _, 45: y }, { 34: [1, 167] }, { 34: [1, 168] }, { 34: [1, 169] }, { 39: 170, 43: m, 44: _, 45: y }, { 34: [1, 171] }, t(p, [2, 37], { 35: [1, 172] }), t(p, [2, 38], { 38: [1, 173] }), t(p, [2, 36], { 33: [1, 174] }), t(p, [2, 39], { 35: [1, 175] }), t(p, [2, 34], { 38: [1, 176] }), t(p, [2, 35], { 33: [1, 177] }), t(p, [2, 60], { 42: [1, 178] }), t(p, [2, 73], { 33: [1, 179] }), t(p, [2, 61], { 42: [1, 180] }), t(p, [2, 84], { 38: [1, 181] }), t(p, [2, 74], { 33: [1, 182] }), t(p, [2, 83], { 38: [1, 183] }), t(p, [2, 59], { 42: [1, 184] }), t(p, [2, 72], { 33: [1, 185] }), t(p, [2, 58], { 42: [1, 186] }), t(p, [2, 78], { 35: [1, 187] }), t(p, [2, 71], { 33: [1, 188] }), t(p, [2, 77], { 35: [1, 189] }), t(p, [2, 57], { 42: [1, 190] }), t(p, [2, 85], { 38: [1, 191] }), t(p, [2, 56], { 42: [1, 192] }), t(p, [2, 79], { 35: [1, 193] }), t(p, [2, 80], { 35: [1, 194] }), t(p, [2, 86], { 38: [1, 195] }), t(p, [2, 70], { 33: [1, 196] }), t(p, [2, 81], { 38: [1, 197] }), t(p, [2, 69], { 33: [1, 198] }), t(p, [2, 75], { 35: [1, 199] }), t(p, [2, 76], { 35: [1, 200] }), t(p, [2, 82], { 38: [1, 201] }), { 34: [1, 202] }, { 39: 203, 43: m, 44: _, 45: y }, { 34: [1, 204] }, { 34: [1, 205] }, { 39: 206, 43: m, 44: _, 45: y }, { 34: [1, 207] }, { 34: [1, 208] }, { 34: [1, 209] }, { 34: [1, 210] }, { 39: 211, 43: m, 44: _, 45: y }, { 34: [1, 212] }, { 39: 213, 43: m, 44: _, 45: y }, { 34: [1, 214] }, { 34: [1, 215] }, { 34: [1, 216] }, { 34: [1, 217] }, { 34: [1, 218] }, { 34: [1, 219] }, { 34: [1, 220] }, { 39: 221, 43: m, 44: _, 45: y }, { 34: [1, 222] }, { 34: [1, 223] }, { 34: [1, 224] }, { 39: 225, 43: m, 44: _, 45: y }, { 34: [1, 226] }, { 39: 227, 43: m, 44: _, 45: y }, { 34: [1, 228] }, { 34: [1, 229] }, { 34: [1, 230] }, { 39: 231, 43: m, 44: _, 45: y }, t(p, [2, 40]), t(p, [2, 42]), t(p, [2, 41]), t(p, [2, 43]), t(p, [2, 45]), t(p, [2, 44]), t(p, [2, 101]), t(p, [2, 102]), t(p, [2, 99]), t(p, [2, 100]), t(p, [2, 104]), t(p, [2, 103]), t(p, [2, 108]), t(p, [2, 107]), t(p, [2, 106]), t(p, [2, 105]), t(p, [2, 110]), t(p, [2, 109]), t(p, [2, 98]), t(p, [2, 97]), t(p, [2, 96]), t(p, [2, 95]), t(p, [2, 93]), t(p, [2, 94]), t(p, [2, 92]), t(p, [2, 91]), t(p, [2, 90]), t(p, [2, 89]), t(p, [2, 87]), t(p, [2, 88])],
defaultActions: { 9: [2, 118], 10: [2, 1], 11: [2, 2], 19: [2, 3], 27: [2, 4], 46: [2, 120], 47: [2, 5] },
parseError: function(M, S) {
if (S.recoverable)
this.trace(M);
else {
var R = new Error(M);
throw R.hash = S, R;
}
},
parse: function(M) {
var S = this, R = [0], A = [], L = [null], v = [], B = this.table, w = "", D = 0, N = 0, z = 2, X = 1, ct = v.slice.call(arguments, 1), J = Object.create(this.lexer), Y = { yy: {} };
for (var $ in this.yy)
Object.prototype.hasOwnProperty.call(this.yy, $) && (Y.yy[$] = this.yy[$]);
J.setInput(M, Y.yy), Y.yy.lexer = J, Y.yy.parser = this, typeof J.yylloc > "u" && (J.yylloc = {});
var lt = J.yylloc;
v.push(lt);
var ut = J.options && J.options.ranges;
typeof Y.yy.parseError == "function" ? this.parseError = Y.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
function W() {
var P;
return P = A.pop() || J.lex() || X, typeof P != "number" && (P instanceof Array && (A = P, P = A.pop()), P = S.symbols_[P] || P), P;
}
for (var tt, K, it, Z, V = {}, Q, q, U, F; ; ) {
if (K = R[R.length - 1], this.defaultActions[K] ? it = this.defaultActions[K] : ((tt === null || typeof tt > "u") && (tt = W()), it = B[K] && B[K][tt]), typeof it > "u" || !it.length || !it[0]) {
var j = "";
F = [];
for (Q in B[K])
this.terminals_[Q] && Q > z && F.push("'" + this.terminals_[Q] + "'");
J.showPosition ? j = "Parse error on line " + (D + 1) + `:
` + J.showPosition() + `
Expecting ` + F.join(", ") + ", got '" + (this.terminals_[tt] || tt) + "'" : j = "Parse error on line " + (D + 1) + ": Unexpected " + (tt == X ? "end of input" : "'" + (this.terminals_[tt] || tt) + "'"), this.parseError(j, {
text: J.match,
token: this.terminals_[tt] || tt,
line: J.yylineno,
loc: lt,
expected: F
});
}
if (it[0] instanceof Array && it.length > 1)
throw new Error("Parse Error: multiple actions possible at state: " + K + ", token: " + tt);
switch (it[0]) {
case 1:
R.push(tt), L.push(J.yytext), v.push(J.yylloc), R.push(it[1]), tt = null, N = J.yyleng, w = J.yytext, D = J.yylineno, lt = J.yylloc;
break;
case 2:
if (q = this.productions_[it[1]][1], V.$ = L[L.length - q], V._$ = {
first_line: v[v.length - (q || 1)].first_line,
last_line: v[v.length - 1].last_line,
first_column: v[v.length - (q || 1)].first_column,
last_column: v[v.length - 1].last_column
}, ut && (V._$.range = [
v[v.length - (q || 1)].range[0],
v[v.length - 1].range[1]
]), Z = this.performAction.apply(V, [
w,
N,
D,
Y.yy,
it[1],
L,
v
].concat(ct)), typeof Z < "u")
return Z;
q && (R = R.slice(0, -1 * q * 2), L = L.slice(0, -1 * q), v = v.slice(0, -1 * q)), R.push(this.productions_[it[1]][0]), L.push(V.$), v.push(V._$), U = B[R[R.length - 2]][R[R.length - 1]], R.push(U);
break;
case 3:
return !0;
}
}
return !0;
}
}, k = function() {
var C = {
EOF: 1,
parseError: function(S, R) {
if (this.yy.parser)
this.yy.parser.parseError(S, R);
else
throw new Error(S);
},
setInput: function(M, S) {
return this.yy = S || this.yy || {}, this._input = M, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
first_line: 1,
first_column: 0,
last_line: 1,
last_column: 0
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
},
input: function() {
var M = this._input[0];
this.yytext += M, this.yyleng++, this.offset++, this.match += M, this.matched += M;
var S = M.match(/(?:\r\n?|\n).*/g);
return S ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), M;
},
unput: function(M) {
var S = M.length, R = M.split(/(?:\r\n?|\n)/g);
this._input = M + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - S), this.offset -= S;
var A = this.match.split(/(?:\r\n?|\n)/g);
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), R.length - 1 && (this.yylineno -= R.length - 1);
var L = this.yylloc.range;
return this.yylloc = {
first_line: this.yylloc.first_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.first_column,
last_column: R ? (R.length === A.length ? this.yylloc.first_column : 0) + A[A.length - R.length].length - R[0].length : this.yylloc.first_column - S
}, this.options.ranges && (this.yylloc.range = [L[0], L[0] + this.yyleng - S]), this.yyleng = this.yytext.length, this;
},
more: function() {
return this._more = !0, this;
},
reject: function() {
if (this.options.backtrack_lexer)
this._backtrack = !0;
else
return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
return this;
},
less: function(M) {
this.unput(this.match.slice(M));
},
pastInput: function() {
var M = this.matched.substr(0, this.matched.length - this.match.length);
return (M.length > 20 ? "..." : "") + M.substr(-20).replace(/\n/g, "");
},
upcomingInput: function() {
var M = this.match;
return M.length < 20 && (M += this._input.substr(0, 20 - M.length)), (M.substr(0, 20) + (M.length > 20 ? "..." : "")).replace(/\n/g, "");
},
showPosition: function() {
var M = this.pastInput(), S = new Array(M.length + 1).join("-");
return M + this.upcomingInput() + `
` + S + "^";
},
test_match: function(M, S) {
var R, A, L;
if (this.options.backtrack_lexer && (L = {
yylineno: this.yylineno,
yylloc: {
first_line: this.yylloc.first_line,
last_line: this.last_line,
first_column: this.yylloc.first_column,
last_column: this.yylloc.last_column
},
yytext: this.yytext,
match: this.match,
matches: this.matches,
matched: this.matched,
yyleng: this.yyleng,
offset: this.offset,
_more: this._more,
_input: this._input,
yy: this.yy,
conditionStack: this.conditionStack.slice(0),
done: this.done
}, this.options.ranges && (L.yylloc.range = this.yylloc.range.slice(0))), A = M[0].match(/(?:\r\n?|\n).*/g), A && (this.yylineno += A.length), this.yylloc = {
first_line: this.yylloc.last_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.last_column,
last_column: A ? A[A.length - 1].length - A[A.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + M[0].length
}, this.yytext += M[0], this.match += M[0], this.matches = M, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(M[0].length), this.matched += M[0], R = this.performAction.call(this, this.yy, this, S, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), R)
return R;
if (this._backtrack) {
for (var v in L)
this[v] = L[v];
return !1;
}
return !1;
},
next: function() {
if (this.done)
return this.EOF;
this._input || (this.done = !0);
var M, S, R, A;
this._more || (this.yytext = "", this.match = "");
for (var L = this._currentRules(), v = 0; v < L.length; v++)
if (R = this._input.match(this.rules[L[v]]), R && (!S || R[0].length > S[0].length)) {
if (S = R, A = v, this.options.backtrack_lexer) {
if (M = this.test_match(R, L[v]), M !== !1)
return M;
if (this._backtrack) {
S = !1;
continue;
} else
return !1;
} else if (!this.options.flex)
break;
}
return S ? (M = this.test_match(S, L[A]), M !== !1 ? M : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
},
lex: function() {
var S = this.next();
return S || this.lex();
},
begin: function(S) {
this.conditionStack.push(S);
},
popState: function() {
var S = this.conditionStack.length - 1;
return S > 0 ? this.conditionStack.pop() : this.conditionStack[0];
},
_currentRules: function() {
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
},
topState: function(S) {
return S = this.conditionStack.length - 1 - Math.abs(S || 0), S >= 0 ? this.conditionStack[S] : "INITIAL";
},
pushState: function(S) {
this.begin(S);
},
stateStackSize: function() {
return this.conditionStack.length;
},
options: { "case-insensitive": !0 },
performAction: function(S, R, A, L) {
switch (A) {
case 0:
return this.begin("open_directive"), 50;
case 1:
return this.begin("type_directive"), 51;
case 2:
return this.popState(), this.begin("arg_directive"), 9;
case 3:
return this.popState(), this.popState(), 53;
case 4:
return 52;
case 5:
return this.begin("acc_title"), 20;
case 6:
return this.popState(), "acc_title_value";
case 7:
return this.begin("acc_descr"), 22;
case 8:
return this.popState(), "acc_descr_value";
case 9:
this.begin("acc_descr_multiline");
break;
case 10:
this.popState();
break;
case 11:
return "acc_descr_multiline_value";
case 12:
return 14;
case 13:
break;
case 14:
break;
case 15:
return 6;
case 16:
return 40;
case 17:
return 33;
case 18:
return 38;
case 19:
return 42;
case 20:
return 43;
case 21:
return 44;
case 22:
return 45;
case 23:
return 35;
case 24:
return 29;
case 25:
return 30;
case 26:
return 37;
case 27:
return 32;
case 28:
return 27;
case 29:
return 10;
case 30:
return 10;
case 31:
return 9;
case 32:
return "CARET";
case 33:
this.begin("options");
break;
case 34:
this.popState();
break;
case 35:
return 13;
case 36:
return 36;
case 37:
this.begin("string");
break;
case 38:
this.popState();
break;
case 39:
return 34;
case 40:
return 31;
case 41:
return 28;
case 42:
return 8;
}
},
rules: [/^(?:%%\{)/i, /^(?:((?:(?!\}%%)[^:.])*))/i, /^(?::)/i, /^(?:\}%%)/i, /^(?:((?:(?!\}%%).|\n)*))/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:(\r?\n)+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:gitGraph\b)/i, /^(?:commit(?=\s|$))/i, /^(?:id:)/i, /^(?:type:)/i, /^(?:msg:)/i, /^(?:NORMAL\b)/i, /^(?:REVERSE\b)/i, /^(?:HIGHLIGHT\b)/i, /^(?:tag:)/i, /^(?:branch(?=\s|$))/i, /^(?:order:)/i, /^(?:merge(?=\s|$))/i, /^(?:cherry-pick(?=\s|$))/i, /^(?:checkout(?=\s|$))/i, /^(?:LR\b)/i, /^(?:BT\b)/i, /^(?::)/i, /^(?:\^)/i, /^(?:options\r?\n)/i, /^(?:[ \r\n\t]+end\b)/i, /^(?:[\s\S]+(?=[ \r\n\t]+end))/i, /^(?:["]["])/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[0-9]+(?=\s|$))/i, /^(?:\w([-\./\w]*[-\w])?)/i, /^(?:$)/i, /^(?:\s+)/i],
conditions: { acc_descr_multiline: { rules: [10, 11], inclusive: !1 }, acc_descr: { rules: [8], inclusive: !1 }, acc_title: { rules: [6], inclusive: !1 }, close_directive: { rules: [], inclusive: !1 }, arg_directive: { rules: [3, 4], inclusive: !1 }, type_directive: { rules: [2, 3], inclusive: !1 }, open_directive: { rules: [1], inclusive: !1 }, options: { rules: [34, 35], inclusive: !1 }, string: { rules: [38, 39], inclusive: !1 }, INITIAL: { rules: [0, 5, 7, 9, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 36, 37, 40, 41, 42, 43], inclusive: !0 } }
};
return C;
}();
x.lexer = k;
function T() {
this.yy = {};
}
return T.prototype = x, x.Parser = T, new T();
}();
wb.parser = wb;
const oK = (t) => t.match(/^\s*gitGraph/) !== null;
let A4 = "", s0 = "", M4 = "";
const L4 = (t) => li(t, nt()), pi = function() {
A4 = "", M4 = "", s0 = "";
}, zn = function(t) {
A4 = L4(t).replace(/^\s+/g, "");
}, gi = function() {
return A4 || s0;
}, yi = function(t) {
M4 = L4(t).replace(/\n\s+/g, `
`);
}, mi = function() {
return M4;
}, o0 = function(t) {
s0 = L4(t);
}, l0 = function() {
return s0;
};
let Df = nt().gitGraph.mainBranchName, lK = nt().gitGraph.mainBranchOrder, xr = {}, rn = null, Oc = {};
Oc[Df] = { name: Df, order: lK };
let yr = {};
yr[Df] = rn;
let Cr = Df, SA = "LR", Vs = 0;
function R4() {
return tA({ length: 7 });
}
const cK = function(t, e, r) {
sr.parseDirective(this, t, e, r);
};
function uK(t, e) {
const r = /* @__PURE__ */ Object.create(null);
return t.reduce((n, i) => {
const a = e(i);
return r[a] || (r[a] = !0, n.push(i)), n;
}, []);
}
const hK = function(t) {
SA = t;
};
let AA = {};
const fK = function(t) {
H.debug("options str", t), t = t && t.trim(), t = t || "{}";
try {
AA = JSON.parse(t);
} catch (e) {
H.error("error while parsing gitGraph options", e.message);
}
}, dK = function() {
return AA;
}, pK = function(t, e, r, n) {
H.debug("Entering commit:", t, e, r, n), e = pe.sanitizeText(e, nt()), t = pe.sanitizeText(t, nt()), n = pe.sanitizeText(n, nt());
const i = {
id: e || Vs + "-" + R4(),
message: t,
seq: Vs++,
type: r || Fc.NORMAL,
tag: n || "",
parents: rn == null ? [] : [rn.id],
branch: Cr
};
rn = i, xr[i.id] = i, yr[Cr] = i.id, H.debug("in pushCommit " + i.id);
}, gK = function(t, e) {
if (t = pe.sanitizeText(t, nt()), typeof yr[t] > "u")
yr[t] = rn != null ? rn.id : null, Oc[t] = { name: t, order: e ? parseInt(e, 10) : null }, MA(t), H.debug("in createBranch");
else {
let r = new Error(
'Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ' + t + '")'
);
throw r.hash = {
text: "branch " + t,
token: "branch " + t,
line: "1",
loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
expected: ['"checkout ' + t + '"']
}, r;
}
}, yK = function(t, e, r, n) {
t = pe.sanitizeText(t, nt()), e = pe.sanitizeText(e, nt());
const i = xr[yr[Cr]], a = xr[yr[t]];
if (Cr === t) {
let o = new Error('Incorrect usage of "merge". Cannot merge a branch to itself');
throw o.hash = {
text: "merge " + t,
token: "merge " + t,
line: "1",
loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
expected: ["branch abc"]
}, o;
} else if (typeof i > "u" || !i) {
let o = new Error(
'Incorrect usage of "merge". Current branch (' + Cr + ")has no commits"
);
throw o.hash = {
text: "merge " + t,
token: "merge " + t,
line: "1",
loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
expected: ["commit"]
}, o;
} else if (typeof yr[t] > "u") {
let o = new Error(
'Incorrect usage of "merge". Branch to be merged (' + t + ") does not exist"
);
throw o.hash = {
text: "merge " + t,
token: "merge " + t,
line: "1",
loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
expected: ["branch " + t]
}, o;
} else if (typeof a > "u" || !a) {
let o = new Error(
'Incorrect usage of "merge". Branch to be merged (' + t + ") has no commits"
);
throw o.hash = {
text: "merge " + t,
token: "merge " + t,
line: "1",
loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
expected: ['"commit"']
}, o;
} else if (i === a) {
let o = new Error('Incorrect usage of "merge". Both branches have same head');
throw o.hash = {
text: "merge " + t,
token: "merge " + t,
line: "1",
loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
expected: ["branch abc"]
}, o;
} else if (e && typeof xr[e] < "u") {
let o = new Error(
'Incorrect usage of "merge". Commit with id:' + e + " already exists, use different custom Id"
);
throw o.hash = {
text: "merge " + t + e + r + n,
token: "merge " + t + e + r + n,
line: "1",
loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
expected: [
"merge " + t + " " + e + "_UNIQUE " + r + " " + n
]
}, o;
}
const s = {
id: e || Vs + "-" + R4(),
message: "merged branch " + t + " into " + Cr,
seq: Vs++,
parents: [rn == null ? null : rn.id, yr[t]],
branch: Cr,
type: Fc.MERGE,
customType: r,
customId: !!e,
tag: n || ""
};
rn = s, xr[s.id] = s, yr[Cr] = s.id, H.debug(yr), H.debug("in mergeBranch");
}, mK = function(t, e, r) {
if (H.debug("Entering cherryPick:", t, e, r), t = pe.sanitizeText(t, nt()), e = pe.sanitizeText(e, nt()), r = pe.sanitizeText(r, nt()), !t || typeof xr[t] > "u") {
let a = new Error(
'Incorrect usage of "cherryPick". Source commit id should exist and provided'
);
throw a.hash = {
text: "cherryPick " + t + " " + e,
token: "cherryPick " + t + " " + e,
line: "1",
loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
expected: ["cherry-pick abc"]
}, a;
}
let n = xr[t], i = n.branch;
if (n.type === Fc.MERGE) {
let a = new Error(
'Incorrect usage of "cherryPick". Source commit should not be a merge commit'
);
throw a.hash = {
text: "cherryPick " + t + " " + e,
token: "cherryPick " + t + " " + e,
line: "1",
loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
expected: ["cherry-pick abc"]
}, a;
}
if (!e || typeof xr[e] > "u") {
if (i === Cr) {
let o = new Error(
'Incorrect usage of "cherryPick". Source commit is already on current branch'
);
throw o.hash = {
text: "cherryPick " + t + " " + e,
token: "cherryPick " + t + " " + e,
line: "1",
loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
expected: ["cherry-pick abc"]
}, o;
}
const a = xr[yr[Cr]];
if (typeof a > "u" || !a) {
let o = new Error(
'Incorrect usage of "cherry-pick". Current branch (' + Cr + ")has no commits"
);
throw o.hash = {
text: "cherryPick " + t + " " + e,
token: "cherryPick " + t + " " + e,
line: "1",
loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
expected: ["cherry-pick abc"]
}, o;
}
const s = {
id: Vs + "-" + R4(),
message: "cherry-picked " + n + " into " + Cr,
seq: Vs++,
parents: [rn == null ? null : rn.id, n.id],
branch: Cr,
type: Fc.CHERRY_PICK,
tag: r != null ? r : "cherry-pick:" + n.id
};
rn = s, xr[s.id] = s, yr[Cr] = s.id, H.debug(yr), H.debug("in cherryPick");
}
}, MA = function(t) {
if (t = pe.sanitizeText(t, nt()), typeof yr[t] > "u") {
let e = new Error(
'Trying to checkout branch which is not yet created. (Help try using "branch ' + t + '")'
);
throw e.hash = {
text: "checkout " + t,
token: "checkout " + t,
line: "1",
loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
expected: ['"branch ' + t + '"']
}, e;
} else {
Cr = t;
const e = yr[Cr];
rn = xr[e];
}
};
function T6(t, e, r) {
const n = t.indexOf(e);
n === -1 ? t.push(r) : t.splice(n, 1, r);
}
function LA(t) {
const e = t.reduce((i, a) => i.seq > a.seq ? i : a, t[0]);
let r = "";
t.forEach(function(i) {
i === e ? r += " *" : r += " |";
});
const n = [r, e.id, e.seq];
for (let i in yr)
yr[i] === e.id && n.push(i);
if (H.debug(n.join(" ")), e.parents && e.parents.length == 2) {
const i = xr[e.parents[0]];
T6(t, e, i), t.push(xr[e.parents[1]]);
} else {
if (e.parents.length == 0)
return;
{
const i = xr[e.parents];
T6(t, e, i);
}
}
t = uK(t, (i) => i.id), LA(t);
}
const bK = function() {
H.debug(xr);
const t = RA()[0];
LA([t]);
}, _K = function() {
xr = {}, rn = null;
let t = nt().gitGraph.mainBranchName, e = nt().gitGraph.mainBranchOrder;
yr = {}, yr[t] = null, Oc = {}, Oc[t] = { name: t, order: e }, Cr = t, Vs = 0, pi();
}, vK = function() {
return Object.values(Oc).map((e, r) => e.order !== null ? e : {
...e,
order: parseFloat(`0.${r}`, 10)
}).sort((e, r) => e.order - r.order).map(({ name: e }) => ({ name: e }));
}, xK = function() {
return yr;
}, kK = function() {
return xr;
}, RA = function() {
const t = Object.keys(xr).map(function(e) {
return xr[e];
});
return t.forEach(function(e) {
H.debug(e.id);
}), t.sort((e, r) => e.seq - r.seq), t;
}, wK = function() {
return Cr;
}, TK = function() {
return SA;
}, EK = function() {
return rn;
}, Fc = {
NORMAL: 0,
REVERSE: 1,
HIGHLIGHT: 2,
MERGE: 3,
CHERRY_PICK: 4
}, CK = {
parseDirective: cK,
getConfig: () => nt().gitGraph,
setDirection: hK,
setOptions: fK,
getOptions: dK,
commit: pK,
branch: gK,
merge: yK,
cherryPick: mK,
checkout: MA,
prettyPrint: bK,
clear: _K,
getBranchesAsObjArray: vK,
getBranches: xK,
getCommits: kK,
getCommitsArray: RA,
getCurrentBranch: wK,
getDirection: TK,
getHead: EK,
setAccTitle: zn,
getAccTitle: gi,
getAccDescription: mi,
setAccDescription: yi,
commitType: Fc
};
function vn(t, e, r) {
if (typeof e.insert > "u")
return;
let n = t.getAccTitle(), i = t.getAccDescription();
e.attr("role", "img").attr("aria-labelledby", "chart-title-" + r + " chart-desc-" + r), e.insert("desc", ":first-child").attr("id", "chart-desc-" + r).text(i), e.insert("title", ":first-child").attr("id", "chart-title-" + r).text(n);
}
let Kl = {};
const Tn = {
NORMAL: 0,
REVERSE: 1,
HIGHLIGHT: 2,
MERGE: 3,
CHERRY_PICK: 4
}, _s = 8;
let gn = {}, Of = {}, oc = [], Ff = 0;
const SK = () => {
gn = {}, Of = {}, Kl = {}, Ff = 0, oc = [];
}, AK = (t) => {
const e = document.createElementNS("http://www.w3.org/2000/svg", "text");
let r = [];
typeof t == "string" ? r = t.split(/\\n|\n|
/gi) : Array.isArray(t) ? r = t : r = [];
for (let n = 0; n < r.length; n++) {
const i = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
i.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), i.setAttribute("dy", "1em"), i.setAttribute("x", "0"), i.setAttribute("class", "row"), i.textContent = r[n].trim(), e.appendChild(i);
}
return e;
}, E6 = (t, e, r) => {
const n = Zo().gitGraph, i = t.append("g").attr("class", "commit-bullets"), a = t.append("g").attr("class", "commit-labels");
let s = 0;
Object.keys(e).sort((u, h) => e[u].seq - e[h].seq).forEach((u) => {
const h = e[u], d = gn[h.branch].pos, f = s + 10;
if (r) {
let p, m = typeof h.customType < "u" && h.customType !== "" ? h.customType : h.type;
switch (m) {
case Tn.NORMAL:
p = "commit-normal";
break;
case Tn.REVERSE:
p = "commit-reverse";
break;
case Tn.HIGHLIGHT:
p = "commit-highlight";
break;
case Tn.MERGE:
p = "commit-merge";
break;
case Tn.CHERRY_PICK:
p = "commit-cherry-pick";
break;
default:
p = "commit-normal";
}
if (m === Tn.HIGHLIGHT) {
const _ = i.append("rect");
_.attr("x", f - 10), _.attr("y", d - 10), _.attr("height", 20), _.attr("width", 20), _.attr(
"class",
`commit ${h.id} commit-highlight${gn[h.branch].index % _s} ${p}-outer`
), i.append("rect").attr("x", f - 6).attr("y", d - 6).attr("height", 12).attr("width", 12).attr(
"class",
`commit ${h.id} commit${gn[h.branch].index % _s} ${p}-inner`
);
} else if (m === Tn.CHERRY_PICK)
i.append("circle").attr("cx", f).attr("cy", d).attr("r", 10).attr("class", `commit ${h.id} ${p}`), i.append("circle").attr("cx", f - 3).attr("cy", d + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${h.id} ${p}`), i.append("circle").attr("cx", f + 3).attr("cy", d + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${h.id} ${p}`), i.append("line").attr("x1", f + 3).attr("y1", d + 1).attr("x2", f).attr("y2", d - 5).attr("stroke", "#fff").attr("class", `commit ${h.id} ${p}`), i.append("line").attr("x1", f - 3).attr("y1", d + 1).attr("x2", f).attr("y2", d - 5).attr("stroke", "#fff").attr("class", `commit ${h.id} ${p}`);
else {
const _ = i.append("circle");
if (_.attr("cx", f), _.attr("cy", d), _.attr("r", h.type === Tn.MERGE ? 9 : 10), _.attr(
"class",
`commit ${h.id} commit${gn[h.branch].index % _s}`
), m === Tn.MERGE) {
const y = i.append("circle");
y.attr("cx", f), y.attr("cy", d), y.attr("r", 6), y.attr(
"class",
`commit ${p} ${h.id} commit${gn[h.branch].index % _s}`
);
}
m === Tn.REVERSE && i.append("path").attr("d", `M ${f - 5},${d - 5}L${f + 5},${d + 5}M${f - 5},${d + 5}L${f + 5},${d - 5}`).attr(
"class",
`commit ${p} ${h.id} commit${gn[h.branch].index % _s}`
);
}
}
if (Of[h.id] = { x: s + 10, y: d }, r) {
if (h.type !== Tn.CHERRY_PICK && (h.customId && h.type === Tn.MERGE || h.type !== Tn.MERGE) && n.showCommitLabel) {
const _ = a.append("g"), y = _.insert("rect").attr("class", "commit-label-bkg"), b = _.append("text").attr("x", s).attr("y", d + 25).attr("class", "commit-label").text(h.id);
let x = b.node().getBBox();
if (y.attr("x", s + 10 - x.width / 2 - 2).attr("y", d + 13.5).attr("width", x.width + 2 * 2).attr("height", x.height + 2 * 2), b.attr("x", s + 10 - x.width / 2), n.rotateCommitLabel) {
let k = -7.5 - (x.width + 10) / 25 * 9.5, T = 10 + x.width / 25 * 8.5;
_.attr(
"transform",
"translate(" + k + ", " + T + ") rotate(" + -45 + ", " + s + ", " + d + ")"
);
}
}
if (h.tag) {
const _ = a.insert("polygon"), y = a.append("circle"), b = a.append("text").attr("y", d - 16).attr("class", "tag-label").text(h.tag);
let x = b.node().getBBox();
b.attr("x", s + 10 - x.width / 2);
const k = x.height / 2, T = d - 19.2;
_.attr("class", "tag-label-bkg").attr(
"points",
`
${s - x.width / 2 - 4 / 2},${T + 2}
${s - x.width / 2 - 4 / 2},${T - 2}
${s + 10 - x.width / 2 - 4},${T - k - 2}
${s + 10 + x.width / 2 + 4},${T - k - 2}
${s + 10 + x.width / 2 + 4},${T + k + 2}
${s + 10 - x.width / 2 - 4},${T + k + 2}`
), y.attr("cx", s - x.width / 2 + 4 / 2).attr("cy", T).attr("r", 1.5).attr("class", "tag-hole");
}
}
s += 50, s > Ff && (Ff = s);
});
}, MK = (t, e, r) => Object.keys(r).filter((a) => r[a].branch === e.branch && r[a].seq > t.seq && r[a].seq < e.seq).length > 0, Tb = (t, e, r) => {
const n = r || 0, i = t + Math.abs(t - e) / 2;
if (n > 5)
return i;
let a = !0;
for (let o = 0; o < oc.length; o++)
Math.abs(oc[o] - i) < 10 && (a = !1);
if (a)
return oc.push(i), i;
const s = Math.abs(t - e);
return Tb(t, e - s / 5, n + 1);
}, LK = (t, e, r, n) => {
const i = Of[e.id], a = Of[r.id], s = MK(e, r, n);
let o = "", l = "", u = 0, h = 0, d = gn[r.branch].index, f;
if (s) {
o = "A 10 10, 0, 0, 0,", l = "A 10 10, 0, 0, 1,", u = 10, h = 10, d = gn[r.branch].index;
const p = i.y < a.y ? Tb(i.y, a.y) : Tb(a.y, i.y);
i.y < a.y ? f = `M ${i.x} ${i.y} L ${i.x} ${p - u} ${o} ${i.x + h} ${p} L ${a.x - u} ${p} ${l} ${a.x} ${p + h} L ${a.x} ${a.y}` : f = `M ${i.x} ${i.y} L ${i.x} ${p + u} ${l} ${i.x + h} ${p} L ${a.x - u} ${p} ${o} ${a.x} ${p - h} L ${a.x} ${a.y}`;
} else
i.y < a.y && (o = "A 20 20, 0, 0, 0,", u = 20, h = 20, d = gn[r.branch].index, f = `M ${i.x} ${i.y} L ${i.x} ${a.y - u} ${o} ${i.x + h} ${a.y} L ${a.x} ${a.y}`), i.y > a.y && (o = "A 20 20, 0, 0, 0,", u = 20, h = 20, d = gn[e.branch].index, f = `M ${i.x} ${i.y} L ${a.x - u} ${i.y} ${o} ${a.x} ${i.y - h} L ${a.x} ${a.y}`), i.y === a.y && (d = gn[e.branch].index, f = `M ${i.x} ${i.y} L ${i.x} ${a.y - u} ${o} ${i.x + h} ${a.y} L ${a.x} ${a.y}`);
t.append("path").attr("d", f).attr("class", "arrow arrow" + d % _s);
}, RK = (t, e) => {
const r = t.append("g").attr("class", "commit-arrows");
Object.keys(e).forEach((n) => {
const i = e[n];
i.parents && i.parents.length > 0 && i.parents.forEach((a) => {
LK(r, e[a], i, e);
});
});
}, IK = (t, e) => {
const r = Zo().gitGraph, n = t.append("g");
e.forEach((i, a) => {
const s = a % _s, o = gn[i.name].pos, l = n.append("line");
l.attr("x1", 0), l.attr("y1", o), l.attr("x2", Ff), l.attr("y2", o), l.attr("class", "branch branch" + s), oc.push(o);
let u = i.name;
const h = AK(u), d = n.insert("rect"), p = n.insert("g").attr("class", "branchLabel").insert("g").attr("class", "label branch-label" + s);
p.node().appendChild(h);
let m = h.getBBox();
d.attr("class", "branchLabelBkg label" + s).attr("rx", 4).attr("ry", 4).attr("x", -m.width - 4 - (r.rotateCommitLabel === !0 ? 30 : 0)).attr("y", -m.height / 2 + 8).attr("width", m.width + 18).attr("height", m.height + 4), p.attr(
"transform",
"translate(" + (-m.width - 14 - (r.rotateCommitLabel === !0 ? 30 : 0)) + ", " + (o - m.height / 2 - 1) + ")"
), d.attr("transform", "translate(" + -19 + ", " + (o - m.height / 2) + ")");
});
}, NK = function(t, e, r, n) {
SK();
const i = Zo(), a = Zo().gitGraph;
H.debug("in gitgraph renderer", t + `
`, "id:", e, r), Kl = n.db.getCommits();
const s = n.db.getBranchesAsObjArray();
let o = 0;
s.forEach((u, h) => {
gn[u.name] = { pos: o, index: h }, o += 50 + (a.rotateCommitLabel ? 40 : 0);
});
const l = St(`[id="${e}"]`);
vn(n.db, l, e), E6(l, Kl, !1), a.showBranches && IK(l, s), RK(l, Kl), E6(l, Kl, !0), TA(void 0, l, a.diagramPadding, i.useMaxWidth);
}, BK = {
draw: NK
}, DK = (t) => `
.commit-id,
.commit-msg,
.branch-label {
fill: lightgrey;
color: lightgrey;
font-family: 'trebuchet ms', verdana, arial, sans-serif;
font-family: var(--mermaid-font-family);
}
${[0, 1, 2, 3, 4, 5, 6, 7].map(
(e) => `
.branch-label${e} { fill: ${t["gitBranchLabel" + e]}; }
.commit${e} { stroke: ${t["git" + e]}; fill: ${t["git" + e]}; }
.commit-highlight${e} { stroke: ${t["gitInv" + e]}; fill: ${t["gitInv" + e]}; }
.label${e} { fill: ${t["git" + e]}; }
.arrow${e} { stroke: ${t["git" + e]}; }
`
).join(`
`)}
.branch {
stroke-width: 1;
stroke: ${t.lineColor};
stroke-dasharray: 2;
}
.commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};}
.commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; }
.tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};}
.tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; }
.tag-hole { fill: ${t.textColor}; }
.commit-merge {
stroke: ${t.primaryColor};
fill: ${t.primaryColor};
}
.commit-reverse {
stroke: ${t.primaryColor};
fill: ${t.primaryColor};
stroke-width: 3;
}
.commit-highlight-outer {
}
.commit-highlight-inner {
stroke: ${t.primaryColor};
fill: ${t.primaryColor};
}
.arrow { stroke-width: 8; stroke-linecap: round; fill: none}
}
`;
var Pc = function() {
var t = function(zt, wt, bt, Et) {
for (bt = bt || {}, Et = zt.length; Et--; bt[zt[Et]] = wt)
;
return bt;
}, e = [1, 6], r = [1, 7], n = [1, 8], i = [1, 9], a = [1, 16], s = [1, 11], o = [1, 12], l = [1, 13], u = [1, 14], h = [1, 15], d = [1, 27], f = [1, 33], p = [1, 34], m = [1, 35], _ = [1, 36], y = [1, 37], b = [1, 72], x = [1, 73], k = [1, 74], T = [1, 75], C = [1, 76], M = [1, 77], S = [1, 78], R = [1, 38], A = [1, 39], L = [1, 40], v = [1, 41], B = [1, 42], w = [1, 43], D = [1, 44], N = [1, 45], z = [1, 46], X = [1, 47], ct = [1, 48], J = [1, 49], Y = [1, 50], $ = [1, 51], lt = [1, 52], ut = [1, 53], W = [1, 54], tt = [1, 55], K = [1, 56], it = [1, 57], Z = [1, 59], V = [1, 60], Q = [1, 61], q = [1, 62], U = [1, 63], F = [1, 64], j = [1, 65], P = [1, 66], et = [1, 67], at = [1, 68], It = [1, 69], Lt = [24, 52], Rt = [24, 44, 46, 47, 48, 49, 50, 51, 52, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84], Ct = [15, 24, 44, 46, 47, 48, 49, 50, 51, 52, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84], pt = [1, 94], mt = [1, 95], _t = [1, 96], Tt = [1, 97], ft = [15, 24, 52], le = [7, 8, 9, 10, 18, 22, 25, 26, 27, 28], Dt = [15, 24, 43, 52], Ht = [15, 24, 43, 52, 86, 87, 89, 90], $t = [15, 43], Qt = [44, 46, 47, 48, 49, 50, 51, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84], we = {
trace: function() {
},
yy: {},
symbols_: { error: 2, start: 3, mermaidDoc: 4, direction: 5, directive: 6, direction_tb: 7, direction_bt: 8, direction_rl: 9, direction_lr: 10, graphConfig: 11, openDirective: 12, typeDirective: 13, closeDirective: 14, NEWLINE: 15, ":": 16, argDirective: 17, open_directive: 18, type_directive: 19, arg_directive: 20, close_directive: 21, C4_CONTEXT: 22, statements: 23, EOF: 24, C4_CONTAINER: 25, C4_COMPONENT: 26, C4_DYNAMIC: 27, C4_DEPLOYMENT: 28, otherStatements: 29, diagramStatements: 30, otherStatement: 31, title: 32, accDescription: 33, acc_title: 34, acc_title_value: 35, acc_descr: 36, acc_descr_value: 37, acc_descr_multiline_value: 38, boundaryStatement: 39, boundaryStartStatement: 40, boundaryStopStatement: 41, boundaryStart: 42, LBRACE: 43, ENTERPRISE_BOUNDARY: 44, attributes: 45, SYSTEM_BOUNDARY: 46, BOUNDARY: 47, CONTAINER_BOUNDARY: 48, NODE: 49, NODE_L: 50, NODE_R: 51, RBRACE: 52, diagramStatement: 53, PERSON: 54, PERSON_EXT: 55, SYSTEM: 56, SYSTEM_DB: 57, SYSTEM_QUEUE: 58, SYSTEM_EXT: 59, SYSTEM_EXT_DB: 60, SYSTEM_EXT_QUEUE: 61, CONTAINER: 62, CONTAINER_DB: 63, CONTAINER_QUEUE: 64, CONTAINER_EXT: 65, CONTAINER_EXT_DB: 66, CONTAINER_EXT_QUEUE: 67, COMPONENT: 68, COMPONENT_DB: 69, COMPONENT_QUEUE: 70, COMPONENT_EXT: 71, COMPONENT_EXT_DB: 72, COMPONENT_EXT_QUEUE: 73, REL: 74, BIREL: 75, REL_U: 76, REL_D: 77, REL_L: 78, REL_R: 79, REL_B: 80, REL_INDEX: 81, UPDATE_EL_STYLE: 82, UPDATE_REL_STYLE: 83, UPDATE_LAYOUT_CONFIG: 84, attribute: 85, STR: 86, STR_KEY: 87, STR_VALUE: 88, ATTRIBUTE: 89, ATTRIBUTE_EMPTY: 90, $accept: 0, $end: 1 },
terminals_: { 2: "error", 7: "direction_tb", 8: "direction_bt", 9: "direction_rl", 10: "direction_lr", 15: "NEWLINE", 16: ":", 18: "open_directive", 19: "type_directive", 20: "arg_directive", 21: "close_directive", 22: "C4_CONTEXT", 24: "EOF", 25: "C4_CONTAINER", 26: "C4_COMPONENT", 27: "C4_DYNAMIC", 28: "C4_DEPLOYMENT", 32: "title", 33: "accDescription", 34: "acc_title", 35: "acc_title_value", 36: "acc_descr", 37: "acc_descr_value", 38: "acc_descr_multiline_value", 43: "LBRACE", 44: "ENTERPRISE_BOUNDARY", 46: "SYSTEM_BOUNDARY", 47: "BOUNDARY", 48: "CONTAINER_BOUNDARY", 49: "NODE", 50: "NODE_L", 51: "NODE_R", 52: "RBRACE", 54: "PERSON", 55: "PERSON_EXT", 56: "SYSTEM", 57: "SYSTEM_DB", 58: "SYSTEM_QUEUE", 59: "SYSTEM_EXT", 60: "SYSTEM_EXT_DB", 61: "SYSTEM_EXT_QUEUE", 62: "CONTAINER", 63: "CONTAINER_DB", 64: "CONTAINER_QUEUE", 65: "CONTAINER_EXT", 66: "CONTAINER_EXT_DB", 67: "CONTAINER_EXT_QUEUE", 68: "COMPONENT", 69: "COMPONENT_DB", 70: "COMPONENT_QUEUE", 71: "COMPONENT_EXT", 72: "COMPONENT_EXT_DB", 73: "COMPONENT_EXT_QUEUE", 74: "REL", 75: "BIREL", 76: "REL_U", 77: "REL_D", 78: "REL_L", 79: "REL_R", 80: "REL_B", 81: "REL_INDEX", 82: "UPDATE_EL_STYLE", 83: "UPDATE_REL_STYLE", 84: "UPDATE_LAYOUT_CONFIG", 86: "STR", 87: "STR_KEY", 88: "STR_VALUE", 89: "ATTRIBUTE", 90: "ATTRIBUTE_EMPTY" },
productions_: [0, [3, 1], [3, 1], [3, 2], [5, 1], [5, 1], [5, 1], [5, 1], [4, 1], [6, 4], [6, 6], [12, 1], [13, 1], [17, 1], [14, 1], [11, 4], [11, 4], [11, 4], [11, 4], [11, 4], [23, 1], [23, 1], [23, 2], [29, 1], [29, 2], [29, 3], [31, 1], [31, 1], [31, 2], [31, 2], [31, 1], [39, 3], [40, 3], [40, 3], [40, 4], [42, 2], [42, 2], [42, 2], [42, 2], [42, 2], [42, 2], [42, 2], [41, 1], [30, 1], [30, 2], [30, 3], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 1], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [45, 1], [45, 2], [85, 1], [85, 2], [85, 1], [85, 1]],
performAction: function(wt, bt, Et, kt, Ut, gt, he) {
var yt = gt.length - 1;
switch (Ut) {
case 4:
kt.setDirection("TB");
break;
case 5:
kt.setDirection("BT");
break;
case 6:
kt.setDirection("RL");
break;
case 7:
kt.setDirection("LR");
break;
case 11:
kt.parseDirective("%%{", "open_directive");
break;
case 12:
break;
case 13:
gt[yt] = gt[yt].trim().replace(/'/g, '"'), kt.parseDirective(gt[yt], "arg_directive");
break;
case 14:
kt.parseDirective("}%%", "close_directive", "c4Context");
break;
case 15:
case 16:
case 17:
case 18:
case 19:
kt.setC4Type(gt[yt - 3]);
break;
case 26:
kt.setTitle(gt[yt].substring(6)), this.$ = gt[yt].substring(6);
break;
case 27:
kt.setAccDescription(gt[yt].substring(15)), this.$ = gt[yt].substring(15);
break;
case 28:
this.$ = gt[yt].trim(), kt.setTitle(this.$);
break;
case 29:
case 30:
this.$ = gt[yt].trim(), kt.setAccDescription(this.$);
break;
case 35:
case 36:
gt[yt].splice(2, 0, "ENTERPRISE"), kt.addPersonOrSystemBoundary(...gt[yt]), this.$ = gt[yt];
break;
case 37:
kt.addPersonOrSystemBoundary(...gt[yt]), this.$ = gt[yt];
break;
case 38:
gt[yt].splice(2, 0, "CONTAINER"), kt.addContainerBoundary(...gt[yt]), this.$ = gt[yt];
break;
case 39:
kt.addDeploymentNode("node", ...gt[yt]), this.$ = gt[yt];
break;
case 40:
kt.addDeploymentNode("nodeL", ...gt[yt]), this.$ = gt[yt];
break;
case 41:
kt.addDeploymentNode("nodeR", ...gt[yt]), this.$ = gt[yt];
break;
case 42:
kt.popBoundaryParseStack();
break;
case 46:
kt.addPersonOrSystem("person", ...gt[yt]), this.$ = gt[yt];
break;
case 47:
kt.addPersonOrSystem("external_person", ...gt[yt]), this.$ = gt[yt];
break;
case 48:
kt.addPersonOrSystem("system", ...gt[yt]), this.$ = gt[yt];
break;
case 49:
kt.addPersonOrSystem("system_db", ...gt[yt]), this.$ = gt[yt];
break;
case 50:
kt.addPersonOrSystem("system_queue", ...gt[yt]), this.$ = gt[yt];
break;
case 51:
kt.addPersonOrSystem("external_system", ...gt[yt]), this.$ = gt[yt];
break;
case 52:
kt.addPersonOrSystem("external_system_db", ...gt[yt]), this.$ = gt[yt];
break;
case 53:
kt.addPersonOrSystem("external_system_queue", ...gt[yt]), this.$ = gt[yt];
break;
case 54:
kt.addContainer("container", ...gt[yt]), this.$ = gt[yt];
break;
case 55:
kt.addContainer("container_db", ...gt[yt]), this.$ = gt[yt];
break;
case 56:
kt.addContainer("container_queue", ...gt[yt]), this.$ = gt[yt];
break;
case 57:
kt.addContainer("external_container", ...gt[yt]), this.$ = gt[yt];
break;
case 58:
kt.addContainer("external_container_db", ...gt[yt]), this.$ = gt[yt];
break;
case 59:
kt.addContainer("external_container_queue", ...gt[yt]), this.$ = gt[yt];
break;
case 60:
kt.addComponent("component", ...gt[yt]), this.$ = gt[yt];
break;
case 61:
kt.addComponent("component_db", ...gt[yt]), this.$ = gt[yt];
break;
case 62:
kt.addComponent("component_queue", ...gt[yt]), this.$ = gt[yt];
break;
case 63:
kt.addComponent("external_component", ...gt[yt]), this.$ = gt[yt];
break;
case 64:
kt.addComponent("external_component_db", ...gt[yt]), this.$ = gt[yt];
break;
case 65:
kt.addComponent("external_component_queue", ...gt[yt]), this.$ = gt[yt];
break;
case 67:
kt.addRel("rel", ...gt[yt]), this.$ = gt[yt];
break;
case 68:
kt.addRel("birel", ...gt[yt]), this.$ = gt[yt];
break;
case 69:
kt.addRel("rel_u", ...gt[yt]), this.$ = gt[yt];
break;
case 70:
kt.addRel("rel_d", ...gt[yt]), this.$ = gt[yt];
break;
case 71:
kt.addRel("rel_l", ...gt[yt]), this.$ = gt[yt];
break;
case 72:
kt.addRel("rel_r", ...gt[yt]), this.$ = gt[yt];
break;
case 73:
kt.addRel("rel_b", ...gt[yt]), this.$ = gt[yt];
break;
case 74:
gt[yt].splice(0, 1), kt.addRel("rel", ...gt[yt]), this.$ = gt[yt];
break;
case 75:
kt.updateElStyle("update_el_style", ...gt[yt]), this.$ = gt[yt];
break;
case 76:
kt.updateRelStyle("update_rel_style", ...gt[yt]), this.$ = gt[yt];
break;
case 77:
kt.updateLayoutConfig("update_layout_config", ...gt[yt]), this.$ = gt[yt];
break;
case 78:
this.$ = [gt[yt]];
break;
case 79:
gt[yt].unshift(gt[yt - 1]), this.$ = gt[yt];
break;
case 80:
case 82:
this.$ = gt[yt].trim();
break;
case 81:
let re = {};
re[gt[yt - 1].trim()] = gt[yt].trim(), this.$ = re;
break;
case 83:
this.$ = "";
break;
}
},
table: [{ 3: 1, 4: 2, 5: 3, 6: 4, 7: e, 8: r, 9: n, 10: i, 11: 5, 12: 10, 18: a, 22: s, 25: o, 26: l, 27: u, 28: h }, { 1: [3] }, { 1: [2, 1] }, { 1: [2, 2] }, { 3: 17, 4: 2, 5: 3, 6: 4, 7: e, 8: r, 9: n, 10: i, 11: 5, 12: 10, 18: a, 22: s, 25: o, 26: l, 27: u, 28: h }, { 1: [2, 8] }, { 1: [2, 4] }, { 1: [2, 5] }, { 1: [2, 6] }, { 1: [2, 7] }, { 13: 18, 19: [1, 19] }, { 15: [1, 20] }, { 15: [1, 21] }, { 15: [1, 22] }, { 15: [1, 23] }, { 15: [1, 24] }, { 19: [2, 11] }, { 1: [2, 3] }, { 14: 25, 16: [1, 26], 21: d }, t([16, 21], [2, 12]), { 23: 28, 29: 29, 30: 30, 31: 31, 32: f, 33: p, 34: m, 36: _, 38: y, 39: 58, 40: 70, 42: 71, 44: b, 46: x, 47: k, 48: T, 49: C, 50: M, 51: S, 53: 32, 54: R, 55: A, 56: L, 57: v, 58: B, 59: w, 60: D, 61: N, 62: z, 63: X, 64: ct, 65: J, 66: Y, 67: $, 68: lt, 69: ut, 70: W, 71: tt, 72: K, 73: it, 74: Z, 75: V, 76: Q, 77: q, 78: U, 79: F, 80: j, 81: P, 82: et, 83: at, 84: It }, { 23: 79, 29: 29, 30: 30, 31: 31, 32: f, 33: p, 34: m, 36: _, 38: y, 39: 58, 40: 70, 42: 71, 44: b, 46: x, 47: k, 48: T, 49: C, 50: M, 51: S, 53: 32, 54: R, 55: A, 56: L, 57: v, 58: B, 59: w, 60: D, 61: N, 62: z, 63: X, 64: ct, 65: J, 66: Y, 67: $, 68: lt, 69: ut, 70: W, 71: tt, 72: K, 73: it, 74: Z, 75: V, 76: Q, 77: q, 78: U, 79: F, 80: j, 81: P, 82: et, 83: at, 84: It }, { 23: 80, 29: 29, 30: 30, 31: 31, 32: f, 33: p, 34: m, 36: _, 38: y, 39: 58, 40: 70, 42: 71, 44: b, 46: x, 47: k, 48: T, 49: C, 50: M, 51: S, 53: 32, 54: R, 55: A, 56: L, 57: v, 58: B, 59: w, 60: D, 61: N, 62: z, 63: X, 64: ct, 65: J, 66: Y, 67: $, 68: lt, 69: ut, 70: W, 71: tt, 72: K, 73: it, 74: Z, 75: V, 76: Q, 77: q, 78: U, 79: F, 80: j, 81: P, 82: et, 83: at, 84: It }, { 23: 81, 29: 29, 30: 30, 31: 31, 32: f, 33: p, 34: m, 36: _, 38: y, 39: 58, 40: 70, 42: 71, 44: b, 46: x, 47: k, 48: T, 49: C, 50: M, 51: S, 53: 32, 54: R, 55: A, 56: L, 57: v, 58: B, 59: w, 60: D, 61: N, 62: z, 63: X, 64: ct, 65: J, 66: Y, 67: $, 68: lt, 69: ut, 70: W, 71: tt, 72: K, 73: it, 74: Z, 75: V, 76: Q, 77: q, 78: U, 79: F, 80: j, 81: P, 82: et, 83: at, 84: It }, { 23: 82, 29: 29, 30: 30, 31: 31, 32: f, 33: p, 34: m, 36: _, 38: y, 39: 58, 40: 70, 42: 71, 44: b, 46: x, 47: k, 48: T, 49: C, 50: M, 51: S, 53: 32, 54: R, 55: A, 56: L, 57: v, 58: B, 59: w, 60: D, 61: N, 62: z, 63: X, 64: ct, 65: J, 66: Y, 67: $, 68: lt, 69: ut, 70: W, 71: tt, 72: K, 73: it, 74: Z, 75: V, 76: Q, 77: q, 78: U, 79: F, 80: j, 81: P, 82: et, 83: at, 84: It }, { 15: [1, 83] }, { 17: 84, 20: [1, 85] }, { 15: [2, 14] }, { 24: [1, 86] }, t(Lt, [2, 20], { 53: 32, 39: 58, 40: 70, 42: 71, 30: 87, 44: b, 46: x, 47: k, 48: T, 49: C, 50: M, 51: S, 54: R, 55: A, 56: L, 57: v, 58: B, 59: w, 60: D, 61: N, 62: z, 63: X, 64: ct, 65: J, 66: Y, 67: $, 68: lt, 69: ut, 70: W, 71: tt, 72: K, 73: it, 74: Z, 75: V, 76: Q, 77: q, 78: U, 79: F, 80: j, 81: P, 82: et, 83: at, 84: It }), t(Lt, [2, 21]), t(Rt, [2, 23], { 15: [1, 88] }), t(Lt, [2, 43], { 15: [1, 89] }), t(Ct, [2, 26]), t(Ct, [2, 27]), { 35: [1, 90] }, { 37: [1, 91] }, t(Ct, [2, 30]), { 45: 92, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 98, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 99, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 100, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 101, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 102, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 103, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 104, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 105, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 106, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 107, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 108, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 109, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 110, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 111, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 112, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 113, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 114, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 115, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 116, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, t(ft, [2, 66]), { 45: 117, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 118, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 119, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 120, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 121, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 122, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 123, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 124, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 125, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 126, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 127, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 30: 128, 39: 58, 40: 70, 42: 71, 44: b, 46: x, 47: k, 48: T, 49: C, 50: M, 51: S, 53: 32, 54: R, 55: A, 56: L, 57: v, 58: B, 59: w, 60: D, 61: N, 62: z, 63: X, 64: ct, 65: J, 66: Y, 67: $, 68: lt, 69: ut, 70: W, 71: tt, 72: K, 73: it, 74: Z, 75: V, 76: Q, 77: q, 78: U, 79: F, 80: j, 81: P, 82: et, 83: at, 84: It }, { 15: [1, 130], 43: [1, 129] }, { 45: 131, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 132, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 133, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 134, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 135, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 136, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 45: 137, 85: 93, 86: pt, 87: mt, 89: _t, 90: Tt }, { 24: [1, 138] }, { 24: [1, 139] }, { 24: [1, 140] }, { 24: [1, 141] }, t(le, [2, 9]), { 14: 142, 21: d }, { 21: [2, 13] }, { 1: [2, 15] }, t(Lt, [2, 22]), t(Rt, [2, 24], { 31: 31, 29: 143, 32: f, 33: p, 34: m, 36: _, 38: y }), t(Lt, [2, 44], { 29: 29, 30: 30, 31: 31, 53: 32, 39: 58, 40: 70, 42: 71, 23: 144, 32: f, 33: p, 34: m, 36: _, 38: y, 44: b, 46: x, 47: k, 48: T, 49: C, 50: M, 51: S, 54: R, 55: A, 56: L, 57: v, 58: B, 59: w, 60: D, 61: N, 62: z, 63: X, 64: ct, 65: J, 66: Y, 67: $, 68: lt, 69: ut, 70: W, 71: tt, 72: K, 73: it, 74: Z, 75: V, 76: Q, 77: q, 78: U, 79: F, 80: j, 81: P, 82: et, 83: at, 84: It }), t(Ct, [2, 28]), t(Ct, [2, 29]), t(ft, [2, 46]), t(Dt, [2, 78], { 85: 93, 45: 145, 86: pt, 87: mt, 89: _t, 90: Tt }), t(Ht, [2, 80]), { 88: [1, 146] }, t(Ht, [2, 82]), t(Ht, [2, 83]), t(ft, [2, 47]), t(ft, [2, 48]), t(ft, [2, 49]), t(ft, [2, 50]), t(ft, [2, 51]), t(ft, [2, 52]), t(ft, [2, 53]), t(ft, [2, 54]), t(ft, [2, 55]), t(ft, [2, 56]), t(ft, [2, 57]), t(ft, [2, 58]), t(ft, [2, 59]), t(ft, [2, 60]), t(ft, [2, 61]), t(ft, [2, 62]), t(ft, [2, 63]), t(ft, [2, 64]), t(ft, [2, 65]), t(ft, [2, 67]), t(ft, [2, 68]), t(ft, [2, 69]), t(ft, [2, 70]), t(ft, [2, 71]), t(ft, [2, 72]), t(ft, [2, 73]), t(ft, [2, 74]), t(ft, [2, 75]), t(ft, [2, 76]), t(ft, [2, 77]), { 41: 147, 52: [1, 148] }, { 15: [1, 149] }, { 43: [1, 150] }, t($t, [2, 35]), t($t, [2, 36]), t($t, [2, 37]), t($t, [2, 38]), t($t, [2, 39]), t($t, [2, 40]), t($t, [2, 41]), { 1: [2, 16] }, { 1: [2, 17] }, { 1: [2, 18] }, { 1: [2, 19] }, { 15: [1, 151] }, t(Rt, [2, 25]), t(Lt, [2, 45]), t(Dt, [2, 79]), t(Ht, [2, 81]), t(ft, [2, 31]), t(ft, [2, 42]), t(Qt, [2, 32]), t(Qt, [2, 33], { 15: [1, 152] }), t(le, [2, 10]), t(Qt, [2, 34])],
defaultActions: { 2: [2, 1], 3: [2, 2], 5: [2, 8], 6: [2, 4], 7: [2, 5], 8: [2, 6], 9: [2, 7], 16: [2, 11], 17: [2, 3], 27: [2, 14], 85: [2, 13], 86: [2, 15], 138: [2, 16], 139: [2, 17], 140: [2, 18], 141: [2, 19] },
parseError: function(wt, bt) {
if (bt.recoverable)
this.trace(wt);
else {
var Et = new Error(wt);
throw Et.hash = bt, Et;
}
},
parse: function(wt) {
var bt = this, Et = [0], kt = [], Ut = [null], gt = [], he = this.table, yt = "", re = 0, _e = 0, ge = 2, be = 1, Te = gt.slice.call(arguments, 1), Wt = Object.create(this.lexer), ae = { yy: {} };
for (var ye in this.yy)
Object.prototype.hasOwnProperty.call(this.yy, ye) && (ae.yy[ye] = this.yy[ye]);
Wt.setInput(wt, ae.yy), ae.yy.lexer = Wt, ae.yy.parser = this, typeof Wt.yylloc > "u" && (Wt.yylloc = {});
var ue = Wt.yylloc;
gt.push(ue);
var Ui = Wt.options && Wt.options.ranges;
typeof ae.yy.parseError == "function" ? this.parseError = ae.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
function Or() {
var Jt;
return Jt = kt.pop() || Wt.lex() || be, typeof Jt != "number" && (Jt instanceof Array && (kt = Jt, Jt = kt.pop()), Jt = bt.symbols_[Jt] || Jt), Jt;
}
for (var Ie, se, $e, _r, He = {}, Xe, qt, st, At; ; ) {
if (se = Et[Et.length - 1], this.defaultActions[se] ? $e = this.defaultActions[se] : ((Ie === null || typeof Ie > "u") && (Ie = Or()), $e = he[se] && he[se][Ie]), typeof $e > "u" || !$e.length || !$e[0]) {
var Nt = "";
At = [];
for (Xe in he[se])
this.terminals_[Xe] && Xe > ge && At.push("'" + this.terminals_[Xe] + "'");
Wt.showPosition ? Nt = "Parse error on line " + (re + 1) + `:
` + Wt.showPosition() + `
Expecting ` + At.join(", ") + ", got '" + (this.terminals_[Ie] || Ie) + "'" : Nt = "Parse error on line " + (re + 1) + ": Unexpected " + (Ie == be ? "end of input" : "'" + (this.terminals_[Ie] || Ie) + "'"), this.parseError(Nt, {
text: Wt.match,
token: this.terminals_[Ie] || Ie,
line: Wt.yylineno,
loc: ue,
expected: At
});
}
if ($e[0] instanceof Array && $e.length > 1)
throw new Error("Parse Error: multiple actions possible at state: " + se + ", token: " + Ie);
switch ($e[0]) {
case 1:
Et.push(Ie), Ut.push(Wt.yytext), gt.push(Wt.yylloc), Et.push($e[1]), Ie = null, _e = Wt.yyleng, yt = Wt.yytext, re = Wt.yylineno, ue = Wt.yylloc;
break;
case 2:
if (qt = this.productions_[$e[1]][1], He.$ = Ut[Ut.length - qt], He._$ = {
first_line: gt[gt.length - (qt || 1)].first_line,
last_line: gt[gt.length - 1].last_line,
first_column: gt[gt.length - (qt || 1)].first_column,
last_column: gt[gt.length - 1].last_column
}, Ui && (He._$.range = [
gt[gt.length - (qt || 1)].range[0],
gt[gt.length - 1].range[1]
]), _r = this.performAction.apply(He, [
yt,
_e,
re,
ae.yy,
$e[1],
Ut,
gt
].concat(Te)), typeof _r < "u")
return _r;
qt && (Et = Et.slice(0, -1 * qt * 2), Ut = Ut.slice(0, -1 * qt), gt = gt.slice(0, -1 * qt)), Et.push(this.productions_[$e[1]][0]), Ut.push(He.$), gt.push(He._$), st = he[Et[Et.length - 2]][Et[Et.length - 1]], Et.push(st);
break;
case 3:
return !0;
}
}
return !0;
}
}, Gt = function() {
var zt = {
EOF: 1,
parseError: function(bt, Et) {
if (this.yy.parser)
this.yy.parser.parseError(bt, Et);
else
throw new Error(bt);
},
setInput: function(wt, bt) {
return this.yy = bt || this.yy || {}, this._input = wt, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
first_line: 1,
first_column: 0,
last_line: 1,
last_column: 0
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
},
input: function() {
var wt = this._input[0];
this.yytext += wt, this.yyleng++, this.offset++, this.match += wt, this.matched += wt;
var bt = wt.match(/(?:\r\n?|\n).*/g);
return bt ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), wt;
},
unput: function(wt) {
var bt = wt.length, Et = wt.split(/(?:\r\n?|\n)/g);
this._input = wt + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - bt), this.offset -= bt;
var kt = this.match.split(/(?:\r\n?|\n)/g);
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), Et.length - 1 && (this.yylineno -= Et.length - 1);
var Ut = this.yylloc.range;
return this.yylloc = {
first_line: this.yylloc.first_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.first_column,
last_column: Et ? (Et.length === kt.length ? this.yylloc.first_column : 0) + kt[kt.length - Et.length].length - Et[0].length : this.yylloc.first_column - bt
}, this.options.ranges && (this.yylloc.range = [Ut[0], Ut[0] + this.yyleng - bt]), this.yyleng = this.yytext.length, this;
},
more: function() {
return this._more = !0, this;
},
reject: function() {
if (this.options.backtrack_lexer)
this._backtrack = !0;
else
return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
return this;
},
less: function(wt) {
this.unput(this.match.slice(wt));
},
pastInput: function() {
var wt = this.matched.substr(0, this.matched.length - this.match.length);
return (wt.length > 20 ? "..." : "") + wt.substr(-20).replace(/\n/g, "");
},
upcomingInput: function() {
var wt = this.match;
return wt.length < 20 && (wt += this._input.substr(0, 20 - wt.length)), (wt.substr(0, 20) + (wt.length > 20 ? "..." : "")).replace(/\n/g, "");
},
showPosition: function() {
var wt = this.pastInput(), bt = new Array(wt.length + 1).join("-");
return wt + this.upcomingInput() + `
` + bt + "^";
},
test_match: function(wt, bt) {
var Et, kt, Ut;
if (this.options.backtrack_lexer && (Ut = {
yylineno: this.yylineno,
yylloc: {
first_line: this.yylloc.first_line,
last_line: this.last_line,
first_column: this.yylloc.first_column,
last_column: this.yylloc.last_column
},
yytext: this.yytext,
match: this.match,
matches: this.matches,
matched: this.matched,
yyleng: this.yyleng,
offset: this.offset,
_more: this._more,
_input: this._input,
yy: this.yy,
conditionStack: this.conditionStack.slice(0),
done: this.done
}, this.options.ranges && (Ut.yylloc.range = this.yylloc.range.slice(0))), kt = wt[0].match(/(?:\r\n?|\n).*/g), kt && (this.yylineno += kt.length), this.yylloc = {
first_line: this.yylloc.last_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.last_column,
last_column: kt ? kt[kt.length - 1].length - kt[kt.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + wt[0].length
}, this.yytext += wt[0], this.match += wt[0], this.matches = wt, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(wt[0].length), this.matched += wt[0], Et = this.performAction.call(this, this.yy, this, bt, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), Et)
return Et;
if (this._backtrack) {
for (var gt in Ut)
this[gt] = Ut[gt];
return !1;
}
return !1;
},
next: function() {
if (this.done)
return this.EOF;
this._input || (this.done = !0);
var wt, bt, Et, kt;
this._more || (this.yytext = "", this.match = "");
for (var Ut = this._currentRules(), gt = 0; gt < Ut.length; gt++)
if (Et = this._input.match(this.rules[Ut[gt]]), Et && (!bt || Et[0].length > bt[0].length)) {
if (bt = Et, kt = gt, this.options.backtrack_lexer) {
if (wt = this.test_match(Et, Ut[gt]), wt !== !1)
return wt;
if (this._backtrack) {
bt = !1;
continue;
} else
return !1;
} else if (!this.options.flex)
break;
}
return bt ? (wt = this.test_match(bt, Ut[kt]), wt !== !1 ? wt : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
},
lex: function() {
var bt = this.next();
return bt || this.lex();
},
begin: function(bt) {
this.conditionStack.push(bt);
},
popState: function() {
var bt = this.conditionStack.length - 1;
return bt > 0 ? this.conditionStack.pop() : this.conditionStack[0];
},
_currentRules: function() {
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
},
topState: function(bt) {
return bt = this.conditionStack.length - 1 - Math.abs(bt || 0), bt >= 0 ? this.conditionStack[bt] : "INITIAL";
},
pushState: function(bt) {
this.begin(bt);
},
stateStackSize: function() {
return this.conditionStack.length;
},
options: {},
performAction: function(bt, Et, kt, Ut) {
switch (kt) {
case 0:
return this.begin("open_directive"), 18;
case 1:
return 7;
case 2:
return 8;
case 3:
return 9;
case 4:
return 10;
case 5:
return this.begin("type_directive"), 19;
case 6:
return this.popState(), this.begin("arg_directive"), 16;
case 7:
return this.popState(), this.popState(), 21;
case 8:
return 20;
case 9:
return 32;
case 10:
return 33;
case 11:
return this.begin("acc_title"), 34;
case 12:
return this.popState(), "acc_title_value";
case 13:
return this.begin("acc_descr"), 36;
case 14:
return this.popState(), "acc_descr_value";
case 15:
this.begin("acc_descr_multiline");
break;
case 16:
this.popState();
break;
case 17:
return "acc_descr_multiline_value";
case 18:
break;
case 19:
c;
break;
case 20:
return 15;
case 21:
break;
case 22:
return 22;
case 23:
return 25;
case 24:
return 26;
case 25:
return 27;
case 26:
return 28;
case 27:
return this.begin("person_ext"), 55;
case 28:
return this.begin("person"), 54;
case 29:
return this.begin("system_ext_queue"), 61;
case 30:
return this.begin("system_ext_db"), 60;
case 31:
return this.begin("system_ext"), 59;
case 32:
return this.begin("system_queue"), 58;
case 33:
return this.begin("system_db"), 57;
case 34:
return this.begin("system"), 56;
case 35:
return this.begin("boundary"), 47;
case 36:
return this.begin("enterprise_boundary"), 44;
case 37:
return this.begin("system_boundary"), 46;
case 38:
return this.begin("container_ext_queue"), 67;
case 39:
return this.begin("container_ext_db"), 66;
case 40:
return this.begin("container_ext"), 65;
case 41:
return this.begin("container_queue"), 64;
case 42:
return this.begin("container_db"), 63;
case 43:
return this.begin("container"), 62;
case 44:
return this.begin("container_boundary"), 48;
case 45:
return this.begin("component_ext_queue"), 73;
case 46:
return this.begin("component_ext_db"), 72;
case 47:
return this.begin("component_ext"), 71;
case 48:
return this.begin("component_queue"), 70;
case 49:
return this.begin("component_db"), 69;
case 50:
return this.begin("component"), 68;
case 51:
return this.begin("node"), 49;
case 52:
return this.begin("node"), 49;
case 53:
return this.begin("node_l"), 50;
case 54:
return this.begin("node_r"), 51;
case 55:
return this.begin("rel"), 74;
case 56:
return this.begin("birel"), 75;
case 57:
return this.begin("rel_u"), 76;
case 58:
return this.begin("rel_u"), 76;
case 59:
return this.begin("rel_d"), 77;
case 60:
return this.begin("rel_d"), 77;
case 61:
return this.begin("rel_l"), 78;
case 62:
return this.begin("rel_l"), 78;
case 63:
return this.begin("rel_r"), 79;
case 64:
return this.begin("rel_r"), 79;
case 65:
return this.begin("rel_b"), 80;
case 66:
return this.begin("rel_index"), 81;
case 67:
return this.begin("update_el_style"), 82;
case 68:
return this.begin("update_rel_style"), 83;
case 69:
return this.begin("update_layout_config"), 84;
case 70:
return "EOF_IN_STRUCT";
case 71:
return this.begin("attribute"), "ATTRIBUTE_EMPTY";
case 72:
this.begin("attribute");
break;
case 73:
this.popState(), this.popState();
break;
case 74:
return 90;
case 75:
break;
case 76:
return 90;
case 77:
this.begin("string");
break;
case 78:
this.popState();
break;
case 79:
return "STR";
case 80:
this.begin("string_kv");
break;
case 81:
return this.begin("string_kv_key"), "STR_KEY";
case 82:
this.popState(), this.begin("string_kv_value");
break;
case 83:
return "STR_VALUE";
case 84:
this.popState(), this.popState();
break;
case 85:
return "STR";
case 86:
return "LBRACE";
case 87:
return "RBRACE";
case 88:
return "SPACE";
case 89:
return "EOL";
case 90:
return 24;
}
},
rules: [/^(?:%%\{)/, /^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:((?:(?!\}%%)[^:.])*))/, /^(?::)/, /^(?:\}%%)/, /^(?:((?:(?!\}%%).|\n)*))/, /^(?:title\s[^#\n;]+)/, /^(?:accDescription\s[^#\n;]+)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/, /^(?:%%[^\n]*(\r?\n)*)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:C4Context\b)/, /^(?:C4Container\b)/, /^(?:C4Component\b)/, /^(?:C4Dynamic\b)/, /^(?:C4Deployment\b)/, /^(?:Person_Ext\b)/, /^(?:Person\b)/, /^(?:SystemQueue_Ext\b)/, /^(?:SystemDb_Ext\b)/, /^(?:System_Ext\b)/, /^(?:SystemQueue\b)/, /^(?:SystemDb\b)/, /^(?:System\b)/, /^(?:Boundary\b)/, /^(?:Enterprise_Boundary\b)/, /^(?:System_Boundary\b)/, /^(?:ContainerQueue_Ext\b)/, /^(?:ContainerDb_Ext\b)/, /^(?:Container_Ext\b)/, /^(?:ContainerQueue\b)/, /^(?:ContainerDb\b)/, /^(?:Container\b)/, /^(?:Container_Boundary\b)/, /^(?:ComponentQueue_Ext\b)/, /^(?:ComponentDb_Ext\b)/, /^(?:Component_Ext\b)/, /^(?:ComponentQueue\b)/, /^(?:ComponentDb\b)/, /^(?:Component\b)/, /^(?:Deployment_Node\b)/, /^(?:Node\b)/, /^(?:Node_L\b)/, /^(?:Node_R\b)/, /^(?:Rel\b)/, /^(?:BiRel\b)/, /^(?:Rel_Up\b)/, /^(?:Rel_U\b)/, /^(?:Rel_Down\b)/, /^(?:Rel_D\b)/, /^(?:Rel_Left\b)/, /^(?:Rel_L\b)/, /^(?:Rel_Right\b)/, /^(?:Rel_R\b)/, /^(?:Rel_Back\b)/, /^(?:RelIndex\b)/, /^(?:UpdateElementStyle\b)/, /^(?:UpdateRelStyle\b)/, /^(?:UpdateLayoutConfig\b)/, /^(?:$)/, /^(?:[(][ ]*[,])/, /^(?:[(])/, /^(?:[)])/, /^(?:,,)/, /^(?:,)/, /^(?:[ ]*["]["])/, /^(?:[ ]*["])/, /^(?:["])/, /^(?:[^"]*)/, /^(?:[ ]*[\$])/, /^(?:[^=]*)/, /^(?:[=][ ]*["])/, /^(?:[^"]+)/, /^(?:["])/, /^(?:[^,]+)/, /^(?:\{)/, /^(?:\})/, /^(?:[\s]+)/, /^(?:[\n\r]+)/, /^(?:$)/],
conditions: { acc_descr_multiline: { rules: [16, 17], inclusive: !1 }, acc_descr: { rules: [14], inclusive: !1 }, acc_title: { rules: [12], inclusive: !1 }, close_directive: { rules: [], inclusive: !1 }, arg_directive: { rules: [7, 8], inclusive: !1 }, type_directive: { rules: [6, 7], inclusive: !1 }, open_directive: { rules: [5], inclusive: !1 }, string_kv_value: { rules: [83, 84], inclusive: !1 }, string_kv_key: { rules: [82], inclusive: !1 }, string_kv: { rules: [81], inclusive: !1 }, string: { rules: [78, 79], inclusive: !1 }, attribute: { rules: [73, 74, 75, 76, 77, 80, 85], inclusive: !1 }, update_layout_config: { rules: [70, 71, 72, 73], inclusive: !1 }, update_rel_style: { rules: [70, 71, 72, 73], inclusive: !1 }, update_el_style: { rules: [70, 71, 72, 73], inclusive: !1 }, rel_b: { rules: [70, 71, 72, 73], inclusive: !1 }, rel_r: { rules: [70, 71, 72, 73], inclusive: !1 }, rel_l: { rules: [70, 71, 72, 73], inclusive: !1 }, rel_d: { rules: [70, 71, 72, 73], inclusive: !1 }, rel_u: { rules: [70, 71, 72, 73], inclusive: !1 }, rel_bi: { rules: [], inclusive: !1 }, rel: { rules: [70, 71, 72, 73], inclusive: !1 }, node_r: { rules: [70, 71, 72, 73], inclusive: !1 }, node_l: { rules: [70, 71, 72, 73], inclusive: !1 }, node: { rules: [70, 71, 72, 73], inclusive: !1 }, index: { rules: [], inclusive: !1 }, rel_index: { rules: [70, 71, 72, 73], inclusive: !1 }, component_ext_queue: { rules: [], inclusive: !1 }, component_ext_db: { rules: [70, 71, 72, 73], inclusive: !1 }, component_ext: { rules: [70, 71, 72, 73], inclusive: !1 }, component_queue: { rules: [70, 71, 72, 73], inclusive: !1 }, component_db: { rules: [70, 71, 72, 73], inclusive: !1 }, component: { rules: [70, 71, 72, 73], inclusive: !1 }, container_boundary: { rules: [70, 71, 72, 73], inclusive: !1 }, container_ext_queue: { rules: [], inclusive: !1 }, container_ext_db: { rules: [70, 71, 72, 73], inclusive: !1 }, container_ext: { rules: [70, 71, 72, 73], inclusive: !1 }, container_queue: { rules: [70, 71, 72, 73], inclusive: !1 }, container_db: { rules: [70, 71, 72, 73], inclusive: !1 }, container: { rules: [70, 71, 72, 73], inclusive: !1 }, birel: { rules: [70, 71, 72, 73], inclusive: !1 }, system_boundary: { rules: [70, 71, 72, 73], inclusive: !1 }, enterprise_boundary: { rules: [70, 71, 72, 73], inclusive: !1 }, boundary: { rules: [70, 71, 72, 73], inclusive: !1 }, system_ext_queue: { rules: [70, 71, 72, 73], inclusive: !1 }, system_ext_db: { rules: [70, 71, 72, 73], inclusive: !1 }, system_ext: { rules: [70, 71, 72, 73], inclusive: !1 }, system_queue: { rules: [70, 71, 72, 73], inclusive: !1 }, system_db: { rules: [70, 71, 72, 73], inclusive: !1 }, system: { rules: [70, 71, 72, 73], inclusive: !1 }, person_ext: { rules: [70, 71, 72, 73], inclusive: !1 }, person: { rules: [70, 71, 72, 73], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 9, 10, 11, 13, 15, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 86, 87, 88, 89, 90], inclusive: !0 } }
};
return zt;
}();
we.lexer = Gt;
function Ft() {
this.yy = {};
}
return Ft.prototype = we, we.Parser = Ft, new Ft();
}();
Pc.parser = Pc;
const OK = (t) => t.match(/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/) !== null;
let ci = [], Ya = [""], nn = "global", ii = "", Fi = [
{
alias: "global",
label: { text: "global" },
type: { text: "global" },
tags: null,
link: null,
parentBoundary: ""
}
], qc = [], I4 = "", N4 = !1, Pf = 4, qf = 2;
var IA;
const FK = function() {
return IA;
}, PK = function(t) {
IA = li(t, nt());
}, qK = function(t, e, r) {
sr.parseDirective(this, t, e, r);
}, VK = function(t, e, r, n, i, a, s, o, l) {
if (t == null || e === void 0 || e === null || r === void 0 || r === null || n === void 0 || n === null)
return;
let u = {};
const h = qc.find((d) => d.from === e && d.to === r);
if (h ? u = h : qc.push(u), u.type = t, u.from = e, u.to = r, u.label = { text: n }, i == null)
u.techn = { text: "" };
else if (typeof i == "object") {
let [d, f] = Object.entries(i)[0];
u[d] = { text: f };
} else
u.techn = { text: i };
if (a == null)
u.descr = { text: "" };
else if (typeof a == "object") {
let [d, f] = Object.entries(a)[0];
u[d] = { text: f };
} else
u.descr = { text: a };
if (typeof s == "object") {
let [d, f] = Object.entries(s)[0];
u[d] = f;
} else
u.sprite = s;
if (typeof o == "object") {
let [d, f] = Object.entries(o)[0];
u[d] = f;
} else
u.tags = o;
if (typeof l == "object") {
let [d, f] = Object.entries(l)[0];
u[d] = f;
} else
u.link = l;
u.wrap = is();
}, zK = function(t, e, r, n, i, a, s) {
if (e === null || r === null)
return;
let o = {};
const l = ci.find((u) => u.alias === e);
if (l && e === l.alias ? o = l : (o.alias = e, ci.push(o)), r == null ? o.label = { text: "" } : o.label = { text: r }, n == null)
o.descr = { text: "" };
else if (typeof n == "object") {
let [u, h] = Object.entries(n)[0];
o[u] = { text: h };
} else
o.descr = { text: n };
if (typeof i == "object") {
let [u, h] = Object.entries(i)[0];
o[u] = h;
} else
o.sprite = i;
if (typeof a == "object") {
let [u, h] = Object.entries(a)[0];
o[u] = h;
} else
o.tags = a;
if (typeof s == "object") {
let [u, h] = Object.entries(s)[0];
o[u] = h;
} else
o.link = s;
o.typeC4Shape = { text: t }, o.parentBoundary = nn, o.wrap = is();
}, YK = function(t, e, r, n, i, a, s, o) {
if (e === null || r === null)
return;
let l = {};
const u = ci.find((h) => h.alias === e);
if (u && e === u.alias ? l = u : (l.alias = e, ci.push(l)), r == null ? l.label = { text: "" } : l.label = { text: r }, n == null)
l.techn = { text: "" };
else if (typeof n == "object") {
let [h, d] = Object.entries(n)[0];
l[h] = { text: d };
} else
l.techn = { text: n };
if (i == null)
l.descr = { text: "" };
else if (typeof i == "object") {
let [h, d] = Object.entries(i)[0];
l[h] = { text: d };
} else
l.descr = { text: i };
if (typeof a == "object") {
let [h, d] = Object.entries(a)[0];
l[h] = d;
} else
l.sprite = a;
if (typeof s == "object") {
let [h, d] = Object.entries(s)[0];
l[h] = d;
} else
l.tags = s;
if (typeof o == "object") {
let [h, d] = Object.entries(o)[0];
l[h] = d;
} else
l.link = o;
l.wrap = is(), l.typeC4Shape = { text: t }, l.parentBoundary = nn;
}, UK = function(t, e, r, n, i, a, s, o) {
if (e === null || r === null)
return;
let l = {};
const u = ci.find((h) => h.alias === e);
if (u && e === u.alias ? l = u : (l.alias = e, ci.push(l)), r == null ? l.label = { text: "" } : l.label = { text: r }, n == null)
l.techn = { text: "" };
else if (typeof n == "object") {
let [h, d] = Object.entries(n)[0];
l[h] = { text: d };
} else
l.techn = { text: n };
if (i == null)
l.descr = { text: "" };
else if (typeof i == "object") {
let [h, d] = Object.entries(i)[0];
l[h] = { text: d };
} else
l.descr = { text: i };
if (typeof a == "object") {
let [h, d] = Object.entries(a)[0];
l[h] = d;
} else
l.sprite = a;
if (typeof s == "object") {
let [h, d] = Object.entries(s)[0];
l[h] = d;
} else
l.tags = s;
if (typeof o == "object") {
let [h, d] = Object.entries(o)[0];
l[h] = d;
} else
l.link = o;
l.wrap = is(), l.typeC4Shape = { text: t }, l.parentBoundary = nn;
}, WK = function(t, e, r, n, i) {
if (t === null || e === null)
return;
let a = {};
const s = Fi.find((o) => o.alias === t);
if (s && t === s.alias ? a = s : (a.alias = t, Fi.push(a)), e == null ? a.label = { text: "" } : a.label = { text: e }, r == null)
a.type = { text: "system" };
else if (typeof r == "object") {
let [o, l] = Object.entries(r)[0];
a[o] = { text: l };
} else
a.type = { text: r };
if (typeof n == "object") {
let [o, l] = Object.entries(n)[0];
a[o] = l;
} else
a.tags = n;
if (typeof i == "object") {
let [o, l] = Object.entries(i)[0];
a[o] = l;
} else
a.link = i;
a.parentBoundary = nn, a.wrap = is(), ii = nn, nn = t, Ya.push(ii);
}, HK = function(t, e, r, n, i) {
if (t === null || e === null)
return;
let a = {};
const s = Fi.find((o) => o.alias === t);
if (s && t === s.alias ? a = s : (a.alias = t, Fi.push(a)), e == null ? a.label = { text: "" } : a.label = { text: e }, r == null)
a.type = { text: "container" };
else if (typeof r == "object") {
let [o, l] = Object.entries(r)[0];
a[o] = { text: l };
} else
a.type = { text: r };
if (typeof n == "object") {
let [o, l] = Object.entries(n)[0];
a[o] = l;
} else
a.tags = n;
if (typeof i == "object") {
let [o, l] = Object.entries(i)[0];
a[o] = l;
} else
a.link = i;
a.parentBoundary = nn, a.wrap = is(), ii = nn, nn = t, Ya.push(ii);
}, GK = function(t, e, r, n, i, a, s, o) {
if (e === null || r === null)
return;
let l = {};
const u = Fi.find((h) => h.alias === e);
if (u && e === u.alias ? l = u : (l.alias = e, Fi.push(l)), r == null ? l.label = { text: "" } : l.label = { text: r }, n == null)
l.type = { text: "node" };
else if (typeof n == "object") {
let [h, d] = Object.entries(n)[0];
l[h] = { text: d };
} else
l.type = { text: n };
if (i == null)
l.descr = { text: "" };
else if (typeof i == "object") {
let [h, d] = Object.entries(i)[0];
l[h] = { text: d };
} else
l.descr = { text: i };
if (typeof s == "object") {
let [h, d] = Object.entries(s)[0];
l[h] = d;
} else
l.tags = s;
if (typeof o == "object") {
let [h, d] = Object.entries(o)[0];
l[h] = d;
} else
l.link = o;
l.nodeType = t, l.parentBoundary = nn, l.wrap = is(), ii = nn, nn = e, Ya.push(ii);
}, jK = function() {
nn = ii, Ya.pop(), ii = Ya.pop(), Ya.push(ii);
}, $K = function(t, e, r, n, i, a, s, o, l, u, h) {
let d = ci.find((f) => f.alias === e);
if (!(d === void 0 && (d = Fi.find((f) => f.alias === e), d === void 0))) {
if (r != null)
if (typeof r == "object") {
let [f, p] = Object.entries(r)[0];
d[f] = p;
} else
d.bgColor = r;
if (n != null)
if (typeof n == "object") {
let [f, p] = Object.entries(n)[0];
d[f] = p;
} else
d.fontColor = n;
if (i != null)
if (typeof i == "object") {
let [f, p] = Object.entries(i)[0];
d[f] = p;
} else
d.borderColor = i;
if (a != null)
if (typeof a == "object") {
let [f, p] = Object.entries(a)[0];
d[f] = p;
} else
d.shadowing = a;
if (s != null)
if (typeof s == "object") {
let [f, p] = Object.entries(s)[0];
d[f] = p;
} else
d.shape = s;
if (o != null)
if (typeof o == "object") {
let [f, p] = Object.entries(o)[0];
d[f] = p;
} else
d.sprite = o;
if (l != null)
if (typeof l == "object") {
let [f, p] = Object.entries(l)[0];
d[f] = p;
} else
d.techn = l;
if (u != null)
if (typeof u == "object") {
let [f, p] = Object.entries(u)[0];
d[f] = p;
} else
d.legendText = u;
if (h != null)
if (typeof h == "object") {
let [f, p] = Object.entries(h)[0];
d[f] = p;
} else
d.legendSprite = h;
}
}, XK = function(t, e, r, n, i, a, s) {
const o = qc.find((l) => l.from === e && l.to === r);
if (o !== void 0) {
if (n != null)
if (typeof n == "object") {
let [l, u] = Object.entries(n)[0];
o[l] = u;
} else
o.textColor = n;
if (i != null)
if (typeof i == "object") {
let [l, u] = Object.entries(i)[0];
o[l] = u;
} else
o.lineColor = i;
if (a != null)
if (typeof a == "object") {
let [l, u] = Object.entries(a)[0];
o[l] = parseInt(u);
} else
o.offsetX = parseInt(a);
if (s != null)
if (typeof s == "object") {
let [l, u] = Object.entries(s)[0];
o[l] = parseInt(u);
} else
o.offsetY = parseInt(s);
}
}, KK = function(t, e, r) {
let n = Pf, i = qf;
if (typeof e == "object") {
const a = Object.values(e)[0];
n = parseInt(a);
} else
n = parseInt(e);
if (typeof r == "object") {
const a = Object.values(r)[0];
i = parseInt(a);
} else
i = parseInt(r);
n >= 1 && (Pf = n), i >= 1 && (qf = i);
}, ZK = function() {
return Pf;
}, QK = function() {
return qf;
}, JK = function() {
return nn;
}, tZ = function() {
return ii;
}, NA = function(t) {
return t == null ? ci : ci.filter((e) => e.parentBoundary === t);
}, eZ = function(t) {
return ci.find((e) => e.alias === t);
}, rZ = function(t) {
return Object.keys(NA(t));
}, nZ = function(t) {
return t == null ? Fi : Fi.filter((e) => e.parentBoundary === t);
}, iZ = function() {
return qc;
}, aZ = function() {
return I4;
}, sZ = function(t) {
N4 = t;
}, is = function() {
return N4;
}, oZ = function() {
ci = [], Fi = [
{
alias: "global",
label: { text: "global" },
type: { text: "global" },
tags: null,
link: null,
parentBoundary: ""
}
], ii = "", nn = "global", Ya = [""], qc = [], Ya = [""], I4 = "", N4 = !1, Pf = 4, qf = 2;
}, lZ = {
SOLID: 0,
DOTTED: 1,
NOTE: 2,
SOLID_CROSS: 3,
DOTTED_CROSS: 4,
SOLID_OPEN: 5,
DOTTED_OPEN: 6,
LOOP_START: 10,
LOOP_END: 11,
ALT_START: 12,
ALT_ELSE: 13,
ALT_END: 14,
OPT_START: 15,
OPT_END: 16,
ACTIVE_START: 17,
ACTIVE_END: 18,
PAR_START: 19,
PAR_AND: 20,
PAR_END: 21,
RECT_START: 22,
RECT_END: 23,
SOLID_POINT: 24,
DOTTED_POINT: 25
}, cZ = {
FILLED: 0,
OPEN: 1
}, uZ = {
LEFTOF: 0,
RIGHTOF: 1,
OVER: 2
}, hZ = function(t) {
I4 = li(t, nt());
}, BA = {
addPersonOrSystem: zK,
addPersonOrSystemBoundary: WK,
addContainer: YK,
addContainerBoundary: HK,
addComponent: UK,
addDeploymentNode: GK,
popBoundaryParseStack: jK,
addRel: VK,
updateElStyle: $K,
updateRelStyle: XK,
updateLayoutConfig: KK,
autoWrap: is,
setWrap: sZ,
getC4ShapeArray: NA,
getC4Shape: eZ,
getC4ShapeKeys: rZ,
getBoundarys: nZ,
getCurrentBoundaryParse: JK,
getParentBoundaryParse: tZ,
getRels: iZ,
getTitle: aZ,
getC4Type: FK,
getC4ShapeInRow: ZK,
getC4BoundaryInRow: QK,
setAccTitle: zn,
getAccTitle: gi,
getAccDescription: mi,
setAccDescription: yi,
parseDirective: qK,
getConfig: () => nt().c4,
clear: oZ,
LINETYPE: lZ,
ARROWTYPE: cZ,
PLACEMENT: uZ,
setTitle: hZ,
setC4Type: PK
}, B4 = function(t, e) {
const r = t.append("rect");
if (r.attr("x", e.x), r.attr("y", e.y), r.attr("fill", e.fill), r.attr("stroke", e.stroke), r.attr("width", e.width), r.attr("height", e.height), r.attr("rx", e.rx), r.attr("ry", e.ry), e.attrs !== "undefined" && e.attrs !== null)
for (let n in e.attrs)
r.attr(n, e.attrs[n]);
return e.class !== "undefined" && r.attr("class", e.class), r;
}, DA = function(t, e, r, n, i, a) {
const s = t.append("image");
s.attr("width", e), s.attr("height", r), s.attr("x", n), s.attr("y", i);
let o = a.startsWith("data:image/png;base64") ? a : qi(a);
s.attr("xlink:href", o);
}, fZ = function(t, e, r, n) {
const i = t.append("use");
i.attr("x", e), i.attr("y", r);
var a = qi(n);
i.attr("xlink:href", "#" + a);
}, OA = function(t, e) {
let r = 0, n = 0;
const i = e.text.split(pe.lineBreakRegex);
let a = [], s = 0, o = () => e.y;
if (typeof e.valign < "u" && typeof e.textMargin < "u" && e.textMargin > 0)
switch (e.valign) {
case "top":
case "start":
o = () => Math.round(e.y + e.textMargin);
break;
case "middle":
case "center":
o = () => Math.round(e.y + (r + n + e.textMargin) / 2);
break;
case "bottom":
case "end":
o = () => Math.round(
e.y + (r + n + 2 * e.textMargin) - e.textMargin
);
break;
}
if (typeof e.anchor < "u" && typeof e.textMargin < "u" && typeof e.width < "u")
switch (e.anchor) {
case "left":
case "start":
e.x = Math.round(e.x + e.textMargin), e.anchor = "start", e.dominantBaseline = "text-after-edge", e.alignmentBaseline = "middle";
break;
case "middle":
case "center":
e.x = Math.round(e.x + e.width / 2), e.anchor = "middle", e.dominantBaseline = "middle", e.alignmentBaseline = "middle";
break;
case "right":
case "end":
e.x = Math.round(e.x + e.width - e.textMargin), e.anchor = "end", e.dominantBaseline = "text-before-edge", e.alignmentBaseline = "middle";
break;
}
for (let l = 0; l < i.length; l++) {
let u = i[l];
typeof e.textMargin < "u" && e.textMargin === 0 && typeof e.fontSize < "u" && (s = l * e.fontSize);
const h = t.append("text");
if (h.attr("x", e.x), h.attr("y", o()), typeof e.anchor < "u" && h.attr("text-anchor", e.anchor).attr("dominant-baseline", e.dominantBaseline).attr("alignment-baseline", e.alignmentBaseline), typeof e.fontFamily < "u" && h.style("font-family", e.fontFamily), typeof e.fontSize < "u" && h.style("font-size", e.fontSize), typeof e.fontWeight < "u" && h.style("font-weight", e.fontWeight), typeof e.fill < "u" && h.attr("fill", e.fill), typeof e.class < "u" && h.attr("class", e.class), typeof e.dy < "u" ? h.attr("dy", e.dy) : s !== 0 && h.attr("dy", s), e.tspan) {
const d = h.append("tspan");
d.attr("x", e.x), typeof e.fill < "u" && d.attr("fill", e.fill), d.text(u);
} else
h.text(u);
typeof e.valign < "u" && typeof e.textMargin < "u" && e.textMargin > 0 && (n += (h._groups || h)[0][0].getBBox().height, r = n), a.push(h);
}
return a;
}, dZ = function(t, e) {
function r(i, a, s, o, l) {
return i + "," + a + " " + (i + s) + "," + a + " " + (i + s) + "," + (a + o - l) + " " + (i + s - l * 1.2) + "," + (a + o) + " " + i + "," + (a + o);
}
const n = t.append("polygon");
return n.attr("points", r(e.x, e.y, e.width, e.height, 7)), n.attr("class", "labelBox"), e.y = e.y + e.height / 2, OA(t, e), n;
}, pZ = (t, e, r) => {
const n = t.append("g");
let i = 0;
for (let a of e) {
let s = a.textColor ? a.textColor : "#444444", o = a.lineColor ? a.lineColor : "#444444", l = a.offsetX ? parseInt(a.offsetX) : 0, u = a.offsetY ? parseInt(a.offsetY) : 0, h = "";
if (i === 0) {
let f = n.append("line");
f.attr("x1", a.startPoint.x), f.attr("y1", a.startPoint.y), f.attr("x2", a.endPoint.x), f.attr("y2", a.endPoint.y), f.attr("stroke-width", "1"), f.attr("stroke", o), f.style("fill", "none"), a.type !== "rel_b" && f.attr("marker-end", "url(" + h + "#arrowhead)"), (a.type === "birel" || a.type === "rel_b") && f.attr("marker-start", "url(" + h + "#arrowend)"), i = -1;
} else {
let f = n.append("path");
f.attr("fill", "none").attr("stroke-width", "1").attr("stroke", o).attr(
"d",
"Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx", a.startPoint.x).replaceAll("starty", a.startPoint.y).replaceAll(
"controlx",
a.startPoint.x + (a.endPoint.x - a.startPoint.x) / 2 - (a.endPoint.x - a.startPoint.x) / 4
).replaceAll("controly", a.startPoint.y + (a.endPoint.y - a.startPoint.y) / 2).replaceAll("stopx", a.endPoint.x).replaceAll("stopy", a.endPoint.y)
), a.type !== "rel_b" && f.attr("marker-end", "url(" + h + "#arrowhead)"), (a.type === "birel" || a.type === "rel_b") && f.attr("marker-start", "url(" + h + "#arrowend)");
}
let d = r.messageFont();
ha(r)(
a.label.text,
n,
Math.min(a.startPoint.x, a.endPoint.x) + Math.abs(a.endPoint.x - a.startPoint.x) / 2 + l,
Math.min(a.startPoint.y, a.endPoint.y) + Math.abs(a.endPoint.y - a.startPoint.y) / 2 + u,
a.label.width,
a.label.height,
{ fill: s },
d
), a.techn && a.techn.text !== "" && (d = r.messageFont(), ha(r)(
"[" + a.techn.text + "]",
n,
Math.min(a.startPoint.x, a.endPoint.x) + Math.abs(a.endPoint.x - a.startPoint.x) / 2 + l,
Math.min(a.startPoint.y, a.endPoint.y) + Math.abs(a.endPoint.y - a.startPoint.y) / 2 + r.messageFontSize + 5 + u,
Math.max(a.label.width, a.techn.width),
a.techn.height,
{ fill: s, "font-style": "italic" },
d
));
}
}, gZ = function(t, e, r) {
const n = t.append("g");
let i = e.bgColor ? e.bgColor : "none", a = e.borderColor ? e.borderColor : "#444444", s = e.fontColor ? e.fontColor : "black", o = { "stroke-width": 1, "stroke-dasharray": "7.0,7.0" };
e.nodeType && (o = { "stroke-width": 1 });
let l = {
x: e.x,
y: e.y,
fill: i,
stroke: a,
width: e.width,
height: e.height,
rx: 2.5,
ry: 2.5,
attrs: o
};
B4(n, l);
let u = r.boundaryFont();
u.fontWeight = "bold", u.fontSize = u.fontSize + 2, u.fontColor = s, ha(r)(
e.label.text,
n,
e.x,
e.y + e.label.Y,
e.width,
e.height,
{ fill: "#444444" },
u
), e.type && e.type.text !== "" && (u = r.boundaryFont(), u.fontColor = s, ha(r)(
e.type.text,
n,
e.x,
e.y + e.type.Y,
e.width,
e.height,
{ fill: "#444444" },
u
)), e.descr && e.descr.text !== "" && (u = r.boundaryFont(), u.fontSize = u.fontSize - 2, u.fontColor = s, ha(r)(
e.descr.text,
n,
e.x,
e.y + e.descr.Y,
e.width,
e.height,
{ fill: "#444444" },
u
));
}, yZ = function(t, e, r) {
let n = e.bgColor ? e.bgColor : r[e.typeC4Shape.text + "_bg_color"], i = e.borderColor ? e.borderColor : r[e.typeC4Shape.text + "_border_color"], a = e.fontColor ? e.fontColor : "#FFFFFF", s = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";
switch (e.typeC4Shape.text) {
case "person":
s = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";
break;
case "external_person":
s = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";
break;
}
const o = t.append("g");
o.attr("class", "person-man");
const l = FA();
switch (e.typeC4Shape.text) {
case "person":
case "external_person":
case "system":
case "external_system":
case "container":
case "external_container":
case "component":
case "external_component":
l.x = e.x, l.y = e.y, l.fill = n, l.width = e.width, l.height = e.height, l.style = "stroke:" + i + ";stroke-width:0.5;", l.rx = 2.5, l.ry = 2.5, B4(o, l);
break;
case "system_db":
case "external_system_db":
case "container_db":
case "external_container_db":
case "component_db":
case "external_component_db":
o.append("path").attr("fill", n).attr("stroke-width", "0.5").attr("stroke", i).attr(
"d",
"Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx", e.x).replaceAll("starty", e.y).replaceAll("half", e.width / 2).replaceAll("height", e.height)
), o.append("path").attr("fill", "none").attr("stroke-width", "0.5").attr("stroke", i).attr(
"d",
"Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx", e.x).replaceAll("starty", e.y).replaceAll("half", e.width / 2)
);
break;
case "system_queue":
case "external_system_queue":
case "container_queue":
case "external_container_queue":
case "component_queue":
case "external_component_queue":
o.append("path").attr("fill", n).attr("stroke-width", "0.5").attr("stroke", i).attr(
"d",
"Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx", e.x).replaceAll("starty", e.y).replaceAll("width", e.width).replaceAll("half", e.height / 2)
), o.append("path").attr("fill", "none").attr("stroke-width", "0.5").attr("stroke", i).attr(
"d",
"Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx", e.x + e.width).replaceAll("starty", e.y).replaceAll("half", e.height / 2)
);
break;
}
let u = CZ(r, e.typeC4Shape.text);
switch (o.append("text").attr("fill", a).attr("font-family", u.fontFamily).attr("font-size", u.fontSize - 2).attr("font-style", "italic").attr("lengthAdjust", "spacing").attr("textLength", e.typeC4Shape.width).attr("x", e.x + e.width / 2 - e.typeC4Shape.width / 2).attr("y", e.y + e.typeC4Shape.Y).text("<<" + e.typeC4Shape.text + ">>"), e.typeC4Shape.text) {
case "person":
case "external_person":
DA(
o,
48,
48,
e.x + e.width / 2 - 24,
e.y + e.image.Y,
s
);
break;
}
let h = r[e.typeC4Shape.text + "Font"]();
return h.fontWeight = "bold", h.fontSize = h.fontSize + 2, h.fontColor = a, ha(r)(
e.label.text,
o,
e.x,
e.y + e.label.Y,
e.width,
e.height,
{ fill: a },
h
), h = r[e.typeC4Shape.text + "Font"](), h.fontColor = a, e.thchn && e.thchn.text !== "" ? ha(r)(
e.thchn.text,
o,
e.x,
e.y + e.thchn.Y,
e.width,
e.height,
{ fill: a, "font-style": "italic" },
h
) : e.type && e.type.text !== "" && ha(r)(
e.type.text,
o,
e.x,
e.y + e.type.Y,
e.width,
e.height,
{ fill: a, "font-style": "italic" },
h
), e.descr && e.descr.text !== "" && (h = r.personFont(), h.fontColor = a, ha(r)(
e.descr.text,
o,
e.x,
e.y + e.descr.Y,
e.width,
e.height,
{ fill: a },
h
)), e.height;
}, mZ = function(t) {
t.append("defs").append("symbol").attr("id", "database").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").append("path").attr("transform", "scale(.5)").attr(
"d",
"M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z"
);
}, bZ = function(t) {
t.append("defs").append("symbol").attr("id", "computer").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
"d",
"M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z"
);
}, _Z = function(t) {
t.append("defs").append("symbol").attr("id", "clock").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
"d",
"M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z"
);
}, vZ = function(t) {
t.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 9).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z");
}, xZ = function(t) {
t.append("defs").append("marker").attr("id", "arrowend").attr("refX", 1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 10 0 L 0 5 L 10 10 z");
}, kZ = function(t) {
t.append("defs").append("marker").attr("id", "filled-head").attr("refX", 18).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
}, wZ = function(t) {
t.append("defs").append("marker").attr("id", "sequencenumber").attr("refX", 15).attr("refY", 15).attr("markerWidth", 60).attr("markerHeight", 40).attr("orient", "auto").append("circle").attr("cx", 15).attr("cy", 15).attr("r", 6);
}, TZ = function(t) {
const r = t.append("defs").append("marker").attr("id", "crosshead").attr("markerWidth", 15).attr("markerHeight", 8).attr("orient", "auto").attr("refX", 16).attr("refY", 4);
r.append("path").attr("fill", "black").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1px").attr("d", "M 9,2 V 6 L16,4 Z"), r.append("path").attr("fill", "none").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1px").attr("d", "M 0,1 L 6,7 M 6,1 L 0,7");
}, EZ = function() {
return {
x: 0,
y: 0,
fill: void 0,
anchor: void 0,
style: "#666",
width: void 0,
height: void 0,
textMargin: 0,
rx: 0,
ry: 0,
tspan: !0,
valign: void 0
};
}, FA = function() {
return {
x: 0,
y: 0,
fill: "#EDF2AE",
stroke: "#666",
width: 100,
anchor: "start",
height: 100,
rx: 0,
ry: 0
};
}, CZ = (t, e) => ({
fontFamily: t[e + "FontFamily"],
fontSize: t[e + "FontSize"],
fontWeight: t[e + "FontWeight"]
}), ha = function() {
function t(i, a, s, o, l, u, h) {
const d = a.append("text").attr("x", s + l / 2).attr("y", o + u / 2 + 5).style("text-anchor", "middle").text(i);
n(d, h);
}
function e(i, a, s, o, l, u, h, d) {
const { fontSize: f, fontFamily: p, fontWeight: m } = d, _ = i.split(pe.lineBreakRegex);
for (let y = 0; y < _.length; y++) {
const b = y * f - f * (_.length - 1) / 2, x = a.append("text").attr("x", s + l / 2).attr("y", o).style("text-anchor", "middle").attr("dominant-baseline", "middle").style("font-size", f).style("font-weight", m).style("font-family", p);
x.append("tspan").attr("dy", b).text(_[y]).attr("alignment-baseline", "mathematical"), n(x, h);
}
}
function r(i, a, s, o, l, u, h, d) {
const f = a.append("switch"), m = f.append("foreignObject").attr("x", s).attr("y", o).attr("width", l).attr("height", u).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
m.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(i), e(i, f, s, o, l, u, h, d), n(m, h);
}
function n(i, a) {
for (const s in a)
a.hasOwnProperty(s) && i.attr(s, a[s]);
}
return function(i) {
return i.textPlacement === "fo" ? r : i.textPlacement === "old" ? t : e;
};
}(), wi = {
drawRect: B4,
drawText: OA,
drawLabel: dZ,
drawBoundary: gZ,
drawC4Shape: yZ,
drawRels: pZ,
drawImage: DA,
drawEmbeddedImage: fZ,
insertArrowHead: vZ,
insertArrowEnd: xZ,
insertArrowFilledHead: kZ,
insertDynamicNumber: wZ,
insertArrowCrossHead: TZ,
insertDatabaseIcon: mZ,
insertComputerIcon: bZ,
insertClockIcon: _Z,
getTextObj: EZ,
getNoteRect: FA,
sanitizeUrl: qi
};
let Vf = 0, zf = 0, PA = 4, Eb = 2;
Pc.yy = BA;
let Kt = {};
class qA {
constructor(e) {
this.name = "", this.data = {}, this.data.startx = void 0, this.data.stopx = void 0, this.data.starty = void 0, this.data.stopy = void 0, this.data.widthLimit = void 0, this.nextData = {}, this.nextData.startx = void 0, this.nextData.stopx = void 0, this.nextData.starty = void 0, this.nextData.stopy = void 0, this.nextData.cnt = 0, Cb(e.db.getConfig());
}
setData(e, r, n, i) {
this.nextData.startx = this.data.startx = e, this.nextData.stopx = this.data.stopx = r, this.nextData.starty = this.data.starty = n, this.nextData.stopy = this.data.stopy = i;
}
updateVal(e, r, n, i) {
typeof e[r] > "u" ? e[r] = n : e[r] = i(n, e[r]);
}
insert(e) {
this.nextData.cnt = this.nextData.cnt + 1;
let r = this.nextData.startx === this.nextData.stopx ? this.nextData.stopx + e.margin : this.nextData.stopx + e.margin * 2, n = r + e.width, i = this.nextData.starty + e.margin * 2, a = i + e.height;
(r >= this.data.widthLimit || n >= this.data.widthLimit || this.nextData.cnt > PA) && (r = this.nextData.startx + e.margin + Kt.nextLinePaddingX, i = this.nextData.stopy + e.margin * 2, this.nextData.stopx = n = r + e.width, this.nextData.starty = this.nextData.stopy, this.nextData.stopy = a = i + e.height, this.nextData.cnt = 1), e.x = r, e.y = i, this.updateVal(this.data, "startx", r, Math.min), this.updateVal(this.data, "starty", i, Math.min), this.updateVal(this.data, "stopx", n, Math.max), this.updateVal(this.data, "stopy", a, Math.max), this.updateVal(this.nextData, "startx", r, Math.min), this.updateVal(this.nextData, "starty", i, Math.min), this.updateVal(this.nextData, "stopx", n, Math.max), this.updateVal(this.nextData, "stopy", a, Math.max);
}
init(e) {
this.name = "", this.data = {
startx: void 0,
stopx: void 0,
starty: void 0,
stopy: void 0,
widthLimit: void 0
}, this.nextData = {
startx: void 0,
stopx: void 0,
starty: void 0,
stopy: void 0,
cnt: 0
}, Cb(e.db.getConfig());
}
bumpLastMargin(e) {
this.data.stopx += e, this.data.stopy += e;
}
}
const Cb = function(t) {
mr(Kt, t), t.fontFamily && (Kt.personFontFamily = Kt.systemFontFamily = Kt.messageFontFamily = t.fontFamily), t.fontSize && (Kt.personFontSize = Kt.systemFontSize = Kt.messageFontSize = t.fontSize), t.fontWeight && (Kt.personFontWeight = Kt.systemFontWeight = Kt.messageFontWeight = t.fontWeight);
}, Rl = (t, e) => ({
fontFamily: t[e + "FontFamily"],
fontSize: t[e + "FontSize"],
fontWeight: t[e + "FontWeight"]
}), Bh = (t) => ({
fontFamily: t.boundaryFontFamily,
fontSize: t.boundaryFontSize,
fontWeight: t.boundaryFontWeight
}), SZ = (t) => ({
fontFamily: t.messageFontFamily,
fontSize: t.messageFontSize,
fontWeight: t.messageFontWeight
});
function ti(t, e, r, n, i) {
if (!e[t].width)
if (r)
e[t].text = eA(e[t].text, i, n), e[t].textLines = e[t].text.split(pe.lineBreakRegex).length, e[t].width = i, e[t].height = _b(e[t].text, n);
else {
let a = e[t].text.split(pe.lineBreakRegex);
e[t].textLines = a.length;
let s = 0;
e[t].height = 0, e[t].width = 0;
for (let o = 0; o < a.length; o++)
e[t].width = Math.max(
Ii(a[o], n),
e[t].width
), s = _b(a[o], n), e[t].height = e[t].height + s;
}
}
const VA = function(t, e, r) {
e.x = r.data.startx, e.y = r.data.starty, e.width = r.data.stopx - r.data.startx, e.height = r.data.stopy - r.data.starty, e.label.y = Kt.c4ShapeMargin - 35;
let n = e.wrap && Kt.wrap, i = Bh(Kt);
i.fontSize = i.fontSize + 2, i.fontWeight = "bold";
let a = Ii(e.label.text, i);
ti("label", e, n, i, a), wi.drawBoundary(t, e, Kt);
}, zA = function(t, e, r, n) {
let i = 0;
for (let a = 0; a < n.length; a++) {
i = 0;
const s = r[n[a]];
let o = Rl(Kt, s.typeC4Shape.text);
switch (o.fontSize = o.fontSize - 2, s.typeC4Shape.width = Ii(
"<<" + s.typeC4Shape.text + ">>",
o
), s.typeC4Shape.height = o.fontSize + 2, s.typeC4Shape.Y = Kt.c4ShapePadding, i = s.typeC4Shape.Y + s.typeC4Shape.height - 4, s.image = { width: 0, height: 0, Y: 0 }, s.typeC4Shape.text) {
case "person":
case "external_person":
s.image.width = 48, s.image.height = 48, s.image.Y = i, i = s.image.Y + s.image.height;
break;
}
s.sprite && (s.image.width = 48, s.image.height = 48, s.image.Y = i, i = s.image.Y + s.image.height);
let l = s.wrap && Kt.wrap, u = Kt.width - Kt.c4ShapePadding * 2, h = Rl(Kt, s.typeC4Shape.text);
if (h.fontSize = h.fontSize + 2, h.fontWeight = "bold", ti("label", s, l, h, u), s.label.Y = i + 8, i = s.label.Y + s.label.height, s.type && s.type.text !== "") {
s.type.text = "[" + s.type.text + "]";
let p = Rl(Kt, s.typeC4Shape.text);
ti("type", s, l, p, u), s.type.Y = i + 5, i = s.type.Y + s.type.height;
} else if (s.techn && s.techn.text !== "") {
s.techn.text = "[" + s.techn.text + "]";
let p = Rl(Kt, s.techn.text);
ti("techn", s, l, p, u), s.techn.Y = i + 5, i = s.techn.Y + s.techn.height;
}
let d = i, f = s.label.width;
if (s.descr && s.descr.text !== "") {
let p = Rl(Kt, s.typeC4Shape.text);
ti("descr", s, l, p, u), s.descr.Y = i + 20, i = s.descr.Y + s.descr.height, f = Math.max(s.label.width, s.descr.width), d = i - s.descr.textLines * 5;
}
f = f + Kt.c4ShapePadding, s.width = Math.max(s.width || Kt.width, f, Kt.width), s.height = Math.max(s.height || Kt.height, d, Kt.height), s.margin = s.margin || Kt.c4ShapeMargin, t.insert(s), wi.drawC4Shape(e, s, Kt);
}
t.bumpLastMargin(Kt.c4ShapeMargin);
};
class Nn {
constructor(e, r) {
this.x = e, this.y = r;
}
}
let C6 = function(t, e) {
let r = t.x, n = t.y, i = e.x, a = e.y, s = r + t.width / 2, o = n + t.height / 2, l = Math.abs(r - i), u = Math.abs(n - a), h = u / l, d = t.height / t.width, f = null;
return n == a && r < i ? f = new Nn(r + t.width, o) : n == a && r > i ? f = new Nn(r, o) : r == i && n < a ? f = new Nn(s, n + t.height) : r == i && n > a && (f = new Nn(s, n)), r > i && n < a ? d >= h ? f = new Nn(r, o + h * t.width / 2) : f = new Nn(
s - l / u * t.height / 2,
n + t.height
) : r < i && n < a ? d >= h ? f = new Nn(r + t.width, o + h * t.width / 2) : f = new Nn(
s + l / u * t.height / 2,
n + t.height
) : r < i && n > a ? d >= h ? f = new Nn(r + t.width, o - h * t.width / 2) : f = new Nn(s + t.height / 2 * l / u, n) : r > i && n > a && (d >= h ? f = new Nn(r, o - t.width / 2 * h) : f = new Nn(s - t.height / 2 * l / u, n)), f;
}, AZ = function(t, e) {
let r = { x: 0, y: 0 };
r.x = e.x + e.width / 2, r.y = e.y + e.height / 2;
let n = C6(t, r);
r.x = t.x + t.width / 2, r.y = t.y + t.height / 2;
let i = C6(e, r);
return { startPoint: n, endPoint: i };
};
const MZ = function(t, e, r, n) {
let i = 0;
for (let a of e) {
i = i + 1;
let s = a.wrap && Kt.wrap, o = SZ(Kt);
n.db.getC4Type() === "C4Dynamic" && (a.label.text = i + ": " + a.label.text);
let u = Ii(a.label.text, o);
ti("label", a, s, o, u), a.techn && a.techn.text !== "" && (u = Ii(a.techn.text, o), ti("techn", a, s, o, u)), a.descr && a.descr.text !== "" && (u = Ii(a.descr.text, o), ti("descr", a, s, o, u));
let h = r(a.from), d = r(a.to), f = AZ(h, d);
a.startPoint = f.startPoint, a.endPoint = f.endPoint;
}
wi.drawRels(t, e, Kt);
};
function YA(t, e, r, n, i) {
let a = new qA(i);
a.data.widthLimit = r.data.widthLimit / Math.min(Eb, n.length);
for (let s = 0; s < n.length; s++) {
let o = n[s], l = 0;
o.image = { width: 0, height: 0, Y: 0 }, o.sprite && (o.image.width = 48, o.image.height = 48, o.image.Y = l, l = o.image.Y + o.image.height);
let u = o.wrap && Kt.wrap, h = Bh(Kt);
if (h.fontSize = h.fontSize + 2, h.fontWeight = "bold", ti(
"label",
o,
u,
h,
a.data.widthLimit
), o.label.Y = l + 8, l = o.label.Y + o.label.height, o.type && o.type.text !== "") {
o.type.text = "[" + o.type.text + "]";
let m = Bh(Kt);
ti(
"type",
o,
u,
m,
a.data.widthLimit
), o.type.Y = l + 5, l = o.type.Y + o.type.height;
}
if (o.descr && o.descr.text !== "") {
let m = Bh(Kt);
m.fontSize = m.fontSize - 2, ti(
"descr",
o,
u,
m,
a.data.widthLimit
), o.descr.Y = l + 20, l = o.descr.Y + o.descr.height;
}
if (s == 0 || s % Eb === 0) {
let m = r.data.startx + Kt.diagramMarginX, _ = r.data.stopy + Kt.diagramMarginY + l;
a.setData(m, m, _, _);
} else {
let m = a.data.stopx !== a.data.startx ? a.data.stopx + Kt.diagramMarginX : a.data.startx, _ = a.data.starty;
a.setData(m, m, _, _);
}
a.name = o.alias;
let d = i.db.getC4ShapeArray(o.alias), f = i.db.getC4ShapeKeys(o.alias);
f.length > 0 && zA(
a,
t,
d,
f
), e = o.alias;
let p = i.db.getBoundarys(e);
p.length > 0 && YA(
t,
e,
a,
p,
i
), o.alias !== "global" && VA(t, o, a), r.data.stopy = Math.max(
a.data.stopy + Kt.c4ShapeMargin,
r.data.stopy
), r.data.stopx = Math.max(
a.data.stopx + Kt.c4ShapeMargin,
r.data.stopx
), Vf = Math.max(Vf, r.data.stopx), zf = Math.max(zf, r.data.stopy);
}
}
const LZ = function(t, e, r, n) {
Kt = nt().c4;
const i = nt().securityLevel;
let a;
i === "sandbox" && (a = St("#i" + e));
const s = St(i === "sandbox" ? a.nodes()[0].contentDocument.body : "body");
let o = n.db;
n.db.setWrap(Kt.wrap), PA = o.getC4ShapeInRow(), Eb = o.getC4BoundaryInRow(), H.debug(`C:${JSON.stringify(Kt, null, 2)}`);
const l = i === "sandbox" ? s.select(`[id="${e}"]`) : St(`[id="${e}"]`);
wi.insertComputerIcon(l), wi.insertDatabaseIcon(l), wi.insertClockIcon(l);
let u = new qA(n);
u.setData(
Kt.diagramMarginX,
Kt.diagramMarginX,
Kt.diagramMarginY,
Kt.diagramMarginY
), u.data.widthLimit = screen.availWidth, Vf = Kt.diagramMarginX, zf = Kt.diagramMarginY;
const h = n.db.getTitle();
let d = n.db.getBoundarys("");
YA(l, "", u, d, n), wi.insertArrowHead(l), wi.insertArrowEnd(l), wi.insertArrowCrossHead(l), wi.insertArrowFilledHead(l), MZ(l, n.db.getRels(), n.db.getC4Shape, n), u.data.stopx = Vf, u.data.stopy = zf;
const f = u.data;
let m = f.stopy - f.starty + 2 * Kt.diagramMarginY;
const y = f.stopx - f.startx + 2 * Kt.diagramMarginX;
h && l.append("text").text(h).attr("x", (f.stopx - f.startx) / 2 - 4 * Kt.diagramMarginX).attr("y", f.starty + Kt.diagramMarginY), di(l, m, y, Kt.useMaxWidth);
const b = h ? 60 : 0;
l.attr(
"viewBox",
f.startx - Kt.diagramMarginX + " -" + (Kt.diagramMarginY + b) + " " + y + " " + (m + b)
), vn(Pc.yy, l, e), H.debug("models:", f);
}, S6 = {
drawPersonOrSystemArray: zA,
drawBoundary: VA,
setConf: Cb,
draw: LZ
};
var Yf = function() {
var t = function(Z, V, Q, q) {
for (Q = Q || {}, q = Z.length; q--; Q[Z[q]] = V)
;
return Q;
}, e = [1, 3], r = [1, 7], n = [1, 8], i = [1, 9], a = [1, 10], s = [1, 13], o = [1, 12], l = [1, 16, 25], u = [1, 20], h = [1, 31], d = [1, 32], f = [1, 33], p = [1, 35], m = [1, 38], _ = [1, 36], y = [1, 37], b = [1, 39], x = [1, 40], k = [1, 41], T = [1, 42], C = [1, 45], M = [1, 46], S = [1, 47], R = [1, 48], A = [16, 25], L = [1, 62], v = [1, 63], B = [1, 64], w = [1, 65], D = [1, 66], N = [1, 67], z = [1, 68], X = [16, 25, 32, 44, 45, 53, 56, 57, 58, 59, 60, 61, 62, 67, 69], ct = [16, 25, 30, 32, 44, 45, 49, 53, 56, 57, 58, 59, 60, 61, 62, 67, 69, 84, 85, 86, 87], J = [5, 8, 9, 10, 11, 16, 19, 23, 25], Y = [53, 84, 85, 86, 87], $ = [53, 61, 62, 84, 85, 86, 87], lt = [53, 56, 57, 58, 59, 60, 84, 85, 86, 87], ut = [16, 25, 32], W = [1, 100], tt = {
trace: function() {
},
yy: {},
symbols_: { error: 2, start: 3, mermaidDoc: 4, statments: 5, direction: 6, directive: 7, direction_tb: 8, direction_bt: 9, direction_rl: 10, direction_lr: 11, graphConfig: 12, openDirective: 13, typeDirective: 14, closeDirective: 15, NEWLINE: 16, ":": 17, argDirective: 18, open_directive: 19, type_directive: 20, arg_directive: 21, close_directive: 22, CLASS_DIAGRAM: 23, statements: 24, EOF: 25, statement: 26, className: 27, alphaNumToken: 28, classLiteralName: 29, GENERICTYPE: 30, relationStatement: 31, LABEL: 32, classStatement: 33, methodStatement: 34, annotationStatement: 35, clickStatement: 36, cssClassStatement: 37, acc_title: 38, acc_title_value: 39, acc_descr: 40, acc_descr_value: 41, acc_descr_multiline_value: 42, CLASS: 43, STYLE_SEPARATOR: 44, STRUCT_START: 45, members: 46, STRUCT_STOP: 47, ANNOTATION_START: 48, ANNOTATION_END: 49, MEMBER: 50, SEPARATOR: 51, relation: 52, STR: 53, relationType: 54, lineType: 55, AGGREGATION: 56, EXTENSION: 57, COMPOSITION: 58, DEPENDENCY: 59, LOLLIPOP: 60, LINE: 61, DOTTED_LINE: 62, CALLBACK: 63, LINK: 64, LINK_TARGET: 65, CLICK: 66, CALLBACK_NAME: 67, CALLBACK_ARGS: 68, HREF: 69, CSSCLASS: 70, commentToken: 71, textToken: 72, graphCodeTokens: 73, textNoTagsToken: 74, TAGSTART: 75, TAGEND: 76, "==": 77, "--": 78, PCT: 79, DEFAULT: 80, SPACE: 81, MINUS: 82, keywords: 83, UNICODE_TEXT: 84, NUM: 85, ALPHA: 86, BQUOTE_STR: 87, $accept: 0, $end: 1 },
terminals_: { 2: "error", 5: "statments", 8: "direction_tb", 9: "direction_bt", 10: "direction_rl", 11: "direction_lr", 16: "NEWLINE", 17: ":", 19: "open_directive", 20: "type_directive", 21: "arg_directive", 22: "close_directive", 23: "CLASS_DIAGRAM", 25: "EOF", 30: "GENERICTYPE", 32: "LABEL", 38: "acc_title", 39: "acc_title_value", 40: "acc_descr", 41: "acc_descr_value", 42: "acc_descr_multiline_value", 43: "CLASS", 44: "STYLE_SEPARATOR", 45: "STRUCT_START", 47: "STRUCT_STOP", 48: "ANNOTATION_START", 49: "ANNOTATION_END", 50: "MEMBER", 51: "SEPARATOR", 53: "STR", 56: "AGGREGATION", 57: "EXTENSION", 58: "COMPOSITION", 59: "DEPENDENCY", 60: "LOLLIPOP", 61: "LINE", 62: "DOTTED_LINE", 63: "CALLBACK", 64: "LINK", 65: "LINK_TARGET", 66: "CLICK", 67: "CALLBACK_NAME", 68: "CALLBACK_ARGS", 69: "HREF", 70: "CSSCLASS", 73: "graphCodeTokens", 75: "TAGSTART", 76: "TAGEND", 77: "==", 78: "--", 79: "PCT", 80: "DEFAULT", 81: "SPACE", 82: "MINUS", 83: "keywords", 84: "UNICODE_TEXT", 85: "NUM", 86: "ALPHA", 87: "BQUOTE_STR" },
productions_: [0, [3, 1], [3, 1], [3, 1], [3, 2], [6, 1], [6, 1], [6, 1], [6, 1], [4, 1], [7, 4], [7, 6], [13, 1], [14, 1], [18, 1], [15, 1], [12, 4], [24, 1], [24, 2], [24, 3], [27, 1], [27, 1], [27, 2], [27, 2], [27, 2], [26, 1], [26, 2], [26, 1], [26, 1], [26, 1], [26, 1], [26, 1], [26, 1], [26, 1], [26, 2], [26, 2], [26, 1], [33, 2], [33, 4], [33, 5], [33, 7], [35, 4], [46, 1], [46, 2], [34, 1], [34, 2], [34, 1], [34, 1], [31, 3], [31, 4], [31, 4], [31, 5], [52, 3], [52, 2], [52, 2], [52, 1], [54, 1], [54, 1], [54, 1], [54, 1], [54, 1], [55, 1], [55, 1], [36, 3], [36, 4], [36, 3], [36, 4], [36, 4], [36, 5], [36, 3], [36, 4], [36, 4], [36, 5], [36, 3], [36, 4], [36, 4], [36, 5], [37, 3], [71, 1], [71, 1], [72, 1], [72, 1], [72, 1], [72, 1], [72, 1], [72, 1], [72, 1], [74, 1], [74, 1], [74, 1], [74, 1], [28, 1], [28, 1], [28, 1], [29, 1]],
performAction: function(V, Q, q, U, F, j, P) {
var et = j.length - 1;
switch (F) {
case 5:
U.setDirection("TB");
break;
case 6:
U.setDirection("BT");
break;
case 7:
U.setDirection("RL");
break;
case 8:
U.setDirection("LR");
break;
case 12:
U.parseDirective("%%{", "open_directive");
break;
case 13:
U.parseDirective(j[et], "type_directive");
break;
case 14:
j[et] = j[et].trim().replace(/'/g, '"'), U.parseDirective(j[et], "arg_directive");
break;
case 15:
U.parseDirective("}%%", "close_directive", "class");
break;
case 20:
case 21:
this.$ = j[et];
break;
case 22:
this.$ = j[et - 1] + j[et];
break;
case 23:
case 24:
this.$ = j[et - 1] + "~" + j[et];
break;
case 25:
U.addRelation(j[et]);
break;
case 26:
j[et - 1].title = U.cleanupLabel(j[et]), U.addRelation(j[et - 1]);
break;
case 34:
this.$ = j[et].trim(), U.setAccTitle(this.$);
break;
case 35:
case 36:
this.$ = j[et].trim(), U.setAccDescription(this.$);
break;
case 37:
U.addClass(j[et]);
break;
case 38:
U.addClass(j[et - 2]), U.setCssClass(j[et - 2], j[et]);
break;
case 39:
U.addClass(j[et - 3]), U.addMembers(j[et - 3], j[et - 1]);
break;
case 40:
U.addClass(j[et - 5]), U.setCssClass(j[et - 5], j[et - 3]), U.addMembers(j[et - 5], j[et - 1]);
break;
case 41:
U.addAnnotation(j[et], j[et - 2]);
break;
case 42:
this.$ = [j[et]];
break;
case 43:
j[et].push(j[et - 1]), this.$ = j[et];
break;
case 44:
break;
case 45:
U.addMember(j[et - 1], U.cleanupLabel(j[et]));
break;
case 46:
break;
case 47:
break;
case 48:
this.$ = { id1: j[et - 2], id2: j[et], relation: j[et - 1], relationTitle1: "none", relationTitle2: "none" };
break;
case 49:
this.$ = { id1: j[et - 3], id2: j[et], relation: j[et - 1], relationTitle1: j[et - 2], relationTitle2: "none" };
break;
case 50:
this.$ = { id1: j[et - 3], id2: j[et], relation: j[et - 2], relationTitle1: "none", relationTitle2: j[et - 1] };
break;
case 51:
this.$ = { id1: j[et - 4], id2: j[et], relation: j[et - 2], relationTitle1: j[et - 3], relationTitle2: j[et - 1] };
break;
case 52:
this.$ = { type1: j[et - 2], type2: j[et], lineType: j[et - 1] };
break;
case 53:
this.$ = { type1: "none", type2: j[et], lineType: j[et - 1] };
break;
case 54:
this.$ = { type1: j[et - 1], type2: "none", lineType: j[et] };
break;
case 55:
this.$ = { type1: "none", type2: "none", lineType: j[et] };
break;
case 56:
this.$ = U.relationType.AGGREGATION;
break;
case 57:
this.$ = U.relationType.EXTENSION;
break;
case 58:
this.$ = U.relationType.COMPOSITION;
break;
case 59:
this.$ = U.relationType.DEPENDENCY;
break;
case 60:
this.$ = U.relationType.LOLLIPOP;
break;
case 61:
this.$ = U.lineType.LINE;
break;
case 62:
this.$ = U.lineType.DOTTED_LINE;
break;
case 63:
case 69:
this.$ = j[et - 2], U.setClickEvent(j[et - 1], j[et]);
break;
case 64:
case 70:
this.$ = j[et - 3], U.setClickEvent(j[et - 2], j[et - 1]), U.setTooltip(j[et - 2], j[et]);
break;
case 65:
case 73:
this.$ = j[et - 2], U.setLink(j[et - 1], j[et]);
break;
case 66:
this.$ = j[et - 3], U.setLink(j[et - 2], j[et - 1], j[et]);
break;
case 67:
case 75:
this.$ = j[et - 3], U.setLink(j[et - 2], j[et - 1]), U.setTooltip(j[et - 2], j[et]);
break;
case 68:
case 76:
this.$ = j[et - 4], U.setLink(j[et - 3], j[et - 2], j[et]), U.setTooltip(j[et - 3], j[et - 1]);
break;
case 71:
this.$ = j[et - 3], U.setClickEvent(j[et - 2], j[et - 1], j[et]);
break;
case 72:
this.$ = j[et - 4], U.setClickEvent(j[et - 3], j[et - 2], j[et - 1]), U.setTooltip(j[et - 3], j[et]);
break;
case 74:
this.$ = j[et - 3], U.setLink(j[et - 2], j[et - 1], j[et]);
break;
case 77:
U.setCssClass(j[et - 1], j[et]);
break;
}
},
table: [{ 3: 1, 4: 2, 5: e, 6: 4, 7: 5, 8: r, 9: n, 10: i, 11: a, 12: 6, 13: 11, 19: s, 23: o }, { 1: [3] }, { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3] }, { 3: 14, 4: 2, 5: e, 6: 4, 7: 5, 8: r, 9: n, 10: i, 11: a, 12: 6, 13: 11, 19: s, 23: o }, { 1: [2, 9] }, t(l, [2, 5]), t(l, [2, 6]), t(l, [2, 7]), t(l, [2, 8]), { 14: 15, 20: [1, 16] }, { 16: [1, 17] }, { 20: [2, 12] }, { 1: [2, 4] }, { 15: 18, 17: [1, 19], 22: u }, t([17, 22], [2, 13]), { 6: 30, 7: 29, 8: r, 9: n, 10: i, 11: a, 13: 11, 19: s, 24: 21, 26: 22, 27: 34, 28: 43, 29: 44, 31: 23, 33: 24, 34: 25, 35: 26, 36: 27, 37: 28, 38: h, 40: d, 42: f, 43: p, 48: m, 50: _, 51: y, 63: b, 64: x, 66: k, 70: T, 84: C, 85: M, 86: S, 87: R }, { 16: [1, 49] }, { 18: 50, 21: [1, 51] }, { 16: [2, 15] }, { 25: [1, 52] }, { 16: [1, 53], 25: [2, 17] }, t(A, [2, 25], { 32: [1, 54] }), t(A, [2, 27]), t(A, [2, 28]), t(A, [2, 29]), t(A, [2, 30]), t(A, [2, 31]), t(A, [2, 32]), t(A, [2, 33]), { 39: [1, 55] }, { 41: [1, 56] }, t(A, [2, 36]), t(A, [2, 44], { 52: 57, 54: 60, 55: 61, 32: [1, 59], 53: [1, 58], 56: L, 57: v, 58: B, 59: w, 60: D, 61: N, 62: z }), { 27: 69, 28: 43, 29: 44, 84: C, 85: M, 86: S, 87: R }, t(A, [2, 46]), t(A, [2, 47]), { 28: 70, 84: C, 85: M, 86: S }, { 27: 71, 28: 43, 29: 44, 84: C, 85: M, 86: S, 87: R }, { 27: 72, 28: 43, 29: 44, 84: C, 85: M, 86: S, 87: R }, { 27: 73, 28: 43, 29: 44, 84: C, 85: M, 86: S, 87: R }, { 53: [1, 74] }, t(X, [2, 20], { 28: 43, 29: 44, 27: 75, 30: [1, 76], 84: C, 85: M, 86: S, 87: R }), t(X, [2, 21], { 30: [1, 77] }), t(ct, [2, 91]), t(ct, [2, 92]), t(ct, [2, 93]), t([16, 25, 30, 32, 44, 45, 53, 56, 57, 58, 59, 60, 61, 62, 67, 69], [2, 94]), t(J, [2, 10]), { 15: 78, 22: u }, { 22: [2, 14] }, { 1: [2, 16] }, { 6: 30, 7: 29, 8: r, 9: n, 10: i, 11: a, 13: 11, 19: s, 24: 79, 25: [2, 18], 26: 22, 27: 34, 28: 43, 29: 44, 31: 23, 33: 24, 34: 25, 35: 26, 36: 27, 37: 28, 38: h, 40: d, 42: f, 43: p, 48: m, 50: _, 51: y, 63: b, 64: x, 66: k, 70: T, 84: C, 85: M, 86: S, 87: R }, t(A, [2, 26]), t(A, [2, 34]), t(A, [2, 35]), { 27: 80, 28: 43, 29: 44, 53: [1, 81], 84: C, 85: M, 86: S, 87: R }, { 52: 82, 54: 60, 55: 61, 56: L, 57: v, 58: B, 59: w, 60: D, 61: N, 62: z }, t(A, [2, 45]), { 55: 83, 61: N, 62: z }, t(Y, [2, 55], { 54: 84, 56: L, 57: v, 58: B, 59: w, 60: D }), t($, [2, 56]), t($, [2, 57]), t($, [2, 58]), t($, [2, 59]), t($, [2, 60]), t(lt, [2, 61]), t(lt, [2, 62]), t(A, [2, 37], { 44: [1, 85], 45: [1, 86] }), { 49: [1, 87] }, { 53: [1, 88] }, { 53: [1, 89] }, { 67: [1, 90], 69: [1, 91] }, { 28: 92, 84: C, 85: M, 86: S }, t(X, [2, 22]), t(X, [2, 23]), t(X, [2, 24]), { 16: [1, 93] }, { 25: [2, 19] }, t(ut, [2, 48]), { 27: 94, 28: 43, 29: 44, 84: C, 85: M, 86: S, 87: R }, { 27: 95, 28: 43, 29: 44, 53: [1, 96], 84: C, 85: M, 86: S, 87: R }, t(Y, [2, 54], { 54: 97, 56: L, 57: v, 58: B, 59: w, 60: D }), t(Y, [2, 53]), { 28: 98, 84: C, 85: M, 86: S }, { 46: 99, 50: W }, { 27: 101, 28: 43, 29: 44, 84: C, 85: M, 86: S, 87: R }, t(A, [2, 63], { 53: [1, 102] }), t(A, [2, 65], { 53: [1, 104], 65: [1, 103] }), t(A, [2, 69], { 53: [1, 105], 68: [1, 106] }), t(A, [2, 73], { 53: [1, 108], 65: [1, 107] }), t(A, [2, 77]), t(J, [2, 11]), t(ut, [2, 50]), t(ut, [2, 49]), { 27: 109, 28: 43, 29: 44, 84: C, 85: M, 86: S, 87: R }, t(Y, [2, 52]), t(A, [2, 38], { 45: [1, 110] }), { 47: [1, 111] }, { 46: 112, 47: [2, 42], 50: W }, t(A, [2, 41]), t(A, [2, 64]), t(A, [2, 66]), t(A, [2, 67], { 65: [1, 113] }), t(A, [2, 70]), t(A, [2, 71], { 53: [1, 114] }), t(A, [2, 74]), t(A, [2, 75], { 65: [1, 115] }), t(ut, [2, 51]), { 46: 116, 50: W }, t(A, [2, 39]), { 47: [2, 43] }, t(A, [2, 68]), t(A, [2, 72]), t(A, [2, 76]), { 47: [1, 117] }, t(A, [2, 40])],
defaultActions: { 2: [2, 1], 3: [2, 2], 4: [2, 3], 6: [2, 9], 13: [2, 12], 14: [2, 4], 20: [2, 15], 51: [2, 14], 52: [2, 16], 79: [2, 19], 112: [2, 43] },
parseError: function(V, Q) {
if (Q.recoverable)
this.trace(V);
else {
var q = new Error(V);
throw q.hash = Q, q;
}
},
parse: function(V) {
var Q = this, q = [0], U = [], F = [null], j = [], P = this.table, et = "", at = 0, It = 0, Lt = 2, Rt = 1, Ct = j.slice.call(arguments, 1), pt = Object.create(this.lexer), mt = { yy: {} };
for (var _t in this.yy)
Object.prototype.hasOwnProperty.call(this.yy, _t) && (mt.yy[_t] = this.yy[_t]);
pt.setInput(V, mt.yy), mt.yy.lexer = pt, mt.yy.parser = this, typeof pt.yylloc > "u" && (pt.yylloc = {});
var Tt = pt.yylloc;
j.push(Tt);
var ft = pt.options && pt.options.ranges;
typeof mt.yy.parseError == "function" ? this.parseError = mt.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
function le() {
var Et;
return Et = U.pop() || pt.lex() || Rt, typeof Et != "number" && (Et instanceof Array && (U = Et, Et = U.pop()), Et = Q.symbols_[Et] || Et), Et;
}
for (var Dt, Ht, $t, Qt, we = {}, Gt, Ft, zt, wt; ; ) {
if (Ht = q[q.length - 1], this.defaultActions[Ht] ? $t = this.defaultActions[Ht] : ((Dt === null || typeof Dt > "u") && (Dt = le()), $t = P[Ht] && P[Ht][Dt]), typeof $t > "u" || !$t.length || !$t[0]) {
var bt = "";
wt = [];
for (Gt in P[Ht])
this.terminals_[Gt] && Gt > Lt && wt.push("'" + this.terminals_[Gt] + "'");
pt.showPosition ? bt = "Parse error on line " + (at + 1) + `:
` + pt.showPosition() + `
Expecting ` + wt.join(", ") + ", got '" + (this.terminals_[Dt] || Dt) + "'" : bt = "Parse error on line " + (at + 1) + ": Unexpected " + (Dt == Rt ? "end of input" : "'" + (this.terminals_[Dt] || Dt) + "'"), this.parseError(bt, {
text: pt.match,
token: this.terminals_[Dt] || Dt,
line: pt.yylineno,
loc: Tt,
expected: wt
});
}
if ($t[0] instanceof Array && $t.length > 1)
throw new Error("Parse Error: multiple actions possible at state: " + Ht + ", token: " + Dt);
switch ($t[0]) {
case 1:
q.push(Dt), F.push(pt.yytext), j.push(pt.yylloc), q.push($t[1]), Dt = null, It = pt.yyleng, et = pt.yytext, at = pt.yylineno, Tt = pt.yylloc;
break;
case 2:
if (Ft = this.productions_[$t[1]][1], we.$ = F[F.length - Ft], we._$ = {
first_line: j[j.length - (Ft || 1)].first_line,
last_line: j[j.length - 1].last_line,
first_column: j[j.length - (Ft || 1)].first_column,
last_column: j[j.length - 1].last_column
}, ft && (we._$.range = [
j[j.length - (Ft || 1)].range[0],
j[j.length - 1].range[1]
]), Qt = this.performAction.apply(we, [
et,
It,
at,
mt.yy,
$t[1],
F,
j
].concat(Ct)), typeof Qt < "u")
return Qt;
Ft && (q = q.slice(0, -1 * Ft * 2), F = F.slice(0, -1 * Ft), j = j.slice(0, -1 * Ft)), q.push(this.productions_[$t[1]][0]), F.push(we.$), j.push(we._$), zt = P[q[q.length - 2]][q[q.length - 1]], q.push(zt);
break;
case 3:
return !0;
}
}
return !0;
}
}, K = function() {
var Z = {
EOF: 1,
parseError: function(Q, q) {
if (this.yy.parser)
this.yy.parser.parseError(Q, q);
else
throw new Error(Q);
},
setInput: function(V, Q) {
return this.yy = Q || this.yy || {}, this._input = V, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
first_line: 1,
first_column: 0,
last_line: 1,
last_column: 0
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
},
input: function() {
var V = this._input[0];
this.yytext += V, this.yyleng++, this.offset++, this.match += V, this.matched += V;
var Q = V.match(/(?:\r\n?|\n).*/g);
return Q ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), V;
},
unput: function(V) {
var Q = V.length, q = V.split(/(?:\r\n?|\n)/g);
this._input = V + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - Q), this.offset -= Q;
var U = this.match.split(/(?:\r\n?|\n)/g);
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), q.length - 1 && (this.yylineno -= q.length - 1);
var F = this.yylloc.range;
return this.yylloc = {
first_line: this.yylloc.first_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.first_column,
last_column: q ? (q.length === U.length ? this.yylloc.first_column : 0) + U[U.length - q.length].length - q[0].length : this.yylloc.first_column - Q
}, this.options.ranges && (this.yylloc.range = [F[0], F[0] + this.yyleng - Q]), this.yyleng = this.yytext.length, this;
},
more: function() {
return this._more = !0, this;
},
reject: function() {
if (this.options.backtrack_lexer)
this._backtrack = !0;
else
return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
return this;
},
less: function(V) {
this.unput(this.match.slice(V));
},
pastInput: function() {
var V = this.matched.substr(0, this.matched.length - this.match.length);
return (V.length > 20 ? "..." : "") + V.substr(-20).replace(/\n/g, "");
},
upcomingInput: function() {
var V = this.match;
return V.length < 20 && (V += this._input.substr(0, 20 - V.length)), (V.substr(0, 20) + (V.length > 20 ? "..." : "")).replace(/\n/g, "");
},
showPosition: function() {
var V = this.pastInput(), Q = new Array(V.length + 1).join("-");
return V + this.upcomingInput() + `
` + Q + "^";
},
test_match: function(V, Q) {
var q, U, F;
if (this.options.backtrack_lexer && (F = {
yylineno: this.yylineno,
yylloc: {
first_line: this.yylloc.first_line,
last_line: this.last_line,
first_column: this.yylloc.first_column,
last_column: this.yylloc.last_column
},
yytext: this.yytext,
match: this.match,
matches: this.matches,
matched: this.matched,
yyleng: this.yyleng,
offset: this.offset,
_more: this._more,
_input: this._input,
yy: this.yy,
conditionStack: this.conditionStack.slice(0),
done: this.done
}, this.options.ranges && (F.yylloc.range = this.yylloc.range.slice(0))), U = V[0].match(/(?:\r\n?|\n).*/g), U && (this.yylineno += U.length), this.yylloc = {
first_line: this.yylloc.last_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.last_column,
last_column: U ? U[U.length - 1].length - U[U.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + V[0].length
}, this.yytext += V[0], this.match += V[0], this.matches = V, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(V[0].length), this.matched += V[0], q = this.performAction.call(this, this.yy, this, Q, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), q)
return q;
if (this._backtrack) {
for (var j in F)
this[j] = F[j];
return !1;
}
return !1;
},
next: function() {
if (this.done)
return this.EOF;
this._input || (this.done = !0);
var V, Q, q, U;
this._more || (this.yytext = "", this.match = "");
for (var F = this._currentRules(), j = 0; j < F.length; j++)
if (q = this._input.match(this.rules[F[j]]), q && (!Q || q[0].length > Q[0].length)) {
if (Q = q, U = j, this.options.backtrack_lexer) {
if (V = this.test_match(q, F[j]), V !== !1)
return V;
if (this._backtrack) {
Q = !1;
continue;
} else
return !1;
} else if (!this.options.flex)
break;
}
return Q ? (V = this.test_match(Q, F[U]), V !== !1 ? V : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
},
lex: function() {
var Q = this.next();
return Q || this.lex();
},
begin: function(Q) {
this.conditionStack.push(Q);
},
popState: function() {
var Q = this.conditionStack.length - 1;
return Q > 0 ? this.conditionStack.pop() : this.conditionStack[0];
},
_currentRules: function() {
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
},
topState: function(Q) {
return Q = this.conditionStack.length - 1 - Math.abs(Q || 0), Q >= 0 ? this.conditionStack[Q] : "INITIAL";
},
pushState: function(Q) {
this.begin(Q);
},
stateStackSize: function() {
return this.conditionStack.length;
},
options: {},
performAction: function(Q, q, U, F) {
switch (U) {
case 0:
return this.begin("open_directive"), 19;
case 1:
return 8;
case 2:
return 9;
case 3:
return 10;
case 4:
return 11;
case 5:
return this.begin("type_directive"), 20;
case 6:
return this.popState(), this.begin("arg_directive"), 17;
case 7:
return this.popState(), this.popState(), 22;
case 8:
return 21;
case 9:
break;
case 10:
break;
case 11:
return this.begin("acc_title"), 38;
case 12:
return this.popState(), "acc_title_value";
case 13:
return this.begin("acc_descr"), 40;
case 14:
return this.popState(), "acc_descr_value";
case 15:
this.begin("acc_descr_multiline");
break;
case 16:
this.popState();
break;
case 17:
return "acc_descr_multiline_value";
case 18:
return 16;
case 19:
break;
case 20:
return 23;
case 21:
return 23;
case 22:
return this.begin("struct"), 45;
case 23:
return "EDGE_STATE";
case 24:
return "EOF_IN_STRUCT";
case 25:
return "OPEN_IN_STRUCT";
case 26:
return this.popState(), 47;
case 27:
break;
case 28:
return "MEMBER";
case 29:
return 43;
case 30:
return 70;
case 31:
return 63;
case 32:
return 64;
case 33:
return 66;
case 34:
return 48;
case 35:
return 49;
case 36:
this.begin("generic");
break;
case 37:
this.popState();
break;
case 38:
return "GENERICTYPE";
case 39:
this.begin("string");
break;
case 40:
this.popState();
break;
case 41:
return "STR";
case 42:
this.begin("bqstring");
break;
case 43:
this.popState();
break;
case 44:
return "BQUOTE_STR";
case 45:
this.begin("href");
break;
case 46:
this.popState();
break;
case 47:
return 69;
case 48:
this.begin("callback_name");
break;
case 49:
this.popState();
break;
case 50:
this.popState(), this.begin("callback_args");
break;
case 51:
return 67;
case 52:
this.popState();
break;
case 53:
return 68;
case 54:
return 65;
case 55:
return 65;
case 56:
return 65;
case 57:
return 65;
case 58:
return 57;
case 59:
return 57;
case 60:
return 59;
case 61:
return 59;
case 62:
return 58;
case 63:
return 56;
case 64:
return 60;
case 65:
return 61;
case 66:
return 62;
case 67:
return 32;
case 68:
return 44;
case 69:
return 82;
case 70:
return "DOT";
case 71:
return "PLUS";
case 72:
return 79;
case 73:
return "EQUALS";
case 74:
return "EQUALS";
case 75:
return 86;
case 76:
return "PUNCTUATION";
case 77:
return 85;
case 78:
return 84;
case 79:
return 81;
case 80:
return 25;
}
},
rules: [/^(?:%%\{)/, /^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:((?:(?!\}%%)[^:.])*))/, /^(?::)/, /^(?:\}%%)/, /^(?:((?:(?!\}%%).|\n)*))/, /^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/, /^(?:%%[^\n]*(\r?\n)*)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:classDiagram-v2\b)/, /^(?:classDiagram\b)/, /^(?:[{])/, /^(?:\[\*\])/, /^(?:$)/, /^(?:[{])/, /^(?:[}])/, /^(?:[\n])/, /^(?:[^{}\n]*)/, /^(?:class\b)/, /^(?:cssClass\b)/, /^(?:callback\b)/, /^(?:link\b)/, /^(?:click\b)/, /^(?:<<)/, /^(?:>>)/, /^(?:[~])/, /^(?:[~])/, /^(?:[^~]*)/, /^(?:["])/, /^(?:["])/, /^(?:[^"]*)/, /^(?:[`])/, /^(?:[`])/, /^(?:[^`]+)/, /^(?:href[\s]+["])/, /^(?:["])/, /^(?:[^"]*)/, /^(?:call[\s]+)/, /^(?:\([\s]*\))/, /^(?:\()/, /^(?:[^(]*)/, /^(?:\))/, /^(?:[^)]*)/, /^(?:_self\b)/, /^(?:_blank\b)/, /^(?:_parent\b)/, /^(?:_top\b)/, /^(?:\s*<\|)/, /^(?:\s*\|>)/, /^(?:\s*>)/, /^(?:\s*<)/, /^(?:\s*\*)/, /^(?:\s*o\b)/, /^(?:\s*\(\))/, /^(?:--)/, /^(?:\.\.)/, /^(?::{1}[^:\n;]+)/, /^(?::{3})/, /^(?:-)/, /^(?:\.)/, /^(?:\+)/, /^(?:%)/, /^(?:=)/, /^(?:=)/, /^(?:\w+)/, /^(?:[!"#$%&'*+,-.`?\\/])/, /^(?:[0-9]+)/, /^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/, /^(?:\s)/, /^(?:$)/],
conditions: { acc_descr_multiline: { rules: [16, 17], inclusive: !1 }, acc_descr: { rules: [14], inclusive: !1 }, acc_title: { rules: [12], inclusive: !1 }, arg_directive: { rules: [7, 8], inclusive: !1 }, type_directive: { rules: [6, 7], inclusive: !1 }, open_directive: { rules: [5], inclusive: !1 }, callback_args: { rules: [52, 53], inclusive: !1 }, callback_name: { rules: [49, 50, 51], inclusive: !1 }, href: { rules: [46, 47], inclusive: !1 }, struct: { rules: [23, 24, 25, 26, 27, 28], inclusive: !1 }, generic: { rules: [37, 38], inclusive: !1 }, bqstring: { rules: [43, 44], inclusive: !1 }, string: { rules: [40, 41], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 9, 10, 11, 13, 15, 18, 19, 20, 21, 22, 23, 29, 30, 31, 32, 33, 34, 35, 36, 39, 42, 45, 48, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80], inclusive: !0 } }
};
return Z;
}();
tt.lexer = K;
function it() {
this.yy = {};
}
return it.prototype = tt, tt.Parser = it, new it();
}();
Yf.parser = Yf;
const RZ = (t, e) => {
var r;
return ((r = e == null ? void 0 : e.class) == null ? void 0 : r.defaultRenderer) === "dagre-wrapper" ? !1 : t.match(/^\s*classDiagram/) !== null;
}, IZ = (t, e) => {
var r;
return t.match(/^\s*classDiagram/) !== null && ((r = e == null ? void 0 : e.class) == null ? void 0 : r.defaultRenderer) === "dagre-wrapper" ? !0 : t.match(/^\s*classDiagram-v2/) !== null;
}, D4 = "classid-";
let O4 = [], cr = {}, A6 = 0, Vc = [];
const lc = (t) => pe.sanitizeText(t, nt()), NZ = function(t, e, r) {
sr.parseDirective(this, t, e, r);
}, zc = function(t) {
let e = "", r = t;
if (t.indexOf("~") > 0) {
let n = t.split("~");
r = n[0], e = pe.sanitizeText(n[1], nt());
}
return { className: r, type: e };
}, Sb = function(t) {
let e = zc(t);
typeof cr[e.className] < "u" || (cr[e.className] = {
id: e.className,
type: e.type,
cssClasses: [],
methods: [],
members: [],
annotations: [],
domId: D4 + e.className + "-" + A6
}, A6++);
}, UA = function(t) {
const e = Object.keys(cr);
for (let r = 0; r < e.length; r++)
if (cr[e[r]].id === t)
return cr[e[r]].domId;
}, BZ = function() {
O4 = [], cr = {}, Vc = [], Vc.push(HA), pi();
}, DZ = function(t) {
return cr[t];
}, OZ = function() {
return cr;
}, FZ = function() {
return O4;
}, PZ = function(t) {
H.debug("Adding relation: " + JSON.stringify(t)), Sb(t.id1), Sb(t.id2), t.id1 = zc(t.id1).className, t.id2 = zc(t.id2).className, t.relationTitle1 = pe.sanitizeText(
t.relationTitle1.trim(),
nt()
), t.relationTitle2 = pe.sanitizeText(
t.relationTitle2.trim(),
nt()
), O4.push(t);
}, qZ = function(t, e) {
const r = zc(t).className;
cr[r].annotations.push(e);
}, WA = function(t, e) {
const r = zc(t).className, n = cr[r];
if (typeof e == "string") {
const i = e.trim();
i.startsWith("<<") && i.endsWith(">>") ? n.annotations.push(lc(i.substring(2, i.length - 2))) : i.indexOf(")") > 0 ? n.methods.push(lc(i)) : i && n.members.push(lc(i));
}
}, VZ = function(t, e) {
Array.isArray(e) && (e.reverse(), e.forEach((r) => WA(t, r)));
}, zZ = function(t) {
return t.substring(0, 1) === ":" ? pe.sanitizeText(t.substr(1).trim(), nt()) : lc(t.trim());
}, F4 = function(t, e) {
t.split(",").forEach(function(r) {
let n = r;
r[0].match(/\d/) && (n = D4 + n), typeof cr[n] < "u" && cr[n].cssClasses.push(e);
});
}, YZ = function(t, e) {
const r = nt();
t.split(",").forEach(function(n) {
typeof e < "u" && (cr[n].tooltip = pe.sanitizeText(e, r));
});
}, UZ = function(t) {
return cr[t].tooltip;
}, WZ = function(t, e, r) {
const n = nt();
t.split(",").forEach(function(i) {
let a = i;
i[0].match(/\d/) && (a = D4 + a), typeof cr[a] < "u" && (cr[a].link = Re.formatUrl(e, n), n.securityLevel === "sandbox" ? cr[a].linkTarget = "_top" : typeof r == "string" ? cr[a].linkTarget = lc(r) : cr[a].linkTarget = "_blank");
}), F4(t, "clickable");
}, HZ = function(t, e, r) {
t.split(",").forEach(function(n) {
GZ(n, e, r), cr[n].haveCallback = !0;
}), F4(t, "clickable");
}, GZ = function(t, e, r) {
const n = nt();
let i = t, a = UA(i);
if (n.securityLevel === "loose" && !(typeof e > "u") && typeof cr[i] < "u") {
let s = [];
if (typeof r == "string") {
s = r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
for (let o = 0; o < s.length; o++) {
let l = s[o].trim();
l.charAt(0) === '"' && l.charAt(l.length - 1) === '"' && (l = l.substr(1, l.length - 2)), s[o] = l;
}
}
s.length === 0 && s.push(a), Vc.push(function() {
const o = document.querySelector(`[id="${a}"]`);
o !== null && o.addEventListener(
"click",
function() {
Re.runFunc(e, ...s);
},
!1
);
});
}
}, jZ = function(t) {
Vc.forEach(function(e) {
e(t);
});
}, $Z = {
LINE: 0,
DOTTED_LINE: 1
}, XZ = {
AGGREGATION: 0,
EXTENSION: 1,
COMPOSITION: 2,
DEPENDENCY: 3,
LOLLIPOP: 4
}, HA = function(t) {
let e = St(".mermaidTooltip");
(e._groups || e)[0][0] === null && (e = St("body").append("div").attr("class", "mermaidTooltip").style("opacity", 0)), St(t).select("svg").selectAll("g.node").on("mouseover", function() {
const i = St(this);
if (i.attr("title") === null)
return;
const s = this.getBoundingClientRect();
e.transition().duration(200).style("opacity", ".9"), e.text(i.attr("title")).style("left", window.scrollX + s.left + (s.right - s.left) / 2 + "px").style("top", window.scrollY + s.top - 14 + document.body.scrollTop + "px"), e.html(e.html().replace(/<br\/>/g, "
")), i.classed("hover", !0);
}).on("mouseout", function() {
e.transition().duration(500).style("opacity", 0), St(this).classed("hover", !1);
});
};
Vc.push(HA);
let GA = "TB";
const KZ = () => GA, ZZ = (t) => {
GA = t;
}, vo = {
parseDirective: NZ,
setAccTitle: zn,
getAccTitle: gi,
getAccDescription: mi,
setAccDescription: yi,
getConfig: () => nt().class,
addClass: Sb,
bindFunctions: jZ,
clear: BZ,
getClass: DZ,
getClasses: OZ,
addAnnotation: qZ,
getRelations: FZ,
addRelation: PZ,
getDirection: KZ,
setDirection: ZZ,
addMember: WA,
addMembers: VZ,
cleanupLabel: zZ,
lineType: $Z,
relationType: XZ,
setClickEvent: HZ,
setCssClass: F4,
setLink: WZ,
getTooltip: UZ,
setTooltip: YZ,
lookUpDomId: UA
};
var qd, M6;
function QZ() {
if (M6)
return qd;
M6 = 1;
var t = Z1;
function e() {
this.__data__ = new t(), this.size = 0;
}
return qd = e, qd;
}
var Vd, L6;
function JZ() {
if (L6)
return Vd;
L6 = 1;
function t(e) {
var r = this.__data__, n = r.delete(e);
return this.size = r.size, n;
}
return Vd = t, Vd;
}
var zd, R6;
function tQ() {
if (R6)
return zd;
R6 = 1;
function t(e) {
return this.__data__.get(e);
}
return zd = t, zd;
}
var Yd, I6;
function eQ() {
if (I6)
return Yd;
I6 = 1;
function t(e) {
return this.__data__.has(e);
}
return Yd = t, Yd;
}
var Ud, N6;
function rQ() {
if (N6)
return Ud;
N6 = 1;
var t = Z1, e = v4, r = x4, n = 200;
function i(a, s) {
var o = this.__data__;
if (o instanceof t) {
var l = o.__data__;
if (!e || l.length < n - 1)
return l.push([a, s]), this.size = ++o.size, this;
o = this.__data__ = new r(l);
}
return o.set(a, s), this.size = o.size, this;
}
return Ud = i, Ud;
}
var Wd, B6;
function c0() {
if (B6)
return Wd;
B6 = 1;
var t = Z1, e = QZ(), r = JZ(), n = tQ(), i = eQ(), a = rQ();
function s(o) {
var l = this.__data__ = new t(o);
this.size = l.size;
}
return s.prototype.clear = e, s.prototype.delete = r, s.prototype.get = n, s.prototype.has = i, s.prototype.set = a, Wd = s, Wd;
}
var Hd, D6;
function P4() {
if (D6)
return Hd;
D6 = 1;
function t(e, r) {
for (var n = -1, i = e == null ? 0 : e.length; ++n < i && r(e[n], n, e) !== !1; )
;
return e;
}
return Hd = t, Hd;
}
var Gd, O6;
function jA() {
if (O6)
return Gd;
O6 = 1;
var t = Zs, e = function() {
try {
var r = t(Object, "defineProperty");
return r({}, "", {}), r;
} catch {
}
}();
return Gd = e, Gd;
}
var jd, F6;
function u0() {
if (F6)
return jd;
F6 = 1;
var t = jA();
function e(r, n, i) {
n == "__proto__" && t ? t(r, n, {
configurable: !0,
enumerable: !0,
value: i,
writable: !0
}) : r[n] = i;
}
return jd = e, jd;
}
var $d, P6;
function h0() {
if (P6)
return $d;
P6 = 1;
var t = u0(), e = ul(), r = Object.prototype, n = r.hasOwnProperty;
function i(a, s, o) {
var l = a[s];
(!(n.call(a, s) && e(l, o)) || o === void 0 && !(s in a)) && t(a, s, o);
}
return $d = i, $d;
}
var Xd, q6;
function ou() {
if (q6)
return Xd;
q6 = 1;
var t = h0(), e = u0();
function r(n, i, a, s) {
var o = !a;
a || (a = {});
for (var l = -1, u = i.length; ++l < u; ) {
var h = i[l], d = s ? s(a[h], n[h], h, a, n) : void 0;
d === void 0 && (d = n[h]), o ? e(a, h, d) : t(a, h, d);
}
return a;
}
return Xd = r, Xd;
}
var Kd, V6;
function nQ() {
if (V6)
return Kd;
V6 = 1;
function t(e, r) {
for (var n = -1, i = Array(e); ++n < e; )
i[n] = r(n);
return i;
}
return Kd = t, Kd;
}
var Zd, z6;
function Yi() {
if (z6)
return Zd;
z6 = 1;
function t(e) {
return e != null && typeof e == "object";
}
return Zd = t, Zd;
}
var Qd, Y6;
function iQ() {
if (Y6)
return Qd;
Y6 = 1;
var t = Ks(), e = Yi(), r = "[object Arguments]";
function n(i) {
return e(i) && t(i) == r;
}
return Qd = n, Qd;
}
var Jd, U6;
function lu() {
if (U6)
return Jd;
U6 = 1;
var t = iQ(), e = Yi(), r = Object.prototype, n = r.hasOwnProperty, i = r.propertyIsEnumerable, a = t(function() {
return arguments;
}()) ? t : function(s) {
return e(s) && n.call(s, "callee") && !i.call(s, "callee");
};
return Jd = a, Jd;
}
var t2, W6;
function br() {
if (W6)
return t2;
W6 = 1;
var t = Array.isArray;
return t2 = t, t2;
}
var nh = { exports: {} }, e2, H6;
function aQ() {
if (H6)
return e2;
H6 = 1;
function t() {
return !1;
}
return e2 = t, e2;
}
var G6;
function pl() {
return G6 || (G6 = 1, function(t, e) {
var r = fi, n = aQ(), i = e && !e.nodeType && e, a = i && !0 && t && !t.nodeType && t, s = a && a.exports === i, o = s ? r.Buffer : void 0, l = o ? o.isBuffer : void 0, u = l || n;
t.exports = u;
}(nh, nh.exports)), nh.exports;
}
var r2, j6;
function f0() {
if (j6)
return r2;
j6 = 1;
var t = 9007199254740991, e = /^(?:0|[1-9]\d*)$/;
function r(n, i) {
var a = typeof n;
return i = i == null ? t : i, !!i && (a == "number" || a != "symbol" && e.test(n)) && n > -1 && n % 1 == 0 && n < i;
}
return r2 = r, r2;
}
var n2, $6;
function q4() {
if ($6)
return n2;
$6 = 1;
var t = 9007199254740991;
function e(r) {
return typeof r == "number" && r > -1 && r % 1 == 0 && r <= t;
}
return n2 = e, n2;
}
var i2, X6;
function sQ() {
if (X6)
return i2;
X6 = 1;
var t = Ks(), e = q4(), r = Yi(), n = "[object Arguments]", i = "[object Array]", a = "[object Boolean]", s = "[object Date]", o = "[object Error]", l = "[object Function]", u = "[object Map]", h = "[object Number]", d = "[object Object]", f = "[object RegExp]", p = "[object Set]", m = "[object String]", _ = "[object WeakMap]", y = "[object ArrayBuffer]", b = "[object DataView]", x = "[object Float32Array]", k = "[object Float64Array]", T = "[object Int8Array]", C = "[object Int16Array]", M = "[object Int32Array]", S = "[object Uint8Array]", R = "[object Uint8ClampedArray]", A = "[object Uint16Array]", L = "[object Uint32Array]", v = {};
v[x] = v[k] = v[T] = v[C] = v[M] = v[S] = v[R] = v[A] = v[L] = !0, v[n] = v[i] = v[y] = v[a] = v[b] = v[s] = v[o] = v[l] = v[u] = v[h] = v[d] = v[f] = v[p] = v[m] = v[_] = !1;
function B(w) {
return r(w) && e(w.length) && !!v[t(w)];
}
return i2 = B, i2;
}
var a2, K6;
function d0() {
if (K6)
return a2;
K6 = 1;
function t(e) {
return function(r) {
return e(r);
};
}
return a2 = t, a2;
}
var ih = { exports: {} }, Z6;
function V4() {
return Z6 || (Z6 = 1, function(t, e) {
var r = XS, n = e && !e.nodeType && e, i = n && !0 && t && !t.nodeType && t, a = i && i.exports === n, s = a && r.process, o = function() {
try {
var l = i && i.require && i.require("util").types;
return l || s && s.binding && s.binding("util");
} catch {
}
}();
t.exports = o;
}(ih, ih.exports)), ih.exports;
}
var s2, Q6;
function cu() {
if (Q6)
return s2;
Q6 = 1;
var t = sQ(), e = d0(), r = V4(), n = r && r.isTypedArray, i = n ? e(n) : t;
return s2 = i, s2;
}
var o2, J6;
function $A() {
if (J6)
return o2;
J6 = 1;
var t = nQ(), e = lu(), r = br(), n = pl(), i = f0(), a = cu(), s = Object.prototype, o = s.hasOwnProperty;
function l(u, h) {
var d = r(u), f = !d && e(u), p = !d && !f && n(u), m = !d && !f && !p && a(u), _ = d || f || p || m, y = _ ? t(u.length, String) : [], b = y.length;
for (var x in u)
(h || o.call(u, x)) && !(_ && (x == "length" || p && (x == "offset" || x == "parent") || m && (x == "buffer" || x == "byteLength" || x == "byteOffset") || i(x, b))) && y.push(x);
return y;
}
return o2 = l, o2;
}
var l2, tx;
function p0() {
if (tx)
return l2;
tx = 1;
var t = Object.prototype;
function e(r) {
var n = r && r.constructor, i = typeof n == "function" && n.prototype || t;
return r === i;
}
return l2 = e, l2;
}
var c2, ex;
function XA() {
if (ex)
return c2;
ex = 1;
function t(e, r) {
return function(n) {
return e(r(n));
};
}
return c2 = t, c2;
}
var u2, rx;
function oQ() {
if (rx)
return u2;
rx = 1;
var t = XA(), e = t(Object.keys, Object);
return u2 = e, u2;
}
var h2, nx;
function z4() {
if (nx)
return h2;
nx = 1;
var t = p0(), e = oQ(), r = Object.prototype, n = r.hasOwnProperty;
function i(a) {
if (!t(a))
return e(a);
var s = [];
for (var o in Object(a))
n.call(a, o) && o != "constructor" && s.push(o);
return s;
}
return h2 = i, h2;
}
var f2, ix;
function _a() {
if (ix)
return f2;
ix = 1;
var t = ll(), e = q4();
function r(n) {
return n != null && e(n.length) && !t(n);
}
return f2 = r, f2;
}
var d2, ax;
function as() {
if (ax)
return d2;
ax = 1;
var t = $A(), e = z4(), r = _a();
function n(i) {
return r(i) ? t(i) : e(i);
}
return d2 = n, d2;
}
var p2, sx;
function lQ() {
if (sx)
return p2;
sx = 1;
var t = ou(), e = as();
function r(n, i) {
return n && t(i, e(i), n);
}
return p2 = r, p2;
}
var g2, ox;
function cQ() {
if (ox)
return g2;
ox = 1;
function t(e) {
var r = [];
if (e != null)
for (var n in Object(e))
r.push(n);
return r;
}
return g2 = t, g2;
}
var y2, lx;
function uQ() {
if (lx)
return y2;
lx = 1;
var t = Vn(), e = p0(), r = cQ(), n = Object.prototype, i = n.hasOwnProperty;
function a(s) {
if (!t(s))
return r(s);
var o = e(s), l = [];
for (var u in s)
u == "constructor" && (o || !i.call(s, u)) || l.push(u);
return l;
}
return y2 = a, y2;
}
var m2, cx;
function Qs() {
if (cx)
return m2;
cx = 1;
var t = $A(), e = uQ(), r = _a();
function n(i) {
return r(i) ? t(i, !0) : e(i);
}
return m2 = n, m2;
}
var b2, ux;
function hQ() {
if (ux)
return b2;
ux = 1;
var t = ou(), e = Qs();
function r(n, i) {
return n && t(i, e(i), n);
}
return b2 = r, b2;
}
var ah = { exports: {} }, hx;
function KA() {
return hx || (hx = 1, function(t, e) {
var r = fi, n = e && !e.nodeType && e, i = n && !0 && t && !t.nodeType && t, a = i && i.exports === n, s = a ? r.Buffer : void 0, o = s ? s.allocUnsafe : void 0;
function l(u, h) {
if (h)
return u.slice();
var d = u.length, f = o ? o(d) : new u.constructor(d);
return u.copy(f), f;
}
t.exports = l;
}(ah, ah.exports)), ah.exports;
}
var _2, fx;
function ZA() {
if (fx)
return _2;
fx = 1;
function t(e, r) {
var n = -1, i = e.length;
for (r || (r = Array(i)); ++n < i; )
r[n] = e[n];
return r;
}
return _2 = t, _2;
}
var v2, dx;
function QA() {
if (dx)
return v2;
dx = 1;
function t(e, r) {
for (var n = -1, i = e == null ? 0 : e.length, a = 0, s = []; ++n < i; ) {
var o = e[n];
r(o, n, e) && (s[a++] = o);
}
return s;
}
return v2 = t, v2;
}
var x2, px;
function JA() {
if (px)
return x2;
px = 1;
function t() {
return [];
}
return x2 = t, x2;
}
var k2, gx;
function Y4() {
if (gx)
return k2;
gx = 1;
var t = QA(), e = JA(), r = Object.prototype, n = r.propertyIsEnumerable, i = Object.getOwnPropertySymbols, a = i ? function(s) {
return s == null ? [] : (s = Object(s), t(i(s), function(o) {
return n.call(s, o);
}));
} : e;
return k2 = a, k2;
}
var w2, yx;
function fQ() {
if (yx)
return w2;
yx = 1;
var t = ou(), e = Y4();
function r(n, i) {
return t(n, e(n), i);
}
return w2 = r, w2;
}
var T2, mx;
function U4() {
if (mx)
return T2;
mx = 1;
function t(e, r) {
for (var n = -1, i = r.length, a = e.length; ++n < i; )
e[a + n] = r[n];
return e;
}
return T2 = t, T2;
}
var E2, bx;
function g0() {
if (bx)
return E2;
bx = 1;
var t = XA(), e = t(Object.getPrototypeOf, Object);
return E2 = e, E2;
}
var C2, _x;
function tM() {
if (_x)
return C2;
_x = 1;
var t = U4(), e = g0(), r = Y4(), n = JA(), i = Object.getOwnPropertySymbols, a = i ? function(s) {
for (var o = []; s; )
t(o, r(s)), s = e(s);
return o;
} : n;
return C2 = a, C2;
}
var S2, vx;
function dQ() {
if (vx)
return S2;
vx = 1;
var t = ou(), e = tM();
function r(n, i) {
return t(n, e(n), i);
}
return S2 = r, S2;
}
var A2, xx;
function eM() {
if (xx)
return A2;
xx = 1;
var t = U4(), e = br();
function r(n, i, a) {
var s = i(n);
return e(n) ? s : t(s, a(n));
}
return A2 = r, A2;
}
var M2, kx;
function rM() {
if (kx)
return M2;
kx = 1;
var t = eM(), e = Y4(), r = as();
function n(i) {
return t(i, r, e);
}
return M2 = n, M2;
}
var L2, wx;
function pQ() {
if (wx)
return L2;
wx = 1;
var t = eM(), e = tM(), r = Qs();
function n(i) {
return t(i, r, e);
}
return L2 = n, L2;
}
var R2, Tx;
function gQ() {
if (Tx)
return R2;
Tx = 1;
var t = Zs, e = fi, r = t(e, "DataView");
return R2 = r, R2;
}
var I2, Ex;
function yQ() {
if (Ex)
return I2;
Ex = 1;
var t = Zs, e = fi, r = t(e, "Promise");
return I2 = r, I2;
}
var N2, Cx;
function nM() {
if (Cx)
return N2;
Cx = 1;
var t = Zs, e = fi, r = t(e, "Set");
return N2 = r, N2;
}
var B2, Sx;
function mQ() {
if (Sx)
return B2;
Sx = 1;
var t = Zs, e = fi, r = t(e, "WeakMap");
return B2 = r, B2;
}
var D2, Ax;
function gl() {
if (Ax)
return D2;
Ax = 1;
var t = gQ(), e = v4, r = yQ(), n = nM(), i = mQ(), a = Ks(), s = KS(), o = "[object Map]", l = "[object Object]", u = "[object Promise]", h = "[object Set]", d = "[object WeakMap]", f = "[object DataView]", p = s(t), m = s(e), _ = s(r), y = s(n), b = s(i), x = a;
return (t && x(new t(new ArrayBuffer(1))) != f || e && x(new e()) != o || r && x(r.resolve()) != u || n && x(new n()) != h || i && x(new i()) != d) && (x = function(k) {
var T = a(k), C = T == l ? k.constructor : void 0, M = C ? s(C) : "";
if (M)
switch (M) {
case p:
return f;
case m:
return o;
case _:
return u;
case y:
return h;
case b:
return d;
}
return T;
}), D2 = x, D2;
}
var O2, Mx;
function bQ() {
if (Mx)
return O2;
Mx = 1;
var t = Object.prototype, e = t.hasOwnProperty;
function r(n) {
var i = n.length, a = new n.constructor(i);
return i && typeof n[0] == "string" && e.call(n, "index") && (a.index = n.index, a.input = n.input), a;
}
return O2 = r, O2;
}
var F2, Lx;
function iM() {
if (Lx)
return F2;
Lx = 1;
var t = fi, e = t.Uint8Array;
return F2 = e, F2;
}
var P2, Rx;
function W4() {
if (Rx)
return P2;
Rx = 1;
var t = iM();
function e(r) {
var n = new r.constructor(r.byteLength);
return new t(n).set(new t(r)), n;
}
return P2 = e, P2;
}
var q2, Ix;
function _Q() {
if (Ix)
return q2;
Ix = 1;
var t = W4();
function e(r, n) {
var i = n ? t(r.buffer) : r.buffer;
return new r.constructor(i, r.byteOffset, r.byteLength);
}
return q2 = e, q2;
}
var V2, Nx;
function vQ() {
if (Nx)
return V2;
Nx = 1;
var t = /\w*$/;
function e(r) {
var n = new r.constructor(r.source, t.exec(r));
return n.lastIndex = r.lastIndex, n;
}
return V2 = e, V2;
}
var z2, Bx;
function xQ() {
if (Bx)
return z2;
Bx = 1;
var t = ol(), e = t ? t.prototype : void 0, r = e ? e.valueOf : void 0;
function n(i) {
return r ? Object(r.call(i)) : {};
}
return z2 = n, z2;
}
var Y2, Dx;
function aM() {
if (Dx)
return Y2;
Dx = 1;
var t = W4();
function e(r, n) {
var i = n ? t(r.buffer) : r.buffer;
return new r.constructor(i, r.byteOffset, r.length);
}
return Y2 = e, Y2;
}
var U2, Ox;
function kQ() {
if (Ox)
return U2;
Ox = 1;
var t = W4(), e = _Q(), r = vQ(), n = xQ(), i = aM(), a = "[object Boolean]", s = "[object Date]", o = "[object Map]", l = "[object Number]", u = "[object RegExp]", h = "[object Set]", d = "[object String]", f = "[object Symbol]", p = "[object ArrayBuffer]", m = "[object DataView]", _ = "[object Float32Array]", y = "[object Float64Array]", b = "[object Int8Array]", x = "[object Int16Array]", k = "[object Int32Array]", T = "[object Uint8Array]", C = "[object Uint8ClampedArray]", M = "[object Uint16Array]", S = "[object Uint32Array]";
function R(A, L, v) {
var B = A.constructor;
switch (L) {
case p:
return t(A);
case a:
case s:
return new B(+A);
case m:
return e(A, v);
case _:
case y:
case b:
case x:
case k:
case T:
case C:
case M:
case S:
return i(A, v);
case o:
return new B();
case l:
case d:
return new B(A);
case u:
return r(A);
case h:
return new B();
case f:
return n(A);
}
}
return U2 = R, U2;
}
var W2, Fx;
function sM() {
if (Fx)
return W2;
Fx = 1;
var t = Vn(), e = Object.create, r = function() {
function n() {
}
return function(i) {
if (!t(i))
return {};
if (e)
return e(i);
n.prototype = i;
var a = new n();
return n.prototype = void 0, a;
};
}();
return W2 = r, W2;
}
var H2, Px;
function oM() {
if (Px)
return H2;
Px = 1;
var t = sM(), e = g0(), r = p0();
function n(i) {
return typeof i.constructor == "function" && !r(i) ? t(e(i)) : {};
}
return H2 = n, H2;
}
var G2, qx;
function wQ() {
if (qx)
return G2;
qx = 1;
var t = gl(), e = Yi(), r = "[object Map]";
function n(i) {
return e(i) && t(i) == r;
}
return G2 = n, G2;
}
var j2, Vx;
function TQ() {
if (Vx)
return j2;
Vx = 1;
var t = wQ(), e = d0(), r = V4(), n = r && r.isMap, i = n ? e(n) : t;
return j2 = i, j2;
}
var $2, zx;
function EQ() {
if (zx)
return $2;
zx = 1;
var t = gl(), e = Yi(), r = "[object Set]";
function n(i) {
return e(i) && t(i) == r;
}
return $2 = n, $2;
}
var X2, Yx;
function CQ() {
if (Yx)
return X2;
Yx = 1;
var t = EQ(), e = d0(), r = V4(), n = r && r.isSet, i = n ? e(n) : t;
return X2 = i, X2;
}
var K2, Ux;
function lM() {
if (Ux)
return K2;
Ux = 1;
var t = c0(), e = P4(), r = h0(), n = lQ(), i = hQ(), a = KA(), s = ZA(), o = fQ(), l = dQ(), u = rM(), h = pQ(), d = gl(), f = bQ(), p = kQ(), m = oM(), _ = br(), y = pl(), b = TQ(), x = Vn(), k = CQ(), T = as(), C = Qs(), M = 1, S = 2, R = 4, A = "[object Arguments]", L = "[object Array]", v = "[object Boolean]", B = "[object Date]", w = "[object Error]", D = "[object Function]", N = "[object GeneratorFunction]", z = "[object Map]", X = "[object Number]", ct = "[object Object]", J = "[object RegExp]", Y = "[object Set]", $ = "[object String]", lt = "[object Symbol]", ut = "[object WeakMap]", W = "[object ArrayBuffer]", tt = "[object DataView]", K = "[object Float32Array]", it = "[object Float64Array]", Z = "[object Int8Array]", V = "[object Int16Array]", Q = "[object Int32Array]", q = "[object Uint8Array]", U = "[object Uint8ClampedArray]", F = "[object Uint16Array]", j = "[object Uint32Array]", P = {};
P[A] = P[L] = P[W] = P[tt] = P[v] = P[B] = P[K] = P[it] = P[Z] = P[V] = P[Q] = P[z] = P[X] = P[ct] = P[J] = P[Y] = P[$] = P[lt] = P[q] = P[U] = P[F] = P[j] = !0, P[w] = P[D] = P[ut] = !1;
function et(at, It, Lt, Rt, Ct, pt) {
var mt, _t = It & M, Tt = It & S, ft = It & R;
if (Lt && (mt = Ct ? Lt(at, Rt, Ct, pt) : Lt(at)), mt !== void 0)
return mt;
if (!x(at))
return at;
var le = _(at);
if (le) {
if (mt = f(at), !_t)
return s(at, mt);
} else {
var Dt = d(at), Ht = Dt == D || Dt == N;
if (y(at))
return a(at, _t);
if (Dt == ct || Dt == A || Ht && !Ct) {
if (mt = Tt || Ht ? {} : m(at), !_t)
return Tt ? l(at, i(mt, at)) : o(at, n(mt, at));
} else {
if (!P[Dt])
return Ct ? at : {};
mt = p(at, Dt, _t);
}
}
pt || (pt = new t());
var $t = pt.get(at);
if ($t)
return $t;
pt.set(at, mt), k(at) ? at.forEach(function(Gt) {
mt.add(et(Gt, It, Lt, Gt, at, pt));
}) : b(at) && at.forEach(function(Gt, Ft) {
mt.set(Ft, et(Gt, It, Lt, Ft, at, pt));
});
var Qt = ft ? Tt ? h : u : Tt ? C : T, we = le ? void 0 : Qt(at);
return e(we || at, function(Gt, Ft) {
we && (Ft = Gt, Gt = at[Ft]), r(mt, Ft, et(Gt, It, Lt, Ft, at, pt));
}), mt;
}
return K2 = et, K2;
}
var Z2, Wx;
function SQ() {
if (Wx)
return Z2;
Wx = 1;
var t = lM(), e = 4;
function r(n) {
return t(n, e);
}
return Z2 = r, Z2;
}
var Q2, Hx;
function H4() {
if (Hx)
return Q2;
Hx = 1;
function t(e) {
return function() {
return e;
};
}
return Q2 = t, Q2;
}
var J2 = { exports: {} }, tp, Gx;
function AQ() {
if (Gx)
return tp;
Gx = 1;
function t(e) {
return function(r, n, i) {
for (var a = -1, s = Object(r), o = i(r), l = o.length; l--; ) {
var u = o[e ? l : ++a];
if (n(s[u], u, s) === !1)
break;
}
return r;
};
}
return tp = t, tp;
}
var ep, jx;
function G4() {
if (jx)
return ep;
jx = 1;
var t = AQ(), e = t();
return ep = e, ep;
}
var rp, $x;
function j4() {
if ($x)
return rp;
$x = 1;
var t = G4(), e = as();
function r(n, i) {
return n && t(n, i, e);
}
return rp = r, rp;
}
var np, Xx;
function MQ() {
if (Xx)
return np;
Xx = 1;
var t = _a();
function e(r, n) {
return function(i, a) {
if (i == null)
return i;
if (!t(i))
return r(i, a);
for (var s = i.length, o = n ? s : -1, l = Object(i); (n ? o-- : ++o < s) && a(l[o], o, l) !== !1; )
;
return i;
};
}
return np = e, np;
}
var ip, Kx;
function y0() {
if (Kx)
return ip;
Kx = 1;
var t = j4(), e = MQ(), r = e(t);
return ip = r, ip;
}
var ap, Zx;
function Js() {
if (Zx)
return ap;
Zx = 1;
function t(e) {
return e;
}
return ap = t, ap;
}
var sp, Qx;
function cM() {
if (Qx)
return sp;
Qx = 1;
var t = Js();
function e(r) {
return typeof r == "function" ? r : t;
}
return sp = e, sp;
}
var op, Jx;
function uM() {
if (Jx)
return op;
Jx = 1;
var t = P4(), e = y0(), r = cM(), n = br();
function i(a, s) {
var o = n(a) ? t : e;
return o(a, r(s));
}
return op = i, op;
}
var t8;
function $4() {
return t8 || (t8 = 1, function(t) {
t.exports = uM();
}(J2)), J2.exports;
}
var lp, e8;
function LQ() {
if (e8)
return lp;
e8 = 1;
var t = y0();
function e(r, n) {
var i = [];
return t(r, function(a, s, o) {
n(a, s, o) && i.push(a);
}), i;
}
return lp = e, lp;
}
var cp, r8;
function RQ() {
if (r8)
return cp;
r8 = 1;
var t = "__lodash_hash_undefined__";
function e(r) {
return this.__data__.set(r, t), this;
}
return cp = e, cp;
}
var up, n8;
function IQ() {
if (n8)
return up;
n8 = 1;
function t(e) {
return this.__data__.has(e);
}
return up = t, up;
}
var hp, i8;
function hM() {
if (i8)
return hp;
i8 = 1;
var t = x4, e = RQ(), r = IQ();
function n(i) {
var a = -1, s = i == null ? 0 : i.length;
for (this.__data__ = new t(); ++a < s; )
this.add(i[a]);
}
return n.prototype.add = n.prototype.push = e, n.prototype.has = r, hp = n, hp;
}
var fp, a8;
function NQ() {
if (a8)
return fp;
a8 = 1;
function t(e, r) {
for (var n = -1, i = e == null ? 0 : e.length; ++n < i; )
if (r(e[n], n, e))
return !0;
return !1;
}
return fp = t, fp;
}
var dp, s8;
function fM() {
if (s8)
return dp;
s8 = 1;
function t(e, r) {
return e.has(r);
}
return dp = t, dp;
}
var pp, o8;
function dM() {
if (o8)
return pp;
o8 = 1;
var t = hM(), e = NQ(), r = fM(), n = 1, i = 2;
function a(s, o, l, u, h, d) {
var f = l & n, p = s.length, m = o.length;
if (p != m && !(f && m > p))
return !1;
var _ = d.get(s), y = d.get(o);
if (_ && y)
return _ == o && y == s;
var b = -1, x = !0, k = l & i ? new t() : void 0;
for (d.set(s, o), d.set(o, s); ++b < p; ) {
var T = s[b], C = o[b];
if (u)
var M = f ? u(C, T, b, o, s, d) : u(T, C, b, s, o, d);
if (M !== void 0) {
if (M)
continue;
x = !1;
break;
}
if (k) {
if (!e(o, function(S, R) {
if (!r(k, R) && (T === S || h(T, S, l, u, d)))
return k.push(R);
})) {
x = !1;
break;
}
} else if (!(T === C || h(T, C, l, u, d))) {
x = !1;
break;
}
}
return d.delete(s), d.delete(o), x;
}
return pp = a, pp;
}
var gp, l8;
function BQ() {
if (l8)
return gp;
l8 = 1;
function t(e) {
var r = -1, n = Array(e.size);
return e.forEach(function(i, a) {
n[++r] = [a, i];
}), n;
}
return gp = t, gp;
}
var yp, c8;
function X4() {
if (c8)
return yp;
c8 = 1;
function t(e) {
var r = -1, n = Array(e.size);
return e.forEach(function(i) {
n[++r] = i;
}), n;
}
return yp = t, yp;
}
var mp, u8;
function DQ() {
if (u8)
return mp;
u8 = 1;
var t = ol(), e = iM(), r = ul(), n = dM(), i = BQ(), a = X4(), s = 1, o = 2, l = "[object Boolean]", u = "[object Date]", h = "[object Error]", d = "[object Map]", f = "[object Number]", p = "[object RegExp]", m = "[object Set]", _ = "[object String]", y = "[object Symbol]", b = "[object ArrayBuffer]", x = "[object DataView]", k = t ? t.prototype : void 0, T = k ? k.valueOf : void 0;
function C(M, S, R, A, L, v, B) {
switch (R) {
case x:
if (M.byteLength != S.byteLength || M.byteOffset != S.byteOffset)
return !1;
M = M.buffer, S = S.buffer;
case b:
return !(M.byteLength != S.byteLength || !v(new e(M), new e(S)));
case l:
case u:
case f:
return r(+M, +S);
case h:
return M.name == S.name && M.message == S.message;
case p:
case _:
return M == S + "";
case d:
var w = i;
case m:
var D = A & s;
if (w || (w = a), M.size != S.size && !D)
return !1;
var N = B.get(M);
if (N)
return N == S;
A |= o, B.set(M, S);
var z = n(w(M), w(S), A, L, v, B);
return B.delete(M), z;
case y:
if (T)
return T.call(M) == T.call(S);
}
return !1;
}
return mp = C, mp;
}
var bp, h8;
function OQ() {
if (h8)
return bp;
h8 = 1;
var t = rM(), e = 1, r = Object.prototype, n = r.hasOwnProperty;
function i(a, s, o, l, u, h) {
var d = o & e, f = t(a), p = f.length, m = t(s), _ = m.length;
if (p != _ && !d)
return !1;
for (var y = p; y--; ) {
var b = f[y];
if (!(d ? b in s : n.call(s, b)))
return !1;
}
var x = h.get(a), k = h.get(s);
if (x && k)
return x == s && k == a;
var T = !0;
h.set(a, s), h.set(s, a);
for (var C = d; ++y < p; ) {
b = f[y];
var M = a[b], S = s[b];
if (l)
var R = d ? l(S, M, b, s, a, h) : l(M, S, b, a, s, h);
if (!(R === void 0 ? M === S || u(M, S, o, l, h) : R)) {
T = !1;
break;
}
C || (C = b == "constructor");
}
if (T && !C) {
var A = a.constructor, L = s.constructor;
A != L && "constructor" in a && "constructor" in s && !(typeof A == "function" && A instanceof A && typeof L == "function" && L instanceof L) && (T = !1);
}
return h.delete(a), h.delete(s), T;
}
return bp = i, bp;
}
var _p, f8;
function FQ() {
if (f8)
return _p;
f8 = 1;
var t = c0(), e = dM(), r = DQ(), n = OQ(), i = gl(), a = br(), s = pl(), o = cu(), l = 1, u = "[object Arguments]", h = "[object Array]", d = "[object Object]", f = Object.prototype, p = f.hasOwnProperty;
function m(_, y, b, x, k, T) {
var C = a(_), M = a(y), S = C ? h : i(_), R = M ? h : i(y);
S = S == u ? d : S, R = R == u ? d : R;
var A = S == d, L = R == d, v = S == R;
if (v && s(_)) {
if (!s(y))
return !1;
C = !0, A = !1;
}
if (v && !A)
return T || (T = new t()), C || o(_) ? e(_, y, b, x, k, T) : r(_, y, S, b, x, k, T);
if (!(b & l)) {
var B = A && p.call(_, "__wrapped__"), w = L && p.call(y, "__wrapped__");
if (B || w) {
var D = B ? _.value() : _, N = w ? y.value() : y;
return T || (T = new t()), k(D, N, b, x, T);
}
}
return v ? (T || (T = new t()), n(_, y, b, x, k, T)) : !1;
}
return _p = m, _p;
}
var vp, d8;
function pM() {
if (d8)
return vp;
d8 = 1;
var t = FQ(), e = Yi();
function r(n, i, a, s, o) {
return n === i ? !0 : n == null || i == null || !e(n) && !e(i) ? n !== n && i !== i : t(n, i, a, s, r, o);
}
return vp = r, vp;
}
var xp, p8;
function PQ() {
if (p8)
return xp;
p8 = 1;
var t = c0(), e = pM(), r = 1, n = 2;
function i(a, s, o, l) {
var u = o.length, h = u, d = !l;
if (a == null)
return !h;
for (a = Object(a); u--; ) {
var f = o[u];
if (d && f[2] ? f[1] !== a[f[0]] : !(f[0] in a))
return !1;
}
for (; ++u < h; ) {
f = o[u];
var p = f[0], m = a[p], _ = f[1];
if (d && f[2]) {
if (m === void 0 && !(p in a))
return !1;
} else {
var y = new t();
if (l)
var b = l(m, _, p, a, s, y);
if (!(b === void 0 ? e(_, m, r | n, l, y) : b))
return !1;
}
}
return !0;
}
return xp = i, xp;
}
var kp, g8;
function gM() {
if (g8)
return kp;
g8 = 1;
var t = Vn();
function e(r) {
return r === r && !t(r);
}
return kp = e, kp;
}
var wp, y8;
function qQ() {
if (y8)
return wp;
y8 = 1;
var t = gM(), e = as();
function r(n) {
for (var i = e(n), a = i.length; a--; ) {
var s = i[a], o = n[s];
i[a] = [s, o, t(o)];
}
return i;
}
return wp = r, wp;
}
var Tp, m8;
function yM() {
if (m8)
return Tp;
m8 = 1;
function t(e, r) {
return function(n) {
return n == null ? !1 : n[e] === r && (r !== void 0 || e in Object(n));
};
}
return Tp = t, Tp;
}
var Ep, b8;
function VQ() {
if (b8)
return Ep;
b8 = 1;
var t = PQ(), e = qQ(), r = yM();
function n(i) {
var a = e(i);
return a.length == 1 && a[0][2] ? r(a[0][0], a[0][1]) : function(s) {
return s === i || t(s, i, a);
};
}
return Ep = n, Ep;
}
var Cp, _8;
function yl() {
if (_8)
return Cp;
_8 = 1;
var t = Ks(), e = Yi(), r = "[object Symbol]";
function n(i) {
return typeof i == "symbol" || e(i) && t(i) == r;
}
return Cp = n, Cp;
}
var Sp, v8;
function K4() {
if (v8)
return Sp;
v8 = 1;
var t = br(), e = yl(), r = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, n = /^\w*$/;
function i(a, s) {
if (t(a))
return !1;
var o = typeof a;
return o == "number" || o == "symbol" || o == "boolean" || a == null || e(a) ? !0 : n.test(a) || !r.test(a) || s != null && a in Object(s);
}
return Sp = i, Sp;
}
var Ap, x8;
function zQ() {
if (x8)
return Ap;
x8 = 1;
var t = J1, e = 500;
function r(n) {
var i = t(n, function(s) {
return a.size === e && a.clear(), s;
}), a = i.cache;
return i;
}
return Ap = r, Ap;
}
var Mp, k8;
function YQ() {
if (k8)
return Mp;
k8 = 1;
var t = zQ(), e = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, r = /\\(\\)?/g, n = t(function(i) {
var a = [];
return i.charCodeAt(0) === 46 && a.push(""), i.replace(e, function(s, o, l, u) {
a.push(l ? u.replace(r, "$1") : o || s);
}), a;
});
return Mp = n, Mp;
}
var Lp, w8;
function m0() {
if (w8)
return Lp;
w8 = 1;
function t(e, r) {
for (var n = -1, i = e == null ? 0 : e.length, a = Array(i); ++n < i; )
a[n] = r(e[n], n, e);
return a;
}
return Lp = t, Lp;
}
var Rp, T8;
function UQ() {
if (T8)
return Rp;
T8 = 1;
var t = ol(), e = m0(), r = br(), n = yl(), i = 1 / 0, a = t ? t.prototype : void 0, s = a ? a.toString : void 0;
function o(l) {
if (typeof l == "string")
return l;
if (r(l))
return e(l, o) + "";
if (n(l))
return s ? s.call(l) : "";
var u = l + "";
return u == "0" && 1 / l == -i ? "-0" : u;
}
return Rp = o, Rp;
}
var Ip, E8;
function mM() {
if (E8)
return Ip;
E8 = 1;
var t = UQ();
function e(r) {
return r == null ? "" : t(r);
}
return Ip = e, Ip;
}
var Np, C8;
function b0() {
if (C8)
return Np;
C8 = 1;
var t = br(), e = K4(), r = YQ(), n = mM();
function i(a, s) {
return t(a) ? a : e(a, s) ? [a] : r(n(a));
}
return Np = i, Np;
}
var Bp, S8;
function uu() {
if (S8)
return Bp;
S8 = 1;
var t = yl(), e = 1 / 0;
function r(n) {
if (typeof n == "string" || t(n))
return n;
var i = n + "";
return i == "0" && 1 / n == -e ? "-0" : i;
}
return Bp = r, Bp;
}
var Dp, A8;
function _0() {
if (A8)
return Dp;
A8 = 1;
var t = b0(), e = uu();
function r(n, i) {
i = t(i, n);
for (var a = 0, s = i.length; n != null && a < s; )
n = n[e(i[a++])];
return a && a == s ? n : void 0;
}
return Dp = r, Dp;
}
var Op, M8;
function WQ() {
if (M8)
return Op;
M8 = 1;
var t = _0();
function e(r, n, i) {
var a = r == null ? void 0 : t(r, n);
return a === void 0 ? i : a;
}
return Op = e, Op;
}
var Fp, L8;
function HQ() {
if (L8)
return Fp;
L8 = 1;
function t(e, r) {
return e != null && r in Object(e);
}
return Fp = t, Fp;
}
var Pp, R8;
function bM() {
if (R8)
return Pp;
R8 = 1;
var t = b0(), e = lu(), r = br(), n = f0(), i = q4(), a = uu();
function s(o, l, u) {
l = t(l, o);
for (var h = -1, d = l.length, f = !1; ++h < d; ) {
var p = a(l[h]);
if (!(f = o != null && u(o, p)))
break;
o = o[p];
}
return f || ++h != d ? f : (d = o == null ? 0 : o.length, !!d && i(d) && n(p, d) && (r(o) || e(o)));
}
return Pp = s, Pp;
}
var qp, I8;
function _M() {
if (I8)
return qp;
I8 = 1;
var t = HQ(), e = bM();
function r(n, i) {
return n != null && e(n, i, t);
}
return qp = r, qp;
}
var Vp, N8;
function GQ() {
if (N8)
return Vp;
N8 = 1;
var t = pM(), e = WQ(), r = _M(), n = K4(), i = gM(), a = yM(), s = uu(), o = 1, l = 2;
function u(h, d) {
return n(h) && i(d) ? a(s(h), d) : function(f) {
var p = e(f, h);
return p === void 0 && p === d ? r(f, h) : t(d, p, o | l);
};
}
return Vp = u, Vp;
}
var zp, B8;
function vM() {
if (B8)
return zp;
B8 = 1;
function t(e) {
return function(r) {
return r == null ? void 0 : r[e];
};
}
return zp = t, zp;
}
var Yp, D8;
function jQ() {
if (D8)
return Yp;
D8 = 1;
var t = _0();
function e(r) {
return function(n) {
return t(n, r);
};
}
return Yp = e, Yp;
}
var Up, O8;
function $Q() {
if (O8)
return Up;
O8 = 1;
var t = vM(), e = jQ(), r = K4(), n = uu();
function i(a) {
return r(a) ? t(n(a)) : e(a);
}
return Up = i, Up;
}
var Wp, F8;
function va() {
if (F8)
return Wp;
F8 = 1;
var t = VQ(), e = GQ(), r = Js(), n = br(), i = $Q();
function a(s) {
return typeof s == "function" ? s : s == null ? r : typeof s == "object" ? n(s) ? e(s[0], s[1]) : t(s) : i(s);
}
return Wp = a, Wp;
}
var Hp, P8;
function xM() {
if (P8)
return Hp;
P8 = 1;
var t = QA(), e = LQ(), r = va(), n = br();
function i(a, s) {
var o = n(a) ? t : e;
return o(a, r(s, 3));
}
return Hp = i, Hp;
}
var Gp, q8;
function XQ() {
if (q8)
return Gp;
q8 = 1;
var t = Object.prototype, e = t.hasOwnProperty;
function r(n, i) {
return n != null && e.call(n, i);
}
return Gp = r, Gp;
}
var jp, V8;
function Z4() {
if (V8)
return jp;
V8 = 1;
var t = XQ(), e = bM();
function r(n, i) {
return n != null && e(n, i, t);
}
return jp = r, jp;
}
var $p, z8;
function KQ() {
if (z8)
return $p;
z8 = 1;
var t = z4(), e = gl(), r = lu(), n = br(), i = _a(), a = pl(), s = p0(), o = cu(), l = "[object Map]", u = "[object Set]", h = Object.prototype, d = h.hasOwnProperty;
function f(p) {
if (p == null)
return !0;
if (i(p) && (n(p) || typeof p == "string" || typeof p.splice == "function" || a(p) || o(p) || r(p)))
return !p.length;
var m = e(p);
if (m == l || m == u)
return !p.size;
if (s(p))
return !t(p).length;
for (var _ in p)
if (d.call(p, _))
return !1;
return !0;
}
return $p = f, $p;
}
var Xp, Y8;
function kM() {
if (Y8)
return Xp;
Y8 = 1;
function t(e) {
return e === void 0;
}
return Xp = t, Xp;
}
var Kp, U8;
function wM() {
if (U8)
return Kp;
U8 = 1;
var t = y0(), e = _a();
function r(n, i) {
var a = -1, s = e(n) ? Array(n.length) : [];
return t(n, function(o, l, u) {
s[++a] = i(o, l, u);
}), s;
}
return Kp = r, Kp;
}
var Zp, W8;
function TM() {
if (W8)
return Zp;
W8 = 1;
var t = m0(), e = va(), r = wM(), n = br();
function i(a, s) {
var o = n(a) ? t : r;
return o(a, e(s, 3));
}
return Zp = i, Zp;
}
var Qp, H8;
function ZQ() {
if (H8)
return Qp;
H8 = 1;
function t(e, r, n, i) {
var a = -1, s = e == null ? 0 : e.length;
for (i && s && (n = e[++a]); ++a < s; )
n = r(n, e[a], a, e);
return n;
}
return Qp = t, Qp;
}
var Jp, G8;
function QQ() {
if (G8)
return Jp;
G8 = 1;
function t(e, r, n, i, a) {
return a(e, function(s, o, l) {
n = i ? (i = !1, s) : r(n, s, o, l);
}), n;
}
return Jp = t, Jp;
}
var tg, j8;
function EM() {
if (j8)
return tg;
j8 = 1;
var t = ZQ(), e = y0(), r = va(), n = QQ(), i = br();
function a(s, o, l) {
var u = i(s) ? t : n, h = arguments.length < 3;
return u(s, r(o, 4), l, h, e);
}
return tg = a, tg;
}
var eg, $8;
function JQ() {
if ($8)
return eg;
$8 = 1;
var t = Ks(), e = br(), r = Yi(), n = "[object String]";
function i(a) {
return typeof a == "string" || !e(a) && r(a) && t(a) == n;
}
return eg = i, eg;
}
var rg, X8;
function tJ() {
if (X8)
return rg;
X8 = 1;
var t = vM(), e = t("length");
return rg = e, rg;
}
var ng, K8;
function eJ() {
if (K8)
return ng;
K8 = 1;
var t = "\\ud800-\\udfff", e = "\\u0300-\\u036f", r = "\\ufe20-\\ufe2f", n = "\\u20d0-\\u20ff", i = e + r + n, a = "\\ufe0e\\ufe0f", s = "\\u200d", o = RegExp("[" + s + t + i + a + "]");
function l(u) {
return o.test(u);
}
return ng = l, ng;
}
var ig, Z8;
function rJ() {
if (Z8)
return ig;
Z8 = 1;
var t = "\\ud800-\\udfff", e = "\\u0300-\\u036f", r = "\\ufe20-\\ufe2f", n = "\\u20d0-\\u20ff", i = e + r + n, a = "\\ufe0e\\ufe0f", s = "[" + t + "]", o = "[" + i + "]", l = "\\ud83c[\\udffb-\\udfff]", u = "(?:" + o + "|" + l + ")", h = "[^" + t + "]", d = "(?:\\ud83c[\\udde6-\\uddff]){2}", f = "[\\ud800-\\udbff][\\udc00-\\udfff]", p = "\\u200d", m = u + "?", _ = "[" + a + "]?", y = "(?:" + p + "(?:" + [h, d, f].join("|") + ")" + _ + m + ")*", b = _ + m + y, x = "(?:" + [h + o + "?", o, d, f, s].join("|") + ")", k = RegExp(l + "(?=" + l + ")|" + x + b, "g");
function T(C) {
for (var M = k.lastIndex = 0; k.test(C); )
++M;
return M;
}
return ig = T, ig;
}
var ag, Q8;
function nJ() {
if (Q8)
return ag;
Q8 = 1;
var t = tJ(), e = eJ(), r = rJ();
function n(i) {
return e(i) ? r(i) : t(i);
}
return ag = n, ag;
}
var sg, J8;
function iJ() {
if (J8)
return sg;
J8 = 1;
var t = z4(), e = gl(), r = _a(), n = JQ(), i = nJ(), a = "[object Map]", s = "[object Set]";
function o(l) {
if (l == null)
return 0;
if (r(l))
return n(l) ? i(l) : l.length;
var u = e(l);
return u == a || u == s ? l.size : t(l).length;
}
return sg = o, sg;
}
var og, t7;
function aJ() {
if (t7)
return og;
t7 = 1;
var t = P4(), e = sM(), r = j4(), n = va(), i = g0(), a = br(), s = pl(), o = ll(), l = Vn(), u = cu();
function h(d, f, p) {
var m = a(d), _ = m || s(d) || u(d);
if (f = n(f, 4), p == null) {
var y = d && d.constructor;
_ ? p = m ? new y() : [] : l(d) ? p = o(y) ? e(i(d)) : {} : p = {};
}
return (_ ? t : r)(d, function(b, x, k) {
return f(p, b, x, k);
}), p;
}
return og = h, og;
}
var lg, e7;
function sJ() {
if (e7)
return lg;
e7 = 1;
var t = ol(), e = lu(), r = br(), n = t ? t.isConcatSpreadable : void 0;
function i(a) {
return r(a) || e(a) || !!(n && a && a[n]);
}
return lg = i, lg;
}
var cg, r7;
function Q4() {
if (r7)
return cg;
r7 = 1;
var t = U4(), e = sJ();
function r(n, i, a, s, o) {
var l = -1, u = n.length;
for (a || (a = e), o || (o = []); ++l < u; ) {
var h = n[l];
i > 0 && a(h) ? i > 1 ? r(h, i - 1, a, s, o) : t(o, h) : s || (o[o.length] = h);
}
return o;
}
return cg = r, cg;
}
var ug, n7;
function oJ() {
if (n7)
return ug;
n7 = 1;
function t(e, r, n) {
switch (n.length) {
case 0:
return e.call(r);
case 1:
return e.call(r, n[0]);
case 2:
return e.call(r, n[0], n[1]);
case 3:
return e.call(r, n[0], n[1], n[2]);
}
return e.apply(r, n);
}
return ug = t, ug;
}
var hg, i7;
function CM() {
if (i7)
return hg;
i7 = 1;
var t = oJ(), e = Math.max;
function r(n, i, a) {
return i = e(i === void 0 ? n.length - 1 : i, 0), function() {
for (var s = arguments, o = -1, l = e(s.length - i, 0), u = Array(l); ++o < l; )
u[o] = s[i + o];
o = -1;
for (var h = Array(i + 1); ++o < i; )
h[o] = s[o];
return h[i] = a(u), t(n, this, h);
};
}
return hg = r, hg;
}
var fg, a7;
function lJ() {
if (a7)
return fg;
a7 = 1;
var t = H4(), e = jA(), r = Js(), n = e ? function(i, a) {
return e(i, "toString", {
configurable: !0,
enumerable: !1,
value: t(a),
writable: !0
});
} : r;
return fg = n, fg;
}
var dg, s7;
function cJ() {
if (s7)
return dg;
s7 = 1;
var t = 800, e = 16, r = Date.now;
function n(i) {
var a = 0, s = 0;
return function() {
var o = r(), l = e - (o - s);
if (s = o, l > 0) {
if (++a >= t)
return arguments[0];
} else
a = 0;
return i.apply(void 0, arguments);
};
}
return dg = n, dg;
}
var pg, o7;
function SM() {
if (o7)
return pg;
o7 = 1;
var t = lJ(), e = cJ(), r = e(t);
return pg = r, pg;
}
var gg, l7;
function v0() {
if (l7)
return gg;
l7 = 1;
var t = Js(), e = CM(), r = SM();
function n(i, a) {
return r(e(i, a, t), i + "");
}
return gg = n, gg;
}
var yg, c7;
function AM() {
if (c7)
return yg;
c7 = 1;
function t(e, r, n, i) {
for (var a = e.length, s = n + (i ? 1 : -1); i ? s-- : ++s < a; )
if (r(e[s], s, e))
return s;
return -1;
}
return yg = t, yg;
}
var mg, u7;
function uJ() {
if (u7)
return mg;
u7 = 1;
function t(e) {
return e !== e;
}
return mg = t, mg;
}
var bg, h7;
function hJ() {
if (h7)
return bg;
h7 = 1;
function t(e, r, n) {
for (var i = n - 1, a = e.length; ++i < a; )
if (e[i] === r)
return i;
return -1;
}
return bg = t, bg;
}
var _g, f7;
function fJ() {
if (f7)
return _g;
f7 = 1;
var t = AM(), e = uJ(), r = hJ();
function n(i, a, s) {
return a === a ? r(i, a, s) : t(i, e, s);
}
return _g = n, _g;
}
var vg, d7;
function dJ() {
if (d7)
return vg;
d7 = 1;
var t = fJ();
function e(r, n) {
var i = r == null ? 0 : r.length;
return !!i && t(r, n, 0) > -1;
}
return vg = e, vg;
}
var xg, p7;
function pJ() {
if (p7)
return xg;
p7 = 1;
function t(e, r, n) {
for (var i = -1, a = e == null ? 0 : e.length; ++i < a; )
if (n(r, e[i]))
return !0;
return !1;
}
return xg = t, xg;
}
var kg, g7;
function gJ() {
if (g7)
return kg;
g7 = 1;
function t() {
}
return kg = t, kg;
}
var wg, y7;
function yJ() {
if (y7)
return wg;
y7 = 1;
var t = nM(), e = gJ(), r = X4(), n = 1 / 0, i = t && 1 / r(new t([, -0]))[1] == n ? function(a) {
return new t(a);
} : e;
return wg = i, wg;
}
var Tg, m7;
function mJ() {
if (m7)
return Tg;
m7 = 1;
var t = hM(), e = dJ(), r = pJ(), n = fM(), i = yJ(), a = X4(), s = 200;
function o(l, u, h) {
var d = -1, f = e, p = l.length, m = !0, _ = [], y = _;
if (h)
m = !1, f = r;
else if (p >= s) {
var b = u ? null : i(l);
if (b)
return a(b);
m = !1, f = n, y = new t();
} else
y = u ? [] : _;
t:
for (; ++d < p; ) {
var x = l[d], k = u ? u(x) : x;
if (x = h || x !== 0 ? x : 0, m && k === k) {
for (var T = y.length; T--; )
if (y[T] === k)
continue t;
u && y.push(k), _.push(x);
} else
f(y, k, h) || (y !== _ && y.push(k), _.push(x));
}
return _;
}
return Tg = o, Tg;
}
var Eg, b7;
function MM() {
if (b7)
return Eg;
b7 = 1;
var t = _a(), e = Yi();
function r(n) {
return e(n) && t(n);
}
return Eg = r, Eg;
}
var Cg, _7;
function bJ() {
if (_7)
return Cg;
_7 = 1;
var t = Q4(), e = v0(), r = mJ(), n = MM(), i = e(function(a) {
return r(t(a, 1, n, !0));
});
return Cg = i, Cg;
}
var Sg, v7;
function _J() {
if (v7)
return Sg;
v7 = 1;
var t = m0();
function e(r, n) {
return t(n, function(i) {
return r[i];
});
}
return Sg = e, Sg;
}
var Ag, x7;
function LM() {
if (x7)
return Ag;
x7 = 1;
var t = _J(), e = as();
function r(n) {
return n == null ? [] : t(n, e(n));
}
return Ag = r, Ag;
}
var Uf;
if (typeof Za == "function")
try {
Uf = {
clone: SQ(),
constant: H4(),
each: $4(),
filter: xM(),
has: Z4(),
isArray: br(),
isEmpty: KQ(),
isFunction: ll(),
isUndefined: kM(),
keys: as(),
map: TM(),
reduce: EM(),
size: iJ(),
transform: aJ(),
union: bJ(),
values: LM()
};
} catch {
}
Uf || (Uf = window._);
var Yn = Uf, ve = Yn, J4 = Me, vJ = "\0", zs = "\0", k7 = "";
function Me(t) {
this._isDirected = ve.has(t, "directed") ? t.directed : !0, this._isMultigraph = ve.has(t, "multigraph") ? t.multigraph : !1, this._isCompound = ve.has(t, "compound") ? t.compound : !1, this._label = void 0, this._defaultNodeLabelFn = ve.constant(void 0), this._defaultEdgeLabelFn = ve.constant(void 0), this._nodes = {}, this._isCompound && (this._parent = {}, this._children = {}, this._children[zs] = {}), this._in = {}, this._preds = {}, this._out = {}, this._sucs = {}, this._edgeObjs = {}, this._edgeLabels = {};
}
Me.prototype._nodeCount = 0;
Me.prototype._edgeCount = 0;
Me.prototype.isDirected = function() {
return this._isDirected;
};
Me.prototype.isMultigraph = function() {
return this._isMultigraph;
};
Me.prototype.isCompound = function() {
return this._isCompound;
};
Me.prototype.setGraph = function(t) {
return this._label = t, this;
};
Me.prototype.graph = function() {
return this._label;
};
Me.prototype.setDefaultNodeLabel = function(t) {
return ve.isFunction(t) || (t = ve.constant(t)), this._defaultNodeLabelFn = t, this;
};
Me.prototype.nodeCount = function() {
return this._nodeCount;
};
Me.prototype.nodes = function() {
return ve.keys(this._nodes);
};
Me.prototype.sources = function() {
var t = this;
return ve.filter(this.nodes(), function(e) {
return ve.isEmpty(t._in[e]);
});
};
Me.prototype.sinks = function() {
var t = this;
return ve.filter(this.nodes(), function(e) {
return ve.isEmpty(t._out[e]);
});
};
Me.prototype.setNodes = function(t, e) {
var r = arguments, n = this;
return ve.each(t, function(i) {
r.length > 1 ? n.setNode(i, e) : n.setNode(i);
}), this;
};
Me.prototype.setNode = function(t, e) {
return ve.has(this._nodes, t) ? (arguments.length > 1 && (this._nodes[t] = e), this) : (this._nodes[t] = arguments.length > 1 ? e : this._defaultNodeLabelFn(t), this._isCompound && (this._parent[t] = zs, this._children[t] = {}, this._children[zs][t] = !0), this._in[t] = {}, this._preds[t] = {}, this._out[t] = {}, this._sucs[t] = {}, ++this._nodeCount, this);
};
Me.prototype.node = function(t) {
return this._nodes[t];
};
Me.prototype.hasNode = function(t) {
return ve.has(this._nodes, t);
};
Me.prototype.removeNode = function(t) {
var e = this;
if (ve.has(this._nodes, t)) {
var r = function(n) {
e.removeEdge(e._edgeObjs[n]);
};
delete this._nodes[t], this._isCompound && (this._removeFromParentsChildList(t), delete this._parent[t], ve.each(this.children(t), function(n) {
e.setParent(n);
}), delete this._children[t]), ve.each(ve.keys(this._in[t]), r), delete this._in[t], delete this._preds[t], ve.each(ve.keys(this._out[t]), r), delete this._out[t], delete this._sucs[t], --this._nodeCount;
}
return this;
};
Me.prototype.setParent = function(t, e) {
if (!this._isCompound)
throw new Error("Cannot set parent in a non-compound graph");
if (ve.isUndefined(e))
e = zs;
else {
e += "";
for (var r = e; !ve.isUndefined(r); r = this.parent(r))
if (r === t)
throw new Error("Setting " + e + " as parent of " + t + " would create a cycle");
this.setNode(e);
}
return this.setNode(t), this._removeFromParentsChildList(t), this._parent[t] = e, this._children[e][t] = !0, this;
};
Me.prototype._removeFromParentsChildList = function(t) {
delete this._children[this._parent[t]][t];
};
Me.prototype.parent = function(t) {
if (this._isCompound) {
var e = this._parent[t];
if (e !== zs)
return e;
}
};
Me.prototype.children = function(t) {
if (ve.isUndefined(t) && (t = zs), this._isCompound) {
var e = this._children[t];
if (e)
return ve.keys(e);
} else {
if (t === zs)
return this.nodes();
if (this.hasNode(t))
return [];
}
};
Me.prototype.predecessors = function(t) {
var e = this._preds[t];
if (e)
return ve.keys(e);
};
Me.prototype.successors = function(t) {
var e = this._sucs[t];
if (e)
return ve.keys(e);
};
Me.prototype.neighbors = function(t) {
var e = this.predecessors(t);
if (e)
return ve.union(e, this.successors(t));
};
Me.prototype.isLeaf = function(t) {
var e;
return this.isDirected() ? e = this.successors(t) : e = this.neighbors(t), e.length === 0;
};
Me.prototype.filterNodes = function(t) {
var e = new this.constructor({
directed: this._isDirected,
multigraph: this._isMultigraph,
compound: this._isCompound
});
e.setGraph(this.graph());
var r = this;
ve.each(this._nodes, function(a, s) {
t(s) && e.setNode(s, a);
}), ve.each(this._edgeObjs, function(a) {
e.hasNode(a.v) && e.hasNode(a.w) && e.setEdge(a, r.edge(a));
});
var n = {};
function i(a) {
var s = r.parent(a);
return s === void 0 || e.hasNode(s) ? (n[a] = s, s) : s in n ? n[s] : i(s);
}
return this._isCompound && ve.each(e.nodes(), function(a) {
e.setParent(a, i(a));
}), e;
};
Me.prototype.setDefaultEdgeLabel = function(t) {
return ve.isFunction(t) || (t = ve.constant(t)), this._defaultEdgeLabelFn = t, this;
};
Me.prototype.edgeCount = function() {
return this._edgeCount;
};
Me.prototype.edges = function() {
return ve.values(this._edgeObjs);
};
Me.prototype.setPath = function(t, e) {
var r = this, n = arguments;
return ve.reduce(t, function(i, a) {
return n.length > 1 ? r.setEdge(i, a, e) : r.setEdge(i, a), a;
}), this;
};
Me.prototype.setEdge = function() {
var t, e, r, n, i = !1, a = arguments[0];
typeof a == "object" && a !== null && "v" in a ? (t = a.v, e = a.w, r = a.name, arguments.length === 2 && (n = arguments[1], i = !0)) : (t = a, e = arguments[1], r = arguments[3], arguments.length > 2 && (n = arguments[2], i = !0)), t = "" + t, e = "" + e, ve.isUndefined(r) || (r = "" + r);
var s = hu(this._isDirected, t, e, r);
if (ve.has(this._edgeLabels, s))
return i && (this._edgeLabels[s] = n), this;
if (!ve.isUndefined(r) && !this._isMultigraph)
throw new Error("Cannot set a named edge when isMultigraph = false");
this.setNode(t), this.setNode(e), this._edgeLabels[s] = i ? n : this._defaultEdgeLabelFn(t, e, r);
var o = xJ(this._isDirected, t, e, r);
return t = o.v, e = o.w, Object.freeze(o), this._edgeObjs[s] = o, w7(this._preds[e], t), w7(this._sucs[t], e), this._in[e][s] = o, this._out[t][s] = o, this._edgeCount++, this;
};
Me.prototype.edge = function(t, e, r) {
var n = arguments.length === 1 ? t_(this._isDirected, arguments[0]) : hu(this._isDirected, t, e, r);
return this._edgeLabels[n];
};
Me.prototype.hasEdge = function(t, e, r) {
var n = arguments.length === 1 ? t_(this._isDirected, arguments[0]) : hu(this._isDirected, t, e, r);
return ve.has(this._edgeLabels, n);
};
Me.prototype.removeEdge = function(t, e, r) {
var n = arguments.length === 1 ? t_(this._isDirected, arguments[0]) : hu(this._isDirected, t, e, r), i = this._edgeObjs[n];
return i && (t = i.v, e = i.w, delete this._edgeLabels[n], delete this._edgeObjs[n], T7(this._preds[e], t), T7(this._sucs[t], e), delete this._in[e][n], delete this._out[t][n], this._edgeCount--), this;
};
Me.prototype.inEdges = function(t, e) {
var r = this._in[t];
if (r) {
var n = ve.values(r);
return e ? ve.filter(n, function(i) {
return i.v === e;
}) : n;
}
};
Me.prototype.outEdges = function(t, e) {
var r = this._out[t];
if (r) {
var n = ve.values(r);
return e ? ve.filter(n, function(i) {
return i.w === e;
}) : n;
}
};
Me.prototype.nodeEdges = function(t, e) {
var r = this.inEdges(t, e);
if (r)
return r.concat(this.outEdges(t, e));
};
function w7(t, e) {
t[e] ? t[e]++ : t[e] = 1;
}
function T7(t, e) {
--t[e] || delete t[e];
}
function hu(t, e, r, n) {
var i = "" + e, a = "" + r;
if (!t && i > a) {
var s = i;
i = a, a = s;
}
return i + k7 + a + k7 + (ve.isUndefined(n) ? vJ : n);
}
function xJ(t, e, r, n) {
var i = "" + e, a = "" + r;
if (!t && i > a) {
var s = i;
i = a, a = s;
}
var o = { v: i, w: a };
return n && (o.name = n), o;
}
function t_(t, e) {
return hu(t, e.v, e.w, e.name);
}
var kJ = "2.1.8", wJ = {
Graph: J4,
version: kJ
}, Ni = Yn, TJ = J4, EJ = {
write: CJ,
read: MJ
};
function CJ(t) {
var e = {
options: {
directed: t.isDirected(),
multigraph: t.isMultigraph(),
compound: t.isCompound()
},
nodes: SJ(t),
edges: AJ(t)
};
return Ni.isUndefined(t.graph()) || (e.value = Ni.clone(t.graph())), e;
}
function SJ(t) {
return Ni.map(t.nodes(), function(e) {
var r = t.node(e), n = t.parent(e), i = { v: e };
return Ni.isUndefined(r) || (i.value = r), Ni.isUndefined(n) || (i.parent = n), i;
});
}
function AJ(t) {
return Ni.map(t.edges(), function(e) {
var r = t.edge(e), n = { v: e.v, w: e.w };
return Ni.isUndefined(e.name) || (n.name = e.name), Ni.isUndefined(r) || (n.value = r), n;
});
}
function MJ(t) {
var e = new TJ(t.options).setGraph(t.value);
return Ni.each(t.nodes, function(r) {
e.setNode(r.v, r.value), r.parent && e.setParent(r.v, r.parent);
}), Ni.each(t.edges, function(r) {
e.setEdge({ v: r.v, w: r.w, name: r.name }, r.value);
}), e;
}
var sh = Yn, LJ = RJ;
function RJ(t) {
var e = {}, r = [], n;
function i(a) {
sh.has(e, a) || (e[a] = !0, n.push(a), sh.each(t.successors(a), i), sh.each(t.predecessors(a), i));
}
return sh.each(t.nodes(), function(a) {
n = [], i(a), n.length && r.push(n);
}), r;
}
var RM = Yn, IM = Un;
function Un() {
this._arr = [], this._keyIndices = {};
}
Un.prototype.size = function() {
return this._arr.length;
};
Un.prototype.keys = function() {
return this._arr.map(function(t) {
return t.key;
});
};
Un.prototype.has = function(t) {
return RM.has(this._keyIndices, t);
};
Un.prototype.priority = function(t) {
var e = this._keyIndices[t];
if (e !== void 0)
return this._arr[e].priority;
};
Un.prototype.min = function() {
if (this.size() === 0)
throw new Error("Queue underflow");
return this._arr[0].key;
};
Un.prototype.add = function(t, e) {
var r = this._keyIndices;
if (t = String(t), !RM.has(r, t)) {
var n = this._arr, i = n.length;
return r[t] = i, n.push({ key: t, priority: e }), this._decrease(i), !0;
}
return !1;
};
Un.prototype.removeMin = function() {
this._swap(0, this._arr.length - 1);
var t = this._arr.pop();
return delete this._keyIndices[t.key], this._heapify(0), t.key;
};
Un.prototype.decrease = function(t, e) {
var r = this._keyIndices[t];
if (e > this._arr[r].priority)
throw new Error("New priority is greater than current priority. Key: " + t + " Old: " + this._arr[r].priority + " New: " + e);
this._arr[r].priority = e, this._decrease(r);
};
Un.prototype._heapify = function(t) {
var e = this._arr, r = 2 * t, n = r + 1, i = t;
r < e.length && (i = e[r].priority < e[i].priority ? r : i, n < e.length && (i = e[n].priority < e[i].priority ? n : i), i !== t && (this._swap(t, i), this._heapify(i)));
};
Un.prototype._decrease = function(t) {
for (var e = this._arr, r = e[t].priority, n; t !== 0 && (n = t >> 1, !(e[n].priority < r)); )
this._swap(t, n), t = n;
};
Un.prototype._swap = function(t, e) {
var r = this._arr, n = this._keyIndices, i = r[t], a = r[e];
r[t] = a, r[e] = i, n[a.key] = t, n[i.key] = e;
};
var IJ = Yn, NJ = IM, NM = DJ, BJ = IJ.constant(1);
function DJ(t, e, r, n) {
return OJ(
t,
String(e),
r || BJ,
n || function(i) {
return t.outEdges(i);
}
);
}
function OJ(t, e, r, n) {
var i = {}, a = new NJ(), s, o, l = function(u) {
var h = u.v !== s ? u.v : u.w, d = i[h], f = r(u), p = o.distance + f;
if (f < 0)
throw new Error("dijkstra does not allow negative edge weights. Bad edge: " + u + " Weight: " + f);
p < d.distance && (d.distance = p, d.predecessor = s, a.decrease(h, p));
};
for (t.nodes().forEach(function(u) {
var h = u === e ? 0 : Number.POSITIVE_INFINITY;
i[u] = { distance: h }, a.add(u, h);
}); a.size() > 0 && (s = a.removeMin(), o = i[s], o.distance !== Number.POSITIVE_INFINITY); )
n(s).forEach(l);
return i;
}
var FJ = NM, PJ = Yn, qJ = VJ;
function VJ(t, e, r) {
return PJ.transform(t.nodes(), function(n, i) {
n[i] = FJ(t, i, e, r);
}, {});
}
var E7 = Yn, BM = zJ;
function zJ(t) {
var e = 0, r = [], n = {}, i = [];
function a(s) {
var o = n[s] = {
onStack: !0,
lowlink: e,
index: e++
};
if (r.push(s), t.successors(s).forEach(function(h) {
E7.has(n, h) ? n[h].onStack && (o.lowlink = Math.min(o.lowlink, n[h].index)) : (a(h), o.lowlink = Math.min(o.lowlink, n[h].lowlink));
}), o.lowlink === o.index) {
var l = [], u;
do
u = r.pop(), n[u].onStack = !1, l.push(u);
while (s !== u);
i.push(l);
}
}
return t.nodes().forEach(function(s) {
E7.has(n, s) || a(s);
}), i;
}
var YJ = Yn, UJ = BM, WJ = HJ;
function HJ(t) {
return YJ.filter(UJ(t), function(e) {
return e.length > 1 || e.length === 1 && t.hasEdge(e[0], e[0]);
});
}
var GJ = Yn, jJ = XJ, $J = GJ.constant(1);
function XJ(t, e, r) {
return KJ(
t,
e || $J,
r || function(n) {
return t.outEdges(n);
}
);
}
function KJ(t, e, r) {
var n = {}, i = t.nodes();
return i.forEach(function(a) {
n[a] = {}, n[a][a] = { distance: 0 }, i.forEach(function(s) {
a !== s && (n[a][s] = { distance: Number.POSITIVE_INFINITY });
}), r(a).forEach(function(s) {
var o = s.v === a ? s.w : s.v, l = e(s);
n[a][o] = { distance: l, predecessor: a };
});
}), i.forEach(function(a) {
var s = n[a];
i.forEach(function(o) {
var l = n[o];
i.forEach(function(u) {
var h = l[a], d = s[u], f = l[u], p = h.distance + d.distance;
p < f.distance && (f.distance = p, f.predecessor = d.predecessor);
});
});
}), n;
}
var Il = Yn, DM = OM;
OM.CycleException = Wf;
function OM(t) {
var e = {}, r = {}, n = [];
function i(a) {
if (Il.has(r, a))
throw new Wf();
Il.has(e, a) || (r[a] = !0, e[a] = !0, Il.each(t.predecessors(a), i), delete r[a], n.push(a));
}
if (Il.each(t.sinks(), i), Il.size(e) !== t.nodeCount())
throw new Wf();
return n;
}
function Wf() {
}
Wf.prototype = new Error();
var C7 = DM, ZJ = QJ;
function QJ(t) {
try {
C7(t);
} catch (e) {
if (e instanceof C7.CycleException)
return !1;
throw e;
}
return !0;
}
var Hf = Yn, FM = JJ;
function JJ(t, e, r) {
Hf.isArray(e) || (e = [e]);
var n = (t.isDirected() ? t.successors : t.neighbors).bind(t), i = [], a = {};
return Hf.each(e, function(s) {
if (!t.hasNode(s))
throw new Error("Graph does not have node: " + s);
PM(t, s, r === "post", a, n, i);
}), i;
}
function PM(t, e, r, n, i, a) {
Hf.has(n, e) || (n[e] = !0, r || a.push(e), Hf.each(i(e), function(s) {
PM(t, s, r, n, i, a);
}), r && a.push(e));
}
var ttt = FM, ett = rtt;
function rtt(t, e) {
return ttt(t, e, "post");
}
var ntt = FM, itt = att;
function att(t, e) {
return ntt(t, e, "pre");
}
var S7 = Yn, stt = J4, ott = IM, ltt = ctt;
function ctt(t, e) {
var r = new stt(), n = {}, i = new ott(), a;
function s(l) {
var u = l.v === a ? l.w : l.v, h = i.priority(u);
if (h !== void 0) {
var d = e(l);
d < h && (n[u] = a, i.decrease(u, d));
}
}
if (t.nodeCount() === 0)
return r;
S7.each(t.nodes(), function(l) {
i.add(l, Number.POSITIVE_INFINITY), r.setNode(l);
}), i.decrease(t.nodes()[0], 0);
for (var o = !1; i.size() > 0; ) {
if (a = i.removeMin(), S7.has(n, a))
r.setEdge(a, n[a]);
else {
if (o)
throw new Error("Input graph is not connected: " + t);
o = !0;
}
t.nodeEdges(a).forEach(s);
}
return r;
}
var utt = {
components: LJ,
dijkstra: NM,
dijkstraAll: qJ,
findCycles: WJ,
floydWarshall: jJ,
isAcyclic: ZJ,
postorder: ett,
preorder: itt,
prim: ltt,
tarjan: BM,
topsort: DM
}, A7 = wJ, ur = {
Graph: A7.Graph,
json: EJ,
alg: utt,
version: A7.version
}, Mg, M7;
function ui() {
if (M7)
return Mg;
M7 = 1;
var t;
if (typeof Za == "function")
try {
t = ur;
} catch {
}
return t || (t = window.graphlib), Mg = t, Mg;
}
var Lg, L7;
function htt() {
if (L7)
return Lg;
L7 = 1;
var t = lM(), e = 1, r = 4;
function n(i) {
return t(i, e | r);
}
return Lg = n, Lg;
}
var Rg, R7;
function x0() {
if (R7)
return Rg;
R7 = 1;
var t = ul(), e = _a(), r = f0(), n = Vn();
function i(a, s, o) {
if (!n(o))
return !1;
var l = typeof s;
return (l == "number" ? e(o) && r(s, o.length) : l == "string" && s in o) ? t(o[s], a) : !1;
}
return Rg = i, Rg;
}
var Ig, I7;
function qM() {
if (I7)
return Ig;
I7 = 1;
var t = v0(), e = ul(), r = x0(), n = Qs(), i = Object.prototype, a = i.hasOwnProperty, s = t(function(o, l) {
o = Object(o);
var u = -1, h = l.length, d = h > 2 ? l[2] : void 0;
for (d && r(l[0], l[1], d) && (h = 1); ++u < h; )
for (var f = l[u], p = n(f), m = -1, _ = p.length; ++m < _; ) {
var y = p[m], b = o[y];
(b === void 0 || e(b, i[y]) && !a.call(o, y)) && (o[y] = f[y]);
}
return o;
});
return Ig = s, Ig;
}
var Ng, N7;
function ftt() {
if (N7)
return Ng;
N7 = 1;
var t = va(), e = _a(), r = as();
function n(i) {
return function(a, s, o) {
var l = Object(a);
if (!e(a)) {
var u = t(s, 3);
a = r(a), s = function(d) {
return u(l[d], d, l);
};
}
var h = i(a, s, o);
return h > -1 ? l[u ? a[h] : h] : void 0;
};
}
return Ng = n, Ng;
}
var Bg, B7;
function dtt() {
if (B7)
return Bg;
B7 = 1;
var t = /\s/;
function e(r) {
for (var n = r.length; n-- && t.test(r.charAt(n)); )
;
return n;
}
return Bg = e, Bg;
}
var Dg, D7;
function ptt() {
if (D7)
return Dg;
D7 = 1;
var t = dtt(), e = /^\s+/;
function r(n) {
return n && n.slice(0, t(n) + 1).replace(e, "");
}
return Dg = r, Dg;
}
var Og, O7;
function gtt() {
if (O7)
return Og;
O7 = 1;
var t = ptt(), e = Vn(), r = yl(), n = 0 / 0, i = /^[-+]0x[0-9a-f]+$/i, a = /^0b[01]+$/i, s = /^0o[0-7]+$/i, o = parseInt;
function l(u) {
if (typeof u == "number")
return u;
if (r(u))
return n;
if (e(u)) {
var h = typeof u.valueOf == "function" ? u.valueOf() : u;
u = e(h) ? h + "" : h;
}
if (typeof u != "string")
return u === 0 ? u : +u;
u = t(u);
var d = a.test(u);
return d || s.test(u) ? o(u.slice(2), d ? 2 : 8) : i.test(u) ? n : +u;
}
return Og = l, Og;
}
var Fg, F7;
function VM() {
if (F7)
return Fg;
F7 = 1;
var t = gtt(), e = 1 / 0, r = 17976931348623157e292;
function n(i) {
if (!i)
return i === 0 ? i : 0;
if (i = t(i), i === e || i === -e) {
var a = i < 0 ? -1 : 1;
return a * r;
}
return i === i ? i : 0;
}
return Fg = n, Fg;
}
var Pg, P7;
function ytt() {
if (P7)
return Pg;
P7 = 1;
var t = VM();
function e(r) {
var n = t(r), i = n % 1;
return n === n ? i ? n - i : n : 0;
}
return Pg = e, Pg;
}
var qg, q7;
function mtt() {
if (q7)
return qg;
q7 = 1;
var t = AM(), e = va(), r = ytt(), n = Math.max;
function i(a, s, o) {
var l = a == null ? 0 : a.length;
if (!l)
return -1;
var u = o == null ? 0 : r(o);
return u < 0 && (u = n(l + u, 0)), t(a, e(s, 3), u);
}
return qg = i, qg;
}
var Vg, V7;
function btt() {
if (V7)
return Vg;
V7 = 1;
var t = ftt(), e = mtt(), r = t(e);
return Vg = r, Vg;
}
var zg, z7;
function zM() {
if (z7)
return zg;
z7 = 1;
var t = Q4();
function e(r) {
var n = r == null ? 0 : r.length;
return n ? t(r, 1) : [];
}
return zg = e, zg;
}
var Yg, Y7;
function _tt() {
if (Y7)
return Yg;
Y7 = 1;
var t = G4(), e = cM(), r = Qs();
function n(i, a) {
return i == null ? i : t(i, e(a), r);
}
return Yg = n, Yg;
}
var Ug, U7;
function vtt() {
if (U7)
return Ug;
U7 = 1;
function t(e) {
var r = e == null ? 0 : e.length;
return r ? e[r - 1] : void 0;
}
return Ug = t, Ug;
}
var Wg, W7;
function xtt() {
if (W7)
return Wg;
W7 = 1;
var t = u0(), e = j4(), r = va();
function n(i, a) {
var s = {};
return a = r(a, 3), e(i, function(o, l, u) {
t(s, l, a(o, l, u));
}), s;
}
return Wg = n, Wg;
}
var Hg, H7;
function e_() {
if (H7)
return Hg;
H7 = 1;
var t = yl();
function e(r, n, i) {
for (var a = -1, s = r.length; ++a < s; ) {
var o = r[a], l = n(o);
if (l != null && (u === void 0 ? l === l && !t(l) : i(l, u)))
var u = l, h = o;
}
return h;
}
return Hg = e, Hg;
}
var Gg, G7;
function ktt() {
if (G7)
return Gg;
G7 = 1;
function t(e, r) {
return e > r;
}
return Gg = t, Gg;
}
var jg, j7;
function wtt() {
if (j7)
return jg;
j7 = 1;
var t = e_(), e = ktt(), r = Js();
function n(i) {
return i && i.length ? t(i, r, e) : void 0;
}
return jg = n, jg;
}
var $g, $7;
function YM() {
if ($7)
return $g;
$7 = 1;
var t = u0(), e = ul();
function r(n, i, a) {
(a !== void 0 && !e(n[i], a) || a === void 0 && !(i in n)) && t(n, i, a);
}
return $g = r, $g;
}
var Xg, X7;
function UM() {
if (X7)
return Xg;
X7 = 1;
var t = Ks(), e = g0(), r = Yi(), n = "[object Object]", i = Function.prototype, a = Object.prototype, s = i.toString, o = a.hasOwnProperty, l = s.call(Object);
function u(h) {
if (!r(h) || t(h) != n)
return !1;
var d = e(h);
if (d === null)
return !0;
var f = o.call(d, "constructor") && d.constructor;
return typeof f == "function" && f instanceof f && s.call(f) == l;
}
return Xg = u, Xg;
}
var Kg, K7;
function WM() {
if (K7)
return Kg;
K7 = 1;
function t(e, r) {
if (!(r === "constructor" && typeof e[r] == "function") && r != "__proto__")
return e[r];
}
return Kg = t, Kg;
}
var Zg, Z7;
function Ttt() {
if (Z7)
return Zg;
Z7 = 1;
var t = ou(), e = Qs();
function r(n) {
return t(n, e(n));
}
return Zg = r, Zg;
}
var Qg, Q7;
function Ett() {
if (Q7)
return Qg;
Q7 = 1;
var t = YM(), e = KA(), r = aM(), n = ZA(), i = oM(), a = lu(), s = br(), o = MM(), l = pl(), u = ll(), h = Vn(), d = UM(), f = cu(), p = WM(), m = Ttt();
function _(y, b, x, k, T, C, M) {
var S = p(y, x), R = p(b, x), A = M.get(R);
if (A) {
t(y, x, A);
return;
}
var L = C ? C(S, R, x + "", y, b, M) : void 0, v = L === void 0;
if (v) {
var B = s(R), w = !B && l(R), D = !B && !w && f(R);
L = R, B || w || D ? s(S) ? L = S : o(S) ? L = n(S) : w ? (v = !1, L = e(R, !0)) : D ? (v = !1, L = r(R, !0)) : L = [] : d(R) || a(R) ? (L = S, a(S) ? L = m(S) : (!h(S) || u(S)) && (L = i(R))) : v = !1;
}
v && (M.set(R, L), T(L, R, k, C, M), M.delete(R)), t(y, x, L);
}
return Qg = _, Qg;
}
var Jg, J7;
function Ctt() {
if (J7)
return Jg;
J7 = 1;
var t = c0(), e = YM(), r = G4(), n = Ett(), i = Vn(), a = Qs(), s = WM();
function o(l, u, h, d, f) {
l !== u && r(u, function(p, m) {
if (f || (f = new t()), i(p))
n(l, u, m, h, o, d, f);
else {
var _ = d ? d(s(l, m), p, m + "", l, u, f) : void 0;
_ === void 0 && (_ = p), e(l, m, _);
}
}, a);
}
return Jg = o, Jg;
}
var ty, tk;
function Stt() {
if (tk)
return ty;
tk = 1;
var t = v0(), e = x0();
function r(n) {
return t(function(i, a) {
var s = -1, o = a.length, l = o > 1 ? a[o - 1] : void 0, u = o > 2 ? a[2] : void 0;
for (l = n.length > 3 && typeof l == "function" ? (o--, l) : void 0, u && e(a[0], a[1], u) && (l = o < 3 ? void 0 : l, o = 1), i = Object(i); ++s < o; ) {
var h = a[s];
h && n(i, h, s, l);
}
return i;
});
}
return ty = r, ty;
}
var ey, ek;
function Att() {
if (ek)
return ey;
ek = 1;
var t = Ctt(), e = Stt(), r = e(function(n, i, a) {
t(n, i, a);
});
return ey = r, ey;
}
var ry, rk;
function HM() {
if (rk)
return ry;
rk = 1;
function t(e, r) {
return e < r;
}
return ry = t, ry;
}
var ny, nk;
function Mtt() {
if (nk)
return ny;
nk = 1;
var t = e_(), e = HM(), r = Js();
function n(i) {
return i && i.length ? t(i, r, e) : void 0;
}
return ny = n, ny;
}
var iy, ik;
function Ltt() {
if (ik)
return iy;
ik = 1;
var t = e_(), e = va(), r = HM();
function n(i, a) {
return i && i.length ? t(i, e(a, 2), r) : void 0;
}
return iy = n, iy;
}
var ay, ak;
function Rtt() {
if (ak)
return ay;
ak = 1;
var t = fi, e = function() {
return t.Date.now();
};
return ay = e, ay;
}
var sy, sk;
function Itt() {
if (sk)
return sy;
sk = 1;
var t = h0(), e = b0(), r = f0(), n = Vn(), i = uu();
function a(s, o, l, u) {
if (!n(s))
return s;
o = e(o, s);
for (var h = -1, d = o.length, f = d - 1, p = s; p != null && ++h < d; ) {
var m = i(o[h]), _ = l;
if (m === "__proto__" || m === "constructor" || m === "prototype")
return s;
if (h != f) {
var y = p[m];
_ = u ? u(y, m, p) : void 0, _ === void 0 && (_ = n(y) ? y : r(o[h + 1]) ? [] : {});
}
t(p, m, _), p = p[m];
}
return s;
}
return sy = a, sy;
}
var oy, ok;
function Ntt() {
if (ok)
return oy;
ok = 1;
var t = _0(), e = Itt(), r = b0();
function n(i, a, s) {
for (var o = -1, l = a.length, u = {}; ++o < l; ) {
var h = a[o], d = t(i, h);
s(d, h) && e(u, r(h, i), d);
}
return u;
}
return oy = n, oy;
}
var ly, lk;
function Btt() {
if (lk)
return ly;
lk = 1;
var t = Ntt(), e = _M();
function r(n, i) {
return t(n, i, function(a, s) {
return e(n, s);
});
}
return ly = r, ly;
}
var cy, ck;
function Dtt() {
if (ck)
return cy;
ck = 1;
var t = zM(), e = CM(), r = SM();
function n(i) {
return r(e(i, void 0, t), i + "");
}
return cy = n, cy;
}
var uy, uk;
function GM() {
if (uk)
return uy;
uk = 1;
var t = Btt(), e = Dtt(), r = e(function(n, i) {
return n == null ? {} : t(n, i);
});
return uy = r, uy;
}
var hy, hk;
function Ott() {
if (hk)
return hy;
hk = 1;
var t = Math.ceil, e = Math.max;
function r(n, i, a, s) {
for (var o = -1, l = e(t((i - n) / (a || 1)), 0), u = Array(l); l--; )
u[s ? l : ++o] = n, n += a;
return u;
}
return hy = r, hy;
}
var fy, fk;
function Ftt() {
if (fk)
return fy;
fk = 1;
var t = Ott(), e = x0(), r = VM();
function n(i) {
return function(a, s, o) {
return o && typeof o != "number" && e(a, s, o) && (s = o = void 0), a = r(a), s === void 0 ? (s = a, a = 0) : s = r(s), o = o === void 0 ? a < s ? 1 : -1 : r(o), t(a, s, o, i);
};
}
return fy = n, fy;
}
var dy, dk;
function jM() {
if (dk)
return dy;
dk = 1;
var t = Ftt(), e = t();
return dy = e, dy;
}
var py, pk;
function Ptt() {
if (pk)
return py;
pk = 1;
function t(e, r) {
var n = e.length;
for (e.sort(r); n--; )
e[n] = e[n].value;
return e;
}
return py = t, py;
}
var gy, gk;
function qtt() {
if (gk)
return gy;
gk = 1;
var t = yl();
function e(r, n) {
if (r !== n) {
var i = r !== void 0, a = r === null, s = r === r, o = t(r), l = n !== void 0, u = n === null, h = n === n, d = t(n);
if (!u && !d && !o && r > n || o && l && h && !u && !d || a && l && h || !i && h || !s)
return 1;
if (!a && !o && !d && r < n || d && i && s && !a && !o || u && i && s || !l && s || !h)
return -1;
}
return 0;
}
return gy = e, gy;
}
var yy, yk;
function Vtt() {
if (yk)
return yy;
yk = 1;
var t = qtt();
function e(r, n, i) {
for (var a = -1, s = r.criteria, o = n.criteria, l = s.length, u = i.length; ++a < l; ) {
var h = t(s[a], o[a]);
if (h) {
if (a >= u)
return h;
var d = i[a];
return h * (d == "desc" ? -1 : 1);
}
}
return r.index - n.index;
}
return yy = e, yy;
}
var my, mk;
function ztt() {
if (mk)
return my;
mk = 1;
var t = m0(), e = _0(), r = va(), n = wM(), i = Ptt(), a = d0(), s = Vtt(), o = Js(), l = br();
function u(h, d, f) {
d.length ? d = t(d, function(_) {
return l(_) ? function(y) {
return e(y, _.length === 1 ? _[0] : _);
} : _;
}) : d = [o];
var p = -1;
d = t(d, a(r));
var m = n(h, function(_, y, b) {
var x = t(d, function(k) {
return k(_);
});
return { criteria: x, index: ++p, value: _ };
});
return i(m, function(_, y) {
return s(_, y, f);
});
}
return my = u, my;
}
var by, bk;
function Ytt() {
if (bk)
return by;
bk = 1;
var t = Q4(), e = ztt(), r = v0(), n = x0(), i = r(function(a, s) {
if (a == null)
return [];
var o = s.length;
return o > 1 && n(a, s[0], s[1]) ? s = [] : o > 2 && n(s[0], s[1], s[2]) && (s = [s[0]]), e(a, t(s, 1), []);
});
return by = i, by;
}
var _y, _k;
function $M() {
if (_k)
return _y;
_k = 1;
var t = mM(), e = 0;
function r(n) {
var i = ++e;
return t(n) + i;
}
return _y = r, _y;
}
var vy, vk;
function Utt() {
if (vk)
return vy;
vk = 1;
function t(e, r, n) {
for (var i = -1, a = e.length, s = r.length, o = {}; ++i < a; ) {
var l = i < s ? r[i] : void 0;
n(o, e[i], l);
}
return o;
}
return vy = t, vy;
}
var xy, xk;
function Wtt() {
if (xk)
return xy;
xk = 1;
var t = h0(), e = Utt();
function r(n, i) {
return e(n || [], i || [], t);
}
return xy = r, xy;
}
var ky, kk;
function Ke() {
if (kk)
return ky;
kk = 1;
var t;
if (typeof Za == "function")
try {
t = {
cloneDeep: htt(),
constant: H4(),
defaults: qM(),
each: $4(),
filter: xM(),
find: btt(),
flatten: zM(),
forEach: uM(),
forIn: _tt(),
has: Z4(),
isUndefined: kM(),
last: vtt(),
map: TM(),
mapValues: xtt(),
max: wtt(),
merge: Att(),
min: Mtt(),
minBy: Ltt(),
now: Rtt(),
pick: GM(),
range: jM(),
reduce: EM(),
sortBy: Ytt(),
uniqueId: $M(),
values: LM(),
zipObject: Wtt()
};
} catch {
}
return t || (t = window._), ky = t, ky;
}
var wy, wk;
function Htt() {
if (wk)
return wy;
wk = 1, wy = t;
function t() {
var n = {};
n._next = n._prev = n, this._sentinel = n;
}
t.prototype.dequeue = function() {
var n = this._sentinel, i = n._prev;
if (i !== n)
return e(i), i;
}, t.prototype.enqueue = function(n) {
var i = this._sentinel;
n._prev && n._next && e(n), n._next = i._next, i._next._prev = n, i._next = n, n._prev = i;
}, t.prototype.toString = function() {
for (var n = [], i = this._sentinel, a = i._prev; a !== i; )
n.push(JSON.stringify(a, r)), a = a._prev;
return "[" + n.join(", ") + "]";
};
function e(n) {
n._prev._next = n._next, n._next._prev = n._prev, delete n._next, delete n._prev;
}
function r(n, i) {
if (n !== "_next" && n !== "_prev")
return i;
}
return wy;
}
var Ty, Tk;
function Gtt() {
if (Tk)
return Ty;
Tk = 1;
var t = Ke(), e = ui().Graph, r = Htt();
Ty = i;
var n = t.constant(1);
function i(u, h) {
if (u.nodeCount() <= 1)
return [];
var d = o(u, h || n), f = a(d.graph, d.buckets, d.zeroIdx);
return t.flatten(t.map(f, function(p) {
return u.outEdges(p.v, p.w);
}), !0);
}
function a(u, h, d) {
for (var f = [], p = h[h.length - 1], m = h[0], _; u.nodeCount(); ) {
for (; _ = m.dequeue(); )
s(u, h, d, _);
for (; _ = p.dequeue(); )
s(u, h, d, _);
if (u.nodeCount()) {
for (var y = h.length - 2; y > 0; --y)
if (_ = h[y].dequeue(), _) {
f = f.concat(s(u, h, d, _, !0));
break;
}
}
}
return f;
}
function s(u, h, d, f, p) {
var m = p ? [] : void 0;
return t.forEach(u.inEdges(f.v), function(_) {
var y = u.edge(_), b = u.node(_.v);
p && m.push({ v: _.v, w: _.w }), b.out -= y, l(h, d, b);
}), t.forEach(u.outEdges(f.v), function(_) {
var y = u.edge(_), b = _.w, x = u.node(b);
x.in -= y, l(h, d, x);
}), u.removeNode(f.v), m;
}
function o(u, h) {
var d = new e(), f = 0, p = 0;
t.forEach(u.nodes(), function(y) {
d.setNode(y, { v: y, in: 0, out: 0 });
}), t.forEach(u.edges(), function(y) {
var b = d.edge(y.v, y.w) || 0, x = h(y), k = b + x;
d.setEdge(y.v, y.w, k), p = Math.max(p, d.node(y.v).out += x), f = Math.max(f, d.node(y.w).in += x);
});
var m = t.range(p + f + 3).map(function() {
return new r();
}), _ = f + 1;
return t.forEach(d.nodes(), function(y) {
l(m, _, d.node(y));
}), { graph: d, buckets: m, zeroIdx: _ };
}
function l(u, h, d) {
d.out ? d.in ? u[d.out - d.in + h].enqueue(d) : u[u.length - 1].enqueue(d) : u[0].enqueue(d);
}
return Ty;
}
var Ey, Ek;
function jtt() {
if (Ek)
return Ey;
Ek = 1;
var t = Ke(), e = Gtt();
Ey = {
run: r,
undo: i
};
function r(a) {
var s = a.graph().acyclicer === "greedy" ? e(a, o(a)) : n(a);
t.forEach(s, function(l) {
var u = a.edge(l);
a.removeEdge(l), u.forwardName = l.name, u.reversed = !0, a.setEdge(l.w, l.v, u, t.uniqueId("rev"));
});
function o(l) {
return function(u) {
return l.edge(u).weight;
};
}
}
function n(a) {
var s = [], o = {}, l = {};
function u(h) {
t.has(l, h) || (l[h] = !0, o[h] = !0, t.forEach(a.outEdges(h), function(d) {
t.has(o, d.w) ? s.push(d) : u(d.w);
}), delete o[h]);
}
return t.forEach(a.nodes(), u), s;
}
function i(a) {
t.forEach(a.edges(), function(s) {
var o = a.edge(s);
if (o.reversed) {
a.removeEdge(s);
var l = o.forwardName;
delete o.reversed, delete o.forwardName, a.setEdge(s.w, s.v, o, l);
}
});
}
return Ey;
}
var Cy, Ck;
function _n() {
if (Ck)
return Cy;
Ck = 1;
var t = Ke(), e = ui().Graph;
Cy = {
addDummyNode: r,
simplify: n,
asNonCompoundGraph: i,
successorWeights: a,
predecessorWeights: s,
intersectRect: o,
buildLayerMatrix: l,
normalizeRanks: u,
removeEmptyRanks: h,
addBorderNode: d,
maxRank: f,
partition: p,
time: m,
notime: _
};
function r(y, b, x, k) {
var T;
do
T = t.uniqueId(k);
while (y.hasNode(T));
return x.dummy = b, y.setNode(T, x), T;
}
function n(y) {
var b = new e().setGraph(y.graph());
return t.forEach(y.nodes(), function(x) {
b.setNode(x, y.node(x));
}), t.forEach(y.edges(), function(x) {
var k = b.edge(x.v, x.w) || { weight: 0, minlen: 1 }, T = y.edge(x);
b.setEdge(x.v, x.w, {
weight: k.weight + T.weight,
minlen: Math.max(k.minlen, T.minlen)
});
}), b;
}
function i(y) {
var b = new e({ multigraph: y.isMultigraph() }).setGraph(y.graph());
return t.forEach(y.nodes(), function(x) {
y.children(x).length || b.setNode(x, y.node(x));
}), t.forEach(y.edges(), function(x) {
b.setEdge(x, y.edge(x));
}), b;
}
function a(y) {
var b = t.map(y.nodes(), function(x) {
var k = {};
return t.forEach(y.outEdges(x), function(T) {
k[T.w] = (k[T.w] || 0) + y.edge(T).weight;
}), k;
});
return t.zipObject(y.nodes(), b);
}
function s(y) {
var b = t.map(y.nodes(), function(x) {
var k = {};
return t.forEach(y.inEdges(x), function(T) {
k[T.v] = (k[T.v] || 0) + y.edge(T).weight;
}), k;
});
return t.zipObject(y.nodes(), b);
}
function o(y, b) {
var x = y.x, k = y.y, T = b.x - x, C = b.y - k, M = y.width / 2, S = y.height / 2;
if (!T && !C)
throw new Error("Not possible to find intersection inside of the rectangle");
var R, A;
return Math.abs(C) * M > Math.abs(T) * S ? (C < 0 && (S = -S), R = S * T / C, A = S) : (T < 0 && (M = -M), R = M, A = M * C / T), { x: x + R, y: k + A };
}
function l(y) {
var b = t.map(t.range(f(y) + 1), function() {
return [];
});
return t.forEach(y.nodes(), function(x) {
var k = y.node(x), T = k.rank;
t.isUndefined(T) || (b[T][k.order] = x);
}), b;
}
function u(y) {
var b = t.min(t.map(y.nodes(), function(x) {
return y.node(x).rank;
}));
t.forEach(y.nodes(), function(x) {
var k = y.node(x);
t.has(k, "rank") && (k.rank -= b);
});
}
function h(y) {
var b = t.min(t.map(y.nodes(), function(C) {
return y.node(C).rank;
})), x = [];
t.forEach(y.nodes(), function(C) {
var M = y.node(C).rank - b;
x[M] || (x[M] = []), x[M].push(C);
});
var k = 0, T = y.graph().nodeRankFactor;
t.forEach(x, function(C, M) {
t.isUndefined(C) && M % T !== 0 ? --k : k && t.forEach(C, function(S) {
y.node(S).rank += k;
});
});
}
function d(y, b, x, k) {
var T = {
width: 0,
height: 0
};
return arguments.length >= 4 && (T.rank = x, T.order = k), r(y, "border", T, b);
}
function f(y) {
return t.max(t.map(y.nodes(), function(b) {
var x = y.node(b).rank;
if (!t.isUndefined(x))
return x;
}));
}
function p(y, b) {
var x = { lhs: [], rhs: [] };
return t.forEach(y, function(k) {
b(k) ? x.lhs.push(k) : x.rhs.push(k);
}), x;
}
function m(y, b) {
var x = t.now();
try {
return b();
} finally {
console.log(y + " time: " + (t.now() - x) + "ms");
}
}
function _(y, b) {
return b();
}
return Cy;
}
var Sy, Sk;
function $tt() {
if (Sk)
return Sy;
Sk = 1;
var t = Ke(), e = _n();
Sy = {
run: r,
undo: i
};
function r(a) {
a.graph().dummyChains = [], t.forEach(a.edges(), function(s) {
n(a, s);
});
}
function n(a, s) {
var o = s.v, l = a.node(o).rank, u = s.w, h = a.node(u).rank, d = s.name, f = a.edge(s), p = f.labelRank;
if (h !== l + 1) {
a.removeEdge(s);
var m, _, y;
for (y = 0, ++l; l < h; ++y, ++l)
f.points = [], _ = {
width: 0,
height: 0,
edgeLabel: f,
edgeObj: s,
rank: l
}, m = e.addDummyNode(a, "edge", _, "_d"), l === p && (_.width = f.width, _.height = f.height, _.dummy = "edge-label", _.labelpos = f.labelpos), a.setEdge(o, m, { weight: f.weight }, d), y === 0 && a.graph().dummyChains.push(m), o = m;
a.setEdge(o, u, { weight: f.weight }, d);
}
}
function i(a) {
t.forEach(a.graph().dummyChains, function(s) {
var o = a.node(s), l = o.edgeLabel, u;
for (a.setEdge(o.edgeObj, l); o.dummy; )
u = a.successors(s)[0], a.removeNode(s), l.points.push({ x: o.x, y: o.y }), o.dummy === "edge-label" && (l.x = o.x, l.y = o.y, l.width = o.width, l.height = o.height), s = u, o = a.node(s);
});
}
return Sy;
}
var Ay, Ak;
function Gf() {
if (Ak)
return Ay;
Ak = 1;
var t = Ke();
Ay = {
longestPath: e,
slack: r
};
function e(n) {
var i = {};
function a(s) {
var o = n.node(s);
if (t.has(i, s))
return o.rank;
i[s] = !0;
var l = t.min(t.map(n.outEdges(s), function(u) {
return a(u.w) - n.edge(u).minlen;
}));
return (l === Number.POSITIVE_INFINITY || l === void 0 || l === null) && (l = 0), o.rank = l;
}
t.forEach(n.sources(), a);
}
function r(n, i) {
return n.node(i.w).rank - n.node(i.v).rank - n.edge(i).minlen;
}
return Ay;
}
var My, Mk;
function XM() {
if (Mk)
return My;
Mk = 1;
var t = Ke(), e = ui().Graph, r = Gf().slack;
My = n;
function n(o) {
var l = new e({ directed: !1 }), u = o.nodes()[0], h = o.nodeCount();
l.setNode(u, {});
for (var d, f; i(l, o) < h; )
d = a(l, o), f = l.hasNode(d.v) ? r(o, d) : -r(o, d), s(l, o, f);
return l;
}
function i(o, l) {
function u(h) {
t.forEach(l.nodeEdges(h), function(d) {
var f = d.v, p = h === f ? d.w : f;
!o.hasNode(p) && !r(l, d) && (o.setNode(p, {}), o.setEdge(h, p, {}), u(p));
});
}
return t.forEach(o.nodes(), u), o.nodeCount();
}
function a(o, l) {
return t.minBy(l.edges(), function(u) {
if (o.hasNode(u.v) !== o.hasNode(u.w))
return r(l, u);
});
}
function s(o, l, u) {
t.forEach(o.nodes(), function(h) {
l.node(h).rank += u;
});
}
return My;
}
var Ly, Lk;
function Xtt() {
if (Lk)
return Ly;
Lk = 1;
var t = Ke(), e = XM(), r = Gf().slack, n = Gf().longestPath, i = ui().alg.preorder, a = ui().alg.postorder, s = _n().simplify;
Ly = o, o.initLowLimValues = d, o.initCutValues = l, o.calcCutValue = h, o.leaveEdge = p, o.enterEdge = m, o.exchangeEdges = _;
function o(k) {
k = s(k), n(k);
var T = e(k);
d(T), l(T, k);
for (var C, M; C = p(T); )
M = m(T, k, C), _(T, k, C, M);
}
function l(k, T) {
var C = a(k, k.nodes());
C = C.slice(0, C.length - 1), t.forEach(C, function(M) {
u(k, T, M);
});
}
function u(k, T, C) {
var M = k.node(C), S = M.parent;
k.edge(C, S).cutvalue = h(k, T, C);
}
function h(k, T, C) {
var M = k.node(C), S = M.parent, R = !0, A = T.edge(C, S), L = 0;
return A || (R = !1, A = T.edge(S, C)), L = A.weight, t.forEach(T.nodeEdges(C), function(v) {
var B = v.v === C, w = B ? v.w : v.v;
if (w !== S) {
var D = B === R, N = T.edge(v).weight;
if (L += D ? N : -N, b(k, C, w)) {
var z = k.edge(C, w).cutvalue;
L += D ? -z : z;
}
}
}), L;
}
function d(k, T) {
arguments.length < 2 && (T = k.nodes()[0]), f(k, {}, 1, T);
}
function f(k, T, C, M, S) {
var R = C, A = k.node(M);
return T[M] = !0, t.forEach(k.neighbors(M), function(L) {
t.has(T, L) || (C = f(k, T, C, L, M));
}), A.low = R, A.lim = C++, S ? A.parent = S : delete A.parent, C;
}
function p(k) {
return t.find(k.edges(), function(T) {
return k.edge(T).cutvalue < 0;
});
}
function m(k, T, C) {
var M = C.v, S = C.w;
T.hasEdge(M, S) || (M = C.w, S = C.v);
var R = k.node(M), A = k.node(S), L = R, v = !1;
R.lim > A.lim && (L = A, v = !0);
var B = t.filter(T.edges(), function(w) {
return v === x(k, k.node(w.v), L) && v !== x(k, k.node(w.w), L);
});
return t.minBy(B, function(w) {
return r(T, w);
});
}
function _(k, T, C, M) {
var S = C.v, R = C.w;
k.removeEdge(S, R), k.setEdge(M.v, M.w, {}), d(k), l(k, T), y(k, T);
}
function y(k, T) {
var C = t.find(k.nodes(), function(S) {
return !T.node(S).parent;
}), M = i(k, C);
M = M.slice(1), t.forEach(M, function(S) {
var R = k.node(S).parent, A = T.edge(S, R), L = !1;
A || (A = T.edge(R, S), L = !0), T.node(S).rank = T.node(R).rank + (L ? A.minlen : -A.minlen);
});
}
function b(k, T, C) {
return k.hasEdge(T, C);
}
function x(k, T, C) {
return C.low <= T.lim && T.lim <= C.lim;
}
return Ly;
}
var Ry, Rk;
function Ktt() {
if (Rk)
return Ry;
Rk = 1;
var t = Gf(), e = t.longestPath, r = XM(), n = Xtt();
Ry = i;
function i(l) {
switch (l.graph().ranker) {
case "network-simplex":
o(l);
break;
case "tight-tree":
s(l);
break;
case "longest-path":
a(l);
break;
default:
o(l);
}
}
var a = e;
function s(l) {
e(l), r(l);
}
function o(l) {
n(l);
}
return Ry;
}
var Iy, Ik;
function Ztt() {
if (Ik)
return Iy;
Ik = 1;
var t = Ke();
Iy = e;
function e(i) {
var a = n(i);
t.forEach(i.graph().dummyChains, function(s) {
for (var o = i.node(s), l = o.edgeObj, u = r(i, a, l.v, l.w), h = u.path, d = u.lca, f = 0, p = h[f], m = !0; s !== l.w; ) {
if (o = i.node(s), m) {
for (; (p = h[f]) !== d && i.node(p).maxRank < o.rank; )
f++;
p === d && (m = !1);
}
if (!m) {
for (; f < h.length - 1 && i.node(p = h[f + 1]).minRank <= o.rank; )
f++;
p = h[f];
}
i.setParent(s, p), s = i.successors(s)[0];
}
});
}
function r(i, a, s, o) {
var l = [], u = [], h = Math.min(a[s].low, a[o].low), d = Math.max(a[s].lim, a[o].lim), f, p;
f = s;
do
f = i.parent(f), l.push(f);
while (f && (a[f].low > h || d > a[f].lim));
for (p = f, f = o; (f = i.parent(f)) !== p; )
u.push(f);
return { path: l.concat(u.reverse()), lca: p };
}
function n(i) {
var a = {}, s = 0;
function o(l) {
var u = s;
t.forEach(i.children(l), o), a[l] = { low: u, lim: s++ };
}
return t.forEach(i.children(), o), a;
}
return Iy;
}
var Ny, Nk;
function Qtt() {
if (Nk)
return Ny;
Nk = 1;
var t = Ke(), e = _n();
Ny = {
run: r,
cleanup: s
};
function r(o) {
var l = e.addDummyNode(o, "root", {}, "_root"), u = i(o), h = t.max(t.values(u)) - 1, d = 2 * h + 1;
o.graph().nestingRoot = l, t.forEach(o.edges(), function(p) {
o.edge(p).minlen *= d;
});
var f = a(o) + 1;
t.forEach(o.children(), function(p) {
n(o, l, d, f, h, u, p);
}), o.graph().nodeRankFactor = d;
}
function n(o, l, u, h, d, f, p) {
var m = o.children(p);
if (!m.length) {
p !== l && o.setEdge(l, p, { weight: 0, minlen: u });
return;
}
var _ = e.addBorderNode(o, "_bt"), y = e.addBorderNode(o, "_bb"), b = o.node(p);
o.setParent(_, p), b.borderTop = _, o.setParent(y, p), b.borderBottom = y, t.forEach(m, function(x) {
n(o, l, u, h, d, f, x);
var k = o.node(x), T = k.borderTop ? k.borderTop : x, C = k.borderBottom ? k.borderBottom : x, M = k.borderTop ? h : 2 * h, S = T !== C ? 1 : d - f[p] + 1;
o.setEdge(_, T, {
weight: M,
minlen: S,
nestingEdge: !0
}), o.setEdge(C, y, {
weight: M,
minlen: S,
nestingEdge: !0
});
}), o.parent(p) || o.setEdge(l, _, { weight: 0, minlen: d + f[p] });
}
function i(o) {
var l = {};
function u(h, d) {
var f = o.children(h);
f && f.length && t.forEach(f, function(p) {
u(p, d + 1);
}), l[h] = d;
}
return t.forEach(o.children(), function(h) {
u(h, 1);
}), l;
}
function a(o) {
return t.reduce(o.edges(), function(l, u) {
return l + o.edge(u).weight;
}, 0);
}
function s(o) {
var l = o.graph();
o.removeNode(l.nestingRoot), delete l.nestingRoot, t.forEach(o.edges(), function(u) {
var h = o.edge(u);
h.nestingEdge && o.removeEdge(u);
});
}
return Ny;
}
var By, Bk;
function Jtt() {
if (Bk)
return By;
Bk = 1;
var t = Ke(), e = _n();
By = r;
function r(i) {
function a(s) {
var o = i.children(s), l = i.node(s);
if (o.length && t.forEach(o, a), t.has(l, "minRank")) {
l.borderLeft = [], l.borderRight = [];
for (var u = l.minRank, h = l.maxRank + 1; u < h; ++u)
n(i, "borderLeft", "_bl", s, l, u), n(i, "borderRight", "_br", s, l, u);
}
}
t.forEach(i.children(), a);
}
function n(i, a, s, o, l, u) {
var h = { width: 0, height: 0, rank: u, borderType: a }, d = l[a][u - 1], f = e.addDummyNode(i, "border", h, s);
l[a][u] = f, i.setParent(f, o), d && i.setEdge(d, f, { weight: 1 });
}
return By;
}
var Dy, Dk;
function tet() {
if (Dk)
return Dy;
Dk = 1;
var t = Ke();
Dy = {
adjust: e,
undo: r
};
function e(u) {
var h = u.graph().rankdir.toLowerCase();
(h === "lr" || h === "rl") && n(u);
}
function r(u) {
var h = u.graph().rankdir.toLowerCase();
(h === "bt" || h === "rl") && a(u), (h === "lr" || h === "rl") && (o(u), n(u));
}
function n(u) {
t.forEach(u.nodes(), function(h) {
i(u.node(h));
}), t.forEach(u.edges(), function(h) {
i(u.edge(h));
});
}
function i(u) {
var h = u.width;
u.width = u.height, u.height = h;
}
function a(u) {
t.forEach(u.nodes(), function(h) {
s(u.node(h));
}), t.forEach(u.edges(), function(h) {
var d = u.edge(h);
t.forEach(d.points, s), t.has(d, "y") && s(d);
});
}
function s(u) {
u.y = -u.y;
}
function o(u) {
t.forEach(u.nodes(), function(h) {
l(u.node(h));
}), t.forEach(u.edges(), function(h) {
var d = u.edge(h);
t.forEach(d.points, l), t.has(d, "x") && l(d);
});
}
function l(u) {
var h = u.x;
u.x = u.y, u.y = h;
}
return Dy;
}
var Oy, Ok;
function eet() {
if (Ok)
return Oy;
Ok = 1;
var t = Ke();
Oy = e;
function e(r) {
var n = {}, i = t.filter(r.nodes(), function(u) {
return !r.children(u).length;
}), a = t.max(t.map(i, function(u) {
return r.node(u).rank;
})), s = t.map(t.range(a + 1), function() {
return [];
});
function o(u) {
if (!t.has(n, u)) {
n[u] = !0;
var h = r.node(u);
s[h.rank].push(u), t.forEach(r.successors(u), o);
}
}
var l = t.sortBy(i, function(u) {
return r.node(u).rank;
});
return t.forEach(l, o), s;
}
return Oy;
}
var Fy, Fk;
function ret() {
if (Fk)
return Fy;
Fk = 1;
var t = Ke();
Fy = e;
function e(n, i) {
for (var a = 0, s = 1; s < i.length; ++s)
a += r(n, i[s - 1], i[s]);
return a;
}
function r(n, i, a) {
for (var s = t.zipObject(
a,
t.map(a, function(f, p) {
return p;
})
), o = t.flatten(t.map(i, function(f) {
return t.sortBy(t.map(n.outEdges(f), function(p) {
return { pos: s[p.w], weight: n.edge(p).weight };
}), "pos");
}), !0), l = 1; l < a.length; )
l <<= 1;
var u = 2 * l - 1;
l -= 1;
var h = t.map(new Array(u), function() {
return 0;
}), d = 0;
return t.forEach(o.forEach(function(f) {
var p = f.pos + l;
h[p] += f.weight;
for (var m = 0; p > 0; )
p % 2 && (m += h[p + 1]), p = p - 1 >> 1, h[p] += f.weight;
d += f.weight * m;
})), d;
}
return Fy;
}
var Py, Pk;
function net() {
if (Pk)
return Py;
Pk = 1;
var t = Ke();
Py = e;
function e(r, n) {
return t.map(n, function(i) {
var a = r.inEdges(i);
if (a.length) {
var s = t.reduce(a, function(o, l) {
var u = r.edge(l), h = r.node(l.v);
return {
sum: o.sum + u.weight * h.order,
weight: o.weight + u.weight
};
}, { sum: 0, weight: 0 });
return {
v: i,
barycenter: s.sum / s.weight,
weight: s.weight
};
} else
return { v: i };
});
}
return Py;
}
var qy, qk;
function iet() {
if (qk)
return qy;
qk = 1;
var t = Ke();
qy = e;
function e(i, a) {
var s = {};
t.forEach(i, function(l, u) {
var h = s[l.v] = {
indegree: 0,
in: [],
out: [],
vs: [l.v],
i: u
};
t.isUndefined(l.barycenter) || (h.barycenter = l.barycenter, h.weight = l.weight);
}), t.forEach(a.edges(), function(l) {
var u = s[l.v], h = s[l.w];
!t.isUndefined(u) && !t.isUndefined(h) && (h.indegree++, u.out.push(s[l.w]));
});
var o = t.filter(s, function(l) {
return !l.indegree;
});
return r(o);
}
function r(i) {
var a = [];
function s(u) {
return function(h) {
h.merged || (t.isUndefined(h.barycenter) || t.isUndefined(u.barycenter) || h.barycenter >= u.barycenter) && n(u, h);
};
}
function o(u) {
return function(h) {
h.in.push(u), --h.indegree === 0 && i.push(h);
};
}
for (; i.length; ) {
var l = i.pop();
a.push(l), t.forEach(l.in.reverse(), s(l)), t.forEach(l.out, o(l));
}
return t.map(
t.filter(a, function(u) {
return !u.merged;
}),
function(u) {
return t.pick(u, ["vs", "i", "barycenter", "weight"]);
}
);
}
function n(i, a) {
var s = 0, o = 0;
i.weight && (s += i.barycenter * i.weight, o += i.weight), a.weight && (s += a.barycenter * a.weight, o += a.weight), i.vs = a.vs.concat(i.vs), i.barycenter = s / o, i.weight = o, i.i = Math.min(a.i, i.i), a.merged = !0;
}
return qy;
}
var Vy, Vk;
function aet() {
if (Vk)
return Vy;
Vk = 1;
var t = Ke(), e = _n();
Vy = r;
function r(a, s) {
var o = e.partition(a, function(_) {
return t.has(_, "barycenter");
}), l = o.lhs, u = t.sortBy(o.rhs, function(_) {
return -_.i;
}), h = [], d = 0, f = 0, p = 0;
l.sort(i(!!s)), p = n(h, u, p), t.forEach(l, function(_) {
p += _.vs.length, h.push(_.vs), d += _.barycenter * _.weight, f += _.weight, p = n(h, u, p);
});
var m = { vs: t.flatten(h, !0) };
return f && (m.barycenter = d / f, m.weight = f), m;
}
function n(a, s, o) {
for (var l; s.length && (l = t.last(s)).i <= o; )
s.pop(), a.push(l.vs), o++;
return o;
}
function i(a) {
return function(s, o) {
return s.barycenter < o.barycenter ? -1 : s.barycenter > o.barycenter ? 1 : a ? o.i - s.i : s.i - o.i;
};
}
return Vy;
}
var zy, zk;
function set() {
if (zk)
return zy;
zk = 1;
var t = Ke(), e = net(), r = iet(), n = aet();
zy = i;
function i(o, l, u, h) {
var d = o.children(l), f = o.node(l), p = f ? f.borderLeft : void 0, m = f ? f.borderRight : void 0, _ = {};
p && (d = t.filter(d, function(C) {
return C !== p && C !== m;
}));
var y = e(o, d);
t.forEach(y, function(C) {
if (o.children(C.v).length) {
var M = i(o, C.v, u, h);
_[C.v] = M, t.has(M, "barycenter") && s(C, M);
}
});
var b = r(y, u);
a(b, _);
var x = n(b, h);
if (p && (x.vs = t.flatten([p, x.vs, m], !0), o.predecessors(p).length)) {
var k = o.node(o.predecessors(p)[0]), T = o.node(o.predecessors(m)[0]);
t.has(x, "barycenter") || (x.barycenter = 0, x.weight = 0), x.barycenter = (x.barycenter * x.weight + k.order + T.order) / (x.weight + 2), x.weight += 2;
}
return x;
}
function a(o, l) {
t.forEach(o, function(u) {
u.vs = t.flatten(u.vs.map(function(h) {
return l[h] ? l[h].vs : h;
}), !0);
});
}
function s(o, l) {
t.isUndefined(o.barycenter) ? (o.barycenter = l.barycenter, o.weight = l.weight) : (o.barycenter = (o.barycenter * o.weight + l.barycenter * l.weight) / (o.weight + l.weight), o.weight += l.weight);
}
return zy;
}
var Yy, Yk;
function oet() {
if (Yk)
return Yy;
Yk = 1;
var t = Ke(), e = ui().Graph;
Yy = r;
function r(i, a, s) {
var o = n(i), l = new e({ compound: !0 }).setGraph({ root: o }).setDefaultNodeLabel(function(u) {
return i.node(u);
});
return t.forEach(i.nodes(), function(u) {
var h = i.node(u), d = i.parent(u);
(h.rank === a || h.minRank <= a && a <= h.maxRank) && (l.setNode(u), l.setParent(u, d || o), t.forEach(i[s](u), function(f) {
var p = f.v === u ? f.w : f.v, m = l.edge(p, u), _ = t.isUndefined(m) ? 0 : m.weight;
l.setEdge(p, u, { weight: i.edge(f).weight + _ });
}), t.has(h, "minRank") && l.setNode(u, {
borderLeft: h.borderLeft[a],
borderRight: h.borderRight[a]
}));
}), l;
}
function n(i) {
for (var a; i.hasNode(a = t.uniqueId("_root")); )
;
return a;
}
return Yy;
}
var Uy, Uk;
function cet() {
if (Uk)
return Uy;
Uk = 1;
var t = Ke();
Uy = e;
function e(r, n, i) {
var a = {}, s;
t.forEach(i, function(o) {
for (var l = r.parent(o), u, h; l; ) {
if (u = r.parent(l), u ? (h = a[u], a[u] = l) : (h = s, s = l), h && h !== l) {
n.setEdge(h, l);
return;
}
l = u;
}
});
}
return Uy;
}
var Wy, Wk;
function uet() {
if (Wk)
return Wy;
Wk = 1;
var t = Ke(), e = eet(), r = ret(), n = set(), i = oet(), a = cet(), s = ui().Graph, o = _n();
Wy = l;
function l(f) {
var p = o.maxRank(f), m = u(f, t.range(1, p + 1), "inEdges"), _ = u(f, t.range(p - 1, -1, -1), "outEdges"), y = e(f);
d(f, y);
for (var b = Number.POSITIVE_INFINITY, x, k = 0, T = 0; T < 4; ++k, ++T) {
h(k % 2 ? m : _, k % 4 >= 2), y = o.buildLayerMatrix(f);
var C = r(f, y);
C < b && (T = 0, x = t.cloneDeep(y), b = C);
}
d(f, x);
}
function u(f, p, m) {
return t.map(p, function(_) {
return i(f, _, m);
});
}
function h(f, p) {
var m = new s();
t.forEach(f, function(_) {
var y = _.graph().root, b = n(_, y, m, p);
t.forEach(b.vs, function(x, k) {
_.node(x).order = k;
}), a(_, m, b.vs);
});
}
function d(f, p) {
t.forEach(p, function(m) {
t.forEach(m, function(_, y) {
f.node(_).order = y;
});
});
}
return Wy;
}
var Hy, Hk;
function het() {
if (Hk)
return Hy;
Hk = 1;
var t = Ke(), e = ui().Graph, r = _n();
Hy = {
positionX: m,
findType1Conflicts: n,
findType2Conflicts: i,
addConflict: s,
hasConflict: o,
verticalAlignment: l,
horizontalCompaction: u,
alignCoordinates: f,
findSmallestWidthAlignment: d,
balance: p
};
function n(b, x) {
var k = {};
function T(C, M) {
var S = 0, R = 0, A = C.length, L = t.last(M);
return t.forEach(M, function(v, B) {
var w = a(b, v), D = w ? b.node(w).order : A;
(w || v === L) && (t.forEach(M.slice(R, B + 1), function(N) {
t.forEach(b.predecessors(N), function(z) {
var X = b.node(z), ct = X.order;
(ct < S || D < ct) && !(X.dummy && b.node(N).dummy) && s(k, z, N);
});
}), R = B + 1, S = D);
}), M;
}
return t.reduce(x, T), k;
}
function i(b, x) {
var k = {};
function T(M, S, R, A, L) {
var v;
t.forEach(t.range(S, R), function(B) {
v = M[B], b.node(v).dummy && t.forEach(b.predecessors(v), function(w) {
var D = b.node(w);
D.dummy && (D.order < A || D.order > L) && s(k, w, v);
});
});
}
function C(M, S) {
var R = -1, A, L = 0;
return t.forEach(S, function(v, B) {
if (b.node(v).dummy === "border") {
var w = b.predecessors(v);
w.length && (A = b.node(w[0]).order, T(S, L, B, R, A), L = B, R = A);
}
T(S, L, S.length, A, M.length);
}), S;
}
return t.reduce(x, C), k;
}
function a(b, x) {
if (b.node(x).dummy)
return t.find(b.predecessors(x), function(k) {
return b.node(k).dummy;
});
}
function s(b, x, k) {
if (x > k) {
var T = x;
x = k, k = T;
}
var C = b[x];
C || (b[x] = C = {}), C[k] = !0;
}
function o(b, x, k) {
if (x > k) {
var T = x;
x = k, k = T;
}
return t.has(b[x], k);
}
function l(b, x, k, T) {
var C = {}, M = {}, S = {};
return t.forEach(x, function(R) {
t.forEach(R, function(A, L) {
C[A] = A, M[A] = A, S[A] = L;
});
}), t.forEach(x, function(R) {
var A = -1;
t.forEach(R, function(L) {
var v = T(L);
if (v.length) {
v = t.sortBy(v, function(z) {
return S[z];
});
for (var B = (v.length - 1) / 2, w = Math.floor(B), D = Math.ceil(B); w <= D; ++w) {
var N = v[w];
M[L] === L && A < S[N] && !o(k, L, N) && (M[N] = L, M[L] = C[L] = C[N], A = S[N]);
}
}
});
}), { root: C, align: M };
}
function u(b, x, k, T, C) {
var M = {}, S = h(b, x, k, C), R = C ? "borderLeft" : "borderRight";
function A(B, w) {
for (var D = S.nodes(), N = D.pop(), z = {}; N; )
z[N] ? B(N) : (z[N] = !0, D.push(N), D = D.concat(w(N))), N = D.pop();
}
function L(B) {
M[B] = S.inEdges(B).reduce(function(w, D) {
return Math.max(w, M[D.v] + S.edge(D));
}, 0);
}
function v(B) {
var w = S.outEdges(B).reduce(function(N, z) {
return Math.min(N, M[z.w] - S.edge(z));
}, Number.POSITIVE_INFINITY), D = b.node(B);
w !== Number.POSITIVE_INFINITY && D.borderType !== R && (M[B] = Math.max(M[B], w));
}
return A(L, S.predecessors.bind(S)), A(v, S.successors.bind(S)), t.forEach(T, function(B) {
M[B] = M[k[B]];
}), M;
}
function h(b, x, k, T) {
var C = new e(), M = b.graph(), S = _(M.nodesep, M.edgesep, T);
return t.forEach(x, function(R) {
var A;
t.forEach(R, function(L) {
var v = k[L];
if (C.setNode(v), A) {
var B = k[A], w = C.edge(B, v);
C.setEdge(B, v, Math.max(S(b, L, A), w || 0));
}
A = L;
});
}), C;
}
function d(b, x) {
return t.minBy(t.values(x), function(k) {
var T = Number.NEGATIVE_INFINITY, C = Number.POSITIVE_INFINITY;
return t.forIn(k, function(M, S) {
var R = y(b, S) / 2;
T = Math.max(M + R, T), C = Math.min(M - R, C);
}), T - C;
});
}
function f(b, x) {
var k = t.values(x), T = t.min(k), C = t.max(k);
t.forEach(["u", "d"], function(M) {
t.forEach(["l", "r"], function(S) {
var R = M + S, A = b[R], L;
if (A !== x) {
var v = t.values(A);
L = S === "l" ? T - t.min(v) : C - t.max(v), L && (b[R] = t.mapValues(A, function(B) {
return B + L;
}));
}
});
});
}
function p(b, x) {
return t.mapValues(b.ul, function(k, T) {
if (x)
return b[x.toLowerCase()][T];
var C = t.sortBy(t.map(b, T));
return (C[1] + C[2]) / 2;
});
}
function m(b) {
var x = r.buildLayerMatrix(b), k = t.merge(
n(b, x),
i(b, x)
), T = {}, C;
t.forEach(["u", "d"], function(S) {
C = S === "u" ? x : t.values(x).reverse(), t.forEach(["l", "r"], function(R) {
R === "r" && (C = t.map(C, function(B) {
return t.values(B).reverse();
}));
var A = (S === "u" ? b.predecessors : b.successors).bind(b), L = l(b, C, k, A), v = u(
b,
C,
L.root,
L.align,
R === "r"
);
R === "r" && (v = t.mapValues(v, function(B) {
return -B;
})), T[S + R] = v;
});
});
var M = d(b, T);
return f(T, M), p(T, b.graph().align);
}
function _(b, x, k) {
return function(T, C, M) {
var S = T.node(C), R = T.node(M), A = 0, L;
if (A += S.width / 2, t.has(S, "labelpos"))
switch (S.labelpos.toLowerCase()) {
case "l":
L = -S.width / 2;
break;
case "r":
L = S.width / 2;
break;
}
if (L && (A += k ? L : -L), L = 0, A += (S.dummy ? x : b) / 2, A += (R.dummy ? x : b) / 2, A += R.width / 2, t.has(R, "labelpos"))
switch (R.labelpos.toLowerCase()) {
case "l":
L = R.width / 2;
break;
case "r":
L = -R.width / 2;
break;
}
return L && (A += k ? L : -L), L = 0, A;
};
}
function y(b, x) {
return b.node(x).width;
}
return Hy;
}
var Gy, Gk;
function fet() {
if (Gk)
return Gy;
Gk = 1;
var t = Ke(), e = _n(), r = het().positionX;
Gy = n;
function n(a) {
a = e.asNonCompoundGraph(a), i(a), t.forEach(r(a), function(s, o) {
a.node(o).x = s;
});
}
function i(a) {
var s = e.buildLayerMatrix(a), o = a.graph().ranksep, l = 0;
t.forEach(s, function(u) {
var h = t.max(t.map(u, function(d) {
return a.node(d).height;
}));
t.forEach(u, function(d) {
a.node(d).y = l + h / 2;
}), l += h + o;
});
}
return Gy;
}
var jy, jk;
function det() {
if (jk)
return jy;
jk = 1;
var t = Ke(), e = jtt(), r = $tt(), n = Ktt(), i = _n().normalizeRanks, a = Ztt(), s = _n().removeEmptyRanks, o = Qtt(), l = Jtt(), u = tet(), h = uet(), d = fet(), f = _n(), p = ui().Graph;
jy = m;
function m(W, tt) {
var K = tt && tt.debugTiming ? f.time : f.notime;
K("layout", function() {
var it = K(" buildLayoutGraph", function() {
return A(W);
});
K(" runLayout", function() {
_(it, K);
}), K(" updateInputGraph", function() {
y(W, it);
});
});
}
function _(W, tt) {
tt(" makeSpaceForEdgeLabels", function() {
L(W);
}), tt(" removeSelfEdges", function() {
J(W);
}), tt(" acyclic", function() {
e.run(W);
}), tt(" nestingGraph.run", function() {
o.run(W);
}), tt(" rank", function() {
n(f.asNonCompoundGraph(W));
}), tt(" injectEdgeLabelProxies", function() {
v(W);
}), tt(" removeEmptyRanks", function() {
s(W);
}), tt(" nestingGraph.cleanup", function() {
o.cleanup(W);
}), tt(" normalizeRanks", function() {
i(W);
}), tt(" assignRankMinMax", function() {
B(W);
}), tt(" removeEdgeLabelProxies", function() {
w(W);
}), tt(" normalize.run", function() {
r.run(W);
}), tt(" parentDummyChains", function() {
a(W);
}), tt(" addBorderSegments", function() {
l(W);
}), tt(" order", function() {
h(W);
}), tt(" insertSelfEdges", function() {
Y(W);
}), tt(" adjustCoordinateSystem", function() {
u.adjust(W);
}), tt(" position", function() {
d(W);
}), tt(" positionSelfEdges", function() {
$(W);
}), tt(" removeBorderNodes", function() {
ct(W);
}), tt(" normalize.undo", function() {
r.undo(W);
}), tt(" fixupEdgeLabelCoords", function() {
z(W);
}), tt(" undoCoordinateSystem", function() {
u.undo(W);
}), tt(" translateGraph", function() {
D(W);
}), tt(" assignNodeIntersects", function() {
N(W);
}), tt(" reversePoints", function() {
X(W);
}), tt(" acyclic.undo", function() {
e.undo(W);
});
}
function y(W, tt) {
t.forEach(W.nodes(), function(K) {
var it = W.node(K), Z = tt.node(K);
it && (it.x = Z.x, it.y = Z.y, tt.children(K).length && (it.width = Z.width, it.height = Z.height));
}), t.forEach(W.edges(), function(K) {
var it = W.edge(K), Z = tt.edge(K);
it.points = Z.points, t.has(Z, "x") && (it.x = Z.x, it.y = Z.y);
}), W.graph().width = tt.graph().width, W.graph().height = tt.graph().height;
}
var b = ["nodesep", "edgesep", "ranksep", "marginx", "marginy"], x = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: "tb" }, k = ["acyclicer", "ranker", "rankdir", "align"], T = ["width", "height"], C = { width: 0, height: 0 }, M = ["minlen", "weight", "width", "height", "labeloffset"], S = {
minlen: 1,
weight: 1,
width: 0,
height: 0,
labeloffset: 10,
labelpos: "r"
}, R = ["labelpos"];
function A(W) {
var tt = new p({ multigraph: !0, compound: !0 }), K = ut(W.graph());
return tt.setGraph(t.merge(
{},
x,
lt(K, b),
t.pick(K, k)
)), t.forEach(W.nodes(), function(it) {
var Z = ut(W.node(it));
tt.setNode(it, t.defaults(lt(Z, T), C)), tt.setParent(it, W.parent(it));
}), t.forEach(W.edges(), function(it) {
var Z = ut(W.edge(it));
tt.setEdge(it, t.merge(
{},
S,
lt(Z, M),
t.pick(Z, R)
));
}), tt;
}
function L(W) {
var tt = W.graph();
tt.ranksep /= 2, t.forEach(W.edges(), function(K) {
var it = W.edge(K);
it.minlen *= 2, it.labelpos.toLowerCase() !== "c" && (tt.rankdir === "TB" || tt.rankdir === "BT" ? it.width += it.labeloffset : it.height += it.labeloffset);
});
}
function v(W) {
t.forEach(W.edges(), function(tt) {
var K = W.edge(tt);
if (K.width && K.height) {
var it = W.node(tt.v), Z = W.node(tt.w), V = { rank: (Z.rank - it.rank) / 2 + it.rank, e: tt };
f.addDummyNode(W, "edge-proxy", V, "_ep");
}
});
}
function B(W) {
var tt = 0;
t.forEach(W.nodes(), function(K) {
var it = W.node(K);
it.borderTop && (it.minRank = W.node(it.borderTop).rank, it.maxRank = W.node(it.borderBottom).rank, tt = t.max(tt, it.maxRank));
}), W.graph().maxRank = tt;
}
function w(W) {
t.forEach(W.nodes(), function(tt) {
var K = W.node(tt);
K.dummy === "edge-proxy" && (W.edge(K.e).labelRank = K.rank, W.removeNode(tt));
});
}
function D(W) {
var tt = Number.POSITIVE_INFINITY, K = 0, it = Number.POSITIVE_INFINITY, Z = 0, V = W.graph(), Q = V.marginx || 0, q = V.marginy || 0;
function U(F) {
var j = F.x, P = F.y, et = F.width, at = F.height;
tt = Math.min(tt, j - et / 2), K = Math.max(K, j + et / 2), it = Math.min(it, P - at / 2), Z = Math.max(Z, P + at / 2);
}
t.forEach(W.nodes(), function(F) {
U(W.node(F));
}), t.forEach(W.edges(), function(F) {
var j = W.edge(F);
t.has(j, "x") && U(j);
}), tt -= Q, it -= q, t.forEach(W.nodes(), function(F) {
var j = W.node(F);
j.x -= tt, j.y -= it;
}), t.forEach(W.edges(), function(F) {
var j = W.edge(F);
t.forEach(j.points, function(P) {
P.x -= tt, P.y -= it;
}), t.has(j, "x") && (j.x -= tt), t.has(j, "y") && (j.y -= it);
}), V.width = K - tt + Q, V.height = Z - it + q;
}
function N(W) {
t.forEach(W.edges(), function(tt) {
var K = W.edge(tt), it = W.node(tt.v), Z = W.node(tt.w), V, Q;
K.points ? (V = K.points[0], Q = K.points[K.points.length - 1]) : (K.points = [], V = Z, Q = it), K.points.unshift(f.intersectRect(it, V)), K.points.push(f.intersectRect(Z, Q));
});
}
function z(W) {
t.forEach(W.edges(), function(tt) {
var K = W.edge(tt);
if (t.has(K, "x"))
switch ((K.labelpos === "l" || K.labelpos === "r") && (K.width -= K.labeloffset), K.labelpos) {
case "l":
K.x -= K.width / 2 + K.labeloffset;
break;
case "r":
K.x += K.width / 2 + K.labeloffset;
break;
}
});
}
function X(W) {
t.forEach(W.edges(), function(tt) {
var K = W.edge(tt);
K.reversed && K.points.reverse();
});
}
function ct(W) {
t.forEach(W.nodes(), function(tt) {
if (W.children(tt).length) {
var K = W.node(tt), it = W.node(K.borderTop), Z = W.node(K.borderBottom), V = W.node(t.last(K.borderLeft)), Q = W.node(t.last(K.borderRight));
K.width = Math.abs(Q.x - V.x), K.height = Math.abs(Z.y - it.y), K.x = V.x + K.width / 2, K.y = it.y + K.height / 2;
}
}), t.forEach(W.nodes(), function(tt) {
W.node(tt).dummy === "border" && W.removeNode(tt);
});
}
function J(W) {
t.forEach(W.edges(), function(tt) {
if (tt.v === tt.w) {
var K = W.node(tt.v);
K.selfEdges || (K.selfEdges = []), K.selfEdges.push({ e: tt, label: W.edge(tt) }), W.removeEdge(tt);
}
});
}
function Y(W) {
var tt = f.buildLayerMatrix(W);
t.forEach(tt, function(K) {
var it = 0;
t.forEach(K, function(Z, V) {
var Q = W.node(Z);
Q.order = V + it, t.forEach(Q.selfEdges, function(q) {
f.addDummyNode(W, "selfedge", {
width: q.label.width,
height: q.label.height,
rank: Q.rank,
order: V + ++it,
e: q.e,
label: q.label
}, "_se");
}), delete Q.selfEdges;
});
});
}
function $(W) {
t.forEach(W.nodes(), function(tt) {
var K = W.node(tt);
if (K.dummy === "selfedge") {
var it = W.node(K.e.v), Z = it.x + it.width / 2, V = it.y, Q = K.x - Z, q = it.height / 2;
W.setEdge(K.e, K.label), W.removeNode(tt), K.label.points = [
{ x: Z + 2 * Q / 3, y: V - q },
{ x: Z + 5 * Q / 6, y: V - q },
{ x: Z + Q, y: V },
{ x: Z + 5 * Q / 6, y: V + q },
{ x: Z + 2 * Q / 3, y: V + q }
], K.label.x = K.x, K.label.y = K.y;
}
});
}
function lt(W, tt) {
return t.mapValues(t.pick(W, tt), Number);
}
function ut(W) {
var tt = {};
return t.forEach(W, function(K, it) {
tt[it.toLowerCase()] = K;
}), tt;
}
return jy;
}
var $y, $k;
function pet() {
if ($k)
return $y;
$k = 1;
var t = Ke(), e = _n(), r = ui().Graph;
$y = {
debugOrdering: n
};
function n(i) {
var a = e.buildLayerMatrix(i), s = new r({ compound: !0, multigraph: !0 }).setGraph({});
return t.forEach(i.nodes(), function(o) {
s.setNode(o, { label: o }), s.setParent(o, "layer" + i.node(o).rank);
}), t.forEach(i.edges(), function(o) {
s.setEdge(o.v, o.w, {}, o.name);
}), t.forEach(a, function(o, l) {
var u = "layer" + l;
s.setNode(u, { rank: "same" }), t.reduce(o, function(h, d) {
return s.setEdge(h, d, { style: "invis" }), d;
});
}), s;
}
return $y;
}
var Xy, Xk;
function get() {
return Xk || (Xk = 1, Xy = "0.8.5"), Xy;
}
var Ky, Kk;
function KM() {
return Kk || (Kk = 1, Ky = {
graphlib: ui(),
layout: det(),
debug: pet(),
util: {
time: _n().time,
notime: _n().notime
},
version: get()
}), Ky;
}
var fu = KM();
let Zk = 0;
const yet = function(t, e, r, n, i) {
const a = function(x) {
switch (x) {
case i.db.relationType.AGGREGATION:
return "aggregation";
case i.db.EXTENSION:
return "extension";
case i.db.COMPOSITION:
return "composition";
case i.db.DEPENDENCY:
return "dependency";
case i.db.LOLLIPOP:
return "lollipop";
}
};
e.points = e.points.filter((x) => !Number.isNaN(x.y));
const s = e.points, o = ns().x(function(x) {
return x.x;
}).y(function(x) {
return x.y;
}).curve(Ps), l = t.append("path").attr("d", o(s)).attr("id", "edge" + Zk).attr("class", "relation");
let u = "";
n.arrowMarkerAbsolute && (u = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, u = u.replace(/\(/g, "\\("), u = u.replace(/\)/g, "\\)")), r.relation.lineType == 1 && l.attr("class", "relation dashed-line"), r.relation.type1 !== "none" && l.attr(
"marker-start",
"url(" + u + "#" + a(r.relation.type1) + "Start)"
), r.relation.type2 !== "none" && l.attr(
"marker-end",
"url(" + u + "#" + a(r.relation.type2) + "End)"
);
let h, d;
const f = e.points.length;
let p = Re.calcLabelPosition(e.points);
h = p.x, d = p.y;
let m, _, y, b;
if (f % 2 !== 0 && f > 1) {
let x = Re.calcCardinalityPosition(
r.relation.type1 !== "none",
e.points,
e.points[0]
), k = Re.calcCardinalityPosition(
r.relation.type2 !== "none",
e.points,
e.points[f - 1]
);
H.debug("cardinality_1_point " + JSON.stringify(x)), H.debug("cardinality_2_point " + JSON.stringify(k)), m = x.x, _ = x.y, y = k.x, b = k.y;
}
if (typeof r.title < "u") {
const x = t.append("g").attr("class", "classLabel"), k = x.append("text").attr("class", "label").attr("x", h).attr("y", d).attr("fill", "red").attr("text-anchor", "middle").text(r.title);
window.label = k;
const T = k.node().getBBox();
x.insert("rect", ":first-child").attr("class", "box").attr("x", T.x - n.padding / 2).attr("y", T.y - n.padding / 2).attr("width", T.width + n.padding).attr("height", T.height + n.padding);
}
H.info("Rendering relation " + JSON.stringify(r)), typeof r.relationTitle1 < "u" && r.relationTitle1 !== "none" && t.append("g").attr("class", "cardinality").append("text").attr("class", "type1").attr("x", m).attr("y", _).attr("fill", "black").attr("font-size", "6").text(r.relationTitle1), typeof r.relationTitle2 < "u" && r.relationTitle2 !== "none" && t.append("g").attr("class", "cardinality").append("text").attr("class", "type2").attr("x", y).attr("y", b).attr("fill", "black").attr("font-size", "6").text(r.relationTitle2), Zk++;
}, met = function(t, e, r, n) {
H.debug("Rendering class ", e, r);
const i = e.id, a = {
id: i,
label: e.id,
width: 0,
height: 0
}, s = t.append("g").attr("id", n.db.lookUpDomId(i)).attr("class", "classGroup");
let o;
e.link ? o = s.append("svg:a").attr("xlink:href", e.link).attr("target", e.linkTarget).append("text").attr("y", r.textHeight + r.padding).attr("x", 0) : o = s.append("text").attr("y", r.textHeight + r.padding).attr("x", 0);
let l = !0;
e.annotations.forEach(function(C) {
const M = o.append("tspan").text("\xAB" + C + "\xBB");
l || M.attr("dy", r.textHeight), l = !1;
});
let u = e.id;
e.type !== void 0 && e.type !== "" && (u += "<" + e.type + ">");
const h = o.append("tspan").text(u).attr("class", "title");
l || h.attr("dy", r.textHeight);
const d = o.node().getBBox().height, f = s.append("line").attr("x1", 0).attr("y1", r.padding + d + r.dividerMargin / 2).attr("y2", r.padding + d + r.dividerMargin / 2), p = s.append("text").attr("x", r.padding).attr("y", d + r.dividerMargin + r.textHeight).attr("fill", "white").attr("class", "classText");
l = !0, e.members.forEach(function(C) {
Qk(p, C, l, r), l = !1;
});
const m = p.node().getBBox(), _ = s.append("line").attr("x1", 0).attr("y1", r.padding + d + r.dividerMargin + m.height).attr("y2", r.padding + d + r.dividerMargin + m.height), y = s.append("text").attr("x", r.padding).attr("y", d + 2 * r.dividerMargin + m.height + r.textHeight).attr("fill", "white").attr("class", "classText");
l = !0, e.methods.forEach(function(C) {
Qk(y, C, l, r), l = !1;
});
const b = s.node().getBBox();
var x = " ";
e.cssClasses.length > 0 && (x = x + e.cssClasses.join(" "));
const T = s.insert("rect", ":first-child").attr("x", 0).attr("y", 0).attr("width", b.width + 2 * r.padding).attr("height", b.height + r.padding + 0.5 * r.dividerMargin).attr("class", x).node().getBBox().width;
return o.node().childNodes.forEach(function(C) {
C.setAttribute("x", (T - C.getBBox().width) / 2);
}), e.tooltip && o.insert("title").text(e.tooltip), f.attr("x2", T), _.attr("x2", T), a.width = T, a.height = b.height + r.padding + 0.5 * r.dividerMargin, a;
}, jf = function(t) {
const e = /^(\+|-|~|#)?(\w+)(~\w+~|\[\])?\s+(\w+) *(\*|\$)?$/, r = /^([+|\-|~|#])?(\w+) *\( *(.*)\) *(\*|\$)? *(\w*[~|[\]]*\s*\w*~?)$/;
let n = t.match(e), i = t.match(r);
return n && !i ? bet(n) : i ? _et(i) : vet(t);
}, bet = function(t) {
let e = "", r = "";
try {
let n = t[1] ? t[1].trim() : "", i = t[2] ? t[2].trim() : "", a = t[3] ? Va(t[3].trim()) : "", s = t[4] ? t[4].trim() : "", o = t[5] ? t[5].trim() : "";
r = n + i + a + " " + s, e = r_(o);
} catch {
r = t;
}
return {
displayText: r,
cssStyle: e
};
}, _et = function(t) {
let e = "", r = "";
try {
let n = t[1] ? t[1].trim() : "", i = t[2] ? t[2].trim() : "", a = t[3] ? Va(t[3].trim()) : "", s = t[4] ? t[4].trim() : "", o = t[5] ? " : " + Va(t[5]).trim() : "";
r = n + i + "(" + a + ")" + o, e = r_(s);
} catch {
r = t;
}
return {
displayText: r,
cssStyle: e
};
}, vet = function(t) {
let e = "", r = "", n = "", i = t.indexOf("("), a = t.indexOf(")");
if (i > 1 && a > i && a <= t.length) {
let s = "", o = "", l = t.substring(0, 1);
l.match(/\w/) ? o = t.substring(0, i).trim() : (l.match(/\+|-|~|#/) && (s = l), o = t.substring(1, i).trim());
const u = t.substring(i + 1, a);
t.substring(a + 1, 1), r = r_(t.substring(a + 1, a + 2)), e = s + o + "(" + Va(u.trim()) + ")", a < t.length && (n = t.substring(a + 2).trim(), n !== "" && (n = " : " + Va(n), e += n));
} else
e = Va(t);
return {
displayText: e,
cssStyle: r
};
}, Qk = function(t, e, r, n) {
let i = jf(e);
const a = t.append("tspan").attr("x", n.padding).text(i.displayText);
i.cssStyle !== "" && a.attr("style", i.cssStyle), r || a.attr("dy", n.textHeight);
}, r_ = function(t) {
switch (t) {
case "*":
return "font-style:italic;";
case "$":
return "text-decoration:underline;";
default:
return "";
}
}, Jk = {
drawClass: met,
drawEdge: yet,
parseMember: jf
};
let Ab = {};
const oh = 20, lh = function(t) {
const e = Object.entries(Ab).find((r) => r[1].label === t);
if (e)
return e[0];
}, xet = function(t) {
t.append("defs").append("marker").attr("id", "extensionStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"), t.append("defs").append("marker").attr("id", "extensionEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z"), t.append("defs").append("marker").attr("id", "compositionStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), t.append("defs").append("marker").attr("id", "compositionEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), t.append("defs").append("marker").attr("id", "aggregationStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), t.append("defs").append("marker").attr("id", "aggregationEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), t.append("defs").append("marker").attr("id", "dependencyStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"), t.append("defs").append("marker").attr("id", "dependencyEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
}, ket = function(t, e, r, n) {
const i = nt().class;
Ab = {}, H.info("Rendering diagram " + t);
const a = nt().securityLevel;
let s;
a === "sandbox" && (s = St("#i" + e));
const o = St(a === "sandbox" ? s.nodes()[0].contentDocument.body : "body"), l = o.select(`[id='${e}']`);
xet(l);
const u = new ur.Graph({
multigraph: !0
});
u.setGraph({
isMultiGraph: !0
}), u.setDefaultEdgeLabel(function() {
return {};
});
const h = n.db.getClasses(), d = Object.keys(h);
for (let b = 0; b < d.length; b++) {
const x = h[d[b]], k = Jk.drawClass(l, x, i, n);
Ab[k.id] = k, u.setNode(k.id, k), H.info("Org height: " + k.height);
}
n.db.getRelations().forEach(function(b) {
H.info(
"tjoho" + lh(b.id1) + lh(b.id2) + JSON.stringify(b)
), u.setEdge(
lh(b.id1),
lh(b.id2),
{
relation: b
},
b.title || "DEFAULT"
);
}), fu.layout(u), u.nodes().forEach(function(b) {
typeof b < "u" && typeof u.node(b) < "u" && (H.debug("Node " + b + ": " + JSON.stringify(u.node(b))), o.select("#" + n.db.lookUpDomId(b)).attr(
"transform",
"translate(" + (u.node(b).x - u.node(b).width / 2) + "," + (u.node(b).y - u.node(b).height / 2) + " )"
));
}), u.edges().forEach(function(b) {
typeof b < "u" && typeof u.edge(b) < "u" && (H.debug("Edge " + b.v + " -> " + b.w + ": " + JSON.stringify(u.edge(b))), Jk.drawEdge(l, u.edge(b), u.edge(b).relation, i, n));
});
const p = l.node().getBBox(), m = p.width + oh * 2, _ = p.height + oh * 2;
di(l, _, m, i.useMaxWidth);
const y = `${p.x - oh} ${p.y - oh} ${m} ${_}`;
H.debug(`viewBox ${y}`), l.attr("viewBox", y), vn(n.db, l, e);
}, wet = {
draw: ket
}, Tet = (t, e, r, n) => {
e.forEach((i) => {
Det[i](t, r, n);
});
}, Eet = (t, e, r) => {
H.trace("Making markers for ", r), t.append("defs").append("marker").attr("id", e + "-extensionStart").attr("class", "marker extension " + e).attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"), t.append("defs").append("marker").attr("id", e + "-extensionEnd").attr("class", "marker extension " + e).attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z");
}, Cet = (t, e) => {
t.append("defs").append("marker").attr("id", e + "-compositionStart").attr("class", "marker composition " + e).attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), t.append("defs").append("marker").attr("id", e + "-compositionEnd").attr("class", "marker composition " + e).attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
}, Aet = (t, e) => {
t.append("defs").append("marker").attr("id", e + "-aggregationStart").attr("class", "marker aggregation " + e).attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), t.append("defs").append("marker").attr("id", e + "-aggregationEnd").attr("class", "marker aggregation " + e).attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
}, Met = (t, e) => {
t.append("defs").append("marker").attr("id", e + "-dependencyStart").attr("class", "marker dependency " + e).attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"), t.append("defs").append("marker").attr("id", e + "-dependencyEnd").attr("class", "marker dependency " + e).attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
}, Let = (t, e) => {
t.append("defs").append("marker").attr("id", e + "-lollipopStart").attr("class", "marker lollipop " + e).attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "white").attr("cx", 6).attr("cy", 7).attr("r", 6);
}, Ret = (t, e) => {
t.append("marker").attr("id", e + "-pointEnd").attr("class", "marker " + e).attr("viewBox", "0 0 10 10").attr("refX", 10).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), t.append("marker").attr("id", e + "-pointStart").attr("class", "marker " + e).attr("viewBox", "0 0 10 10").attr("refX", 0).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 5 L 10 10 L 10 0 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
}, Iet = (t, e) => {
t.append("marker").attr("id", e + "-circleEnd").attr("class", "marker " + e).attr("viewBox", "0 0 10 10").attr("refX", 11).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), t.append("marker").attr("id", e + "-circleStart").attr("class", "marker " + e).attr("viewBox", "0 0 10 10").attr("refX", -1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
}, Net = (t, e) => {
t.append("marker").attr("id", e + "-crossEnd").attr("class", "marker cross " + e).attr("viewBox", "0 0 11 11").attr("refX", 12).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0"), t.append("marker").attr("id", e + "-crossStart").attr("class", "marker cross " + e).attr("viewBox", "0 0 11 11").attr("refX", -1).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0");
}, Bet = (t, e) => {
t.append("defs").append("marker").attr("id", e + "-barbEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "strokeWidth").attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z");
}, Det = {
extension: Eet,
composition: Cet,
aggregation: Aet,
dependency: Met,
lollipop: Let,
point: Ret,
circle: Iet,
cross: Net,
barb: Bet
};
function Oet(t, e) {
e && t.attr("style", e);
}
function Fet(t) {
const e = St(document.createElementNS("http://www.w3.org/2000/svg", "foreignObject")), r = e.append("xhtml:div"), n = t.label, i = t.isNode ? "nodeLabel" : "edgeLabel";
return r.html(
'" + n + ""
), Oet(r, t.labelStyle), r.style("display", "inline-block"), r.style("white-space", "nowrap"), r.attr("xmlns", "http://www.w3.org/1999/xhtml"), e.node();
}
const yn = (t, e, r, n) => {
let i = t || "";
if (typeof i == "object" && (i = i[0]), Mr(nt().flowchart.htmlLabels)) {
i = i.replace(/\\n|\n/g, "
"), H.info("vertexText" + i);
const a = {
isNode: n,
label: I0(i).replace(
/fa[lrsb]?:fa-[\w-]+/g,
(o) => ``
),
labelStyle: e.replace("fill:", "color:")
};
return Fet(a);
} else {
const a = document.createElementNS("http://www.w3.org/2000/svg", "text");
a.setAttribute("style", e.replace("color:", "fill:"));
let s = [];
typeof i == "string" ? s = i.split(/\\n|\n|
/gi) : Array.isArray(i) ? s = i : s = [];
for (let o = 0; o < s.length; o++) {
const l = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
l.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), l.setAttribute("dy", "1em"), l.setAttribute("x", "0"), r ? l.setAttribute("class", "title-row") : l.setAttribute("class", "row"), l.textContent = s[o].trim(), a.appendChild(l);
}
return a;
}
}, Gr = (t, e, r, n) => {
let i;
r ? i = r : i = "node default";
const a = t.insert("g").attr("class", i).attr("id", e.domId || e.id), s = a.insert("g").attr("class", "label").attr("style", e.labelStyle);
let o;
typeof e.labelText > "u" ? o = "" : o = typeof e.labelText == "string" ? e.labelText : e.labelText[0];
const l = s.node().appendChild(
yn(
li(I0(o), nt()),
e.labelStyle,
!1,
n
)
);
let u = l.getBBox();
if (Mr(nt().flowchart.htmlLabels)) {
const d = l.children[0], f = St(l);
u = d.getBoundingClientRect(), f.attr("width", u.width), f.attr("height", u.height);
}
const h = e.padding / 2;
return s.attr("transform", "translate(" + -u.width / 2 + ", " + -u.height / 2 + ")"), { shapeSvg: a, bbox: u, halfPadding: h, label: s };
}, hr = (t, e) => {
const r = e.node().getBBox();
t.width = r.width, t.height = r.height;
};
function xa(t, e, r, n) {
return t.insert("polygon", ":first-child").attr(
"points",
n.map(function(i) {
return i.x + "," + i.y;
}).join(" ")
).attr("class", "label-container").attr("transform", "translate(" + -e / 2 + "," + r / 2 + ")");
}
let Le = {}, ei = {}, ZM = {};
const Pet = () => {
ei = {}, ZM = {}, Le = {};
}, $f = (t, e) => (H.trace(
"In isDecendant",
e,
" ",
t,
" = ",
ei[e].indexOf(t) >= 0
), ei[e].indexOf(t) >= 0), qet = (t, e) => (H.info("Decendants of ", e, " is ", ei[e]), H.info("Edge is ", t), t.v === e || t.w === e ? !1 : ei[e] ? !!(ei[e].indexOf(t.v) >= 0 || $f(t.v, e) || $f(t.w, e) || ei[e].indexOf(t.w) >= 0) : (H.debug("Tilt, ", e, ",not in decendants"), !1)), QM = (t, e, r, n) => {
H.warn(
"Copying children of ",
t,
"root",
n,
"data",
e.node(t),
n
);
const i = e.children(t) || [];
t !== n && i.push(t), H.warn("Copying (nodes) clusterId", t, "nodes", i), i.forEach((a) => {
if (e.children(a).length > 0)
QM(a, e, r, n);
else {
const s = e.node(a);
H.info("cp ", a, " to ", n, " with parent ", t), r.setNode(a, s), n !== e.parent(a) && (H.warn("Setting parent", a, e.parent(a)), r.setParent(a, e.parent(a))), t !== n && a !== t ? (H.debug("Setting parent", a, t), r.setParent(a, t)) : (H.info("In copy ", t, "root", n, "data", e.node(t), n), H.debug(
"Not Setting parent for node=",
a,
"cluster!==rootId",
t !== n,
"node!==clusterId",
a !== t
));
const o = e.edges(a);
H.debug("Copying Edges", o), o.forEach((l) => {
H.info("Edge", l);
const u = e.edge(l.v, l.w, l.name);
H.info("Edge data", u, n);
try {
qet(l, n) ? (H.info("Copying as ", l.v, l.w, u, l.name), r.setEdge(l.v, l.w, u, l.name), H.info("newGraph edges ", r.edges(), r.edge(r.edges()[0]))) : H.info(
"Skipping copy of edge ",
l.v,
"-->",
l.w,
" rootId: ",
n,
" clusterId:",
t
);
} catch (h) {
H.error(h);
}
});
}
H.debug("Removing node", a), e.removeNode(a);
});
}, JM = (t, e) => {
const r = e.children(t);
let n = [].concat(r);
for (let i = 0; i < r.length; i++)
ZM[r[i]] = t, n = n.concat(JM(r[i], e));
return n;
}, Yc = (t, e) => {
H.trace("Searching", t);
const r = e.children(t);
if (H.trace("Searching children of id ", t, r), r.length < 1)
return H.trace("This is a valid node", t), t;
for (let n = 0; n < r.length; n++) {
const i = Yc(r[n], e);
if (i)
return H.trace("Found replacement for", t, " => ", i), i;
}
}, ch = (t) => !Le[t] || !Le[t].externalConnections ? t : Le[t] ? Le[t].id : t, Vet = (t, e) => {
if (!t || e > 10) {
H.debug("Opting out, no graph ");
return;
} else
H.debug("Opting in, graph ");
t.nodes().forEach(function(r) {
t.children(r).length > 0 && (H.warn(
"Cluster identified",
r,
" Replacement id in edges: ",
Yc(r, t)
), ei[r] = JM(r, t), Le[r] = { id: Yc(r, t), clusterData: t.node(r) });
}), t.nodes().forEach(function(r) {
const n = t.children(r), i = t.edges();
n.length > 0 ? (H.debug("Cluster identified", r, ei), i.forEach((a) => {
if (a.v !== r && a.w !== r) {
const s = $f(a.v, r), o = $f(a.w, r);
s ^ o && (H.warn("Edge: ", a, " leaves cluster ", r), H.warn("Decendants of XXX ", r, ": ", ei[r]), Le[r].externalConnections = !0);
}
})) : H.debug("Not a cluster ", r, ei);
}), t.edges().forEach(function(r) {
const n = t.edge(r);
H.warn("Edge " + r.v + " -> " + r.w + ": " + JSON.stringify(r)), H.warn("Edge " + r.v + " -> " + r.w + ": " + JSON.stringify(t.edge(r)));
let i = r.v, a = r.w;
if (H.warn(
"Fix XXX",
Le,
"ids:",
r.v,
r.w,
"Translateing: ",
Le[r.v],
" --- ",
Le[r.w]
), Le[r.v] && Le[r.w] && Le[r.v] === Le[r.w]) {
H.warn("Fixing and trixing link to self - removing XXX", r.v, r.w, r.name), H.warn("Fixing and trixing - removing XXX", r.v, r.w, r.name), i = ch(r.v), a = ch(r.w), t.removeEdge(r.v, r.w, r.name);
const s = r.w + "---" + r.v;
t.setNode(s, {
domId: s,
id: s,
labelStyle: "",
labelText: n.label,
padding: 0,
shape: "labelRect",
style: ""
});
const o = JSON.parse(JSON.stringify(n)), l = JSON.parse(JSON.stringify(n));
o.label = "", o.arrowTypeEnd = "none", l.label = "", o.fromCluster = r.v, l.toCluster = r.v, t.setEdge(i, s, o, r.name + "-cyclic-special"), t.setEdge(s, a, l, r.name + "-cyclic-special");
} else
(Le[r.v] || Le[r.w]) && (H.warn("Fixing and trixing - removing XXX", r.v, r.w, r.name), i = ch(r.v), a = ch(r.w), t.removeEdge(r.v, r.w, r.name), i !== r.v && (n.fromCluster = r.v), a !== r.w && (n.toCluster = r.w), H.warn("Fix Replacing with XXX", i, a, r.name), t.setEdge(i, a, n, r.name));
}), H.warn("Adjusted Graph", ur.json.write(t)), tL(t, 0), H.trace(Le);
}, tL = (t, e) => {
if (H.warn("extractor - ", e, ur.json.write(t), t.children("D")), e > 10) {
H.error("Bailing out");
return;
}
let r = t.nodes(), n = !1;
for (let i = 0; i < r.length; i++) {
const a = r[i], s = t.children(a);
n = n || s.length > 0;
}
if (!n) {
H.debug("Done, no node has children", t.nodes());
return;
}
H.debug("Nodes = ", r, e);
for (let i = 0; i < r.length; i++) {
const a = r[i];
if (H.debug(
"Extracting node",
a,
Le,
Le[a] && !Le[a].externalConnections,
!t.parent(a),
t.node(a),
t.children("D"),
" Depth ",
e
), !Le[a])
H.debug("Not a cluster", a, e);
else if (!Le[a].externalConnections && t.children(a) && t.children(a).length > 0) {
H.warn(
"Cluster without external connections, without a parent and with children",
a,
e
);
let o = t.graph().rankdir === "TB" ? "LR" : "TB";
Le[a] && Le[a].clusterData && Le[a].clusterData.dir && (o = Le[a].clusterData.dir, H.warn("Fixing dir", Le[a].clusterData.dir, o));
const l = new ur.Graph({
multigraph: !0,
compound: !0
}).setGraph({
rankdir: o,
nodesep: 50,
ranksep: 50,
marginx: 8,
marginy: 8
}).setDefaultEdgeLabel(function() {
return {};
});
H.warn("Old graph before copy", ur.json.write(t)), QM(a, t, l, a), t.setNode(a, {
clusterNode: !0,
id: a,
clusterData: Le[a].clusterData,
labelText: Le[a].labelText,
graph: l
}), H.warn("New graph after copy node: (", a, ")", ur.json.write(l)), H.debug("Old graph after copy", ur.json.write(t));
} else
H.warn(
"Cluster ** ",
a,
" **not meeting the criteria !externalConnections:",
!Le[a].externalConnections,
" no parent: ",
!t.parent(a),
" children ",
t.children(a) && t.children(a).length > 0,
t.children("D"),
e
), H.debug(Le);
}
r = t.nodes(), H.warn("New list of nodes", r);
for (let i = 0; i < r.length; i++) {
const a = r[i], s = t.node(a);
H.warn(" Now next level", a, s), s.clusterNode && tL(s.graph, e + 1);
}
}, eL = (t, e) => {
if (e.length === 0)
return [];
let r = Object.assign(e);
return e.forEach((n) => {
const i = t.children(n), a = eL(t, i);
r = r.concat(a);
}), r;
}, zet = (t) => eL(t, t.children());
function Yet(t, e) {
return t.intersect(e);
}
function rL(t, e, r, n) {
var i = t.x, a = t.y, s = i - n.x, o = a - n.y, l = Math.sqrt(e * e * o * o + r * r * s * s), u = Math.abs(e * r * s / l);
n.x < i && (u = -u);
var h = Math.abs(e * r * o / l);
return n.y < a && (h = -h), { x: i + u, y: a + h };
}
function Uet(t, e, r) {
return rL(t, e, e, r);
}
function Wet(t, e, r, n) {
var i, a, s, o, l, u, h, d, f, p, m, _, y, b, x;
if (i = e.y - t.y, s = t.x - e.x, l = e.x * t.y - t.x * e.y, f = i * r.x + s * r.y + l, p = i * n.x + s * n.y + l, !(f !== 0 && p !== 0 && tw(f, p)) && (a = n.y - r.y, o = r.x - n.x, u = n.x * r.y - r.x * n.y, h = a * t.x + o * t.y + u, d = a * e.x + o * e.y + u, !(h !== 0 && d !== 0 && tw(h, d)) && (m = i * o - a * s, m !== 0)))
return _ = Math.abs(m / 2), y = s * u - o * l, b = y < 0 ? (y - _) / m : (y + _) / m, y = a * l - i * u, x = y < 0 ? (y - _) / m : (y + _) / m, { x: b, y: x };
}
function tw(t, e) {
return t * e > 0;
}
function Het(t, e, r) {
var n = t.x, i = t.y, a = [], s = Number.POSITIVE_INFINITY, o = Number.POSITIVE_INFINITY;
typeof e.forEach == "function" ? e.forEach(function(m) {
s = Math.min(s, m.x), o = Math.min(o, m.y);
}) : (s = Math.min(s, e.x), o = Math.min(o, e.y));
for (var l = n - t.width / 2 - s, u = i - t.height / 2 - o, h = 0; h < e.length; h++) {
var d = e[h], f = e[h < e.length - 1 ? h + 1 : 0], p = Wet(
t,
r,
{ x: l + d.x, y: u + d.y },
{ x: l + f.x, y: u + f.y }
);
p && a.push(p);
}
return a.length ? (a.length > 1 && a.sort(function(m, _) {
var y = m.x - r.x, b = m.y - r.y, x = Math.sqrt(y * y + b * b), k = _.x - r.x, T = _.y - r.y, C = Math.sqrt(k * k + T * T);
return x < C ? -1 : x === C ? 0 : 1;
}), a[0]) : t;
}
const du = (t, e) => {
var r = t.x, n = t.y, i = e.x - r, a = e.y - n, s = t.width / 2, o = t.height / 2, l, u;
return Math.abs(a) * s > Math.abs(i) * o ? (a < 0 && (o = -o), l = a === 0 ? 0 : o * i / a, u = o) : (i < 0 && (s = -s), l = s, u = i === 0 ? 0 : s * a / i), { x: r + l, y: n + u };
}, or = {
node: Yet,
circle: Uet,
ellipse: rL,
polygon: Het,
rect: du
}, Get = (t, e) => {
const { shapeSvg: r, bbox: n, halfPadding: i } = Gr(t, e, "node " + e.classes, !0);
H.info("Classes = ", e.classes);
const a = r.insert("rect", ":first-child");
return a.attr("rx", e.rx).attr("ry", e.ry).attr("x", -n.width / 2 - i).attr("y", -n.height / 2 - i).attr("width", n.width + e.padding).attr("height", n.height + e.padding), hr(e, a), e.intersect = function(s) {
return or.rect(e, s);
}, r;
}, jet = (t, e) => {
const { shapeSvg: r, bbox: n } = Gr(t, e, void 0, !0), i = n.width + e.padding, a = n.height + e.padding, s = i + a, o = [
{ x: s / 2, y: 0 },
{ x: s, y: -s / 2 },
{ x: s / 2, y: -s },
{ x: 0, y: -s / 2 }
];
H.info("Question main (Circle)");
const l = xa(r, s, s, o);
return l.attr("style", e.style), hr(e, l), e.intersect = function(u) {
return H.warn("Intersect called"), or.polygon(e, o, u);
}, r;
}, $et = (t, e) => {
const r = t.insert("g").attr("class", "node default").attr("id", e.domId || e.id), n = 28, i = [
{ x: 0, y: n / 2 },
{ x: n / 2, y: 0 },
{ x: 0, y: -n / 2 },
{ x: -n / 2, y: 0 }
];
return r.insert("polygon", ":first-child").attr(
"points",
i.map(function(s) {
return s.x + "," + s.y;
}).join(" ")
).attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28), e.width = 28, e.height = 28, e.intersect = function(s) {
return or.circle(e, 14, s);
}, r;
}, Xet = (t, e) => {
const { shapeSvg: r, bbox: n } = Gr(t, e, void 0, !0), i = 4, a = n.height + e.padding, s = a / i, o = n.width + 2 * s + e.padding, l = [
{ x: s, y: 0 },
{ x: o - s, y: 0 },
{ x: o, y: -a / 2 },
{ x: o - s, y: -a },
{ x: s, y: -a },
{ x: 0, y: -a / 2 }
], u = xa(r, o, a, l);
return u.attr("style", e.style), hr(e, u), e.intersect = function(h) {
return or.polygon(e, l, h);
}, r;
}, Ket = (t, e) => {
const { shapeSvg: r, bbox: n } = Gr(t, e, void 0, !0), i = n.width + e.padding, a = n.height + e.padding, s = [
{ x: -a / 2, y: 0 },
{ x: i, y: 0 },
{ x: i, y: -a },
{ x: -a / 2, y: -a },
{ x: 0, y: -a / 2 }
];
return xa(r, i, a, s).attr("style", e.style), e.width = i + a, e.height = a, e.intersect = function(l) {
return or.polygon(e, s, l);
}, r;
}, Zet = (t, e) => {
const { shapeSvg: r, bbox: n } = Gr(t, e, void 0, !0), i = n.width + e.padding, a = n.height + e.padding, s = [
{ x: -2 * a / 6, y: 0 },
{ x: i - a / 6, y: 0 },
{ x: i + 2 * a / 6, y: -a },
{ x: a / 6, y: -a }
], o = xa(r, i, a, s);
return o.attr("style", e.style), hr(e, o), e.intersect = function(l) {
return or.polygon(e, s, l);
}, r;
}, Qet = (t, e) => {
const { shapeSvg: r, bbox: n } = Gr(t, e, void 0, !0), i = n.width + e.padding, a = n.height + e.padding, s = [
{ x: 2 * a / 6, y: 0 },
{ x: i + a / 6, y: 0 },
{ x: i - 2 * a / 6, y: -a },
{ x: -a / 6, y: -a }
], o = xa(r, i, a, s);
return o.attr("style", e.style), hr(e, o), e.intersect = function(l) {
return or.polygon(e, s, l);
}, r;
}, Jet = (t, e) => {
const { shapeSvg: r, bbox: n } = Gr(t, e, void 0, !0), i = n.width + e.padding, a = n.height + e.padding, s = [
{ x: -2 * a / 6, y: 0 },
{ x: i + 2 * a / 6, y: 0 },
{ x: i - a / 6, y: -a },
{ x: a / 6, y: -a }
], o = xa(r, i, a, s);
return o.attr("style", e.style), hr(e, o), e.intersect = function(l) {
return or.polygon(e, s, l);
}, r;
}, trt = (t, e) => {
const { shapeSvg: r, bbox: n } = Gr(t, e, void 0, !0), i = n.width + e.padding, a = n.height + e.padding, s = [
{ x: a / 6, y: 0 },
{ x: i - a / 6, y: 0 },
{ x: i + 2 * a / 6, y: -a },
{ x: -2 * a / 6, y: -a }
], o = xa(r, i, a, s);
return o.attr("style", e.style), hr(e, o), e.intersect = function(l) {
return or.polygon(e, s, l);
}, r;
}, ert = (t, e) => {
const { shapeSvg: r, bbox: n } = Gr(t, e, void 0, !0), i = n.width + e.padding, a = n.height + e.padding, s = [
{ x: 0, y: 0 },
{ x: i + a / 2, y: 0 },
{ x: i, y: -a / 2 },
{ x: i + a / 2, y: -a },
{ x: 0, y: -a }
], o = xa(r, i, a, s);
return o.attr("style", e.style), hr(e, o), e.intersect = function(l) {
return or.polygon(e, s, l);
}, r;
}, rrt = (t, e) => {
const { shapeSvg: r, bbox: n } = Gr(t, e, void 0, !0), i = n.width + e.padding, a = i / 2, s = a / (2.5 + i / 50), o = n.height + s + e.padding, l = "M 0," + s + " a " + a + "," + s + " 0,0,0 " + i + " 0 a " + a + "," + s + " 0,0,0 " + -i + " 0 l 0," + o + " a " + a + "," + s + " 0,0,0 " + i + " 0 l 0," + -o, u = r.attr("label-offset-y", s).insert("path", ":first-child").attr("style", e.style).attr("d", l).attr("transform", "translate(" + -i / 2 + "," + -(o / 2 + s) + ")");
return hr(e, u), e.intersect = function(h) {
const d = or.rect(e, h), f = d.x - e.x;
if (a != 0 && (Math.abs(f) < e.width / 2 || Math.abs(f) == e.width / 2 && Math.abs(d.y - e.y) > e.height / 2 - s)) {
let p = s * s * (1 - f * f / (a * a));
p != 0 && (p = Math.sqrt(p)), p = s - p, h.y - e.y > 0 && (p = -p), d.y += p;
}
return d;
}, r;
}, nrt = (t, e) => {
const { shapeSvg: r, bbox: n, halfPadding: i } = Gr(t, e, "node " + e.classes, !0);
H.trace("Classes = ", e.classes);
const a = r.insert("rect", ":first-child"), s = n.width + e.padding, o = n.height + e.padding;
if (a.attr("class", "basic label-container").attr("style", e.style).attr("rx", e.rx).attr("ry", e.ry).attr("x", -n.width / 2 - i).attr("y", -n.height / 2 - i).attr("width", s).attr("height", o), e.props) {
const l = new Set(Object.keys(e.props));
e.props.borders && (nL(a, e.props.borders, s, o), l.delete("borders")), l.forEach((u) => {
H.warn(`Unknown node property ${u}`);
});
}
return hr(e, a), e.intersect = function(l) {
return or.rect(e, l);
}, r;
}, irt = (t, e) => {
const { shapeSvg: r } = Gr(t, e, "label", !0);
H.trace("Classes = ", e.classes);
const n = r.insert("rect", ":first-child"), i = 0, a = 0;
if (n.attr("width", i).attr("height", a), r.attr("class", "label edgeLabel"), e.props) {
const s = new Set(Object.keys(e.props));
e.props.borders && (nL(n, e.props.borders, i, a), s.delete("borders")), s.forEach((o) => {
H.warn(`Unknown node property ${o}`);
});
}
return hr(e, n), e.intersect = function(s) {
return or.rect(e, s);
}, r;
};
function nL(t, e, r, n) {
const i = [], a = (o) => {
i.push(o), i.push(0);
}, s = (o) => {
i.push(0), i.push(o);
};
e.includes("t") ? (H.debug("add top border"), a(r)) : s(r), e.includes("r") ? (H.debug("add right border"), a(n)) : s(n), e.includes("b") ? (H.debug("add bottom border"), a(r)) : s(r), e.includes("l") ? (H.debug("add left border"), a(n)) : s(n), t.attr("stroke-dasharray", i.join(" "));
}
const art = (t, e) => {
let r;
e.classes ? r = "node " + e.classes : r = "node default";
const n = t.insert("g").attr("class", r).attr("id", e.domId || e.id), i = n.insert("rect", ":first-child"), a = n.insert("line"), s = n.insert("g").attr("class", "label"), o = e.labelText.flat ? e.labelText.flat() : e.labelText;
let l = "";
typeof o == "object" ? l = o[0] : l = o, H.info("Label text abc79", l, o, typeof o == "object");
const u = s.node().appendChild(yn(l, e.labelStyle, !0, !0));
let h = { width: 0, height: 0 };
if (Mr(nt().flowchart.htmlLabels)) {
const _ = u.children[0], y = St(u);
h = _.getBoundingClientRect(), y.attr("width", h.width), y.attr("height", h.height);
}
H.info("Text 2", o);
const d = o.slice(1, o.length);
let f = u.getBBox();
const p = s.node().appendChild(
yn(d.join ? d.join("
") : d, e.labelStyle, !0, !0)
);
if (Mr(nt().flowchart.htmlLabels)) {
const _ = p.children[0], y = St(p);
h = _.getBoundingClientRect(), y.attr("width", h.width), y.attr("height", h.height);
}
const m = e.padding / 2;
return St(p).attr(
"transform",
"translate( " + (h.width > f.width ? 0 : (f.width - h.width) / 2) + ", " + (f.height + m + 5) + ")"
), St(u).attr(
"transform",
"translate( " + (h.width < f.width ? 0 : -(f.width - h.width) / 2) + ", " + 0 + ")"
), h = s.node().getBBox(), s.attr(
"transform",
"translate(" + -h.width / 2 + ", " + (-h.height / 2 - m + 3) + ")"
), i.attr("class", "outer title-state").attr("x", -h.width / 2 - m).attr("y", -h.height / 2 - m).attr("width", h.width + e.padding).attr("height", h.height + e.padding), a.attr("class", "divider").attr("x1", -h.width / 2 - m).attr("x2", h.width / 2 + m).attr("y1", -h.height / 2 - m + f.height + m).attr("y2", -h.height / 2 - m + f.height + m), hr(e, i), e.intersect = function(_) {
return or.rect(e, _);
}, n;
}, srt = (t, e) => {
const { shapeSvg: r, bbox: n } = Gr(t, e, void 0, !0), i = n.height + e.padding, a = n.width + i / 4 + e.padding, s = r.insert("rect", ":first-child").attr("style", e.style).attr("rx", i / 2).attr("ry", i / 2).attr("x", -a / 2).attr("y", -i / 2).attr("width", a).attr("height", i);
return hr(e, s), e.intersect = function(o) {
return or.rect(e, o);
}, r;
}, ort = (t, e) => {
const { shapeSvg: r, bbox: n, halfPadding: i } = Gr(t, e, void 0, !0), a = r.insert("circle", ":first-child");
return a.attr("style", e.style).attr("rx", e.rx).attr("ry", e.ry).attr("r", n.width / 2 + i).attr("width", n.width + e.padding).attr("height", n.height + e.padding), H.info("Circle main"), hr(e, a), e.intersect = function(s) {
return H.info("Circle intersect", e, n.width / 2 + i, s), or.circle(e, n.width / 2 + i, s);
}, r;
}, lrt = (t, e) => {
const { shapeSvg: r, bbox: n, halfPadding: i } = Gr(t, e, void 0, !0), a = 5, s = r.insert("g", ":first-child"), o = s.insert("circle"), l = s.insert("circle");
return o.attr("style", e.style).attr("rx", e.rx).attr("ry", e.ry).attr("r", n.width / 2 + i + a).attr("width", n.width + e.padding + a * 2).attr("height", n.height + e.padding + a * 2), l.attr("style", e.style).attr("rx", e.rx).attr("ry", e.ry).attr("r", n.width / 2 + i).attr("width", n.width + e.padding).attr("height", n.height + e.padding), H.info("DoubleCircle main"), hr(e, o), e.intersect = function(u) {
return H.info("DoubleCircle intersect", e, n.width / 2 + i + a, u), or.circle(e, n.width / 2 + i + a, u);
}, r;
}, crt = (t, e) => {
const { shapeSvg: r, bbox: n } = Gr(t, e, void 0, !0), i = n.width + e.padding, a = n.height + e.padding, s = [
{ x: 0, y: 0 },
{ x: i, y: 0 },
{ x: i, y: -a },
{ x: 0, y: -a },
{ x: 0, y: 0 },
{ x: -8, y: 0 },
{ x: i + 8, y: 0 },
{ x: i + 8, y: -a },
{ x: -8, y: -a },
{ x: -8, y: 0 }
], o = xa(r, i, a, s);
return o.attr("style", e.style), hr(e, o), e.intersect = function(l) {
return or.polygon(e, s, l);
}, r;
}, urt = (t, e) => {
const r = t.insert("g").attr("class", "node default").attr("id", e.domId || e.id), n = r.insert("circle", ":first-child");
return n.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), hr(e, n), e.intersect = function(i) {
return or.circle(e, 7, i);
}, r;
}, ew = (t, e, r) => {
const n = t.insert("g").attr("class", "node default").attr("id", e.domId || e.id);
let i = 70, a = 10;
r === "LR" && (i = 10, a = 70);
const s = n.append("rect").attr("x", -1 * i / 2).attr("y", -1 * a / 2).attr("width", i).attr("height", a).attr("class", "fork-join");
return hr(e, s), e.height = e.height + e.padding / 2, e.width = e.width + e.padding / 2, e.intersect = function(o) {
return or.rect(e, o);
}, n;
}, hrt = (t, e) => {
const r = t.insert("g").attr("class", "node default").attr("id", e.domId || e.id), n = r.insert("circle", ":first-child"), i = r.insert("circle", ":first-child");
return i.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), n.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10), hr(e, i), e.intersect = function(a) {
return or.circle(e, 7, a);
}, r;
}, frt = (t, e) => {
const r = e.padding / 2, n = 4, i = 8;
let a;
e.classes ? a = "node " + e.classes : a = "node default";
const s = t.insert("g").attr("class", a).attr("id", e.domId || e.id), o = s.insert("rect", ":first-child"), l = s.insert("line"), u = s.insert("line");
let h = 0, d = n;
const f = s.insert("g").attr("class", "label");
let p = 0;
const m = e.classData.annotations && e.classData.annotations[0], _ = e.classData.annotations[0] ? "\xAB" + e.classData.annotations[0] + "\xBB" : "", y = f.node().appendChild(yn(_, e.labelStyle, !0, !0));
let b = y.getBBox();
if (Mr(nt().flowchart.htmlLabels)) {
const R = y.children[0], A = St(y);
b = R.getBoundingClientRect(), A.attr("width", b.width), A.attr("height", b.height);
}
e.classData.annotations[0] && (d += b.height + n, h += b.width);
let x = e.classData.id;
e.classData.type !== void 0 && e.classData.type !== "" && (nt().flowchart.htmlLabels ? x += "<" + e.classData.type + ">" : x += "<" + e.classData.type + ">");
const k = f.node().appendChild(yn(x, e.labelStyle, !0, !0));
St(k).attr("class", "classTitle");
let T = k.getBBox();
if (Mr(nt().flowchart.htmlLabels)) {
const R = k.children[0], A = St(k);
T = R.getBoundingClientRect(), A.attr("width", T.width), A.attr("height", T.height);
}
d += T.height + n, T.width > h && (h = T.width);
const C = [];
e.classData.members.forEach((R) => {
const A = jf(R);
let L = A.displayText;
nt().flowchart.htmlLabels && (L = L.replace(//g, ">"));
const v = f.node().appendChild(
yn(
L,
A.cssStyle ? A.cssStyle : e.labelStyle,
!0,
!0
)
);
let B = v.getBBox();
if (Mr(nt().flowchart.htmlLabels)) {
const w = v.children[0], D = St(v);
B = w.getBoundingClientRect(), D.attr("width", B.width), D.attr("height", B.height);
}
B.width > h && (h = B.width), d += B.height + n, C.push(v);
}), d += i;
const M = [];
if (e.classData.methods.forEach((R) => {
const A = jf(R);
let L = A.displayText;
nt().flowchart.htmlLabels && (L = L.replace(//g, ">"));
const v = f.node().appendChild(
yn(
L,
A.cssStyle ? A.cssStyle : e.labelStyle,
!0,
!0
)
);
let B = v.getBBox();
if (Mr(nt().flowchart.htmlLabels)) {
const w = v.children[0], D = St(v);
B = w.getBoundingClientRect(), D.attr("width", B.width), D.attr("height", B.height);
}
B.width > h && (h = B.width), d += B.height + n, M.push(v);
}), d += i, m) {
let R = (h - b.width) / 2;
St(y).attr(
"transform",
"translate( " + (-1 * h / 2 + R) + ", " + -1 * d / 2 + ")"
), p = b.height + n;
}
let S = (h - T.width) / 2;
return St(k).attr(
"transform",
"translate( " + (-1 * h / 2 + S) + ", " + (-1 * d / 2 + p) + ")"
), p += T.height + n, l.attr("class", "divider").attr("x1", -h / 2 - r).attr("x2", h / 2 + r).attr("y1", -d / 2 - r + i + p).attr("y2", -d / 2 - r + i + p), p += i, C.forEach((R) => {
St(R).attr(
"transform",
"translate( " + -h / 2 + ", " + (-1 * d / 2 + p + i / 2) + ")"
), p += T.height + n;
}), p += i, u.attr("class", "divider").attr("x1", -h / 2 - r).attr("x2", h / 2 + r).attr("y1", -d / 2 - r + i + p).attr("y2", -d / 2 - r + i + p), p += i, M.forEach((R) => {
St(R).attr(
"transform",
"translate( " + -h / 2 + ", " + (-1 * d / 2 + p) + ")"
), p += T.height + n;
}), o.attr("class", "outer title-state").attr("x", -h / 2 - r).attr("y", -(d / 2) - r).attr("width", h + e.padding).attr("height", d + e.padding), hr(e, o), e.intersect = function(R) {
return or.rect(e, R);
}, s;
}, rw = {
question: jet,
rect: nrt,
labelRect: irt,
rectWithTitle: art,
choice: $et,
circle: ort,
doublecircle: lrt,
stadium: srt,
hexagon: Xet,
rect_left_inv_arrow: Ket,
lean_right: Zet,
lean_left: Qet,
trapezoid: Jet,
inv_trapezoid: trt,
rect_right_inv_arrow: ert,
cylinder: rrt,
start: urt,
end: hrt,
note: Get,
subroutine: crt,
fork: ew,
join: ew,
class_box: frt
};
let Ao = {};
const drt = (t, e, r) => {
let n, i;
if (e.link) {
let a;
nt().securityLevel === "sandbox" ? a = "_top" : e.linkTarget && (a = e.linkTarget || "_blank"), n = t.insert("svg:a").attr("xlink:href", e.link).attr("target", a), i = rw[e.shape](n, e, r);
} else
i = rw[e.shape](t, e, r), n = i;
e.tooltip && i.attr("title", e.tooltip), e.class && i.attr("class", "node default " + e.class), Ao[e.id] = n, e.haveCallback && Ao[e.id].attr("class", Ao[e.id].attr("class") + " clickable");
}, prt = (t, e) => {
Ao[e.id] = t;
}, grt = () => {
Ao = {};
}, nw = (t) => {
const e = Ao[t.id];
H.trace(
"Transforming node",
t.diff,
t,
"translate(" + (t.x - t.width / 2 - 5) + ", " + t.width / 2 + ")"
);
const r = 8, n = t.diff || 0;
return t.clusterNode ? e.attr(
"transform",
"translate(" + (t.x + n - t.width / 2) + ", " + (t.y - t.height / 2 - r) + ")"
) : e.attr("transform", "translate(" + t.x + ", " + t.y + ")"), n;
}, yrt = (t, e) => {
H.trace("Creating subgraph rect for ", e.id, e);
const r = t.insert("g").attr("class", "cluster" + (e.class ? " " + e.class : "")).attr("id", e.id), n = r.insert("rect", ":first-child"), i = r.insert("g").attr("class", "cluster-label"), a = i.node().appendChild(yn(e.labelText, e.labelStyle, void 0, !0));
let s = a.getBBox();
if (Mr(nt().flowchart.htmlLabels)) {
const d = a.children[0], f = St(a);
s = d.getBoundingClientRect(), f.attr("width", s.width), f.attr("height", s.height);
}
const o = 0 * e.padding, l = o / 2, u = e.width <= s.width + o ? s.width + o : e.width;
e.width <= s.width + o ? e.diff = (s.width - e.width) / 2 - e.padding / 2 : e.diff = -e.padding / 2, H.trace("Data ", e, JSON.stringify(e)), n.attr("style", e.style).attr("rx", e.rx).attr("ry", e.ry).attr("x", e.x - u / 2).attr("y", e.y - e.height / 2 - l).attr("width", u).attr("height", e.height + o), i.attr(
"transform",
"translate(" + (e.x - s.width / 2) + ", " + (e.y - e.height / 2 + e.padding / 3) + ")"
);
const h = n.node().getBBox();
return e.width = h.width, e.height = h.height, e.intersect = function(d) {
return du(e, d);
}, r;
}, mrt = (t, e) => {
const r = t.insert("g").attr("class", "note-cluster").attr("id", e.id), n = r.insert("rect", ":first-child"), i = 0 * e.padding, a = i / 2;
n.attr("rx", e.rx).attr("ry", e.ry).attr("x", e.x - e.width / 2 - a).attr("y", e.y - e.height / 2 - a).attr("width", e.width + i).attr("height", e.height + i).attr("fill", "none");
const s = n.node().getBBox();
return e.width = s.width, e.height = s.height, e.intersect = function(o) {
return du(e, o);
}, r;
}, brt = (t, e) => {
const r = t.insert("g").attr("class", e.classes).attr("id", e.id), n = r.insert("rect", ":first-child"), i = r.insert("g").attr("class", "cluster-label"), a = r.append("rect"), s = i.node().appendChild(yn(e.labelText, e.labelStyle, void 0, !0));
let o = s.getBBox();
if (Mr(nt().flowchart.htmlLabels)) {
const f = s.children[0], p = St(s);
o = f.getBoundingClientRect(), p.attr("width", o.width), p.attr("height", o.height);
}
o = s.getBBox();
const l = 0 * e.padding, u = l / 2, h = e.width <= o.width + e.padding ? o.width + e.padding : e.width;
e.width <= o.width + e.padding ? e.diff = (o.width + e.padding * 0 - e.width) / 2 : e.diff = -e.padding / 2, n.attr("class", "outer").attr("x", e.x - h / 2 - u).attr("y", e.y - e.height / 2 - u).attr("width", h + l).attr("height", e.height + l), a.attr("class", "inner").attr("x", e.x - h / 2 - u).attr("y", e.y - e.height / 2 - u + o.height - 1).attr("width", h + l).attr("height", e.height + l - o.height - 3), i.attr(
"transform",
"translate(" + (e.x - o.width / 2) + ", " + (e.y - e.height / 2 - e.padding / 3 + (Mr(nt().flowchart.htmlLabels) ? 5 : 3)) + ")"
);
const d = n.node().getBBox();
return e.height = d.height, e.intersect = function(f) {
return du(e, f);
}, r;
}, _rt = (t, e) => {
const r = t.insert("g").attr("class", e.classes).attr("id", e.id), n = r.insert("rect", ":first-child"), i = 0 * e.padding, a = i / 2;
n.attr("class", "divider").attr("x", e.x - e.width / 2 - a).attr("y", e.y - e.height / 2).attr("width", e.width + i).attr("height", e.height + i);
const s = n.node().getBBox();
return e.width = s.width, e.height = s.height, e.diff = -e.padding / 2, e.intersect = function(o) {
return du(e, o);
}, r;
}, vrt = { rect: yrt, roundedWithTitle: brt, noteGroup: mrt, divider: _rt };
let iL = {};
const xrt = (t, e) => {
H.trace("Inserting cluster");
const r = e.shape || "rect";
iL[e.id] = vrt[r](t, e);
}, krt = () => {
iL = {};
};
let Xf = {}, Br = {};
const wrt = () => {
Xf = {}, Br = {};
}, Trt = (t, e) => {
const r = yn(e.label, e.labelStyle), n = t.insert("g").attr("class", "edgeLabel"), i = n.insert("g").attr("class", "label");
i.node().appendChild(r);
let a = r.getBBox();
if (Mr(nt().flowchart.htmlLabels)) {
const o = r.children[0], l = St(r);
a = o.getBoundingClientRect(), l.attr("width", a.width), l.attr("height", a.height);
}
i.attr("transform", "translate(" + -a.width / 2 + ", " + -a.height / 2 + ")"), Xf[e.id] = n, e.width = a.width, e.height = a.height;
let s;
if (e.startLabelLeft) {
const o = yn(e.startLabelLeft, e.labelStyle), l = t.insert("g").attr("class", "edgeTerminals"), u = l.insert("g").attr("class", "inner");
s = u.node().appendChild(o);
const h = o.getBBox();
u.attr("transform", "translate(" + -h.width / 2 + ", " + -h.height / 2 + ")"), Br[e.id] || (Br[e.id] = {}), Br[e.id].startLeft = l, uh(s, e.startLabelLeft);
}
if (e.startLabelRight) {
const o = yn(e.startLabelRight, e.labelStyle), l = t.insert("g").attr("class", "edgeTerminals"), u = l.insert("g").attr("class", "inner");
s = l.node().appendChild(o), u.node().appendChild(o);
const h = o.getBBox();
u.attr("transform", "translate(" + -h.width / 2 + ", " + -h.height / 2 + ")"), Br[e.id] || (Br[e.id] = {}), Br[e.id].startRight = l, uh(s, e.startLabelRight);
}
if (e.endLabelLeft) {
const o = yn(e.endLabelLeft, e.labelStyle), l = t.insert("g").attr("class", "edgeTerminals"), u = l.insert("g").attr("class", "inner");
s = u.node().appendChild(o);
const h = o.getBBox();
u.attr("transform", "translate(" + -h.width / 2 + ", " + -h.height / 2 + ")"), l.node().appendChild(o), Br[e.id] || (Br[e.id] = {}), Br[e.id].endLeft = l, uh(s, e.endLabelLeft);
}
if (e.endLabelRight) {
const o = yn(e.endLabelRight, e.labelStyle), l = t.insert("g").attr("class", "edgeTerminals"), u = l.insert("g").attr("class", "inner");
s = u.node().appendChild(o);
const h = o.getBBox();
u.attr("transform", "translate(" + -h.width / 2 + ", " + -h.height / 2 + ")"), l.node().appendChild(o), Br[e.id] || (Br[e.id] = {}), Br[e.id].endRight = l, uh(s, e.endLabelRight);
}
};
function uh(t, e) {
nt().flowchart.htmlLabels && t && (t.style.width = e.length * 9 + "px", t.style.height = "12px");
}
const Ert = (t, e) => {
H.info("Moving label abc78 ", t.id, t.label, Xf[t.id]);
let r = e.updatedPath ? e.updatedPath : e.originalPath;
if (t.label) {
const n = Xf[t.id];
let i = t.x, a = t.y;
if (r) {
const s = Re.calcLabelPosition(r);
H.info("Moving label from (", i, ",", a, ") to (", s.x, ",", s.y, ") abc78");
}
n.attr("transform", "translate(" + i + ", " + a + ")");
}
if (t.startLabelLeft) {
const n = Br[t.id].startLeft;
let i = t.x, a = t.y;
if (r) {
const s = Re.calcTerminalLabelPosition(t.arrowTypeStart ? 10 : 0, "start_left", r);
i = s.x, a = s.y;
}
n.attr("transform", "translate(" + i + ", " + a + ")");
}
if (t.startLabelRight) {
const n = Br[t.id].startRight;
let i = t.x, a = t.y;
if (r) {
const s = Re.calcTerminalLabelPosition(
t.arrowTypeStart ? 10 : 0,
"start_right",
r
);
i = s.x, a = s.y;
}
n.attr("transform", "translate(" + i + ", " + a + ")");
}
if (t.endLabelLeft) {
const n = Br[t.id].endLeft;
let i = t.x, a = t.y;
if (r) {
const s = Re.calcTerminalLabelPosition(t.arrowTypeEnd ? 10 : 0, "end_left", r);
i = s.x, a = s.y;
}
n.attr("transform", "translate(" + i + ", " + a + ")");
}
if (t.endLabelRight) {
const n = Br[t.id].endRight;
let i = t.x, a = t.y;
if (r) {
const s = Re.calcTerminalLabelPosition(t.arrowTypeEnd ? 10 : 0, "end_right", r);
i = s.x, a = s.y;
}
n.attr("transform", "translate(" + i + ", " + a + ")");
}
}, Crt = (t, e) => {
const r = t.x, n = t.y, i = Math.abs(e.x - r), a = Math.abs(e.y - n), s = t.width / 2, o = t.height / 2;
return i >= s || a >= o;
}, Srt = (t, e, r) => {
H.warn(`intersection calc abc89:
outsidePoint: ${JSON.stringify(e)}
insidePoint : ${JSON.stringify(r)}
node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);
const n = t.x, i = t.y, a = Math.abs(n - r.x), s = t.width / 2;
let o = r.x < e.x ? s - a : s + a;
const l = t.height / 2, u = Math.abs(e.y - r.y), h = Math.abs(e.x - r.x);
if (Math.abs(i - e.y) * s > Math.abs(n - e.x) * l) {
let d = r.y < e.y ? e.y - l - i : i - l - e.y;
o = h * d / u;
const f = {
x: r.x < e.x ? r.x + o : r.x - h + o,
y: r.y < e.y ? r.y + u - d : r.y - u + d
};
return o === 0 && (f.x = e.x, f.y = e.y), h === 0 && (f.x = e.x), u === 0 && (f.y = e.y), H.warn(`abc89 topp/bott calc, Q ${u}, q ${d}, R ${h}, r ${o}`, f), f;
} else {
r.x < e.x ? o = e.x - s - n : o = n - s - e.x;
let d = u * o / h, f = r.x < e.x ? r.x + h - o : r.x - h + o, p = r.y < e.y ? r.y + d : r.y - d;
return H.warn(`sides calc abc89, Q ${u}, q ${d}, R ${h}, r ${o}`, { _x: f, _y: p }), o === 0 && (f = e.x, p = e.y), h === 0 && (f = e.x), u === 0 && (p = e.y), { x: f, y: p };
}
}, iw = (t, e) => {
H.warn("abc88 cutPathAtIntersect", t, e);
let r = [], n = t[0], i = !1;
return t.forEach((a) => {
if (H.info("abc88 checking point", a, e), !Crt(e, a) && !i) {
const s = Srt(e, n, a);
H.warn("abc88 inside", a, n, s), H.warn("abc88 intersection", s);
let o = !1;
r.forEach((l) => {
o = o || l.x === s.x && l.y === s.y;
}), r.find((l) => l.x === s.x && l.y === s.y) ? H.warn("abc88 no intersect", s, r) : r.push(s), i = !0;
} else
H.warn("abc88 outside", a, n), n = a, i || r.push(a);
}), H.warn("abc88 returning points", r), r;
}, Art = function(t, e, r, n, i, a) {
let s = r.points, o = !1;
const l = a.node(e.v);
var u = a.node(e.w);
H.info("abc88 InsertEdge: ", r), u.intersect && l.intersect && (s = s.slice(1, r.points.length - 1), s.unshift(l.intersect(s[0])), H.info(
"Last point",
s[s.length - 1],
u,
u.intersect(s[s.length - 1])
), s.push(u.intersect(s[s.length - 1]))), r.toCluster && (H.info("to cluster abc88", n[r.toCluster]), s = iw(r.points, n[r.toCluster].node), o = !0), r.fromCluster && (H.info("from cluster abc88", n[r.fromCluster]), s = iw(s.reverse(), n[r.fromCluster].node).reverse(), o = !0);
const h = s.filter((b) => !Number.isNaN(b.y));
let d;
i === "graph" || i === "flowchart" ? d = r.curve || Ps : d = Ps;
const f = ns().x(function(b) {
return b.x;
}).y(function(b) {
return b.y;
}).curve(d);
let p;
switch (r.thickness) {
case "normal":
p = "edge-thickness-normal";
break;
case "thick":
p = "edge-thickness-thick";
break;
case "invisible":
p = "edge-thickness-thick";
break;
default:
p = "";
}
switch (r.pattern) {
case "solid":
p += " edge-pattern-solid";
break;
case "dotted":
p += " edge-pattern-dotted";
break;
case "dashed":
p += " edge-pattern-dashed";
break;
}
const m = t.append("path").attr("d", f(h)).attr("id", r.id).attr("class", " " + p + (r.classes ? " " + r.classes : "")).attr("style", r.style);
let _ = "";
switch ((nt().flowchart.arrowMarkerAbsolute || nt().state.arrowMarkerAbsolute) && (_ = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, _ = _.replace(/\(/g, "\\("), _ = _.replace(/\)/g, "\\)")), H.info("arrowTypeStart", r.arrowTypeStart), H.info("arrowTypeEnd", r.arrowTypeEnd), r.arrowTypeStart) {
case "arrow_cross":
m.attr("marker-start", "url(" + _ + "#" + i + "-crossStart)");
break;
case "arrow_point":
m.attr("marker-start", "url(" + _ + "#" + i + "-pointStart)");
break;
case "arrow_barb":
m.attr("marker-start", "url(" + _ + "#" + i + "-barbStart)");
break;
case "arrow_circle":
m.attr("marker-start", "url(" + _ + "#" + i + "-circleStart)");
break;
case "aggregation":
m.attr("marker-start", "url(" + _ + "#" + i + "-aggregationStart)");
break;
case "extension":
m.attr("marker-start", "url(" + _ + "#" + i + "-extensionStart)");
break;
case "composition":
m.attr("marker-start", "url(" + _ + "#" + i + "-compositionStart)");
break;
case "dependency":
m.attr("marker-start", "url(" + _ + "#" + i + "-dependencyStart)");
break;
case "lollipop":
m.attr("marker-start", "url(" + _ + "#" + i + "-lollipopStart)");
break;
}
switch (r.arrowTypeEnd) {
case "arrow_cross":
m.attr("marker-end", "url(" + _ + "#" + i + "-crossEnd)");
break;
case "arrow_point":
m.attr("marker-end", "url(" + _ + "#" + i + "-pointEnd)");
break;
case "arrow_barb":
m.attr("marker-end", "url(" + _ + "#" + i + "-barbEnd)");
break;
case "arrow_circle":
m.attr("marker-end", "url(" + _ + "#" + i + "-circleEnd)");
break;
case "aggregation":
m.attr("marker-end", "url(" + _ + "#" + i + "-aggregationEnd)");
break;
case "extension":
m.attr("marker-end", "url(" + _ + "#" + i + "-extensionEnd)");
break;
case "composition":
m.attr("marker-end", "url(" + _ + "#" + i + "-compositionEnd)");
break;
case "dependency":
m.attr("marker-end", "url(" + _ + "#" + i + "-dependencyEnd)");
break;
case "lollipop":
m.attr("marker-end", "url(" + _ + "#" + i + "-lollipopEnd)");
break;
}
let y = {};
return o && (y.updatedPath = s), y.originalPath = r.points, y;
}, aL = (t, e, r, n) => {
H.info("Graph in recursive render: XXX", ur.json.write(e), n);
const i = e.graph().rankdir;
H.trace("Dir in recursive render - dir:", i);
const a = t.insert("g").attr("class", "root");
e.nodes() ? H.info("Recursive render XXX", e.nodes()) : H.info("No nodes found for", e), e.edges().length > 0 && H.trace("Recursive edges", e.edge(e.edges()[0]));
const s = a.insert("g").attr("class", "clusters"), o = a.insert("g").attr("class", "edgePaths"), l = a.insert("g").attr("class", "edgeLabels"), u = a.insert("g").attr("class", "nodes");
e.nodes().forEach(function(d) {
const f = e.node(d);
if (typeof n < "u") {
const p = JSON.parse(JSON.stringify(n.clusterData));
H.info("Setting data for cluster XXX (", d, ") ", p, n), e.setNode(n.id, p), e.parent(d) || (H.trace("Setting parent", d, n.id), e.setParent(d, n.id, p));
}
if (H.info("(Insert) Node XXX" + d + ": " + JSON.stringify(e.node(d))), f && f.clusterNode) {
H.info("Cluster identified", d, f.width, e.node(d));
const p = aL(u, f.graph, r, e.node(d)), m = p.elem;
hr(f, m), f.diff = p.diff || 0, H.info("Node bounds (abc123)", d, f, f.width, f.x, f.y), prt(m, f), H.warn("Recursive render complete ", m, f);
} else
e.children(d).length > 0 ? (H.info("Cluster - the non recursive path XXX", d, f.id, f, e), H.info(Yc(f.id, e)), Le[f.id] = { id: Yc(f.id, e), node: f }) : (H.info("Node - the non recursive path", d, f.id, f), drt(u, e.node(d), i));
}), e.edges().forEach(function(d) {
const f = e.edge(d.v, d.w, d.name);
H.info("Edge " + d.v + " -> " + d.w + ": " + JSON.stringify(d)), H.info("Edge " + d.v + " -> " + d.w + ": ", d, " ", JSON.stringify(e.edge(d))), H.info("Fix", Le, "ids:", d.v, d.w, "Translateing: ", Le[d.v], Le[d.w]), Trt(l, f);
}), e.edges().forEach(function(d) {
H.info("Edge " + d.v + " -> " + d.w + ": " + JSON.stringify(d));
}), H.info("#############################################"), H.info("### Layout ###"), H.info("#############################################"), H.info(e), fu.layout(e), H.info("Graph after layout:", ur.json.write(e));
let h = 0;
return zet(e).forEach(function(d) {
const f = e.node(d);
H.info("Position " + d + ": " + JSON.stringify(e.node(d))), H.info(
"Position " + d + ": (" + f.x,
"," + f.y,
") width: ",
f.width,
" height: ",
f.height
), f && f.clusterNode ? nw(f) : e.children(d).length > 0 ? (xrt(s, f), Le[f.id].node = f) : nw(f);
}), e.edges().forEach(function(d) {
const f = e.edge(d);
H.info("Edge " + d.v + " -> " + d.w + ": " + JSON.stringify(f), f);
const p = Art(o, d, f, Le, r, e);
Ert(f, p);
}), e.nodes().forEach(function(d) {
const f = e.node(d);
H.info(d, f.type, f.diff), f.type === "group" && (h = f.diff);
}), { elem: a, diff: h };
}, n_ = (t, e, r, n, i) => {
Tet(t, r, n, i), grt(), wrt(), krt(), Pet(), H.warn("Graph at first:", ur.json.write(e)), Vet(e), H.warn("Graph after:", ur.json.write(e)), aL(t, e, n);
}, Mrt = (t) => pe.sanitizeText(t, nt()), Lrt = function(t, e, r, n) {
const i = Object.keys(t);
H.info("keys:", i), H.info(t), i.forEach(function(a) {
const s = t[a];
let o = "";
s.cssClasses.length > 0 && (o = o + " " + s.cssClasses.join(" "));
const l = { labelStyle: "" };
let u = s.text !== void 0 ? s.text : s.id, h = 0, d = "";
switch (s.type) {
case "class":
d = "class_box";
break;
default:
d = "class_box";
}
e.setNode(s.id, {
labelStyle: l.labelStyle,
shape: d,
labelText: Mrt(u),
classData: s,
rx: h,
ry: h,
class: o,
style: l.style,
id: s.id,
domId: s.domId,
tooltip: n.db.getTooltip(s.id) || "",
haveCallback: s.haveCallback,
link: s.link,
width: s.type === "group" ? 500 : void 0,
type: s.type,
padding: nt().flowchart.padding
}), H.info("setNode", {
labelStyle: l.labelStyle,
shape: d,
labelText: u,
rx: h,
ry: h,
class: o,
style: l.style,
id: s.id,
width: s.type === "group" ? 500 : void 0,
type: s.type,
padding: nt().flowchart.padding
});
});
}, Rrt = function(t, e) {
const r = nt().flowchart;
let n = 0;
t.forEach(function(i) {
n++;
const a = {};
a.classes = "relation", a.pattern = i.relation.lineType == 1 ? "dashed" : "solid", a.id = "id" + n, i.type === "arrow_open" ? a.arrowhead = "none" : a.arrowhead = "normal", H.info(a, i), a.startLabelRight = i.relationTitle1 === "none" ? "" : i.relationTitle1, a.endLabelLeft = i.relationTitle2 === "none" ? "" : i.relationTitle2, a.arrowTypeStart = aw(i.relation.type1), a.arrowTypeEnd = aw(i.relation.type2);
let s = "", o = "";
if (typeof i.style < "u") {
const l = Ka(i.style);
s = l.style, o = l.labelStyle;
} else
s = "fill:none";
a.style = s, a.labelStyle = o, typeof i.interpolate < "u" ? a.curve = Ri(i.interpolate, bn) : typeof t.defaultInterpolate < "u" ? a.curve = Ri(t.defaultInterpolate, bn) : a.curve = Ri(r.curve, bn), i.text = i.title, typeof i.text > "u" ? typeof i.style < "u" && (a.arrowheadStyle = "fill: #333") : (a.arrowheadStyle = "fill: #333", a.labelpos = "c", nt().flowchart.htmlLabels ? (a.labelType = "html", a.label = '' + i.text + "") : (a.labelType = "text", a.label = i.text.replace(pe.lineBreakRegex, `
`), typeof i.style > "u" && (a.style = a.style || "stroke: #333; stroke-width: 1.5px;fill:none"), a.labelStyle = a.labelStyle.replace("color:", "fill:"))), e.setEdge(i.id1, i.id2, a, n);
});
}, Irt = function(t) {
Object.keys(t).forEach(function(r) {
t[r];
});
}, Nrt = function(t, e, r, n) {
H.info("Drawing class - ", e);
const i = nt().flowchart, a = nt().securityLevel;
H.info("config:", i);
const s = i.nodeSpacing || 50, o = i.rankSpacing || 50, l = new ur.Graph({
multigraph: !0,
compound: !0
}).setGraph({
rankdir: n.db.getDirection(),
nodesep: s,
ranksep: o,
marginx: 8,
marginy: 8
}).setDefaultEdgeLabel(function() {
return {};
}), u = n.db.getClasses(), h = n.db.getRelations();
H.info(h), Lrt(u, l, e, n), Rrt(h, l);
let d;
a === "sandbox" && (d = St("#i" + e));
const f = St(a === "sandbox" ? d.nodes()[0].contentDocument.body : "body"), p = f.select(`[id="${e}"]`), m = f.select("#" + e + " g");
if (n_(
m,
l,
["aggregation", "extension", "composition", "dependency", "lollipop"],
"classDiagram",
e
), a0(l, p, i.diagramPadding, i.useMaxWidth), !i.htmlLabels) {
const _ = a === "sandbox" ? d.nodes()[0].contentDocument : document, y = _.querySelectorAll('[id="' + e + '"] .edgeLabel .label');
for (let b = 0; b < y.length; b++) {
const x = y[b], k = x.getBBox(), T = _.createElementNS("http://www.w3.org/2000/svg", "rect");
T.setAttribute("rx", 0), T.setAttribute("ry", 0), T.setAttribute("width", k.width), T.setAttribute("height", k.height), x.insertBefore(T, x.firstChild);
}
}
vn(n.db, p, e);
};
function aw(t) {
let e;
switch (t) {
case 0:
e = "aggregation";
break;
case 1:
e = "extension";
break;
case 2:
e = "composition";
break;
case 3:
e = "dependency";
break;
case 4:
e = "lollipop";
break;
default:
e = "none";
}
return e;
}
const Brt = {
setConf: Irt,
draw: Nrt
};
var Mb = function() {
var t = function(A, L, v, B) {
for (v = v || {}, B = A.length; B--; v[A[B]] = L)
;
return v;
}, e = [1, 2], r = [1, 5], n = [6, 9, 11, 23, 25, 27, 29, 30, 31, 49], i = [1, 17], a = [1, 18], s = [1, 19], o = [1, 20], l = [1, 21], u = [1, 22], h = [1, 25], d = [1, 30], f = [1, 31], p = [1, 32], m = [1, 33], _ = [6, 9, 11, 15, 20, 23, 25, 27, 29, 30, 31, 42, 43, 44, 45, 49], y = [1, 45], b = [30, 31, 46, 47], x = [4, 6, 9, 11, 23, 25, 27, 29, 30, 31, 49], k = [42, 43, 44, 45], T = [22, 37], C = [1, 64], M = {
trace: function() {
},
yy: {},
symbols_: { error: 2, start: 3, ER_DIAGRAM: 4, document: 5, EOF: 6, directive: 7, line: 8, SPACE: 9, statement: 10, NEWLINE: 11, openDirective: 12, typeDirective: 13, closeDirective: 14, ":": 15, argDirective: 16, entityName: 17, relSpec: 18, role: 19, BLOCK_START: 20, attributes: 21, BLOCK_STOP: 22, title: 23, title_value: 24, acc_title: 25, acc_title_value: 26, acc_descr: 27, acc_descr_value: 28, acc_descr_multiline_value: 29, ALPHANUM: 30, ENTITY_NAME: 31, attribute: 32, attributeType: 33, attributeName: 34, attributeKeyType: 35, attributeComment: 36, ATTRIBUTE_WORD: 37, ATTRIBUTE_KEY: 38, COMMENT: 39, cardinality: 40, relType: 41, ZERO_OR_ONE: 42, ZERO_OR_MORE: 43, ONE_OR_MORE: 44, ONLY_ONE: 45, NON_IDENTIFYING: 46, IDENTIFYING: 47, WORD: 48, open_directive: 49, type_directive: 50, arg_directive: 51, close_directive: 52, $accept: 0, $end: 1 },
terminals_: { 2: "error", 4: "ER_DIAGRAM", 6: "EOF", 9: "SPACE", 11: "NEWLINE", 15: ":", 20: "BLOCK_START", 22: "BLOCK_STOP", 23: "title", 24: "title_value", 25: "acc_title", 26: "acc_title_value", 27: "acc_descr", 28: "acc_descr_value", 29: "acc_descr_multiline_value", 30: "ALPHANUM", 31: "ENTITY_NAME", 37: "ATTRIBUTE_WORD", 38: "ATTRIBUTE_KEY", 39: "COMMENT", 42: "ZERO_OR_ONE", 43: "ZERO_OR_MORE", 44: "ONE_OR_MORE", 45: "ONLY_ONE", 46: "NON_IDENTIFYING", 47: "IDENTIFYING", 48: "WORD", 49: "open_directive", 50: "type_directive", 51: "arg_directive", 52: "close_directive" },
productions_: [0, [3, 3], [3, 2], [5, 0], [5, 2], [8, 2], [8, 1], [8, 1], [8, 1], [7, 4], [7, 6], [10, 1], [10, 5], [10, 4], [10, 3], [10, 1], [10, 2], [10, 2], [10, 2], [10, 1], [17, 1], [17, 1], [21, 1], [21, 2], [32, 2], [32, 3], [32, 3], [32, 4], [33, 1], [34, 1], [35, 1], [36, 1], [18, 3], [40, 1], [40, 1], [40, 1], [40, 1], [41, 1], [41, 1], [19, 1], [19, 1], [19, 1], [12, 1], [13, 1], [16, 1], [14, 1]],
performAction: function(L, v, B, w, D, N, z) {
var X = N.length - 1;
switch (D) {
case 1:
break;
case 3:
this.$ = [];
break;
case 4:
N[X - 1].push(N[X]), this.$ = N[X - 1];
break;
case 5:
case 6:
this.$ = N[X];
break;
case 7:
case 8:
this.$ = [];
break;
case 12:
w.addEntity(N[X - 4]), w.addEntity(N[X - 2]), w.addRelationship(N[X - 4], N[X], N[X - 2], N[X - 3]);
break;
case 13:
w.addEntity(N[X - 3]), w.addAttributes(N[X - 3], N[X - 1]);
break;
case 14:
w.addEntity(N[X - 2]);
break;
case 15:
w.addEntity(N[X]);
break;
case 16:
case 17:
this.$ = N[X].trim(), w.setAccTitle(this.$);
break;
case 18:
case 19:
this.$ = N[X].trim(), w.setAccDescription(this.$);
break;
case 20:
case 41:
this.$ = N[X];
break;
case 21:
case 39:
case 40:
this.$ = N[X].replace(/"/g, "");
break;
case 22:
this.$ = [N[X]];
break;
case 23:
N[X].push(N[X - 1]), this.$ = N[X];
break;
case 24:
this.$ = { attributeType: N[X - 1], attributeName: N[X] };
break;
case 25:
this.$ = { attributeType: N[X - 2], attributeName: N[X - 1], attributeKeyType: N[X] };
break;
case 26:
this.$ = { attributeType: N[X - 2], attributeName: N[X - 1], attributeComment: N[X] };
break;
case 27:
this.$ = { attributeType: N[X - 3], attributeName: N[X - 2], attributeKeyType: N[X - 1], attributeComment: N[X] };
break;
case 28:
case 29:
case 30:
this.$ = N[X];
break;
case 31:
this.$ = N[X].replace(/"/g, "");
break;
case 32:
this.$ = { cardA: N[X], relType: N[X - 1], cardB: N[X - 2] };
break;
case 33:
this.$ = w.Cardinality.ZERO_OR_ONE;
break;
case 34:
this.$ = w.Cardinality.ZERO_OR_MORE;
break;
case 35:
this.$ = w.Cardinality.ONE_OR_MORE;
break;
case 36:
this.$ = w.Cardinality.ONLY_ONE;
break;
case 37:
this.$ = w.Identification.NON_IDENTIFYING;
break;
case 38:
this.$ = w.Identification.IDENTIFYING;
break;
case 42:
w.parseDirective("%%{", "open_directive");
break;
case 43:
w.parseDirective(N[X], "type_directive");
break;
case 44:
N[X] = N[X].trim().replace(/'/g, '"'), w.parseDirective(N[X], "arg_directive");
break;
case 45:
w.parseDirective("}%%", "close_directive", "er");
break;
}
},
table: [{ 3: 1, 4: e, 7: 3, 12: 4, 49: r }, { 1: [3] }, t(n, [2, 3], { 5: 6 }), { 3: 7, 4: e, 7: 3, 12: 4, 49: r }, { 13: 8, 50: [1, 9] }, { 50: [2, 42] }, { 6: [1, 10], 7: 15, 8: 11, 9: [1, 12], 10: 13, 11: [1, 14], 12: 4, 17: 16, 23: i, 25: a, 27: s, 29: o, 30: l, 31: u, 49: r }, { 1: [2, 2] }, { 14: 23, 15: [1, 24], 52: h }, t([15, 52], [2, 43]), t(n, [2, 8], { 1: [2, 1] }), t(n, [2, 4]), { 7: 15, 10: 26, 12: 4, 17: 16, 23: i, 25: a, 27: s, 29: o, 30: l, 31: u, 49: r }, t(n, [2, 6]), t(n, [2, 7]), t(n, [2, 11]), t(n, [2, 15], { 18: 27, 40: 29, 20: [1, 28], 42: d, 43: f, 44: p, 45: m }), { 24: [1, 34] }, { 26: [1, 35] }, { 28: [1, 36] }, t(n, [2, 19]), t(_, [2, 20]), t(_, [2, 21]), { 11: [1, 37] }, { 16: 38, 51: [1, 39] }, { 11: [2, 45] }, t(n, [2, 5]), { 17: 40, 30: l, 31: u }, { 21: 41, 22: [1, 42], 32: 43, 33: 44, 37: y }, { 41: 46, 46: [1, 47], 47: [1, 48] }, t(b, [2, 33]), t(b, [2, 34]), t(b, [2, 35]), t(b, [2, 36]), t(n, [2, 16]), t(n, [2, 17]), t(n, [2, 18]), t(x, [2, 9]), { 14: 49, 52: h }, { 52: [2, 44] }, { 15: [1, 50] }, { 22: [1, 51] }, t(n, [2, 14]), { 21: 52, 22: [2, 22], 32: 43, 33: 44, 37: y }, { 34: 53, 37: [1, 54] }, { 37: [2, 28] }, { 40: 55, 42: d, 43: f, 44: p, 45: m }, t(k, [2, 37]), t(k, [2, 38]), { 11: [1, 56] }, { 19: 57, 30: [1, 60], 31: [1, 59], 48: [1, 58] }, t(n, [2, 13]), { 22: [2, 23] }, t(T, [2, 24], { 35: 61, 36: 62, 38: [1, 63], 39: C }), t([22, 37, 38, 39], [2, 29]), t([30, 31], [2, 32]), t(x, [2, 10]), t(n, [2, 12]), t(n, [2, 39]), t(n, [2, 40]), t(n, [2, 41]), t(T, [2, 25], { 36: 65, 39: C }), t(T, [2, 26]), t([22, 37, 39], [2, 30]), t(T, [2, 31]), t(T, [2, 27])],
defaultActions: { 5: [2, 42], 7: [2, 2], 25: [2, 45], 39: [2, 44], 45: [2, 28], 52: [2, 23] },
parseError: function(L, v) {
if (v.recoverable)
this.trace(L);
else {
var B = new Error(L);
throw B.hash = v, B;
}
},
parse: function(L) {
var v = this, B = [0], w = [], D = [null], N = [], z = this.table, X = "", ct = 0, J = 0, Y = 2, $ = 1, lt = N.slice.call(arguments, 1), ut = Object.create(this.lexer), W = { yy: {} };
for (var tt in this.yy)
Object.prototype.hasOwnProperty.call(this.yy, tt) && (W.yy[tt] = this.yy[tt]);
ut.setInput(L, W.yy), W.yy.lexer = ut, W.yy.parser = this, typeof ut.yylloc > "u" && (ut.yylloc = {});
var K = ut.yylloc;
N.push(K);
var it = ut.options && ut.options.ranges;
typeof W.yy.parseError == "function" ? this.parseError = W.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
function Z() {
var Lt;
return Lt = w.pop() || ut.lex() || $, typeof Lt != "number" && (Lt instanceof Array && (w = Lt, Lt = w.pop()), Lt = v.symbols_[Lt] || Lt), Lt;
}
for (var V, Q, q, U, F = {}, j, P, et, at; ; ) {
if (Q = B[B.length - 1], this.defaultActions[Q] ? q = this.defaultActions[Q] : ((V === null || typeof V > "u") && (V = Z()), q = z[Q] && z[Q][V]), typeof q > "u" || !q.length || !q[0]) {
var It = "";
at = [];
for (j in z[Q])
this.terminals_[j] && j > Y && at.push("'" + this.terminals_[j] + "'");
ut.showPosition ? It = "Parse error on line " + (ct + 1) + `:
` + ut.showPosition() + `
Expecting ` + at.join(", ") + ", got '" + (this.terminals_[V] || V) + "'" : It = "Parse error on line " + (ct + 1) + ": Unexpected " + (V == $ ? "end of input" : "'" + (this.terminals_[V] || V) + "'"), this.parseError(It, {
text: ut.match,
token: this.terminals_[V] || V,
line: ut.yylineno,
loc: K,
expected: at
});
}
if (q[0] instanceof Array && q.length > 1)
throw new Error("Parse Error: multiple actions possible at state: " + Q + ", token: " + V);
switch (q[0]) {
case 1:
B.push(V), D.push(ut.yytext), N.push(ut.yylloc), B.push(q[1]), V = null, J = ut.yyleng, X = ut.yytext, ct = ut.yylineno, K = ut.yylloc;
break;
case 2:
if (P = this.productions_[q[1]][1], F.$ = D[D.length - P], F._$ = {
first_line: N[N.length - (P || 1)].first_line,
last_line: N[N.length - 1].last_line,
first_column: N[N.length - (P || 1)].first_column,
last_column: N[N.length - 1].last_column
}, it && (F._$.range = [
N[N.length - (P || 1)].range[0],
N[N.length - 1].range[1]
]), U = this.performAction.apply(F, [
X,
J,
ct,
W.yy,
q[1],
D,
N
].concat(lt)), typeof U < "u")
return U;
P && (B = B.slice(0, -1 * P * 2), D = D.slice(0, -1 * P), N = N.slice(0, -1 * P)), B.push(this.productions_[q[1]][0]), D.push(F.$), N.push(F._$), et = z[B[B.length - 2]][B[B.length - 1]], B.push(et);
break;
case 3:
return !0;
}
}
return !0;
}
}, S = function() {
var A = {
EOF: 1,
parseError: function(v, B) {
if (this.yy.parser)
this.yy.parser.parseError(v, B);
else
throw new Error(v);
},
setInput: function(L, v) {
return this.yy = v || this.yy || {}, this._input = L, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
first_line: 1,
first_column: 0,
last_line: 1,
last_column: 0
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
},
input: function() {
var L = this._input[0];
this.yytext += L, this.yyleng++, this.offset++, this.match += L, this.matched += L;
var v = L.match(/(?:\r\n?|\n).*/g);
return v ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), L;
},
unput: function(L) {
var v = L.length, B = L.split(/(?:\r\n?|\n)/g);
this._input = L + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - v), this.offset -= v;
var w = this.match.split(/(?:\r\n?|\n)/g);
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), B.length - 1 && (this.yylineno -= B.length - 1);
var D = this.yylloc.range;
return this.yylloc = {
first_line: this.yylloc.first_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.first_column,
last_column: B ? (B.length === w.length ? this.yylloc.first_column : 0) + w[w.length - B.length].length - B[0].length : this.yylloc.first_column - v
}, this.options.ranges && (this.yylloc.range = [D[0], D[0] + this.yyleng - v]), this.yyleng = this.yytext.length, this;
},
more: function() {
return this._more = !0, this;
},
reject: function() {
if (this.options.backtrack_lexer)
this._backtrack = !0;
else
return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
return this;
},
less: function(L) {
this.unput(this.match.slice(L));
},
pastInput: function() {
var L = this.matched.substr(0, this.matched.length - this.match.length);
return (L.length > 20 ? "..." : "") + L.substr(-20).replace(/\n/g, "");
},
upcomingInput: function() {
var L = this.match;
return L.length < 20 && (L += this._input.substr(0, 20 - L.length)), (L.substr(0, 20) + (L.length > 20 ? "..." : "")).replace(/\n/g, "");
},
showPosition: function() {
var L = this.pastInput(), v = new Array(L.length + 1).join("-");
return L + this.upcomingInput() + `
` + v + "^";
},
test_match: function(L, v) {
var B, w, D;
if (this.options.backtrack_lexer && (D = {
yylineno: this.yylineno,
yylloc: {
first_line: this.yylloc.first_line,
last_line: this.last_line,
first_column: this.yylloc.first_column,
last_column: this.yylloc.last_column
},
yytext: this.yytext,
match: this.match,
matches: this.matches,
matched: this.matched,
yyleng: this.yyleng,
offset: this.offset,
_more: this._more,
_input: this._input,
yy: this.yy,
conditionStack: this.conditionStack.slice(0),
done: this.done
}, this.options.ranges && (D.yylloc.range = this.yylloc.range.slice(0))), w = L[0].match(/(?:\r\n?|\n).*/g), w && (this.yylineno += w.length), this.yylloc = {
first_line: this.yylloc.last_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.last_column,
last_column: w ? w[w.length - 1].length - w[w.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + L[0].length
}, this.yytext += L[0], this.match += L[0], this.matches = L, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(L[0].length), this.matched += L[0], B = this.performAction.call(this, this.yy, this, v, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), B)
return B;
if (this._backtrack) {
for (var N in D)
this[N] = D[N];
return !1;
}
return !1;
},
next: function() {
if (this.done)
return this.EOF;
this._input || (this.done = !0);
var L, v, B, w;
this._more || (this.yytext = "", this.match = "");
for (var D = this._currentRules(), N = 0; N < D.length; N++)
if (B = this._input.match(this.rules[D[N]]), B && (!v || B[0].length > v[0].length)) {
if (v = B, w = N, this.options.backtrack_lexer) {
if (L = this.test_match(B, D[N]), L !== !1)
return L;
if (this._backtrack) {
v = !1;
continue;
} else
return !1;
} else if (!this.options.flex)
break;
}
return v ? (L = this.test_match(v, D[w]), L !== !1 ? L : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
},
lex: function() {
var v = this.next();
return v || this.lex();
},
begin: function(v) {
this.conditionStack.push(v);
},
popState: function() {
var v = this.conditionStack.length - 1;
return v > 0 ? this.conditionStack.pop() : this.conditionStack[0];
},
_currentRules: function() {
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
},
topState: function(v) {
return v = this.conditionStack.length - 1 - Math.abs(v || 0), v >= 0 ? this.conditionStack[v] : "INITIAL";
},
pushState: function(v) {
this.begin(v);
},
stateStackSize: function() {
return this.conditionStack.length;
},
options: { "case-insensitive": !0 },
performAction: function(v, B, w, D) {
switch (w) {
case 0:
return this.begin("acc_title"), 25;
case 1:
return this.popState(), "acc_title_value";
case 2:
return this.begin("acc_descr"), 27;
case 3:
return this.popState(), "acc_descr_value";
case 4:
this.begin("acc_descr_multiline");
break;
case 5:
this.popState();
break;
case 6:
return "acc_descr_multiline_value";
case 7:
return this.begin("open_directive"), 49;
case 8:
return this.begin("type_directive"), 50;
case 9:
return this.popState(), this.begin("arg_directive"), 15;
case 10:
return this.popState(), this.popState(), 52;
case 11:
return 51;
case 12:
break;
case 13:
break;
case 14:
return 11;
case 15:
break;
case 16:
return 9;
case 17:
return 31;
case 18:
return 48;
case 19:
return 4;
case 20:
return this.begin("block"), 20;
case 21:
break;
case 22:
return 38;
case 23:
return 37;
case 24:
return 37;
case 25:
return 39;
case 26:
break;
case 27:
return this.popState(), 22;
case 28:
return B.yytext[0];
case 29:
return 42;
case 30:
return 43;
case 31:
return 44;
case 32:
return 45;
case 33:
return 42;
case 34:
return 43;
case 35:
return 44;
case 36:
return 46;
case 37:
return 47;
case 38:
return 46;
case 39:
return 46;
case 40:
return 30;
case 41:
return B.yytext[0];
case 42:
return 6;
}
},
rules: [/^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:%%\{)/i, /^(?:((?:(?!\}%%)[^:.])*))/i, /^(?::)/i, /^(?:\}%%)/i, /^(?:((?:(?!\}%%).|\n)*))/i, /^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:[\s]+)/i, /^(?:"[^"%\r\n\v\b\\]+")/i, /^(?:"[^"]*")/i, /^(?:erDiagram\b)/i, /^(?:\{)/i, /^(?:\s+)/i, /^(?:\b((?:PK)|(?:FK))\b)/i, /^(?:(.*?)[~](.*?)*[~])/i, /^(?:[A-Za-z][A-Za-z0-9\-_\[\]]*)/i, /^(?:"[^"]*")/i, /^(?:[\n]+)/i, /^(?:\})/i, /^(?:.)/i, /^(?:\|o\b)/i, /^(?:\}o\b)/i, /^(?:\}\|)/i, /^(?:\|\|)/i, /^(?:o\|)/i, /^(?:o\{)/i, /^(?:\|\{)/i, /^(?:\.\.)/i, /^(?:--)/i, /^(?:\.-)/i, /^(?:-\.)/i, /^(?:[A-Za-z][A-Za-z0-9\-_]*)/i, /^(?:.)/i, /^(?:$)/i],
conditions: { acc_descr_multiline: { rules: [5, 6], inclusive: !1 }, acc_descr: { rules: [3], inclusive: !1 }, acc_title: { rules: [1], inclusive: !1 }, open_directive: { rules: [8], inclusive: !1 }, type_directive: { rules: [9, 10], inclusive: !1 }, arg_directive: { rules: [10, 11], inclusive: !1 }, block: { rules: [21, 22, 23, 24, 25, 26, 27, 28], inclusive: !1 }, INITIAL: { rules: [0, 2, 4, 7, 12, 13, 14, 15, 16, 17, 18, 19, 20, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42], inclusive: !0 } }
};
return A;
}();
M.lexer = S;
function R() {
this.yy = {};
}
return R.prototype = M, M.Parser = R, new R();
}();
Mb.parser = Mb;
const Drt = (t) => t.match(/^\s*erDiagram/) !== null;
let cc = {}, i_ = [];
const Ort = {
ZERO_OR_ONE: "ZERO_OR_ONE",
ZERO_OR_MORE: "ZERO_OR_MORE",
ONE_OR_MORE: "ONE_OR_MORE",
ONLY_ONE: "ONLY_ONE"
}, Frt = {
NON_IDENTIFYING: "NON_IDENTIFYING",
IDENTIFYING: "IDENTIFYING"
}, Prt = function(t, e, r) {
sr.parseDirective(this, t, e, r);
}, sL = function(t) {
return typeof cc[t] > "u" && (cc[t] = { attributes: [] }, H.info("Added new entity :", t)), cc[t];
}, qrt = () => cc, Vrt = function(t, e) {
let r = sL(t), n;
for (n = e.length - 1; n >= 0; n--)
r.attributes.push(e[n]), H.debug("Added attribute ", e[n].attributeName);
}, zrt = function(t, e, r, n) {
let i = {
entityA: t,
roleA: e,
entityB: r,
relSpec: n
};
i_.push(i), H.debug("Added new relationship :", i);
}, Yrt = () => i_, Urt = function() {
cc = {}, i_ = [], pi();
}, Wrt = {
Cardinality: Ort,
Identification: Frt,
parseDirective: Prt,
getConfig: () => nt().er,
addEntity: sL,
addAttributes: Vrt,
getEntities: qrt,
addRelationship: zrt,
getRelationships: Yrt,
clear: Urt,
setAccTitle: zn,
getAccTitle: gi,
setAccDescription: yi,
getAccDescription: mi
}, na = {
ONLY_ONE_START: "ONLY_ONE_START",
ONLY_ONE_END: "ONLY_ONE_END",
ZERO_OR_ONE_START: "ZERO_OR_ONE_START",
ZERO_OR_ONE_END: "ZERO_OR_ONE_END",
ONE_OR_MORE_START: "ONE_OR_MORE_START",
ONE_OR_MORE_END: "ONE_OR_MORE_END",
ZERO_OR_MORE_START: "ZERO_OR_MORE_START",
ZERO_OR_MORE_END: "ZERO_OR_MORE_END"
}, Hrt = function(t, e) {
let r;
t.append("defs").append("marker").attr("id", na.ONLY_ONE_START).attr("refX", 0).attr("refY", 9).attr("markerWidth", 18).attr("markerHeight", 18).attr("orient", "auto").append("path").attr("stroke", e.stroke).attr("fill", "none").attr("d", "M9,0 L9,18 M15,0 L15,18"), t.append("defs").append("marker").attr("id", na.ONLY_ONE_END).attr("refX", 18).attr("refY", 9).attr("markerWidth", 18).attr("markerHeight", 18).attr("orient", "auto").append("path").attr("stroke", e.stroke).attr("fill", "none").attr("d", "M3,0 L3,18 M9,0 L9,18"), r = t.append("defs").append("marker").attr("id", na.ZERO_OR_ONE_START).attr("refX", 0).attr("refY", 9).attr("markerWidth", 30).attr("markerHeight", 18).attr("orient", "auto"), r.append("circle").attr("stroke", e.stroke).attr("fill", "white").attr("cx", 21).attr("cy", 9).attr("r", 6), r.append("path").attr("stroke", e.stroke).attr("fill", "none").attr("d", "M9,0 L9,18"), r = t.append("defs").append("marker").attr("id", na.ZERO_OR_ONE_END).attr("refX", 30).attr("refY", 9).attr("markerWidth", 30).attr("markerHeight", 18).attr("orient", "auto"), r.append("circle").attr("stroke", e.stroke).attr("fill", "white").attr("cx", 9).attr("cy", 9).attr("r", 6), r.append("path").attr("stroke", e.stroke).attr("fill", "none").attr("d", "M21,0 L21,18"), t.append("defs").append("marker").attr("id", na.ONE_OR_MORE_START).attr("refX", 18).attr("refY", 18).attr("markerWidth", 45).attr("markerHeight", 36).attr("orient", "auto").append("path").attr("stroke", e.stroke).attr("fill", "none").attr("d", "M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"), t.append("defs").append("marker").attr("id", na.ONE_OR_MORE_END).attr("refX", 27).attr("refY", 18).attr("markerWidth", 45).attr("markerHeight", 36).attr("orient", "auto").append("path").attr("stroke", e.stroke).attr("fill", "none").attr("d", "M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"), r = t.append("defs").append("marker").attr("id", na.ZERO_OR_MORE_START).attr("refX", 18).attr("refY", 18).attr("markerWidth", 57).attr("markerHeight", 36).attr("orient", "auto"), r.append("circle").attr("stroke", e.stroke).attr("fill", "white").attr("cx", 48).attr("cy", 18).attr("r", 6), r.append("path").attr("stroke", e.stroke).attr("fill", "none").attr("d", "M0,18 Q18,0 36,18 Q18,36 0,18"), r = t.append("defs").append("marker").attr("id", na.ZERO_OR_MORE_END).attr("refX", 39).attr("refY", 18).attr("markerWidth", 57).attr("markerHeight", 36).attr("orient", "auto"), r.append("circle").attr("stroke", e.stroke).attr("fill", "white").attr("cx", 9).attr("cy", 18).attr("r", 6), r.append("path").attr("stroke", e.stroke).attr("fill", "none").attr("d", "M21,18 Q39,0 57,18 Q39,36 21,18");
}, ia = {
ERMarkers: na,
insertMarkers: Hrt
};
let hh;
const Grt = new Uint8Array(16);
function jrt() {
if (!hh && (hh = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !hh))
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
return hh(Grt);
}
const Nr = [];
for (let t = 0; t < 256; ++t)
Nr.push((t + 256).toString(16).slice(1));
function $rt(t, e = 0) {
return (Nr[t[e + 0]] + Nr[t[e + 1]] + Nr[t[e + 2]] + Nr[t[e + 3]] + "-" + Nr[t[e + 4]] + Nr[t[e + 5]] + "-" + Nr[t[e + 6]] + Nr[t[e + 7]] + "-" + Nr[t[e + 8]] + Nr[t[e + 9]] + "-" + Nr[t[e + 10]] + Nr[t[e + 11]] + Nr[t[e + 12]] + Nr[t[e + 13]] + Nr[t[e + 14]] + Nr[t[e + 15]]).toLowerCase();
}
const Xrt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), sw = {
randomUUID: Xrt
};
function Krt(t, e, r) {
if (sw.randomUUID && !e && !t)
return sw.randomUUID();
t = t || {};
const n = t.random || (t.rng || jrt)();
if (n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, e) {
r = r || 0;
for (let i = 0; i < 16; ++i)
e[r + i] = n[i];
return e;
}
return $rt(n);
}
const Zrt = /[^A-Za-z0-9]([\W])*/g;
let Ye = {}, Uc = /* @__PURE__ */ new Map();
const Qrt = function(t) {
const e = Object.keys(t);
for (let r = 0; r < e.length; r++)
Ye[e[r]] = t[e[r]];
}, Jrt = (t, e, r) => {
const n = Ye.entityPadding / 3, i = Ye.entityPadding / 3, a = Ye.fontSize * 0.85, s = e.node().getBBox(), o = [];
let l = !1, u = !1, h = 0, d = 0, f = 0, p = 0, m = s.height + n * 2, _ = 1;
r.forEach((k) => {
k.attributeKeyType !== void 0 && (l = !0), k.attributeComment !== void 0 && (u = !0);
}), r.forEach((k) => {
const T = `${e.node().id}-attr-${_}`;
let C = 0;
const M = Va(k.attributeType), S = t.append("text").attr("class", "er entityLabel").attr("id", `${T}-type`).attr("x", 0).attr("y", 0).attr("dominant-baseline", "middle").attr("text-anchor", "left").attr(
"style",
"font-family: " + nt().fontFamily + "; font-size: " + a + "px"
).text(M), R = t.append("text").attr("class", "er entityLabel").attr("id", `${T}-name`).attr("x", 0).attr("y", 0).attr("dominant-baseline", "middle").attr("text-anchor", "left").attr(
"style",
"font-family: " + nt().fontFamily + "; font-size: " + a + "px"
).text(k.attributeName), A = {};
A.tn = S, A.nn = R;
const L = S.node().getBBox(), v = R.node().getBBox();
if (h = Math.max(h, L.width), d = Math.max(d, v.width), C = Math.max(L.height, v.height), l) {
const B = t.append("text").attr("class", "er entityLabel").attr("id", `${T}-key`).attr("x", 0).attr("y", 0).attr("dominant-baseline", "middle").attr("text-anchor", "left").attr(
"style",
"font-family: " + nt().fontFamily + "; font-size: " + a + "px"
).text(k.attributeKeyType || "");
A.kn = B;
const w = B.node().getBBox();
f = Math.max(f, w.width), C = Math.max(C, w.height);
}
if (u) {
const B = t.append("text").attr("class", "er entityLabel").attr("id", `${T}-comment`).attr("x", 0).attr("y", 0).attr("dominant-baseline", "middle").attr("text-anchor", "left").attr(
"style",
"font-family: " + nt().fontFamily + "; font-size: " + a + "px"
).text(k.attributeComment || "");
A.cn = B;
const w = B.node().getBBox();
p = Math.max(p, w.width), C = Math.max(C, w.height);
}
A.height = C, o.push(A), m += C + n * 2, _ += 1;
});
let y = 4;
l && (y += 2), u && (y += 2);
const b = h + d + f + p, x = {
width: Math.max(
Ye.minEntityWidth,
Math.max(
s.width + Ye.entityPadding * 2,
b + i * y
)
),
height: r.length > 0 ? m : Math.max(Ye.minEntityHeight, s.height + Ye.entityPadding * 2)
};
if (r.length > 0) {
const k = Math.max(
0,
(x.width - b - i * y) / (y / 2)
);
e.attr(
"transform",
"translate(" + x.width / 2 + "," + (n + s.height / 2) + ")"
);
let T = s.height + n * 2, C = "attributeBoxOdd";
o.forEach((M) => {
const S = T + n + M.height / 2;
M.tn.attr("transform", "translate(" + i + "," + S + ")");
const R = t.insert("rect", "#" + M.tn.node().id).attr("class", `er ${C}`).attr("fill", Ye.fill).attr("fill-opacity", "100%").attr("stroke", Ye.stroke).attr("x", 0).attr("y", T).attr("width", h + i * 2 + k).attr("height", M.height + n * 2), A = parseFloat(R.attr("x")) + parseFloat(R.attr("width"));
M.nn.attr(
"transform",
"translate(" + (A + i) + "," + S + ")"
);
const L = t.insert("rect", "#" + M.nn.node().id).attr("class", `er ${C}`).attr("fill", Ye.fill).attr("fill-opacity", "100%").attr("stroke", Ye.stroke).attr("x", A).attr("y", T).attr("width", d + i * 2 + k).attr("height", M.height + n * 2);
let v = parseFloat(L.attr("x")) + parseFloat(L.attr("width"));
if (l) {
M.kn.attr(
"transform",
"translate(" + (v + i) + "," + S + ")"
);
const B = t.insert("rect", "#" + M.kn.node().id).attr("class", `er ${C}`).attr("fill", Ye.fill).attr("fill-opacity", "100%").attr("stroke", Ye.stroke).attr("x", v).attr("y", T).attr("width", f + i * 2 + k).attr("height", M.height + n * 2);
v = parseFloat(B.attr("x")) + parseFloat(B.attr("width"));
}
u && (M.cn.attr(
"transform",
"translate(" + (v + i) + "," + S + ")"
), t.insert("rect", "#" + M.cn.node().id).attr("class", `er ${C}`).attr("fill", Ye.fill).attr("fill-opacity", "100%").attr("stroke", Ye.stroke).attr("x", v).attr("y", T).attr("width", p + i * 2 + k).attr("height", M.height + n * 2)), T += M.height + n * 2, C = C === "attributeBoxOdd" ? "attributeBoxEven" : "attributeBoxOdd";
});
} else
x.height = Math.max(Ye.minEntityHeight, m), e.attr("transform", "translate(" + x.width / 2 + "," + x.height / 2 + ")");
return x;
}, tnt = function(t, e, r) {
const n = Object.keys(e);
let i;
return n.forEach(function(a) {
const s = ant(a, "entity");
Uc.set(a, s);
const o = t.append("g").attr("id", s);
i = i === void 0 ? s : i;
const l = "text-" + s, u = o.append("text").attr("class", "er entityLabel").attr("id", l).attr("x", 0).attr("y", 0).attr("dominant-baseline", "middle").attr("text-anchor", "middle").attr(
"style",
"font-family: " + nt().fontFamily + "; font-size: " + Ye.fontSize + "px"
).text(a), { width: h, height: d } = Jrt(
o,
u,
e[a].attributes
), p = o.insert("rect", "#" + l).attr("class", "er entityBox").attr("fill", Ye.fill).attr("fill-opacity", "100%").attr("stroke", Ye.stroke).attr("x", 0).attr("y", 0).attr("width", h).attr("height", d).node().getBBox();
r.setNode(s, {
width: p.width,
height: p.height,
shape: "rect",
id: s
});
}), i;
}, ent = function(t, e) {
e.nodes().forEach(function(r) {
typeof r < "u" && typeof e.node(r) < "u" && t.select("#" + r).attr(
"transform",
"translate(" + (e.node(r).x - e.node(r).width / 2) + "," + (e.node(r).y - e.node(r).height / 2) + " )"
);
});
}, oL = function(t) {
return (t.entityA + t.roleA + t.entityB).replace(/\s/g, "");
}, rnt = function(t, e) {
return t.forEach(function(r) {
e.setEdge(
Uc.get(r.entityA),
Uc.get(r.entityB),
{ relationship: r },
oL(r)
);
}), t;
};
let ow = 0;
const nnt = function(t, e, r, n, i) {
ow++;
const a = r.edge(
Uc.get(e.entityA),
Uc.get(e.entityB),
oL(e)
), s = ns().x(function(m) {
return m.x;
}).y(function(m) {
return m.y;
}).curve(Ps), o = t.insert("path", "#" + n).attr("class", "er relationshipLine").attr("d", s(a.points)).attr("stroke", Ye.stroke).attr("fill", "none");
e.relSpec.relType === i.db.Identification.NON_IDENTIFYING && o.attr("stroke-dasharray", "8,8");
let l = "";
switch (Ye.arrowMarkerAbsolute && (l = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, l = l.replace(/\(/g, "\\("), l = l.replace(/\)/g, "\\)")), e.relSpec.cardA) {
case i.db.Cardinality.ZERO_OR_ONE:
o.attr("marker-end", "url(" + l + "#" + ia.ERMarkers.ZERO_OR_ONE_END + ")");
break;
case i.db.Cardinality.ZERO_OR_MORE:
o.attr("marker-end", "url(" + l + "#" + ia.ERMarkers.ZERO_OR_MORE_END + ")");
break;
case i.db.Cardinality.ONE_OR_MORE:
o.attr("marker-end", "url(" + l + "#" + ia.ERMarkers.ONE_OR_MORE_END + ")");
break;
case i.db.Cardinality.ONLY_ONE:
o.attr("marker-end", "url(" + l + "#" + ia.ERMarkers.ONLY_ONE_END + ")");
break;
}
switch (e.relSpec.cardB) {
case i.db.Cardinality.ZERO_OR_ONE:
o.attr(
"marker-start",
"url(" + l + "#" + ia.ERMarkers.ZERO_OR_ONE_START + ")"
);
break;
case i.db.Cardinality.ZERO_OR_MORE:
o.attr(
"marker-start",
"url(" + l + "#" + ia.ERMarkers.ZERO_OR_MORE_START + ")"
);
break;
case i.db.Cardinality.ONE_OR_MORE:
o.attr(
"marker-start",
"url(" + l + "#" + ia.ERMarkers.ONE_OR_MORE_START + ")"
);
break;
case i.db.Cardinality.ONLY_ONE:
o.attr("marker-start", "url(" + l + "#" + ia.ERMarkers.ONLY_ONE_START + ")");
break;
}
const u = o.node().getTotalLength(), h = o.node().getPointAtLength(u * 0.5), d = "rel" + ow, p = t.append("text").attr("class", "er relationshipLabel").attr("id", d).attr("x", h.x).attr("y", h.y).attr("text-anchor", "middle").attr("dominant-baseline", "middle").attr(
"style",
"font-family: " + nt().fontFamily + "; font-size: " + Ye.fontSize + "px"
).text(e.roleA).node().getBBox();
t.insert("rect", "#" + d).attr("class", "er relationshipLabelBox").attr("x", h.x - p.width / 2).attr("y", h.y - p.height / 2).attr("width", p.width).attr("height", p.height).attr("fill", "white").attr("fill-opacity", "85%");
}, int = function(t, e, r, n) {
Ye = nt().er, H.info("Drawing ER diagram");
const i = nt().securityLevel;
let a;
i === "sandbox" && (a = St("#i" + e));
const o = St(i === "sandbox" ? a.nodes()[0].contentDocument.body : "body").select(`[id='${e}']`);
ia.insertMarkers(o, Ye);
let l;
l = new ur.Graph({
multigraph: !0,
directed: !0,
compound: !1
}).setGraph({
rankdir: Ye.layoutDirection,
marginx: 20,
marginy: 20,
nodesep: 100,
edgesep: 100,
ranksep: 100
}).setDefaultEdgeLabel(function() {
return {};
});
const u = tnt(o, n.db.getEntities(), l), h = rnt(n.db.getRelationships(), l);
fu.layout(l), ent(o, l), h.forEach(function(_) {
nnt(o, _, l, u, n);
});
const d = Ye.diagramPadding, f = o.node().getBBox(), p = f.width + d * 2, m = f.height + d * 2;
di(o, m, p, Ye.useMaxWidth), o.attr("viewBox", `${f.x - d} ${f.y - d} ${p} ${m}`), vn(n.db, o, e);
};
function ant(t = "", e = "") {
const r = t.replace(Zrt, "");
return `${lw(e)}${lw(r)}${Krt()}`;
}
function lw(t = "") {
return t.length > 0 ? `${t}-` : "";
}
const snt = {
setConf: Qrt,
draw: int
};
var Kf = function() {
var t = function(xn, Xt, te, ce) {
for (te = te || {}, ce = xn.length; ce--; te[xn[ce]] = Xt)
;
return te;
}, e = [1, 9], r = [1, 7], n = [1, 6], i = [1, 8], a = [1, 20, 21, 22, 23, 38, 44, 46, 48, 52, 66, 67, 86, 87, 88, 89, 90, 91, 95, 105, 106, 109, 111, 112, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127], s = [2, 10], o = [1, 20], l = [1, 21], u = [1, 22], h = [1, 23], d = [1, 30], f = [1, 32], p = [1, 33], m = [1, 34], _ = [1, 62], y = [1, 48], b = [1, 52], x = [1, 36], k = [1, 37], T = [1, 38], C = [1, 39], M = [1, 40], S = [1, 56], R = [1, 63], A = [1, 51], L = [1, 53], v = [1, 55], B = [1, 59], w = [1, 60], D = [1, 41], N = [1, 42], z = [1, 43], X = [1, 44], ct = [1, 61], J = [1, 50], Y = [1, 54], $ = [1, 57], lt = [1, 58], ut = [1, 49], W = [1, 66], tt = [1, 71], K = [1, 20, 21, 22, 23, 38, 42, 44, 46, 48, 52, 66, 67, 86, 87, 88, 89, 90, 91, 95, 105, 106, 109, 111, 112, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127], it = [1, 75], Z = [1, 74], V = [1, 76], Q = [20, 21, 23, 81, 82], q = [1, 99], U = [1, 104], F = [1, 107], j = [1, 108], P = [1, 101], et = [1, 106], at = [1, 109], It = [1, 102], Lt = [1, 114], Rt = [1, 113], Ct = [1, 103], pt = [1, 105], mt = [1, 110], _t = [1, 111], Tt = [1, 112], ft = [1, 115], le = [20, 21, 22, 23, 81, 82], Dt = [20, 21, 22, 23, 53, 81, 82], Ht = [20, 21, 22, 23, 40, 52, 53, 55, 57, 59, 61, 63, 65, 66, 67, 69, 71, 73, 74, 76, 81, 82, 91, 95, 105, 106, 109, 111, 112, 122, 123, 124, 125, 126, 127], $t = [20, 21, 23], Qt = [20, 21, 23, 52, 66, 67, 81, 82, 91, 95, 105, 106, 109, 111, 112, 122, 123, 124, 125, 126, 127], we = [1, 12, 20, 21, 22, 23, 24, 38, 42, 44, 46, 48, 52, 66, 67, 86, 87, 88, 89, 90, 91, 95, 105, 106, 109, 111, 112, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127], Gt = [52, 66, 67, 91, 95, 105, 106, 109, 111, 112, 122, 123, 124, 125, 126, 127], Ft = [1, 149], zt = [1, 157], wt = [1, 158], bt = [1, 159], Et = [1, 160], kt = [1, 144], Ut = [1, 145], gt = [1, 141], he = [1, 152], yt = [1, 153], re = [1, 154], _e = [1, 155], ge = [1, 156], be = [1, 161], Te = [1, 162], Wt = [1, 147], ae = [1, 150], ye = [1, 146], ue = [1, 143], Ui = [20, 21, 22, 23, 38, 42, 44, 46, 48, 52, 66, 67, 86, 87, 88, 89, 90, 91, 95, 105, 106, 109, 111, 112, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127], Or = [1, 165], Ie = [20, 21, 22, 23, 26, 52, 66, 67, 91, 105, 106, 109, 111, 112, 122, 123, 124, 125, 126, 127], se = [20, 21, 22, 23, 24, 26, 38, 40, 41, 42, 52, 56, 58, 60, 62, 64, 66, 67, 68, 70, 72, 73, 75, 77, 81, 82, 86, 87, 88, 89, 90, 91, 92, 95, 105, 106, 109, 111, 112, 113, 114, 122, 123, 124, 125, 126, 127], $e = [12, 21, 22, 24], _r = [22, 106], He = [1, 250], Xe = [1, 245], qt = [1, 246], st = [1, 254], At = [1, 251], Nt = [1, 248], Jt = [1, 247], ze = [1, 249], Oe = [1, 252], Fe = [1, 253], vr = [1, 255], Ve = [1, 273], Wi = [20, 21, 23, 106], Ee = [20, 21, 22, 23, 66, 67, 86, 102, 105, 106, 109, 110, 111, 112, 113], bi = {
trace: function() {
},
yy: {},
symbols_: { error: 2, start: 3, mermaidDoc: 4, directive: 5, openDirective: 6, typeDirective: 7, closeDirective: 8, separator: 9, ":": 10, argDirective: 11, open_directive: 12, type_directive: 13, arg_directive: 14, close_directive: 15, graphConfig: 16, document: 17, line: 18, statement: 19, SEMI: 20, NEWLINE: 21, SPACE: 22, EOF: 23, GRAPH: 24, NODIR: 25, DIR: 26, FirstStmtSeperator: 27, ending: 28, endToken: 29, spaceList: 30, spaceListNewline: 31, verticeStatement: 32, styleStatement: 33, linkStyleStatement: 34, classDefStatement: 35, classStatement: 36, clickStatement: 37, subgraph: 38, text: 39, SQS: 40, SQE: 41, end: 42, direction: 43, acc_title: 44, acc_title_value: 45, acc_descr: 46, acc_descr_value: 47, acc_descr_multiline_value: 48, link: 49, node: 50, vertex: 51, AMP: 52, STYLE_SEPARATOR: 53, idString: 54, DOUBLECIRCLESTART: 55, DOUBLECIRCLEEND: 56, PS: 57, PE: 58, "(-": 59, "-)": 60, STADIUMSTART: 61, STADIUMEND: 62, SUBROUTINESTART: 63, SUBROUTINEEND: 64, VERTEX_WITH_PROPS_START: 65, ALPHA: 66, COLON: 67, PIPE: 68, CYLINDERSTART: 69, CYLINDEREND: 70, DIAMOND_START: 71, DIAMOND_STOP: 72, TAGEND: 73, TRAPSTART: 74, TRAPEND: 75, INVTRAPSTART: 76, INVTRAPEND: 77, linkStatement: 78, arrowText: 79, TESTSTR: 80, START_LINK: 81, LINK: 82, textToken: 83, STR: 84, keywords: 85, STYLE: 86, LINKSTYLE: 87, CLASSDEF: 88, CLASS: 89, CLICK: 90, DOWN: 91, UP: 92, textNoTags: 93, textNoTagsToken: 94, DEFAULT: 95, stylesOpt: 96, alphaNum: 97, CALLBACKNAME: 98, CALLBACKARGS: 99, HREF: 100, LINK_TARGET: 101, HEX: 102, numList: 103, INTERPOLATE: 104, NUM: 105, COMMA: 106, style: 107, styleComponent: 108, MINUS: 109, UNIT: 110, BRKT: 111, DOT: 112, PCT: 113, TAGSTART: 114, alphaNumToken: 115, idStringToken: 116, alphaNumStatement: 117, direction_tb: 118, direction_bt: 119, direction_rl: 120, direction_lr: 121, PUNCTUATION: 122, UNICODE_TEXT: 123, PLUS: 124, EQUALS: 125, MULT: 126, UNDERSCORE: 127, graphCodeTokens: 128, ARROW_CROSS: 129, ARROW_POINT: 130, ARROW_CIRCLE: 131, ARROW_OPEN: 132, QUOTE: 133, $accept: 0, $end: 1 },
terminals_: { 2: "error", 10: ":", 12: "open_directive", 13: "type_directive", 14: "arg_directive", 15: "close_directive", 20: "SEMI", 21: "NEWLINE", 22: "SPACE", 23: "EOF", 24: "GRAPH", 25: "NODIR", 26: "DIR", 38: "subgraph", 40: "SQS", 41: "SQE", 42: "end", 44: "acc_title", 45: "acc_title_value", 46: "acc_descr", 47: "acc_descr_value", 48: "acc_descr_multiline_value", 52: "AMP", 53: "STYLE_SEPARATOR", 55: "DOUBLECIRCLESTART", 56: "DOUBLECIRCLEEND", 57: "PS", 58: "PE", 59: "(-", 60: "-)", 61: "STADIUMSTART", 62: "STADIUMEND", 63: "SUBROUTINESTART", 64: "SUBROUTINEEND", 65: "VERTEX_WITH_PROPS_START", 66: "ALPHA", 67: "COLON", 68: "PIPE", 69: "CYLINDERSTART", 70: "CYLINDEREND", 71: "DIAMOND_START", 72: "DIAMOND_STOP", 73: "TAGEND", 74: "TRAPSTART", 75: "TRAPEND", 76: "INVTRAPSTART", 77: "INVTRAPEND", 80: "TESTSTR", 81: "START_LINK", 82: "LINK", 84: "STR", 86: "STYLE", 87: "LINKSTYLE", 88: "CLASSDEF", 89: "CLASS", 90: "CLICK", 91: "DOWN", 92: "UP", 95: "DEFAULT", 98: "CALLBACKNAME", 99: "CALLBACKARGS", 100: "HREF", 101: "LINK_TARGET", 102: "HEX", 104: "INTERPOLATE", 105: "NUM", 106: "COMMA", 109: "MINUS", 110: "UNIT", 111: "BRKT", 112: "DOT", 113: "PCT", 114: "TAGSTART", 118: "direction_tb", 119: "direction_bt", 120: "direction_rl", 121: "direction_lr", 122: "PUNCTUATION", 123: "UNICODE_TEXT", 124: "PLUS", 125: "EQUALS", 126: "MULT", 127: "UNDERSCORE", 129: "ARROW_CROSS", 130: "ARROW_POINT", 131: "ARROW_CIRCLE", 132: "ARROW_OPEN", 133: "QUOTE" },
productions_: [0, [3, 1], [3, 2], [5, 4], [5, 6], [6, 1], [7, 1], [11, 1], [8, 1], [4, 2], [17, 0], [17, 2], [18, 1], [18, 1], [18, 1], [18, 1], [18, 1], [16, 2], [16, 2], [16, 2], [16, 3], [28, 2], [28, 1], [29, 1], [29, 1], [29, 1], [27, 1], [27, 1], [27, 2], [31, 2], [31, 2], [31, 1], [31, 1], [30, 2], [30, 1], [19, 2], [19, 2], [19, 2], [19, 2], [19, 2], [19, 2], [19, 9], [19, 6], [19, 4], [19, 1], [19, 2], [19, 2], [19, 1], [9, 1], [9, 1], [9, 1], [32, 3], [32, 4], [32, 2], [32, 1], [50, 1], [50, 5], [50, 3], [51, 4], [51, 4], [51, 6], [51, 4], [51, 4], [51, 4], [51, 8], [51, 4], [51, 4], [51, 4], [51, 6], [51, 4], [51, 4], [51, 4], [51, 4], [51, 4], [51, 1], [49, 2], [49, 3], [49, 3], [49, 1], [49, 3], [78, 1], [79, 3], [39, 1], [39, 2], [39, 1], [85, 1], [85, 1], [85, 1], [85, 1], [85, 1], [85, 1], [85, 1], [85, 1], [85, 1], [85, 1], [85, 1], [93, 1], [93, 2], [35, 5], [35, 5], [36, 5], [37, 2], [37, 4], [37, 3], [37, 5], [37, 2], [37, 4], [37, 4], [37, 6], [37, 2], [37, 4], [37, 2], [37, 4], [37, 4], [37, 6], [33, 5], [33, 5], [34, 5], [34, 5], [34, 9], [34, 9], [34, 7], [34, 7], [103, 1], [103, 3], [96, 1], [96, 3], [107, 1], [107, 2], [108, 1], [108, 1], [108, 1], [108, 1], [108, 1], [108, 1], [108, 1], [108, 1], [108, 1], [108, 1], [108, 1], [83, 1], [83, 1], [83, 1], [83, 1], [83, 1], [83, 1], [94, 1], [94, 1], [94, 1], [94, 1], [54, 1], [54, 2], [97, 1], [97, 2], [117, 1], [117, 1], [117, 1], [117, 1], [43, 1], [43, 1], [43, 1], [43, 1], [115, 1], [115, 1], [115, 1], [115, 1], [115, 1], [115, 1], [115, 1], [115, 1], [115, 1], [115, 1], [115, 1], [115, 1], [115, 1], [116, 1], [116, 1], [116, 1], [116, 1], [116, 1], [116, 1], [116, 1], [116, 1], [116, 1], [116, 1], [116, 1], [116, 1], [116, 1], [116, 1], [116, 1], [116, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1]],
performAction: function(Xt, te, ce, Pt, Ge, rt, os) {
var ot = rt.length - 1;
switch (Ge) {
case 5:
Pt.parseDirective("%%{", "open_directive");
break;
case 6:
Pt.parseDirective(rt[ot], "type_directive");
break;
case 7:
rt[ot] = rt[ot].trim().replace(/'/g, '"'), Pt.parseDirective(rt[ot], "arg_directive");
break;
case 8:
Pt.parseDirective("}%%", "close_directive", "flowchart");
break;
case 10:
this.$ = [];
break;
case 11:
(!Array.isArray(rt[ot]) || rt[ot].length > 0) && rt[ot - 1].push(rt[ot]), this.$ = rt[ot - 1];
break;
case 12:
case 82:
case 84:
case 96:
case 152:
case 154:
case 155:
this.$ = rt[ot];
break;
case 19:
Pt.setDirection("TB"), this.$ = "TB";
break;
case 20:
Pt.setDirection(rt[ot - 1]), this.$ = rt[ot - 1];
break;
case 35:
this.$ = rt[ot - 1].nodes;
break;
case 36:
case 37:
case 38:
case 39:
case 40:
this.$ = [];
break;
case 41:
this.$ = Pt.addSubGraph(rt[ot - 6], rt[ot - 1], rt[ot - 4]);
break;
case 42:
this.$ = Pt.addSubGraph(rt[ot - 3], rt[ot - 1], rt[ot - 3]);
break;
case 43:
this.$ = Pt.addSubGraph(void 0, rt[ot - 1], void 0);
break;
case 45:
this.$ = rt[ot].trim(), Pt.setAccTitle(this.$);
break;
case 46:
case 47:
this.$ = rt[ot].trim(), Pt.setAccDescription(this.$);
break;
case 51:
Pt.addLink(rt[ot - 2].stmt, rt[ot], rt[ot - 1]), this.$ = { stmt: rt[ot], nodes: rt[ot].concat(rt[ot - 2].nodes) };
break;
case 52:
Pt.addLink(rt[ot - 3].stmt, rt[ot - 1], rt[ot - 2]), this.$ = { stmt: rt[ot - 1], nodes: rt[ot - 1].concat(rt[ot - 3].nodes) };
break;
case 53:
this.$ = { stmt: rt[ot - 1], nodes: rt[ot - 1] };
break;
case 54:
this.$ = { stmt: rt[ot], nodes: rt[ot] };
break;
case 55:
this.$ = [rt[ot]];
break;
case 56:
this.$ = rt[ot - 4].concat(rt[ot]);
break;
case 57:
this.$ = [rt[ot - 2]], Pt.setClass(rt[ot - 2], rt[ot]);
break;
case 58:
this.$ = rt[ot - 3], Pt.addVertex(rt[ot - 3], rt[ot - 1], "square");
break;
case 59:
this.$ = rt[ot - 3], Pt.addVertex(rt[ot - 3], rt[ot - 1], "doublecircle");
break;
case 60:
this.$ = rt[ot - 5], Pt.addVertex(rt[ot - 5], rt[ot - 2], "circle");
break;
case 61:
this.$ = rt[ot - 3], Pt.addVertex(rt[ot - 3], rt[ot - 1], "ellipse");
break;
case 62:
this.$ = rt[ot - 3], Pt.addVertex(rt[ot - 3], rt[ot - 1], "stadium");
break;
case 63:
this.$ = rt[ot - 3], Pt.addVertex(rt[ot - 3], rt[ot - 1], "subroutine");
break;
case 64:
this.$ = rt[ot - 7], Pt.addVertex(rt[ot - 7], rt[ot - 1], "rect", void 0, void 0, void 0, Object.fromEntries([[rt[ot - 5], rt[ot - 3]]]));
break;
case 65:
this.$ = rt[ot - 3], Pt.addVertex(rt[ot - 3], rt[ot - 1], "cylinder");
break;
case 66:
this.$ = rt[ot - 3], Pt.addVertex(rt[ot - 3], rt[ot - 1], "round");
break;
case 67:
this.$ = rt[ot - 3], Pt.addVertex(rt[ot - 3], rt[ot - 1], "diamond");
break;
case 68:
this.$ = rt[ot - 5], Pt.addVertex(rt[ot - 5], rt[ot - 2], "hexagon");
break;
case 69:
this.$ = rt[ot - 3], Pt.addVertex(rt[ot - 3], rt[ot - 1], "odd");
break;
case 70:
this.$ = rt[ot - 3], Pt.addVertex(rt[ot - 3], rt[ot - 1], "trapezoid");
break;
case 71:
this.$ = rt[ot - 3], Pt.addVertex(rt[ot - 3], rt[ot - 1], "inv_trapezoid");
break;
case 72:
this.$ = rt[ot - 3], Pt.addVertex(rt[ot - 3], rt[ot - 1], "lean_right");
break;
case 73:
this.$ = rt[ot - 3], Pt.addVertex(rt[ot - 3], rt[ot - 1], "lean_left");
break;
case 74:
this.$ = rt[ot], Pt.addVertex(rt[ot]);
break;
case 75:
rt[ot - 1].text = rt[ot], this.$ = rt[ot - 1];
break;
case 76:
case 77:
rt[ot - 2].text = rt[ot - 1], this.$ = rt[ot - 2];
break;
case 78:
this.$ = rt[ot];
break;
case 79:
var Fr = Pt.destructLink(rt[ot], rt[ot - 2]);
this.$ = { type: Fr.type, stroke: Fr.stroke, length: Fr.length, text: rt[ot - 1] };
break;
case 80:
var Fr = Pt.destructLink(rt[ot]);
this.$ = { type: Fr.type, stroke: Fr.stroke, length: Fr.length };
break;
case 81:
this.$ = rt[ot - 1];
break;
case 83:
case 97:
case 153:
this.$ = rt[ot - 1] + "" + rt[ot];
break;
case 98:
case 99:
this.$ = rt[ot - 4], Pt.addClass(rt[ot - 2], rt[ot]);
break;
case 100:
this.$ = rt[ot - 4], Pt.setClass(rt[ot - 2], rt[ot]);
break;
case 101:
case 109:
this.$ = rt[ot - 1], Pt.setClickEvent(rt[ot - 1], rt[ot]);
break;
case 102:
case 110:
this.$ = rt[ot - 3], Pt.setClickEvent(rt[ot - 3], rt[ot - 2]), Pt.setTooltip(rt[ot - 3], rt[ot]);
break;
case 103:
this.$ = rt[ot - 2], Pt.setClickEvent(rt[ot - 2], rt[ot - 1], rt[ot]);
break;
case 104:
this.$ = rt[ot - 4], Pt.setClickEvent(rt[ot - 4], rt[ot - 3], rt[ot - 2]), Pt.setTooltip(rt[ot - 4], rt[ot]);
break;
case 105:
case 111:
this.$ = rt[ot - 1], Pt.setLink(rt[ot - 1], rt[ot]);
break;
case 106:
case 112:
this.$ = rt[ot - 3], Pt.setLink(rt[ot - 3], rt[ot - 2]), Pt.setTooltip(rt[ot - 3], rt[ot]);
break;
case 107:
case 113:
this.$ = rt[ot - 3], Pt.setLink(rt[ot - 3], rt[ot - 2], rt[ot]);
break;
case 108:
case 114:
this.$ = rt[ot - 5], Pt.setLink(rt[ot - 5], rt[ot - 4], rt[ot]), Pt.setTooltip(rt[ot - 5], rt[ot - 2]);
break;
case 115:
this.$ = rt[ot - 4], Pt.addVertex(rt[ot - 2], void 0, void 0, rt[ot]);
break;
case 116:
case 118:
this.$ = rt[ot - 4], Pt.updateLink(rt[ot - 2], rt[ot]);
break;
case 117:
this.$ = rt[ot - 4], Pt.updateLink([rt[ot - 2]], rt[ot]);
break;
case 119:
this.$ = rt[ot - 8], Pt.updateLinkInterpolate([rt[ot - 6]], rt[ot - 2]), Pt.updateLink([rt[ot - 6]], rt[ot]);
break;
case 120:
this.$ = rt[ot - 8], Pt.updateLinkInterpolate(rt[ot - 6], rt[ot - 2]), Pt.updateLink(rt[ot - 6], rt[ot]);
break;
case 121:
this.$ = rt[ot - 6], Pt.updateLinkInterpolate([rt[ot - 4]], rt[ot]);
break;
case 122:
this.$ = rt[ot - 6], Pt.updateLinkInterpolate(rt[ot - 4], rt[ot]);
break;
case 123:
case 125:
this.$ = [rt[ot]];
break;
case 124:
case 126:
rt[ot - 2].push(rt[ot]), this.$ = rt[ot - 2];
break;
case 128:
this.$ = rt[ot - 1] + rt[ot];
break;
case 150:
this.$ = rt[ot];
break;
case 151:
this.$ = rt[ot - 1] + "" + rt[ot];
break;
case 156:
this.$ = "v";
break;
case 157:
this.$ = "-";
break;
case 158:
this.$ = { stmt: "dir", value: "TB" };
break;
case 159:
this.$ = { stmt: "dir", value: "BT" };
break;
case 160:
this.$ = { stmt: "dir", value: "RL" };
break;
case 161:
this.$ = { stmt: "dir", value: "LR" };
break;
}
},
table: [{ 3: 1, 4: 2, 5: 3, 6: 5, 12: e, 16: 4, 21: r, 22: n, 24: i }, { 1: [3] }, { 1: [2, 1] }, { 3: 10, 4: 2, 5: 3, 6: 5, 12: e, 16: 4, 21: r, 22: n, 24: i }, t(a, s, { 17: 11 }), { 7: 12, 13: [1, 13] }, { 16: 14, 21: r, 22: n, 24: i }, { 16: 15, 21: r, 22: n, 24: i }, { 25: [1, 16], 26: [1, 17] }, { 13: [2, 5] }, { 1: [2, 2] }, { 1: [2, 9], 18: 18, 19: 19, 20: o, 21: l, 22: u, 23: h, 32: 24, 33: 25, 34: 26, 35: 27, 36: 28, 37: 29, 38: d, 43: 31, 44: f, 46: p, 48: m, 50: 35, 51: 45, 52: _, 54: 46, 66: y, 67: b, 86: x, 87: k, 88: T, 89: C, 90: M, 91: S, 95: R, 105: A, 106: L, 109: v, 111: B, 112: w, 116: 47, 118: D, 119: N, 120: z, 121: X, 122: ct, 123: J, 124: Y, 125: $, 126: lt, 127: ut }, { 8: 64, 10: [1, 65], 15: W }, t([10, 15], [2, 6]), t(a, [2, 17]), t(a, [2, 18]), t(a, [2, 19]), { 20: [1, 68], 21: [1, 69], 22: tt, 27: 67, 30: 70 }, t(K, [2, 11]), t(K, [2, 12]), t(K, [2, 13]), t(K, [2, 14]), t(K, [2, 15]), t(K, [2, 16]), { 9: 72, 20: it, 21: Z, 23: V, 49: 73, 78: 77, 81: [1, 78], 82: [1, 79] }, { 9: 80, 20: it, 21: Z, 23: V }, { 9: 81, 20: it, 21: Z, 23: V }, { 9: 82, 20: it, 21: Z, 23: V }, { 9: 83, 20: it, 21: Z, 23: V }, { 9: 84, 20: it, 21: Z, 23: V }, { 9: 86, 20: it, 21: Z, 22: [1, 85], 23: V }, t(K, [2, 44]), { 45: [1, 87] }, { 47: [1, 88] }, t(K, [2, 47]), t(Q, [2, 54], { 30: 89, 22: tt }), { 22: [1, 90] }, { 22: [1, 91] }, { 22: [1, 92] }, { 22: [1, 93] }, { 26: q, 52: U, 66: F, 67: j, 84: [1, 97], 91: P, 97: 96, 98: [1, 94], 100: [1, 95], 105: et, 106: at, 109: It, 111: Lt, 112: Rt, 115: 100, 117: 98, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, t(K, [2, 158]), t(K, [2, 159]), t(K, [2, 160]), t(K, [2, 161]), t(le, [2, 55], { 53: [1, 116] }), t(Dt, [2, 74], { 116: 129, 40: [1, 117], 52: _, 55: [1, 118], 57: [1, 119], 59: [1, 120], 61: [1, 121], 63: [1, 122], 65: [1, 123], 66: y, 67: b, 69: [1, 124], 71: [1, 125], 73: [1, 126], 74: [1, 127], 76: [1, 128], 91: S, 95: R, 105: A, 106: L, 109: v, 111: B, 112: w, 122: ct, 123: J, 124: Y, 125: $, 126: lt, 127: ut }), t(Ht, [2, 150]), t(Ht, [2, 175]), t(Ht, [2, 176]), t(Ht, [2, 177]), t(Ht, [2, 178]), t(Ht, [2, 179]), t(Ht, [2, 180]), t(Ht, [2, 181]), t(Ht, [2, 182]), t(Ht, [2, 183]), t(Ht, [2, 184]), t(Ht, [2, 185]), t(Ht, [2, 186]), t(Ht, [2, 187]), t(Ht, [2, 188]), t(Ht, [2, 189]), t(Ht, [2, 190]), { 9: 130, 20: it, 21: Z, 23: V }, { 11: 131, 14: [1, 132] }, t($t, [2, 8]), t(a, [2, 20]), t(a, [2, 26]), t(a, [2, 27]), { 21: [1, 133] }, t(Qt, [2, 34], { 30: 134, 22: tt }), t(K, [2, 35]), { 50: 135, 51: 45, 52: _, 54: 46, 66: y, 67: b, 91: S, 95: R, 105: A, 106: L, 109: v, 111: B, 112: w, 116: 47, 122: ct, 123: J, 124: Y, 125: $, 126: lt, 127: ut }, t(we, [2, 48]), t(we, [2, 49]), t(we, [2, 50]), t(Gt, [2, 78], { 79: 136, 68: [1, 138], 80: [1, 137] }), { 22: Ft, 24: zt, 26: wt, 38: bt, 39: 139, 42: Et, 52: U, 66: F, 67: j, 73: kt, 81: Ut, 83: 140, 84: gt, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, t([52, 66, 67, 68, 80, 91, 95, 105, 106, 109, 111, 112, 122, 123, 124, 125, 126, 127], [2, 80]), t(K, [2, 36]), t(K, [2, 37]), t(K, [2, 38]), t(K, [2, 39]), t(K, [2, 40]), { 22: Ft, 24: zt, 26: wt, 38: bt, 39: 163, 42: Et, 52: U, 66: F, 67: j, 73: kt, 81: Ut, 83: 140, 84: gt, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, t(Ui, s, { 17: 164 }), t(K, [2, 45]), t(K, [2, 46]), t(Q, [2, 53], { 52: Or }), { 26: q, 52: U, 66: F, 67: j, 91: P, 97: 166, 102: [1, 167], 105: et, 106: at, 109: It, 111: Lt, 112: Rt, 115: 100, 117: 98, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 95: [1, 168], 103: 169, 105: [1, 170] }, { 26: q, 52: U, 66: F, 67: j, 91: P, 95: [1, 171], 97: 172, 105: et, 106: at, 109: It, 111: Lt, 112: Rt, 115: 100, 117: 98, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 26: q, 52: U, 66: F, 67: j, 91: P, 97: 173, 105: et, 106: at, 109: It, 111: Lt, 112: Rt, 115: 100, 117: 98, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, t($t, [2, 101], { 22: [1, 174], 99: [1, 175] }), t($t, [2, 105], { 22: [1, 176] }), t($t, [2, 109], { 115: 100, 117: 178, 22: [1, 177], 26: q, 52: U, 66: F, 67: j, 91: P, 105: et, 106: at, 109: It, 111: Lt, 112: Rt, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }), t($t, [2, 111], { 22: [1, 179] }), t(Ie, [2, 152]), t(Ie, [2, 154]), t(Ie, [2, 155]), t(Ie, [2, 156]), t(Ie, [2, 157]), t(se, [2, 162]), t(se, [2, 163]), t(se, [2, 164]), t(se, [2, 165]), t(se, [2, 166]), t(se, [2, 167]), t(se, [2, 168]), t(se, [2, 169]), t(se, [2, 170]), t(se, [2, 171]), t(se, [2, 172]), t(se, [2, 173]), t(se, [2, 174]), { 52: _, 54: 180, 66: y, 67: b, 91: S, 95: R, 105: A, 106: L, 109: v, 111: B, 112: w, 116: 47, 122: ct, 123: J, 124: Y, 125: $, 126: lt, 127: ut }, { 22: Ft, 24: zt, 26: wt, 38: bt, 39: 181, 42: Et, 52: U, 66: F, 67: j, 73: kt, 81: Ut, 83: 140, 84: gt, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 22: Ft, 24: zt, 26: wt, 38: bt, 39: 182, 42: Et, 52: U, 66: F, 67: j, 73: kt, 81: Ut, 83: 140, 84: gt, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 22: Ft, 24: zt, 26: wt, 38: bt, 39: 184, 42: Et, 52: U, 57: [1, 183], 66: F, 67: j, 73: kt, 81: Ut, 83: 140, 84: gt, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 22: Ft, 24: zt, 26: wt, 38: bt, 39: 185, 42: Et, 52: U, 66: F, 67: j, 73: kt, 81: Ut, 83: 140, 84: gt, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 22: Ft, 24: zt, 26: wt, 38: bt, 39: 186, 42: Et, 52: U, 66: F, 67: j, 73: kt, 81: Ut, 83: 140, 84: gt, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 22: Ft, 24: zt, 26: wt, 38: bt, 39: 187, 42: Et, 52: U, 66: F, 67: j, 73: kt, 81: Ut, 83: 140, 84: gt, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 66: [1, 188] }, { 22: Ft, 24: zt, 26: wt, 38: bt, 39: 189, 42: Et, 52: U, 66: F, 67: j, 73: kt, 81: Ut, 83: 140, 84: gt, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 22: Ft, 24: zt, 26: wt, 38: bt, 39: 190, 42: Et, 52: U, 66: F, 67: j, 71: [1, 191], 73: kt, 81: Ut, 83: 140, 84: gt, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 22: Ft, 24: zt, 26: wt, 38: bt, 39: 192, 42: Et, 52: U, 66: F, 67: j, 73: kt, 81: Ut, 83: 140, 84: gt, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 22: Ft, 24: zt, 26: wt, 38: bt, 39: 193, 42: Et, 52: U, 66: F, 67: j, 73: kt, 81: Ut, 83: 140, 84: gt, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 22: Ft, 24: zt, 26: wt, 38: bt, 39: 194, 42: Et, 52: U, 66: F, 67: j, 73: kt, 81: Ut, 83: 140, 84: gt, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, t(Ht, [2, 151]), t($e, [2, 3]), { 8: 195, 15: W }, { 15: [2, 7] }, t(a, [2, 28]), t(Qt, [2, 33]), t(Q, [2, 51], { 30: 196, 22: tt }), t(Gt, [2, 75], { 22: [1, 197] }), { 22: [1, 198] }, { 22: Ft, 24: zt, 26: wt, 38: bt, 39: 199, 42: Et, 52: U, 66: F, 67: j, 73: kt, 81: Ut, 83: 140, 84: gt, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 22: Ft, 24: zt, 26: wt, 38: bt, 42: Et, 52: U, 66: F, 67: j, 73: kt, 81: Ut, 82: [1, 200], 83: 201, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, t(se, [2, 82]), t(se, [2, 84]), t(se, [2, 140]), t(se, [2, 141]), t(se, [2, 142]), t(se, [2, 143]), t(se, [2, 144]), t(se, [2, 145]), t(se, [2, 146]), t(se, [2, 147]), t(se, [2, 148]), t(se, [2, 149]), t(se, [2, 85]), t(se, [2, 86]), t(se, [2, 87]), t(se, [2, 88]), t(se, [2, 89]), t(se, [2, 90]), t(se, [2, 91]), t(se, [2, 92]), t(se, [2, 93]), t(se, [2, 94]), t(se, [2, 95]), { 9: 203, 20: it, 21: Z, 22: Ft, 23: V, 24: zt, 26: wt, 38: bt, 40: [1, 202], 42: Et, 52: U, 66: F, 67: j, 73: kt, 81: Ut, 83: 201, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 18: 18, 19: 19, 20: o, 21: l, 22: u, 23: h, 32: 24, 33: 25, 34: 26, 35: 27, 36: 28, 37: 29, 38: d, 42: [1, 204], 43: 31, 44: f, 46: p, 48: m, 50: 35, 51: 45, 52: _, 54: 46, 66: y, 67: b, 86: x, 87: k, 88: T, 89: C, 90: M, 91: S, 95: R, 105: A, 106: L, 109: v, 111: B, 112: w, 116: 47, 118: D, 119: N, 120: z, 121: X, 122: ct, 123: J, 124: Y, 125: $, 126: lt, 127: ut }, { 22: tt, 30: 205 }, { 22: [1, 206], 26: q, 52: U, 66: F, 67: j, 91: P, 105: et, 106: at, 109: It, 111: Lt, 112: Rt, 115: 100, 117: 178, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 22: [1, 207] }, { 22: [1, 208] }, { 22: [1, 209], 106: [1, 210] }, t(_r, [2, 123]), { 22: [1, 211] }, { 22: [1, 212], 26: q, 52: U, 66: F, 67: j, 91: P, 105: et, 106: at, 109: It, 111: Lt, 112: Rt, 115: 100, 117: 178, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 22: [1, 213], 26: q, 52: U, 66: F, 67: j, 91: P, 105: et, 106: at, 109: It, 111: Lt, 112: Rt, 115: 100, 117: 178, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 84: [1, 214] }, t($t, [2, 103], { 22: [1, 215] }), { 84: [1, 216], 101: [1, 217] }, { 84: [1, 218] }, t(Ie, [2, 153]), { 84: [1, 219], 101: [1, 220] }, t(le, [2, 57], { 116: 129, 52: _, 66: y, 67: b, 91: S, 95: R, 105: A, 106: L, 109: v, 111: B, 112: w, 122: ct, 123: J, 124: Y, 125: $, 126: lt, 127: ut }), { 22: Ft, 24: zt, 26: wt, 38: bt, 41: [1, 221], 42: Et, 52: U, 66: F, 67: j, 73: kt, 81: Ut, 83: 201, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 22: Ft, 24: zt, 26: wt, 38: bt, 42: Et, 52: U, 56: [1, 222], 66: F, 67: j, 73: kt, 81: Ut, 83: 201, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 22: Ft, 24: zt, 26: wt, 38: bt, 39: 223, 42: Et, 52: U, 66: F, 67: j, 73: kt, 81: Ut, 83: 140, 84: gt, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 22: Ft, 24: zt, 26: wt, 38: bt, 42: Et, 52: U, 58: [1, 224], 66: F, 67: j, 73: kt, 81: Ut, 83: 201, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 22: Ft, 24: zt, 26: wt, 38: bt, 42: Et, 52: U, 60: [1, 225], 66: F, 67: j, 73: kt, 81: Ut, 83: 201, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 22: Ft, 24: zt, 26: wt, 38: bt, 42: Et, 52: U, 62: [1, 226], 66: F, 67: j, 73: kt, 81: Ut, 83: 201, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 22: Ft, 24: zt, 26: wt, 38: bt, 42: Et, 52: U, 64: [1, 227], 66: F, 67: j, 73: kt, 81: Ut, 83: 201, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 67: [1, 228] }, { 22: Ft, 24: zt, 26: wt, 38: bt, 42: Et, 52: U, 66: F, 67: j, 70: [1, 229], 73: kt, 81: Ut, 83: 201, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 22: Ft, 24: zt, 26: wt, 38: bt, 42: Et, 52: U, 66: F, 67: j, 72: [1, 230], 73: kt, 81: Ut, 83: 201, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 22: Ft, 24: zt, 26: wt, 38: bt, 39: 231, 42: Et, 52: U, 66: F, 67: j, 73: kt, 81: Ut, 83: 140, 84: gt, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 22: Ft, 24: zt, 26: wt, 38: bt, 41: [1, 232], 42: Et, 52: U, 66: F, 67: j, 73: kt, 81: Ut, 83: 201, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 22: Ft, 24: zt, 26: wt, 38: bt, 42: Et, 52: U, 66: F, 67: j, 73: kt, 75: [1, 233], 77: [1, 234], 81: Ut, 83: 201, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 22: Ft, 24: zt, 26: wt, 38: bt, 42: Et, 52: U, 66: F, 67: j, 73: kt, 75: [1, 236], 77: [1, 235], 81: Ut, 83: 201, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 9: 237, 20: it, 21: Z, 23: V }, t(Q, [2, 52], { 52: Or }), t(Gt, [2, 77]), t(Gt, [2, 76]), { 22: Ft, 24: zt, 26: wt, 38: bt, 42: Et, 52: U, 66: F, 67: j, 68: [1, 238], 73: kt, 81: Ut, 83: 201, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, t(Gt, [2, 79]), t(se, [2, 83]), { 22: Ft, 24: zt, 26: wt, 38: bt, 39: 239, 42: Et, 52: U, 66: F, 67: j, 73: kt, 81: Ut, 83: 140, 84: gt, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, t(Ui, s, { 17: 240 }), t(K, [2, 43]), { 51: 241, 52: _, 54: 46, 66: y, 67: b, 91: S, 95: R, 105: A, 106: L, 109: v, 111: B, 112: w, 116: 47, 122: ct, 123: J, 124: Y, 125: $, 126: lt, 127: ut }, { 22: He, 66: Xe, 67: qt, 86: st, 96: 242, 102: At, 105: Nt, 107: 243, 108: 244, 109: Jt, 110: ze, 111: Oe, 112: Fe, 113: vr }, { 22: He, 66: Xe, 67: qt, 86: st, 96: 256, 102: At, 105: Nt, 107: 243, 108: 244, 109: Jt, 110: ze, 111: Oe, 112: Fe, 113: vr }, { 22: He, 66: Xe, 67: qt, 86: st, 96: 257, 102: At, 104: [1, 258], 105: Nt, 107: 243, 108: 244, 109: Jt, 110: ze, 111: Oe, 112: Fe, 113: vr }, { 22: He, 66: Xe, 67: qt, 86: st, 96: 259, 102: At, 104: [1, 260], 105: Nt, 107: 243, 108: 244, 109: Jt, 110: ze, 111: Oe, 112: Fe, 113: vr }, { 105: [1, 261] }, { 22: He, 66: Xe, 67: qt, 86: st, 96: 262, 102: At, 105: Nt, 107: 243, 108: 244, 109: Jt, 110: ze, 111: Oe, 112: Fe, 113: vr }, { 22: He, 66: Xe, 67: qt, 86: st, 96: 263, 102: At, 105: Nt, 107: 243, 108: 244, 109: Jt, 110: ze, 111: Oe, 112: Fe, 113: vr }, { 26: q, 52: U, 66: F, 67: j, 91: P, 97: 264, 105: et, 106: at, 109: It, 111: Lt, 112: Rt, 115: 100, 117: 98, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, t($t, [2, 102]), { 84: [1, 265] }, t($t, [2, 106], { 22: [1, 266] }), t($t, [2, 107]), t($t, [2, 110]), t($t, [2, 112], { 22: [1, 267] }), t($t, [2, 113]), t(Dt, [2, 58]), t(Dt, [2, 59]), { 22: Ft, 24: zt, 26: wt, 38: bt, 42: Et, 52: U, 58: [1, 268], 66: F, 67: j, 73: kt, 81: Ut, 83: 201, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, t(Dt, [2, 66]), t(Dt, [2, 61]), t(Dt, [2, 62]), t(Dt, [2, 63]), { 66: [1, 269] }, t(Dt, [2, 65]), t(Dt, [2, 67]), { 22: Ft, 24: zt, 26: wt, 38: bt, 42: Et, 52: U, 66: F, 67: j, 72: [1, 270], 73: kt, 81: Ut, 83: 201, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, t(Dt, [2, 69]), t(Dt, [2, 70]), t(Dt, [2, 72]), t(Dt, [2, 71]), t(Dt, [2, 73]), t($e, [2, 4]), t([22, 52, 66, 67, 91, 95, 105, 106, 109, 111, 112, 122, 123, 124, 125, 126, 127], [2, 81]), { 22: Ft, 24: zt, 26: wt, 38: bt, 41: [1, 271], 42: Et, 52: U, 66: F, 67: j, 73: kt, 81: Ut, 83: 201, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 18: 18, 19: 19, 20: o, 21: l, 22: u, 23: h, 32: 24, 33: 25, 34: 26, 35: 27, 36: 28, 37: 29, 38: d, 42: [1, 272], 43: 31, 44: f, 46: p, 48: m, 50: 35, 51: 45, 52: _, 54: 46, 66: y, 67: b, 86: x, 87: k, 88: T, 89: C, 90: M, 91: S, 95: R, 105: A, 106: L, 109: v, 111: B, 112: w, 116: 47, 118: D, 119: N, 120: z, 121: X, 122: ct, 123: J, 124: Y, 125: $, 126: lt, 127: ut }, t(le, [2, 56]), t($t, [2, 115], { 106: Ve }), t(Wi, [2, 125], { 108: 274, 22: He, 66: Xe, 67: qt, 86: st, 102: At, 105: Nt, 109: Jt, 110: ze, 111: Oe, 112: Fe, 113: vr }), t(Ee, [2, 127]), t(Ee, [2, 129]), t(Ee, [2, 130]), t(Ee, [2, 131]), t(Ee, [2, 132]), t(Ee, [2, 133]), t(Ee, [2, 134]), t(Ee, [2, 135]), t(Ee, [2, 136]), t(Ee, [2, 137]), t(Ee, [2, 138]), t(Ee, [2, 139]), t($t, [2, 116], { 106: Ve }), t($t, [2, 117], { 106: Ve }), { 22: [1, 275] }, t($t, [2, 118], { 106: Ve }), { 22: [1, 276] }, t(_r, [2, 124]), t($t, [2, 98], { 106: Ve }), t($t, [2, 99], { 106: Ve }), t($t, [2, 100], { 115: 100, 117: 178, 26: q, 52: U, 66: F, 67: j, 91: P, 105: et, 106: at, 109: It, 111: Lt, 112: Rt, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }), t($t, [2, 104]), { 101: [1, 277] }, { 101: [1, 278] }, { 58: [1, 279] }, { 68: [1, 280] }, { 72: [1, 281] }, { 9: 282, 20: it, 21: Z, 23: V }, t(K, [2, 42]), { 22: He, 66: Xe, 67: qt, 86: st, 102: At, 105: Nt, 107: 283, 108: 244, 109: Jt, 110: ze, 111: Oe, 112: Fe, 113: vr }, t(Ee, [2, 128]), { 26: q, 52: U, 66: F, 67: j, 91: P, 97: 284, 105: et, 106: at, 109: It, 111: Lt, 112: Rt, 115: 100, 117: 98, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 26: q, 52: U, 66: F, 67: j, 91: P, 97: 285, 105: et, 106: at, 109: It, 111: Lt, 112: Rt, 115: 100, 117: 98, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, t($t, [2, 108]), t($t, [2, 114]), t(Dt, [2, 60]), { 22: Ft, 24: zt, 26: wt, 38: bt, 39: 286, 42: Et, 52: U, 66: F, 67: j, 73: kt, 81: Ut, 83: 140, 84: gt, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, t(Dt, [2, 68]), t(Ui, s, { 17: 287 }), t(Wi, [2, 126], { 108: 274, 22: He, 66: Xe, 67: qt, 86: st, 102: At, 105: Nt, 109: Jt, 110: ze, 111: Oe, 112: Fe, 113: vr }), t($t, [2, 121], { 115: 100, 117: 178, 22: [1, 288], 26: q, 52: U, 66: F, 67: j, 91: P, 105: et, 106: at, 109: It, 111: Lt, 112: Rt, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }), t($t, [2, 122], { 115: 100, 117: 178, 22: [1, 289], 26: q, 52: U, 66: F, 67: j, 91: P, 105: et, 106: at, 109: It, 111: Lt, 112: Rt, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }), { 22: Ft, 24: zt, 26: wt, 38: bt, 41: [1, 290], 42: Et, 52: U, 66: F, 67: j, 73: kt, 81: Ut, 83: 201, 85: 151, 86: he, 87: yt, 88: re, 89: _e, 90: ge, 91: be, 92: Te, 94: 142, 95: Wt, 105: et, 106: at, 109: ae, 111: Lt, 112: Rt, 113: ye, 114: ue, 115: 148, 122: Ct, 123: pt, 124: mt, 125: _t, 126: Tt, 127: ft }, { 18: 18, 19: 19, 20: o, 21: l, 22: u, 23: h, 32: 24, 33: 25, 34: 26, 35: 27, 36: 28, 37: 29, 38: d, 42: [1, 291], 43: 31, 44: f, 46: p, 48: m, 50: 35, 51: 45, 52: _, 54: 46, 66: y, 67: b, 86: x, 87: k, 88: T, 89: C, 90: M, 91: S, 95: R, 105: A, 106: L, 109: v, 111: B, 112: w, 116: 47, 118: D, 119: N, 120: z, 121: X, 122: ct, 123: J, 124: Y, 125: $, 126: lt, 127: ut }, { 22: He, 66: Xe, 67: qt, 86: st, 96: 292, 102: At, 105: Nt, 107: 243, 108: 244, 109: Jt, 110: ze, 111: Oe, 112: Fe, 113: vr }, { 22: He, 66: Xe, 67: qt, 86: st, 96: 293, 102: At, 105: Nt, 107: 243, 108: 244, 109: Jt, 110: ze, 111: Oe, 112: Fe, 113: vr }, t(Dt, [2, 64]), t(K, [2, 41]), t($t, [2, 119], { 106: Ve }), t($t, [2, 120], { 106: Ve })],
defaultActions: { 2: [2, 1], 9: [2, 5], 10: [2, 2], 132: [2, 7] },
parseError: function(Xt, te) {
if (te.recoverable)
this.trace(Xt);
else {
var ce = new Error(Xt);
throw ce.hash = te, ce;
}
},
parse: function(Xt) {
var te = this, ce = [0], Pt = [], Ge = [null], rt = [], os = this.table, ot = "", Fr = 0, vu = 0, N0 = 2, xu = 1, ku = rt.slice.call(arguments, 1), fr = Object.create(this.lexer), _i = { yy: {} };
for (var vi in this.yy)
Object.prototype.hasOwnProperty.call(this.yy, vi) && (_i.yy[vi] = this.yy[vi]);
fr.setInput(Xt, _i.yy), _i.yy.lexer = fr, _i.yy.parser = this, typeof fr.yylloc > "u" && (fr.yylloc = {});
var ls = fr.yylloc;
rt.push(ls);
var vl = fr.options && fr.options.ranges;
typeof _i.yy.parseError == "function" ? this.parseError = _i.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
function wu() {
var wn;
return wn = Pt.pop() || fr.lex() || xu, typeof wn != "number" && (wn instanceof Array && (Pt = wn, wn = Pt.pop()), wn = te.symbols_[wn] || wn), wn;
}
for (var Ir, De, jr, Hi, Hn = {}, Gi, kn, xl, to; ; ) {
if (De = ce[ce.length - 1], this.defaultActions[De] ? jr = this.defaultActions[De] : ((Ir === null || typeof Ir > "u") && (Ir = wu()), jr = os[De] && os[De][Ir]), typeof jr > "u" || !jr.length || !jr[0]) {
var cs = "";
to = [];
for (Gi in os[De])
this.terminals_[Gi] && Gi > N0 && to.push("'" + this.terminals_[Gi] + "'");
fr.showPosition ? cs = "Parse error on line " + (Fr + 1) + `:
` + fr.showPosition() + `
Expecting ` + to.join(", ") + ", got '" + (this.terminals_[Ir] || Ir) + "'" : cs = "Parse error on line " + (Fr + 1) + ": Unexpected " + (Ir == xu ? "end of input" : "'" + (this.terminals_[Ir] || Ir) + "'"), this.parseError(cs, {
text: fr.match,
token: this.terminals_[Ir] || Ir,
line: fr.yylineno,
loc: ls,
expected: to
});
}
if (jr[0] instanceof Array && jr.length > 1)
throw new Error("Parse Error: multiple actions possible at state: " + De + ", token: " + Ir);
switch (jr[0]) {
case 1:
ce.push(Ir), Ge.push(fr.yytext), rt.push(fr.yylloc), ce.push(jr[1]), Ir = null, vu = fr.yyleng, ot = fr.yytext, Fr = fr.yylineno, ls = fr.yylloc;
break;
case 2:
if (kn = this.productions_[jr[1]][1], Hn.$ = Ge[Ge.length - kn], Hn._$ = {
first_line: rt[rt.length - (kn || 1)].first_line,
last_line: rt[rt.length - 1].last_line,
first_column: rt[rt.length - (kn || 1)].first_column,
last_column: rt[rt.length - 1].last_column
}, vl && (Hn._$.range = [
rt[rt.length - (kn || 1)].range[0],
rt[rt.length - 1].range[1]
]), Hi = this.performAction.apply(Hn, [
ot,
vu,
Fr,
_i.yy,
jr[1],
Ge,
rt
].concat(ku)), typeof Hi < "u")
return Hi;
kn && (ce = ce.slice(0, -1 * kn * 2), Ge = Ge.slice(0, -1 * kn), rt = rt.slice(0, -1 * kn)), ce.push(this.productions_[jr[1]][0]), Ge.push(Hn.$), rt.push(Hn._$), xl = os[ce[ce.length - 2]][ce[ce.length - 1]], ce.push(xl);
break;
case 3:
return !0;
}
}
return !0;
}
}, _u = function() {
var xn = {
EOF: 1,
parseError: function(te, ce) {
if (this.yy.parser)
this.yy.parser.parseError(te, ce);
else
throw new Error(te);
},
setInput: function(Xt, te) {
return this.yy = te || this.yy || {}, this._input = Xt, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
first_line: 1,
first_column: 0,
last_line: 1,
last_column: 0
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
},
input: function() {
var Xt = this._input[0];
this.yytext += Xt, this.yyleng++, this.offset++, this.match += Xt, this.matched += Xt;
var te = Xt.match(/(?:\r\n?|\n).*/g);
return te ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), Xt;
},
unput: function(Xt) {
var te = Xt.length, ce = Xt.split(/(?:\r\n?|\n)/g);
this._input = Xt + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - te), this.offset -= te;
var Pt = this.match.split(/(?:\r\n?|\n)/g);
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), ce.length - 1 && (this.yylineno -= ce.length - 1);
var Ge = this.yylloc.range;
return this.yylloc = {
first_line: this.yylloc.first_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.first_column,
last_column: ce ? (ce.length === Pt.length ? this.yylloc.first_column : 0) + Pt[Pt.length - ce.length].length - ce[0].length : this.yylloc.first_column - te
}, this.options.ranges && (this.yylloc.range = [Ge[0], Ge[0] + this.yyleng - te]), this.yyleng = this.yytext.length, this;
},
more: function() {
return this._more = !0, this;
},
reject: function() {
if (this.options.backtrack_lexer)
this._backtrack = !0;
else
return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
return this;
},
less: function(Xt) {
this.unput(this.match.slice(Xt));
},
pastInput: function() {
var Xt = this.matched.substr(0, this.matched.length - this.match.length);
return (Xt.length > 20 ? "..." : "") + Xt.substr(-20).replace(/\n/g, "");
},
upcomingInput: function() {
var Xt = this.match;
return Xt.length < 20 && (Xt += this._input.substr(0, 20 - Xt.length)), (Xt.substr(0, 20) + (Xt.length > 20 ? "..." : "")).replace(/\n/g, "");
},
showPosition: function() {
var Xt = this.pastInput(), te = new Array(Xt.length + 1).join("-");
return Xt + this.upcomingInput() + `
` + te + "^";
},
test_match: function(Xt, te) {
var ce, Pt, Ge;
if (this.options.backtrack_lexer && (Ge = {
yylineno: this.yylineno,
yylloc: {
first_line: this.yylloc.first_line,
last_line: this.last_line,
first_column: this.yylloc.first_column,
last_column: this.yylloc.last_column
},
yytext: this.yytext,
match: this.match,
matches: this.matches,
matched: this.matched,
yyleng: this.yyleng,
offset: this.offset,
_more: this._more,
_input: this._input,
yy: this.yy,
conditionStack: this.conditionStack.slice(0),
done: this.done
}, this.options.ranges && (Ge.yylloc.range = this.yylloc.range.slice(0))), Pt = Xt[0].match(/(?:\r\n?|\n).*/g), Pt && (this.yylineno += Pt.length), this.yylloc = {
first_line: this.yylloc.last_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.last_column,
last_column: Pt ? Pt[Pt.length - 1].length - Pt[Pt.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + Xt[0].length
}, this.yytext += Xt[0], this.match += Xt[0], this.matches = Xt, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(Xt[0].length), this.matched += Xt[0], ce = this.performAction.call(this, this.yy, this, te, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), ce)
return ce;
if (this._backtrack) {
for (var rt in Ge)
this[rt] = Ge[rt];
return !1;
}
return !1;
},
next: function() {
if (this.done)
return this.EOF;
this._input || (this.done = !0);
var Xt, te, ce, Pt;
this._more || (this.yytext = "", this.match = "");
for (var Ge = this._currentRules(), rt = 0; rt < Ge.length; rt++)
if (ce = this._input.match(this.rules[Ge[rt]]), ce && (!te || ce[0].length > te[0].length)) {
if (te = ce, Pt = rt, this.options.backtrack_lexer) {
if (Xt = this.test_match(ce, Ge[rt]), Xt !== !1)
return Xt;
if (this._backtrack) {
te = !1;
continue;
} else
return !1;
} else if (!this.options.flex)
break;
}
return te ? (Xt = this.test_match(te, Ge[Pt]), Xt !== !1 ? Xt : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
},
lex: function() {
var te = this.next();
return te || this.lex();
},
begin: function(te) {
this.conditionStack.push(te);
},
popState: function() {
var te = this.conditionStack.length - 1;
return te > 0 ? this.conditionStack.pop() : this.conditionStack[0];
},
_currentRules: function() {
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
},
topState: function(te) {
return te = this.conditionStack.length - 1 - Math.abs(te || 0), te >= 0 ? this.conditionStack[te] : "INITIAL";
},
pushState: function(te) {
this.begin(te);
},
stateStackSize: function() {
return this.conditionStack.length;
},
options: {},
performAction: function(te, ce, Pt, Ge) {
switch (Pt) {
case 0:
return this.begin("open_directive"), 12;
case 1:
return this.begin("type_directive"), 13;
case 2:
return this.popState(), this.begin("arg_directive"), 10;
case 3:
return this.popState(), this.popState(), 15;
case 4:
return 14;
case 5:
break;
case 6:
break;
case 7:
return this.begin("acc_title"), 44;
case 8:
return this.popState(), "acc_title_value";
case 9:
return this.begin("acc_descr"), 46;
case 10:
return this.popState(), "acc_descr_value";
case 11:
this.begin("acc_descr_multiline");
break;
case 12:
this.popState();
break;
case 13:
return "acc_descr_multiline_value";
case 14:
this.begin("string");
break;
case 15:
this.popState();
break;
case 16:
return "STR";
case 17:
return 86;
case 18:
return 95;
case 19:
return 87;
case 20:
return 104;
case 21:
return 88;
case 22:
return 89;
case 23:
this.begin("href");
break;
case 24:
this.popState();
break;
case 25:
return 100;
case 26:
this.begin("callbackname");
break;
case 27:
this.popState();
break;
case 28:
this.popState(), this.begin("callbackargs");
break;
case 29:
return 98;
case 30:
this.popState();
break;
case 31:
return 99;
case 32:
this.begin("click");
break;
case 33:
this.popState();
break;
case 34:
return 90;
case 35:
return te.lex.firstGraph() && this.begin("dir"), 24;
case 36:
return te.lex.firstGraph() && this.begin("dir"), 24;
case 37:
return 38;
case 38:
return 42;
case 39:
return 101;
case 40:
return 101;
case 41:
return 101;
case 42:
return 101;
case 43:
return this.popState(), 25;
case 44:
return this.popState(), 26;
case 45:
return this.popState(), 26;
case 46:
return this.popState(), 26;
case 47:
return this.popState(), 26;
case 48:
return this.popState(), 26;
case 49:
return this.popState(), 26;
case 50:
return this.popState(), 26;
case 51:
return this.popState(), 26;
case 52:
return this.popState(), 26;
case 53:
return this.popState(), 26;
case 54:
return 118;
case 55:
return 119;
case 56:
return 120;
case 57:
return 121;
case 58:
return 105;
case 59:
return 111;
case 60:
return 53;
case 61:
return 67;
case 62:
return 52;
case 63:
return 20;
case 64:
return 106;
case 65:
return 126;
case 66:
return 82;
case 67:
return 82;
case 68:
return 82;
case 69:
return 82;
case 70:
return 81;
case 71:
return 81;
case 72:
return 81;
case 73:
return 59;
case 74:
return 60;
case 75:
return 61;
case 76:
return 62;
case 77:
return 63;
case 78:
return 64;
case 79:
return 65;
case 80:
return 69;
case 81:
return 70;
case 82:
return 55;
case 83:
return 56;
case 84:
return 109;
case 85:
return 112;
case 86:
return 127;
case 87:
return 124;
case 88:
return 113;
case 89:
return 125;
case 90:
return 125;
case 91:
return 114;
case 92:
return 73;
case 93:
return 92;
case 94:
return "SEP";
case 95:
return 91;
case 96:
return 66;
case 97:
return 75;
case 98:
return 74;
case 99:
return 77;
case 100:
return 76;
case 101:
return 122;
case 102:
return 123;
case 103:
return 68;
case 104:
return 57;
case 105:
return 58;
case 106:
return 40;
case 107:
return 41;
case 108:
return 71;
case 109:
return 72;
case 110:
return 133;
case 111:
return 21;
case 112:
return 22;
case 113:
return 23;
}
},
rules: [/^(?:%%\{)/, /^(?:((?:(?!\}%%)[^:.])*))/, /^(?::)/, /^(?:\}%%)/, /^(?:((?:(?!\}%%).|\n)*))/, /^(?:%%(?!\{)[^\n]*)/, /^(?:[^\}]%%[^\n]*)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:["])/, /^(?:["])/, /^(?:[^"]*)/, /^(?:style\b)/, /^(?:default\b)/, /^(?:linkStyle\b)/, /^(?:interpolate\b)/, /^(?:classDef\b)/, /^(?:class\b)/, /^(?:href[\s]+["])/, /^(?:["])/, /^(?:[^"]*)/, /^(?:call[\s]+)/, /^(?:\([\s]*\))/, /^(?:\()/, /^(?:[^(]*)/, /^(?:\))/, /^(?:[^)]*)/, /^(?:click[\s]+)/, /^(?:[\s\n])/, /^(?:[^\s\n]*)/, /^(?:graph\b)/, /^(?:flowchart\b)/, /^(?:subgraph\b)/, /^(?:end\b\s*)/, /^(?:_self\b)/, /^(?:_blank\b)/, /^(?:_parent\b)/, /^(?:_top\b)/, /^(?:(\r?\n)*\s*\n)/, /^(?:\s*LR\b)/, /^(?:\s*RL\b)/, /^(?:\s*TB\b)/, /^(?:\s*BT\b)/, /^(?:\s*TD\b)/, /^(?:\s*BR\b)/, /^(?:\s*<)/, /^(?:\s*>)/, /^(?:\s*\^)/, /^(?:\s*v\b)/, /^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:[0-9]+)/, /^(?:#)/, /^(?::::)/, /^(?::)/, /^(?:&)/, /^(?:;)/, /^(?:,)/, /^(?:\*)/, /^(?:\s*[xo<]?--+[-xo>]\s*)/, /^(?:\s*[xo<]?==+[=xo>]\s*)/, /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/, /^(?:\s*~~[\~]+\s*)/, /^(?:\s*[xo<]?--\s*)/, /^(?:\s*[xo<]?==\s*)/, /^(?:\s*[xo<]?-\.\s*)/, /^(?:\(-)/, /^(?:-\))/, /^(?:\(\[)/, /^(?:\]\))/, /^(?:\[\[)/, /^(?:\]\])/, /^(?:\[\|)/, /^(?:\[\()/, /^(?:\)\])/, /^(?:\(\(\()/, /^(?:\)\)\))/, /^(?:-)/, /^(?:\.)/, /^(?:[\_])/, /^(?:\+)/, /^(?:%)/, /^(?:=)/, /^(?:=)/, /^(?:<)/, /^(?:>)/, /^(?:\^)/, /^(?:\\\|)/, /^(?:v\b)/, /^(?:[A-Za-z]+)/, /^(?:\\\])/, /^(?:\[\/)/, /^(?:\/\])/, /^(?:\[\\)/, /^(?:[!"#$%&'*+,-.`?\\_/])/, /^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/, /^(?:\|)/, /^(?:\()/, /^(?:\))/, /^(?:\[)/, /^(?:\])/, /^(?:\{)/, /^(?:\})/, /^(?:")/, /^(?:(\r?\n)+)/, /^(?:\s)/, /^(?:$)/],
conditions: { close_directive: { rules: [], inclusive: !1 }, arg_directive: { rules: [3, 4], inclusive: !1 }, type_directive: { rules: [2, 3], inclusive: !1 }, open_directive: { rules: [1], inclusive: !1 }, callbackargs: { rules: [30, 31], inclusive: !1 }, callbackname: { rules: [27, 28, 29], inclusive: !1 }, href: { rules: [24, 25], inclusive: !1 }, click: { rules: [33, 34], inclusive: !1 }, vertex: { rules: [], inclusive: !1 }, dir: { rules: [43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53], inclusive: !1 }, acc_descr_multiline: { rules: [12, 13], inclusive: !1 }, acc_descr: { rules: [10], inclusive: !1 }, acc_title: { rules: [8], inclusive: !1 }, string: { rules: [15, 16], inclusive: !1 }, INITIAL: { rules: [0, 5, 6, 7, 9, 11, 14, 17, 18, 19, 20, 21, 22, 23, 26, 32, 35, 36, 37, 38, 39, 40, 41, 42, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113], inclusive: !0 } }
};
return xn;
}();
bi.lexer = _u;
function _l() {
this.yy = {};
}
return _l.prototype = bi, bi.Parser = _l, new _l();
}();
Kf.parser = Kf;
const ont = (t, e) => {
var r;
return ((r = e == null ? void 0 : e.flowchart) == null ? void 0 : r.defaultRenderer) === "dagre-wrapper" ? !1 : t.match(/^\s*graph/) !== null;
}, lnt = (t, e) => {
var r;
return ((r = e == null ? void 0 : e.flowchart) == null ? void 0 : r.defaultRenderer) === "dagre-wrapper" && t.match(/^\s*graph/) !== null ? !0 : t.match(/^\s*flowchart/) !== null;
}, cnt = "flowchart-";
let cw = 0, a_ = nt(), nr = {}, Ys = [], xo = [], Pi = [], Zf = {}, s_ = {}, Dh = 0, Lb = !0, ki, k0, w0 = [];
const T0 = (t) => pe.sanitizeText(t, a_), unt = function(t, e, r) {
sr.parseDirective(this, t, e, r);
}, E0 = function(t) {
const e = Object.keys(nr);
for (let r = 0; r < e.length; r++)
if (nr[e[r]].id === t)
return nr[e[r]].domId;
return t;
}, hnt = function(t, e, r, n, i, a, s = {}) {
let o, l = t;
typeof l > "u" || l.trim().length !== 0 && (typeof nr[l] > "u" && (nr[l] = {
id: l,
domId: cnt + l + "-" + cw,
styles: [],
classes: []
}), cw++, typeof e < "u" ? (a_ = nt(), o = T0(e.trim()), o[0] === '"' && o[o.length - 1] === '"' && (o = o.substring(1, o.length - 1)), nr[l].text = o) : typeof nr[l].text > "u" && (nr[l].text = t), typeof r < "u" && (nr[l].type = r), typeof n < "u" && n !== null && n.forEach(function(u) {
nr[l].styles.push(u);
}), typeof i < "u" && i !== null && i.forEach(function(u) {
nr[l].classes.push(u);
}), typeof a < "u" && (nr[l].dir = a), nr[l].props = s);
}, fnt = function(t, e, r, n) {
const s = { start: t, end: e, type: void 0, text: "" };
n = r.text, typeof n < "u" && (s.text = T0(n.trim()), s.text[0] === '"' && s.text[s.text.length - 1] === '"' && (s.text = s.text.substring(1, s.text.length - 1))), typeof r < "u" && (s.type = r.type, s.stroke = r.stroke, s.length = r.length), Ys.push(s);
}, dnt = function(t, e, r, n) {
let i, a;
for (i = 0; i < t.length; i++)
for (a = 0; a < e.length; a++)
fnt(t[i], e[a], r, n);
}, pnt = function(t, e) {
t.forEach(function(r) {
r === "default" ? Ys.defaultInterpolate = e : Ys[r].interpolate = e;
});
}, gnt = function(t, e) {
t.forEach(function(r) {
r === "default" ? Ys.defaultStyle = e : (Re.isSubstringInArray("fill", e) === -1 && e.push("fill:none"), Ys[r].style = e);
});
}, ynt = function(t, e) {
typeof xo[t] > "u" && (xo[t] = { id: t, styles: [], textStyles: [] }), typeof e < "u" && e !== null && e.forEach(function(r) {
if (r.match("color")) {
const i = r.replace("fill", "bgFill").replace("color", "fill");
xo[t].textStyles.push(i);
}
xo[t].styles.push(r);
});
}, mnt = function(t) {
ki = t, ki.match(/.*) && (ki = "RL"), ki.match(/.*\^/) && (ki = "BT"), ki.match(/.*>/) && (ki = "LR"), ki.match(/.*v/) && (ki = "TB");
}, o_ = function(t, e) {
t.split(",").forEach(function(r) {
let n = r;
typeof nr[n] < "u" && nr[n].classes.push(e), typeof Zf[n] < "u" && Zf[n].classes.push(e);
});
}, bnt = function(t, e) {
t.split(",").forEach(function(r) {
typeof e < "u" && (s_[k0 === "gen-1" ? E0(r) : r] = T0(e));
});
}, _nt = function(t, e, r) {
let n = E0(t);
if (nt().securityLevel !== "loose" || typeof e > "u")
return;
let i = [];
if (typeof r == "string") {
i = r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
for (let a = 0; a < i.length; a++) {
let s = i[a].trim();
s.charAt(0) === '"' && s.charAt(s.length - 1) === '"' && (s = s.substr(1, s.length - 2)), i[a] = s;
}
}
i.length === 0 && i.push(t), typeof nr[t] < "u" && (nr[t].haveCallback = !0, w0.push(function() {
const a = document.querySelector(`[id="${n}"]`);
a !== null && a.addEventListener(
"click",
function() {
Re.runFunc(e, ...i);
},
!1
);
}));
}, vnt = function(t, e, r) {
t.split(",").forEach(function(n) {
typeof nr[n] < "u" && (nr[n].link = Re.formatUrl(e, a_), nr[n].linkTarget = r);
}), o_(t, "clickable");
}, xnt = function(t) {
return s_[t];
}, knt = function(t, e, r) {
t.split(",").forEach(function(n) {
_nt(n, e, r);
}), o_(t, "clickable");
}, wnt = function(t) {
w0.forEach(function(e) {
e(t);
});
}, Tnt = function() {
return ki.trim();
}, Ent = function() {
return nr;
}, Cnt = function() {
return Ys;
}, Snt = function() {
return xo;
}, lL = function(t) {
let e = St(".mermaidTooltip");
(e._groups || e)[0][0] === null && (e = St("body").append("div").attr("class", "mermaidTooltip").style("opacity", 0)), St(t).select("svg").selectAll("g.node").on("mouseover", function() {
const i = St(this);
if (i.attr("title") === null)
return;
const s = this.getBoundingClientRect();
e.transition().duration(200).style("opacity", ".9"), e.text(i.attr("title")).style("left", window.scrollX + s.left + (s.right - s.left) / 2 + "px").style("top", window.scrollY + s.top - 14 + document.body.scrollTop + "px"), e.html(e.html().replace(/<br\/>/g, "
")), i.classed("hover", !0);
}).on("mouseout", function() {
e.transition().duration(500).style("opacity", 0), St(this).classed("hover", !1);
});
};
w0.push(lL);
const Ant = function(t = "gen-1") {
nr = {}, xo = {}, Ys = [], w0 = [lL], Pi = [], Zf = {}, Dh = 0, s_ = [], Lb = !0, k0 = t, pi();
}, Mnt = (t) => {
k0 = t || "gen-1";
}, Lnt = function() {
return "fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;";
}, Rnt = function(t, e, r) {
let n = t.trim(), i = r.trim();
n === i && i.match(/\s/) && (n = void 0);
function a(h) {
const d = { boolean: {}, number: {}, string: {} }, f = [];
let p;
return { nodeList: h.filter(function(_) {
const y = typeof _;
return _.stmt && _.stmt === "dir" ? (p = _.value, !1) : _.trim() === "" ? !1 : y in d ? d[y].hasOwnProperty(_) ? !1 : d[y][_] = !0 : f.indexOf(_) >= 0 ? !1 : f.push(_);
}), dir: p };
}
let s = [];
const { nodeList: o, dir: l } = a(s.concat.apply(s, e));
if (s = o, k0 === "gen-1")
for (let h = 0; h < s.length; h++)
s[h] = E0(s[h]);
n = n || "subGraph" + Dh, i = i || "", i = T0(i), Dh = Dh + 1;
const u = { id: n, nodes: s, title: i.trim(), classes: [], dir: l };
return H.info("Adding", u.id, u.nodes, u.dir), u.nodes = fL(u, Pi).nodes, Pi.push(u), Zf[n] = u, n;
}, Int = function(t) {
for (let e = 0; e < Pi.length; e++)
if (Pi[e].id === t)
return e;
return -1;
};
let Zl = -1;
const cL = [], uL = function(t, e) {
const r = Pi[e].nodes;
if (Zl = Zl + 1, Zl > 2e3)
return;
if (cL[Zl] = e, Pi[e].id === t)
return {
result: !0,
count: 0
};
let n = 0, i = 1;
for (; n < r.length; ) {
const a = Int(r[n]);
if (a >= 0) {
const s = uL(t, a);
if (s.result)
return {
result: !0,
count: i + s.count
};
i = i + s.count;
}
n = n + 1;
}
return {
result: !1,
count: i
};
}, Nnt = function(t) {
return cL[t];
}, Bnt = function() {
Zl = -1, Pi.length > 0 && uL("none", Pi.length - 1);
}, Dnt = function() {
return Pi;
}, Ont = () => Lb ? (Lb = !1, !0) : !1, Fnt = (t) => {
let e = t.trim(), r = "arrow_open";
switch (e[0]) {
case "<":
r = "arrow_point", e = e.slice(1);
break;
case "x":
r = "arrow_cross", e = e.slice(1);
break;
case "o":
r = "arrow_circle", e = e.slice(1);
break;
}
let n = "normal";
return e.indexOf("=") !== -1 && (n = "thick"), e.indexOf(".") !== -1 && (n = "dotted"), { type: r, stroke: n };
}, Pnt = (t, e) => {
const r = e.length;
let n = 0;
for (let i = 0; i < r; ++i)
e[i] === t && ++n;
return n;
}, qnt = (t) => {
const e = t.trim();
let r = e.slice(0, -1), n = "arrow_open";
switch (e.slice(-1)) {
case "x":
n = "arrow_cross", e[0] === "x" && (n = "double_" + n, r = r.slice(1));
break;
case ">":
n = "arrow_point", e[0] === "<" && (n = "double_" + n, r = r.slice(1));
break;
case "o":
n = "arrow_circle", e[0] === "o" && (n = "double_" + n, r = r.slice(1));
break;
}
let i = "normal", a = r.length - 1;
r[0] === "=" && (i = "thick"), r[0] === "~" && (i = "invisible");
let s = Pnt(".", r);
return s && (i = "dotted", a = s), { type: n, stroke: i, length: a };
}, Vnt = (t, e) => {
const r = qnt(t);
let n;
if (e) {
if (n = Fnt(e), n.stroke !== r.stroke)
return { type: "INVALID", stroke: "INVALID" };
if (n.type === "arrow_open")
n.type = r.type;
else {
if (n.type !== r.type)
return { type: "INVALID", stroke: "INVALID" };
n.type = "double_" + n.type;
}
return n.type === "double_arrow" && (n.type = "double_arrow_point"), n.length = r.length, n;
}
return r;
}, hL = (t, e) => {
let r = !1;
return t.forEach((n) => {
n.nodes.indexOf(e) >= 0 && (r = !0);
}), r;
}, fL = (t, e) => {
const r = [];
return t.nodes.forEach((n, i) => {
hL(e, n) || r.push(t.nodes[i]);
}), { nodes: r };
}, oa = {
parseDirective: unt,
defaultConfig: () => Xo.flowchart,
setAccTitle: zn,
getAccTitle: gi,
getAccDescription: mi,
setAccDescription: yi,
addVertex: hnt,
lookUpDomId: E0,
addLink: dnt,
updateLinkInterpolate: pnt,
updateLink: gnt,
addClass: ynt,
setDirection: mnt,
setClass: o_,
setTooltip: bnt,
getTooltip: xnt,
setClickEvent: knt,
setLink: vnt,
bindFunctions: wnt,
getDirection: Tnt,
getVertices: Ent,
getEdges: Cnt,
getClasses: Snt,
clear: Ant,
setGen: Mnt,
defaultStyle: Lnt,
addSubGraph: Rnt,
getDepthFirstPos: Nnt,
indexNodes: Bnt,
getSubGraphs: Dnt,
destructLink: Vnt,
lex: {
firstGraph: Ont
},
exists: hL,
makeUniq: fL
};
var Qf;
if (typeof Za == "function")
try {
Qf = ur;
} catch {
}
Qf || (Qf = window.graphlib);
var znt = Qf, Jf;
if (typeof Za == "function")
try {
Jf = KM();
} catch {
}
Jf || (Jf = window.dagre);
var dL = Jf, pL = Ynt;
function Ynt(t, e) {
return t.intersect(e);
}
var l_ = Unt;
function Unt(t, e, r, n) {
var i = t.x, a = t.y, s = i - n.x, o = a - n.y, l = Math.sqrt(e * e * o * o + r * r * s * s), u = Math.abs(e * r * s / l);
n.x < i && (u = -u);
var h = Math.abs(e * r * o / l);
return n.y < a && (h = -h), { x: i + u, y: a + h };
}
var Wnt = l_, gL = Hnt;
function Hnt(t, e, r) {
return Wnt(t, e, e, r);
}
var Gnt = jnt;
function jnt(t, e, r, n) {
var i, a, s, o, l, u, h, d, f, p, m, _, y, b, x;
if (i = e.y - t.y, s = t.x - e.x, l = e.x * t.y - t.x * e.y, f = i * r.x + s * r.y + l, p = i * n.x + s * n.y + l, !(f !== 0 && p !== 0 && uw(f, p)) && (a = n.y - r.y, o = r.x - n.x, u = n.x * r.y - r.x * n.y, h = a * t.x + o * t.y + u, d = a * e.x + o * e.y + u, !(h !== 0 && d !== 0 && uw(h, d)) && (m = i * o - a * s, m !== 0)))
return _ = Math.abs(m / 2), y = s * u - o * l, b = y < 0 ? (y - _) / m : (y + _) / m, y = a * l - i * u, x = y < 0 ? (y - _) / m : (y + _) / m, { x: b, y: x };
}
function uw(t, e) {
return t * e > 0;
}
var $nt = Gnt, yL = Xnt;
function Xnt(t, e, r) {
var n = t.x, i = t.y, a = [], s = Number.POSITIVE_INFINITY, o = Number.POSITIVE_INFINITY;
e.forEach(function(m) {
s = Math.min(s, m.x), o = Math.min(o, m.y);
});
for (var l = n - t.width / 2 - s, u = i - t.height / 2 - o, h = 0; h < e.length; h++) {
var d = e[h], f = e[h < e.length - 1 ? h + 1 : 0], p = $nt(
t,
r,
{ x: l + d.x, y: u + d.y },
{ x: l + f.x, y: u + f.y }
);
p && a.push(p);
}
return a.length ? (a.length > 1 && a.sort(function(m, _) {
var y = m.x - r.x, b = m.y - r.y, x = Math.sqrt(y * y + b * b), k = _.x - r.x, T = _.y - r.y, C = Math.sqrt(k * k + T * T);
return x < C ? -1 : x === C ? 0 : 1;
}), a[0]) : (console.log("NO INTERSECTION FOUND, RETURN NODE CENTER", t), t);
}
var mL = Knt;
function Knt(t, e) {
var r = t.x, n = t.y, i = e.x - r, a = e.y - n, s = t.width / 2, o = t.height / 2, l, u;
return Math.abs(a) * s > Math.abs(i) * o ? (a < 0 && (o = -o), l = a === 0 ? 0 : o * i / a, u = o) : (i < 0 && (s = -s), l = s, u = i === 0 ? 0 : s * a / i), { x: r + l, y: n + u };
}
var Znt = {
node: pL,
circle: gL,
ellipse: l_,
polygon: yL,
rect: mL
}, t1;
if (typeof Za == "function")
try {
t1 = {
defaults: qM(),
each: $4(),
isFunction: ll(),
isPlainObject: UM(),
pick: GM(),
has: Z4(),
range: jM(),
uniqueId: $M()
};
} catch {
}
t1 || (t1 = window._);
var ml = t1;
const Qnt = /* @__PURE__ */ BR(UH);
var Wc;
if (!Wc && typeof Za == "function")
try {
Wc = Qnt;
} catch {
}
Wc || (Wc = window.d3);
var ss = Wc, hw = ml, Wn = {
isSubgraph: Jnt,
edgeToId: tit,
applyStyle: rit,
applyClass: nit,
applyTransition: iit
};
function Jnt(t, e) {
return !!t.children(e).length;
}
function tit(t) {
return Zy(t.v) + ":" + Zy(t.w) + ":" + Zy(t.name);
}
var eit = /:/g;
function Zy(t) {
return t ? String(t).replace(eit, "\\:") : "";
}
function rit(t, e) {
e && t.attr("style", e);
}
function nit(t, e, r) {
e && t.attr("class", e).attr("class", r + " " + t.attr("class"));
}
function iit(t, e) {
var r = e.graph();
if (hw.isPlainObject(r)) {
var n = r.transition;
if (hw.isFunction(n))
return n(t);
}
return t;
}
var Qy, fw;
function ait() {
if (fw)
return Qy;
fw = 1;
var t = Wn;
Qy = e;
function e(n, i) {
for (var a = n.append("text"), s = r(i.label).split(`
`), o = 0; o < s.length; o++)
a.append("tspan").attr("xml:space", "preserve").attr("dy", "1em").attr("x", "1").text(s[o]);
return t.applyStyle(a, i.labelStyle), a;
}
function r(n) {
for (var i = "", a = !1, s, o = 0; o < n.length; ++o)
if (s = n[o], a) {
switch (s) {
case "n":
i += `
`;
break;
default:
i += s;
}
a = !1;
} else
s === "\\" ? a = !0 : i += s;
return i;
}
return Qy;
}
var sit = Wn, c_ = oit;
function oit(t, e) {
var r = t.append("foreignObject").attr("width", "100000"), n = r.append("xhtml:div");
n.attr("xmlns", "http://www.w3.org/1999/xhtml");
var i = e.label;
switch (typeof i) {
case "function":
n.insert(i);
break;
case "object":
n.insert(function() {
return i;
});
break;
default:
n.html(i);
}
sit.applyStyle(n, e.labelStyle), n.style("display", "inline-block"), n.style("white-space", "nowrap");
var a = n.node().getBoundingClientRect();
return r.attr("width", a.width).attr("height", a.height), r;
}
var Jy, dw;
function lit() {
if (dw)
return Jy;
dw = 1;
var t = Wn;
Jy = e;
function e(r, n) {
var i = r;
return i.node().appendChild(n.label), t.applyStyle(i, n.labelStyle), i;
}
return Jy;
}
var tm, pw;
function u_() {
if (pw)
return tm;
pw = 1;
var t = ait(), e = c_, r = lit();
tm = n;
function n(i, a, s) {
var o = a.label, l = i.append("g");
a.labelType === "svg" ? r(l, a) : typeof o != "string" || a.labelType === "html" ? e(l, a) : t(l, a);
var u = l.node().getBBox(), h;
switch (s) {
case "top":
h = -a.height / 2;
break;
case "bottom":
h = a.height / 2 - u.height;
break;
default:
h = -u.height / 2;
}
return l.attr(
"transform",
"translate(" + -u.width / 2 + "," + h + ")"
), l;
}
return tm;
}
var em, gw;
function cit() {
if (gw)
return em;
gw = 1;
var t = ml, e = u_(), r = Wn, n = ss;
em = i;
function i(a, s, o) {
var l = s.nodes().filter(function(d) {
return !r.isSubgraph(s, d);
}), u = a.selectAll("g.node").data(l, function(d) {
return d;
}).classed("update", !0);
u.exit().remove(), u.enter().append("g").attr("class", "node").style("opacity", 0), u = a.selectAll("g.node"), u.each(function(d) {
var f = s.node(d), p = n.select(this);
r.applyClass(
p,
f.class,
(p.classed("update") ? "update " : "") + "node"
), p.select("g.label").remove();
var m = p.append("g").attr("class", "label"), _ = e(m, f), y = o[f.shape], b = t.pick(_.node().getBBox(), "width", "height");
f.elem = this, f.id && p.attr("id", f.id), f.labelId && m.attr("id", f.labelId), t.has(f, "width") && (b.width = f.width), t.has(f, "height") && (b.height = f.height), b.width += f.paddingLeft + f.paddingRight, b.height += f.paddingTop + f.paddingBottom, m.attr("transform", "translate(" + (f.paddingLeft - f.paddingRight) / 2 + "," + (f.paddingTop - f.paddingBottom) / 2 + ")");
var x = n.select(this);
x.select(".label-container").remove();
var k = y(x, b, f).classed("label-container", !0);
r.applyStyle(k, f.style);
var T = k.node().getBBox();
f.width = T.width, f.height = T.height;
});
var h;
return u.exit ? h = u.exit() : h = u.selectAll(null), r.applyTransition(h, s).style("opacity", 0).remove(), u;
}
return em;
}
var rm, yw;
function uit() {
if (yw)
return rm;
yw = 1;
var t = Wn, e = ss, r = u_();
rm = n;
function n(i, a) {
var s = a.nodes().filter(function(u) {
return t.isSubgraph(a, u);
}), o = i.selectAll("g.cluster").data(s, function(u) {
return u;
});
o.selectAll("*").remove(), o.enter().append("g").attr("class", "cluster").attr("id", function(u) {
var h = a.node(u);
return h.id;
}).style("opacity", 0), o = i.selectAll("g.cluster"), t.applyTransition(o, a).style("opacity", 1), o.each(function(u) {
var h = a.node(u), d = e.select(this);
e.select(this).append("rect");
var f = d.append("g").attr("class", "label");
r(f, h, h.clusterLabelPos);
}), o.selectAll("rect").each(function(u) {
var h = a.node(u), d = e.select(this);
t.applyStyle(d, h.style);
});
var l;
return o.exit ? l = o.exit() : l = o.selectAll(null), t.applyTransition(l, a).style("opacity", 0).remove(), o;
}
return rm;
}
var nm, mw;
function hit() {
if (mw)
return nm;
mw = 1;
var t = ml, e = u_(), r = Wn, n = ss;
nm = i;
function i(a, s) {
var o = a.selectAll("g.edgeLabel").data(s.edges(), function(u) {
return r.edgeToId(u);
}).classed("update", !0);
o.exit().remove(), o.enter().append("g").classed("edgeLabel", !0).style("opacity", 0), o = a.selectAll("g.edgeLabel"), o.each(function(u) {
var h = n.select(this);
h.select(".label").remove();
var d = s.edge(u), f = e(h, s.edge(u), 0, 0).classed("label", !0), p = f.node().getBBox();
d.labelId && f.attr("id", d.labelId), t.has(d, "width") || (d.width = p.width), t.has(d, "height") || (d.height = p.height);
});
var l;
return o.exit ? l = o.exit() : l = o.selectAll(null), r.applyTransition(l, s).style("opacity", 0).remove(), o;
}
return nm;
}
var im, bw;
function fit() {
if (bw)
return im;
bw = 1;
var t = ml, e = pL, r = Wn, n = ss;
im = i;
function i(d, f, p) {
var m = d.selectAll("g.edgePath").data(f.edges(), function(b) {
return r.edgeToId(b);
}).classed("update", !0), _ = u(m, f);
h(m, f);
var y = m.merge !== void 0 ? m.merge(_) : m;
return r.applyTransition(y, f).style("opacity", 1), y.each(function(b) {
var x = n.select(this), k = f.edge(b);
k.elem = this, k.id && x.attr("id", k.id), r.applyClass(
x,
k.class,
(x.classed("update") ? "update " : "") + "edgePath"
);
}), y.selectAll("path.path").each(function(b) {
var x = f.edge(b);
x.arrowheadId = t.uniqueId("arrowhead");
var k = n.select(this).attr("marker-end", function() {
return "url(" + a(location.href, x.arrowheadId) + ")";
}).style("fill", "none");
r.applyTransition(k, f).attr("d", function(T) {
return s(f, T);
}), r.applyStyle(k, x.style);
}), y.selectAll("defs *").remove(), y.selectAll("defs").each(function(b) {
var x = f.edge(b), k = p[x.arrowhead];
k(n.select(this), x.arrowheadId, x, "arrowhead");
}), y;
}
function a(d, f) {
var p = d.split("#")[0];
return p + "#" + f;
}
function s(d, f) {
var p = d.edge(f), m = d.node(f.v), _ = d.node(f.w), y = p.points.slice(1, p.points.length - 1);
return y.unshift(e(m, y[0])), y.push(e(_, y[y.length - 1])), o(p, y);
}
function o(d, f) {
var p = (n.line || n.svg.line)().x(function(m) {
return m.x;
}).y(function(m) {
return m.y;
});
return (p.curve || p.interpolate)(d.curve), p(f);
}
function l(d) {
var f = d.getBBox(), p = d.ownerSVGElement.getScreenCTM().inverse().multiply(d.getScreenCTM()).translate(f.width / 2, f.height / 2);
return { x: p.e, y: p.f };
}
function u(d, f) {
var p = d.enter().append("g").attr("class", "edgePath").style("opacity", 0);
return p.append("path").attr("class", "path").attr("d", function(m) {
var _ = f.edge(m), y = f.node(m.v).elem, b = t.range(_.points.length).map(function() {
return l(y);
});
return o(_, b);
}), p.append("defs"), p;
}
function h(d, f) {
var p = d.exit();
r.applyTransition(p, f).style("opacity", 0).remove();
}
return im;
}
var am, _w;
function dit() {
if (_w)
return am;
_w = 1;
var t = Wn, e = ss;
am = r;
function r(n, i) {
var a = n.filter(function() {
return !e.select(this).classed("update");
});
function s(o) {
var l = i.node(o);
return "translate(" + l.x + "," + l.y + ")";
}
a.attr("transform", s), t.applyTransition(n, i).style("opacity", 1).attr("transform", s);
}
return am;
}
var sm, vw;
function pit() {
if (vw)
return sm;
vw = 1;
var t = Wn, e = ss, r = ml;
sm = n;
function n(i, a) {
var s = i.filter(function() {
return !e.select(this).classed("update");
});
function o(l) {
var u = a.edge(l);
return r.has(u, "x") ? "translate(" + u.x + "," + u.y + ")" : "";
}
s.attr("transform", o), t.applyTransition(i, a).style("opacity", 1).attr("transform", o);
}
return sm;
}
var om, xw;
function git() {
if (xw)
return om;
xw = 1;
var t = Wn, e = ss;
om = r;
function r(n, i) {
var a = n.filter(function() {
return !e.select(this).classed("update");
});
function s(o) {
var l = i.node(o);
return "translate(" + l.x + "," + l.y + ")";
}
a.attr("transform", s), t.applyTransition(n, i).style("opacity", 1).attr("transform", s), t.applyTransition(a.selectAll("rect"), i).attr("width", function(o) {
return i.node(o).width;
}).attr("height", function(o) {
return i.node(o).height;
}).attr("x", function(o) {
var l = i.node(o);
return -l.width / 2;
}).attr("y", function(o) {
var l = i.node(o);
return -l.height / 2;
});
}
return om;
}
var lm, kw;
function yit() {
if (kw)
return lm;
kw = 1;
var t = mL, e = l_, r = gL, n = yL;
lm = {
rect: i,
ellipse: a,
circle: s,
diamond: o
};
function i(l, u, h) {
var d = l.insert("rect", ":first-child").attr("rx", h.rx).attr("ry", h.ry).attr("x", -u.width / 2).attr("y", -u.height / 2).attr("width", u.width).attr("height", u.height);
return h.intersect = function(f) {
return t(h, f);
}, d;
}
function a(l, u, h) {
var d = u.width / 2, f = u.height / 2, p = l.insert("ellipse", ":first-child").attr("x", -u.width / 2).attr("y", -u.height / 2).attr("rx", d).attr("ry", f);
return h.intersect = function(m) {
return e(h, d, f, m);
}, p;
}
function s(l, u, h) {
var d = Math.max(u.width, u.height) / 2, f = l.insert("circle", ":first-child").attr("x", -u.width / 2).attr("y", -u.height / 2).attr("r", d);
return h.intersect = function(p) {
return r(h, d, p);
}, f;
}
function o(l, u, h) {
var d = u.width * Math.SQRT2 / 2, f = u.height * Math.SQRT2 / 2, p = [
{ x: 0, y: -f },
{ x: -d, y: 0 },
{ x: 0, y: f },
{ x: d, y: 0 }
], m = l.insert("polygon", ":first-child").attr("points", p.map(function(_) {
return _.x + "," + _.y;
}).join(" "));
return h.intersect = function(_) {
return n(h, p, _);
}, m;
}
return lm;
}
var cm, ww;
function mit() {
if (ww)
return cm;
ww = 1;
var t = Wn;
cm = {
default: e,
normal: e,
vee: r,
undirected: n
};
function e(i, a, s, o) {
var l = i.append("marker").attr("id", a).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto"), u = l.append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").style("stroke-width", 1).style("stroke-dasharray", "1,0");
t.applyStyle(u, s[o + "Style"]), s[o + "Class"] && u.attr("class", s[o + "Class"]);
}
function r(i, a, s, o) {
var l = i.append("marker").attr("id", a).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto"), u = l.append("path").attr("d", "M 0 0 L 10 5 L 0 10 L 4 5 z").style("stroke-width", 1).style("stroke-dasharray", "1,0");
t.applyStyle(u, s[o + "Style"]), s[o + "Class"] && u.attr("class", s[o + "Class"]);
}
function n(i, a, s, o) {
var l = i.append("marker").attr("id", a).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto"), u = l.append("path").attr("d", "M 0 5 L 10 5").style("stroke-width", 1).style("stroke-dasharray", "1,0");
t.applyStyle(u, s[o + "Style"]), s[o + "Class"] && u.attr("class", s[o + "Class"]);
}
return cm;
}
var Wr = ml, bit = ss, _it = dL.layout, vit = xit;
function xit() {
var t = cit(), e = uit(), r = hit(), n = fit(), i = dit(), a = pit(), s = git(), o = yit(), l = mit(), u = function(h, d) {
Tit(d);
var f = Nl(h, "output"), p = Nl(f, "clusters"), m = Nl(f, "edgePaths"), _ = r(Nl(f, "edgeLabels"), d), y = t(Nl(f, "nodes"), d, o);
_it(d), i(y, d), a(_, d), n(m, d, l);
var b = e(p, d);
s(b, d), Eit(d);
};
return u.createNodes = function(h) {
return arguments.length ? (t = h, u) : t;
}, u.createClusters = function(h) {
return arguments.length ? (e = h, u) : e;
}, u.createEdgeLabels = function(h) {
return arguments.length ? (r = h, u) : r;
}, u.createEdgePaths = function(h) {
return arguments.length ? (n = h, u) : n;
}, u.shapes = function(h) {
return arguments.length ? (o = h, u) : o;
}, u.arrows = function(h) {
return arguments.length ? (l = h, u) : l;
}, u;
}
var kit = {
paddingLeft: 10,
paddingRight: 10,
paddingTop: 10,
paddingBottom: 10,
rx: 0,
ry: 0,
shape: "rect"
}, wit = {
arrowhead: "normal",
curve: bit.curveLinear
};
function Tit(t) {
t.nodes().forEach(function(e) {
var r = t.node(e);
!Wr.has(r, "label") && !t.children(e).length && (r.label = e), Wr.has(r, "paddingX") && Wr.defaults(r, {
paddingLeft: r.paddingX,
paddingRight: r.paddingX
}), Wr.has(r, "paddingY") && Wr.defaults(r, {
paddingTop: r.paddingY,
paddingBottom: r.paddingY
}), Wr.has(r, "padding") && Wr.defaults(r, {
paddingLeft: r.padding,
paddingRight: r.padding,
paddingTop: r.padding,
paddingBottom: r.padding
}), Wr.defaults(r, kit), Wr.each(["paddingLeft", "paddingRight", "paddingTop", "paddingBottom"], function(n) {
r[n] = Number(r[n]);
}), Wr.has(r, "width") && (r._prevWidth = r.width), Wr.has(r, "height") && (r._prevHeight = r.height);
}), t.edges().forEach(function(e) {
var r = t.edge(e);
Wr.has(r, "label") || (r.label = ""), Wr.defaults(r, wit);
});
}
function Eit(t) {
Wr.each(t.nodes(), function(e) {
var r = t.node(e);
Wr.has(r, "_prevWidth") ? r.width = r._prevWidth : delete r.width, Wr.has(r, "_prevHeight") ? r.height = r._prevHeight : delete r.height, delete r._prevWidth, delete r._prevHeight;
});
}
function Nl(t, e) {
var r = t.select("g." + e);
return r.empty() && (r = t.append("g").attr("class", e)), r;
}
var Cit = "0.6.4";
/**
* @license
* Copyright (c) 2012-2013 Chris Pettitt
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
var Mn = {
graphlib: znt,
dagre: dL,
intersect: Znt,
render: vit,
util: Wn,
version: Cit
};
function bL(t, e, r) {
const n = e.width, i = e.height, a = (n + i) * 0.9, s = [
{ x: a / 2, y: 0 },
{ x: a, y: -a / 2 },
{ x: a / 2, y: -a },
{ x: 0, y: -a / 2 }
], o = ka(t, a, a, s);
return r.intersect = function(l) {
return Mn.intersect.polygon(r, s, l);
}, o;
}
function _L(t, e, r) {
const i = e.height, a = i / 4, s = e.width + 2 * a, o = [
{ x: a, y: 0 },
{ x: s - a, y: 0 },
{ x: s, y: -i / 2 },
{ x: s - a, y: -i },
{ x: a, y: -i },
{ x: 0, y: -i / 2 }
], l = ka(t, s, i, o);
return r.intersect = function(u) {
return Mn.intersect.polygon(r, o, u);
}, l;
}
function vL(t, e, r) {
const n = e.width, i = e.height, a = [
{ x: -i / 2, y: 0 },
{ x: n, y: 0 },
{ x: n, y: -i },
{ x: -i / 2, y: -i },
{ x: 0, y: -i / 2 }
], s = ka(t, n, i, a);
return r.intersect = function(o) {
return Mn.intersect.polygon(r, a, o);
}, s;
}
function xL(t, e, r) {
const n = e.width, i = e.height, a = [
{ x: -2 * i / 6, y: 0 },
{ x: n - i / 6, y: 0 },
{ x: n + 2 * i / 6, y: -i },
{ x: i / 6, y: -i }
], s = ka(t, n, i, a);
return r.intersect = function(o) {
return Mn.intersect.polygon(r, a, o);
}, s;
}
function kL(t, e, r) {
const n = e.width, i = e.height, a = [
{ x: 2 * i / 6, y: 0 },
{ x: n + i / 6, y: 0 },
{ x: n - 2 * i / 6, y: -i },
{ x: -i / 6, y: -i }
], s = ka(t, n, i, a);
return r.intersect = function(o) {
return Mn.intersect.polygon(r, a, o);
}, s;
}
function wL(t, e, r) {
const n = e.width, i = e.height, a = [
{ x: -2 * i / 6, y: 0 },
{ x: n + 2 * i / 6, y: 0 },
{ x: n - i / 6, y: -i },
{ x: i / 6, y: -i }
], s = ka(t, n, i, a);
return r.intersect = function(o) {
return Mn.intersect.polygon(r, a, o);
}, s;
}
function TL(t, e, r) {
const n = e.width, i = e.height, a = [
{ x: i / 6, y: 0 },
{ x: n - i / 6, y: 0 },
{ x: n + 2 * i / 6, y: -i },
{ x: -2 * i / 6, y: -i }
], s = ka(t, n, i, a);
return r.intersect = function(o) {
return Mn.intersect.polygon(r, a, o);
}, s;
}
function EL(t, e, r) {
const n = e.width, i = e.height, a = [
{ x: 0, y: 0 },
{ x: n + i / 2, y: 0 },
{ x: n, y: -i / 2 },
{ x: n + i / 2, y: -i },
{ x: 0, y: -i }
], s = ka(t, n, i, a);
return r.intersect = function(o) {
return Mn.intersect.polygon(r, a, o);
}, s;
}
function CL(t, e, r) {
const n = e.height, i = e.width + n / 4, a = t.insert("rect", ":first-child").attr("rx", n / 2).attr("ry", n / 2).attr("x", -i / 2).attr("y", -n / 2).attr("width", i).attr("height", n);
return r.intersect = function(s) {
return Mn.intersect.rect(r, s);
}, a;
}
function SL(t, e, r) {
const n = e.width, i = e.height, a = [
{ x: 0, y: 0 },
{ x: n, y: 0 },
{ x: n, y: -i },
{ x: 0, y: -i },
{ x: 0, y: 0 },
{ x: -8, y: 0 },
{ x: n + 8, y: 0 },
{ x: n + 8, y: -i },
{ x: -8, y: -i },
{ x: -8, y: 0 }
], s = ka(t, n, i, a);
return r.intersect = function(o) {
return Mn.intersect.polygon(r, a, o);
}, s;
}
function AL(t, e, r) {
const n = e.width, i = n / 2, a = i / (2.5 + n / 50), s = e.height + a, o = "M 0," + a + " a " + i + "," + a + " 0,0,0 " + n + " 0 a " + i + "," + a + " 0,0,0 " + -n + " 0 l 0," + s + " a " + i + "," + a + " 0,0,0 " + n + " 0 l 0," + -s, l = t.attr("label-offset-y", a).insert("path", ":first-child").attr("d", o).attr("transform", "translate(" + -n / 2 + "," + -(s / 2 + a) + ")");
return r.intersect = function(u) {
const h = Mn.intersect.rect(r, u), d = h.x - r.x;
if (i != 0 && (Math.abs(d) < r.width / 2 || Math.abs(d) == r.width / 2 && Math.abs(h.y - r.y) > r.height / 2 - a)) {
let f = a * a * (1 - d * d / (i * i));
f != 0 && (f = Math.sqrt(f)), f = a - f, u.y - r.y > 0 && (f = -f), h.y += f;
}
return h;
}, l;
}
function Sit(t) {
t.shapes().question = bL, t.shapes().hexagon = _L, t.shapes().stadium = CL, t.shapes().subroutine = SL, t.shapes().cylinder = AL, t.shapes().rect_left_inv_arrow = vL, t.shapes().lean_right = xL, t.shapes().lean_left = kL, t.shapes().trapezoid = wL, t.shapes().inv_trapezoid = TL, t.shapes().rect_right_inv_arrow = EL;
}
function Ait(t) {
t({ question: bL }), t({ hexagon: _L }), t({ stadium: CL }), t({ subroutine: SL }), t({ cylinder: AL }), t({ rect_left_inv_arrow: vL }), t({ lean_right: xL }), t({ lean_left: kL }), t({ trapezoid: wL }), t({ inv_trapezoid: TL }), t({ rect_right_inv_arrow: EL });
}
function ka(t, e, r, n) {
return t.insert("polygon", ":first-child").attr(
"points",
n.map(function(i) {
return i.x + "," + i.y;
}).join(" ")
).attr("transform", "translate(" + -e / 2 + "," + r / 2 + ")");
}
const Mit = {
addToRender: Sit,
addToRenderV2: Ait
}, ML = {}, Lit = function(t) {
const e = Object.keys(t);
for (let r = 0; r < e.length; r++)
ML[e[r]] = t[e[r]];
}, LL = function(t, e, r, n, i, a) {
const s = n ? n.select(`[id="${r}"]`) : St(`[id="${r}"]`), o = i || document;
Object.keys(t).forEach(function(u) {
const h = t[u];
let d = "default";
h.classes.length > 0 && (d = h.classes.join(" "));
const f = Ka(h.styles);
let p = h.text !== void 0 ? h.text : h.id, m;
if (Mr(nt().flowchart.htmlLabels)) {
const b = {
label: p.replace(
/fa[lrsb]?:fa-[\w-]+/g,
(x) => ``
)
};
m = c_(s, b).node(), m.parentNode.removeChild(m);
} else {
const b = o.createElementNS("http://www.w3.org/2000/svg", "text");
b.setAttribute("style", f.labelStyle.replace("color:", "fill:"));
const x = p.split(pe.lineBreakRegex);
for (let k = 0; k < x.length; k++) {
const T = o.createElementNS("http://www.w3.org/2000/svg", "tspan");
T.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), T.setAttribute("dy", "1em"), T.setAttribute("x", "1"), T.textContent = x[k], b.appendChild(T);
}
m = b;
}
let _ = 0, y = "";
switch (h.type) {
case "round":
_ = 5, y = "rect";
break;
case "square":
y = "rect";
break;
case "diamond":
y = "question";
break;
case "hexagon":
y = "hexagon";
break;
case "odd":
y = "rect_left_inv_arrow";
break;
case "lean_right":
y = "lean_right";
break;
case "lean_left":
y = "lean_left";
break;
case "trapezoid":
y = "trapezoid";
break;
case "inv_trapezoid":
y = "inv_trapezoid";
break;
case "odd_right":
y = "rect_left_inv_arrow";
break;
case "circle":
y = "circle";
break;
case "ellipse":
y = "ellipse";
break;
case "stadium":
y = "stadium";
break;
case "subroutine":
y = "subroutine";
break;
case "cylinder":
y = "cylinder";
break;
case "group":
y = "rect";
break;
default:
y = "rect";
}
H.warn("Adding node", h.id, h.domId), e.setNode(a.db.lookUpDomId(h.id), {
labelType: "svg",
labelStyle: f.labelStyle,
shape: y,
label: m,
rx: _,
ry: _,
class: d,
style: f.style,
id: a.db.lookUpDomId(h.id)
});
});
}, RL = function(t, e, r) {
let n = 0, i, a;
if (typeof t.defaultStyle < "u") {
const s = Ka(t.defaultStyle);
i = s.style, a = s.labelStyle;
}
t.forEach(function(s) {
n++;
var o = "L-" + s.start + "-" + s.end, l = "LS-" + s.start, u = "LE-" + s.end;
const h = {};
s.type === "arrow_open" ? h.arrowhead = "none" : h.arrowhead = "normal";
let d = "", f = "";
if (typeof s.style < "u") {
const p = Ka(s.style);
d = p.style, f = p.labelStyle;
} else
switch (s.stroke) {
case "normal":
d = "fill:none", typeof i < "u" && (d = i), typeof a < "u" && (f = a);
break;
case "dotted":
d = "fill:none;stroke-width:2px;stroke-dasharray:3;";
break;
case "thick":
d = " stroke-width: 3.5px;fill:none";
break;
}
h.style = d, h.labelStyle = f, typeof s.interpolate < "u" ? h.curve = Ri(s.interpolate, bn) : typeof t.defaultInterpolate < "u" ? h.curve = Ri(t.defaultInterpolate, bn) : h.curve = Ri(ML.curve, bn), typeof s.text > "u" ? typeof s.style < "u" && (h.arrowheadStyle = "fill: #333") : (h.arrowheadStyle = "fill: #333", h.labelpos = "c", Mr(nt().flowchart.htmlLabels) ? (h.labelType = "html", h.label = `${s.text.replace(
/fa[lrsb]?:fa-[\w-]+/g,
(p) => ``
)}`) : (h.labelType = "text", h.label = s.text.replace(pe.lineBreakRegex, `
`), typeof s.style > "u" && (h.style = h.style || "stroke: #333; stroke-width: 1.5px;fill:none"), h.labelStyle = h.labelStyle.replace("color:", "fill:"))), h.id = o, h.class = l + " " + u, h.minlen = s.length || 1, e.setEdge(r.db.lookUpDomId(s.start), r.db.lookUpDomId(s.end), h, n);
});
}, Rit = function(t, e) {
H.info("Extracting classes"), e.db.clear();
try {
return e.parse(t), e.db.getClasses();
} catch {
return;
}
}, Iit = function(t, e, r, n) {
H.info("Drawing flowchart"), n.db.clear();
const { securityLevel: i, flowchart: a } = nt();
let s;
i === "sandbox" && (s = St("#i" + e));
const o = St(i === "sandbox" ? s.nodes()[0].contentDocument.body : "body"), l = i === "sandbox" ? s.nodes()[0].contentDocument : document;
try {
n.parser.parse(t);
} catch {
H.debug("Parsing failed");
}
let u = n.db.getDirection();
typeof u > "u" && (u = "TD");
const h = a.nodeSpacing || 50, d = a.rankSpacing || 50, f = new ur.Graph({
multigraph: !0,
compound: !0
}).setGraph({
rankdir: u,
nodesep: h,
ranksep: d,
marginx: 8,
marginy: 8
}).setDefaultEdgeLabel(function() {
return {};
});
let p;
const m = n.db.getSubGraphs();
for (let S = m.length - 1; S >= 0; S--)
p = m[S], n.db.addVertex(p.id, p.title, "group", void 0, p.classes);
const _ = n.db.getVertices();
H.warn("Get vertices", _);
const y = n.db.getEdges();
let b = 0;
for (b = m.length - 1; b >= 0; b--) {
p = m[b], p1("cluster").append("text");
for (let S = 0; S < p.nodes.length; S++)
H.warn(
"Setting subgraph",
p.nodes[S],
n.db.lookUpDomId(p.nodes[S]),
n.db.lookUpDomId(p.id)
), f.setParent(n.db.lookUpDomId(p.nodes[S]), n.db.lookUpDomId(p.id));
}
LL(_, f, e, o, l, n), RL(y, f, n);
const x = Mn.render, k = new x();
Mit.addToRender(k), k.arrows().none = function(R, A, L, v) {
const w = R.append("marker").attr("id", A).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto").append("path").attr("d", "M 0 0 L 0 0 L 0 0 z");
Mn.util.applyStyle(w, L[v + "Style"]);
}, k.arrows().normal = function(R, A) {
R.append("marker").attr("id", A).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowheadPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
};
const T = o.select(`[id="${e}"]`);
vn(n.db, T, e);
const C = o.select("#" + e + " g");
for (k(C, f), C.selectAll("g.node").attr("title", function() {
return n.db.getTooltip(this.id);
}), n.db.indexNodes("subGraph" + b), b = 0; b < m.length; b++)
if (p = m[b], p.title !== "undefined") {
const S = l.querySelectorAll(
"#" + e + ' [id="' + n.db.lookUpDomId(p.id) + '"] rect'
), R = l.querySelectorAll(
"#" + e + ' [id="' + n.db.lookUpDomId(p.id) + '"]'
), A = S[0].x.baseVal.value, L = S[0].y.baseVal.value, v = S[0].width.baseVal.value, w = St(R[0]).select(".label");
w.attr("transform", `translate(${A + v / 2}, ${L + 14})`), w.attr("id", e + "Text");
for (let D = 0; D < p.classes.length; D++)
R[0].classList.add(p.classes[D]);
}
if (!a.htmlLabels) {
const S = l.querySelectorAll('[id="' + e + '"] .edgeLabel .label');
for (let R = 0; R < S.length; R++) {
const A = S[R], L = A.getBBox(), v = l.createElementNS("http://www.w3.org/2000/svg", "rect");
v.setAttribute("rx", 0), v.setAttribute("ry", 0), v.setAttribute("width", L.width), v.setAttribute("height", L.height), A.insertBefore(v, A.firstChild);
}
}
a0(f, T, a.diagramPadding, a.useMaxWidth), Object.keys(_).forEach(function(S) {
const R = _[S];
if (R.link) {
const A = o.select("#" + e + ' [id="' + n.db.lookUpDomId(S) + '"]');
if (A) {
const L = l.createElementNS("http://www.w3.org/2000/svg", "a");
L.setAttributeNS("http://www.w3.org/2000/svg", "class", R.classes.join(" ")), L.setAttributeNS("http://www.w3.org/2000/svg", "href", R.link), L.setAttributeNS("http://www.w3.org/2000/svg", "rel", "noopener"), i === "sandbox" ? L.setAttributeNS("http://www.w3.org/2000/svg", "target", "_top") : R.linkTarget && L.setAttributeNS("http://www.w3.org/2000/svg", "target", R.linkTarget);
const v = A.insert(function() {
return L;
}, ":first-child"), B = A.select(".label-container");
B && v.append(function() {
return B.node();
});
const w = A.select(".label");
w && v.append(function() {
return w.node();
});
}
}
});
}, h_ = {
setConf: Lit,
addVertices: LL,
addEdges: RL,
getClasses: Rit,
draw: Iit
}, IL = {}, Nit = function(t) {
const e = Object.keys(t);
for (let r = 0; r < e.length; r++)
IL[e[r]] = t[e[r]];
}, NL = function(t, e, r, n, i, a) {
const s = n.select(`[id="${r}"]`);
Object.keys(t).forEach(function(l) {
const u = t[l];
let h = "default";
u.classes.length > 0 && (h = u.classes.join(" "));
const d = Ka(u.styles);
let f = u.text !== void 0 ? u.text : u.id, p;
if (Mr(nt().flowchart.htmlLabels)) {
const y = {
label: f.replace(
/fa[lrsb]?:fa-[\w-]+/g,
(b) => ``
)
};
p = c_(s, y).node(), p.parentNode.removeChild(p);
} else {
const y = i.createElementNS("http://www.w3.org/2000/svg", "text");
y.setAttribute("style", d.labelStyle.replace("color:", "fill:"));
const b = f.split(pe.lineBreakRegex);
for (let x = 0; x < b.length; x++) {
const k = i.createElementNS("http://www.w3.org/2000/svg", "tspan");
k.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), k.setAttribute("dy", "1em"), k.setAttribute("x", "1"), k.textContent = b[x], y.appendChild(k);
}
p = y;
}
let m = 0, _ = "";
switch (u.type) {
case "round":
m = 5, _ = "rect";
break;
case "square":
_ = "rect";
break;
case "diamond":
_ = "question";
break;
case "hexagon":
_ = "hexagon";
break;
case "odd":
_ = "rect_left_inv_arrow";
break;
case "lean_right":
_ = "lean_right";
break;
case "lean_left":
_ = "lean_left";
break;
case "trapezoid":
_ = "trapezoid";
break;
case "inv_trapezoid":
_ = "inv_trapezoid";
break;
case "odd_right":
_ = "rect_left_inv_arrow";
break;
case "circle":
_ = "circle";
break;
case "ellipse":
_ = "ellipse";
break;
case "stadium":
_ = "stadium";
break;
case "subroutine":
_ = "subroutine";
break;
case "cylinder":
_ = "cylinder";
break;
case "group":
_ = "rect";
break;
case "doublecircle":
_ = "doublecircle";
break;
default:
_ = "rect";
}
e.setNode(u.id, {
labelStyle: d.labelStyle,
shape: _,
labelText: f,
rx: m,
ry: m,
class: h,
style: d.style,
id: u.id,
link: u.link,
linkTarget: u.linkTarget,
tooltip: a.db.getTooltip(u.id) || "",
domId: a.db.lookUpDomId(u.id),
haveCallback: u.haveCallback,
width: u.type === "group" ? 500 : void 0,
dir: u.dir,
type: u.type,
props: u.props,
padding: nt().flowchart.padding
}), H.info("setNode", {
labelStyle: d.labelStyle,
shape: _,
labelText: f,
rx: m,
ry: m,
class: h,
style: d.style,
id: u.id,
domId: a.db.lookUpDomId(u.id),
width: u.type === "group" ? 500 : void 0,
type: u.type,
dir: u.dir,
props: u.props,
padding: nt().flowchart.padding
});
});
}, BL = function(t, e, r) {
H.info("abc78 edges = ", t);
let n = 0, i = {}, a, s;
if (typeof t.defaultStyle < "u") {
const o = Ka(t.defaultStyle);
a = o.style, s = o.labelStyle;
}
t.forEach(function(o) {
n++;
var l = "L-" + o.start + "-" + o.end;
typeof i[l] > "u" ? (i[l] = 0, H.info("abc78 new entry", l, i[l])) : (i[l]++, H.info("abc78 new entry", l, i[l]));
let u = l + "-" + i[l];
H.info("abc78 new link id to be used is", l, u, i[l]);
var h = "LS-" + o.start, d = "LE-" + o.end;
const f = { style: "", labelStyle: "" };
switch (f.minlen = o.length || 1, o.type === "arrow_open" ? f.arrowhead = "none" : f.arrowhead = "normal", f.arrowTypeStart = "arrow_open", f.arrowTypeEnd = "arrow_open", o.type) {
case "double_arrow_cross":
f.arrowTypeStart = "arrow_cross";
case "arrow_cross":
f.arrowTypeEnd = "arrow_cross";
break;
case "double_arrow_point":
f.arrowTypeStart = "arrow_point";
case "arrow_point":
f.arrowTypeEnd = "arrow_point";
break;
case "double_arrow_circle":
f.arrowTypeStart = "arrow_circle";
case "arrow_circle":
f.arrowTypeEnd = "arrow_circle";
break;
}
let p = "", m = "";
switch (o.stroke) {
case "normal":
p = "fill:none;", typeof a < "u" && (p = a), typeof s < "u" && (m = s), f.thickness = "normal", f.pattern = "solid";
break;
case "dotted":
f.thickness = "normal", f.pattern = "dotted", f.style = "fill:none;stroke-width:2px;stroke-dasharray:3;";
break;
case "thick":
f.thickness = "thick", f.pattern = "solid", f.style = "stroke-width: 3.5px;fill:none;";
break;
case "invisible":
f.thickness = "invisible", f.pattern = "solid", f.style = "stroke-width: 0;fill:none;";
break;
}
if (typeof o.style < "u") {
const _ = Ka(o.style);
p = _.style, m = _.labelStyle;
}
f.style = f.style += p, f.labelStyle = f.labelStyle += m, typeof o.interpolate < "u" ? f.curve = Ri(o.interpolate, bn) : typeof t.defaultInterpolate < "u" ? f.curve = Ri(t.defaultInterpolate, bn) : f.curve = Ri(IL.curve, bn), typeof o.text > "u" ? typeof o.style < "u" && (f.arrowheadStyle = "fill: #333") : (f.arrowheadStyle = "fill: #333", f.labelpos = "c"), f.labelType = "text", f.label = o.text.replace(pe.lineBreakRegex, `
`), typeof o.style > "u" && (f.style = f.style || "stroke: #333; stroke-width: 1.5px;fill:none;"), f.labelStyle = f.labelStyle.replace("color:", "fill:"), f.id = u, f.classes = "flowchart-link " + h + " " + d, e.setEdge(o.start, o.end, f, n);
});
}, Bit = function(t, e) {
H.info("Extracting classes"), e.db.clear();
try {
return e.parse(t), e.db.getClasses();
} catch {
return;
}
}, Dit = function(t, e, r, n) {
H.info("Drawing flowchart"), n.db.clear(), oa.setGen("gen-2"), n.parser.parse(t);
let i = n.db.getDirection();
typeof i > "u" && (i = "TD");
const { securityLevel: a, flowchart: s } = nt(), o = s.nodeSpacing || 50, l = s.rankSpacing || 50;
let u;
a === "sandbox" && (u = St("#i" + e));
const h = St(a === "sandbox" ? u.nodes()[0].contentDocument.body : "body"), d = a === "sandbox" ? u.nodes()[0].contentDocument : document, f = new ur.Graph({
multigraph: !0,
compound: !0
}).setGraph({
rankdir: i,
nodesep: o,
ranksep: l,
marginx: 0,
marginy: 0
}).setDefaultEdgeLabel(function() {
return {};
});
let p;
const m = n.db.getSubGraphs();
H.info("Subgraphs - ", m);
for (let C = m.length - 1; C >= 0; C--)
p = m[C], H.info("Subgraph - ", p), n.db.addVertex(p.id, p.title, "group", void 0, p.classes, p.dir);
const _ = n.db.getVertices(), y = n.db.getEdges();
H.info(y);
let b = 0;
for (b = m.length - 1; b >= 0; b--) {
p = m[b], p1("cluster").append("text");
for (let C = 0; C < p.nodes.length; C++)
H.info("Setting up subgraphs", p.nodes[C], p.id), f.setParent(p.nodes[C], p.id);
}
NL(_, f, e, h, d, n), BL(y, f);
const x = h.select(`[id="${e}"]`);
vn(n.db, x, e);
const k = h.select("#" + e + " g");
if (n_(k, f, ["point", "circle", "cross"], "flowchart", e), a0(f, x, s.diagramPadding, s.useMaxWidth), n.db.indexNodes("subGraph" + b), !s.htmlLabels) {
const C = d.querySelectorAll('[id="' + e + '"] .edgeLabel .label');
for (let M = 0; M < C.length; M++) {
const S = C[M], R = S.getBBox(), A = d.createElementNS("http://www.w3.org/2000/svg", "rect");
A.setAttribute("rx", 0), A.setAttribute("ry", 0), A.setAttribute("width", R.width), A.setAttribute("height", R.height), S.insertBefore(A, S.firstChild);
}
}
Object.keys(_).forEach(function(C) {
const M = _[C];
if (M.link) {
const S = St("#" + e + ' [id="' + C + '"]');
if (S) {
const R = d.createElementNS("http://www.w3.org/2000/svg", "a");
R.setAttributeNS("http://www.w3.org/2000/svg", "class", M.classes.join(" ")), R.setAttributeNS("http://www.w3.org/2000/svg", "href", M.link), R.setAttributeNS("http://www.w3.org/2000/svg", "rel", "noopener"), a === "sandbox" ? R.setAttributeNS("http://www.w3.org/2000/svg", "target", "_top") : M.linkTarget && R.setAttributeNS("http://www.w3.org/2000/svg", "target", M.linkTarget);
const A = S.insert(function() {
return R;
}, ":first-child"), L = S.select(".label-container");
L && A.append(function() {
return L.node();
});
const v = S.select(".label");
v && A.append(function() {
return v.node();
});
}
}
});
}, um = {
setConf: Nit,
addVertices: NL,
addEdges: BL,
getClasses: Bit,
draw: Dit
};
var Rb = function() {
var t = function(S, R, A, L) {
for (A = A || {}, L = S.length; L--; A[S[L]] = R)
;
return A;
}, e = [1, 3], r = [1, 5], n = [7, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 24, 25, 27, 34, 39], i = [1, 15], a = [1, 16], s = [1, 17], o = [1, 18], l = [1, 19], u = [1, 20], h = [1, 21], d = [1, 22], f = [1, 23], p = [1, 24], m = [1, 25], _ = [1, 26], y = [1, 28], b = [1, 30], x = [1, 33], k = [5, 7, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 24, 25, 27, 34, 39], T = {
trace: function() {
},
yy: {},
symbols_: { error: 2, start: 3, directive: 4, gantt: 5, document: 6, EOF: 7, line: 8, SPACE: 9, statement: 10, NL: 11, dateFormat: 12, inclusiveEndDates: 13, topAxis: 14, axisFormat: 15, excludes: 16, includes: 17, todayMarker: 18, title: 19, acc_title: 20, acc_title_value: 21, acc_descr: 22, acc_descr_value: 23, acc_descr_multiline_value: 24, section: 25, clickStatement: 26, taskTxt: 27, taskData: 28, openDirective: 29, typeDirective: 30, closeDirective: 31, ":": 32, argDirective: 33, click: 34, callbackname: 35, callbackargs: 36, href: 37, clickStatementDebug: 38, open_directive: 39, type_directive: 40, arg_directive: 41, close_directive: 42, $accept: 0, $end: 1 },
terminals_: { 2: "error", 5: "gantt", 7: "EOF", 9: "SPACE", 11: "NL", 12: "dateFormat", 13: "inclusiveEndDates", 14: "topAxis", 15: "axisFormat", 16: "excludes", 17: "includes", 18: "todayMarker", 19: "title", 20: "acc_title", 21: "acc_title_value", 22: "acc_descr", 23: "acc_descr_value", 24: "acc_descr_multiline_value", 25: "section", 27: "taskTxt", 28: "taskData", 32: ":", 34: "click", 35: "callbackname", 36: "callbackargs", 37: "href", 39: "open_directive", 40: "type_directive", 41: "arg_directive", 42: "close_directive" },
productions_: [0, [3, 2], [3, 3], [6, 0], [6, 2], [8, 2], [8, 1], [8, 1], [8, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 2], [10, 2], [10, 1], [10, 1], [10, 1], [10, 2], [10, 1], [4, 4], [4, 6], [26, 2], [26, 3], [26, 3], [26, 4], [26, 3], [26, 4], [26, 2], [38, 2], [38, 3], [38, 3], [38, 4], [38, 3], [38, 4], [38, 2], [29, 1], [30, 1], [33, 1], [31, 1]],
performAction: function(R, A, L, v, B, w, D) {
var N = w.length - 1;
switch (B) {
case 2:
return w[N - 1];
case 3:
this.$ = [];
break;
case 4:
w[N - 1].push(w[N]), this.$ = w[N - 1];
break;
case 5:
case 6:
this.$ = w[N];
break;
case 7:
case 8:
this.$ = [];
break;
case 9:
v.setDateFormat(w[N].substr(11)), this.$ = w[N].substr(11);
break;
case 10:
v.enableInclusiveEndDates(), this.$ = w[N].substr(18);
break;
case 11:
v.TopAxis(), this.$ = w[N].substr(8);
break;
case 12:
v.setAxisFormat(w[N].substr(11)), this.$ = w[N].substr(11);
break;
case 13:
v.setExcludes(w[N].substr(9)), this.$ = w[N].substr(9);
break;
case 14:
v.setIncludes(w[N].substr(9)), this.$ = w[N].substr(9);
break;
case 15:
v.setTodayMarker(w[N].substr(12)), this.$ = w[N].substr(12);
break;
case 16:
v.setDiagramTitle(w[N].substr(6)), this.$ = w[N].substr(6);
break;
case 17:
this.$ = w[N].trim(), v.setAccTitle(this.$);
break;
case 18:
case 19:
this.$ = w[N].trim(), v.setAccDescription(this.$);
break;
case 20:
v.addSection(w[N].substr(8)), this.$ = w[N].substr(8);
break;
case 22:
v.addTask(w[N - 1], w[N]), this.$ = "task";
break;
case 26:
this.$ = w[N - 1], v.setClickEvent(w[N - 1], w[N], null);
break;
case 27:
this.$ = w[N - 2], v.setClickEvent(w[N - 2], w[N - 1], w[N]);
break;
case 28:
this.$ = w[N - 2], v.setClickEvent(w[N - 2], w[N - 1], null), v.setLink(w[N - 2], w[N]);
break;
case 29:
this.$ = w[N - 3], v.setClickEvent(w[N - 3], w[N - 2], w[N - 1]), v.setLink(w[N - 3], w[N]);
break;
case 30:
this.$ = w[N - 2], v.setClickEvent(w[N - 2], w[N], null), v.setLink(w[N - 2], w[N - 1]);
break;
case 31:
this.$ = w[N - 3], v.setClickEvent(w[N - 3], w[N - 1], w[N]), v.setLink(w[N - 3], w[N - 2]);
break;
case 32:
this.$ = w[N - 1], v.setLink(w[N - 1], w[N]);
break;
case 33:
case 39:
this.$ = w[N - 1] + " " + w[N];
break;
case 34:
case 35:
case 37:
this.$ = w[N - 2] + " " + w[N - 1] + " " + w[N];
break;
case 36:
case 38:
this.$ = w[N - 3] + " " + w[N - 2] + " " + w[N - 1] + " " + w[N];
break;
case 40:
v.parseDirective("%%{", "open_directive");
break;
case 41:
v.parseDirective(w[N], "type_directive");
break;
case 42:
w[N] = w[N].trim().replace(/'/g, '"'), v.parseDirective(w[N], "arg_directive");
break;
case 43:
v.parseDirective("}%%", "close_directive", "gantt");
break;
}
},
table: [{ 3: 1, 4: 2, 5: e, 29: 4, 39: r }, { 1: [3] }, { 3: 6, 4: 2, 5: e, 29: 4, 39: r }, t(n, [2, 3], { 6: 7 }), { 30: 8, 40: [1, 9] }, { 40: [2, 40] }, { 1: [2, 1] }, { 4: 29, 7: [1, 10], 8: 11, 9: [1, 12], 10: 13, 11: [1, 14], 12: i, 13: a, 14: s, 15: o, 16: l, 17: u, 18: h, 19: d, 20: f, 22: p, 24: m, 25: _, 26: 27, 27: y, 29: 4, 34: b, 39: r }, { 31: 31, 32: [1, 32], 42: x }, t([32, 42], [2, 41]), t(n, [2, 8], { 1: [2, 2] }), t(n, [2, 4]), { 4: 29, 10: 34, 12: i, 13: a, 14: s, 15: o, 16: l, 17: u, 18: h, 19: d, 20: f, 22: p, 24: m, 25: _, 26: 27, 27: y, 29: 4, 34: b, 39: r }, t(n, [2, 6]), t(n, [2, 7]), t(n, [2, 9]), t(n, [2, 10]), t(n, [2, 11]), t(n, [2, 12]), t(n, [2, 13]), t(n, [2, 14]), t(n, [2, 15]), t(n, [2, 16]), { 21: [1, 35] }, { 23: [1, 36] }, t(n, [2, 19]), t(n, [2, 20]), t(n, [2, 21]), { 28: [1, 37] }, t(n, [2, 23]), { 35: [1, 38], 37: [1, 39] }, { 11: [1, 40] }, { 33: 41, 41: [1, 42] }, { 11: [2, 43] }, t(n, [2, 5]), t(n, [2, 17]), t(n, [2, 18]), t(n, [2, 22]), t(n, [2, 26], { 36: [1, 43], 37: [1, 44] }), t(n, [2, 32], { 35: [1, 45] }), t(k, [2, 24]), { 31: 46, 42: x }, { 42: [2, 42] }, t(n, [2, 27], { 37: [1, 47] }), t(n, [2, 28]), t(n, [2, 30], { 36: [1, 48] }), { 11: [1, 49] }, t(n, [2, 29]), t(n, [2, 31]), t(k, [2, 25])],
defaultActions: { 5: [2, 40], 6: [2, 1], 33: [2, 43], 42: [2, 42] },
parseError: function(R, A) {
if (A.recoverable)
this.trace(R);
else {
var L = new Error(R);
throw L.hash = A, L;
}
},
parse: function(R) {
var A = this, L = [0], v = [], B = [null], w = [], D = this.table, N = "", z = 0, X = 0, ct = 2, J = 1, Y = w.slice.call(arguments, 1), $ = Object.create(this.lexer), lt = { yy: {} };
for (var ut in this.yy)
Object.prototype.hasOwnProperty.call(this.yy, ut) && (lt.yy[ut] = this.yy[ut]);
$.setInput(R, lt.yy), lt.yy.lexer = $, lt.yy.parser = this, typeof $.yylloc > "u" && ($.yylloc = {});
var W = $.yylloc;
w.push(W);
var tt = $.options && $.options.ranges;
typeof lt.yy.parseError == "function" ? this.parseError = lt.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
function K() {
var at;
return at = v.pop() || $.lex() || J, typeof at != "number" && (at instanceof Array && (v = at, at = v.pop()), at = A.symbols_[at] || at), at;
}
for (var it, Z, V, Q, q = {}, U, F, j, P; ; ) {
if (Z = L[L.length - 1], this.defaultActions[Z] ? V = this.defaultActions[Z] : ((it === null || typeof it > "u") && (it = K()), V = D[Z] && D[Z][it]), typeof V > "u" || !V.length || !V[0]) {
var et = "";
P = [];
for (U in D[Z])
this.terminals_[U] && U > ct && P.push("'" + this.terminals_[U] + "'");
$.showPosition ? et = "Parse error on line " + (z + 1) + `:
` + $.showPosition() + `
Expecting ` + P.join(", ") + ", got '" + (this.terminals_[it] || it) + "'" : et = "Parse error on line " + (z + 1) + ": Unexpected " + (it == J ? "end of input" : "'" + (this.terminals_[it] || it) + "'"), this.parseError(et, {
text: $.match,
token: this.terminals_[it] || it,
line: $.yylineno,
loc: W,
expected: P
});
}
if (V[0] instanceof Array && V.length > 1)
throw new Error("Parse Error: multiple actions possible at state: " + Z + ", token: " + it);
switch (V[0]) {
case 1:
L.push(it), B.push($.yytext), w.push($.yylloc), L.push(V[1]), it = null, X = $.yyleng, N = $.yytext, z = $.yylineno, W = $.yylloc;
break;
case 2:
if (F = this.productions_[V[1]][1], q.$ = B[B.length - F], q._$ = {
first_line: w[w.length - (F || 1)].first_line,
last_line: w[w.length - 1].last_line,
first_column: w[w.length - (F || 1)].first_column,
last_column: w[w.length - 1].last_column
}, tt && (q._$.range = [
w[w.length - (F || 1)].range[0],
w[w.length - 1].range[1]
]), Q = this.performAction.apply(q, [
N,
X,
z,
lt.yy,
V[1],
B,
w
].concat(Y)), typeof Q < "u")
return Q;
F && (L = L.slice(0, -1 * F * 2), B = B.slice(0, -1 * F), w = w.slice(0, -1 * F)), L.push(this.productions_[V[1]][0]), B.push(q.$), w.push(q._$), j = D[L[L.length - 2]][L[L.length - 1]], L.push(j);
break;
case 3:
return !0;
}
}
return !0;
}
}, C = function() {
var S = {
EOF: 1,
parseError: function(A, L) {
if (this.yy.parser)
this.yy.parser.parseError(A, L);
else
throw new Error(A);
},
setInput: function(R, A) {
return this.yy = A || this.yy || {}, this._input = R, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
first_line: 1,
first_column: 0,
last_line: 1,
last_column: 0
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
},
input: function() {
var R = this._input[0];
this.yytext += R, this.yyleng++, this.offset++, this.match += R, this.matched += R;
var A = R.match(/(?:\r\n?|\n).*/g);
return A ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), R;
},
unput: function(R) {
var A = R.length, L = R.split(/(?:\r\n?|\n)/g);
this._input = R + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - A), this.offset -= A;
var v = this.match.split(/(?:\r\n?|\n)/g);
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), L.length - 1 && (this.yylineno -= L.length - 1);
var B = this.yylloc.range;
return this.yylloc = {
first_line: this.yylloc.first_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.first_column,
last_column: L ? (L.length === v.length ? this.yylloc.first_column : 0) + v[v.length - L.length].length - L[0].length : this.yylloc.first_column - A
}, this.options.ranges && (this.yylloc.range = [B[0], B[0] + this.yyleng - A]), this.yyleng = this.yytext.length, this;
},
more: function() {
return this._more = !0, this;
},
reject: function() {
if (this.options.backtrack_lexer)
this._backtrack = !0;
else
return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
return this;
},
less: function(R) {
this.unput(this.match.slice(R));
},
pastInput: function() {
var R = this.matched.substr(0, this.matched.length - this.match.length);
return (R.length > 20 ? "..." : "") + R.substr(-20).replace(/\n/g, "");
},
upcomingInput: function() {
var R = this.match;
return R.length < 20 && (R += this._input.substr(0, 20 - R.length)), (R.substr(0, 20) + (R.length > 20 ? "..." : "")).replace(/\n/g, "");
},
showPosition: function() {
var R = this.pastInput(), A = new Array(R.length + 1).join("-");
return R + this.upcomingInput() + `
` + A + "^";
},
test_match: function(R, A) {
var L, v, B;
if (this.options.backtrack_lexer && (B = {
yylineno: this.yylineno,
yylloc: {
first_line: this.yylloc.first_line,
last_line: this.last_line,
first_column: this.yylloc.first_column,
last_column: this.yylloc.last_column
},
yytext: this.yytext,
match: this.match,
matches: this.matches,
matched: this.matched,
yyleng: this.yyleng,
offset: this.offset,
_more: this._more,
_input: this._input,
yy: this.yy,
conditionStack: this.conditionStack.slice(0),
done: this.done
}, this.options.ranges && (B.yylloc.range = this.yylloc.range.slice(0))), v = R[0].match(/(?:\r\n?|\n).*/g), v && (this.yylineno += v.length), this.yylloc = {
first_line: this.yylloc.last_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.last_column,
last_column: v ? v[v.length - 1].length - v[v.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + R[0].length
}, this.yytext += R[0], this.match += R[0], this.matches = R, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(R[0].length), this.matched += R[0], L = this.performAction.call(this, this.yy, this, A, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), L)
return L;
if (this._backtrack) {
for (var w in B)
this[w] = B[w];
return !1;
}
return !1;
},
next: function() {
if (this.done)
return this.EOF;
this._input || (this.done = !0);
var R, A, L, v;
this._more || (this.yytext = "", this.match = "");
for (var B = this._currentRules(), w = 0; w < B.length; w++)
if (L = this._input.match(this.rules[B[w]]), L && (!A || L[0].length > A[0].length)) {
if (A = L, v = w, this.options.backtrack_lexer) {
if (R = this.test_match(L, B[w]), R !== !1)
return R;
if (this._backtrack) {
A = !1;
continue;
} else
return !1;
} else if (!this.options.flex)
break;
}
return A ? (R = this.test_match(A, B[v]), R !== !1 ? R : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
},
lex: function() {
var A = this.next();
return A || this.lex();
},
begin: function(A) {
this.conditionStack.push(A);
},
popState: function() {
var A = this.conditionStack.length - 1;
return A > 0 ? this.conditionStack.pop() : this.conditionStack[0];
},
_currentRules: function() {
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
},
topState: function(A) {
return A = this.conditionStack.length - 1 - Math.abs(A || 0), A >= 0 ? this.conditionStack[A] : "INITIAL";
},
pushState: function(A) {
this.begin(A);
},
stateStackSize: function() {
return this.conditionStack.length;
},
options: { "case-insensitive": !0 },
performAction: function(A, L, v, B) {
switch (v) {
case 0:
return this.begin("open_directive"), 39;
case 1:
return this.begin("type_directive"), 40;
case 2:
return this.popState(), this.begin("arg_directive"), 32;
case 3:
return this.popState(), this.popState(), 42;
case 4:
return 41;
case 5:
return this.begin("acc_title"), 20;
case 6:
return this.popState(), "acc_title_value";
case 7:
return this.begin("acc_descr"), 22;
case 8:
return this.popState(), "acc_descr_value";
case 9:
this.begin("acc_descr_multiline");
break;
case 10:
this.popState();
break;
case 11:
return "acc_descr_multiline_value";
case 12:
break;
case 13:
break;
case 14:
break;
case 15:
return 11;
case 16:
break;
case 17:
break;
case 18:
break;
case 19:
this.begin("href");
break;
case 20:
this.popState();
break;
case 21:
return 37;
case 22:
this.begin("callbackname");
break;
case 23:
this.popState();
break;
case 24:
this.popState(), this.begin("callbackargs");
break;
case 25:
return 35;
case 26:
this.popState();
break;
case 27:
return 36;
case 28:
this.begin("click");
break;
case 29:
this.popState();
break;
case 30:
return 34;
case 31:
return 5;
case 32:
return 12;
case 33:
return 13;
case 34:
return 14;
case 35:
return 15;
case 36:
return 17;
case 37:
return 16;
case 38:
return 18;
case 39:
return "date";
case 40:
return 19;
case 41:
return "accDescription";
case 42:
return 25;
case 43:
return 27;
case 44:
return 28;
case 45:
return 32;
case 46:
return 7;
case 47:
return "INVALID";
}
},
rules: [/^(?:%%\{)/i, /^(?:((?:(?!\}%%)[^:.])*))/i, /^(?::)/i, /^(?:\}%%)/i, /^(?:((?:(?!\}%%).|\n)*))/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:%%(?!\{)*[^\n]*)/i, /^(?:[^\}]%%*[^\n]*)/i, /^(?:%%*[^\n]*[\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:href[\s]+["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:call[\s]+)/i, /^(?:\([\s]*\))/i, /^(?:\()/i, /^(?:[^(]*)/i, /^(?:\))/i, /^(?:[^)]*)/i, /^(?:click[\s]+)/i, /^(?:[\s\n])/i, /^(?:[^\s\n]*)/i, /^(?:gantt\b)/i, /^(?:dateFormat\s[^#\n;]+)/i, /^(?:inclusiveEndDates\b)/i, /^(?:topAxis\b)/i, /^(?:axisFormat\s[^#\n;]+)/i, /^(?:includes\s[^#\n;]+)/i, /^(?:excludes\s[^#\n;]+)/i, /^(?:todayMarker\s[^\n;]+)/i, /^(?:\d\d\d\d-\d\d-\d\d\b)/i, /^(?:title\s[^#\n;]+)/i, /^(?:accDescription\s[^#\n;]+)/i, /^(?:section\s[^#:\n;]+)/i, /^(?:[^#:\n;]+)/i, /^(?::[^#\n;]+)/i, /^(?::)/i, /^(?:$)/i, /^(?:.)/i],
conditions: { acc_descr_multiline: { rules: [10, 11], inclusive: !1 }, acc_descr: { rules: [8], inclusive: !1 }, acc_title: { rules: [6], inclusive: !1 }, close_directive: { rules: [], inclusive: !1 }, arg_directive: { rules: [3, 4], inclusive: !1 }, type_directive: { rules: [2, 3], inclusive: !1 }, open_directive: { rules: [1], inclusive: !1 }, callbackargs: { rules: [26, 27], inclusive: !1 }, callbackname: { rules: [23, 24, 25], inclusive: !1 }, href: { rules: [20, 21], inclusive: !1 }, click: { rules: [29, 30], inclusive: !1 }, INITIAL: { rules: [0, 5, 7, 9, 12, 13, 14, 15, 16, 17, 18, 19, 22, 28, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47], inclusive: !0 } }
};
return S;
}();
T.lexer = C;
function M() {
this.yy = {};
}
return M.prototype = T, T.Parser = M, new M();
}();
Rb.parser = Rb;
const Oit = (t) => t.match(/^\s*gantt/) !== null;
let Mi = "", f_ = "", d_ = "", pu = [], gu = [], p_ = {}, g_ = [], e1 = [], Qo = "";
const DL = ["active", "done", "crit", "milestone"];
let r1 = [], yu = !1, y_ = !1, Ib = 0;
const Fit = function(t, e, r) {
sr.parseDirective(this, t, e, r);
}, Pit = function() {
g_ = [], e1 = [], Qo = "", r1 = [], Oh = 0, Bb = void 0, Fh = void 0, pr = [], Mi = "", f_ = "", d_ = "", pu = [], gu = [], yu = !1, y_ = !1, Ib = 0, p_ = {}, pi();
}, qit = function(t) {
f_ = t;
}, Vit = function() {
return f_;
}, zit = function(t) {
d_ = t;
}, Yit = function() {
return d_;
}, Uit = function(t) {
Mi = t;
}, Wit = function() {
yu = !0;
}, Hit = function() {
return yu;
}, Git = function() {
y_ = !0;
}, jit = function() {
return y_;
}, $it = function() {
return Mi;
}, Xit = function(t) {
pu = t.toLowerCase().split(/[\s,]+/);
}, Kit = function() {
return pu;
}, Zit = function(t) {
gu = t.toLowerCase().split(/[\s,]+/);
}, Qit = function() {
return gu;
}, Jit = function() {
return p_;
}, tat = function(t) {
Qo = t, g_.push(t);
}, eat = function() {
return g_;
}, rat = function() {
let t = Tw();
const e = 10;
let r = 0;
for (; !t && r < e; )
t = Tw(), r++;
return e1 = pr, e1;
}, OL = function(t, e, r, n) {
return n.indexOf(t.format(e.trim())) >= 0 ? !1 : t.isoWeekday() >= 6 && r.indexOf("weekends") >= 0 || r.indexOf(t.format("dddd").toLowerCase()) >= 0 ? !0 : r.indexOf(t.format(e.trim())) >= 0;
}, FL = function(t, e, r, n) {
if (!r.length || t.manualEndTime)
return;
let i = ai(t.startTime, e, !0);
i.add(1, "d");
let a = ai(t.endTime, e, !0), s = nat(i, a, e, r, n);
t.endTime = a.toDate(), t.renderEndTime = s;
}, nat = function(t, e, r, n, i) {
let a = !1, s = null;
for (; t <= e; )
a || (s = e.toDate()), a = OL(t, r, n, i), a && e.add(1, "d"), t.add(1, "d");
return s;
}, Nb = function(t, e, r) {
r = r.trim();
const i = /^after\s+([\d\w- ]+)/.exec(r.trim());
if (i !== null) {
let s = null;
if (i[1].split(" ").forEach(function(o) {
let l = bl(o);
typeof l < "u" && (s ? l.endTime > s.endTime && (s = l) : s = l);
}), s)
return s.endTime;
{
const o = new Date();
return o.setHours(0, 0, 0, 0), o;
}
}
let a = ai(r, e.trim(), !0);
if (a.isValid())
return a.toDate();
{
H.debug("Invalid date:" + r), H.debug("With date format:" + e.trim());
const s = new Date(r);
if (typeof s > "u" || isNaN(s.getTime()))
throw new Error("Invalid date:" + r);
return s;
}
}, PL = function(t) {
const e = /^(\d+(?:\.\d+)?)([yMwdhms]|ms)$/.exec(t.trim());
return e !== null ? ai.duration(Number.parseFloat(e[1]), e[2]) : ai.duration.invalid();
}, qL = function(t, e, r, n) {
n = n || !1, r = r.trim();
let i = ai(r, e.trim(), !0);
if (i.isValid())
return n && i.add(1, "d"), i.toDate();
const a = ai(t), s = PL(r);
return s.isValid() && a.add(s), a.toDate();
};
let Oh = 0;
const Mo = function(t) {
return typeof t > "u" ? (Oh = Oh + 1, "task" + Oh) : t;
}, iat = function(t, e) {
let r;
e.substr(0, 1) === ":" ? r = e.substr(1, e.length) : r = e;
const n = r.split(","), i = {};
UL(n, i, DL);
for (let s = 0; s < n.length; s++)
n[s] = n[s].trim();
let a = "";
switch (n.length) {
case 1:
i.id = Mo(), i.startTime = t.endTime, a = n[0];
break;
case 2:
i.id = Mo(), i.startTime = Nb(void 0, Mi, n[0]), a = n[1];
break;
case 3:
i.id = Mo(n[0]), i.startTime = Nb(void 0, Mi, n[1]), a = n[2];
break;
}
return a && (i.endTime = qL(i.startTime, Mi, a, yu), i.manualEndTime = ai(a, "YYYY-MM-DD", !0).isValid(), FL(i, Mi, gu, pu)), i;
}, aat = function(t, e) {
let r;
e.substr(0, 1) === ":" ? r = e.substr(1, e.length) : r = e;
const n = r.split(","), i = {};
UL(n, i, DL);
for (let a = 0; a < n.length; a++)
n[a] = n[a].trim();
switch (n.length) {
case 1:
i.id = Mo(), i.startTime = {
type: "prevTaskEnd",
id: t
}, i.endTime = {
data: n[0]
};
break;
case 2:
i.id = Mo(), i.startTime = {
type: "getStartDate",
startData: n[0]
}, i.endTime = {
data: n[1]
};
break;
case 3:
i.id = Mo(n[0]), i.startTime = {
type: "getStartDate",
startData: n[1]
}, i.endTime = {
data: n[2]
};
break;
}
return i;
};
let Bb, Fh, pr = [];
const VL = {}, sat = function(t, e) {
const r = {
section: Qo,
type: Qo,
processed: !1,
manualEndTime: !1,
renderEndTime: null,
raw: { data: e },
task: t,
classes: []
}, n = aat(Fh, e);
r.raw.startTime = n.startTime, r.raw.endTime = n.endTime, r.id = n.id, r.prevTaskId = Fh, r.active = n.active, r.done = n.done, r.crit = n.crit, r.milestone = n.milestone, r.order = Ib, Ib++;
const i = pr.push(r);
Fh = r.id, VL[r.id] = i - 1;
}, bl = function(t) {
const e = VL[t];
return pr[e];
}, oat = function(t, e) {
const r = {
section: Qo,
type: Qo,
description: t,
task: t,
classes: []
}, n = iat(Bb, e);
r.startTime = n.startTime, r.endTime = n.endTime, r.id = n.id, r.active = n.active, r.done = n.done, r.crit = n.crit, r.milestone = n.milestone, Bb = r, e1.push(r);
}, Tw = function() {
const t = function(r) {
const n = pr[r];
let i = "";
switch (pr[r].raw.startTime.type) {
case "prevTaskEnd": {
const a = bl(n.prevTaskId);
n.startTime = a.endTime;
break;
}
case "getStartDate":
i = Nb(void 0, Mi, pr[r].raw.startTime.startData), i && (pr[r].startTime = i);
break;
}
return pr[r].startTime && (pr[r].endTime = qL(
pr[r].startTime,
Mi,
pr[r].raw.endTime.data,
yu
), pr[r].endTime && (pr[r].processed = !0, pr[r].manualEndTime = ai(
pr[r].raw.endTime.data,
"YYYY-MM-DD",
!0
).isValid(), FL(pr[r], Mi, gu, pu))), pr[r].processed;
};
let e = !0;
for (let r = 0; r < pr.length; r++)
t(r), e = e && pr[r].processed;
return e;
}, lat = function(t, e) {
let r = e;
nt().securityLevel !== "loose" && (r = qi(e)), t.split(",").forEach(function(n) {
typeof bl(n) < "u" && (YL(n, () => {
window.open(r, "_self");
}), p_[n] = r);
}), zL(t, "clickable");
}, zL = function(t, e) {
t.split(",").forEach(function(r) {
let n = bl(r);
typeof n < "u" && n.classes.push(e);
});
}, cat = function(t, e, r) {
if (nt().securityLevel !== "loose" || typeof e > "u")
return;
let n = [];
if (typeof r == "string") {
n = r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
for (let a = 0; a < n.length; a++) {
let s = n[a].trim();
s.charAt(0) === '"' && s.charAt(s.length - 1) === '"' && (s = s.substr(1, s.length - 2)), n[a] = s;
}
}
n.length === 0 && n.push(t), typeof bl(t) < "u" && YL(t, () => {
Re.runFunc(e, ...n);
});
}, YL = function(t, e) {
r1.push(function() {
const r = document.querySelector(`[id="${t}"]`);
r !== null && r.addEventListener("click", function() {
e();
});
}), r1.push(function() {
const r = document.querySelector(`[id="${t}-text"]`);
r !== null && r.addEventListener("click", function() {
e();
});
});
}, uat = function(t, e, r) {
t.split(",").forEach(function(n) {
cat(n, e, r);
}), zL(t, "clickable");
}, hat = function(t) {
r1.forEach(function(e) {
e(t);
});
}, m_ = {
parseDirective: Fit,
getConfig: () => nt().gantt,
clear: Pit,
setDateFormat: Uit,
getDateFormat: $it,
enableInclusiveEndDates: Wit,
endDatesAreInclusive: Hit,
enableTopAxis: Git,
topAxisEnabled: jit,
setAxisFormat: qit,
getAxisFormat: Vit,
setTodayMarker: zit,
getTodayMarker: Yit,
setAccTitle: zn,
getAccTitle: gi,
setDiagramTitle: o0,
getDiagramTitle: l0,
setAccDescription: yi,
getAccDescription: mi,
addSection: tat,
getSections: eat,
getTasks: rat,
addTask: sat,
findTaskById: bl,
addTaskOrg: oat,
setIncludes: Xit,
getIncludes: Kit,
setExcludes: Zit,
getExcludes: Qit,
setClickEvent: uat,
setLink: lat,
getLinks: Jit,
bindFunctions: hat,
parseDuration: PL,
isInvalidDate: OL
};
function UL(t, e, r) {
let n = !0;
for (; n; )
n = !1, r.forEach(function(i) {
const a = "^\\s*" + i + "\\s*$", s = new RegExp(a);
t[0].match(s) && (e[i] = !0, t.shift(1), n = !0);
});
}
const fat = function() {
H.debug("Something is calling, setConf, remove the call");
};
let ta;
const dat = function(t, e, r, n) {
const i = nt().gantt, a = nt().securityLevel;
let s;
a === "sandbox" && (s = St("#i" + e));
const o = St(a === "sandbox" ? s.nodes()[0].contentDocument.body : "body"), l = a === "sandbox" ? s.nodes()[0].contentDocument : document, u = l.getElementById(e);
ta = u.parentElement.offsetWidth, typeof ta > "u" && (ta = 1200), typeof i.useWidth < "u" && (ta = i.useWidth);
const h = n.db.getTasks(), d = h.length * (i.barHeight + i.barGap) + 2 * i.topPadding;
u.setAttribute("viewBox", "0 0 " + ta + " " + d);
const f = o.select(`[id="${e}"]`), p = pC().domain([
gc(h, function(L) {
return L.startTime;
}),
Bo(h, function(L) {
return L.endTime;
})
]).rangeRound([0, ta - i.leftPadding - i.rightPadding]);
let m = [];
for (let L = 0; L < h.length; L++)
m.push(h[L].type);
const _ = m;
m = S(m);
function y(L, v) {
const B = L.startTime, w = v.startTime;
let D = 0;
return B > w ? D = 1 : B < w && (D = -1), D;
}
h.sort(y), b(h, ta, d), di(f, d, ta, i.useMaxWidth), f.append("text").text(n.db.getDiagramTitle()).attr("x", ta / 2).attr("y", i.titleTopMargin).attr("class", "titleText"), vn(n.db, f, e);
function b(L, v, B) {
const w = i.barHeight, D = w + i.barGap, N = i.topPadding, z = i.leftPadding, X = j3().domain([0, m.length]).range(["#00B9FA", "#F95002"]).interpolate(eT);
k(
D,
N,
z,
v,
B,
L,
n.db.getExcludes(),
n.db.getIncludes()
), T(z, N, v, B), x(L, D, N, z, w, X, v), C(D, N), M(z, N, v, B);
}
function x(L, v, B, w, D, N, z) {
f.append("g").selectAll("rect").data(L).enter().append("rect").attr("x", 0).attr("y", function(Y, $) {
return $ = Y.order, $ * v + B - 2;
}).attr("width", function() {
return z - i.rightPadding / 2;
}).attr("height", v).attr("class", function(Y) {
for (let $ = 0; $ < m.length; $++)
if (Y.type === m[$])
return "section section" + $ % i.numberSectionStyles;
return "section section0";
});
const X = f.append("g").selectAll("rect").data(L).enter(), ct = n.db.getLinks();
if (X.append("rect").attr("id", function(Y) {
return Y.id;
}).attr("rx", 3).attr("ry", 3).attr("x", function(Y) {
return Y.milestone ? p(Y.startTime) + w + 0.5 * (p(Y.endTime) - p(Y.startTime)) - 0.5 * D : p(Y.startTime) + w;
}).attr("y", function(Y, $) {
return $ = Y.order, $ * v + B;
}).attr("width", function(Y) {
return Y.milestone ? D : p(Y.renderEndTime || Y.endTime) - p(Y.startTime);
}).attr("height", D).attr("transform-origin", function(Y, $) {
return $ = Y.order, (p(Y.startTime) + w + 0.5 * (p(Y.endTime) - p(Y.startTime))).toString() + "px " + ($ * v + B + 0.5 * D).toString() + "px";
}).attr("class", function(Y) {
const $ = "task";
let lt = "";
Y.classes.length > 0 && (lt = Y.classes.join(" "));
let ut = 0;
for (let tt = 0; tt < m.length; tt++)
Y.type === m[tt] && (ut = tt % i.numberSectionStyles);
let W = "";
return Y.active ? Y.crit ? W += " activeCrit" : W = " active" : Y.done ? Y.crit ? W = " doneCrit" : W = " done" : Y.crit && (W += " crit"), W.length === 0 && (W = " task"), Y.milestone && (W = " milestone " + W), W += ut, W += " " + lt, $ + W;
}), X.append("text").attr("id", function(Y) {
return Y.id + "-text";
}).text(function(Y) {
return Y.task;
}).attr("font-size", i.fontSize).attr("x", function(Y) {
let $ = p(Y.startTime), lt = p(Y.renderEndTime || Y.endTime);
Y.milestone && ($ += 0.5 * (p(Y.endTime) - p(Y.startTime)) - 0.5 * D), Y.milestone && (lt = $ + D);
const ut = this.getBBox().width;
return ut > lt - $ ? lt + ut + 1.5 * i.leftPadding > z ? $ + w - 5 : lt + w + 5 : (lt - $) / 2 + $ + w;
}).attr("y", function(Y, $) {
return $ = Y.order, $ * v + i.barHeight / 2 + (i.fontSize / 2 - 2) + B;
}).attr("text-height", D).attr("class", function(Y) {
const $ = p(Y.startTime);
let lt = p(Y.endTime);
Y.milestone && (lt = $ + D);
const ut = this.getBBox().width;
let W = "";
Y.classes.length > 0 && (W = Y.classes.join(" "));
let tt = 0;
for (let it = 0; it < m.length; it++)
Y.type === m[it] && (tt = it % i.numberSectionStyles);
let K = "";
return Y.active && (Y.crit ? K = "activeCritText" + tt : K = "activeText" + tt), Y.done ? Y.crit ? K = K + " doneCritText" + tt : K = K + " doneText" + tt : Y.crit && (K = K + " critText" + tt), Y.milestone && (K += " milestoneText"), ut > lt - $ ? lt + ut + 1.5 * i.leftPadding > z ? W + " taskTextOutsideLeft taskTextOutside" + tt + " " + K : W + " taskTextOutsideRight taskTextOutside" + tt + " " + K + " width-" + ut : W + " taskText taskText" + tt + " " + K + " width-" + ut;
}), nt().securityLevel === "sandbox") {
let Y;
Y = St("#i" + e);
const $ = Y.nodes()[0].contentDocument;
X.filter(function(lt) {
return typeof ct[lt.id] < "u";
}).each(function(lt) {
var ut = $.querySelector("#" + lt.id), W = $.querySelector("#" + lt.id + "-text");
const tt = ut.parentNode;
var K = $.createElement("a");
K.setAttribute("xlink:href", ct[lt.id]), K.setAttribute("target", "_top"), tt.appendChild(K), K.appendChild(ut), K.appendChild(W);
});
}
}
function k(L, v, B, w, D, N, z, X) {
const ct = N.reduce(
(tt, { startTime: K }) => tt ? Math.min(tt, K) : K,
0
), J = N.reduce((tt, { endTime: K }) => tt ? Math.max(tt, K) : K, 0), Y = n.db.getDateFormat();
if (!ct || !J)
return;
const $ = [];
let lt = null, ut = ai(ct);
for (; ut.valueOf() <= J; )
n.db.isInvalidDate(ut, Y, z, X) ? lt ? lt.end = ut.clone() : lt = {
start: ut.clone(),
end: ut.clone()
} : lt && ($.push(lt), lt = null), ut.add(1, "d");
f.append("g").selectAll("rect").data($).enter().append("rect").attr("id", function(tt) {
return "exclude-" + tt.start.format("YYYY-MM-DD");
}).attr("x", function(tt) {
return p(tt.start) + B;
}).attr("y", i.gridLineStartPadding).attr("width", function(tt) {
const K = tt.end.clone().add(1, "day");
return p(K) - p(tt.start);
}).attr("height", D - v - i.gridLineStartPadding).attr("transform-origin", function(tt, K) {
return (p(tt.start) + B + 0.5 * (p(tt.end) - p(tt.start))).toString() + "px " + (K * L + 0.5 * D).toString() + "px";
}).attr("class", "exclude-range");
}
function T(L, v, B, w) {
let D = g9(p).tickSize(-w + v + i.gridLineStartPadding).tickFormat(Rc(n.db.getAxisFormat() || i.axisFormat || "%Y-%m-%d"));
if (f.append("g").attr("class", "grid").attr("transform", "translate(" + L + ", " + (w - 50) + ")").call(D).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10).attr("dy", "1em"), n.db.topAxisEnabled() || i.topAxis) {
let N = p9(p).tickSize(-w + v + i.gridLineStartPadding).tickFormat(Rc(n.db.getAxisFormat() || i.axisFormat || "%Y-%m-%d"));
f.append("g").attr("class", "grid").attr("transform", "translate(" + L + ", " + v + ")").call(N).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10);
}
}
function C(L, v) {
const B = [];
let w = 0;
for (let D = 0; D < m.length; D++)
B[D] = [m[D], A(m[D], _)];
f.append("g").selectAll("text").data(B).enter().append(function(D) {
const N = D[0].split(pe.lineBreakRegex), z = -(N.length - 1) / 2, X = l.createElementNS("http://www.w3.org/2000/svg", "text");
X.setAttribute("dy", z + "em");
for (let ct = 0; ct < N.length; ct++) {
const J = l.createElementNS("http://www.w3.org/2000/svg", "tspan");
J.setAttribute("alignment-baseline", "central"), J.setAttribute("x", "10"), ct > 0 && J.setAttribute("dy", "1em"), J.textContent = N[ct], X.appendChild(J);
}
return X;
}).attr("x", 10).attr("y", function(D, N) {
if (N > 0)
for (let z = 0; z < N; z++)
return w += B[N - 1][1], D[1] * L / 2 + w * L + v;
else
return D[1] * L / 2 + v;
}).attr("font-size", i.sectionFontSize).attr("font-size", i.sectionFontSize).attr("class", function(D) {
for (let N = 0; N < m.length; N++)
if (D[0] === m[N])
return "sectionTitle sectionTitle" + N % i.numberSectionStyles;
return "sectionTitle";
});
}
function M(L, v, B, w) {
const D = n.db.getTodayMarker();
if (D === "off")
return;
const N = f.append("g").attr("class", "today"), z = new Date(), X = N.append("line");
X.attr("x1", p(z) + L).attr("x2", p(z) + L).attr("y1", i.titleTopMargin).attr("y2", w - i.titleTopMargin).attr("class", "today"), D !== "" && X.attr("style", D.replace(/,/g, ";"));
}
function S(L) {
const v = {}, B = [];
for (let w = 0, D = L.length; w < D; ++w)
Object.prototype.hasOwnProperty.call(v, L[w]) || (v[L[w]] = !0, B.push(L[w]));
return B;
}
function R(L) {
let v = L.length;
const B = {};
for (; v; )
B[L[--v]] = (B[L[v]] || 0) + 1;
return B;
}
function A(L, v) {
return R(v)[L] || 0;
}
}, pat = {
setConf: fat,
draw: dat
};
var Db = function() {
var t = function(a, s, o, l) {
for (o = o || {}, l = a.length; l--; o[a[l]] = s)
;
return o;
}, e = [6, 9, 10], r = {
trace: function() {
},
yy: {},
symbols_: { error: 2, start: 3, info: 4, document: 5, EOF: 6, line: 7, statement: 8, NL: 9, showInfo: 10, $accept: 0, $end: 1 },
terminals_: { 2: "error", 4: "info", 6: "EOF", 9: "NL", 10: "showInfo" },
productions_: [0, [3, 3], [5, 0], [5, 2], [7, 1], [7, 1], [8, 1]],
performAction: function(s, o, l, u, h, d, f) {
switch (d.length - 1, h) {
case 1:
return u;
case 4:
break;
case 6:
u.setInfo(!0);
break;
}
},
table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, t(e, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: 6, 9: [1, 7], 10: [1, 8] }, { 1: [2, 1] }, t(e, [2, 3]), t(e, [2, 4]), t(e, [2, 5]), t(e, [2, 6])],
defaultActions: { 4: [2, 1] },
parseError: function(s, o) {
if (o.recoverable)
this.trace(s);
else {
var l = new Error(s);
throw l.hash = o, l;
}
},
parse: function(s) {
var o = this, l = [0], u = [], h = [null], d = [], f = this.table, p = "", m = 0, _ = 0, y = 2, b = 1, x = d.slice.call(arguments, 1), k = Object.create(this.lexer), T = { yy: {} };
for (var C in this.yy)
Object.prototype.hasOwnProperty.call(this.yy, C) && (T.yy[C] = this.yy[C]);
k.setInput(s, T.yy), T.yy.lexer = k, T.yy.parser = this, typeof k.yylloc > "u" && (k.yylloc = {});
var M = k.yylloc;
d.push(M);
var S = k.options && k.options.ranges;
typeof T.yy.parseError == "function" ? this.parseError = T.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
function R() {
var J;
return J = u.pop() || k.lex() || b, typeof J != "number" && (J instanceof Array && (u = J, J = u.pop()), J = o.symbols_[J] || J), J;
}
for (var A, L, v, B, w = {}, D, N, z, X; ; ) {
if (L = l[l.length - 1], this.defaultActions[L] ? v = this.defaultActions[L] : ((A === null || typeof A > "u") && (A = R()), v = f[L] && f[L][A]), typeof v > "u" || !v.length || !v[0]) {
var ct = "";
X = [];
for (D in f[L])
this.terminals_[D] && D > y && X.push("'" + this.terminals_[D] + "'");
k.showPosition ? ct = "Parse error on line " + (m + 1) + `:
` + k.showPosition() + `
Expecting ` + X.join(", ") + ", got '" + (this.terminals_[A] || A) + "'" : ct = "Parse error on line " + (m + 1) + ": Unexpected " + (A == b ? "end of input" : "'" + (this.terminals_[A] || A) + "'"), this.parseError(ct, {
text: k.match,
token: this.terminals_[A] || A,
line: k.yylineno,
loc: M,
expected: X
});
}
if (v[0] instanceof Array && v.length > 1)
throw new Error("Parse Error: multiple actions possible at state: " + L + ", token: " + A);
switch (v[0]) {
case 1:
l.push(A), h.push(k.yytext), d.push(k.yylloc), l.push(v[1]), A = null, _ = k.yyleng, p = k.yytext, m = k.yylineno, M = k.yylloc;
break;
case 2:
if (N = this.productions_[v[1]][1], w.$ = h[h.length - N], w._$ = {
first_line: d[d.length - (N || 1)].first_line,
last_line: d[d.length - 1].last_line,
first_column: d[d.length - (N || 1)].first_column,
last_column: d[d.length - 1].last_column
}, S && (w._$.range = [
d[d.length - (N || 1)].range[0],
d[d.length - 1].range[1]
]), B = this.performAction.apply(w, [
p,
_,
m,
T.yy,
v[1],
h,
d
].concat(x)), typeof B < "u")
return B;
N && (l = l.slice(0, -1 * N * 2), h = h.slice(0, -1 * N), d = d.slice(0, -1 * N)), l.push(this.productions_[v[1]][0]), h.push(w.$), d.push(w._$), z = f[l[l.length - 2]][l[l.length - 1]], l.push(z);
break;
case 3:
return !0;
}
}
return !0;
}
}, n = function() {
var a = {
EOF: 1,
parseError: function(o, l) {
if (this.yy.parser)
this.yy.parser.parseError(o, l);
else
throw new Error(o);
},
setInput: function(s, o) {
return this.yy = o || this.yy || {}, this._input = s, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
first_line: 1,
first_column: 0,
last_line: 1,
last_column: 0
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
},
input: function() {
var s = this._input[0];
this.yytext += s, this.yyleng++, this.offset++, this.match += s, this.matched += s;
var o = s.match(/(?:\r\n?|\n).*/g);
return o ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), s;
},
unput: function(s) {
var o = s.length, l = s.split(/(?:\r\n?|\n)/g);
this._input = s + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - o), this.offset -= o;
var u = this.match.split(/(?:\r\n?|\n)/g);
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), l.length - 1 && (this.yylineno -= l.length - 1);
var h = this.yylloc.range;
return this.yylloc = {
first_line: this.yylloc.first_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.first_column,
last_column: l ? (l.length === u.length ? this.yylloc.first_column : 0) + u[u.length - l.length].length - l[0].length : this.yylloc.first_column - o
}, this.options.ranges && (this.yylloc.range = [h[0], h[0] + this.yyleng - o]), this.yyleng = this.yytext.length, this;
},
more: function() {
return this._more = !0, this;
},
reject: function() {
if (this.options.backtrack_lexer)
this._backtrack = !0;
else
return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
return this;
},
less: function(s) {
this.unput(this.match.slice(s));
},
pastInput: function() {
var s = this.matched.substr(0, this.matched.length - this.match.length);
return (s.length > 20 ? "..." : "") + s.substr(-20).replace(/\n/g, "");
},
upcomingInput: function() {
var s = this.match;
return s.length < 20 && (s += this._input.substr(0, 20 - s.length)), (s.substr(0, 20) + (s.length > 20 ? "..." : "")).replace(/\n/g, "");
},
showPosition: function() {
var s = this.pastInput(), o = new Array(s.length + 1).join("-");
return s + this.upcomingInput() + `
` + o + "^";
},
test_match: function(s, o) {
var l, u, h;
if (this.options.backtrack_lexer && (h = {
yylineno: this.yylineno,
yylloc: {
first_line: this.yylloc.first_line,
last_line: this.last_line,
first_column: this.yylloc.first_column,
last_column: this.yylloc.last_column
},
yytext: this.yytext,
match: this.match,
matches: this.matches,
matched: this.matched,
yyleng: this.yyleng,
offset: this.offset,
_more: this._more,
_input: this._input,
yy: this.yy,
conditionStack: this.conditionStack.slice(0),
done: this.done
}, this.options.ranges && (h.yylloc.range = this.yylloc.range.slice(0))), u = s[0].match(/(?:\r\n?|\n).*/g), u && (this.yylineno += u.length), this.yylloc = {
first_line: this.yylloc.last_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.last_column,
last_column: u ? u[u.length - 1].length - u[u.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + s[0].length
}, this.yytext += s[0], this.match += s[0], this.matches = s, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(s[0].length), this.matched += s[0], l = this.performAction.call(this, this.yy, this, o, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), l)
return l;
if (this._backtrack) {
for (var d in h)
this[d] = h[d];
return !1;
}
return !1;
},
next: function() {
if (this.done)
return this.EOF;
this._input || (this.done = !0);
var s, o, l, u;
this._more || (this.yytext = "", this.match = "");
for (var h = this._currentRules(), d = 0; d < h.length; d++)
if (l = this._input.match(this.rules[h[d]]), l && (!o || l[0].length > o[0].length)) {
if (o = l, u = d, this.options.backtrack_lexer) {
if (s = this.test_match(l, h[d]), s !== !1)
return s;
if (this._backtrack) {
o = !1;
continue;
} else
return !1;
} else if (!this.options.flex)
break;
}
return o ? (s = this.test_match(o, h[u]), s !== !1 ? s : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
},
lex: function() {
var o = this.next();
return o || this.lex();
},
begin: function(o) {
this.conditionStack.push(o);
},
popState: function() {
var o = this.conditionStack.length - 1;
return o > 0 ? this.conditionStack.pop() : this.conditionStack[0];
},
_currentRules: function() {
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
},
topState: function(o) {
return o = this.conditionStack.length - 1 - Math.abs(o || 0), o >= 0 ? this.conditionStack[o] : "INITIAL";
},
pushState: function(o) {
this.begin(o);
},
stateStackSize: function() {
return this.conditionStack.length;
},
options: { "case-insensitive": !0 },
performAction: function(o, l, u, h) {
switch (u) {
case 0:
return 4;
case 1:
return 9;
case 2:
return "space";
case 3:
return 10;
case 4:
return 6;
case 5:
return "TXT";
}
},
rules: [/^(?:info\b)/i, /^(?:[\s\n\r]+)/i, /^(?:[\s]+)/i, /^(?:showInfo\b)/i, /^(?:$)/i, /^(?:.)/i],
conditions: { INITIAL: { rules: [0, 1, 2, 3, 4, 5], inclusive: !0 } }
};
return a;
}();
r.lexer = n;
function i() {
this.yy = {};
}
return i.prototype = r, r.Parser = i, new i();
}();
Db.parser = Db;
var WL = "", HL = !1;
const gat = (t) => {
H.debug("Setting message to: " + t), WL = t;
}, yat = () => WL, mat = (t) => {
HL = t;
}, bat = () => HL, _at = {
setMessage: gat,
getMessage: yat,
setInfo: mat,
getInfo: bat,
clear: pi
}, vat = (t, e, r, n) => {
try {
H.debug(`Rendering info diagram
` + t);
const i = nt().securityLevel;
let a;
i === "sandbox" && (a = St("#i" + e));
const o = St(i === "sandbox" ? a.nodes()[0].contentDocument.body : "body").select("#" + e);
o.append("g").append("text").attr("x", 100).attr("y", 40).attr("class", "version").attr("font-size", "32px").style("text-anchor", "middle").text("v " + r), o.attr("height", 100), o.attr("width", 400);
} catch (i) {
H.error("Error while rendering info diagram"), H.error(i.message);
}
}, xat = {
draw: vat
}, kat = (t) => t.match(/^\s*info/) !== null;
var Ob = function() {
var t = function(M, S, R, A) {
for (R = R || {}, A = M.length; A--; R[M[A]] = S)
;
return R;
}, e = [1, 4], r = [1, 5], n = [1, 6], i = [1, 7], a = [1, 9], s = [1, 11, 13, 15, 17, 19, 20, 26, 27, 28, 29], o = [2, 5], l = [1, 6, 11, 13, 15, 17, 19, 20, 26, 27, 28, 29], u = [26, 27, 28], h = [2, 8], d = [1, 18], f = [1, 19], p = [1, 20], m = [1, 21], _ = [1, 22], y = [1, 23], b = [1, 28], x = [6, 26, 27, 28, 29], k = {
trace: function() {
},
yy: {},
symbols_: { error: 2, start: 3, eol: 4, directive: 5, PIE: 6, document: 7, showData: 8, line: 9, statement: 10, txt: 11, value: 12, title: 13, title_value: 14, acc_title: 15, acc_title_value: 16, acc_descr: 17, acc_descr_value: 18, acc_descr_multiline_value: 19, section: 20, openDirective: 21, typeDirective: 22, closeDirective: 23, ":": 24, argDirective: 25, NEWLINE: 26, ";": 27, EOF: 28, open_directive: 29, type_directive: 30, arg_directive: 31, close_directive: 32, $accept: 0, $end: 1 },
terminals_: { 2: "error", 6: "PIE", 8: "showData", 11: "txt", 12: "value", 13: "title", 14: "title_value", 15: "acc_title", 16: "acc_title_value", 17: "acc_descr", 18: "acc_descr_value", 19: "acc_descr_multiline_value", 20: "section", 24: ":", 26: "NEWLINE", 27: ";", 28: "EOF", 29: "open_directive", 30: "type_directive", 31: "arg_directive", 32: "close_directive" },
productions_: [0, [3, 2], [3, 2], [3, 2], [3, 3], [7, 0], [7, 2], [9, 2], [10, 0], [10, 2], [10, 2], [10, 2], [10, 2], [10, 1], [10, 1], [10, 1], [5, 3], [5, 5], [4, 1], [4, 1], [4, 1], [21, 1], [22, 1], [25, 1], [23, 1]],
performAction: function(S, R, A, L, v, B, w) {
var D = B.length - 1;
switch (v) {
case 4:
L.setShowData(!0);
break;
case 7:
this.$ = B[D - 1];
break;
case 9:
L.addSection(B[D - 1], L.cleanupValue(B[D]));
break;
case 10:
this.$ = B[D].trim(), L.setDiagramTitle(this.$);
break;
case 11:
this.$ = B[D].trim(), L.setAccTitle(this.$);
break;
case 12:
case 13:
this.$ = B[D].trim(), L.setAccDescription(this.$);
break;
case 14:
L.addSection(B[D].substr(8)), this.$ = B[D].substr(8);
break;
case 21:
L.parseDirective("%%{", "open_directive");
break;
case 22:
L.parseDirective(B[D], "type_directive");
break;
case 23:
B[D] = B[D].trim().replace(/'/g, '"'), L.parseDirective(B[D], "arg_directive");
break;
case 24:
L.parseDirective("}%%", "close_directive", "pie");
break;
}
},
table: [{ 3: 1, 4: 2, 5: 3, 6: e, 21: 8, 26: r, 27: n, 28: i, 29: a }, { 1: [3] }, { 3: 10, 4: 2, 5: 3, 6: e, 21: 8, 26: r, 27: n, 28: i, 29: a }, { 3: 11, 4: 2, 5: 3, 6: e, 21: 8, 26: r, 27: n, 28: i, 29: a }, t(s, o, { 7: 12, 8: [1, 13] }), t(l, [2, 18]), t(l, [2, 19]), t(l, [2, 20]), { 22: 14, 30: [1, 15] }, { 30: [2, 21] }, { 1: [2, 1] }, { 1: [2, 2] }, t(u, h, { 21: 8, 9: 16, 10: 17, 5: 24, 1: [2, 3], 11: d, 13: f, 15: p, 17: m, 19: _, 20: y, 29: a }), t(s, o, { 7: 25 }), { 23: 26, 24: [1, 27], 32: b }, t([24, 32], [2, 22]), t(s, [2, 6]), { 4: 29, 26: r, 27: n, 28: i }, { 12: [1, 30] }, { 14: [1, 31] }, { 16: [1, 32] }, { 18: [1, 33] }, t(u, [2, 13]), t(u, [2, 14]), t(u, [2, 15]), t(u, h, { 21: 8, 9: 16, 10: 17, 5: 24, 1: [2, 4], 11: d, 13: f, 15: p, 17: m, 19: _, 20: y, 29: a }), t(x, [2, 16]), { 25: 34, 31: [1, 35] }, t(x, [2, 24]), t(s, [2, 7]), t(u, [2, 9]), t(u, [2, 10]), t(u, [2, 11]), t(u, [2, 12]), { 23: 36, 32: b }, { 32: [2, 23] }, t(x, [2, 17])],
defaultActions: { 9: [2, 21], 10: [2, 1], 11: [2, 2], 35: [2, 23] },
parseError: function(S, R) {
if (R.recoverable)
this.trace(S);
else {
var A = new Error(S);
throw A.hash = R, A;
}
},
parse: function(S) {
var R = this, A = [0], L = [], v = [null], B = [], w = this.table, D = "", N = 0, z = 0, X = 2, ct = 1, J = B.slice.call(arguments, 1), Y = Object.create(this.lexer), $ = { yy: {} };
for (var lt in this.yy)
Object.prototype.hasOwnProperty.call(this.yy, lt) && ($.yy[lt] = this.yy[lt]);
Y.setInput(S, $.yy), $.yy.lexer = Y, $.yy.parser = this, typeof Y.yylloc > "u" && (Y.yylloc = {});
var ut = Y.yylloc;
B.push(ut);
var W = Y.options && Y.options.ranges;
typeof $.yy.parseError == "function" ? this.parseError = $.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
function tt() {
var et;
return et = L.pop() || Y.lex() || ct, typeof et != "number" && (et instanceof Array && (L = et, et = L.pop()), et = R.symbols_[et] || et), et;
}
for (var K, it, Z, V, Q = {}, q, U, F, j; ; ) {
if (it = A[A.length - 1], this.defaultActions[it] ? Z = this.defaultActions[it] : ((K === null || typeof K > "u") && (K = tt()), Z = w[it] && w[it][K]), typeof Z > "u" || !Z.length || !Z[0]) {
var P = "";
j = [];
for (q in w[it])
this.terminals_[q] && q > X && j.push("'" + this.terminals_[q] + "'");
Y.showPosition ? P = "Parse error on line " + (N + 1) + `:
` + Y.showPosition() + `
Expecting ` + j.join(", ") + ", got '" + (this.terminals_[K] || K) + "'" : P = "Parse error on line " + (N + 1) + ": Unexpected " + (K == ct ? "end of input" : "'" + (this.terminals_[K] || K) + "'"), this.parseError(P, {
text: Y.match,
token: this.terminals_[K] || K,
line: Y.yylineno,
loc: ut,
expected: j
});
}
if (Z[0] instanceof Array && Z.length > 1)
throw new Error("Parse Error: multiple actions possible at state: " + it + ", token: " + K);
switch (Z[0]) {
case 1:
A.push(K), v.push(Y.yytext), B.push(Y.yylloc), A.push(Z[1]), K = null, z = Y.yyleng, D = Y.yytext, N = Y.yylineno, ut = Y.yylloc;
break;
case 2:
if (U = this.productions_[Z[1]][1], Q.$ = v[v.length - U], Q._$ = {
first_line: B[B.length - (U || 1)].first_line,
last_line: B[B.length - 1].last_line,
first_column: B[B.length - (U || 1)].first_column,
last_column: B[B.length - 1].last_column
}, W && (Q._$.range = [
B[B.length - (U || 1)].range[0],
B[B.length - 1].range[1]
]), V = this.performAction.apply(Q, [
D,
z,
N,
$.yy,
Z[1],
v,
B
].concat(J)), typeof V < "u")
return V;
U && (A = A.slice(0, -1 * U * 2), v = v.slice(0, -1 * U), B = B.slice(0, -1 * U)), A.push(this.productions_[Z[1]][0]), v.push(Q.$), B.push(Q._$), F = w[A[A.length - 2]][A[A.length - 1]], A.push(F);
break;
case 3:
return !0;
}
}
return !0;
}
}, T = function() {
var M = {
EOF: 1,
parseError: function(R, A) {
if (this.yy.parser)
this.yy.parser.parseError(R, A);
else
throw new Error(R);
},
setInput: function(S, R) {
return this.yy = R || this.yy || {}, this._input = S, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
first_line: 1,
first_column: 0,
last_line: 1,
last_column: 0
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
},
input: function() {
var S = this._input[0];
this.yytext += S, this.yyleng++, this.offset++, this.match += S, this.matched += S;
var R = S.match(/(?:\r\n?|\n).*/g);
return R ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), S;
},
unput: function(S) {
var R = S.length, A = S.split(/(?:\r\n?|\n)/g);
this._input = S + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - R), this.offset -= R;
var L = this.match.split(/(?:\r\n?|\n)/g);
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), A.length - 1 && (this.yylineno -= A.length - 1);
var v = this.yylloc.range;
return this.yylloc = {
first_line: this.yylloc.first_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.first_column,
last_column: A ? (A.length === L.length ? this.yylloc.first_column : 0) + L[L.length - A.length].length - A[0].length : this.yylloc.first_column - R
}, this.options.ranges && (this.yylloc.range = [v[0], v[0] + this.yyleng - R]), this.yyleng = this.yytext.length, this;
},
more: function() {
return this._more = !0, this;
},
reject: function() {
if (this.options.backtrack_lexer)
this._backtrack = !0;
else
return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
return this;
},
less: function(S) {
this.unput(this.match.slice(S));
},
pastInput: function() {
var S = this.matched.substr(0, this.matched.length - this.match.length);
return (S.length > 20 ? "..." : "") + S.substr(-20).replace(/\n/g, "");
},
upcomingInput: function() {
var S = this.match;
return S.length < 20 && (S += this._input.substr(0, 20 - S.length)), (S.substr(0, 20) + (S.length > 20 ? "..." : "")).replace(/\n/g, "");
},
showPosition: function() {
var S = this.pastInput(), R = new Array(S.length + 1).join("-");
return S + this.upcomingInput() + `
` + R + "^";
},
test_match: function(S, R) {
var A, L, v;
if (this.options.backtrack_lexer && (v = {
yylineno: this.yylineno,
yylloc: {
first_line: this.yylloc.first_line,
last_line: this.last_line,
first_column: this.yylloc.first_column,
last_column: this.yylloc.last_column
},
yytext: this.yytext,
match: this.match,
matches: this.matches,
matched: this.matched,
yyleng: this.yyleng,
offset: this.offset,
_more: this._more,
_input: this._input,
yy: this.yy,
conditionStack: this.conditionStack.slice(0),
done: this.done
}, this.options.ranges && (v.yylloc.range = this.yylloc.range.slice(0))), L = S[0].match(/(?:\r\n?|\n).*/g), L && (this.yylineno += L.length), this.yylloc = {
first_line: this.yylloc.last_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.last_column,
last_column: L ? L[L.length - 1].length - L[L.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + S[0].length
}, this.yytext += S[0], this.match += S[0], this.matches = S, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(S[0].length), this.matched += S[0], A = this.performAction.call(this, this.yy, this, R, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), A)
return A;
if (this._backtrack) {
for (var B in v)
this[B] = v[B];
return !1;
}
return !1;
},
next: function() {
if (this.done)
return this.EOF;
this._input || (this.done = !0);
var S, R, A, L;
this._more || (this.yytext = "", this.match = "");
for (var v = this._currentRules(), B = 0; B < v.length; B++)
if (A = this._input.match(this.rules[v[B]]), A && (!R || A[0].length > R[0].length)) {
if (R = A, L = B, this.options.backtrack_lexer) {
if (S = this.test_match(A, v[B]), S !== !1)
return S;
if (this._backtrack) {
R = !1;
continue;
} else
return !1;
} else if (!this.options.flex)
break;
}
return R ? (S = this.test_match(R, v[L]), S !== !1 ? S : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
},
lex: function() {
var R = this.next();
return R || this.lex();
},
begin: function(R) {
this.conditionStack.push(R);
},
popState: function() {
var R = this.conditionStack.length - 1;
return R > 0 ? this.conditionStack.pop() : this.conditionStack[0];
},
_currentRules: function() {
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
},
topState: function(R) {
return R = this.conditionStack.length - 1 - Math.abs(R || 0), R >= 0 ? this.conditionStack[R] : "INITIAL";
},
pushState: function(R) {
this.begin(R);
},
stateStackSize: function() {
return this.conditionStack.length;
},
options: { "case-insensitive": !0 },
performAction: function(R, A, L, v) {
switch (L) {
case 0:
return this.begin("open_directive"), 29;
case 1:
return this.begin("type_directive"), 30;
case 2:
return this.popState(), this.begin("arg_directive"), 24;
case 3:
return this.popState(), this.popState(), 32;
case 4:
return 31;
case 5:
break;
case 6:
break;
case 7:
return 26;
case 8:
break;
case 9:
break;
case 10:
return this.begin("title"), 13;
case 11:
return this.popState(), "title_value";
case 12:
return this.begin("acc_title"), 15;
case 13:
return this.popState(), "acc_title_value";
case 14:
return this.begin("acc_descr"), 17;
case 15:
return this.popState(), "acc_descr_value";
case 16:
this.begin("acc_descr_multiline");
break;
case 17:
this.popState();
break;
case 18:
return "acc_descr_multiline_value";
case 19:
this.begin("string");
break;
case 20:
this.popState();
break;
case 21:
return "txt";
case 22:
return 6;
case 23:
return 8;
case 24:
return "value";
case 25:
return 28;
}
},
rules: [/^(?:%%\{)/i, /^(?:((?:(?!\}%%)[^:.])*))/i, /^(?::)/i, /^(?:\}%%)/i, /^(?:((?:(?!\}%%).|\n)*))/i, /^(?:%%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n\r]+)/i, /^(?:%%[^\n]*)/i, /^(?:[\s]+)/i, /^(?:title\b)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:pie\b)/i, /^(?:showData\b)/i, /^(?::[\s]*[\d]+(?:\.[\d]+)?)/i, /^(?:$)/i],
conditions: { acc_descr_multiline: { rules: [17, 18], inclusive: !1 }, acc_descr: { rules: [15], inclusive: !1 }, acc_title: { rules: [13], inclusive: !1 }, close_directive: { rules: [], inclusive: !1 }, arg_directive: { rules: [3, 4], inclusive: !1 }, type_directive: { rules: [2, 3], inclusive: !1 }, open_directive: { rules: [1], inclusive: !1 }, title: { rules: [11], inclusive: !1 }, string: { rules: [20, 21], inclusive: !1 }, INITIAL: { rules: [0, 5, 6, 7, 8, 9, 10, 12, 14, 16, 19, 22, 23, 24, 25], inclusive: !0 } }
};
return M;
}();
k.lexer = T;
function C() {
this.yy = {};
}
return C.prototype = k, k.Parser = C, new C();
}();
Ob.parser = Ob;
const wat = (t) => t.match(/^\s*pie/) !== null;
let n1 = {}, b_ = !1;
const Tat = function(t, e, r) {
sr.parseDirective(this, t, e, r);
}, Eat = function(t, e) {
t = pe.sanitizeText(t, nt()), typeof n1[t] > "u" && (n1[t] = e, H.debug("Added new section :", t));
}, Cat = () => n1, Sat = function(t) {
b_ = t;
}, Aat = function() {
return b_;
}, Mat = function(t) {
return t.substring(0, 1) === ":" && (t = t.substring(1).trim()), Number(t.trim());
}, Lat = function() {
n1 = {}, b_ = !1, pi();
}, Rat = {
parseDirective: Tat,
getConfig: () => nt().pie,
addSection: Eat,
getSections: Cat,
cleanupValue: Mat,
clear: Lat,
setAccTitle: zn,
getAccTitle: gi,
setDiagramTitle: o0,
getDiagramTitle: l0,
setShowData: Sat,
getShowData: Aat,
getAccDescription: mi,
setAccDescription: yi
};
let ea = nt(), ra;
const Bl = 450, Iat = (t, e, r, n) => {
try {
ea = nt(), H.debug(`Rendering info diagram
` + t);
const b = nt().securityLevel;
let x;
b === "sandbox" && (x = St("#i" + e));
const k = St(b === "sandbox" ? x.nodes()[0].contentDocument.body : "body"), T = b === "sandbox" ? x.nodes()[0].contentDocument : document;
n.db.clear(), n.parser.parse(t), H.debug("Parsed info diagram");
const C = T.getElementById(e);
ra = C.parentElement.offsetWidth, typeof ra > "u" && (ra = 1200), typeof ea.useWidth < "u" && (ra = ea.useWidth), typeof ea.pie.useWidth < "u" && (ra = ea.pie.useWidth);
const M = k.select("#" + e);
di(M, Bl, ra, ea.pie.useMaxWidth), vn(n.db, M, e), C.setAttribute("viewBox", "0 0 " + ra + " " + Bl);
var i = 40, a = 18, s = 4, o = Math.min(ra, Bl) / 2 - i, l = M.append("g").attr("transform", "translate(" + ra / 2 + "," + Bl / 2 + ")"), u = n.db.getSections(), h = 0;
Object.keys(u).forEach(function(R) {
h += u[R];
});
const S = ea.themeVariables;
var d = [
S.pie1,
S.pie2,
S.pie3,
S.pie4,
S.pie5,
S.pie6,
S.pie7,
S.pie8,
S.pie9,
S.pie10,
S.pie11,
S.pie12
], f = N1().range(d), p = ZC().value(function(R) {
return R[1];
}), m = p(Object.entries(u)), _ = Ef().innerRadius(0).outerRadius(o);
l.selectAll("mySlices").data(m).enter().append("path").attr("d", _).attr("fill", function(R) {
return f(R.data[0]);
}).attr("class", "pieCircle"), l.selectAll("mySlices").data(m).enter().append("text").text(function(R) {
return (R.data[1] / h * 100).toFixed(0) + "%";
}).attr("transform", function(R) {
return "translate(" + _.centroid(R) + ")";
}).style("text-anchor", "middle").attr("class", "slice"), l.append("text").text(n.db.getDiagramTitle()).attr("x", 0).attr("y", -(Bl - 50) / 2).attr("class", "pieTitleText");
var y = l.selectAll(".legend").data(f.domain()).enter().append("g").attr("class", "legend").attr("transform", function(R, A) {
var L = a + s, v = L * f.domain().length / 2, B = 12 * a, w = A * L - v;
return "translate(" + B + "," + w + ")";
});
y.append("rect").attr("width", a).attr("height", a).style("fill", f).style("stroke", f), y.data(m).append("text").attr("x", a + s).attr("y", a - s).text(function(R) {
return n.db.getShowData() || ea.showData || ea.pie.showData ? R.data[0] + " [" + R.data[1] + "]" : R.data[0];
});
} catch (b) {
H.error("Error while rendering info diagram"), H.error(b);
}
}, Nat = {
draw: Iat
};
var Fb = function() {
var t = function(it, Z, V, Q) {
for (V = V || {}, Q = it.length; Q--; V[it[Q]] = Z)
;
return V;
}, e = [1, 3], r = [1, 5], n = [1, 6], i = [1, 7], a = [1, 8], s = [5, 6, 8, 14, 16, 18, 19, 40, 41, 42, 43, 44, 45, 53, 71, 72], o = [1, 22], l = [2, 13], u = [1, 26], h = [1, 27], d = [1, 28], f = [1, 29], p = [1, 30], m = [1, 31], _ = [1, 24], y = [1, 32], b = [1, 33], x = [1, 36], k = [71, 72], T = [5, 8, 14, 16, 18, 19, 40, 41, 42, 43, 44, 45, 53, 60, 62, 71, 72], C = [1, 56], M = [1, 57], S = [1, 58], R = [1, 59], A = [1, 60], L = [1, 61], v = [1, 62], B = [62, 63], w = [1, 74], D = [1, 70], N = [1, 71], z = [1, 72], X = [1, 73], ct = [1, 75], J = [1, 79], Y = [1, 80], $ = [1, 77], lt = [1, 78], ut = [5, 8, 14, 16, 18, 19, 40, 41, 42, 43, 44, 45, 53, 71, 72], W = {
trace: function() {
},
yy: {},
symbols_: { error: 2, start: 3, directive: 4, NEWLINE: 5, RD: 6, diagram: 7, EOF: 8, openDirective: 9, typeDirective: 10, closeDirective: 11, ":": 12, argDirective: 13, acc_title: 14, acc_title_value: 15, acc_descr: 16, acc_descr_value: 17, acc_descr_multiline_value: 18, open_directive: 19, type_directive: 20, arg_directive: 21, close_directive: 22, requirementDef: 23, elementDef: 24, relationshipDef: 25, requirementType: 26, requirementName: 27, STRUCT_START: 28, requirementBody: 29, ID: 30, COLONSEP: 31, id: 32, TEXT: 33, text: 34, RISK: 35, riskLevel: 36, VERIFYMTHD: 37, verifyType: 38, STRUCT_STOP: 39, REQUIREMENT: 40, FUNCTIONAL_REQUIREMENT: 41, INTERFACE_REQUIREMENT: 42, PERFORMANCE_REQUIREMENT: 43, PHYSICAL_REQUIREMENT: 44, DESIGN_CONSTRAINT: 45, LOW_RISK: 46, MED_RISK: 47, HIGH_RISK: 48, VERIFY_ANALYSIS: 49, VERIFY_DEMONSTRATION: 50, VERIFY_INSPECTION: 51, VERIFY_TEST: 52, ELEMENT: 53, elementName: 54, elementBody: 55, TYPE: 56, type: 57, DOCREF: 58, ref: 59, END_ARROW_L: 60, relationship: 61, LINE: 62, END_ARROW_R: 63, CONTAINS: 64, COPIES: 65, DERIVES: 66, SATISFIES: 67, VERIFIES: 68, REFINES: 69, TRACES: 70, unqString: 71, qString: 72, $accept: 0, $end: 1 },
terminals_: { 2: "error", 5: "NEWLINE", 6: "RD", 8: "EOF", 12: ":", 14: "acc_title", 15: "acc_title_value", 16: "acc_descr", 17: "acc_descr_value", 18: "acc_descr_multiline_value", 19: "open_directive", 20: "type_directive", 21: "arg_directive", 22: "close_directive", 28: "STRUCT_START", 30: "ID", 31: "COLONSEP", 33: "TEXT", 35: "RISK", 37: "VERIFYMTHD", 39: "STRUCT_STOP", 40: "REQUIREMENT", 41: "FUNCTIONAL_REQUIREMENT", 42: "INTERFACE_REQUIREMENT", 43: "PERFORMANCE_REQUIREMENT", 44: "PHYSICAL_REQUIREMENT", 45: "DESIGN_CONSTRAINT", 46: "LOW_RISK", 47: "MED_RISK", 48: "HIGH_RISK", 49: "VERIFY_ANALYSIS", 50: "VERIFY_DEMONSTRATION", 51: "VERIFY_INSPECTION", 52: "VERIFY_TEST", 53: "ELEMENT", 56: "TYPE", 58: "DOCREF", 60: "END_ARROW_L", 62: "LINE", 63: "END_ARROW_R", 64: "CONTAINS", 65: "COPIES", 66: "DERIVES", 67: "SATISFIES", 68: "VERIFIES", 69: "REFINES", 70: "TRACES", 71: "unqString", 72: "qString" },
productions_: [0, [3, 3], [3, 2], [3, 4], [4, 3], [4, 5], [4, 2], [4, 2], [4, 1], [9, 1], [10, 1], [13, 1], [11, 1], [7, 0], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [23, 5], [29, 5], [29, 5], [29, 5], [29, 5], [29, 2], [29, 1], [26, 1], [26, 1], [26, 1], [26, 1], [26, 1], [26, 1], [36, 1], [36, 1], [36, 1], [38, 1], [38, 1], [38, 1], [38, 1], [24, 5], [55, 5], [55, 5], [55, 2], [55, 1], [25, 5], [25, 5], [61, 1], [61, 1], [61, 1], [61, 1], [61, 1], [61, 1], [61, 1], [27, 1], [27, 1], [32, 1], [32, 1], [34, 1], [34, 1], [54, 1], [54, 1], [57, 1], [57, 1], [59, 1], [59, 1]],
performAction: function(Z, V, Q, q, U, F, j) {
var P = F.length - 1;
switch (U) {
case 6:
this.$ = F[P].trim(), q.setAccTitle(this.$);
break;
case 7:
case 8:
this.$ = F[P].trim(), q.setAccDescription(this.$);
break;
case 9:
q.parseDirective("%%{", "open_directive");
break;
case 10:
q.parseDirective(F[P], "type_directive");
break;
case 11:
F[P] = F[P].trim().replace(/'/g, '"'), q.parseDirective(F[P], "arg_directive");
break;
case 12:
q.parseDirective("}%%", "close_directive", "pie");
break;
case 13:
this.$ = [];
break;
case 19:
q.addRequirement(F[P - 3], F[P - 4]);
break;
case 20:
q.setNewReqId(F[P - 2]);
break;
case 21:
q.setNewReqText(F[P - 2]);
break;
case 22:
q.setNewReqRisk(F[P - 2]);
break;
case 23:
q.setNewReqVerifyMethod(F[P - 2]);
break;
case 26:
this.$ = q.RequirementType.REQUIREMENT;
break;
case 27:
this.$ = q.RequirementType.FUNCTIONAL_REQUIREMENT;
break;
case 28:
this.$ = q.RequirementType.INTERFACE_REQUIREMENT;
break;
case 29:
this.$ = q.RequirementType.PERFORMANCE_REQUIREMENT;
break;
case 30:
this.$ = q.RequirementType.PHYSICAL_REQUIREMENT;
break;
case 31:
this.$ = q.RequirementType.DESIGN_CONSTRAINT;
break;
case 32:
this.$ = q.RiskLevel.LOW_RISK;
break;
case 33:
this.$ = q.RiskLevel.MED_RISK;
break;
case 34:
this.$ = q.RiskLevel.HIGH_RISK;
break;
case 35:
this.$ = q.VerifyType.VERIFY_ANALYSIS;
break;
case 36:
this.$ = q.VerifyType.VERIFY_DEMONSTRATION;
break;
case 37:
this.$ = q.VerifyType.VERIFY_INSPECTION;
break;
case 38:
this.$ = q.VerifyType.VERIFY_TEST;
break;
case 39:
q.addElement(F[P - 3]);
break;
case 40:
q.setNewElementType(F[P - 2]);
break;
case 41:
q.setNewElementDocRef(F[P - 2]);
break;
case 44:
q.addRelationship(F[P - 2], F[P], F[P - 4]);
break;
case 45:
q.addRelationship(F[P - 2], F[P - 4], F[P]);
break;
case 46:
this.$ = q.Relationships.CONTAINS;
break;
case 47:
this.$ = q.Relationships.COPIES;
break;
case 48:
this.$ = q.Relationships.DERIVES;
break;
case 49:
this.$ = q.Relationships.SATISFIES;
break;
case 50:
this.$ = q.Relationships.VERIFIES;
break;
case 51:
this.$ = q.Relationships.REFINES;
break;
case 52:
this.$ = q.Relationships.TRACES;
break;
}
},
table: [{ 3: 1, 4: 2, 6: e, 9: 4, 14: r, 16: n, 18: i, 19: a }, { 1: [3] }, { 3: 10, 4: 2, 5: [1, 9], 6: e, 9: 4, 14: r, 16: n, 18: i, 19: a }, { 5: [1, 11] }, { 10: 12, 20: [1, 13] }, { 15: [1, 14] }, { 17: [1, 15] }, t(s, [2, 8]), { 20: [2, 9] }, { 3: 16, 4: 2, 6: e, 9: 4, 14: r, 16: n, 18: i, 19: a }, { 1: [2, 2] }, { 4: 21, 5: o, 7: 17, 8: l, 9: 4, 14: r, 16: n, 18: i, 19: a, 23: 18, 24: 19, 25: 20, 26: 23, 32: 25, 40: u, 41: h, 42: d, 43: f, 44: p, 45: m, 53: _, 71: y, 72: b }, { 11: 34, 12: [1, 35], 22: x }, t([12, 22], [2, 10]), t(s, [2, 6]), t(s, [2, 7]), { 1: [2, 1] }, { 8: [1, 37] }, { 4: 21, 5: o, 7: 38, 8: l, 9: 4, 14: r, 16: n, 18: i, 19: a, 23: 18, 24: 19, 25: 20, 26: 23, 32: 25, 40: u, 41: h, 42: d, 43: f, 44: p, 45: m, 53: _, 71: y, 72: b }, { 4: 21, 5: o, 7: 39, 8: l, 9: 4, 14: r, 16: n, 18: i, 19: a, 23: 18, 24: 19, 25: 20, 26: 23, 32: 25, 40: u, 41: h, 42: d, 43: f, 44: p, 45: m, 53: _, 71: y, 72: b }, { 4: 21, 5: o, 7: 40, 8: l, 9: 4, 14: r, 16: n, 18: i, 19: a, 23: 18, 24: 19, 25: 20, 26: 23, 32: 25, 40: u, 41: h, 42: d, 43: f, 44: p, 45: m, 53: _, 71: y, 72: b }, { 4: 21, 5: o, 7: 41, 8: l, 9: 4, 14: r, 16: n, 18: i, 19: a, 23: 18, 24: 19, 25: 20, 26: 23, 32: 25, 40: u, 41: h, 42: d, 43: f, 44: p, 45: m, 53: _, 71: y, 72: b }, { 4: 21, 5: o, 7: 42, 8: l, 9: 4, 14: r, 16: n, 18: i, 19: a, 23: 18, 24: 19, 25: 20, 26: 23, 32: 25, 40: u, 41: h, 42: d, 43: f, 44: p, 45: m, 53: _, 71: y, 72: b }, { 27: 43, 71: [1, 44], 72: [1, 45] }, { 54: 46, 71: [1, 47], 72: [1, 48] }, { 60: [1, 49], 62: [1, 50] }, t(k, [2, 26]), t(k, [2, 27]), t(k, [2, 28]), t(k, [2, 29]), t(k, [2, 30]), t(k, [2, 31]), t(T, [2, 55]), t(T, [2, 56]), t(s, [2, 4]), { 13: 51, 21: [1, 52] }, t(s, [2, 12]), { 1: [2, 3] }, { 8: [2, 14] }, { 8: [2, 15] }, { 8: [2, 16] }, { 8: [2, 17] }, { 8: [2, 18] }, { 28: [1, 53] }, { 28: [2, 53] }, { 28: [2, 54] }, { 28: [1, 54] }, { 28: [2, 59] }, { 28: [2, 60] }, { 61: 55, 64: C, 65: M, 66: S, 67: R, 68: A, 69: L, 70: v }, { 61: 63, 64: C, 65: M, 66: S, 67: R, 68: A, 69: L, 70: v }, { 11: 64, 22: x }, { 22: [2, 11] }, { 5: [1, 65] }, { 5: [1, 66] }, { 62: [1, 67] }, t(B, [2, 46]), t(B, [2, 47]), t(B, [2, 48]), t(B, [2, 49]), t(B, [2, 50]), t(B, [2, 51]), t(B, [2, 52]), { 63: [1, 68] }, t(s, [2, 5]), { 5: w, 29: 69, 30: D, 33: N, 35: z, 37: X, 39: ct }, { 5: J, 39: Y, 55: 76, 56: $, 58: lt }, { 32: 81, 71: y, 72: b }, { 32: 82, 71: y, 72: b }, t(ut, [2, 19]), { 31: [1, 83] }, { 31: [1, 84] }, { 31: [1, 85] }, { 31: [1, 86] }, { 5: w, 29: 87, 30: D, 33: N, 35: z, 37: X, 39: ct }, t(ut, [2, 25]), t(ut, [2, 39]), { 31: [1, 88] }, { 31: [1, 89] }, { 5: J, 39: Y, 55: 90, 56: $, 58: lt }, t(ut, [2, 43]), t(ut, [2, 44]), t(ut, [2, 45]), { 32: 91, 71: y, 72: b }, { 34: 92, 71: [1, 93], 72: [1, 94] }, { 36: 95, 46: [1, 96], 47: [1, 97], 48: [1, 98] }, { 38: 99, 49: [1, 100], 50: [1, 101], 51: [1, 102], 52: [1, 103] }, t(ut, [2, 24]), { 57: 104, 71: [1, 105], 72: [1, 106] }, { 59: 107, 71: [1, 108], 72: [1, 109] }, t(ut, [2, 42]), { 5: [1, 110] }, { 5: [1, 111] }, { 5: [2, 57] }, { 5: [2, 58] }, { 5: [1, 112] }, { 5: [2, 32] }, { 5: [2, 33] }, { 5: [2, 34] }, { 5: [1, 113] }, { 5: [2, 35] }, { 5: [2, 36] }, { 5: [2, 37] }, { 5: [2, 38] }, { 5: [1, 114] }, { 5: [2, 61] }, { 5: [2, 62] }, { 5: [1, 115] }, { 5: [2, 63] }, { 5: [2, 64] }, { 5: w, 29: 116, 30: D, 33: N, 35: z, 37: X, 39: ct }, { 5: w, 29: 117, 30: D, 33: N, 35: z, 37: X, 39: ct }, { 5: w, 29: 118, 30: D, 33: N, 35: z, 37: X, 39: ct }, { 5: w, 29: 119, 30: D, 33: N, 35: z, 37: X, 39: ct }, { 5: J, 39: Y, 55: 120, 56: $, 58: lt }, { 5: J, 39: Y, 55: 121, 56: $, 58: lt }, t(ut, [2, 20]), t(ut, [2, 21]), t(ut, [2, 22]), t(ut, [2, 23]), t(ut, [2, 40]), t(ut, [2, 41])],
defaultActions: { 8: [2, 9], 10: [2, 2], 16: [2, 1], 37: [2, 3], 38: [2, 14], 39: [2, 15], 40: [2, 16], 41: [2, 17], 42: [2, 18], 44: [2, 53], 45: [2, 54], 47: [2, 59], 48: [2, 60], 52: [2, 11], 93: [2, 57], 94: [2, 58], 96: [2, 32], 97: [2, 33], 98: [2, 34], 100: [2, 35], 101: [2, 36], 102: [2, 37], 103: [2, 38], 105: [2, 61], 106: [2, 62], 108: [2, 63], 109: [2, 64] },
parseError: function(Z, V) {
if (V.recoverable)
this.trace(Z);
else {
var Q = new Error(Z);
throw Q.hash = V, Q;
}
},
parse: function(Z) {
var V = this, Q = [0], q = [], U = [null], F = [], j = this.table, P = "", et = 0, at = 0, It = 2, Lt = 1, Rt = F.slice.call(arguments, 1), Ct = Object.create(this.lexer), pt = { yy: {} };
for (var mt in this.yy)
Object.prototype.hasOwnProperty.call(this.yy, mt) && (pt.yy[mt] = this.yy[mt]);
Ct.setInput(Z, pt.yy), pt.yy.lexer = Ct, pt.yy.parser = this, typeof Ct.yylloc > "u" && (Ct.yylloc = {});
var _t = Ct.yylloc;
F.push(_t);
var Tt = Ct.options && Ct.options.ranges;
typeof pt.yy.parseError == "function" ? this.parseError = pt.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
function ft() {
var bt;
return bt = q.pop() || Ct.lex() || Lt, typeof bt != "number" && (bt instanceof Array && (q = bt, bt = q.pop()), bt = V.symbols_[bt] || bt), bt;
}
for (var le, Dt, Ht, $t, Qt = {}, we, Gt, Ft, zt; ; ) {
if (Dt = Q[Q.length - 1], this.defaultActions[Dt] ? Ht = this.defaultActions[Dt] : ((le === null || typeof le > "u") && (le = ft()), Ht = j[Dt] && j[Dt][le]), typeof Ht > "u" || !Ht.length || !Ht[0]) {
var wt = "";
zt = [];
for (we in j[Dt])
this.terminals_[we] && we > It && zt.push("'" + this.terminals_[we] + "'");
Ct.showPosition ? wt = "Parse error on line " + (et + 1) + `:
` + Ct.showPosition() + `
Expecting ` + zt.join(", ") + ", got '" + (this.terminals_[le] || le) + "'" : wt = "Parse error on line " + (et + 1) + ": Unexpected " + (le == Lt ? "end of input" : "'" + (this.terminals_[le] || le) + "'"), this.parseError(wt, {
text: Ct.match,
token: this.terminals_[le] || le,
line: Ct.yylineno,
loc: _t,
expected: zt
});
}
if (Ht[0] instanceof Array && Ht.length > 1)
throw new Error("Parse Error: multiple actions possible at state: " + Dt + ", token: " + le);
switch (Ht[0]) {
case 1:
Q.push(le), U.push(Ct.yytext), F.push(Ct.yylloc), Q.push(Ht[1]), le = null, at = Ct.yyleng, P = Ct.yytext, et = Ct.yylineno, _t = Ct.yylloc;
break;
case 2:
if (Gt = this.productions_[Ht[1]][1], Qt.$ = U[U.length - Gt], Qt._$ = {
first_line: F[F.length - (Gt || 1)].first_line,
last_line: F[F.length - 1].last_line,
first_column: F[F.length - (Gt || 1)].first_column,
last_column: F[F.length - 1].last_column
}, Tt && (Qt._$.range = [
F[F.length - (Gt || 1)].range[0],
F[F.length - 1].range[1]
]), $t = this.performAction.apply(Qt, [
P,
at,
et,
pt.yy,
Ht[1],
U,
F
].concat(Rt)), typeof $t < "u")
return $t;
Gt && (Q = Q.slice(0, -1 * Gt * 2), U = U.slice(0, -1 * Gt), F = F.slice(0, -1 * Gt)), Q.push(this.productions_[Ht[1]][0]), U.push(Qt.$), F.push(Qt._$), Ft = j[Q[Q.length - 2]][Q[Q.length - 1]], Q.push(Ft);
break;
case 3:
return !0;
}
}
return !0;
}
}, tt = function() {
var it = {
EOF: 1,
parseError: function(V, Q) {
if (this.yy.parser)
this.yy.parser.parseError(V, Q);
else
throw new Error(V);
},
setInput: function(Z, V) {
return this.yy = V || this.yy || {}, this._input = Z, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
first_line: 1,
first_column: 0,
last_line: 1,
last_column: 0
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
},
input: function() {
var Z = this._input[0];
this.yytext += Z, this.yyleng++, this.offset++, this.match += Z, this.matched += Z;
var V = Z.match(/(?:\r\n?|\n).*/g);
return V ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), Z;
},
unput: function(Z) {
var V = Z.length, Q = Z.split(/(?:\r\n?|\n)/g);
this._input = Z + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - V), this.offset -= V;
var q = this.match.split(/(?:\r\n?|\n)/g);
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), Q.length - 1 && (this.yylineno -= Q.length - 1);
var U = this.yylloc.range;
return this.yylloc = {
first_line: this.yylloc.first_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.first_column,
last_column: Q ? (Q.length === q.length ? this.yylloc.first_column : 0) + q[q.length - Q.length].length - Q[0].length : this.yylloc.first_column - V
}, this.options.ranges && (this.yylloc.range = [U[0], U[0] + this.yyleng - V]), this.yyleng = this.yytext.length, this;
},
more: function() {
return this._more = !0, this;
},
reject: function() {
if (this.options.backtrack_lexer)
this._backtrack = !0;
else
return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
return this;
},
less: function(Z) {
this.unput(this.match.slice(Z));
},
pastInput: function() {
var Z = this.matched.substr(0, this.matched.length - this.match.length);
return (Z.length > 20 ? "..." : "") + Z.substr(-20).replace(/\n/g, "");
},
upcomingInput: function() {
var Z = this.match;
return Z.length < 20 && (Z += this._input.substr(0, 20 - Z.length)), (Z.substr(0, 20) + (Z.length > 20 ? "..." : "")).replace(/\n/g, "");
},
showPosition: function() {
var Z = this.pastInput(), V = new Array(Z.length + 1).join("-");
return Z + this.upcomingInput() + `
` + V + "^";
},
test_match: function(Z, V) {
var Q, q, U;
if (this.options.backtrack_lexer && (U = {
yylineno: this.yylineno,
yylloc: {
first_line: this.yylloc.first_line,
last_line: this.last_line,
first_column: this.yylloc.first_column,
last_column: this.yylloc.last_column
},
yytext: this.yytext,
match: this.match,
matches: this.matches,
matched: this.matched,
yyleng: this.yyleng,
offset: this.offset,
_more: this._more,
_input: this._input,
yy: this.yy,
conditionStack: this.conditionStack.slice(0),
done: this.done
}, this.options.ranges && (U.yylloc.range = this.yylloc.range.slice(0))), q = Z[0].match(/(?:\r\n?|\n).*/g), q && (this.yylineno += q.length), this.yylloc = {
first_line: this.yylloc.last_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.last_column,
last_column: q ? q[q.length - 1].length - q[q.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + Z[0].length
}, this.yytext += Z[0], this.match += Z[0], this.matches = Z, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(Z[0].length), this.matched += Z[0], Q = this.performAction.call(this, this.yy, this, V, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), Q)
return Q;
if (this._backtrack) {
for (var F in U)
this[F] = U[F];
return !1;
}
return !1;
},
next: function() {
if (this.done)
return this.EOF;
this._input || (this.done = !0);
var Z, V, Q, q;
this._more || (this.yytext = "", this.match = "");
for (var U = this._currentRules(), F = 0; F < U.length; F++)
if (Q = this._input.match(this.rules[U[F]]), Q && (!V || Q[0].length > V[0].length)) {
if (V = Q, q = F, this.options.backtrack_lexer) {
if (Z = this.test_match(Q, U[F]), Z !== !1)
return Z;
if (this._backtrack) {
V = !1;
continue;
} else
return !1;
} else if (!this.options.flex)
break;
}
return V ? (Z = this.test_match(V, U[q]), Z !== !1 ? Z : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
},
lex: function() {
var V = this.next();
return V || this.lex();
},
begin: function(V) {
this.conditionStack.push(V);
},
popState: function() {
var V = this.conditionStack.length - 1;
return V > 0 ? this.conditionStack.pop() : this.conditionStack[0];
},
_currentRules: function() {
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
},
topState: function(V) {
return V = this.conditionStack.length - 1 - Math.abs(V || 0), V >= 0 ? this.conditionStack[V] : "INITIAL";
},
pushState: function(V) {
this.begin(V);
},
stateStackSize: function() {
return this.conditionStack.length;
},
options: { "case-insensitive": !0 },
performAction: function(V, Q, q, U) {
switch (q) {
case 0:
return this.begin("open_directive"), 19;
case 1:
return this.begin("type_directive"), 20;
case 2:
return this.popState(), this.begin("arg_directive"), 12;
case 3:
return this.popState(), this.popState(), 22;
case 4:
return 21;
case 5:
return "title";
case 6:
return this.begin("acc_title"), 14;
case 7:
return this.popState(), "acc_title_value";
case 8:
return this.begin("acc_descr"), 16;
case 9:
return this.popState(), "acc_descr_value";
case 10:
this.begin("acc_descr_multiline");
break;
case 11:
this.popState();
break;
case 12:
return "acc_descr_multiline_value";
case 13:
return 5;
case 14:
break;
case 15:
break;
case 16:
break;
case 17:
return 8;
case 18:
return 6;
case 19:
return 28;
case 20:
return 39;
case 21:
return 31;
case 22:
return 30;
case 23:
return 33;
case 24:
return 35;
case 25:
return 37;
case 26:
return 40;
case 27:
return 41;
case 28:
return 42;
case 29:
return 43;
case 30:
return 44;
case 31:
return 45;
case 32:
return 46;
case 33:
return 47;
case 34:
return 48;
case 35:
return 49;
case 36:
return 50;
case 37:
return 51;
case 38:
return 52;
case 39:
return 53;
case 40:
return 64;
case 41:
return 65;
case 42:
return 66;
case 43:
return 67;
case 44:
return 68;
case 45:
return 69;
case 46:
return 70;
case 47:
return 56;
case 48:
return 58;
case 49:
return 60;
case 50:
return 63;
case 51:
return 62;
case 52:
this.begin("string");
break;
case 53:
this.popState();
break;
case 54:
return "qString";
case 55:
return Q.yytext = Q.yytext.trim(), 71;
}
},
rules: [/^(?:%%\{)/i, /^(?:((?:(?!\}%%)[^:.])*))/i, /^(?::)/i, /^(?:\}%%)/i, /^(?:((?:(?!\}%%).|\n)*))/i, /^(?:title\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:(\r?\n)+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:$)/i, /^(?:requirementDiagram\b)/i, /^(?:\{)/i, /^(?:\})/i, /^(?::)/i, /^(?:id\b)/i, /^(?:text\b)/i, /^(?:risk\b)/i, /^(?:verifyMethod\b)/i, /^(?:requirement\b)/i, /^(?:functionalRequirement\b)/i, /^(?:interfaceRequirement\b)/i, /^(?:performanceRequirement\b)/i, /^(?:physicalRequirement\b)/i, /^(?:designConstraint\b)/i, /^(?:low\b)/i, /^(?:medium\b)/i, /^(?:high\b)/i, /^(?:analysis\b)/i, /^(?:demonstration\b)/i, /^(?:inspection\b)/i, /^(?:test\b)/i, /^(?:element\b)/i, /^(?:contains\b)/i, /^(?:copies\b)/i, /^(?:derives\b)/i, /^(?:satisfies\b)/i, /^(?:verifies\b)/i, /^(?:refines\b)/i, /^(?:traces\b)/i, /^(?:type\b)/i, /^(?:docref\b)/i, /^(?:<-)/i, /^(?:->)/i, /^(?:-)/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[\w][^\r\n\{\<\>\-\=]*)/i],
conditions: { acc_descr_multiline: { rules: [11, 12], inclusive: !1 }, acc_descr: { rules: [9], inclusive: !1 }, acc_title: { rules: [7], inclusive: !1 }, close_directive: { rules: [], inclusive: !1 }, arg_directive: { rules: [3, 4], inclusive: !1 }, type_directive: { rules: [2, 3], inclusive: !1 }, open_directive: { rules: [1], inclusive: !1 }, unqString: { rules: [], inclusive: !1 }, token: { rules: [], inclusive: !1 }, string: { rules: [53, 54], inclusive: !1 }, INITIAL: { rules: [0, 5, 6, 8, 10, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 55], inclusive: !0 } }
};
return it;
}();
W.lexer = tt;
function K() {
this.yy = {};
}
return K.prototype = W, W.Parser = K, new K();
}();
Fb.parser = Fb;
const Bat = (t) => t.match(/^\s*requirement(Diagram)?/) !== null;
let __ = [], mn = {}, uc = {}, Ua = {}, hc = {};
const Dat = {
REQUIREMENT: "Requirement",
FUNCTIONAL_REQUIREMENT: "Functional Requirement",
INTERFACE_REQUIREMENT: "Interface Requirement",
PERFORMANCE_REQUIREMENT: "Performance Requirement",
PHYSICAL_REQUIREMENT: "Physical Requirement",
DESIGN_CONSTRAINT: "Design Constraint"
}, Oat = {
LOW_RISK: "Low",
MED_RISK: "Medium",
HIGH_RISK: "High"
}, Fat = {
VERIFY_ANALYSIS: "Analysis",
VERIFY_DEMONSTRATION: "Demonstration",
VERIFY_INSPECTION: "Inspection",
VERIFY_TEST: "Test"
}, Pat = {
CONTAINS: "contains",
COPIES: "copies",
DERIVES: "derives",
SATISFIES: "satisfies",
VERIFIES: "verifies",
REFINES: "refines",
TRACES: "traces"
}, qat = function(t, e, r) {
sr.parseDirective(this, t, e, r);
}, Vat = (t, e) => (typeof uc[t] > "u" && (uc[t] = {
name: t,
type: e,
id: mn.id,
text: mn.text,
risk: mn.risk,
verifyMethod: mn.verifyMethod
}), mn = {}, uc[t]), zat = () => uc, Yat = (t) => {
typeof mn < "u" && (mn.id = t);
}, Uat = (t) => {
typeof mn < "u" && (mn.text = t);
}, Wat = (t) => {
typeof mn < "u" && (mn.risk = t);
}, Hat = (t) => {
typeof mn < "u" && (mn.verifyMethod = t);
}, Gat = (t) => (typeof hc[t] > "u" && (hc[t] = {
name: t,
type: Ua.type,
docRef: Ua.docRef
}, H.info("Added new requirement: ", t)), Ua = {}, hc[t]), jat = () => hc, $at = (t) => {
typeof Ua < "u" && (Ua.type = t);
}, Xat = (t) => {
typeof Ua < "u" && (Ua.docRef = t);
}, Kat = (t, e, r) => {
__.push({
type: t,
src: e,
dst: r
});
}, Zat = () => __, Qat = () => {
__ = [], mn = {}, uc = {}, Ua = {}, hc = {}, pi();
}, Jat = {
RequirementType: Dat,
RiskLevel: Oat,
VerifyType: Fat,
Relationships: Pat,
parseDirective: qat,
getConfig: () => nt().req,
addRequirement: Vat,
getRequirements: zat,
setNewReqId: Yat,
setNewReqText: Uat,
setNewReqRisk: Wat,
setNewReqVerifyMethod: Hat,
setAccTitle: zn,
getAccTitle: gi,
setAccDescription: yi,
getAccDescription: mi,
addElement: Gat,
getElements: jat,
setNewElementType: $at,
setNewElementDocRef: Xat,
addRelationship: Kat,
getRelationships: Zat,
clear: Qat
}, Pb = {
CONTAINS: "contains",
ARROW: "arrow"
}, tst = (t, e) => {
let r = t.append("defs").append("marker").attr("id", Pb.CONTAINS + "_line_ending").attr("refX", 0).attr("refY", e.line_height / 2).attr("markerWidth", e.line_height).attr("markerHeight", e.line_height).attr("orient", "auto").append("g");
r.append("circle").attr("cx", e.line_height / 2).attr("cy", e.line_height / 2).attr("r", e.line_height / 2).attr("fill", "none"), r.append("line").attr("x1", 0).attr("x2", e.line_height).attr("y1", e.line_height / 2).attr("y2", e.line_height / 2).attr("stroke-width", 1), r.append("line").attr("y1", 0).attr("y2", e.line_height).attr("x1", e.line_height / 2).attr("x2", e.line_height / 2).attr("stroke-width", 1), t.append("defs").append("marker").attr("id", Pb.ARROW + "_line_ending").attr("refX", e.line_height).attr("refY", 0.5 * e.line_height).attr("markerWidth", e.line_height).attr("markerHeight", e.line_height).attr("orient", "auto").append("path").attr(
"d",
`M0,0
L${e.line_height},${e.line_height / 2}
M${e.line_height},${e.line_height / 2}
L0,${e.line_height}`
).attr("stroke-width", 1);
}, GL = {
ReqMarkers: Pb,
insertLineEndings: tst
};
let ir = {}, Ew = 0;
const jL = (t, e) => t.insert("rect", "#" + e).attr("class", "req reqBox").attr("x", 0).attr("y", 0).attr("width", ir.rect_min_width + "px").attr("height", ir.rect_min_height + "px"), $L = (t, e, r) => {
let n = ir.rect_min_width / 2, i = t.append("text").attr("class", "req reqLabel reqTitle").attr("id", e).attr("x", n).attr("y", ir.rect_padding).attr("dominant-baseline", "hanging"), a = 0;
r.forEach((u) => {
a == 0 ? i.append("tspan").attr("text-anchor", "middle").attr("x", ir.rect_min_width / 2).attr("dy", 0).text(u) : i.append("tspan").attr("text-anchor", "middle").attr("x", ir.rect_min_width / 2).attr("dy", ir.line_height * 0.75).text(u), a++;
});
let s = 1.5 * ir.rect_padding, o = a * ir.line_height * 0.75, l = s + o;
return t.append("line").attr("class", "req-title-line").attr("x1", "0").attr("x2", ir.rect_min_width).attr("y1", l).attr("y2", l), {
titleNode: i,
y: l
};
}, XL = (t, e, r, n) => {
let i = t.append("text").attr("class", "req reqLabel").attr("id", e).attr("x", ir.rect_padding).attr("y", n).attr("dominant-baseline", "hanging"), a = 0;
const s = 30;
let o = [];
return r.forEach((l) => {
let u = l.length;
for (; u > s && a < 3; ) {
let h = l.substring(0, s);
l = l.substring(s, l.length), u = l.length, o[o.length] = h, a++;
}
if (a == 3) {
let h = o[o.length - 1];
o[o.length - 1] = h.substring(0, h.length - 4) + "...";
} else
o[o.length] = l;
a = 0;
}), o.forEach((l) => {
i.append("tspan").attr("x", ir.rect_padding).attr("dy", ir.line_height).text(l);
}), i;
}, est = (t, e, r, n) => {
const i = e.node().getTotalLength(), a = e.node().getPointAtLength(i * 0.5), s = "rel" + Ew;
Ew++;
const l = t.append("text").attr("class", "req relationshipLabel").attr("id", s).attr("x", a.x).attr("y", a.y).attr("text-anchor", "middle").attr("dominant-baseline", "middle").text(n).node().getBBox();
t.insert("rect", "#" + s).attr("class", "req reqLabelBox").attr("x", a.x - l.width / 2).attr("y", a.y - l.height / 2).attr("width", l.width).attr("height", l.height).attr("fill", "white").attr("fill-opacity", "85%");
}, rst = function(t, e, r, n, i) {
const a = r.edge(Jo(e.src), Jo(e.dst)), s = ns().x(function(l) {
return l.x;
}).y(function(l) {
return l.y;
}), o = t.insert("path", "#" + n).attr("class", "er relationshipLine").attr("d", s(a.points)).attr("fill", "none");
e.type == i.db.Relationships.CONTAINS ? o.attr(
"marker-start",
"url(" + pe.getUrl(ir.arrowMarkerAbsolute) + "#" + e.type + "_line_ending)"
) : (o.attr("stroke-dasharray", "10,7"), o.attr(
"marker-end",
"url(" + pe.getUrl(ir.arrowMarkerAbsolute) + "#" + GL.ReqMarkers.ARROW + "_line_ending)"
)), est(t, o, ir, `<<${e.type}>>`);
}, nst = (t, e, r) => {
Object.keys(t).forEach((n) => {
let i = t[n];
n = Jo(n), H.info("Added new requirement: ", n);
const a = r.append("g").attr("id", n), s = "req-" + n, o = jL(a, s);
let l = $L(a, n + "_title", [
`<<${i.type}>>`,
`${i.name}`
]);
XL(
a,
n + "_body",
[
`Id: ${i.id}`,
`Text: ${i.text}`,
`Risk: ${i.risk}`,
`Verification: ${i.verifyMethod}`
],
l.y
);
const u = o.node().getBBox();
e.setNode(n, {
width: u.width,
height: u.height,
shape: "rect",
id: n
});
});
}, ist = (t, e, r) => {
Object.keys(t).forEach((n) => {
let i = t[n];
const a = Jo(n), s = r.append("g").attr("id", a), o = "element-" + a, l = jL(s, o);
let u = $L(s, o + "_title", ["<>", `${n}`]);
XL(
s,
o + "_body",
[`Type: ${i.type || "Not Specified"}`, `Doc Ref: ${i.docRef || "None"}`],
u.y
);
const h = l.node().getBBox();
e.setNode(a, {
width: h.width,
height: h.height,
shape: "rect",
id: a
});
});
}, ast = (t, e) => (t.forEach(function(r) {
let n = Jo(r.src), i = Jo(r.dst);
e.setEdge(n, i, { relationship: r });
}), t), sst = function(t, e) {
e.nodes().forEach(function(r) {
typeof r < "u" && typeof e.node(r) < "u" && (t.select("#" + r), t.select("#" + r).attr(
"transform",
"translate(" + (e.node(r).x - e.node(r).width / 2) + "," + (e.node(r).y - e.node(r).height / 2) + " )"
));
});
}, Jo = (t) => t.replace(/\s/g, "").replace(/\./g, "_"), ost = (t, e, r, n) => {
ir = nt().requirement, n.db.clear(), n.parser.parse(t);
const i = ir.securityLevel;
let a;
i === "sandbox" && (a = St("#i" + e));
const o = St(i === "sandbox" ? a.nodes()[0].contentDocument.body : "body").select(`[id='${e}']`);
GL.insertLineEndings(o, ir);
const l = new ur.Graph({
multigraph: !1,
compound: !1,
directed: !0
}).setGraph({
rankdir: ir.layoutDirection,
marginx: 20,
marginy: 20,
nodesep: 100,
edgesep: 100,
ranksep: 100
}).setDefaultEdgeLabel(function() {
return {};
});
let u = n.db.getRequirements(), h = n.db.getElements(), d = n.db.getRelationships();
nst(u, l, o), ist(h, l, o), ast(d, l), fu.layout(l), sst(o, l), d.forEach(function(y) {
rst(o, y, l, e, n);
});
const f = ir.rect_padding, p = o.node().getBBox(), m = p.width + f * 2, _ = p.height + f * 2;
di(o, _, m, ir.useMaxWidth), o.attr("viewBox", `${p.x - f} ${p.y - f} ${m} ${_}`), vn(n.db, o, e);
}, lst = {
draw: ost
};
var qb = function() {
var t = function(it, Z, V, Q) {
for (V = V || {}, Q = it.length; Q--; V[it[Q]] = Z)
;
return V;
}, e = [1, 2], r = [1, 3], n = [1, 5], i = [1, 7], a = [2, 5], s = [1, 15], o = [1, 17], l = [1, 18], u = [1, 19], h = [1, 21], d = [1, 22], f = [1, 23], p = [1, 29], m = [1, 30], _ = [1, 31], y = [1, 32], b = [1, 33], x = [1, 34], k = [1, 35], T = [1, 36], C = [1, 37], M = [1, 38], S = [1, 39], R = [1, 40], A = [1, 43], L = [1, 44], v = [1, 45], B = [1, 46], w = [1, 47], D = [1, 48], N = [1, 51], z = [1, 4, 5, 16, 20, 22, 25, 26, 32, 33, 34, 36, 38, 39, 40, 41, 42, 43, 45, 47, 49, 50, 51, 52, 53, 58, 59, 60, 61, 69, 79], X = [4, 5, 16, 20, 22, 25, 26, 32, 33, 34, 36, 38, 39, 40, 41, 42, 43, 45, 47, 49, 53, 58, 59, 60, 61, 69, 79], ct = [4, 5, 16, 20, 22, 25, 26, 32, 33, 34, 36, 38, 39, 40, 41, 42, 43, 45, 47, 49, 52, 53, 58, 59, 60, 61, 69, 79], J = [4, 5, 16, 20, 22, 25, 26, 32, 33, 34, 36, 38, 39, 40, 41, 42, 43, 45, 47, 49, 51, 53, 58, 59, 60, 61, 69, 79], Y = [4, 5, 16, 20, 22, 25, 26, 32, 33, 34, 36, 38, 39, 40, 41, 42, 43, 45, 47, 49, 50, 53, 58, 59, 60, 61, 69, 79], $ = [67, 68, 69], lt = [1, 121], ut = [1, 4, 5, 7, 16, 20, 22, 25, 26, 32, 33, 34, 36, 38, 39, 40, 41, 42, 43, 45, 47, 49, 50, 51, 52, 53, 58, 59, 60, 61, 69, 79], W = {
trace: function() {
},
yy: {},
symbols_: { error: 2, start: 3, SPACE: 4, NEWLINE: 5, directive: 6, SD: 7, document: 8, line: 9, statement: 10, openDirective: 11, typeDirective: 12, closeDirective: 13, ":": 14, argDirective: 15, participant: 16, actor: 17, AS: 18, restOfLine: 19, participant_actor: 20, signal: 21, autonumber: 22, NUM: 23, off: 24, activate: 25, deactivate: 26, note_statement: 27, links_statement: 28, link_statement: 29, properties_statement: 30, details_statement: 31, title: 32, legacy_title: 33, acc_title: 34, acc_title_value: 35, acc_descr: 36, acc_descr_value: 37, acc_descr_multiline_value: 38, loop: 39, end: 40, rect: 41, opt: 42, alt: 43, else_sections: 44, par: 45, par_sections: 46, critical: 47, option_sections: 48, break: 49, option: 50, and: 51, else: 52, note: 53, placement: 54, text2: 55, over: 56, actor_pair: 57, links: 58, link: 59, properties: 60, details: 61, spaceList: 62, ",": 63, left_of: 64, right_of: 65, signaltype: 66, "+": 67, "-": 68, ACTOR: 69, SOLID_OPEN_ARROW: 70, DOTTED_OPEN_ARROW: 71, SOLID_ARROW: 72, DOTTED_ARROW: 73, SOLID_CROSS: 74, DOTTED_CROSS: 75, SOLID_POINT: 76, DOTTED_POINT: 77, TXT: 78, open_directive: 79, type_directive: 80, arg_directive: 81, close_directive: 82, $accept: 0, $end: 1 },
terminals_: { 2: "error", 4: "SPACE", 5: "NEWLINE", 7: "SD", 14: ":", 16: "participant", 18: "AS", 19: "restOfLine", 20: "participant_actor", 22: "autonumber", 23: "NUM", 24: "off", 25: "activate", 26: "deactivate", 32: "title", 33: "legacy_title", 34: "acc_title", 35: "acc_title_value", 36: "acc_descr", 37: "acc_descr_value", 38: "acc_descr_multiline_value", 39: "loop", 40: "end", 41: "rect", 42: "opt", 43: "alt", 45: "par", 47: "critical", 49: "break", 50: "option", 51: "and", 52: "else", 53: "note", 56: "over", 58: "links", 59: "link", 60: "properties", 61: "details", 63: ",", 64: "left_of", 65: "right_of", 67: "+", 68: "-", 69: "ACTOR", 70: "SOLID_OPEN_ARROW", 71: "DOTTED_OPEN_ARROW", 72: "SOLID_ARROW", 73: "DOTTED_ARROW", 74: "SOLID_CROSS", 75: "DOTTED_CROSS", 76: "SOLID_POINT", 77: "DOTTED_POINT", 78: "TXT", 79: "open_directive", 80: "type_directive", 81: "arg_directive", 82: "close_directive" },
productions_: [0, [3, 2], [3, 2], [3, 2], [3, 2], [8, 0], [8, 2], [9, 2], [9, 1], [9, 1], [6, 4], [6, 6], [10, 5], [10, 3], [10, 5], [10, 3], [10, 2], [10, 4], [10, 3], [10, 3], [10, 2], [10, 3], [10, 3], [10, 2], [10, 2], [10, 2], [10, 2], [10, 2], [10, 1], [10, 1], [10, 2], [10, 2], [10, 1], [10, 4], [10, 4], [10, 4], [10, 4], [10, 4], [10, 4], [10, 4], [10, 1], [48, 1], [48, 4], [46, 1], [46, 4], [44, 1], [44, 4], [27, 4], [27, 4], [28, 3], [29, 3], [30, 3], [31, 3], [62, 2], [62, 1], [57, 3], [57, 1], [54, 1], [54, 1], [21, 5], [21, 5], [21, 4], [17, 1], [66, 1], [66, 1], [66, 1], [66, 1], [66, 1], [66, 1], [66, 1], [66, 1], [55, 1], [11, 1], [12, 1], [15, 1], [13, 1]],
performAction: function(Z, V, Q, q, U, F, j) {
var P = F.length - 1;
switch (U) {
case 4:
return q.apply(F[P]), F[P];
case 5:
this.$ = [];
break;
case 6:
F[P - 1].push(F[P]), this.$ = F[P - 1];
break;
case 7:
case 8:
this.$ = F[P];
break;
case 9:
this.$ = [];
break;
case 12:
F[P - 3].type = "addParticipant", F[P - 3].description = q.parseMessage(F[P - 1]), this.$ = F[P - 3];
break;
case 13:
F[P - 1].type = "addParticipant", this.$ = F[P - 1];
break;
case 14:
F[P - 3].type = "addActor", F[P - 3].description = q.parseMessage(F[P - 1]), this.$ = F[P - 3];
break;
case 15:
F[P - 1].type = "addActor", this.$ = F[P - 1];
break;
case 17:
this.$ = { type: "sequenceIndex", sequenceIndex: Number(F[P - 2]), sequenceIndexStep: Number(F[P - 1]), sequenceVisible: !0, signalType: q.LINETYPE.AUTONUMBER };
break;
case 18:
this.$ = { type: "sequenceIndex", sequenceIndex: Number(F[P - 1]), sequenceIndexStep: 1, sequenceVisible: !0, signalType: q.LINETYPE.AUTONUMBER };
break;
case 19:
this.$ = { type: "sequenceIndex", sequenceVisible: !1, signalType: q.LINETYPE.AUTONUMBER };
break;
case 20:
this.$ = { type: "sequenceIndex", sequenceVisible: !0, signalType: q.LINETYPE.AUTONUMBER };
break;
case 21:
this.$ = { type: "activeStart", signalType: q.LINETYPE.ACTIVE_START, actor: F[P - 1] };
break;
case 22:
this.$ = { type: "activeEnd", signalType: q.LINETYPE.ACTIVE_END, actor: F[P - 1] };
break;
case 28:
q.setDiagramTitle(F[P].substring(6)), this.$ = F[P].substring(6);
break;
case 29:
q.setDiagramTitle(F[P].substring(7)), this.$ = F[P].substring(7);
break;
case 30:
this.$ = F[P].trim(), q.setAccTitle(this.$);
break;
case 31:
case 32:
this.$ = F[P].trim(), q.setAccDescription(this.$);
break;
case 33:
F[P - 1].unshift({ type: "loopStart", loopText: q.parseMessage(F[P - 2]), signalType: q.LINETYPE.LOOP_START }), F[P - 1].push({ type: "loopEnd", loopText: F[P - 2], signalType: q.LINETYPE.LOOP_END }), this.$ = F[P - 1];
break;
case 34:
F[P - 1].unshift({ type: "rectStart", color: q.parseMessage(F[P - 2]), signalType: q.LINETYPE.RECT_START }), F[P - 1].push({ type: "rectEnd", color: q.parseMessage(F[P - 2]), signalType: q.LINETYPE.RECT_END }), this.$ = F[P - 1];
break;
case 35:
F[P - 1].unshift({ type: "optStart", optText: q.parseMessage(F[P - 2]), signalType: q.LINETYPE.OPT_START }), F[P - 1].push({ type: "optEnd", optText: q.parseMessage(F[P - 2]), signalType: q.LINETYPE.OPT_END }), this.$ = F[P - 1];
break;
case 36:
F[P - 1].unshift({ type: "altStart", altText: q.parseMessage(F[P - 2]), signalType: q.LINETYPE.ALT_START }), F[P - 1].push({ type: "altEnd", signalType: q.LINETYPE.ALT_END }), this.$ = F[P - 1];
break;
case 37:
F[P - 1].unshift({ type: "parStart", parText: q.parseMessage(F[P - 2]), signalType: q.LINETYPE.PAR_START }), F[P - 1].push({ type: "parEnd", signalType: q.LINETYPE.PAR_END }), this.$ = F[P - 1];
break;
case 38:
F[P - 1].unshift({ type: "criticalStart", criticalText: q.parseMessage(F[P - 2]), signalType: q.LINETYPE.CRITICAL_START }), F[P - 1].push({ type: "criticalEnd", signalType: q.LINETYPE.CRITICAL_END }), this.$ = F[P - 1];
break;
case 39:
F[P - 1].unshift({ type: "breakStart", breakText: q.parseMessage(F[P - 2]), signalType: q.LINETYPE.BREAK_START }), F[P - 1].push({ type: "breakEnd", optText: q.parseMessage(F[P - 2]), signalType: q.LINETYPE.BREAK_END }), this.$ = F[P - 1];
break;
case 42:
this.$ = F[P - 3].concat([{ type: "option", optionText: q.parseMessage(F[P - 1]), signalType: q.LINETYPE.CRITICAL_OPTION }, F[P]]);
break;
case 44:
this.$ = F[P - 3].concat([{ type: "and", parText: q.parseMessage(F[P - 1]), signalType: q.LINETYPE.PAR_AND }, F[P]]);
break;
case 46:
this.$ = F[P - 3].concat([{ type: "else", altText: q.parseMessage(F[P - 1]), signalType: q.LINETYPE.ALT_ELSE }, F[P]]);
break;
case 47:
this.$ = [F[P - 1], { type: "addNote", placement: F[P - 2], actor: F[P - 1].actor, text: F[P] }];
break;
case 48:
F[P - 2] = [].concat(F[P - 1], F[P - 1]).slice(0, 2), F[P - 2][0] = F[P - 2][0].actor, F[P - 2][1] = F[P - 2][1].actor, this.$ = [F[P - 1], { type: "addNote", placement: q.PLACEMENT.OVER, actor: F[P - 2].slice(0, 2), text: F[P] }];
break;
case 49:
this.$ = [F[P - 1], { type: "addLinks", actor: F[P - 1].actor, text: F[P] }];
break;
case 50:
this.$ = [F[P - 1], { type: "addALink", actor: F[P - 1].actor, text: F[P] }];
break;
case 51:
this.$ = [F[P - 1], { type: "addProperties", actor: F[P - 1].actor, text: F[P] }];
break;
case 52:
this.$ = [F[P - 1], { type: "addDetails", actor: F[P - 1].actor, text: F[P] }];
break;
case 55:
this.$ = [F[P - 2], F[P]];
break;
case 56:
this.$ = F[P];
break;
case 57:
this.$ = q.PLACEMENT.LEFTOF;
break;
case 58:
this.$ = q.PLACEMENT.RIGHTOF;
break;
case 59:
this.$ = [
F[P - 4],
F[P - 1],
{ type: "addMessage", from: F[P - 4].actor, to: F[P - 1].actor, signalType: F[P - 3], msg: F[P] },
{ type: "activeStart", signalType: q.LINETYPE.ACTIVE_START, actor: F[P - 1] }
];
break;
case 60:
this.$ = [
F[P - 4],
F[P - 1],
{ type: "addMessage", from: F[P - 4].actor, to: F[P - 1].actor, signalType: F[P - 3], msg: F[P] },
{ type: "activeEnd", signalType: q.LINETYPE.ACTIVE_END, actor: F[P - 4] }
];
break;
case 61:
this.$ = [F[P - 3], F[P - 1], { type: "addMessage", from: F[P - 3].actor, to: F[P - 1].actor, signalType: F[P - 2], msg: F[P] }];
break;
case 62:
this.$ = { type: "addParticipant", actor: F[P] };
break;
case 63:
this.$ = q.LINETYPE.SOLID_OPEN;
break;
case 64:
this.$ = q.LINETYPE.DOTTED_OPEN;
break;
case 65:
this.$ = q.LINETYPE.SOLID;
break;
case 66:
this.$ = q.LINETYPE.DOTTED;
break;
case 67:
this.$ = q.LINETYPE.SOLID_CROSS;
break;
case 68:
this.$ = q.LINETYPE.DOTTED_CROSS;
break;
case 69:
this.$ = q.LINETYPE.SOLID_POINT;
break;
case 70:
this.$ = q.LINETYPE.DOTTED_POINT;
break;
case 71:
this.$ = q.parseMessage(F[P].trim().substring(1));
break;
case 72:
q.parseDirective("%%{", "open_directive");
break;
case 73:
q.parseDirective(F[P], "type_directive");
break;
case 74:
F[P] = F[P].trim().replace(/'/g, '"'), q.parseDirective(F[P], "arg_directive");
break;
case 75:
q.parseDirective("}%%", "close_directive", "sequence");
break;
}
},
table: [{ 3: 1, 4: e, 5: r, 6: 4, 7: n, 11: 6, 79: i }, { 1: [3] }, { 3: 8, 4: e, 5: r, 6: 4, 7: n, 11: 6, 79: i }, { 3: 9, 4: e, 5: r, 6: 4, 7: n, 11: 6, 79: i }, { 3: 10, 4: e, 5: r, 6: 4, 7: n, 11: 6, 79: i }, t([1, 4, 5, 16, 20, 22, 25, 26, 32, 33, 34, 36, 38, 39, 41, 42, 43, 45, 47, 49, 53, 58, 59, 60, 61, 69, 79], a, { 8: 11 }), { 12: 12, 80: [1, 13] }, { 80: [2, 72] }, { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3] }, { 1: [2, 4], 4: s, 5: o, 6: 41, 9: 14, 10: 16, 11: 6, 16: l, 17: 42, 20: u, 21: 20, 22: h, 25: d, 26: f, 27: 24, 28: 25, 29: 26, 30: 27, 31: 28, 32: p, 33: m, 34: _, 36: y, 38: b, 39: x, 41: k, 42: T, 43: C, 45: M, 47: S, 49: R, 53: A, 58: L, 59: v, 60: B, 61: w, 69: D, 79: i }, { 13: 49, 14: [1, 50], 82: N }, t([14, 82], [2, 73]), t(z, [2, 6]), { 6: 41, 10: 52, 11: 6, 16: l, 17: 42, 20: u, 21: 20, 22: h, 25: d, 26: f, 27: 24, 28: 25, 29: 26, 30: 27, 31: 28, 32: p, 33: m, 34: _, 36: y, 38: b, 39: x, 41: k, 42: T, 43: C, 45: M, 47: S, 49: R, 53: A, 58: L, 59: v, 60: B, 61: w, 69: D, 79: i }, t(z, [2, 8]), t(z, [2, 9]), { 17: 53, 69: D }, { 17: 54, 69: D }, { 5: [1, 55] }, { 5: [1, 58], 23: [1, 56], 24: [1, 57] }, { 17: 59, 69: D }, { 17: 60, 69: D }, { 5: [1, 61] }, { 5: [1, 62] }, { 5: [1, 63] }, { 5: [1, 64] }, { 5: [1, 65] }, t(z, [2, 28]), t(z, [2, 29]), { 35: [1, 66] }, { 37: [1, 67] }, t(z, [2, 32]), { 19: [1, 68] }, { 19: [1, 69] }, { 19: [1, 70] }, { 19: [1, 71] }, { 19: [1, 72] }, { 19: [1, 73] }, { 19: [1, 74] }, t(z, [2, 40]), { 66: 75, 70: [1, 76], 71: [1, 77], 72: [1, 78], 73: [1, 79], 74: [1, 80], 75: [1, 81], 76: [1, 82], 77: [1, 83] }, { 54: 84, 56: [1, 85], 64: [1, 86], 65: [1, 87] }, { 17: 88, 69: D }, { 17: 89, 69: D }, { 17: 90, 69: D }, { 17: 91, 69: D }, t([5, 18, 63, 70, 71, 72, 73, 74, 75, 76, 77, 78], [2, 62]), { 5: [1, 92] }, { 15: 93, 81: [1, 94] }, { 5: [2, 75] }, t(z, [2, 7]), { 5: [1, 96], 18: [1, 95] }, { 5: [1, 98], 18: [1, 97] }, t(z, [2, 16]), { 5: [1, 100], 23: [1, 99] }, { 5: [1, 101] }, t(z, [2, 20]), { 5: [1, 102] }, { 5: [1, 103] }, t(z, [2, 23]), t(z, [2, 24]), t(z, [2, 25]), t(z, [2, 26]), t(z, [2, 27]), t(z, [2, 30]), t(z, [2, 31]), t(X, a, { 8: 104 }), t(X, a, { 8: 105 }), t(X, a, { 8: 106 }), t(ct, a, { 44: 107, 8: 108 }), t(J, a, { 46: 109, 8: 110 }), t(Y, a, { 48: 111, 8: 112 }), t(X, a, { 8: 113 }), { 17: 116, 67: [1, 114], 68: [1, 115], 69: D }, t($, [2, 63]), t($, [2, 64]), t($, [2, 65]), t($, [2, 66]), t($, [2, 67]), t($, [2, 68]), t($, [2, 69]), t($, [2, 70]), { 17: 117, 69: D }, { 17: 119, 57: 118, 69: D }, { 69: [2, 57] }, { 69: [2, 58] }, { 55: 120, 78: lt }, { 55: 122, 78: lt }, { 55: 123, 78: lt }, { 55: 124, 78: lt }, t(ut, [2, 10]), { 13: 125, 82: N }, { 82: [2, 74] }, { 19: [1, 126] }, t(z, [2, 13]), { 19: [1, 127] }, t(z, [2, 15]), { 5: [1, 128] }, t(z, [2, 18]), t(z, [2, 19]), t(z, [2, 21]), t(z, [2, 22]), { 4: s, 5: o, 6: 41, 9: 14, 10: 16, 11: 6, 16: l, 17: 42, 20: u, 21: 20, 22: h, 25: d, 26: f, 27: 24, 28: 25, 29: 26, 30: 27, 31: 28, 32: p, 33: m, 34: _, 36: y, 38: b, 39: x, 40: [1, 129], 41: k, 42: T, 43: C, 45: M, 47: S, 49: R, 53: A, 58: L, 59: v, 60: B, 61: w, 69: D, 79: i }, { 4: s, 5: o, 6: 41, 9: 14, 10: 16, 11: 6, 16: l, 17: 42, 20: u, 21: 20, 22: h, 25: d, 26: f, 27: 24, 28: 25, 29: 26, 30: 27, 31: 28, 32: p, 33: m, 34: _, 36: y, 38: b, 39: x, 40: [1, 130], 41: k, 42: T, 43: C, 45: M, 47: S, 49: R, 53: A, 58: L, 59: v, 60: B, 61: w, 69: D, 79: i }, { 4: s, 5: o, 6: 41, 9: 14, 10: 16, 11: 6, 16: l, 17: 42, 20: u, 21: 20, 22: h, 25: d, 26: f, 27: 24, 28: 25, 29: 26, 30: 27, 31: 28, 32: p, 33: m, 34: _, 36: y, 38: b, 39: x, 40: [1, 131], 41: k, 42: T, 43: C, 45: M, 47: S, 49: R, 53: A, 58: L, 59: v, 60: B, 61: w, 69: D, 79: i }, { 40: [1, 132] }, { 4: s, 5: o, 6: 41, 9: 14, 10: 16, 11: 6, 16: l, 17: 42, 20: u, 21: 20, 22: h, 25: d, 26: f, 27: 24, 28: 25, 29: 26, 30: 27, 31: 28, 32: p, 33: m, 34: _, 36: y, 38: b, 39: x, 40: [2, 45], 41: k, 42: T, 43: C, 45: M, 47: S, 49: R, 52: [1, 133], 53: A, 58: L, 59: v, 60: B, 61: w, 69: D, 79: i }, { 40: [1, 134] }, { 4: s, 5: o, 6: 41, 9: 14, 10: 16, 11: 6, 16: l, 17: 42, 20: u, 21: 20, 22: h, 25: d, 26: f, 27: 24, 28: 25, 29: 26, 30: 27, 31: 28, 32: p, 33: m, 34: _, 36: y, 38: b, 39: x, 40: [2, 43], 41: k, 42: T, 43: C, 45: M, 47: S, 49: R, 51: [1, 135], 53: A, 58: L, 59: v, 60: B, 61: w, 69: D, 79: i }, { 40: [1, 136] }, { 4: s, 5: o, 6: 41, 9: 14, 10: 16, 11: 6, 16: l, 17: 42, 20: u, 21: 20, 22: h, 25: d, 26: f, 27: 24, 28: 25, 29: 26, 30: 27, 31: 28, 32: p, 33: m, 34: _, 36: y, 38: b, 39: x, 40: [2, 41], 41: k, 42: T, 43: C, 45: M, 47: S, 49: R, 50: [1, 137], 53: A, 58: L, 59: v, 60: B, 61: w, 69: D, 79: i }, { 4: s, 5: o, 6: 41, 9: 14, 10: 16, 11: 6, 16: l, 17: 42, 20: u, 21: 20, 22: h, 25: d, 26: f, 27: 24, 28: 25, 29: 26, 30: 27, 31: 28, 32: p, 33: m, 34: _, 36: y, 38: b, 39: x, 40: [1, 138], 41: k, 42: T, 43: C, 45: M, 47: S, 49: R, 53: A, 58: L, 59: v, 60: B, 61: w, 69: D, 79: i }, { 17: 139, 69: D }, { 17: 140, 69: D }, { 55: 141, 78: lt }, { 55: 142, 78: lt }, { 55: 143, 78: lt }, { 63: [1, 144], 78: [2, 56] }, { 5: [2, 49] }, { 5: [2, 71] }, { 5: [2, 50] }, { 5: [2, 51] }, { 5: [2, 52] }, { 5: [1, 145] }, { 5: [1, 146] }, { 5: [1, 147] }, t(z, [2, 17]), t(z, [2, 33]), t(z, [2, 34]), t(z, [2, 35]), t(z, [2, 36]), { 19: [1, 148] }, t(z, [2, 37]), { 19: [1, 149] }, t(z, [2, 38]), { 19: [1, 150] }, t(z, [2, 39]), { 55: 151, 78: lt }, { 55: 152, 78: lt }, { 5: [2, 61] }, { 5: [2, 47] }, { 5: [2, 48] }, { 17: 153, 69: D }, t(ut, [2, 11]), t(z, [2, 12]), t(z, [2, 14]), t(ct, a, { 8: 108, 44: 154 }), t(J, a, { 8: 110, 46: 155 }), t(Y, a, { 8: 112, 48: 156 }), { 5: [2, 59] }, { 5: [2, 60] }, { 78: [2, 55] }, { 40: [2, 46] }, { 40: [2, 44] }, { 40: [2, 42] }],
defaultActions: { 7: [2, 72], 8: [2, 1], 9: [2, 2], 10: [2, 3], 51: [2, 75], 86: [2, 57], 87: [2, 58], 94: [2, 74], 120: [2, 49], 121: [2, 71], 122: [2, 50], 123: [2, 51], 124: [2, 52], 141: [2, 61], 142: [2, 47], 143: [2, 48], 151: [2, 59], 152: [2, 60], 153: [2, 55], 154: [2, 46], 155: [2, 44], 156: [2, 42] },
parseError: function(Z, V) {
if (V.recoverable)
this.trace(Z);
else {
var Q = new Error(Z);
throw Q.hash = V, Q;
}
},
parse: function(Z) {
var V = this, Q = [0], q = [], U = [null], F = [], j = this.table, P = "", et = 0, at = 0, It = 2, Lt = 1, Rt = F.slice.call(arguments, 1), Ct = Object.create(this.lexer), pt = { yy: {} };
for (var mt in this.yy)
Object.prototype.hasOwnProperty.call(this.yy, mt) && (pt.yy[mt] = this.yy[mt]);
Ct.setInput(Z, pt.yy), pt.yy.lexer = Ct, pt.yy.parser = this, typeof Ct.yylloc > "u" && (Ct.yylloc = {});
var _t = Ct.yylloc;
F.push(_t);
var Tt = Ct.options && Ct.options.ranges;
typeof pt.yy.parseError == "function" ? this.parseError = pt.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
function ft() {
var bt;
return bt = q.pop() || Ct.lex() || Lt, typeof bt != "number" && (bt instanceof Array && (q = bt, bt = q.pop()), bt = V.symbols_[bt] || bt), bt;
}
for (var le, Dt, Ht, $t, Qt = {}, we, Gt, Ft, zt; ; ) {
if (Dt = Q[Q.length - 1], this.defaultActions[Dt] ? Ht = this.defaultActions[Dt] : ((le === null || typeof le > "u") && (le = ft()), Ht = j[Dt] && j[Dt][le]), typeof Ht > "u" || !Ht.length || !Ht[0]) {
var wt = "";
zt = [];
for (we in j[Dt])
this.terminals_[we] && we > It && zt.push("'" + this.terminals_[we] + "'");
Ct.showPosition ? wt = "Parse error on line " + (et + 1) + `:
` + Ct.showPosition() + `
Expecting ` + zt.join(", ") + ", got '" + (this.terminals_[le] || le) + "'" : wt = "Parse error on line " + (et + 1) + ": Unexpected " + (le == Lt ? "end of input" : "'" + (this.terminals_[le] || le) + "'"), this.parseError(wt, {
text: Ct.match,
token: this.terminals_[le] || le,
line: Ct.yylineno,
loc: _t,
expected: zt
});
}
if (Ht[0] instanceof Array && Ht.length > 1)
throw new Error("Parse Error: multiple actions possible at state: " + Dt + ", token: " + le);
switch (Ht[0]) {
case 1:
Q.push(le), U.push(Ct.yytext), F.push(Ct.yylloc), Q.push(Ht[1]), le = null, at = Ct.yyleng, P = Ct.yytext, et = Ct.yylineno, _t = Ct.yylloc;
break;
case 2:
if (Gt = this.productions_[Ht[1]][1], Qt.$ = U[U.length - Gt], Qt._$ = {
first_line: F[F.length - (Gt || 1)].first_line,
last_line: F[F.length - 1].last_line,
first_column: F[F.length - (Gt || 1)].first_column,
last_column: F[F.length - 1].last_column
}, Tt && (Qt._$.range = [
F[F.length - (Gt || 1)].range[0],
F[F.length - 1].range[1]
]), $t = this.performAction.apply(Qt, [
P,
at,
et,
pt.yy,
Ht[1],
U,
F
].concat(Rt)), typeof $t < "u")
return $t;
Gt && (Q = Q.slice(0, -1 * Gt * 2), U = U.slice(0, -1 * Gt), F = F.slice(0, -1 * Gt)), Q.push(this.productions_[Ht[1]][0]), U.push(Qt.$), F.push(Qt._$), Ft = j[Q[Q.length - 2]][Q[Q.length - 1]], Q.push(Ft);
break;
case 3:
return !0;
}
}
return !0;
}
}, tt = function() {
var it = {
EOF: 1,
parseError: function(V, Q) {
if (this.yy.parser)
this.yy.parser.parseError(V, Q);
else
throw new Error(V);
},
setInput: function(Z, V) {
return this.yy = V || this.yy || {}, this._input = Z, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
first_line: 1,
first_column: 0,
last_line: 1,
last_column: 0
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
},
input: function() {
var Z = this._input[0];
this.yytext += Z, this.yyleng++, this.offset++, this.match += Z, this.matched += Z;
var V = Z.match(/(?:\r\n?|\n).*/g);
return V ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), Z;
},
unput: function(Z) {
var V = Z.length, Q = Z.split(/(?:\r\n?|\n)/g);
this._input = Z + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - V), this.offset -= V;
var q = this.match.split(/(?:\r\n?|\n)/g);
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), Q.length - 1 && (this.yylineno -= Q.length - 1);
var U = this.yylloc.range;
return this.yylloc = {
first_line: this.yylloc.first_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.first_column,
last_column: Q ? (Q.length === q.length ? this.yylloc.first_column : 0) + q[q.length - Q.length].length - Q[0].length : this.yylloc.first_column - V
}, this.options.ranges && (this.yylloc.range = [U[0], U[0] + this.yyleng - V]), this.yyleng = this.yytext.length, this;
},
more: function() {
return this._more = !0, this;
},
reject: function() {
if (this.options.backtrack_lexer)
this._backtrack = !0;
else
return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
return this;
},
less: function(Z) {
this.unput(this.match.slice(Z));
},
pastInput: function() {
var Z = this.matched.substr(0, this.matched.length - this.match.length);
return (Z.length > 20 ? "..." : "") + Z.substr(-20).replace(/\n/g, "");
},
upcomingInput: function() {
var Z = this.match;
return Z.length < 20 && (Z += this._input.substr(0, 20 - Z.length)), (Z.substr(0, 20) + (Z.length > 20 ? "..." : "")).replace(/\n/g, "");
},
showPosition: function() {
var Z = this.pastInput(), V = new Array(Z.length + 1).join("-");
return Z + this.upcomingInput() + `
` + V + "^";
},
test_match: function(Z, V) {
var Q, q, U;
if (this.options.backtrack_lexer && (U = {
yylineno: this.yylineno,
yylloc: {
first_line: this.yylloc.first_line,
last_line: this.last_line,
first_column: this.yylloc.first_column,
last_column: this.yylloc.last_column
},
yytext: this.yytext,
match: this.match,
matches: this.matches,
matched: this.matched,
yyleng: this.yyleng,
offset: this.offset,
_more: this._more,
_input: this._input,
yy: this.yy,
conditionStack: this.conditionStack.slice(0),
done: this.done
}, this.options.ranges && (U.yylloc.range = this.yylloc.range.slice(0))), q = Z[0].match(/(?:\r\n?|\n).*/g), q && (this.yylineno += q.length), this.yylloc = {
first_line: this.yylloc.last_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.last_column,
last_column: q ? q[q.length - 1].length - q[q.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + Z[0].length
}, this.yytext += Z[0], this.match += Z[0], this.matches = Z, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(Z[0].length), this.matched += Z[0], Q = this.performAction.call(this, this.yy, this, V, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), Q)
return Q;
if (this._backtrack) {
for (var F in U)
this[F] = U[F];
return !1;
}
return !1;
},
next: function() {
if (this.done)
return this.EOF;
this._input || (this.done = !0);
var Z, V, Q, q;
this._more || (this.yytext = "", this.match = "");
for (var U = this._currentRules(), F = 0; F < U.length; F++)
if (Q = this._input.match(this.rules[U[F]]), Q && (!V || Q[0].length > V[0].length)) {
if (V = Q, q = F, this.options.backtrack_lexer) {
if (Z = this.test_match(Q, U[F]), Z !== !1)
return Z;
if (this._backtrack) {
V = !1;
continue;
} else
return !1;
} else if (!this.options.flex)
break;
}
return V ? (Z = this.test_match(V, U[q]), Z !== !1 ? Z : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
},
lex: function() {
var V = this.next();
return V || this.lex();
},
begin: function(V) {
this.conditionStack.push(V);
},
popState: function() {
var V = this.conditionStack.length - 1;
return V > 0 ? this.conditionStack.pop() : this.conditionStack[0];
},
_currentRules: function() {
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
},
topState: function(V) {
return V = this.conditionStack.length - 1 - Math.abs(V || 0), V >= 0 ? this.conditionStack[V] : "INITIAL";
},
pushState: function(V) {
this.begin(V);
},
stateStackSize: function() {
return this.conditionStack.length;
},
options: { "case-insensitive": !0 },
performAction: function(V, Q, q, U) {
switch (q) {
case 0:
return this.begin("open_directive"), 79;
case 1:
return this.begin("type_directive"), 80;
case 2:
return this.popState(), this.begin("arg_directive"), 14;
case 3:
return this.popState(), this.popState(), 82;
case 4:
return 81;
case 5:
return 5;
case 6:
break;
case 7:
break;
case 8:
break;
case 9:
break;
case 10:
break;
case 11:
return 23;
case 12:
return this.begin("ID"), 16;
case 13:
return this.begin("ID"), 20;
case 14:
return Q.yytext = Q.yytext.trim(), this.begin("ALIAS"), 69;
case 15:
return this.popState(), this.popState(), this.begin("LINE"), 18;
case 16:
return this.popState(), this.popState(), 5;
case 17:
return this.begin("LINE"), 39;
case 18:
return this.begin("LINE"), 41;
case 19:
return this.begin("LINE"), 42;
case 20:
return this.begin("LINE"), 43;
case 21:
return this.begin("LINE"), 52;
case 22:
return this.begin("LINE"), 45;
case 23:
return this.begin("LINE"), 51;
case 24:
return this.begin("LINE"), 47;
case 25:
return this.begin("LINE"), 50;
case 26:
return this.begin("LINE"), 49;
case 27:
return this.popState(), 19;
case 28:
return 40;
case 29:
return 64;
case 30:
return 65;
case 31:
return 58;
case 32:
return 59;
case 33:
return 60;
case 34:
return 61;
case 35:
return 56;
case 36:
return 53;
case 37:
return this.begin("ID"), 25;
case 38:
return this.begin("ID"), 26;
case 39:
return 32;
case 40:
return 33;
case 41:
return this.begin("acc_title"), 34;
case 42:
return this.popState(), "acc_title_value";
case 43:
return this.begin("acc_descr"), 36;
case 44:
return this.popState(), "acc_descr_value";
case 45:
this.begin("acc_descr_multiline");
break;
case 46:
this.popState();
break;
case 47:
return "acc_descr_multiline_value";
case 48:
return 7;
case 49:
return 22;
case 50:
return 24;
case 51:
return 63;
case 52:
return 5;
case 53:
return Q.yytext = Q.yytext.trim(), 69;
case 54:
return 72;
case 55:
return 73;
case 56:
return 70;
case 57:
return 71;
case 58:
return 74;
case 59:
return 75;
case 60:
return 76;
case 61:
return 77;
case 62:
return 78;
case 63:
return 67;
case 64:
return 68;
case 65:
return 5;
case 66:
return "INVALID";
}
},
rules: [/^(?:%%\{)/i, /^(?:((?:(?!\}%%)[^:.])*))/i, /^(?::)/i, /^(?:\}%%)/i, /^(?:((?:(?!\}%%).|\n)*))/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:((?!\n)\s)+)/i, /^(?:#[^\n]*)/i, /^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[0-9]+(?=[ \n]+))/i, /^(?:participant\b)/i, /^(?:actor\b)/i, /^(?:[^\->:\n,;]+?([\-]*[^\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i, /^(?:as\b)/i, /^(?:(?:))/i, /^(?:loop\b)/i, /^(?:rect\b)/i, /^(?:opt\b)/i, /^(?:alt\b)/i, /^(?:else\b)/i, /^(?:par\b)/i, /^(?:and\b)/i, /^(?:critical\b)/i, /^(?:option\b)/i, /^(?:break\b)/i, /^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i, /^(?:end\b)/i, /^(?:left of\b)/i, /^(?:right of\b)/i, /^(?:links\b)/i, /^(?:link\b)/i, /^(?:properties\b)/i, /^(?:details\b)/i, /^(?:over\b)/i, /^(?:note\b)/i, /^(?:activate\b)/i, /^(?:deactivate\b)/i, /^(?:title\s[^#\n;]+)/i, /^(?:title:\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:sequenceDiagram\b)/i, /^(?:autonumber\b)/i, /^(?:off\b)/i, /^(?:,)/i, /^(?:;)/i, /^(?:[^\+\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\->:\n,;]+)*)/i, /^(?:->>)/i, /^(?:-->>)/i, /^(?:->)/i, /^(?:-->)/i, /^(?:-[x])/i, /^(?:--[x])/i, /^(?:-[\)])/i, /^(?:--[\)])/i, /^(?::(?:(?:no)?wrap)?[^#\n;]+)/i, /^(?:\+)/i, /^(?:-)/i, /^(?:$)/i, /^(?:.)/i],
conditions: { acc_descr_multiline: { rules: [46, 47], inclusive: !1 }, acc_descr: { rules: [44], inclusive: !1 }, acc_title: { rules: [42], inclusive: !1 }, open_directive: { rules: [1, 8], inclusive: !1 }, type_directive: { rules: [2, 3, 8], inclusive: !1 }, arg_directive: { rules: [3, 4, 8], inclusive: !1 }, ID: { rules: [7, 8, 14], inclusive: !1 }, ALIAS: { rules: [7, 8, 15, 16], inclusive: !1 }, LINE: { rules: [7, 8, 27], inclusive: !1 }, INITIAL: { rules: [0, 5, 6, 8, 9, 10, 11, 12, 13, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 43, 45, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66], inclusive: !0 } }
};
return it;
}();
W.lexer = tt;
function K() {
this.yy = {};
}
return K.prototype = W, W.Parser = K, new K();
}();
qb.parser = qb;
const cst = (t) => t.match(/^\s*sequenceDiagram/) !== null;
let Dl, Pa = {}, Qn = [], C0 = !1, Vb;
const ust = function(t, e, r) {
sr.parseDirective(this, t, e, r);
}, zb = function(t, e, r, n) {
const i = Pa[t];
i && e === i.name && r == null || ((r == null || r.text == null) && (r = { text: e, wrap: null, type: n }), (n == null || r.text == null) && (r = { text: e, wrap: null, type: n }), Pa[t] = {
name: e,
description: r.text,
wrap: r.wrap === void 0 && tl() || !!r.wrap,
prevActor: Dl,
links: {},
properties: {},
actorCnt: null,
rectData: null,
type: n || "participant"
}, Dl && Pa[Dl] && (Pa[Dl].nextActor = t), Dl = t);
}, hst = (t) => {
let e, r = 0;
for (e = 0; e < Qn.length; e++)
Qn[e].type === Hc.ACTIVE_START && Qn[e].from.actor === t && r++, Qn[e].type === Hc.ACTIVE_END && Qn[e].from.actor === t && r--;
return r;
}, fst = function(t, e, r, n) {
Qn.push({
from: t,
to: e,
message: r.text,
wrap: r.wrap === void 0 && tl() || !!r.wrap,
answer: n
});
}, lr = function(t, e, r = { text: void 0, wrap: void 0 }, n) {
if (n === Hc.ACTIVE_END && hst(t.actor) < 1) {
let a = new Error("Trying to inactivate an inactive participant (" + t.actor + ")");
throw a.hash = {
text: "->>-",
token: "->>-",
line: "1",
loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
expected: ["'ACTIVE_PARTICIPANT'"]
}, a;
}
return Qn.push({
from: t,
to: e,
message: r.text,
wrap: r.wrap === void 0 && tl() || !!r.wrap,
type: n
}), !0;
}, dst = function() {
return Qn;
}, pst = function() {
return Pa;
}, mu = function(t) {
return Pa[t];
}, gst = function() {
return Object.keys(Pa);
}, yst = function() {
C0 = !0;
}, mst = function() {
C0 = !1;
}, bst = () => C0, _st = function(t) {
Vb = t;
}, tl = () => typeof Vb < "u" ? Vb : nt().sequence.wrap, vst = function() {
Pa = {}, Qn = [], C0 = !1, pi();
}, xst = function(t) {
const e = t.trim(), r = {
text: e.replace(/^[:]?(?:no)?wrap:/, "").trim(),
wrap: e.match(/^[:]?wrap:/) !== null ? !0 : e.match(/^[:]?nowrap:/) !== null ? !1 : void 0
};
return H.debug("parseMessage:", r), r;
}, Hc = {
SOLID: 0,
DOTTED: 1,
NOTE: 2,
SOLID_CROSS: 3,
DOTTED_CROSS: 4,
SOLID_OPEN: 5,
DOTTED_OPEN: 6,
LOOP_START: 10,
LOOP_END: 11,
ALT_START: 12,
ALT_ELSE: 13,
ALT_END: 14,
OPT_START: 15,
OPT_END: 16,
ACTIVE_START: 17,
ACTIVE_END: 18,
PAR_START: 19,
PAR_AND: 20,
PAR_END: 21,
RECT_START: 22,
RECT_END: 23,
SOLID_POINT: 24,
DOTTED_POINT: 25,
AUTONUMBER: 26,
CRITICAL_START: 27,
CRITICAL_OPTION: 28,
CRITICAL_END: 29,
BREAK_START: 30,
BREAK_END: 31
}, kst = {
FILLED: 0,
OPEN: 1
}, wst = {
LEFTOF: 0,
RIGHTOF: 1,
OVER: 2
}, KL = function(t, e, r) {
r.text, r.wrap === void 0 && tl() || r.wrap;
const n = [].concat(t, t);
Qn.push({
from: n[0],
to: n[1],
message: r.text,
wrap: r.wrap === void 0 && tl() || !!r.wrap,
type: Hc.NOTE,
placement: e
});
}, ZL = function(t, e) {
const r = mu(t);
try {
let n = li(e.text, nt());
n = n.replace(/&/g, "&"), n = n.replace(/=/g, "=");
const i = JSON.parse(n);
v_(r, i);
} catch (n) {
H.error("error while parsing actor link text", n);
}
}, Tst = function(t, e) {
const r = mu(t);
try {
const s = {};
let o = li(e.text, nt());
var n = o.indexOf("@");
o = o.replace(/&/g, "&"), o = o.replace(/=/g, "=");
var i = o.slice(0, n - 1).trim(), a = o.slice(n + 1).trim();
s[i] = a, v_(r, s);
} catch (s) {
H.error("error while parsing actor link text", s);
}
};
function v_(t, e) {
if (t.links == null)
t.links = e;
else
for (let r in e)
t.links[r] = e[r];
}
const QL = function(t, e) {
const r = mu(t);
try {
let n = li(e.text, nt());
const i = JSON.parse(n);
JL(r, i);
} catch (n) {
H.error("error while parsing actor properties text", n);
}
};
function JL(t, e) {
if (t.properties == null)
t.properties = e;
else
for (let r in e)
t.properties[r] = e[r];
}
const tR = function(t, e) {
const r = mu(t), n = document.getElementById(e.text);
try {
const i = n.innerHTML, a = JSON.parse(i);
a.properties && JL(r, a.properties), a.links && v_(r, a.links);
} catch (i) {
H.error("error while parsing actor details text", i);
}
}, Est = function(t, e) {
if (typeof t < "u" && typeof t.properties < "u")
return t.properties[e];
}, eR = function(t) {
if (t instanceof Array)
t.forEach(function(e) {
eR(e);
});
else
switch (t.type) {
case "sequenceIndex":
Qn.push({
from: void 0,
to: void 0,
message: {
start: t.sequenceIndex,
step: t.sequenceIndexStep,
visible: t.sequenceVisible
},
wrap: !1,
type: t.signalType
});
break;
case "addParticipant":
zb(t.actor, t.actor, t.description, "participant");
break;
case "addActor":
zb(t.actor, t.actor, t.description, "actor");
break;
case "activeStart":
lr(t.actor, void 0, void 0, t.signalType);
break;
case "activeEnd":
lr(t.actor, void 0, void 0, t.signalType);
break;
case "addNote":
KL(t.actor, t.placement, t.text);
break;
case "addLinks":
ZL(t.actor, t.text);
break;
case "addALink":
Tst(t.actor, t.text);
break;
case "addProperties":
QL(t.actor, t.text);
break;
case "addDetails":
tR(t.actor, t.text);
break;
case "addMessage":
lr(t.from, t.to, t.msg, t.signalType);
break;
case "loopStart":
lr(void 0, void 0, t.loopText, t.signalType);
break;
case "loopEnd":
lr(void 0, void 0, void 0, t.signalType);
break;
case "rectStart":
lr(void 0, void 0, t.color, t.signalType);
break;
case "rectEnd":
lr(void 0, void 0, void 0, t.signalType);
break;
case "optStart":
lr(void 0, void 0, t.optText, t.signalType);
break;
case "optEnd":
lr(void 0, void 0, void 0, t.signalType);
break;
case "altStart":
lr(void 0, void 0, t.altText, t.signalType);
break;
case "else":
lr(void 0, void 0, t.altText, t.signalType);
break;
case "altEnd":
lr(void 0, void 0, void 0, t.signalType);
break;
case "setAccTitle":
zn(t.text);
break;
case "parStart":
lr(void 0, void 0, t.parText, t.signalType);
break;
case "and":
lr(void 0, void 0, t.parText, t.signalType);
break;
case "parEnd":
lr(void 0, void 0, void 0, t.signalType);
break;
case "criticalStart":
lr(void 0, void 0, t.criticalText, t.signalType);
break;
case "option":
lr(void 0, void 0, t.optionText, t.signalType);
break;
case "criticalEnd":
lr(void 0, void 0, void 0, t.signalType);
break;
case "breakStart":
lr(void 0, void 0, t.breakText, t.signalType);
break;
case "breakEnd":
lr(void 0, void 0, void 0, t.signalType);
break;
}
}, Cw = {
addActor: zb,
addMessage: fst,
addSignal: lr,
addLinks: ZL,
addDetails: tR,
addProperties: QL,
autoWrap: tl,
setWrap: _st,
enableSequenceNumbers: yst,
disableSequenceNumbers: mst,
showSequenceNumbers: bst,
getMessages: dst,
getActors: pst,
getActor: mu,
getActorKeys: gst,
getActorProperty: Est,
getAccTitle: gi,
getDiagramTitle: l0,
setDiagramTitle: o0,
parseDirective: ust,
getConfig: () => nt().sequence,
clear: vst,
parseMessage: xst,
LINETYPE: Hc,
ARROWTYPE: kst,
PLACEMENT: wst,
addNote: KL,
setAccTitle: zn,
apply: eR,
setAccDescription: yi,
getAccDescription: mi
};
let Yb = [];
const Cst = (t) => {
Yb.push(t);
}, rR = () => {
Yb.forEach((t) => {
t();
}), Yb = [];
}, S0 = function(t, e) {
const r = t.append("rect");
return r.attr("x", e.x), r.attr("y", e.y), r.attr("fill", e.fill), r.attr("stroke", e.stroke), r.attr("width", e.width), r.attr("height", e.height), r.attr("rx", e.rx), r.attr("ry", e.ry), typeof e.class < "u" && r.attr("class", e.class), r;
}, nR = (t, e) => {
Cst(() => {
const r = document.querySelectorAll(t);
r.length !== 0 && (r[0].addEventListener("mouseover", function() {
Lst("actor" + e + "_popup");
}), r[0].addEventListener("mouseout", function() {
Rst("actor" + e + "_popup");
}));
});
}, Sst = function(t, e, r, n, i) {
if (e.links === void 0 || e.links === null || Object.keys(e.links).length === 0)
return { height: 0, width: 0 };
const a = e.links, s = e.actorCnt, o = e.rectData;
var l = "none";
i && (l = "block !important");
const u = t.append("g");
u.attr("id", "actor" + s + "_popup"), u.attr("class", "actorPopupMenu"), u.attr("display", l), nR("#actor" + s + "_popup", s);
var h = "";
typeof o.class < "u" && (h = " " + o.class);
let d = o.width > r ? o.width : r;
const f = u.append("rect");
if (f.attr("class", "actorPopupMenuPanel" + h), f.attr("x", o.x), f.attr("y", o.height), f.attr("fill", o.fill), f.attr("stroke", o.stroke), f.attr("width", d), f.attr("height", o.height), f.attr("rx", o.rx), f.attr("ry", o.ry), a != null) {
var p = 20;
for (let y in a) {
var m = u.append("a"), _ = qi(a[y]);
m.attr("xlink:href", _), m.attr("target", "_blank"), Gst(n)(
y,
m,
o.x + 10,
o.height + p,
d,
20,
{ class: "actor" },
n
), p += 30;
}
}
return f.attr("height", p), { height: o.height + p, width: d };
}, iR = function(t, e, r, n) {
const i = t.append("image");
i.attr("x", e), i.attr("y", r);
var a = qi(n);
i.attr("xlink:href", a);
}, aR = function(t, e, r, n) {
const i = t.append("use");
i.attr("x", e), i.attr("y", r);
var a = qi(n);
i.attr("xlink:href", "#" + a);
}, Ast = function(t) {
return "var pu = document.getElementById('" + t + "'); if (pu != null) { pu.style.display = 'block'; }";
}, Mst = function(t) {
return "var pu = document.getElementById('" + t + "'); if (pu != null) { pu.style.display = 'none'; }";
}, Lst = function(t) {
var e = document.getElementById(t);
e != null && (e.style.display = "block");
}, Rst = function(t) {
var e = document.getElementById(t);
e != null && (e.style.display = "none");
}, el = function(t, e) {
let r = 0, n = 0;
const i = e.text.split(pe.lineBreakRegex);
let a = [], s = 0, o = () => e.y;
if (typeof e.valign < "u" && typeof e.textMargin < "u" && e.textMargin > 0)
switch (e.valign) {
case "top":
case "start":
o = () => Math.round(e.y + e.textMargin);
break;
case "middle":
case "center":
o = () => Math.round(e.y + (r + n + e.textMargin) / 2);
break;
case "bottom":
case "end":
o = () => Math.round(
e.y + (r + n + 2 * e.textMargin) - e.textMargin
);
break;
}
if (typeof e.anchor < "u" && typeof e.textMargin < "u" && typeof e.width < "u")
switch (e.anchor) {
case "left":
case "start":
e.x = Math.round(e.x + e.textMargin), e.anchor = "start", e.dominantBaseline = "middle", e.alignmentBaseline = "middle";
break;
case "middle":
case "center":
e.x = Math.round(e.x + e.width / 2), e.anchor = "middle", e.dominantBaseline = "middle", e.alignmentBaseline = "middle";
break;
case "right":
case "end":
e.x = Math.round(e.x + e.width - e.textMargin), e.anchor = "end", e.dominantBaseline = "middle", e.alignmentBaseline = "middle";
break;
}
for (let l = 0; l < i.length; l++) {
let u = i[l];
typeof e.textMargin < "u" && e.textMargin === 0 && typeof e.fontSize < "u" && (s = l * e.fontSize);
const h = t.append("text");
if (h.attr("x", e.x), h.attr("y", o()), typeof e.anchor < "u" && h.attr("text-anchor", e.anchor).attr("dominant-baseline", e.dominantBaseline).attr("alignment-baseline", e.alignmentBaseline), typeof e.fontFamily < "u" && h.style("font-family", e.fontFamily), typeof e.fontSize < "u" && h.style("font-size", e.fontSize), typeof e.fontWeight < "u" && h.style("font-weight", e.fontWeight), typeof e.fill < "u" && h.attr("fill", e.fill), typeof e.class < "u" && h.attr("class", e.class), typeof e.dy < "u" ? h.attr("dy", e.dy) : s !== 0 && h.attr("dy", s), e.tspan) {
const d = h.append("tspan");
d.attr("x", e.x), typeof e.fill < "u" && d.attr("fill", e.fill), d.text(u);
} else
h.text(u);
typeof e.valign < "u" && typeof e.textMargin < "u" && e.textMargin > 0 && (n += (h._groups || h)[0][0].getBBox().height, r = n), a.push(h);
}
return a;
}, sR = function(t, e) {
function r(i, a, s, o, l) {
return i + "," + a + " " + (i + s) + "," + a + " " + (i + s) + "," + (a + o - l) + " " + (i + s - l * 1.2) + "," + (a + o) + " " + i + "," + (a + o);
}
const n = t.append("polygon");
return n.attr("points", r(e.x, e.y, e.width, e.height, 7)), n.attr("class", "labelBox"), e.y = e.y + e.height / 2, el(t, e), n;
};
let Ti = -1;
const oR = (t, e) => {
!t.selectAll || t.selectAll(".actor-line").attr("class", "200").attr("y2", e - 55);
}, Ist = function(t, e, r) {
const n = e.x + e.width / 2, i = t.append("g");
var a = i;
e.y === 0 && (Ti++, a.append("line").attr("id", "actor" + Ti).attr("x1", n).attr("y1", 5).attr("x2", n).attr("y2", 2e3).attr("class", "actor-line").attr("stroke-width", "0.5px").attr("stroke", "#999"), a = i.append("g"), e.actorCnt = Ti, e.links != null && (a.attr("id", "root-" + Ti), nR("#root-" + Ti, Ti)));
const s = A0();
var o = "actor";
e.properties != null && e.properties.class ? o = e.properties.class : s.fill = "#eaeaea", s.x = e.x, s.y = e.y, s.width = e.width, s.height = e.height, s.class = o, s.rx = 3, s.ry = 3;
const l = S0(a, s);
if (e.rectData = s, e.properties != null && e.properties.icon) {
const h = e.properties.icon.trim();
h.charAt(0) === "@" ? aR(a, s.x + s.width - 20, s.y + 10, h.substr(1)) : iR(a, s.x + s.width - 20, s.y + 10, h);
}
lR(r)(
e.description,
a,
s.x,
s.y,
s.width,
s.height,
{ class: "actor" },
r
);
let u = e.height;
if (l.node) {
const h = l.node().getBBox();
e.height = h.height, u = h.height;
}
return u;
}, Nst = function(t, e, r) {
const n = e.x + e.width / 2;
e.y === 0 && (Ti++, t.append("line").attr("id", "actor" + Ti).attr("x1", n).attr("y1", 80).attr("x2", n).attr("y2", 2e3).attr("class", "actor-line").attr("stroke-width", "0.5px").attr("stroke", "#999"));
const i = t.append("g");
i.attr("class", "actor-man");
const a = A0();
a.x = e.x, a.y = e.y, a.fill = "#eaeaea", a.width = e.width, a.height = e.height, a.class = "actor", a.rx = 3, a.ry = 3, i.append("line").attr("id", "actor-man-torso" + Ti).attr("x1", n).attr("y1", e.y + 25).attr("x2", n).attr("y2", e.y + 45), i.append("line").attr("id", "actor-man-arms" + Ti).attr("x1", n - 18).attr("y1", e.y + 33).attr("x2", n + 18).attr("y2", e.y + 33), i.append("line").attr("x1", n - 18).attr("y1", e.y + 60).attr("x2", n).attr("y2", e.y + 45), i.append("line").attr("x1", n).attr("y1", e.y + 45).attr("x2", n + 16).attr("y2", e.y + 60);
const s = i.append("circle");
s.attr("cx", e.x + e.width / 2), s.attr("cy", e.y + 10), s.attr("r", 15), s.attr("width", e.width), s.attr("height", e.height);
const o = i.node().getBBox();
return e.height = o.height, lR(r)(
e.description,
i,
a.x,
a.y + 35,
a.width,
a.height,
{ class: "actor" },
r
), e.height;
}, Bst = function(t, e, r) {
switch (e.type) {
case "actor":
return Nst(t, e, r);
case "participant":
return Ist(t, e, r);
}
}, Dst = function(t) {
return t.append("g");
}, Ost = function(t, e, r, n, i) {
const a = A0(), s = e.anchored;
a.x = e.startx, a.y = e.starty, a.class = "activation" + i % 3, a.width = e.stopx - e.startx, a.height = r - e.starty, S0(s, a);
}, Fst = function(t, e, r, n) {
const {
boxMargin: i,
boxTextMargin: a,
labelBoxHeight: s,
labelBoxWidth: o,
messageFontFamily: l,
messageFontSize: u,
messageFontWeight: h
} = n, d = t.append("g"), f = function(_, y, b, x) {
return d.append("line").attr("x1", _).attr("y1", y).attr("x2", b).attr("y2", x).attr("class", "loopLine");
};
f(e.startx, e.starty, e.stopx, e.starty), f(e.stopx, e.starty, e.stopx, e.stopy), f(e.startx, e.stopy, e.stopx, e.stopy), f(e.startx, e.starty, e.startx, e.stopy), typeof e.sections < "u" && e.sections.forEach(function(_) {
f(e.startx, _.y, e.stopx, _.y).style(
"stroke-dasharray",
"3, 3"
);
});
let p = Ub();
p.text = r, p.x = e.startx, p.y = e.starty, p.fontFamily = l, p.fontSize = u, p.fontWeight = h, p.anchor = "middle", p.valign = "middle", p.tspan = !1, p.width = o || 50, p.height = s || 20, p.textMargin = a, p.class = "labelText", sR(d, p), p = Ub(), p.text = e.title, p.x = e.startx + o / 2 + (e.stopx - e.startx) / 2, p.y = e.starty + i + a, p.anchor = "middle", p.valign = "middle", p.textMargin = a, p.class = "loopText", p.fontFamily = l, p.fontSize = u, p.fontWeight = h, p.wrap = !0;
let m = el(d, p);
return typeof e.sectionTitles < "u" && e.sectionTitles.forEach(function(_, y) {
if (_.message) {
p.text = _.message, p.x = e.startx + (e.stopx - e.startx) / 2, p.y = e.sections[y].y + i + a, p.class = "loopText", p.anchor = "middle", p.valign = "middle", p.tspan = !1, p.fontFamily = l, p.fontSize = u, p.fontWeight = h, p.wrap = e.wrap, m = el(d, p);
let b = Math.round(
m.map((x) => (x._groups || x)[0][0].getBBox().height).reduce((x, k) => x + k)
);
e.sections[y].height += b - (i + a);
}
}), e.height = Math.round(e.stopy - e.starty), d;
}, Pst = function(t, e) {
S0(t, {
x: e.startx,
y: e.starty,
width: e.stopx - e.startx,
height: e.stopy - e.starty,
fill: e.fill,
class: "rect"
}).lower();
}, qst = function(t) {
t.append("defs").append("symbol").attr("id", "database").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").append("path").attr("transform", "scale(.5)").attr(
"d",
"M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z"
);
}, Vst = function(t) {
t.append("defs").append("symbol").attr("id", "computer").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
"d",
"M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z"
);
}, zst = function(t) {
t.append("defs").append("symbol").attr("id", "clock").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
"d",
"M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z"
);
}, Yst = function(t) {
t.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 9).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z");
}, Ust = function(t) {
t.append("defs").append("marker").attr("id", "filled-head").attr("refX", 18).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
}, Wst = function(t) {
t.append("defs").append("marker").attr("id", "sequencenumber").attr("refX", 15).attr("refY", 15).attr("markerWidth", 60).attr("markerHeight", 40).attr("orient", "auto").append("circle").attr("cx", 15).attr("cy", 15).attr("r", 6);
}, Hst = function(t) {
const r = t.append("defs").append("marker").attr("id", "crosshead").attr("markerWidth", 15).attr("markerHeight", 8).attr("orient", "auto").attr("refX", 16).attr("refY", 4);
r.append("path").attr("fill", "black").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1px").attr("d", "M 9,2 V 6 L16,4 Z"), r.append("path").attr("fill", "none").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1px").attr("d", "M 0,1 L 6,7 M 6,1 L 0,7");
}, Ub = function() {
return {
x: 0,
y: 0,
fill: void 0,
anchor: void 0,
style: "#666",
width: void 0,
height: void 0,
textMargin: 0,
rx: 0,
ry: 0,
tspan: !0,
valign: void 0
};
}, A0 = function() {
return {
x: 0,
y: 0,
fill: "#EDF2AE",
stroke: "#666",
width: 100,
anchor: "start",
height: 100,
rx: 0,
ry: 0
};
}, lR = function() {
function t(i, a, s, o, l, u, h) {
const d = a.append("text").attr("x", s + l / 2).attr("y", o + u / 2 + 5).style("text-anchor", "middle").text(i);
n(d, h);
}
function e(i, a, s, o, l, u, h, d) {
const { actorFontSize: f, actorFontFamily: p, actorFontWeight: m } = d;
let _ = f && f.replace ? f.replace("px", "") : f;
const y = i.split(pe.lineBreakRegex);
for (let b = 0; b < y.length; b++) {
const x = b * _ - _ * (y.length - 1) / 2, k = a.append("text").attr("x", s + l / 2).attr("y", o).style("text-anchor", "middle").style("font-size", f).style("font-weight", m).style("font-family", p);
k.append("tspan").attr("x", s + l / 2).attr("dy", x).text(y[b]), k.attr("y", o + u / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), n(k, h);
}
}
function r(i, a, s, o, l, u, h, d) {
const f = a.append("switch"), m = f.append("foreignObject").attr("x", s).attr("y", o).attr("width", l).attr("height", u).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
m.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(i), e(i, f, s, o, l, u, h, d), n(m, h);
}
function n(i, a) {
for (const s in a)
a.hasOwnProperty(s) && i.attr(s, a[s]);
}
return function(i) {
return i.textPlacement === "fo" ? r : i.textPlacement === "old" ? t : e;
};
}(), Gst = function() {
function t(i, a, s, o, l, u, h) {
const d = a.append("text").attr("x", s).attr("y", o).style("text-anchor", "start").text(i);
n(d, h);
}
function e(i, a, s, o, l, u, h, d) {
const { actorFontSize: f, actorFontFamily: p, actorFontWeight: m } = d, _ = i.split(pe.lineBreakRegex);
for (let y = 0; y < _.length; y++) {
const b = y * f - f * (_.length - 1) / 2, x = a.append("text").attr("x", s).attr("y", o).style("text-anchor", "start").style("font-size", f).style("font-weight", m).style("font-family", p);
x.append("tspan").attr("x", s).attr("dy", b).text(_[y]), x.attr("y", o + u / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), n(x, h);
}
}
function r(i, a, s, o, l, u, h, d) {
const f = a.append("switch"), m = f.append("foreignObject").attr("x", s).attr("y", o).attr("width", l).attr("height", u).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
m.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(i), e(i, f, s, o, l, u, h, d), n(m, h);
}
function n(i, a) {
for (const s in a)
a.hasOwnProperty(s) && i.attr(s, a[s]);
}
return function(i) {
return i.textPlacement === "fo" ? r : i.textPlacement === "old" ? t : e;
};
}(), er = {
drawRect: S0,
drawText: el,
drawLabel: sR,
drawActor: Bst,
drawPopup: Sst,
drawImage: iR,
drawEmbeddedImage: aR,
anchorElement: Dst,
drawActivation: Ost,
drawLoop: Fst,
drawBackgroundRect: Pst,
insertArrowHead: Yst,
insertArrowFilledHead: Ust,
insertSequenceNumber: Wst,
insertArrowCrossHead: Hst,
insertDatabaseIcon: qst,
insertComputerIcon: Vst,
insertClockIcon: zst,
getTextObj: Ub,
getNoteRect: A0,
popupMenu: Ast,
popdownMenu: Mst,
fixLifeLineHeights: oR,
sanitizeUrl: qi
};
let dt = {};
const Bt = {
data: {
startx: void 0,
stopx: void 0,
starty: void 0,
stopy: void 0
},
verticalPos: 0,
sequenceItems: [],
activations: [],
models: {
getHeight: function() {
return Math.max.apply(
null,
this.actors.length === 0 ? [0] : this.actors.map((t) => t.height || 0)
) + (this.loops.length === 0 ? 0 : this.loops.map((t) => t.height || 0).reduce((t, e) => t + e)) + (this.messages.length === 0 ? 0 : this.messages.map((t) => t.height || 0).reduce((t, e) => t + e)) + (this.notes.length === 0 ? 0 : this.notes.map((t) => t.height || 0).reduce((t, e) => t + e));
},
clear: function() {
this.actors = [], this.loops = [], this.messages = [], this.notes = [];
},
addActor: function(t) {
this.actors.push(t);
},
addLoop: function(t) {
this.loops.push(t);
},
addMessage: function(t) {
this.messages.push(t);
},
addNote: function(t) {
this.notes.push(t);
},
lastActor: function() {
return this.actors[this.actors.length - 1];
},
lastLoop: function() {
return this.loops[this.loops.length - 1];
},
lastMessage: function() {
return this.messages[this.messages.length - 1];
},
lastNote: function() {
return this.notes[this.notes.length - 1];
},
actors: [],
loops: [],
messages: [],
notes: []
},
init: function() {
this.sequenceItems = [], this.activations = [], this.models.clear(), this.data = {
startx: void 0,
stopx: void 0,
starty: void 0,
stopy: void 0
}, this.verticalPos = 0, uR(nt());
},
updateVal: function(t, e, r, n) {
typeof t[e] > "u" ? t[e] = r : t[e] = n(r, t[e]);
},
updateBounds: function(t, e, r, n) {
const i = this;
let a = 0;
function s(o) {
return function(u) {
a++;
const h = i.sequenceItems.length - a + 1;
i.updateVal(u, "starty", e - h * dt.boxMargin, Math.min), i.updateVal(u, "stopy", n + h * dt.boxMargin, Math.max), i.updateVal(Bt.data, "startx", t - h * dt.boxMargin, Math.min), i.updateVal(Bt.data, "stopx", r + h * dt.boxMargin, Math.max), o !== "activation" && (i.updateVal(u, "startx", t - h * dt.boxMargin, Math.min), i.updateVal(u, "stopx", r + h * dt.boxMargin, Math.max), i.updateVal(Bt.data, "starty", e - h * dt.boxMargin, Math.min), i.updateVal(Bt.data, "stopy", n + h * dt.boxMargin, Math.max));
};
}
this.sequenceItems.forEach(s()), this.activations.forEach(s("activation"));
},
insert: function(t, e, r, n) {
const i = Math.min(t, r), a = Math.max(t, r), s = Math.min(e, n), o = Math.max(e, n);
this.updateVal(Bt.data, "startx", i, Math.min), this.updateVal(Bt.data, "starty", s, Math.min), this.updateVal(Bt.data, "stopx", a, Math.max), this.updateVal(Bt.data, "stopy", o, Math.max), this.updateBounds(i, s, a, o);
},
newActivation: function(t, e, r) {
const n = r[t.from.actor], i = M0(t.from.actor).length || 0, a = n.x + n.width / 2 + (i - 1) * dt.activationWidth / 2;
this.activations.push({
startx: a,
starty: this.verticalPos + 2,
stopx: a + dt.activationWidth,
stopy: void 0,
actor: t.from.actor,
anchored: er.anchorElement(e)
});
},
endActivation: function(t) {
const e = this.activations.map(function(r) {
return r.actor;
}).lastIndexOf(t.from.actor);
return this.activations.splice(e, 1)[0];
},
createLoop: function(t = { message: void 0, wrap: !1, width: void 0 }, e) {
return {
startx: void 0,
starty: this.verticalPos,
stopx: void 0,
stopy: void 0,
title: t.message,
wrap: t.wrap,
width: t.width,
height: 0,
fill: e
};
},
newLoop: function(t = { message: void 0, wrap: !1, width: void 0 }, e) {
this.sequenceItems.push(this.createLoop(t, e));
},
endLoop: function() {
return this.sequenceItems.pop();
},
addSectionToLoop: function(t) {
const e = this.sequenceItems.pop();
e.sections = e.sections || [], e.sectionTitles = e.sectionTitles || [], e.sections.push({ y: Bt.getVerticalPos(), height: 0 }), e.sectionTitles.push(t), this.sequenceItems.push(e);
},
bumpVerticalPos: function(t) {
this.verticalPos = this.verticalPos + t, this.data.stopy = this.verticalPos;
},
getVerticalPos: function() {
return this.verticalPos;
},
getBounds: function() {
return { bounds: this.data, models: this.models };
}
}, jst = function(t, e) {
Bt.bumpVerticalPos(dt.boxMargin), e.height = dt.boxMargin, e.starty = Bt.getVerticalPos();
const r = er.getNoteRect();
r.x = e.startx, r.y = e.starty, r.width = e.width || dt.width, r.class = "note";
const n = t.append("g"), i = er.drawRect(n, r), a = er.getTextObj();
a.x = e.startx, a.y = e.starty, a.width = r.width, a.dy = "1em", a.text = e.message, a.class = "noteText", a.fontFamily = dt.noteFontFamily, a.fontSize = dt.noteFontSize, a.fontWeight = dt.noteFontWeight, a.anchor = dt.noteAlign, a.textMargin = dt.noteMargin, a.valign = "center";
const s = el(n, a), o = Math.round(
s.map((l) => (l._groups || l)[0][0].getBBox().height).reduce((l, u) => l + u)
);
i.attr("height", o + 2 * dt.noteMargin), e.height += o + 2 * dt.noteMargin, Bt.bumpVerticalPos(o + 2 * dt.noteMargin), e.stopy = e.starty + o + 2 * dt.noteMargin, e.stopx = e.startx + r.width, Bt.insert(e.startx, e.starty, e.stopx, e.stopy), Bt.models.addNote(e);
}, rl = (t) => ({
fontFamily: t.messageFontFamily,
fontSize: t.messageFontSize,
fontWeight: t.messageFontWeight
}), mo = (t) => ({
fontFamily: t.noteFontFamily,
fontSize: t.noteFontSize,
fontWeight: t.noteFontWeight
}), Wb = (t) => ({
fontFamily: t.actorFontFamily,
fontSize: t.actorFontSize,
fontWeight: t.actorFontWeight
}), $st = function(t, e) {
Bt.bumpVerticalPos(10);
const { startx: r, stopx: n, message: i } = e, a = pe.splitBreaks(i).length, s = Re.calculateTextDimensions(i, rl(dt)), o = s.height / a;
e.height += o, Bt.bumpVerticalPos(o);
let l, u = s.height - 10;
const h = s.width;
if (r === n) {
l = Bt.getVerticalPos() + u, dt.rightAngles || (u += dt.boxMargin, l = Bt.getVerticalPos() + u), u += 30;
const d = Math.max(h / 2, dt.width / 2);
Bt.insert(
r - d,
Bt.getVerticalPos() - 10 + u,
n + d,
Bt.getVerticalPos() + 30 + u
);
} else
u += dt.boxMargin, l = Bt.getVerticalPos() + u, Bt.insert(r, l - 10, n, l);
return Bt.bumpVerticalPos(u), e.height += u, e.stopy = e.starty + e.height, Bt.insert(e.fromBounds, e.starty, e.toBounds, e.stopy), l;
}, Xst = function(t, e, r, n) {
const { startx: i, stopx: a, starty: s, message: o, type: l, sequenceIndex: u, sequenceVisible: h } = e, d = Re.calculateTextDimensions(o, rl(dt)), f = er.getTextObj();
f.x = i, f.y = s + 10, f.width = a - i, f.class = "messageText", f.dy = "1em", f.text = o, f.fontFamily = dt.messageFontFamily, f.fontSize = dt.messageFontSize, f.fontWeight = dt.messageFontWeight, f.anchor = dt.messageAlign, f.valign = "center", f.textMargin = dt.wrapPadding, f.tspan = !1, el(t, f);
const p = d.width;
let m;
i === a ? dt.rightAngles ? m = t.append("path").attr(
"d",
`M ${i},${r} H ${i + Math.max(dt.width / 2, p / 2)} V ${r + 25} H ${i}`
) : m = t.append("path").attr(
"d",
"M " + i + "," + r + " C " + (i + 60) + "," + (r - 10) + " " + (i + 60) + "," + (r + 30) + " " + i + "," + (r + 20)
) : (m = t.append("line"), m.attr("x1", i), m.attr("y1", r), m.attr("x2", a), m.attr("y2", r)), l === n.db.LINETYPE.DOTTED || l === n.db.LINETYPE.DOTTED_CROSS || l === n.db.LINETYPE.DOTTED_POINT || l === n.db.LINETYPE.DOTTED_OPEN ? (m.style("stroke-dasharray", "3, 3"), m.attr("class", "messageLine1")) : m.attr("class", "messageLine0");
let _ = "";
dt.arrowMarkerAbsolute && (_ = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, _ = _.replace(/\(/g, "\\("), _ = _.replace(/\)/g, "\\)")), m.attr("stroke-width", 2), m.attr("stroke", "none"), m.style("fill", "none"), (l === n.db.LINETYPE.SOLID || l === n.db.LINETYPE.DOTTED) && m.attr("marker-end", "url(" + _ + "#arrowhead)"), (l === n.db.LINETYPE.SOLID_POINT || l === n.db.LINETYPE.DOTTED_POINT) && m.attr("marker-end", "url(" + _ + "#filled-head)"), (l === n.db.LINETYPE.SOLID_CROSS || l === n.db.LINETYPE.DOTTED_CROSS) && m.attr("marker-end", "url(" + _ + "#crosshead)"), (h || dt.showSequenceNumbers) && (m.attr("marker-start", "url(" + _ + "#sequencenumber)"), t.append("text").attr("x", i).attr("y", r + 4).attr("font-family", "sans-serif").attr("font-size", "12px").attr("text-anchor", "middle").attr("class", "sequenceNumber").text(u));
}, Hb = function(t, e, r, n, i, a) {
if (i.hideUnusedParticipants === !0) {
const u = /* @__PURE__ */ new Set();
a.forEach((h) => {
u.add(h.from), u.add(h.to);
}), r = r.filter((h) => u.has(h));
}
let s = 0, o = 0, l = 0;
for (let u = 0; u < r.length; u++) {
const h = e[r[u]];
h.width = h.width || dt.width, h.height = Math.max(h.height || dt.height, dt.height), h.margin = h.margin || dt.actorMargin, h.x = s + o, h.y = n;
const d = er.drawActor(t, h, dt);
l = Math.max(l, d), Bt.insert(h.x, n, h.x + h.width, h.height), s += h.width, o += h.margin, Bt.models.addActor(h);
}
Bt.bumpVerticalPos(l);
}, cR = function(t, e, r, n) {
let i = 0, a = 0;
for (let s = 0; s < r.length; s++) {
const o = e[r[s]], l = Qst(o), u = er.drawPopup(
t,
o,
l,
dt,
dt.forceMenus,
n
);
u.height > i && (i = u.height), u.width + o.x > a && (a = u.width + o.x);
}
return { maxHeight: i, maxWidth: a };
}, uR = function(t) {
mr(dt, t), t.fontFamily && (dt.actorFontFamily = dt.noteFontFamily = dt.messageFontFamily = t.fontFamily), t.fontSize && (dt.actorFontSize = dt.noteFontSize = dt.messageFontSize = t.fontSize), t.fontWeight && (dt.actorFontWeight = dt.noteFontWeight = dt.messageFontWeight = t.fontWeight);
}, M0 = function(t) {
return Bt.activations.filter(function(e) {
return e.actor === t;
});
}, Sw = function(t, e) {
const r = e[t], n = M0(t), i = n.reduce(function(s, o) {
return Math.min(s, o.startx);
}, r.x + r.width / 2), a = n.reduce(function(s, o) {
return Math.max(s, o.stopx);
}, r.x + r.width / 2);
return [i, a];
};
function xi(t, e, r, n, i) {
Bt.bumpVerticalPos(r);
let a = n;
if (e.id && e.message && t[e.id]) {
const s = t[e.id].width, o = rl(dt);
e.message = Re.wrapLabel(`[${e.message}]`, s - 2 * dt.wrapPadding, o), e.width = s, e.wrap = !0;
const l = Re.calculateTextDimensions(e.message, o), u = Math.max(l.height, dt.labelBoxHeight);
a = n + u, H.debug(`${u} - ${e.message}`);
}
i(e), Bt.bumpVerticalPos(a);
}
const Kst = function(t, e, r, n) {
const { securityLevel: i, sequence: a } = nt();
dt = a;
let s;
i === "sandbox" && (s = St("#i" + e));
const o = St(i === "sandbox" ? s.nodes()[0].contentDocument.body : "body"), l = i === "sandbox" ? s.nodes()[0].contentDocument : document;
Bt.init(), H.debug(n.db);
const u = i === "sandbox" ? o.select(`[id="${e}"]`) : St(`[id="${e}"]`), h = n.db.getActors(), d = n.db.getActorKeys(), f = n.db.getMessages(), p = n.db.getDiagramTitle(), m = Zst(h, f, n);
dt.height = Jst(h, m), er.insertComputerIcon(u), er.insertDatabaseIcon(u), er.insertClockIcon(u), Hb(u, h, d, 0, dt, f);
const _ = rot(f, h, m, n);
er.insertArrowHead(u), er.insertArrowCrossHead(u), er.insertArrowFilledHead(u), er.insertSequenceNumber(u);
function y(B, w) {
const D = Bt.endActivation(B);
D.starty + 18 > w && (D.starty = w - 6, w += 12), er.drawActivation(
u,
D,
w,
dt,
M0(B.from.actor).length
), Bt.insert(D.startx, w - 10, D.stopx, w);
}
let b = 1, x = 1;
const k = [];
f.forEach(function(B) {
let w, D, N;
switch (B.type) {
case n.db.LINETYPE.NOTE:
D = B.noteModel, jst(u, D);
break;
case n.db.LINETYPE.ACTIVE_START:
Bt.newActivation(B, u, h);
break;
case n.db.LINETYPE.ACTIVE_END:
y(B, Bt.getVerticalPos());
break;
case n.db.LINETYPE.LOOP_START:
xi(
_,
B,
dt.boxMargin,
dt.boxMargin + dt.boxTextMargin,
(z) => Bt.newLoop(z)
);
break;
case n.db.LINETYPE.LOOP_END:
w = Bt.endLoop(), er.drawLoop(u, w, "loop", dt), Bt.bumpVerticalPos(w.stopy - Bt.getVerticalPos()), Bt.models.addLoop(w);
break;
case n.db.LINETYPE.RECT_START:
xi(
_,
B,
dt.boxMargin,
dt.boxMargin,
(z) => Bt.newLoop(void 0, z.message)
);
break;
case n.db.LINETYPE.RECT_END:
w = Bt.endLoop(), er.drawBackgroundRect(u, w), Bt.models.addLoop(w), Bt.bumpVerticalPos(w.stopy - Bt.getVerticalPos());
break;
case n.db.LINETYPE.OPT_START:
xi(
_,
B,
dt.boxMargin,
dt.boxMargin + dt.boxTextMargin,
(z) => Bt.newLoop(z)
);
break;
case n.db.LINETYPE.OPT_END:
w = Bt.endLoop(), er.drawLoop(u, w, "opt", dt), Bt.bumpVerticalPos(w.stopy - Bt.getVerticalPos()), Bt.models.addLoop(w);
break;
case n.db.LINETYPE.ALT_START:
xi(
_,
B,
dt.boxMargin,
dt.boxMargin + dt.boxTextMargin,
(z) => Bt.newLoop(z)
);
break;
case n.db.LINETYPE.ALT_ELSE:
xi(
_,
B,
dt.boxMargin + dt.boxTextMargin,
dt.boxMargin,
(z) => Bt.addSectionToLoop(z)
);
break;
case n.db.LINETYPE.ALT_END:
w = Bt.endLoop(), er.drawLoop(u, w, "alt", dt), Bt.bumpVerticalPos(w.stopy - Bt.getVerticalPos()), Bt.models.addLoop(w);
break;
case n.db.LINETYPE.PAR_START:
xi(
_,
B,
dt.boxMargin,
dt.boxMargin + dt.boxTextMargin,
(z) => Bt.newLoop(z)
);
break;
case n.db.LINETYPE.PAR_AND:
xi(
_,
B,
dt.boxMargin + dt.boxTextMargin,
dt.boxMargin,
(z) => Bt.addSectionToLoop(z)
);
break;
case n.db.LINETYPE.PAR_END:
w = Bt.endLoop(), er.drawLoop(u, w, "par", dt), Bt.bumpVerticalPos(w.stopy - Bt.getVerticalPos()), Bt.models.addLoop(w);
break;
case n.db.LINETYPE.AUTONUMBER:
b = B.message.start || b, x = B.message.step || x, B.message.visible ? n.db.enableSequenceNumbers() : n.db.disableSequenceNumbers();
break;
case n.db.LINETYPE.CRITICAL_START:
xi(
_,
B,
dt.boxMargin,
dt.boxMargin + dt.boxTextMargin,
(z) => Bt.newLoop(z)
);
break;
case n.db.LINETYPE.CRITICAL_OPTION:
xi(
_,
B,
dt.boxMargin + dt.boxTextMargin,
dt.boxMargin,
(z) => Bt.addSectionToLoop(z)
);
break;
case n.db.LINETYPE.CRITICAL_END:
w = Bt.endLoop(), er.drawLoop(u, w, "critical", dt), Bt.bumpVerticalPos(w.stopy - Bt.getVerticalPos()), Bt.models.addLoop(w);
break;
case n.db.LINETYPE.BREAK_START:
xi(
_,
B,
dt.boxMargin,
dt.boxMargin + dt.boxTextMargin,
(z) => Bt.newLoop(z)
);
break;
case n.db.LINETYPE.BREAK_END:
w = Bt.endLoop(), er.drawLoop(u, w, "break", dt), Bt.bumpVerticalPos(w.stopy - Bt.getVerticalPos()), Bt.models.addLoop(w);
break;
default:
try {
N = B.msgModel, N.starty = Bt.getVerticalPos(), N.sequenceIndex = b, N.sequenceVisible = n.db.showSequenceNumbers();
const z = $st(u, N);
k.push({ messageModel: N, lineStarty: z }), Bt.models.addMessage(N);
} catch (z) {
H.error("error while drawing message", z);
}
}
[
n.db.LINETYPE.SOLID_OPEN,
n.db.LINETYPE.DOTTED_OPEN,
n.db.LINETYPE.SOLID,
n.db.LINETYPE.DOTTED,
n.db.LINETYPE.SOLID_CROSS,
n.db.LINETYPE.DOTTED_CROSS,
n.db.LINETYPE.SOLID_POINT,
n.db.LINETYPE.DOTTED_POINT
].includes(B.type) && (b = b + x);
}), k.forEach((B) => Xst(u, B.messageModel, B.lineStarty, n)), dt.mirrorActors && (Bt.bumpVerticalPos(dt.boxMargin * 2), Hb(u, h, d, Bt.getVerticalPos(), dt, f), Bt.bumpVerticalPos(dt.boxMargin), oR(u, Bt.getVerticalPos()));
const T = cR(u, h, d, l), { bounds: C } = Bt.getBounds();
H.debug("For line height fix Querying: #" + e + " .actor-line"), p1("#" + e + " .actor-line").attr("y2", C.stopy);
let S = C.stopy - C.starty;
S < T.maxHeight && (S = T.maxHeight);
let R = S + 2 * dt.diagramMarginY;
dt.mirrorActors && (R = R - dt.boxMargin + dt.bottomMarginAdj);
let A = C.stopx - C.startx;
A < T.maxWidth && (A = T.maxWidth);
const L = A + 2 * dt.diagramMarginX;
p && u.append("text").text(p).attr("x", (C.stopx - C.startx) / 2 - 2 * dt.diagramMarginX).attr("y", -25), di(u, R, L, dt.useMaxWidth);
const v = p ? 40 : 0;
u.attr(
"viewBox",
C.startx - dt.diagramMarginX + " -" + (dt.diagramMarginY + v) + " " + L + " " + (R + v)
), vn(n.db, u, e), H.debug("models:", Bt.models);
}, Zst = function(t, e, r) {
const n = {};
return e.forEach(function(i) {
if (t[i.to] && t[i.from]) {
const a = t[i.to];
if (i.placement === r.db.PLACEMENT.LEFTOF && !a.prevActor || i.placement === r.db.PLACEMENT.RIGHTOF && !a.nextActor)
return;
const s = i.placement !== void 0, o = !s, l = s ? mo(dt) : rl(dt), u = i.wrap ? Re.wrapLabel(i.message, dt.width - 2 * dt.wrapPadding, l) : i.message, d = Re.calculateTextDimensions(u, l).width + 2 * dt.wrapPadding;
o && i.from === a.nextActor ? n[i.to] = Math.max(
n[i.to] || 0,
d
) : o && i.from === a.prevActor ? n[i.from] = Math.max(
n[i.from] || 0,
d
) : o && i.from === i.to ? (n[i.from] = Math.max(
n[i.from] || 0,
d / 2
), n[i.to] = Math.max(
n[i.to] || 0,
d / 2
)) : i.placement === r.db.PLACEMENT.RIGHTOF ? n[i.from] = Math.max(
n[i.from] || 0,
d
) : i.placement === r.db.PLACEMENT.LEFTOF ? n[a.prevActor] = Math.max(
n[a.prevActor] || 0,
d
) : i.placement === r.db.PLACEMENT.OVER && (a.prevActor && (n[a.prevActor] = Math.max(
n[a.prevActor] || 0,
d / 2
)), a.nextActor && (n[i.from] = Math.max(
n[i.from] || 0,
d / 2
)));
}
}), H.debug("maxMessageWidthPerActor:", n), n;
}, Qst = function(t) {
let e = 0;
const r = Wb(dt);
for (const n in t.links) {
const a = Re.calculateTextDimensions(n, r).width + 2 * dt.wrapPadding + 2 * dt.boxMargin;
e < a && (e = a);
}
return e;
}, Jst = function(t, e) {
let r = 0;
Object.keys(t).forEach((n) => {
const i = t[n];
i.wrap && (i.description = Re.wrapLabel(
i.description,
dt.width - 2 * dt.wrapPadding,
Wb(dt)
));
const a = Re.calculateTextDimensions(i.description, Wb(dt));
i.width = i.wrap ? dt.width : Math.max(dt.width, a.width + 2 * dt.wrapPadding), i.height = i.wrap ? Math.max(a.height, dt.height) : dt.height, r = Math.max(r, i.height);
});
for (const n in e) {
const i = t[n];
if (!i)
continue;
const a = t[i.nextActor];
if (!a)
continue;
const o = e[n] + dt.actorMargin - i.width / 2 - a.width / 2;
i.margin = Math.max(o, dt.actorMargin);
}
return Math.max(r, dt.height);
}, tot = function(t, e, r) {
const n = e[t.from].x, i = e[t.to].x, a = t.wrap && t.message;
let s = Re.calculateTextDimensions(
a ? Re.wrapLabel(t.message, dt.width, mo(dt)) : t.message,
mo(dt)
);
const o = {
width: a ? dt.width : Math.max(dt.width, s.width + 2 * dt.noteMargin),
height: 0,
startx: e[t.from].x,
stopx: 0,
starty: 0,
stopy: 0,
message: t.message
};
return t.placement === r.db.PLACEMENT.RIGHTOF ? (o.width = a ? Math.max(dt.width, s.width) : Math.max(
e[t.from].width / 2 + e[t.to].width / 2,
s.width + 2 * dt.noteMargin
), o.startx = n + (e[t.from].width + dt.actorMargin) / 2) : t.placement === r.db.PLACEMENT.LEFTOF ? (o.width = Math.max(a ? dt.width : e[t.from].width / 2 + e[t.to].width / 2, s.width + 2 * dt.noteMargin), o.startx = n - o.width + (e[t.from].width - dt.actorMargin) / 2) : t.to === t.from ? (s = Re.calculateTextDimensions(
a ? Re.wrapLabel(t.message, Math.max(dt.width, e[t.from].width), mo(dt)) : t.message,
mo(dt)
), o.width = a ? Math.max(dt.width, e[t.from].width) : Math.max(e[t.from].width, dt.width, s.width + 2 * dt.noteMargin), o.startx = n + (e[t.from].width - o.width) / 2) : (o.width = Math.abs(n + e[t.from].width / 2 - (i + e[t.to].width / 2)) + dt.actorMargin, o.startx = n < i ? n + e[t.from].width / 2 - dt.actorMargin / 2 : i + e[t.to].width / 2 - dt.actorMargin / 2), a && (o.message = Re.wrapLabel(
t.message,
o.width - 2 * dt.wrapPadding,
mo(dt)
)), H.debug(
`NM:[${o.startx},${o.stopx},${o.starty},${o.stopy}:${o.width},${o.height}=${t.message}]`
), o;
}, eot = function(t, e, r) {
let n = !1;
if ([
r.db.LINETYPE.SOLID_OPEN,
r.db.LINETYPE.DOTTED_OPEN,
r.db.LINETYPE.SOLID,
r.db.LINETYPE.DOTTED,
r.db.LINETYPE.SOLID_CROSS,
r.db.LINETYPE.DOTTED_CROSS,
r.db.LINETYPE.SOLID_POINT,
r.db.LINETYPE.DOTTED_POINT
].includes(t.type) && (n = !0), !n)
return {};
const i = Sw(t.from, e), a = Sw(t.to, e), s = i[0] <= a[0] ? 1 : 0, o = i[0] < a[0] ? 0 : 1, l = i.concat(a), u = Math.abs(a[o] - i[s]);
t.wrap && t.message && (t.message = Re.wrapLabel(
t.message,
Math.max(u + 2 * dt.wrapPadding, dt.width),
rl(dt)
));
const h = Re.calculateTextDimensions(t.message, rl(dt));
return {
width: Math.max(
t.wrap ? 0 : h.width + 2 * dt.wrapPadding,
u + 2 * dt.wrapPadding,
dt.width
),
height: 0,
startx: i[s],
stopx: a[o],
starty: 0,
stopy: 0,
message: t.message,
type: t.type,
wrap: t.wrap,
fromBounds: Math.min.apply(null, l),
toBounds: Math.max.apply(null, l)
};
}, rot = function(t, e, r, n) {
const i = {}, a = [];
let s, o, l;
return t.forEach(function(u) {
switch (u.id = Re.random({ length: 10 }), u.type) {
case n.db.LINETYPE.LOOP_START:
case n.db.LINETYPE.ALT_START:
case n.db.LINETYPE.OPT_START:
case n.db.LINETYPE.PAR_START:
case n.db.LINETYPE.CRITICAL_START:
case n.db.LINETYPE.BREAK_START:
a.push({
id: u.id,
msg: u.message,
from: Number.MAX_SAFE_INTEGER,
to: Number.MIN_SAFE_INTEGER,
width: 0
});
break;
case n.db.LINETYPE.ALT_ELSE:
case n.db.LINETYPE.PAR_AND:
case n.db.LINETYPE.CRITICAL_OPTION:
u.message && (s = a.pop(), i[s.id] = s, i[u.id] = s, a.push(s));
break;
case n.db.LINETYPE.LOOP_END:
case n.db.LINETYPE.ALT_END:
case n.db.LINETYPE.OPT_END:
case n.db.LINETYPE.PAR_END:
case n.db.LINETYPE.CRITICAL_END:
case n.db.LINETYPE.BREAK_END:
s = a.pop(), i[s.id] = s;
break;
case n.db.LINETYPE.ACTIVE_START:
{
const d = e[u.from ? u.from.actor : u.to.actor], f = M0(u.from ? u.from.actor : u.to.actor).length, p = d.x + d.width / 2 + (f - 1) * dt.activationWidth / 2, m = {
startx: p,
stopx: p + dt.activationWidth,
actor: u.from.actor,
enabled: !0
};
Bt.activations.push(m);
}
break;
case n.db.LINETYPE.ACTIVE_END:
{
const d = Bt.activations.map((f) => f.actor).lastIndexOf(u.from.actor);
delete Bt.activations.splice(d, 1)[0];
}
break;
}
u.placement !== void 0 ? (o = tot(u, e, n), u.noteModel = o, a.forEach((d) => {
s = d, s.from = Math.min(s.from, o.startx), s.to = Math.max(s.to, o.startx + o.width), s.width = Math.max(s.width, Math.abs(s.from - s.to)) - dt.labelBoxWidth;
})) : (l = eot(u, e, n), u.msgModel = l, l.startx && l.stopx && a.length > 0 && a.forEach((d) => {
if (s = d, l.startx === l.stopx) {
const f = e[u.from], p = e[u.to];
s.from = Math.min(
f.x - l.width / 2,
f.x - f.width / 2,
s.from
), s.to = Math.max(p.x + l.width / 2, p.x + f.width / 2, s.to), s.width = Math.max(s.width, Math.abs(s.to - s.from)) - dt.labelBoxWidth;
} else
s.from = Math.min(l.startx, s.from), s.to = Math.max(l.stopx, s.to), s.width = Math.max(s.width, l.width) - dt.labelBoxWidth;
}));
}), Bt.activations = [], H.debug("Loop type widths:", i), i;
}, Aw = {
bounds: Bt,
drawActors: Hb,
drawActorsPopup: cR,
setConf: uR,
draw: Kst
};
var i1 = function() {
var t = function(ct, J, Y, $) {
for (Y = Y || {}, $ = ct.length; $--; Y[ct[$]] = J)
;
return Y;
}, e = [1, 2], r = [1, 3], n = [1, 5], i = [1, 7], a = [2, 5], s = [1, 15], o = [1, 17], l = [1, 19], u = [1, 20], h = [1, 21], d = [1, 22], f = [1, 33], p = [1, 23], m = [1, 24], _ = [1, 25], y = [1, 26], b = [1, 27], x = [1, 30], k = [1, 31], T = [1, 32], C = [1, 35], M = [1, 36], S = [1, 37], R = [1, 38], A = [1, 34], L = [1, 41], v = [1, 4, 5, 14, 15, 17, 19, 20, 22, 23, 24, 25, 26, 27, 31, 33, 35, 41, 42, 43, 44, 47, 50], B = [1, 4, 5, 12, 13, 14, 15, 17, 19, 20, 22, 23, 24, 25, 26, 27, 31, 33, 35, 41, 42, 43, 44, 47, 50], w = [1, 4, 5, 7, 14, 15, 17, 19, 20, 22, 23, 24, 25, 26, 27, 31, 33, 35, 41, 42, 43, 44, 47, 50], D = [4, 5, 14, 15, 17, 19, 20, 22, 23, 24, 25, 26, 27, 31, 33, 35, 41, 42, 43, 44, 47, 50], N = {
trace: function() {
},
yy: {},
symbols_: { error: 2, start: 3, SPACE: 4, NL: 5, directive: 6, SD: 7, document: 8, line: 9, statement: 10, idStatement: 11, DESCR: 12, "-->": 13, HIDE_EMPTY: 14, scale: 15, WIDTH: 16, COMPOSIT_STATE: 17, STRUCT_START: 18, STRUCT_STOP: 19, STATE_DESCR: 20, AS: 21, ID: 22, FORK: 23, JOIN: 24, CHOICE: 25, CONCURRENT: 26, note: 27, notePosition: 28, NOTE_TEXT: 29, direction: 30, acc_title: 31, acc_title_value: 32, acc_descr: 33, acc_descr_value: 34, acc_descr_multiline_value: 35, openDirective: 36, typeDirective: 37, closeDirective: 38, ":": 39, argDirective: 40, direction_tb: 41, direction_bt: 42, direction_rl: 43, direction_lr: 44, eol: 45, ";": 46, EDGE_STATE: 47, left_of: 48, right_of: 49, open_directive: 50, type_directive: 51, arg_directive: 52, close_directive: 53, $accept: 0, $end: 1 },
terminals_: { 2: "error", 4: "SPACE", 5: "NL", 7: "SD", 12: "DESCR", 13: "-->", 14: "HIDE_EMPTY", 15: "scale", 16: "WIDTH", 17: "COMPOSIT_STATE", 18: "STRUCT_START", 19: "STRUCT_STOP", 20: "STATE_DESCR", 21: "AS", 22: "ID", 23: "FORK", 24: "JOIN", 25: "CHOICE", 26: "CONCURRENT", 27: "note", 29: "NOTE_TEXT", 31: "acc_title", 32: "acc_title_value", 33: "acc_descr", 34: "acc_descr_value", 35: "acc_descr_multiline_value", 39: ":", 41: "direction_tb", 42: "direction_bt", 43: "direction_rl", 44: "direction_lr", 46: ";", 47: "EDGE_STATE", 48: "left_of", 49: "right_of", 50: "open_directive", 51: "type_directive", 52: "arg_directive", 53: "close_directive" },
productions_: [0, [3, 2], [3, 2], [3, 2], [3, 2], [8, 0], [8, 2], [9, 2], [9, 1], [9, 1], [10, 1], [10, 2], [10, 3], [10, 4], [10, 1], [10, 2], [10, 1], [10, 4], [10, 3], [10, 6], [10, 1], [10, 1], [10, 1], [10, 1], [10, 4], [10, 4], [10, 1], [10, 1], [10, 2], [10, 2], [10, 1], [6, 3], [6, 5], [30, 1], [30, 1], [30, 1], [30, 1], [45, 1], [45, 1], [11, 1], [11, 1], [28, 1], [28, 1], [36, 1], [37, 1], [40, 1], [38, 1]],
performAction: function(J, Y, $, lt, ut, W, tt) {
var K = W.length - 1;
switch (ut) {
case 4:
return lt.setRootDoc(W[K]), W[K];
case 5:
this.$ = [];
break;
case 6:
W[K] != "nl" && (W[K - 1].push(W[K]), this.$ = W[K - 1]);
break;
case 7:
case 8:
this.$ = W[K];
break;
case 9:
this.$ = "nl";
break;
case 10:
this.$ = { stmt: "state", id: W[K], type: "default", description: "" };
break;
case 11:
this.$ = { stmt: "state", id: W[K - 1], type: "default", description: lt.trimColon(W[K]) };
break;
case 12:
this.$ = { stmt: "relation", state1: { stmt: "state", id: W[K - 2], type: "default", description: "" }, state2: { stmt: "state", id: W[K], type: "default", description: "" } };
break;
case 13:
this.$ = { stmt: "relation", state1: { stmt: "state", id: W[K - 3], type: "default", description: "" }, state2: { stmt: "state", id: W[K - 1], type: "default", description: "" }, description: W[K].substr(1).trim() };
break;
case 17:
this.$ = { stmt: "state", id: W[K - 3], type: "default", description: "", doc: W[K - 1] };
break;
case 18:
var it = W[K], Z = W[K - 2].trim();
if (W[K].match(":")) {
var V = W[K].split(":");
it = V[0], Z = [Z, V[1]];
}
this.$ = { stmt: "state", id: it, type: "default", description: Z };
break;
case 19:
this.$ = { stmt: "state", id: W[K - 3], type: "default", description: W[K - 5], doc: W[K - 1] };
break;
case 20:
this.$ = { stmt: "state", id: W[K], type: "fork" };
break;
case 21:
this.$ = { stmt: "state", id: W[K], type: "join" };
break;
case 22:
this.$ = { stmt: "state", id: W[K], type: "choice" };
break;
case 23:
this.$ = { stmt: "state", id: lt.getDividerId(), type: "divider" };
break;
case 24:
this.$ = { stmt: "state", id: W[K - 1].trim(), note: { position: W[K - 2].trim(), text: W[K].trim() } };
break;
case 28:
this.$ = W[K].trim(), lt.setAccTitle(this.$);
break;
case 29:
case 30:
this.$ = W[K].trim(), lt.setAccDescription(this.$);
break;
case 33:
lt.setDirection("TB"), this.$ = { stmt: "dir", value: "TB" };
break;
case 34:
lt.setDirection("BT"), this.$ = { stmt: "dir", value: "BT" };
break;
case 35:
lt.setDirection("RL"), this.$ = { stmt: "dir", value: "RL" };
break;
case 36:
lt.setDirection("LR"), this.$ = { stmt: "dir", value: "LR" };
break;
case 39:
case 40:
this.$ = W[K];
break;
case 43:
lt.parseDirective("%%{", "open_directive");
break;
case 44:
lt.parseDirective(W[K], "type_directive");
break;
case 45:
W[K] = W[K].trim().replace(/'/g, '"'), lt.parseDirective(W[K], "arg_directive");
break;
case 46:
lt.parseDirective("}%%", "close_directive", "state");
break;
}
},
table: [{ 3: 1, 4: e, 5: r, 6: 4, 7: n, 36: 6, 50: i }, { 1: [3] }, { 3: 8, 4: e, 5: r, 6: 4, 7: n, 36: 6, 50: i }, { 3: 9, 4: e, 5: r, 6: 4, 7: n, 36: 6, 50: i }, { 3: 10, 4: e, 5: r, 6: 4, 7: n, 36: 6, 50: i }, t([1, 4, 5, 14, 15, 17, 20, 22, 23, 24, 25, 26, 27, 31, 33, 35, 41, 42, 43, 44, 47, 50], a, { 8: 11 }), { 37: 12, 51: [1, 13] }, { 51: [2, 43] }, { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3] }, { 1: [2, 4], 4: s, 5: o, 6: 28, 9: 14, 10: 16, 11: 18, 14: l, 15: u, 17: h, 20: d, 22: f, 23: p, 24: m, 25: _, 26: y, 27: b, 30: 29, 31: x, 33: k, 35: T, 36: 6, 41: C, 42: M, 43: S, 44: R, 47: A, 50: i }, { 38: 39, 39: [1, 40], 53: L }, t([39, 53], [2, 44]), t(v, [2, 6]), { 6: 28, 10: 42, 11: 18, 14: l, 15: u, 17: h, 20: d, 22: f, 23: p, 24: m, 25: _, 26: y, 27: b, 30: 29, 31: x, 33: k, 35: T, 36: 6, 41: C, 42: M, 43: S, 44: R, 47: A, 50: i }, t(v, [2, 8]), t(v, [2, 9]), t(v, [2, 10], { 12: [1, 43], 13: [1, 44] }), t(v, [2, 14]), { 16: [1, 45] }, t(v, [2, 16], { 18: [1, 46] }), { 21: [1, 47] }, t(v, [2, 20]), t(v, [2, 21]), t(v, [2, 22]), t(v, [2, 23]), { 28: 48, 29: [1, 49], 48: [1, 50], 49: [1, 51] }, t(v, [2, 26]), t(v, [2, 27]), { 32: [1, 52] }, { 34: [1, 53] }, t(v, [2, 30]), t(B, [2, 39]), t(B, [2, 40]), t(v, [2, 33]), t(v, [2, 34]), t(v, [2, 35]), t(v, [2, 36]), t(w, [2, 31]), { 40: 54, 52: [1, 55] }, t(w, [2, 46]), t(v, [2, 7]), t(v, [2, 11]), { 11: 56, 22: f, 47: A }, t(v, [2, 15]), t(D, a, { 8: 57 }), { 22: [1, 58] }, { 22: [1, 59] }, { 21: [1, 60] }, { 22: [2, 41] }, { 22: [2, 42] }, t(v, [2, 28]), t(v, [2, 29]), { 38: 61, 53: L }, { 53: [2, 45] }, t(v, [2, 12], { 12: [1, 62] }), { 4: s, 5: o, 6: 28, 9: 14, 10: 16, 11: 18, 14: l, 15: u, 17: h, 19: [1, 63], 20: d, 22: f, 23: p, 24: m, 25: _, 26: y, 27: b, 30: 29, 31: x, 33: k, 35: T, 36: 6, 41: C, 42: M, 43: S, 44: R, 47: A, 50: i }, t(v, [2, 18], { 18: [1, 64] }), { 29: [1, 65] }, { 22: [1, 66] }, t(w, [2, 32]), t(v, [2, 13]), t(v, [2, 17]), t(D, a, { 8: 67 }), t(v, [2, 24]), t(v, [2, 25]), { 4: s, 5: o, 6: 28, 9: 14, 10: 16, 11: 18, 14: l, 15: u, 17: h, 19: [1, 68], 20: d, 22: f, 23: p, 24: m, 25: _, 26: y, 27: b, 30: 29, 31: x, 33: k, 35: T, 36: 6, 41: C, 42: M, 43: S, 44: R, 47: A, 50: i }, t(v, [2, 19])],
defaultActions: { 7: [2, 43], 8: [2, 1], 9: [2, 2], 10: [2, 3], 50: [2, 41], 51: [2, 42], 55: [2, 45] },
parseError: function(J, Y) {
if (Y.recoverable)
this.trace(J);
else {
var $ = new Error(J);
throw $.hash = Y, $;
}
},
parse: function(J) {
var Y = this, $ = [0], lt = [], ut = [null], W = [], tt = this.table, K = "", it = 0, Z = 0, V = 2, Q = 1, q = W.slice.call(arguments, 1), U = Object.create(this.lexer), F = { yy: {} };
for (var j in this.yy)
Object.prototype.hasOwnProperty.call(this.yy, j) && (F.yy[j] = this.yy[j]);
U.setInput(J, F.yy), F.yy.lexer = U, F.yy.parser = this, typeof U.yylloc > "u" && (U.yylloc = {});
var P = U.yylloc;
W.push(P);
var et = U.options && U.options.ranges;
typeof F.yy.parseError == "function" ? this.parseError = F.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
function at() {
var Dt;
return Dt = lt.pop() || U.lex() || Q, typeof Dt != "number" && (Dt instanceof Array && (lt = Dt, Dt = lt.pop()), Dt = Y.symbols_[Dt] || Dt), Dt;
}
for (var It, Lt, Rt, Ct, pt = {}, mt, _t, Tt, ft; ; ) {
if (Lt = $[$.length - 1], this.defaultActions[Lt] ? Rt = this.defaultActions[Lt] : ((It === null || typeof It > "u") && (It = at()), Rt = tt[Lt] && tt[Lt][It]), typeof Rt > "u" || !Rt.length || !Rt[0]) {
var le = "";
ft = [];
for (mt in tt[Lt])
this.terminals_[mt] && mt > V && ft.push("'" + this.terminals_[mt] + "'");
U.showPosition ? le = "Parse error on line " + (it + 1) + `:
` + U.showPosition() + `
Expecting ` + ft.join(", ") + ", got '" + (this.terminals_[It] || It) + "'" : le = "Parse error on line " + (it + 1) + ": Unexpected " + (It == Q ? "end of input" : "'" + (this.terminals_[It] || It) + "'"), this.parseError(le, {
text: U.match,
token: this.terminals_[It] || It,
line: U.yylineno,
loc: P,
expected: ft
});
}
if (Rt[0] instanceof Array && Rt.length > 1)
throw new Error("Parse Error: multiple actions possible at state: " + Lt + ", token: " + It);
switch (Rt[0]) {
case 1:
$.push(It), ut.push(U.yytext), W.push(U.yylloc), $.push(Rt[1]), It = null, Z = U.yyleng, K = U.yytext, it = U.yylineno, P = U.yylloc;
break;
case 2:
if (_t = this.productions_[Rt[1]][1], pt.$ = ut[ut.length - _t], pt._$ = {
first_line: W[W.length - (_t || 1)].first_line,
last_line: W[W.length - 1].last_line,
first_column: W[W.length - (_t || 1)].first_column,
last_column: W[W.length - 1].last_column
}, et && (pt._$.range = [
W[W.length - (_t || 1)].range[0],
W[W.length - 1].range[1]
]), Ct = this.performAction.apply(pt, [
K,
Z,
it,
F.yy,
Rt[1],
ut,
W
].concat(q)), typeof Ct < "u")
return Ct;
_t && ($ = $.slice(0, -1 * _t * 2), ut = ut.slice(0, -1 * _t), W = W.slice(0, -1 * _t)), $.push(this.productions_[Rt[1]][0]), ut.push(pt.$), W.push(pt._$), Tt = tt[$[$.length - 2]][$[$.length - 1]], $.push(Tt);
break;
case 3:
return !0;
}
}
return !0;
}
}, z = function() {
var ct = {
EOF: 1,
parseError: function(Y, $) {
if (this.yy.parser)
this.yy.parser.parseError(Y, $);
else
throw new Error(Y);
},
setInput: function(J, Y) {
return this.yy = Y || this.yy || {}, this._input = J, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
first_line: 1,
first_column: 0,
last_line: 1,
last_column: 0
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
},
input: function() {
var J = this._input[0];
this.yytext += J, this.yyleng++, this.offset++, this.match += J, this.matched += J;
var Y = J.match(/(?:\r\n?|\n).*/g);
return Y ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), J;
},
unput: function(J) {
var Y = J.length, $ = J.split(/(?:\r\n?|\n)/g);
this._input = J + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - Y), this.offset -= Y;
var lt = this.match.split(/(?:\r\n?|\n)/g);
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), $.length - 1 && (this.yylineno -= $.length - 1);
var ut = this.yylloc.range;
return this.yylloc = {
first_line: this.yylloc.first_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.first_column,
last_column: $ ? ($.length === lt.length ? this.yylloc.first_column : 0) + lt[lt.length - $.length].length - $[0].length : this.yylloc.first_column - Y
}, this.options.ranges && (this.yylloc.range = [ut[0], ut[0] + this.yyleng - Y]), this.yyleng = this.yytext.length, this;
},
more: function() {
return this._more = !0, this;
},
reject: function() {
if (this.options.backtrack_lexer)
this._backtrack = !0;
else
return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
return this;
},
less: function(J) {
this.unput(this.match.slice(J));
},
pastInput: function() {
var J = this.matched.substr(0, this.matched.length - this.match.length);
return (J.length > 20 ? "..." : "") + J.substr(-20).replace(/\n/g, "");
},
upcomingInput: function() {
var J = this.match;
return J.length < 20 && (J += this._input.substr(0, 20 - J.length)), (J.substr(0, 20) + (J.length > 20 ? "..." : "")).replace(/\n/g, "");
},
showPosition: function() {
var J = this.pastInput(), Y = new Array(J.length + 1).join("-");
return J + this.upcomingInput() + `
` + Y + "^";
},
test_match: function(J, Y) {
var $, lt, ut;
if (this.options.backtrack_lexer && (ut = {
yylineno: this.yylineno,
yylloc: {
first_line: this.yylloc.first_line,
last_line: this.last_line,
first_column: this.yylloc.first_column,
last_column: this.yylloc.last_column
},
yytext: this.yytext,
match: this.match,
matches: this.matches,
matched: this.matched,
yyleng: this.yyleng,
offset: this.offset,
_more: this._more,
_input: this._input,
yy: this.yy,
conditionStack: this.conditionStack.slice(0),
done: this.done
}, this.options.ranges && (ut.yylloc.range = this.yylloc.range.slice(0))), lt = J[0].match(/(?:\r\n?|\n).*/g), lt && (this.yylineno += lt.length), this.yylloc = {
first_line: this.yylloc.last_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.last_column,
last_column: lt ? lt[lt.length - 1].length - lt[lt.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + J[0].length
}, this.yytext += J[0], this.match += J[0], this.matches = J, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(J[0].length), this.matched += J[0], $ = this.performAction.call(this, this.yy, this, Y, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), $)
return $;
if (this._backtrack) {
for (var W in ut)
this[W] = ut[W];
return !1;
}
return !1;
},
next: function() {
if (this.done)
return this.EOF;
this._input || (this.done = !0);
var J, Y, $, lt;
this._more || (this.yytext = "", this.match = "");
for (var ut = this._currentRules(), W = 0; W < ut.length; W++)
if ($ = this._input.match(this.rules[ut[W]]), $ && (!Y || $[0].length > Y[0].length)) {
if (Y = $, lt = W, this.options.backtrack_lexer) {
if (J = this.test_match($, ut[W]), J !== !1)
return J;
if (this._backtrack) {
Y = !1;
continue;
} else
return !1;
} else if (!this.options.flex)
break;
}
return Y ? (J = this.test_match(Y, ut[lt]), J !== !1 ? J : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
},
lex: function() {
var Y = this.next();
return Y || this.lex();
},
begin: function(Y) {
this.conditionStack.push(Y);
},
popState: function() {
var Y = this.conditionStack.length - 1;
return Y > 0 ? this.conditionStack.pop() : this.conditionStack[0];
},
_currentRules: function() {
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
},
topState: function(Y) {
return Y = this.conditionStack.length - 1 - Math.abs(Y || 0), Y >= 0 ? this.conditionStack[Y] : "INITIAL";
},
pushState: function(Y) {
this.begin(Y);
},
stateStackSize: function() {
return this.conditionStack.length;
},
options: { "case-insensitive": !0 },
performAction: function(Y, $, lt, ut) {
switch (lt) {
case 0:
return 41;
case 1:
return 42;
case 2:
return 43;
case 3:
return 44;
case 4:
return this.begin("open_directive"), 50;
case 5:
return this.begin("type_directive"), 51;
case 6:
return this.popState(), this.begin("arg_directive"), 39;
case 7:
return this.popState(), this.popState(), 53;
case 8:
return 52;
case 9:
break;
case 10:
break;
case 11:
return 5;
case 12:
break;
case 13:
break;
case 14:
break;
case 15:
break;
case 16:
return this.pushState("SCALE"), 15;
case 17:
return 16;
case 18:
this.popState();
break;
case 19:
return this.begin("acc_title"), 31;
case 20:
return this.popState(), "acc_title_value";
case 21:
return this.begin("acc_descr"), 33;
case 22:
return this.popState(), "acc_descr_value";
case 23:
this.begin("acc_descr_multiline");
break;
case 24:
this.popState();
break;
case 25:
return "acc_descr_multiline_value";
case 26:
this.pushState("STATE");
break;
case 27:
return this.popState(), $.yytext = $.yytext.slice(0, -8).trim(), 23;
case 28:
return this.popState(), $.yytext = $.yytext.slice(0, -8).trim(), 24;
case 29:
return this.popState(), $.yytext = $.yytext.slice(0, -10).trim(), 25;
case 30:
return this.popState(), $.yytext = $.yytext.slice(0, -8).trim(), 23;
case 31:
return this.popState(), $.yytext = $.yytext.slice(0, -8).trim(), 24;
case 32:
return this.popState(), $.yytext = $.yytext.slice(0, -10).trim(), 25;
case 33:
return 41;
case 34:
return 42;
case 35:
return 43;
case 36:
return 44;
case 37:
this.begin("STATE_STRING");
break;
case 38:
return this.popState(), this.pushState("STATE_ID"), "AS";
case 39:
return this.popState(), "ID";
case 40:
this.popState();
break;
case 41:
return "STATE_DESCR";
case 42:
return 17;
case 43:
this.popState();
break;
case 44:
return this.popState(), this.pushState("struct"), 18;
case 45:
return this.popState(), 19;
case 46:
break;
case 47:
return this.begin("NOTE"), 27;
case 48:
return this.popState(), this.pushState("NOTE_ID"), 48;
case 49:
return this.popState(), this.pushState("NOTE_ID"), 49;
case 50:
this.popState(), this.pushState("FLOATING_NOTE");
break;
case 51:
return this.popState(), this.pushState("FLOATING_NOTE_ID"), "AS";
case 52:
break;
case 53:
return "NOTE_TEXT";
case 54:
return this.popState(), "ID";
case 55:
return this.popState(), this.pushState("NOTE_TEXT"), 22;
case 56:
return this.popState(), $.yytext = $.yytext.substr(2).trim(), 29;
case 57:
return this.popState(), $.yytext = $.yytext.slice(0, -8).trim(), 29;
case 58:
return 7;
case 59:
return 7;
case 60:
return 14;
case 61:
return 47;
case 62:
return 22;
case 63:
return $.yytext = $.yytext.trim(), 12;
case 64:
return 13;
case 65:
return 26;
case 66:
return 5;
case 67:
return "INVALID";
}
},
rules: [/^(?:.*direction\s+TB[^\n]*)/i, /^(?:.*direction\s+BT[^\n]*)/i, /^(?:.*direction\s+RL[^\n]*)/i, /^(?:.*direction\s+LR[^\n]*)/i, /^(?:%%\{)/i, /^(?:((?:(?!\}%%)[^:.])*))/i, /^(?::)/i, /^(?:\}%%)/i, /^(?:((?:(?!\}%%).|\n)*))/i, /^(?:%%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:[\s]+)/i, /^(?:((?!\n)\s)+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:scale\s+)/i, /^(?:\d+)/i, /^(?:\s+width\b)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:state\s+)/i, /^(?:.*<>)/i, /^(?:.*<>)/i, /^(?:.*<>)/i, /^(?:.*\[\[fork\]\])/i, /^(?:.*\[\[join\]\])/i, /^(?:.*\[\[choice\]\])/i, /^(?:.*direction\s+TB[^\n]*)/i, /^(?:.*direction\s+BT[^\n]*)/i, /^(?:.*direction\s+RL[^\n]*)/i, /^(?:.*direction\s+LR[^\n]*)/i, /^(?:["])/i, /^(?:\s*as\s+)/i, /^(?:[^\n\{]*)/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[^\n\s\{]+)/i, /^(?:\n)/i, /^(?:\{)/i, /^(?:\})/i, /^(?:[\n])/i, /^(?:note\s+)/i, /^(?:left of\b)/i, /^(?:right of\b)/i, /^(?:")/i, /^(?:\s*as\s*)/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[^\n]*)/i, /^(?:\s*[^:\n\s\-]+)/i, /^(?:\s*:[^:\n;]+)/i, /^(?:[\s\S]*?end note\b)/i, /^(?:stateDiagram\s+)/i, /^(?:stateDiagram-v2\s+)/i, /^(?:hide empty description\b)/i, /^(?:\[\*\])/i, /^(?:[^:\n\s\-\{]+)/i, /^(?:\s*:[^:\n;]+)/i, /^(?:-->)/i, /^(?:--)/i, /^(?:$)/i, /^(?:.)/i],
conditions: { LINE: { rules: [13, 14], inclusive: !1 }, close_directive: { rules: [13, 14], inclusive: !1 }, arg_directive: { rules: [7, 8, 13, 14], inclusive: !1 }, type_directive: { rules: [6, 7, 13, 14], inclusive: !1 }, open_directive: { rules: [5, 13, 14], inclusive: !1 }, struct: { rules: [13, 14, 26, 33, 34, 35, 36, 45, 46, 47, 61, 62, 63, 64, 65], inclusive: !1 }, FLOATING_NOTE_ID: { rules: [54], inclusive: !1 }, FLOATING_NOTE: { rules: [51, 52, 53], inclusive: !1 }, NOTE_TEXT: { rules: [56, 57], inclusive: !1 }, NOTE_ID: { rules: [55], inclusive: !1 }, NOTE: { rules: [48, 49, 50], inclusive: !1 }, acc_descr_multiline: { rules: [24, 25], inclusive: !1 }, acc_descr: { rules: [22], inclusive: !1 }, acc_title: { rules: [20], inclusive: !1 }, SCALE: { rules: [17, 18], inclusive: !1 }, ALIAS: { rules: [], inclusive: !1 }, STATE_ID: { rules: [39], inclusive: !1 }, STATE_STRING: { rules: [40, 41], inclusive: !1 }, FORK_STATE: { rules: [], inclusive: !1 }, STATE: { rules: [13, 14, 27, 28, 29, 30, 31, 32, 37, 38, 42, 43, 44], inclusive: !1 }, ID: { rules: [13, 14], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 9, 10, 11, 12, 14, 15, 16, 19, 21, 23, 26, 44, 47, 58, 59, 60, 61, 62, 63, 64, 66, 67], inclusive: !0 } }
};
return ct;
}();
N.lexer = z;
function X() {
this.yy = {};
}
return X.prototype = N, N.Parser = X, new X();
}();
i1.parser = i1;
const not = (t, e) => {
var r;
return ((r = e == null ? void 0 : e.state) == null ? void 0 : r.defaultRenderer) === "dagre-wrapper" ? !1 : t.match(/^\s*stateDiagram/) !== null;
}, iot = (t, e) => {
var r;
return !!(t.match(/^\s*stateDiagram-v2/) !== null || t.match(/^\s*stateDiagram/) && ((r = e == null ? void 0 : e.state) == null ? void 0 : r.defaultRenderer) === "dagre-wrapper");
}, fh = (t) => JSON.parse(JSON.stringify(t));
let a1 = [];
const aot = function(t, e, r) {
sr.parseDirective(this, t, e, r);
}, sot = (t) => {
H.info("Setting root doc", t), a1 = t;
}, oot = () => a1, Ph = (t, e, r) => {
if (e.stmt === "relation")
Ph(t, e.state1, !0), Ph(t, e.state2, !1);
else if (e.stmt === "state" && e.id === "[*]" && (e.id = r ? t.id + "_start" : t.id + "_end", e.start = r), e.doc) {
const n = [];
let i = 0, a = [];
for (i = 0; i < e.doc.length; i++)
if (e.doc[i].type === "divider") {
const s = fh(e.doc[i]);
s.doc = fh(a), n.push(s), a = [];
} else
a.push(e.doc[i]);
if (n.length > 0 && a.length > 0) {
const s = {
stmt: "state",
id: JS(),
type: "divider",
doc: fh(a)
};
n.push(fh(s)), e.doc = n;
}
e.doc.forEach((s) => Ph(e, s, !0));
}
}, lot = () => (Ph({ id: "root" }, { id: "root", doc: a1 }, !0), { id: "root", doc: a1 }), cot = (t) => {
let e;
t.doc ? e = t.doc : e = t, H.info(e), fR(!0), H.info("Extract", e), e.forEach((r) => {
r.stmt === "state" && s1(r.id, r.type, r.doc, r.description, r.note), r.stmt === "relation" && dR(r.state1.id, r.state2.id, r.description);
});
}, hR = () => ({
relations: [],
states: {},
documents: {}
});
let fc = {
root: hR()
}, Hr = fc.root, qh = 0;
const s1 = function(t, e, r, n, i) {
typeof Hr.states[t] > "u" ? Hr.states[t] = {
id: t,
descriptions: [],
type: e,
doc: r,
note: i
} : (Hr.states[t].doc || (Hr.states[t].doc = r), Hr.states[t].type || (Hr.states[t].type = e)), n && (H.info("Adding state ", t, n), typeof n == "string" && Mw(t, n.trim()), typeof n == "object" && n.forEach((a) => Mw(t, a.trim()))), i && (Hr.states[t].note = i, Hr.states[t].note.text = pe.sanitizeText(
Hr.states[t].note.text,
nt()
));
}, fR = function(t) {
fc = {
root: hR()
}, Hr = fc.root, Hr = fc.root, qh = 0, pR = [], t || pi();
}, uot = function(t) {
return Hr.states[t];
}, hot = function() {
return Hr.states;
}, fot = function() {
H.info("Documents = ", fc);
}, dot = function() {
return Hr.relations;
}, dR = function(t, e, r) {
let n = t, i = e, a = "default", s = "default";
t === "[*]" && (qh++, n = "start" + qh, a = "start"), e === "[*]" && (i = "end" + qh, s = "end"), s1(n, a), s1(i, s), Hr.relations.push({
id1: n,
id2: i,
title: pe.sanitizeText(r, nt())
});
}, Mw = function(t, e) {
const r = Hr.states[t];
let n = e;
n[0] === ":" && (n = n.substr(1).trim()), r.descriptions.push(pe.sanitizeText(n, nt()));
}, pot = function(t) {
return t.substring(0, 1) === ":" ? t.substr(2).trim() : t.trim();
}, got = {
LINE: 0,
DOTTED_LINE: 1
};
let Lw = 0;
const yot = () => (Lw++, "divider-id-" + Lw);
let pR = [];
const mot = () => pR;
let gR = "TB";
const bot = () => gR, _ot = (t) => {
gR = t;
}, vot = {
AGGREGATION: 0,
EXTENSION: 1,
COMPOSITION: 2,
DEPENDENCY: 3
}, xot = (t) => t && t[0] === ":" ? t.substr(1).trim() : t.trim(), la = {
parseDirective: aot,
getConfig: () => nt().state,
addState: s1,
clear: fR,
getState: uot,
getStates: hot,
getRelations: dot,
getClasses: mot,
getDirection: bot,
addRelation: dR,
getDividerId: yot,
setDirection: _ot,
cleanupLabel: pot,
lineType: got,
relationType: vot,
logDocuments: fot,
getRootDoc: oot,
setRootDoc: sot,
getRootDocV2: lot,
extract: cot,
trimColon: xot,
getAccTitle: gi,
setAccTitle: zn,
getAccDescription: mi,
setAccDescription: yi
}, kot = (t) => t.append("circle").attr("class", "start-state").attr("r", nt().state.sizeUnit).attr("cx", nt().state.padding + nt().state.sizeUnit).attr("cy", nt().state.padding + nt().state.sizeUnit), wot = (t) => t.append("line").style("stroke", "grey").style("stroke-dasharray", "3").attr("x1", nt().state.textHeight).attr("class", "divider").attr("x2", nt().state.textHeight * 2).attr("y1", 0).attr("y2", 0), Tot = (t, e) => {
const r = t.append("text").attr("x", 2 * nt().state.padding).attr("y", nt().state.textHeight + 2 * nt().state.padding).attr("font-size", nt().state.fontSize).attr("class", "state-title").text(e.id), n = r.node().getBBox();
return t.insert("rect", ":first-child").attr("x", nt().state.padding).attr("y", nt().state.padding).attr("width", n.width + 2 * nt().state.padding).attr("height", n.height + 2 * nt().state.padding).attr("rx", nt().state.radius), r;
}, Eot = (t, e) => {
const r = function(f, p, m) {
const _ = f.append("tspan").attr("x", 2 * nt().state.padding).text(p);
m || _.attr("dy", nt().state.textHeight);
}, i = t.append("text").attr("x", 2 * nt().state.padding).attr("y", nt().state.textHeight + 1.3 * nt().state.padding).attr("font-size", nt().state.fontSize).attr("class", "state-title").text(e.descriptions[0]).node().getBBox(), a = i.height, s = t.append("text").attr("x", nt().state.padding).attr(
"y",
a + nt().state.padding * 0.4 + nt().state.dividerMargin + nt().state.textHeight
).attr("class", "state-description");
let o = !0, l = !0;
e.descriptions.forEach(function(f) {
o || (r(s, f, l), l = !1), o = !1;
});
const u = t.append("line").attr("x1", nt().state.padding).attr("y1", nt().state.padding + a + nt().state.dividerMargin / 2).attr("y2", nt().state.padding + a + nt().state.dividerMargin / 2).attr("class", "descr-divider"), h = s.node().getBBox(), d = Math.max(h.width, i.width);
return u.attr("x2", d + 3 * nt().state.padding), t.insert("rect", ":first-child").attr("x", nt().state.padding).attr("y", nt().state.padding).attr("width", d + 2 * nt().state.padding).attr("height", h.height + a + 2 * nt().state.padding).attr("rx", nt().state.radius), t;
}, Cot = (t, e, r) => {
const n = nt().state.padding, i = 2 * nt().state.padding, a = t.node().getBBox(), s = a.width, o = a.x, l = t.append("text").attr("x", 0).attr("y", nt().state.titleShift).attr("font-size", nt().state.fontSize).attr("class", "state-title").text(e.id), h = l.node().getBBox().width + i;
let d = Math.max(h, s);
d === s && (d = d + i);
let f;
const p = t.node().getBBox();
e.doc, f = o - n, h > s && (f = (s - d) / 2 + n), Math.abs(o - p.x) < n && h > s && (f = o - (h - s) / 2);
const m = 1 - nt().state.textHeight;
return t.insert("rect", ":first-child").attr("x", f).attr("y", m).attr("class", r ? "alt-composit" : "composit").attr("width", d).attr(
"height",
p.height + nt().state.textHeight + nt().state.titleShift + 1
).attr("rx", "0"), l.attr("x", f + n), h <= s && l.attr("x", o + (d - i) / 2 - h / 2 + n), t.insert("rect", ":first-child").attr("x", f).attr(
"y",
nt().state.titleShift - nt().state.textHeight - nt().state.padding
).attr("width", d).attr("height", nt().state.textHeight * 3).attr("rx", nt().state.radius), t.insert("rect", ":first-child").attr("x", f).attr(
"y",
nt().state.titleShift - nt().state.textHeight - nt().state.padding
).attr("width", d).attr("height", p.height + 3 + 2 * nt().state.textHeight).attr("rx", nt().state.radius), t;
}, Sot = (t) => (t.append("circle").attr("class", "end-state-outer").attr("r", nt().state.sizeUnit + nt().state.miniPadding).attr(
"cx",
nt().state.padding + nt().state.sizeUnit + nt().state.miniPadding
).attr(
"cy",
nt().state.padding + nt().state.sizeUnit + nt().state.miniPadding
), t.append("circle").attr("class", "end-state-inner").attr("r", nt().state.sizeUnit).attr("cx", nt().state.padding + nt().state.sizeUnit + 2).attr("cy", nt().state.padding + nt().state.sizeUnit + 2)), Aot = (t, e) => {
let r = nt().state.forkWidth, n = nt().state.forkHeight;
if (e.parentId) {
let i = r;
r = n, n = i;
}
return t.append("rect").style("stroke", "black").style("fill", "black").attr("width", r).attr("height", n).attr("x", nt().state.padding).attr("y", nt().state.padding);
}, Mot = (t, e, r, n) => {
let i = 0;
const a = n.append("text");
a.style("text-anchor", "start"), a.attr("class", "noteText");
let s = t.replace(/\r\n/g, "
");
s = s.replace(/\n/g, "
");
const o = s.split(pe.lineBreakRegex);
let l = 1.25 * nt().state.noteMargin;
for (const u of o) {
const h = u.trim();
if (h.length > 0) {
const d = a.append("tspan");
d.text(h), l === 0 && (l += d.node().getBBox().height), i += l, d.attr("x", e + nt().state.noteMargin), d.attr("y", r + i + 1.25 * nt().state.noteMargin);
}
}
return { textWidth: a.node().getBBox().width, textHeight: i };
}, Lot = (t, e) => {
e.attr("class", "state-note");
const r = e.append("rect").attr("x", 0).attr("y", nt().state.padding), n = e.append("g"), { textWidth: i, textHeight: a } = Mot(t, 0, 0, n);
return r.attr("height", a + 2 * nt().state.noteMargin), r.attr("width", i + nt().state.noteMargin * 2), r;
}, Rw = function(t, e) {
const r = e.id, n = {
id: r,
label: e.id,
width: 0,
height: 0
}, i = t.append("g").attr("id", r).attr("class", "stateGroup");
e.type === "start" && kot(i), e.type === "end" && Sot(i), (e.type === "fork" || e.type === "join") && Aot(i, e), e.type === "note" && Lot(e.note.text, i), e.type === "divider" && wot(i), e.type === "default" && e.descriptions.length === 0 && Tot(i, e), e.type === "default" && e.descriptions.length > 0 && Eot(i, e);
const a = i.node().getBBox();
return n.width = a.width + 2 * nt().state.padding, n.height = a.height + 2 * nt().state.padding, n;
};
let Iw = 0;
const Rot = function(t, e, r) {
const n = function(l) {
switch (l) {
case la.relationType.AGGREGATION:
return "aggregation";
case la.relationType.EXTENSION:
return "extension";
case la.relationType.COMPOSITION:
return "composition";
case la.relationType.DEPENDENCY:
return "dependency";
}
};
e.points = e.points.filter((l) => !Number.isNaN(l.y));
const i = e.points, a = ns().x(function(l) {
return l.x;
}).y(function(l) {
return l.y;
}).curve(Ps), s = t.append("path").attr("d", a(i)).attr("id", "edge" + Iw).attr("class", "transition");
let o = "";
if (nt().state.arrowMarkerAbsolute && (o = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, o = o.replace(/\(/g, "\\("), o = o.replace(/\)/g, "\\)")), s.attr(
"marker-end",
"url(" + o + "#" + n(la.relationType.DEPENDENCY) + "End)"
), typeof r.title < "u") {
const l = t.append("g").attr("class", "stateLabel"), { x: u, y: h } = Re.calcLabelPosition(e.points), d = pe.getRows(r.title);
let f = 0;
const p = [];
let m = 0, _ = 0;
for (let x = 0; x <= d.length; x++) {
const k = l.append("text").attr("text-anchor", "middle").text(d[x]).attr("x", u).attr("y", h + f), T = k.node().getBBox();
m = Math.max(m, T.width), _ = Math.min(_, T.x), H.info(T.x, u, h + f), f === 0 && (f = k.node().getBBox().height, H.info("Title height", f, h)), p.push(k);
}
let y = f * d.length;
if (d.length > 1) {
const x = (d.length - 1) * f * 0.5;
p.forEach((k, T) => k.attr("y", h + T * f - x)), y = f * d.length;
}
const b = l.node().getBBox();
l.insert("rect", ":first-child").attr("class", "box").attr("x", u - m / 2 - nt().state.padding / 2).attr("y", h - y / 2 - nt().state.padding / 2 - 3.5).attr("width", m + nt().state.padding).attr("height", y + nt().state.padding), H.info(b);
}
Iw++;
};
let Sn;
const hm = {}, Iot = function() {
}, Not = function(t) {
t.append("defs").append("marker").attr("id", "dependencyEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z");
}, Bot = function(t, e, r, n) {
Sn = nt().state;
const i = nt().securityLevel;
let a;
i === "sandbox" && (a = St("#i" + e));
const s = St(i === "sandbox" ? a.nodes()[0].contentDocument.body : "body"), o = i === "sandbox" ? a.nodes()[0].contentDocument : document;
H.debug("Rendering diagram " + t);
const l = s.select(`[id='${e}']`);
Not(l), new ur.Graph({
multigraph: !0,
compound: !0,
rankdir: "RL"
}).setDefaultEdgeLabel(function() {
return {};
});
const h = n.db.getRootDoc();
yR(h, l, void 0, !1, s, o, n);
const d = Sn.padding, f = l.node().getBBox(), p = f.width + d * 2, m = f.height + d * 2, _ = p * 1.75;
di(l, m, _, Sn.useMaxWidth), l.attr(
"viewBox",
`${f.x - Sn.padding} ${f.y - Sn.padding} ` + p + " " + m
), vn(n.db, l, e);
}, Dot = (t) => t ? t.length * Sn.fontSizeFactor : 1, yR = (t, e, r, n, i, a, s) => {
const o = new ur.Graph({
compound: !0,
multigraph: !0
});
let l, u = !0;
for (l = 0; l < t.length; l++)
if (t[l].stmt === "relation") {
u = !1;
break;
}
r ? o.setGraph({
rankdir: "LR",
multigraph: !0,
compound: !0,
ranker: "tight-tree",
ranksep: u ? 1 : Sn.edgeLengthFactor,
nodeSep: u ? 1 : 50,
isMultiGraph: !0
}) : o.setGraph({
rankdir: "TB",
multigraph: !0,
compound: !0,
ranksep: u ? 1 : Sn.edgeLengthFactor,
nodeSep: u ? 1 : 50,
ranker: "tight-tree",
isMultiGraph: !0
}), o.setDefaultEdgeLabel(function() {
return {};
}), s.db.extract(t);
const h = s.db.getStates(), d = s.db.getRelations(), f = Object.keys(h);
for (let b = 0; b < f.length; b++) {
const x = h[f[b]];
r && (x.parentId = r);
let k;
if (x.doc) {
let T = e.append("g").attr("id", x.id).attr("class", "stateGroup");
k = yR(x.doc, T, x.id, !n, i, a, s);
{
T = Cot(T, x, n);
let C = T.node().getBBox();
k.width = C.width, k.height = C.height + Sn.padding / 2, hm[x.id] = { y: Sn.compositTitleSize };
}
} else
k = Rw(e, x);
if (x.note) {
const T = {
descriptions: [],
id: x.id + "-note",
note: x.note,
type: "note"
}, C = Rw(e, T);
x.note.position === "left of" ? (o.setNode(k.id + "-note", C), o.setNode(k.id, k)) : (o.setNode(k.id, k), o.setNode(k.id + "-note", C)), o.setParent(k.id, k.id + "-group"), o.setParent(k.id + "-note", k.id + "-group");
} else
o.setNode(k.id, k);
}
H.debug("Count=", o.nodeCount(), o);
let p = 0;
d.forEach(function(b) {
p++, H.debug("Setting edge", b), o.setEdge(
b.id1,
b.id2,
{
relation: b,
width: Dot(b.title),
height: Sn.labelHeight * pe.getRows(b.title).length,
labelpos: "c"
},
"id" + p
);
}), fu.layout(o), H.debug("Graph after layout", o.nodes());
const m = e.node();
o.nodes().forEach(function(b) {
typeof b < "u" && typeof o.node(b) < "u" ? (H.warn("Node " + b + ": " + JSON.stringify(o.node(b))), i.select("#" + m.id + " #" + b).attr(
"transform",
"translate(" + (o.node(b).x - o.node(b).width / 2) + "," + (o.node(b).y + (hm[b] ? hm[b].y : 0) - o.node(b).height / 2) + " )"
), i.select("#" + m.id + " #" + b).attr("data-x-shift", o.node(b).x - o.node(b).width / 2), a.querySelectorAll("#" + m.id + " #" + b + " .divider").forEach((k) => {
const T = k.parentElement;
let C = 0, M = 0;
T && (T.parentElement && (C = T.parentElement.getBBox().width), M = parseInt(T.getAttribute("data-x-shift"), 10), Number.isNaN(M) && (M = 0)), k.setAttribute("x1", 0 - M + 8), k.setAttribute("x2", C - M - 8);
})) : H.debug("No Node " + b + ": " + JSON.stringify(o.node(b)));
});
let _ = m.getBBox();
o.edges().forEach(function(b) {
typeof b < "u" && typeof o.edge(b) < "u" && (H.debug("Edge " + b.v + " -> " + b.w + ": " + JSON.stringify(o.edge(b))), Rot(e, o.edge(b), o.edge(b).relation));
}), _ = m.getBBox();
const y = {
id: r || "root",
label: r || "root",
width: 0,
height: 0
};
return y.width = _.width + 2 * Sn.padding, y.height = _.height + 2 * Sn.padding, H.debug("Doc rendered", y, o), y;
}, Oot = {
setConf: Iot,
draw: Bot
}, Fot = {}, Pot = function(t) {
const e = Object.keys(t);
for (let r = 0; r < e.length; r++)
Fot[e[r]] = t[e[r]];
};
let Pe = {};
const qot = function(t, e) {
return H.trace("Extracting classes"), e.sb.clear(), e.parser.parse(t), e.sb.getClasses();
}, Vh = (t, e, r, n) => {
if (r.id !== "root") {
let i = "rect";
r.start === !0 && (i = "start"), r.start === !1 && (i = "end"), r.type !== "default" && (i = r.type), Pe[r.id] || (Pe[r.id] = {
id: r.id,
shape: i,
description: pe.sanitizeText(r.id, nt()),
classes: "statediagram-state"
}), r.description && (Array.isArray(Pe[r.id].description) ? (Pe[r.id].shape = "rectWithTitle", Pe[r.id].description.push(r.description)) : Pe[r.id].description.length > 0 ? (Pe[r.id].shape = "rectWithTitle", Pe[r.id].description === r.id ? Pe[r.id].description = [r.description] : Pe[r.id].description = [Pe[r.id].description, r.description]) : (Pe[r.id].shape = "rect", Pe[r.id].description = r.description), Pe[r.id].description = pe.sanitizeTextOrArray(
Pe[r.id].description,
nt()
)), Pe[r.id].description.length === 1 && Pe[r.id].shape === "rectWithTitle" && (Pe[r.id].shape = "rect"), !Pe[r.id].type && r.doc && (H.info("Setting cluster for ", r.id, Gb(r)), Pe[r.id].type = "group", Pe[r.id].dir = Gb(r), Pe[r.id].shape = r.type === "divider" ? "divider" : "roundedWithTitle", Pe[r.id].classes = Pe[r.id].classes + " " + (n ? "statediagram-cluster statediagram-cluster-alt" : "statediagram-cluster"));
const a = {
labelStyle: "",
shape: Pe[r.id].shape,
labelText: Pe[r.id].description,
classes: Pe[r.id].classes,
style: "",
id: r.id,
dir: Pe[r.id].dir,
domId: "state-" + r.id + "-" + Ba,
type: Pe[r.id].type,
padding: 15
};
if (r.note) {
const s = {
labelStyle: "",
shape: "note",
labelText: r.note.text,
classes: "statediagram-note",
style: "",
id: r.id + "----note-" + Ba,
domId: "state-" + r.id + "----note-" + Ba,
type: Pe[r.id].type,
padding: 15
}, o = {
labelStyle: "",
shape: "noteGroup",
labelText: r.note.text,
classes: Pe[r.id].classes,
style: "",
id: r.id + "----parent",
domId: "state-" + r.id + "----parent-" + Ba,
type: "group",
padding: 0
};
Ba++, t.setNode(r.id + "----parent", o), t.setNode(s.id, s), t.setNode(r.id, a), t.setParent(r.id, r.id + "----parent"), t.setParent(s.id, r.id + "----parent");
let l = r.id, u = s.id;
r.note.position === "left of" && (l = s.id, u = r.id), t.setEdge(l, u, {
arrowhead: "none",
arrowType: "",
style: "fill:none",
labelStyle: "",
classes: "transition note-edge",
arrowheadStyle: "fill: #333",
labelpos: "c",
labelType: "text",
thickness: "normal"
});
} else
t.setNode(r.id, a);
}
e && e.id !== "root" && (H.trace("Setting node ", r.id, " to be child of its parent ", e.id), t.setParent(r.id, e.id)), r.doc && (H.trace("Adding nodes children "), Vot(t, r, r.doc, !n));
};
let Ba = 0;
const Vot = (t, e, r, n) => {
H.trace("items", r), r.forEach((i) => {
if (i.stmt === "state" || i.stmt === "default")
Vh(t, e, i, n);
else if (i.stmt === "relation") {
Vh(t, e, i.state1, n), Vh(t, e, i.state2, n);
const a = {
id: "edge" + Ba,
arrowhead: "normal",
arrowTypeEnd: "arrow_barb",
style: "fill:none",
labelStyle: "",
label: pe.sanitizeText(i.description, nt()),
arrowheadStyle: "fill: #333",
labelpos: "c",
labelType: "text",
thickness: "normal",
classes: "transition"
};
let s = i.state1.id, o = i.state2.id;
t.setEdge(s, o, a, Ba), Ba++;
}
});
}, Gb = (t, e) => {
let r = e || "TB";
if (t.doc)
for (let n = 0; n < t.doc.length; n++) {
const i = t.doc[n];
i.stmt === "dir" && (r = i.value);
}
return r;
}, zot = function(t, e, r, n) {
H.info("Drawing state diagram (v2)", e), Pe = {}, n.db.getDirection();
const { securityLevel: i, state: a } = nt(), s = a.nodeSpacing || 50, o = a.rankSpacing || 50;
H.info(n.db.getRootDocV2()), n.db.extract(n.db.getRootDocV2()), H.info(n.db.getRootDocV2());
const l = new ur.Graph({
multigraph: !0,
compound: !0
}).setGraph({
rankdir: Gb(n.db.getRootDocV2()),
nodesep: s,
ranksep: o,
marginx: 8,
marginy: 8
}).setDefaultEdgeLabel(function() {
return {};
});
Vh(l, void 0, n.db.getRootDocV2(), !0);
let u;
i === "sandbox" && (u = St("#i" + e));
const h = St(i === "sandbox" ? u.nodes()[0].contentDocument.body : "body"), d = h.select(`[id="${e}"]`), f = h.select("#" + e + " g");
n_(f, l, ["barb"], "statediagram", e);
const p = 8, m = d.node().getBBox(), _ = m.width + p * 2, y = m.height + p * 2;
d.attr("class", "statediagram");
const b = d.node().getBBox();
di(d, y, _, a.useMaxWidth);
const x = `${b.x - p} ${b.y - p} ${_} ${y}`;
H.debug(`viewBox ${x}`), d.attr("viewBox", x);
const k = document.querySelectorAll('[id="' + e + '"] .edgeLabel .label');
for (let T = 0; T < k.length; T++) {
const C = k[T], M = C.getBBox(), S = document.createElementNS("http://www.w3.org/2000/svg", "rect");
S.setAttribute("rx", 0), S.setAttribute("ry", 0), S.setAttribute("width", M.width), S.setAttribute("height", M.height), C.insertBefore(S, C.firstChild);
}
vn(n.db, d, e);
}, Yot = {
setConf: Pot,
getClasses: qot,
draw: zot
};
var jb = function() {
var t = function(_, y, b, x) {
for (b = b || {}, x = _.length; x--; b[_[x]] = y)
;
return b;
}, e = [1, 2], r = [1, 5], n = [6, 9, 11, 17, 18, 20, 22, 23, 24, 26], i = [1, 15], a = [1, 16], s = [1, 17], o = [1, 18], l = [1, 19], u = [1, 20], h = [1, 24], d = [4, 6, 9, 11, 17, 18, 20, 22, 23, 24, 26], f = {
trace: function() {
},
yy: {},
symbols_: { error: 2, start: 3, journey: 4, document: 5, EOF: 6, directive: 7, line: 8, SPACE: 9, statement: 10, NEWLINE: 11, openDirective: 12, typeDirective: 13, closeDirective: 14, ":": 15, argDirective: 16, title: 17, acc_title: 18, acc_title_value: 19, acc_descr: 20, acc_descr_value: 21, acc_descr_multiline_value: 22, section: 23, taskName: 24, taskData: 25, open_directive: 26, type_directive: 27, arg_directive: 28, close_directive: 29, $accept: 0, $end: 1 },
terminals_: { 2: "error", 4: "journey", 6: "EOF", 9: "SPACE", 11: "NEWLINE", 15: ":", 17: "title", 18: "acc_title", 19: "acc_title_value", 20: "acc_descr", 21: "acc_descr_value", 22: "acc_descr_multiline_value", 23: "section", 24: "taskName", 25: "taskData", 26: "open_directive", 27: "type_directive", 28: "arg_directive", 29: "close_directive" },
productions_: [0, [3, 3], [3, 2], [5, 0], [5, 2], [8, 2], [8, 1], [8, 1], [8, 1], [7, 4], [7, 6], [10, 1], [10, 2], [10, 2], [10, 1], [10, 1], [10, 2], [10, 1], [12, 1], [13, 1], [16, 1], [14, 1]],
performAction: function(y, b, x, k, T, C, M) {
var S = C.length - 1;
switch (T) {
case 1:
return C[S - 1];
case 3:
this.$ = [];
break;
case 4:
C[S - 1].push(C[S]), this.$ = C[S - 1];
break;
case 5:
case 6:
this.$ = C[S];
break;
case 7:
case 8:
this.$ = [];
break;
case 11:
k.setDiagramTitle(C[S].substr(6)), this.$ = C[S].substr(6);
break;
case 12:
this.$ = C[S].trim(), k.setAccTitle(this.$);
break;
case 13:
case 14:
this.$ = C[S].trim(), k.setAccDescription(this.$);
break;
case 15:
k.addSection(C[S].substr(8)), this.$ = C[S].substr(8);
break;
case 16:
k.addTask(C[S - 1], C[S]), this.$ = "task";
break;
case 18:
k.parseDirective("%%{", "open_directive");
break;
case 19:
k.parseDirective(C[S], "type_directive");
break;
case 20:
C[S] = C[S].trim().replace(/'/g, '"'), k.parseDirective(C[S], "arg_directive");
break;
case 21:
k.parseDirective("}%%", "close_directive", "journey");
break;
}
},
table: [{ 3: 1, 4: e, 7: 3, 12: 4, 26: r }, { 1: [3] }, t(n, [2, 3], { 5: 6 }), { 3: 7, 4: e, 7: 3, 12: 4, 26: r }, { 13: 8, 27: [1, 9] }, { 27: [2, 18] }, { 6: [1, 10], 7: 21, 8: 11, 9: [1, 12], 10: 13, 11: [1, 14], 12: 4, 17: i, 18: a, 20: s, 22: o, 23: l, 24: u, 26: r }, { 1: [2, 2] }, { 14: 22, 15: [1, 23], 29: h }, t([15, 29], [2, 19]), t(n, [2, 8], { 1: [2, 1] }), t(n, [2, 4]), { 7: 21, 10: 25, 12: 4, 17: i, 18: a, 20: s, 22: o, 23: l, 24: u, 26: r }, t(n, [2, 6]), t(n, [2, 7]), t(n, [2, 11]), { 19: [1, 26] }, { 21: [1, 27] }, t(n, [2, 14]), t(n, [2, 15]), { 25: [1, 28] }, t(n, [2, 17]), { 11: [1, 29] }, { 16: 30, 28: [1, 31] }, { 11: [2, 21] }, t(n, [2, 5]), t(n, [2, 12]), t(n, [2, 13]), t(n, [2, 16]), t(d, [2, 9]), { 14: 32, 29: h }, { 29: [2, 20] }, { 11: [1, 33] }, t(d, [2, 10])],
defaultActions: { 5: [2, 18], 7: [2, 2], 24: [2, 21], 31: [2, 20] },
parseError: function(y, b) {
if (b.recoverable)
this.trace(y);
else {
var x = new Error(y);
throw x.hash = b, x;
}
},
parse: function(y) {
var b = this, x = [0], k = [], T = [null], C = [], M = this.table, S = "", R = 0, A = 0, L = 2, v = 1, B = C.slice.call(arguments, 1), w = Object.create(this.lexer), D = { yy: {} };
for (var N in this.yy)
Object.prototype.hasOwnProperty.call(this.yy, N) && (D.yy[N] = this.yy[N]);
w.setInput(y, D.yy), D.yy.lexer = w, D.yy.parser = this, typeof w.yylloc > "u" && (w.yylloc = {});
var z = w.yylloc;
C.push(z);
var X = w.options && w.options.ranges;
typeof D.yy.parseError == "function" ? this.parseError = D.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
function ct() {
var V;
return V = k.pop() || w.lex() || v, typeof V != "number" && (V instanceof Array && (k = V, V = k.pop()), V = b.symbols_[V] || V), V;
}
for (var J, Y, $, lt, ut = {}, W, tt, K, it; ; ) {
if (Y = x[x.length - 1], this.defaultActions[Y] ? $ = this.defaultActions[Y] : ((J === null || typeof J > "u") && (J = ct()), $ = M[Y] && M[Y][J]), typeof $ > "u" || !$.length || !$[0]) {
var Z = "";
it = [];
for (W in M[Y])
this.terminals_[W] && W > L && it.push("'" + this.terminals_[W] + "'");
w.showPosition ? Z = "Parse error on line " + (R + 1) + `:
` + w.showPosition() + `
Expecting ` + it.join(", ") + ", got '" + (this.terminals_[J] || J) + "'" : Z = "Parse error on line " + (R + 1) + ": Unexpected " + (J == v ? "end of input" : "'" + (this.terminals_[J] || J) + "'"), this.parseError(Z, {
text: w.match,
token: this.terminals_[J] || J,
line: w.yylineno,
loc: z,
expected: it
});
}
if ($[0] instanceof Array && $.length > 1)
throw new Error("Parse Error: multiple actions possible at state: " + Y + ", token: " + J);
switch ($[0]) {
case 1:
x.push(J), T.push(w.yytext), C.push(w.yylloc), x.push($[1]), J = null, A = w.yyleng, S = w.yytext, R = w.yylineno, z = w.yylloc;
break;
case 2:
if (tt = this.productions_[$[1]][1], ut.$ = T[T.length - tt], ut._$ = {
first_line: C[C.length - (tt || 1)].first_line,
last_line: C[C.length - 1].last_line,
first_column: C[C.length - (tt || 1)].first_column,
last_column: C[C.length - 1].last_column
}, X && (ut._$.range = [
C[C.length - (tt || 1)].range[0],
C[C.length - 1].range[1]
]), lt = this.performAction.apply(ut, [
S,
A,
R,
D.yy,
$[1],
T,
C
].concat(B)), typeof lt < "u")
return lt;
tt && (x = x.slice(0, -1 * tt * 2), T = T.slice(0, -1 * tt), C = C.slice(0, -1 * tt)), x.push(this.productions_[$[1]][0]), T.push(ut.$), C.push(ut._$), K = M[x[x.length - 2]][x[x.length - 1]], x.push(K);
break;
case 3:
return !0;
}
}
return !0;
}
}, p = function() {
var _ = {
EOF: 1,
parseError: function(b, x) {
if (this.yy.parser)
this.yy.parser.parseError(b, x);
else
throw new Error(b);
},
setInput: function(y, b) {
return this.yy = b || this.yy || {}, this._input = y, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
first_line: 1,
first_column: 0,
last_line: 1,
last_column: 0
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
},
input: function() {
var y = this._input[0];
this.yytext += y, this.yyleng++, this.offset++, this.match += y, this.matched += y;
var b = y.match(/(?:\r\n?|\n).*/g);
return b ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), y;
},
unput: function(y) {
var b = y.length, x = y.split(/(?:\r\n?|\n)/g);
this._input = y + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - b), this.offset -= b;
var k = this.match.split(/(?:\r\n?|\n)/g);
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), x.length - 1 && (this.yylineno -= x.length - 1);
var T = this.yylloc.range;
return this.yylloc = {
first_line: this.yylloc.first_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.first_column,
last_column: x ? (x.length === k.length ? this.yylloc.first_column : 0) + k[k.length - x.length].length - x[0].length : this.yylloc.first_column - b
}, this.options.ranges && (this.yylloc.range = [T[0], T[0] + this.yyleng - b]), this.yyleng = this.yytext.length, this;
},
more: function() {
return this._more = !0, this;
},
reject: function() {
if (this.options.backtrack_lexer)
this._backtrack = !0;
else
return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
return this;
},
less: function(y) {
this.unput(this.match.slice(y));
},
pastInput: function() {
var y = this.matched.substr(0, this.matched.length - this.match.length);
return (y.length > 20 ? "..." : "") + y.substr(-20).replace(/\n/g, "");
},
upcomingInput: function() {
var y = this.match;
return y.length < 20 && (y += this._input.substr(0, 20 - y.length)), (y.substr(0, 20) + (y.length > 20 ? "..." : "")).replace(/\n/g, "");
},
showPosition: function() {
var y = this.pastInput(), b = new Array(y.length + 1).join("-");
return y + this.upcomingInput() + `
` + b + "^";
},
test_match: function(y, b) {
var x, k, T;
if (this.options.backtrack_lexer && (T = {
yylineno: this.yylineno,
yylloc: {
first_line: this.yylloc.first_line,
last_line: this.last_line,
first_column: this.yylloc.first_column,
last_column: this.yylloc.last_column
},
yytext: this.yytext,
match: this.match,
matches: this.matches,
matched: this.matched,
yyleng: this.yyleng,
offset: this.offset,
_more: this._more,
_input: this._input,
yy: this.yy,
conditionStack: this.conditionStack.slice(0),
done: this.done
}, this.options.ranges && (T.yylloc.range = this.yylloc.range.slice(0))), k = y[0].match(/(?:\r\n?|\n).*/g), k && (this.yylineno += k.length), this.yylloc = {
first_line: this.yylloc.last_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.last_column,
last_column: k ? k[k.length - 1].length - k[k.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + y[0].length
}, this.yytext += y[0], this.match += y[0], this.matches = y, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(y[0].length), this.matched += y[0], x = this.performAction.call(this, this.yy, this, b, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), x)
return x;
if (this._backtrack) {
for (var C in T)
this[C] = T[C];
return !1;
}
return !1;
},
next: function() {
if (this.done)
return this.EOF;
this._input || (this.done = !0);
var y, b, x, k;
this._more || (this.yytext = "", this.match = "");
for (var T = this._currentRules(), C = 0; C < T.length; C++)
if (x = this._input.match(this.rules[T[C]]), x && (!b || x[0].length > b[0].length)) {
if (b = x, k = C, this.options.backtrack_lexer) {
if (y = this.test_match(x, T[C]), y !== !1)
return y;
if (this._backtrack) {
b = !1;
continue;
} else
return !1;
} else if (!this.options.flex)
break;
}
return b ? (y = this.test_match(b, T[k]), y !== !1 ? y : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
},
lex: function() {
var b = this.next();
return b || this.lex();
},
begin: function(b) {
this.conditionStack.push(b);
},
popState: function() {
var b = this.conditionStack.length - 1;
return b > 0 ? this.conditionStack.pop() : this.conditionStack[0];
},
_currentRules: function() {
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
},
topState: function(b) {
return b = this.conditionStack.length - 1 - Math.abs(b || 0), b >= 0 ? this.conditionStack[b] : "INITIAL";
},
pushState: function(b) {
this.begin(b);
},
stateStackSize: function() {
return this.conditionStack.length;
},
options: { "case-insensitive": !0 },
performAction: function(b, x, k, T) {
switch (k) {
case 0:
return this.begin("open_directive"), 26;
case 1:
return this.begin("type_directive"), 27;
case 2:
return this.popState(), this.begin("arg_directive"), 15;
case 3:
return this.popState(), this.popState(), 29;
case 4:
return 28;
case 5:
break;
case 6:
break;
case 7:
return 11;
case 8:
break;
case 9:
break;
case 10:
return 4;
case 11:
return 17;
case 12:
return this.begin("acc_title"), 18;
case 13:
return this.popState(), "acc_title_value";
case 14:
return this.begin("acc_descr"), 20;
case 15:
return this.popState(), "acc_descr_value";
case 16:
this.begin("acc_descr_multiline");
break;
case 17:
this.popState();
break;
case 18:
return "acc_descr_multiline_value";
case 19:
return 23;
case 20:
return 24;
case 21:
return 25;
case 22:
return 15;
case 23:
return 6;
case 24:
return "INVALID";
}
},
rules: [/^(?:%%\{)/i, /^(?:((?:(?!\}%%)[^:.])*))/i, /^(?::)/i, /^(?:\}%%)/i, /^(?:((?:(?!\}%%).|\n)*))/i, /^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:journey\b)/i, /^(?:title\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:section\s[^#:\n;]+)/i, /^(?:[^#:\n;]+)/i, /^(?::[^#\n;]+)/i, /^(?::)/i, /^(?:$)/i, /^(?:.)/i],
conditions: { open_directive: { rules: [1], inclusive: !1 }, type_directive: { rules: [2, 3], inclusive: !1 }, arg_directive: { rules: [3, 4], inclusive: !1 }, acc_descr_multiline: { rules: [17, 18], inclusive: !1 }, acc_descr: { rules: [15], inclusive: !1 }, acc_title: { rules: [13], inclusive: !1 }, INITIAL: { rules: [0, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, 19, 20, 21, 22, 23, 24], inclusive: !0 } }
};
return _;
}();
f.lexer = p;
function m() {
this.yy = {};
}
return m.prototype = f, f.Parser = m, new m();
}();
jb.parser = jb;
const Uot = (t) => t.match(/^\s*journey/) !== null;
let nl = "";
const x_ = [], Gc = [], Lo = [], Wot = function(t, e, r) {
sr.parseDirective(this, t, e, r);
}, Hot = function() {
x_.length = 0, Gc.length = 0, nl = "", Lo.length = 0, pi();
}, Got = function(t) {
nl = t, x_.push(t);
}, jot = function() {
return x_;
}, $ot = function() {
let t = Nw();
const e = 100;
let r = 0;
for (; !t && r < e; )
t = Nw(), r++;
return Gc.push(...Lo), Gc;
}, Xot = function() {
const t = [];
return Gc.forEach((r) => {
r.people && t.push(...r.people);
}), [...new Set(t)].sort();
}, Kot = function(t, e) {
const r = e.substr(1).split(":");
let n = 0, i = [];
r.length === 1 ? (n = Number(r[0]), i = []) : (n = Number(r[0]), i = r[1].split(","));
const a = i.map((o) => o.trim()), s = {
section: nl,
type: nl,
people: a,
task: t,
score: n
};
Lo.push(s);
}, Zot = function(t) {
const e = {
section: nl,
type: nl,
description: t,
task: t,
classes: []
};
Gc.push(e);
}, Nw = function() {
const t = function(r) {
return Lo[r].processed;
};
let e = !0;
for (let r = 0; r < Lo.length; r++)
t(r), e = e && Lo[r].processed;
return e;
}, Qot = function() {
return Xot();
}, Bw = {
parseDirective: Wot,
getConfig: () => nt().journey,
clear: Hot,
setDiagramTitle: o0,
getDiagramTitle: l0,
setAccTitle: zn,
getAccTitle: gi,
setAccDescription: yi,
getAccDescription: mi,
addSection: Got,
getSections: jot,
getTasks: $ot,
addTask: Kot,
addTaskOrg: Zot,
getActors: Qot
}, L0 = function(t, e) {
const r = t.append("rect");
return r.attr("x", e.x), r.attr("y", e.y), r.attr("fill", e.fill), r.attr("stroke", e.stroke), r.attr("width", e.width), r.attr("height", e.height), r.attr("rx", e.rx), r.attr("ry", e.ry), typeof e.class < "u" && r.attr("class", e.class), r;
}, Jot = function(t, e) {
const n = t.append("circle").attr("cx", e.cx).attr("cy", e.cy).attr("class", "face").attr("r", 15).attr("stroke-width", 2).attr("overflow", "visible"), i = t.append("g");
i.append("circle").attr("cx", e.cx - 15 / 3).attr("cy", e.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"), i.append("circle").attr("cx", e.cx + 15 / 3).attr("cy", e.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666");
function a(l) {
const u = Ef().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
l.append("path").attr("class", "mouth").attr("d", u).attr("transform", "translate(" + e.cx + "," + (e.cy + 2) + ")");
}
function s(l) {
const u = Ef().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
l.append("path").attr("class", "mouth").attr("d", u).attr("transform", "translate(" + e.cx + "," + (e.cy + 7) + ")");
}
function o(l) {
l.append("line").attr("class", "mouth").attr("stroke", 2).attr("x1", e.cx - 5).attr("y1", e.cy + 7).attr("x2", e.cx + 5).attr("y2", e.cy + 7).attr("class", "mouth").attr("stroke-width", "1px").attr("stroke", "#666");
}
return e.score > 3 ? a(i) : e.score < 3 ? s(i) : o(i), n;
}, mR = function(t, e) {
const r = t.append("circle");
return r.attr("cx", e.cx), r.attr("cy", e.cy), r.attr("class", "actor-" + e.pos), r.attr("fill", e.fill), r.attr("stroke", e.stroke), r.attr("r", e.r), typeof r.class < "u" && r.attr("class", r.class), typeof e.title < "u" && r.append("title").text(e.title), r;
}, bR = function(t, e) {
const r = e.text.replace(/
/gi, " "), n = t.append("text");
n.attr("x", e.x), n.attr("y", e.y), n.attr("class", "legend"), n.style("text-anchor", e.anchor), typeof e.class < "u" && n.attr("class", e.class);
const i = n.append("tspan");
return i.attr("x", e.x + e.textMargin * 2), i.text(r), n;
}, tlt = function(t, e) {
function r(i, a, s, o, l) {
return i + "," + a + " " + (i + s) + "," + a + " " + (i + s) + "," + (a + o - l) + " " + (i + s - l * 1.2) + "," + (a + o) + " " + i + "," + (a + o);
}
const n = t.append("polygon");
n.attr("points", r(e.x, e.y, 50, 20, 7)), n.attr("class", "labelBox"), e.y = e.y + e.labelMargin, e.x = e.x + 0.5 * e.labelMargin, bR(t, e);
}, elt = function(t, e, r) {
const n = t.append("g"), i = k_();
i.x = e.x, i.y = e.y, i.fill = e.fill, i.width = r.width, i.height = r.height, i.class = "journey-section section-type-" + e.num, i.rx = 3, i.ry = 3, L0(n, i), _R(r)(
e.text,
n,
i.x,
i.y,
i.width,
i.height,
{ class: "journey-section section-type-" + e.num },
r,
e.colour
);
};
let Dw = -1;
const rlt = function(t, e, r) {
const n = e.x + r.width / 2, i = t.append("g");
Dw++;
const a = 300 + 5 * 30;
i.append("line").attr("id", "task" + Dw).attr("x1", n).attr("y1", e.y).attr("x2", n).attr("y2", a).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"), Jot(i, {
cx: n,
cy: 300 + (5 - e.score) * 30,
score: e.score
});
const s = k_();
s.x = e.x, s.y = e.y, s.fill = e.fill, s.width = r.width, s.height = r.height, s.class = "task task-type-" + e.num, s.rx = 3, s.ry = 3, L0(i, s);
let o = e.x + 14;
e.people.forEach((l) => {
const u = e.actors[l].color, h = {
cx: o,
cy: e.y,
r: 7,
fill: u,
stroke: "#000",
title: l,
pos: e.actors[l].position
};
mR(i, h), o += 10;
}), _R(r)(
e.task,
i,
s.x,
s.y,
s.width,
s.height,
{ class: "task" },
r,
e.colour
);
}, nlt = function(t, e) {
L0(t, {
x: e.startx,
y: e.starty,
width: e.stopx - e.startx,
height: e.stopy - e.starty,
fill: e.fill,
class: "rect"
}).lower();
}, ilt = function() {
return {
x: 0,
y: 0,
fill: void 0,
"text-anchor": "start",
width: 100,
height: 100,
textMargin: 0,
rx: 0,
ry: 0
};
}, k_ = function() {
return {
x: 0,
y: 0,
width: 100,
anchor: "start",
height: 100,
rx: 0,
ry: 0
};
}, _R = function() {
function t(i, a, s, o, l, u, h, d) {
const f = a.append("text").attr("x", s + l / 2).attr("y", o + u / 2 + 5).style("font-color", d).style("text-anchor", "middle").text(i);
n(f, h);
}
function e(i, a, s, o, l, u, h, d, f) {
const { taskFontSize: p, taskFontFamily: m } = d, _ = i.split(/
/gi);
for (let y = 0; y < _.length; y++) {
const b = y * p - p * (_.length - 1) / 2, x = a.append("text").attr("x", s + l / 2).attr("y", o).attr("fill", f).style("text-anchor", "middle").style("font-size", p).style("font-family", m);
x.append("tspan").attr("x", s + l / 2).attr("dy", b).text(_[y]), x.attr("y", o + u / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), n(x, h);
}
}
function r(i, a, s, o, l, u, h, d) {
const f = a.append("switch"), m = f.append("foreignObject").attr("x", s).attr("y", o).attr("width", l).attr("height", u).attr("position", "fixed").append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
m.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(i), e(i, f, s, o, l, u, h, d), n(m, h);
}
function n(i, a) {
for (const s in a)
s in a && i.attr(s, a[s]);
}
return function(i) {
return i.textPlacement === "fo" ? r : i.textPlacement === "old" ? t : e;
};
}(), alt = function(t) {
t.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 5).attr("refY", 2).attr("markerWidth", 6).attr("markerHeight", 4).attr("orient", "auto").append("path").attr("d", "M 0,0 V 4 L6,2 Z");
}, jc = {
drawRect: L0,
drawCircle: mR,
drawSection: elt,
drawText: bR,
drawLabel: tlt,
drawTask: rlt,
drawBackgroundRect: nlt,
getTextObj: ilt,
getNoteRect: k_,
initGraphics: alt
}, slt = function(t) {
Object.keys(t).forEach(function(r) {
R0[r] = t[r];
});
}, fa = {};
function olt(t) {
const e = nt().journey;
let r = 60;
Object.keys(fa).forEach((n) => {
const i = fa[n].color, a = {
cx: 20,
cy: r,
r: 7,
fill: i,
stroke: "#000",
pos: fa[n].position
};
jc.drawCircle(t, a);
const s = {
x: 40,
y: r + 7,
fill: "#666",
text: n,
textMargin: e.boxTextMargin | 5
};
jc.drawText(t, s), r += 20;
});
}
const R0 = nt().journey, vs = R0.leftMargin, llt = function(t, e, r, n) {
const i = nt().journey;
n.db.clear(), n.parser.parse(t + `
`);
const a = nt().securityLevel;
let s;
a === "sandbox" && (s = St("#i" + e));
const o = St(a === "sandbox" ? s.nodes()[0].contentDocument.body : "body");
Bn.init();
const l = o.select("#" + e);
jc.initGraphics(l);
const u = n.db.getTasks(), h = n.db.getDiagramTitle(), d = n.db.getActors();
for (const b in fa)
delete fa[b];
let f = 0;
d.forEach((b) => {
fa[b] = {
color: i.actorColours[f % i.actorColours.length],
position: f
}, f++;
}), olt(l), Bn.insert(0, 0, vs, Object.keys(fa).length * 50), clt(l, u, 0);
const p = Bn.getBounds();
h && l.append("text").text(h).attr("x", vs).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 25);
const m = p.stopy - p.starty + 2 * i.diagramMarginY, _ = vs + p.stopx + 2 * i.diagramMarginX;
di(l, m, _, i.useMaxWidth), l.append("line").attr("x1", vs).attr("y1", i.height * 4).attr("x2", _ - vs - 4).attr("y2", i.height * 4).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)");
const y = h ? 70 : 0;
l.attr("viewBox", `${p.startx} -25 ${_} ${m + y}`), l.attr("preserveAspectRatio", "xMinYMin meet"), l.attr("height", m + y + 25), vn(n.db, l, e);
}, Bn = {
data: {
startx: void 0,
stopx: void 0,
starty: void 0,
stopy: void 0
},
verticalPos: 0,
sequenceItems: [],
init: function() {
this.sequenceItems = [], this.data = {
startx: void 0,
stopx: void 0,
starty: void 0,
stopy: void 0
}, this.verticalPos = 0;
},
updateVal: function(t, e, r, n) {
typeof t[e] > "u" ? t[e] = r : t[e] = n(r, t[e]);
},
updateBounds: function(t, e, r, n) {
const i = nt().journey, a = this;
let s = 0;
function o(l) {
return function(h) {
s++;
const d = a.sequenceItems.length - s + 1;
a.updateVal(h, "starty", e - d * i.boxMargin, Math.min), a.updateVal(h, "stopy", n + d * i.boxMargin, Math.max), a.updateVal(Bn.data, "startx", t - d * i.boxMargin, Math.min), a.updateVal(Bn.data, "stopx", r + d * i.boxMargin, Math.max), l !== "activation" && (a.updateVal(h, "startx", t - d * i.boxMargin, Math.min), a.updateVal(h, "stopx", r + d * i.boxMargin, Math.max), a.updateVal(Bn.data, "starty", e - d * i.boxMargin, Math.min), a.updateVal(Bn.data, "stopy", n + d * i.boxMargin, Math.max));
};
}
this.sequenceItems.forEach(o());
},
insert: function(t, e, r, n) {
const i = Math.min(t, r), a = Math.max(t, r), s = Math.min(e, n), o = Math.max(e, n);
this.updateVal(Bn.data, "startx", i, Math.min), this.updateVal(Bn.data, "starty", s, Math.min), this.updateVal(Bn.data, "stopx", a, Math.max), this.updateVal(Bn.data, "stopy", o, Math.max), this.updateBounds(i, s, a, o);
},
bumpVerticalPos: function(t) {
this.verticalPos = this.verticalPos + t, this.data.stopy = this.verticalPos;
},
getVerticalPos: function() {
return this.verticalPos;
},
getBounds: function() {
return this.data;
}
}, fm = R0.sectionFills, Ow = R0.sectionColours, clt = function(t, e, r) {
const n = nt().journey;
let i = "";
const a = n.height * 2 + n.diagramMarginY, s = r + a;
let o = 0, l = "#CCC", u = "black", h = 0;
for (let d = 0; d < e.length; d++) {
const f = e[d];
if (i !== f.section) {
l = fm[o % fm.length], h = o % fm.length, u = Ow[o % Ow.length];
const m = {
x: d * n.taskMargin + d * n.width + vs,
y: 50,
text: f.section,
fill: l,
num: h,
colour: u
};
jc.drawSection(t, m, n), i = f.section, o++;
}
const p = f.people.reduce((m, _) => (fa[_] && (m[_] = fa[_]), m), {});
f.x = d * n.taskMargin + d * n.width + vs, f.y = s, f.width = n.diagramMarginX, f.height = n.diagramMarginY, f.colour = u, f.fill = l, f.num = h, f.actors = p, jc.drawTask(t, f, n), Bn.insert(f.x, f.y, f.x + f.width + n.taskMargin, 300 + 5 * 30);
}
}, Fw = {
setConf: slt,
draw: llt
};
let Pw = {};
const ult = function(t) {
Pw = { ...Pw, ...t };
}, hlt = (t, e, r) => {
try {
H.debug(`Renering svg for syntax error
`);
const n = St("#" + e), i = n.append("g");
i.append("path").attr("class", "error-icon").attr(
"d",
"m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"
), i.append("path").attr("class", "error-icon").attr(
"d",
"m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"
), i.append("path").attr("class", "error-icon").attr(
"d",
"m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"
), i.append("path").attr("class", "error-icon").attr(
"d",
"m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"
), i.append("path").attr("class", "error-icon").attr(
"d",
"m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"
), i.append("path").attr("class", "error-icon").attr(
"d",
"m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"
), i.append("text").attr("class", "error-text").attr("x", 1440).attr("y", 250).attr("font-size", "150px").style("text-anchor", "middle").text("Syntax error in graph"), i.append("text").attr("class", "error-text").attr("x", 1250).attr("y", 400).attr("font-size", "100px").style("text-anchor", "middle").text("mermaid version " + r), n.attr("height", 100), n.attr("width", 500), n.attr("viewBox", "768 0 912 512");
} catch (n) {
H.error("Error while rendering info diagram"), H.error(vX(n));
}
}, w_ = {
setConf: ult,
draw: hlt
};
let qw = !1;
const bu = () => {
qw || (qw = !0, Er(
"error",
{
db: {
clear: () => {
}
},
styles: gA,
renderer: w_,
parser: {
parser: { yy: {} },
parse: () => {
}
},
init: () => {
}
},
(t) => t.toLowerCase().trim() === "error"
), Er(
"c4",
{
parser: Pc,
db: BA,
renderer: S6,
styles: kA,
init: (t) => {
S6.setConf(t.c4);
}
},
OK
), Er(
"class",
{
parser: Yf,
db: vo,
renderer: wet,
styles: sc,
init: (t) => {
t.class || (t.class = {}), t.class.arrowMarkerAbsolute = t.arrowMarkerAbsolute, vo.clear();
}
},
RZ
), Er(
"classDiagram",
{
parser: Yf,
db: vo,
renderer: Brt,
styles: sc,
init: (t) => {
t.class || (t.class = {}), t.class.arrowMarkerAbsolute = t.arrowMarkerAbsolute, vo.clear();
}
},
IZ
), Er(
"er",
{
parser: Mb,
db: Wrt,
renderer: snt,
styles: pA
},
Drt
), Er(
"gantt",
{
parser: Rb,
db: m_,
renderer: pat,
styles: yA
},
Oit
), Er(
"info",
{
parser: Db,
db: _at,
renderer: xat,
styles: mA
},
kat
), Er(
"pie",
{
parser: Ob,
db: Rat,
renderer: Nat,
styles: bA
},
wat
), Er(
"requirement",
{
parser: Fb,
db: Jat,
renderer: lst,
styles: _A
},
Bat
), Er(
"sequence",
{
parser: qb,
db: Cw,
renderer: Aw,
styles: vA,
init: (t) => {
if (t.sequence || (t.sequence = {}), t.sequence.arrowMarkerAbsolute = t.arrowMarkerAbsolute, "sequenceDiagram" in t)
throw new Error(
"`mermaid config.sequenceDiagram` has been renamed to `config.sequence`. Please update your mermaid config."
);
Cw.setWrap(t.wrap), Aw.setConf(t.sequence);
}
},
cst
), Er(
"state",
{
parser: i1,
db: la,
renderer: Oot,
styles: Bf,
init: (t) => {
t.state || (t.state = {}), t.state.arrowMarkerAbsolute = t.arrowMarkerAbsolute, la.clear();
}
},
not
), Er(
"stateDiagram",
{
parser: i1,
db: la,
renderer: Yot,
styles: Bf,
init: (t) => {
t.state || (t.state = {}), t.state.arrowMarkerAbsolute = t.arrowMarkerAbsolute, la.clear();
}
},
iot
), Er(
"journey",
{
parser: jb,
db: Bw,
renderer: Fw,
styles: xA,
init: (t) => {
Fw.setConf(t.journey), Bw.clear();
}
},
Uot
), Er(
"flowchart",
{
parser: Kf,
db: oa,
renderer: um,
styles: Nf,
init: (t) => {
t.flowchart || (t.flowchart = {}), t.flowchart.arrowMarkerAbsolute = t.arrowMarkerAbsolute, h_.setConf(t.flowchart), oa.clear(), oa.setGen("gen-1");
}
},
ont
), Er(
"flowchart-v2",
{
parser: Kf,
db: oa,
renderer: um,
styles: Nf,
init: (t) => {
t.flowchart || (t.flowchart = {}), t.flowchart.arrowMarkerAbsolute = t.arrowMarkerAbsolute, fA({ flowchart: { arrowMarkerAbsolute: t.arrowMarkerAbsolute } }), um.setConf(t.flowchart), oa.clear(), oa.setGen("gen-2");
}
},
lnt
), Er(
"gitGraph",
{ parser: wb, db: CK, renderer: BK, styles: DK },
oK
));
};
class $c {
constructor(e, r) {
io(this, "type", "graph");
io(this, "parser");
io(this, "renderer");
io(this, "db");
io(this, "detectTypeFailed", !1);
var a, s;
this.txt = e;
const n = nt();
this.txt = e;
try {
this.type = b4(e, n);
} catch (o) {
this.handleError(o, r), this.type = "error", this.detectTypeFailed = !0;
}
const i = EA(this.type);
H.debug("Type " + this.type), this.db = i.db, (s = (a = this.db).clear) == null || s.call(a), this.renderer = i.renderer, this.parser = i.parser, this.parser.parser.yy = this.db, i.init && (i.init(n), H.debug("Initialized diagram " + this.type, n)), this.txt += `
`, this.parse(this.txt, r);
}
parse(e, r) {
if (this.detectTypeFailed)
return !1;
try {
return e = e + `
`, this.db.clear(), this.parser.parse(e), !0;
} catch (n) {
this.handleError(n, r);
}
return !1;
}
handleError(e, r) {
if (r)
T4(e) ? r(e.str, e.hash) : r(e);
else
throw e;
}
getParser() {
return this.parser;
}
getType() {
return this.type;
}
}
const T_ = (t, e) => {
const r = b4(t, nt());
try {
return EA(r), new $c(t, e);
} catch (n) {
if (!(n instanceof CA))
throw H.error(n), n;
const i = nj(r);
if (!i)
throw new Error(`Loader for ${r} not found.`);
return i().then(({ diagram: a }) => (Er(r, a, void 0, a.injectUtils), new $c(t, e)));
}
};
function flt(t, e) {
return bu(), new $c(t, e).parse(t, e);
}
async function dlt(t, e) {
return bu(), (await T_(t, e)).parse(t, e);
}
const vR = function(t) {
let e = t;
return e = e.replace(/style.*:\S*#.*;/g, function(r) {
return r.substring(0, r.length - 1);
}), e = e.replace(/classDef.*:\S*#.*;/g, function(r) {
return r.substring(0, r.length - 1);
}), e = e.replace(/#\w+;/g, function(r) {
const n = r.substring(1, r.length - 1);
return /^\+?\d+$/.test(n) ? "\uFB02\xB0\xB0" + n + "\xB6\xDF" : "\uFB02\xB0" + n + "\xB6\xDF";
}), e;
}, I0 = function(t) {
let e = t;
return e = e.replace(/fl°°/g, function() {
return "";
}), e = e.replace(/fl°/g, function() {
return "&";
}), e = e.replace(/¶ß/g, function() {
return ";";
}), e;
}, plt = function(t, e, r, n) {
var T;
bu(), Dc(), e = e.replace(/\r\n?/g, `
`);
const i = Re.detectInit(e);
i && (qs(i), S4(i));
const a = nt();
H.debug(a), e.length > a.maxTextSize && (e = "graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");
let s = St("body");
if (typeof n < "u") {
if (n && (n.innerHTML = ""), a.securityLevel === "sandbox") {
const C = St(n).append("iframe").attr("id", "i" + t).attr("style", "width: 100%; height: 100%;").attr("sandbox", "");
s = St(C.nodes()[0].contentDocument.body), s.node().style.margin = 0;
} else
s = St(n);
s.append("div").attr("id", "d" + t).attr("style", "font-family: " + a.fontFamily).append("svg").attr("id", t).attr("width", "100%").attr("xmlns", "http://www.w3.org/2000/svg").attr("xmlns:xlink", "http://www.w3.org/1999/xlink").append("g");
} else {
const C = document.getElementById(t);
C && C.remove();
let M;
if (a.securityLevel === "sandbox" ? M = document.querySelector("#i" + t) : M = document.querySelector("#d" + t), M && M.remove(), a.securityLevel === "sandbox") {
const S = St("body").append("iframe").attr("id", "i" + t).attr("style", "width: 100%; height: 100%;").attr("sandbox", "");
s = St(S.nodes()[0].contentDocument.body), s.node().style.margin = 0;
} else
s = St("body");
s.append("div").attr("id", "d" + t).append("svg").attr("id", t).attr("width", "100%").attr("xmlns", "http://www.w3.org/2000/svg").append("g");
}
e = vR(e);
let o, l;
try {
if (o = T_(e), "then" in o)
throw new Error("Diagram is a promise");
} catch (C) {
o = new $c("error"), l = C;
}
const u = s.select("#d" + t).node(), h = o.type, d = u.firstChild, f = d.firstChild;
let p = "";
if (a.themeCSS !== void 0 && (p += `
${a.themeCSS}`), a.fontFamily !== void 0 && (p += `
:root { --mermaid-font-family: ${a.fontFamily}}`), a.altFontFamily !== void 0 && (p += `
:root { --mermaid-alt-font-family: ${a.altFontFamily}}`), h === "flowchart" || h === "flowchart-v2" || h === "graph") {
const C = h_.getClasses(e, o), M = a.htmlLabels || ((T = a.flowchart) == null ? void 0 : T.htmlLabels);
for (const S in C)
M ? (p += `
.${S} > * { ${C[S].styles.join(
" !important; "
)} !important; }`, p += `
.${S} span { ${C[S].styles.join(
" !important; "
)} !important; }`) : (p += `
.${S} path { ${C[S].styles.join(
" !important; "
)} !important; }`, p += `
.${S} rect { ${C[S].styles.join(
" !important; "
)} !important; }`, p += `
.${S} polygon { ${C[S].styles.join(
" !important; "
)} !important; }`, p += `
.${S} ellipse { ${C[S].styles.join(
" !important; "
)} !important; }`, p += `
.${S} circle { ${C[S].styles.join(
" !important; "
)} !important; }`, C[S].textStyles && (p += `
.${S} tspan { ${C[S].textStyles.join(
" !important; "
)} !important; }`));
}
const _ = ((C, M) => Rf(lA(`${C}{${M}}`), cA))(`#${t}`, wA(h, p, a.themeVariables)), y = document.createElement("style");
y.innerHTML = `#${t} ` + _, d.insertBefore(y, f);
try {
o.renderer.draw(e, t, If.version, o);
} catch (C) {
throw w_.draw(e, t, If.version), C;
}
s.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns", "http://www.w3.org/1999/xhtml");
let b = s.select("#d" + t).node().innerHTML;
if (H.debug("cnf.arrowMarkerAbsolute", a.arrowMarkerAbsolute), !Mr(a.arrowMarkerAbsolute) && a.securityLevel !== "sandbox" && (b = b.replace(/marker-end="url\(.*?#/g, 'marker-end="url(#', "g")), b = I0(b), b = b.replace(/
/g, "
"), a.securityLevel === "sandbox") {
const C = s.select("#d" + t + " svg").node(), M = "100%";
let S = "100%";
C && (S = C.viewBox.baseVal.height + "px"), b = `