mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-04-25 14:51:53 +02:00
27701 lines
1.1 MiB
27701 lines
1.1 MiB
var Mb = Object.defineProperty;
|
||
var Nb = (t, e, r) => e in t ? Mb(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
||
var Us = (t, e, r) => (Nb(t, typeof e != "symbol" ? e + "" : e, r), r);
|
||
var Bb = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
||
function Ib(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 zp = { exports: {} };
|
||
(function(t, e) {
|
||
(function(r, n) {
|
||
t.exports = n();
|
||
})(Bb, function() {
|
||
var r;
|
||
function n() {
|
||
return r.apply(null, arguments);
|
||
}
|
||
function i(h) {
|
||
return h instanceof Array || Object.prototype.toString.call(h) === "[object Array]";
|
||
}
|
||
function s(h) {
|
||
return h != null && Object.prototype.toString.call(h) === "[object Object]";
|
||
}
|
||
function a(h, y) {
|
||
return Object.prototype.hasOwnProperty.call(h, y);
|
||
}
|
||
function o(h) {
|
||
if (Object.getOwnPropertyNames)
|
||
return Object.getOwnPropertyNames(h).length === 0;
|
||
for (var y in h)
|
||
if (a(h, y))
|
||
return;
|
||
return 1;
|
||
}
|
||
function l(h) {
|
||
return h === void 0;
|
||
}
|
||
function u(h) {
|
||
return typeof h == "number" || Object.prototype.toString.call(h) === "[object Number]";
|
||
}
|
||
function d(h) {
|
||
return h instanceof Date || Object.prototype.toString.call(h) === "[object Date]";
|
||
}
|
||
function f(h, y) {
|
||
for (var _ = [], S = h.length, R = 0; R < S; ++R)
|
||
_.push(y(h[R], R));
|
||
return _;
|
||
}
|
||
function p(h, y) {
|
||
for (var _ in y)
|
||
a(y, _) && (h[_] = y[_]);
|
||
return a(y, "toString") && (h.toString = y.toString), a(y, "valueOf") && (h.valueOf = y.valueOf), h;
|
||
}
|
||
function g(h, y, _, S) {
|
||
return br(h, y, _, S, !0).utc();
|
||
}
|
||
function b(h) {
|
||
return h._pf == null && (h._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 }), h._pf;
|
||
}
|
||
function k(h) {
|
||
if (h._isValid == null) {
|
||
var y = b(h), _ = L.call(y.parsedDateParts, function(S) {
|
||
return S != null;
|
||
}), _ = !isNaN(h._d.getTime()) && y.overflow < 0 && !y.empty && !y.invalidEra && !y.invalidMonth && !y.invalidWeekday && !y.weekdayMismatch && !y.nullInput && !y.invalidFormat && !y.userInvalidated && (!y.meridiem || y.meridiem && _);
|
||
if (h._strict && (_ = _ && y.charsLeftOver === 0 && y.unusedTokens.length === 0 && y.bigHour === void 0), Object.isFrozen != null && Object.isFrozen(h))
|
||
return _;
|
||
h._isValid = _;
|
||
}
|
||
return h._isValid;
|
||
}
|
||
function T(h) {
|
||
var y = g(NaN);
|
||
return h != null ? p(b(y), h) : b(y).userInvalidated = !0, y;
|
||
}
|
||
var L = Array.prototype.some || function(h) {
|
||
for (var y = Object(this), _ = y.length >>> 0, S = 0; S < _; S++)
|
||
if (S in y && h.call(this, y[S], S, y))
|
||
return !0;
|
||
return !1;
|
||
}, E = n.momentProperties = [], I = !1;
|
||
function V(h, y) {
|
||
var _, S, R, it = E.length;
|
||
if (l(y._isAMomentObject) || (h._isAMomentObject = y._isAMomentObject), l(y._i) || (h._i = y._i), l(y._f) || (h._f = y._f), l(y._l) || (h._l = y._l), l(y._strict) || (h._strict = y._strict), l(y._tzm) || (h._tzm = y._tzm), l(y._isUTC) || (h._isUTC = y._isUTC), l(y._offset) || (h._offset = y._offset), l(y._pf) || (h._pf = b(y)), l(y._locale) || (h._locale = y._locale), 0 < it)
|
||
for (_ = 0; _ < it; _++)
|
||
l(R = y[S = E[_]]) || (h[S] = R);
|
||
return h;
|
||
}
|
||
function H(h) {
|
||
V(this, h), this._d = new Date(h._d != null ? h._d.getTime() : NaN), this.isValid() || (this._d = new Date(NaN)), I === !1 && (I = !0, n.updateOffset(this), I = !1);
|
||
}
|
||
function G(h) {
|
||
return h instanceof H || h != null && h._isAMomentObject != null;
|
||
}
|
||
function Y(h) {
|
||
n.suppressDeprecationWarnings === !1 && typeof console < "u" && console.warn && console.warn("Deprecation warning: " + h);
|
||
}
|
||
function W(h, y) {
|
||
var _ = !0;
|
||
return p(function() {
|
||
if (n.deprecationHandler != null && n.deprecationHandler(null, h), _) {
|
||
for (var S, R, it = [], yt = arguments.length, Ct = 0; Ct < yt; Ct++) {
|
||
if (S = "", typeof arguments[Ct] == "object") {
|
||
for (R in S += `
|
||
[` + Ct + "] ", arguments[0])
|
||
a(arguments[0], R) && (S += R + ": " + arguments[0][R] + ", ");
|
||
S = S.slice(0, -2);
|
||
} else
|
||
S = arguments[Ct];
|
||
it.push(S);
|
||
}
|
||
Y(h + `
|
||
Arguments: ` + Array.prototype.slice.call(it).join("") + `
|
||
` + new Error().stack), _ = !1;
|
||
}
|
||
return y.apply(this, arguments);
|
||
}, y);
|
||
}
|
||
var N = {};
|
||
function D(h, y) {
|
||
n.deprecationHandler != null && n.deprecationHandler(h, y), N[h] || (Y(y), N[h] = !0);
|
||
}
|
||
function w(h) {
|
||
return typeof Function < "u" && h instanceof Function || Object.prototype.toString.call(h) === "[object Function]";
|
||
}
|
||
function v(h, y) {
|
||
var _, S = p({}, h);
|
||
for (_ in y)
|
||
a(y, _) && (s(h[_]) && s(y[_]) ? (S[_] = {}, p(S[_], h[_]), p(S[_], y[_])) : y[_] != null ? S[_] = y[_] : delete S[_]);
|
||
for (_ in h)
|
||
a(h, _) && !a(y, _) && s(h[_]) && (S[_] = p({}, S[_]));
|
||
return S;
|
||
}
|
||
function M(h) {
|
||
h != null && this.set(h);
|
||
}
|
||
n.suppressDeprecationWarnings = !1, n.deprecationHandler = null;
|
||
var m = Object.keys || function(h) {
|
||
var y, _ = [];
|
||
for (y in h)
|
||
a(h, y) && _.push(y);
|
||
return _;
|
||
};
|
||
function Q(h, y, _) {
|
||
var S = "" + Math.abs(h);
|
||
return (0 <= h ? _ ? "+" : "" : "-") + Math.pow(10, Math.max(0, y - S.length)).toString().substr(1) + S;
|
||
}
|
||
var x = /(\[[^\[]*\])|(\\)?([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, ct = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, Dt = {}, vt = {};
|
||
function j(h, y, _, S) {
|
||
var R = typeof S == "string" ? function() {
|
||
return this[S]();
|
||
} : S;
|
||
h && (vt[h] = R), y && (vt[y[0]] = function() {
|
||
return Q(R.apply(this, arguments), y[1], y[2]);
|
||
}), _ && (vt[_] = function() {
|
||
return this.localeData().ordinal(R.apply(this, arguments), h);
|
||
});
|
||
}
|
||
function ot(h, y) {
|
||
return h.isValid() ? (y = rt(y, h.localeData()), Dt[y] = Dt[y] || function(_) {
|
||
for (var S, R = _.match(x), it = 0, yt = R.length; it < yt; it++)
|
||
vt[R[it]] ? R[it] = vt[R[it]] : R[it] = (S = R[it]).match(/\[[\s\S]/) ? S.replace(/^\[|\]$/g, "") : S.replace(/\\/g, "");
|
||
return function(Ct) {
|
||
for (var Pt = "", It = 0; It < yt; It++)
|
||
Pt += w(R[It]) ? R[It].call(Ct, _) : R[It];
|
||
return Pt;
|
||
};
|
||
}(y), Dt[y](h)) : h.localeData().invalidDate();
|
||
}
|
||
function rt(h, y) {
|
||
var _ = 5;
|
||
function S(R) {
|
||
return y.longDateFormat(R) || R;
|
||
}
|
||
for (ct.lastIndex = 0; 0 <= _ && ct.test(h); )
|
||
h = h.replace(ct, S), ct.lastIndex = 0, --_;
|
||
return h;
|
||
}
|
||
var nt = {};
|
||
function ut(h, y) {
|
||
var _ = h.toLowerCase();
|
||
nt[_] = nt[_ + "s"] = nt[y] = h;
|
||
}
|
||
function _t(h) {
|
||
return typeof h == "string" ? nt[h] || nt[h.toLowerCase()] : void 0;
|
||
}
|
||
function K(h) {
|
||
var y, _, S = {};
|
||
for (_ in h)
|
||
a(h, _) && (y = _t(_)) && (S[y] = h[_]);
|
||
return S;
|
||
}
|
||
var Ot = {};
|
||
function P(h, y) {
|
||
Ot[h] = y;
|
||
}
|
||
function z(h) {
|
||
return h % 4 == 0 && h % 100 != 0 || h % 400 == 0;
|
||
}
|
||
function $(h) {
|
||
return h < 0 ? Math.ceil(h) || 0 : Math.floor(h);
|
||
}
|
||
function F(y) {
|
||
var y = +y, _ = 0;
|
||
return _ = y != 0 && isFinite(y) ? $(y) : _;
|
||
}
|
||
function O(h, y) {
|
||
return function(_) {
|
||
return _ != null ? (J(this, h, _), n.updateOffset(this, y), this) : A(this, h);
|
||
};
|
||
}
|
||
function A(h, y) {
|
||
return h.isValid() ? h._d["get" + (h._isUTC ? "UTC" : "") + y]() : NaN;
|
||
}
|
||
function J(h, y, _) {
|
||
h.isValid() && !isNaN(_) && (y === "FullYear" && z(h.year()) && h.month() === 1 && h.date() === 29 ? (_ = F(_), h._d["set" + (h._isUTC ? "UTC" : "") + y](_, h.month(), dt(_, h.month()))) : h._d["set" + (h._isUTC ? "UTC" : "") + y](_));
|
||
}
|
||
var C = /\d/, ce = /\d\d/, ht = /\d{3}/, rs = /\d{4}/, Oi = /[+-]?\d{6}/, U = /\d\d?/, Yt = /\d\d\d\d?/, et = /\d\d\d\d\d\d?/, Mt = /\d{1,3}/, Ri = /\d{1,4}/, Ii = /[+-]?\d{1,6}/, Tt = /\d+/, gt = /[+-]?\d+/, Et = /Z|[+-]\d\d:?\d\d/gi, wt = /Z|[+-]\d\d(?::?\d\d)?/gi, pt = /[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 st(h, y, _) {
|
||
jt[h] = w(y) ? y : function(S, R) {
|
||
return S && _ ? _ : y;
|
||
};
|
||
}
|
||
function le(h, y) {
|
||
return a(jt, h) ? jt[h](y._strict, y._locale) : new RegExp($t(h.replace("\\", "").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function(_, S, R, it, yt) {
|
||
return S || R || it || yt;
|
||
})));
|
||
}
|
||
function $t(h) {
|
||
return h.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&");
|
||
}
|
||
var jt = {}, Kt = {};
|
||
function Gt(h, y) {
|
||
var _, S, R = y;
|
||
for (typeof h == "string" && (h = [h]), u(y) && (R = function(it, yt) {
|
||
yt[y] = F(it);
|
||
}), S = h.length, _ = 0; _ < S; _++)
|
||
Kt[h[_]] = R;
|
||
}
|
||
function Ee(h, y) {
|
||
Gt(h, function(_, S, R, it) {
|
||
R._w = R._w || {}, y(_, R._w, R, it);
|
||
});
|
||
}
|
||
var Ht, Vt = 0, Ft = 1, xt = 2, ft = 3, Lt = 4, bt = 5, Ut = 6, at = 7, ne = 8;
|
||
function dt(h, y) {
|
||
if (isNaN(h) || isNaN(y))
|
||
return NaN;
|
||
var _ = (y % (_ = 12) + _) % _;
|
||
return h += (y - _) / 12, _ == 1 ? z(h) ? 29 : 28 : 31 - _ % 7 % 2;
|
||
}
|
||
Ht = Array.prototype.indexOf || function(h) {
|
||
for (var y = 0; y < this.length; ++y)
|
||
if (this[y] === h)
|
||
return y;
|
||
return -1;
|
||
}, j("M", ["MM", 2], "Mo", function() {
|
||
return this.month() + 1;
|
||
}), j("MMM", 0, 0, function(h) {
|
||
return this.localeData().monthsShort(this, h);
|
||
}), j("MMMM", 0, 0, function(h) {
|
||
return this.localeData().months(this, h);
|
||
}), ut("month", "M"), P("month", 8), st("M", U), st("MM", U, ce), st("MMM", function(h, y) {
|
||
return y.monthsShortRegex(h);
|
||
}), st("MMMM", function(h, y) {
|
||
return y.monthsRegex(h);
|
||
}), Gt(["M", "MM"], function(h, y) {
|
||
y[Ft] = F(h) - 1;
|
||
}), Gt(["MMM", "MMMM"], function(h, y, _, S) {
|
||
S = _._locale.monthsParse(h, S, _._strict), S != null ? y[Ft] = S : b(_).invalidMonth = h;
|
||
});
|
||
var ee = "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), de = "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"), me = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/, be = pt, ke = pt;
|
||
function Xt(h, y) {
|
||
var _;
|
||
if (h.isValid()) {
|
||
if (typeof y == "string") {
|
||
if (/^\d+$/.test(y))
|
||
y = F(y);
|
||
else if (!u(y = h.localeData().monthsParse(y)))
|
||
return;
|
||
}
|
||
_ = Math.min(h.date(), dt(h.year(), y)), h._d["set" + (h._isUTC ? "UTC" : "") + "Month"](y, _);
|
||
}
|
||
}
|
||
function ie(h) {
|
||
return h != null ? (Xt(this, h), n.updateOffset(this, !0), this) : A(this, "Month");
|
||
}
|
||
function ge() {
|
||
function h(yt, Ct) {
|
||
return Ct.length - yt.length;
|
||
}
|
||
for (var y, _ = [], S = [], R = [], it = 0; it < 12; it++)
|
||
y = g([2e3, it]), _.push(this.monthsShort(y, "")), S.push(this.months(y, "")), R.push(this.months(y, "")), R.push(this.monthsShort(y, ""));
|
||
for (_.sort(h), S.sort(h), R.sort(h), it = 0; it < 12; it++)
|
||
_[it] = $t(_[it]), S[it] = $t(S[it]);
|
||
for (it = 0; it < 24; it++)
|
||
R[it] = $t(R[it]);
|
||
this._monthsRegex = new RegExp("^(" + R.join("|") + ")", "i"), this._monthsShortRegex = this._monthsRegex, this._monthsStrictRegex = new RegExp("^(" + S.join("|") + ")", "i"), this._monthsShortStrictRegex = new RegExp("^(" + _.join("|") + ")", "i");
|
||
}
|
||
function Qt(h) {
|
||
return z(h) ? 366 : 365;
|
||
}
|
||
j("Y", 0, 0, function() {
|
||
var h = this.year();
|
||
return h <= 9999 ? Q(h, 4) : "+" + h;
|
||
}), j(0, ["YY", 2], 0, function() {
|
||
return this.year() % 100;
|
||
}), j(0, ["YYYY", 4], 0, "year"), j(0, ["YYYYY", 5], 0, "year"), j(0, ["YYYYYY", 6, !0], 0, "year"), ut("year", "y"), P("year", 1), st("Y", gt), st("YY", U, ce), st("YYYY", Ri, rs), st("YYYYY", Ii, Oi), st("YYYYYY", Ii, Oi), Gt(["YYYYY", "YYYYYY"], Vt), Gt("YYYY", function(h, y) {
|
||
y[Vt] = h.length === 2 ? n.parseTwoDigitYear(h) : F(h);
|
||
}), Gt("YY", function(h, y) {
|
||
y[Vt] = n.parseTwoDigitYear(h);
|
||
}), Gt("Y", function(h, y) {
|
||
y[Vt] = parseInt(h, 10);
|
||
}), n.parseTwoDigitYear = function(h) {
|
||
return F(h) + (68 < F(h) ? 1900 : 2e3);
|
||
};
|
||
var pl = O("FullYear", !0);
|
||
function an(h, y, _, S, R, it, yt) {
|
||
var Ct;
|
||
return h < 100 && 0 <= h ? (Ct = new Date(h + 400, y, _, S, R, it, yt), isFinite(Ct.getFullYear()) && Ct.setFullYear(h)) : Ct = new Date(h, y, _, S, R, it, yt), Ct;
|
||
}
|
||
function Wr(h) {
|
||
var y;
|
||
return h < 100 && 0 <= h ? ((y = Array.prototype.slice.call(arguments))[0] = h + 400, y = new Date(Date.UTC.apply(null, y)), isFinite(y.getUTCFullYear()) && y.setUTCFullYear(h)) : y = new Date(Date.UTC.apply(null, arguments)), y;
|
||
}
|
||
function De(h, y, _) {
|
||
return _ = 7 + y - _, _ - (7 + Wr(h, 0, _).getUTCDay() - y) % 7 - 1;
|
||
}
|
||
function ae(h, yt, Ct, S, R) {
|
||
var it, yt = 1 + 7 * (yt - 1) + (7 + Ct - S) % 7 + De(h, S, R), Ct = yt <= 0 ? Qt(it = h - 1) + yt : yt > Qt(h) ? (it = h + 1, yt - Qt(h)) : (it = h, yt);
|
||
return { year: it, dayOfYear: Ct };
|
||
}
|
||
function Be(h, y, _) {
|
||
var S, R, it = De(h.year(), y, _), it = Math.floor((h.dayOfYear() - it - 1) / 7) + 1;
|
||
return it < 1 ? S = it + Oe(R = h.year() - 1, y, _) : it > Oe(h.year(), y, _) ? (S = it - Oe(h.year(), y, _), R = h.year() + 1) : (R = h.year(), S = it), { week: S, year: R };
|
||
}
|
||
function Oe(h, R, _) {
|
||
var S = De(h, R, _), R = De(h + 1, R, _);
|
||
return (Qt(h) - S + R) / 7;
|
||
}
|
||
j("w", ["ww", 2], "wo", "week"), j("W", ["WW", 2], "Wo", "isoWeek"), ut("week", "w"), ut("isoWeek", "W"), P("week", 5), P("isoWeek", 5), st("w", U), st("ww", U, ce), st("W", U), st("WW", U, ce), Ee(["w", "ww", "W", "WW"], function(h, y, _, S) {
|
||
y[S.substr(0, 1)] = F(h);
|
||
});
|
||
function Fe(h, y) {
|
||
return h.slice(y, 7).concat(h.slice(0, y));
|
||
}
|
||
j("d", 0, "do", "day"), j("dd", 0, 0, function(h) {
|
||
return this.localeData().weekdaysMin(this, h);
|
||
}), j("ddd", 0, 0, function(h) {
|
||
return this.localeData().weekdaysShort(this, h);
|
||
}), j("dddd", 0, 0, function(h) {
|
||
return this.localeData().weekdays(this, h);
|
||
}), j("e", 0, 0, "weekday"), j("E", 0, 0, "isoWeekday"), ut("day", "d"), ut("weekday", "e"), ut("isoWeekday", "E"), P("day", 11), P("weekday", 11), P("isoWeekday", 11), st("d", U), st("e", U), st("E", U), st("dd", function(h, y) {
|
||
return y.weekdaysMinRegex(h);
|
||
}), st("ddd", function(h, y) {
|
||
return y.weekdaysShortRegex(h);
|
||
}), st("dddd", function(h, y) {
|
||
return y.weekdaysRegex(h);
|
||
}), Ee(["dd", "ddd", "dddd"], function(h, y, _, S) {
|
||
S = _._locale.weekdaysParse(h, S, _._strict), S != null ? y.d = S : b(_).invalidWeekday = h;
|
||
}), Ee(["d", "e", "E"], function(h, y, _, S) {
|
||
y[S] = F(h);
|
||
});
|
||
var Pe = "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), Ie = "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"), Ge = "Su_Mo_Tu_We_Th_Fr_Sa".split("_"), tr = pt, zt = pt, Z = pt;
|
||
function St() {
|
||
function h(It, ue) {
|
||
return ue.length - It.length;
|
||
}
|
||
for (var y, _, S, R = [], it = [], yt = [], Ct = [], Pt = 0; Pt < 7; Pt++)
|
||
S = g([2e3, 1]).day(Pt), y = $t(this.weekdaysMin(S, "")), _ = $t(this.weekdaysShort(S, "")), S = $t(this.weekdays(S, "")), R.push(y), it.push(_), yt.push(S), Ct.push(y), Ct.push(_), Ct.push(S);
|
||
R.sort(h), it.sort(h), yt.sort(h), Ct.sort(h), this._weekdaysRegex = new RegExp("^(" + Ct.join("|") + ")", "i"), this._weekdaysShortRegex = this._weekdaysRegex, this._weekdaysMinRegex = this._weekdaysRegex, this._weekdaysStrictRegex = new RegExp("^(" + yt.join("|") + ")", "i"), this._weekdaysShortStrictRegex = new RegExp("^(" + it.join("|") + ")", "i"), this._weekdaysMinStrictRegex = new RegExp("^(" + R.join("|") + ")", "i");
|
||
}
|
||
function Nt() {
|
||
return this.hours() % 12 || 12;
|
||
}
|
||
function fe(h, y) {
|
||
j(h, 0, 0, function() {
|
||
return this.localeData().meridiem(this.hours(), this.minutes(), y);
|
||
});
|
||
}
|
||
function Me(h, y) {
|
||
return y._meridiemParse;
|
||
}
|
||
j("H", ["HH", 2], 0, "hour"), j("h", ["hh", 2], 0, Nt), j("k", ["kk", 2], 0, function() {
|
||
return this.hours() || 24;
|
||
}), j("hmm", 0, 0, function() {
|
||
return "" + Nt.apply(this) + Q(this.minutes(), 2);
|
||
}), j("hmmss", 0, 0, function() {
|
||
return "" + Nt.apply(this) + Q(this.minutes(), 2) + Q(this.seconds(), 2);
|
||
}), j("Hmm", 0, 0, function() {
|
||
return "" + this.hours() + Q(this.minutes(), 2);
|
||
}), j("Hmmss", 0, 0, function() {
|
||
return "" + this.hours() + Q(this.minutes(), 2) + Q(this.seconds(), 2);
|
||
}), fe("a", !0), fe("A", !1), ut("hour", "h"), P("hour", 13), st("a", Me), st("A", Me), st("H", U), st("h", U), st("k", U), st("HH", U, ce), st("hh", U, ce), st("kk", U, ce), st("hmm", Yt), st("hmmss", et), st("Hmm", Yt), st("Hmmss", et), Gt(["H", "HH"], ft), Gt(["k", "kk"], function(h, y, _) {
|
||
h = F(h), y[ft] = h === 24 ? 0 : h;
|
||
}), Gt(["a", "A"], function(h, y, _) {
|
||
_._isPm = _._locale.isPM(h), _._meridiem = h;
|
||
}), Gt(["h", "hh"], function(h, y, _) {
|
||
y[ft] = F(h), b(_).bigHour = !0;
|
||
}), Gt("hmm", function(h, y, _) {
|
||
var S = h.length - 2;
|
||
y[ft] = F(h.substr(0, S)), y[Lt] = F(h.substr(S)), b(_).bigHour = !0;
|
||
}), Gt("hmmss", function(h, y, _) {
|
||
var S = h.length - 4, R = h.length - 2;
|
||
y[ft] = F(h.substr(0, S)), y[Lt] = F(h.substr(S, 2)), y[bt] = F(h.substr(R)), b(_).bigHour = !0;
|
||
}), Gt("Hmm", function(h, y, _) {
|
||
var S = h.length - 2;
|
||
y[ft] = F(h.substr(0, S)), y[Lt] = F(h.substr(S));
|
||
}), Gt("Hmmss", function(h, y, _) {
|
||
var S = h.length - 4, R = h.length - 2;
|
||
y[ft] = F(h.substr(0, S)), y[Lt] = F(h.substr(S, 2)), y[bt] = F(h.substr(R));
|
||
}), pt = O("Hours", !0);
|
||
var Le, We = { 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: ee, monthsShort: de, week: { dow: 0, doy: 6 }, weekdays: Pe, weekdaysMin: Ge, weekdaysShort: Ie, meridiemParse: /[ap]\.?m?\.?/i }, xe = {}, Ne = {};
|
||
function Mi(h) {
|
||
return h && h.toLowerCase().replace("_", "-");
|
||
}
|
||
function Ni(h) {
|
||
for (var y, _, S, R, it = 0; it < h.length; ) {
|
||
for (y = (R = Mi(h[it]).split("-")).length, _ = (_ = Mi(h[it + 1])) ? _.split("-") : null; 0 < y; ) {
|
||
if (S = Rr(R.slice(0, y).join("-")))
|
||
return S;
|
||
if (_ && _.length >= y && function(yt, Ct) {
|
||
for (var Pt = Math.min(yt.length, Ct.length), It = 0; It < Pt; It += 1)
|
||
if (yt[It] !== Ct[It])
|
||
return It;
|
||
return Pt;
|
||
}(R, _) >= y - 1)
|
||
break;
|
||
y--;
|
||
}
|
||
it++;
|
||
}
|
||
return Le;
|
||
}
|
||
function Rr(h) {
|
||
var y;
|
||
if (xe[h] === void 0 && !0 && t && t.exports && h.match("^[^/\\\\]*$") != null)
|
||
try {
|
||
y = Le._abbr, Ib("./locale/" + h), qt(y);
|
||
} catch {
|
||
xe[h] = null;
|
||
}
|
||
return xe[h];
|
||
}
|
||
function qt(h, y) {
|
||
return h && ((y = l(y) ? oe(h) : te(h, y)) ? Le = y : typeof console < "u" && console.warn && console.warn("Locale " + h + " not found. Did you forget to load it?")), Le._abbr;
|
||
}
|
||
function te(h, y) {
|
||
if (y === null)
|
||
return delete xe[h], null;
|
||
var _, S = We;
|
||
if (y.abbr = h, xe[h] != null)
|
||
D("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."), S = xe[h]._config;
|
||
else if (y.parentLocale != null)
|
||
if (xe[y.parentLocale] != null)
|
||
S = xe[y.parentLocale]._config;
|
||
else {
|
||
if ((_ = Rr(y.parentLocale)) == null)
|
||
return Ne[y.parentLocale] || (Ne[y.parentLocale] = []), Ne[y.parentLocale].push({ name: h, config: y }), null;
|
||
S = _._config;
|
||
}
|
||
return xe[h] = new M(v(S, y)), Ne[h] && Ne[h].forEach(function(R) {
|
||
te(R.name, R.config);
|
||
}), qt(h), xe[h];
|
||
}
|
||
function oe(h) {
|
||
var y;
|
||
if (!(h = h && h._locale && h._locale._abbr ? h._locale._abbr : h))
|
||
return Le;
|
||
if (!i(h)) {
|
||
if (y = Rr(h))
|
||
return y;
|
||
h = [h];
|
||
}
|
||
return Ni(h);
|
||
}
|
||
function Rt(h) {
|
||
var y = h._a;
|
||
return y && b(h).overflow === -2 && (y = y[Ft] < 0 || 11 < y[Ft] ? Ft : y[xt] < 1 || y[xt] > dt(y[Vt], y[Ft]) ? xt : y[ft] < 0 || 24 < y[ft] || y[ft] === 24 && (y[Lt] !== 0 || y[bt] !== 0 || y[Ut] !== 0) ? ft : y[Lt] < 0 || 59 < y[Lt] ? Lt : y[bt] < 0 || 59 < y[bt] ? bt : y[Ut] < 0 || 999 < y[Ut] ? Ut : -1, b(h)._overflowDayOfYear && (y < Vt || xt < y) && (y = xt), b(h)._overflowWeeks && y === -1 && (y = at), b(h)._overflowWeekday && y === -1 && (y = ne), b(h).overflow = y), h;
|
||
}
|
||
var Ye = /^\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)?)?$/, q = /^\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)?)?$/, Qi = /Z|[+-]\d\d(?::?\d\d)?/, tt = [["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]], vr = [["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/]], ol = /^\/?Date\((-?\d+)/i, $u = /^(?:(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}))$/, ll = { UT: 0, GMT: 0, EDT: -240, EST: -300, CDT: -300, CST: -360, MDT: -360, MST: -420, PDT: -420, PST: -480 };
|
||
function cl(h) {
|
||
var y, _, S, R, it, yt, Pt = h._i, Ct = Ye.exec(Pt) || q.exec(Pt), Pt = tt.length, It = vr.length;
|
||
if (Ct) {
|
||
for (b(h).iso = !0, y = 0, _ = Pt; y < _; y++)
|
||
if (tt[y][1].exec(Ct[1])) {
|
||
R = tt[y][0], S = tt[y][2] !== !1;
|
||
break;
|
||
}
|
||
if (R == null)
|
||
h._isValid = !1;
|
||
else {
|
||
if (Ct[3]) {
|
||
for (y = 0, _ = It; y < _; y++)
|
||
if (vr[y][1].exec(Ct[3])) {
|
||
it = (Ct[2] || " ") + vr[y][0];
|
||
break;
|
||
}
|
||
if (it == null)
|
||
return void (h._isValid = !1);
|
||
}
|
||
if (S || it == null) {
|
||
if (Ct[4]) {
|
||
if (!Qi.exec(Ct[4]))
|
||
return void (h._isValid = !1);
|
||
yt = "Z";
|
||
}
|
||
h._f = R + (it || "") + (yt || ""), Va(h);
|
||
} else
|
||
h._isValid = !1;
|
||
}
|
||
} else
|
||
h._isValid = !1;
|
||
}
|
||
function er(h, y, _, S, R, it) {
|
||
return h = [function(yt) {
|
||
yt = parseInt(yt, 10);
|
||
{
|
||
if (yt <= 49)
|
||
return 2e3 + yt;
|
||
if (yt <= 999)
|
||
return 1900 + yt;
|
||
}
|
||
return yt;
|
||
}(h), de.indexOf(y), parseInt(_, 10), parseInt(S, 10), parseInt(R, 10)], it && h.push(parseInt(it, 10)), h;
|
||
}
|
||
function In(h) {
|
||
var y, _, S, R, it = $u.exec(h._i.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").replace(/^\s\s*/, "").replace(/\s\s*$/, ""));
|
||
it ? (y = er(it[4], it[3], it[2], it[5], it[6], it[7]), _ = it[1], S = y, R = h, _ && Ie.indexOf(_) !== new Date(S[0], S[1], S[2]).getDay() ? (b(R).weekdayMismatch = !0, R._isValid = !1) : (h._a = y, h._tzm = (_ = it[8], S = it[9], R = it[10], _ ? ll[_] : S ? 0 : 60 * (((_ = parseInt(R, 10)) - (S = _ % 100)) / 100) + S), h._d = Wr.apply(null, h._a), h._d.setUTCMinutes(h._d.getUTCMinutes() - h._tzm), b(h).rfc2822 = !0)) : h._isValid = !1;
|
||
}
|
||
function On(h, y, _) {
|
||
return h != null ? h : y != null ? y : _;
|
||
}
|
||
function Ji(h) {
|
||
var y, _, S, R, it, yt, Ct, Pt, It, ue, re, He = [];
|
||
if (!h._d) {
|
||
for (S = h, R = new Date(n.now()), _ = S._useUTC ? [R.getUTCFullYear(), R.getUTCMonth(), R.getUTCDate()] : [R.getFullYear(), R.getMonth(), R.getDate()], h._w && h._a[xt] == null && h._a[Ft] == null && ((R = (S = h)._w).GG != null || R.W != null || R.E != null ? (Pt = 1, It = 4, it = On(R.GG, S._a[Vt], Be(Se(), 1, 4).year), yt = On(R.W, 1), ((Ct = On(R.E, 1)) < 1 || 7 < Ct) && (ue = !0)) : (Pt = S._locale._week.dow, It = S._locale._week.doy, re = Be(Se(), Pt, It), it = On(R.gg, S._a[Vt], re.year), yt = On(R.w, re.week), R.d != null ? ((Ct = R.d) < 0 || 6 < Ct) && (ue = !0) : R.e != null ? (Ct = R.e + Pt, (R.e < 0 || 6 < R.e) && (ue = !0)) : Ct = Pt), yt < 1 || yt > Oe(it, Pt, It) ? b(S)._overflowWeeks = !0 : ue != null ? b(S)._overflowWeekday = !0 : (re = ae(it, yt, Ct, Pt, It), S._a[Vt] = re.year, S._dayOfYear = re.dayOfYear)), h._dayOfYear != null && (R = On(h._a[Vt], _[Vt]), (h._dayOfYear > Qt(R) || h._dayOfYear === 0) && (b(h)._overflowDayOfYear = !0), ue = Wr(R, 0, h._dayOfYear), h._a[Ft] = ue.getUTCMonth(), h._a[xt] = ue.getUTCDate()), y = 0; y < 3 && h._a[y] == null; ++y)
|
||
h._a[y] = He[y] = _[y];
|
||
for (; y < 7; y++)
|
||
h._a[y] = He[y] = h._a[y] == null ? y === 2 ? 1 : 0 : h._a[y];
|
||
h._a[ft] === 24 && h._a[Lt] === 0 && h._a[bt] === 0 && h._a[Ut] === 0 && (h._nextDay = !0, h._a[ft] = 0), h._d = (h._useUTC ? Wr : an).apply(null, He), it = h._useUTC ? h._d.getUTCDay() : h._d.getDay(), h._tzm != null && h._d.setUTCMinutes(h._d.getUTCMinutes() - h._tzm), h._nextDay && (h._a[ft] = 24), h._w && h._w.d !== void 0 && h._w.d !== it && (b(h).weekdayMismatch = !0);
|
||
}
|
||
}
|
||
function Va(h) {
|
||
if (h._f === n.ISO_8601)
|
||
cl(h);
|
||
else if (h._f === n.RFC_2822)
|
||
In(h);
|
||
else {
|
||
h._a = [], b(h).empty = !0;
|
||
for (var y, _, S, R, it, yt = "" + h._i, Ct = yt.length, Pt = 0, It = rt(h._f, h._locale).match(x) || [], ue = It.length, re = 0; re < ue; re++)
|
||
_ = It[re], (y = (yt.match(le(_, h)) || [])[0]) && (0 < (S = yt.substr(0, yt.indexOf(y))).length && b(h).unusedInput.push(S), yt = yt.slice(yt.indexOf(y) + y.length), Pt += y.length), vt[_] ? (y ? b(h).empty = !1 : b(h).unusedTokens.push(_), S = _, it = h, (R = y) != null && a(Kt, S) && Kt[S](R, it._a, it, S)) : h._strict && !y && b(h).unusedTokens.push(_);
|
||
b(h).charsLeftOver = Ct - Pt, 0 < yt.length && b(h).unusedInput.push(yt), h._a[ft] <= 12 && b(h).bigHour === !0 && 0 < h._a[ft] && (b(h).bigHour = void 0), b(h).parsedDateParts = h._a.slice(0), b(h).meridiem = h._meridiem, h._a[ft] = function(He, rr, cn) {
|
||
return cn == null ? rr : He.meridiemHour != null ? He.meridiemHour(rr, cn) : He.isPM != null ? ((He = He.isPM(cn)) && rr < 12 && (rr += 12), rr = He || rr !== 12 ? rr : 0) : rr;
|
||
}(h._locale, h._a[ft], h._meridiem), (Ct = b(h).era) !== null && (h._a[Vt] = h._locale.erasConvertYear(Ct, h._a[Vt])), Ji(h), Rt(h);
|
||
}
|
||
}
|
||
function ul(h) {
|
||
var y, _, S, R = h._i, it = h._f;
|
||
return h._locale = h._locale || oe(h._l), R === null || it === void 0 && R === "" ? T({ nullInput: !0 }) : (typeof R == "string" && (h._i = R = h._locale.preparse(R)), G(R) ? new H(Rt(R)) : (d(R) ? h._d = R : i(it) ? function(yt) {
|
||
var Ct, Pt, It, ue, re, He, rr = !1, cn = yt._f.length;
|
||
if (cn === 0)
|
||
return b(yt).invalidFormat = !0, yt._d = new Date(NaN);
|
||
for (ue = 0; ue < cn; ue++)
|
||
re = 0, He = !1, Ct = V({}, yt), yt._useUTC != null && (Ct._useUTC = yt._useUTC), Ct._f = yt._f[ue], Va(Ct), k(Ct) && (He = !0), re = (re += b(Ct).charsLeftOver) + 10 * b(Ct).unusedTokens.length, b(Ct).score = re, rr ? re < It && (It = re, Pt = Ct) : (It == null || re < It || He) && (It = re, Pt = Ct, He && (rr = !0));
|
||
p(yt, Pt || Ct);
|
||
}(h) : it ? Va(h) : l(it = (R = h)._i) ? R._d = new Date(n.now()) : d(it) ? R._d = new Date(it.valueOf()) : typeof it == "string" ? (_ = R, (y = ol.exec(_._i)) !== null ? _._d = new Date(+y[1]) : (cl(_), _._isValid === !1 && (delete _._isValid, In(_), _._isValid === !1 && (delete _._isValid, _._strict ? _._isValid = !1 : n.createFromInputFallback(_))))) : i(it) ? (R._a = f(it.slice(0), function(yt) {
|
||
return parseInt(yt, 10);
|
||
}), Ji(R)) : s(it) ? (y = R)._d || (S = (_ = K(y._i)).day === void 0 ? _.date : _.day, y._a = f([_.year, _.month, S, _.hour, _.minute, _.second, _.millisecond], function(yt) {
|
||
return yt && parseInt(yt, 10);
|
||
}), Ji(y)) : u(it) ? R._d = new Date(it) : n.createFromInputFallback(R), k(h) || (h._d = null), h));
|
||
}
|
||
function br(h, y, _, S, R) {
|
||
var it = {};
|
||
return y !== !0 && y !== !1 || (S = y, y = void 0), _ !== !0 && _ !== !1 || (S = _, _ = void 0), (s(h) && o(h) || i(h) && h.length === 0) && (h = void 0), it._isAMomentObject = !0, it._useUTC = it._isUTC = R, it._l = _, it._i = h, it._f = y, it._strict = S, (R = new H(Rt(ul(R = it))))._nextDay && (R.add(1, "d"), R._nextDay = void 0), R;
|
||
}
|
||
function Se(h, y, _, S) {
|
||
return br(h, y, _, S, !1);
|
||
}
|
||
n.createFromInputFallback = W("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(h) {
|
||
h._d = new Date(h._i + (h._useUTC ? " UTC" : ""));
|
||
}), n.ISO_8601 = function() {
|
||
}, n.RFC_2822 = function() {
|
||
}, Yt = W("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/", function() {
|
||
var h = Se.apply(null, arguments);
|
||
return this.isValid() && h.isValid() ? h < this ? this : h : T();
|
||
}), et = W("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/", function() {
|
||
var h = Se.apply(null, arguments);
|
||
return this.isValid() && h.isValid() ? this < h ? this : h : T();
|
||
});
|
||
function Ar(h, y) {
|
||
var _, S;
|
||
if (!(y = y.length === 1 && i(y[0]) ? y[0] : y).length)
|
||
return Se();
|
||
for (_ = y[0], S = 1; S < y.length; ++S)
|
||
y[S].isValid() && !y[S][h](_) || (_ = y[S]);
|
||
return _;
|
||
}
|
||
var Zn = ["year", "quarter", "month", "week", "day", "hour", "minute", "second", "millisecond"];
|
||
function on(y) {
|
||
var y = K(y), _ = y.year || 0, S = y.quarter || 0, R = y.month || 0, it = y.week || y.isoWeek || 0, yt = y.day || 0, Ct = y.hour || 0, Pt = y.minute || 0, It = y.second || 0, ue = y.millisecond || 0;
|
||
this._isValid = function(re) {
|
||
var He, rr, cn = !1, rh = Zn.length;
|
||
for (He in re)
|
||
if (a(re, He) && (Ht.call(Zn, He) === -1 || re[He] != null && isNaN(re[He])))
|
||
return !1;
|
||
for (rr = 0; rr < rh; ++rr)
|
||
if (re[Zn[rr]]) {
|
||
if (cn)
|
||
return !1;
|
||
parseFloat(re[Zn[rr]]) !== F(re[Zn[rr]]) && (cn = !0);
|
||
}
|
||
return !0;
|
||
}(y), this._milliseconds = +ue + 1e3 * It + 6e4 * Pt + 1e3 * Ct * 60 * 60, this._days = +yt + 7 * it, this._months = +R + 3 * S + 12 * _, this._data = {}, this._locale = oe(), this._bubble();
|
||
}
|
||
function Qn(h) {
|
||
return h instanceof on;
|
||
}
|
||
function Hr(h) {
|
||
return h < 0 ? -1 * Math.round(-1 * h) : Math.round(h);
|
||
}
|
||
function Ua(h, y) {
|
||
j(h, 0, 0, function() {
|
||
var _ = this.utcOffset(), S = "+";
|
||
return _ < 0 && (_ = -_, S = "-"), S + Q(~~(_ / 60), 2) + y + Q(~~_ % 60, 2);
|
||
});
|
||
}
|
||
Ua("Z", ":"), Ua("ZZ", ""), st("Z", wt), st("ZZ", wt), Gt(["Z", "ZZ"], function(h, y, _) {
|
||
_._useUTC = !0, _._tzm = ts(wt, h);
|
||
});
|
||
var Fs = /([\+\-]|\d\d)/gi;
|
||
function ts(h, _) {
|
||
var _ = (_ || "").match(h);
|
||
return _ === null ? null : (_ = 60 * (h = ((_[_.length - 1] || []) + "").match(Fs) || ["-", 0, 0])[1] + F(h[2])) === 0 ? 0 : h[0] === "+" ? _ : -_;
|
||
}
|
||
function Gr(h, y) {
|
||
var _;
|
||
return y._isUTC ? (y = y.clone(), _ = (G(h) || d(h) ? h : Se(h)).valueOf() - y.valueOf(), y._d.setTime(y._d.valueOf() + _), n.updateOffset(y, !1), y) : Se(h).local();
|
||
}
|
||
function Ku(h) {
|
||
return -Math.round(h._d.getTimezoneOffset());
|
||
}
|
||
function Ud() {
|
||
return !!this.isValid() && this._isUTC && this._offset === 0;
|
||
}
|
||
n.updateOffset = function() {
|
||
};
|
||
var wb = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/, Tb = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
|
||
function ln(h, y) {
|
||
var _, S = h, R = null;
|
||
return Qn(h) ? S = { ms: h._milliseconds, d: h._days, M: h._months } : u(h) || !isNaN(+h) ? (S = {}, y ? S[y] = +h : S.milliseconds = +h) : (R = wb.exec(h)) ? (_ = R[1] === "-" ? -1 : 1, S = { y: 0, d: F(R[xt]) * _, h: F(R[ft]) * _, m: F(R[Lt]) * _, s: F(R[bt]) * _, ms: F(Hr(1e3 * R[Ut])) * _ }) : (R = Tb.exec(h)) ? (_ = R[1] === "-" ? -1 : 1, S = { y: es(R[2], _), M: es(R[3], _), w: es(R[4], _), d: es(R[5], _), h: es(R[6], _), m: es(R[7], _), s: es(R[8], _) }) : S == null ? S = {} : typeof S == "object" && ("from" in S || "to" in S) && (y = function(it, yt) {
|
||
var Ct;
|
||
return !it.isValid() || !yt.isValid() ? { milliseconds: 0, months: 0 } : (yt = Gr(yt, it), it.isBefore(yt) ? Ct = zd(it, yt) : ((Ct = zd(yt, it)).milliseconds = -Ct.milliseconds, Ct.months = -Ct.months), Ct);
|
||
}(Se(S.from), Se(S.to)), (S = {}).ms = y.milliseconds, S.M = y.months), R = new on(S), Qn(h) && a(h, "_locale") && (R._locale = h._locale), Qn(h) && a(h, "_isValid") && (R._isValid = h._isValid), R;
|
||
}
|
||
function es(h, y) {
|
||
return h = h && parseFloat(h.replace(",", ".")), (isNaN(h) ? 0 : h) * y;
|
||
}
|
||
function zd(h, y) {
|
||
var _ = {};
|
||
return _.months = y.month() - h.month() + 12 * (y.year() - h.year()), h.clone().add(_.months, "M").isAfter(y) && --_.months, _.milliseconds = +y - +h.clone().add(_.months, "M"), _;
|
||
}
|
||
function Wd(h, y) {
|
||
return function(_, S) {
|
||
var R;
|
||
return S === null || isNaN(+S) || (D(y, "moment()." + y + "(period, number) is deprecated. Please use moment()." + y + "(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."), R = _, _ = S, S = R), Hd(this, ln(_, S), h), this;
|
||
};
|
||
}
|
||
function Hd(h, yt, _, S) {
|
||
var R = yt._milliseconds, it = Hr(yt._days), yt = Hr(yt._months);
|
||
h.isValid() && (S = S == null || S, yt && Xt(h, A(h, "Month") + yt * _), it && J(h, "Date", A(h, "Date") + it * _), R && h._d.setTime(h._d.valueOf() + R * _), S && n.updateOffset(h, it || yt));
|
||
}
|
||
ln.fn = on.prototype, ln.invalid = function() {
|
||
return ln(NaN);
|
||
}, ee = Wd(1, "add"), Pe = Wd(-1, "subtract");
|
||
function Gd(h) {
|
||
return typeof h == "string" || h instanceof String;
|
||
}
|
||
function Eb(h) {
|
||
return G(h) || d(h) || Gd(h) || u(h) || function(y) {
|
||
var _ = i(y), S = !1;
|
||
return _ && (S = y.filter(function(R) {
|
||
return !u(R) && Gd(y);
|
||
}).length === 0), _ && S;
|
||
}(h) || function(y) {
|
||
var _, S, R = s(y) && !o(y), it = !1, yt = ["years", "year", "y", "months", "month", "M", "days", "day", "d", "dates", "date", "D", "hours", "hour", "h", "minutes", "minute", "m", "seconds", "second", "s", "milliseconds", "millisecond", "ms"], Ct = yt.length;
|
||
for (_ = 0; _ < Ct; _ += 1)
|
||
S = yt[_], it = it || a(y, S);
|
||
return R && it;
|
||
}(h) || h == null;
|
||
}
|
||
function hl(h, R) {
|
||
if (h.date() < R.date())
|
||
return -hl(R, h);
|
||
var _ = 12 * (R.year() - h.year()) + (R.month() - h.month()), S = h.clone().add(_, "months"), R = R - S < 0 ? (R - S) / (S - h.clone().add(_ - 1, "months")) : (R - S) / (h.clone().add(1 + _, "months") - S);
|
||
return -(_ + R) || 0;
|
||
}
|
||
function qd(h) {
|
||
return h === void 0 ? this._locale._abbr : ((h = oe(h)) != null && (this._locale = h), this);
|
||
}
|
||
n.defaultFormat = "YYYY-MM-DDTHH:mm:ssZ", n.defaultFormatUtc = "YYYY-MM-DDTHH:mm:ss[Z]", Ge = W("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.", function(h) {
|
||
return h === void 0 ? this.localeData() : this.locale(h);
|
||
});
|
||
function jd() {
|
||
return this._locale;
|
||
}
|
||
var Xd = 126227808e5;
|
||
function Ps(h, y) {
|
||
return (h % y + y) % y;
|
||
}
|
||
function $d(h, y, _) {
|
||
return h < 100 && 0 <= h ? new Date(h + 400, y, _) - Xd : new Date(h, y, _).valueOf();
|
||
}
|
||
function Kd(h, y, _) {
|
||
return h < 100 && 0 <= h ? Date.UTC(h + 400, y, _) - Xd : Date.UTC(h, y, _);
|
||
}
|
||
function Zu(h, y) {
|
||
return y.erasAbbrRegex(h);
|
||
}
|
||
function Qu() {
|
||
for (var h = [], y = [], _ = [], S = [], R = this.eras(), it = 0, yt = R.length; it < yt; ++it)
|
||
y.push($t(R[it].name)), h.push($t(R[it].abbr)), _.push($t(R[it].narrow)), S.push($t(R[it].name)), S.push($t(R[it].abbr)), S.push($t(R[it].narrow));
|
||
this._erasRegex = new RegExp("^(" + S.join("|") + ")", "i"), this._erasNameRegex = new RegExp("^(" + y.join("|") + ")", "i"), this._erasAbbrRegex = new RegExp("^(" + h.join("|") + ")", "i"), this._erasNarrowRegex = new RegExp("^(" + _.join("|") + ")", "i");
|
||
}
|
||
function dl(h, y) {
|
||
j(0, [h, h.length], 0, y);
|
||
}
|
||
function Zd(h, y, _, S, R) {
|
||
var it;
|
||
return h == null ? Be(this, S, R).year : (it = Oe(h, S, R), function(yt, Ct, Pt, It, ue) {
|
||
return yt = ae(yt, Ct, Pt, It, ue), Ct = Wr(yt.year, 0, yt.dayOfYear), this.year(Ct.getUTCFullYear()), this.month(Ct.getUTCMonth()), this.date(Ct.getUTCDate()), this;
|
||
}.call(this, h, y = it < y ? it : y, _, S, R));
|
||
}
|
||
j("N", 0, 0, "eraAbbr"), j("NN", 0, 0, "eraAbbr"), j("NNN", 0, 0, "eraAbbr"), j("NNNN", 0, 0, "eraName"), j("NNNNN", 0, 0, "eraNarrow"), j("y", ["y", 1], "yo", "eraYear"), j("y", ["yy", 2], 0, "eraYear"), j("y", ["yyy", 3], 0, "eraYear"), j("y", ["yyyy", 4], 0, "eraYear"), st("N", Zu), st("NN", Zu), st("NNN", Zu), st("NNNN", function(h, y) {
|
||
return y.erasNameRegex(h);
|
||
}), st("NNNNN", function(h, y) {
|
||
return y.erasNarrowRegex(h);
|
||
}), Gt(["N", "NN", "NNN", "NNNN", "NNNNN"], function(h, y, _, S) {
|
||
S = _._locale.erasParse(h, S, _._strict), S ? b(_).era = S : b(_).invalidEra = h;
|
||
}), st("y", Tt), st("yy", Tt), st("yyy", Tt), st("yyyy", Tt), st("yo", function(h, y) {
|
||
return y._eraYearOrdinalRegex || Tt;
|
||
}), Gt(["y", "yy", "yyy", "yyyy"], Vt), Gt(["yo"], function(h, y, _, S) {
|
||
var R;
|
||
_._locale._eraYearOrdinalRegex && (R = h.match(_._locale._eraYearOrdinalRegex)), _._locale.eraYearOrdinalParse ? y[Vt] = _._locale.eraYearOrdinalParse(h, R) : y[Vt] = parseInt(h, 10);
|
||
}), j(0, ["gg", 2], 0, function() {
|
||
return this.weekYear() % 100;
|
||
}), j(0, ["GG", 2], 0, function() {
|
||
return this.isoWeekYear() % 100;
|
||
}), dl("gggg", "weekYear"), dl("ggggg", "weekYear"), dl("GGGG", "isoWeekYear"), dl("GGGGG", "isoWeekYear"), ut("weekYear", "gg"), ut("isoWeekYear", "GG"), P("weekYear", 1), P("isoWeekYear", 1), st("G", gt), st("g", gt), st("GG", U, ce), st("gg", U, ce), st("GGGG", Ri, rs), st("gggg", Ri, rs), st("GGGGG", Ii, Oi), st("ggggg", Ii, Oi), Ee(["gggg", "ggggg", "GGGG", "GGGGG"], function(h, y, _, S) {
|
||
y[S.substr(0, 2)] = F(h);
|
||
}), Ee(["gg", "GG"], function(h, y, _, S) {
|
||
y[S] = n.parseTwoDigitYear(h);
|
||
}), j("Q", 0, "Qo", "quarter"), ut("quarter", "Q"), P("quarter", 7), st("Q", C), Gt("Q", function(h, y) {
|
||
y[Ft] = 3 * (F(h) - 1);
|
||
}), j("D", ["DD", 2], "Do", "date"), ut("date", "D"), P("date", 9), st("D", U), st("DD", U, ce), st("Do", function(h, y) {
|
||
return h ? y._dayOfMonthOrdinalParse || y._ordinalParse : y._dayOfMonthOrdinalParseLenient;
|
||
}), Gt(["D", "DD"], xt), Gt("Do", function(h, y) {
|
||
y[xt] = F(h.match(U)[0]);
|
||
}), Ri = O("Date", !0), j("DDD", ["DDDD", 3], "DDDo", "dayOfYear"), ut("dayOfYear", "DDD"), P("dayOfYear", 4), st("DDD", Mt), st("DDDD", ht), Gt(["DDD", "DDDD"], function(h, y, _) {
|
||
_._dayOfYear = F(h);
|
||
}), j("m", ["mm", 2], 0, "minute"), ut("minute", "m"), P("minute", 14), st("m", U), st("mm", U, ce), Gt(["m", "mm"], Lt);
|
||
var Bi, rs = O("Minutes", !1), Ii = (j("s", ["ss", 2], 0, "second"), ut("second", "s"), P("second", 15), st("s", U), st("ss", U, ce), Gt(["s", "ss"], bt), O("Seconds", !1));
|
||
for (j("S", 0, 0, function() {
|
||
return ~~(this.millisecond() / 100);
|
||
}), j(0, ["SS", 2], 0, function() {
|
||
return ~~(this.millisecond() / 10);
|
||
}), j(0, ["SSS", 3], 0, "millisecond"), j(0, ["SSSS", 4], 0, function() {
|
||
return 10 * this.millisecond();
|
||
}), j(0, ["SSSSS", 5], 0, function() {
|
||
return 100 * this.millisecond();
|
||
}), j(0, ["SSSSSS", 6], 0, function() {
|
||
return 1e3 * this.millisecond();
|
||
}), j(0, ["SSSSSSS", 7], 0, function() {
|
||
return 1e4 * this.millisecond();
|
||
}), j(0, ["SSSSSSSS", 8], 0, function() {
|
||
return 1e5 * this.millisecond();
|
||
}), j(0, ["SSSSSSSSS", 9], 0, function() {
|
||
return 1e6 * this.millisecond();
|
||
}), ut("millisecond", "ms"), P("millisecond", 16), st("S", Mt, C), st("SS", Mt, ce), st("SSS", Mt, ht), Bi = "SSSS"; Bi.length <= 9; Bi += "S")
|
||
st(Bi, Tt);
|
||
function Cb(h, y) {
|
||
y[Ut] = F(1e3 * ("0." + h));
|
||
}
|
||
for (Bi = "S"; Bi.length <= 9; Bi += "S")
|
||
Gt(Bi, Cb);
|
||
Oi = O("Milliseconds", !1), j("z", 0, 0, "zoneAbbr"), j("zz", 0, 0, "zoneName"), C = H.prototype;
|
||
function Qd(h) {
|
||
return h;
|
||
}
|
||
C.add = ee, C.calendar = function(_, R) {
|
||
arguments.length === 1 && (arguments[0] ? Eb(arguments[0]) ? (_ = arguments[0], R = void 0) : function(it) {
|
||
for (var yt = s(it) && !o(it), Ct = !1, Pt = ["sameDay", "nextDay", "lastDay", "nextWeek", "lastWeek", "sameElse"], It = 0; It < Pt.length; It += 1)
|
||
Ct = Ct || a(it, Pt[It]);
|
||
return yt && Ct;
|
||
}(arguments[0]) && (R = arguments[0], _ = void 0) : R = _ = void 0);
|
||
var _ = _ || Se(), S = Gr(_, this).startOf("day"), S = n.calendarFormat(this, S) || "sameElse", R = R && (w(R[S]) ? R[S].call(this, _) : R[S]);
|
||
return this.format(R || this.localeData().calendar(S, this, Se(_)));
|
||
}, C.clone = function() {
|
||
return new H(this);
|
||
}, C.diff = function(h, y, _) {
|
||
var S, R, it;
|
||
if (!this.isValid())
|
||
return NaN;
|
||
if (!(S = Gr(h, this)).isValid())
|
||
return NaN;
|
||
switch (R = 6e4 * (S.utcOffset() - this.utcOffset()), y = _t(y)) {
|
||
case "year":
|
||
it = hl(this, S) / 12;
|
||
break;
|
||
case "month":
|
||
it = hl(this, S);
|
||
break;
|
||
case "quarter":
|
||
it = hl(this, S) / 3;
|
||
break;
|
||
case "second":
|
||
it = (this - S) / 1e3;
|
||
break;
|
||
case "minute":
|
||
it = (this - S) / 6e4;
|
||
break;
|
||
case "hour":
|
||
it = (this - S) / 36e5;
|
||
break;
|
||
case "day":
|
||
it = (this - S - R) / 864e5;
|
||
break;
|
||
case "week":
|
||
it = (this - S - R) / 6048e5;
|
||
break;
|
||
default:
|
||
it = this - S;
|
||
}
|
||
return _ ? it : $(it);
|
||
}, C.endOf = function(h) {
|
||
var y, _;
|
||
if ((h = _t(h)) === void 0 || h === "millisecond" || !this.isValid())
|
||
return this;
|
||
switch (_ = this._isUTC ? Kd : $d, h) {
|
||
case "year":
|
||
y = _(this.year() + 1, 0, 1) - 1;
|
||
break;
|
||
case "quarter":
|
||
y = _(this.year(), this.month() - this.month() % 3 + 3, 1) - 1;
|
||
break;
|
||
case "month":
|
||
y = _(this.year(), this.month() + 1, 1) - 1;
|
||
break;
|
||
case "week":
|
||
y = _(this.year(), this.month(), this.date() - this.weekday() + 7) - 1;
|
||
break;
|
||
case "isoWeek":
|
||
y = _(this.year(), this.month(), this.date() - (this.isoWeekday() - 1) + 7) - 1;
|
||
break;
|
||
case "day":
|
||
case "date":
|
||
y = _(this.year(), this.month(), this.date() + 1) - 1;
|
||
break;
|
||
case "hour":
|
||
y = this._d.valueOf(), y += 36e5 - Ps(y + (this._isUTC ? 0 : 6e4 * this.utcOffset()), 36e5) - 1;
|
||
break;
|
||
case "minute":
|
||
y = this._d.valueOf(), y += 6e4 - Ps(y, 6e4) - 1;
|
||
break;
|
||
case "second":
|
||
y = this._d.valueOf(), y += 1e3 - Ps(y, 1e3) - 1;
|
||
break;
|
||
}
|
||
return this._d.setTime(y), n.updateOffset(this, !0), this;
|
||
}, C.format = function(h) {
|
||
return h = h || (this.isUtc() ? n.defaultFormatUtc : n.defaultFormat), h = ot(this, h), this.localeData().postformat(h);
|
||
}, C.from = function(h, y) {
|
||
return this.isValid() && (G(h) && h.isValid() || Se(h).isValid()) ? ln({ to: this, from: h }).locale(this.locale()).humanize(!y) : this.localeData().invalidDate();
|
||
}, C.fromNow = function(h) {
|
||
return this.from(Se(), h);
|
||
}, C.to = function(h, y) {
|
||
return this.isValid() && (G(h) && h.isValid() || Se(h).isValid()) ? ln({ from: this, to: h }).locale(this.locale()).humanize(!y) : this.localeData().invalidDate();
|
||
}, C.toNow = function(h) {
|
||
return this.to(Se(), h);
|
||
}, C.get = function(h) {
|
||
return w(this[h = _t(h)]) ? this[h]() : this;
|
||
}, C.invalidAt = function() {
|
||
return b(this).overflow;
|
||
}, C.isAfter = function(h, y) {
|
||
return h = G(h) ? h : Se(h), !(!this.isValid() || !h.isValid()) && ((y = _t(y) || "millisecond") === "millisecond" ? this.valueOf() > h.valueOf() : h.valueOf() < this.clone().startOf(y).valueOf());
|
||
}, C.isBefore = function(h, y) {
|
||
return h = G(h) ? h : Se(h), !(!this.isValid() || !h.isValid()) && ((y = _t(y) || "millisecond") === "millisecond" ? this.valueOf() < h.valueOf() : this.clone().endOf(y).valueOf() < h.valueOf());
|
||
}, C.isBetween = function(h, y, _, S) {
|
||
return h = G(h) ? h : Se(h), y = G(y) ? y : Se(y), !!(this.isValid() && h.isValid() && y.isValid()) && ((S = S || "()")[0] === "(" ? this.isAfter(h, _) : !this.isBefore(h, _)) && (S[1] === ")" ? this.isBefore(y, _) : !this.isAfter(y, _));
|
||
}, C.isSame = function(_, y) {
|
||
var _ = G(_) ? _ : Se(_);
|
||
return !(!this.isValid() || !_.isValid()) && ((y = _t(y) || "millisecond") === "millisecond" ? this.valueOf() === _.valueOf() : (_ = _.valueOf(), this.clone().startOf(y).valueOf() <= _ && _ <= this.clone().endOf(y).valueOf()));
|
||
}, C.isSameOrAfter = function(h, y) {
|
||
return this.isSame(h, y) || this.isAfter(h, y);
|
||
}, C.isSameOrBefore = function(h, y) {
|
||
return this.isSame(h, y) || this.isBefore(h, y);
|
||
}, C.isValid = function() {
|
||
return k(this);
|
||
}, C.lang = Ge, C.locale = qd, C.localeData = jd, C.max = et, C.min = Yt, C.parsingFlags = function() {
|
||
return p({}, b(this));
|
||
}, C.set = function(h, y) {
|
||
if (typeof h == "object")
|
||
for (var _ = function(it) {
|
||
var yt, Ct = [];
|
||
for (yt in it)
|
||
a(it, yt) && Ct.push({ unit: yt, priority: Ot[yt] });
|
||
return Ct.sort(function(Pt, It) {
|
||
return Pt.priority - It.priority;
|
||
}), Ct;
|
||
}(h = K(h)), S = _.length, R = 0; R < S; R++)
|
||
this[_[R].unit](h[_[R].unit]);
|
||
else if (w(this[h = _t(h)]))
|
||
return this[h](y);
|
||
return this;
|
||
}, C.startOf = function(h) {
|
||
var y, _;
|
||
if ((h = _t(h)) === void 0 || h === "millisecond" || !this.isValid())
|
||
return this;
|
||
switch (_ = this._isUTC ? Kd : $d, h) {
|
||
case "year":
|
||
y = _(this.year(), 0, 1);
|
||
break;
|
||
case "quarter":
|
||
y = _(this.year(), this.month() - this.month() % 3, 1);
|
||
break;
|
||
case "month":
|
||
y = _(this.year(), this.month(), 1);
|
||
break;
|
||
case "week":
|
||
y = _(this.year(), this.month(), this.date() - this.weekday());
|
||
break;
|
||
case "isoWeek":
|
||
y = _(this.year(), this.month(), this.date() - (this.isoWeekday() - 1));
|
||
break;
|
||
case "day":
|
||
case "date":
|
||
y = _(this.year(), this.month(), this.date());
|
||
break;
|
||
case "hour":
|
||
y = this._d.valueOf(), y -= Ps(y + (this._isUTC ? 0 : 6e4 * this.utcOffset()), 36e5);
|
||
break;
|
||
case "minute":
|
||
y = this._d.valueOf(), y -= Ps(y, 6e4);
|
||
break;
|
||
case "second":
|
||
y = this._d.valueOf(), y -= Ps(y, 1e3);
|
||
break;
|
||
}
|
||
return this._d.setTime(y), n.updateOffset(this, !0), this;
|
||
}, C.subtract = Pe, C.toArray = function() {
|
||
var h = this;
|
||
return [h.year(), h.month(), h.date(), h.hour(), h.minute(), h.second(), h.millisecond()];
|
||
}, C.toObject = function() {
|
||
var h = this;
|
||
return { years: h.year(), months: h.month(), date: h.date(), hours: h.hours(), minutes: h.minutes(), seconds: h.seconds(), milliseconds: h.milliseconds() };
|
||
}, C.toDate = function() {
|
||
return new Date(this.valueOf());
|
||
}, C.toISOString = function(h) {
|
||
if (!this.isValid())
|
||
return null;
|
||
var y = (h = h !== !0) ? this.clone().utc() : this;
|
||
return y.year() < 0 || 9999 < y.year() ? ot(y, h ? "YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]" : "YYYYYY-MM-DD[T]HH:mm:ss.SSSZ") : w(Date.prototype.toISOString) ? h ? this.toDate().toISOString() : new Date(this.valueOf() + 60 * this.utcOffset() * 1e3).toISOString().replace("Z", ot(y, "Z")) : ot(y, h ? "YYYY-MM-DD[T]HH:mm:ss.SSS[Z]" : "YYYY-MM-DD[T]HH:mm:ss.SSSZ");
|
||
}, C.inspect = function() {
|
||
if (!this.isValid())
|
||
return "moment.invalid(/* " + this._i + " */)";
|
||
var h, y = "moment", _ = "";
|
||
return this.isLocal() || (y = this.utcOffset() === 0 ? "moment.utc" : "moment.parseZone", _ = "Z"), y = "[" + y + '("]', h = 0 <= this.year() && this.year() <= 9999 ? "YYYY" : "YYYYYY", this.format(y + h + "-MM-DD[T]HH:mm:ss.SSS" + (_ + '[")]'));
|
||
}, typeof Symbol < "u" && Symbol.for != null && (C[Symbol.for("nodejs.util.inspect.custom")] = function() {
|
||
return "Moment<" + this.format() + ">";
|
||
}), C.toJSON = function() {
|
||
return this.isValid() ? this.toISOString() : null;
|
||
}, C.toString = function() {
|
||
return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ");
|
||
}, C.unix = function() {
|
||
return Math.floor(this.valueOf() / 1e3);
|
||
}, C.valueOf = function() {
|
||
return this._d.valueOf() - 6e4 * (this._offset || 0);
|
||
}, C.creationData = function() {
|
||
return { input: this._i, format: this._f, locale: this._locale, isUTC: this._isUTC, strict: this._strict };
|
||
}, C.eraName = function() {
|
||
for (var h, y = this.localeData().eras(), _ = 0, S = y.length; _ < S; ++_)
|
||
if (h = this.clone().startOf("day").valueOf(), y[_].since <= h && h <= y[_].until || y[_].until <= h && h <= y[_].since)
|
||
return y[_].name;
|
||
return "";
|
||
}, C.eraNarrow = function() {
|
||
for (var h, y = this.localeData().eras(), _ = 0, S = y.length; _ < S; ++_)
|
||
if (h = this.clone().startOf("day").valueOf(), y[_].since <= h && h <= y[_].until || y[_].until <= h && h <= y[_].since)
|
||
return y[_].narrow;
|
||
return "";
|
||
}, C.eraAbbr = function() {
|
||
for (var h, y = this.localeData().eras(), _ = 0, S = y.length; _ < S; ++_)
|
||
if (h = this.clone().startOf("day").valueOf(), y[_].since <= h && h <= y[_].until || y[_].until <= h && h <= y[_].since)
|
||
return y[_].abbr;
|
||
return "";
|
||
}, C.eraYear = function() {
|
||
for (var h, y, _ = this.localeData().eras(), S = 0, R = _.length; S < R; ++S)
|
||
if (h = _[S].since <= _[S].until ? 1 : -1, y = this.clone().startOf("day").valueOf(), _[S].since <= y && y <= _[S].until || _[S].until <= y && y <= _[S].since)
|
||
return (this.year() - n(_[S].since).year()) * h + _[S].offset;
|
||
return this.year();
|
||
}, C.year = pl, C.isLeapYear = function() {
|
||
return z(this.year());
|
||
}, C.weekYear = function(h) {
|
||
return Zd.call(this, h, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData()._week.doy);
|
||
}, C.isoWeekYear = function(h) {
|
||
return Zd.call(this, h, this.isoWeek(), this.isoWeekday(), 1, 4);
|
||
}, C.quarter = C.quarters = function(h) {
|
||
return h == null ? Math.ceil((this.month() + 1) / 3) : this.month(3 * (h - 1) + this.month() % 3);
|
||
}, C.month = ie, C.daysInMonth = function() {
|
||
return dt(this.year(), this.month());
|
||
}, C.week = C.weeks = function(h) {
|
||
var y = this.localeData().week(this);
|
||
return h == null ? y : this.add(7 * (h - y), "d");
|
||
}, C.isoWeek = C.isoWeeks = function(h) {
|
||
var y = Be(this, 1, 4).week;
|
||
return h == null ? y : this.add(7 * (h - y), "d");
|
||
}, C.weeksInYear = function() {
|
||
var h = this.localeData()._week;
|
||
return Oe(this.year(), h.dow, h.doy);
|
||
}, C.weeksInWeekYear = function() {
|
||
var h = this.localeData()._week;
|
||
return Oe(this.weekYear(), h.dow, h.doy);
|
||
}, C.isoWeeksInYear = function() {
|
||
return Oe(this.year(), 1, 4);
|
||
}, C.isoWeeksInISOWeekYear = function() {
|
||
return Oe(this.isoWeekYear(), 1, 4);
|
||
}, C.date = Ri, C.day = C.days = function(h) {
|
||
if (!this.isValid())
|
||
return h != null ? this : NaN;
|
||
var y, _, S = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
|
||
return h != null ? (y = h, _ = this.localeData(), h = typeof y != "string" ? y : isNaN(y) ? typeof (y = _.weekdaysParse(y)) == "number" ? y : null : parseInt(y, 10), this.add(h - S, "d")) : S;
|
||
}, C.weekday = function(h) {
|
||
if (!this.isValid())
|
||
return h != null ? this : NaN;
|
||
var y = (this.day() + 7 - this.localeData()._week.dow) % 7;
|
||
return h == null ? y : this.add(h - y, "d");
|
||
}, C.isoWeekday = function(h) {
|
||
return this.isValid() ? h != null ? (y = h, _ = this.localeData(), _ = typeof y == "string" ? _.weekdaysParse(y) % 7 || 7 : isNaN(y) ? null : y, this.day(this.day() % 7 ? _ : _ - 7)) : this.day() || 7 : h != null ? this : NaN;
|
||
var y, _;
|
||
}, C.dayOfYear = function(h) {
|
||
var y = Math.round((this.clone().startOf("day") - this.clone().startOf("year")) / 864e5) + 1;
|
||
return h == null ? y : this.add(h - y, "d");
|
||
}, C.hour = C.hours = pt, C.minute = C.minutes = rs, C.second = C.seconds = Ii, C.millisecond = C.milliseconds = Oi, C.utcOffset = function(h, y, _) {
|
||
var S, R = this._offset || 0;
|
||
if (!this.isValid())
|
||
return h != null ? this : NaN;
|
||
if (h == null)
|
||
return this._isUTC ? R : Ku(this);
|
||
if (typeof h == "string") {
|
||
if ((h = ts(wt, h)) === null)
|
||
return this;
|
||
} else
|
||
Math.abs(h) < 16 && !_ && (h *= 60);
|
||
return !this._isUTC && y && (S = Ku(this)), this._offset = h, this._isUTC = !0, S != null && this.add(S, "m"), R !== h && (!y || this._changeInProgress ? Hd(this, ln(h - R, "m"), 1, !1) : this._changeInProgress || (this._changeInProgress = !0, n.updateOffset(this, !0), this._changeInProgress = null)), this;
|
||
}, C.utc = function(h) {
|
||
return this.utcOffset(0, h);
|
||
}, C.local = function(h) {
|
||
return this._isUTC && (this.utcOffset(0, h), this._isUTC = !1, h && this.subtract(Ku(this), "m")), this;
|
||
}, C.parseZone = function() {
|
||
var h;
|
||
return this._tzm != null ? this.utcOffset(this._tzm, !1, !0) : typeof this._i == "string" && ((h = ts(Et, this._i)) != null ? this.utcOffset(h) : this.utcOffset(0, !0)), this;
|
||
}, C.hasAlignedHourOffset = function(h) {
|
||
return !!this.isValid() && (h = h ? Se(h).utcOffset() : 0, (this.utcOffset() - h) % 60 == 0);
|
||
}, C.isDST = function() {
|
||
return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset();
|
||
}, C.isLocal = function() {
|
||
return !!this.isValid() && !this._isUTC;
|
||
}, C.isUtcOffset = function() {
|
||
return !!this.isValid() && this._isUTC;
|
||
}, C.isUtc = Ud, C.isUTC = Ud, C.zoneAbbr = function() {
|
||
return this._isUTC ? "UTC" : "";
|
||
}, C.zoneName = function() {
|
||
return this._isUTC ? "Coordinated Universal Time" : "";
|
||
}, C.dates = W("dates accessor is deprecated. Use date instead.", Ri), C.months = W("months accessor is deprecated. Use month instead", ie), C.years = W("years accessor is deprecated. Use year instead", pl), C.zone = W("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/", function(h, y) {
|
||
return h != null ? (this.utcOffset(h = typeof h != "string" ? -h : h, y), this) : -this.utcOffset();
|
||
}), C.isDSTShifted = W("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information", function() {
|
||
if (!l(this._isDSTShifted))
|
||
return this._isDSTShifted;
|
||
var h, y = {};
|
||
return V(y, this), (y = ul(y))._a ? (h = (y._isUTC ? g : Se)(y._a), this._isDSTShifted = this.isValid() && 0 < function(_, S, R) {
|
||
for (var it = Math.min(_.length, S.length), yt = Math.abs(_.length - S.length), Ct = 0, Pt = 0; Pt < it; Pt++)
|
||
(R && _[Pt] !== S[Pt] || !R && F(_[Pt]) !== F(S[Pt])) && Ct++;
|
||
return Ct + yt;
|
||
}(y._a, h.toArray())) : this._isDSTShifted = !1, this._isDSTShifted;
|
||
}), ce = M.prototype;
|
||
function fl(h, y, _, it) {
|
||
var R = oe(), it = g().set(it, y);
|
||
return R[_](it, h);
|
||
}
|
||
function Jd(h, y, _) {
|
||
if (u(h) && (y = h, h = void 0), h = h || "", y != null)
|
||
return fl(h, y, _, "month");
|
||
for (var S = [], R = 0; R < 12; R++)
|
||
S[R] = fl(h, R, _, "month");
|
||
return S;
|
||
}
|
||
function Ju(h, y, _, S) {
|
||
y = (typeof h == "boolean" ? u(y) && (_ = y, y = void 0) : (y = h, h = !1, u(_ = y) && (_ = y, y = void 0)), y || "");
|
||
var R, it = oe(), yt = h ? it._week.dow : 0, Ct = [];
|
||
if (_ != null)
|
||
return fl(y, (_ + yt) % 7, S, "day");
|
||
for (R = 0; R < 7; R++)
|
||
Ct[R] = fl(y, (R + yt) % 7, S, "day");
|
||
return Ct;
|
||
}
|
||
ce.calendar = function(h, y, _) {
|
||
return w(h = this._calendar[h] || this._calendar.sameElse) ? h.call(y, _) : h;
|
||
}, ce.longDateFormat = function(h) {
|
||
var y = this._longDateFormat[h], _ = this._longDateFormat[h.toUpperCase()];
|
||
return y || !_ ? y : (this._longDateFormat[h] = _.match(x).map(function(S) {
|
||
return S === "MMMM" || S === "MM" || S === "DD" || S === "dddd" ? S.slice(1) : S;
|
||
}).join(""), this._longDateFormat[h]);
|
||
}, ce.invalidDate = function() {
|
||
return this._invalidDate;
|
||
}, ce.ordinal = function(h) {
|
||
return this._ordinal.replace("%d", h);
|
||
}, ce.preparse = Qd, ce.postformat = Qd, ce.relativeTime = function(h, y, _, S) {
|
||
var R = this._relativeTime[_];
|
||
return w(R) ? R(h, y, _, S) : R.replace(/%d/i, h);
|
||
}, ce.pastFuture = function(h, y) {
|
||
return w(h = this._relativeTime[0 < h ? "future" : "past"]) ? h(y) : h.replace(/%s/i, y);
|
||
}, ce.set = function(h) {
|
||
var y, _;
|
||
for (_ in h)
|
||
a(h, _) && (w(y = h[_]) ? this[_] = y : this["_" + _] = y);
|
||
this._config = h, this._dayOfMonthOrdinalParseLenient = new RegExp((this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + "|" + /\d{1,2}/.source);
|
||
}, ce.eras = function(h, y) {
|
||
for (var _, S = this._eras || oe("en")._eras, R = 0, it = S.length; R < it; ++R) {
|
||
switch (typeof S[R].since) {
|
||
case "string":
|
||
_ = n(S[R].since).startOf("day"), S[R].since = _.valueOf();
|
||
break;
|
||
}
|
||
switch (typeof S[R].until) {
|
||
case "undefined":
|
||
S[R].until = 1 / 0;
|
||
break;
|
||
case "string":
|
||
_ = n(S[R].until).startOf("day").valueOf(), S[R].until = _.valueOf();
|
||
break;
|
||
}
|
||
}
|
||
return S;
|
||
}, ce.erasParse = function(h, y, _) {
|
||
var S, R, it, yt, Ct, Pt = this.eras();
|
||
for (h = h.toUpperCase(), S = 0, R = Pt.length; S < R; ++S)
|
||
if (it = Pt[S].name.toUpperCase(), yt = Pt[S].abbr.toUpperCase(), Ct = Pt[S].narrow.toUpperCase(), _)
|
||
switch (y) {
|
||
case "N":
|
||
case "NN":
|
||
case "NNN":
|
||
if (yt === h)
|
||
return Pt[S];
|
||
break;
|
||
case "NNNN":
|
||
if (it === h)
|
||
return Pt[S];
|
||
break;
|
||
case "NNNNN":
|
||
if (Ct === h)
|
||
return Pt[S];
|
||
break;
|
||
}
|
||
else if (0 <= [it, yt, Ct].indexOf(h))
|
||
return Pt[S];
|
||
}, ce.erasConvertYear = function(h, y) {
|
||
var _ = h.since <= h.until ? 1 : -1;
|
||
return y === void 0 ? n(h.since).year() : n(h.since).year() + (y - h.offset) * _;
|
||
}, ce.erasAbbrRegex = function(h) {
|
||
return a(this, "_erasAbbrRegex") || Qu.call(this), h ? this._erasAbbrRegex : this._erasRegex;
|
||
}, ce.erasNameRegex = function(h) {
|
||
return a(this, "_erasNameRegex") || Qu.call(this), h ? this._erasNameRegex : this._erasRegex;
|
||
}, ce.erasNarrowRegex = function(h) {
|
||
return a(this, "_erasNarrowRegex") || Qu.call(this), h ? this._erasNarrowRegex : this._erasRegex;
|
||
}, ce.months = function(h, y) {
|
||
return h ? (i(this._months) ? this._months : this._months[(this._months.isFormat || me).test(y) ? "format" : "standalone"])[h.month()] : i(this._months) ? this._months : this._months.standalone;
|
||
}, ce.monthsShort = function(h, y) {
|
||
return h ? (i(this._monthsShort) ? this._monthsShort : this._monthsShort[me.test(y) ? "format" : "standalone"])[h.month()] : i(this._monthsShort) ? this._monthsShort : this._monthsShort.standalone;
|
||
}, ce.monthsParse = function(h, y, _) {
|
||
var S, R;
|
||
if (this._monthsParseExact)
|
||
return function(re, yt, Ct) {
|
||
var Pt, It, ue, re = re.toLocaleLowerCase();
|
||
if (!this._monthsParse)
|
||
for (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = [], Pt = 0; Pt < 12; ++Pt)
|
||
ue = g([2e3, Pt]), this._shortMonthsParse[Pt] = this.monthsShort(ue, "").toLocaleLowerCase(), this._longMonthsParse[Pt] = this.months(ue, "").toLocaleLowerCase();
|
||
return Ct ? yt === "MMM" ? (It = Ht.call(this._shortMonthsParse, re)) !== -1 ? It : null : (It = Ht.call(this._longMonthsParse, re)) !== -1 ? It : null : yt === "MMM" ? (It = Ht.call(this._shortMonthsParse, re)) !== -1 || (It = Ht.call(this._longMonthsParse, re)) !== -1 ? It : null : (It = Ht.call(this._longMonthsParse, re)) !== -1 || (It = Ht.call(this._shortMonthsParse, re)) !== -1 ? It : null;
|
||
}.call(this, h, y, _);
|
||
for (this._monthsParse || (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = []), S = 0; S < 12; S++)
|
||
if (R = g([2e3, S]), _ && !this._longMonthsParse[S] && (this._longMonthsParse[S] = new RegExp("^" + this.months(R, "").replace(".", "") + "$", "i"), this._shortMonthsParse[S] = new RegExp("^" + this.monthsShort(R, "").replace(".", "") + "$", "i")), _ || this._monthsParse[S] || (R = "^" + this.months(R, "") + "|^" + this.monthsShort(R, ""), this._monthsParse[S] = new RegExp(R.replace(".", ""), "i")), _ && y === "MMMM" && this._longMonthsParse[S].test(h) || _ && y === "MMM" && this._shortMonthsParse[S].test(h) || !_ && this._monthsParse[S].test(h))
|
||
return S;
|
||
}, ce.monthsRegex = function(h) {
|
||
return this._monthsParseExact ? (a(this, "_monthsRegex") || ge.call(this), h ? this._monthsStrictRegex : this._monthsRegex) : (a(this, "_monthsRegex") || (this._monthsRegex = ke), this._monthsStrictRegex && h ? this._monthsStrictRegex : this._monthsRegex);
|
||
}, ce.monthsShortRegex = function(h) {
|
||
return this._monthsParseExact ? (a(this, "_monthsRegex") || ge.call(this), h ? this._monthsShortStrictRegex : this._monthsShortRegex) : (a(this, "_monthsShortRegex") || (this._monthsShortRegex = be), this._monthsShortStrictRegex && h ? this._monthsShortStrictRegex : this._monthsShortRegex);
|
||
}, ce.week = function(h) {
|
||
return Be(h, this._week.dow, this._week.doy).week;
|
||
}, ce.firstDayOfYear = function() {
|
||
return this._week.doy;
|
||
}, ce.firstDayOfWeek = function() {
|
||
return this._week.dow;
|
||
}, ce.weekdays = function(h, y) {
|
||
return y = i(this._weekdays) ? this._weekdays : this._weekdays[h && h !== !0 && this._weekdays.isFormat.test(y) ? "format" : "standalone"], h === !0 ? Fe(y, this._week.dow) : h ? y[h.day()] : y;
|
||
}, ce.weekdaysMin = function(h) {
|
||
return h === !0 ? Fe(this._weekdaysMin, this._week.dow) : h ? this._weekdaysMin[h.day()] : this._weekdaysMin;
|
||
}, ce.weekdaysShort = function(h) {
|
||
return h === !0 ? Fe(this._weekdaysShort, this._week.dow) : h ? this._weekdaysShort[h.day()] : this._weekdaysShort;
|
||
}, ce.weekdaysParse = function(h, y, _) {
|
||
var S, R;
|
||
if (this._weekdaysParseExact)
|
||
return function(re, yt, Ct) {
|
||
var Pt, It, ue, re = re.toLocaleLowerCase();
|
||
if (!this._weekdaysParse)
|
||
for (this._weekdaysParse = [], this._shortWeekdaysParse = [], this._minWeekdaysParse = [], Pt = 0; Pt < 7; ++Pt)
|
||
ue = g([2e3, 1]).day(Pt), this._minWeekdaysParse[Pt] = this.weekdaysMin(ue, "").toLocaleLowerCase(), this._shortWeekdaysParse[Pt] = this.weekdaysShort(ue, "").toLocaleLowerCase(), this._weekdaysParse[Pt] = this.weekdays(ue, "").toLocaleLowerCase();
|
||
return Ct ? yt === "dddd" ? (It = Ht.call(this._weekdaysParse, re)) !== -1 ? It : null : yt === "ddd" ? (It = Ht.call(this._shortWeekdaysParse, re)) !== -1 ? It : null : (It = Ht.call(this._minWeekdaysParse, re)) !== -1 ? It : null : yt === "dddd" ? (It = Ht.call(this._weekdaysParse, re)) !== -1 || (It = Ht.call(this._shortWeekdaysParse, re)) !== -1 || (It = Ht.call(this._minWeekdaysParse, re)) !== -1 ? It : null : yt === "ddd" ? (It = Ht.call(this._shortWeekdaysParse, re)) !== -1 || (It = Ht.call(this._weekdaysParse, re)) !== -1 || (It = Ht.call(this._minWeekdaysParse, re)) !== -1 ? It : null : (It = Ht.call(this._minWeekdaysParse, re)) !== -1 || (It = Ht.call(this._weekdaysParse, re)) !== -1 || (It = Ht.call(this._shortWeekdaysParse, re)) !== -1 ? It : null;
|
||
}.call(this, h, y, _);
|
||
for (this._weekdaysParse || (this._weekdaysParse = [], this._minWeekdaysParse = [], this._shortWeekdaysParse = [], this._fullWeekdaysParse = []), S = 0; S < 7; S++)
|
||
if (R = g([2e3, 1]).day(S), _ && !this._fullWeekdaysParse[S] && (this._fullWeekdaysParse[S] = new RegExp("^" + this.weekdays(R, "").replace(".", "\\.?") + "$", "i"), this._shortWeekdaysParse[S] = new RegExp("^" + this.weekdaysShort(R, "").replace(".", "\\.?") + "$", "i"), this._minWeekdaysParse[S] = new RegExp("^" + this.weekdaysMin(R, "").replace(".", "\\.?") + "$", "i")), this._weekdaysParse[S] || (R = "^" + this.weekdays(R, "") + "|^" + this.weekdaysShort(R, "") + "|^" + this.weekdaysMin(R, ""), this._weekdaysParse[S] = new RegExp(R.replace(".", ""), "i")), _ && y === "dddd" && this._fullWeekdaysParse[S].test(h) || _ && y === "ddd" && this._shortWeekdaysParse[S].test(h) || _ && y === "dd" && this._minWeekdaysParse[S].test(h) || !_ && this._weekdaysParse[S].test(h))
|
||
return S;
|
||
}, ce.weekdaysRegex = function(h) {
|
||
return this._weekdaysParseExact ? (a(this, "_weekdaysRegex") || St.call(this), h ? this._weekdaysStrictRegex : this._weekdaysRegex) : (a(this, "_weekdaysRegex") || (this._weekdaysRegex = tr), this._weekdaysStrictRegex && h ? this._weekdaysStrictRegex : this._weekdaysRegex);
|
||
}, ce.weekdaysShortRegex = function(h) {
|
||
return this._weekdaysParseExact ? (a(this, "_weekdaysRegex") || St.call(this), h ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex) : (a(this, "_weekdaysShortRegex") || (this._weekdaysShortRegex = zt), this._weekdaysShortStrictRegex && h ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex);
|
||
}, ce.weekdaysMinRegex = function(h) {
|
||
return this._weekdaysParseExact ? (a(this, "_weekdaysRegex") || St.call(this), h ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex) : (a(this, "_weekdaysMinRegex") || (this._weekdaysMinRegex = Z), this._weekdaysMinStrictRegex && h ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex);
|
||
}, ce.isPM = function(h) {
|
||
return (h + "").toLowerCase().charAt(0) === "p";
|
||
}, ce.meridiem = function(h, y, _) {
|
||
return 11 < h ? _ ? "pm" : "PM" : _ ? "am" : "AM";
|
||
}, qt("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(h) {
|
||
var y = h % 10;
|
||
return h + (F(h % 100 / 10) === 1 ? "th" : y == 1 ? "st" : y == 2 ? "nd" : y == 3 ? "rd" : "th");
|
||
} }), n.lang = W("moment.lang is deprecated. Use moment.locale instead.", qt), n.langData = W("moment.langData is deprecated. Use moment.localeData instead.", oe);
|
||
var Jn = Math.abs;
|
||
function tf(h, y, _, S) {
|
||
return y = ln(y, _), h._milliseconds += S * y._milliseconds, h._days += S * y._days, h._months += S * y._months, h._bubble();
|
||
}
|
||
function ef(h) {
|
||
return h < 0 ? Math.floor(h) : Math.ceil(h);
|
||
}
|
||
function rf(h) {
|
||
return 4800 * h / 146097;
|
||
}
|
||
function th(h) {
|
||
return 146097 * h / 4800;
|
||
}
|
||
function ti(h) {
|
||
return function() {
|
||
return this.as(h);
|
||
};
|
||
}
|
||
Mt = ti("ms"), ht = ti("s"), ee = ti("m"), et = ti("h"), Yt = ti("d"), Pe = ti("w"), pt = ti("M"), rs = ti("Q"), Ii = ti("y");
|
||
function ns(h) {
|
||
return function() {
|
||
return this.isValid() ? this._data[h] : NaN;
|
||
};
|
||
}
|
||
var Oi = ns("milliseconds"), Ri = ns("seconds"), pl = ns("minutes"), ce = ns("hours"), Sb = ns("days"), Ab = ns("months"), Lb = ns("years"), ei = Math.round, Ys = { ss: 44, s: 45, m: 45, h: 22, d: 26, w: null, M: 11 };
|
||
function Db(h, y, _, S) {
|
||
var It = ln(h).abs(), ue = ei(It.as("s")), R = ei(It.as("m")), it = ei(It.as("h")), yt = ei(It.as("d")), Ct = ei(It.as("M")), Pt = ei(It.as("w")), It = ei(It.as("y")), ue = (ue <= _.ss ? ["s", ue] : ue < _.s && ["ss", ue]) || R <= 1 && ["m"] || R < _.m && ["mm", R] || it <= 1 && ["h"] || it < _.h && ["hh", it] || yt <= 1 && ["d"] || yt < _.d && ["dd", yt];
|
||
return (ue = (ue = _.w != null ? ue || Pt <= 1 && ["w"] || Pt < _.w && ["ww", Pt] : ue) || Ct <= 1 && ["M"] || Ct < _.M && ["MM", Ct] || It <= 1 && ["y"] || ["yy", It])[2] = y, ue[3] = 0 < +h, ue[4] = S, function(re, He, rr, cn, rh) {
|
||
return rh.relativeTime(He || 1, !!rr, re, cn);
|
||
}.apply(null, ue);
|
||
}
|
||
var eh = Math.abs;
|
||
function Vs(h) {
|
||
return (0 < h) - (h < 0) || +h;
|
||
}
|
||
function gl() {
|
||
if (!this.isValid())
|
||
return this.localeData().invalidDate();
|
||
var h, y, _, S, R, it, yt, Ct = eh(this._milliseconds) / 1e3, Pt = eh(this._days), It = eh(this._months), ue = this.asSeconds();
|
||
return ue ? (h = $(Ct / 60), y = $(h / 60), Ct %= 60, h %= 60, _ = $(It / 12), It %= 12, S = Ct ? Ct.toFixed(3).replace(/\.?0+$/, "") : "", R = Vs(this._months) !== Vs(ue) ? "-" : "", it = Vs(this._days) !== Vs(ue) ? "-" : "", yt = Vs(this._milliseconds) !== Vs(ue) ? "-" : "", (ue < 0 ? "-" : "") + "P" + (_ ? R + _ + "Y" : "") + (It ? R + It + "M" : "") + (Pt ? it + Pt + "D" : "") + (y || h || Ct ? "T" : "") + (y ? yt + y + "H" : "") + (h ? yt + h + "M" : "") + (Ct ? yt + S + "S" : "")) : "P0D";
|
||
}
|
||
var Ce = on.prototype;
|
||
return Ce.isValid = function() {
|
||
return this._isValid;
|
||
}, Ce.abs = function() {
|
||
var h = this._data;
|
||
return this._milliseconds = Jn(this._milliseconds), this._days = Jn(this._days), this._months = Jn(this._months), h.milliseconds = Jn(h.milliseconds), h.seconds = Jn(h.seconds), h.minutes = Jn(h.minutes), h.hours = Jn(h.hours), h.months = Jn(h.months), h.years = Jn(h.years), this;
|
||
}, Ce.add = function(h, y) {
|
||
return tf(this, h, y, 1);
|
||
}, Ce.subtract = function(h, y) {
|
||
return tf(this, h, y, -1);
|
||
}, Ce.as = function(h) {
|
||
if (!this.isValid())
|
||
return NaN;
|
||
var y, _, S = this._milliseconds;
|
||
if ((h = _t(h)) === "month" || h === "quarter" || h === "year")
|
||
switch (y = this._days + S / 864e5, _ = this._months + rf(y), h) {
|
||
case "month":
|
||
return _;
|
||
case "quarter":
|
||
return _ / 3;
|
||
case "year":
|
||
return _ / 12;
|
||
}
|
||
else
|
||
switch (y = this._days + Math.round(th(this._months)), h) {
|
||
case "week":
|
||
return y / 7 + S / 6048e5;
|
||
case "day":
|
||
return y + S / 864e5;
|
||
case "hour":
|
||
return 24 * y + S / 36e5;
|
||
case "minute":
|
||
return 1440 * y + S / 6e4;
|
||
case "second":
|
||
return 86400 * y + S / 1e3;
|
||
case "millisecond":
|
||
return Math.floor(864e5 * y) + S;
|
||
default:
|
||
throw new Error("Unknown unit " + h);
|
||
}
|
||
}, Ce.asMilliseconds = Mt, Ce.asSeconds = ht, Ce.asMinutes = ee, Ce.asHours = et, Ce.asDays = Yt, Ce.asWeeks = Pe, Ce.asMonths = pt, Ce.asQuarters = rs, Ce.asYears = Ii, Ce.valueOf = function() {
|
||
return this.isValid() ? this._milliseconds + 864e5 * this._days + this._months % 12 * 2592e6 + 31536e6 * F(this._months / 12) : NaN;
|
||
}, Ce._bubble = function() {
|
||
var h = this._milliseconds, y = this._days, _ = this._months, S = this._data;
|
||
return 0 <= h && 0 <= y && 0 <= _ || h <= 0 && y <= 0 && _ <= 0 || (h += 864e5 * ef(th(_) + y), _ = y = 0), S.milliseconds = h % 1e3, h = $(h / 1e3), S.seconds = h % 60, h = $(h / 60), S.minutes = h % 60, h = $(h / 60), S.hours = h % 24, y += $(h / 24), _ += h = $(rf(y)), y -= ef(th(h)), h = $(_ / 12), _ %= 12, S.days = y, S.months = _, S.years = h, this;
|
||
}, Ce.clone = function() {
|
||
return ln(this);
|
||
}, Ce.get = function(h) {
|
||
return h = _t(h), this.isValid() ? this[h + "s"]() : NaN;
|
||
}, Ce.milliseconds = Oi, Ce.seconds = Ri, Ce.minutes = pl, Ce.hours = ce, Ce.days = Sb, Ce.weeks = function() {
|
||
return $(this.days() / 7);
|
||
}, Ce.months = Ab, Ce.years = Lb, Ce.humanize = function(h, y) {
|
||
if (!this.isValid())
|
||
return this.localeData().invalidDate();
|
||
var _ = !1, S = Ys;
|
||
return typeof h == "object" && (y = h, h = !1), typeof h == "boolean" && (_ = h), typeof y == "object" && (S = Object.assign({}, Ys, y), y.s != null && y.ss == null && (S.ss = y.s - 1)), h = this.localeData(), y = Db(this, !_, S, h), _ && (y = h.pastFuture(+this, y)), h.postformat(y);
|
||
}, Ce.toISOString = gl, Ce.toString = gl, Ce.toJSON = gl, Ce.locale = qd, Ce.localeData = jd, Ce.toIsoString = W("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)", gl), Ce.lang = Ge, j("X", 0, 0, "unix"), j("x", 0, 0, "valueOf"), st("x", gt), st("X", /[+-]?\d+(\.\d{1,3})?/), Gt("X", function(h, y, _) {
|
||
_._d = new Date(1e3 * parseFloat(h));
|
||
}), Gt("x", function(h, y, _) {
|
||
_._d = new Date(F(h));
|
||
}), n.version = "2.29.4", r = Se, n.fn = C, n.min = function() {
|
||
return Ar("isBefore", [].slice.call(arguments, 0));
|
||
}, n.max = function() {
|
||
return Ar("isAfter", [].slice.call(arguments, 0));
|
||
}, n.now = function() {
|
||
return Date.now ? Date.now() : +new Date();
|
||
}, n.utc = g, n.unix = function(h) {
|
||
return Se(1e3 * h);
|
||
}, n.months = function(h, y) {
|
||
return Jd(h, y, "months");
|
||
}, n.isDate = d, n.locale = qt, n.invalid = T, n.duration = ln, n.isMoment = G, n.weekdays = function(h, y, _) {
|
||
return Ju(h, y, _, "weekdays");
|
||
}, n.parseZone = function() {
|
||
return Se.apply(null, arguments).parseZone();
|
||
}, n.localeData = oe, n.isDuration = Qn, n.monthsShort = function(h, y) {
|
||
return Jd(h, y, "monthsShort");
|
||
}, n.weekdaysMin = function(h, y, _) {
|
||
return Ju(h, y, _, "weekdaysMin");
|
||
}, n.defineLocale = te, n.updateLocale = function(h, y) {
|
||
var _, S;
|
||
return y != null ? (S = We, xe[h] != null && xe[h].parentLocale != null ? xe[h].set(v(xe[h]._config, y)) : (y = v(S = (_ = Rr(h)) != null ? _._config : S, y), _ == null && (y.abbr = h), (S = new M(y)).parentLocale = xe[h], xe[h] = S), qt(h)) : xe[h] != null && (xe[h].parentLocale != null ? (xe[h] = xe[h].parentLocale, h === qt() && qt(h)) : xe[h] != null && delete xe[h]), xe[h];
|
||
}, n.locales = function() {
|
||
return m(xe);
|
||
}, n.weekdaysShort = function(h, y, _) {
|
||
return Ju(h, y, _, "weekdaysShort");
|
||
}, n.normalizeUnits = _t, n.relativeTimeRounding = function(h) {
|
||
return h === void 0 ? ei : typeof h == "function" && (ei = h, !0);
|
||
}, n.relativeTimeThreshold = function(h, y) {
|
||
return Ys[h] !== void 0 && (y === void 0 ? Ys[h] : (Ys[h] = y, h === "s" && (Ys.ss = y - 1), !0));
|
||
}, n.calendarFormat = function(h, y) {
|
||
return (h = h.diff(y, "days", !0)) < -6 ? "sameElse" : h < -1 ? "lastWeek" : h < 0 ? "lastDay" : h < 1 ? "sameDay" : h < 2 ? "nextDay" : h < 7 ? "nextWeek" : "sameElse";
|
||
}, n.prototype = C, 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;
|
||
});
|
||
})(zp);
|
||
const vn = zp.exports, ri = {
|
||
trace: 0,
|
||
debug: 1,
|
||
info: 2,
|
||
warn: 3,
|
||
error: 4,
|
||
fatal: 5
|
||
}, B = {
|
||
trace: (...t) => {
|
||
},
|
||
debug: (...t) => {
|
||
},
|
||
info: (...t) => {
|
||
},
|
||
warn: (...t) => {
|
||
},
|
||
error: (...t) => {
|
||
},
|
||
fatal: (...t) => {
|
||
}
|
||
}, u0 = function(t = "fatal") {
|
||
let e = ri.fatal;
|
||
typeof t == "string" ? (t = t.toLowerCase(), t in ri && (e = ri[t])) : typeof t == "number" && (e = t), B.trace = () => {
|
||
}, B.debug = () => {
|
||
}, B.info = () => {
|
||
}, B.warn = () => {
|
||
}, B.error = () => {
|
||
}, B.fatal = () => {
|
||
}, e <= ri.fatal && (B.fatal = console.error ? console.error.bind(console, Zr("FATAL"), "color: orange") : console.log.bind(console, "\x1B[35m", Zr("FATAL"))), e <= ri.error && (B.error = console.error ? console.error.bind(console, Zr("ERROR"), "color: orange") : console.log.bind(console, "\x1B[31m", Zr("ERROR"))), e <= ri.warn && (B.warn = console.warn ? console.warn.bind(console, Zr("WARN"), "color: orange") : console.log.bind(console, "\x1B[33m", Zr("WARN"))), e <= ri.info && (B.info = console.info ? console.info.bind(console, Zr("INFO"), "color: lightblue") : console.log.bind(console, "\x1B[34m", Zr("INFO"))), e <= ri.debug && (B.debug = console.debug ? console.debug.bind(console, Zr("DEBUG"), "color: lightgreen") : console.log.bind(console, "\x1B[32m", Zr("DEBUG"))), e <= ri.trace && (B.trace = console.debug ? console.debug.bind(console, Zr("TRACE"), "color: lightgreen") : console.log.bind(console, "\x1B[32m", Zr("TRACE")));
|
||
}, Zr = (t) => `%c${vn().format("ss.SSS")} : ${t} : `;
|
||
var h0 = {};
|
||
Object.defineProperty(h0, "__esModule", { value: !0 });
|
||
var Ti = h0.sanitizeUrl = void 0, Ob = /^([^\w]*)(javascript|data|vbscript)/im, Rb = /&#(\w+)(^\w|;)?/g, Fb = /[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim, Pb = /^([^:]+):/gm, Yb = [".", "/"];
|
||
function Vb(t) {
|
||
return Yb.indexOf(t[0]) > -1;
|
||
}
|
||
function Ub(t) {
|
||
return t.replace(Rb, function(e, r) {
|
||
return String.fromCharCode(r);
|
||
});
|
||
}
|
||
function zb(t) {
|
||
var e = Ub(t || "").replace(Fb, "").trim();
|
||
if (!e)
|
||
return "about:blank";
|
||
if (Vb(e))
|
||
return e;
|
||
var r = e.match(Pb);
|
||
if (!r)
|
||
return e;
|
||
var n = r[0];
|
||
return Ob.test(n) ? "about:blank" : e;
|
||
}
|
||
Ti = h0.sanitizeUrl = zb;
|
||
function Il(t, e) {
|
||
return t == null || e == null ? NaN : t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN;
|
||
}
|
||
function Wb(t, e) {
|
||
return t == null || e == null ? NaN : e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN;
|
||
}
|
||
function d0(t) {
|
||
let e, r, n;
|
||
t.length !== 2 ? (e = Il, r = (o, l) => Il(t(o), l), n = (o, l) => t(o) - l) : (e = t === Il || t === Wb ? t : Hb, r = t, n = t);
|
||
function i(o, l, u = 0, d = o.length) {
|
||
if (u < d) {
|
||
if (e(l, l) !== 0)
|
||
return d;
|
||
do {
|
||
const f = u + d >>> 1;
|
||
r(o[f], l) < 0 ? u = f + 1 : d = f;
|
||
} while (u < d);
|
||
}
|
||
return u;
|
||
}
|
||
function s(o, l, u = 0, d = o.length) {
|
||
if (u < d) {
|
||
if (e(l, l) !== 0)
|
||
return d;
|
||
do {
|
||
const f = u + d >>> 1;
|
||
r(o[f], l) <= 0 ? u = f + 1 : d = f;
|
||
} while (u < d);
|
||
}
|
||
return u;
|
||
}
|
||
function a(o, l, u = 0, d = o.length) {
|
||
const f = i(o, l, u, d - 1);
|
||
return f > u && n(o[f - 1], l) > -n(o[f], l) ? f - 1 : f;
|
||
}
|
||
return { left: i, center: a, right: s };
|
||
}
|
||
function Hb() {
|
||
return 0;
|
||
}
|
||
function Gb(t) {
|
||
return t === null ? NaN : +t;
|
||
}
|
||
const qb = d0(Il), jb = qb.right;
|
||
d0(Gb).center;
|
||
const Xb = jb;
|
||
class nf extends Map {
|
||
constructor(e, r = Zb) {
|
||
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(sf(this, e));
|
||
}
|
||
has(e) {
|
||
return super.has(sf(this, e));
|
||
}
|
||
set(e, r) {
|
||
return super.set($b(this, e), r);
|
||
}
|
||
delete(e) {
|
||
return super.delete(Kb(this, e));
|
||
}
|
||
}
|
||
function sf({ _intern: t, _key: e }, r) {
|
||
const n = e(r);
|
||
return t.has(n) ? t.get(n) : r;
|
||
}
|
||
function $b({ _intern: t, _key: e }, r) {
|
||
const n = e(r);
|
||
return t.has(n) ? t.get(n) : (t.set(n, r), r);
|
||
}
|
||
function Kb({ _intern: t, _key: e }, r) {
|
||
const n = e(r);
|
||
return t.has(n) && (r = t.get(n), t.delete(n)), r;
|
||
}
|
||
function Zb(t) {
|
||
return t !== null && typeof t == "object" ? t.valueOf() : t;
|
||
}
|
||
var Gh = Math.sqrt(50), qh = Math.sqrt(10), jh = Math.sqrt(2);
|
||
function Qb(t, e, r) {
|
||
var n, i = -1, s, a, o;
|
||
if (e = +e, t = +t, r = +r, t === e && r > 0)
|
||
return [t];
|
||
if ((n = e < t) && (s = t, t = e, e = s), (o = Wp(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, a = new Array(s = u - l + 1); ++i < s; )
|
||
a[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, a = new Array(s = u - l + 1); ++i < s; )
|
||
a[i] = (l + i) / o;
|
||
}
|
||
return n && a.reverse(), a;
|
||
}
|
||
function Wp(t, e, r) {
|
||
var n = (e - t) / Math.max(0, r), i = Math.floor(Math.log(n) / Math.LN10), s = n / Math.pow(10, i);
|
||
return i >= 0 ? (s >= Gh ? 10 : s >= qh ? 5 : s >= jh ? 2 : 1) * Math.pow(10, i) : -Math.pow(10, -i) / (s >= Gh ? 10 : s >= qh ? 5 : s >= jh ? 2 : 1);
|
||
}
|
||
function Xh(t, e, r) {
|
||
var n = Math.abs(e - t) / Math.max(0, r), i = Math.pow(10, Math.floor(Math.log(n) / Math.LN10)), s = n / i;
|
||
return s >= Gh ? i *= 10 : s >= qh ? i *= 5 : s >= jh && (i *= 2), e < t ? -i : i;
|
||
}
|
||
function Jb(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 t5(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 e5(t) {
|
||
return t;
|
||
}
|
||
var Ol = 1, nh = 2, $h = 3, yl = 4, af = 1e-6;
|
||
function r5(t) {
|
||
return "translate(" + t + ",0)";
|
||
}
|
||
function n5(t) {
|
||
return "translate(0," + t + ")";
|
||
}
|
||
function i5(t) {
|
||
return (e) => +t(e);
|
||
}
|
||
function s5(t, e) {
|
||
return e = Math.max(0, t.bandwidth() - e * 2) / 2, t.round() && (e = Math.round(e)), (r) => +t(r) + e;
|
||
}
|
||
function a5() {
|
||
return !this.__axis;
|
||
}
|
||
function Hp(t, e) {
|
||
var r = [], n = null, i = null, s = 6, a = 6, o = 3, l = typeof window < "u" && window.devicePixelRatio > 1 ? 0 : 0.5, u = t === Ol || t === yl ? -1 : 1, d = t === yl || t === nh ? "x" : "y", f = t === Ol || t === $h ? r5 : n5;
|
||
function p(g) {
|
||
var b = n == null ? e.ticks ? e.ticks.apply(e, r) : e.domain() : n, k = i == null ? e.tickFormat ? e.tickFormat.apply(e, r) : e5 : i, T = Math.max(s, 0) + o, L = e.range(), E = +L[0] + l, I = +L[L.length - 1] + l, V = (e.bandwidth ? s5 : i5)(e.copy(), l), H = g.selection ? g.selection() : g, G = H.selectAll(".domain").data([null]), Y = H.selectAll(".tick").data(b, e).order(), W = Y.exit(), N = Y.enter().append("g").attr("class", "tick"), D = Y.select("line"), w = Y.select("text");
|
||
G = G.merge(G.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor")), Y = Y.merge(N), D = D.merge(N.append("line").attr("stroke", "currentColor").attr(d + "2", u * s)), w = w.merge(N.append("text").attr("fill", "currentColor").attr(d, u * T).attr("dy", t === Ol ? "0em" : t === $h ? "0.71em" : "0.32em")), g !== H && (G = G.transition(g), Y = Y.transition(g), D = D.transition(g), w = w.transition(g), W = W.transition(g).attr("opacity", af).attr("transform", function(v) {
|
||
return isFinite(v = V(v)) ? f(v + l) : this.getAttribute("transform");
|
||
}), N.attr("opacity", af).attr("transform", function(v) {
|
||
var M = this.parentNode.__axis;
|
||
return f((M && isFinite(M = M(v)) ? M : V(v)) + l);
|
||
})), W.remove(), G.attr("d", t === yl || t === nh ? a ? "M" + u * a + "," + E + "H" + l + "V" + I + "H" + u * a : "M" + l + "," + E + "V" + I : a ? "M" + E + "," + u * a + "V" + l + "H" + I + "V" + u * a : "M" + E + "," + l + "H" + I), Y.attr("opacity", 1).attr("transform", function(v) {
|
||
return f(V(v) + l);
|
||
}), D.attr(d + "2", u * s), w.attr(d, u * T).text(k), H.filter(a5).attr("fill", "none").attr("font-size", 10).attr("font-family", "sans-serif").attr("text-anchor", t === nh ? "start" : t === yl ? "end" : "middle"), H.each(function() {
|
||
this.__axis = V;
|
||
});
|
||
}
|
||
return p.scale = function(g) {
|
||
return arguments.length ? (e = g, p) : e;
|
||
}, p.ticks = function() {
|
||
return r = Array.from(arguments), p;
|
||
}, p.tickArguments = function(g) {
|
||
return arguments.length ? (r = g == null ? [] : Array.from(g), p) : r.slice();
|
||
}, p.tickValues = function(g) {
|
||
return arguments.length ? (n = g == null ? null : Array.from(g), p) : n && n.slice();
|
||
}, p.tickFormat = function(g) {
|
||
return arguments.length ? (i = g, p) : i;
|
||
}, p.tickSize = function(g) {
|
||
return arguments.length ? (s = a = +g, p) : s;
|
||
}, p.tickSizeInner = function(g) {
|
||
return arguments.length ? (s = +g, p) : s;
|
||
}, p.tickSizeOuter = function(g) {
|
||
return arguments.length ? (a = +g, p) : a;
|
||
}, p.tickPadding = function(g) {
|
||
return arguments.length ? (o = +g, p) : o;
|
||
}, p.offset = function(g) {
|
||
return arguments.length ? (l = +g, p) : l;
|
||
}, p;
|
||
}
|
||
function o5(t) {
|
||
return Hp(Ol, t);
|
||
}
|
||
function l5(t) {
|
||
return Hp($h, t);
|
||
}
|
||
var c5 = { value: () => {
|
||
} };
|
||
function Gp() {
|
||
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 Rl(r);
|
||
}
|
||
function Rl(t) {
|
||
this._ = t;
|
||
}
|
||
function u5(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 };
|
||
});
|
||
}
|
||
Rl.prototype = Gp.prototype = {
|
||
constructor: Rl,
|
||
on: function(t, e) {
|
||
var r = this._, n = u5(t + "", r), i, s = -1, a = n.length;
|
||
if (arguments.length < 2) {
|
||
for (; ++s < a; )
|
||
if ((i = (t = n[s]).type) && (i = h5(r[i], t.name)))
|
||
return i;
|
||
return;
|
||
}
|
||
if (e != null && typeof e != "function")
|
||
throw new Error("invalid callback: " + e);
|
||
for (; ++s < a; )
|
||
if (i = (t = n[s]).type)
|
||
r[i] = of(r[i], t.name, e);
|
||
else if (e == null)
|
||
for (i in r)
|
||
r[i] = of(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 Rl(t);
|
||
},
|
||
call: function(t, e) {
|
||
if ((i = arguments.length - 2) > 0)
|
||
for (var r = new Array(i), n = 0, i, s; n < i; ++n)
|
||
r[n] = arguments[n + 2];
|
||
if (!this._.hasOwnProperty(t))
|
||
throw new Error("unknown type: " + t);
|
||
for (s = this._[t], n = 0, i = s.length; n < i; ++n)
|
||
s[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, s = n.length; i < s; ++i)
|
||
n[i].value.apply(e, r);
|
||
}
|
||
};
|
||
function h5(t, e) {
|
||
for (var r = 0, n = t.length, i; r < n; ++r)
|
||
if ((i = t[r]).name === e)
|
||
return i.value;
|
||
}
|
||
function of(t, e, r) {
|
||
for (var n = 0, i = t.length; n < i; ++n)
|
||
if (t[n].name === e) {
|
||
t[n] = c5, t = t.slice(0, n).concat(t.slice(n + 1));
|
||
break;
|
||
}
|
||
return r != null && t.push({ name: e, value: r }), t;
|
||
}
|
||
var Kh = "http://www.w3.org/1999/xhtml";
|
||
const lf = {
|
||
svg: "http://www.w3.org/2000/svg",
|
||
xhtml: Kh,
|
||
xlink: "http://www.w3.org/1999/xlink",
|
||
xml: "http://www.w3.org/XML/1998/namespace",
|
||
xmlns: "http://www.w3.org/2000/xmlns/"
|
||
};
|
||
function au(t) {
|
||
var e = t += "", r = e.indexOf(":");
|
||
return r >= 0 && (e = t.slice(0, r)) !== "xmlns" && (t = t.slice(r + 1)), lf.hasOwnProperty(e) ? { space: lf[e], local: t } : t;
|
||
}
|
||
function d5(t) {
|
||
return function() {
|
||
var e = this.ownerDocument, r = this.namespaceURI;
|
||
return r === Kh && e.documentElement.namespaceURI === Kh ? e.createElement(t) : e.createElementNS(r, t);
|
||
};
|
||
}
|
||
function f5(t) {
|
||
return function() {
|
||
return this.ownerDocument.createElementNS(t.space, t.local);
|
||
};
|
||
}
|
||
function qp(t) {
|
||
var e = au(t);
|
||
return (e.local ? f5 : d5)(e);
|
||
}
|
||
function p5() {
|
||
}
|
||
function f0(t) {
|
||
return t == null ? p5 : function() {
|
||
return this.querySelector(t);
|
||
};
|
||
}
|
||
function g5(t) {
|
||
typeof t != "function" && (t = f0(t));
|
||
for (var e = this._groups, r = e.length, n = new Array(r), i = 0; i < r; ++i)
|
||
for (var s = e[i], a = s.length, o = n[i] = new Array(a), l, u, d = 0; d < a; ++d)
|
||
(l = s[d]) && (u = t.call(l, l.__data__, d, s)) && ("__data__" in l && (u.__data__ = l.__data__), o[d] = u);
|
||
return new Ir(n, this._parents);
|
||
}
|
||
function jp(t) {
|
||
return t == null ? [] : Array.isArray(t) ? t : Array.from(t);
|
||
}
|
||
function y5() {
|
||
return [];
|
||
}
|
||
function Xp(t) {
|
||
return t == null ? y5 : function() {
|
||
return this.querySelectorAll(t);
|
||
};
|
||
}
|
||
function m5(t) {
|
||
return function() {
|
||
return jp(t.apply(this, arguments));
|
||
};
|
||
}
|
||
function b5(t) {
|
||
typeof t == "function" ? t = m5(t) : t = Xp(t);
|
||
for (var e = this._groups, r = e.length, n = [], i = [], s = 0; s < r; ++s)
|
||
for (var a = e[s], o = a.length, l, u = 0; u < o; ++u)
|
||
(l = a[u]) && (n.push(t.call(l, l.__data__, u, a)), i.push(l));
|
||
return new Ir(n, i);
|
||
}
|
||
function $p(t) {
|
||
return function() {
|
||
return this.matches(t);
|
||
};
|
||
}
|
||
function Kp(t) {
|
||
return function(e) {
|
||
return e.matches(t);
|
||
};
|
||
}
|
||
var _5 = Array.prototype.find;
|
||
function x5(t) {
|
||
return function() {
|
||
return _5.call(this.children, t);
|
||
};
|
||
}
|
||
function v5() {
|
||
return this.firstElementChild;
|
||
}
|
||
function k5(t) {
|
||
return this.select(t == null ? v5 : x5(typeof t == "function" ? t : Kp(t)));
|
||
}
|
||
var w5 = Array.prototype.filter;
|
||
function T5() {
|
||
return Array.from(this.children);
|
||
}
|
||
function E5(t) {
|
||
return function() {
|
||
return w5.call(this.children, t);
|
||
};
|
||
}
|
||
function C5(t) {
|
||
return this.selectAll(t == null ? T5 : E5(typeof t == "function" ? t : Kp(t)));
|
||
}
|
||
function S5(t) {
|
||
typeof t != "function" && (t = $p(t));
|
||
for (var e = this._groups, r = e.length, n = new Array(r), i = 0; i < r; ++i)
|
||
for (var s = e[i], a = s.length, o = n[i] = [], l, u = 0; u < a; ++u)
|
||
(l = s[u]) && t.call(l, l.__data__, u, s) && o.push(l);
|
||
return new Ir(n, this._parents);
|
||
}
|
||
function Zp(t) {
|
||
return new Array(t.length);
|
||
}
|
||
function A5() {
|
||
return new Ir(this._enter || this._groups.map(Zp), this._parents);
|
||
}
|
||
function ic(t, e) {
|
||
this.ownerDocument = t.ownerDocument, this.namespaceURI = t.namespaceURI, this._next = null, this._parent = t, this.__data__ = e;
|
||
}
|
||
ic.prototype = {
|
||
constructor: ic,
|
||
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 L5(t) {
|
||
return function() {
|
||
return t;
|
||
};
|
||
}
|
||
function D5(t, e, r, n, i, s) {
|
||
for (var a = 0, o, l = e.length, u = s.length; a < u; ++a)
|
||
(o = e[a]) ? (o.__data__ = s[a], n[a] = o) : r[a] = new ic(t, s[a]);
|
||
for (; a < l; ++a)
|
||
(o = e[a]) && (i[a] = o);
|
||
}
|
||
function M5(t, e, r, n, i, s, a) {
|
||
var o, l, u = /* @__PURE__ */ new Map(), d = e.length, f = s.length, p = new Array(d), g;
|
||
for (o = 0; o < d; ++o)
|
||
(l = e[o]) && (p[o] = g = a.call(l, l.__data__, o, e) + "", u.has(g) ? i[o] = l : u.set(g, l));
|
||
for (o = 0; o < f; ++o)
|
||
g = a.call(t, s[o], o, s) + "", (l = u.get(g)) ? (n[o] = l, l.__data__ = s[o], u.delete(g)) : r[o] = new ic(t, s[o]);
|
||
for (o = 0; o < d; ++o)
|
||
(l = e[o]) && u.get(p[o]) === l && (i[o] = l);
|
||
}
|
||
function N5(t) {
|
||
return t.__data__;
|
||
}
|
||
function B5(t, e) {
|
||
if (!arguments.length)
|
||
return Array.from(this, N5);
|
||
var r = e ? M5 : D5, n = this._parents, i = this._groups;
|
||
typeof t != "function" && (t = L5(t));
|
||
for (var s = i.length, a = new Array(s), o = new Array(s), l = new Array(s), u = 0; u < s; ++u) {
|
||
var d = n[u], f = i[u], p = f.length, g = I5(t.call(d, d && d.__data__, u, n)), b = g.length, k = o[u] = new Array(b), T = a[u] = new Array(b), L = l[u] = new Array(p);
|
||
r(d, f, k, T, L, g, e);
|
||
for (var E = 0, I = 0, V, H; E < b; ++E)
|
||
if (V = k[E]) {
|
||
for (E >= I && (I = E + 1); !(H = T[I]) && ++I < b; )
|
||
;
|
||
V._next = H || null;
|
||
}
|
||
}
|
||
return a = new Ir(a, n), a._enter = o, a._exit = l, a;
|
||
}
|
||
function I5(t) {
|
||
return typeof t == "object" && "length" in t ? t : Array.from(t);
|
||
}
|
||
function O5() {
|
||
return new Ir(this._exit || this._groups.map(Zp), this._parents);
|
||
}
|
||
function R5(t, e, r) {
|
||
var n = this.enter(), i = this, s = 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 ? s.remove() : r(s), n && i ? n.merge(i).order() : i;
|
||
}
|
||
function F5(t) {
|
||
for (var e = t.selection ? t.selection() : t, r = this._groups, n = e._groups, i = r.length, s = n.length, a = Math.min(i, s), o = new Array(i), l = 0; l < a; ++l)
|
||
for (var u = r[l], d = n[l], f = u.length, p = o[l] = new Array(f), g, b = 0; b < f; ++b)
|
||
(g = u[b] || d[b]) && (p[b] = g);
|
||
for (; l < i; ++l)
|
||
o[l] = r[l];
|
||
return new Ir(o, this._parents);
|
||
}
|
||
function P5() {
|
||
for (var t = this._groups, e = -1, r = t.length; ++e < r; )
|
||
for (var n = t[e], i = n.length - 1, s = n[i], a; --i >= 0; )
|
||
(a = n[i]) && (s && a.compareDocumentPosition(s) ^ 4 && s.parentNode.insertBefore(a, s), s = a);
|
||
return this;
|
||
}
|
||
function Y5(t) {
|
||
t || (t = V5);
|
||
function e(f, p) {
|
||
return f && p ? t(f.__data__, p.__data__) : !f - !p;
|
||
}
|
||
for (var r = this._groups, n = r.length, i = new Array(n), s = 0; s < n; ++s) {
|
||
for (var a = r[s], o = a.length, l = i[s] = new Array(o), u, d = 0; d < o; ++d)
|
||
(u = a[d]) && (l[d] = u);
|
||
l.sort(e);
|
||
}
|
||
return new Ir(i, this._parents).order();
|
||
}
|
||
function V5(t, e) {
|
||
return t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN;
|
||
}
|
||
function U5() {
|
||
var t = arguments[0];
|
||
return arguments[0] = this, t.apply(null, arguments), this;
|
||
}
|
||
function z5() {
|
||
return Array.from(this);
|
||
}
|
||
function W5() {
|
||
for (var t = this._groups, e = 0, r = t.length; e < r; ++e)
|
||
for (var n = t[e], i = 0, s = n.length; i < s; ++i) {
|
||
var a = n[i];
|
||
if (a)
|
||
return a;
|
||
}
|
||
return null;
|
||
}
|
||
function H5() {
|
||
let t = 0;
|
||
for (const e of this)
|
||
++t;
|
||
return t;
|
||
}
|
||
function G5() {
|
||
return !this.node();
|
||
}
|
||
function q5(t) {
|
||
for (var e = this._groups, r = 0, n = e.length; r < n; ++r)
|
||
for (var i = e[r], s = 0, a = i.length, o; s < a; ++s)
|
||
(o = i[s]) && t.call(o, o.__data__, s, i);
|
||
return this;
|
||
}
|
||
function j5(t) {
|
||
return function() {
|
||
this.removeAttribute(t);
|
||
};
|
||
}
|
||
function X5(t) {
|
||
return function() {
|
||
this.removeAttributeNS(t.space, t.local);
|
||
};
|
||
}
|
||
function $5(t, e) {
|
||
return function() {
|
||
this.setAttribute(t, e);
|
||
};
|
||
}
|
||
function K5(t, e) {
|
||
return function() {
|
||
this.setAttributeNS(t.space, t.local, e);
|
||
};
|
||
}
|
||
function Z5(t, e) {
|
||
return function() {
|
||
var r = e.apply(this, arguments);
|
||
r == null ? this.removeAttribute(t) : this.setAttribute(t, r);
|
||
};
|
||
}
|
||
function Q5(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 J5(t, e) {
|
||
var r = au(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 ? X5 : j5 : typeof e == "function" ? r.local ? Q5 : Z5 : r.local ? K5 : $5)(r, e));
|
||
}
|
||
function Qp(t) {
|
||
return t.ownerDocument && t.ownerDocument.defaultView || t.document && t || t.defaultView;
|
||
}
|
||
function t_(t) {
|
||
return function() {
|
||
this.style.removeProperty(t);
|
||
};
|
||
}
|
||
function e_(t, e, r) {
|
||
return function() {
|
||
this.style.setProperty(t, e, r);
|
||
};
|
||
}
|
||
function r_(t, e, r) {
|
||
return function() {
|
||
var n = e.apply(this, arguments);
|
||
n == null ? this.style.removeProperty(t) : this.style.setProperty(t, n, r);
|
||
};
|
||
}
|
||
function n_(t, e, r) {
|
||
return arguments.length > 1 ? this.each((e == null ? t_ : typeof e == "function" ? r_ : e_)(t, e, r == null ? "" : r)) : oa(this.node(), t);
|
||
}
|
||
function oa(t, e) {
|
||
return t.style.getPropertyValue(e) || Qp(t).getComputedStyle(t, null).getPropertyValue(e);
|
||
}
|
||
function i_(t) {
|
||
return function() {
|
||
delete this[t];
|
||
};
|
||
}
|
||
function s_(t, e) {
|
||
return function() {
|
||
this[t] = e;
|
||
};
|
||
}
|
||
function a_(t, e) {
|
||
return function() {
|
||
var r = e.apply(this, arguments);
|
||
r == null ? delete this[t] : this[t] = r;
|
||
};
|
||
}
|
||
function o_(t, e) {
|
||
return arguments.length > 1 ? this.each((e == null ? i_ : typeof e == "function" ? a_ : s_)(t, e)) : this.node()[t];
|
||
}
|
||
function Jp(t) {
|
||
return t.trim().split(/^|\s+/);
|
||
}
|
||
function p0(t) {
|
||
return t.classList || new tg(t);
|
||
}
|
||
function tg(t) {
|
||
this._node = t, this._names = Jp(t.getAttribute("class") || "");
|
||
}
|
||
tg.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 eg(t, e) {
|
||
for (var r = p0(t), n = -1, i = e.length; ++n < i; )
|
||
r.add(e[n]);
|
||
}
|
||
function rg(t, e) {
|
||
for (var r = p0(t), n = -1, i = e.length; ++n < i; )
|
||
r.remove(e[n]);
|
||
}
|
||
function l_(t) {
|
||
return function() {
|
||
eg(this, t);
|
||
};
|
||
}
|
||
function c_(t) {
|
||
return function() {
|
||
rg(this, t);
|
||
};
|
||
}
|
||
function u_(t, e) {
|
||
return function() {
|
||
(e.apply(this, arguments) ? eg : rg)(this, t);
|
||
};
|
||
}
|
||
function h_(t, e) {
|
||
var r = Jp(t + "");
|
||
if (arguments.length < 2) {
|
||
for (var n = p0(this.node()), i = -1, s = r.length; ++i < s; )
|
||
if (!n.contains(r[i]))
|
||
return !1;
|
||
return !0;
|
||
}
|
||
return this.each((typeof e == "function" ? u_ : e ? l_ : c_)(r, e));
|
||
}
|
||
function d_() {
|
||
this.textContent = "";
|
||
}
|
||
function f_(t) {
|
||
return function() {
|
||
this.textContent = t;
|
||
};
|
||
}
|
||
function p_(t) {
|
||
return function() {
|
||
var e = t.apply(this, arguments);
|
||
this.textContent = e == null ? "" : e;
|
||
};
|
||
}
|
||
function g_(t) {
|
||
return arguments.length ? this.each(t == null ? d_ : (typeof t == "function" ? p_ : f_)(t)) : this.node().textContent;
|
||
}
|
||
function y_() {
|
||
this.innerHTML = "";
|
||
}
|
||
function m_(t) {
|
||
return function() {
|
||
this.innerHTML = t;
|
||
};
|
||
}
|
||
function b_(t) {
|
||
return function() {
|
||
var e = t.apply(this, arguments);
|
||
this.innerHTML = e == null ? "" : e;
|
||
};
|
||
}
|
||
function __(t) {
|
||
return arguments.length ? this.each(t == null ? y_ : (typeof t == "function" ? b_ : m_)(t)) : this.node().innerHTML;
|
||
}
|
||
function x_() {
|
||
this.nextSibling && this.parentNode.appendChild(this);
|
||
}
|
||
function v_() {
|
||
return this.each(x_);
|
||
}
|
||
function k_() {
|
||
this.previousSibling && this.parentNode.insertBefore(this, this.parentNode.firstChild);
|
||
}
|
||
function w_() {
|
||
return this.each(k_);
|
||
}
|
||
function T_(t) {
|
||
var e = typeof t == "function" ? t : qp(t);
|
||
return this.select(function() {
|
||
return this.appendChild(e.apply(this, arguments));
|
||
});
|
||
}
|
||
function E_() {
|
||
return null;
|
||
}
|
||
function C_(t, e) {
|
||
var r = typeof t == "function" ? t : qp(t), n = e == null ? E_ : typeof e == "function" ? e : f0(e);
|
||
return this.select(function() {
|
||
return this.insertBefore(r.apply(this, arguments), n.apply(this, arguments) || null);
|
||
});
|
||
}
|
||
function S_() {
|
||
var t = this.parentNode;
|
||
t && t.removeChild(this);
|
||
}
|
||
function A_() {
|
||
return this.each(S_);
|
||
}
|
||
function L_() {
|
||
var t = this.cloneNode(!1), e = this.parentNode;
|
||
return e ? e.insertBefore(t, this.nextSibling) : t;
|
||
}
|
||
function D_() {
|
||
var t = this.cloneNode(!0), e = this.parentNode;
|
||
return e ? e.insertBefore(t, this.nextSibling) : t;
|
||
}
|
||
function M_(t) {
|
||
return this.select(t ? D_ : L_);
|
||
}
|
||
function N_(t) {
|
||
return arguments.length ? this.property("__data__", t) : this.node().__data__;
|
||
}
|
||
function B_(t) {
|
||
return function(e) {
|
||
t.call(this, e, this.__data__);
|
||
};
|
||
}
|
||
function I_(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 O_(t) {
|
||
return function() {
|
||
var e = this.__on;
|
||
if (!!e) {
|
||
for (var r = 0, n = -1, i = e.length, s; r < i; ++r)
|
||
s = e[r], (!t.type || s.type === t.type) && s.name === t.name ? this.removeEventListener(s.type, s.listener, s.options) : e[++n] = s;
|
||
++n ? e.length = n : delete this.__on;
|
||
}
|
||
};
|
||
}
|
||
function R_(t, e, r) {
|
||
return function() {
|
||
var n = this.__on, i, s = B_(e);
|
||
if (n) {
|
||
for (var a = 0, o = n.length; a < o; ++a)
|
||
if ((i = n[a]).type === t.type && i.name === t.name) {
|
||
this.removeEventListener(i.type, i.listener, i.options), this.addEventListener(i.type, i.listener = s, i.options = r), i.value = e;
|
||
return;
|
||
}
|
||
}
|
||
this.addEventListener(t.type, s, r), i = { type: t.type, name: t.name, value: e, listener: s, options: r }, n ? n.push(i) : this.__on = [i];
|
||
};
|
||
}
|
||
function F_(t, e, r) {
|
||
var n = I_(t + ""), i, s = n.length, a;
|
||
if (arguments.length < 2) {
|
||
var o = this.node().__on;
|
||
if (o) {
|
||
for (var l = 0, u = o.length, d; l < u; ++l)
|
||
for (i = 0, d = o[l]; i < s; ++i)
|
||
if ((a = n[i]).type === d.type && a.name === d.name)
|
||
return d.value;
|
||
}
|
||
return;
|
||
}
|
||
for (o = e ? R_ : O_, i = 0; i < s; ++i)
|
||
this.each(o(n[i], e, r));
|
||
return this;
|
||
}
|
||
function ng(t, e, r) {
|
||
var n = Qp(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 P_(t, e) {
|
||
return function() {
|
||
return ng(this, t, e);
|
||
};
|
||
}
|
||
function Y_(t, e) {
|
||
return function() {
|
||
return ng(this, t, e.apply(this, arguments));
|
||
};
|
||
}
|
||
function V_(t, e) {
|
||
return this.each((typeof e == "function" ? Y_ : P_)(t, e));
|
||
}
|
||
function* U_() {
|
||
for (var t = this._groups, e = 0, r = t.length; e < r; ++e)
|
||
for (var n = t[e], i = 0, s = n.length, a; i < s; ++i)
|
||
(a = n[i]) && (yield a);
|
||
}
|
||
var g0 = [null];
|
||
function Ir(t, e) {
|
||
this._groups = t, this._parents = e;
|
||
}
|
||
function jo() {
|
||
return new Ir([[document.documentElement]], g0);
|
||
}
|
||
function z_() {
|
||
return this;
|
||
}
|
||
Ir.prototype = jo.prototype = {
|
||
constructor: Ir,
|
||
select: g5,
|
||
selectAll: b5,
|
||
selectChild: k5,
|
||
selectChildren: C5,
|
||
filter: S5,
|
||
data: B5,
|
||
enter: A5,
|
||
exit: O5,
|
||
join: R5,
|
||
merge: F5,
|
||
selection: z_,
|
||
order: P5,
|
||
sort: Y5,
|
||
call: U5,
|
||
nodes: z5,
|
||
node: W5,
|
||
size: H5,
|
||
empty: G5,
|
||
each: q5,
|
||
attr: J5,
|
||
style: n_,
|
||
property: o_,
|
||
classed: h_,
|
||
text: g_,
|
||
html: __,
|
||
raise: v_,
|
||
lower: w_,
|
||
append: T_,
|
||
insert: C_,
|
||
remove: A_,
|
||
clone: M_,
|
||
datum: N_,
|
||
on: F_,
|
||
dispatch: V_,
|
||
[Symbol.iterator]: U_
|
||
};
|
||
function At(t) {
|
||
return typeof t == "string" ? new Ir([[document.querySelector(t)]], [document.documentElement]) : new Ir([[t]], g0);
|
||
}
|
||
function y0(t) {
|
||
return typeof t == "string" ? new Ir([document.querySelectorAll(t)], [document.documentElement]) : new Ir([jp(t)], g0);
|
||
}
|
||
function Xo(t, e, r) {
|
||
t.prototype = e.prototype = r, r.constructor = t;
|
||
}
|
||
function ou(t, e) {
|
||
var r = Object.create(t.prototype);
|
||
for (var n in e)
|
||
r[n] = e[n];
|
||
return r;
|
||
}
|
||
function As() {
|
||
}
|
||
var _o = 0.7, sc = 1 / _o, ta = "\\s*([+-]?\\d+)\\s*", xo = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", zn = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", W_ = /^#([0-9a-f]{3,8})$/, H_ = new RegExp(`^rgb\\(${ta},${ta},${ta}\\)$`), G_ = new RegExp(`^rgb\\(${zn},${zn},${zn}\\)$`), q_ = new RegExp(`^rgba\\(${ta},${ta},${ta},${xo}\\)$`), j_ = new RegExp(`^rgba\\(${zn},${zn},${zn},${xo}\\)$`), X_ = new RegExp(`^hsl\\(${xo},${zn},${zn}\\)$`), $_ = new RegExp(`^hsla\\(${xo},${zn},${zn},${xo}\\)$`), cf = {
|
||
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
|
||
};
|
||
Xo(As, ys, {
|
||
copy(t) {
|
||
return Object.assign(new this.constructor(), this, t);
|
||
},
|
||
displayable() {
|
||
return this.rgb().displayable();
|
||
},
|
||
hex: uf,
|
||
formatHex: uf,
|
||
formatHex8: K_,
|
||
formatHsl: Z_,
|
||
formatRgb: hf,
|
||
toString: hf
|
||
});
|
||
function uf() {
|
||
return this.rgb().formatHex();
|
||
}
|
||
function K_() {
|
||
return this.rgb().formatHex8();
|
||
}
|
||
function Z_() {
|
||
return sg(this).formatHsl();
|
||
}
|
||
function hf() {
|
||
return this.rgb().formatRgb();
|
||
}
|
||
function ys(t) {
|
||
var e, r;
|
||
return t = (t + "").trim().toLowerCase(), (e = W_.exec(t)) ? (r = e[1].length, e = parseInt(e[1], 16), r === 6 ? df(e) : r === 3 ? new Er(e >> 8 & 15 | e >> 4 & 240, e >> 4 & 15 | e & 240, (e & 15) << 4 | e & 15, 1) : r === 8 ? ml(e >> 24 & 255, e >> 16 & 255, e >> 8 & 255, (e & 255) / 255) : r === 4 ? ml(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 = H_.exec(t)) ? new Er(e[1], e[2], e[3], 1) : (e = G_.exec(t)) ? new Er(e[1] * 255 / 100, e[2] * 255 / 100, e[3] * 255 / 100, 1) : (e = q_.exec(t)) ? ml(e[1], e[2], e[3], e[4]) : (e = j_.exec(t)) ? ml(e[1] * 255 / 100, e[2] * 255 / 100, e[3] * 255 / 100, e[4]) : (e = X_.exec(t)) ? gf(e[1], e[2] / 100, e[3] / 100, 1) : (e = $_.exec(t)) ? gf(e[1], e[2] / 100, e[3] / 100, e[4]) : cf.hasOwnProperty(t) ? df(cf[t]) : t === "transparent" ? new Er(NaN, NaN, NaN, 0) : null;
|
||
}
|
||
function df(t) {
|
||
return new Er(t >> 16 & 255, t >> 8 & 255, t & 255, 1);
|
||
}
|
||
function ml(t, e, r, n) {
|
||
return n <= 0 && (t = e = r = NaN), new Er(t, e, r, n);
|
||
}
|
||
function ig(t) {
|
||
return t instanceof As || (t = ys(t)), t ? (t = t.rgb(), new Er(t.r, t.g, t.b, t.opacity)) : new Er();
|
||
}
|
||
function Zh(t, e, r, n) {
|
||
return arguments.length === 1 ? ig(t) : new Er(t, e, r, n == null ? 1 : n);
|
||
}
|
||
function Er(t, e, r, n) {
|
||
this.r = +t, this.g = +e, this.b = +r, this.opacity = +n;
|
||
}
|
||
Xo(Er, Zh, ou(As, {
|
||
brighter(t) {
|
||
return t = t == null ? sc : Math.pow(sc, t), new Er(this.r * t, this.g * t, this.b * t, this.opacity);
|
||
},
|
||
darker(t) {
|
||
return t = t == null ? _o : Math.pow(_o, t), new Er(this.r * t, this.g * t, this.b * t, this.opacity);
|
||
},
|
||
rgb() {
|
||
return this;
|
||
},
|
||
clamp() {
|
||
return new Er(fs(this.r), fs(this.g), fs(this.b), ac(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: ff,
|
||
formatHex: ff,
|
||
formatHex8: Q_,
|
||
formatRgb: pf,
|
||
toString: pf
|
||
}));
|
||
function ff() {
|
||
return `#${ds(this.r)}${ds(this.g)}${ds(this.b)}`;
|
||
}
|
||
function Q_() {
|
||
return `#${ds(this.r)}${ds(this.g)}${ds(this.b)}${ds((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
|
||
}
|
||
function pf() {
|
||
const t = ac(this.opacity);
|
||
return `${t === 1 ? "rgb(" : "rgba("}${fs(this.r)}, ${fs(this.g)}, ${fs(this.b)}${t === 1 ? ")" : `, ${t})`}`;
|
||
}
|
||
function ac(t) {
|
||
return isNaN(t) ? 1 : Math.max(0, Math.min(1, t));
|
||
}
|
||
function fs(t) {
|
||
return Math.max(0, Math.min(255, Math.round(t) || 0));
|
||
}
|
||
function ds(t) {
|
||
return t = fs(t), (t < 16 ? "0" : "") + t.toString(16);
|
||
}
|
||
function gf(t, e, r, n) {
|
||
return n <= 0 ? t = e = r = NaN : r <= 0 || r >= 1 ? t = e = NaN : e <= 0 && (t = NaN), new fn(t, e, r, n);
|
||
}
|
||
function sg(t) {
|
||
if (t instanceof fn)
|
||
return new fn(t.h, t.s, t.l, t.opacity);
|
||
if (t instanceof As || (t = ys(t)), !t)
|
||
return new fn();
|
||
if (t instanceof fn)
|
||
return t;
|
||
t = t.rgb();
|
||
var e = t.r / 255, r = t.g / 255, n = t.b / 255, i = Math.min(e, r, n), s = Math.max(e, r, n), a = NaN, o = s - i, l = (s + i) / 2;
|
||
return o ? (e === s ? a = (r - n) / o + (r < n) * 6 : r === s ? a = (n - e) / o + 2 : a = (e - r) / o + 4, o /= l < 0.5 ? s + i : 2 - s - i, a *= 60) : o = l > 0 && l < 1 ? 0 : a, new fn(a, o, l, t.opacity);
|
||
}
|
||
function J_(t, e, r, n) {
|
||
return arguments.length === 1 ? sg(t) : new fn(t, e, r, n == null ? 1 : n);
|
||
}
|
||
function fn(t, e, r, n) {
|
||
this.h = +t, this.s = +e, this.l = +r, this.opacity = +n;
|
||
}
|
||
Xo(fn, J_, ou(As, {
|
||
brighter(t) {
|
||
return t = t == null ? sc : Math.pow(sc, t), new fn(this.h, this.s, this.l * t, this.opacity);
|
||
},
|
||
darker(t) {
|
||
return t = t == null ? _o : Math.pow(_o, t), new fn(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 Er(
|
||
ih(t >= 240 ? t - 240 : t + 120, i, n),
|
||
ih(t, i, n),
|
||
ih(t < 120 ? t + 240 : t - 120, i, n),
|
||
this.opacity
|
||
);
|
||
},
|
||
clamp() {
|
||
return new fn(yf(this.h), bl(this.s), bl(this.l), ac(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 = ac(this.opacity);
|
||
return `${t === 1 ? "hsl(" : "hsla("}${yf(this.h)}, ${bl(this.s) * 100}%, ${bl(this.l) * 100}%${t === 1 ? ")" : `, ${t})`}`;
|
||
}
|
||
}));
|
||
function yf(t) {
|
||
return t = (t || 0) % 360, t < 0 ? t + 360 : t;
|
||
}
|
||
function bl(t) {
|
||
return Math.max(0, Math.min(1, t || 0));
|
||
}
|
||
function ih(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 tx = Math.PI / 180, ex = 180 / Math.PI, oc = 18, ag = 0.96422, og = 1, lg = 0.82521, cg = 4 / 29, ea = 6 / 29, ug = 3 * ea * ea, rx = ea * ea * ea;
|
||
function hg(t) {
|
||
if (t instanceof Wn)
|
||
return new Wn(t.l, t.a, t.b, t.opacity);
|
||
if (t instanceof di)
|
||
return dg(t);
|
||
t instanceof Er || (t = ig(t));
|
||
var e = lh(t.r), r = lh(t.g), n = lh(t.b), i = sh((0.2225045 * e + 0.7168786 * r + 0.0606169 * n) / og), s, a;
|
||
return e === r && r === n ? s = a = i : (s = sh((0.4360747 * e + 0.3850649 * r + 0.1430804 * n) / ag), a = sh((0.0139322 * e + 0.0971045 * r + 0.7141733 * n) / lg)), new Wn(116 * i - 16, 500 * (s - i), 200 * (i - a), t.opacity);
|
||
}
|
||
function nx(t, e, r, n) {
|
||
return arguments.length === 1 ? hg(t) : new Wn(t, e, r, n == null ? 1 : n);
|
||
}
|
||
function Wn(t, e, r, n) {
|
||
this.l = +t, this.a = +e, this.b = +r, this.opacity = +n;
|
||
}
|
||
Xo(Wn, nx, ou(As, {
|
||
brighter(t) {
|
||
return new Wn(this.l + oc * (t == null ? 1 : t), this.a, this.b, this.opacity);
|
||
},
|
||
darker(t) {
|
||
return new Wn(this.l - oc * (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 = ag * ah(e), t = og * ah(t), r = lg * ah(r), new Er(
|
||
oh(3.1338561 * e - 1.6168667 * t - 0.4906146 * r),
|
||
oh(-0.9787684 * e + 1.9161415 * t + 0.033454 * r),
|
||
oh(0.0719453 * e - 0.2289914 * t + 1.4052427 * r),
|
||
this.opacity
|
||
);
|
||
}
|
||
}));
|
||
function sh(t) {
|
||
return t > rx ? Math.pow(t, 1 / 3) : t / ug + cg;
|
||
}
|
||
function ah(t) {
|
||
return t > ea ? t * t * t : ug * (t - cg);
|
||
}
|
||
function oh(t) {
|
||
return 255 * (t <= 31308e-7 ? 12.92 * t : 1.055 * Math.pow(t, 1 / 2.4) - 0.055);
|
||
}
|
||
function lh(t) {
|
||
return (t /= 255) <= 0.04045 ? t / 12.92 : Math.pow((t + 0.055) / 1.055, 2.4);
|
||
}
|
||
function ix(t) {
|
||
if (t instanceof di)
|
||
return new di(t.h, t.c, t.l, t.opacity);
|
||
if (t instanceof Wn || (t = hg(t)), t.a === 0 && t.b === 0)
|
||
return new di(NaN, 0 < t.l && t.l < 100 ? 0 : NaN, t.l, t.opacity);
|
||
var e = Math.atan2(t.b, t.a) * ex;
|
||
return new di(e < 0 ? e + 360 : e, Math.sqrt(t.a * t.a + t.b * t.b), t.l, t.opacity);
|
||
}
|
||
function Qh(t, e, r, n) {
|
||
return arguments.length === 1 ? ix(t) : new di(t, e, r, n == null ? 1 : n);
|
||
}
|
||
function di(t, e, r, n) {
|
||
this.h = +t, this.c = +e, this.l = +r, this.opacity = +n;
|
||
}
|
||
function dg(t) {
|
||
if (isNaN(t.h))
|
||
return new Wn(t.l, 0, 0, t.opacity);
|
||
var e = t.h * tx;
|
||
return new Wn(t.l, Math.cos(e) * t.c, Math.sin(e) * t.c, t.opacity);
|
||
}
|
||
Xo(di, Qh, ou(As, {
|
||
brighter(t) {
|
||
return new di(this.h, this.c, this.l + oc * (t == null ? 1 : t), this.opacity);
|
||
},
|
||
darker(t) {
|
||
return new di(this.h, this.c, this.l - oc * (t == null ? 1 : t), this.opacity);
|
||
},
|
||
rgb() {
|
||
return dg(this).rgb();
|
||
}
|
||
}));
|
||
const lu = (t) => () => t;
|
||
function fg(t, e) {
|
||
return function(r) {
|
||
return t + r * e;
|
||
};
|
||
}
|
||
function sx(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 ax(t, e) {
|
||
var r = e - t;
|
||
return r ? fg(t, r > 180 || r < -180 ? r - 360 * Math.round(r / 360) : r) : lu(isNaN(t) ? e : t);
|
||
}
|
||
function ox(t) {
|
||
return (t = +t) == 1 ? ao : function(e, r) {
|
||
return r - e ? sx(e, r, t) : lu(isNaN(e) ? r : e);
|
||
};
|
||
}
|
||
function ao(t, e) {
|
||
var r = e - t;
|
||
return r ? fg(t, r) : lu(isNaN(t) ? e : t);
|
||
}
|
||
const lc = function t(e) {
|
||
var r = ox(e);
|
||
function n(i, s) {
|
||
var a = r((i = Zh(i)).r, (s = Zh(s)).r), o = r(i.g, s.g), l = r(i.b, s.b), u = ao(i.opacity, s.opacity);
|
||
return function(d) {
|
||
return i.r = a(d), i.g = o(d), i.b = l(d), i.opacity = u(d), i + "";
|
||
};
|
||
}
|
||
return n.gamma = t, n;
|
||
}(1);
|
||
function lx(t, e) {
|
||
e || (e = []);
|
||
var r = t ? Math.min(e.length, t.length) : 0, n = e.slice(), i;
|
||
return function(s) {
|
||
for (i = 0; i < r; ++i)
|
||
n[i] = t[i] * (1 - s) + e[i] * s;
|
||
return n;
|
||
};
|
||
}
|
||
function cx(t) {
|
||
return ArrayBuffer.isView(t) && !(t instanceof DataView);
|
||
}
|
||
function ux(t, e) {
|
||
var r = e ? e.length : 0, n = t ? Math.min(r, t.length) : 0, i = new Array(n), s = new Array(r), a;
|
||
for (a = 0; a < n; ++a)
|
||
i[a] = m0(t[a], e[a]);
|
||
for (; a < r; ++a)
|
||
s[a] = e[a];
|
||
return function(o) {
|
||
for (a = 0; a < n; ++a)
|
||
s[a] = i[a](o);
|
||
return s;
|
||
};
|
||
}
|
||
function hx(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 dx(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] = m0(t[i], e[i]) : n[i] = e[i];
|
||
return function(s) {
|
||
for (i in r)
|
||
n[i] = r[i](s);
|
||
return n;
|
||
};
|
||
}
|
||
var Jh = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, ch = new RegExp(Jh.source, "g");
|
||
function fx(t) {
|
||
return function() {
|
||
return t;
|
||
};
|
||
}
|
||
function px(t) {
|
||
return function(e) {
|
||
return t(e) + "";
|
||
};
|
||
}
|
||
function pg(t, e) {
|
||
var r = Jh.lastIndex = ch.lastIndex = 0, n, i, s, a = -1, o = [], l = [];
|
||
for (t = t + "", e = e + ""; (n = Jh.exec(t)) && (i = ch.exec(e)); )
|
||
(s = i.index) > r && (s = e.slice(r, s), o[a] ? o[a] += s : o[++a] = s), (n = n[0]) === (i = i[0]) ? o[a] ? o[a] += i : o[++a] = i : (o[++a] = null, l.push({ i: a, x: dn(n, i) })), r = ch.lastIndex;
|
||
return r < e.length && (s = e.slice(r), o[a] ? o[a] += s : o[++a] = s), o.length < 2 ? l[0] ? px(l[0].x) : fx(e) : (e = l.length, function(u) {
|
||
for (var d = 0, f; d < e; ++d)
|
||
o[(f = l[d]).i] = f.x(u);
|
||
return o.join("");
|
||
});
|
||
}
|
||
function m0(t, e) {
|
||
var r = typeof e, n;
|
||
return e == null || r === "boolean" ? lu(e) : (r === "number" ? dn : r === "string" ? (n = ys(e)) ? (e = n, lc) : pg : e instanceof ys ? lc : e instanceof Date ? hx : cx(e) ? lx : Array.isArray(e) ? ux : typeof e.valueOf != "function" && typeof e.toString != "function" || isNaN(e) ? dx : dn)(t, e);
|
||
}
|
||
function gx(t, e) {
|
||
return t = +t, e = +e, function(r) {
|
||
return Math.round(t * (1 - r) + e * r);
|
||
};
|
||
}
|
||
var mf = 180 / Math.PI, t1 = {
|
||
translateX: 0,
|
||
translateY: 0,
|
||
rotate: 0,
|
||
skewX: 0,
|
||
scaleX: 1,
|
||
scaleY: 1
|
||
};
|
||
function gg(t, e, r, n, i, s) {
|
||
var a, o, l;
|
||
return (a = Math.sqrt(t * t + e * e)) && (t /= a, e /= a), (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, a = -a), {
|
||
translateX: i,
|
||
translateY: s,
|
||
rotate: Math.atan2(e, t) * mf,
|
||
skewX: Math.atan(l) * mf,
|
||
scaleX: a,
|
||
scaleY: o
|
||
};
|
||
}
|
||
var _l;
|
||
function yx(t) {
|
||
const e = new (typeof DOMMatrix == "function" ? DOMMatrix : WebKitCSSMatrix)(t + "");
|
||
return e.isIdentity ? t1 : gg(e.a, e.b, e.c, e.d, e.e, e.f);
|
||
}
|
||
function mx(t) {
|
||
return t == null || (_l || (_l = document.createElementNS("http://www.w3.org/2000/svg", "g")), _l.setAttribute("transform", t), !(t = _l.transform.baseVal.consolidate())) ? t1 : (t = t.matrix, gg(t.a, t.b, t.c, t.d, t.e, t.f));
|
||
}
|
||
function yg(t, e, r, n) {
|
||
function i(u) {
|
||
return u.length ? u.pop() + " " : "";
|
||
}
|
||
function s(u, d, f, p, g, b) {
|
||
if (u !== f || d !== p) {
|
||
var k = g.push("translate(", null, e, null, r);
|
||
b.push({ i: k - 4, x: dn(u, f) }, { i: k - 2, x: dn(d, p) });
|
||
} else
|
||
(f || p) && g.push("translate(" + f + e + p + r);
|
||
}
|
||
function a(u, d, f, p) {
|
||
u !== d ? (u - d > 180 ? d += 360 : d - u > 180 && (u += 360), p.push({ i: f.push(i(f) + "rotate(", null, n) - 2, x: dn(u, d) })) : d && f.push(i(f) + "rotate(" + d + n);
|
||
}
|
||
function o(u, d, f, p) {
|
||
u !== d ? p.push({ i: f.push(i(f) + "skewX(", null, n) - 2, x: dn(u, d) }) : d && f.push(i(f) + "skewX(" + d + n);
|
||
}
|
||
function l(u, d, f, p, g, b) {
|
||
if (u !== f || d !== p) {
|
||
var k = g.push(i(g) + "scale(", null, ",", null, ")");
|
||
b.push({ i: k - 4, x: dn(u, f) }, { i: k - 2, x: dn(d, p) });
|
||
} else
|
||
(f !== 1 || p !== 1) && g.push(i(g) + "scale(" + f + "," + p + ")");
|
||
}
|
||
return function(u, d) {
|
||
var f = [], p = [];
|
||
return u = t(u), d = t(d), s(u.translateX, u.translateY, d.translateX, d.translateY, f, p), a(u.rotate, d.rotate, f, p), o(u.skewX, d.skewX, f, p), l(u.scaleX, u.scaleY, d.scaleX, d.scaleY, f, p), u = d = null, function(g) {
|
||
for (var b = -1, k = p.length, T; ++b < k; )
|
||
f[(T = p[b]).i] = T.x(g);
|
||
return f.join("");
|
||
};
|
||
};
|
||
}
|
||
var bx = yg(yx, "px, ", "px)", "deg)"), _x = yg(mx, ", ", ")", ")");
|
||
function xx(t) {
|
||
return function(e, r) {
|
||
var n = t((e = Qh(e)).h, (r = Qh(r)).h), i = ao(e.c, r.c), s = ao(e.l, r.l), a = ao(e.opacity, r.opacity);
|
||
return function(o) {
|
||
return e.h = n(o), e.c = i(o), e.l = s(o), e.opacity = a(o), e + "";
|
||
};
|
||
};
|
||
}
|
||
const vx = xx(ax);
|
||
var la = 0, Ja = 0, za = 0, mg = 1e3, cc, to, uc = 0, ms = 0, cu = 0, vo = typeof performance == "object" && performance.now ? performance : Date, bg = typeof window == "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(t) {
|
||
setTimeout(t, 17);
|
||
};
|
||
function b0() {
|
||
return ms || (bg(kx), ms = vo.now() + cu);
|
||
}
|
||
function kx() {
|
||
ms = 0;
|
||
}
|
||
function hc() {
|
||
this._call = this._time = this._next = null;
|
||
}
|
||
hc.prototype = _g.prototype = {
|
||
constructor: hc,
|
||
restart: function(t, e, r) {
|
||
if (typeof t != "function")
|
||
throw new TypeError("callback is not a function");
|
||
r = (r == null ? b0() : +r) + (e == null ? 0 : +e), !this._next && to !== this && (to ? to._next = this : cc = this, to = this), this._call = t, this._time = r, e1();
|
||
},
|
||
stop: function() {
|
||
this._call && (this._call = null, this._time = 1 / 0, e1());
|
||
}
|
||
};
|
||
function _g(t, e, r) {
|
||
var n = new hc();
|
||
return n.restart(t, e, r), n;
|
||
}
|
||
function wx() {
|
||
b0(), ++la;
|
||
for (var t = cc, e; t; )
|
||
(e = ms - t._time) >= 0 && t._call.call(void 0, e), t = t._next;
|
||
--la;
|
||
}
|
||
function bf() {
|
||
ms = (uc = vo.now()) + cu, la = Ja = 0;
|
||
try {
|
||
wx();
|
||
} finally {
|
||
la = 0, Ex(), ms = 0;
|
||
}
|
||
}
|
||
function Tx() {
|
||
var t = vo.now(), e = t - uc;
|
||
e > mg && (cu -= e, uc = t);
|
||
}
|
||
function Ex() {
|
||
for (var t, e = cc, 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 : cc = r);
|
||
to = t, e1(n);
|
||
}
|
||
function e1(t) {
|
||
if (!la) {
|
||
Ja && (Ja = clearTimeout(Ja));
|
||
var e = t - ms;
|
||
e > 24 ? (t < 1 / 0 && (Ja = setTimeout(bf, t - vo.now() - cu)), za && (za = clearInterval(za))) : (za || (uc = vo.now(), za = setInterval(Tx, mg)), la = 1, bg(bf));
|
||
}
|
||
}
|
||
function _f(t, e, r) {
|
||
var n = new hc();
|
||
return e = e == null ? 0 : +e, n.restart((i) => {
|
||
n.stop(), t(i + e);
|
||
}, e, r), n;
|
||
}
|
||
var Cx = Gp("start", "end", "cancel", "interrupt"), Sx = [], xg = 0, xf = 1, r1 = 2, Fl = 3, vf = 4, n1 = 5, Pl = 6;
|
||
function uu(t, e, r, n, i, s) {
|
||
var a = t.__transition;
|
||
if (!a)
|
||
t.__transition = {};
|
||
else if (r in a)
|
||
return;
|
||
Ax(t, r, {
|
||
name: e,
|
||
index: n,
|
||
group: i,
|
||
on: Cx,
|
||
tween: Sx,
|
||
time: s.time,
|
||
delay: s.delay,
|
||
duration: s.duration,
|
||
ease: s.ease,
|
||
timer: null,
|
||
state: xg
|
||
});
|
||
}
|
||
function _0(t, e) {
|
||
var r = Sn(t, e);
|
||
if (r.state > xg)
|
||
throw new Error("too late; already scheduled");
|
||
return r;
|
||
}
|
||
function Xn(t, e) {
|
||
var r = Sn(t, e);
|
||
if (r.state > Fl)
|
||
throw new Error("too late; already running");
|
||
return r;
|
||
}
|
||
function Sn(t, e) {
|
||
var r = t.__transition;
|
||
if (!r || !(r = r[e]))
|
||
throw new Error("transition not found");
|
||
return r;
|
||
}
|
||
function Ax(t, e, r) {
|
||
var n = t.__transition, i;
|
||
n[e] = r, r.timer = _g(s, 0, r.time);
|
||
function s(u) {
|
||
r.state = xf, r.timer.restart(a, r.delay, r.time), r.delay <= u && a(u - r.delay);
|
||
}
|
||
function a(u) {
|
||
var d, f, p, g;
|
||
if (r.state !== xf)
|
||
return l();
|
||
for (d in n)
|
||
if (g = n[d], g.name === r.name) {
|
||
if (g.state === Fl)
|
||
return _f(a);
|
||
g.state === vf ? (g.state = Pl, g.timer.stop(), g.on.call("interrupt", t, t.__data__, g.index, g.group), delete n[d]) : +d < e && (g.state = Pl, g.timer.stop(), g.on.call("cancel", t, t.__data__, g.index, g.group), delete n[d]);
|
||
}
|
||
if (_f(function() {
|
||
r.state === Fl && (r.state = vf, r.timer.restart(o, r.delay, r.time), o(u));
|
||
}), r.state = r1, r.on.call("start", t, t.__data__, r.index, r.group), r.state === r1) {
|
||
for (r.state = Fl, i = new Array(p = r.tween.length), d = 0, f = -1; d < p; ++d)
|
||
(g = r.tween[d].value.call(t, t.__data__, r.index, r.group)) && (i[++f] = g);
|
||
i.length = f + 1;
|
||
}
|
||
}
|
||
function o(u) {
|
||
for (var d = u < r.duration ? r.ease.call(null, u / r.duration) : (r.timer.restart(l), r.state = n1, 1), f = -1, p = i.length; ++f < p; )
|
||
i[f].call(t, d);
|
||
r.state === n1 && (r.on.call("end", t, t.__data__, r.index, r.group), l());
|
||
}
|
||
function l() {
|
||
r.state = Pl, r.timer.stop(), delete n[e];
|
||
for (var u in n)
|
||
return;
|
||
delete t.__transition;
|
||
}
|
||
}
|
||
function Lx(t, e) {
|
||
var r = t.__transition, n, i, s = !0, a;
|
||
if (!!r) {
|
||
e = e == null ? null : e + "";
|
||
for (a in r) {
|
||
if ((n = r[a]).name !== e) {
|
||
s = !1;
|
||
continue;
|
||
}
|
||
i = n.state > r1 && n.state < n1, n.state = Pl, n.timer.stop(), n.on.call(i ? "interrupt" : "cancel", t, t.__data__, n.index, n.group), delete r[a];
|
||
}
|
||
s && delete t.__transition;
|
||
}
|
||
}
|
||
function Dx(t) {
|
||
return this.each(function() {
|
||
Lx(this, t);
|
||
});
|
||
}
|
||
function Mx(t, e) {
|
||
var r, n;
|
||
return function() {
|
||
var i = Xn(this, t), s = i.tween;
|
||
if (s !== r) {
|
||
n = r = s;
|
||
for (var a = 0, o = n.length; a < o; ++a)
|
||
if (n[a].name === e) {
|
||
n = n.slice(), n.splice(a, 1);
|
||
break;
|
||
}
|
||
}
|
||
i.tween = n;
|
||
};
|
||
}
|
||
function Nx(t, e, r) {
|
||
var n, i;
|
||
if (typeof r != "function")
|
||
throw new Error();
|
||
return function() {
|
||
var s = Xn(this, t), a = s.tween;
|
||
if (a !== n) {
|
||
i = (n = a).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);
|
||
}
|
||
s.tween = i;
|
||
};
|
||
}
|
||
function Bx(t, e) {
|
||
var r = this._id;
|
||
if (t += "", arguments.length < 2) {
|
||
for (var n = Sn(this.node(), r).tween, i = 0, s = n.length, a; i < s; ++i)
|
||
if ((a = n[i]).name === t)
|
||
return a.value;
|
||
return null;
|
||
}
|
||
return this.each((e == null ? Mx : Nx)(r, t, e));
|
||
}
|
||
function x0(t, e, r) {
|
||
var n = t._id;
|
||
return t.each(function() {
|
||
var i = Xn(this, n);
|
||
(i.value || (i.value = {}))[e] = r.apply(this, arguments);
|
||
}), function(i) {
|
||
return Sn(i, n).value[e];
|
||
};
|
||
}
|
||
function vg(t, e) {
|
||
var r;
|
||
return (typeof e == "number" ? dn : e instanceof ys ? lc : (r = ys(e)) ? (e = r, lc) : pg)(t, e);
|
||
}
|
||
function Ix(t) {
|
||
return function() {
|
||
this.removeAttribute(t);
|
||
};
|
||
}
|
||
function Ox(t) {
|
||
return function() {
|
||
this.removeAttributeNS(t.space, t.local);
|
||
};
|
||
}
|
||
function Rx(t, e, r) {
|
||
var n, i = r + "", s;
|
||
return function() {
|
||
var a = this.getAttribute(t);
|
||
return a === i ? null : a === n ? s : s = e(n = a, r);
|
||
};
|
||
}
|
||
function Fx(t, e, r) {
|
||
var n, i = r + "", s;
|
||
return function() {
|
||
var a = this.getAttributeNS(t.space, t.local);
|
||
return a === i ? null : a === n ? s : s = e(n = a, r);
|
||
};
|
||
}
|
||
function Px(t, e, r) {
|
||
var n, i, s;
|
||
return function() {
|
||
var a, o = r(this), l;
|
||
return o == null ? void this.removeAttribute(t) : (a = this.getAttribute(t), l = o + "", a === l ? null : a === n && l === i ? s : (i = l, s = e(n = a, o)));
|
||
};
|
||
}
|
||
function Yx(t, e, r) {
|
||
var n, i, s;
|
||
return function() {
|
||
var a, o = r(this), l;
|
||
return o == null ? void this.removeAttributeNS(t.space, t.local) : (a = this.getAttributeNS(t.space, t.local), l = o + "", a === l ? null : a === n && l === i ? s : (i = l, s = e(n = a, o)));
|
||
};
|
||
}
|
||
function Vx(t, e) {
|
||
var r = au(t), n = r === "transform" ? _x : vg;
|
||
return this.attrTween(t, typeof e == "function" ? (r.local ? Yx : Px)(r, n, x0(this, "attr." + t, e)) : e == null ? (r.local ? Ox : Ix)(r) : (r.local ? Fx : Rx)(r, n, e));
|
||
}
|
||
function Ux(t, e) {
|
||
return function(r) {
|
||
this.setAttribute(t, e.call(this, r));
|
||
};
|
||
}
|
||
function zx(t, e) {
|
||
return function(r) {
|
||
this.setAttributeNS(t.space, t.local, e.call(this, r));
|
||
};
|
||
}
|
||
function Wx(t, e) {
|
||
var r, n;
|
||
function i() {
|
||
var s = e.apply(this, arguments);
|
||
return s !== n && (r = (n = s) && zx(t, s)), r;
|
||
}
|
||
return i._value = e, i;
|
||
}
|
||
function Hx(t, e) {
|
||
var r, n;
|
||
function i() {
|
||
var s = e.apply(this, arguments);
|
||
return s !== n && (r = (n = s) && Ux(t, s)), r;
|
||
}
|
||
return i._value = e, i;
|
||
}
|
||
function Gx(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 = au(t);
|
||
return this.tween(r, (n.local ? Wx : Hx)(n, e));
|
||
}
|
||
function qx(t, e) {
|
||
return function() {
|
||
_0(this, t).delay = +e.apply(this, arguments);
|
||
};
|
||
}
|
||
function jx(t, e) {
|
||
return e = +e, function() {
|
||
_0(this, t).delay = e;
|
||
};
|
||
}
|
||
function Xx(t) {
|
||
var e = this._id;
|
||
return arguments.length ? this.each((typeof t == "function" ? qx : jx)(e, t)) : Sn(this.node(), e).delay;
|
||
}
|
||
function $x(t, e) {
|
||
return function() {
|
||
Xn(this, t).duration = +e.apply(this, arguments);
|
||
};
|
||
}
|
||
function Kx(t, e) {
|
||
return e = +e, function() {
|
||
Xn(this, t).duration = e;
|
||
};
|
||
}
|
||
function Zx(t) {
|
||
var e = this._id;
|
||
return arguments.length ? this.each((typeof t == "function" ? $x : Kx)(e, t)) : Sn(this.node(), e).duration;
|
||
}
|
||
function Qx(t, e) {
|
||
if (typeof e != "function")
|
||
throw new Error();
|
||
return function() {
|
||
Xn(this, t).ease = e;
|
||
};
|
||
}
|
||
function Jx(t) {
|
||
var e = this._id;
|
||
return arguments.length ? this.each(Qx(e, t)) : Sn(this.node(), e).ease;
|
||
}
|
||
function t6(t, e) {
|
||
return function() {
|
||
var r = e.apply(this, arguments);
|
||
if (typeof r != "function")
|
||
throw new Error();
|
||
Xn(this, t).ease = r;
|
||
};
|
||
}
|
||
function e6(t) {
|
||
if (typeof t != "function")
|
||
throw new Error();
|
||
return this.each(t6(this._id, t));
|
||
}
|
||
function r6(t) {
|
||
typeof t != "function" && (t = $p(t));
|
||
for (var e = this._groups, r = e.length, n = new Array(r), i = 0; i < r; ++i)
|
||
for (var s = e[i], a = s.length, o = n[i] = [], l, u = 0; u < a; ++u)
|
||
(l = s[u]) && t.call(l, l.__data__, u, s) && o.push(l);
|
||
return new vi(n, this._parents, this._name, this._id);
|
||
}
|
||
function n6(t) {
|
||
if (t._id !== this._id)
|
||
throw new Error();
|
||
for (var e = this._groups, r = t._groups, n = e.length, i = r.length, s = Math.min(n, i), a = new Array(n), o = 0; o < s; ++o)
|
||
for (var l = e[o], u = r[o], d = l.length, f = a[o] = new Array(d), p, g = 0; g < d; ++g)
|
||
(p = l[g] || u[g]) && (f[g] = p);
|
||
for (; o < n; ++o)
|
||
a[o] = e[o];
|
||
return new vi(a, this._parents, this._name, this._id);
|
||
}
|
||
function i6(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 s6(t, e, r) {
|
||
var n, i, s = i6(e) ? _0 : Xn;
|
||
return function() {
|
||
var a = s(this, t), o = a.on;
|
||
o !== n && (i = (n = o).copy()).on(e, r), a.on = i;
|
||
};
|
||
}
|
||
function a6(t, e) {
|
||
var r = this._id;
|
||
return arguments.length < 2 ? Sn(this.node(), r).on.on(t) : this.each(s6(r, t, e));
|
||
}
|
||
function o6(t) {
|
||
return function() {
|
||
var e = this.parentNode;
|
||
for (var r in this.__transition)
|
||
if (+r !== t)
|
||
return;
|
||
e && e.removeChild(this);
|
||
};
|
||
}
|
||
function l6() {
|
||
return this.on("end.remove", o6(this._id));
|
||
}
|
||
function c6(t) {
|
||
var e = this._name, r = this._id;
|
||
typeof t != "function" && (t = f0(t));
|
||
for (var n = this._groups, i = n.length, s = new Array(i), a = 0; a < i; ++a)
|
||
for (var o = n[a], l = o.length, u = s[a] = new Array(l), d, f, p = 0; p < l; ++p)
|
||
(d = o[p]) && (f = t.call(d, d.__data__, p, o)) && ("__data__" in d && (f.__data__ = d.__data__), u[p] = f, uu(u[p], e, r, p, u, Sn(d, r)));
|
||
return new vi(s, this._parents, e, r);
|
||
}
|
||
function u6(t) {
|
||
var e = this._name, r = this._id;
|
||
typeof t != "function" && (t = Xp(t));
|
||
for (var n = this._groups, i = n.length, s = [], a = [], o = 0; o < i; ++o)
|
||
for (var l = n[o], u = l.length, d, f = 0; f < u; ++f)
|
||
if (d = l[f]) {
|
||
for (var p = t.call(d, d.__data__, f, l), g, b = Sn(d, r), k = 0, T = p.length; k < T; ++k)
|
||
(g = p[k]) && uu(g, e, r, k, p, b);
|
||
s.push(p), a.push(d);
|
||
}
|
||
return new vi(s, a, e, r);
|
||
}
|
||
var h6 = jo.prototype.constructor;
|
||
function d6() {
|
||
return new h6(this._groups, this._parents);
|
||
}
|
||
function f6(t, e) {
|
||
var r, n, i;
|
||
return function() {
|
||
var s = oa(this, t), a = (this.style.removeProperty(t), oa(this, t));
|
||
return s === a ? null : s === r && a === n ? i : i = e(r = s, n = a);
|
||
};
|
||
}
|
||
function kg(t) {
|
||
return function() {
|
||
this.style.removeProperty(t);
|
||
};
|
||
}
|
||
function p6(t, e, r) {
|
||
var n, i = r + "", s;
|
||
return function() {
|
||
var a = oa(this, t);
|
||
return a === i ? null : a === n ? s : s = e(n = a, r);
|
||
};
|
||
}
|
||
function g6(t, e, r) {
|
||
var n, i, s;
|
||
return function() {
|
||
var a = oa(this, t), o = r(this), l = o + "";
|
||
return o == null && (l = o = (this.style.removeProperty(t), oa(this, t))), a === l ? null : a === n && l === i ? s : (i = l, s = e(n = a, o));
|
||
};
|
||
}
|
||
function y6(t, e) {
|
||
var r, n, i, s = "style." + e, a = "end." + s, o;
|
||
return function() {
|
||
var l = Xn(this, t), u = l.on, d = l.value[s] == null ? o || (o = kg(e)) : void 0;
|
||
(u !== r || i !== d) && (n = (r = u).copy()).on(a, i = d), l.on = n;
|
||
};
|
||
}
|
||
function m6(t, e, r) {
|
||
var n = (t += "") == "transform" ? bx : vg;
|
||
return e == null ? this.styleTween(t, f6(t, n)).on("end.style." + t, kg(t)) : typeof e == "function" ? this.styleTween(t, g6(t, n, x0(this, "style." + t, e))).each(y6(this._id, t)) : this.styleTween(t, p6(t, n, e), r).on("end.style." + t, null);
|
||
}
|
||
function b6(t, e, r) {
|
||
return function(n) {
|
||
this.style.setProperty(t, e.call(this, n), r);
|
||
};
|
||
}
|
||
function _6(t, e, r) {
|
||
var n, i;
|
||
function s() {
|
||
var a = e.apply(this, arguments);
|
||
return a !== i && (n = (i = a) && b6(t, a, r)), n;
|
||
}
|
||
return s._value = e, s;
|
||
}
|
||
function x6(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, _6(t, e, r == null ? "" : r));
|
||
}
|
||
function v6(t) {
|
||
return function() {
|
||
this.textContent = t;
|
||
};
|
||
}
|
||
function k6(t) {
|
||
return function() {
|
||
var e = t(this);
|
||
this.textContent = e == null ? "" : e;
|
||
};
|
||
}
|
||
function w6(t) {
|
||
return this.tween("text", typeof t == "function" ? k6(x0(this, "text", t)) : v6(t == null ? "" : t + ""));
|
||
}
|
||
function T6(t) {
|
||
return function(e) {
|
||
this.textContent = t.call(this, e);
|
||
};
|
||
}
|
||
function E6(t) {
|
||
var e, r;
|
||
function n() {
|
||
var i = t.apply(this, arguments);
|
||
return i !== r && (e = (r = i) && T6(i)), e;
|
||
}
|
||
return n._value = t, n;
|
||
}
|
||
function C6(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, E6(t));
|
||
}
|
||
function S6() {
|
||
for (var t = this._name, e = this._id, r = wg(), n = this._groups, i = n.length, s = 0; s < i; ++s)
|
||
for (var a = n[s], o = a.length, l, u = 0; u < o; ++u)
|
||
if (l = a[u]) {
|
||
var d = Sn(l, e);
|
||
uu(l, t, r, u, a, {
|
||
time: d.time + d.delay + d.duration,
|
||
delay: 0,
|
||
duration: d.duration,
|
||
ease: d.ease
|
||
});
|
||
}
|
||
return new vi(n, this._parents, t, r);
|
||
}
|
||
function A6() {
|
||
var t, e, r = this, n = r._id, i = r.size();
|
||
return new Promise(function(s, a) {
|
||
var o = { value: a }, l = { value: function() {
|
||
--i === 0 && s();
|
||
} };
|
||
r.each(function() {
|
||
var u = Xn(this, n), d = u.on;
|
||
d !== t && (e = (t = d).copy(), e._.cancel.push(o), e._.interrupt.push(o), e._.end.push(l)), u.on = e;
|
||
}), i === 0 && s();
|
||
});
|
||
}
|
||
var L6 = 0;
|
||
function vi(t, e, r, n) {
|
||
this._groups = t, this._parents = e, this._name = r, this._id = n;
|
||
}
|
||
function wg() {
|
||
return ++L6;
|
||
}
|
||
var ni = jo.prototype;
|
||
vi.prototype = {
|
||
constructor: vi,
|
||
select: c6,
|
||
selectAll: u6,
|
||
selectChild: ni.selectChild,
|
||
selectChildren: ni.selectChildren,
|
||
filter: r6,
|
||
merge: n6,
|
||
selection: d6,
|
||
transition: S6,
|
||
call: ni.call,
|
||
nodes: ni.nodes,
|
||
node: ni.node,
|
||
size: ni.size,
|
||
empty: ni.empty,
|
||
each: ni.each,
|
||
on: a6,
|
||
attr: Vx,
|
||
attrTween: Gx,
|
||
style: m6,
|
||
styleTween: x6,
|
||
text: w6,
|
||
textTween: C6,
|
||
remove: l6,
|
||
tween: Bx,
|
||
delay: Xx,
|
||
duration: Zx,
|
||
ease: Jx,
|
||
easeVarying: e6,
|
||
end: A6,
|
||
[Symbol.iterator]: ni[Symbol.iterator]
|
||
};
|
||
function D6(t) {
|
||
return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;
|
||
}
|
||
var M6 = {
|
||
time: null,
|
||
delay: 0,
|
||
duration: 250,
|
||
ease: D6
|
||
};
|
||
function N6(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 B6(t) {
|
||
var e, r;
|
||
t instanceof vi ? (e = t._id, t = t._name) : (e = wg(), (r = M6).time = b0(), t = t == null ? null : t + "");
|
||
for (var n = this._groups, i = n.length, s = 0; s < i; ++s)
|
||
for (var a = n[s], o = a.length, l, u = 0; u < o; ++u)
|
||
(l = a[u]) && uu(l, t, e, u, a, r || N6(l, e));
|
||
return new vi(n, this._parents, t, e);
|
||
}
|
||
jo.prototype.interrupt = Dx;
|
||
jo.prototype.transition = B6;
|
||
const i1 = Math.PI, s1 = 2 * i1, ls = 1e-6, I6 = s1 - ls;
|
||
function a1() {
|
||
this._x0 = this._y0 = this._x1 = this._y1 = null, this._ = "";
|
||
}
|
||
function v0() {
|
||
return new a1();
|
||
}
|
||
a1.prototype = v0.prototype = {
|
||
constructor: a1,
|
||
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, s) {
|
||
this._ += "C" + +t + "," + +e + "," + +r + "," + +n + "," + (this._x1 = +i) + "," + (this._y1 = +s);
|
||
},
|
||
arcTo: function(t, e, r, n, i) {
|
||
t = +t, e = +e, r = +r, n = +n, i = +i;
|
||
var s = this._x1, a = this._y1, o = r - t, l = n - e, u = s - t, d = a - e, f = u * u + d * d;
|
||
if (i < 0)
|
||
throw new Error("negative radius: " + i);
|
||
if (this._x1 === null)
|
||
this._ += "M" + (this._x1 = t) + "," + (this._y1 = e);
|
||
else if (f > ls)
|
||
if (!(Math.abs(d * o - l * u) > ls) || !i)
|
||
this._ += "L" + (this._x1 = t) + "," + (this._y1 = e);
|
||
else {
|
||
var p = r - s, g = n - a, b = o * o + l * l, k = p * p + g * g, T = Math.sqrt(b), L = Math.sqrt(f), E = i * Math.tan((i1 - Math.acos((b + f - k) / (2 * T * L))) / 2), I = E / L, V = E / T;
|
||
Math.abs(I - 1) > ls && (this._ += "L" + (t + I * u) + "," + (e + I * d)), this._ += "A" + i + "," + i + ",0,0," + +(d * p > u * g) + "," + (this._x1 = t + V * o) + "," + (this._y1 = e + V * l);
|
||
}
|
||
},
|
||
arc: function(t, e, r, n, i, s) {
|
||
t = +t, e = +e, r = +r, s = !!s;
|
||
var a = r * Math.cos(n), o = r * Math.sin(n), l = t + a, u = e + o, d = 1 ^ s, f = s ? 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) > ls || Math.abs(this._y1 - u) > ls) && (this._ += "L" + l + "," + u), r && (f < 0 && (f = f % s1 + s1), f > I6 ? this._ += "A" + r + "," + r + ",0,1," + d + "," + (t - a) + "," + (e - o) + "A" + r + "," + r + ",0,1," + d + "," + (this._x1 = l) + "," + (this._y1 = u) : f > ls && (this._ += "A" + r + "," + r + ",0," + +(f >= i1) + "," + d + "," + (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._;
|
||
}
|
||
};
|
||
function O6(t) {
|
||
if (!t.ok)
|
||
throw new Error(t.status + " " + t.statusText);
|
||
return t.text();
|
||
}
|
||
function R6(t, e) {
|
||
return fetch(t, e).then(O6);
|
||
}
|
||
function F6(t) {
|
||
return (e, r) => R6(e, r).then((n) => new DOMParser().parseFromString(n, t));
|
||
}
|
||
var P6 = F6("image/svg+xml");
|
||
function Y6(t) {
|
||
return Math.abs(t = Math.round(t)) >= 1e21 ? t.toLocaleString("en").replace(/,/g, "") : t.toString(10);
|
||
}
|
||
function dc(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 ca(t) {
|
||
return t = dc(Math.abs(t)), t ? t[1] : NaN;
|
||
}
|
||
function V6(t, e) {
|
||
return function(r, n) {
|
||
for (var i = r.length, s = [], a = 0, o = t[0], l = 0; i > 0 && o > 0 && (l + o + 1 > n && (o = Math.max(1, n - l)), s.push(r.substring(i -= o, i + o)), !((l += o + 1) > n)); )
|
||
o = t[a = (a + 1) % t.length];
|
||
return s.reverse().join(e);
|
||
};
|
||
}
|
||
function U6(t) {
|
||
return function(e) {
|
||
return e.replace(/[0-9]/g, function(r) {
|
||
return t[+r];
|
||
});
|
||
};
|
||
}
|
||
var z6 = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
|
||
function fc(t) {
|
||
if (!(e = z6.exec(t)))
|
||
throw new Error("invalid format: " + t);
|
||
var e;
|
||
return new k0({
|
||
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]
|
||
});
|
||
}
|
||
fc.prototype = k0.prototype;
|
||
function k0(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 + "";
|
||
}
|
||
k0.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 W6(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 Tg;
|
||
function H6(t, e) {
|
||
var r = dc(t, e);
|
||
if (!r)
|
||
return t + "";
|
||
var n = r[0], i = r[1], s = i - (Tg = Math.max(-8, Math.min(8, Math.floor(i / 3))) * 3) + 1, a = n.length;
|
||
return s === a ? n : s > a ? n + new Array(s - a + 1).join("0") : s > 0 ? n.slice(0, s) + "." + n.slice(s) : "0." + new Array(1 - s).join("0") + dc(t, Math.max(0, e + s - 1))[0];
|
||
}
|
||
function kf(t, e) {
|
||
var r = dc(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 wf = {
|
||
"%": (t, e) => (t * 100).toFixed(e),
|
||
b: (t) => Math.round(t).toString(2),
|
||
c: (t) => t + "",
|
||
d: Y6,
|
||
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) => kf(t * 100, e),
|
||
r: kf,
|
||
s: H6,
|
||
X: (t) => Math.round(t).toString(16).toUpperCase(),
|
||
x: (t) => Math.round(t).toString(16)
|
||
};
|
||
function Tf(t) {
|
||
return t;
|
||
}
|
||
var Ef = Array.prototype.map, Cf = ["y", "z", "a", "f", "p", "n", "\xB5", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
|
||
function G6(t) {
|
||
var e = t.grouping === void 0 || t.thousands === void 0 ? Tf : V6(Ef.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 + "", s = t.numerals === void 0 ? Tf : U6(Ef.call(t.numerals, String)), a = t.percent === void 0 ? "%" : t.percent + "", o = t.minus === void 0 ? "\u2212" : t.minus + "", l = t.nan === void 0 ? "NaN" : t.nan + "";
|
||
function u(f) {
|
||
f = fc(f);
|
||
var p = f.fill, g = f.align, b = f.sign, k = f.symbol, T = f.zero, L = f.width, E = f.comma, I = f.precision, V = f.trim, H = f.type;
|
||
H === "n" ? (E = !0, H = "g") : wf[H] || (I === void 0 && (I = 12), V = !0, H = "g"), (T || p === "0" && g === "=") && (T = !0, p = "0", g = "=");
|
||
var G = k === "$" ? r : k === "#" && /[boxX]/.test(H) ? "0" + H.toLowerCase() : "", Y = k === "$" ? n : /[%p]/.test(H) ? a : "", W = wf[H], N = /[defgprs%]/.test(H);
|
||
I = I === void 0 ? 6 : /[gprs]/.test(H) ? Math.max(1, Math.min(21, I)) : Math.max(0, Math.min(20, I));
|
||
function D(w) {
|
||
var v = G, M = Y, m, Q, x;
|
||
if (H === "c")
|
||
M = W(w) + M, w = "";
|
||
else {
|
||
w = +w;
|
||
var ct = w < 0 || 1 / w < 0;
|
||
if (w = isNaN(w) ? l : W(Math.abs(w), I), V && (w = W6(w)), ct && +w == 0 && b !== "+" && (ct = !1), v = (ct ? b === "(" ? b : o : b === "-" || b === "(" ? "" : b) + v, M = (H === "s" ? Cf[8 + Tg / 3] : "") + M + (ct && b === "(" ? ")" : ""), N) {
|
||
for (m = -1, Q = w.length; ++m < Q; )
|
||
if (x = w.charCodeAt(m), 48 > x || x > 57) {
|
||
M = (x === 46 ? i + w.slice(m + 1) : w.slice(m)) + M, w = w.slice(0, m);
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
E && !T && (w = e(w, 1 / 0));
|
||
var Dt = v.length + w.length + M.length, vt = Dt < L ? new Array(L - Dt + 1).join(p) : "";
|
||
switch (E && T && (w = e(vt + w, vt.length ? L - M.length : 1 / 0), vt = ""), g) {
|
||
case "<":
|
||
w = v + w + M + vt;
|
||
break;
|
||
case "=":
|
||
w = v + vt + w + M;
|
||
break;
|
||
case "^":
|
||
w = vt.slice(0, Dt = vt.length >> 1) + v + w + M + vt.slice(Dt);
|
||
break;
|
||
default:
|
||
w = vt + v + w + M;
|
||
break;
|
||
}
|
||
return s(w);
|
||
}
|
||
return D.toString = function() {
|
||
return f + "";
|
||
}, D;
|
||
}
|
||
function d(f, p) {
|
||
var g = u((f = fc(f), f.type = "f", f)), b = Math.max(-8, Math.min(8, Math.floor(ca(p) / 3))) * 3, k = Math.pow(10, -b), T = Cf[8 + b / 3];
|
||
return function(L) {
|
||
return g(k * L) + T;
|
||
};
|
||
}
|
||
return {
|
||
format: u,
|
||
formatPrefix: d
|
||
};
|
||
}
|
||
var xl, Eg, Cg;
|
||
q6({
|
||
thousands: ",",
|
||
grouping: [3],
|
||
currency: ["$", ""]
|
||
});
|
||
function q6(t) {
|
||
return xl = G6(t), Eg = xl.format, Cg = xl.formatPrefix, xl;
|
||
}
|
||
function j6(t) {
|
||
return Math.max(0, -ca(Math.abs(t)));
|
||
}
|
||
function X6(t, e) {
|
||
return Math.max(0, Math.max(-8, Math.min(8, Math.floor(ca(e) / 3))) * 3 - ca(Math.abs(t)));
|
||
}
|
||
function $6(t, e) {
|
||
return t = Math.abs(t), e = Math.abs(e) - t, Math.max(0, ca(e) - ca(t)) + 1;
|
||
}
|
||
function w0(t, e) {
|
||
switch (arguments.length) {
|
||
case 0:
|
||
break;
|
||
case 1:
|
||
this.range(t);
|
||
break;
|
||
default:
|
||
this.range(e).domain(t);
|
||
break;
|
||
}
|
||
return this;
|
||
}
|
||
const Sf = Symbol("implicit");
|
||
function Sg() {
|
||
var t = new nf(), e = [], r = [], n = Sf;
|
||
function i(s) {
|
||
let a = t.get(s);
|
||
if (a === void 0) {
|
||
if (n !== Sf)
|
||
return n;
|
||
t.set(s, a = e.push(s) - 1);
|
||
}
|
||
return r[a % r.length];
|
||
}
|
||
return i.domain = function(s) {
|
||
if (!arguments.length)
|
||
return e.slice();
|
||
e = [], t = new nf();
|
||
for (const a of s)
|
||
t.has(a) || t.set(a, e.push(a) - 1);
|
||
return i;
|
||
}, i.range = function(s) {
|
||
return arguments.length ? (r = Array.from(s), i) : r.slice();
|
||
}, i.unknown = function(s) {
|
||
return arguments.length ? (n = s, i) : n;
|
||
}, i.copy = function() {
|
||
return Sg(e, r).unknown(n);
|
||
}, w0.apply(i, arguments), i;
|
||
}
|
||
function K6(t) {
|
||
return function() {
|
||
return t;
|
||
};
|
||
}
|
||
function Z6(t) {
|
||
return +t;
|
||
}
|
||
var Af = [0, 1];
|
||
function qs(t) {
|
||
return t;
|
||
}
|
||
function o1(t, e) {
|
||
return (e -= t = +t) ? function(r) {
|
||
return (r - t) / e;
|
||
} : K6(isNaN(e) ? NaN : 0.5);
|
||
}
|
||
function Q6(t, e) {
|
||
var r;
|
||
return t > e && (r = t, t = e, e = r), function(n) {
|
||
return Math.max(t, Math.min(e, n));
|
||
};
|
||
}
|
||
function J6(t, e, r) {
|
||
var n = t[0], i = t[1], s = e[0], a = e[1];
|
||
return i < n ? (n = o1(i, n), s = r(a, s)) : (n = o1(n, i), s = r(s, a)), function(o) {
|
||
return s(n(o));
|
||
};
|
||
}
|
||
function tv(t, e, r) {
|
||
var n = Math.min(t.length, e.length) - 1, i = new Array(n), s = new Array(n), a = -1;
|
||
for (t[n] < t[0] && (t = t.slice().reverse(), e = e.slice().reverse()); ++a < n; )
|
||
i[a] = o1(t[a], t[a + 1]), s[a] = r(e[a], e[a + 1]);
|
||
return function(o) {
|
||
var l = Xb(t, o, 1, n) - 1;
|
||
return s[l](i[l](o));
|
||
};
|
||
}
|
||
function Ag(t, e) {
|
||
return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());
|
||
}
|
||
function ev() {
|
||
var t = Af, e = Af, r = m0, n, i, s, a = qs, o, l, u;
|
||
function d() {
|
||
var p = Math.min(t.length, e.length);
|
||
return a !== qs && (a = Q6(t[0], t[p - 1])), o = p > 2 ? tv : J6, l = u = null, f;
|
||
}
|
||
function f(p) {
|
||
return p == null || isNaN(p = +p) ? s : (l || (l = o(t.map(n), e, r)))(n(a(p)));
|
||
}
|
||
return f.invert = function(p) {
|
||
return a(i((u || (u = o(e, t.map(n), dn)))(p)));
|
||
}, f.domain = function(p) {
|
||
return arguments.length ? (t = Array.from(p, Z6), d()) : t.slice();
|
||
}, f.range = function(p) {
|
||
return arguments.length ? (e = Array.from(p), d()) : e.slice();
|
||
}, f.rangeRound = function(p) {
|
||
return e = Array.from(p), r = gx, d();
|
||
}, f.clamp = function(p) {
|
||
return arguments.length ? (a = p ? !0 : qs, d()) : a !== qs;
|
||
}, f.interpolate = function(p) {
|
||
return arguments.length ? (r = p, d()) : r;
|
||
}, f.unknown = function(p) {
|
||
return arguments.length ? (s = p, f) : s;
|
||
}, function(p, g) {
|
||
return n = p, i = g, d();
|
||
};
|
||
}
|
||
function Lg() {
|
||
return ev()(qs, qs);
|
||
}
|
||
function rv(t, e, r, n) {
|
||
var i = Xh(t, e, r), s;
|
||
switch (n = fc(n == null ? ",f" : n), n.type) {
|
||
case "s": {
|
||
var a = Math.max(Math.abs(t), Math.abs(e));
|
||
return n.precision == null && !isNaN(s = X6(i, a)) && (n.precision = s), Cg(n, a);
|
||
}
|
||
case "":
|
||
case "e":
|
||
case "g":
|
||
case "p":
|
||
case "r": {
|
||
n.precision == null && !isNaN(s = $6(i, Math.max(Math.abs(t), Math.abs(e)))) && (n.precision = s - (n.type === "e"));
|
||
break;
|
||
}
|
||
case "f":
|
||
case "%": {
|
||
n.precision == null && !isNaN(s = j6(i)) && (n.precision = s - (n.type === "%") * 2);
|
||
break;
|
||
}
|
||
}
|
||
return Eg(n);
|
||
}
|
||
function nv(t) {
|
||
var e = t.domain;
|
||
return t.ticks = function(r) {
|
||
var n = e();
|
||
return Qb(n[0], n[n.length - 1], r == null ? 10 : r);
|
||
}, t.tickFormat = function(r, n) {
|
||
var i = e();
|
||
return rv(i[0], i[i.length - 1], r == null ? 10 : r, n);
|
||
}, t.nice = function(r) {
|
||
r == null && (r = 10);
|
||
var n = e(), i = 0, s = n.length - 1, a = n[i], o = n[s], l, u, d = 10;
|
||
for (o < a && (u = a, a = o, o = u, u = i, i = s, s = u); d-- > 0; ) {
|
||
if (u = Wp(a, o, r), u === l)
|
||
return n[i] = a, n[s] = o, e(n);
|
||
if (u > 0)
|
||
a = Math.floor(a / u) * u, o = Math.ceil(o / u) * u;
|
||
else if (u < 0)
|
||
a = Math.ceil(a * u) / u, o = Math.floor(o * u) / u;
|
||
else
|
||
break;
|
||
l = u;
|
||
}
|
||
return t;
|
||
}, t;
|
||
}
|
||
function Dg() {
|
||
var t = Lg();
|
||
return t.copy = function() {
|
||
return Ag(t, Dg());
|
||
}, w0.apply(t, arguments), nv(t);
|
||
}
|
||
function iv(t, e) {
|
||
t = t.slice();
|
||
var r = 0, n = t.length - 1, i = t[r], s = t[n], a;
|
||
return s < i && (a = r, r = n, n = a, a = i, i = s, s = a), t[r] = e.floor(i), t[n] = e.ceil(s), t;
|
||
}
|
||
var uh = new Date(), hh = new Date();
|
||
function yr(t, e, r, n) {
|
||
function i(s) {
|
||
return t(s = arguments.length === 0 ? new Date() : new Date(+s)), s;
|
||
}
|
||
return i.floor = function(s) {
|
||
return t(s = new Date(+s)), s;
|
||
}, i.ceil = function(s) {
|
||
return t(s = new Date(s - 1)), e(s, 1), t(s), s;
|
||
}, i.round = function(s) {
|
||
var a = i(s), o = i.ceil(s);
|
||
return s - a < o - s ? a : o;
|
||
}, i.offset = function(s, a) {
|
||
return e(s = new Date(+s), a == null ? 1 : Math.floor(a)), s;
|
||
}, i.range = function(s, a, o) {
|
||
var l = [], u;
|
||
if (s = i.ceil(s), o = o == null ? 1 : Math.floor(o), !(s < a) || !(o > 0))
|
||
return l;
|
||
do
|
||
l.push(u = new Date(+s)), e(s, o), t(s);
|
||
while (u < s && s < a);
|
||
return l;
|
||
}, i.filter = function(s) {
|
||
return yr(function(a) {
|
||
if (a >= a)
|
||
for (; t(a), !s(a); )
|
||
a.setTime(a - 1);
|
||
}, function(a, o) {
|
||
if (a >= a)
|
||
if (o < 0)
|
||
for (; ++o <= 0; )
|
||
for (; e(a, -1), !s(a); )
|
||
;
|
||
else
|
||
for (; --o >= 0; )
|
||
for (; e(a, 1), !s(a); )
|
||
;
|
||
});
|
||
}, r && (i.count = function(s, a) {
|
||
return uh.setTime(+s), hh.setTime(+a), t(uh), t(hh), Math.floor(r(uh, hh));
|
||
}, i.every = function(s) {
|
||
return s = Math.floor(s), !isFinite(s) || !(s > 0) ? null : s > 1 ? i.filter(n ? function(a) {
|
||
return n(a) % s === 0;
|
||
} : function(a) {
|
||
return i.count(0, a) % s === 0;
|
||
}) : i;
|
||
}), i;
|
||
}
|
||
var pc = yr(function() {
|
||
}, function(t, e) {
|
||
t.setTime(+t + e);
|
||
}, function(t, e) {
|
||
return e - t;
|
||
});
|
||
pc.every = function(t) {
|
||
return t = Math.floor(t), !isFinite(t) || !(t > 0) ? null : t > 1 ? yr(function(e) {
|
||
e.setTime(Math.floor(e / t) * t);
|
||
}, function(e, r) {
|
||
e.setTime(+e + r * t);
|
||
}, function(e, r) {
|
||
return (r - e) / t;
|
||
}) : pc;
|
||
};
|
||
const sv = pc;
|
||
pc.range;
|
||
const fi = 1e3, tn = fi * 60, pi = tn * 60, bs = pi * 24, T0 = bs * 7, Lf = bs * 30, dh = bs * 365;
|
||
var Mg = yr(function(t) {
|
||
t.setTime(t - t.getMilliseconds());
|
||
}, function(t, e) {
|
||
t.setTime(+t + e * fi);
|
||
}, function(t, e) {
|
||
return (e - t) / fi;
|
||
}, function(t) {
|
||
return t.getUTCSeconds();
|
||
});
|
||
const eo = Mg;
|
||
Mg.range;
|
||
var Ng = yr(function(t) {
|
||
t.setTime(t - t.getMilliseconds() - t.getSeconds() * fi);
|
||
}, function(t, e) {
|
||
t.setTime(+t + e * tn);
|
||
}, function(t, e) {
|
||
return (e - t) / tn;
|
||
}, function(t) {
|
||
return t.getMinutes();
|
||
});
|
||
const gc = Ng;
|
||
Ng.range;
|
||
var Bg = yr(function(t) {
|
||
t.setTime(t - t.getMilliseconds() - t.getSeconds() * fi - t.getMinutes() * tn);
|
||
}, function(t, e) {
|
||
t.setTime(+t + e * pi);
|
||
}, function(t, e) {
|
||
return (e - t) / pi;
|
||
}, function(t) {
|
||
return t.getHours();
|
||
});
|
||
const yc = Bg;
|
||
Bg.range;
|
||
var Ig = yr(
|
||
(t) => t.setHours(0, 0, 0, 0),
|
||
(t, e) => t.setDate(t.getDate() + e),
|
||
(t, e) => (e - t - (e.getTimezoneOffset() - t.getTimezoneOffset()) * tn) / bs,
|
||
(t) => t.getDate() - 1
|
||
);
|
||
const ua = Ig;
|
||
Ig.range;
|
||
function Ls(t) {
|
||
return yr(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()) * tn) / T0;
|
||
});
|
||
}
|
||
var ha = Ls(0), mc = Ls(1), av = Ls(2), ov = Ls(3), da = Ls(4), lv = Ls(5), cv = Ls(6);
|
||
ha.range;
|
||
mc.range;
|
||
av.range;
|
||
ov.range;
|
||
da.range;
|
||
lv.range;
|
||
cv.range;
|
||
var Og = yr(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 bc = Og;
|
||
Og.range;
|
||
var E0 = yr(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();
|
||
});
|
||
E0.every = function(t) {
|
||
return !isFinite(t = Math.floor(t)) || !(t > 0) ? null : yr(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 _s = E0;
|
||
E0.range;
|
||
var Rg = yr(function(t) {
|
||
t.setUTCSeconds(0, 0);
|
||
}, function(t, e) {
|
||
t.setTime(+t + e * tn);
|
||
}, function(t, e) {
|
||
return (e - t) / tn;
|
||
}, function(t) {
|
||
return t.getUTCMinutes();
|
||
});
|
||
const uv = Rg;
|
||
Rg.range;
|
||
var Fg = yr(function(t) {
|
||
t.setUTCMinutes(0, 0, 0);
|
||
}, function(t, e) {
|
||
t.setTime(+t + e * pi);
|
||
}, function(t, e) {
|
||
return (e - t) / pi;
|
||
}, function(t) {
|
||
return t.getUTCHours();
|
||
});
|
||
const hv = Fg;
|
||
Fg.range;
|
||
var Pg = yr(function(t) {
|
||
t.setUTCHours(0, 0, 0, 0);
|
||
}, function(t, e) {
|
||
t.setUTCDate(t.getUTCDate() + e);
|
||
}, function(t, e) {
|
||
return (e - t) / bs;
|
||
}, function(t) {
|
||
return t.getUTCDate() - 1;
|
||
});
|
||
const C0 = Pg;
|
||
Pg.range;
|
||
function Ds(t) {
|
||
return yr(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) / T0;
|
||
});
|
||
}
|
||
var S0 = Ds(0), _c = Ds(1), dv = Ds(2), fv = Ds(3), fa = Ds(4), pv = Ds(5), gv = Ds(6);
|
||
S0.range;
|
||
_c.range;
|
||
dv.range;
|
||
fv.range;
|
||
fa.range;
|
||
pv.range;
|
||
gv.range;
|
||
var Yg = yr(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 yv = Yg;
|
||
Yg.range;
|
||
var A0 = yr(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();
|
||
});
|
||
A0.every = function(t) {
|
||
return !isFinite(t = Math.floor(t)) || !(t > 0) ? null : yr(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 pa = A0;
|
||
A0.range;
|
||
function Vg(t, e, r, n, i, s) {
|
||
const a = [
|
||
[eo, 1, fi],
|
||
[eo, 5, 5 * fi],
|
||
[eo, 15, 15 * fi],
|
||
[eo, 30, 30 * fi],
|
||
[s, 1, tn],
|
||
[s, 5, 5 * tn],
|
||
[s, 15, 15 * tn],
|
||
[s, 30, 30 * tn],
|
||
[i, 1, pi],
|
||
[i, 3, 3 * pi],
|
||
[i, 6, 6 * pi],
|
||
[i, 12, 12 * pi],
|
||
[n, 1, bs],
|
||
[n, 2, 2 * bs],
|
||
[r, 1, T0],
|
||
[e, 1, Lf],
|
||
[e, 3, 3 * Lf],
|
||
[t, 1, dh]
|
||
];
|
||
function o(u, d, f) {
|
||
const p = d < u;
|
||
p && ([u, d] = [d, u]);
|
||
const g = f && typeof f.range == "function" ? f : l(u, d, f), b = g ? g.range(u, +d + 1) : [];
|
||
return p ? b.reverse() : b;
|
||
}
|
||
function l(u, d, f) {
|
||
const p = Math.abs(d - u) / f, g = d0(([, , T]) => T).right(a, p);
|
||
if (g === a.length)
|
||
return t.every(Xh(u / dh, d / dh, f));
|
||
if (g === 0)
|
||
return sv.every(Math.max(Xh(u, d, f), 1));
|
||
const [b, k] = a[p / a[g - 1][2] < a[g][2] / p ? g - 1 : g];
|
||
return b.every(k);
|
||
}
|
||
return [o, l];
|
||
}
|
||
Vg(pa, yv, S0, C0, hv, uv);
|
||
const [mv, bv] = Vg(_s, bc, ha, ua, yc, gc);
|
||
function fh(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 ph(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 Wa(t, e, r) {
|
||
return { y: t, m: e, d: r, H: 0, M: 0, S: 0, L: 0 };
|
||
}
|
||
function _v(t) {
|
||
var e = t.dateTime, r = t.date, n = t.time, i = t.periods, s = t.days, a = t.shortDays, o = t.months, l = t.shortMonths, u = Ha(i), d = Ga(i), f = Ha(s), p = Ga(s), g = Ha(a), b = Ga(a), k = Ha(o), T = Ga(o), L = Ha(l), E = Ga(l), I = {
|
||
a: ct,
|
||
A: Dt,
|
||
b: vt,
|
||
B: j,
|
||
c: null,
|
||
d: Of,
|
||
e: Of,
|
||
f: zv,
|
||
g: Qv,
|
||
G: tk,
|
||
H: Yv,
|
||
I: Vv,
|
||
j: Uv,
|
||
L: Ug,
|
||
m: Wv,
|
||
M: Hv,
|
||
p: ot,
|
||
q: rt,
|
||
Q: Pf,
|
||
s: Yf,
|
||
S: Gv,
|
||
u: qv,
|
||
U: jv,
|
||
V: Xv,
|
||
w: $v,
|
||
W: Kv,
|
||
x: null,
|
||
X: null,
|
||
y: Zv,
|
||
Y: Jv,
|
||
Z: ek,
|
||
"%": Ff
|
||
}, V = {
|
||
a: nt,
|
||
A: ut,
|
||
b: _t,
|
||
B: K,
|
||
c: null,
|
||
d: Rf,
|
||
e: Rf,
|
||
f: sk,
|
||
g: gk,
|
||
G: mk,
|
||
H: rk,
|
||
I: nk,
|
||
j: ik,
|
||
L: Wg,
|
||
m: ak,
|
||
M: ok,
|
||
p: Ot,
|
||
q: P,
|
||
Q: Pf,
|
||
s: Yf,
|
||
S: lk,
|
||
u: ck,
|
||
U: uk,
|
||
V: hk,
|
||
w: dk,
|
||
W: fk,
|
||
x: null,
|
||
X: null,
|
||
y: pk,
|
||
Y: yk,
|
||
Z: bk,
|
||
"%": Ff
|
||
}, H = {
|
||
a: D,
|
||
A: w,
|
||
b: v,
|
||
B: M,
|
||
c: m,
|
||
d: Bf,
|
||
e: Bf,
|
||
f: Ov,
|
||
g: Nf,
|
||
G: Mf,
|
||
H: If,
|
||
I: If,
|
||
j: Mv,
|
||
L: Iv,
|
||
m: Dv,
|
||
M: Nv,
|
||
p: N,
|
||
q: Lv,
|
||
Q: Fv,
|
||
s: Pv,
|
||
S: Bv,
|
||
u: Tv,
|
||
U: Ev,
|
||
V: Cv,
|
||
w: wv,
|
||
W: Sv,
|
||
x: Q,
|
||
X: x,
|
||
y: Nf,
|
||
Y: Mf,
|
||
Z: Av,
|
||
"%": Rv
|
||
};
|
||
I.x = G(r, I), I.X = G(n, I), I.c = G(e, I), V.x = G(r, V), V.X = G(n, V), V.c = G(e, V);
|
||
function G(z, $) {
|
||
return function(F) {
|
||
var O = [], A = -1, J = 0, C = z.length, ht, U, Yt;
|
||
for (F instanceof Date || (F = new Date(+F)); ++A < C; )
|
||
z.charCodeAt(A) === 37 && (O.push(z.slice(J, A)), (U = Df[ht = z.charAt(++A)]) != null ? ht = z.charAt(++A) : U = ht === "e" ? " " : "0", (Yt = $[ht]) && (ht = Yt(F, U)), O.push(ht), J = A + 1);
|
||
return O.push(z.slice(J, A)), O.join("");
|
||
};
|
||
}
|
||
function Y(z, $) {
|
||
return function(F) {
|
||
var O = Wa(1900, void 0, 1), A = W(O, z, F += "", 0), J, C;
|
||
if (A != F.length)
|
||
return null;
|
||
if ("Q" in O)
|
||
return new Date(O.Q);
|
||
if ("s" in O)
|
||
return new Date(O.s * 1e3 + ("L" in O ? O.L : 0));
|
||
if ($ && !("Z" in O) && (O.Z = 0), "p" in O && (O.H = O.H % 12 + O.p * 12), O.m === void 0 && (O.m = "q" in O ? O.q : 0), "V" in O) {
|
||
if (O.V < 1 || O.V > 53)
|
||
return null;
|
||
"w" in O || (O.w = 1), "Z" in O ? (J = ph(Wa(O.y, 0, 1)), C = J.getUTCDay(), J = C > 4 || C === 0 ? _c.ceil(J) : _c(J), J = C0.offset(J, (O.V - 1) * 7), O.y = J.getUTCFullYear(), O.m = J.getUTCMonth(), O.d = J.getUTCDate() + (O.w + 6) % 7) : (J = fh(Wa(O.y, 0, 1)), C = J.getDay(), J = C > 4 || C === 0 ? mc.ceil(J) : mc(J), J = ua.offset(J, (O.V - 1) * 7), O.y = J.getFullYear(), O.m = J.getMonth(), O.d = J.getDate() + (O.w + 6) % 7);
|
||
} else
|
||
("W" in O || "U" in O) && ("w" in O || (O.w = "u" in O ? O.u % 7 : "W" in O ? 1 : 0), C = "Z" in O ? ph(Wa(O.y, 0, 1)).getUTCDay() : fh(Wa(O.y, 0, 1)).getDay(), O.m = 0, O.d = "W" in O ? (O.w + 6) % 7 + O.W * 7 - (C + 5) % 7 : O.w + O.U * 7 - (C + 6) % 7);
|
||
return "Z" in O ? (O.H += O.Z / 100 | 0, O.M += O.Z % 100, ph(O)) : fh(O);
|
||
};
|
||
}
|
||
function W(z, $, F, O) {
|
||
for (var A = 0, J = $.length, C = F.length, ht, U; A < J; ) {
|
||
if (O >= C)
|
||
return -1;
|
||
if (ht = $.charCodeAt(A++), ht === 37) {
|
||
if (ht = $.charAt(A++), U = H[ht in Df ? $.charAt(A++) : ht], !U || (O = U(z, F, O)) < 0)
|
||
return -1;
|
||
} else if (ht != F.charCodeAt(O++))
|
||
return -1;
|
||
}
|
||
return O;
|
||
}
|
||
function N(z, $, F) {
|
||
var O = u.exec($.slice(F));
|
||
return O ? (z.p = d.get(O[0].toLowerCase()), F + O[0].length) : -1;
|
||
}
|
||
function D(z, $, F) {
|
||
var O = g.exec($.slice(F));
|
||
return O ? (z.w = b.get(O[0].toLowerCase()), F + O[0].length) : -1;
|
||
}
|
||
function w(z, $, F) {
|
||
var O = f.exec($.slice(F));
|
||
return O ? (z.w = p.get(O[0].toLowerCase()), F + O[0].length) : -1;
|
||
}
|
||
function v(z, $, F) {
|
||
var O = L.exec($.slice(F));
|
||
return O ? (z.m = E.get(O[0].toLowerCase()), F + O[0].length) : -1;
|
||
}
|
||
function M(z, $, F) {
|
||
var O = k.exec($.slice(F));
|
||
return O ? (z.m = T.get(O[0].toLowerCase()), F + O[0].length) : -1;
|
||
}
|
||
function m(z, $, F) {
|
||
return W(z, e, $, F);
|
||
}
|
||
function Q(z, $, F) {
|
||
return W(z, r, $, F);
|
||
}
|
||
function x(z, $, F) {
|
||
return W(z, n, $, F);
|
||
}
|
||
function ct(z) {
|
||
return a[z.getDay()];
|
||
}
|
||
function Dt(z) {
|
||
return s[z.getDay()];
|
||
}
|
||
function vt(z) {
|
||
return l[z.getMonth()];
|
||
}
|
||
function j(z) {
|
||
return o[z.getMonth()];
|
||
}
|
||
function ot(z) {
|
||
return i[+(z.getHours() >= 12)];
|
||
}
|
||
function rt(z) {
|
||
return 1 + ~~(z.getMonth() / 3);
|
||
}
|
||
function nt(z) {
|
||
return a[z.getUTCDay()];
|
||
}
|
||
function ut(z) {
|
||
return s[z.getUTCDay()];
|
||
}
|
||
function _t(z) {
|
||
return l[z.getUTCMonth()];
|
||
}
|
||
function K(z) {
|
||
return o[z.getUTCMonth()];
|
||
}
|
||
function Ot(z) {
|
||
return i[+(z.getUTCHours() >= 12)];
|
||
}
|
||
function P(z) {
|
||
return 1 + ~~(z.getUTCMonth() / 3);
|
||
}
|
||
return {
|
||
format: function(z) {
|
||
var $ = G(z += "", I);
|
||
return $.toString = function() {
|
||
return z;
|
||
}, $;
|
||
},
|
||
parse: function(z) {
|
||
var $ = Y(z += "", !1);
|
||
return $.toString = function() {
|
||
return z;
|
||
}, $;
|
||
},
|
||
utcFormat: function(z) {
|
||
var $ = G(z += "", V);
|
||
return $.toString = function() {
|
||
return z;
|
||
}, $;
|
||
},
|
||
utcParse: function(z) {
|
||
var $ = Y(z += "", !0);
|
||
return $.toString = function() {
|
||
return z;
|
||
}, $;
|
||
}
|
||
};
|
||
}
|
||
var Df = { "-": "", _: " ", 0: "0" }, mr = /^\s*\d+/, xv = /^%/, vv = /[\\^$*+?|[\]().{}]/g;
|
||
function Ae(t, e, r) {
|
||
var n = t < 0 ? "-" : "", i = (n ? -t : t) + "", s = i.length;
|
||
return n + (s < r ? new Array(r - s + 1).join(e) + i : i);
|
||
}
|
||
function kv(t) {
|
||
return t.replace(vv, "\\$&");
|
||
}
|
||
function Ha(t) {
|
||
return new RegExp("^(?:" + t.map(kv).join("|") + ")", "i");
|
||
}
|
||
function Ga(t) {
|
||
return new Map(t.map((e, r) => [e.toLowerCase(), r]));
|
||
}
|
||
function wv(t, e, r) {
|
||
var n = mr.exec(e.slice(r, r + 1));
|
||
return n ? (t.w = +n[0], r + n[0].length) : -1;
|
||
}
|
||
function Tv(t, e, r) {
|
||
var n = mr.exec(e.slice(r, r + 1));
|
||
return n ? (t.u = +n[0], r + n[0].length) : -1;
|
||
}
|
||
function Ev(t, e, r) {
|
||
var n = mr.exec(e.slice(r, r + 2));
|
||
return n ? (t.U = +n[0], r + n[0].length) : -1;
|
||
}
|
||
function Cv(t, e, r) {
|
||
var n = mr.exec(e.slice(r, r + 2));
|
||
return n ? (t.V = +n[0], r + n[0].length) : -1;
|
||
}
|
||
function Sv(t, e, r) {
|
||
var n = mr.exec(e.slice(r, r + 2));
|
||
return n ? (t.W = +n[0], r + n[0].length) : -1;
|
||
}
|
||
function Mf(t, e, r) {
|
||
var n = mr.exec(e.slice(r, r + 4));
|
||
return n ? (t.y = +n[0], r + n[0].length) : -1;
|
||
}
|
||
function Nf(t, e, r) {
|
||
var n = mr.exec(e.slice(r, r + 2));
|
||
return n ? (t.y = +n[0] + (+n[0] > 68 ? 1900 : 2e3), r + n[0].length) : -1;
|
||
}
|
||
function Av(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 Lv(t, e, r) {
|
||
var n = mr.exec(e.slice(r, r + 1));
|
||
return n ? (t.q = n[0] * 3 - 3, r + n[0].length) : -1;
|
||
}
|
||
function Dv(t, e, r) {
|
||
var n = mr.exec(e.slice(r, r + 2));
|
||
return n ? (t.m = n[0] - 1, r + n[0].length) : -1;
|
||
}
|
||
function Bf(t, e, r) {
|
||
var n = mr.exec(e.slice(r, r + 2));
|
||
return n ? (t.d = +n[0], r + n[0].length) : -1;
|
||
}
|
||
function Mv(t, e, r) {
|
||
var n = mr.exec(e.slice(r, r + 3));
|
||
return n ? (t.m = 0, t.d = +n[0], r + n[0].length) : -1;
|
||
}
|
||
function If(t, e, r) {
|
||
var n = mr.exec(e.slice(r, r + 2));
|
||
return n ? (t.H = +n[0], r + n[0].length) : -1;
|
||
}
|
||
function Nv(t, e, r) {
|
||
var n = mr.exec(e.slice(r, r + 2));
|
||
return n ? (t.M = +n[0], r + n[0].length) : -1;
|
||
}
|
||
function Bv(t, e, r) {
|
||
var n = mr.exec(e.slice(r, r + 2));
|
||
return n ? (t.S = +n[0], r + n[0].length) : -1;
|
||
}
|
||
function Iv(t, e, r) {
|
||
var n = mr.exec(e.slice(r, r + 3));
|
||
return n ? (t.L = +n[0], r + n[0].length) : -1;
|
||
}
|
||
function Ov(t, e, r) {
|
||
var n = mr.exec(e.slice(r, r + 6));
|
||
return n ? (t.L = Math.floor(n[0] / 1e3), r + n[0].length) : -1;
|
||
}
|
||
function Rv(t, e, r) {
|
||
var n = xv.exec(e.slice(r, r + 1));
|
||
return n ? r + n[0].length : -1;
|
||
}
|
||
function Fv(t, e, r) {
|
||
var n = mr.exec(e.slice(r));
|
||
return n ? (t.Q = +n[0], r + n[0].length) : -1;
|
||
}
|
||
function Pv(t, e, r) {
|
||
var n = mr.exec(e.slice(r));
|
||
return n ? (t.s = +n[0], r + n[0].length) : -1;
|
||
}
|
||
function Of(t, e) {
|
||
return Ae(t.getDate(), e, 2);
|
||
}
|
||
function Yv(t, e) {
|
||
return Ae(t.getHours(), e, 2);
|
||
}
|
||
function Vv(t, e) {
|
||
return Ae(t.getHours() % 12 || 12, e, 2);
|
||
}
|
||
function Uv(t, e) {
|
||
return Ae(1 + ua.count(_s(t), t), e, 3);
|
||
}
|
||
function Ug(t, e) {
|
||
return Ae(t.getMilliseconds(), e, 3);
|
||
}
|
||
function zv(t, e) {
|
||
return Ug(t, e) + "000";
|
||
}
|
||
function Wv(t, e) {
|
||
return Ae(t.getMonth() + 1, e, 2);
|
||
}
|
||
function Hv(t, e) {
|
||
return Ae(t.getMinutes(), e, 2);
|
||
}
|
||
function Gv(t, e) {
|
||
return Ae(t.getSeconds(), e, 2);
|
||
}
|
||
function qv(t) {
|
||
var e = t.getDay();
|
||
return e === 0 ? 7 : e;
|
||
}
|
||
function jv(t, e) {
|
||
return Ae(ha.count(_s(t) - 1, t), e, 2);
|
||
}
|
||
function zg(t) {
|
||
var e = t.getDay();
|
||
return e >= 4 || e === 0 ? da(t) : da.ceil(t);
|
||
}
|
||
function Xv(t, e) {
|
||
return t = zg(t), Ae(da.count(_s(t), t) + (_s(t).getDay() === 4), e, 2);
|
||
}
|
||
function $v(t) {
|
||
return t.getDay();
|
||
}
|
||
function Kv(t, e) {
|
||
return Ae(mc.count(_s(t) - 1, t), e, 2);
|
||
}
|
||
function Zv(t, e) {
|
||
return Ae(t.getFullYear() % 100, e, 2);
|
||
}
|
||
function Qv(t, e) {
|
||
return t = zg(t), Ae(t.getFullYear() % 100, e, 2);
|
||
}
|
||
function Jv(t, e) {
|
||
return Ae(t.getFullYear() % 1e4, e, 4);
|
||
}
|
||
function tk(t, e) {
|
||
var r = t.getDay();
|
||
return t = r >= 4 || r === 0 ? da(t) : da.ceil(t), Ae(t.getFullYear() % 1e4, e, 4);
|
||
}
|
||
function ek(t) {
|
||
var e = t.getTimezoneOffset();
|
||
return (e > 0 ? "-" : (e *= -1, "+")) + Ae(e / 60 | 0, "0", 2) + Ae(e % 60, "0", 2);
|
||
}
|
||
function Rf(t, e) {
|
||
return Ae(t.getUTCDate(), e, 2);
|
||
}
|
||
function rk(t, e) {
|
||
return Ae(t.getUTCHours(), e, 2);
|
||
}
|
||
function nk(t, e) {
|
||
return Ae(t.getUTCHours() % 12 || 12, e, 2);
|
||
}
|
||
function ik(t, e) {
|
||
return Ae(1 + C0.count(pa(t), t), e, 3);
|
||
}
|
||
function Wg(t, e) {
|
||
return Ae(t.getUTCMilliseconds(), e, 3);
|
||
}
|
||
function sk(t, e) {
|
||
return Wg(t, e) + "000";
|
||
}
|
||
function ak(t, e) {
|
||
return Ae(t.getUTCMonth() + 1, e, 2);
|
||
}
|
||
function ok(t, e) {
|
||
return Ae(t.getUTCMinutes(), e, 2);
|
||
}
|
||
function lk(t, e) {
|
||
return Ae(t.getUTCSeconds(), e, 2);
|
||
}
|
||
function ck(t) {
|
||
var e = t.getUTCDay();
|
||
return e === 0 ? 7 : e;
|
||
}
|
||
function uk(t, e) {
|
||
return Ae(S0.count(pa(t) - 1, t), e, 2);
|
||
}
|
||
function Hg(t) {
|
||
var e = t.getUTCDay();
|
||
return e >= 4 || e === 0 ? fa(t) : fa.ceil(t);
|
||
}
|
||
function hk(t, e) {
|
||
return t = Hg(t), Ae(fa.count(pa(t), t) + (pa(t).getUTCDay() === 4), e, 2);
|
||
}
|
||
function dk(t) {
|
||
return t.getUTCDay();
|
||
}
|
||
function fk(t, e) {
|
||
return Ae(_c.count(pa(t) - 1, t), e, 2);
|
||
}
|
||
function pk(t, e) {
|
||
return Ae(t.getUTCFullYear() % 100, e, 2);
|
||
}
|
||
function gk(t, e) {
|
||
return t = Hg(t), Ae(t.getUTCFullYear() % 100, e, 2);
|
||
}
|
||
function yk(t, e) {
|
||
return Ae(t.getUTCFullYear() % 1e4, e, 4);
|
||
}
|
||
function mk(t, e) {
|
||
var r = t.getUTCDay();
|
||
return t = r >= 4 || r === 0 ? fa(t) : fa.ceil(t), Ae(t.getUTCFullYear() % 1e4, e, 4);
|
||
}
|
||
function bk() {
|
||
return "+0000";
|
||
}
|
||
function Ff() {
|
||
return "%";
|
||
}
|
||
function Pf(t) {
|
||
return +t;
|
||
}
|
||
function Yf(t) {
|
||
return Math.floor(+t / 1e3);
|
||
}
|
||
var zs, xc;
|
||
_k({
|
||
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 _k(t) {
|
||
return zs = _v(t), xc = zs.format, zs.parse, zs.utcFormat, zs.utcParse, zs;
|
||
}
|
||
function xk(t) {
|
||
return new Date(t);
|
||
}
|
||
function vk(t) {
|
||
return t instanceof Date ? +t : +new Date(+t);
|
||
}
|
||
function Gg(t, e, r, n, i, s, a, o, l, u) {
|
||
var d = Lg(), f = d.invert, p = d.domain, g = u(".%L"), b = u(":%S"), k = u("%I:%M"), T = u("%I %p"), L = u("%a %d"), E = u("%b %d"), I = u("%B"), V = u("%Y");
|
||
function H(G) {
|
||
return (l(G) < G ? g : o(G) < G ? b : a(G) < G ? k : s(G) < G ? T : n(G) < G ? i(G) < G ? L : E : r(G) < G ? I : V)(G);
|
||
}
|
||
return d.invert = function(G) {
|
||
return new Date(f(G));
|
||
}, d.domain = function(G) {
|
||
return arguments.length ? p(Array.from(G, vk)) : p().map(xk);
|
||
}, d.ticks = function(G) {
|
||
var Y = p();
|
||
return t(Y[0], Y[Y.length - 1], G == null ? 10 : G);
|
||
}, d.tickFormat = function(G, Y) {
|
||
return Y == null ? H : u(Y);
|
||
}, d.nice = function(G) {
|
||
var Y = p();
|
||
return (!G || typeof G.range != "function") && (G = e(Y[0], Y[Y.length - 1], G == null ? 10 : G)), G ? p(iv(Y, G)) : d;
|
||
}, d.copy = function() {
|
||
return Ag(d, Gg(t, e, r, n, i, s, a, o, l, u));
|
||
}, d;
|
||
}
|
||
function kk() {
|
||
return w0.apply(Gg(mv, bv, _s, bc, ha, ua, yc, gc, eo, xc).domain([new Date(2e3, 0, 1), new Date(2e3, 0, 2)]), arguments);
|
||
}
|
||
function Ke(t) {
|
||
return function() {
|
||
return t;
|
||
};
|
||
}
|
||
const Vf = Math.abs, kr = Math.atan2, is = Math.cos, wk = Math.max, gh = Math.min, Rn = Math.sin, js = Math.sqrt, Fr = 1e-12, ko = Math.PI, vc = ko / 2, Yl = 2 * ko;
|
||
function Tk(t) {
|
||
return t > 1 ? 0 : t < -1 ? ko : Math.acos(t);
|
||
}
|
||
function Uf(t) {
|
||
return t >= 1 ? vc : t <= -1 ? -vc : Math.asin(t);
|
||
}
|
||
function Ek(t) {
|
||
return t.innerRadius;
|
||
}
|
||
function Ck(t) {
|
||
return t.outerRadius;
|
||
}
|
||
function Sk(t) {
|
||
return t.startAngle;
|
||
}
|
||
function Ak(t) {
|
||
return t.endAngle;
|
||
}
|
||
function Lk(t) {
|
||
return t && t.padAngle;
|
||
}
|
||
function Dk(t, e, r, n, i, s, a, o) {
|
||
var l = r - t, u = n - e, d = a - i, f = o - s, p = f * l - d * u;
|
||
if (!(p * p < Fr))
|
||
return p = (d * (e - s) - f * (t - i)) / p, [t + p * l, e + p * u];
|
||
}
|
||
function vl(t, e, r, n, i, s, a) {
|
||
var o = t - r, l = e - n, u = (a ? s : -s) / js(o * o + l * l), d = u * l, f = -u * o, p = t + d, g = e + f, b = r + d, k = n + f, T = (p + b) / 2, L = (g + k) / 2, E = b - p, I = k - g, V = E * E + I * I, H = i - s, G = p * k - b * g, Y = (I < 0 ? -1 : 1) * js(wk(0, H * H * V - G * G)), W = (G * I - E * Y) / V, N = (-G * E - I * Y) / V, D = (G * I + E * Y) / V, w = (-G * E + I * Y) / V, v = W - T, M = N - L, m = D - T, Q = w - L;
|
||
return v * v + M * M > m * m + Q * Q && (W = D, N = w), {
|
||
cx: W,
|
||
cy: N,
|
||
x01: -d,
|
||
y01: -f,
|
||
x11: W * (i / H - 1),
|
||
y11: N * (i / H - 1)
|
||
};
|
||
}
|
||
function l1() {
|
||
var t = Ek, e = Ck, r = Ke(0), n = null, i = Sk, s = Ak, a = Lk, o = null;
|
||
function l() {
|
||
var u, d, f = +t.apply(this, arguments), p = +e.apply(this, arguments), g = i.apply(this, arguments) - vc, b = s.apply(this, arguments) - vc, k = Vf(b - g), T = b > g;
|
||
if (o || (o = u = v0()), p < f && (d = p, p = f, f = d), !(p > Fr))
|
||
o.moveTo(0, 0);
|
||
else if (k > Yl - Fr)
|
||
o.moveTo(p * is(g), p * Rn(g)), o.arc(0, 0, p, g, b, !T), f > Fr && (o.moveTo(f * is(b), f * Rn(b)), o.arc(0, 0, f, b, g, T));
|
||
else {
|
||
var L = g, E = b, I = g, V = b, H = k, G = k, Y = a.apply(this, arguments) / 2, W = Y > Fr && (n ? +n.apply(this, arguments) : js(f * f + p * p)), N = gh(Vf(p - f) / 2, +r.apply(this, arguments)), D = N, w = N, v, M;
|
||
if (W > Fr) {
|
||
var m = Uf(W / f * Rn(Y)), Q = Uf(W / p * Rn(Y));
|
||
(H -= m * 2) > Fr ? (m *= T ? 1 : -1, I += m, V -= m) : (H = 0, I = V = (g + b) / 2), (G -= Q * 2) > Fr ? (Q *= T ? 1 : -1, L += Q, E -= Q) : (G = 0, L = E = (g + b) / 2);
|
||
}
|
||
var x = p * is(L), ct = p * Rn(L), Dt = f * is(V), vt = f * Rn(V);
|
||
if (N > Fr) {
|
||
var j = p * is(E), ot = p * Rn(E), rt = f * is(I), nt = f * Rn(I), ut;
|
||
if (k < ko && (ut = Dk(x, ct, rt, nt, j, ot, Dt, vt))) {
|
||
var _t = x - ut[0], K = ct - ut[1], Ot = j - ut[0], P = ot - ut[1], z = 1 / Rn(Tk((_t * Ot + K * P) / (js(_t * _t + K * K) * js(Ot * Ot + P * P))) / 2), $ = js(ut[0] * ut[0] + ut[1] * ut[1]);
|
||
D = gh(N, (f - $) / (z - 1)), w = gh(N, (p - $) / (z + 1));
|
||
}
|
||
}
|
||
G > Fr ? w > Fr ? (v = vl(rt, nt, x, ct, p, w, T), M = vl(j, ot, Dt, vt, p, w, T), o.moveTo(v.cx + v.x01, v.cy + v.y01), w < N ? o.arc(v.cx, v.cy, w, kr(v.y01, v.x01), kr(M.y01, M.x01), !T) : (o.arc(v.cx, v.cy, w, kr(v.y01, v.x01), kr(v.y11, v.x11), !T), o.arc(0, 0, p, kr(v.cy + v.y11, v.cx + v.x11), kr(M.cy + M.y11, M.cx + M.x11), !T), o.arc(M.cx, M.cy, w, kr(M.y11, M.x11), kr(M.y01, M.x01), !T))) : (o.moveTo(x, ct), o.arc(0, 0, p, L, E, !T)) : o.moveTo(x, ct), !(f > Fr) || !(H > Fr) ? o.lineTo(Dt, vt) : D > Fr ? (v = vl(Dt, vt, j, ot, f, -D, T), M = vl(x, ct, rt, nt, f, -D, T), o.lineTo(v.cx + v.x01, v.cy + v.y01), D < N ? o.arc(v.cx, v.cy, D, kr(v.y01, v.x01), kr(M.y01, M.x01), !T) : (o.arc(v.cx, v.cy, D, kr(v.y01, v.x01), kr(v.y11, v.x11), !T), o.arc(0, 0, f, kr(v.cy + v.y11, v.cx + v.x11), kr(M.cy + M.y11, M.cx + M.x11), T), o.arc(M.cx, M.cy, D, kr(M.y11, M.x11), kr(M.y01, M.x01), !T))) : o.arc(0, 0, f, V, I, T);
|
||
}
|
||
if (o.closePath(), u)
|
||
return o = null, u + "" || null;
|
||
}
|
||
return l.centroid = function() {
|
||
var u = (+t.apply(this, arguments) + +e.apply(this, arguments)) / 2, d = (+i.apply(this, arguments) + +s.apply(this, arguments)) / 2 - ko / 2;
|
||
return [is(d) * u, Rn(d) * 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 ? (s = typeof u == "function" ? u : Ke(+u), l) : s;
|
||
}, l.padAngle = function(u) {
|
||
return arguments.length ? (a = typeof u == "function" ? u : Ke(+u), l) : a;
|
||
}, l.context = function(u) {
|
||
return arguments.length ? (o = u == null ? null : u, l) : o;
|
||
}, l;
|
||
}
|
||
function qg(t) {
|
||
return typeof t == "object" && "length" in t ? t : Array.from(t);
|
||
}
|
||
function jg(t) {
|
||
this._context = t;
|
||
}
|
||
jg.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 $r(t) {
|
||
return new jg(t);
|
||
}
|
||
function Mk(t) {
|
||
return t[0];
|
||
}
|
||
function Nk(t) {
|
||
return t[1];
|
||
}
|
||
function Na(t, e) {
|
||
var r = Ke(!0), n = null, i = $r, s = null;
|
||
t = typeof t == "function" ? t : t === void 0 ? Mk : Ke(t), e = typeof e == "function" ? e : e === void 0 ? Nk : Ke(e);
|
||
function a(o) {
|
||
var l, u = (o = qg(o)).length, d, f = !1, p;
|
||
for (n == null && (s = i(p = v0())), l = 0; l <= u; ++l)
|
||
!(l < u && r(d = o[l], l, o)) === f && ((f = !f) ? s.lineStart() : s.lineEnd()), f && s.point(+t(d, l, o), +e(d, l, o));
|
||
if (p)
|
||
return s = null, p + "" || null;
|
||
}
|
||
return a.x = function(o) {
|
||
return arguments.length ? (t = typeof o == "function" ? o : Ke(+o), a) : t;
|
||
}, a.y = function(o) {
|
||
return arguments.length ? (e = typeof o == "function" ? o : Ke(+o), a) : e;
|
||
}, a.defined = function(o) {
|
||
return arguments.length ? (r = typeof o == "function" ? o : Ke(!!o), a) : r;
|
||
}, a.curve = function(o) {
|
||
return arguments.length ? (i = o, n != null && (s = i(n)), a) : i;
|
||
}, a.context = function(o) {
|
||
return arguments.length ? (o == null ? n = s = null : s = i(n = o), a) : n;
|
||
}, a;
|
||
}
|
||
function Bk(t, e) {
|
||
return e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN;
|
||
}
|
||
function Ik(t) {
|
||
return t;
|
||
}
|
||
function Ok() {
|
||
var t = Ik, e = Bk, r = null, n = Ke(0), i = Ke(Yl), s = Ke(0);
|
||
function a(o) {
|
||
var l, u = (o = qg(o)).length, d, f, p = 0, g = new Array(u), b = new Array(u), k = +n.apply(this, arguments), T = Math.min(Yl, Math.max(-Yl, i.apply(this, arguments) - k)), L, E = Math.min(Math.abs(T) / u, s.apply(this, arguments)), I = E * (T < 0 ? -1 : 1), V;
|
||
for (l = 0; l < u; ++l)
|
||
(V = b[g[l] = l] = +t(o[l], l, o)) > 0 && (p += V);
|
||
for (e != null ? g.sort(function(H, G) {
|
||
return e(b[H], b[G]);
|
||
}) : r != null && g.sort(function(H, G) {
|
||
return r(o[H], o[G]);
|
||
}), l = 0, f = p ? (T - u * I) / p : 0; l < u; ++l, k = L)
|
||
d = g[l], V = b[d], L = k + (V > 0 ? V * f : 0) + I, b[d] = {
|
||
data: o[d],
|
||
index: l,
|
||
value: V,
|
||
startAngle: k,
|
||
endAngle: L,
|
||
padAngle: E
|
||
};
|
||
return b;
|
||
}
|
||
return a.value = function(o) {
|
||
return arguments.length ? (t = typeof o == "function" ? o : Ke(+o), a) : t;
|
||
}, a.sortValues = function(o) {
|
||
return arguments.length ? (e = o, r = null, a) : e;
|
||
}, a.sort = function(o) {
|
||
return arguments.length ? (r = o, e = null, a) : r;
|
||
}, a.startAngle = function(o) {
|
||
return arguments.length ? (n = typeof o == "function" ? o : Ke(+o), a) : n;
|
||
}, a.endAngle = function(o) {
|
||
return arguments.length ? (i = typeof o == "function" ? o : Ke(+o), a) : i;
|
||
}, a.padAngle = function(o) {
|
||
return arguments.length ? (s = typeof o == "function" ? o : Ke(+o), a) : s;
|
||
}, a;
|
||
}
|
||
function kc() {
|
||
}
|
||
function wc(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 Xg(t) {
|
||
this._context = t;
|
||
}
|
||
Xg.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:
|
||
wc(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:
|
||
wc(this, t, e);
|
||
break;
|
||
}
|
||
this._x0 = this._x1, this._x1 = t, this._y0 = this._y1, this._y1 = e;
|
||
}
|
||
};
|
||
function ga(t) {
|
||
return new Xg(t);
|
||
}
|
||
function $g(t) {
|
||
this._context = t;
|
||
}
|
||
$g.prototype = {
|
||
areaStart: kc,
|
||
areaEnd: kc,
|
||
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:
|
||
wc(this, t, e);
|
||
break;
|
||
}
|
||
this._x0 = this._x1, this._x1 = t, this._y0 = this._y1, this._y1 = e;
|
||
}
|
||
};
|
||
function Rk(t) {
|
||
return new $g(t);
|
||
}
|
||
function Kg(t) {
|
||
this._context = t;
|
||
}
|
||
Kg.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:
|
||
wc(this, t, e);
|
||
break;
|
||
}
|
||
this._x0 = this._x1, this._x1 = t, this._y0 = this._y1, this._y1 = e;
|
||
}
|
||
};
|
||
function Fk(t) {
|
||
return new Kg(t);
|
||
}
|
||
function Zg(t) {
|
||
this._context = t;
|
||
}
|
||
Zg.prototype = {
|
||
areaStart: kc,
|
||
areaEnd: kc,
|
||
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 Pk(t) {
|
||
return new Zg(t);
|
||
}
|
||
function zf(t) {
|
||
return t < 0 ? -1 : 1;
|
||
}
|
||
function Wf(t, e, r) {
|
||
var n = t._x1 - t._x0, i = e - t._x1, s = (t._y1 - t._y0) / (n || i < 0 && -0), a = (r - t._y1) / (i || n < 0 && -0), o = (s * i + a * n) / (n + i);
|
||
return (zf(s) + zf(a)) * Math.min(Math.abs(s), Math.abs(a), 0.5 * Math.abs(o)) || 0;
|
||
}
|
||
function Hf(t, e) {
|
||
var r = t._x1 - t._x0;
|
||
return r ? (3 * (t._y1 - t._y0) / r - e) / 2 : e;
|
||
}
|
||
function yh(t, e, r) {
|
||
var n = t._x0, i = t._y0, s = t._x1, a = t._y1, o = (s - n) / 3;
|
||
t._context.bezierCurveTo(n + o, i + o * e, s - o, a - o * r, s, a);
|
||
}
|
||
function Tc(t) {
|
||
this._context = t;
|
||
}
|
||
Tc.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:
|
||
yh(this, this._t0, Hf(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, yh(this, Hf(this, r = Wf(this, t, e)), r);
|
||
break;
|
||
default:
|
||
yh(this, this._t0, r = Wf(this, t, e));
|
||
break;
|
||
}
|
||
this._x0 = this._x1, this._x1 = t, this._y0 = this._y1, this._y1 = e, this._t0 = r;
|
||
}
|
||
}
|
||
};
|
||
function Qg(t) {
|
||
this._context = new Jg(t);
|
||
}
|
||
(Qg.prototype = Object.create(Tc.prototype)).point = function(t, e) {
|
||
Tc.prototype.point.call(this, e, t);
|
||
};
|
||
function Jg(t) {
|
||
this._context = t;
|
||
}
|
||
Jg.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, s) {
|
||
this._context.bezierCurveTo(e, t, n, r, s, i);
|
||
}
|
||
};
|
||
function Yk(t) {
|
||
return new Tc(t);
|
||
}
|
||
function Vk(t) {
|
||
return new Qg(t);
|
||
}
|
||
function ty(t) {
|
||
this._context = t;
|
||
}
|
||
ty.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 = Gf(t), i = Gf(e), s = 0, a = 1; a < r; ++s, ++a)
|
||
this._context.bezierCurveTo(n[0][s], i[0][s], n[1][s], i[1][s], t[a], e[a]);
|
||
(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 Gf(t) {
|
||
var e, r = t.length - 1, n, i = new Array(r), s = new Array(r), a = new Array(r);
|
||
for (i[0] = 0, s[0] = 2, a[0] = t[0] + 2 * t[1], e = 1; e < r - 1; ++e)
|
||
i[e] = 1, s[e] = 4, a[e] = 4 * t[e] + 2 * t[e + 1];
|
||
for (i[r - 1] = 2, s[r - 1] = 7, a[r - 1] = 8 * t[r - 1] + t[r], e = 1; e < r; ++e)
|
||
n = i[e] / s[e - 1], s[e] -= n, a[e] -= n * a[e - 1];
|
||
for (i[r - 1] = a[r - 1] / s[r - 1], e = r - 2; e >= 0; --e)
|
||
i[e] = (a[e] - i[e + 1]) / s[e];
|
||
for (s[r - 1] = (t[r] + i[r - 1]) / 2, e = 0; e < r - 1; ++e)
|
||
s[e] = 2 * t[e + 1] - i[e + 1];
|
||
return [i, s];
|
||
}
|
||
function Uk(t) {
|
||
return new ty(t);
|
||
}
|
||
function hu(t, e) {
|
||
this._context = t, this._t = e;
|
||
}
|
||
hu.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 zk(t) {
|
||
return new hu(t, 0.5);
|
||
}
|
||
function Wk(t) {
|
||
return new hu(t, 0);
|
||
}
|
||
function Hk(t) {
|
||
return new hu(t, 1);
|
||
}
|
||
function Xs(t, e, r) {
|
||
this.k = t, this.x = e, this.y = r;
|
||
}
|
||
Xs.prototype = {
|
||
constructor: Xs,
|
||
scale: function(t) {
|
||
return t === 1 ? this : new Xs(this.k * t, this.x, this.y);
|
||
},
|
||
translate: function(t, e) {
|
||
return t === 0 & e === 0 ? this : new Xs(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 + ")";
|
||
}
|
||
};
|
||
new Xs(1, 0, 0);
|
||
Xs.prototype;
|
||
/*! @license DOMPurify 2.4.1 | (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.1/LICENSE */
|
||
function Yi(t) {
|
||
return Yi = 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;
|
||
}, Yi(t);
|
||
}
|
||
function c1(t, e) {
|
||
return c1 = Object.setPrototypeOf || function(n, i) {
|
||
return n.__proto__ = i, n;
|
||
}, c1(t, e);
|
||
}
|
||
function Gk() {
|
||
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 Vl(t, e, r) {
|
||
return Gk() ? Vl = Reflect.construct : Vl = function(i, s, a) {
|
||
var o = [null];
|
||
o.push.apply(o, s);
|
||
var l = Function.bind.apply(i, o), u = new l();
|
||
return a && c1(u, a.prototype), u;
|
||
}, Vl.apply(null, arguments);
|
||
}
|
||
function hn(t) {
|
||
return qk(t) || jk(t) || Xk(t) || $k();
|
||
}
|
||
function qk(t) {
|
||
if (Array.isArray(t))
|
||
return u1(t);
|
||
}
|
||
function jk(t) {
|
||
if (typeof Symbol < "u" && t[Symbol.iterator] != null || t["@@iterator"] != null)
|
||
return Array.from(t);
|
||
}
|
||
function Xk(t, e) {
|
||
if (!!t) {
|
||
if (typeof t == "string")
|
||
return u1(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 u1(t, e);
|
||
}
|
||
}
|
||
function u1(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 $k() {
|
||
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 Kk = Object.hasOwnProperty, qf = Object.setPrototypeOf, Zk = Object.isFrozen, Qk = Object.getPrototypeOf, Jk = Object.getOwnPropertyDescriptor, Or = Object.freeze, kn = Object.seal, t8 = Object.create, ey = typeof Reflect < "u" && Reflect, Ec = ey.apply, h1 = ey.construct;
|
||
Ec || (Ec = function(e, r, n) {
|
||
return e.apply(r, n);
|
||
});
|
||
Or || (Or = function(e) {
|
||
return e;
|
||
});
|
||
kn || (kn = function(e) {
|
||
return e;
|
||
});
|
||
h1 || (h1 = function(e, r) {
|
||
return Vl(e, hn(r));
|
||
});
|
||
var e8 = en(Array.prototype.forEach), jf = en(Array.prototype.pop), qa = en(Array.prototype.push), Ul = en(String.prototype.toLowerCase), mh = en(String.prototype.toString), r8 = en(String.prototype.match), un = en(String.prototype.replace), n8 = en(String.prototype.indexOf), i8 = en(String.prototype.trim), Lr = en(RegExp.prototype.test), bh = s8(TypeError);
|
||
function en(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 Ec(t, e, n);
|
||
};
|
||
}
|
||
function s8(t) {
|
||
return function() {
|
||
for (var e = arguments.length, r = new Array(e), n = 0; n < e; n++)
|
||
r[n] = arguments[n];
|
||
return h1(t, r);
|
||
};
|
||
}
|
||
function we(t, e, r) {
|
||
r = r || Ul, qf && qf(t, null);
|
||
for (var n = e.length; n--; ) {
|
||
var i = e[n];
|
||
if (typeof i == "string") {
|
||
var s = r(i);
|
||
s !== i && (Zk(e) || (e[n] = s), i = s);
|
||
}
|
||
t[i] = !0;
|
||
}
|
||
return t;
|
||
}
|
||
function ss(t) {
|
||
var e = t8(null), r;
|
||
for (r in t)
|
||
Ec(Kk, t, [r]) && (e[r] = t[r]);
|
||
return e;
|
||
}
|
||
function kl(t, e) {
|
||
for (; t !== null; ) {
|
||
var r = Jk(t, e);
|
||
if (r) {
|
||
if (r.get)
|
||
return en(r.get);
|
||
if (typeof r.value == "function")
|
||
return en(r.value);
|
||
}
|
||
t = Qk(t);
|
||
}
|
||
function n(i) {
|
||
return console.warn("fallback value for", i), null;
|
||
}
|
||
return n;
|
||
}
|
||
var Xf = Or(["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"]), _h = Or(["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"]), xh = Or(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), a8 = Or(["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"]), vh = Or(["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"]), o8 = Or(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), $f = Or(["#text"]), Kf = Or(["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"]), kh = Or(["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"]), Zf = Or(["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"]), wl = Or(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), l8 = kn(/\{\{[\w\W]*|[\w\W]*\}\}/gm), c8 = kn(/<%[\w\W]*|[\w\W]*%>/gm), u8 = kn(/\${[\w\W]*}/gm), h8 = kn(/^data-[\-\w.\u00B7-\uFFFF]/), d8 = kn(/^aria-[\-\w]+$/), f8 = kn(
|
||
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
||
), p8 = kn(/^(?:\w+script|data):/i), g8 = kn(
|
||
/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
|
||
), y8 = kn(/^html$/i), m8 = function() {
|
||
return typeof window > "u" ? null : window;
|
||
}, b8 = function(e, r) {
|
||
if (Yi(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 s = "dompurify" + (n ? "#" + n : "");
|
||
try {
|
||
return e.createPolicy(s, {
|
||
createHTML: function(o) {
|
||
return o;
|
||
},
|
||
createScriptURL: function(o) {
|
||
return o;
|
||
}
|
||
});
|
||
} catch {
|
||
return console.warn("TrustedTypes policy " + s + " could not be created."), null;
|
||
}
|
||
};
|
||
function ry() {
|
||
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : m8(), e = function(Z) {
|
||
return ry(Z);
|
||
};
|
||
if (e.version = "2.4.1", e.removed = [], !t || !t.document || t.document.nodeType !== 9)
|
||
return e.isSupported = !1, e;
|
||
var r = t.document, n = t.document, i = t.DocumentFragment, s = t.HTMLTemplateElement, a = t.Node, o = t.Element, l = t.NodeFilter, u = t.NamedNodeMap, d = u === void 0 ? t.NamedNodeMap || t.MozNamedAttrMap : u, f = t.HTMLFormElement, p = t.DOMParser, g = t.trustedTypes, b = o.prototype, k = kl(b, "cloneNode"), T = kl(b, "nextSibling"), L = kl(b, "childNodes"), E = kl(b, "parentNode");
|
||
if (typeof s == "function") {
|
||
var I = n.createElement("template");
|
||
I.content && I.content.ownerDocument && (n = I.content.ownerDocument);
|
||
}
|
||
var V = b8(g, r), H = V ? V.createHTML("") : "", G = n, Y = G.implementation, W = G.createNodeIterator, N = G.createDocumentFragment, D = G.getElementsByTagName, w = r.importNode, v = {};
|
||
try {
|
||
v = ss(n).documentMode ? n.documentMode : {};
|
||
} catch {
|
||
}
|
||
var M = {};
|
||
e.isSupported = typeof E == "function" && Y && typeof Y.createHTMLDocument < "u" && v !== 9;
|
||
var m = l8, Q = c8, x = u8, ct = h8, Dt = d8, vt = p8, j = g8, ot = f8, rt = null, nt = we({}, [].concat(hn(Xf), hn(_h), hn(xh), hn(vh), hn($f))), ut = null, _t = we({}, [].concat(hn(Kf), hn(kh), hn(Zf), hn(wl))), K = 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
|
||
}
|
||
})), Ot = null, P = null, z = !0, $ = !0, F = !1, O = !1, A = !1, J = !1, C = !1, ht = !1, U = !1, Yt = !1, et = !0, Mt = !1, Tt = "user-content-", gt = !0, Et = !1, wt = {}, pt = null, st = we({}, ["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"]), le = null, $t = we({}, ["audio", "video", "img", "source", "image", "track"]), jt = null, Kt = we({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Gt = "http://www.w3.org/1998/Math/MathML", Ee = "http://www.w3.org/2000/svg", Ht = "http://www.w3.org/1999/xhtml", Vt = Ht, Ft = !1, xt = null, ft = we({}, [Gt, Ee, Ht], mh), Lt, bt = ["application/xhtml+xml", "text/html"], Ut = "text/html", at, ne = null, dt = n.createElement("form"), ee = function(Z) {
|
||
return Z instanceof RegExp || Z instanceof Function;
|
||
}, de = function(Z) {
|
||
ne && ne === Z || ((!Z || Yi(Z) !== "object") && (Z = {}), Z = ss(Z), Lt = bt.indexOf(Z.PARSER_MEDIA_TYPE) === -1 ? Lt = Ut : Lt = Z.PARSER_MEDIA_TYPE, at = Lt === "application/xhtml+xml" ? mh : Ul, rt = "ALLOWED_TAGS" in Z ? we({}, Z.ALLOWED_TAGS, at) : nt, ut = "ALLOWED_ATTR" in Z ? we({}, Z.ALLOWED_ATTR, at) : _t, xt = "ALLOWED_NAMESPACES" in Z ? we({}, Z.ALLOWED_NAMESPACES, mh) : ft, jt = "ADD_URI_SAFE_ATTR" in Z ? we(
|
||
ss(Kt),
|
||
Z.ADD_URI_SAFE_ATTR,
|
||
at
|
||
) : Kt, le = "ADD_DATA_URI_TAGS" in Z ? we(
|
||
ss($t),
|
||
Z.ADD_DATA_URI_TAGS,
|
||
at
|
||
) : $t, pt = "FORBID_CONTENTS" in Z ? we({}, Z.FORBID_CONTENTS, at) : st, Ot = "FORBID_TAGS" in Z ? we({}, Z.FORBID_TAGS, at) : {}, P = "FORBID_ATTR" in Z ? we({}, Z.FORBID_ATTR, at) : {}, wt = "USE_PROFILES" in Z ? Z.USE_PROFILES : !1, z = Z.ALLOW_ARIA_ATTR !== !1, $ = Z.ALLOW_DATA_ATTR !== !1, F = Z.ALLOW_UNKNOWN_PROTOCOLS || !1, O = Z.SAFE_FOR_TEMPLATES || !1, A = Z.WHOLE_DOCUMENT || !1, ht = Z.RETURN_DOM || !1, U = Z.RETURN_DOM_FRAGMENT || !1, Yt = Z.RETURN_TRUSTED_TYPE || !1, C = Z.FORCE_BODY || !1, et = Z.SANITIZE_DOM !== !1, Mt = Z.SANITIZE_NAMED_PROPS || !1, gt = Z.KEEP_CONTENT !== !1, Et = Z.IN_PLACE || !1, ot = Z.ALLOWED_URI_REGEXP || ot, Vt = Z.NAMESPACE || Ht, Z.CUSTOM_ELEMENT_HANDLING && ee(Z.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (K.tagNameCheck = Z.CUSTOM_ELEMENT_HANDLING.tagNameCheck), Z.CUSTOM_ELEMENT_HANDLING && ee(Z.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (K.attributeNameCheck = Z.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), Z.CUSTOM_ELEMENT_HANDLING && typeof Z.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (K.allowCustomizedBuiltInElements = Z.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), O && ($ = !1), U && (ht = !0), wt && (rt = we({}, hn($f)), ut = [], wt.html === !0 && (we(rt, Xf), we(ut, Kf)), wt.svg === !0 && (we(rt, _h), we(ut, kh), we(ut, wl)), wt.svgFilters === !0 && (we(rt, xh), we(ut, kh), we(ut, wl)), wt.mathMl === !0 && (we(rt, vh), we(ut, Zf), we(ut, wl))), Z.ADD_TAGS && (rt === nt && (rt = ss(rt)), we(rt, Z.ADD_TAGS, at)), Z.ADD_ATTR && (ut === _t && (ut = ss(ut)), we(ut, Z.ADD_ATTR, at)), Z.ADD_URI_SAFE_ATTR && we(jt, Z.ADD_URI_SAFE_ATTR, at), Z.FORBID_CONTENTS && (pt === st && (pt = ss(pt)), we(pt, Z.FORBID_CONTENTS, at)), gt && (rt["#text"] = !0), A && we(rt, ["html", "head", "body"]), rt.table && (we(rt, ["tbody"]), delete Ot.tbody), Or && Or(Z), ne = Z);
|
||
}, me = we({}, ["mi", "mo", "mn", "ms", "mtext"]), be = we({}, ["foreignobject", "desc", "title", "annotation-xml"]), ke = we({}, ["title", "style", "font", "a", "script"]), Xt = we({}, _h);
|
||
we(Xt, xh), we(Xt, a8);
|
||
var ie = we({}, vh);
|
||
we(ie, o8);
|
||
var ge = function(Z) {
|
||
var St = E(Z);
|
||
(!St || !St.tagName) && (St = {
|
||
namespaceURI: Vt,
|
||
tagName: "template"
|
||
});
|
||
var Nt = Ul(Z.tagName), fe = Ul(St.tagName);
|
||
return xt[Z.namespaceURI] ? Z.namespaceURI === Ee ? St.namespaceURI === Ht ? Nt === "svg" : St.namespaceURI === Gt ? Nt === "svg" && (fe === "annotation-xml" || me[fe]) : Boolean(Xt[Nt]) : Z.namespaceURI === Gt ? St.namespaceURI === Ht ? Nt === "math" : St.namespaceURI === Ee ? Nt === "math" && be[fe] : Boolean(ie[Nt]) : Z.namespaceURI === Ht ? St.namespaceURI === Ee && !be[fe] || St.namespaceURI === Gt && !me[fe] ? !1 : !ie[Nt] && (ke[Nt] || !Xt[Nt]) : !!(Lt === "application/xhtml+xml" && xt[Z.namespaceURI]) : !1;
|
||
}, Qt = function(Z) {
|
||
qa(e.removed, {
|
||
element: Z
|
||
});
|
||
try {
|
||
Z.parentNode.removeChild(Z);
|
||
} catch {
|
||
try {
|
||
Z.outerHTML = H;
|
||
} catch {
|
||
Z.remove();
|
||
}
|
||
}
|
||
}, an = function(Z, St) {
|
||
try {
|
||
qa(e.removed, {
|
||
attribute: St.getAttributeNode(Z),
|
||
from: St
|
||
});
|
||
} catch {
|
||
qa(e.removed, {
|
||
attribute: null,
|
||
from: St
|
||
});
|
||
}
|
||
if (St.removeAttribute(Z), Z === "is" && !ut[Z])
|
||
if (ht || U)
|
||
try {
|
||
Qt(St);
|
||
} catch {
|
||
}
|
||
else
|
||
try {
|
||
St.setAttribute(Z, "");
|
||
} catch {
|
||
}
|
||
}, Wr = function(Z) {
|
||
var St, Nt;
|
||
if (C)
|
||
Z = "<remove></remove>" + Z;
|
||
else {
|
||
var fe = r8(Z, /^[\r\n\t ]+/);
|
||
Nt = fe && fe[0];
|
||
}
|
||
Lt === "application/xhtml+xml" && Vt === Ht && (Z = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + Z + "</body></html>");
|
||
var Me = V ? V.createHTML(Z) : Z;
|
||
if (Vt === Ht)
|
||
try {
|
||
St = new p().parseFromString(Me, Lt);
|
||
} catch {
|
||
}
|
||
if (!St || !St.documentElement) {
|
||
St = Y.createDocument(Vt, "template", null);
|
||
try {
|
||
St.documentElement.innerHTML = Ft ? "" : Me;
|
||
} catch {
|
||
}
|
||
}
|
||
var Le = St.body || St.documentElement;
|
||
return Z && Nt && Le.insertBefore(n.createTextNode(Nt), Le.childNodes[0] || null), Vt === Ht ? D.call(St, A ? "html" : "body")[0] : A ? St.documentElement : Le;
|
||
}, De = function(Z) {
|
||
return W.call(
|
||
Z.ownerDocument || Z,
|
||
Z,
|
||
l.SHOW_ELEMENT | l.SHOW_COMMENT | l.SHOW_TEXT,
|
||
null,
|
||
!1
|
||
);
|
||
}, ae = function(Z) {
|
||
return Z instanceof f && (typeof Z.nodeName != "string" || typeof Z.textContent != "string" || typeof Z.removeChild != "function" || !(Z.attributes instanceof d) || typeof Z.removeAttribute != "function" || typeof Z.setAttribute != "function" || typeof Z.namespaceURI != "string" || typeof Z.insertBefore != "function" || typeof Z.hasChildNodes != "function");
|
||
}, Be = function(Z) {
|
||
return Yi(a) === "object" ? Z instanceof a : Z && Yi(Z) === "object" && typeof Z.nodeType == "number" && typeof Z.nodeName == "string";
|
||
}, Oe = function(Z, St, Nt) {
|
||
!M[Z] || e8(M[Z], function(fe) {
|
||
fe.call(e, St, Nt, ne);
|
||
});
|
||
}, Fe = function(Z) {
|
||
var St;
|
||
if (Oe("beforeSanitizeElements", Z, null), ae(Z) || Lr(/[\u0080-\uFFFF]/, Z.nodeName))
|
||
return Qt(Z), !0;
|
||
var Nt = at(Z.nodeName);
|
||
if (Oe("uponSanitizeElement", Z, {
|
||
tagName: Nt,
|
||
allowedTags: rt
|
||
}), Z.hasChildNodes() && !Be(Z.firstElementChild) && (!Be(Z.content) || !Be(Z.content.firstElementChild)) && Lr(/<[/\w]/g, Z.innerHTML) && Lr(/<[/\w]/g, Z.textContent) || Nt === "select" && Lr(/<template/i, Z.innerHTML))
|
||
return Qt(Z), !0;
|
||
if (!rt[Nt] || Ot[Nt]) {
|
||
if (!Ot[Nt] && Ie(Nt) && (K.tagNameCheck instanceof RegExp && Lr(K.tagNameCheck, Nt) || K.tagNameCheck instanceof Function && K.tagNameCheck(Nt)))
|
||
return !1;
|
||
if (gt && !pt[Nt]) {
|
||
var fe = E(Z) || Z.parentNode, Me = L(Z) || Z.childNodes;
|
||
if (Me && fe)
|
||
for (var Le = Me.length, We = Le - 1; We >= 0; --We)
|
||
fe.insertBefore(k(Me[We], !0), T(Z));
|
||
}
|
||
return Qt(Z), !0;
|
||
}
|
||
return Z instanceof o && !ge(Z) || (Nt === "noscript" || Nt === "noembed") && Lr(/<\/no(script|embed)/i, Z.innerHTML) ? (Qt(Z), !0) : (O && Z.nodeType === 3 && (St = Z.textContent, St = un(St, m, " "), St = un(St, Q, " "), St = un(St, x, " "), Z.textContent !== St && (qa(e.removed, {
|
||
element: Z.cloneNode()
|
||
}), Z.textContent = St)), Oe("afterSanitizeElements", Z, null), !1);
|
||
}, Pe = function(Z, St, Nt) {
|
||
if (et && (St === "id" || St === "name") && (Nt in n || Nt in dt))
|
||
return !1;
|
||
if (!($ && !P[St] && Lr(ct, St))) {
|
||
if (!(z && Lr(Dt, St))) {
|
||
if (!ut[St] || P[St]) {
|
||
if (!(Ie(Z) && (K.tagNameCheck instanceof RegExp && Lr(K.tagNameCheck, Z) || K.tagNameCheck instanceof Function && K.tagNameCheck(Z)) && (K.attributeNameCheck instanceof RegExp && Lr(K.attributeNameCheck, St) || K.attributeNameCheck instanceof Function && K.attributeNameCheck(St)) || St === "is" && K.allowCustomizedBuiltInElements && (K.tagNameCheck instanceof RegExp && Lr(K.tagNameCheck, Nt) || K.tagNameCheck instanceof Function && K.tagNameCheck(Nt))))
|
||
return !1;
|
||
} else if (!jt[St]) {
|
||
if (!Lr(ot, un(Nt, j, ""))) {
|
||
if (!((St === "src" || St === "xlink:href" || St === "href") && Z !== "script" && n8(Nt, "data:") === 0 && le[Z])) {
|
||
if (!(F && !Lr(vt, un(Nt, j, "")))) {
|
||
if (Nt)
|
||
return !1;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
return !0;
|
||
}, Ie = function(Z) {
|
||
return Z.indexOf("-") > 0;
|
||
}, Ge = function(Z) {
|
||
var St, Nt, fe, Me;
|
||
Oe("beforeSanitizeAttributes", Z, null);
|
||
var Le = Z.attributes;
|
||
if (!!Le) {
|
||
var We = {
|
||
attrName: "",
|
||
attrValue: "",
|
||
keepAttr: !0,
|
||
allowedAttributes: ut
|
||
};
|
||
for (Me = Le.length; Me--; ) {
|
||
St = Le[Me];
|
||
var xe = St, Ne = xe.name, Mi = xe.namespaceURI;
|
||
if (Nt = Ne === "value" ? St.value : i8(St.value), fe = at(Ne), We.attrName = fe, We.attrValue = Nt, We.keepAttr = !0, We.forceKeepAttr = void 0, Oe("uponSanitizeAttribute", Z, We), Nt = We.attrValue, !We.forceKeepAttr && (an(Ne, Z), !!We.keepAttr)) {
|
||
if (Lr(/\/>/i, Nt)) {
|
||
an(Ne, Z);
|
||
continue;
|
||
}
|
||
O && (Nt = un(Nt, m, " "), Nt = un(Nt, Q, " "), Nt = un(Nt, x, " "));
|
||
var Ni = at(Z.nodeName);
|
||
if (!!Pe(Ni, fe, Nt)) {
|
||
if (Mt && (fe === "id" || fe === "name") && (an(Ne, Z), Nt = Tt + Nt), V && Yi(g) === "object" && typeof g.getAttributeType == "function" && !Mi)
|
||
switch (g.getAttributeType(Ni, fe)) {
|
||
case "TrustedHTML":
|
||
Nt = V.createHTML(Nt);
|
||
break;
|
||
case "TrustedScriptURL":
|
||
Nt = V.createScriptURL(Nt);
|
||
break;
|
||
}
|
||
try {
|
||
Mi ? Z.setAttributeNS(Mi, Ne, Nt) : Z.setAttribute(Ne, Nt), jf(e.removed);
|
||
} catch {
|
||
}
|
||
}
|
||
}
|
||
}
|
||
Oe("afterSanitizeAttributes", Z, null);
|
||
}
|
||
}, tr = function zt(Z) {
|
||
var St, Nt = De(Z);
|
||
for (Oe("beforeSanitizeShadowDOM", Z, null); St = Nt.nextNode(); )
|
||
Oe("uponSanitizeShadowNode", St, null), !Fe(St) && (St.content instanceof i && zt(St.content), Ge(St));
|
||
Oe("afterSanitizeShadowDOM", Z, null);
|
||
};
|
||
return e.sanitize = function(zt) {
|
||
var Z = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, St, Nt, fe, Me, Le;
|
||
if (Ft = !zt, Ft && (zt = "<!-->"), typeof zt != "string" && !Be(zt)) {
|
||
if (typeof zt.toString != "function")
|
||
throw bh("toString is not a function");
|
||
if (zt = zt.toString(), typeof zt != "string")
|
||
throw bh("dirty is not a string, aborting");
|
||
}
|
||
if (!e.isSupported) {
|
||
if (Yi(t.toStaticHTML) === "object" || typeof t.toStaticHTML == "function") {
|
||
if (typeof zt == "string")
|
||
return t.toStaticHTML(zt);
|
||
if (Be(zt))
|
||
return t.toStaticHTML(zt.outerHTML);
|
||
}
|
||
return zt;
|
||
}
|
||
if (J || de(Z), e.removed = [], typeof zt == "string" && (Et = !1), Et) {
|
||
if (zt.nodeName) {
|
||
var We = at(zt.nodeName);
|
||
if (!rt[We] || Ot[We])
|
||
throw bh("root node is forbidden and cannot be sanitized in-place");
|
||
}
|
||
} else if (zt instanceof a)
|
||
St = Wr("<!---->"), Nt = St.ownerDocument.importNode(zt, !0), Nt.nodeType === 1 && Nt.nodeName === "BODY" || Nt.nodeName === "HTML" ? St = Nt : St.appendChild(Nt);
|
||
else {
|
||
if (!ht && !O && !A && zt.indexOf("<") === -1)
|
||
return V && Yt ? V.createHTML(zt) : zt;
|
||
if (St = Wr(zt), !St)
|
||
return ht ? null : Yt ? H : "";
|
||
}
|
||
St && C && Qt(St.firstChild);
|
||
for (var xe = De(Et ? zt : St); fe = xe.nextNode(); )
|
||
fe.nodeType === 3 && fe === Me || Fe(fe) || (fe.content instanceof i && tr(fe.content), Ge(fe), Me = fe);
|
||
if (Me = null, Et)
|
||
return zt;
|
||
if (ht) {
|
||
if (U)
|
||
for (Le = N.call(St.ownerDocument); St.firstChild; )
|
||
Le.appendChild(St.firstChild);
|
||
else
|
||
Le = St;
|
||
return ut.shadowroot && (Le = w.call(r, Le, !0)), Le;
|
||
}
|
||
var Ne = A ? St.outerHTML : St.innerHTML;
|
||
return A && rt["!doctype"] && St.ownerDocument && St.ownerDocument.doctype && St.ownerDocument.doctype.name && Lr(y8, St.ownerDocument.doctype.name) && (Ne = "<!DOCTYPE " + St.ownerDocument.doctype.name + `>
|
||
` + Ne), O && (Ne = un(Ne, m, " "), Ne = un(Ne, Q, " "), Ne = un(Ne, x, " ")), V && Yt ? V.createHTML(Ne) : Ne;
|
||
}, e.setConfig = function(zt) {
|
||
de(zt), J = !0;
|
||
}, e.clearConfig = function() {
|
||
ne = null, J = !1;
|
||
}, e.isValidAttribute = function(zt, Z, St) {
|
||
ne || de({});
|
||
var Nt = at(zt), fe = at(Z);
|
||
return Pe(Nt, fe, St);
|
||
}, e.addHook = function(zt, Z) {
|
||
typeof Z == "function" && (M[zt] = M[zt] || [], qa(M[zt], Z));
|
||
}, e.removeHook = function(zt) {
|
||
if (M[zt])
|
||
return jf(M[zt]);
|
||
}, e.removeHooks = function(zt) {
|
||
M[zt] && (M[zt] = []);
|
||
}, e.removeAllHooks = function() {
|
||
M = {};
|
||
}, e;
|
||
}
|
||
var wo = ry();
|
||
const _8 = (t) => t ? iy(t).replace(/\\n/g, "#br#").split("#br#") : [""], ny = (t) => wo.sanitize(t), Qf = (t, e) => {
|
||
var r;
|
||
if (((r = e.flowchart) == null ? void 0 : r.htmlLabels) !== !1) {
|
||
const n = e.securityLevel;
|
||
n === "antiscript" || n === "strict" ? t = ny(t) : n !== "loose" && (t = iy(t), t = t.replace(/</g, "<").replace(/>/g, ">"), t = t.replace(/=/g, "="), t = w8(t));
|
||
}
|
||
return t;
|
||
}, wn = (t, e) => t && (e.dompurifyConfig ? t = wo.sanitize(Qf(t, e), e.dompurifyConfig).toString() : t = wo.sanitize(Qf(t, e), {
|
||
FORBID_TAGS: ["style"]
|
||
}).toString(), t), x8 = (t, e) => typeof t == "string" ? wn(t, e) : t.flat().map((r) => wn(r, e)), du = /<br\s*\/?>/gi, v8 = (t) => du.test(t), k8 = (t) => t.split(du), w8 = (t) => t.replace(/#br#/g, "<br/>"), iy = (t) => t.replace(du, "#br#"), T8 = (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;
|
||
}, gr = (t) => !(t === !1 || ["false", "null", "0"].includes(String(t).trim().toLowerCase())), zi = function(t) {
|
||
let e = t;
|
||
return t.includes("~") ? (e = e.replace(/~([^~].*)/, "<$1"), e = e.replace(/~([^~]*)$/, ">$1"), zi(e)) : e;
|
||
}, he = {
|
||
getRows: _8,
|
||
sanitizeText: wn,
|
||
sanitizeTextOrArray: x8,
|
||
hasBreaks: v8,
|
||
splitBreaks: k8,
|
||
lineBreakRegex: du,
|
||
removeScript: ny,
|
||
getUrl: T8,
|
||
evaluate: gr
|
||
}, zl = {
|
||
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, s = 2 * r - i;
|
||
switch (n) {
|
||
case "r":
|
||
return zl.hue2rgb(s, i, t + 1 / 3) * 255;
|
||
case "g":
|
||
return zl.hue2rgb(s, i, t) * 255;
|
||
case "b":
|
||
return zl.hue2rgb(s, 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), s = Math.min(t, e, r), a = (i + s) / 2;
|
||
if (n === "l")
|
||
return a * 100;
|
||
if (i === s)
|
||
return 0;
|
||
const o = i - s, l = a > 0.5 ? o / (2 - i - s) : o / (i + s);
|
||
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;
|
||
}
|
||
}
|
||
}, E8 = zl, C8 = {
|
||
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
|
||
}, S8 = C8, A8 = {
|
||
dec2hex: (t) => {
|
||
const e = Math.round(t).toString(16);
|
||
return e.length > 1 ? e : `0${e}`;
|
||
}
|
||
}, L8 = A8, D8 = {
|
||
channel: E8,
|
||
lang: S8,
|
||
unit: L8
|
||
}, ve = D8, Fi = {};
|
||
for (let t = 0; t <= 255; t++)
|
||
Fi[t] = ve.unit.dec2hex(t);
|
||
const wr = {
|
||
ALL: 0,
|
||
RGB: 1,
|
||
HSL: 2
|
||
};
|
||
class M8 {
|
||
constructor() {
|
||
this.type = wr.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 = wr.ALL;
|
||
}
|
||
is(e) {
|
||
return this.type === e;
|
||
}
|
||
}
|
||
const N8 = M8;
|
||
class B8 {
|
||
constructor(e, r) {
|
||
this.color = r, this.changed = !1, this.data = e, this.type = new N8();
|
||
}
|
||
set(e, r) {
|
||
return this.color = r, this.changed = !1, this.data = e, this.type.type = wr.ALL, this;
|
||
}
|
||
_ensureHSL() {
|
||
const e = this.data, { h: r, s: n, l: i } = e;
|
||
r === void 0 && (e.h = ve.channel.rgb2hsl(e, "h")), n === void 0 && (e.s = ve.channel.rgb2hsl(e, "s")), i === void 0 && (e.l = ve.channel.rgb2hsl(e, "l"));
|
||
}
|
||
_ensureRGB() {
|
||
const e = this.data, { r, g: n, b: i } = e;
|
||
r === void 0 && (e.r = ve.channel.hsl2rgb(e, "r")), n === void 0 && (e.g = ve.channel.hsl2rgb(e, "g")), i === void 0 && (e.b = ve.channel.hsl2rgb(e, "b"));
|
||
}
|
||
get r() {
|
||
const e = this.data, r = e.r;
|
||
return !this.type.is(wr.HSL) && r !== void 0 ? r : (this._ensureHSL(), ve.channel.hsl2rgb(e, "r"));
|
||
}
|
||
get g() {
|
||
const e = this.data, r = e.g;
|
||
return !this.type.is(wr.HSL) && r !== void 0 ? r : (this._ensureHSL(), ve.channel.hsl2rgb(e, "g"));
|
||
}
|
||
get b() {
|
||
const e = this.data, r = e.b;
|
||
return !this.type.is(wr.HSL) && r !== void 0 ? r : (this._ensureHSL(), ve.channel.hsl2rgb(e, "b"));
|
||
}
|
||
get h() {
|
||
const e = this.data, r = e.h;
|
||
return !this.type.is(wr.RGB) && r !== void 0 ? r : (this._ensureRGB(), ve.channel.rgb2hsl(e, "h"));
|
||
}
|
||
get s() {
|
||
const e = this.data, r = e.s;
|
||
return !this.type.is(wr.RGB) && r !== void 0 ? r : (this._ensureRGB(), ve.channel.rgb2hsl(e, "s"));
|
||
}
|
||
get l() {
|
||
const e = this.data, r = e.l;
|
||
return !this.type.is(wr.RGB) && r !== void 0 ? r : (this._ensureRGB(), ve.channel.rgb2hsl(e, "l"));
|
||
}
|
||
get a() {
|
||
return this.data.a;
|
||
}
|
||
set r(e) {
|
||
this.type.set(wr.RGB), this.changed = !0, this.data.r = e;
|
||
}
|
||
set g(e) {
|
||
this.type.set(wr.RGB), this.changed = !0, this.data.g = e;
|
||
}
|
||
set b(e) {
|
||
this.type.set(wr.RGB), this.changed = !0, this.data.b = e;
|
||
}
|
||
set h(e) {
|
||
this.type.set(wr.HSL), this.changed = !0, this.data.h = e;
|
||
}
|
||
set s(e) {
|
||
this.type.set(wr.HSL), this.changed = !0, this.data.s = e;
|
||
}
|
||
set l(e) {
|
||
this.type.set(wr.HSL), this.changed = !0, this.data.l = e;
|
||
}
|
||
set a(e) {
|
||
this.changed = !0, this.data.a = e;
|
||
}
|
||
}
|
||
const I8 = B8, O8 = new I8({ r: 0, g: 0, b: 0, a: 0 }, "transparent"), fu = O8, sy = {
|
||
re: /^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,
|
||
parse: (t) => {
|
||
if (t.charCodeAt(0) !== 35)
|
||
return;
|
||
const e = t.match(sy.re);
|
||
if (!e)
|
||
return;
|
||
const r = e[1], n = parseInt(r, 16), i = r.length, s = i % 4 === 0, a = i > 4, o = a ? 1 : 17, l = a ? 8 : 4, u = s ? 0 : -1, d = a ? 255 : 15;
|
||
return fu.set({
|
||
r: (n >> l * (u + 3) & d) * o,
|
||
g: (n >> l * (u + 2) & d) * o,
|
||
b: (n >> l * (u + 1) & d) * o,
|
||
a: s ? (n & d) * o / 255 : 1
|
||
}, t);
|
||
},
|
||
stringify: (t) => {
|
||
const { r: e, g: r, b: n, a: i } = t;
|
||
return i < 1 ? `#${Fi[Math.round(e)]}${Fi[Math.round(r)]}${Fi[Math.round(n)]}${Fi[Math.round(i * 255)]}` : `#${Fi[Math.round(e)]}${Fi[Math.round(r)]}${Fi[Math.round(n)]}`;
|
||
}
|
||
}, oo = sy, Wl = {
|
||
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(Wl.hueRe);
|
||
if (e) {
|
||
const [, r, n] = e;
|
||
switch (n) {
|
||
case "grad":
|
||
return ve.channel.clamp.h(parseFloat(r) * 0.9);
|
||
case "rad":
|
||
return ve.channel.clamp.h(parseFloat(r) * 180 / Math.PI);
|
||
case "turn":
|
||
return ve.channel.clamp.h(parseFloat(r) * 360);
|
||
}
|
||
}
|
||
return ve.channel.clamp.h(parseFloat(t));
|
||
},
|
||
parse: (t) => {
|
||
const e = t.charCodeAt(0);
|
||
if (e !== 104 && e !== 72)
|
||
return;
|
||
const r = t.match(Wl.re);
|
||
if (!r)
|
||
return;
|
||
const [, n, i, s, a, o] = r;
|
||
return fu.set({
|
||
h: Wl._hue2deg(n),
|
||
s: ve.channel.clamp.s(parseFloat(i)),
|
||
l: ve.channel.clamp.l(parseFloat(s)),
|
||
a: a ? ve.channel.clamp.a(o ? parseFloat(a) / 100 : parseFloat(a)) : 1
|
||
}, t);
|
||
},
|
||
stringify: (t) => {
|
||
const { h: e, s: r, l: n, a: i } = t;
|
||
return i < 1 ? `hsla(${ve.lang.round(e)}, ${ve.lang.round(r)}%, ${ve.lang.round(n)}%, ${i})` : `hsl(${ve.lang.round(e)}, ${ve.lang.round(r)}%, ${ve.lang.round(n)}%)`;
|
||
}
|
||
}, Tl = Wl, Hl = {
|
||
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 = Hl.colors[t];
|
||
if (!!e)
|
||
return oo.parse(e);
|
||
},
|
||
stringify: (t) => {
|
||
const e = oo.stringify(t);
|
||
for (const r in Hl.colors)
|
||
if (Hl.colors[r] === e)
|
||
return r;
|
||
}
|
||
}, Jf = Hl, ay = {
|
||
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(ay.re);
|
||
if (!r)
|
||
return;
|
||
const [, n, i, s, a, o, l, u, d] = r;
|
||
return fu.set({
|
||
r: ve.channel.clamp.r(i ? parseFloat(n) * 2.55 : parseFloat(n)),
|
||
g: ve.channel.clamp.g(a ? parseFloat(s) * 2.55 : parseFloat(s)),
|
||
b: ve.channel.clamp.b(l ? parseFloat(o) * 2.55 : parseFloat(o)),
|
||
a: u ? ve.channel.clamp.a(d ? parseFloat(u) / 100 : parseFloat(u)) : 1
|
||
}, t);
|
||
},
|
||
stringify: (t) => {
|
||
const { r: e, g: r, b: n, a: i } = t;
|
||
return i < 1 ? `rgba(${ve.lang.round(e)}, ${ve.lang.round(r)}, ${ve.lang.round(n)}, ${ve.lang.round(i)})` : `rgb(${ve.lang.round(e)}, ${ve.lang.round(r)}, ${ve.lang.round(n)})`;
|
||
}
|
||
}, El = ay, R8 = {
|
||
format: {
|
||
keyword: Jf,
|
||
hex: oo,
|
||
rgb: El,
|
||
rgba: El,
|
||
hsl: Tl,
|
||
hsla: Tl
|
||
},
|
||
parse: (t) => {
|
||
if (typeof t != "string")
|
||
return t;
|
||
const e = oo.parse(t) || El.parse(t) || Tl.parse(t) || Jf.parse(t);
|
||
if (e)
|
||
return e;
|
||
throw new Error(`Unsupported color format: "${t}"`);
|
||
},
|
||
stringify: (t) => !t.changed && t.color ? t.color : t.type.is(wr.HSL) || t.data.r === void 0 ? Tl.stringify(t) : t.a < 1 || !Number.isInteger(t.r) || !Number.isInteger(t.g) || !Number.isInteger(t.b) ? El.stringify(t) : oo.stringify(t)
|
||
}, ki = R8, F8 = (t, e) => {
|
||
const r = ki.parse(t);
|
||
for (const n in e)
|
||
r[n] = ve.channel.clamp[n](e[n]);
|
||
return ki.stringify(r);
|
||
}, oy = F8, P8 = (t, e, r = 0, n = 1) => {
|
||
if (typeof t != "number")
|
||
return oy(t, { a: e });
|
||
const i = fu.set({
|
||
r: ve.channel.clamp.r(t),
|
||
g: ve.channel.clamp.g(e),
|
||
b: ve.channel.clamp.b(r),
|
||
a: ve.channel.clamp.a(n)
|
||
});
|
||
return ki.stringify(i);
|
||
}, lo = P8, Y8 = (t, e, r) => {
|
||
const n = ki.parse(t), i = n[e], s = ve.channel.clamp[e](i + r);
|
||
return i !== s && (n[e] = s), ki.stringify(n);
|
||
}, ly = Y8, V8 = (t, e) => ly(t, "l", e), se = V8, U8 = (t, e) => ly(t, "l", -e), pe = U8, z8 = (t, e) => {
|
||
const r = ki.parse(t), n = {};
|
||
for (const i in e)
|
||
!e[i] || (n[i] = r[i] + e[i]);
|
||
return oy(t, n);
|
||
}, mt = z8, W8 = (t, e, r = 50) => {
|
||
const { r: n, g: i, b: s, a } = ki.parse(t), { r: o, g: l, b: u, a: d } = ki.parse(e), f = r / 100, p = f * 2 - 1, g = a - d, k = ((p * g === -1 ? p : (p + g) / (1 + p * g)) + 1) / 2, T = 1 - k, L = n * k + o * T, E = i * k + l * T, I = s * k + u * T, V = a * f + d * (1 - f);
|
||
return lo(L, E, I, V);
|
||
}, H8 = W8, G8 = (t, e = 100) => {
|
||
const r = ki.parse(t);
|
||
return r.r = 255 - r.r, r.g = 255 - r.g, r.b = 255 - r.b, H8(r, t, e);
|
||
}, Wt = G8, Mr = (t, e) => e ? mt(t, { s: -40, l: 10 }) : mt(t, { s: -40, l: -10 }), pu = "#ffffff", gu = "#f2f2f2";
|
||
class q8 {
|
||
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 || mt(this.primaryColor, { h: -120 }), this.tertiaryColor = this.tertiaryColor || mt(this.primaryColor, { h: 180, l: 5 }), this.primaryBorderColor = this.primaryBorderColor || Mr(this.primaryColor, this.darkMode), this.secondaryBorderColor = this.secondaryBorderColor || Mr(this.secondaryColor, this.darkMode), this.tertiaryBorderColor = this.tertiaryBorderColor || Mr(this.tertiaryColor, this.darkMode), this.noteBorderColor = this.noteBorderColor || Mr(this.noteBkgColor, this.darkMode), this.noteBkgColor = this.noteBkgColor || "#fff5ad", this.noteTextColor = this.noteTextColor || "#333", this.secondaryTextColor = this.secondaryTextColor || Wt(this.secondaryColor), this.tertiaryTextColor = this.tertiaryTextColor || Wt(this.tertiaryColor), this.lineColor = this.lineColor || Wt(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 ? pe(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 || pe(this.secondaryColor, 10), this.activationBkgColor = this.activationBkgColor || this.secondaryColor, this.sequenceNumberColor = this.sequenceNumberColor || Wt(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 || se(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 || mt(this.primaryColor, { h: 30 }), this.cScale4 = this.cScale4 || mt(this.primaryColor, { h: 60 }), this.cScale5 = this.cScale5 || mt(this.primaryColor, { h: 90 }), this.cScale6 = this.cScale6 || mt(this.primaryColor, { h: 120 }), this.cScale7 = this.cScale7 || mt(this.primaryColor, { h: 150 }), this.cScale8 = this.cScale8 || mt(this.primaryColor, { h: 210, l: 150 }), this.cScale9 = this.cScale9 || mt(this.primaryColor, { h: 270 }), this.cScale10 = this.cScale10 || mt(this.primaryColor, { h: 300 }), this.cScale11 = this.cScale11 || mt(this.primaryColor, { h: 330 }), this.darkMode)
|
||
for (let e = 0; e < this.THEME_COLOR_LIMIT; e++)
|
||
this["cScale" + e] = pe(this["cScale" + e], 75);
|
||
else
|
||
for (let e = 0; e < this.THEME_COLOR_LIMIT; e++)
|
||
this["cScale" + e] = pe(this["cScale" + e], 25);
|
||
for (let e = 0; e < this.THEME_COLOR_LIMIT; e++)
|
||
this["cScaleInv" + e] = this["cScaleInv" + e] || Wt(this["cScale" + e]);
|
||
for (let e = 0; e < this.THEME_COLOR_LIMIT; e++)
|
||
this.darkMode ? this["cScalePeer" + e] = this["cScalePeer" + e] || se(this["cScale" + e], 10) : this["cScalePeer" + e] = this["cScalePeer" + e] || pe(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 || mt(this.primaryColor, { h: 64 }), this.fillType3 = this.fillType3 || mt(this.secondaryColor, { h: 64 }), this.fillType4 = this.fillType4 || mt(this.primaryColor, { h: -64 }), this.fillType5 = this.fillType5 || mt(this.secondaryColor, { h: -64 }), this.fillType6 = this.fillType6 || mt(this.primaryColor, { h: 128 }), this.fillType7 = this.fillType7 || mt(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 || mt(this.primaryColor, { l: -10 }), this.pie5 = this.pie5 || mt(this.secondaryColor, { l: -10 }), this.pie6 = this.pie6 || mt(this.tertiaryColor, { l: -10 }), this.pie7 = this.pie7 || mt(this.primaryColor, { h: 60, l: -10 }), this.pie8 = this.pie8 || mt(this.primaryColor, { h: -60, l: -10 }), this.pie9 = this.pie9 || mt(this.primaryColor, { h: 120, l: 0 }), this.pie10 = this.pie10 || mt(this.primaryColor, { h: 60, l: -20 }), this.pie11 = this.pie11 || mt(this.primaryColor, { h: -60, l: -20 }), this.pie12 = this.pie12 || mt(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 ? pe(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 || mt(this.primaryColor, { h: -30 }), this.git4 = this.git4 || mt(this.primaryColor, { h: -60 }), this.git5 = this.git5 || mt(this.primaryColor, { h: -90 }), this.git6 = this.git6 || mt(this.primaryColor, { h: 60 }), this.git7 = this.git7 || mt(this.primaryColor, { h: 120 }), this.darkMode ? (this.git0 = se(this.git0, 25), this.git1 = se(this.git1, 25), this.git2 = se(this.git2, 25), this.git3 = se(this.git3, 25), this.git4 = se(this.git4, 25), this.git5 = se(this.git5, 25), this.git6 = se(this.git6, 25), this.git7 = se(this.git7, 25)) : (this.git0 = pe(this.git0, 25), this.git1 = pe(this.git1, 25), this.git2 = pe(this.git2, 25), this.git3 = pe(this.git3, 25), this.git4 = pe(this.git4, 25), this.git5 = pe(this.git5, 25), this.git6 = pe(this.git6, 25), this.git7 = pe(this.git7, 25)), this.gitInv0 = this.gitInv0 || Wt(this.git0), this.gitInv1 = this.gitInv1 || Wt(this.git1), this.gitInv2 = this.gitInv2 || Wt(this.git2), this.gitInv3 = this.gitInv3 || Wt(this.git3), this.gitInv4 = this.gitInv4 || Wt(this.git4), this.gitInv5 = this.gitInv5 || Wt(this.git5), this.gitInv6 = this.gitInv6 || Wt(this.git6), this.gitInv7 = this.gitInv7 || Wt(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 || pu, this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || gu;
|
||
}
|
||
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 j8 = (t) => {
|
||
const e = new q8();
|
||
return e.calculate(t), e;
|
||
};
|
||
class X8 {
|
||
constructor() {
|
||
this.background = "#333", this.primaryColor = "#1f2020", this.secondaryColor = se(this.primaryColor, 16), this.tertiaryColor = mt(this.primaryColor, { h: -160 }), this.primaryBorderColor = Wt(this.background), this.secondaryBorderColor = Mr(this.secondaryColor, this.darkMode), this.tertiaryBorderColor = Mr(this.tertiaryColor, this.darkMode), this.primaryTextColor = Wt(this.primaryColor), this.secondaryTextColor = Wt(this.secondaryColor), this.tertiaryTextColor = Wt(this.tertiaryColor), this.lineColor = Wt(this.background), this.textColor = Wt(this.background), this.mainBkg = "#1f2020", this.secondBkg = "calculated", this.mainContrastColor = "lightgrey", this.darkTextColor = se(Wt("#323D47"), 10), this.lineColor = "calculated", this.border1 = "#81B1DB", this.border2 = lo(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 = pe("#EAE8D9", 30), this.altSectionBkgColor = "calculated", this.sectionBkgColor2 = "#EAE8D9", this.taskBorderColor = lo(255, 255, 255, 70), this.taskBkgColor = "calculated", this.taskTextColor = "calculated", this.taskTextLightColor = "calculated", this.taskTextOutsideColor = "calculated", this.taskTextClickableColor = "#003163", this.activeTaskBorderColor = lo(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 = se(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 = se(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 = se(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 = mt(this.primaryColor, { h: 64 }), this.fillType3 = mt(this.secondaryColor, { h: 64 }), this.fillType4 = mt(this.primaryColor, { h: -64 }), this.fillType5 = mt(this.secondaryColor, { h: -64 }), this.fillType6 = mt(this.primaryColor, { h: 128 }), this.fillType7 = mt(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 || mt(this.primaryColor, { h: 30 }), this.cScale4 = this.cScale4 || mt(this.primaryColor, { h: 60 }), this.cScale5 = this.cScale5 || mt(this.primaryColor, { h: 90 }), this.cScale6 = this.cScale6 || mt(this.primaryColor, { h: 120 }), this.cScale7 = this.cScale7 || mt(this.primaryColor, { h: 150 }), this.cScale8 = this.cScale8 || mt(this.primaryColor, { h: 210 }), this.cScale9 = this.cScale9 || mt(this.primaryColor, { h: 270 }), this.cScale10 = this.cScale10 || mt(this.primaryColor, { h: 300 }), this.cScale11 = this.cScale11 || mt(this.primaryColor, { h: 330 });
|
||
for (let e = 0; e < this.THEME_COLOR_LIMIT; e++)
|
||
this["cScaleInv" + e] = this["cScaleInv" + e] || Wt(this["cScale" + e]);
|
||
for (let e = 0; e < this.THEME_COLOR_LIMIT; e++)
|
||
this["cScalePeer" + e] = this["cScalePeer" + e] || se(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 ? pe(this.secondaryColor, 30) : this.secondaryColor), this.relationLabelColor = this.relationLabelColor || this.actorTextColor, this.git0 = se(this.secondaryColor, 20), this.git1 = se(this.pie2 || this.secondaryColor, 20), this.git2 = se(this.pie3 || this.tertiaryColor, 20), this.git3 = se(this.pie4 || mt(this.primaryColor, { h: -30 }), 20), this.git4 = se(this.pie5 || mt(this.primaryColor, { h: -60 }), 20), this.git5 = se(this.pie6 || mt(this.primaryColor, { h: -90 }), 10), this.git6 = se(this.pie7 || mt(this.primaryColor, { h: 60 }), 10), this.git7 = se(this.pie8 || mt(this.primaryColor, { h: 120 }), 20), this.gitInv0 = this.gitInv0 || Wt(this.git0), this.gitInv1 = this.gitInv1 || Wt(this.git1), this.gitInv2 = this.gitInv2 || Wt(this.git2), this.gitInv3 = this.gitInv3 || Wt(this.git3), this.gitInv4 = this.gitInv4 || Wt(this.git4), this.gitInv5 = this.gitInv5 || Wt(this.git5), this.gitInv6 = this.gitInv6 || Wt(this.git6), this.gitInv7 = this.gitInv7 || Wt(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 || se(this.background, 12), this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || se(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 $8 = (t) => {
|
||
const e = new X8();
|
||
return e.calculate(t), e;
|
||
};
|
||
class K8 {
|
||
constructor() {
|
||
this.background = "#f4f4f4", this.primaryColor = "#ECECFF", this.secondaryColor = mt(this.primaryColor, { h: 120 }), this.secondaryColor = "#ffffde", this.tertiaryColor = mt(this.primaryColor, { h: -160 }), this.primaryBorderColor = Mr(this.primaryColor, this.darkMode), this.secondaryBorderColor = Mr(this.secondaryColor, this.darkMode), this.tertiaryBorderColor = Mr(this.tertiaryColor, this.darkMode), this.primaryTextColor = Wt(this.primaryColor), this.secondaryTextColor = Wt(this.secondaryColor), this.tertiaryTextColor = Wt(this.tertiaryColor), this.lineColor = Wt(this.background), this.textColor = Wt(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 = lo(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 || mt(this.primaryColor, { h: 30 }), this.cScale4 = this.cScale4 || mt(this.primaryColor, { h: 60 }), this.cScale5 = this.cScale5 || mt(this.primaryColor, { h: 90 }), this.cScale6 = this.cScale6 || mt(this.primaryColor, { h: 120 }), this.cScale7 = this.cScale7 || mt(this.primaryColor, { h: 150 }), this.cScale8 = this.cScale8 || mt(this.primaryColor, { h: 210 }), this.cScale9 = this.cScale9 || mt(this.primaryColor, { h: 270 }), this.cScale10 = this.cScale10 || mt(this.primaryColor, { h: 300 }), this.cScale11 = this.cScale11 || mt(this.primaryColor, { h: 330 }), this["cScalePeer" + 1] = this["cScalePeer" + 1] || pe(this.secondaryColor, 45), this["cScalePeer" + 2] = this["cScalePeer" + 2] || pe(this.tertiaryColor, 40);
|
||
for (let e = 0; e < this.THEME_COLOR_LIMIT; e++)
|
||
this["cScale" + e] = pe(this["cScale" + e], 10), this["cScalePeer" + e] = this["cScalePeer" + e] || pe(this["cScale" + e], 25);
|
||
for (let e = 0; e < this.THEME_COLOR_LIMIT; e++)
|
||
this["cScaleInv" + e] = this["cScaleInv" + e] || mt(this["cScale" + e], { h: 180 });
|
||
if (this.scaleLabelColor = this.scaleLabelColor !== "calculated" && this.scaleLabelColor ? this.scaleLabelColor : this.labelTextColor, this.labelTextColor !== "calculated") {
|
||
this.cScaleLabel0 = this.cScaleLabel0 || Wt(this.labelTextColor), this.cScaleLabel3 = this.cScaleLabel3 || Wt(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 = se(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 = mt(this.primaryColor, { h: 64 }), this.fillType3 = mt(this.secondaryColor, { h: 64 }), this.fillType4 = mt(this.primaryColor, { h: -64 }), this.fillType5 = mt(this.secondaryColor, { h: -64 }), this.fillType6 = mt(this.primaryColor, { h: 128 }), this.fillType7 = mt(this.secondaryColor, { h: 128 }), this.pie1 = this.pie1 || this.primaryColor, this.pie2 = this.pie2 || this.secondaryColor, this.pie3 = this.pie3 || mt(this.tertiaryColor, { l: -40 }), this.pie4 = this.pie4 || mt(this.primaryColor, { l: -10 }), this.pie5 = this.pie5 || mt(this.secondaryColor, { l: -30 }), this.pie6 = this.pie6 || mt(this.tertiaryColor, { l: -20 }), this.pie7 = this.pie7 || mt(this.primaryColor, { h: 60, l: -20 }), this.pie8 = this.pie8 || mt(this.primaryColor, { h: -60, l: -40 }), this.pie9 = this.pie9 || mt(this.primaryColor, { h: 120, l: -40 }), this.pie10 = this.pie10 || mt(this.primaryColor, { h: 60, l: -40 }), this.pie11 = this.pie11 || mt(this.primaryColor, { h: -90, l: -40 }), this.pie12 = this.pie12 || mt(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 || mt(this.primaryColor, { h: -30 }), this.git4 = this.git4 || mt(this.primaryColor, { h: -60 }), this.git5 = this.git5 || mt(this.primaryColor, { h: -90 }), this.git6 = this.git6 || mt(this.primaryColor, { h: 60 }), this.git7 = this.git7 || mt(this.primaryColor, { h: 120 }), this.darkMode ? (this.git0 = se(this.git0, 25), this.git1 = se(this.git1, 25), this.git2 = se(this.git2, 25), this.git3 = se(this.git3, 25), this.git4 = se(this.git4, 25), this.git5 = se(this.git5, 25), this.git6 = se(this.git6, 25), this.git7 = se(this.git7, 25)) : (this.git0 = pe(this.git0, 25), this.git1 = pe(this.git1, 25), this.git2 = pe(this.git2, 25), this.git3 = pe(this.git3, 25), this.git4 = pe(this.git4, 25), this.git5 = pe(this.git5, 25), this.git6 = pe(this.git6, 25), this.git7 = pe(this.git7, 25)), this.gitInv0 = this.gitInv0 || pe(Wt(this.git0), 25), this.gitInv1 = this.gitInv1 || Wt(this.git1), this.gitInv2 = this.gitInv2 || Wt(this.git2), this.gitInv3 = this.gitInv3 || Wt(this.git3), this.gitInv4 = this.gitInv4 || Wt(this.git4), this.gitInv5 = this.gitInv5 || Wt(this.git5), this.gitInv6 = this.gitInv6 || Wt(this.git6), this.gitInv7 = this.gitInv7 || Wt(this.git7), this.gitBranchLabel0 = this.gitBranchLabel0 || Wt(this.labelTextColor), this.gitBranchLabel1 = this.gitBranchLabel1 || this.labelTextColor, this.gitBranchLabel2 = this.gitBranchLabel2 || this.labelTextColor, this.gitBranchLabel3 = this.gitBranchLabel3 || Wt(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 || pu, this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || gu;
|
||
}
|
||
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 Z8 = (t) => {
|
||
const e = new K8();
|
||
return e.calculate(t), e;
|
||
};
|
||
class Q8 {
|
||
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 = se("#cde498", 10), this.primaryBorderColor = Mr(this.primaryColor, this.darkMode), this.secondaryBorderColor = Mr(this.secondaryColor, this.darkMode), this.tertiaryBorderColor = Mr(this.tertiaryColor, this.darkMode), this.primaryTextColor = Wt(this.primaryColor), this.secondaryTextColor = Wt(this.secondaryColor), this.tertiaryTextColor = Wt(this.primaryColor), this.lineColor = Wt(this.background), this.textColor = Wt(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 || mt(this.primaryColor, { h: 30 }), this.cScale4 = this.cScale4 || mt(this.primaryColor, { h: 60 }), this.cScale5 = this.cScale5 || mt(this.primaryColor, { h: 90 }), this.cScale6 = this.cScale6 || mt(this.primaryColor, { h: 120 }), this.cScale7 = this.cScale7 || mt(this.primaryColor, { h: 150 }), this.cScale8 = this.cScale8 || mt(this.primaryColor, { h: 210 }), this.cScale9 = this.cScale9 || mt(this.primaryColor, { h: 270 }), this.cScale10 = this.cScale10 || mt(this.primaryColor, { h: 300 }), this.cScale11 = this.cScale11 || mt(this.primaryColor, { h: 330 }), this["cScalePeer" + 1] = this["cScalePeer" + 1] || pe(this.secondaryColor, 45), this["cScalePeer" + 2] = this["cScalePeer" + 2] || pe(this.tertiaryColor, 40);
|
||
for (let e = 0; e < this.THEME_COLOR_LIMIT; e++)
|
||
this["cScale" + e] = pe(this["cScale" + e], 10), this["cScalePeer" + e] = this["cScalePeer" + e] || pe(this["cScale" + e], 25);
|
||
for (let e = 0; e < this.THEME_COLOR_LIMIT; e++)
|
||
this["cScaleInv" + e] = this["cScaleInv" + e] || mt(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 = pe(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 = mt(this.primaryColor, { h: 64 }), this.fillType3 = mt(this.secondaryColor, { h: 64 }), this.fillType4 = mt(this.primaryColor, { h: -64 }), this.fillType5 = mt(this.secondaryColor, { h: -64 }), this.fillType6 = mt(this.primaryColor, { h: 128 }), this.fillType7 = mt(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 || mt(this.primaryColor, { l: -30 }), this.pie5 = this.pie5 || mt(this.secondaryColor, { l: -30 }), this.pie6 = this.pie6 || mt(this.tertiaryColor, { h: 40, l: -40 }), this.pie7 = this.pie7 || mt(this.primaryColor, { h: 60, l: -10 }), this.pie8 = this.pie8 || mt(this.primaryColor, { h: -60, l: -10 }), this.pie9 = this.pie9 || mt(this.primaryColor, { h: 120, l: 0 }), this.pie10 = this.pie10 || mt(this.primaryColor, { h: 60, l: -50 }), this.pie11 = this.pie11 || mt(this.primaryColor, { h: -60, l: -50 }), this.pie12 = this.pie12 || mt(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 || mt(this.primaryColor, { h: -30 }), this.git4 = this.git4 || mt(this.primaryColor, { h: -60 }), this.git5 = this.git5 || mt(this.primaryColor, { h: -90 }), this.git6 = this.git6 || mt(this.primaryColor, { h: 60 }), this.git7 = this.git7 || mt(this.primaryColor, { h: 120 }), this.darkMode ? (this.git0 = se(this.git0, 25), this.git1 = se(this.git1, 25), this.git2 = se(this.git2, 25), this.git3 = se(this.git3, 25), this.git4 = se(this.git4, 25), this.git5 = se(this.git5, 25), this.git6 = se(this.git6, 25), this.git7 = se(this.git7, 25)) : (this.git0 = pe(this.git0, 25), this.git1 = pe(this.git1, 25), this.git2 = pe(this.git2, 25), this.git3 = pe(this.git3, 25), this.git4 = pe(this.git4, 25), this.git5 = pe(this.git5, 25), this.git6 = pe(this.git6, 25), this.git7 = pe(this.git7, 25)), this.gitInv0 = this.gitInv0 || Wt(this.git0), this.gitInv1 = this.gitInv1 || Wt(this.git1), this.gitInv2 = this.gitInv2 || Wt(this.git2), this.gitInv3 = this.gitInv3 || Wt(this.git3), this.gitInv4 = this.gitInv4 || Wt(this.git4), this.gitInv5 = this.gitInv5 || Wt(this.git5), this.gitInv6 = this.gitInv6 || Wt(this.git6), this.gitInv7 = this.gitInv7 || Wt(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 || pu, this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || gu;
|
||
}
|
||
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 J8 = (t) => {
|
||
const e = new Q8();
|
||
return e.calculate(t), e;
|
||
};
|
||
class tw {
|
||
constructor() {
|
||
this.primaryColor = "#eee", this.contrast = "#707070", this.secondaryColor = se(this.contrast, 55), this.background = "#ffffff", this.tertiaryColor = mt(this.primaryColor, { h: -160 }), this.primaryBorderColor = Mr(this.primaryColor, this.darkMode), this.secondaryBorderColor = Mr(this.secondaryColor, this.darkMode), this.tertiaryBorderColor = Mr(this.tertiaryColor, this.darkMode), this.primaryTextColor = Wt(this.primaryColor), this.secondaryTextColor = Wt(this.secondaryColor), this.tertiaryTextColor = Wt(this.tertiaryColor), this.lineColor = Wt(this.background), this.textColor = Wt(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 = se(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] || Wt(this["cScale" + e]);
|
||
for (let e = 0; e < this.THEME_COLOR_LIMIT; e++)
|
||
this.darkMode ? this["cScalePeer" + e] = this["cScalePeer" + e] || se(this["cScale" + e], 10) : this["cScalePeer" + e] = this["cScalePeer" + e] || pe(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 = se(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 = se(this.contrast, 30), this.sectionBkgColor2 = se(this.contrast, 30), this.taskBorderColor = pe(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 = se(this.border1, 30), this.doneTaskBkgColor = this.done, this.doneTaskBorderColor = this.lineColor, this.critBkgColor = this.critical, this.critBorderColor = pe(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 = mt(this.primaryColor, { h: 64 }), this.fillType3 = mt(this.secondaryColor, { h: 64 }), this.fillType4 = mt(this.primaryColor, { h: -64 }), this.fillType5 = mt(this.secondaryColor, { h: -64 }), this.fillType6 = mt(this.primaryColor, { h: 128 }), this.fillType7 = mt(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 = pe(this.pie1, 25) || this.primaryColor, this.git1 = this.pie2 || this.secondaryColor, this.git2 = this.pie3 || this.tertiaryColor, this.git3 = this.pie4 || mt(this.primaryColor, { h: -30 }), this.git4 = this.pie5 || mt(this.primaryColor, { h: -60 }), this.git5 = this.pie6 || mt(this.primaryColor, { h: -90 }), this.git6 = this.pie7 || mt(this.primaryColor, { h: 60 }), this.git7 = this.pie8 || mt(this.primaryColor, { h: 120 }), this.gitInv0 = this.gitInv0 || Wt(this.git0), this.gitInv1 = this.gitInv1 || Wt(this.git1), this.gitInv2 = this.gitInv2 || Wt(this.git2), this.gitInv3 = this.gitInv3 || Wt(this.git3), this.gitInv4 = this.gitInv4 || Wt(this.git4), this.gitInv5 = this.gitInv5 || Wt(this.git5), this.gitInv6 = this.gitInv6 || Wt(this.git6), this.gitInv7 = this.gitInv7 || Wt(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 || pu, this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || gu;
|
||
}
|
||
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 ew = (t) => {
|
||
const e = new tw();
|
||
return e.calculate(t), e;
|
||
}, _i = {
|
||
base: {
|
||
getThemeVariables: j8
|
||
},
|
||
dark: {
|
||
getThemeVariables: $8
|
||
},
|
||
default: {
|
||
getThemeVariables: Z8
|
||
},
|
||
forest: {
|
||
getThemeVariables: J8
|
||
},
|
||
neutral: {
|
||
getThemeVariables: ew
|
||
}
|
||
}, Wi = {
|
||
theme: "default",
|
||
themeVariables: _i.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"],
|
||
deterministicIds: !1,
|
||
deterministicIDSeed: void 0,
|
||
flowchart: {
|
||
titleTopMargin: 25,
|
||
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",
|
||
tickInterval: void 0,
|
||
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: {
|
||
titleTopMargin: 25,
|
||
arrowMarkerAbsolute: !1,
|
||
dividerMargin: 10,
|
||
padding: 5,
|
||
textHeight: 10,
|
||
useMaxWidth: !0,
|
||
defaultRenderer: "dagre-wrapper"
|
||
},
|
||
state: {
|
||
titleTopMargin: 25,
|
||
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: {
|
||
titleTopMargin: 25,
|
||
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: {
|
||
titleTopMargin: 25,
|
||
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
|
||
};
|
||
Wi.class && (Wi.class.arrowMarkerAbsolute = Wi.arrowMarkerAbsolute);
|
||
Wi.gitGraph && (Wi.gitGraph.arrowMarkerAbsolute = Wi.arrowMarkerAbsolute);
|
||
const cy = (t, e = "") => Object.keys(t).reduce((r, n) => Array.isArray(t[n]) ? r : typeof t[n] == "object" && t[n] !== null ? [...r, e + n, ...cy(t[n], "")] : [...r, e + n], []), rw = cy(Wi, ""), nw = Wi;
|
||
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
|
||
function uy(t) {
|
||
return typeof t > "u" || t === null;
|
||
}
|
||
function iw(t) {
|
||
return typeof t == "object" && t !== null;
|
||
}
|
||
function sw(t) {
|
||
return Array.isArray(t) ? t : uy(t) ? [] : [t];
|
||
}
|
||
function aw(t, e) {
|
||
var r, n, i, s;
|
||
if (e)
|
||
for (s = Object.keys(e), r = 0, n = s.length; r < n; r += 1)
|
||
i = s[r], t[i] = e[i];
|
||
return t;
|
||
}
|
||
function ow(t, e) {
|
||
var r = "", n;
|
||
for (n = 0; n < e; n += 1)
|
||
r += t;
|
||
return r;
|
||
}
|
||
function lw(t) {
|
||
return t === 0 && Number.NEGATIVE_INFINITY === 1 / t;
|
||
}
|
||
var cw = uy, uw = iw, hw = sw, dw = ow, fw = lw, pw = aw, Dr = {
|
||
isNothing: cw,
|
||
isObject: uw,
|
||
toArray: hw,
|
||
repeat: dw,
|
||
isNegativeZero: fw,
|
||
extend: pw
|
||
};
|
||
function hy(t, e) {
|
||
var r = "", n = t.reason || "(unknown reason)";
|
||
return t.mark ? (t.mark.name && (r += 'in "' + t.mark.name + '" '), r += "(" + (t.mark.line + 1) + ":" + (t.mark.column + 1) + ")", !e && t.mark.snippet && (r += `
|
||
|
||
` + t.mark.snippet), n + " " + r) : n;
|
||
}
|
||
function To(t, e) {
|
||
Error.call(this), this.name = "YAMLException", this.reason = t, this.mark = e, this.message = hy(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || "";
|
||
}
|
||
To.prototype = Object.create(Error.prototype);
|
||
To.prototype.constructor = To;
|
||
To.prototype.toString = function(e) {
|
||
return this.name + ": " + hy(this, e);
|
||
};
|
||
var ui = To;
|
||
function wh(t, e, r, n, i) {
|
||
var s = "", a = "", o = Math.floor(i / 2) - 1;
|
||
return n - e > o && (s = " ... ", e = n - o + s.length), r - n > o && (a = " ...", r = n + o - a.length), {
|
||
str: s + t.slice(e, r).replace(/\t/g, "\u2192") + a,
|
||
pos: n - e + s.length
|
||
};
|
||
}
|
||
function Th(t, e) {
|
||
return Dr.repeat(" ", e - t.length) + t;
|
||
}
|
||
function gw(t, e) {
|
||
if (e = Object.create(e || null), !t.buffer)
|
||
return null;
|
||
e.maxLength || (e.maxLength = 79), typeof e.indent != "number" && (e.indent = 1), typeof e.linesBefore != "number" && (e.linesBefore = 3), typeof e.linesAfter != "number" && (e.linesAfter = 2);
|
||
for (var r = /\r?\n|\r|\0/g, n = [0], i = [], s, a = -1; s = r.exec(t.buffer); )
|
||
i.push(s.index), n.push(s.index + s[0].length), t.position <= s.index && a < 0 && (a = n.length - 2);
|
||
a < 0 && (a = n.length - 1);
|
||
var o = "", l, u, d = Math.min(t.line + e.linesAfter, i.length).toString().length, f = e.maxLength - (e.indent + d + 3);
|
||
for (l = 1; l <= e.linesBefore && !(a - l < 0); l++)
|
||
u = wh(
|
||
t.buffer,
|
||
n[a - l],
|
||
i[a - l],
|
||
t.position - (n[a] - n[a - l]),
|
||
f
|
||
), o = Dr.repeat(" ", e.indent) + Th((t.line - l + 1).toString(), d) + " | " + u.str + `
|
||
` + o;
|
||
for (u = wh(t.buffer, n[a], i[a], t.position, f), o += Dr.repeat(" ", e.indent) + Th((t.line + 1).toString(), d) + " | " + u.str + `
|
||
`, o += Dr.repeat("-", e.indent + d + 3 + u.pos) + `^
|
||
`, l = 1; l <= e.linesAfter && !(a + l >= i.length); l++)
|
||
u = wh(
|
||
t.buffer,
|
||
n[a + l],
|
||
i[a + l],
|
||
t.position - (n[a] - n[a + l]),
|
||
f
|
||
), o += Dr.repeat(" ", e.indent) + Th((t.line + l + 1).toString(), d) + " | " + u.str + `
|
||
`;
|
||
return o.replace(/\n$/, "");
|
||
}
|
||
var yw = gw, mw = [
|
||
"kind",
|
||
"multi",
|
||
"resolve",
|
||
"construct",
|
||
"instanceOf",
|
||
"predicate",
|
||
"represent",
|
||
"representName",
|
||
"defaultStyle",
|
||
"styleAliases"
|
||
], bw = [
|
||
"scalar",
|
||
"sequence",
|
||
"mapping"
|
||
];
|
||
function _w(t) {
|
||
var e = {};
|
||
return t !== null && Object.keys(t).forEach(function(r) {
|
||
t[r].forEach(function(n) {
|
||
e[String(n)] = r;
|
||
});
|
||
}), e;
|
||
}
|
||
function xw(t, e) {
|
||
if (e = e || {}, Object.keys(e).forEach(function(r) {
|
||
if (mw.indexOf(r) === -1)
|
||
throw new ui('Unknown option "' + r + '" is met in definition of "' + t + '" YAML type.');
|
||
}), this.options = e, this.tag = t, this.kind = e.kind || null, this.resolve = e.resolve || function() {
|
||
return !0;
|
||
}, this.construct = e.construct || function(r) {
|
||
return r;
|
||
}, this.instanceOf = e.instanceOf || null, this.predicate = e.predicate || null, this.represent = e.represent || null, this.representName = e.representName || null, this.defaultStyle = e.defaultStyle || null, this.multi = e.multi || !1, this.styleAliases = _w(e.styleAliases || null), bw.indexOf(this.kind) === -1)
|
||
throw new ui('Unknown kind "' + this.kind + '" is specified for "' + t + '" YAML type.');
|
||
}
|
||
var Cr = xw;
|
||
function t2(t, e) {
|
||
var r = [];
|
||
return t[e].forEach(function(n) {
|
||
var i = r.length;
|
||
r.forEach(function(s, a) {
|
||
s.tag === n.tag && s.kind === n.kind && s.multi === n.multi && (i = a);
|
||
}), r[i] = n;
|
||
}), r;
|
||
}
|
||
function vw() {
|
||
var t = {
|
||
scalar: {},
|
||
sequence: {},
|
||
mapping: {},
|
||
fallback: {},
|
||
multi: {
|
||
scalar: [],
|
||
sequence: [],
|
||
mapping: [],
|
||
fallback: []
|
||
}
|
||
}, e, r;
|
||
function n(i) {
|
||
i.multi ? (t.multi[i.kind].push(i), t.multi.fallback.push(i)) : t[i.kind][i.tag] = t.fallback[i.tag] = i;
|
||
}
|
||
for (e = 0, r = arguments.length; e < r; e += 1)
|
||
arguments[e].forEach(n);
|
||
return t;
|
||
}
|
||
function d1(t) {
|
||
return this.extend(t);
|
||
}
|
||
d1.prototype.extend = function(e) {
|
||
var r = [], n = [];
|
||
if (e instanceof Cr)
|
||
n.push(e);
|
||
else if (Array.isArray(e))
|
||
n = n.concat(e);
|
||
else if (e && (Array.isArray(e.implicit) || Array.isArray(e.explicit)))
|
||
e.implicit && (r = r.concat(e.implicit)), e.explicit && (n = n.concat(e.explicit));
|
||
else
|
||
throw new ui("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
|
||
r.forEach(function(s) {
|
||
if (!(s instanceof Cr))
|
||
throw new ui("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
||
if (s.loadKind && s.loadKind !== "scalar")
|
||
throw new ui("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
|
||
if (s.multi)
|
||
throw new ui("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
|
||
}), n.forEach(function(s) {
|
||
if (!(s instanceof Cr))
|
||
throw new ui("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
||
});
|
||
var i = Object.create(d1.prototype);
|
||
return i.implicit = (this.implicit || []).concat(r), i.explicit = (this.explicit || []).concat(n), i.compiledImplicit = t2(i, "implicit"), i.compiledExplicit = t2(i, "explicit"), i.compiledTypeMap = vw(i.compiledImplicit, i.compiledExplicit), i;
|
||
};
|
||
var kw = d1, ww = new Cr("tag:yaml.org,2002:str", {
|
||
kind: "scalar",
|
||
construct: function(t) {
|
||
return t !== null ? t : "";
|
||
}
|
||
}), Tw = new Cr("tag:yaml.org,2002:seq", {
|
||
kind: "sequence",
|
||
construct: function(t) {
|
||
return t !== null ? t : [];
|
||
}
|
||
}), Ew = new Cr("tag:yaml.org,2002:map", {
|
||
kind: "mapping",
|
||
construct: function(t) {
|
||
return t !== null ? t : {};
|
||
}
|
||
}), dy = new kw({
|
||
explicit: [
|
||
ww,
|
||
Tw,
|
||
Ew
|
||
]
|
||
});
|
||
function Cw(t) {
|
||
if (t === null)
|
||
return !0;
|
||
var e = t.length;
|
||
return e === 1 && t === "~" || e === 4 && (t === "null" || t === "Null" || t === "NULL");
|
||
}
|
||
function Sw() {
|
||
return null;
|
||
}
|
||
function Aw(t) {
|
||
return t === null;
|
||
}
|
||
var Lw = new Cr("tag:yaml.org,2002:null", {
|
||
kind: "scalar",
|
||
resolve: Cw,
|
||
construct: Sw,
|
||
predicate: Aw,
|
||
represent: {
|
||
canonical: function() {
|
||
return "~";
|
||
},
|
||
lowercase: function() {
|
||
return "null";
|
||
},
|
||
uppercase: function() {
|
||
return "NULL";
|
||
},
|
||
camelcase: function() {
|
||
return "Null";
|
||
},
|
||
empty: function() {
|
||
return "";
|
||
}
|
||
},
|
||
defaultStyle: "lowercase"
|
||
});
|
||
function Dw(t) {
|
||
if (t === null)
|
||
return !1;
|
||
var e = t.length;
|
||
return e === 4 && (t === "true" || t === "True" || t === "TRUE") || e === 5 && (t === "false" || t === "False" || t === "FALSE");
|
||
}
|
||
function Mw(t) {
|
||
return t === "true" || t === "True" || t === "TRUE";
|
||
}
|
||
function Nw(t) {
|
||
return Object.prototype.toString.call(t) === "[object Boolean]";
|
||
}
|
||
var Bw = new Cr("tag:yaml.org,2002:bool", {
|
||
kind: "scalar",
|
||
resolve: Dw,
|
||
construct: Mw,
|
||
predicate: Nw,
|
||
represent: {
|
||
lowercase: function(t) {
|
||
return t ? "true" : "false";
|
||
},
|
||
uppercase: function(t) {
|
||
return t ? "TRUE" : "FALSE";
|
||
},
|
||
camelcase: function(t) {
|
||
return t ? "True" : "False";
|
||
}
|
||
},
|
||
defaultStyle: "lowercase"
|
||
});
|
||
function Iw(t) {
|
||
return 48 <= t && t <= 57 || 65 <= t && t <= 70 || 97 <= t && t <= 102;
|
||
}
|
||
function Ow(t) {
|
||
return 48 <= t && t <= 55;
|
||
}
|
||
function Rw(t) {
|
||
return 48 <= t && t <= 57;
|
||
}
|
||
function Fw(t) {
|
||
if (t === null)
|
||
return !1;
|
||
var e = t.length, r = 0, n = !1, i;
|
||
if (!e)
|
||
return !1;
|
||
if (i = t[r], (i === "-" || i === "+") && (i = t[++r]), i === "0") {
|
||
if (r + 1 === e)
|
||
return !0;
|
||
if (i = t[++r], i === "b") {
|
||
for (r++; r < e; r++)
|
||
if (i = t[r], i !== "_") {
|
||
if (i !== "0" && i !== "1")
|
||
return !1;
|
||
n = !0;
|
||
}
|
||
return n && i !== "_";
|
||
}
|
||
if (i === "x") {
|
||
for (r++; r < e; r++)
|
||
if (i = t[r], i !== "_") {
|
||
if (!Iw(t.charCodeAt(r)))
|
||
return !1;
|
||
n = !0;
|
||
}
|
||
return n && i !== "_";
|
||
}
|
||
if (i === "o") {
|
||
for (r++; r < e; r++)
|
||
if (i = t[r], i !== "_") {
|
||
if (!Ow(t.charCodeAt(r)))
|
||
return !1;
|
||
n = !0;
|
||
}
|
||
return n && i !== "_";
|
||
}
|
||
}
|
||
if (i === "_")
|
||
return !1;
|
||
for (; r < e; r++)
|
||
if (i = t[r], i !== "_") {
|
||
if (!Rw(t.charCodeAt(r)))
|
||
return !1;
|
||
n = !0;
|
||
}
|
||
return !(!n || i === "_");
|
||
}
|
||
function Pw(t) {
|
||
var e = t, r = 1, n;
|
||
if (e.indexOf("_") !== -1 && (e = e.replace(/_/g, "")), n = e[0], (n === "-" || n === "+") && (n === "-" && (r = -1), e = e.slice(1), n = e[0]), e === "0")
|
||
return 0;
|
||
if (n === "0") {
|
||
if (e[1] === "b")
|
||
return r * parseInt(e.slice(2), 2);
|
||
if (e[1] === "x")
|
||
return r * parseInt(e.slice(2), 16);
|
||
if (e[1] === "o")
|
||
return r * parseInt(e.slice(2), 8);
|
||
}
|
||
return r * parseInt(e, 10);
|
||
}
|
||
function Yw(t) {
|
||
return Object.prototype.toString.call(t) === "[object Number]" && t % 1 === 0 && !Dr.isNegativeZero(t);
|
||
}
|
||
var Vw = new Cr("tag:yaml.org,2002:int", {
|
||
kind: "scalar",
|
||
resolve: Fw,
|
||
construct: Pw,
|
||
predicate: Yw,
|
||
represent: {
|
||
binary: function(t) {
|
||
return t >= 0 ? "0b" + t.toString(2) : "-0b" + t.toString(2).slice(1);
|
||
},
|
||
octal: function(t) {
|
||
return t >= 0 ? "0o" + t.toString(8) : "-0o" + t.toString(8).slice(1);
|
||
},
|
||
decimal: function(t) {
|
||
return t.toString(10);
|
||
},
|
||
hexadecimal: function(t) {
|
||
return t >= 0 ? "0x" + t.toString(16).toUpperCase() : "-0x" + t.toString(16).toUpperCase().slice(1);
|
||
}
|
||
},
|
||
defaultStyle: "decimal",
|
||
styleAliases: {
|
||
binary: [2, "bin"],
|
||
octal: [8, "oct"],
|
||
decimal: [10, "dec"],
|
||
hexadecimal: [16, "hex"]
|
||
}
|
||
}), Uw = new RegExp(
|
||
"^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"
|
||
);
|
||
function zw(t) {
|
||
return !(t === null || !Uw.test(t) || t[t.length - 1] === "_");
|
||
}
|
||
function Ww(t) {
|
||
var e, r;
|
||
return e = t.replace(/_/g, "").toLowerCase(), r = e[0] === "-" ? -1 : 1, "+-".indexOf(e[0]) >= 0 && (e = e.slice(1)), e === ".inf" ? r === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY : e === ".nan" ? NaN : r * parseFloat(e, 10);
|
||
}
|
||
var Hw = /^[-+]?[0-9]+e/;
|
||
function Gw(t, e) {
|
||
var r;
|
||
if (isNaN(t))
|
||
switch (e) {
|
||
case "lowercase":
|
||
return ".nan";
|
||
case "uppercase":
|
||
return ".NAN";
|
||
case "camelcase":
|
||
return ".NaN";
|
||
}
|
||
else if (Number.POSITIVE_INFINITY === t)
|
||
switch (e) {
|
||
case "lowercase":
|
||
return ".inf";
|
||
case "uppercase":
|
||
return ".INF";
|
||
case "camelcase":
|
||
return ".Inf";
|
||
}
|
||
else if (Number.NEGATIVE_INFINITY === t)
|
||
switch (e) {
|
||
case "lowercase":
|
||
return "-.inf";
|
||
case "uppercase":
|
||
return "-.INF";
|
||
case "camelcase":
|
||
return "-.Inf";
|
||
}
|
||
else if (Dr.isNegativeZero(t))
|
||
return "-0.0";
|
||
return r = t.toString(10), Hw.test(r) ? r.replace("e", ".e") : r;
|
||
}
|
||
function qw(t) {
|
||
return Object.prototype.toString.call(t) === "[object Number]" && (t % 1 !== 0 || Dr.isNegativeZero(t));
|
||
}
|
||
var jw = new Cr("tag:yaml.org,2002:float", {
|
||
kind: "scalar",
|
||
resolve: zw,
|
||
construct: Ww,
|
||
predicate: qw,
|
||
represent: Gw,
|
||
defaultStyle: "lowercase"
|
||
}), Xw = dy.extend({
|
||
implicit: [
|
||
Lw,
|
||
Bw,
|
||
Vw,
|
||
jw
|
||
]
|
||
}), $w = Xw, fy = new RegExp(
|
||
"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"
|
||
), py = new RegExp(
|
||
"^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"
|
||
);
|
||
function Kw(t) {
|
||
return t === null ? !1 : fy.exec(t) !== null || py.exec(t) !== null;
|
||
}
|
||
function Zw(t) {
|
||
var e, r, n, i, s, a, o, l = 0, u = null, d, f, p;
|
||
if (e = fy.exec(t), e === null && (e = py.exec(t)), e === null)
|
||
throw new Error("Date resolve error");
|
||
if (r = +e[1], n = +e[2] - 1, i = +e[3], !e[4])
|
||
return new Date(Date.UTC(r, n, i));
|
||
if (s = +e[4], a = +e[5], o = +e[6], e[7]) {
|
||
for (l = e[7].slice(0, 3); l.length < 3; )
|
||
l += "0";
|
||
l = +l;
|
||
}
|
||
return e[9] && (d = +e[10], f = +(e[11] || 0), u = (d * 60 + f) * 6e4, e[9] === "-" && (u = -u)), p = new Date(Date.UTC(r, n, i, s, a, o, l)), u && p.setTime(p.getTime() - u), p;
|
||
}
|
||
function Qw(t) {
|
||
return t.toISOString();
|
||
}
|
||
var Jw = new Cr("tag:yaml.org,2002:timestamp", {
|
||
kind: "scalar",
|
||
resolve: Kw,
|
||
construct: Zw,
|
||
instanceOf: Date,
|
||
represent: Qw
|
||
});
|
||
function t7(t) {
|
||
return t === "<<" || t === null;
|
||
}
|
||
var e7 = new Cr("tag:yaml.org,2002:merge", {
|
||
kind: "scalar",
|
||
resolve: t7
|
||
}), L0 = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
||
\r`;
|
||
function r7(t) {
|
||
if (t === null)
|
||
return !1;
|
||
var e, r, n = 0, i = t.length, s = L0;
|
||
for (r = 0; r < i; r++)
|
||
if (e = s.indexOf(t.charAt(r)), !(e > 64)) {
|
||
if (e < 0)
|
||
return !1;
|
||
n += 6;
|
||
}
|
||
return n % 8 === 0;
|
||
}
|
||
function n7(t) {
|
||
var e, r, n = t.replace(/[\r\n=]/g, ""), i = n.length, s = L0, a = 0, o = [];
|
||
for (e = 0; e < i; e++)
|
||
e % 4 === 0 && e && (o.push(a >> 16 & 255), o.push(a >> 8 & 255), o.push(a & 255)), a = a << 6 | s.indexOf(n.charAt(e));
|
||
return r = i % 4 * 6, r === 0 ? (o.push(a >> 16 & 255), o.push(a >> 8 & 255), o.push(a & 255)) : r === 18 ? (o.push(a >> 10 & 255), o.push(a >> 2 & 255)) : r === 12 && o.push(a >> 4 & 255), new Uint8Array(o);
|
||
}
|
||
function i7(t) {
|
||
var e = "", r = 0, n, i, s = t.length, a = L0;
|
||
for (n = 0; n < s; n++)
|
||
n % 3 === 0 && n && (e += a[r >> 18 & 63], e += a[r >> 12 & 63], e += a[r >> 6 & 63], e += a[r & 63]), r = (r << 8) + t[n];
|
||
return i = s % 3, i === 0 ? (e += a[r >> 18 & 63], e += a[r >> 12 & 63], e += a[r >> 6 & 63], e += a[r & 63]) : i === 2 ? (e += a[r >> 10 & 63], e += a[r >> 4 & 63], e += a[r << 2 & 63], e += a[64]) : i === 1 && (e += a[r >> 2 & 63], e += a[r << 4 & 63], e += a[64], e += a[64]), e;
|
||
}
|
||
function s7(t) {
|
||
return Object.prototype.toString.call(t) === "[object Uint8Array]";
|
||
}
|
||
var a7 = new Cr("tag:yaml.org,2002:binary", {
|
||
kind: "scalar",
|
||
resolve: r7,
|
||
construct: n7,
|
||
predicate: s7,
|
||
represent: i7
|
||
}), o7 = Object.prototype.hasOwnProperty, l7 = Object.prototype.toString;
|
||
function c7(t) {
|
||
if (t === null)
|
||
return !0;
|
||
var e = [], r, n, i, s, a, o = t;
|
||
for (r = 0, n = o.length; r < n; r += 1) {
|
||
if (i = o[r], a = !1, l7.call(i) !== "[object Object]")
|
||
return !1;
|
||
for (s in i)
|
||
if (o7.call(i, s))
|
||
if (!a)
|
||
a = !0;
|
||
else
|
||
return !1;
|
||
if (!a)
|
||
return !1;
|
||
if (e.indexOf(s) === -1)
|
||
e.push(s);
|
||
else
|
||
return !1;
|
||
}
|
||
return !0;
|
||
}
|
||
function u7(t) {
|
||
return t !== null ? t : [];
|
||
}
|
||
var h7 = new Cr("tag:yaml.org,2002:omap", {
|
||
kind: "sequence",
|
||
resolve: c7,
|
||
construct: u7
|
||
}), d7 = Object.prototype.toString;
|
||
function f7(t) {
|
||
if (t === null)
|
||
return !0;
|
||
var e, r, n, i, s, a = t;
|
||
for (s = new Array(a.length), e = 0, r = a.length; e < r; e += 1) {
|
||
if (n = a[e], d7.call(n) !== "[object Object]" || (i = Object.keys(n), i.length !== 1))
|
||
return !1;
|
||
s[e] = [i[0], n[i[0]]];
|
||
}
|
||
return !0;
|
||
}
|
||
function p7(t) {
|
||
if (t === null)
|
||
return [];
|
||
var e, r, n, i, s, a = t;
|
||
for (s = new Array(a.length), e = 0, r = a.length; e < r; e += 1)
|
||
n = a[e], i = Object.keys(n), s[e] = [i[0], n[i[0]]];
|
||
return s;
|
||
}
|
||
var g7 = new Cr("tag:yaml.org,2002:pairs", {
|
||
kind: "sequence",
|
||
resolve: f7,
|
||
construct: p7
|
||
}), y7 = Object.prototype.hasOwnProperty;
|
||
function m7(t) {
|
||
if (t === null)
|
||
return !0;
|
||
var e, r = t;
|
||
for (e in r)
|
||
if (y7.call(r, e) && r[e] !== null)
|
||
return !1;
|
||
return !0;
|
||
}
|
||
function b7(t) {
|
||
return t !== null ? t : {};
|
||
}
|
||
var _7 = new Cr("tag:yaml.org,2002:set", {
|
||
kind: "mapping",
|
||
resolve: m7,
|
||
construct: b7
|
||
}), x7 = $w.extend({
|
||
implicit: [
|
||
Jw,
|
||
e7
|
||
],
|
||
explicit: [
|
||
a7,
|
||
h7,
|
||
g7,
|
||
_7
|
||
]
|
||
}), ji = Object.prototype.hasOwnProperty, Cc = 1, gy = 2, yy = 3, Sc = 4, Eh = 1, v7 = 2, e2 = 3, k7 = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, w7 = /[\x85\u2028\u2029]/, T7 = /[,\[\]\{\}]/, my = /^(?:!|!!|![a-z\-]+!)$/i, by = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
||
function r2(t) {
|
||
return Object.prototype.toString.call(t);
|
||
}
|
||
function Hn(t) {
|
||
return t === 10 || t === 13;
|
||
}
|
||
function ps(t) {
|
||
return t === 9 || t === 32;
|
||
}
|
||
function zr(t) {
|
||
return t === 9 || t === 32 || t === 10 || t === 13;
|
||
}
|
||
function $s(t) {
|
||
return t === 44 || t === 91 || t === 93 || t === 123 || t === 125;
|
||
}
|
||
function E7(t) {
|
||
var e;
|
||
return 48 <= t && t <= 57 ? t - 48 : (e = t | 32, 97 <= e && e <= 102 ? e - 97 + 10 : -1);
|
||
}
|
||
function C7(t) {
|
||
return t === 120 ? 2 : t === 117 ? 4 : t === 85 ? 8 : 0;
|
||
}
|
||
function S7(t) {
|
||
return 48 <= t && t <= 57 ? t - 48 : -1;
|
||
}
|
||
function n2(t) {
|
||
return t === 48 ? "\0" : t === 97 ? "\x07" : t === 98 ? "\b" : t === 116 || t === 9 ? " " : t === 110 ? `
|
||
` : t === 118 ? "\v" : t === 102 ? "\f" : t === 114 ? "\r" : t === 101 ? "\x1B" : t === 32 ? " " : t === 34 ? '"' : t === 47 ? "/" : t === 92 ? "\\" : t === 78 ? "\x85" : t === 95 ? "\xA0" : t === 76 ? "\u2028" : t === 80 ? "\u2029" : "";
|
||
}
|
||
function A7(t) {
|
||
return t <= 65535 ? String.fromCharCode(t) : String.fromCharCode(
|
||
(t - 65536 >> 10) + 55296,
|
||
(t - 65536 & 1023) + 56320
|
||
);
|
||
}
|
||
var _y = new Array(256), xy = new Array(256);
|
||
for (var Ws = 0; Ws < 256; Ws++)
|
||
_y[Ws] = n2(Ws) ? 1 : 0, xy[Ws] = n2(Ws);
|
||
function L7(t, e) {
|
||
this.input = t, this.filename = e.filename || null, this.schema = e.schema || x7, this.onWarning = e.onWarning || null, this.legacy = e.legacy || !1, this.json = e.json || !1, this.listener = e.listener || null, this.implicitTypes = this.schema.compiledImplicit, this.typeMap = this.schema.compiledTypeMap, this.length = t.length, this.position = 0, this.line = 0, this.lineStart = 0, this.lineIndent = 0, this.firstTabInLine = -1, this.documents = [];
|
||
}
|
||
function vy(t, e) {
|
||
var r = {
|
||
name: t.filename,
|
||
buffer: t.input.slice(0, -1),
|
||
position: t.position,
|
||
line: t.line,
|
||
column: t.position - t.lineStart
|
||
};
|
||
return r.snippet = yw(r), new ui(e, r);
|
||
}
|
||
function Jt(t, e) {
|
||
throw vy(t, e);
|
||
}
|
||
function Ac(t, e) {
|
||
t.onWarning && t.onWarning.call(null, vy(t, e));
|
||
}
|
||
var i2 = {
|
||
YAML: function(e, r, n) {
|
||
var i, s, a;
|
||
e.version !== null && Jt(e, "duplication of %YAML directive"), n.length !== 1 && Jt(e, "YAML directive accepts exactly one argument"), i = /^([0-9]+)\.([0-9]+)$/.exec(n[0]), i === null && Jt(e, "ill-formed argument of the YAML directive"), s = parseInt(i[1], 10), a = parseInt(i[2], 10), s !== 1 && Jt(e, "unacceptable YAML version of the document"), e.version = n[0], e.checkLineBreaks = a < 2, a !== 1 && a !== 2 && Ac(e, "unsupported YAML version of the document");
|
||
},
|
||
TAG: function(e, r, n) {
|
||
var i, s;
|
||
n.length !== 2 && Jt(e, "TAG directive accepts exactly two arguments"), i = n[0], s = n[1], my.test(i) || Jt(e, "ill-formed tag handle (first argument) of the TAG directive"), ji.call(e.tagMap, i) && Jt(e, 'there is a previously declared suffix for "' + i + '" tag handle'), by.test(s) || Jt(e, "ill-formed tag prefix (second argument) of the TAG directive");
|
||
try {
|
||
s = decodeURIComponent(s);
|
||
} catch {
|
||
Jt(e, "tag prefix is malformed: " + s);
|
||
}
|
||
e.tagMap[i] = s;
|
||
}
|
||
};
|
||
function Hi(t, e, r, n) {
|
||
var i, s, a, o;
|
||
if (e < r) {
|
||
if (o = t.input.slice(e, r), n)
|
||
for (i = 0, s = o.length; i < s; i += 1)
|
||
a = o.charCodeAt(i), a === 9 || 32 <= a && a <= 1114111 || Jt(t, "expected valid JSON character");
|
||
else
|
||
k7.test(o) && Jt(t, "the stream contains non-printable characters");
|
||
t.result += o;
|
||
}
|
||
}
|
||
function s2(t, e, r, n) {
|
||
var i, s, a, o;
|
||
for (Dr.isObject(r) || Jt(t, "cannot merge mappings; the provided source object is unacceptable"), i = Object.keys(r), a = 0, o = i.length; a < o; a += 1)
|
||
s = i[a], ji.call(e, s) || (e[s] = r[s], n[s] = !0);
|
||
}
|
||
function Ks(t, e, r, n, i, s, a, o, l) {
|
||
var u, d;
|
||
if (Array.isArray(i))
|
||
for (i = Array.prototype.slice.call(i), u = 0, d = i.length; u < d; u += 1)
|
||
Array.isArray(i[u]) && Jt(t, "nested arrays are not supported inside keys"), typeof i == "object" && r2(i[u]) === "[object Object]" && (i[u] = "[object Object]");
|
||
if (typeof i == "object" && r2(i) === "[object Object]" && (i = "[object Object]"), i = String(i), e === null && (e = {}), n === "tag:yaml.org,2002:merge")
|
||
if (Array.isArray(s))
|
||
for (u = 0, d = s.length; u < d; u += 1)
|
||
s2(t, e, s[u], r);
|
||
else
|
||
s2(t, e, s, r);
|
||
else
|
||
!t.json && !ji.call(r, i) && ji.call(e, i) && (t.line = a || t.line, t.lineStart = o || t.lineStart, t.position = l || t.position, Jt(t, "duplicated mapping key")), i === "__proto__" ? Object.defineProperty(e, i, {
|
||
configurable: !0,
|
||
enumerable: !0,
|
||
writable: !0,
|
||
value: s
|
||
}) : e[i] = s, delete r[i];
|
||
return e;
|
||
}
|
||
function D0(t) {
|
||
var e;
|
||
e = t.input.charCodeAt(t.position), e === 10 ? t.position++ : e === 13 ? (t.position++, t.input.charCodeAt(t.position) === 10 && t.position++) : Jt(t, "a line break is expected"), t.line += 1, t.lineStart = t.position, t.firstTabInLine = -1;
|
||
}
|
||
function sr(t, e, r) {
|
||
for (var n = 0, i = t.input.charCodeAt(t.position); i !== 0; ) {
|
||
for (; ps(i); )
|
||
i === 9 && t.firstTabInLine === -1 && (t.firstTabInLine = t.position), i = t.input.charCodeAt(++t.position);
|
||
if (e && i === 35)
|
||
do
|
||
i = t.input.charCodeAt(++t.position);
|
||
while (i !== 10 && i !== 13 && i !== 0);
|
||
if (Hn(i))
|
||
for (D0(t), i = t.input.charCodeAt(t.position), n++, t.lineIndent = 0; i === 32; )
|
||
t.lineIndent++, i = t.input.charCodeAt(++t.position);
|
||
else
|
||
break;
|
||
}
|
||
return r !== -1 && n !== 0 && t.lineIndent < r && Ac(t, "deficient indentation"), n;
|
||
}
|
||
function yu(t) {
|
||
var e = t.position, r;
|
||
return r = t.input.charCodeAt(e), !!((r === 45 || r === 46) && r === t.input.charCodeAt(e + 1) && r === t.input.charCodeAt(e + 2) && (e += 3, r = t.input.charCodeAt(e), r === 0 || zr(r)));
|
||
}
|
||
function M0(t, e) {
|
||
e === 1 ? t.result += " " : e > 1 && (t.result += Dr.repeat(`
|
||
`, e - 1));
|
||
}
|
||
function D7(t, e, r) {
|
||
var n, i, s, a, o, l, u, d, f = t.kind, p = t.result, g;
|
||
if (g = t.input.charCodeAt(t.position), zr(g) || $s(g) || g === 35 || g === 38 || g === 42 || g === 33 || g === 124 || g === 62 || g === 39 || g === 34 || g === 37 || g === 64 || g === 96 || (g === 63 || g === 45) && (i = t.input.charCodeAt(t.position + 1), zr(i) || r && $s(i)))
|
||
return !1;
|
||
for (t.kind = "scalar", t.result = "", s = a = t.position, o = !1; g !== 0; ) {
|
||
if (g === 58) {
|
||
if (i = t.input.charCodeAt(t.position + 1), zr(i) || r && $s(i))
|
||
break;
|
||
} else if (g === 35) {
|
||
if (n = t.input.charCodeAt(t.position - 1), zr(n))
|
||
break;
|
||
} else {
|
||
if (t.position === t.lineStart && yu(t) || r && $s(g))
|
||
break;
|
||
if (Hn(g))
|
||
if (l = t.line, u = t.lineStart, d = t.lineIndent, sr(t, !1, -1), t.lineIndent >= e) {
|
||
o = !0, g = t.input.charCodeAt(t.position);
|
||
continue;
|
||
} else {
|
||
t.position = a, t.line = l, t.lineStart = u, t.lineIndent = d;
|
||
break;
|
||
}
|
||
}
|
||
o && (Hi(t, s, a, !1), M0(t, t.line - l), s = a = t.position, o = !1), ps(g) || (a = t.position + 1), g = t.input.charCodeAt(++t.position);
|
||
}
|
||
return Hi(t, s, a, !1), t.result ? !0 : (t.kind = f, t.result = p, !1);
|
||
}
|
||
function M7(t, e) {
|
||
var r, n, i;
|
||
if (r = t.input.charCodeAt(t.position), r !== 39)
|
||
return !1;
|
||
for (t.kind = "scalar", t.result = "", t.position++, n = i = t.position; (r = t.input.charCodeAt(t.position)) !== 0; )
|
||
if (r === 39)
|
||
if (Hi(t, n, t.position, !0), r = t.input.charCodeAt(++t.position), r === 39)
|
||
n = t.position, t.position++, i = t.position;
|
||
else
|
||
return !0;
|
||
else
|
||
Hn(r) ? (Hi(t, n, i, !0), M0(t, sr(t, !1, e)), n = i = t.position) : t.position === t.lineStart && yu(t) ? Jt(t, "unexpected end of the document within a single quoted scalar") : (t.position++, i = t.position);
|
||
Jt(t, "unexpected end of the stream within a single quoted scalar");
|
||
}
|
||
function N7(t, e) {
|
||
var r, n, i, s, a, o;
|
||
if (o = t.input.charCodeAt(t.position), o !== 34)
|
||
return !1;
|
||
for (t.kind = "scalar", t.result = "", t.position++, r = n = t.position; (o = t.input.charCodeAt(t.position)) !== 0; ) {
|
||
if (o === 34)
|
||
return Hi(t, r, t.position, !0), t.position++, !0;
|
||
if (o === 92) {
|
||
if (Hi(t, r, t.position, !0), o = t.input.charCodeAt(++t.position), Hn(o))
|
||
sr(t, !1, e);
|
||
else if (o < 256 && _y[o])
|
||
t.result += xy[o], t.position++;
|
||
else if ((a = C7(o)) > 0) {
|
||
for (i = a, s = 0; i > 0; i--)
|
||
o = t.input.charCodeAt(++t.position), (a = E7(o)) >= 0 ? s = (s << 4) + a : Jt(t, "expected hexadecimal character");
|
||
t.result += A7(s), t.position++;
|
||
} else
|
||
Jt(t, "unknown escape sequence");
|
||
r = n = t.position;
|
||
} else
|
||
Hn(o) ? (Hi(t, r, n, !0), M0(t, sr(t, !1, e)), r = n = t.position) : t.position === t.lineStart && yu(t) ? Jt(t, "unexpected end of the document within a double quoted scalar") : (t.position++, n = t.position);
|
||
}
|
||
Jt(t, "unexpected end of the stream within a double quoted scalar");
|
||
}
|
||
function B7(t, e) {
|
||
var r = !0, n, i, s, a = t.tag, o, l = t.anchor, u, d, f, p, g, b = /* @__PURE__ */ Object.create(null), k, T, L, E;
|
||
if (E = t.input.charCodeAt(t.position), E === 91)
|
||
d = 93, g = !1, o = [];
|
||
else if (E === 123)
|
||
d = 125, g = !0, o = {};
|
||
else
|
||
return !1;
|
||
for (t.anchor !== null && (t.anchorMap[t.anchor] = o), E = t.input.charCodeAt(++t.position); E !== 0; ) {
|
||
if (sr(t, !0, e), E = t.input.charCodeAt(t.position), E === d)
|
||
return t.position++, t.tag = a, t.anchor = l, t.kind = g ? "mapping" : "sequence", t.result = o, !0;
|
||
r ? E === 44 && Jt(t, "expected the node content, but found ','") : Jt(t, "missed comma between flow collection entries"), T = k = L = null, f = p = !1, E === 63 && (u = t.input.charCodeAt(t.position + 1), zr(u) && (f = p = !0, t.position++, sr(t, !0, e))), n = t.line, i = t.lineStart, s = t.position, ya(t, e, Cc, !1, !0), T = t.tag, k = t.result, sr(t, !0, e), E = t.input.charCodeAt(t.position), (p || t.line === n) && E === 58 && (f = !0, E = t.input.charCodeAt(++t.position), sr(t, !0, e), ya(t, e, Cc, !1, !0), L = t.result), g ? Ks(t, o, b, T, k, L, n, i, s) : f ? o.push(Ks(t, null, b, T, k, L, n, i, s)) : o.push(k), sr(t, !0, e), E = t.input.charCodeAt(t.position), E === 44 ? (r = !0, E = t.input.charCodeAt(++t.position)) : r = !1;
|
||
}
|
||
Jt(t, "unexpected end of the stream within a flow collection");
|
||
}
|
||
function I7(t, e) {
|
||
var r, n, i = Eh, s = !1, a = !1, o = e, l = 0, u = !1, d, f;
|
||
if (f = t.input.charCodeAt(t.position), f === 124)
|
||
n = !1;
|
||
else if (f === 62)
|
||
n = !0;
|
||
else
|
||
return !1;
|
||
for (t.kind = "scalar", t.result = ""; f !== 0; )
|
||
if (f = t.input.charCodeAt(++t.position), f === 43 || f === 45)
|
||
Eh === i ? i = f === 43 ? e2 : v7 : Jt(t, "repeat of a chomping mode identifier");
|
||
else if ((d = S7(f)) >= 0)
|
||
d === 0 ? Jt(t, "bad explicit indentation width of a block scalar; it cannot be less than one") : a ? Jt(t, "repeat of an indentation width identifier") : (o = e + d - 1, a = !0);
|
||
else
|
||
break;
|
||
if (ps(f)) {
|
||
do
|
||
f = t.input.charCodeAt(++t.position);
|
||
while (ps(f));
|
||
if (f === 35)
|
||
do
|
||
f = t.input.charCodeAt(++t.position);
|
||
while (!Hn(f) && f !== 0);
|
||
}
|
||
for (; f !== 0; ) {
|
||
for (D0(t), t.lineIndent = 0, f = t.input.charCodeAt(t.position); (!a || t.lineIndent < o) && f === 32; )
|
||
t.lineIndent++, f = t.input.charCodeAt(++t.position);
|
||
if (!a && t.lineIndent > o && (o = t.lineIndent), Hn(f)) {
|
||
l++;
|
||
continue;
|
||
}
|
||
if (t.lineIndent < o) {
|
||
i === e2 ? t.result += Dr.repeat(`
|
||
`, s ? 1 + l : l) : i === Eh && s && (t.result += `
|
||
`);
|
||
break;
|
||
}
|
||
for (n ? ps(f) ? (u = !0, t.result += Dr.repeat(`
|
||
`, s ? 1 + l : l)) : u ? (u = !1, t.result += Dr.repeat(`
|
||
`, l + 1)) : l === 0 ? s && (t.result += " ") : t.result += Dr.repeat(`
|
||
`, l) : t.result += Dr.repeat(`
|
||
`, s ? 1 + l : l), s = !0, a = !0, l = 0, r = t.position; !Hn(f) && f !== 0; )
|
||
f = t.input.charCodeAt(++t.position);
|
||
Hi(t, r, t.position, !1);
|
||
}
|
||
return !0;
|
||
}
|
||
function a2(t, e) {
|
||
var r, n = t.tag, i = t.anchor, s = [], a, o = !1, l;
|
||
if (t.firstTabInLine !== -1)
|
||
return !1;
|
||
for (t.anchor !== null && (t.anchorMap[t.anchor] = s), l = t.input.charCodeAt(t.position); l !== 0 && (t.firstTabInLine !== -1 && (t.position = t.firstTabInLine, Jt(t, "tab characters must not be used in indentation")), !(l !== 45 || (a = t.input.charCodeAt(t.position + 1), !zr(a)))); ) {
|
||
if (o = !0, t.position++, sr(t, !0, -1) && t.lineIndent <= e) {
|
||
s.push(null), l = t.input.charCodeAt(t.position);
|
||
continue;
|
||
}
|
||
if (r = t.line, ya(t, e, yy, !1, !0), s.push(t.result), sr(t, !0, -1), l = t.input.charCodeAt(t.position), (t.line === r || t.lineIndent > e) && l !== 0)
|
||
Jt(t, "bad indentation of a sequence entry");
|
||
else if (t.lineIndent < e)
|
||
break;
|
||
}
|
||
return o ? (t.tag = n, t.anchor = i, t.kind = "sequence", t.result = s, !0) : !1;
|
||
}
|
||
function O7(t, e, r) {
|
||
var n, i, s, a, o, l, u = t.tag, d = t.anchor, f = {}, p = /* @__PURE__ */ Object.create(null), g = null, b = null, k = null, T = !1, L = !1, E;
|
||
if (t.firstTabInLine !== -1)
|
||
return !1;
|
||
for (t.anchor !== null && (t.anchorMap[t.anchor] = f), E = t.input.charCodeAt(t.position); E !== 0; ) {
|
||
if (!T && t.firstTabInLine !== -1 && (t.position = t.firstTabInLine, Jt(t, "tab characters must not be used in indentation")), n = t.input.charCodeAt(t.position + 1), s = t.line, (E === 63 || E === 58) && zr(n))
|
||
E === 63 ? (T && (Ks(t, f, p, g, b, null, a, o, l), g = b = k = null), L = !0, T = !0, i = !0) : T ? (T = !1, i = !0) : Jt(t, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), t.position += 1, E = n;
|
||
else {
|
||
if (a = t.line, o = t.lineStart, l = t.position, !ya(t, r, gy, !1, !0))
|
||
break;
|
||
if (t.line === s) {
|
||
for (E = t.input.charCodeAt(t.position); ps(E); )
|
||
E = t.input.charCodeAt(++t.position);
|
||
if (E === 58)
|
||
E = t.input.charCodeAt(++t.position), zr(E) || Jt(t, "a whitespace character is expected after the key-value separator within a block mapping"), T && (Ks(t, f, p, g, b, null, a, o, l), g = b = k = null), L = !0, T = !1, i = !1, g = t.tag, b = t.result;
|
||
else if (L)
|
||
Jt(t, "can not read an implicit mapping pair; a colon is missed");
|
||
else
|
||
return t.tag = u, t.anchor = d, !0;
|
||
} else if (L)
|
||
Jt(t, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
||
else
|
||
return t.tag = u, t.anchor = d, !0;
|
||
}
|
||
if ((t.line === s || t.lineIndent > e) && (T && (a = t.line, o = t.lineStart, l = t.position), ya(t, e, Sc, !0, i) && (T ? b = t.result : k = t.result), T || (Ks(t, f, p, g, b, k, a, o, l), g = b = k = null), sr(t, !0, -1), E = t.input.charCodeAt(t.position)), (t.line === s || t.lineIndent > e) && E !== 0)
|
||
Jt(t, "bad indentation of a mapping entry");
|
||
else if (t.lineIndent < e)
|
||
break;
|
||
}
|
||
return T && Ks(t, f, p, g, b, null, a, o, l), L && (t.tag = u, t.anchor = d, t.kind = "mapping", t.result = f), L;
|
||
}
|
||
function R7(t) {
|
||
var e, r = !1, n = !1, i, s, a;
|
||
if (a = t.input.charCodeAt(t.position), a !== 33)
|
||
return !1;
|
||
if (t.tag !== null && Jt(t, "duplication of a tag property"), a = t.input.charCodeAt(++t.position), a === 60 ? (r = !0, a = t.input.charCodeAt(++t.position)) : a === 33 ? (n = !0, i = "!!", a = t.input.charCodeAt(++t.position)) : i = "!", e = t.position, r) {
|
||
do
|
||
a = t.input.charCodeAt(++t.position);
|
||
while (a !== 0 && a !== 62);
|
||
t.position < t.length ? (s = t.input.slice(e, t.position), a = t.input.charCodeAt(++t.position)) : Jt(t, "unexpected end of the stream within a verbatim tag");
|
||
} else {
|
||
for (; a !== 0 && !zr(a); )
|
||
a === 33 && (n ? Jt(t, "tag suffix cannot contain exclamation marks") : (i = t.input.slice(e - 1, t.position + 1), my.test(i) || Jt(t, "named tag handle cannot contain such characters"), n = !0, e = t.position + 1)), a = t.input.charCodeAt(++t.position);
|
||
s = t.input.slice(e, t.position), T7.test(s) && Jt(t, "tag suffix cannot contain flow indicator characters");
|
||
}
|
||
s && !by.test(s) && Jt(t, "tag name cannot contain such characters: " + s);
|
||
try {
|
||
s = decodeURIComponent(s);
|
||
} catch {
|
||
Jt(t, "tag name is malformed: " + s);
|
||
}
|
||
return r ? t.tag = s : ji.call(t.tagMap, i) ? t.tag = t.tagMap[i] + s : i === "!" ? t.tag = "!" + s : i === "!!" ? t.tag = "tag:yaml.org,2002:" + s : Jt(t, 'undeclared tag handle "' + i + '"'), !0;
|
||
}
|
||
function F7(t) {
|
||
var e, r;
|
||
if (r = t.input.charCodeAt(t.position), r !== 38)
|
||
return !1;
|
||
for (t.anchor !== null && Jt(t, "duplication of an anchor property"), r = t.input.charCodeAt(++t.position), e = t.position; r !== 0 && !zr(r) && !$s(r); )
|
||
r = t.input.charCodeAt(++t.position);
|
||
return t.position === e && Jt(t, "name of an anchor node must contain at least one character"), t.anchor = t.input.slice(e, t.position), !0;
|
||
}
|
||
function P7(t) {
|
||
var e, r, n;
|
||
if (n = t.input.charCodeAt(t.position), n !== 42)
|
||
return !1;
|
||
for (n = t.input.charCodeAt(++t.position), e = t.position; n !== 0 && !zr(n) && !$s(n); )
|
||
n = t.input.charCodeAt(++t.position);
|
||
return t.position === e && Jt(t, "name of an alias node must contain at least one character"), r = t.input.slice(e, t.position), ji.call(t.anchorMap, r) || Jt(t, 'unidentified alias "' + r + '"'), t.result = t.anchorMap[r], sr(t, !0, -1), !0;
|
||
}
|
||
function ya(t, e, r, n, i) {
|
||
var s, a, o, l = 1, u = !1, d = !1, f, p, g, b, k, T;
|
||
if (t.listener !== null && t.listener("open", t), t.tag = null, t.anchor = null, t.kind = null, t.result = null, s = a = o = Sc === r || yy === r, n && sr(t, !0, -1) && (u = !0, t.lineIndent > e ? l = 1 : t.lineIndent === e ? l = 0 : t.lineIndent < e && (l = -1)), l === 1)
|
||
for (; R7(t) || F7(t); )
|
||
sr(t, !0, -1) ? (u = !0, o = s, t.lineIndent > e ? l = 1 : t.lineIndent === e ? l = 0 : t.lineIndent < e && (l = -1)) : o = !1;
|
||
if (o && (o = u || i), (l === 1 || Sc === r) && (Cc === r || gy === r ? k = e : k = e + 1, T = t.position - t.lineStart, l === 1 ? o && (a2(t, T) || O7(t, T, k)) || B7(t, k) ? d = !0 : (a && I7(t, k) || M7(t, k) || N7(t, k) ? d = !0 : P7(t) ? (d = !0, (t.tag !== null || t.anchor !== null) && Jt(t, "alias node should not have any properties")) : D7(t, k, Cc === r) && (d = !0, t.tag === null && (t.tag = "?")), t.anchor !== null && (t.anchorMap[t.anchor] = t.result)) : l === 0 && (d = o && a2(t, T))), t.tag === null)
|
||
t.anchor !== null && (t.anchorMap[t.anchor] = t.result);
|
||
else if (t.tag === "?") {
|
||
for (t.result !== null && t.kind !== "scalar" && Jt(t, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + t.kind + '"'), f = 0, p = t.implicitTypes.length; f < p; f += 1)
|
||
if (b = t.implicitTypes[f], b.resolve(t.result)) {
|
||
t.result = b.construct(t.result), t.tag = b.tag, t.anchor !== null && (t.anchorMap[t.anchor] = t.result);
|
||
break;
|
||
}
|
||
} else if (t.tag !== "!") {
|
||
if (ji.call(t.typeMap[t.kind || "fallback"], t.tag))
|
||
b = t.typeMap[t.kind || "fallback"][t.tag];
|
||
else
|
||
for (b = null, g = t.typeMap.multi[t.kind || "fallback"], f = 0, p = g.length; f < p; f += 1)
|
||
if (t.tag.slice(0, g[f].tag.length) === g[f].tag) {
|
||
b = g[f];
|
||
break;
|
||
}
|
||
b || Jt(t, "unknown tag !<" + t.tag + ">"), t.result !== null && b.kind !== t.kind && Jt(t, "unacceptable node kind for !<" + t.tag + '> tag; it should be "' + b.kind + '", not "' + t.kind + '"'), b.resolve(t.result, t.tag) ? (t.result = b.construct(t.result, t.tag), t.anchor !== null && (t.anchorMap[t.anchor] = t.result)) : Jt(t, "cannot resolve a node with !<" + t.tag + "> explicit tag");
|
||
}
|
||
return t.listener !== null && t.listener("close", t), t.tag !== null || t.anchor !== null || d;
|
||
}
|
||
function Y7(t) {
|
||
var e = t.position, r, n, i, s = !1, a;
|
||
for (t.version = null, t.checkLineBreaks = t.legacy, t.tagMap = /* @__PURE__ */ Object.create(null), t.anchorMap = /* @__PURE__ */ Object.create(null); (a = t.input.charCodeAt(t.position)) !== 0 && (sr(t, !0, -1), a = t.input.charCodeAt(t.position), !(t.lineIndent > 0 || a !== 37)); ) {
|
||
for (s = !0, a = t.input.charCodeAt(++t.position), r = t.position; a !== 0 && !zr(a); )
|
||
a = t.input.charCodeAt(++t.position);
|
||
for (n = t.input.slice(r, t.position), i = [], n.length < 1 && Jt(t, "directive name must not be less than one character in length"); a !== 0; ) {
|
||
for (; ps(a); )
|
||
a = t.input.charCodeAt(++t.position);
|
||
if (a === 35) {
|
||
do
|
||
a = t.input.charCodeAt(++t.position);
|
||
while (a !== 0 && !Hn(a));
|
||
break;
|
||
}
|
||
if (Hn(a))
|
||
break;
|
||
for (r = t.position; a !== 0 && !zr(a); )
|
||
a = t.input.charCodeAt(++t.position);
|
||
i.push(t.input.slice(r, t.position));
|
||
}
|
||
a !== 0 && D0(t), ji.call(i2, n) ? i2[n](t, n, i) : Ac(t, 'unknown document directive "' + n + '"');
|
||
}
|
||
if (sr(t, !0, -1), t.lineIndent === 0 && t.input.charCodeAt(t.position) === 45 && t.input.charCodeAt(t.position + 1) === 45 && t.input.charCodeAt(t.position + 2) === 45 ? (t.position += 3, sr(t, !0, -1)) : s && Jt(t, "directives end mark is expected"), ya(t, t.lineIndent - 1, Sc, !1, !0), sr(t, !0, -1), t.checkLineBreaks && w7.test(t.input.slice(e, t.position)) && Ac(t, "non-ASCII line breaks are interpreted as content"), t.documents.push(t.result), t.position === t.lineStart && yu(t)) {
|
||
t.input.charCodeAt(t.position) === 46 && (t.position += 3, sr(t, !0, -1));
|
||
return;
|
||
}
|
||
if (t.position < t.length - 1)
|
||
Jt(t, "end of the stream or a document separator is expected");
|
||
else
|
||
return;
|
||
}
|
||
function ky(t, e) {
|
||
t = String(t), e = e || {}, t.length !== 0 && (t.charCodeAt(t.length - 1) !== 10 && t.charCodeAt(t.length - 1) !== 13 && (t += `
|
||
`), t.charCodeAt(0) === 65279 && (t = t.slice(1)));
|
||
var r = new L7(t, e), n = t.indexOf("\0");
|
||
for (n !== -1 && (r.position = n, Jt(r, "null byte is not allowed in input")), r.input += "\0"; r.input.charCodeAt(r.position) === 32; )
|
||
r.lineIndent += 1, r.position += 1;
|
||
for (; r.position < r.length - 1; )
|
||
Y7(r);
|
||
return r.documents;
|
||
}
|
||
function V7(t, e, r) {
|
||
e !== null && typeof e == "object" && typeof r > "u" && (r = e, e = null);
|
||
var n = ky(t, r);
|
||
if (typeof e != "function")
|
||
return n;
|
||
for (var i = 0, s = n.length; i < s; i += 1)
|
||
e(n[i]);
|
||
}
|
||
function U7(t, e) {
|
||
var r = ky(t, e);
|
||
if (r.length !== 0) {
|
||
if (r.length === 1)
|
||
return r[0];
|
||
throw new ui("expected a single document in the stream, but found more");
|
||
}
|
||
}
|
||
var z7 = V7, W7 = U7, H7 = {
|
||
loadAll: z7,
|
||
load: W7
|
||
}, G7 = dy, q7 = H7.load;
|
||
const wy = /^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s;
|
||
function j7(t, e) {
|
||
var n;
|
||
const r = t.match(wy);
|
||
if (r) {
|
||
const i = q7(r[1], {
|
||
schema: G7
|
||
});
|
||
return i != null && i.title && ((n = e.setDiagramTitle) == null || n.call(e, i.title)), t.slice(r[0].length);
|
||
} else
|
||
return t;
|
||
}
|
||
const X7 = /%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi, $7 = /\s*%%.*\n/gm, Lc = {}, N0 = function(t, e) {
|
||
t = t.replace(wy, "").replace(X7, "").replace($7, `
|
||
`);
|
||
for (const [r, { detector: n }] of Object.entries(Lc))
|
||
if (n(t, e))
|
||
return r;
|
||
throw new Error(`No diagram type detected for text: ${t}`);
|
||
}, Ty = (t, e, r) => {
|
||
if (Lc[t])
|
||
throw new Error(`Detector with key ${t} already exists`);
|
||
Lc[t] = { detector: e, loader: r }, B.debug(`Detector with key ${t} added${r ? " with loader" : ""}`);
|
||
}, K7 = (t) => Lc[t].loader, f1 = 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((s) => f1(t, s, r)), t) : Array.isArray(e) && Array.isArray(t) ? (e.forEach((s) => {
|
||
t.includes(s) || t.push(s);
|
||
}), t) : t === void 0 || n <= 0 ? t != null && typeof t == "object" && typeof e == "object" ? Object.assign(t, e) : e : (e !== void 0 && typeof t == "object" && typeof e == "object" && Object.keys(e).forEach((s) => {
|
||
typeof e[s] == "object" && (t[s] === void 0 || typeof t[s] == "object") ? (t[s] === void 0 && (t[s] = Array.isArray(e[s]) ? [] : {}), t[s] = f1(t[s], e[s], { depth: n - 1, clobber: i })) : (i || typeof t[s] != "object" && typeof e[s] != "object") && (t[s] = e[s]);
|
||
}), t);
|
||
}, pr = f1;
|
||
var Z7 = typeof global == "object" && global && global.Object === Object && global;
|
||
const Ey = Z7;
|
||
var Q7 = typeof self == "object" && self && self.Object === Object && self, J7 = Ey || Q7 || Function("return this")();
|
||
const An = J7;
|
||
var tT = An.Symbol;
|
||
const rn = tT;
|
||
var Cy = Object.prototype, eT = Cy.hasOwnProperty, rT = Cy.toString, ja = rn ? rn.toStringTag : void 0;
|
||
function nT(t) {
|
||
var e = eT.call(t, ja), r = t[ja];
|
||
try {
|
||
t[ja] = void 0;
|
||
var n = !0;
|
||
} catch {
|
||
}
|
||
var i = rT.call(t);
|
||
return n && (e ? t[ja] = r : delete t[ja]), i;
|
||
}
|
||
var iT = Object.prototype, sT = iT.toString;
|
||
function aT(t) {
|
||
return sT.call(t);
|
||
}
|
||
var oT = "[object Null]", lT = "[object Undefined]", o2 = rn ? rn.toStringTag : void 0;
|
||
function Ms(t) {
|
||
return t == null ? t === void 0 ? lT : oT : o2 && o2 in Object(t) ? nT(t) : aT(t);
|
||
}
|
||
function Kr(t) {
|
||
var e = typeof t;
|
||
return t != null && (e == "object" || e == "function");
|
||
}
|
||
var cT = "[object AsyncFunction]", uT = "[object Function]", hT = "[object GeneratorFunction]", dT = "[object Proxy]";
|
||
function ma(t) {
|
||
if (!Kr(t))
|
||
return !1;
|
||
var e = Ms(t);
|
||
return e == uT || e == hT || e == cT || e == dT;
|
||
}
|
||
var fT = An["__core-js_shared__"];
|
||
const Ch = fT;
|
||
var l2 = function() {
|
||
var t = /[^.]+$/.exec(Ch && Ch.keys && Ch.keys.IE_PROTO || "");
|
||
return t ? "Symbol(src)_1." + t : "";
|
||
}();
|
||
function pT(t) {
|
||
return !!l2 && l2 in t;
|
||
}
|
||
var gT = Function.prototype, yT = gT.toString;
|
||
function Ns(t) {
|
||
if (t != null) {
|
||
try {
|
||
return yT.call(t);
|
||
} catch {
|
||
}
|
||
try {
|
||
return t + "";
|
||
} catch {
|
||
}
|
||
}
|
||
return "";
|
||
}
|
||
var mT = /[\\^$.*+?()[\]{}|]/g, bT = /^\[object .+?Constructor\]$/, _T = Function.prototype, xT = Object.prototype, vT = _T.toString, kT = xT.hasOwnProperty, wT = RegExp(
|
||
"^" + vT.call(kT).replace(mT, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
||
);
|
||
function TT(t) {
|
||
if (!Kr(t) || pT(t))
|
||
return !1;
|
||
var e = ma(t) ? wT : bT;
|
||
return e.test(Ns(t));
|
||
}
|
||
function ET(t, e) {
|
||
return t == null ? void 0 : t[e];
|
||
}
|
||
function Bs(t, e) {
|
||
var r = ET(t, e);
|
||
return TT(r) ? r : void 0;
|
||
}
|
||
var CT = Bs(Object, "create");
|
||
const Eo = CT;
|
||
function ST() {
|
||
this.__data__ = Eo ? Eo(null) : {}, this.size = 0;
|
||
}
|
||
function AT(t) {
|
||
var e = this.has(t) && delete this.__data__[t];
|
||
return this.size -= e ? 1 : 0, e;
|
||
}
|
||
var LT = "__lodash_hash_undefined__", DT = Object.prototype, MT = DT.hasOwnProperty;
|
||
function NT(t) {
|
||
var e = this.__data__;
|
||
if (Eo) {
|
||
var r = e[t];
|
||
return r === LT ? void 0 : r;
|
||
}
|
||
return MT.call(e, t) ? e[t] : void 0;
|
||
}
|
||
var BT = Object.prototype, IT = BT.hasOwnProperty;
|
||
function OT(t) {
|
||
var e = this.__data__;
|
||
return Eo ? e[t] !== void 0 : IT.call(e, t);
|
||
}
|
||
var RT = "__lodash_hash_undefined__";
|
||
function FT(t, e) {
|
||
var r = this.__data__;
|
||
return this.size += this.has(t) ? 0 : 1, r[t] = Eo && e === void 0 ? RT : e, this;
|
||
}
|
||
function xs(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]);
|
||
}
|
||
}
|
||
xs.prototype.clear = ST;
|
||
xs.prototype.delete = AT;
|
||
xs.prototype.get = NT;
|
||
xs.prototype.has = OT;
|
||
xs.prototype.set = FT;
|
||
function PT() {
|
||
this.__data__ = [], this.size = 0;
|
||
}
|
||
function Ba(t, e) {
|
||
return t === e || t !== t && e !== e;
|
||
}
|
||
function mu(t, e) {
|
||
for (var r = t.length; r--; )
|
||
if (Ba(t[r][0], e))
|
||
return r;
|
||
return -1;
|
||
}
|
||
var YT = Array.prototype, VT = YT.splice;
|
||
function UT(t) {
|
||
var e = this.__data__, r = mu(e, t);
|
||
if (r < 0)
|
||
return !1;
|
||
var n = e.length - 1;
|
||
return r == n ? e.pop() : VT.call(e, r, 1), --this.size, !0;
|
||
}
|
||
function zT(t) {
|
||
var e = this.__data__, r = mu(e, t);
|
||
return r < 0 ? void 0 : e[r][1];
|
||
}
|
||
function WT(t) {
|
||
return mu(this.__data__, t) > -1;
|
||
}
|
||
function HT(t, e) {
|
||
var r = this.__data__, n = mu(r, t);
|
||
return n < 0 ? (++this.size, r.push([t, e])) : r[n][1] = e, this;
|
||
}
|
||
function Ei(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]);
|
||
}
|
||
}
|
||
Ei.prototype.clear = PT;
|
||
Ei.prototype.delete = UT;
|
||
Ei.prototype.get = zT;
|
||
Ei.prototype.has = WT;
|
||
Ei.prototype.set = HT;
|
||
var GT = Bs(An, "Map");
|
||
const Co = GT;
|
||
function qT() {
|
||
this.size = 0, this.__data__ = {
|
||
hash: new xs(),
|
||
map: new (Co || Ei)(),
|
||
string: new xs()
|
||
};
|
||
}
|
||
function jT(t) {
|
||
var e = typeof t;
|
||
return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? t !== "__proto__" : t === null;
|
||
}
|
||
function bu(t, e) {
|
||
var r = t.__data__;
|
||
return jT(e) ? r[typeof e == "string" ? "string" : "hash"] : r.map;
|
||
}
|
||
function XT(t) {
|
||
var e = bu(this, t).delete(t);
|
||
return this.size -= e ? 1 : 0, e;
|
||
}
|
||
function $T(t) {
|
||
return bu(this, t).get(t);
|
||
}
|
||
function KT(t) {
|
||
return bu(this, t).has(t);
|
||
}
|
||
function ZT(t, e) {
|
||
var r = bu(this, t), n = r.size;
|
||
return r.set(t, e), this.size += r.size == n ? 0 : 1, this;
|
||
}
|
||
function Ci(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]);
|
||
}
|
||
}
|
||
Ci.prototype.clear = qT;
|
||
Ci.prototype.delete = XT;
|
||
Ci.prototype.get = $T;
|
||
Ci.prototype.has = KT;
|
||
Ci.prototype.set = ZT;
|
||
var QT = "Expected a function";
|
||
function Ia(t, e) {
|
||
if (typeof t != "function" || e != null && typeof e != "function")
|
||
throw new TypeError(QT);
|
||
var r = function() {
|
||
var n = arguments, i = e ? e.apply(this, n) : n[0], s = r.cache;
|
||
if (s.has(i))
|
||
return s.get(i);
|
||
var a = t.apply(this, n);
|
||
return r.cache = s.set(i, a) || s, a;
|
||
};
|
||
return r.cache = new (Ia.Cache || Ci)(), r;
|
||
}
|
||
Ia.Cache = Ci;
|
||
const JT = {
|
||
curveBasis: ga,
|
||
curveBasisClosed: Rk,
|
||
curveBasisOpen: Fk,
|
||
curveLinear: $r,
|
||
curveLinearClosed: Pk,
|
||
curveMonotoneX: Yk,
|
||
curveMonotoneY: Vk,
|
||
curveNatural: Uk,
|
||
curveStep: zk,
|
||
curveStepAfter: Hk,
|
||
curveStepBefore: Wk
|
||
}, Sh = /%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi, tE = /\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi, eE = function(t, e) {
|
||
const r = Sy(t, /(?:init\b)|(?:initialize\b)/);
|
||
let n = {};
|
||
if (Array.isArray(r)) {
|
||
const i = r.map((s) => s.args);
|
||
vs(i), n = pr(n, [...i]);
|
||
} else
|
||
n = r.args;
|
||
if (n) {
|
||
let i = N0(t, e);
|
||
["config"].forEach((s) => {
|
||
n[s] !== void 0 && (i === "flowchart-v2" && (i = "flowchart"), n[i] = n[s], delete n[s]);
|
||
});
|
||
}
|
||
return n;
|
||
}, Sy = function(t, e = null) {
|
||
try {
|
||
const r = new RegExp(
|
||
`[%]{2}(?![{]${tE.source})(?=[}][%]{2}).*
|
||
`,
|
||
"ig"
|
||
);
|
||
t = t.trim().replace(r, "").replace(/'/gm, '"'), B.debug(
|
||
`Detecting diagram directive${e !== null ? " type:" + e : ""} based on the text:${t}`
|
||
);
|
||
let n;
|
||
const i = [];
|
||
for (; (n = Sh.exec(t)) !== null; )
|
||
if (n.index === Sh.lastIndex && Sh.lastIndex++, n && !e || e && n[1] && n[1].match(e) || e && n[2] && n[2].match(e)) {
|
||
const s = n[1] ? n[1] : n[2], a = n[3] ? n[3].trim() : n[4] ? JSON.parse(n[4].trim()) : null;
|
||
i.push({ type: s, args: a });
|
||
}
|
||
return i.length === 0 && i.push({ type: t, args: null }), i.length === 1 ? i[0] : i;
|
||
} catch (r) {
|
||
return B.error(
|
||
`ERROR: ${r.message} - Unable to parse directive
|
||
${e !== null ? " type:" + e : ""} based on the text:${t}`
|
||
), { type: null, args: null };
|
||
}
|
||
}, rE = function(t, e) {
|
||
for (const [r, n] of e.entries())
|
||
if (n.match(t))
|
||
return r;
|
||
return -1;
|
||
};
|
||
function mn(t, e) {
|
||
if (!t)
|
||
return e;
|
||
const r = `curve${t.charAt(0).toUpperCase() + t.slice(1)}`;
|
||
return JT[r] || e;
|
||
}
|
||
function nE(t, e) {
|
||
const r = t.trim();
|
||
if (r)
|
||
return e.securityLevel !== "loose" ? Ti(r) : r;
|
||
}
|
||
const iE = (t, ...e) => {
|
||
const r = t.split("."), n = r.length - 1, i = r[n];
|
||
let s = window;
|
||
for (let a = 0; a < n; a++)
|
||
if (s = s[r[a]], !s)
|
||
return;
|
||
s[i](...e);
|
||
};
|
||
function Dc(t, e) {
|
||
return t && e ? Math.sqrt(Math.pow(e.x - t.x, 2) + Math.pow(e.y - t.y, 2)) : 0;
|
||
}
|
||
function sE(t) {
|
||
let e, r = 0;
|
||
t.forEach((s) => {
|
||
r += Dc(s, e), e = s;
|
||
});
|
||
let n = r / 2, i;
|
||
return e = void 0, t.forEach((s) => {
|
||
if (e && !i) {
|
||
const a = Dc(s, e);
|
||
if (a < n)
|
||
n -= a;
|
||
else {
|
||
const o = n / a;
|
||
o <= 0 && (i = e), o >= 1 && (i = { x: s.x, y: s.y }), o > 0 && o < 1 && (i = {
|
||
x: (1 - o) * e.x + o * s.x,
|
||
y: (1 - o) * e.y + o * s.y
|
||
});
|
||
}
|
||
}
|
||
e = s;
|
||
}), i;
|
||
}
|
||
function aE(t) {
|
||
return t.length === 1 ? t[0] : sE(t);
|
||
}
|
||
const oE = (t, e, r) => {
|
||
let n;
|
||
B.info(`our points ${JSON.stringify(e)}`), e[0] !== r && (e = e.reverse());
|
||
let s = 25, a;
|
||
n = void 0, e.forEach((d) => {
|
||
if (n && !a) {
|
||
const f = Dc(d, n);
|
||
if (f < s)
|
||
s -= f;
|
||
else {
|
||
const p = s / f;
|
||
p <= 0 && (a = n), p >= 1 && (a = { x: d.x, y: d.y }), p > 0 && p < 1 && (a = {
|
||
x: (1 - p) * n.x + p * d.x,
|
||
y: (1 - p) * n.y + p * d.y
|
||
});
|
||
}
|
||
}
|
||
n = d;
|
||
});
|
||
const o = t ? 10 : 5, l = Math.atan2(e[0].y - a.y, e[0].x - a.x), u = { x: 0, y: 0 };
|
||
return u.x = Math.sin(l) * o + (e[0].x + a.x) / 2, u.y = -Math.cos(l) * o + (e[0].y + a.y) / 2, u;
|
||
};
|
||
function lE(t, e, r) {
|
||
let n = JSON.parse(JSON.stringify(r)), i;
|
||
B.info("our points", n), e !== "start_left" && e !== "start_right" && (n = n.reverse()), n.forEach((f) => {
|
||
i = f;
|
||
});
|
||
let a = 25 + t, o;
|
||
i = void 0, n.forEach((f) => {
|
||
if (i && !o) {
|
||
const p = Dc(f, i);
|
||
if (p < a)
|
||
a -= p;
|
||
else {
|
||
const g = a / p;
|
||
g <= 0 && (o = i), g >= 1 && (o = { x: f.x, y: f.y }), g > 0 && g < 1 && (o = {
|
||
x: (1 - g) * i.x + g * f.x,
|
||
y: (1 - g) * i.y + g * f.y
|
||
});
|
||
}
|
||
}
|
||
i = f;
|
||
});
|
||
const l = 10 + t * 0.5, u = Math.atan2(n[0].y - o.y, n[0].x - o.x), d = { x: 0, y: 0 };
|
||
return d.x = Math.sin(u) * l + (n[0].x + o.x) / 2, d.y = -Math.cos(u) * l + (n[0].y + o.y) / 2, e === "start_left" && (d.x = Math.sin(u + Math.PI) * l + (n[0].x + o.x) / 2, d.y = -Math.cos(u + Math.PI) * l + (n[0].y + o.y) / 2), e === "end_right" && (d.x = Math.sin(u - Math.PI) * l + (n[0].x + o.x) / 2 - 5, d.y = -Math.cos(u - Math.PI) * l + (n[0].y + o.y) / 2 - 5), e === "end_left" && (d.x = Math.sin(u) * l + (n[0].x + o.x) / 2 - 5, d.y = -Math.cos(u) * l + (n[0].y + o.y) / 2 - 5), d;
|
||
}
|
||
function Xi(t) {
|
||
let e = "", r = "";
|
||
for (const n of t)
|
||
n !== void 0 && (n.startsWith("color:") || n.startsWith("text-align:") ? r = r + n + ";" : e = e + n + ";");
|
||
return { style: e, labelStyle: r };
|
||
}
|
||
let c2 = 0;
|
||
const Ay = () => (c2++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + c2);
|
||
function cE(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 Ly = (t) => cE(t.length), uE = 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
|
||
};
|
||
}, hE = function(t, e) {
|
||
const r = e.text.replace(he.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), e.class !== void 0 && 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;
|
||
}, Dy = Ia(
|
||
(t, e, r) => {
|
||
if (!t || (r = Object.assign(
|
||
{ fontSize: 12, fontWeight: 400, fontFamily: "Arial", joinWith: "<br/>" },
|
||
r
|
||
), he.lineBreakRegex.test(t)))
|
||
return t;
|
||
const n = t.split(" "), i = [];
|
||
let s = "";
|
||
return n.forEach((a, o) => {
|
||
const l = Gn(`${a} `, r), u = Gn(s, r);
|
||
if (l > e) {
|
||
const { hyphenatedStrings: p, remainingWord: g } = dE(a, e, "-", r);
|
||
i.push(s, ...p), s = g;
|
||
} else
|
||
u + l >= e ? (i.push(s), s = a) : s = [s, a].filter(Boolean).join(" ");
|
||
o + 1 === n.length && i.push(s);
|
||
}), i.filter((a) => a !== "").join(r.joinWith);
|
||
},
|
||
(t, e, r) => `${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`
|
||
), dE = Ia(
|
||
(t, e, r = "-", n) => {
|
||
n = Object.assign(
|
||
{ fontSize: 12, fontWeight: 400, fontFamily: "Arial", margin: 0 },
|
||
n
|
||
);
|
||
const i = [...t], s = [];
|
||
let a = "";
|
||
return i.forEach((o, l) => {
|
||
const u = `${a}${o}`;
|
||
if (Gn(u, n) >= e) {
|
||
const f = l + 1, p = i.length === f, g = `${u}${r}`;
|
||
s.push(p ? u : g), a = "";
|
||
} else
|
||
a = u;
|
||
}), { hyphenatedStrings: s, remainingWord: a };
|
||
},
|
||
(t, e, r = "-", n) => `${t}${e}${r}${n.fontSize}${n.fontWeight}${n.fontFamily}`
|
||
);
|
||
function p1(t, e) {
|
||
return e = Object.assign(
|
||
{ fontSize: 12, fontWeight: 400, fontFamily: "Arial", margin: 15 },
|
||
e
|
||
), B0(t, e).height;
|
||
}
|
||
function Gn(t, e) {
|
||
return e = Object.assign({ fontSize: 12, fontWeight: 400, fontFamily: "Arial" }, e), B0(t, e).width;
|
||
}
|
||
const B0 = Ia(
|
||
(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 s = ["sans-serif", n], a = t.split(he.lineBreakRegex), o = [], l = At("body");
|
||
if (!l.remove)
|
||
return { width: 0, height: 0, lineHeight: 0 };
|
||
const u = l.append("svg");
|
||
for (const f of s) {
|
||
let p = 0;
|
||
const g = { width: 0, height: 0, lineHeight: 0 };
|
||
for (const b of a) {
|
||
const k = uE();
|
||
k.text = b;
|
||
const T = hE(u, k).style("font-size", r).style("font-weight", i).style("font-family", f), L = (T._groups || T)[0][0].getBBox();
|
||
g.width = Math.round(Math.max(g.width, L.width)), p = Math.round(L.height), g.height += p, g.lineHeight = Math.round(Math.max(g.lineHeight, p));
|
||
}
|
||
o.push(g);
|
||
}
|
||
u.remove();
|
||
const d = 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[d];
|
||
},
|
||
(t, e) => `${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`
|
||
), fE = 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 Cl;
|
||
const pE = function(t) {
|
||
return Cl = Cl || document.createElement("div"), t = escape(t).replace(/%26/g, "&").replace(/%23/g, "#").replace(/%3B/g, ";"), Cl.innerHTML = t, unescape(Cl.textContent);
|
||
}, vs = (t) => {
|
||
if (B.debug("directiveSanitizer called with", t), typeof t == "object" && (t.length ? t.forEach((e) => vs(e)) : Object.keys(t).forEach((e) => {
|
||
B.debug("Checking key", e), e.startsWith("__") && (B.debug("sanitize deleting __ option", e), delete t[e]), e.includes("proto") && (B.debug("sanitize deleting proto option", e), delete t[e]), e.includes("constr") && (B.debug("sanitize deleting constr option", e), delete t[e]), e.includes("themeCSS") && (B.debug("sanitizing themeCss option"), t[e] = Gl(t[e])), e.includes("fontFamily") && (B.debug("sanitizing fontFamily option"), t[e] = Gl(t[e])), e.includes("altFontFamily") && (B.debug("sanitizing altFontFamily option"), t[e] = Gl(t[e])), rw.includes(e) ? typeof t[e] == "object" && (B.debug("sanitize deleting object", e), vs(t[e])) : (B.debug("sanitize deleting option", e), delete t[e]);
|
||
})), t.themeVariables) {
|
||
const e = Object.keys(t.themeVariables);
|
||
for (const r of e) {
|
||
const n = t.themeVariables[r];
|
||
n && n.match && !n.match(/^[\d "#%(),.;A-Za-z]+$/) && (t.themeVariables[r] = "");
|
||
}
|
||
}
|
||
B.debug("After sanitization", t);
|
||
}, Gl = (t) => {
|
||
let e = 0, r = 0;
|
||
for (const n of t) {
|
||
if (e < r)
|
||
return "{ /* ERROR: Unbalanced CSS */ }";
|
||
n === "{" ? e++ : n === "}" && r++;
|
||
}
|
||
return e !== r ? "{ /* ERROR: Unbalanced CSS */ }" : t;
|
||
};
|
||
function I0(t) {
|
||
return "str" in t;
|
||
}
|
||
function gE(t) {
|
||
return t instanceof Error ? t.message : String(t);
|
||
}
|
||
const yE = (t, e, r, n) => {
|
||
if (!n)
|
||
return;
|
||
const i = t.node().getBBox();
|
||
t.append("text").text(n).attr("x", i.x + i.width / 2).attr("y", -r).attr("class", e);
|
||
}, ye = {
|
||
assignWithDepth: pr,
|
||
wrapLabel: Dy,
|
||
calculateTextHeight: p1,
|
||
calculateTextWidth: Gn,
|
||
calculateTextDimensions: B0,
|
||
detectInit: eE,
|
||
detectDirective: Sy,
|
||
isSubstringInArray: rE,
|
||
interpolateToCurve: mn,
|
||
calcLabelPosition: aE,
|
||
calcCardinalityPosition: oE,
|
||
calcTerminalLabelPosition: lE,
|
||
formatUrl: nE,
|
||
getStylesFromArray: Xi,
|
||
generateId: Ay,
|
||
random: Ly,
|
||
runFunc: iE,
|
||
entityDecode: pE,
|
||
initIdGenerator: fE,
|
||
directiveSanitizer: vs,
|
||
sanitizeCss: Gl,
|
||
insertTitle: yE
|
||
};
|
||
var My = "comm", Ny = "rule", By = "decl", mE = "@import", bE = "@keyframes", _E = Math.abs, O0 = String.fromCharCode;
|
||
function Iy(t) {
|
||
return t.trim();
|
||
}
|
||
function g1(t, e, r) {
|
||
return t.replace(e, r);
|
||
}
|
||
function xE(t, e) {
|
||
return t.indexOf(e);
|
||
}
|
||
function _u(t, e) {
|
||
return t.charCodeAt(e) | 0;
|
||
}
|
||
function So(t, e, r) {
|
||
return t.slice(e, r);
|
||
}
|
||
function Pi(t) {
|
||
return t.length;
|
||
}
|
||
function Oy(t) {
|
||
return t.length;
|
||
}
|
||
function Sl(t, e) {
|
||
return e.push(t), t;
|
||
}
|
||
var xu = 1, ba = 1, Ry = 0, nn = 0, nr = 0, Oa = "";
|
||
function R0(t, e, r, n, i, s, a) {
|
||
return { value: t, root: e, parent: r, type: n, props: i, children: s, line: xu, column: ba, length: a, return: "" };
|
||
}
|
||
function vE() {
|
||
return nr;
|
||
}
|
||
function kE() {
|
||
return nr = nn > 0 ? _u(Oa, --nn) : 0, ba--, nr === 10 && (ba = 1, xu--), nr;
|
||
}
|
||
function bn() {
|
||
return nr = nn < Ry ? _u(Oa, nn++) : 0, ba++, nr === 10 && (ba = 1, xu++), nr;
|
||
}
|
||
function gs() {
|
||
return _u(Oa, nn);
|
||
}
|
||
function ql() {
|
||
return nn;
|
||
}
|
||
function vu(t, e) {
|
||
return So(Oa, t, e);
|
||
}
|
||
function y1(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 wE(t) {
|
||
return xu = ba = 1, Ry = Pi(Oa = t), nn = 0, [];
|
||
}
|
||
function TE(t) {
|
||
return Oa = "", t;
|
||
}
|
||
function Ah(t) {
|
||
return Iy(vu(nn - 1, m1(t === 91 ? t + 2 : t === 40 ? t + 1 : t)));
|
||
}
|
||
function EE(t) {
|
||
for (; (nr = gs()) && nr < 33; )
|
||
bn();
|
||
return y1(t) > 2 || y1(nr) > 3 ? "" : " ";
|
||
}
|
||
function CE(t, e) {
|
||
for (; --e && bn() && !(nr < 48 || nr > 102 || nr > 57 && nr < 65 || nr > 70 && nr < 97); )
|
||
;
|
||
return vu(t, ql() + (e < 6 && gs() == 32 && bn() == 32));
|
||
}
|
||
function m1(t) {
|
||
for (; bn(); )
|
||
switch (nr) {
|
||
case t:
|
||
return nn;
|
||
case 34:
|
||
case 39:
|
||
t !== 34 && t !== 39 && m1(nr);
|
||
break;
|
||
case 40:
|
||
t === 41 && m1(t);
|
||
break;
|
||
case 92:
|
||
bn();
|
||
break;
|
||
}
|
||
return nn;
|
||
}
|
||
function SE(t, e) {
|
||
for (; bn() && t + nr !== 47 + 10; )
|
||
if (t + nr === 42 + 42 && gs() === 47)
|
||
break;
|
||
return "/*" + vu(e, nn - 1) + "*" + O0(t === 47 ? t : bn());
|
||
}
|
||
function AE(t) {
|
||
for (; !y1(gs()); )
|
||
bn();
|
||
return vu(t, nn);
|
||
}
|
||
function LE(t) {
|
||
return TE(jl("", null, null, null, [""], t = wE(t), 0, [0], t));
|
||
}
|
||
function jl(t, e, r, n, i, s, a, o, l) {
|
||
for (var u = 0, d = 0, f = a, p = 0, g = 0, b = 0, k = 1, T = 1, L = 1, E = 0, I = "", V = i, H = s, G = n, Y = I; T; )
|
||
switch (b = E, E = bn()) {
|
||
case 40:
|
||
if (b != 108 && _u(Y, f - 1) == 58) {
|
||
xE(Y += g1(Ah(E), "&", "&\f"), "&\f") != -1 && (L = -1);
|
||
break;
|
||
}
|
||
case 34:
|
||
case 39:
|
||
case 91:
|
||
Y += Ah(E);
|
||
break;
|
||
case 9:
|
||
case 10:
|
||
case 13:
|
||
case 32:
|
||
Y += EE(b);
|
||
break;
|
||
case 92:
|
||
Y += CE(ql() - 1, 7);
|
||
continue;
|
||
case 47:
|
||
switch (gs()) {
|
||
case 42:
|
||
case 47:
|
||
Sl(DE(SE(bn(), ql()), e, r), l);
|
||
break;
|
||
default:
|
||
Y += "/";
|
||
}
|
||
break;
|
||
case 123 * k:
|
||
o[u++] = Pi(Y) * L;
|
||
case 125 * k:
|
||
case 59:
|
||
case 0:
|
||
switch (E) {
|
||
case 0:
|
||
case 125:
|
||
T = 0;
|
||
case 59 + d:
|
||
g > 0 && Pi(Y) - f && Sl(g > 32 ? h2(Y + ";", n, r, f - 1) : h2(g1(Y, " ", "") + ";", n, r, f - 2), l);
|
||
break;
|
||
case 59:
|
||
Y += ";";
|
||
default:
|
||
if (Sl(G = u2(Y, e, r, u, d, i, o, I, V = [], H = [], f), s), E === 123)
|
||
if (d === 0)
|
||
jl(Y, e, G, G, V, s, f, o, H);
|
||
else
|
||
switch (p) {
|
||
case 100:
|
||
case 109:
|
||
case 115:
|
||
jl(t, G, G, n && Sl(u2(t, G, G, 0, 0, i, o, I, i, V = [], f), H), i, H, f, o, n ? V : H);
|
||
break;
|
||
default:
|
||
jl(Y, G, G, G, [""], H, 0, o, H);
|
||
}
|
||
}
|
||
u = d = g = 0, k = L = 1, I = Y = "", f = a;
|
||
break;
|
||
case 58:
|
||
f = 1 + Pi(Y), g = b;
|
||
default:
|
||
if (k < 1) {
|
||
if (E == 123)
|
||
--k;
|
||
else if (E == 125 && k++ == 0 && kE() == 125)
|
||
continue;
|
||
}
|
||
switch (Y += O0(E), E * k) {
|
||
case 38:
|
||
L = d > 0 ? 1 : (Y += "\f", -1);
|
||
break;
|
||
case 44:
|
||
o[u++] = (Pi(Y) - 1) * L, L = 1;
|
||
break;
|
||
case 64:
|
||
gs() === 45 && (Y += Ah(bn())), p = gs(), d = f = Pi(I = Y += AE(ql())), E++;
|
||
break;
|
||
case 45:
|
||
b === 45 && Pi(Y) == 2 && (k = 0);
|
||
}
|
||
}
|
||
return s;
|
||
}
|
||
function u2(t, e, r, n, i, s, a, o, l, u, d) {
|
||
for (var f = i - 1, p = i === 0 ? s : [""], g = Oy(p), b = 0, k = 0, T = 0; b < n; ++b)
|
||
for (var L = 0, E = So(t, f + 1, f = _E(k = a[b])), I = t; L < g; ++L)
|
||
(I = Iy(k > 0 ? p[L] + " " + E : g1(E, /&\f/g, p[L]))) && (l[T++] = I);
|
||
return R0(t, e, r, i === 0 ? Ny : o, l, u, d);
|
||
}
|
||
function DE(t, e, r) {
|
||
return R0(t, e, r, My, O0(vE()), So(t, 2, -2), 0);
|
||
}
|
||
function h2(t, e, r, n) {
|
||
return R0(t, e, r, By, So(t, 0, n), So(t, n + 1, -1), n);
|
||
}
|
||
function b1(t, e) {
|
||
for (var r = "", n = Oy(t), i = 0; i < n; i++)
|
||
r += e(t[i], i, t, e) || "";
|
||
return r;
|
||
}
|
||
function ME(t, e, r, n) {
|
||
switch (t.type) {
|
||
case mE:
|
||
case By:
|
||
return t.return = t.return || t.value;
|
||
case My:
|
||
return "";
|
||
case bE:
|
||
return t.return = t.value + "{" + b1(t.children, n) + "}";
|
||
case Ny:
|
||
t.value = t.props.join(",");
|
||
}
|
||
return Pi(r = b1(t.children, n)) ? t.return = t.value + "{" + r + "}" : "";
|
||
}
|
||
const NE = "mermaid", BE = "9.3.0", IE = "Markdown-ish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.", OE = "./dist/mermaid.min.js", RE = "./dist/mermaid.core.mjs", FE = "./dist/mermaid.d.ts", PE = {
|
||
".": {
|
||
require: "./dist/mermaid.min.js",
|
||
import: "./dist/mermaid.core.mjs",
|
||
types: "./dist/mermaid.d.ts"
|
||
},
|
||
"./*": "./*"
|
||
}, YE = [
|
||
"diagram",
|
||
"markdown",
|
||
"flowchart",
|
||
"sequence diagram",
|
||
"gantt",
|
||
"class diagram",
|
||
"git graph"
|
||
], VE = {
|
||
clean: "rimraf dist",
|
||
"docs:code": "typedoc src/defaultConfig.ts src/config.ts src/mermaidAPI.ts && prettier --write ./src/docs/config/setup",
|
||
"docs:build": "rimraf ../../docs && pnpm docs:spellcheck && pnpm docs:code && ts-node-esm src/docs.mts",
|
||
"docs:verify": "pnpm docs:spellcheck && pnpm docs:code && ts-node-esm src/docs.mts --verify",
|
||
"docs:pre:vitepress": "rimraf src/vitepress && pnpm docs:code && ts-node-esm src/docs.mts --vitepress",
|
||
"docs:build:vitepress": "pnpm docs:pre:vitepress && vitepress build src/vitepress",
|
||
"docs:dev": 'pnpm docs:pre:vitepress && concurrently "vitepress dev src/vitepress" "ts-node-esm src/docs.mts --watch --vitepress"',
|
||
"docs:serve": "pnpm docs:build:vitepress && vitepress serve src/vitepress",
|
||
"docs:spellcheck": 'cspell --config ../../cSpell.json "src/docs/**/*.md"',
|
||
release: "pnpm build",
|
||
prepublishOnly: "pnpm -w run build"
|
||
}, UE = {
|
||
type: "git",
|
||
url: "https://github.com/mermaid-js/mermaid"
|
||
}, zE = "Knut Sveidqvist", WE = "MIT", HE = {
|
||
ignore: [
|
||
"**/parser/*.js",
|
||
"dist/**/*.js",
|
||
"cypress/**/*.js"
|
||
],
|
||
globals: [
|
||
"page"
|
||
]
|
||
}, GE = {
|
||
"@braintree/sanitize-url": "^6.0.0",
|
||
d3: "^7.0.0",
|
||
"dagre-d3-es": "7.0.6",
|
||
dompurify: "2.4.1",
|
||
khroma: "^2.0.0",
|
||
"lodash-es": "^4.17.21",
|
||
"moment-mini": "^2.24.0",
|
||
"non-layered-tidy-tree-layout": "^2.0.2",
|
||
stylis: "^4.1.2",
|
||
uuid: "^9.0.0"
|
||
}, qE = {
|
||
"@types/d3": "^7.4.0",
|
||
"@types/dompurify": "^2.4.0",
|
||
"@types/jsdom": "^20.0.1",
|
||
"@types/lodash-es": "^4.17.6",
|
||
"@types/micromatch": "^4.0.2",
|
||
"@types/prettier": "^2.7.1",
|
||
"@types/stylis": "^4.0.2",
|
||
"@types/uuid": "^8.3.4",
|
||
"@typescript-eslint/eslint-plugin": "^5.42.1",
|
||
"@typescript-eslint/parser": "^5.42.1",
|
||
chokidar: "^3.5.3",
|
||
concurrently: "^7.5.0",
|
||
coveralls: "^3.1.1",
|
||
cspell: "^6.14.3",
|
||
globby: "^13.1.2",
|
||
jison: "^0.4.18",
|
||
"js-base64": "^3.7.2",
|
||
jsdom: "^20.0.2",
|
||
micromatch: "^4.0.5",
|
||
moment: "^2.29.4",
|
||
"path-browserify": "^1.0.1",
|
||
prettier: "^2.7.1",
|
||
remark: "^14.0.2",
|
||
rimraf: "^3.0.2",
|
||
"start-server-and-test": "^1.14.0",
|
||
typedoc: "^0.23.18",
|
||
"typedoc-plugin-markdown": "^3.13.6",
|
||
typescript: "^4.8.4",
|
||
"unist-util-flatmap": "^1.0.0",
|
||
vitepress: "^1.0.0-alpha.28",
|
||
"vitepress-plugin-search": "^1.0.4-alpha.15"
|
||
}, jE = [
|
||
"dist",
|
||
"README.md"
|
||
], XE = [
|
||
"**/*.css",
|
||
"**/*.scss"
|
||
], Mc = {
|
||
name: NE,
|
||
version: BE,
|
||
description: IE,
|
||
main: OE,
|
||
module: RE,
|
||
types: FE,
|
||
exports: PE,
|
||
keywords: YE,
|
||
scripts: VE,
|
||
repository: UE,
|
||
author: zE,
|
||
license: WE,
|
||
standard: HE,
|
||
dependencies: GE,
|
||
devDependencies: qE,
|
||
files: jE,
|
||
sideEffects: XE
|
||
}, _a = Object.freeze(nw);
|
||
let Pr = pr({}, _a), Fy, xa = [], co = pr({}, _a);
|
||
const ku = (t, e) => {
|
||
let r = pr({}, t), n = {};
|
||
for (const i of e)
|
||
Vy(i), n = pr(n, i);
|
||
if (r = pr(r, n), n.theme && n.theme in _i) {
|
||
const i = pr({}, Fy), s = pr(
|
||
i.themeVariables || {},
|
||
n.themeVariables
|
||
);
|
||
r.theme && r.theme in _i && (r.themeVariables = _i[r.theme].getThemeVariables(s));
|
||
}
|
||
return co = r, zy(co), co;
|
||
}, $E = (t) => (Pr = pr({}, _a), Pr = pr(Pr, t), t.theme && _i[t.theme] && (Pr.themeVariables = _i[t.theme].getThemeVariables(t.themeVariables)), ku(Pr, xa), Pr), KE = (t) => {
|
||
Fy = pr({}, t);
|
||
}, ZE = (t) => (Pr = pr(Pr, t), ku(Pr, xa), Pr), Py = () => pr({}, Pr), Yy = (t) => (zy(t), pr(co, t), X()), X = () => pr({}, co), Vy = (t) => {
|
||
var e;
|
||
["secure", ...(e = Pr.secure) != null ? e : []].forEach((r) => {
|
||
t[r] !== void 0 && (B.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].includes("<") || t[r].includes(">") || t[r].includes("url(data:")) && delete t[r], typeof t[r] == "object" && Vy(t[r]);
|
||
});
|
||
}, F0 = (t) => {
|
||
t.fontFamily && (t.themeVariables ? t.themeVariables.fontFamily || (t.themeVariables = { fontFamily: t.fontFamily }) : t.themeVariables = { fontFamily: t.fontFamily }), xa.push(t), ku(Pr, xa);
|
||
}, Ao = (t = Pr) => {
|
||
xa = [], ku(t, xa);
|
||
};
|
||
var Uy = /* @__PURE__ */ ((t) => (t.LAZY_LOAD_DEPRECATED = "The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.", t))(Uy || {});
|
||
const d2 = {}, QE = (t) => {
|
||
d2[t] || (B.warn(Uy[t]), d2[t] = !0);
|
||
}, zy = (t) => {
|
||
!t || (t.lazyLoadedDiagrams || t.loadExternalDiagramsAtStartup) && QE("LAZY_LOAD_DEPRECATED");
|
||
}, JE = function(t, e) {
|
||
for (let r of e)
|
||
t.attr(r[0], r[1]);
|
||
}, tC = function(t, e, r) {
|
||
let n = /* @__PURE__ */ new Map();
|
||
return r ? (n.set("width", "100%"), n.set("style", `max-width: ${e}px;`)) : (n.set("height", t), n.set("width", e)), n;
|
||
}, Ln = function(t, e, r, n) {
|
||
const i = tC(e, r, n);
|
||
JE(t, i);
|
||
}, wu = function(t, e, r, n) {
|
||
const i = e.node().getBBox(), s = i.width, a = i.height;
|
||
B.info(`SVG bounds: ${s}x${a}`, i);
|
||
let o = 0, l = 0;
|
||
B.info(`Graph bounds: ${o}x${l}`, t), o = s + r * 2, l = a + r * 2, B.info(`Calculated bounds: ${o}x${l}`), Ln(e, l, o, n);
|
||
const u = `${i.x - r} ${i.y - r} ${i.width + 2 * r} ${i.height + 2 * r}`;
|
||
e.attr("viewBox", u);
|
||
}, eC = (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;
|
||
}
|
||
|
||
.dotted-line{
|
||
stroke-dasharray: 1 2;
|
||
}
|
||
|
||
#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.mainBkg} !important;
|
||
stroke: ${t.lineColor} !important;
|
||
stroke-width: 1;
|
||
}
|
||
|
||
#extensionEnd, .extension {
|
||
fill: ${t.mainBkg} !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;
|
||
}
|
||
|
||
.classTitleText {
|
||
text-anchor: middle;
|
||
font-size: 18px;
|
||
fill: ${t.textColor};
|
||
}
|
||
`, uo = eC, rC = (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};
|
||
}
|
||
|
||
.entityTitleText {
|
||
text-anchor: middle;
|
||
font-size: 18px;
|
||
fill: ${t.textColor};
|
||
}
|
||
`, Wy = rC, nC = () => "", Hy = nC, iC = (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;
|
||
}
|
||
|
||
.flowchartTitleText {
|
||
text-anchor: middle;
|
||
font-size: 18px;
|
||
fill: ${t.textColor};
|
||
}
|
||
`, Nc = iC, sC = (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);
|
||
}
|
||
`, Gy = sC, aC = () => "", qy = aC, oC = (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};
|
||
}
|
||
`, jy = oC, lC = (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};
|
||
}
|
||
|
||
`, Xy = lC, cC = (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;
|
||
}
|
||
`, $y = cC, uC = (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;
|
||
}
|
||
|
||
.statediagramTitleText {
|
||
text-anchor: middle;
|
||
font-size: 18px;
|
||
fill: ${t.textColor};
|
||
}
|
||
`, Bc = uC, hC = (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}` : ""};
|
||
}
|
||
`, Ky = hC, dC = (t) => `.person {
|
||
stroke: ${t.personBorder};
|
||
fill: ${t.personBkg};
|
||
}
|
||
`, Zy = dC, Xl = {
|
||
flowchart: Nc,
|
||
"flowchart-v2": Nc,
|
||
sequence: $y,
|
||
gantt: Gy,
|
||
classDiagram: uo,
|
||
"classDiagram-v2": uo,
|
||
class: uo,
|
||
stateDiagram: Bc,
|
||
state: Bc,
|
||
info: qy,
|
||
pie: jy,
|
||
er: Wy,
|
||
error: Hy,
|
||
journey: Ky,
|
||
requirement: Xy,
|
||
c4: Zy
|
||
}, fC = (t, e, r) => {
|
||
let n = "";
|
||
return t in Xl && Xl[t] ? n = Xl[t](r) : B.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}
|
||
`;
|
||
}, pC = (t, e) => {
|
||
Xl[t] = e;
|
||
}, gC = fC, yC = B, mC = u0, $o = X, bC = (t) => wn(t, $o()), Qy = wu, Ic = {}, dr = (t, e, r) => {
|
||
if (Ic[t])
|
||
throw new Error(`Diagram ${t} already registered.`);
|
||
Ic[t] = e, r && Ty(t, r), pC(t, e.styles), e.injectUtils && e.injectUtils(yC, mC, $o, bC, Qy);
|
||
}, Jy = (t) => {
|
||
if (t in Ic)
|
||
return Ic[t];
|
||
throw new Error(`Diagram ${t} not found.`);
|
||
};
|
||
var _1 = function() {
|
||
var t = function(W, N, D, w) {
|
||
for (D = D || {}, w = W.length; w--; D[W[w]] = N)
|
||
;
|
||
return D;
|
||
}, e = [1, 4], r = [1, 7], n = [1, 5], i = [1, 9], s = [1, 6], a = [2, 6], o = [1, 16], l = [6, 8, 14, 20, 22, 24, 25, 27, 29, 32, 37, 40, 50, 55], u = [8, 14, 20, 22, 24, 25, 27, 29, 32, 37, 40], d = [8, 13, 14, 20, 22, 24, 25, 27, 29, 32, 37, 40], f = [1, 26], p = [6, 8, 14, 50, 55], g = [8, 14, 55], b = [1, 53], k = [1, 52], T = [8, 14, 30, 33, 35, 38, 55], L = [1, 67], E = [1, 68], I = [1, 69], V = [8, 14, 33, 35, 42, 55], H = {
|
||
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, ref: 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, ID: 54, ";": 55, $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", 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: "ID", 55: ";" },
|
||
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], [28, 1], [28, 1], [4, 1], [4, 1], [4, 1]],
|
||
performAction: function(N, D, w, v, M, m, Q) {
|
||
var x = m.length - 1;
|
||
switch (M) {
|
||
case 3:
|
||
return m[x];
|
||
case 4:
|
||
return m[x - 1];
|
||
case 5:
|
||
return v.setDirection(m[x - 3]), m[x - 1];
|
||
case 7:
|
||
v.setOptions(m[x - 1]), this.$ = m[x];
|
||
break;
|
||
case 8:
|
||
m[x - 1] += m[x], this.$ = m[x - 1];
|
||
break;
|
||
case 10:
|
||
this.$ = [];
|
||
break;
|
||
case 11:
|
||
m[x - 1].push(m[x]), this.$ = m[x - 1];
|
||
break;
|
||
case 12:
|
||
this.$ = m[x - 1];
|
||
break;
|
||
case 17:
|
||
this.$ = m[x].trim(), v.setAccTitle(this.$);
|
||
break;
|
||
case 18:
|
||
case 19:
|
||
this.$ = m[x].trim(), v.setAccDescription(this.$);
|
||
break;
|
||
case 20:
|
||
v.addSection(m[x].substr(8)), this.$ = m[x].substr(8);
|
||
break;
|
||
case 22:
|
||
v.checkout(m[x]);
|
||
break;
|
||
case 23:
|
||
v.branch(m[x]);
|
||
break;
|
||
case 24:
|
||
v.branch(m[x - 2], m[x]);
|
||
break;
|
||
case 25:
|
||
v.cherryPick(m[x], "", void 0);
|
||
break;
|
||
case 26:
|
||
v.cherryPick(m[x - 2], "", m[x]);
|
||
break;
|
||
case 27:
|
||
case 29:
|
||
v.cherryPick(m[x - 2], "", "");
|
||
break;
|
||
case 28:
|
||
v.cherryPick(m[x], "", m[x - 2]);
|
||
break;
|
||
case 30:
|
||
v.merge(m[x], "", "", "");
|
||
break;
|
||
case 31:
|
||
v.merge(m[x - 2], m[x], "", "");
|
||
break;
|
||
case 32:
|
||
v.merge(m[x - 2], "", m[x], "");
|
||
break;
|
||
case 33:
|
||
v.merge(m[x - 2], "", "", m[x]);
|
||
break;
|
||
case 34:
|
||
v.merge(m[x - 4], m[x], "", m[x - 2]);
|
||
break;
|
||
case 35:
|
||
v.merge(m[x - 4], "", m[x], m[x - 2]);
|
||
break;
|
||
case 36:
|
||
v.merge(m[x - 4], "", m[x - 2], m[x]);
|
||
break;
|
||
case 37:
|
||
v.merge(m[x - 4], m[x - 2], m[x], "");
|
||
break;
|
||
case 38:
|
||
v.merge(m[x - 4], m[x - 2], "", m[x]);
|
||
break;
|
||
case 39:
|
||
v.merge(m[x - 4], m[x], m[x - 2], "");
|
||
break;
|
||
case 40:
|
||
v.merge(m[x - 6], m[x - 4], m[x - 2], m[x]);
|
||
break;
|
||
case 41:
|
||
v.merge(m[x - 6], m[x], m[x - 4], m[x - 2]);
|
||
break;
|
||
case 42:
|
||
v.merge(m[x - 6], m[x - 4], m[x], m[x - 2]);
|
||
break;
|
||
case 43:
|
||
v.merge(m[x - 6], m[x - 2], m[x - 4], m[x]);
|
||
break;
|
||
case 44:
|
||
v.merge(m[x - 6], m[x], m[x - 2], m[x - 4]);
|
||
break;
|
||
case 45:
|
||
v.merge(m[x - 6], m[x - 2], m[x], m[x - 4]);
|
||
break;
|
||
case 46:
|
||
v.commit(m[x]);
|
||
break;
|
||
case 47:
|
||
v.commit("", "", v.commitType.NORMAL, m[x]);
|
||
break;
|
||
case 48:
|
||
v.commit("", "", m[x], "");
|
||
break;
|
||
case 49:
|
||
v.commit("", "", m[x], m[x - 2]);
|
||
break;
|
||
case 50:
|
||
v.commit("", "", m[x - 2], m[x]);
|
||
break;
|
||
case 51:
|
||
v.commit("", m[x], v.commitType.NORMAL, "");
|
||
break;
|
||
case 52:
|
||
v.commit("", m[x - 2], v.commitType.NORMAL, m[x]);
|
||
break;
|
||
case 53:
|
||
v.commit("", m[x], v.commitType.NORMAL, m[x - 2]);
|
||
break;
|
||
case 54:
|
||
v.commit("", m[x - 2], m[x], "");
|
||
break;
|
||
case 55:
|
||
v.commit("", m[x], m[x - 2], "");
|
||
break;
|
||
case 56:
|
||
v.commit("", m[x - 4], m[x - 2], m[x]);
|
||
break;
|
||
case 57:
|
||
v.commit("", m[x - 4], m[x], m[x - 2]);
|
||
break;
|
||
case 58:
|
||
v.commit("", m[x - 2], m[x - 4], m[x]);
|
||
break;
|
||
case 59:
|
||
v.commit("", m[x], m[x - 4], m[x - 2]);
|
||
break;
|
||
case 60:
|
||
v.commit("", m[x], m[x - 2], m[x - 4]);
|
||
break;
|
||
case 61:
|
||
v.commit("", m[x - 2], m[x], m[x - 4]);
|
||
break;
|
||
case 62:
|
||
v.commit(m[x], "", v.commitType.NORMAL, "");
|
||
break;
|
||
case 63:
|
||
v.commit(m[x], "", v.commitType.NORMAL, m[x - 2]);
|
||
break;
|
||
case 64:
|
||
v.commit(m[x - 2], "", v.commitType.NORMAL, m[x]);
|
||
break;
|
||
case 65:
|
||
v.commit(m[x - 2], "", m[x], "");
|
||
break;
|
||
case 66:
|
||
v.commit(m[x], "", m[x - 2], "");
|
||
break;
|
||
case 67:
|
||
v.commit(m[x], m[x - 2], v.commitType.NORMAL, "");
|
||
break;
|
||
case 68:
|
||
v.commit(m[x - 2], m[x], v.commitType.NORMAL, "");
|
||
break;
|
||
case 69:
|
||
v.commit(m[x - 4], "", m[x - 2], m[x]);
|
||
break;
|
||
case 70:
|
||
v.commit(m[x - 4], "", m[x], m[x - 2]);
|
||
break;
|
||
case 71:
|
||
v.commit(m[x - 2], "", m[x - 4], m[x]);
|
||
break;
|
||
case 72:
|
||
v.commit(m[x], "", m[x - 4], m[x - 2]);
|
||
break;
|
||
case 73:
|
||
v.commit(m[x], "", m[x - 2], m[x - 4]);
|
||
break;
|
||
case 74:
|
||
v.commit(m[x - 2], "", m[x], m[x - 4]);
|
||
break;
|
||
case 75:
|
||
v.commit(m[x - 4], m[x], m[x - 2], "");
|
||
break;
|
||
case 76:
|
||
v.commit(m[x - 4], m[x - 2], m[x], "");
|
||
break;
|
||
case 77:
|
||
v.commit(m[x - 2], m[x], m[x - 4], "");
|
||
break;
|
||
case 78:
|
||
v.commit(m[x], m[x - 2], m[x - 4], "");
|
||
break;
|
||
case 79:
|
||
v.commit(m[x], m[x - 4], m[x - 2], "");
|
||
break;
|
||
case 80:
|
||
v.commit(m[x - 2], m[x - 4], m[x], "");
|
||
break;
|
||
case 81:
|
||
v.commit(m[x - 4], m[x], v.commitType.NORMAL, m[x - 2]);
|
||
break;
|
||
case 82:
|
||
v.commit(m[x - 4], m[x - 2], v.commitType.NORMAL, m[x]);
|
||
break;
|
||
case 83:
|
||
v.commit(m[x - 2], m[x], v.commitType.NORMAL, m[x - 4]);
|
||
break;
|
||
case 84:
|
||
v.commit(m[x], m[x - 2], v.commitType.NORMAL, m[x - 4]);
|
||
break;
|
||
case 85:
|
||
v.commit(m[x], m[x - 4], v.commitType.NORMAL, m[x - 2]);
|
||
break;
|
||
case 86:
|
||
v.commit(m[x - 2], m[x - 4], v.commitType.NORMAL, m[x]);
|
||
break;
|
||
case 87:
|
||
v.commit(m[x - 6], m[x - 4], m[x - 2], m[x]);
|
||
break;
|
||
case 88:
|
||
v.commit(m[x - 6], m[x - 4], m[x], m[x - 2]);
|
||
break;
|
||
case 89:
|
||
v.commit(m[x - 6], m[x - 2], m[x - 4], m[x]);
|
||
break;
|
||
case 90:
|
||
v.commit(m[x - 6], m[x], m[x - 4], m[x - 2]);
|
||
break;
|
||
case 91:
|
||
v.commit(m[x - 6], m[x - 2], m[x], m[x - 4]);
|
||
break;
|
||
case 92:
|
||
v.commit(m[x - 6], m[x], m[x - 2], m[x - 4]);
|
||
break;
|
||
case 93:
|
||
v.commit(m[x - 4], m[x - 6], m[x - 2], m[x]);
|
||
break;
|
||
case 94:
|
||
v.commit(m[x - 4], m[x - 6], m[x], m[x - 2]);
|
||
break;
|
||
case 95:
|
||
v.commit(m[x - 2], m[x - 6], m[x - 4], m[x]);
|
||
break;
|
||
case 96:
|
||
v.commit(m[x], m[x - 6], m[x - 4], m[x - 2]);
|
||
break;
|
||
case 97:
|
||
v.commit(m[x - 2], m[x - 6], m[x], m[x - 4]);
|
||
break;
|
||
case 98:
|
||
v.commit(m[x], m[x - 6], m[x - 2], m[x - 4]);
|
||
break;
|
||
case 99:
|
||
v.commit(m[x], m[x - 4], m[x - 2], m[x - 6]);
|
||
break;
|
||
case 100:
|
||
v.commit(m[x - 2], m[x - 4], m[x], m[x - 6]);
|
||
break;
|
||
case 101:
|
||
v.commit(m[x], m[x - 2], m[x - 4], m[x - 6]);
|
||
break;
|
||
case 102:
|
||
v.commit(m[x - 2], m[x], m[x - 4], m[x - 6]);
|
||
break;
|
||
case 103:
|
||
v.commit(m[x - 4], m[x - 2], m[x], m[x - 6]);
|
||
break;
|
||
case 104:
|
||
v.commit(m[x - 4], m[x], m[x - 2], m[x - 6]);
|
||
break;
|
||
case 105:
|
||
v.commit(m[x - 2], m[x - 4], m[x - 6], m[x]);
|
||
break;
|
||
case 106:
|
||
v.commit(m[x], m[x - 4], m[x - 6], m[x - 2]);
|
||
break;
|
||
case 107:
|
||
v.commit(m[x - 2], m[x], m[x - 6], m[x - 4]);
|
||
break;
|
||
case 108:
|
||
v.commit(m[x], m[x - 2], m[x - 6], m[x - 4]);
|
||
break;
|
||
case 109:
|
||
v.commit(m[x - 4], m[x - 2], m[x - 6], m[x]);
|
||
break;
|
||
case 110:
|
||
v.commit(m[x - 4], m[x], m[x - 6], m[x - 2]);
|
||
break;
|
||
case 111:
|
||
this.$ = "";
|
||
break;
|
||
case 112:
|
||
this.$ = m[x];
|
||
break;
|
||
case 113:
|
||
this.$ = v.commitType.NORMAL;
|
||
break;
|
||
case 114:
|
||
this.$ = v.commitType.REVERSE;
|
||
break;
|
||
case 115:
|
||
this.$ = v.commitType.HIGHLIGHT;
|
||
break;
|
||
case 118:
|
||
v.parseDirective("%%{", "open_directive");
|
||
break;
|
||
case 119:
|
||
v.parseDirective(m[x], "type_directive");
|
||
break;
|
||
case 120:
|
||
m[x] = m[x].trim().replace(/'/g, '"'), v.parseDirective(m[x], "arg_directive");
|
||
break;
|
||
case 121:
|
||
v.parseDirective("}%%", "close_directive", "gitGraph");
|
||
break;
|
||
}
|
||
},
|
||
table: [{ 3: 1, 4: 2, 5: 3, 6: e, 8: r, 14: n, 46: 8, 50: i, 55: s }, { 1: [3] }, { 3: 10, 4: 2, 5: 3, 6: e, 8: r, 14: n, 46: 8, 50: i, 55: s }, { 3: 11, 4: 2, 5: 3, 6: e, 8: r, 14: n, 46: 8, 50: i, 55: s }, { 7: 12, 8: a, 9: [1, 13], 10: [1, 14], 11: 15, 14: o }, t(l, [2, 124]), t(l, [2, 125]), t(l, [2, 126]), { 47: 17, 51: [1, 18] }, { 51: [2, 118] }, { 1: [2, 1] }, { 1: [2, 2] }, { 8: [1, 19] }, { 7: 20, 8: a, 11: 15, 14: o }, { 9: [1, 21] }, t(u, [2, 10], { 12: 22, 13: [1, 23] }), t(d, [2, 9]), { 9: [1, 25], 48: 24, 53: f }, t([9, 53], [2, 119]), { 1: [2, 3] }, { 8: [1, 27] }, { 7: 28, 8: a, 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(d, [2, 8]), t(p, [2, 116]), { 49: 45, 52: [1, 46] }, t(p, [2, 121]), { 1: [2, 4] }, { 8: [1, 47] }, t(u, [2, 11]), { 4: 48, 8: r, 14: n, 55: s }, t(u, [2, 13]), t(g, [2, 14]), t(g, [2, 15]), t(g, [2, 16]), { 21: [1, 49] }, { 23: [1, 50] }, t(g, [2, 19]), t(g, [2, 20]), t(g, [2, 21]), { 28: 51, 34: b, 54: k }, t(g, [2, 111], { 41: 54, 33: [1, 57], 34: [1, 59], 35: [1, 55], 38: [1, 56], 42: [1, 58] }), { 28: 60, 34: b, 54: k }, { 33: [1, 61], 35: [1, 62] }, { 28: 63, 34: b, 54: k }, { 48: 64, 53: f }, { 53: [2, 120] }, { 1: [2, 5] }, t(u, [2, 12]), t(g, [2, 17]), t(g, [2, 18]), t(g, [2, 22]), t(T, [2, 122]), t(T, [2, 123]), t(g, [2, 46]), { 34: [1, 65] }, { 39: 66, 43: L, 44: E, 45: I }, { 34: [1, 70] }, { 34: [1, 71] }, t(g, [2, 112]), t(g, [2, 30], { 33: [1, 72], 35: [1, 74], 38: [1, 73] }), { 34: [1, 75] }, { 34: [1, 76], 36: [1, 77] }, t(g, [2, 23], { 30: [1, 78] }), t(p, [2, 117]), t(g, [2, 47], { 33: [1, 80], 38: [1, 79], 42: [1, 81] }), t(g, [2, 48], { 33: [1, 83], 35: [1, 82], 42: [1, 84] }), t(V, [2, 113]), t(V, [2, 114]), t(V, [2, 115]), t(g, [2, 51], { 35: [1, 85], 38: [1, 86], 42: [1, 87] }), t(g, [2, 62], { 33: [1, 90], 35: [1, 88], 38: [1, 89] }), { 34: [1, 91] }, { 39: 92, 43: L, 44: E, 45: I }, { 34: [1, 93] }, t(g, [2, 25], { 35: [1, 94] }), { 33: [1, 95] }, { 33: [1, 96] }, { 31: [1, 97] }, { 39: 98, 43: L, 44: E, 45: I }, { 34: [1, 99] }, { 34: [1, 100] }, { 34: [1, 101] }, { 34: [1, 102] }, { 34: [1, 103] }, { 34: [1, 104] }, { 39: 105, 43: L, 44: E, 45: I }, { 34: [1, 106] }, { 34: [1, 107] }, { 39: 108, 43: L, 44: E, 45: I }, { 34: [1, 109] }, t(g, [2, 31], { 35: [1, 111], 38: [1, 110] }), t(g, [2, 32], { 33: [1, 113], 35: [1, 112] }), t(g, [2, 33], { 33: [1, 114], 38: [1, 115] }), { 34: [1, 116], 36: [1, 117] }, { 34: [1, 118] }, { 34: [1, 119] }, t(g, [2, 24]), t(g, [2, 49], { 33: [1, 120], 42: [1, 121] }), t(g, [2, 53], { 38: [1, 122], 42: [1, 123] }), t(g, [2, 63], { 33: [1, 125], 38: [1, 124] }), t(g, [2, 50], { 33: [1, 126], 42: [1, 127] }), t(g, [2, 55], { 35: [1, 128], 42: [1, 129] }), t(g, [2, 66], { 33: [1, 131], 35: [1, 130] }), t(g, [2, 52], { 38: [1, 132], 42: [1, 133] }), t(g, [2, 54], { 35: [1, 134], 42: [1, 135] }), t(g, [2, 67], { 35: [1, 137], 38: [1, 136] }), t(g, [2, 64], { 33: [1, 139], 38: [1, 138] }), t(g, [2, 65], { 33: [1, 141], 35: [1, 140] }), t(g, [2, 68], { 35: [1, 143], 38: [1, 142] }), { 39: 144, 43: L, 44: E, 45: I }, { 34: [1, 145] }, { 34: [1, 146] }, { 34: [1, 147] }, { 34: [1, 148] }, { 39: 149, 43: L, 44: E, 45: I }, t(g, [2, 26]), t(g, [2, 27]), t(g, [2, 28]), t(g, [2, 29]), { 34: [1, 150] }, { 34: [1, 151] }, { 39: 152, 43: L, 44: E, 45: I }, { 34: [1, 153] }, { 39: 154, 43: L, 44: E, 45: I }, { 34: [1, 155] }, { 34: [1, 156] }, { 34: [1, 157] }, { 34: [1, 158] }, { 34: [1, 159] }, { 34: [1, 160] }, { 34: [1, 161] }, { 39: 162, 43: L, 44: E, 45: I }, { 34: [1, 163] }, { 34: [1, 164] }, { 34: [1, 165] }, { 39: 166, 43: L, 44: E, 45: I }, { 34: [1, 167] }, { 39: 168, 43: L, 44: E, 45: I }, { 34: [1, 169] }, { 34: [1, 170] }, { 34: [1, 171] }, { 39: 172, 43: L, 44: E, 45: I }, { 34: [1, 173] }, t(g, [2, 37], { 35: [1, 174] }), t(g, [2, 38], { 38: [1, 175] }), t(g, [2, 36], { 33: [1, 176] }), t(g, [2, 39], { 35: [1, 177] }), t(g, [2, 34], { 38: [1, 178] }), t(g, [2, 35], { 33: [1, 179] }), t(g, [2, 60], { 42: [1, 180] }), t(g, [2, 73], { 33: [1, 181] }), t(g, [2, 61], { 42: [1, 182] }), t(g, [2, 84], { 38: [1, 183] }), t(g, [2, 74], { 33: [1, 184] }), t(g, [2, 83], { 38: [1, 185] }), t(g, [2, 59], { 42: [1, 186] }), t(g, [2, 72], { 33: [1, 187] }), t(g, [2, 58], { 42: [1, 188] }), t(g, [2, 78], { 35: [1, 189] }), t(g, [2, 71], { 33: [1, 190] }), t(g, [2, 77], { 35: [1, 191] }), t(g, [2, 57], { 42: [1, 192] }), t(g, [2, 85], { 38: [1, 193] }), t(g, [2, 56], { 42: [1, 194] }), t(g, [2, 79], { 35: [1, 195] }), t(g, [2, 80], { 35: [1, 196] }), t(g, [2, 86], { 38: [1, 197] }), t(g, [2, 70], { 33: [1, 198] }), t(g, [2, 81], { 38: [1, 199] }), t(g, [2, 69], { 33: [1, 200] }), t(g, [2, 75], { 35: [1, 201] }), t(g, [2, 76], { 35: [1, 202] }), t(g, [2, 82], { 38: [1, 203] }), { 34: [1, 204] }, { 39: 205, 43: L, 44: E, 45: I }, { 34: [1, 206] }, { 34: [1, 207] }, { 39: 208, 43: L, 44: E, 45: I }, { 34: [1, 209] }, { 34: [1, 210] }, { 34: [1, 211] }, { 34: [1, 212] }, { 39: 213, 43: L, 44: E, 45: I }, { 34: [1, 214] }, { 39: 215, 43: L, 44: E, 45: I }, { 34: [1, 216] }, { 34: [1, 217] }, { 34: [1, 218] }, { 34: [1, 219] }, { 34: [1, 220] }, { 34: [1, 221] }, { 34: [1, 222] }, { 39: 223, 43: L, 44: E, 45: I }, { 34: [1, 224] }, { 34: [1, 225] }, { 34: [1, 226] }, { 39: 227, 43: L, 44: E, 45: I }, { 34: [1, 228] }, { 39: 229, 43: L, 44: E, 45: I }, { 34: [1, 230] }, { 34: [1, 231] }, { 34: [1, 232] }, { 39: 233, 43: L, 44: E, 45: I }, t(g, [2, 40]), t(g, [2, 42]), t(g, [2, 41]), t(g, [2, 43]), t(g, [2, 45]), t(g, [2, 44]), t(g, [2, 101]), t(g, [2, 102]), t(g, [2, 99]), t(g, [2, 100]), t(g, [2, 104]), t(g, [2, 103]), t(g, [2, 108]), t(g, [2, 107]), t(g, [2, 106]), t(g, [2, 105]), t(g, [2, 110]), t(g, [2, 109]), t(g, [2, 98]), t(g, [2, 97]), t(g, [2, 96]), t(g, [2, 95]), t(g, [2, 93]), t(g, [2, 94]), t(g, [2, 92]), t(g, [2, 91]), t(g, [2, 90]), t(g, [2, 89]), t(g, [2, 87]), t(g, [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(N, D) {
|
||
if (D.recoverable)
|
||
this.trace(N);
|
||
else {
|
||
var w = new Error(N);
|
||
throw w.hash = D, w;
|
||
}
|
||
},
|
||
parse: function(N) {
|
||
var D = this, w = [0], v = [], M = [null], m = [], Q = this.table, x = "", ct = 0, Dt = 0, vt = 2, j = 1, ot = m.slice.call(arguments, 1), rt = Object.create(this.lexer), nt = { yy: {} };
|
||
for (var ut in this.yy)
|
||
Object.prototype.hasOwnProperty.call(this.yy, ut) && (nt.yy[ut] = this.yy[ut]);
|
||
rt.setInput(N, nt.yy), nt.yy.lexer = rt, nt.yy.parser = this, typeof rt.yylloc > "u" && (rt.yylloc = {});
|
||
var _t = rt.yylloc;
|
||
m.push(_t);
|
||
var K = rt.options && rt.options.ranges;
|
||
typeof nt.yy.parseError == "function" ? this.parseError = nt.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
||
function Ot() {
|
||
var Yt;
|
||
return Yt = v.pop() || rt.lex() || j, typeof Yt != "number" && (Yt instanceof Array && (v = Yt, Yt = v.pop()), Yt = D.symbols_[Yt] || Yt), Yt;
|
||
}
|
||
for (var P, z, $, F, O = {}, A, J, C, ht; ; ) {
|
||
if (z = w[w.length - 1], this.defaultActions[z] ? $ = this.defaultActions[z] : ((P === null || typeof P > "u") && (P = Ot()), $ = Q[z] && Q[z][P]), typeof $ > "u" || !$.length || !$[0]) {
|
||
var U = "";
|
||
ht = [];
|
||
for (A in Q[z])
|
||
this.terminals_[A] && A > vt && ht.push("'" + this.terminals_[A] + "'");
|
||
rt.showPosition ? U = "Parse error on line " + (ct + 1) + `:
|
||
` + rt.showPosition() + `
|
||
Expecting ` + ht.join(", ") + ", got '" + (this.terminals_[P] || P) + "'" : U = "Parse error on line " + (ct + 1) + ": Unexpected " + (P == j ? "end of input" : "'" + (this.terminals_[P] || P) + "'"), this.parseError(U, {
|
||
text: rt.match,
|
||
token: this.terminals_[P] || P,
|
||
line: rt.yylineno,
|
||
loc: _t,
|
||
expected: ht
|
||
});
|
||
}
|
||
if ($[0] instanceof Array && $.length > 1)
|
||
throw new Error("Parse Error: multiple actions possible at state: " + z + ", token: " + P);
|
||
switch ($[0]) {
|
||
case 1:
|
||
w.push(P), M.push(rt.yytext), m.push(rt.yylloc), w.push($[1]), P = null, Dt = rt.yyleng, x = rt.yytext, ct = rt.yylineno, _t = rt.yylloc;
|
||
break;
|
||
case 2:
|
||
if (J = this.productions_[$[1]][1], O.$ = M[M.length - J], O._$ = {
|
||
first_line: m[m.length - (J || 1)].first_line,
|
||
last_line: m[m.length - 1].last_line,
|
||
first_column: m[m.length - (J || 1)].first_column,
|
||
last_column: m[m.length - 1].last_column
|
||
}, K && (O._$.range = [
|
||
m[m.length - (J || 1)].range[0],
|
||
m[m.length - 1].range[1]
|
||
]), F = this.performAction.apply(O, [
|
||
x,
|
||
Dt,
|
||
ct,
|
||
nt.yy,
|
||
$[1],
|
||
M,
|
||
m
|
||
].concat(ot)), typeof F < "u")
|
||
return F;
|
||
J && (w = w.slice(0, -1 * J * 2), M = M.slice(0, -1 * J), m = m.slice(0, -1 * J)), w.push(this.productions_[$[1]][0]), M.push(O.$), m.push(O._$), C = Q[w[w.length - 2]][w[w.length - 1]], w.push(C);
|
||
break;
|
||
case 3:
|
||
return !0;
|
||
}
|
||
}
|
||
return !0;
|
||
}
|
||
}, G = function() {
|
||
var W = {
|
||
EOF: 1,
|
||
parseError: function(D, w) {
|
||
if (this.yy.parser)
|
||
this.yy.parser.parseError(D, w);
|
||
else
|
||
throw new Error(D);
|
||
},
|
||
setInput: function(N, D) {
|
||
return this.yy = D || this.yy || {}, this._input = N, 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 N = this._input[0];
|
||
this.yytext += N, this.yyleng++, this.offset++, this.match += N, this.matched += N;
|
||
var D = N.match(/(?:\r\n?|\n).*/g);
|
||
return D ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), N;
|
||
},
|
||
unput: function(N) {
|
||
var D = N.length, w = N.split(/(?:\r\n?|\n)/g);
|
||
this._input = N + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - D), this.offset -= D;
|
||
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), w.length - 1 && (this.yylineno -= w.length - 1);
|
||
var M = 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: w ? (w.length === v.length ? this.yylloc.first_column : 0) + v[v.length - w.length].length - w[0].length : this.yylloc.first_column - D
|
||
}, this.options.ranges && (this.yylloc.range = [M[0], M[0] + this.yyleng - D]), 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(N) {
|
||
this.unput(this.match.slice(N));
|
||
},
|
||
pastInput: function() {
|
||
var N = this.matched.substr(0, this.matched.length - this.match.length);
|
||
return (N.length > 20 ? "..." : "") + N.substr(-20).replace(/\n/g, "");
|
||
},
|
||
upcomingInput: function() {
|
||
var N = this.match;
|
||
return N.length < 20 && (N += this._input.substr(0, 20 - N.length)), (N.substr(0, 20) + (N.length > 20 ? "..." : "")).replace(/\n/g, "");
|
||
},
|
||
showPosition: function() {
|
||
var N = this.pastInput(), D = new Array(N.length + 1).join("-");
|
||
return N + this.upcomingInput() + `
|
||
` + D + "^";
|
||
},
|
||
test_match: function(N, D) {
|
||
var w, v, M;
|
||
if (this.options.backtrack_lexer && (M = {
|
||
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 && (M.yylloc.range = this.yylloc.range.slice(0))), v = N[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 + N[0].length
|
||
}, this.yytext += N[0], this.match += N[0], this.matches = N, 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(N[0].length), this.matched += N[0], w = this.performAction.call(this, this.yy, this, D, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), w)
|
||
return w;
|
||
if (this._backtrack) {
|
||
for (var m in M)
|
||
this[m] = M[m];
|
||
return !1;
|
||
}
|
||
return !1;
|
||
},
|
||
next: function() {
|
||
if (this.done)
|
||
return this.EOF;
|
||
this._input || (this.done = !0);
|
||
var N, D, w, v;
|
||
this._more || (this.yytext = "", this.match = "");
|
||
for (var M = this._currentRules(), m = 0; m < M.length; m++)
|
||
if (w = this._input.match(this.rules[M[m]]), w && (!D || w[0].length > D[0].length)) {
|
||
if (D = w, v = m, this.options.backtrack_lexer) {
|
||
if (N = this.test_match(w, M[m]), N !== !1)
|
||
return N;
|
||
if (this._backtrack) {
|
||
D = !1;
|
||
continue;
|
||
} else
|
||
return !1;
|
||
} else if (!this.options.flex)
|
||
break;
|
||
}
|
||
return D ? (N = this.test_match(D, M[v]), N !== !1 ? N : !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 D = this.next();
|
||
return D || this.lex();
|
||
},
|
||
begin: function(D) {
|
||
this.conditionStack.push(D);
|
||
},
|
||
popState: function() {
|
||
var D = this.conditionStack.length - 1;
|
||
return D > 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(D) {
|
||
return D = this.conditionStack.length - 1 - Math.abs(D || 0), D >= 0 ? this.conditionStack[D] : "INITIAL";
|
||
},
|
||
pushState: function(D) {
|
||
this.begin(D);
|
||
},
|
||
stateStackSize: function() {
|
||
return this.conditionStack.length;
|
||
},
|
||
options: { "case-insensitive": !0 },
|
||
performAction: function(D, w, v, M) {
|
||
switch (v) {
|
||
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 54;
|
||
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 W;
|
||
}();
|
||
H.lexer = G;
|
||
function Y() {
|
||
this.yy = {};
|
||
}
|
||
return Y.prototype = H, H.Parser = Y, new Y();
|
||
}();
|
||
_1.parser = _1;
|
||
const _C = _1, xC = (t) => t.match(/^\s*gitGraph/) !== null;
|
||
let P0 = "", Tu = "", Y0 = "";
|
||
const V0 = (t) => wn(t, X()), Dn = function() {
|
||
P0 = "", Y0 = "", Tu = "";
|
||
}, sn = function(t) {
|
||
P0 = V0(t).replace(/^\s+/g, "");
|
||
}, Mn = function() {
|
||
return P0 || Tu;
|
||
}, Nn = function(t) {
|
||
Y0 = V0(t).replace(/\n\s+/g, `
|
||
`);
|
||
}, Bn = function() {
|
||
return Y0;
|
||
}, Si = function(t) {
|
||
Tu = V0(t);
|
||
}, Ai = function() {
|
||
return Tu;
|
||
};
|
||
let Oc = X().gitGraph.mainBranchName, vC = X().gitGraph.mainBranchOrder, hr = {}, Nr = null, Lo = {};
|
||
Lo[Oc] = { name: Oc, order: vC };
|
||
let ir = {};
|
||
ir[Oc] = Nr;
|
||
let fr = Oc, tm = "LR", ks = 0;
|
||
function U0() {
|
||
return Ly({ length: 7 });
|
||
}
|
||
const kC = function(t, e, r) {
|
||
ze.parseDirective(this, t, e, r);
|
||
};
|
||
function wC(t, e) {
|
||
const r = /* @__PURE__ */ Object.create(null);
|
||
return t.reduce((n, i) => {
|
||
const s = e(i);
|
||
return r[s] || (r[s] = !0, n.push(i)), n;
|
||
}, []);
|
||
}
|
||
const TC = function(t) {
|
||
tm = t;
|
||
};
|
||
let em = {};
|
||
const EC = function(t) {
|
||
B.debug("options str", t), t = t && t.trim(), t = t || "{}";
|
||
try {
|
||
em = JSON.parse(t);
|
||
} catch (e) {
|
||
B.error("error while parsing gitGraph options", e.message);
|
||
}
|
||
}, CC = function() {
|
||
return em;
|
||
}, SC = function(t, e, r, n) {
|
||
B.debug("Entering commit:", t, e, r, n), e = he.sanitizeText(e, X()), t = he.sanitizeText(t, X()), n = he.sanitizeText(n, X());
|
||
const i = {
|
||
id: e || ks + "-" + U0(),
|
||
message: t,
|
||
seq: ks++,
|
||
type: r || Do.NORMAL,
|
||
tag: n || "",
|
||
parents: Nr == null ? [] : [Nr.id],
|
||
branch: fr
|
||
};
|
||
Nr = i, hr[i.id] = i, ir[fr] = i.id, B.debug("in pushCommit " + i.id);
|
||
}, AC = function(t, e) {
|
||
if (t = he.sanitizeText(t, X()), ir[t] === void 0)
|
||
ir[t] = Nr != null ? Nr.id : null, Lo[t] = { name: t, order: e ? parseInt(e, 10) : null }, rm(t), B.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;
|
||
}
|
||
}, LC = function(t, e, r, n) {
|
||
t = he.sanitizeText(t, X()), e = he.sanitizeText(e, X());
|
||
const i = hr[ir[fr]], s = hr[ir[t]];
|
||
if (fr === 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 (i === void 0 || !i) {
|
||
let o = new Error(
|
||
'Incorrect usage of "merge". Current branch (' + fr + ")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 (ir[t] === void 0) {
|
||
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 (s === void 0 || !s) {
|
||
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 === s) {
|
||
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 && hr[e] !== void 0) {
|
||
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 a = {
|
||
id: e || ks + "-" + U0(),
|
||
message: "merged branch " + t + " into " + fr,
|
||
seq: ks++,
|
||
parents: [Nr == null ? null : Nr.id, ir[t]],
|
||
branch: fr,
|
||
type: Do.MERGE,
|
||
customType: r,
|
||
customId: !!e,
|
||
tag: n || ""
|
||
};
|
||
Nr = a, hr[a.id] = a, ir[fr] = a.id, B.debug(ir), B.debug("in mergeBranch");
|
||
}, DC = function(t, e, r) {
|
||
if (B.debug("Entering cherryPick:", t, e, r), t = he.sanitizeText(t, X()), e = he.sanitizeText(e, X()), r = he.sanitizeText(r, X()), !t || hr[t] === void 0) {
|
||
let s = new Error(
|
||
'Incorrect usage of "cherryPick". Source commit id should exist and provided'
|
||
);
|
||
throw s.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"]
|
||
}, s;
|
||
}
|
||
let n = hr[t], i = n.branch;
|
||
if (n.type === Do.MERGE) {
|
||
let s = new Error(
|
||
'Incorrect usage of "cherryPick". Source commit should not be a merge commit'
|
||
);
|
||
throw s.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"]
|
||
}, s;
|
||
}
|
||
if (!e || hr[e] === void 0) {
|
||
if (i === fr) {
|
||
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 s = hr[ir[fr]];
|
||
if (s === void 0 || !s) {
|
||
let o = new Error(
|
||
'Incorrect usage of "cherry-pick". Current branch (' + fr + ")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 a = {
|
||
id: ks + "-" + U0(),
|
||
message: "cherry-picked " + n + " into " + fr,
|
||
seq: ks++,
|
||
parents: [Nr == null ? null : Nr.id, n.id],
|
||
branch: fr,
|
||
type: Do.CHERRY_PICK,
|
||
tag: r != null ? r : "cherry-pick:" + n.id
|
||
};
|
||
Nr = a, hr[a.id] = a, ir[fr] = a.id, B.debug(ir), B.debug("in cherryPick");
|
||
}
|
||
}, rm = function(t) {
|
||
if (t = he.sanitizeText(t, X()), ir[t] === void 0) {
|
||
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 {
|
||
fr = t;
|
||
const e = ir[fr];
|
||
Nr = hr[e];
|
||
}
|
||
};
|
||
function f2(t, e, r) {
|
||
const n = t.indexOf(e);
|
||
n === -1 ? t.push(r) : t.splice(n, 1, r);
|
||
}
|
||
function nm(t) {
|
||
const e = t.reduce((i, s) => i.seq > s.seq ? i : s, t[0]);
|
||
let r = "";
|
||
t.forEach(function(i) {
|
||
i === e ? r += " *" : r += " |";
|
||
});
|
||
const n = [r, e.id, e.seq];
|
||
for (let i in ir)
|
||
ir[i] === e.id && n.push(i);
|
||
if (B.debug(n.join(" ")), e.parents && e.parents.length == 2) {
|
||
const i = hr[e.parents[0]];
|
||
f2(t, e, i), t.push(hr[e.parents[1]]);
|
||
} else {
|
||
if (e.parents.length == 0)
|
||
return;
|
||
{
|
||
const i = hr[e.parents];
|
||
f2(t, e, i);
|
||
}
|
||
}
|
||
t = wC(t, (i) => i.id), nm(t);
|
||
}
|
||
const MC = function() {
|
||
B.debug(hr);
|
||
const t = im()[0];
|
||
nm([t]);
|
||
}, NC = function() {
|
||
hr = {}, Nr = null;
|
||
let t = X().gitGraph.mainBranchName, e = X().gitGraph.mainBranchOrder;
|
||
ir = {}, ir[t] = null, Lo = {}, Lo[t] = { name: t, order: e }, fr = t, ks = 0, Dn();
|
||
}, BC = function() {
|
||
return Object.values(Lo).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 }));
|
||
}, IC = function() {
|
||
return ir;
|
||
}, OC = function() {
|
||
return hr;
|
||
}, im = function() {
|
||
const t = Object.keys(hr).map(function(e) {
|
||
return hr[e];
|
||
});
|
||
return t.forEach(function(e) {
|
||
B.debug(e.id);
|
||
}), t.sort((e, r) => e.seq - r.seq), t;
|
||
}, RC = function() {
|
||
return fr;
|
||
}, FC = function() {
|
||
return tm;
|
||
}, PC = function() {
|
||
return Nr;
|
||
}, Do = {
|
||
NORMAL: 0,
|
||
REVERSE: 1,
|
||
HIGHLIGHT: 2,
|
||
MERGE: 3,
|
||
CHERRY_PICK: 4
|
||
}, YC = {
|
||
parseDirective: kC,
|
||
getConfig: () => X().gitGraph,
|
||
setDirection: TC,
|
||
setOptions: EC,
|
||
getOptions: CC,
|
||
commit: SC,
|
||
branch: AC,
|
||
merge: LC,
|
||
cherryPick: DC,
|
||
checkout: rm,
|
||
prettyPrint: MC,
|
||
clear: NC,
|
||
getBranchesAsObjArray: BC,
|
||
getBranches: IC,
|
||
getCommits: OC,
|
||
getCommitsArray: im,
|
||
getCurrentBranch: RC,
|
||
getDirection: FC,
|
||
getHead: PC,
|
||
setAccTitle: sn,
|
||
getAccTitle: Mn,
|
||
getAccDescription: Bn,
|
||
setAccDescription: Nn,
|
||
setDiagramTitle: Si,
|
||
getDiagramTitle: Ai,
|
||
commitType: Do
|
||
};
|
||
let ro = {};
|
||
const qr = {
|
||
NORMAL: 0,
|
||
REVERSE: 1,
|
||
HIGHLIGHT: 2,
|
||
MERGE: 3,
|
||
CHERRY_PICK: 4
|
||
}, us = 8;
|
||
let Yr = {}, Rc = {}, Fc = [], Pc = 0;
|
||
const VC = () => {
|
||
Yr = {}, Rc = {}, ro = {}, Pc = 0, Fc = [];
|
||
}, UC = (t) => {
|
||
const e = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
||
let r = [];
|
||
typeof t == "string" ? r = t.split(/\\n|\n|<br\s*\/?>/gi) : Array.isArray(t) ? r = t : r = [];
|
||
for (const n of r) {
|
||
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 = n.trim(), e.appendChild(i);
|
||
}
|
||
return e;
|
||
}, p2 = (t, e, r) => {
|
||
const n = $o().gitGraph, i = t.append("g").attr("class", "commit-bullets"), s = t.append("g").attr("class", "commit-labels");
|
||
let a = 0;
|
||
Object.keys(e).sort((u, d) => e[u].seq - e[d].seq).forEach((u) => {
|
||
const d = e[u], f = Yr[d.branch].pos, p = a + 10;
|
||
if (r) {
|
||
let g, b = d.customType !== void 0 && d.customType !== "" ? d.customType : d.type;
|
||
switch (b) {
|
||
case qr.NORMAL:
|
||
g = "commit-normal";
|
||
break;
|
||
case qr.REVERSE:
|
||
g = "commit-reverse";
|
||
break;
|
||
case qr.HIGHLIGHT:
|
||
g = "commit-highlight";
|
||
break;
|
||
case qr.MERGE:
|
||
g = "commit-merge";
|
||
break;
|
||
case qr.CHERRY_PICK:
|
||
g = "commit-cherry-pick";
|
||
break;
|
||
default:
|
||
g = "commit-normal";
|
||
}
|
||
if (b === qr.HIGHLIGHT) {
|
||
const k = i.append("rect");
|
||
k.attr("x", p - 10), k.attr("y", f - 10), k.attr("height", 20), k.attr("width", 20), k.attr(
|
||
"class",
|
||
`commit ${d.id} commit-highlight${Yr[d.branch].index % us} ${g}-outer`
|
||
), i.append("rect").attr("x", p - 6).attr("y", f - 6).attr("height", 12).attr("width", 12).attr(
|
||
"class",
|
||
`commit ${d.id} commit${Yr[d.branch].index % us} ${g}-inner`
|
||
);
|
||
} else if (b === qr.CHERRY_PICK)
|
||
i.append("circle").attr("cx", p).attr("cy", f).attr("r", 10).attr("class", `commit ${d.id} ${g}`), i.append("circle").attr("cx", p - 3).attr("cy", f + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${d.id} ${g}`), i.append("circle").attr("cx", p + 3).attr("cy", f + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${d.id} ${g}`), i.append("line").attr("x1", p + 3).attr("y1", f + 1).attr("x2", p).attr("y2", f - 5).attr("stroke", "#fff").attr("class", `commit ${d.id} ${g}`), i.append("line").attr("x1", p - 3).attr("y1", f + 1).attr("x2", p).attr("y2", f - 5).attr("stroke", "#fff").attr("class", `commit ${d.id} ${g}`);
|
||
else {
|
||
const k = i.append("circle");
|
||
if (k.attr("cx", p), k.attr("cy", f), k.attr("r", d.type === qr.MERGE ? 9 : 10), k.attr(
|
||
"class",
|
||
`commit ${d.id} commit${Yr[d.branch].index % us}`
|
||
), b === qr.MERGE) {
|
||
const T = i.append("circle");
|
||
T.attr("cx", p), T.attr("cy", f), T.attr("r", 6), T.attr(
|
||
"class",
|
||
`commit ${g} ${d.id} commit${Yr[d.branch].index % us}`
|
||
);
|
||
}
|
||
b === qr.REVERSE && i.append("path").attr("d", `M ${p - 5},${f - 5}L${p + 5},${f + 5}M${p - 5},${f + 5}L${p + 5},${f - 5}`).attr(
|
||
"class",
|
||
`commit ${g} ${d.id} commit${Yr[d.branch].index % us}`
|
||
);
|
||
}
|
||
}
|
||
if (Rc[d.id] = { x: a + 10, y: f }, r) {
|
||
if (d.type !== qr.CHERRY_PICK && (d.customId && d.type === qr.MERGE || d.type !== qr.MERGE) && n.showCommitLabel) {
|
||
const k = s.append("g"), T = k.insert("rect").attr("class", "commit-label-bkg"), L = k.append("text").attr("x", a).attr("y", f + 25).attr("class", "commit-label").text(d.id);
|
||
let E = L.node().getBBox();
|
||
if (T.attr("x", a + 10 - E.width / 2 - 2).attr("y", f + 13.5).attr("width", E.width + 2 * 2).attr("height", E.height + 2 * 2), L.attr("x", a + 10 - E.width / 2), n.rotateCommitLabel) {
|
||
let I = -7.5 - (E.width + 10) / 25 * 9.5, V = 10 + E.width / 25 * 8.5;
|
||
k.attr(
|
||
"transform",
|
||
"translate(" + I + ", " + V + ") rotate(" + -45 + ", " + a + ", " + f + ")"
|
||
);
|
||
}
|
||
}
|
||
if (d.tag) {
|
||
const k = s.insert("polygon"), T = s.append("circle"), L = s.append("text").attr("y", f - 16).attr("class", "tag-label").text(d.tag);
|
||
let E = L.node().getBBox();
|
||
L.attr("x", a + 10 - E.width / 2);
|
||
const I = E.height / 2, V = f - 19.2;
|
||
k.attr("class", "tag-label-bkg").attr(
|
||
"points",
|
||
`
|
||
${a - E.width / 2 - 4 / 2},${V + 2}
|
||
${a - E.width / 2 - 4 / 2},${V - 2}
|
||
${a + 10 - E.width / 2 - 4},${V - I - 2}
|
||
${a + 10 + E.width / 2 + 4},${V - I - 2}
|
||
${a + 10 + E.width / 2 + 4},${V + I + 2}
|
||
${a + 10 - E.width / 2 - 4},${V + I + 2}`
|
||
), T.attr("cx", a - E.width / 2 + 4 / 2).attr("cy", V).attr("r", 1.5).attr("class", "tag-hole");
|
||
}
|
||
}
|
||
a += 50, a > Pc && (Pc = a);
|
||
});
|
||
}, zC = (t, e, r) => Object.keys(r).filter((s) => r[s].branch === e.branch && r[s].seq > t.seq && r[s].seq < e.seq).length > 0, x1 = (t, e, r = 0) => {
|
||
const n = t + Math.abs(t - e) / 2;
|
||
if (r > 5)
|
||
return n;
|
||
if (Fc.every((a) => Math.abs(a - n) >= 10))
|
||
return Fc.push(n), n;
|
||
const s = Math.abs(t - e);
|
||
return x1(t, e - s / 5, r + 1);
|
||
}, WC = (t, e, r, n) => {
|
||
const i = Rc[e.id], s = Rc[r.id], a = zC(e, r, n);
|
||
let o = "", l = "", u = 0, d = 0, f = Yr[r.branch].index, p;
|
||
if (a) {
|
||
o = "A 10 10, 0, 0, 0,", l = "A 10 10, 0, 0, 1,", u = 10, d = 10, f = Yr[r.branch].index;
|
||
const g = i.y < s.y ? x1(i.y, s.y) : x1(s.y, i.y);
|
||
i.y < s.y ? p = `M ${i.x} ${i.y} L ${i.x} ${g - u} ${o} ${i.x + d} ${g} L ${s.x - u} ${g} ${l} ${s.x} ${g + d} L ${s.x} ${s.y}` : p = `M ${i.x} ${i.y} L ${i.x} ${g + u} ${l} ${i.x + d} ${g} L ${s.x - u} ${g} ${o} ${s.x} ${g - d} L ${s.x} ${s.y}`;
|
||
} else
|
||
i.y < s.y && (o = "A 20 20, 0, 0, 0,", u = 20, d = 20, f = Yr[r.branch].index, p = `M ${i.x} ${i.y} L ${i.x} ${s.y - u} ${o} ${i.x + d} ${s.y} L ${s.x} ${s.y}`), i.y > s.y && (o = "A 20 20, 0, 0, 0,", u = 20, d = 20, f = Yr[e.branch].index, p = `M ${i.x} ${i.y} L ${s.x - u} ${i.y} ${o} ${s.x} ${i.y - d} L ${s.x} ${s.y}`), i.y === s.y && (f = Yr[e.branch].index, p = `M ${i.x} ${i.y} L ${i.x} ${s.y - u} ${o} ${i.x + d} ${s.y} L ${s.x} ${s.y}`);
|
||
t.append("path").attr("d", p).attr("class", "arrow arrow" + f % us);
|
||
}, HC = (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((s) => {
|
||
WC(r, e[s], i, e);
|
||
});
|
||
});
|
||
}, GC = (t, e) => {
|
||
const r = $o().gitGraph, n = t.append("g");
|
||
e.forEach((i, s) => {
|
||
const a = s % us, o = Yr[i.name].pos, l = n.append("line");
|
||
l.attr("x1", 0), l.attr("y1", o), l.attr("x2", Pc), l.attr("y2", o), l.attr("class", "branch branch" + a), Fc.push(o);
|
||
let u = i.name;
|
||
const d = UC(u), f = n.insert("rect"), g = n.insert("g").attr("class", "branchLabel").insert("g").attr("class", "label branch-label" + a);
|
||
g.node().appendChild(d);
|
||
let b = d.getBBox();
|
||
f.attr("class", "branchLabelBkg label" + a).attr("rx", 4).attr("ry", 4).attr("x", -b.width - 4 - (r.rotateCommitLabel === !0 ? 30 : 0)).attr("y", -b.height / 2 + 8).attr("width", b.width + 18).attr("height", b.height + 4), g.attr(
|
||
"transform",
|
||
"translate(" + (-b.width - 14 - (r.rotateCommitLabel === !0 ? 30 : 0)) + ", " + (o - b.height / 2 - 1) + ")"
|
||
), f.attr("transform", "translate(" + -19 + ", " + (o - b.height / 2) + ")");
|
||
});
|
||
}, qC = function(t, e, r, n) {
|
||
var u;
|
||
VC();
|
||
const i = $o(), s = i.gitGraph;
|
||
B.debug("in gitgraph renderer", t + `
|
||
`, "id:", e, r), ro = n.db.getCommits();
|
||
const a = n.db.getBranchesAsObjArray();
|
||
let o = 0;
|
||
a.forEach((d, f) => {
|
||
Yr[d.name] = { pos: o, index: f }, o += 50 + (s.rotateCommitLabel ? 40 : 0);
|
||
});
|
||
const l = At(`[id="${e}"]`);
|
||
p2(l, ro, !1), s.showBranches && GC(l, a), HC(l, ro), p2(l, ro, !0), ye.insertTitle(
|
||
l,
|
||
"gitTitleText",
|
||
s.titleTopMargin,
|
||
n.db.getDiagramTitle()
|
||
), Qy(
|
||
void 0,
|
||
l,
|
||
s.diagramPadding,
|
||
(u = s.useMaxWidth) != null ? u : i.useMaxWidth
|
||
);
|
||
}, jC = {
|
||
draw: qC
|
||
}, XC = (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}
|
||
.gitTitleText {
|
||
text-anchor: middle;
|
||
font-size: 18px;
|
||
fill: ${t.textColor};
|
||
}
|
||
}
|
||
`, $C = XC;
|
||
var Yc = function() {
|
||
var t = function(Ft, xt, ft, Lt) {
|
||
for (ft = ft || {}, Lt = Ft.length; Lt--; ft[Ft[Lt]] = xt)
|
||
;
|
||
return ft;
|
||
}, e = [1, 6], r = [1, 7], n = [1, 8], i = [1, 9], s = [1, 16], a = [1, 11], o = [1, 12], l = [1, 13], u = [1, 14], d = [1, 15], f = [1, 27], p = [1, 33], g = [1, 34], b = [1, 35], k = [1, 36], T = [1, 37], L = [1, 72], E = [1, 73], I = [1, 74], V = [1, 75], H = [1, 76], G = [1, 77], Y = [1, 78], W = [1, 38], N = [1, 39], D = [1, 40], w = [1, 41], v = [1, 42], M = [1, 43], m = [1, 44], Q = [1, 45], x = [1, 46], ct = [1, 47], Dt = [1, 48], vt = [1, 49], j = [1, 50], ot = [1, 51], rt = [1, 52], nt = [1, 53], ut = [1, 54], _t = [1, 55], K = [1, 56], Ot = [1, 57], P = [1, 59], z = [1, 60], $ = [1, 61], F = [1, 62], O = [1, 63], A = [1, 64], J = [1, 65], C = [1, 66], ht = [1, 67], U = [1, 68], Yt = [1, 69], et = [24, 52], Mt = [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], Tt = [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], gt = [1, 94], Et = [1, 95], wt = [1, 96], pt = [1, 97], st = [15, 24, 52], le = [7, 8, 9, 10, 18, 22, 25, 26, 27, 28], $t = [15, 24, 43, 52], jt = [15, 24, 43, 52, 86, 87, 89, 90], Kt = [15, 43], Gt = [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], Ee = {
|
||
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(xt, ft, Lt, bt, Ut, at, ne) {
|
||
var dt = at.length - 1;
|
||
switch (Ut) {
|
||
case 4:
|
||
bt.setDirection("TB");
|
||
break;
|
||
case 5:
|
||
bt.setDirection("BT");
|
||
break;
|
||
case 6:
|
||
bt.setDirection("RL");
|
||
break;
|
||
case 7:
|
||
bt.setDirection("LR");
|
||
break;
|
||
case 11:
|
||
bt.parseDirective("%%{", "open_directive");
|
||
break;
|
||
case 12:
|
||
break;
|
||
case 13:
|
||
at[dt] = at[dt].trim().replace(/'/g, '"'), bt.parseDirective(at[dt], "arg_directive");
|
||
break;
|
||
case 14:
|
||
bt.parseDirective("}%%", "close_directive", "c4Context");
|
||
break;
|
||
case 15:
|
||
case 16:
|
||
case 17:
|
||
case 18:
|
||
case 19:
|
||
bt.setC4Type(at[dt - 3]);
|
||
break;
|
||
case 26:
|
||
bt.setTitle(at[dt].substring(6)), this.$ = at[dt].substring(6);
|
||
break;
|
||
case 27:
|
||
bt.setAccDescription(at[dt].substring(15)), this.$ = at[dt].substring(15);
|
||
break;
|
||
case 28:
|
||
this.$ = at[dt].trim(), bt.setTitle(this.$);
|
||
break;
|
||
case 29:
|
||
case 30:
|
||
this.$ = at[dt].trim(), bt.setAccDescription(this.$);
|
||
break;
|
||
case 35:
|
||
case 36:
|
||
at[dt].splice(2, 0, "ENTERPRISE"), bt.addPersonOrSystemBoundary(...at[dt]), this.$ = at[dt];
|
||
break;
|
||
case 37:
|
||
bt.addPersonOrSystemBoundary(...at[dt]), this.$ = at[dt];
|
||
break;
|
||
case 38:
|
||
at[dt].splice(2, 0, "CONTAINER"), bt.addContainerBoundary(...at[dt]), this.$ = at[dt];
|
||
break;
|
||
case 39:
|
||
bt.addDeploymentNode("node", ...at[dt]), this.$ = at[dt];
|
||
break;
|
||
case 40:
|
||
bt.addDeploymentNode("nodeL", ...at[dt]), this.$ = at[dt];
|
||
break;
|
||
case 41:
|
||
bt.addDeploymentNode("nodeR", ...at[dt]), this.$ = at[dt];
|
||
break;
|
||
case 42:
|
||
bt.popBoundaryParseStack();
|
||
break;
|
||
case 46:
|
||
bt.addPersonOrSystem("person", ...at[dt]), this.$ = at[dt];
|
||
break;
|
||
case 47:
|
||
bt.addPersonOrSystem("external_person", ...at[dt]), this.$ = at[dt];
|
||
break;
|
||
case 48:
|
||
bt.addPersonOrSystem("system", ...at[dt]), this.$ = at[dt];
|
||
break;
|
||
case 49:
|
||
bt.addPersonOrSystem("system_db", ...at[dt]), this.$ = at[dt];
|
||
break;
|
||
case 50:
|
||
bt.addPersonOrSystem("system_queue", ...at[dt]), this.$ = at[dt];
|
||
break;
|
||
case 51:
|
||
bt.addPersonOrSystem("external_system", ...at[dt]), this.$ = at[dt];
|
||
break;
|
||
case 52:
|
||
bt.addPersonOrSystem("external_system_db", ...at[dt]), this.$ = at[dt];
|
||
break;
|
||
case 53:
|
||
bt.addPersonOrSystem("external_system_queue", ...at[dt]), this.$ = at[dt];
|
||
break;
|
||
case 54:
|
||
bt.addContainer("container", ...at[dt]), this.$ = at[dt];
|
||
break;
|
||
case 55:
|
||
bt.addContainer("container_db", ...at[dt]), this.$ = at[dt];
|
||
break;
|
||
case 56:
|
||
bt.addContainer("container_queue", ...at[dt]), this.$ = at[dt];
|
||
break;
|
||
case 57:
|
||
bt.addContainer("external_container", ...at[dt]), this.$ = at[dt];
|
||
break;
|
||
case 58:
|
||
bt.addContainer("external_container_db", ...at[dt]), this.$ = at[dt];
|
||
break;
|
||
case 59:
|
||
bt.addContainer("external_container_queue", ...at[dt]), this.$ = at[dt];
|
||
break;
|
||
case 60:
|
||
bt.addComponent("component", ...at[dt]), this.$ = at[dt];
|
||
break;
|
||
case 61:
|
||
bt.addComponent("component_db", ...at[dt]), this.$ = at[dt];
|
||
break;
|
||
case 62:
|
||
bt.addComponent("component_queue", ...at[dt]), this.$ = at[dt];
|
||
break;
|
||
case 63:
|
||
bt.addComponent("external_component", ...at[dt]), this.$ = at[dt];
|
||
break;
|
||
case 64:
|
||
bt.addComponent("external_component_db", ...at[dt]), this.$ = at[dt];
|
||
break;
|
||
case 65:
|
||
bt.addComponent("external_component_queue", ...at[dt]), this.$ = at[dt];
|
||
break;
|
||
case 67:
|
||
bt.addRel("rel", ...at[dt]), this.$ = at[dt];
|
||
break;
|
||
case 68:
|
||
bt.addRel("birel", ...at[dt]), this.$ = at[dt];
|
||
break;
|
||
case 69:
|
||
bt.addRel("rel_u", ...at[dt]), this.$ = at[dt];
|
||
break;
|
||
case 70:
|
||
bt.addRel("rel_d", ...at[dt]), this.$ = at[dt];
|
||
break;
|
||
case 71:
|
||
bt.addRel("rel_l", ...at[dt]), this.$ = at[dt];
|
||
break;
|
||
case 72:
|
||
bt.addRel("rel_r", ...at[dt]), this.$ = at[dt];
|
||
break;
|
||
case 73:
|
||
bt.addRel("rel_b", ...at[dt]), this.$ = at[dt];
|
||
break;
|
||
case 74:
|
||
at[dt].splice(0, 1), bt.addRel("rel", ...at[dt]), this.$ = at[dt];
|
||
break;
|
||
case 75:
|
||
bt.updateElStyle("update_el_style", ...at[dt]), this.$ = at[dt];
|
||
break;
|
||
case 76:
|
||
bt.updateRelStyle("update_rel_style", ...at[dt]), this.$ = at[dt];
|
||
break;
|
||
case 77:
|
||
bt.updateLayoutConfig("update_layout_config", ...at[dt]), this.$ = at[dt];
|
||
break;
|
||
case 78:
|
||
this.$ = [at[dt]];
|
||
break;
|
||
case 79:
|
||
at[dt].unshift(at[dt - 1]), this.$ = at[dt];
|
||
break;
|
||
case 80:
|
||
case 82:
|
||
this.$ = at[dt].trim();
|
||
break;
|
||
case 81:
|
||
let ee = {};
|
||
ee[at[dt - 1].trim()] = at[dt].trim(), this.$ = ee;
|
||
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: s, 22: a, 25: o, 26: l, 27: u, 28: d }, { 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: s, 22: a, 25: o, 26: l, 27: u, 28: d }, { 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: f }, t([16, 21], [2, 12]), { 23: 28, 29: 29, 30: 30, 31: 31, 32: p, 33: g, 34: b, 36: k, 38: T, 39: 58, 40: 70, 42: 71, 44: L, 46: E, 47: I, 48: V, 49: H, 50: G, 51: Y, 53: 32, 54: W, 55: N, 56: D, 57: w, 58: v, 59: M, 60: m, 61: Q, 62: x, 63: ct, 64: Dt, 65: vt, 66: j, 67: ot, 68: rt, 69: nt, 70: ut, 71: _t, 72: K, 73: Ot, 74: P, 75: z, 76: $, 77: F, 78: O, 79: A, 80: J, 81: C, 82: ht, 83: U, 84: Yt }, { 23: 79, 29: 29, 30: 30, 31: 31, 32: p, 33: g, 34: b, 36: k, 38: T, 39: 58, 40: 70, 42: 71, 44: L, 46: E, 47: I, 48: V, 49: H, 50: G, 51: Y, 53: 32, 54: W, 55: N, 56: D, 57: w, 58: v, 59: M, 60: m, 61: Q, 62: x, 63: ct, 64: Dt, 65: vt, 66: j, 67: ot, 68: rt, 69: nt, 70: ut, 71: _t, 72: K, 73: Ot, 74: P, 75: z, 76: $, 77: F, 78: O, 79: A, 80: J, 81: C, 82: ht, 83: U, 84: Yt }, { 23: 80, 29: 29, 30: 30, 31: 31, 32: p, 33: g, 34: b, 36: k, 38: T, 39: 58, 40: 70, 42: 71, 44: L, 46: E, 47: I, 48: V, 49: H, 50: G, 51: Y, 53: 32, 54: W, 55: N, 56: D, 57: w, 58: v, 59: M, 60: m, 61: Q, 62: x, 63: ct, 64: Dt, 65: vt, 66: j, 67: ot, 68: rt, 69: nt, 70: ut, 71: _t, 72: K, 73: Ot, 74: P, 75: z, 76: $, 77: F, 78: O, 79: A, 80: J, 81: C, 82: ht, 83: U, 84: Yt }, { 23: 81, 29: 29, 30: 30, 31: 31, 32: p, 33: g, 34: b, 36: k, 38: T, 39: 58, 40: 70, 42: 71, 44: L, 46: E, 47: I, 48: V, 49: H, 50: G, 51: Y, 53: 32, 54: W, 55: N, 56: D, 57: w, 58: v, 59: M, 60: m, 61: Q, 62: x, 63: ct, 64: Dt, 65: vt, 66: j, 67: ot, 68: rt, 69: nt, 70: ut, 71: _t, 72: K, 73: Ot, 74: P, 75: z, 76: $, 77: F, 78: O, 79: A, 80: J, 81: C, 82: ht, 83: U, 84: Yt }, { 23: 82, 29: 29, 30: 30, 31: 31, 32: p, 33: g, 34: b, 36: k, 38: T, 39: 58, 40: 70, 42: 71, 44: L, 46: E, 47: I, 48: V, 49: H, 50: G, 51: Y, 53: 32, 54: W, 55: N, 56: D, 57: w, 58: v, 59: M, 60: m, 61: Q, 62: x, 63: ct, 64: Dt, 65: vt, 66: j, 67: ot, 68: rt, 69: nt, 70: ut, 71: _t, 72: K, 73: Ot, 74: P, 75: z, 76: $, 77: F, 78: O, 79: A, 80: J, 81: C, 82: ht, 83: U, 84: Yt }, { 15: [1, 83] }, { 17: 84, 20: [1, 85] }, { 15: [2, 14] }, { 24: [1, 86] }, t(et, [2, 20], { 53: 32, 39: 58, 40: 70, 42: 71, 30: 87, 44: L, 46: E, 47: I, 48: V, 49: H, 50: G, 51: Y, 54: W, 55: N, 56: D, 57: w, 58: v, 59: M, 60: m, 61: Q, 62: x, 63: ct, 64: Dt, 65: vt, 66: j, 67: ot, 68: rt, 69: nt, 70: ut, 71: _t, 72: K, 73: Ot, 74: P, 75: z, 76: $, 77: F, 78: O, 79: A, 80: J, 81: C, 82: ht, 83: U, 84: Yt }), t(et, [2, 21]), t(Mt, [2, 23], { 15: [1, 88] }), t(et, [2, 43], { 15: [1, 89] }), t(Tt, [2, 26]), t(Tt, [2, 27]), { 35: [1, 90] }, { 37: [1, 91] }, t(Tt, [2, 30]), { 45: 92, 85: 93, 86: gt, 87: Et, 89: wt, 90: pt }, { 45: 98, 85: 93, 86: gt, 87: Et, 89: wt, 90: pt }, { 45: 99, 85: 93, 86: gt, 87: Et, 89: wt, 90: pt }, { 45: 100, 85: 93, 86: gt, 87: Et, 89: wt, 90: pt }, { 45: 101, 85: 93, 86: gt, 87: Et, 89: wt, 90: pt }, { 45: 102, 85: 93, 86: gt, 87: Et, 89: wt, 90: pt }, { 45: 103, 85: 93, 86: gt, 87: Et, 89: wt, 90: pt }, { 45: 104, 85: 93, 86: gt, 87: Et, 89: wt, 90: pt }, { 45: 105, 85: 93, 86: gt, 87: Et, 89: wt, 90: pt }, { 45: 106, 85: 93, 86: gt, 87: Et, 89: wt, 90: pt }, { 45: 107, 85: 93, 86: gt, 87: Et, 89: wt, 90: pt }, { 45: 108, 85: 93, 86: gt, 87: Et, 89: wt, 90: pt }, { 45: 109, 85: 93, 86: gt, 87: Et, 89: wt, 90: pt }, { 45: 110, 85: 93, 86: gt, 87: Et, 89: wt, 90: pt }, { 45: 111, 85: 93, 86: gt, 87: Et, 89: wt, 90: pt }, { 45: 112, 85: 93, 86: gt, 87: Et, 89: wt, 90: pt }, { 45: 113, 85: 93, 86: gt, 87: Et, 89: wt, 90: pt }, { 45: 114, 85: 93, 86: gt, 87: Et, 89: wt, 90: pt }, { 45: 115, 85: 93, 86: gt, 87: Et, 89: wt, 90: pt }, { 45: 116, 85: 93, 86: gt, 87: Et, 89: wt, 90: pt }, t(st, [2, 66]), { 45: 117, 85: 93, 86: gt, 87: Et, 89: wt, 90: pt }, { 45: 118, 85: 93, 86: gt, 87: Et, 89: wt, 90: pt }, { 45: 119, 85: 93, 86: gt, 87: Et, 89: wt, 90: pt }, { 45: 120, 85: 93, 86: gt, 87: Et, 89: wt, 90: pt }, { 45: 121, 85: 93, 86: gt, 87: Et, 89: wt, 90: pt }, { 45: 122, 85: 93, 86: gt, 87: Et, 89: wt, 90: pt }, { 45: 123, 85: 93, 86: gt, 87: Et, 89: wt, 90: pt }, { 45: 124, 85: 93, 86: gt, 87: Et, 89: wt, 90: pt }, { 45: 125, 85: 93, 86: gt, 87: Et, 89: wt, 90: pt }, { 45: 126, 85: 93, 86: gt, 87: Et, 89: wt, 90: pt }, { 45: 127, 85: 93, 86: gt, 87: Et, 89: wt, 90: pt }, { 30: 128, 39: 58, 40: 70, 42: 71, 44: L, 46: E, 47: I, 48: V, 49: H, 50: G, 51: Y, 53: 32, 54: W, 55: N, 56: D, 57: w, 58: v, 59: M, 60: m, 61: Q, 62: x, 63: ct, 64: Dt, 65: vt, 66: j, 67: ot, 68: rt, 69: nt, 70: ut, 71: _t, 72: K, 73: Ot, 74: P, 75: z, 76: $, 77: F, 78: O, 79: A, 80: J, 81: C, 82: ht, 83: U, 84: Yt }, { 15: [1, 130], 43: [1, 129] }, { 45: 131, 85: 93, 86: gt, 87: Et, 89: wt, 90: pt }, { 45: 132, 85: 93, 86: gt, 87: Et, 89: wt, 90: pt }, { 45: 133, 85: 93, 86: gt, 87: Et, 89: wt, 90: pt }, { 45: 134, 85: 93, 86: gt, 87: Et, 89: wt, 90: pt }, { 45: 135, 85: 93, 86: gt, 87: Et, 89: wt, 90: pt }, { 45: 136, 85: 93, 86: gt, 87: Et, 89: wt, 90: pt }, { 45: 137, 85: 93, 86: gt, 87: Et, 89: wt, 90: pt }, { 24: [1, 138] }, { 24: [1, 139] }, { 24: [1, 140] }, { 24: [1, 141] }, t(le, [2, 9]), { 14: 142, 21: f }, { 21: [2, 13] }, { 1: [2, 15] }, t(et, [2, 22]), t(Mt, [2, 24], { 31: 31, 29: 143, 32: p, 33: g, 34: b, 36: k, 38: T }), t(et, [2, 44], { 29: 29, 30: 30, 31: 31, 53: 32, 39: 58, 40: 70, 42: 71, 23: 144, 32: p, 33: g, 34: b, 36: k, 38: T, 44: L, 46: E, 47: I, 48: V, 49: H, 50: G, 51: Y, 54: W, 55: N, 56: D, 57: w, 58: v, 59: M, 60: m, 61: Q, 62: x, 63: ct, 64: Dt, 65: vt, 66: j, 67: ot, 68: rt, 69: nt, 70: ut, 71: _t, 72: K, 73: Ot, 74: P, 75: z, 76: $, 77: F, 78: O, 79: A, 80: J, 81: C, 82: ht, 83: U, 84: Yt }), t(Tt, [2, 28]), t(Tt, [2, 29]), t(st, [2, 46]), t($t, [2, 78], { 85: 93, 45: 145, 86: gt, 87: Et, 89: wt, 90: pt }), t(jt, [2, 80]), { 88: [1, 146] }, t(jt, [2, 82]), t(jt, [2, 83]), t(st, [2, 47]), t(st, [2, 48]), t(st, [2, 49]), t(st, [2, 50]), t(st, [2, 51]), t(st, [2, 52]), t(st, [2, 53]), t(st, [2, 54]), t(st, [2, 55]), t(st, [2, 56]), t(st, [2, 57]), t(st, [2, 58]), t(st, [2, 59]), t(st, [2, 60]), t(st, [2, 61]), t(st, [2, 62]), t(st, [2, 63]), t(st, [2, 64]), t(st, [2, 65]), t(st, [2, 67]), t(st, [2, 68]), t(st, [2, 69]), t(st, [2, 70]), t(st, [2, 71]), t(st, [2, 72]), t(st, [2, 73]), t(st, [2, 74]), t(st, [2, 75]), t(st, [2, 76]), t(st, [2, 77]), { 41: 147, 52: [1, 148] }, { 15: [1, 149] }, { 43: [1, 150] }, t(Kt, [2, 35]), t(Kt, [2, 36]), t(Kt, [2, 37]), t(Kt, [2, 38]), t(Kt, [2, 39]), t(Kt, [2, 40]), t(Kt, [2, 41]), { 1: [2, 16] }, { 1: [2, 17] }, { 1: [2, 18] }, { 1: [2, 19] }, { 15: [1, 151] }, t(Mt, [2, 25]), t(et, [2, 45]), t($t, [2, 79]), t(jt, [2, 81]), t(st, [2, 31]), t(st, [2, 42]), t(Gt, [2, 32]), t(Gt, [2, 33], { 15: [1, 152] }), t(le, [2, 10]), t(Gt, [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(xt, ft) {
|
||
if (ft.recoverable)
|
||
this.trace(xt);
|
||
else {
|
||
var Lt = new Error(xt);
|
||
throw Lt.hash = ft, Lt;
|
||
}
|
||
},
|
||
parse: function(xt) {
|
||
var ft = this, Lt = [0], bt = [], Ut = [null], at = [], ne = this.table, dt = "", ee = 0, de = 0, me = 2, be = 1, ke = at.slice.call(arguments, 1), Xt = Object.create(this.lexer), ie = { yy: {} };
|
||
for (var ge in this.yy)
|
||
Object.prototype.hasOwnProperty.call(this.yy, ge) && (ie.yy[ge] = this.yy[ge]);
|
||
Xt.setInput(xt, ie.yy), ie.yy.lexer = Xt, ie.yy.parser = this, typeof Xt.yylloc > "u" && (Xt.yylloc = {});
|
||
var Qt = Xt.yylloc;
|
||
at.push(Qt);
|
||
var an = Xt.options && Xt.options.ranges;
|
||
typeof ie.yy.parseError == "function" ? this.parseError = ie.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
||
function Wr() {
|
||
var Z;
|
||
return Z = bt.pop() || Xt.lex() || be, typeof Z != "number" && (Z instanceof Array && (bt = Z, Z = bt.pop()), Z = ft.symbols_[Z] || Z), Z;
|
||
}
|
||
for (var De, ae, Be, Oe, Fe = {}, Pe, Ie, Ge, tr; ; ) {
|
||
if (ae = Lt[Lt.length - 1], this.defaultActions[ae] ? Be = this.defaultActions[ae] : ((De === null || typeof De > "u") && (De = Wr()), Be = ne[ae] && ne[ae][De]), typeof Be > "u" || !Be.length || !Be[0]) {
|
||
var zt = "";
|
||
tr = [];
|
||
for (Pe in ne[ae])
|
||
this.terminals_[Pe] && Pe > me && tr.push("'" + this.terminals_[Pe] + "'");
|
||
Xt.showPosition ? zt = "Parse error on line " + (ee + 1) + `:
|
||
` + Xt.showPosition() + `
|
||
Expecting ` + tr.join(", ") + ", got '" + (this.terminals_[De] || De) + "'" : zt = "Parse error on line " + (ee + 1) + ": Unexpected " + (De == be ? "end of input" : "'" + (this.terminals_[De] || De) + "'"), this.parseError(zt, {
|
||
text: Xt.match,
|
||
token: this.terminals_[De] || De,
|
||
line: Xt.yylineno,
|
||
loc: Qt,
|
||
expected: tr
|
||
});
|
||
}
|
||
if (Be[0] instanceof Array && Be.length > 1)
|
||
throw new Error("Parse Error: multiple actions possible at state: " + ae + ", token: " + De);
|
||
switch (Be[0]) {
|
||
case 1:
|
||
Lt.push(De), Ut.push(Xt.yytext), at.push(Xt.yylloc), Lt.push(Be[1]), De = null, de = Xt.yyleng, dt = Xt.yytext, ee = Xt.yylineno, Qt = Xt.yylloc;
|
||
break;
|
||
case 2:
|
||
if (Ie = this.productions_[Be[1]][1], Fe.$ = Ut[Ut.length - Ie], Fe._$ = {
|
||
first_line: at[at.length - (Ie || 1)].first_line,
|
||
last_line: at[at.length - 1].last_line,
|
||
first_column: at[at.length - (Ie || 1)].first_column,
|
||
last_column: at[at.length - 1].last_column
|
||
}, an && (Fe._$.range = [
|
||
at[at.length - (Ie || 1)].range[0],
|
||
at[at.length - 1].range[1]
|
||
]), Oe = this.performAction.apply(Fe, [
|
||
dt,
|
||
de,
|
||
ee,
|
||
ie.yy,
|
||
Be[1],
|
||
Ut,
|
||
at
|
||
].concat(ke)), typeof Oe < "u")
|
||
return Oe;
|
||
Ie && (Lt = Lt.slice(0, -1 * Ie * 2), Ut = Ut.slice(0, -1 * Ie), at = at.slice(0, -1 * Ie)), Lt.push(this.productions_[Be[1]][0]), Ut.push(Fe.$), at.push(Fe._$), Ge = ne[Lt[Lt.length - 2]][Lt[Lt.length - 1]], Lt.push(Ge);
|
||
break;
|
||
case 3:
|
||
return !0;
|
||
}
|
||
}
|
||
return !0;
|
||
}
|
||
}, Ht = function() {
|
||
var Ft = {
|
||
EOF: 1,
|
||
parseError: function(ft, Lt) {
|
||
if (this.yy.parser)
|
||
this.yy.parser.parseError(ft, Lt);
|
||
else
|
||
throw new Error(ft);
|
||
},
|
||
setInput: function(xt, ft) {
|
||
return this.yy = ft || 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 ft = xt.match(/(?:\r\n?|\n).*/g);
|
||
return ft ? (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 ft = xt.length, Lt = xt.split(/(?:\r\n?|\n)/g);
|
||
this._input = xt + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - ft), this.offset -= ft;
|
||
var bt = 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), Lt.length - 1 && (this.yylineno -= Lt.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: Lt ? (Lt.length === bt.length ? this.yylloc.first_column : 0) + bt[bt.length - Lt.length].length - Lt[0].length : this.yylloc.first_column - ft
|
||
}, this.options.ranges && (this.yylloc.range = [Ut[0], Ut[0] + this.yyleng - ft]), 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(), ft = new Array(xt.length + 1).join("-");
|
||
return xt + this.upcomingInput() + `
|
||
` + ft + "^";
|
||
},
|
||
test_match: function(xt, ft) {
|
||
var Lt, bt, 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))), bt = xt[0].match(/(?:\r\n?|\n).*/g), bt && (this.yylineno += bt.length), this.yylloc = {
|
||
first_line: this.yylloc.last_line,
|
||
last_line: this.yylineno + 1,
|
||
first_column: this.yylloc.last_column,
|
||
last_column: bt ? bt[bt.length - 1].length - bt[bt.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], Lt = this.performAction.call(this, this.yy, this, ft, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), Lt)
|
||
return Lt;
|
||
if (this._backtrack) {
|
||
for (var at in Ut)
|
||
this[at] = Ut[at];
|
||
return !1;
|
||
}
|
||
return !1;
|
||
},
|
||
next: function() {
|
||
if (this.done)
|
||
return this.EOF;
|
||
this._input || (this.done = !0);
|
||
var xt, ft, Lt, bt;
|
||
this._more || (this.yytext = "", this.match = "");
|
||
for (var Ut = this._currentRules(), at = 0; at < Ut.length; at++)
|
||
if (Lt = this._input.match(this.rules[Ut[at]]), Lt && (!ft || Lt[0].length > ft[0].length)) {
|
||
if (ft = Lt, bt = at, this.options.backtrack_lexer) {
|
||
if (xt = this.test_match(Lt, Ut[at]), xt !== !1)
|
||
return xt;
|
||
if (this._backtrack) {
|
||
ft = !1;
|
||
continue;
|
||
} else
|
||
return !1;
|
||
} else if (!this.options.flex)
|
||
break;
|
||
}
|
||
return ft ? (xt = this.test_match(ft, Ut[bt]), 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 ft = this.next();
|
||
return ft || this.lex();
|
||
},
|
||
begin: function(ft) {
|
||
this.conditionStack.push(ft);
|
||
},
|
||
popState: function() {
|
||
var ft = this.conditionStack.length - 1;
|
||
return ft > 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(ft) {
|
||
return ft = this.conditionStack.length - 1 - Math.abs(ft || 0), ft >= 0 ? this.conditionStack[ft] : "INITIAL";
|
||
},
|
||
pushState: function(ft) {
|
||
this.begin(ft);
|
||
},
|
||
stateStackSize: function() {
|
||
return this.conditionStack.length;
|
||
},
|
||
options: {},
|
||
performAction: function(ft, Lt, bt, Ut) {
|
||
switch (bt) {
|
||
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 Ft;
|
||
}();
|
||
Ee.lexer = Ht;
|
||
function Vt() {
|
||
this.yy = {};
|
||
}
|
||
return Vt.prototype = Ee, Ee.Parser = Vt, new Vt();
|
||
}();
|
||
Yc.parser = Yc;
|
||
const KC = Yc, ZC = (t) => t.match(/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/) !== null;
|
||
let Tn = [], Gi = [""], Br = "global", _n = "", qn = [
|
||
{
|
||
alias: "global",
|
||
label: { text: "global" },
|
||
type: { text: "global" },
|
||
tags: null,
|
||
link: null,
|
||
parentBoundary: ""
|
||
}
|
||
], Mo = [], z0 = "", W0 = !1, Vc = 4, Uc = 2;
|
||
var sm;
|
||
const QC = function() {
|
||
return sm;
|
||
}, JC = function(t) {
|
||
sm = wn(t, X());
|
||
}, t9 = function(t, e, r) {
|
||
ze.parseDirective(this, t, e, r);
|
||
}, e9 = function(t, e, r, n, i, s, a, o, l) {
|
||
if (t == null || e === void 0 || e === null || r === void 0 || r === null || n === void 0 || n === null)
|
||
return;
|
||
let u = {};
|
||
const d = Mo.find((f) => f.from === e && f.to === r);
|
||
if (d ? u = d : Mo.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 [f, p] = Object.entries(i)[0];
|
||
u[f] = { text: p };
|
||
} else
|
||
u.techn = { text: i };
|
||
if (s == null)
|
||
u.descr = { text: "" };
|
||
else if (typeof s == "object") {
|
||
let [f, p] = Object.entries(s)[0];
|
||
u[f] = { text: p };
|
||
} else
|
||
u.descr = { text: s };
|
||
if (typeof a == "object") {
|
||
let [f, p] = Object.entries(a)[0];
|
||
u[f] = p;
|
||
} else
|
||
u.sprite = a;
|
||
if (typeof o == "object") {
|
||
let [f, p] = Object.entries(o)[0];
|
||
u[f] = p;
|
||
} else
|
||
u.tags = o;
|
||
if (typeof l == "object") {
|
||
let [f, p] = Object.entries(l)[0];
|
||
u[f] = p;
|
||
} else
|
||
u.link = l;
|
||
u.wrap = $i();
|
||
}, r9 = function(t, e, r, n, i, s, a) {
|
||
if (e === null || r === null)
|
||
return;
|
||
let o = {};
|
||
const l = Tn.find((u) => u.alias === e);
|
||
if (l && e === l.alias ? o = l : (o.alias = e, Tn.push(o)), r == null ? o.label = { text: "" } : o.label = { text: r }, n == null)
|
||
o.descr = { text: "" };
|
||
else if (typeof n == "object") {
|
||
let [u, d] = Object.entries(n)[0];
|
||
o[u] = { text: d };
|
||
} else
|
||
o.descr = { text: n };
|
||
if (typeof i == "object") {
|
||
let [u, d] = Object.entries(i)[0];
|
||
o[u] = d;
|
||
} else
|
||
o.sprite = i;
|
||
if (typeof s == "object") {
|
||
let [u, d] = Object.entries(s)[0];
|
||
o[u] = d;
|
||
} else
|
||
o.tags = s;
|
||
if (typeof a == "object") {
|
||
let [u, d] = Object.entries(a)[0];
|
||
o[u] = d;
|
||
} else
|
||
o.link = a;
|
||
o.typeC4Shape = { text: t }, o.parentBoundary = Br, o.wrap = $i();
|
||
}, n9 = function(t, e, r, n, i, s, a, o) {
|
||
if (e === null || r === null)
|
||
return;
|
||
let l = {};
|
||
const u = Tn.find((d) => d.alias === e);
|
||
if (u && e === u.alias ? l = u : (l.alias = e, Tn.push(l)), r == null ? l.label = { text: "" } : l.label = { text: r }, n == null)
|
||
l.techn = { text: "" };
|
||
else if (typeof n == "object") {
|
||
let [d, f] = Object.entries(n)[0];
|
||
l[d] = { text: f };
|
||
} else
|
||
l.techn = { text: n };
|
||
if (i == null)
|
||
l.descr = { text: "" };
|
||
else if (typeof i == "object") {
|
||
let [d, f] = Object.entries(i)[0];
|
||
l[d] = { text: f };
|
||
} else
|
||
l.descr = { text: i };
|
||
if (typeof s == "object") {
|
||
let [d, f] = Object.entries(s)[0];
|
||
l[d] = f;
|
||
} else
|
||
l.sprite = s;
|
||
if (typeof a == "object") {
|
||
let [d, f] = Object.entries(a)[0];
|
||
l[d] = f;
|
||
} else
|
||
l.tags = a;
|
||
if (typeof o == "object") {
|
||
let [d, f] = Object.entries(o)[0];
|
||
l[d] = f;
|
||
} else
|
||
l.link = o;
|
||
l.wrap = $i(), l.typeC4Shape = { text: t }, l.parentBoundary = Br;
|
||
}, i9 = function(t, e, r, n, i, s, a, o) {
|
||
if (e === null || r === null)
|
||
return;
|
||
let l = {};
|
||
const u = Tn.find((d) => d.alias === e);
|
||
if (u && e === u.alias ? l = u : (l.alias = e, Tn.push(l)), r == null ? l.label = { text: "" } : l.label = { text: r }, n == null)
|
||
l.techn = { text: "" };
|
||
else if (typeof n == "object") {
|
||
let [d, f] = Object.entries(n)[0];
|
||
l[d] = { text: f };
|
||
} else
|
||
l.techn = { text: n };
|
||
if (i == null)
|
||
l.descr = { text: "" };
|
||
else if (typeof i == "object") {
|
||
let [d, f] = Object.entries(i)[0];
|
||
l[d] = { text: f };
|
||
} else
|
||
l.descr = { text: i };
|
||
if (typeof s == "object") {
|
||
let [d, f] = Object.entries(s)[0];
|
||
l[d] = f;
|
||
} else
|
||
l.sprite = s;
|
||
if (typeof a == "object") {
|
||
let [d, f] = Object.entries(a)[0];
|
||
l[d] = f;
|
||
} else
|
||
l.tags = a;
|
||
if (typeof o == "object") {
|
||
let [d, f] = Object.entries(o)[0];
|
||
l[d] = f;
|
||
} else
|
||
l.link = o;
|
||
l.wrap = $i(), l.typeC4Shape = { text: t }, l.parentBoundary = Br;
|
||
}, s9 = function(t, e, r, n, i) {
|
||
if (t === null || e === null)
|
||
return;
|
||
let s = {};
|
||
const a = qn.find((o) => o.alias === t);
|
||
if (a && t === a.alias ? s = a : (s.alias = t, qn.push(s)), e == null ? s.label = { text: "" } : s.label = { text: e }, r == null)
|
||
s.type = { text: "system" };
|
||
else if (typeof r == "object") {
|
||
let [o, l] = Object.entries(r)[0];
|
||
s[o] = { text: l };
|
||
} else
|
||
s.type = { text: r };
|
||
if (typeof n == "object") {
|
||
let [o, l] = Object.entries(n)[0];
|
||
s[o] = l;
|
||
} else
|
||
s.tags = n;
|
||
if (typeof i == "object") {
|
||
let [o, l] = Object.entries(i)[0];
|
||
s[o] = l;
|
||
} else
|
||
s.link = i;
|
||
s.parentBoundary = Br, s.wrap = $i(), _n = Br, Br = t, Gi.push(_n);
|
||
}, a9 = function(t, e, r, n, i) {
|
||
if (t === null || e === null)
|
||
return;
|
||
let s = {};
|
||
const a = qn.find((o) => o.alias === t);
|
||
if (a && t === a.alias ? s = a : (s.alias = t, qn.push(s)), e == null ? s.label = { text: "" } : s.label = { text: e }, r == null)
|
||
s.type = { text: "container" };
|
||
else if (typeof r == "object") {
|
||
let [o, l] = Object.entries(r)[0];
|
||
s[o] = { text: l };
|
||
} else
|
||
s.type = { text: r };
|
||
if (typeof n == "object") {
|
||
let [o, l] = Object.entries(n)[0];
|
||
s[o] = l;
|
||
} else
|
||
s.tags = n;
|
||
if (typeof i == "object") {
|
||
let [o, l] = Object.entries(i)[0];
|
||
s[o] = l;
|
||
} else
|
||
s.link = i;
|
||
s.parentBoundary = Br, s.wrap = $i(), _n = Br, Br = t, Gi.push(_n);
|
||
}, o9 = function(t, e, r, n, i, s, a, o) {
|
||
if (e === null || r === null)
|
||
return;
|
||
let l = {};
|
||
const u = qn.find((d) => d.alias === e);
|
||
if (u && e === u.alias ? l = u : (l.alias = e, qn.push(l)), r == null ? l.label = { text: "" } : l.label = { text: r }, n == null)
|
||
l.type = { text: "node" };
|
||
else if (typeof n == "object") {
|
||
let [d, f] = Object.entries(n)[0];
|
||
l[d] = { text: f };
|
||
} else
|
||
l.type = { text: n };
|
||
if (i == null)
|
||
l.descr = { text: "" };
|
||
else if (typeof i == "object") {
|
||
let [d, f] = Object.entries(i)[0];
|
||
l[d] = { text: f };
|
||
} else
|
||
l.descr = { text: i };
|
||
if (typeof a == "object") {
|
||
let [d, f] = Object.entries(a)[0];
|
||
l[d] = f;
|
||
} else
|
||
l.tags = a;
|
||
if (typeof o == "object") {
|
||
let [d, f] = Object.entries(o)[0];
|
||
l[d] = f;
|
||
} else
|
||
l.link = o;
|
||
l.nodeType = t, l.parentBoundary = Br, l.wrap = $i(), _n = Br, Br = e, Gi.push(_n);
|
||
}, l9 = function() {
|
||
Br = _n, Gi.pop(), _n = Gi.pop(), Gi.push(_n);
|
||
}, c9 = function(t, e, r, n, i, s, a, o, l, u, d) {
|
||
let f = Tn.find((p) => p.alias === e);
|
||
if (!(f === void 0 && (f = qn.find((p) => p.alias === e), f === void 0))) {
|
||
if (r != null)
|
||
if (typeof r == "object") {
|
||
let [p, g] = Object.entries(r)[0];
|
||
f[p] = g;
|
||
} else
|
||
f.bgColor = r;
|
||
if (n != null)
|
||
if (typeof n == "object") {
|
||
let [p, g] = Object.entries(n)[0];
|
||
f[p] = g;
|
||
} else
|
||
f.fontColor = n;
|
||
if (i != null)
|
||
if (typeof i == "object") {
|
||
let [p, g] = Object.entries(i)[0];
|
||
f[p] = g;
|
||
} else
|
||
f.borderColor = i;
|
||
if (s != null)
|
||
if (typeof s == "object") {
|
||
let [p, g] = Object.entries(s)[0];
|
||
f[p] = g;
|
||
} else
|
||
f.shadowing = s;
|
||
if (a != null)
|
||
if (typeof a == "object") {
|
||
let [p, g] = Object.entries(a)[0];
|
||
f[p] = g;
|
||
} else
|
||
f.shape = a;
|
||
if (o != null)
|
||
if (typeof o == "object") {
|
||
let [p, g] = Object.entries(o)[0];
|
||
f[p] = g;
|
||
} else
|
||
f.sprite = o;
|
||
if (l != null)
|
||
if (typeof l == "object") {
|
||
let [p, g] = Object.entries(l)[0];
|
||
f[p] = g;
|
||
} else
|
||
f.techn = l;
|
||
if (u != null)
|
||
if (typeof u == "object") {
|
||
let [p, g] = Object.entries(u)[0];
|
||
f[p] = g;
|
||
} else
|
||
f.legendText = u;
|
||
if (d != null)
|
||
if (typeof d == "object") {
|
||
let [p, g] = Object.entries(d)[0];
|
||
f[p] = g;
|
||
} else
|
||
f.legendSprite = d;
|
||
}
|
||
}, u9 = function(t, e, r, n, i, s, a) {
|
||
const o = Mo.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 (s != null)
|
||
if (typeof s == "object") {
|
||
let [l, u] = Object.entries(s)[0];
|
||
o[l] = parseInt(u);
|
||
} else
|
||
o.offsetX = parseInt(s);
|
||
if (a != null)
|
||
if (typeof a == "object") {
|
||
let [l, u] = Object.entries(a)[0];
|
||
o[l] = parseInt(u);
|
||
} else
|
||
o.offsetY = parseInt(a);
|
||
}
|
||
}, h9 = function(t, e, r) {
|
||
let n = Vc, i = Uc;
|
||
if (typeof e == "object") {
|
||
const s = Object.values(e)[0];
|
||
n = parseInt(s);
|
||
} else
|
||
n = parseInt(e);
|
||
if (typeof r == "object") {
|
||
const s = Object.values(r)[0];
|
||
i = parseInt(s);
|
||
} else
|
||
i = parseInt(r);
|
||
n >= 1 && (Vc = n), i >= 1 && (Uc = i);
|
||
}, d9 = function() {
|
||
return Vc;
|
||
}, f9 = function() {
|
||
return Uc;
|
||
}, p9 = function() {
|
||
return Br;
|
||
}, g9 = function() {
|
||
return _n;
|
||
}, am = function(t) {
|
||
return t == null ? Tn : Tn.filter((e) => e.parentBoundary === t);
|
||
}, y9 = function(t) {
|
||
return Tn.find((e) => e.alias === t);
|
||
}, m9 = function(t) {
|
||
return Object.keys(am(t));
|
||
}, b9 = function(t) {
|
||
return t == null ? qn : qn.filter((e) => e.parentBoundary === t);
|
||
}, _9 = function() {
|
||
return Mo;
|
||
}, x9 = function() {
|
||
return z0;
|
||
}, v9 = function(t) {
|
||
W0 = t;
|
||
}, $i = function() {
|
||
return W0;
|
||
}, k9 = function() {
|
||
Tn = [], qn = [
|
||
{
|
||
alias: "global",
|
||
label: { text: "global" },
|
||
type: { text: "global" },
|
||
tags: null,
|
||
link: null,
|
||
parentBoundary: ""
|
||
}
|
||
], _n = "", Br = "global", Gi = [""], Mo = [], Gi = [""], z0 = "", W0 = !1, Vc = 4, Uc = 2;
|
||
}, w9 = {
|
||
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
|
||
}, T9 = {
|
||
FILLED: 0,
|
||
OPEN: 1
|
||
}, E9 = {
|
||
LEFTOF: 0,
|
||
RIGHTOF: 1,
|
||
OVER: 2
|
||
}, C9 = function(t) {
|
||
z0 = wn(t, X());
|
||
}, om = {
|
||
addPersonOrSystem: r9,
|
||
addPersonOrSystemBoundary: s9,
|
||
addContainer: n9,
|
||
addContainerBoundary: a9,
|
||
addComponent: i9,
|
||
addDeploymentNode: o9,
|
||
popBoundaryParseStack: l9,
|
||
addRel: e9,
|
||
updateElStyle: c9,
|
||
updateRelStyle: u9,
|
||
updateLayoutConfig: h9,
|
||
autoWrap: $i,
|
||
setWrap: v9,
|
||
getC4ShapeArray: am,
|
||
getC4Shape: y9,
|
||
getC4ShapeKeys: m9,
|
||
getBoundarys: b9,
|
||
getCurrentBoundaryParse: p9,
|
||
getParentBoundaryParse: g9,
|
||
getRels: _9,
|
||
getTitle: x9,
|
||
getC4Type: QC,
|
||
getC4ShapeInRow: d9,
|
||
getC4BoundaryInRow: f9,
|
||
setAccTitle: sn,
|
||
getAccTitle: Mn,
|
||
getAccDescription: Bn,
|
||
setAccDescription: Nn,
|
||
parseDirective: t9,
|
||
getConfig: () => X().c4,
|
||
clear: k9,
|
||
LINETYPE: w9,
|
||
ARROWTYPE: T9,
|
||
PLACEMENT: E9,
|
||
setTitle: C9,
|
||
setC4Type: JC
|
||
}, H0 = 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;
|
||
}, lm = function(t, e, r, n, i, s) {
|
||
const a = t.append("image");
|
||
a.attr("width", e), a.attr("height", r), a.attr("x", n), a.attr("y", i);
|
||
let o = s.startsWith("data:image/png;base64") ? s : Ti(s);
|
||
a.attr("xlink:href", o);
|
||
}, S9 = (t, e, r) => {
|
||
const n = t.append("g");
|
||
let i = 0;
|
||
for (let s of e) {
|
||
let a = s.textColor ? s.textColor : "#444444", o = s.lineColor ? s.lineColor : "#444444", l = s.offsetX ? parseInt(s.offsetX) : 0, u = s.offsetY ? parseInt(s.offsetY) : 0, d = "";
|
||
if (i === 0) {
|
||
let p = n.append("line");
|
||
p.attr("x1", s.startPoint.x), p.attr("y1", s.startPoint.y), p.attr("x2", s.endPoint.x), p.attr("y2", s.endPoint.y), p.attr("stroke-width", "1"), p.attr("stroke", o), p.style("fill", "none"), s.type !== "rel_b" && p.attr("marker-end", "url(" + d + "#arrowhead)"), (s.type === "birel" || s.type === "rel_b") && p.attr("marker-start", "url(" + d + "#arrowend)"), i = -1;
|
||
} else {
|
||
let p = n.append("path");
|
||
p.attr("fill", "none").attr("stroke-width", "1").attr("stroke", o).attr(
|
||
"d",
|
||
"Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx", s.startPoint.x).replaceAll("starty", s.startPoint.y).replaceAll(
|
||
"controlx",
|
||
s.startPoint.x + (s.endPoint.x - s.startPoint.x) / 2 - (s.endPoint.x - s.startPoint.x) / 4
|
||
).replaceAll("controly", s.startPoint.y + (s.endPoint.y - s.startPoint.y) / 2).replaceAll("stopx", s.endPoint.x).replaceAll("stopy", s.endPoint.y)
|
||
), s.type !== "rel_b" && p.attr("marker-end", "url(" + d + "#arrowhead)"), (s.type === "birel" || s.type === "rel_b") && p.attr("marker-start", "url(" + d + "#arrowend)");
|
||
}
|
||
let f = r.messageFont();
|
||
gi(r)(
|
||
s.label.text,
|
||
n,
|
||
Math.min(s.startPoint.x, s.endPoint.x) + Math.abs(s.endPoint.x - s.startPoint.x) / 2 + l,
|
||
Math.min(s.startPoint.y, s.endPoint.y) + Math.abs(s.endPoint.y - s.startPoint.y) / 2 + u,
|
||
s.label.width,
|
||
s.label.height,
|
||
{ fill: a },
|
||
f
|
||
), s.techn && s.techn.text !== "" && (f = r.messageFont(), gi(r)(
|
||
"[" + s.techn.text + "]",
|
||
n,
|
||
Math.min(s.startPoint.x, s.endPoint.x) + Math.abs(s.endPoint.x - s.startPoint.x) / 2 + l,
|
||
Math.min(s.startPoint.y, s.endPoint.y) + Math.abs(s.endPoint.y - s.startPoint.y) / 2 + r.messageFontSize + 5 + u,
|
||
Math.max(s.label.width, s.techn.width),
|
||
s.techn.height,
|
||
{ fill: a, "font-style": "italic" },
|
||
f
|
||
));
|
||
}
|
||
}, A9 = function(t, e, r) {
|
||
const n = t.append("g");
|
||
let i = e.bgColor ? e.bgColor : "none", s = e.borderColor ? e.borderColor : "#444444", a = 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: s,
|
||
width: e.width,
|
||
height: e.height,
|
||
rx: 2.5,
|
||
ry: 2.5,
|
||
attrs: o
|
||
};
|
||
H0(n, l);
|
||
let u = r.boundaryFont();
|
||
u.fontWeight = "bold", u.fontSize = u.fontSize + 2, u.fontColor = a, gi(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 = a, gi(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 = a, gi(r)(
|
||
e.descr.text,
|
||
n,
|
||
e.x,
|
||
e.y + e.descr.Y,
|
||
e.width,
|
||
e.height,
|
||
{ fill: "#444444" },
|
||
u
|
||
));
|
||
}, L9 = 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"], s = e.fontColor ? e.fontColor : "#FFFFFF", a = "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":
|
||
a = "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":
|
||
a = "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 = cm();
|
||
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, H0(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 = P9(r, e.typeC4Shape.text);
|
||
switch (o.append("text").attr("fill", s).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":
|
||
lm(
|
||
o,
|
||
48,
|
||
48,
|
||
e.x + e.width / 2 - 24,
|
||
e.y + e.image.Y,
|
||
a
|
||
);
|
||
break;
|
||
}
|
||
let d = r[e.typeC4Shape.text + "Font"]();
|
||
return d.fontWeight = "bold", d.fontSize = d.fontSize + 2, d.fontColor = s, gi(r)(
|
||
e.label.text,
|
||
o,
|
||
e.x,
|
||
e.y + e.label.Y,
|
||
e.width,
|
||
e.height,
|
||
{ fill: s },
|
||
d
|
||
), d = r[e.typeC4Shape.text + "Font"](), d.fontColor = s, e.thchn && e.thchn.text !== "" ? gi(r)(
|
||
e.thchn.text,
|
||
o,
|
||
e.x,
|
||
e.y + e.thchn.Y,
|
||
e.width,
|
||
e.height,
|
||
{ fill: s, "font-style": "italic" },
|
||
d
|
||
) : e.type && e.type.text !== "" && gi(r)(
|
||
e.type.text,
|
||
o,
|
||
e.x,
|
||
e.y + e.type.Y,
|
||
e.width,
|
||
e.height,
|
||
{ fill: s, "font-style": "italic" },
|
||
d
|
||
), e.descr && e.descr.text !== "" && (d = r.personFont(), d.fontColor = s, gi(r)(
|
||
e.descr.text,
|
||
o,
|
||
e.x,
|
||
e.y + e.descr.Y,
|
||
e.width,
|
||
e.height,
|
||
{ fill: s },
|
||
d
|
||
)), e.height;
|
||
}, D9 = 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"
|
||
);
|
||
}, M9 = 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"
|
||
);
|
||
}, N9 = 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"
|
||
);
|
||
}, B9 = 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");
|
||
}, I9 = 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");
|
||
}, O9 = 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");
|
||
}, R9 = 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);
|
||
}, F9 = 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");
|
||
}, cm = function() {
|
||
return {
|
||
x: 0,
|
||
y: 0,
|
||
fill: "#EDF2AE",
|
||
stroke: "#666",
|
||
width: 100,
|
||
anchor: "start",
|
||
height: 100,
|
||
rx: 0,
|
||
ry: 0
|
||
};
|
||
}, P9 = (t, e) => ({
|
||
fontFamily: t[e + "FontFamily"],
|
||
fontSize: t[e + "FontSize"],
|
||
fontWeight: t[e + "FontWeight"]
|
||
}), gi = function() {
|
||
function t(i, s, a, o, l, u, d) {
|
||
const f = s.append("text").attr("x", a + l / 2).attr("y", o + u / 2 + 5).style("text-anchor", "middle").text(i);
|
||
n(f, d);
|
||
}
|
||
function e(i, s, a, o, l, u, d, f) {
|
||
const { fontSize: p, fontFamily: g, fontWeight: b } = f, k = i.split(he.lineBreakRegex);
|
||
for (let T = 0; T < k.length; T++) {
|
||
const L = T * p - p * (k.length - 1) / 2, E = s.append("text").attr("x", a + l / 2).attr("y", o).style("text-anchor", "middle").attr("dominant-baseline", "middle").style("font-size", p).style("font-weight", b).style("font-family", g);
|
||
E.append("tspan").attr("dy", L).text(k[T]).attr("alignment-baseline", "mathematical"), n(E, d);
|
||
}
|
||
}
|
||
function r(i, s, a, o, l, u, d, f) {
|
||
const p = s.append("switch"), b = p.append("foreignObject").attr("x", a).attr("y", o).attr("width", l).attr("height", u).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
|
||
b.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(i), e(i, p, a, o, l, u, d, f), n(b, d);
|
||
}
|
||
function n(i, s) {
|
||
for (const a in s)
|
||
s.hasOwnProperty(a) && i.attr(a, s[a]);
|
||
}
|
||
return function(i) {
|
||
return i.textPlacement === "fo" ? r : i.textPlacement === "old" ? t : e;
|
||
};
|
||
}(), Yn = {
|
||
drawRect: H0,
|
||
drawBoundary: A9,
|
||
drawC4Shape: L9,
|
||
drawRels: S9,
|
||
drawImage: lm,
|
||
insertArrowHead: B9,
|
||
insertArrowEnd: I9,
|
||
insertArrowFilledHead: O9,
|
||
insertDynamicNumber: R9,
|
||
insertArrowCrossHead: F9,
|
||
insertDatabaseIcon: D9,
|
||
insertComputerIcon: M9,
|
||
insertClockIcon: N9,
|
||
getNoteRect: cm,
|
||
sanitizeUrl: Ti
|
||
};
|
||
let zc = 0, Wc = 0, um = 4, v1 = 2;
|
||
Yc.yy = om;
|
||
let Zt = {};
|
||
class hm {
|
||
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, k1(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) {
|
||
e[r] === void 0 ? 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, s = i + e.height;
|
||
(r >= this.data.widthLimit || n >= this.data.widthLimit || this.nextData.cnt > um) && (r = this.nextData.startx + e.margin + Zt.nextLinePaddingX, i = this.nextData.stopy + e.margin * 2, this.nextData.stopx = n = r + e.width, this.nextData.starty = this.nextData.stopy, this.nextData.stopy = s = 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", s, 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", s, 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
|
||
}, k1(e.db.getConfig());
|
||
}
|
||
bumpLastMargin(e) {
|
||
this.data.stopx += e, this.data.stopy += e;
|
||
}
|
||
}
|
||
const k1 = function(t) {
|
||
pr(Zt, t), t.fontFamily && (Zt.personFontFamily = Zt.systemFontFamily = Zt.messageFontFamily = t.fontFamily), t.fontSize && (Zt.personFontSize = Zt.systemFontSize = Zt.messageFontSize = t.fontSize), t.fontWeight && (Zt.personFontWeight = Zt.systemFontWeight = Zt.messageFontWeight = t.fontWeight);
|
||
}, Xa = (t, e) => ({
|
||
fontFamily: t[e + "FontFamily"],
|
||
fontSize: t[e + "FontSize"],
|
||
fontWeight: t[e + "FontWeight"]
|
||
}), $l = (t) => ({
|
||
fontFamily: t.boundaryFontFamily,
|
||
fontSize: t.boundaryFontSize,
|
||
fontWeight: t.boundaryFontWeight
|
||
}), Y9 = (t) => ({
|
||
fontFamily: t.messageFontFamily,
|
||
fontSize: t.messageFontSize,
|
||
fontWeight: t.messageFontWeight
|
||
});
|
||
function gn(t, e, r, n, i) {
|
||
if (!e[t].width)
|
||
if (r)
|
||
e[t].text = Dy(e[t].text, i, n), e[t].textLines = e[t].text.split(he.lineBreakRegex).length, e[t].width = i, e[t].height = p1(e[t].text, n);
|
||
else {
|
||
let s = e[t].text.split(he.lineBreakRegex);
|
||
e[t].textLines = s.length;
|
||
let a = 0;
|
||
e[t].height = 0, e[t].width = 0;
|
||
for (const o of s)
|
||
e[t].width = Math.max(
|
||
Gn(o, n),
|
||
e[t].width
|
||
), a = p1(o, n), e[t].height = e[t].height + a;
|
||
}
|
||
}
|
||
const dm = 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 = Zt.c4ShapeMargin - 35;
|
||
let n = e.wrap && Zt.wrap, i = $l(Zt);
|
||
i.fontSize = i.fontSize + 2, i.fontWeight = "bold";
|
||
let s = Gn(e.label.text, i);
|
||
gn("label", e, n, i, s), Yn.drawBoundary(t, e, Zt);
|
||
}, fm = function(t, e, r, n) {
|
||
let i = 0;
|
||
for (const s of n) {
|
||
i = 0;
|
||
const a = r[s];
|
||
let o = Xa(Zt, a.typeC4Shape.text);
|
||
switch (o.fontSize = o.fontSize - 2, a.typeC4Shape.width = Gn(
|
||
"<<" + a.typeC4Shape.text + ">>",
|
||
o
|
||
), a.typeC4Shape.height = o.fontSize + 2, a.typeC4Shape.Y = Zt.c4ShapePadding, i = a.typeC4Shape.Y + a.typeC4Shape.height - 4, a.image = { width: 0, height: 0, Y: 0 }, a.typeC4Shape.text) {
|
||
case "person":
|
||
case "external_person":
|
||
a.image.width = 48, a.image.height = 48, a.image.Y = i, i = a.image.Y + a.image.height;
|
||
break;
|
||
}
|
||
a.sprite && (a.image.width = 48, a.image.height = 48, a.image.Y = i, i = a.image.Y + a.image.height);
|
||
let l = a.wrap && Zt.wrap, u = Zt.width - Zt.c4ShapePadding * 2, d = Xa(Zt, a.typeC4Shape.text);
|
||
if (d.fontSize = d.fontSize + 2, d.fontWeight = "bold", gn("label", a, l, d, u), a.label.Y = i + 8, i = a.label.Y + a.label.height, a.type && a.type.text !== "") {
|
||
a.type.text = "[" + a.type.text + "]";
|
||
let g = Xa(Zt, a.typeC4Shape.text);
|
||
gn("type", a, l, g, u), a.type.Y = i + 5, i = a.type.Y + a.type.height;
|
||
} else if (a.techn && a.techn.text !== "") {
|
||
a.techn.text = "[" + a.techn.text + "]";
|
||
let g = Xa(Zt, a.techn.text);
|
||
gn("techn", a, l, g, u), a.techn.Y = i + 5, i = a.techn.Y + a.techn.height;
|
||
}
|
||
let f = i, p = a.label.width;
|
||
if (a.descr && a.descr.text !== "") {
|
||
let g = Xa(Zt, a.typeC4Shape.text);
|
||
gn("descr", a, l, g, u), a.descr.Y = i + 20, i = a.descr.Y + a.descr.height, p = Math.max(a.label.width, a.descr.width), f = i - a.descr.textLines * 5;
|
||
}
|
||
p = p + Zt.c4ShapePadding, a.width = Math.max(a.width || Zt.width, p, Zt.width), a.height = Math.max(a.height || Zt.height, f, Zt.height), a.margin = a.margin || Zt.c4ShapeMargin, t.insert(a), Yn.drawC4Shape(e, a, Zt);
|
||
}
|
||
t.bumpLastMargin(Zt.c4ShapeMargin);
|
||
};
|
||
class Qr {
|
||
constructor(e, r) {
|
||
this.x = e, this.y = r;
|
||
}
|
||
}
|
||
let g2 = function(t, e) {
|
||
let r = t.x, n = t.y, i = e.x, s = e.y, a = r + t.width / 2, o = n + t.height / 2, l = Math.abs(r - i), u = Math.abs(n - s), d = u / l, f = t.height / t.width, p = null;
|
||
return n == s && r < i ? p = new Qr(r + t.width, o) : n == s && r > i ? p = new Qr(r, o) : r == i && n < s ? p = new Qr(a, n + t.height) : r == i && n > s && (p = new Qr(a, n)), r > i && n < s ? f >= d ? p = new Qr(r, o + d * t.width / 2) : p = new Qr(
|
||
a - l / u * t.height / 2,
|
||
n + t.height
|
||
) : r < i && n < s ? f >= d ? p = new Qr(r + t.width, o + d * t.width / 2) : p = new Qr(
|
||
a + l / u * t.height / 2,
|
||
n + t.height
|
||
) : r < i && n > s ? f >= d ? p = new Qr(r + t.width, o - d * t.width / 2) : p = new Qr(a + t.height / 2 * l / u, n) : r > i && n > s && (f >= d ? p = new Qr(r, o - t.width / 2 * d) : p = new Qr(a - t.height / 2 * l / u, n)), p;
|
||
}, V9 = 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 = g2(t, r);
|
||
r.x = t.x + t.width / 2, r.y = t.y + t.height / 2;
|
||
let i = g2(e, r);
|
||
return { startPoint: n, endPoint: i };
|
||
};
|
||
const U9 = function(t, e, r, n) {
|
||
let i = 0;
|
||
for (let s of e) {
|
||
i = i + 1;
|
||
let a = s.wrap && Zt.wrap, o = Y9(Zt);
|
||
n.db.getC4Type() === "C4Dynamic" && (s.label.text = i + ": " + s.label.text);
|
||
let u = Gn(s.label.text, o);
|
||
gn("label", s, a, o, u), s.techn && s.techn.text !== "" && (u = Gn(s.techn.text, o), gn("techn", s, a, o, u)), s.descr && s.descr.text !== "" && (u = Gn(s.descr.text, o), gn("descr", s, a, o, u));
|
||
let d = r(s.from), f = r(s.to), p = V9(d, f);
|
||
s.startPoint = p.startPoint, s.endPoint = p.endPoint;
|
||
}
|
||
Yn.drawRels(t, e, Zt);
|
||
};
|
||
function pm(t, e, r, n, i) {
|
||
let s = new hm(i);
|
||
s.data.widthLimit = r.data.widthLimit / Math.min(v1, n.length);
|
||
for (let [a, o] of n.entries()) {
|
||
let 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 && Zt.wrap, d = $l(Zt);
|
||
if (d.fontSize = d.fontSize + 2, d.fontWeight = "bold", gn(
|
||
"label",
|
||
o,
|
||
u,
|
||
d,
|
||
s.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 b = $l(Zt);
|
||
gn(
|
||
"type",
|
||
o,
|
||
u,
|
||
b,
|
||
s.data.widthLimit
|
||
), o.type.Y = l + 5, l = o.type.Y + o.type.height;
|
||
}
|
||
if (o.descr && o.descr.text !== "") {
|
||
let b = $l(Zt);
|
||
b.fontSize = b.fontSize - 2, gn(
|
||
"descr",
|
||
o,
|
||
u,
|
||
b,
|
||
s.data.widthLimit
|
||
), o.descr.Y = l + 20, l = o.descr.Y + o.descr.height;
|
||
}
|
||
if (a == 0 || a % v1 === 0) {
|
||
let b = r.data.startx + Zt.diagramMarginX, k = r.data.stopy + Zt.diagramMarginY + l;
|
||
s.setData(b, b, k, k);
|
||
} else {
|
||
let b = s.data.stopx !== s.data.startx ? s.data.stopx + Zt.diagramMarginX : s.data.startx, k = s.data.starty;
|
||
s.setData(b, b, k, k);
|
||
}
|
||
s.name = o.alias;
|
||
let f = i.db.getC4ShapeArray(o.alias), p = i.db.getC4ShapeKeys(o.alias);
|
||
p.length > 0 && fm(
|
||
s,
|
||
t,
|
||
f,
|
||
p
|
||
), e = o.alias;
|
||
let g = i.db.getBoundarys(e);
|
||
g.length > 0 && pm(
|
||
t,
|
||
e,
|
||
s,
|
||
g,
|
||
i
|
||
), o.alias !== "global" && dm(t, o, s), r.data.stopy = Math.max(
|
||
s.data.stopy + Zt.c4ShapeMargin,
|
||
r.data.stopy
|
||
), r.data.stopx = Math.max(
|
||
s.data.stopx + Zt.c4ShapeMargin,
|
||
r.data.stopx
|
||
), zc = Math.max(zc, r.data.stopx), Wc = Math.max(Wc, r.data.stopy);
|
||
}
|
||
}
|
||
const z9 = function(t, e, r, n) {
|
||
Zt = X().c4;
|
||
const i = X().securityLevel;
|
||
let s;
|
||
i === "sandbox" && (s = At("#i" + e));
|
||
const a = At(i === "sandbox" ? s.nodes()[0].contentDocument.body : "body");
|
||
let o = n.db;
|
||
n.db.setWrap(Zt.wrap), um = o.getC4ShapeInRow(), v1 = o.getC4BoundaryInRow(), B.debug(`C:${JSON.stringify(Zt, null, 2)}`);
|
||
const l = i === "sandbox" ? a.select(`[id="${e}"]`) : At(`[id="${e}"]`);
|
||
Yn.insertComputerIcon(l), Yn.insertDatabaseIcon(l), Yn.insertClockIcon(l);
|
||
let u = new hm(n);
|
||
u.setData(
|
||
Zt.diagramMarginX,
|
||
Zt.diagramMarginX,
|
||
Zt.diagramMarginY,
|
||
Zt.diagramMarginY
|
||
), u.data.widthLimit = screen.availWidth, zc = Zt.diagramMarginX, Wc = Zt.diagramMarginY;
|
||
const d = n.db.getTitle();
|
||
let f = n.db.getBoundarys("");
|
||
pm(l, "", u, f, n), Yn.insertArrowHead(l), Yn.insertArrowEnd(l), Yn.insertArrowCrossHead(l), Yn.insertArrowFilledHead(l), U9(l, n.db.getRels(), n.db.getC4Shape, n), u.data.stopx = zc, u.data.stopy = Wc;
|
||
const p = u.data;
|
||
let b = p.stopy - p.starty + 2 * Zt.diagramMarginY;
|
||
const T = p.stopx - p.startx + 2 * Zt.diagramMarginX;
|
||
d && l.append("text").text(d).attr("x", (p.stopx - p.startx) / 2 - 4 * Zt.diagramMarginX).attr("y", p.starty + Zt.diagramMarginY), Ln(l, b, T, Zt.useMaxWidth);
|
||
const L = d ? 60 : 0;
|
||
l.attr(
|
||
"viewBox",
|
||
p.startx - Zt.diagramMarginX + " -" + (Zt.diagramMarginY + L) + " " + T + " " + (b + L)
|
||
), B.debug("models:", p);
|
||
}, y2 = {
|
||
drawPersonOrSystemArray: fm,
|
||
drawBoundary: dm,
|
||
setConf: k1,
|
||
draw: z9
|
||
};
|
||
var w1 = function() {
|
||
var t = function(F, O, A, J) {
|
||
for (A = A || {}, J = F.length; J--; A[F[J]] = O)
|
||
;
|
||
return A;
|
||
}, e = [1, 3], r = [1, 7], n = [1, 8], i = [1, 9], s = [1, 10], a = [1, 13], o = [1, 12], l = [1, 16, 25], u = [1, 20], d = [1, 32], f = [1, 33], p = [1, 34], g = [1, 36], b = [1, 39], k = [1, 37], T = [1, 38], L = [1, 44], E = [1, 45], I = [1, 40], V = [1, 41], H = [1, 42], G = [1, 43], Y = [1, 48], W = [1, 49], N = [1, 50], D = [1, 51], w = [16, 25], v = [1, 65], M = [1, 66], m = [1, 67], Q = [1, 68], x = [1, 69], ct = [1, 70], Dt = [1, 71], vt = [1, 80], j = [16, 25, 32, 45, 46, 54, 60, 61, 62, 63, 64, 65, 66, 71, 73], ot = [16, 25, 30, 32, 45, 46, 50, 54, 60, 61, 62, 63, 64, 65, 66, 71, 73, 88, 89, 90, 91], rt = [5, 8, 9, 10, 11, 16, 19, 23, 25], nt = [54, 88, 89, 90, 91], ut = [54, 65, 66, 88, 89, 90, 91], _t = [54, 60, 61, 62, 63, 64, 88, 89, 90, 91], K = [16, 25, 32], Ot = [1, 107], P = {
|
||
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, noteStatement: 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: 46, members: 47, STRUCT_STOP: 48, ANNOTATION_START: 49, ANNOTATION_END: 50, MEMBER: 51, SEPARATOR: 52, relation: 53, STR: 54, NOTE_FOR: 55, noteText: 56, NOTE: 57, relationType: 58, lineType: 59, AGGREGATION: 60, EXTENSION: 61, COMPOSITION: 62, DEPENDENCY: 63, LOLLIPOP: 64, LINE: 65, DOTTED_LINE: 66, CALLBACK: 67, LINK: 68, LINK_TARGET: 69, CLICK: 70, CALLBACK_NAME: 71, CALLBACK_ARGS: 72, HREF: 73, CSSCLASS: 74, commentToken: 75, textToken: 76, graphCodeTokens: 77, textNoTagsToken: 78, TAGSTART: 79, TAGEND: 80, "==": 81, "--": 82, PCT: 83, DEFAULT: 84, SPACE: 85, MINUS: 86, keywords: 87, UNICODE_TEXT: 88, NUM: 89, ALPHA: 90, BQUOTE_STR: 91, $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", 39: "acc_title", 40: "acc_title_value", 41: "acc_descr", 42: "acc_descr_value", 43: "acc_descr_multiline_value", 44: "CLASS", 45: "STYLE_SEPARATOR", 46: "STRUCT_START", 48: "STRUCT_STOP", 49: "ANNOTATION_START", 50: "ANNOTATION_END", 51: "MEMBER", 52: "SEPARATOR", 54: "STR", 55: "NOTE_FOR", 57: "NOTE", 60: "AGGREGATION", 61: "EXTENSION", 62: "COMPOSITION", 63: "DEPENDENCY", 64: "LOLLIPOP", 65: "LINE", 66: "DOTTED_LINE", 67: "CALLBACK", 68: "LINK", 69: "LINK_TARGET", 70: "CLICK", 71: "CALLBACK_NAME", 72: "CALLBACK_ARGS", 73: "HREF", 74: "CSSCLASS", 77: "graphCodeTokens", 79: "TAGSTART", 80: "TAGEND", 81: "==", 82: "--", 83: "PCT", 84: "DEFAULT", 85: "SPACE", 86: "MINUS", 87: "keywords", 88: "UNICODE_TEXT", 89: "NUM", 90: "ALPHA", 91: "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, 1], [26, 2], [26, 2], [26, 1], [33, 2], [33, 4], [33, 5], [33, 7], [35, 4], [47, 1], [47, 2], [34, 1], [34, 2], [34, 1], [34, 1], [31, 3], [31, 4], [31, 4], [31, 5], [38, 3], [38, 2], [53, 3], [53, 2], [53, 2], [53, 1], [58, 1], [58, 1], [58, 1], [58, 1], [58, 1], [59, 1], [59, 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], [75, 1], [75, 1], [76, 1], [76, 1], [76, 1], [76, 1], [76, 1], [76, 1], [76, 1], [78, 1], [78, 1], [78, 1], [78, 1], [28, 1], [28, 1], [28, 1], [29, 1], [56, 1]],
|
||
performAction: function(O, A, J, C, ht, U, Yt) {
|
||
var et = U.length - 1;
|
||
switch (ht) {
|
||
case 5:
|
||
C.setDirection("TB");
|
||
break;
|
||
case 6:
|
||
C.setDirection("BT");
|
||
break;
|
||
case 7:
|
||
C.setDirection("RL");
|
||
break;
|
||
case 8:
|
||
C.setDirection("LR");
|
||
break;
|
||
case 12:
|
||
C.parseDirective("%%{", "open_directive");
|
||
break;
|
||
case 13:
|
||
C.parseDirective(U[et], "type_directive");
|
||
break;
|
||
case 14:
|
||
U[et] = U[et].trim().replace(/'/g, '"'), C.parseDirective(U[et], "arg_directive");
|
||
break;
|
||
case 15:
|
||
C.parseDirective("}%%", "close_directive", "class");
|
||
break;
|
||
case 20:
|
||
case 21:
|
||
this.$ = U[et];
|
||
break;
|
||
case 22:
|
||
this.$ = U[et - 1] + U[et];
|
||
break;
|
||
case 23:
|
||
case 24:
|
||
this.$ = U[et - 1] + "~" + U[et];
|
||
break;
|
||
case 25:
|
||
C.addRelation(U[et]);
|
||
break;
|
||
case 26:
|
||
U[et - 1].title = C.cleanupLabel(U[et]), C.addRelation(U[et - 1]);
|
||
break;
|
||
case 35:
|
||
this.$ = U[et].trim(), C.setAccTitle(this.$);
|
||
break;
|
||
case 36:
|
||
case 37:
|
||
this.$ = U[et].trim(), C.setAccDescription(this.$);
|
||
break;
|
||
case 38:
|
||
C.addClass(U[et]);
|
||
break;
|
||
case 39:
|
||
C.addClass(U[et - 2]), C.setCssClass(U[et - 2], U[et]);
|
||
break;
|
||
case 40:
|
||
C.addClass(U[et - 3]), C.addMembers(U[et - 3], U[et - 1]);
|
||
break;
|
||
case 41:
|
||
C.addClass(U[et - 5]), C.setCssClass(U[et - 5], U[et - 3]), C.addMembers(U[et - 5], U[et - 1]);
|
||
break;
|
||
case 42:
|
||
C.addAnnotation(U[et], U[et - 2]);
|
||
break;
|
||
case 43:
|
||
this.$ = [U[et]];
|
||
break;
|
||
case 44:
|
||
U[et].push(U[et - 1]), this.$ = U[et];
|
||
break;
|
||
case 45:
|
||
break;
|
||
case 46:
|
||
C.addMember(U[et - 1], C.cleanupLabel(U[et]));
|
||
break;
|
||
case 47:
|
||
break;
|
||
case 48:
|
||
break;
|
||
case 49:
|
||
this.$ = { id1: U[et - 2], id2: U[et], relation: U[et - 1], relationTitle1: "none", relationTitle2: "none" };
|
||
break;
|
||
case 50:
|
||
this.$ = { id1: U[et - 3], id2: U[et], relation: U[et - 1], relationTitle1: U[et - 2], relationTitle2: "none" };
|
||
break;
|
||
case 51:
|
||
this.$ = { id1: U[et - 3], id2: U[et], relation: U[et - 2], relationTitle1: "none", relationTitle2: U[et - 1] };
|
||
break;
|
||
case 52:
|
||
this.$ = { id1: U[et - 4], id2: U[et], relation: U[et - 2], relationTitle1: U[et - 3], relationTitle2: U[et - 1] };
|
||
break;
|
||
case 53:
|
||
C.addNote(U[et], U[et - 1]);
|
||
break;
|
||
case 54:
|
||
C.addNote(U[et]);
|
||
break;
|
||
case 55:
|
||
this.$ = { type1: U[et - 2], type2: U[et], lineType: U[et - 1] };
|
||
break;
|
||
case 56:
|
||
this.$ = { type1: "none", type2: U[et], lineType: U[et - 1] };
|
||
break;
|
||
case 57:
|
||
this.$ = { type1: U[et - 1], type2: "none", lineType: U[et] };
|
||
break;
|
||
case 58:
|
||
this.$ = { type1: "none", type2: "none", lineType: U[et] };
|
||
break;
|
||
case 59:
|
||
this.$ = C.relationType.AGGREGATION;
|
||
break;
|
||
case 60:
|
||
this.$ = C.relationType.EXTENSION;
|
||
break;
|
||
case 61:
|
||
this.$ = C.relationType.COMPOSITION;
|
||
break;
|
||
case 62:
|
||
this.$ = C.relationType.DEPENDENCY;
|
||
break;
|
||
case 63:
|
||
this.$ = C.relationType.LOLLIPOP;
|
||
break;
|
||
case 64:
|
||
this.$ = C.lineType.LINE;
|
||
break;
|
||
case 65:
|
||
this.$ = C.lineType.DOTTED_LINE;
|
||
break;
|
||
case 66:
|
||
case 72:
|
||
this.$ = U[et - 2], C.setClickEvent(U[et - 1], U[et]);
|
||
break;
|
||
case 67:
|
||
case 73:
|
||
this.$ = U[et - 3], C.setClickEvent(U[et - 2], U[et - 1]), C.setTooltip(U[et - 2], U[et]);
|
||
break;
|
||
case 68:
|
||
case 76:
|
||
this.$ = U[et - 2], C.setLink(U[et - 1], U[et]);
|
||
break;
|
||
case 69:
|
||
this.$ = U[et - 3], C.setLink(U[et - 2], U[et - 1], U[et]);
|
||
break;
|
||
case 70:
|
||
case 78:
|
||
this.$ = U[et - 3], C.setLink(U[et - 2], U[et - 1]), C.setTooltip(U[et - 2], U[et]);
|
||
break;
|
||
case 71:
|
||
case 79:
|
||
this.$ = U[et - 4], C.setLink(U[et - 3], U[et - 2], U[et]), C.setTooltip(U[et - 3], U[et - 1]);
|
||
break;
|
||
case 74:
|
||
this.$ = U[et - 3], C.setClickEvent(U[et - 2], U[et - 1], U[et]);
|
||
break;
|
||
case 75:
|
||
this.$ = U[et - 4], C.setClickEvent(U[et - 3], U[et - 2], U[et - 1]), C.setTooltip(U[et - 3], U[et]);
|
||
break;
|
||
case 77:
|
||
this.$ = U[et - 3], C.setLink(U[et - 2], U[et - 1], U[et]);
|
||
break;
|
||
case 80:
|
||
C.setCssClass(U[et - 1], U[et]);
|
||
break;
|
||
}
|
||
},
|
||
table: [{ 3: 1, 4: 2, 5: e, 6: 4, 7: 5, 8: r, 9: n, 10: i, 11: s, 12: 6, 13: 11, 19: a, 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: s, 12: 6, 13: 11, 19: a, 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: 31, 7: 30, 8: r, 9: n, 10: i, 11: s, 13: 11, 19: a, 24: 21, 26: 22, 27: 35, 28: 46, 29: 47, 31: 23, 33: 24, 34: 25, 35: 26, 36: 27, 37: 28, 38: 29, 39: d, 41: f, 43: p, 44: g, 49: b, 51: k, 52: T, 55: L, 57: E, 67: I, 68: V, 70: H, 74: G, 88: Y, 89: W, 90: N, 91: D }, { 16: [1, 52] }, { 18: 53, 21: [1, 54] }, { 16: [2, 15] }, { 25: [1, 55] }, { 16: [1, 56], 25: [2, 17] }, t(w, [2, 25], { 32: [1, 57] }), t(w, [2, 27]), t(w, [2, 28]), t(w, [2, 29]), t(w, [2, 30]), t(w, [2, 31]), t(w, [2, 32]), t(w, [2, 33]), t(w, [2, 34]), { 40: [1, 58] }, { 42: [1, 59] }, t(w, [2, 37]), t(w, [2, 45], { 53: 60, 58: 63, 59: 64, 32: [1, 62], 54: [1, 61], 60: v, 61: M, 62: m, 63: Q, 64: x, 65: ct, 66: Dt }), { 27: 72, 28: 46, 29: 47, 88: Y, 89: W, 90: N, 91: D }, t(w, [2, 47]), t(w, [2, 48]), { 28: 73, 88: Y, 89: W, 90: N }, { 27: 74, 28: 46, 29: 47, 88: Y, 89: W, 90: N, 91: D }, { 27: 75, 28: 46, 29: 47, 88: Y, 89: W, 90: N, 91: D }, { 27: 76, 28: 46, 29: 47, 88: Y, 89: W, 90: N, 91: D }, { 54: [1, 77] }, { 27: 78, 28: 46, 29: 47, 88: Y, 89: W, 90: N, 91: D }, { 54: vt, 56: 79 }, t(j, [2, 20], { 28: 46, 29: 47, 27: 81, 30: [1, 82], 88: Y, 89: W, 90: N, 91: D }), t(j, [2, 21], { 30: [1, 83] }), t(ot, [2, 94]), t(ot, [2, 95]), t(ot, [2, 96]), t([16, 25, 30, 32, 45, 46, 54, 60, 61, 62, 63, 64, 65, 66, 71, 73], [2, 97]), t(rt, [2, 10]), { 15: 84, 22: u }, { 22: [2, 14] }, { 1: [2, 16] }, { 6: 31, 7: 30, 8: r, 9: n, 10: i, 11: s, 13: 11, 19: a, 24: 85, 25: [2, 18], 26: 22, 27: 35, 28: 46, 29: 47, 31: 23, 33: 24, 34: 25, 35: 26, 36: 27, 37: 28, 38: 29, 39: d, 41: f, 43: p, 44: g, 49: b, 51: k, 52: T, 55: L, 57: E, 67: I, 68: V, 70: H, 74: G, 88: Y, 89: W, 90: N, 91: D }, t(w, [2, 26]), t(w, [2, 35]), t(w, [2, 36]), { 27: 86, 28: 46, 29: 47, 54: [1, 87], 88: Y, 89: W, 90: N, 91: D }, { 53: 88, 58: 63, 59: 64, 60: v, 61: M, 62: m, 63: Q, 64: x, 65: ct, 66: Dt }, t(w, [2, 46]), { 59: 89, 65: ct, 66: Dt }, t(nt, [2, 58], { 58: 90, 60: v, 61: M, 62: m, 63: Q, 64: x }), t(ut, [2, 59]), t(ut, [2, 60]), t(ut, [2, 61]), t(ut, [2, 62]), t(ut, [2, 63]), t(_t, [2, 64]), t(_t, [2, 65]), t(w, [2, 38], { 45: [1, 91], 46: [1, 92] }), { 50: [1, 93] }, { 54: [1, 94] }, { 54: [1, 95] }, { 71: [1, 96], 73: [1, 97] }, { 28: 98, 88: Y, 89: W, 90: N }, { 54: vt, 56: 99 }, t(w, [2, 54]), t(w, [2, 98]), t(j, [2, 22]), t(j, [2, 23]), t(j, [2, 24]), { 16: [1, 100] }, { 25: [2, 19] }, t(K, [2, 49]), { 27: 101, 28: 46, 29: 47, 88: Y, 89: W, 90: N, 91: D }, { 27: 102, 28: 46, 29: 47, 54: [1, 103], 88: Y, 89: W, 90: N, 91: D }, t(nt, [2, 57], { 58: 104, 60: v, 61: M, 62: m, 63: Q, 64: x }), t(nt, [2, 56]), { 28: 105, 88: Y, 89: W, 90: N }, { 47: 106, 51: Ot }, { 27: 108, 28: 46, 29: 47, 88: Y, 89: W, 90: N, 91: D }, t(w, [2, 66], { 54: [1, 109] }), t(w, [2, 68], { 54: [1, 111], 69: [1, 110] }), t(w, [2, 72], { 54: [1, 112], 72: [1, 113] }), t(w, [2, 76], { 54: [1, 115], 69: [1, 114] }), t(w, [2, 80]), t(w, [2, 53]), t(rt, [2, 11]), t(K, [2, 51]), t(K, [2, 50]), { 27: 116, 28: 46, 29: 47, 88: Y, 89: W, 90: N, 91: D }, t(nt, [2, 55]), t(w, [2, 39], { 46: [1, 117] }), { 48: [1, 118] }, { 47: 119, 48: [2, 43], 51: Ot }, t(w, [2, 42]), t(w, [2, 67]), t(w, [2, 69]), t(w, [2, 70], { 69: [1, 120] }), t(w, [2, 73]), t(w, [2, 74], { 54: [1, 121] }), t(w, [2, 77]), t(w, [2, 78], { 69: [1, 122] }), t(K, [2, 52]), { 47: 123, 51: Ot }, t(w, [2, 40]), { 48: [2, 44] }, t(w, [2, 71]), t(w, [2, 75]), t(w, [2, 79]), { 48: [1, 124] }, t(w, [2, 41])],
|
||
defaultActions: { 2: [2, 1], 3: [2, 2], 4: [2, 3], 6: [2, 9], 13: [2, 12], 14: [2, 4], 20: [2, 15], 54: [2, 14], 55: [2, 16], 85: [2, 19], 119: [2, 44] },
|
||
parseError: function(O, A) {
|
||
if (A.recoverable)
|
||
this.trace(O);
|
||
else {
|
||
var J = new Error(O);
|
||
throw J.hash = A, J;
|
||
}
|
||
},
|
||
parse: function(O) {
|
||
var A = this, J = [0], C = [], ht = [null], U = [], Yt = this.table, et = "", Mt = 0, Tt = 0, gt = 2, Et = 1, wt = U.slice.call(arguments, 1), pt = Object.create(this.lexer), st = { yy: {} };
|
||
for (var le in this.yy)
|
||
Object.prototype.hasOwnProperty.call(this.yy, le) && (st.yy[le] = this.yy[le]);
|
||
pt.setInput(O, st.yy), st.yy.lexer = pt, st.yy.parser = this, typeof pt.yylloc > "u" && (pt.yylloc = {});
|
||
var $t = pt.yylloc;
|
||
U.push($t);
|
||
var jt = pt.options && pt.options.ranges;
|
||
typeof st.yy.parseError == "function" ? this.parseError = st.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
||
function Kt() {
|
||
var at;
|
||
return at = C.pop() || pt.lex() || Et, typeof at != "number" && (at instanceof Array && (C = at, at = C.pop()), at = A.symbols_[at] || at), at;
|
||
}
|
||
for (var Gt, Ee, Ht, Vt, Ft = {}, xt, ft, Lt, bt; ; ) {
|
||
if (Ee = J[J.length - 1], this.defaultActions[Ee] ? Ht = this.defaultActions[Ee] : ((Gt === null || typeof Gt > "u") && (Gt = Kt()), Ht = Yt[Ee] && Yt[Ee][Gt]), typeof Ht > "u" || !Ht.length || !Ht[0]) {
|
||
var Ut = "";
|
||
bt = [];
|
||
for (xt in Yt[Ee])
|
||
this.terminals_[xt] && xt > gt && bt.push("'" + this.terminals_[xt] + "'");
|
||
pt.showPosition ? Ut = "Parse error on line " + (Mt + 1) + `:
|
||
` + pt.showPosition() + `
|
||
Expecting ` + bt.join(", ") + ", got '" + (this.terminals_[Gt] || Gt) + "'" : Ut = "Parse error on line " + (Mt + 1) + ": Unexpected " + (Gt == Et ? "end of input" : "'" + (this.terminals_[Gt] || Gt) + "'"), this.parseError(Ut, {
|
||
text: pt.match,
|
||
token: this.terminals_[Gt] || Gt,
|
||
line: pt.yylineno,
|
||
loc: $t,
|
||
expected: bt
|
||
});
|
||
}
|
||
if (Ht[0] instanceof Array && Ht.length > 1)
|
||
throw new Error("Parse Error: multiple actions possible at state: " + Ee + ", token: " + Gt);
|
||
switch (Ht[0]) {
|
||
case 1:
|
||
J.push(Gt), ht.push(pt.yytext), U.push(pt.yylloc), J.push(Ht[1]), Gt = null, Tt = pt.yyleng, et = pt.yytext, Mt = pt.yylineno, $t = pt.yylloc;
|
||
break;
|
||
case 2:
|
||
if (ft = this.productions_[Ht[1]][1], Ft.$ = ht[ht.length - ft], Ft._$ = {
|
||
first_line: U[U.length - (ft || 1)].first_line,
|
||
last_line: U[U.length - 1].last_line,
|
||
first_column: U[U.length - (ft || 1)].first_column,
|
||
last_column: U[U.length - 1].last_column
|
||
}, jt && (Ft._$.range = [
|
||
U[U.length - (ft || 1)].range[0],
|
||
U[U.length - 1].range[1]
|
||
]), Vt = this.performAction.apply(Ft, [
|
||
et,
|
||
Tt,
|
||
Mt,
|
||
st.yy,
|
||
Ht[1],
|
||
ht,
|
||
U
|
||
].concat(wt)), typeof Vt < "u")
|
||
return Vt;
|
||
ft && (J = J.slice(0, -1 * ft * 2), ht = ht.slice(0, -1 * ft), U = U.slice(0, -1 * ft)), J.push(this.productions_[Ht[1]][0]), ht.push(Ft.$), U.push(Ft._$), Lt = Yt[J[J.length - 2]][J[J.length - 1]], J.push(Lt);
|
||
break;
|
||
case 3:
|
||
return !0;
|
||
}
|
||
}
|
||
return !0;
|
||
}
|
||
}, z = function() {
|
||
var F = {
|
||
EOF: 1,
|
||
parseError: function(A, J) {
|
||
if (this.yy.parser)
|
||
this.yy.parser.parseError(A, J);
|
||
else
|
||
throw new Error(A);
|
||
},
|
||
setInput: function(O, A) {
|
||
return this.yy = A || this.yy || {}, this._input = O, 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 O = this._input[0];
|
||
this.yytext += O, this.yyleng++, this.offset++, this.match += O, this.matched += O;
|
||
var A = O.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), O;
|
||
},
|
||
unput: function(O) {
|
||
var A = O.length, J = O.split(/(?:\r\n?|\n)/g);
|
||
this._input = O + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - A), this.offset -= A;
|
||
var C = 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), J.length - 1 && (this.yylineno -= J.length - 1);
|
||
var ht = 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: J ? (J.length === C.length ? this.yylloc.first_column : 0) + C[C.length - J.length].length - J[0].length : this.yylloc.first_column - A
|
||
}, this.options.ranges && (this.yylloc.range = [ht[0], ht[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(O) {
|
||
this.unput(this.match.slice(O));
|
||
},
|
||
pastInput: function() {
|
||
var O = this.matched.substr(0, this.matched.length - this.match.length);
|
||
return (O.length > 20 ? "..." : "") + O.substr(-20).replace(/\n/g, "");
|
||
},
|
||
upcomingInput: function() {
|
||
var O = this.match;
|
||
return O.length < 20 && (O += this._input.substr(0, 20 - O.length)), (O.substr(0, 20) + (O.length > 20 ? "..." : "")).replace(/\n/g, "");
|
||
},
|
||
showPosition: function() {
|
||
var O = this.pastInput(), A = new Array(O.length + 1).join("-");
|
||
return O + this.upcomingInput() + `
|
||
` + A + "^";
|
||
},
|
||
test_match: function(O, A) {
|
||
var J, C, ht;
|
||
if (this.options.backtrack_lexer && (ht = {
|
||
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 && (ht.yylloc.range = this.yylloc.range.slice(0))), C = O[0].match(/(?:\r\n?|\n).*/g), C && (this.yylineno += C.length), this.yylloc = {
|
||
first_line: this.yylloc.last_line,
|
||
last_line: this.yylineno + 1,
|
||
first_column: this.yylloc.last_column,
|
||
last_column: C ? C[C.length - 1].length - C[C.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + O[0].length
|
||
}, this.yytext += O[0], this.match += O[0], this.matches = O, 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(O[0].length), this.matched += O[0], J = this.performAction.call(this, this.yy, this, A, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), J)
|
||
return J;
|
||
if (this._backtrack) {
|
||
for (var U in ht)
|
||
this[U] = ht[U];
|
||
return !1;
|
||
}
|
||
return !1;
|
||
},
|
||
next: function() {
|
||
if (this.done)
|
||
return this.EOF;
|
||
this._input || (this.done = !0);
|
||
var O, A, J, C;
|
||
this._more || (this.yytext = "", this.match = "");
|
||
for (var ht = this._currentRules(), U = 0; U < ht.length; U++)
|
||
if (J = this._input.match(this.rules[ht[U]]), J && (!A || J[0].length > A[0].length)) {
|
||
if (A = J, C = U, this.options.backtrack_lexer) {
|
||
if (O = this.test_match(J, ht[U]), O !== !1)
|
||
return O;
|
||
if (this._backtrack) {
|
||
A = !1;
|
||
continue;
|
||
} else
|
||
return !1;
|
||
} else if (!this.options.flex)
|
||
break;
|
||
}
|
||
return A ? (O = this.test_match(A, ht[C]), O !== !1 ? O : !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: {},
|
||
performAction: function(A, J, C, ht) {
|
||
switch (C) {
|
||
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"), 39;
|
||
case 12:
|
||
return this.popState(), "acc_title_value";
|
||
case 13:
|
||
return this.begin("acc_descr"), 41;
|
||
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"), 46;
|
||
case 23:
|
||
return "EDGE_STATE";
|
||
case 24:
|
||
return "EOF_IN_STRUCT";
|
||
case 25:
|
||
return "OPEN_IN_STRUCT";
|
||
case 26:
|
||
return this.popState(), 48;
|
||
case 27:
|
||
break;
|
||
case 28:
|
||
return "MEMBER";
|
||
case 29:
|
||
return 44;
|
||
case 30:
|
||
return 74;
|
||
case 31:
|
||
return 67;
|
||
case 32:
|
||
return 68;
|
||
case 33:
|
||
return 70;
|
||
case 34:
|
||
return 55;
|
||
case 35:
|
||
return 57;
|
||
case 36:
|
||
return 49;
|
||
case 37:
|
||
return 50;
|
||
case 38:
|
||
this.begin("generic");
|
||
break;
|
||
case 39:
|
||
this.popState();
|
||
break;
|
||
case 40:
|
||
return "GENERICTYPE";
|
||
case 41:
|
||
this.begin("string");
|
||
break;
|
||
case 42:
|
||
this.popState();
|
||
break;
|
||
case 43:
|
||
return "STR";
|
||
case 44:
|
||
this.begin("bqstring");
|
||
break;
|
||
case 45:
|
||
this.popState();
|
||
break;
|
||
case 46:
|
||
return "BQUOTE_STR";
|
||
case 47:
|
||
this.begin("href");
|
||
break;
|
||
case 48:
|
||
this.popState();
|
||
break;
|
||
case 49:
|
||
return 73;
|
||
case 50:
|
||
this.begin("callback_name");
|
||
break;
|
||
case 51:
|
||
this.popState();
|
||
break;
|
||
case 52:
|
||
this.popState(), this.begin("callback_args");
|
||
break;
|
||
case 53:
|
||
return 71;
|
||
case 54:
|
||
this.popState();
|
||
break;
|
||
case 55:
|
||
return 72;
|
||
case 56:
|
||
return 69;
|
||
case 57:
|
||
return 69;
|
||
case 58:
|
||
return 69;
|
||
case 59:
|
||
return 69;
|
||
case 60:
|
||
return 61;
|
||
case 61:
|
||
return 61;
|
||
case 62:
|
||
return 63;
|
||
case 63:
|
||
return 63;
|
||
case 64:
|
||
return 62;
|
||
case 65:
|
||
return 60;
|
||
case 66:
|
||
return 64;
|
||
case 67:
|
||
return 65;
|
||
case 68:
|
||
return 66;
|
||
case 69:
|
||
return 32;
|
||
case 70:
|
||
return 45;
|
||
case 71:
|
||
return 86;
|
||
case 72:
|
||
return "DOT";
|
||
case 73:
|
||
return "PLUS";
|
||
case 74:
|
||
return 83;
|
||
case 75:
|
||
return "EQUALS";
|
||
case 76:
|
||
return "EQUALS";
|
||
case 77:
|
||
return 90;
|
||
case 78:
|
||
return "PUNCTUATION";
|
||
case 79:
|
||
return 89;
|
||
case 80:
|
||
return 88;
|
||
case 81:
|
||
return 85;
|
||
case 82:
|
||
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)/, /^(?:note for\b)/, /^(?:note\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: [54, 55], inclusive: !1 }, callback_name: { rules: [51, 52, 53], inclusive: !1 }, href: { rules: [48, 49], inclusive: !1 }, struct: { rules: [23, 24, 25, 26, 27, 28], inclusive: !1 }, generic: { rules: [39, 40], inclusive: !1 }, bqstring: { rules: [45, 46], inclusive: !1 }, string: { rules: [42, 43], 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, 37, 38, 41, 44, 47, 50, 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], inclusive: !0 } }
|
||
};
|
||
return F;
|
||
}();
|
||
P.lexer = z;
|
||
function $() {
|
||
this.yy = {};
|
||
}
|
||
return $.prototype = P, P.Parser = $, new $();
|
||
}();
|
||
w1.parser = w1;
|
||
const m2 = w1, W9 = (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;
|
||
}, H9 = (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;
|
||
}, G0 = "classid-";
|
||
let q0 = [], Ze = {}, Hc = [], b2 = 0, No = [];
|
||
const ho = (t) => he.sanitizeText(t, X()), G9 = function(t, e, r) {
|
||
ze.parseDirective(this, t, e, r);
|
||
}, Bo = function(t) {
|
||
let e = "", r = t;
|
||
if (t.indexOf("~") > 0) {
|
||
let n = t.split("~");
|
||
r = n[0], e = he.sanitizeText(n[1], X());
|
||
}
|
||
return { className: r, type: e };
|
||
}, T1 = function(t) {
|
||
let e = Bo(t);
|
||
Ze[e.className] === void 0 && (Ze[e.className] = {
|
||
id: e.className,
|
||
type: e.type,
|
||
cssClasses: [],
|
||
methods: [],
|
||
members: [],
|
||
annotations: [],
|
||
domId: G0 + e.className + "-" + b2
|
||
}, b2++);
|
||
}, gm = function(t) {
|
||
const e = Object.keys(Ze);
|
||
for (const r of e)
|
||
if (Ze[r].id === t)
|
||
return Ze[r].domId;
|
||
}, q9 = function() {
|
||
q0 = [], Ze = {}, Hc = [], No = [], No.push(mm), Dn();
|
||
}, j9 = function(t) {
|
||
return Ze[t];
|
||
}, X9 = function() {
|
||
return Ze;
|
||
}, $9 = function() {
|
||
return q0;
|
||
}, K9 = function() {
|
||
return Hc;
|
||
}, Z9 = function(t) {
|
||
B.debug("Adding relation: " + JSON.stringify(t)), T1(t.id1), T1(t.id2), t.id1 = Bo(t.id1).className, t.id2 = Bo(t.id2).className, t.relationTitle1 = he.sanitizeText(
|
||
t.relationTitle1.trim(),
|
||
X()
|
||
), t.relationTitle2 = he.sanitizeText(
|
||
t.relationTitle2.trim(),
|
||
X()
|
||
), q0.push(t);
|
||
}, Q9 = function(t, e) {
|
||
const r = Bo(t).className;
|
||
Ze[r].annotations.push(e);
|
||
}, ym = function(t, e) {
|
||
const r = Bo(t).className, n = Ze[r];
|
||
if (typeof e == "string") {
|
||
const i = e.trim();
|
||
i.startsWith("<<") && i.endsWith(">>") ? n.annotations.push(ho(i.substring(2, i.length - 2))) : i.indexOf(")") > 0 ? n.methods.push(ho(i)) : i && n.members.push(ho(i));
|
||
}
|
||
}, J9 = function(t, e) {
|
||
Array.isArray(e) && (e.reverse(), e.forEach((r) => ym(t, r)));
|
||
}, tS = function(t, e) {
|
||
const r = {
|
||
id: `note${Hc.length}`,
|
||
class: e,
|
||
text: t
|
||
};
|
||
Hc.push(r);
|
||
}, eS = function(t) {
|
||
return t.substring(0, 1) === ":" ? he.sanitizeText(t.substr(1).trim(), X()) : ho(t.trim());
|
||
}, j0 = function(t, e) {
|
||
t.split(",").forEach(function(r) {
|
||
let n = r;
|
||
r[0].match(/\d/) && (n = G0 + n), Ze[n] !== void 0 && Ze[n].cssClasses.push(e);
|
||
});
|
||
}, rS = function(t, e) {
|
||
const r = X();
|
||
t.split(",").forEach(function(n) {
|
||
e !== void 0 && (Ze[n].tooltip = he.sanitizeText(e, r));
|
||
});
|
||
}, nS = function(t) {
|
||
return Ze[t].tooltip;
|
||
}, iS = function(t, e, r) {
|
||
const n = X();
|
||
t.split(",").forEach(function(i) {
|
||
let s = i;
|
||
i[0].match(/\d/) && (s = G0 + s), Ze[s] !== void 0 && (Ze[s].link = ye.formatUrl(e, n), n.securityLevel === "sandbox" ? Ze[s].linkTarget = "_top" : typeof r == "string" ? Ze[s].linkTarget = ho(r) : Ze[s].linkTarget = "_blank");
|
||
}), j0(t, "clickable");
|
||
}, sS = function(t, e, r) {
|
||
t.split(",").forEach(function(n) {
|
||
aS(n, e, r), Ze[n].haveCallback = !0;
|
||
}), j0(t, "clickable");
|
||
}, aS = function(t, e, r) {
|
||
const n = X();
|
||
let i = t, s = gm(i);
|
||
if (n.securityLevel === "loose" && e !== void 0 && Ze[i] !== void 0) {
|
||
let a = [];
|
||
if (typeof r == "string") {
|
||
a = r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
|
||
for (let o = 0; o < a.length; o++) {
|
||
let l = a[o].trim();
|
||
l.charAt(0) === '"' && l.charAt(l.length - 1) === '"' && (l = l.substr(1, l.length - 2)), a[o] = l;
|
||
}
|
||
}
|
||
a.length === 0 && a.push(s), No.push(function() {
|
||
const o = document.querySelector(`[id="${s}"]`);
|
||
o !== null && o.addEventListener(
|
||
"click",
|
||
function() {
|
||
ye.runFunc(e, ...a);
|
||
},
|
||
!1
|
||
);
|
||
});
|
||
}
|
||
}, oS = function(t) {
|
||
No.forEach(function(e) {
|
||
e(t);
|
||
});
|
||
}, lS = {
|
||
LINE: 0,
|
||
DOTTED_LINE: 1
|
||
}, cS = {
|
||
AGGREGATION: 0,
|
||
EXTENSION: 1,
|
||
COMPOSITION: 2,
|
||
DEPENDENCY: 3,
|
||
LOLLIPOP: 4
|
||
}, mm = function(t) {
|
||
let e = At(".mermaidTooltip");
|
||
(e._groups || e)[0][0] === null && (e = At("body").append("div").attr("class", "mermaidTooltip").style("opacity", 0)), At(t).select("svg").selectAll("g.node").on("mouseover", function() {
|
||
const i = At(this);
|
||
if (i.attr("title") === null)
|
||
return;
|
||
const a = this.getBoundingClientRect();
|
||
e.transition().duration(200).style("opacity", ".9"), e.text(i.attr("title")).style("left", window.scrollX + a.left + (a.right - a.left) / 2 + "px").style("top", window.scrollY + a.top - 14 + document.body.scrollTop + "px"), e.html(e.html().replace(/<br\/>/g, "<br/>")), i.classed("hover", !0);
|
||
}).on("mouseout", function() {
|
||
e.transition().duration(500).style("opacity", 0), At(this).classed("hover", !1);
|
||
});
|
||
};
|
||
No.push(mm);
|
||
let bm = "TB";
|
||
const uS = () => bm, hS = (t) => {
|
||
bm = t;
|
||
}, Zs = {
|
||
parseDirective: G9,
|
||
setAccTitle: sn,
|
||
getAccTitle: Mn,
|
||
getAccDescription: Bn,
|
||
setAccDescription: Nn,
|
||
getConfig: () => X().class,
|
||
addClass: T1,
|
||
bindFunctions: oS,
|
||
clear: q9,
|
||
getClass: j9,
|
||
getClasses: X9,
|
||
getNotes: K9,
|
||
addAnnotation: Q9,
|
||
addNote: tS,
|
||
getRelations: $9,
|
||
addRelation: Z9,
|
||
getDirection: uS,
|
||
setDirection: hS,
|
||
addMember: ym,
|
||
addMembers: J9,
|
||
cleanupLabel: eS,
|
||
lineType: lS,
|
||
relationType: cS,
|
||
setClickEvent: sS,
|
||
setCssClass: j0,
|
||
setLink: iS,
|
||
getTooltip: nS,
|
||
setTooltip: rS,
|
||
lookUpDomId: gm,
|
||
setDiagramTitle: Si,
|
||
getDiagramTitle: Ai
|
||
};
|
||
function jn(t) {
|
||
return t != null && typeof t == "object";
|
||
}
|
||
var dS = "[object Symbol]";
|
||
function ws(t) {
|
||
return typeof t == "symbol" || jn(t) && Ms(t) == dS;
|
||
}
|
||
function ra(t, e) {
|
||
for (var r = -1, n = t == null ? 0 : t.length, i = Array(n); ++r < n; )
|
||
i[r] = e(t[r], r, t);
|
||
return i;
|
||
}
|
||
var fS = Array.isArray;
|
||
const or = fS;
|
||
var pS = 1 / 0, _2 = rn ? rn.prototype : void 0, x2 = _2 ? _2.toString : void 0;
|
||
function _m(t) {
|
||
if (typeof t == "string")
|
||
return t;
|
||
if (or(t))
|
||
return ra(t, _m) + "";
|
||
if (ws(t))
|
||
return x2 ? x2.call(t) : "";
|
||
var e = t + "";
|
||
return e == "0" && 1 / t == -pS ? "-0" : e;
|
||
}
|
||
var gS = /\s/;
|
||
function yS(t) {
|
||
for (var e = t.length; e-- && gS.test(t.charAt(e)); )
|
||
;
|
||
return e;
|
||
}
|
||
var mS = /^\s+/;
|
||
function bS(t) {
|
||
return t && t.slice(0, yS(t) + 1).replace(mS, "");
|
||
}
|
||
var v2 = 0 / 0, _S = /^[-+]0x[0-9a-f]+$/i, xS = /^0b[01]+$/i, vS = /^0o[0-7]+$/i, kS = parseInt;
|
||
function wS(t) {
|
||
if (typeof t == "number")
|
||
return t;
|
||
if (ws(t))
|
||
return v2;
|
||
if (Kr(t)) {
|
||
var e = typeof t.valueOf == "function" ? t.valueOf() : t;
|
||
t = Kr(e) ? e + "" : e;
|
||
}
|
||
if (typeof t != "string")
|
||
return t === 0 ? t : +t;
|
||
t = bS(t);
|
||
var r = xS.test(t);
|
||
return r || vS.test(t) ? kS(t.slice(2), r ? 2 : 8) : _S.test(t) ? v2 : +t;
|
||
}
|
||
var k2 = 1 / 0, TS = 17976931348623157e292;
|
||
function Kl(t) {
|
||
if (!t)
|
||
return t === 0 ? t : 0;
|
||
if (t = wS(t), t === k2 || t === -k2) {
|
||
var e = t < 0 ? -1 : 1;
|
||
return e * TS;
|
||
}
|
||
return t === t ? t : 0;
|
||
}
|
||
function ES(t) {
|
||
var e = Kl(t), r = e % 1;
|
||
return e === e ? r ? e - r : e : 0;
|
||
}
|
||
function Is(t) {
|
||
return t;
|
||
}
|
||
var CS = Bs(An, "WeakMap");
|
||
const E1 = CS;
|
||
var w2 = Object.create, SS = function() {
|
||
function t() {
|
||
}
|
||
return function(e) {
|
||
if (!Kr(e))
|
||
return {};
|
||
if (w2)
|
||
return w2(e);
|
||
t.prototype = e;
|
||
var r = new t();
|
||
return t.prototype = void 0, r;
|
||
};
|
||
}();
|
||
const AS = SS;
|
||
function LS(t, e, r) {
|
||
switch (r.length) {
|
||
case 0:
|
||
return t.call(e);
|
||
case 1:
|
||
return t.call(e, r[0]);
|
||
case 2:
|
||
return t.call(e, r[0], r[1]);
|
||
case 3:
|
||
return t.call(e, r[0], r[1], r[2]);
|
||
}
|
||
return t.apply(e, r);
|
||
}
|
||
function DS() {
|
||
}
|
||
function xm(t, e) {
|
||
var r = -1, n = t.length;
|
||
for (e || (e = Array(n)); ++r < n; )
|
||
e[r] = t[r];
|
||
return e;
|
||
}
|
||
var MS = 800, NS = 16, BS = Date.now;
|
||
function IS(t) {
|
||
var e = 0, r = 0;
|
||
return function() {
|
||
var n = BS(), i = NS - (n - r);
|
||
if (r = n, i > 0) {
|
||
if (++e >= MS)
|
||
return arguments[0];
|
||
} else
|
||
e = 0;
|
||
return t.apply(void 0, arguments);
|
||
};
|
||
}
|
||
function Qs(t) {
|
||
return function() {
|
||
return t;
|
||
};
|
||
}
|
||
var OS = function() {
|
||
try {
|
||
var t = Bs(Object, "defineProperty");
|
||
return t({}, "", {}), t;
|
||
} catch {
|
||
}
|
||
}();
|
||
const Gc = OS;
|
||
var RS = Gc ? function(t, e) {
|
||
return Gc(t, "toString", {
|
||
configurable: !0,
|
||
enumerable: !1,
|
||
value: Qs(e),
|
||
writable: !0
|
||
});
|
||
} : Is;
|
||
const FS = RS;
|
||
var PS = IS(FS);
|
||
const vm = PS;
|
||
function km(t, e) {
|
||
for (var r = -1, n = t == null ? 0 : t.length; ++r < n && e(t[r], r, t) !== !1; )
|
||
;
|
||
return t;
|
||
}
|
||
function wm(t, e, r, n) {
|
||
for (var i = t.length, s = r + (n ? 1 : -1); n ? s-- : ++s < i; )
|
||
if (e(t[s], s, t))
|
||
return s;
|
||
return -1;
|
||
}
|
||
function YS(t) {
|
||
return t !== t;
|
||
}
|
||
function VS(t, e, r) {
|
||
for (var n = r - 1, i = t.length; ++n < i; )
|
||
if (t[n] === e)
|
||
return n;
|
||
return -1;
|
||
}
|
||
function US(t, e, r) {
|
||
return e === e ? VS(t, e, r) : wm(t, YS, r);
|
||
}
|
||
function zS(t, e) {
|
||
var r = t == null ? 0 : t.length;
|
||
return !!r && US(t, e, 0) > -1;
|
||
}
|
||
var WS = 9007199254740991, HS = /^(?:0|[1-9]\d*)$/;
|
||
function Eu(t, e) {
|
||
var r = typeof t;
|
||
return e = e == null ? WS : e, !!e && (r == "number" || r != "symbol" && HS.test(t)) && t > -1 && t % 1 == 0 && t < e;
|
||
}
|
||
function Cu(t, e, r) {
|
||
e == "__proto__" && Gc ? Gc(t, e, {
|
||
configurable: !0,
|
||
enumerable: !0,
|
||
value: r,
|
||
writable: !0
|
||
}) : t[e] = r;
|
||
}
|
||
var GS = Object.prototype, qS = GS.hasOwnProperty;
|
||
function Su(t, e, r) {
|
||
var n = t[e];
|
||
(!(qS.call(t, e) && Ba(n, r)) || r === void 0 && !(e in t)) && Cu(t, e, r);
|
||
}
|
||
function Ko(t, e, r, n) {
|
||
var i = !r;
|
||
r || (r = {});
|
||
for (var s = -1, a = e.length; ++s < a; ) {
|
||
var o = e[s], l = n ? n(r[o], t[o], o, r, t) : void 0;
|
||
l === void 0 && (l = t[o]), i ? Cu(r, o, l) : Su(r, o, l);
|
||
}
|
||
return r;
|
||
}
|
||
var T2 = Math.max;
|
||
function Tm(t, e, r) {
|
||
return e = T2(e === void 0 ? t.length - 1 : e, 0), function() {
|
||
for (var n = arguments, i = -1, s = T2(n.length - e, 0), a = Array(s); ++i < s; )
|
||
a[i] = n[e + i];
|
||
i = -1;
|
||
for (var o = Array(e + 1); ++i < e; )
|
||
o[i] = n[i];
|
||
return o[e] = r(a), LS(t, this, o);
|
||
};
|
||
}
|
||
function Au(t, e) {
|
||
return vm(Tm(t, e, Is), t + "");
|
||
}
|
||
var jS = 9007199254740991;
|
||
function X0(t) {
|
||
return typeof t == "number" && t > -1 && t % 1 == 0 && t <= jS;
|
||
}
|
||
function Ki(t) {
|
||
return t != null && X0(t.length) && !ma(t);
|
||
}
|
||
function Io(t, e, r) {
|
||
if (!Kr(r))
|
||
return !1;
|
||
var n = typeof e;
|
||
return (n == "number" ? Ki(r) && Eu(e, r.length) : n == "string" && e in r) ? Ba(r[e], t) : !1;
|
||
}
|
||
function XS(t) {
|
||
return Au(function(e, r) {
|
||
var n = -1, i = r.length, s = i > 1 ? r[i - 1] : void 0, a = i > 2 ? r[2] : void 0;
|
||
for (s = t.length > 3 && typeof s == "function" ? (i--, s) : void 0, a && Io(r[0], r[1], a) && (s = i < 3 ? void 0 : s, i = 1), e = Object(e); ++n < i; ) {
|
||
var o = r[n];
|
||
o && t(e, o, n, s);
|
||
}
|
||
return e;
|
||
});
|
||
}
|
||
var $S = Object.prototype;
|
||
function Lu(t) {
|
||
var e = t && t.constructor, r = typeof e == "function" && e.prototype || $S;
|
||
return t === r;
|
||
}
|
||
function KS(t, e) {
|
||
for (var r = -1, n = Array(t); ++r < t; )
|
||
n[r] = e(r);
|
||
return n;
|
||
}
|
||
var ZS = "[object Arguments]";
|
||
function E2(t) {
|
||
return jn(t) && Ms(t) == ZS;
|
||
}
|
||
var Em = Object.prototype, QS = Em.hasOwnProperty, JS = Em.propertyIsEnumerable, tA = E2(function() {
|
||
return arguments;
|
||
}()) ? E2 : function(t) {
|
||
return jn(t) && QS.call(t, "callee") && !JS.call(t, "callee");
|
||
};
|
||
const va = tA;
|
||
function eA() {
|
||
return !1;
|
||
}
|
||
var Cm = typeof exports == "object" && exports && !exports.nodeType && exports, C2 = Cm && typeof module == "object" && module && !module.nodeType && module, rA = C2 && C2.exports === Cm, S2 = rA ? An.Buffer : void 0, nA = S2 ? S2.isBuffer : void 0, iA = nA || eA;
|
||
const ka = iA;
|
||
var sA = "[object Arguments]", aA = "[object Array]", oA = "[object Boolean]", lA = "[object Date]", cA = "[object Error]", uA = "[object Function]", hA = "[object Map]", dA = "[object Number]", fA = "[object Object]", pA = "[object RegExp]", gA = "[object Set]", yA = "[object String]", mA = "[object WeakMap]", bA = "[object ArrayBuffer]", _A = "[object DataView]", xA = "[object Float32Array]", vA = "[object Float64Array]", kA = "[object Int8Array]", wA = "[object Int16Array]", TA = "[object Int32Array]", EA = "[object Uint8Array]", CA = "[object Uint8ClampedArray]", SA = "[object Uint16Array]", AA = "[object Uint32Array]", Ve = {};
|
||
Ve[xA] = Ve[vA] = Ve[kA] = Ve[wA] = Ve[TA] = Ve[EA] = Ve[CA] = Ve[SA] = Ve[AA] = !0;
|
||
Ve[sA] = Ve[aA] = Ve[bA] = Ve[oA] = Ve[_A] = Ve[lA] = Ve[cA] = Ve[uA] = Ve[hA] = Ve[dA] = Ve[fA] = Ve[pA] = Ve[gA] = Ve[yA] = Ve[mA] = !1;
|
||
function LA(t) {
|
||
return jn(t) && X0(t.length) && !!Ve[Ms(t)];
|
||
}
|
||
function Du(t) {
|
||
return function(e) {
|
||
return t(e);
|
||
};
|
||
}
|
||
var Sm = typeof exports == "object" && exports && !exports.nodeType && exports, fo = Sm && typeof module == "object" && module && !module.nodeType && module, DA = fo && fo.exports === Sm, Lh = DA && Ey.process, MA = function() {
|
||
try {
|
||
var t = fo && fo.require && fo.require("util").types;
|
||
return t || Lh && Lh.binding && Lh.binding("util");
|
||
} catch {
|
||
}
|
||
}();
|
||
const wa = MA;
|
||
var A2 = wa && wa.isTypedArray, NA = A2 ? Du(A2) : LA;
|
||
const Mu = NA;
|
||
var BA = Object.prototype, IA = BA.hasOwnProperty;
|
||
function Am(t, e) {
|
||
var r = or(t), n = !r && va(t), i = !r && !n && ka(t), s = !r && !n && !i && Mu(t), a = r || n || i || s, o = a ? KS(t.length, String) : [], l = o.length;
|
||
for (var u in t)
|
||
(e || IA.call(t, u)) && !(a && (u == "length" || i && (u == "offset" || u == "parent") || s && (u == "buffer" || u == "byteLength" || u == "byteOffset") || Eu(u, l))) && o.push(u);
|
||
return o;
|
||
}
|
||
function Lm(t, e) {
|
||
return function(r) {
|
||
return t(e(r));
|
||
};
|
||
}
|
||
var OA = Lm(Object.keys, Object);
|
||
const RA = OA;
|
||
var FA = Object.prototype, PA = FA.hasOwnProperty;
|
||
function Dm(t) {
|
||
if (!Lu(t))
|
||
return RA(t);
|
||
var e = [];
|
||
for (var r in Object(t))
|
||
PA.call(t, r) && r != "constructor" && e.push(r);
|
||
return e;
|
||
}
|
||
function Xr(t) {
|
||
return Ki(t) ? Am(t) : Dm(t);
|
||
}
|
||
function YA(t) {
|
||
var e = [];
|
||
if (t != null)
|
||
for (var r in Object(t))
|
||
e.push(r);
|
||
return e;
|
||
}
|
||
var VA = Object.prototype, UA = VA.hasOwnProperty;
|
||
function zA(t) {
|
||
if (!Kr(t))
|
||
return YA(t);
|
||
var e = Lu(t), r = [];
|
||
for (var n in t)
|
||
n == "constructor" && (e || !UA.call(t, n)) || r.push(n);
|
||
return r;
|
||
}
|
||
function Os(t) {
|
||
return Ki(t) ? Am(t, !0) : zA(t);
|
||
}
|
||
var WA = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, HA = /^\w*$/;
|
||
function $0(t, e) {
|
||
if (or(t))
|
||
return !1;
|
||
var r = typeof t;
|
||
return r == "number" || r == "symbol" || r == "boolean" || t == null || ws(t) ? !0 : HA.test(t) || !WA.test(t) || e != null && t in Object(e);
|
||
}
|
||
var GA = 500;
|
||
function qA(t) {
|
||
var e = Ia(t, function(n) {
|
||
return r.size === GA && r.clear(), n;
|
||
}), r = e.cache;
|
||
return e;
|
||
}
|
||
var jA = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, XA = /\\(\\)?/g, $A = qA(function(t) {
|
||
var e = [];
|
||
return t.charCodeAt(0) === 46 && e.push(""), t.replace(jA, function(r, n, i, s) {
|
||
e.push(i ? s.replace(XA, "$1") : n || r);
|
||
}), e;
|
||
});
|
||
const KA = $A;
|
||
function Mm(t) {
|
||
return t == null ? "" : _m(t);
|
||
}
|
||
function Nu(t, e) {
|
||
return or(t) ? t : $0(t, e) ? [t] : KA(Mm(t));
|
||
}
|
||
var ZA = 1 / 0;
|
||
function Zo(t) {
|
||
if (typeof t == "string" || ws(t))
|
||
return t;
|
||
var e = t + "";
|
||
return e == "0" && 1 / t == -ZA ? "-0" : e;
|
||
}
|
||
function Bu(t, e) {
|
||
e = Nu(e, t);
|
||
for (var r = 0, n = e.length; t != null && r < n; )
|
||
t = t[Zo(e[r++])];
|
||
return r && r == n ? t : void 0;
|
||
}
|
||
function QA(t, e, r) {
|
||
var n = t == null ? void 0 : Bu(t, e);
|
||
return n === void 0 ? r : n;
|
||
}
|
||
function K0(t, e) {
|
||
for (var r = -1, n = e.length, i = t.length; ++r < n; )
|
||
t[i + r] = e[r];
|
||
return t;
|
||
}
|
||
var L2 = rn ? rn.isConcatSpreadable : void 0;
|
||
function JA(t) {
|
||
return or(t) || va(t) || !!(L2 && t && t[L2]);
|
||
}
|
||
function Iu(t, e, r, n, i) {
|
||
var s = -1, a = t.length;
|
||
for (r || (r = JA), i || (i = []); ++s < a; ) {
|
||
var o = t[s];
|
||
e > 0 && r(o) ? e > 1 ? Iu(o, e - 1, r, n, i) : K0(i, o) : n || (i[i.length] = o);
|
||
}
|
||
return i;
|
||
}
|
||
function Ra(t) {
|
||
var e = t == null ? 0 : t.length;
|
||
return e ? Iu(t, 1) : [];
|
||
}
|
||
function tL(t) {
|
||
return vm(Tm(t, void 0, Ra), t + "");
|
||
}
|
||
var eL = Lm(Object.getPrototypeOf, Object);
|
||
const Z0 = eL;
|
||
var rL = "[object Object]", nL = Function.prototype, iL = Object.prototype, Nm = nL.toString, sL = iL.hasOwnProperty, aL = Nm.call(Object);
|
||
function Bm(t) {
|
||
if (!jn(t) || Ms(t) != rL)
|
||
return !1;
|
||
var e = Z0(t);
|
||
if (e === null)
|
||
return !0;
|
||
var r = sL.call(e, "constructor") && e.constructor;
|
||
return typeof r == "function" && r instanceof r && Nm.call(r) == aL;
|
||
}
|
||
function oL(t, e, r, n) {
|
||
var i = -1, s = t == null ? 0 : t.length;
|
||
for (n && s && (r = t[++i]); ++i < s; )
|
||
r = e(r, t[i], i, t);
|
||
return r;
|
||
}
|
||
function lL() {
|
||
this.__data__ = new Ei(), this.size = 0;
|
||
}
|
||
function cL(t) {
|
||
var e = this.__data__, r = e.delete(t);
|
||
return this.size = e.size, r;
|
||
}
|
||
function uL(t) {
|
||
return this.__data__.get(t);
|
||
}
|
||
function hL(t) {
|
||
return this.__data__.has(t);
|
||
}
|
||
var dL = 200;
|
||
function fL(t, e) {
|
||
var r = this.__data__;
|
||
if (r instanceof Ei) {
|
||
var n = r.__data__;
|
||
if (!Co || n.length < dL - 1)
|
||
return n.push([t, e]), this.size = ++r.size, this;
|
||
r = this.__data__ = new Ci(n);
|
||
}
|
||
return r.set(t, e), this.size = r.size, this;
|
||
}
|
||
function xn(t) {
|
||
var e = this.__data__ = new Ei(t);
|
||
this.size = e.size;
|
||
}
|
||
xn.prototype.clear = lL;
|
||
xn.prototype.delete = cL;
|
||
xn.prototype.get = uL;
|
||
xn.prototype.has = hL;
|
||
xn.prototype.set = fL;
|
||
function pL(t, e) {
|
||
return t && Ko(e, Xr(e), t);
|
||
}
|
||
function gL(t, e) {
|
||
return t && Ko(e, Os(e), t);
|
||
}
|
||
var Im = typeof exports == "object" && exports && !exports.nodeType && exports, D2 = Im && typeof module == "object" && module && !module.nodeType && module, yL = D2 && D2.exports === Im, M2 = yL ? An.Buffer : void 0, N2 = M2 ? M2.allocUnsafe : void 0;
|
||
function Om(t, e) {
|
||
if (e)
|
||
return t.slice();
|
||
var r = t.length, n = N2 ? N2(r) : new t.constructor(r);
|
||
return t.copy(n), n;
|
||
}
|
||
function Rm(t, e) {
|
||
for (var r = -1, n = t == null ? 0 : t.length, i = 0, s = []; ++r < n; ) {
|
||
var a = t[r];
|
||
e(a, r, t) && (s[i++] = a);
|
||
}
|
||
return s;
|
||
}
|
||
function Fm() {
|
||
return [];
|
||
}
|
||
var mL = Object.prototype, bL = mL.propertyIsEnumerable, B2 = Object.getOwnPropertySymbols, _L = B2 ? function(t) {
|
||
return t == null ? [] : (t = Object(t), Rm(B2(t), function(e) {
|
||
return bL.call(t, e);
|
||
}));
|
||
} : Fm;
|
||
const Q0 = _L;
|
||
function xL(t, e) {
|
||
return Ko(t, Q0(t), e);
|
||
}
|
||
var vL = Object.getOwnPropertySymbols, kL = vL ? function(t) {
|
||
for (var e = []; t; )
|
||
K0(e, Q0(t)), t = Z0(t);
|
||
return e;
|
||
} : Fm;
|
||
const Pm = kL;
|
||
function wL(t, e) {
|
||
return Ko(t, Pm(t), e);
|
||
}
|
||
function Ym(t, e, r) {
|
||
var n = e(t);
|
||
return or(t) ? n : K0(n, r(t));
|
||
}
|
||
function C1(t) {
|
||
return Ym(t, Xr, Q0);
|
||
}
|
||
function TL(t) {
|
||
return Ym(t, Os, Pm);
|
||
}
|
||
var EL = Bs(An, "DataView");
|
||
const S1 = EL;
|
||
var CL = Bs(An, "Promise");
|
||
const A1 = CL;
|
||
var SL = Bs(An, "Set");
|
||
const na = SL;
|
||
var I2 = "[object Map]", AL = "[object Object]", O2 = "[object Promise]", R2 = "[object Set]", F2 = "[object WeakMap]", P2 = "[object DataView]", LL = Ns(S1), DL = Ns(Co), ML = Ns(A1), NL = Ns(na), BL = Ns(E1), cs = Ms;
|
||
(S1 && cs(new S1(new ArrayBuffer(1))) != P2 || Co && cs(new Co()) != I2 || A1 && cs(A1.resolve()) != O2 || na && cs(new na()) != R2 || E1 && cs(new E1()) != F2) && (cs = function(t) {
|
||
var e = Ms(t), r = e == AL ? t.constructor : void 0, n = r ? Ns(r) : "";
|
||
if (n)
|
||
switch (n) {
|
||
case LL:
|
||
return P2;
|
||
case DL:
|
||
return I2;
|
||
case ML:
|
||
return O2;
|
||
case NL:
|
||
return R2;
|
||
case BL:
|
||
return F2;
|
||
}
|
||
return e;
|
||
});
|
||
const Ta = cs;
|
||
var IL = Object.prototype, OL = IL.hasOwnProperty;
|
||
function RL(t) {
|
||
var e = t.length, r = new t.constructor(e);
|
||
return e && typeof t[0] == "string" && OL.call(t, "index") && (r.index = t.index, r.input = t.input), r;
|
||
}
|
||
var FL = An.Uint8Array;
|
||
const qc = FL;
|
||
function J0(t) {
|
||
var e = new t.constructor(t.byteLength);
|
||
return new qc(e).set(new qc(t)), e;
|
||
}
|
||
function PL(t, e) {
|
||
var r = e ? J0(t.buffer) : t.buffer;
|
||
return new t.constructor(r, t.byteOffset, t.byteLength);
|
||
}
|
||
var YL = /\w*$/;
|
||
function VL(t) {
|
||
var e = new t.constructor(t.source, YL.exec(t));
|
||
return e.lastIndex = t.lastIndex, e;
|
||
}
|
||
var Y2 = rn ? rn.prototype : void 0, V2 = Y2 ? Y2.valueOf : void 0;
|
||
function UL(t) {
|
||
return V2 ? Object(V2.call(t)) : {};
|
||
}
|
||
function Vm(t, e) {
|
||
var r = e ? J0(t.buffer) : t.buffer;
|
||
return new t.constructor(r, t.byteOffset, t.length);
|
||
}
|
||
var zL = "[object Boolean]", WL = "[object Date]", HL = "[object Map]", GL = "[object Number]", qL = "[object RegExp]", jL = "[object Set]", XL = "[object String]", $L = "[object Symbol]", KL = "[object ArrayBuffer]", ZL = "[object DataView]", QL = "[object Float32Array]", JL = "[object Float64Array]", tD = "[object Int8Array]", eD = "[object Int16Array]", rD = "[object Int32Array]", nD = "[object Uint8Array]", iD = "[object Uint8ClampedArray]", sD = "[object Uint16Array]", aD = "[object Uint32Array]";
|
||
function oD(t, e, r) {
|
||
var n = t.constructor;
|
||
switch (e) {
|
||
case KL:
|
||
return J0(t);
|
||
case zL:
|
||
case WL:
|
||
return new n(+t);
|
||
case ZL:
|
||
return PL(t, r);
|
||
case QL:
|
||
case JL:
|
||
case tD:
|
||
case eD:
|
||
case rD:
|
||
case nD:
|
||
case iD:
|
||
case sD:
|
||
case aD:
|
||
return Vm(t, r);
|
||
case HL:
|
||
return new n();
|
||
case GL:
|
||
case XL:
|
||
return new n(t);
|
||
case qL:
|
||
return VL(t);
|
||
case jL:
|
||
return new n();
|
||
case $L:
|
||
return UL(t);
|
||
}
|
||
}
|
||
function Um(t) {
|
||
return typeof t.constructor == "function" && !Lu(t) ? AS(Z0(t)) : {};
|
||
}
|
||
var lD = "[object Map]";
|
||
function cD(t) {
|
||
return jn(t) && Ta(t) == lD;
|
||
}
|
||
var U2 = wa && wa.isMap, uD = U2 ? Du(U2) : cD;
|
||
const hD = uD;
|
||
var dD = "[object Set]";
|
||
function fD(t) {
|
||
return jn(t) && Ta(t) == dD;
|
||
}
|
||
var z2 = wa && wa.isSet, pD = z2 ? Du(z2) : fD;
|
||
const gD = pD;
|
||
var yD = 1, mD = 2, bD = 4, zm = "[object Arguments]", _D = "[object Array]", xD = "[object Boolean]", vD = "[object Date]", kD = "[object Error]", Wm = "[object Function]", wD = "[object GeneratorFunction]", TD = "[object Map]", ED = "[object Number]", Hm = "[object Object]", CD = "[object RegExp]", SD = "[object Set]", AD = "[object String]", LD = "[object Symbol]", DD = "[object WeakMap]", MD = "[object ArrayBuffer]", ND = "[object DataView]", BD = "[object Float32Array]", ID = "[object Float64Array]", OD = "[object Int8Array]", RD = "[object Int16Array]", FD = "[object Int32Array]", PD = "[object Uint8Array]", YD = "[object Uint8ClampedArray]", VD = "[object Uint16Array]", UD = "[object Uint32Array]", Re = {};
|
||
Re[zm] = Re[_D] = Re[MD] = Re[ND] = Re[xD] = Re[vD] = Re[BD] = Re[ID] = Re[OD] = Re[RD] = Re[FD] = Re[TD] = Re[ED] = Re[Hm] = Re[CD] = Re[SD] = Re[AD] = Re[LD] = Re[PD] = Re[YD] = Re[VD] = Re[UD] = !0;
|
||
Re[kD] = Re[Wm] = Re[DD] = !1;
|
||
function po(t, e, r, n, i, s) {
|
||
var a, o = e & yD, l = e & mD, u = e & bD;
|
||
if (r && (a = i ? r(t, n, i, s) : r(t)), a !== void 0)
|
||
return a;
|
||
if (!Kr(t))
|
||
return t;
|
||
var d = or(t);
|
||
if (d) {
|
||
if (a = RL(t), !o)
|
||
return xm(t, a);
|
||
} else {
|
||
var f = Ta(t), p = f == Wm || f == wD;
|
||
if (ka(t))
|
||
return Om(t, o);
|
||
if (f == Hm || f == zm || p && !i) {
|
||
if (a = l || p ? {} : Um(t), !o)
|
||
return l ? wL(t, gL(a, t)) : xL(t, pL(a, t));
|
||
} else {
|
||
if (!Re[f])
|
||
return i ? t : {};
|
||
a = oD(t, f, o);
|
||
}
|
||
}
|
||
s || (s = new xn());
|
||
var g = s.get(t);
|
||
if (g)
|
||
return g;
|
||
s.set(t, a), gD(t) ? t.forEach(function(T) {
|
||
a.add(po(T, e, r, T, t, s));
|
||
}) : hD(t) && t.forEach(function(T, L) {
|
||
a.set(L, po(T, e, r, L, t, s));
|
||
});
|
||
var b = u ? l ? TL : C1 : l ? Os : Xr, k = d ? void 0 : b(t);
|
||
return km(k || t, function(T, L) {
|
||
k && (L = T, T = t[L]), Su(a, L, po(T, e, r, L, t, s));
|
||
}), a;
|
||
}
|
||
var zD = 4;
|
||
function WD(t) {
|
||
return po(t, zD);
|
||
}
|
||
var HD = 1, GD = 4;
|
||
function qD(t) {
|
||
return po(t, HD | GD);
|
||
}
|
||
var jD = "__lodash_hash_undefined__";
|
||
function XD(t) {
|
||
return this.__data__.set(t, jD), this;
|
||
}
|
||
function $D(t) {
|
||
return this.__data__.has(t);
|
||
}
|
||
function Oo(t) {
|
||
var e = -1, r = t == null ? 0 : t.length;
|
||
for (this.__data__ = new Ci(); ++e < r; )
|
||
this.add(t[e]);
|
||
}
|
||
Oo.prototype.add = Oo.prototype.push = XD;
|
||
Oo.prototype.has = $D;
|
||
function KD(t, e) {
|
||
for (var r = -1, n = t == null ? 0 : t.length; ++r < n; )
|
||
if (e(t[r], r, t))
|
||
return !0;
|
||
return !1;
|
||
}
|
||
function Gm(t, e) {
|
||
return t.has(e);
|
||
}
|
||
var ZD = 1, QD = 2;
|
||
function qm(t, e, r, n, i, s) {
|
||
var a = r & ZD, o = t.length, l = e.length;
|
||
if (o != l && !(a && l > o))
|
||
return !1;
|
||
var u = s.get(t), d = s.get(e);
|
||
if (u && d)
|
||
return u == e && d == t;
|
||
var f = -1, p = !0, g = r & QD ? new Oo() : void 0;
|
||
for (s.set(t, e), s.set(e, t); ++f < o; ) {
|
||
var b = t[f], k = e[f];
|
||
if (n)
|
||
var T = a ? n(k, b, f, e, t, s) : n(b, k, f, t, e, s);
|
||
if (T !== void 0) {
|
||
if (T)
|
||
continue;
|
||
p = !1;
|
||
break;
|
||
}
|
||
if (g) {
|
||
if (!KD(e, function(L, E) {
|
||
if (!Gm(g, E) && (b === L || i(b, L, r, n, s)))
|
||
return g.push(E);
|
||
})) {
|
||
p = !1;
|
||
break;
|
||
}
|
||
} else if (!(b === k || i(b, k, r, n, s))) {
|
||
p = !1;
|
||
break;
|
||
}
|
||
}
|
||
return s.delete(t), s.delete(e), p;
|
||
}
|
||
function JD(t) {
|
||
var e = -1, r = Array(t.size);
|
||
return t.forEach(function(n, i) {
|
||
r[++e] = [i, n];
|
||
}), r;
|
||
}
|
||
function td(t) {
|
||
var e = -1, r = Array(t.size);
|
||
return t.forEach(function(n) {
|
||
r[++e] = n;
|
||
}), r;
|
||
}
|
||
var tM = 1, eM = 2, rM = "[object Boolean]", nM = "[object Date]", iM = "[object Error]", sM = "[object Map]", aM = "[object Number]", oM = "[object RegExp]", lM = "[object Set]", cM = "[object String]", uM = "[object Symbol]", hM = "[object ArrayBuffer]", dM = "[object DataView]", W2 = rn ? rn.prototype : void 0, Dh = W2 ? W2.valueOf : void 0;
|
||
function fM(t, e, r, n, i, s, a) {
|
||
switch (r) {
|
||
case dM:
|
||
if (t.byteLength != e.byteLength || t.byteOffset != e.byteOffset)
|
||
return !1;
|
||
t = t.buffer, e = e.buffer;
|
||
case hM:
|
||
return !(t.byteLength != e.byteLength || !s(new qc(t), new qc(e)));
|
||
case rM:
|
||
case nM:
|
||
case aM:
|
||
return Ba(+t, +e);
|
||
case iM:
|
||
return t.name == e.name && t.message == e.message;
|
||
case oM:
|
||
case cM:
|
||
return t == e + "";
|
||
case sM:
|
||
var o = JD;
|
||
case lM:
|
||
var l = n & tM;
|
||
if (o || (o = td), t.size != e.size && !l)
|
||
return !1;
|
||
var u = a.get(t);
|
||
if (u)
|
||
return u == e;
|
||
n |= eM, a.set(t, e);
|
||
var d = qm(o(t), o(e), n, i, s, a);
|
||
return a.delete(t), d;
|
||
case uM:
|
||
if (Dh)
|
||
return Dh.call(t) == Dh.call(e);
|
||
}
|
||
return !1;
|
||
}
|
||
var pM = 1, gM = Object.prototype, yM = gM.hasOwnProperty;
|
||
function mM(t, e, r, n, i, s) {
|
||
var a = r & pM, o = C1(t), l = o.length, u = C1(e), d = u.length;
|
||
if (l != d && !a)
|
||
return !1;
|
||
for (var f = l; f--; ) {
|
||
var p = o[f];
|
||
if (!(a ? p in e : yM.call(e, p)))
|
||
return !1;
|
||
}
|
||
var g = s.get(t), b = s.get(e);
|
||
if (g && b)
|
||
return g == e && b == t;
|
||
var k = !0;
|
||
s.set(t, e), s.set(e, t);
|
||
for (var T = a; ++f < l; ) {
|
||
p = o[f];
|
||
var L = t[p], E = e[p];
|
||
if (n)
|
||
var I = a ? n(E, L, p, e, t, s) : n(L, E, p, t, e, s);
|
||
if (!(I === void 0 ? L === E || i(L, E, r, n, s) : I)) {
|
||
k = !1;
|
||
break;
|
||
}
|
||
T || (T = p == "constructor");
|
||
}
|
||
if (k && !T) {
|
||
var V = t.constructor, H = e.constructor;
|
||
V != H && "constructor" in t && "constructor" in e && !(typeof V == "function" && V instanceof V && typeof H == "function" && H instanceof H) && (k = !1);
|
||
}
|
||
return s.delete(t), s.delete(e), k;
|
||
}
|
||
var bM = 1, H2 = "[object Arguments]", G2 = "[object Array]", Al = "[object Object]", _M = Object.prototype, q2 = _M.hasOwnProperty;
|
||
function xM(t, e, r, n, i, s) {
|
||
var a = or(t), o = or(e), l = a ? G2 : Ta(t), u = o ? G2 : Ta(e);
|
||
l = l == H2 ? Al : l, u = u == H2 ? Al : u;
|
||
var d = l == Al, f = u == Al, p = l == u;
|
||
if (p && ka(t)) {
|
||
if (!ka(e))
|
||
return !1;
|
||
a = !0, d = !1;
|
||
}
|
||
if (p && !d)
|
||
return s || (s = new xn()), a || Mu(t) ? qm(t, e, r, n, i, s) : fM(t, e, l, r, n, i, s);
|
||
if (!(r & bM)) {
|
||
var g = d && q2.call(t, "__wrapped__"), b = f && q2.call(e, "__wrapped__");
|
||
if (g || b) {
|
||
var k = g ? t.value() : t, T = b ? e.value() : e;
|
||
return s || (s = new xn()), i(k, T, r, n, s);
|
||
}
|
||
}
|
||
return p ? (s || (s = new xn()), mM(t, e, r, n, i, s)) : !1;
|
||
}
|
||
function ed(t, e, r, n, i) {
|
||
return t === e ? !0 : t == null || e == null || !jn(t) && !jn(e) ? t !== t && e !== e : xM(t, e, r, n, ed, i);
|
||
}
|
||
var vM = 1, kM = 2;
|
||
function wM(t, e, r, n) {
|
||
var i = r.length, s = i, a = !n;
|
||
if (t == null)
|
||
return !s;
|
||
for (t = Object(t); i--; ) {
|
||
var o = r[i];
|
||
if (a && o[2] ? o[1] !== t[o[0]] : !(o[0] in t))
|
||
return !1;
|
||
}
|
||
for (; ++i < s; ) {
|
||
o = r[i];
|
||
var l = o[0], u = t[l], d = o[1];
|
||
if (a && o[2]) {
|
||
if (u === void 0 && !(l in t))
|
||
return !1;
|
||
} else {
|
||
var f = new xn();
|
||
if (n)
|
||
var p = n(u, d, l, t, e, f);
|
||
if (!(p === void 0 ? ed(d, u, vM | kM, n, f) : p))
|
||
return !1;
|
||
}
|
||
}
|
||
return !0;
|
||
}
|
||
function jm(t) {
|
||
return t === t && !Kr(t);
|
||
}
|
||
function TM(t) {
|
||
for (var e = Xr(t), r = e.length; r--; ) {
|
||
var n = e[r], i = t[n];
|
||
e[r] = [n, i, jm(i)];
|
||
}
|
||
return e;
|
||
}
|
||
function Xm(t, e) {
|
||
return function(r) {
|
||
return r == null ? !1 : r[t] === e && (e !== void 0 || t in Object(r));
|
||
};
|
||
}
|
||
function EM(t) {
|
||
var e = TM(t);
|
||
return e.length == 1 && e[0][2] ? Xm(e[0][0], e[0][1]) : function(r) {
|
||
return r === t || wM(r, t, e);
|
||
};
|
||
}
|
||
function CM(t, e) {
|
||
return t != null && e in Object(t);
|
||
}
|
||
function $m(t, e, r) {
|
||
e = Nu(e, t);
|
||
for (var n = -1, i = e.length, s = !1; ++n < i; ) {
|
||
var a = Zo(e[n]);
|
||
if (!(s = t != null && r(t, a)))
|
||
break;
|
||
t = t[a];
|
||
}
|
||
return s || ++n != i ? s : (i = t == null ? 0 : t.length, !!i && X0(i) && Eu(a, i) && (or(t) || va(t)));
|
||
}
|
||
function Km(t, e) {
|
||
return t != null && $m(t, e, CM);
|
||
}
|
||
var SM = 1, AM = 2;
|
||
function LM(t, e) {
|
||
return $0(t) && jm(e) ? Xm(Zo(t), e) : function(r) {
|
||
var n = QA(r, t);
|
||
return n === void 0 && n === e ? Km(r, t) : ed(e, n, SM | AM);
|
||
};
|
||
}
|
||
function DM(t) {
|
||
return function(e) {
|
||
return e == null ? void 0 : e[t];
|
||
};
|
||
}
|
||
function MM(t) {
|
||
return function(e) {
|
||
return Bu(e, t);
|
||
};
|
||
}
|
||
function NM(t) {
|
||
return $0(t) ? DM(Zo(t)) : MM(t);
|
||
}
|
||
function Zi(t) {
|
||
return typeof t == "function" ? t : t == null ? Is : typeof t == "object" ? or(t) ? LM(t[0], t[1]) : EM(t) : NM(t);
|
||
}
|
||
function BM(t) {
|
||
return function(e, r, n) {
|
||
for (var i = -1, s = Object(e), a = n(e), o = a.length; o--; ) {
|
||
var l = a[t ? o : ++i];
|
||
if (r(s[l], l, s) === !1)
|
||
break;
|
||
}
|
||
return e;
|
||
};
|
||
}
|
||
var IM = BM();
|
||
const rd = IM;
|
||
function Zm(t, e) {
|
||
return t && rd(t, e, Xr);
|
||
}
|
||
function OM(t, e) {
|
||
return function(r, n) {
|
||
if (r == null)
|
||
return r;
|
||
if (!Ki(r))
|
||
return t(r, n);
|
||
for (var i = r.length, s = e ? i : -1, a = Object(r); (e ? s-- : ++s < i) && n(a[s], s, a) !== !1; )
|
||
;
|
||
return r;
|
||
};
|
||
}
|
||
var RM = OM(Zm);
|
||
const Ou = RM;
|
||
var FM = function() {
|
||
return An.Date.now();
|
||
};
|
||
const j2 = FM;
|
||
var Qm = Object.prototype, PM = Qm.hasOwnProperty, YM = Au(function(t, e) {
|
||
t = Object(t);
|
||
var r = -1, n = e.length, i = n > 2 ? e[2] : void 0;
|
||
for (i && Io(e[0], e[1], i) && (n = 1); ++r < n; )
|
||
for (var s = e[r], a = Os(s), o = -1, l = a.length; ++o < l; ) {
|
||
var u = a[o], d = t[u];
|
||
(d === void 0 || Ba(d, Qm[u]) && !PM.call(t, u)) && (t[u] = s[u]);
|
||
}
|
||
return t;
|
||
});
|
||
const Hs = YM;
|
||
function L1(t, e, r) {
|
||
(r !== void 0 && !Ba(t[e], r) || r === void 0 && !(e in t)) && Cu(t, e, r);
|
||
}
|
||
function Jm(t) {
|
||
return jn(t) && Ki(t);
|
||
}
|
||
function D1(t, e) {
|
||
if (!(e === "constructor" && typeof t[e] == "function") && e != "__proto__")
|
||
return t[e];
|
||
}
|
||
function VM(t) {
|
||
return Ko(t, Os(t));
|
||
}
|
||
function UM(t, e, r, n, i, s, a) {
|
||
var o = D1(t, r), l = D1(e, r), u = a.get(l);
|
||
if (u) {
|
||
L1(t, r, u);
|
||
return;
|
||
}
|
||
var d = s ? s(o, l, r + "", t, e, a) : void 0, f = d === void 0;
|
||
if (f) {
|
||
var p = or(l), g = !p && ka(l), b = !p && !g && Mu(l);
|
||
d = l, p || g || b ? or(o) ? d = o : Jm(o) ? d = xm(o) : g ? (f = !1, d = Om(l, !0)) : b ? (f = !1, d = Vm(l, !0)) : d = [] : Bm(l) || va(l) ? (d = o, va(o) ? d = VM(o) : (!Kr(o) || ma(o)) && (d = Um(l))) : f = !1;
|
||
}
|
||
f && (a.set(l, d), i(d, l, n, s, a), a.delete(l)), L1(t, r, d);
|
||
}
|
||
function t3(t, e, r, n, i) {
|
||
t !== e && rd(e, function(s, a) {
|
||
if (i || (i = new xn()), Kr(s))
|
||
UM(t, e, a, r, t3, n, i);
|
||
else {
|
||
var o = n ? n(D1(t, a), s, a + "", t, e, i) : void 0;
|
||
o === void 0 && (o = s), L1(t, a, o);
|
||
}
|
||
}, Os);
|
||
}
|
||
function zM(t, e, r) {
|
||
for (var n = -1, i = t == null ? 0 : t.length; ++n < i; )
|
||
if (r(e, t[n]))
|
||
return !0;
|
||
return !1;
|
||
}
|
||
function jc(t) {
|
||
var e = t == null ? 0 : t.length;
|
||
return e ? t[e - 1] : void 0;
|
||
}
|
||
function e3(t) {
|
||
return typeof t == "function" ? t : Is;
|
||
}
|
||
function kt(t, e) {
|
||
var r = or(t) ? km : Ou;
|
||
return r(t, e3(e));
|
||
}
|
||
function WM(t, e) {
|
||
var r = [];
|
||
return Ou(t, function(n, i, s) {
|
||
e(n, i, s) && r.push(n);
|
||
}), r;
|
||
}
|
||
function yi(t, e) {
|
||
var r = or(t) ? Rm : WM;
|
||
return r(t, Zi(e));
|
||
}
|
||
function HM(t) {
|
||
return function(e, r, n) {
|
||
var i = Object(e);
|
||
if (!Ki(e)) {
|
||
var s = Zi(r);
|
||
e = Xr(e), r = function(o) {
|
||
return s(i[o], o, i);
|
||
};
|
||
}
|
||
var a = t(e, r, n);
|
||
return a > -1 ? i[s ? e[a] : a] : void 0;
|
||
};
|
||
}
|
||
var GM = Math.max;
|
||
function qM(t, e, r) {
|
||
var n = t == null ? 0 : t.length;
|
||
if (!n)
|
||
return -1;
|
||
var i = r == null ? 0 : ES(r);
|
||
return i < 0 && (i = GM(n + i, 0)), wm(t, Zi(e), i);
|
||
}
|
||
var jM = HM(qM);
|
||
const nd = jM;
|
||
function r3(t, e) {
|
||
var r = -1, n = Ki(t) ? Array(t.length) : [];
|
||
return Ou(t, function(i, s, a) {
|
||
n[++r] = e(i, s, a);
|
||
}), n;
|
||
}
|
||
function ar(t, e) {
|
||
var r = or(t) ? ra : r3;
|
||
return r(t, Zi(e));
|
||
}
|
||
function XM(t, e) {
|
||
return t == null ? t : rd(t, e3(e), Os);
|
||
}
|
||
function $M(t, e) {
|
||
return t > e;
|
||
}
|
||
var KM = Object.prototype, ZM = KM.hasOwnProperty;
|
||
function QM(t, e) {
|
||
return t != null && ZM.call(t, e);
|
||
}
|
||
function _e(t, e) {
|
||
return t != null && $m(t, e, QM);
|
||
}
|
||
function JM(t, e) {
|
||
return ra(e, function(r) {
|
||
return t[r];
|
||
});
|
||
}
|
||
function xi(t) {
|
||
return t == null ? [] : JM(t, Xr(t));
|
||
}
|
||
var tN = "[object Map]", eN = "[object Set]", rN = Object.prototype, nN = rN.hasOwnProperty;
|
||
function ia(t) {
|
||
if (t == null)
|
||
return !0;
|
||
if (Ki(t) && (or(t) || typeof t == "string" || typeof t.splice == "function" || ka(t) || Mu(t) || va(t)))
|
||
return !t.length;
|
||
var e = Ta(t);
|
||
if (e == tN || e == eN)
|
||
return !t.size;
|
||
if (Lu(t))
|
||
return !Dm(t).length;
|
||
for (var r in t)
|
||
if (nN.call(t, r))
|
||
return !1;
|
||
return !0;
|
||
}
|
||
function Qe(t) {
|
||
return t === void 0;
|
||
}
|
||
function n3(t, e) {
|
||
return t < e;
|
||
}
|
||
function Ru(t, e) {
|
||
var r = {};
|
||
return e = Zi(e), Zm(t, function(n, i, s) {
|
||
Cu(r, i, e(n, i, s));
|
||
}), r;
|
||
}
|
||
function id(t, e, r) {
|
||
for (var n = -1, i = t.length; ++n < i; ) {
|
||
var s = t[n], a = e(s);
|
||
if (a != null && (o === void 0 ? a === a && !ws(a) : r(a, o)))
|
||
var o = a, l = s;
|
||
}
|
||
return l;
|
||
}
|
||
function Ts(t) {
|
||
return t && t.length ? id(t, Is, $M) : void 0;
|
||
}
|
||
var iN = XS(function(t, e, r) {
|
||
t3(t, e, r);
|
||
});
|
||
const M1 = iN;
|
||
function Ro(t) {
|
||
return t && t.length ? id(t, Is, n3) : void 0;
|
||
}
|
||
function sd(t, e) {
|
||
return t && t.length ? id(t, Zi(e), n3) : void 0;
|
||
}
|
||
function sN(t, e, r, n) {
|
||
if (!Kr(t))
|
||
return t;
|
||
e = Nu(e, t);
|
||
for (var i = -1, s = e.length, a = s - 1, o = t; o != null && ++i < s; ) {
|
||
var l = Zo(e[i]), u = r;
|
||
if (l === "__proto__" || l === "constructor" || l === "prototype")
|
||
return t;
|
||
if (i != a) {
|
||
var d = o[l];
|
||
u = n ? n(d, l, o) : void 0, u === void 0 && (u = Kr(d) ? d : Eu(e[i + 1]) ? [] : {});
|
||
}
|
||
Su(o, l, u), o = o[l];
|
||
}
|
||
return t;
|
||
}
|
||
function aN(t, e, r) {
|
||
for (var n = -1, i = e.length, s = {}; ++n < i; ) {
|
||
var a = e[n], o = Bu(t, a);
|
||
r(o, a) && sN(s, Nu(a, t), o);
|
||
}
|
||
return s;
|
||
}
|
||
function oN(t, e) {
|
||
var r = t.length;
|
||
for (t.sort(e); r--; )
|
||
t[r] = t[r].value;
|
||
return t;
|
||
}
|
||
function lN(t, e) {
|
||
if (t !== e) {
|
||
var r = t !== void 0, n = t === null, i = t === t, s = ws(t), a = e !== void 0, o = e === null, l = e === e, u = ws(e);
|
||
if (!o && !u && !s && t > e || s && a && l && !o && !u || n && a && l || !r && l || !i)
|
||
return 1;
|
||
if (!n && !s && !u && t < e || u && r && i && !n && !s || o && r && i || !a && i || !l)
|
||
return -1;
|
||
}
|
||
return 0;
|
||
}
|
||
function cN(t, e, r) {
|
||
for (var n = -1, i = t.criteria, s = e.criteria, a = i.length, o = r.length; ++n < a; ) {
|
||
var l = lN(i[n], s[n]);
|
||
if (l) {
|
||
if (n >= o)
|
||
return l;
|
||
var u = r[n];
|
||
return l * (u == "desc" ? -1 : 1);
|
||
}
|
||
}
|
||
return t.index - e.index;
|
||
}
|
||
function uN(t, e, r) {
|
||
e.length ? e = ra(e, function(s) {
|
||
return or(s) ? function(a) {
|
||
return Bu(a, s.length === 1 ? s[0] : s);
|
||
} : s;
|
||
}) : e = [Is];
|
||
var n = -1;
|
||
e = ra(e, Du(Zi));
|
||
var i = r3(t, function(s, a, o) {
|
||
var l = ra(e, function(u) {
|
||
return u(s);
|
||
});
|
||
return { criteria: l, index: ++n, value: s };
|
||
});
|
||
return oN(i, function(s, a) {
|
||
return cN(s, a, r);
|
||
});
|
||
}
|
||
function hN(t, e) {
|
||
return aN(t, e, function(r, n) {
|
||
return Km(t, n);
|
||
});
|
||
}
|
||
var dN = tL(function(t, e) {
|
||
return t == null ? {} : hN(t, e);
|
||
});
|
||
const Fo = dN;
|
||
var fN = Math.ceil, pN = Math.max;
|
||
function gN(t, e, r, n) {
|
||
for (var i = -1, s = pN(fN((e - t) / (r || 1)), 0), a = Array(s); s--; )
|
||
a[n ? s : ++i] = t, t += r;
|
||
return a;
|
||
}
|
||
function yN(t) {
|
||
return function(e, r, n) {
|
||
return n && typeof n != "number" && Io(e, r, n) && (r = n = void 0), e = Kl(e), r === void 0 ? (r = e, e = 0) : r = Kl(r), n = n === void 0 ? e < r ? 1 : -1 : Kl(n), gN(e, r, n, t);
|
||
};
|
||
}
|
||
var mN = yN();
|
||
const Es = mN;
|
||
function bN(t, e, r, n, i) {
|
||
return i(t, function(s, a, o) {
|
||
r = n ? (n = !1, s) : e(r, s, a, o);
|
||
}), r;
|
||
}
|
||
function Qo(t, e, r) {
|
||
var n = or(t) ? oL : bN, i = arguments.length < 3;
|
||
return n(t, Zi(e), r, i, Ou);
|
||
}
|
||
var _N = Au(function(t, e) {
|
||
if (t == null)
|
||
return [];
|
||
var r = e.length;
|
||
return r > 1 && Io(t, e[0], e[1]) ? e = [] : r > 2 && Io(e[0], e[1], e[2]) && (e = [e[0]]), uN(t, Iu(e, 1), []);
|
||
});
|
||
const Jo = _N;
|
||
var xN = 1 / 0, vN = na && 1 / td(new na([, -0]))[1] == xN ? function(t) {
|
||
return new na(t);
|
||
} : DS;
|
||
const kN = vN;
|
||
var wN = 200;
|
||
function TN(t, e, r) {
|
||
var n = -1, i = zS, s = t.length, a = !0, o = [], l = o;
|
||
if (r)
|
||
a = !1, i = zM;
|
||
else if (s >= wN) {
|
||
var u = e ? null : kN(t);
|
||
if (u)
|
||
return td(u);
|
||
a = !1, i = Gm, l = new Oo();
|
||
} else
|
||
l = e ? [] : o;
|
||
t:
|
||
for (; ++n < s; ) {
|
||
var d = t[n], f = e ? e(d) : d;
|
||
if (d = r || d !== 0 ? d : 0, a && f === f) {
|
||
for (var p = l.length; p--; )
|
||
if (l[p] === f)
|
||
continue t;
|
||
e && l.push(f), o.push(d);
|
||
} else
|
||
i(l, f, r) || (l !== o && l.push(f), o.push(d));
|
||
}
|
||
return o;
|
||
}
|
||
var EN = Au(function(t) {
|
||
return TN(Iu(t, 1, Jm, !0));
|
||
});
|
||
const CN = EN;
|
||
var SN = 0;
|
||
function Fu(t) {
|
||
var e = ++SN;
|
||
return Mm(t) + e;
|
||
}
|
||
function AN(t, e, r) {
|
||
for (var n = -1, i = t.length, s = e.length, a = {}; ++n < i; ) {
|
||
var o = n < s ? e[n] : void 0;
|
||
r(a, t[n], o);
|
||
}
|
||
return a;
|
||
}
|
||
function LN(t, e) {
|
||
return AN(t || [], e || [], Su);
|
||
}
|
||
var DN = "\0", as = "\0", X2 = "";
|
||
class lr {
|
||
constructor(e = {}) {
|
||
this._isDirected = _e(e, "directed") ? e.directed : !0, this._isMultigraph = _e(e, "multigraph") ? e.multigraph : !1, this._isCompound = _e(e, "compound") ? e.compound : !1, this._label = void 0, this._defaultNodeLabelFn = Qs(void 0), this._defaultEdgeLabelFn = Qs(void 0), this._nodes = {}, this._isCompound && (this._parent = {}, this._children = {}, this._children[as] = {}), this._in = {}, this._preds = {}, this._out = {}, this._sucs = {}, this._edgeObjs = {}, this._edgeLabels = {};
|
||
}
|
||
isDirected() {
|
||
return this._isDirected;
|
||
}
|
||
isMultigraph() {
|
||
return this._isMultigraph;
|
||
}
|
||
isCompound() {
|
||
return this._isCompound;
|
||
}
|
||
setGraph(e) {
|
||
return this._label = e, this;
|
||
}
|
||
graph() {
|
||
return this._label;
|
||
}
|
||
setDefaultNodeLabel(e) {
|
||
return ma(e) || (e = Qs(e)), this._defaultNodeLabelFn = e, this;
|
||
}
|
||
nodeCount() {
|
||
return this._nodeCount;
|
||
}
|
||
nodes() {
|
||
return Xr(this._nodes);
|
||
}
|
||
sources() {
|
||
var e = this;
|
||
return yi(this.nodes(), function(r) {
|
||
return ia(e._in[r]);
|
||
});
|
||
}
|
||
sinks() {
|
||
var e = this;
|
||
return yi(this.nodes(), function(r) {
|
||
return ia(e._out[r]);
|
||
});
|
||
}
|
||
setNodes(e, r) {
|
||
var n = arguments, i = this;
|
||
return kt(e, function(s) {
|
||
n.length > 1 ? i.setNode(s, r) : i.setNode(s);
|
||
}), this;
|
||
}
|
||
setNode(e, r) {
|
||
return _e(this._nodes, e) ? (arguments.length > 1 && (this._nodes[e] = r), this) : (this._nodes[e] = arguments.length > 1 ? r : this._defaultNodeLabelFn(e), this._isCompound && (this._parent[e] = as, this._children[e] = {}, this._children[as][e] = !0), this._in[e] = {}, this._preds[e] = {}, this._out[e] = {}, this._sucs[e] = {}, ++this._nodeCount, this);
|
||
}
|
||
node(e) {
|
||
return this._nodes[e];
|
||
}
|
||
hasNode(e) {
|
||
return _e(this._nodes, e);
|
||
}
|
||
removeNode(e) {
|
||
var r = this;
|
||
if (_e(this._nodes, e)) {
|
||
var n = function(i) {
|
||
r.removeEdge(r._edgeObjs[i]);
|
||
};
|
||
delete this._nodes[e], this._isCompound && (this._removeFromParentsChildList(e), delete this._parent[e], kt(this.children(e), function(i) {
|
||
r.setParent(i);
|
||
}), delete this._children[e]), kt(Xr(this._in[e]), n), delete this._in[e], delete this._preds[e], kt(Xr(this._out[e]), n), delete this._out[e], delete this._sucs[e], --this._nodeCount;
|
||
}
|
||
return this;
|
||
}
|
||
setParent(e, r) {
|
||
if (!this._isCompound)
|
||
throw new Error("Cannot set parent in a non-compound graph");
|
||
if (Qe(r))
|
||
r = as;
|
||
else {
|
||
r += "";
|
||
for (var n = r; !Qe(n); n = this.parent(n))
|
||
if (n === e)
|
||
throw new Error("Setting " + r + " as parent of " + e + " would create a cycle");
|
||
this.setNode(r);
|
||
}
|
||
return this.setNode(e), this._removeFromParentsChildList(e), this._parent[e] = r, this._children[r][e] = !0, this;
|
||
}
|
||
_removeFromParentsChildList(e) {
|
||
delete this._children[this._parent[e]][e];
|
||
}
|
||
parent(e) {
|
||
if (this._isCompound) {
|
||
var r = this._parent[e];
|
||
if (r !== as)
|
||
return r;
|
||
}
|
||
}
|
||
children(e) {
|
||
if (Qe(e) && (e = as), this._isCompound) {
|
||
var r = this._children[e];
|
||
if (r)
|
||
return Xr(r);
|
||
} else {
|
||
if (e === as)
|
||
return this.nodes();
|
||
if (this.hasNode(e))
|
||
return [];
|
||
}
|
||
}
|
||
predecessors(e) {
|
||
var r = this._preds[e];
|
||
if (r)
|
||
return Xr(r);
|
||
}
|
||
successors(e) {
|
||
var r = this._sucs[e];
|
||
if (r)
|
||
return Xr(r);
|
||
}
|
||
neighbors(e) {
|
||
var r = this.predecessors(e);
|
||
if (r)
|
||
return CN(r, this.successors(e));
|
||
}
|
||
isLeaf(e) {
|
||
var r;
|
||
return this.isDirected() ? r = this.successors(e) : r = this.neighbors(e), r.length === 0;
|
||
}
|
||
filterNodes(e) {
|
||
var r = new this.constructor({
|
||
directed: this._isDirected,
|
||
multigraph: this._isMultigraph,
|
||
compound: this._isCompound
|
||
});
|
||
r.setGraph(this.graph());
|
||
var n = this;
|
||
kt(this._nodes, function(a, o) {
|
||
e(o) && r.setNode(o, a);
|
||
}), kt(this._edgeObjs, function(a) {
|
||
r.hasNode(a.v) && r.hasNode(a.w) && r.setEdge(a, n.edge(a));
|
||
});
|
||
var i = {};
|
||
function s(a) {
|
||
var o = n.parent(a);
|
||
return o === void 0 || r.hasNode(o) ? (i[a] = o, o) : o in i ? i[o] : s(o);
|
||
}
|
||
return this._isCompound && kt(r.nodes(), function(a) {
|
||
r.setParent(a, s(a));
|
||
}), r;
|
||
}
|
||
setDefaultEdgeLabel(e) {
|
||
return ma(e) || (e = Qs(e)), this._defaultEdgeLabelFn = e, this;
|
||
}
|
||
edgeCount() {
|
||
return this._edgeCount;
|
||
}
|
||
edges() {
|
||
return xi(this._edgeObjs);
|
||
}
|
||
setPath(e, r) {
|
||
var n = this, i = arguments;
|
||
return Qo(e, function(s, a) {
|
||
return i.length > 1 ? n.setEdge(s, a, r) : n.setEdge(s, a), a;
|
||
}), this;
|
||
}
|
||
setEdge() {
|
||
var e, r, n, i, s = !1, a = arguments[0];
|
||
typeof a == "object" && a !== null && "v" in a ? (e = a.v, r = a.w, n = a.name, arguments.length === 2 && (i = arguments[1], s = !0)) : (e = a, r = arguments[1], n = arguments[3], arguments.length > 2 && (i = arguments[2], s = !0)), e = "" + e, r = "" + r, Qe(n) || (n = "" + n);
|
||
var o = no(this._isDirected, e, r, n);
|
||
if (_e(this._edgeLabels, o))
|
||
return s && (this._edgeLabels[o] = i), this;
|
||
if (!Qe(n) && !this._isMultigraph)
|
||
throw new Error("Cannot set a named edge when isMultigraph = false");
|
||
this.setNode(e), this.setNode(r), this._edgeLabels[o] = s ? i : this._defaultEdgeLabelFn(e, r, n);
|
||
var l = MN(this._isDirected, e, r, n);
|
||
return e = l.v, r = l.w, Object.freeze(l), this._edgeObjs[o] = l, $2(this._preds[r], e), $2(this._sucs[e], r), this._in[r][o] = l, this._out[e][o] = l, this._edgeCount++, this;
|
||
}
|
||
edge(e, r, n) {
|
||
var i = arguments.length === 1 ? Mh(this._isDirected, arguments[0]) : no(this._isDirected, e, r, n);
|
||
return this._edgeLabels[i];
|
||
}
|
||
hasEdge(e, r, n) {
|
||
var i = arguments.length === 1 ? Mh(this._isDirected, arguments[0]) : no(this._isDirected, e, r, n);
|
||
return _e(this._edgeLabels, i);
|
||
}
|
||
removeEdge(e, r, n) {
|
||
var i = arguments.length === 1 ? Mh(this._isDirected, arguments[0]) : no(this._isDirected, e, r, n), s = this._edgeObjs[i];
|
||
return s && (e = s.v, r = s.w, delete this._edgeLabels[i], delete this._edgeObjs[i], K2(this._preds[r], e), K2(this._sucs[e], r), delete this._in[r][i], delete this._out[e][i], this._edgeCount--), this;
|
||
}
|
||
inEdges(e, r) {
|
||
var n = this._in[e];
|
||
if (n) {
|
||
var i = xi(n);
|
||
return r ? yi(i, function(s) {
|
||
return s.v === r;
|
||
}) : i;
|
||
}
|
||
}
|
||
outEdges(e, r) {
|
||
var n = this._out[e];
|
||
if (n) {
|
||
var i = xi(n);
|
||
return r ? yi(i, function(s) {
|
||
return s.w === r;
|
||
}) : i;
|
||
}
|
||
}
|
||
nodeEdges(e, r) {
|
||
var n = this.inEdges(e, r);
|
||
if (n)
|
||
return n.concat(this.outEdges(e, r));
|
||
}
|
||
}
|
||
lr.prototype._nodeCount = 0;
|
||
lr.prototype._edgeCount = 0;
|
||
function $2(t, e) {
|
||
t[e] ? t[e]++ : t[e] = 1;
|
||
}
|
||
function K2(t, e) {
|
||
--t[e] || delete t[e];
|
||
}
|
||
function no(t, e, r, n) {
|
||
var i = "" + e, s = "" + r;
|
||
if (!t && i > s) {
|
||
var a = i;
|
||
i = s, s = a;
|
||
}
|
||
return i + X2 + s + X2 + (Qe(n) ? DN : n);
|
||
}
|
||
function MN(t, e, r, n) {
|
||
var i = "" + e, s = "" + r;
|
||
if (!t && i > s) {
|
||
var a = i;
|
||
i = s, s = a;
|
||
}
|
||
var o = { v: i, w: s };
|
||
return n && (o.name = n), o;
|
||
}
|
||
function Mh(t, e) {
|
||
return no(t, e.v, e.w, e.name);
|
||
}
|
||
class NN {
|
||
constructor() {
|
||
var e = {};
|
||
e._next = e._prev = e, this._sentinel = e;
|
||
}
|
||
dequeue() {
|
||
var e = this._sentinel, r = e._prev;
|
||
if (r !== e)
|
||
return Z2(r), r;
|
||
}
|
||
enqueue(e) {
|
||
var r = this._sentinel;
|
||
e._prev && e._next && Z2(e), e._next = r._next, r._next._prev = e, r._next = e, e._prev = r;
|
||
}
|
||
toString() {
|
||
for (var e = [], r = this._sentinel, n = r._prev; n !== r; )
|
||
e.push(JSON.stringify(n, BN)), n = n._prev;
|
||
return "[" + e.join(", ") + "]";
|
||
}
|
||
}
|
||
function Z2(t) {
|
||
t._prev._next = t._next, t._next._prev = t._prev, delete t._next, delete t._prev;
|
||
}
|
||
function BN(t, e) {
|
||
if (t !== "_next" && t !== "_prev")
|
||
return e;
|
||
}
|
||
var IN = Qs(1);
|
||
function ON(t, e) {
|
||
if (t.nodeCount() <= 1)
|
||
return [];
|
||
var r = FN(t, e || IN), n = RN(r.graph, r.buckets, r.zeroIdx);
|
||
return Ra(
|
||
ar(n, function(i) {
|
||
return t.outEdges(i.v, i.w);
|
||
})
|
||
);
|
||
}
|
||
function RN(t, e, r) {
|
||
for (var n = [], i = e[e.length - 1], s = e[0], a; t.nodeCount(); ) {
|
||
for (; a = s.dequeue(); )
|
||
Nh(t, e, r, a);
|
||
for (; a = i.dequeue(); )
|
||
Nh(t, e, r, a);
|
||
if (t.nodeCount()) {
|
||
for (var o = e.length - 2; o > 0; --o)
|
||
if (a = e[o].dequeue(), a) {
|
||
n = n.concat(Nh(t, e, r, a, !0));
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
return n;
|
||
}
|
||
function Nh(t, e, r, n, i) {
|
||
var s = i ? [] : void 0;
|
||
return kt(t.inEdges(n.v), function(a) {
|
||
var o = t.edge(a), l = t.node(a.v);
|
||
i && s.push({ v: a.v, w: a.w }), l.out -= o, N1(e, r, l);
|
||
}), kt(t.outEdges(n.v), function(a) {
|
||
var o = t.edge(a), l = a.w, u = t.node(l);
|
||
u.in -= o, N1(e, r, u);
|
||
}), t.removeNode(n.v), s;
|
||
}
|
||
function FN(t, e) {
|
||
var r = new lr(), n = 0, i = 0;
|
||
kt(t.nodes(), function(o) {
|
||
r.setNode(o, { v: o, in: 0, out: 0 });
|
||
}), kt(t.edges(), function(o) {
|
||
var l = r.edge(o.v, o.w) || 0, u = e(o), d = l + u;
|
||
r.setEdge(o.v, o.w, d), i = Math.max(i, r.node(o.v).out += u), n = Math.max(n, r.node(o.w).in += u);
|
||
});
|
||
var s = Es(i + n + 3).map(function() {
|
||
return new NN();
|
||
}), a = n + 1;
|
||
return kt(r.nodes(), function(o) {
|
||
N1(s, a, r.node(o));
|
||
}), { graph: r, buckets: s, zeroIdx: a };
|
||
}
|
||
function N1(t, e, r) {
|
||
r.out ? r.in ? t[r.out - r.in + e].enqueue(r) : t[t.length - 1].enqueue(r) : t[0].enqueue(r);
|
||
}
|
||
function PN(t) {
|
||
var e = t.graph().acyclicer === "greedy" ? ON(t, r(t)) : YN(t);
|
||
kt(e, function(n) {
|
||
var i = t.edge(n);
|
||
t.removeEdge(n), i.forwardName = n.name, i.reversed = !0, t.setEdge(n.w, n.v, i, Fu("rev"));
|
||
});
|
||
function r(n) {
|
||
return function(i) {
|
||
return n.edge(i).weight;
|
||
};
|
||
}
|
||
}
|
||
function YN(t) {
|
||
var e = [], r = {}, n = {};
|
||
function i(s) {
|
||
_e(n, s) || (n[s] = !0, r[s] = !0, kt(t.outEdges(s), function(a) {
|
||
_e(r, a.w) ? e.push(a) : i(a.w);
|
||
}), delete r[s]);
|
||
}
|
||
return kt(t.nodes(), i), e;
|
||
}
|
||
function VN(t) {
|
||
kt(t.edges(), function(e) {
|
||
var r = t.edge(e);
|
||
if (r.reversed) {
|
||
t.removeEdge(e);
|
||
var n = r.forwardName;
|
||
delete r.reversed, delete r.forwardName, t.setEdge(e.w, e.v, r, n);
|
||
}
|
||
});
|
||
}
|
||
function Fa(t, e, r, n) {
|
||
var i;
|
||
do
|
||
i = Fu(n);
|
||
while (t.hasNode(i));
|
||
return r.dummy = e, t.setNode(i, r), i;
|
||
}
|
||
function UN(t) {
|
||
var e = new lr().setGraph(t.graph());
|
||
return kt(t.nodes(), function(r) {
|
||
e.setNode(r, t.node(r));
|
||
}), kt(t.edges(), function(r) {
|
||
var n = e.edge(r.v, r.w) || { weight: 0, minlen: 1 }, i = t.edge(r);
|
||
e.setEdge(r.v, r.w, {
|
||
weight: n.weight + i.weight,
|
||
minlen: Math.max(n.minlen, i.minlen)
|
||
});
|
||
}), e;
|
||
}
|
||
function i3(t) {
|
||
var e = new lr({ multigraph: t.isMultigraph() }).setGraph(t.graph());
|
||
return kt(t.nodes(), function(r) {
|
||
t.children(r).length || e.setNode(r, t.node(r));
|
||
}), kt(t.edges(), function(r) {
|
||
e.setEdge(r, t.edge(r));
|
||
}), e;
|
||
}
|
||
function Q2(t, e) {
|
||
var r = t.x, n = t.y, i = e.x - r, s = e.y - n, a = t.width / 2, o = t.height / 2;
|
||
if (!i && !s)
|
||
throw new Error("Not possible to find intersection inside of the rectangle");
|
||
var l, u;
|
||
return Math.abs(s) * a > Math.abs(i) * o ? (s < 0 && (o = -o), l = o * i / s, u = o) : (i < 0 && (a = -a), l = a, u = a * s / i), { x: r + l, y: n + u };
|
||
}
|
||
function Pu(t) {
|
||
var e = ar(Es(s3(t) + 1), function() {
|
||
return [];
|
||
});
|
||
return kt(t.nodes(), function(r) {
|
||
var n = t.node(r), i = n.rank;
|
||
Qe(i) || (e[i][n.order] = r);
|
||
}), e;
|
||
}
|
||
function zN(t) {
|
||
var e = Ro(
|
||
ar(t.nodes(), function(r) {
|
||
return t.node(r).rank;
|
||
})
|
||
);
|
||
kt(t.nodes(), function(r) {
|
||
var n = t.node(r);
|
||
_e(n, "rank") && (n.rank -= e);
|
||
});
|
||
}
|
||
function WN(t) {
|
||
var e = Ro(
|
||
ar(t.nodes(), function(s) {
|
||
return t.node(s).rank;
|
||
})
|
||
), r = [];
|
||
kt(t.nodes(), function(s) {
|
||
var a = t.node(s).rank - e;
|
||
r[a] || (r[a] = []), r[a].push(s);
|
||
});
|
||
var n = 0, i = t.graph().nodeRankFactor;
|
||
kt(r, function(s, a) {
|
||
Qe(s) && a % i !== 0 ? --n : n && kt(s, function(o) {
|
||
t.node(o).rank += n;
|
||
});
|
||
});
|
||
}
|
||
function J2(t, e, r, n) {
|
||
var i = {
|
||
width: 0,
|
||
height: 0
|
||
};
|
||
return arguments.length >= 4 && (i.rank = r, i.order = n), Fa(t, "border", i, e);
|
||
}
|
||
function s3(t) {
|
||
return Ts(
|
||
ar(t.nodes(), function(e) {
|
||
var r = t.node(e).rank;
|
||
if (!Qe(r))
|
||
return r;
|
||
})
|
||
);
|
||
}
|
||
function HN(t, e) {
|
||
var r = { lhs: [], rhs: [] };
|
||
return kt(t, function(n) {
|
||
e(n) ? r.lhs.push(n) : r.rhs.push(n);
|
||
}), r;
|
||
}
|
||
function GN(t, e) {
|
||
var r = j2();
|
||
try {
|
||
return e();
|
||
} finally {
|
||
console.log(t + " time: " + (j2() - r) + "ms");
|
||
}
|
||
}
|
||
function qN(t, e) {
|
||
return e();
|
||
}
|
||
function jN(t) {
|
||
function e(r) {
|
||
var n = t.children(r), i = t.node(r);
|
||
if (n.length && kt(n, e), _e(i, "minRank")) {
|
||
i.borderLeft = [], i.borderRight = [];
|
||
for (var s = i.minRank, a = i.maxRank + 1; s < a; ++s)
|
||
tp(t, "borderLeft", "_bl", r, i, s), tp(t, "borderRight", "_br", r, i, s);
|
||
}
|
||
}
|
||
kt(t.children(), e);
|
||
}
|
||
function tp(t, e, r, n, i, s) {
|
||
var a = { width: 0, height: 0, rank: s, borderType: e }, o = i[e][s - 1], l = Fa(t, "border", a, r);
|
||
i[e][s] = l, t.setParent(l, n), o && t.setEdge(o, l, { weight: 1 });
|
||
}
|
||
function XN(t) {
|
||
var e = t.graph().rankdir.toLowerCase();
|
||
(e === "lr" || e === "rl") && a3(t);
|
||
}
|
||
function $N(t) {
|
||
var e = t.graph().rankdir.toLowerCase();
|
||
(e === "bt" || e === "rl") && KN(t), (e === "lr" || e === "rl") && (ZN(t), a3(t));
|
||
}
|
||
function a3(t) {
|
||
kt(t.nodes(), function(e) {
|
||
ep(t.node(e));
|
||
}), kt(t.edges(), function(e) {
|
||
ep(t.edge(e));
|
||
});
|
||
}
|
||
function ep(t) {
|
||
var e = t.width;
|
||
t.width = t.height, t.height = e;
|
||
}
|
||
function KN(t) {
|
||
kt(t.nodes(), function(e) {
|
||
Bh(t.node(e));
|
||
}), kt(t.edges(), function(e) {
|
||
var r = t.edge(e);
|
||
kt(r.points, Bh), _e(r, "y") && Bh(r);
|
||
});
|
||
}
|
||
function Bh(t) {
|
||
t.y = -t.y;
|
||
}
|
||
function ZN(t) {
|
||
kt(t.nodes(), function(e) {
|
||
Ih(t.node(e));
|
||
}), kt(t.edges(), function(e) {
|
||
var r = t.edge(e);
|
||
kt(r.points, Ih), _e(r, "x") && Ih(r);
|
||
});
|
||
}
|
||
function Ih(t) {
|
||
var e = t.x;
|
||
t.x = t.y, t.y = e;
|
||
}
|
||
function QN(t) {
|
||
var e = Fa(t, "root", {}, "_root"), r = JN(t), n = Ts(xi(r)) - 1, i = 2 * n + 1;
|
||
t.graph().nestingRoot = e, kt(t.edges(), function(a) {
|
||
t.edge(a).minlen *= i;
|
||
});
|
||
var s = tB(t) + 1;
|
||
kt(t.children(), function(a) {
|
||
o3(t, e, i, s, n, r, a);
|
||
}), t.graph().nodeRankFactor = i;
|
||
}
|
||
function o3(t, e, r, n, i, s, a) {
|
||
var o = t.children(a);
|
||
if (!o.length) {
|
||
a !== e && t.setEdge(e, a, { weight: 0, minlen: r });
|
||
return;
|
||
}
|
||
var l = J2(t, "_bt"), u = J2(t, "_bb"), d = t.node(a);
|
||
t.setParent(l, a), d.borderTop = l, t.setParent(u, a), d.borderBottom = u, kt(o, function(f) {
|
||
o3(t, e, r, n, i, s, f);
|
||
var p = t.node(f), g = p.borderTop ? p.borderTop : f, b = p.borderBottom ? p.borderBottom : f, k = p.borderTop ? n : 2 * n, T = g !== b ? 1 : i - s[a] + 1;
|
||
t.setEdge(l, g, {
|
||
weight: k,
|
||
minlen: T,
|
||
nestingEdge: !0
|
||
}), t.setEdge(b, u, {
|
||
weight: k,
|
||
minlen: T,
|
||
nestingEdge: !0
|
||
});
|
||
}), t.parent(a) || t.setEdge(e, l, { weight: 0, minlen: i + s[a] });
|
||
}
|
||
function JN(t) {
|
||
var e = {};
|
||
function r(n, i) {
|
||
var s = t.children(n);
|
||
s && s.length && kt(s, function(a) {
|
||
r(a, i + 1);
|
||
}), e[n] = i;
|
||
}
|
||
return kt(t.children(), function(n) {
|
||
r(n, 1);
|
||
}), e;
|
||
}
|
||
function tB(t) {
|
||
return Qo(
|
||
t.edges(),
|
||
function(e, r) {
|
||
return e + t.edge(r).weight;
|
||
},
|
||
0
|
||
);
|
||
}
|
||
function eB(t) {
|
||
var e = t.graph();
|
||
t.removeNode(e.nestingRoot), delete e.nestingRoot, kt(t.edges(), function(r) {
|
||
var n = t.edge(r);
|
||
n.nestingEdge && t.removeEdge(r);
|
||
});
|
||
}
|
||
function rB(t, e, r) {
|
||
var n = {}, i;
|
||
kt(r, function(s) {
|
||
for (var a = t.parent(s), o, l; a; ) {
|
||
if (o = t.parent(a), o ? (l = n[o], n[o] = a) : (l = i, i = a), l && l !== a) {
|
||
e.setEdge(l, a);
|
||
return;
|
||
}
|
||
a = o;
|
||
}
|
||
});
|
||
}
|
||
function nB(t, e, r) {
|
||
var n = iB(t), i = new lr({ compound: !0 }).setGraph({ root: n }).setDefaultNodeLabel(function(s) {
|
||
return t.node(s);
|
||
});
|
||
return kt(t.nodes(), function(s) {
|
||
var a = t.node(s), o = t.parent(s);
|
||
(a.rank === e || a.minRank <= e && e <= a.maxRank) && (i.setNode(s), i.setParent(s, o || n), kt(t[r](s), function(l) {
|
||
var u = l.v === s ? l.w : l.v, d = i.edge(u, s), f = Qe(d) ? 0 : d.weight;
|
||
i.setEdge(u, s, { weight: t.edge(l).weight + f });
|
||
}), _e(a, "minRank") && i.setNode(s, {
|
||
borderLeft: a.borderLeft[e],
|
||
borderRight: a.borderRight[e]
|
||
}));
|
||
}), i;
|
||
}
|
||
function iB(t) {
|
||
for (var e; t.hasNode(e = Fu("_root")); )
|
||
;
|
||
return e;
|
||
}
|
||
function sB(t, e) {
|
||
for (var r = 0, n = 1; n < e.length; ++n)
|
||
r += aB(t, e[n - 1], e[n]);
|
||
return r;
|
||
}
|
||
function aB(t, e, r) {
|
||
for (var n = LN(
|
||
r,
|
||
ar(r, function(u, d) {
|
||
return d;
|
||
})
|
||
), i = Ra(
|
||
ar(e, function(u) {
|
||
return Jo(
|
||
ar(t.outEdges(u), function(d) {
|
||
return { pos: n[d.w], weight: t.edge(d).weight };
|
||
}),
|
||
"pos"
|
||
);
|
||
})
|
||
), s = 1; s < r.length; )
|
||
s <<= 1;
|
||
var a = 2 * s - 1;
|
||
s -= 1;
|
||
var o = ar(new Array(a), function() {
|
||
return 0;
|
||
}), l = 0;
|
||
return kt(
|
||
i.forEach(function(u) {
|
||
var d = u.pos + s;
|
||
o[d] += u.weight;
|
||
for (var f = 0; d > 0; )
|
||
d % 2 && (f += o[d + 1]), d = d - 1 >> 1, o[d] += u.weight;
|
||
l += u.weight * f;
|
||
})
|
||
), l;
|
||
}
|
||
function oB(t) {
|
||
var e = {}, r = yi(t.nodes(), function(o) {
|
||
return !t.children(o).length;
|
||
}), n = Ts(
|
||
ar(r, function(o) {
|
||
return t.node(o).rank;
|
||
})
|
||
), i = ar(Es(n + 1), function() {
|
||
return [];
|
||
});
|
||
function s(o) {
|
||
if (!_e(e, o)) {
|
||
e[o] = !0;
|
||
var l = t.node(o);
|
||
i[l.rank].push(o), kt(t.successors(o), s);
|
||
}
|
||
}
|
||
var a = Jo(r, function(o) {
|
||
return t.node(o).rank;
|
||
});
|
||
return kt(a, s), i;
|
||
}
|
||
function lB(t, e) {
|
||
return ar(e, function(r) {
|
||
var n = t.inEdges(r);
|
||
if (n.length) {
|
||
var i = Qo(
|
||
n,
|
||
function(s, a) {
|
||
var o = t.edge(a), l = t.node(a.v);
|
||
return {
|
||
sum: s.sum + o.weight * l.order,
|
||
weight: s.weight + o.weight
|
||
};
|
||
},
|
||
{ sum: 0, weight: 0 }
|
||
);
|
||
return {
|
||
v: r,
|
||
barycenter: i.sum / i.weight,
|
||
weight: i.weight
|
||
};
|
||
} else
|
||
return { v: r };
|
||
});
|
||
}
|
||
function cB(t, e) {
|
||
var r = {};
|
||
kt(t, function(i, s) {
|
||
var a = r[i.v] = {
|
||
indegree: 0,
|
||
in: [],
|
||
out: [],
|
||
vs: [i.v],
|
||
i: s
|
||
};
|
||
Qe(i.barycenter) || (a.barycenter = i.barycenter, a.weight = i.weight);
|
||
}), kt(e.edges(), function(i) {
|
||
var s = r[i.v], a = r[i.w];
|
||
!Qe(s) && !Qe(a) && (a.indegree++, s.out.push(r[i.w]));
|
||
});
|
||
var n = yi(r, function(i) {
|
||
return !i.indegree;
|
||
});
|
||
return uB(n);
|
||
}
|
||
function uB(t) {
|
||
var e = [];
|
||
function r(s) {
|
||
return function(a) {
|
||
a.merged || (Qe(a.barycenter) || Qe(s.barycenter) || a.barycenter >= s.barycenter) && hB(s, a);
|
||
};
|
||
}
|
||
function n(s) {
|
||
return function(a) {
|
||
a.in.push(s), --a.indegree === 0 && t.push(a);
|
||
};
|
||
}
|
||
for (; t.length; ) {
|
||
var i = t.pop();
|
||
e.push(i), kt(i.in.reverse(), r(i)), kt(i.out, n(i));
|
||
}
|
||
return ar(
|
||
yi(e, function(s) {
|
||
return !s.merged;
|
||
}),
|
||
function(s) {
|
||
return Fo(s, ["vs", "i", "barycenter", "weight"]);
|
||
}
|
||
);
|
||
}
|
||
function hB(t, e) {
|
||
var r = 0, n = 0;
|
||
t.weight && (r += t.barycenter * t.weight, n += t.weight), e.weight && (r += e.barycenter * e.weight, n += e.weight), t.vs = e.vs.concat(t.vs), t.barycenter = r / n, t.weight = n, t.i = Math.min(e.i, t.i), e.merged = !0;
|
||
}
|
||
function dB(t, e) {
|
||
var r = HN(t, function(d) {
|
||
return _e(d, "barycenter");
|
||
}), n = r.lhs, i = Jo(r.rhs, function(d) {
|
||
return -d.i;
|
||
}), s = [], a = 0, o = 0, l = 0;
|
||
n.sort(fB(!!e)), l = rp(s, i, l), kt(n, function(d) {
|
||
l += d.vs.length, s.push(d.vs), a += d.barycenter * d.weight, o += d.weight, l = rp(s, i, l);
|
||
});
|
||
var u = { vs: Ra(s) };
|
||
return o && (u.barycenter = a / o, u.weight = o), u;
|
||
}
|
||
function rp(t, e, r) {
|
||
for (var n; e.length && (n = jc(e)).i <= r; )
|
||
e.pop(), t.push(n.vs), r++;
|
||
return r;
|
||
}
|
||
function fB(t) {
|
||
return function(e, r) {
|
||
return e.barycenter < r.barycenter ? -1 : e.barycenter > r.barycenter ? 1 : t ? r.i - e.i : e.i - r.i;
|
||
};
|
||
}
|
||
function l3(t, e, r, n) {
|
||
var i = t.children(e), s = t.node(e), a = s ? s.borderLeft : void 0, o = s ? s.borderRight : void 0, l = {};
|
||
a && (i = yi(i, function(b) {
|
||
return b !== a && b !== o;
|
||
}));
|
||
var u = lB(t, i);
|
||
kt(u, function(b) {
|
||
if (t.children(b.v).length) {
|
||
var k = l3(t, b.v, r, n);
|
||
l[b.v] = k, _e(k, "barycenter") && gB(b, k);
|
||
}
|
||
});
|
||
var d = cB(u, r);
|
||
pB(d, l);
|
||
var f = dB(d, n);
|
||
if (a && (f.vs = Ra([a, f.vs, o]), t.predecessors(a).length)) {
|
||
var p = t.node(t.predecessors(a)[0]), g = t.node(t.predecessors(o)[0]);
|
||
_e(f, "barycenter") || (f.barycenter = 0, f.weight = 0), f.barycenter = (f.barycenter * f.weight + p.order + g.order) / (f.weight + 2), f.weight += 2;
|
||
}
|
||
return f;
|
||
}
|
||
function pB(t, e) {
|
||
kt(t, function(r) {
|
||
r.vs = Ra(
|
||
r.vs.map(function(n) {
|
||
return e[n] ? e[n].vs : n;
|
||
})
|
||
);
|
||
});
|
||
}
|
||
function gB(t, e) {
|
||
Qe(t.barycenter) ? (t.barycenter = e.barycenter, t.weight = e.weight) : (t.barycenter = (t.barycenter * t.weight + e.barycenter * e.weight) / (t.weight + e.weight), t.weight += e.weight);
|
||
}
|
||
function yB(t) {
|
||
var e = s3(t), r = np(t, Es(1, e + 1), "inEdges"), n = np(t, Es(e - 1, -1, -1), "outEdges"), i = oB(t);
|
||
ip(t, i);
|
||
for (var s = Number.POSITIVE_INFINITY, a, o = 0, l = 0; l < 4; ++o, ++l) {
|
||
mB(o % 2 ? r : n, o % 4 >= 2), i = Pu(t);
|
||
var u = sB(t, i);
|
||
u < s && (l = 0, a = qD(i), s = u);
|
||
}
|
||
ip(t, a);
|
||
}
|
||
function np(t, e, r) {
|
||
return ar(e, function(n) {
|
||
return nB(t, n, r);
|
||
});
|
||
}
|
||
function mB(t, e) {
|
||
var r = new lr();
|
||
kt(t, function(n) {
|
||
var i = n.graph().root, s = l3(n, i, r, e);
|
||
kt(s.vs, function(a, o) {
|
||
n.node(a).order = o;
|
||
}), rB(n, r, s.vs);
|
||
});
|
||
}
|
||
function ip(t, e) {
|
||
kt(e, function(r) {
|
||
kt(r, function(n, i) {
|
||
t.node(n).order = i;
|
||
});
|
||
});
|
||
}
|
||
function bB(t) {
|
||
var e = xB(t);
|
||
kt(t.graph().dummyChains, function(r) {
|
||
for (var n = t.node(r), i = n.edgeObj, s = _B(t, e, i.v, i.w), a = s.path, o = s.lca, l = 0, u = a[l], d = !0; r !== i.w; ) {
|
||
if (n = t.node(r), d) {
|
||
for (; (u = a[l]) !== o && t.node(u).maxRank < n.rank; )
|
||
l++;
|
||
u === o && (d = !1);
|
||
}
|
||
if (!d) {
|
||
for (; l < a.length - 1 && t.node(u = a[l + 1]).minRank <= n.rank; )
|
||
l++;
|
||
u = a[l];
|
||
}
|
||
t.setParent(r, u), r = t.successors(r)[0];
|
||
}
|
||
});
|
||
}
|
||
function _B(t, e, r, n) {
|
||
var i = [], s = [], a = Math.min(e[r].low, e[n].low), o = Math.max(e[r].lim, e[n].lim), l, u;
|
||
l = r;
|
||
do
|
||
l = t.parent(l), i.push(l);
|
||
while (l && (e[l].low > a || o > e[l].lim));
|
||
for (u = l, l = n; (l = t.parent(l)) !== u; )
|
||
s.push(l);
|
||
return { path: i.concat(s.reverse()), lca: u };
|
||
}
|
||
function xB(t) {
|
||
var e = {}, r = 0;
|
||
function n(i) {
|
||
var s = r;
|
||
kt(t.children(i), n), e[i] = { low: s, lim: r++ };
|
||
}
|
||
return kt(t.children(), n), e;
|
||
}
|
||
function vB(t, e) {
|
||
var r = {};
|
||
function n(i, s) {
|
||
var a = 0, o = 0, l = i.length, u = jc(s);
|
||
return kt(s, function(d, f) {
|
||
var p = wB(t, d), g = p ? t.node(p).order : l;
|
||
(p || d === u) && (kt(s.slice(o, f + 1), function(b) {
|
||
kt(t.predecessors(b), function(k) {
|
||
var T = t.node(k), L = T.order;
|
||
(L < a || g < L) && !(T.dummy && t.node(b).dummy) && c3(r, k, b);
|
||
});
|
||
}), o = f + 1, a = g);
|
||
}), s;
|
||
}
|
||
return Qo(e, n), r;
|
||
}
|
||
function kB(t, e) {
|
||
var r = {};
|
||
function n(s, a, o, l, u) {
|
||
var d;
|
||
kt(Es(a, o), function(f) {
|
||
d = s[f], t.node(d).dummy && kt(t.predecessors(d), function(p) {
|
||
var g = t.node(p);
|
||
g.dummy && (g.order < l || g.order > u) && c3(r, p, d);
|
||
});
|
||
});
|
||
}
|
||
function i(s, a) {
|
||
var o = -1, l, u = 0;
|
||
return kt(a, function(d, f) {
|
||
if (t.node(d).dummy === "border") {
|
||
var p = t.predecessors(d);
|
||
p.length && (l = t.node(p[0]).order, n(a, u, f, o, l), u = f, o = l);
|
||
}
|
||
n(a, u, a.length, l, s.length);
|
||
}), a;
|
||
}
|
||
return Qo(e, i), r;
|
||
}
|
||
function wB(t, e) {
|
||
if (t.node(e).dummy)
|
||
return nd(t.predecessors(e), function(r) {
|
||
return t.node(r).dummy;
|
||
});
|
||
}
|
||
function c3(t, e, r) {
|
||
if (e > r) {
|
||
var n = e;
|
||
e = r, r = n;
|
||
}
|
||
var i = t[e];
|
||
i || (t[e] = i = {}), i[r] = !0;
|
||
}
|
||
function TB(t, e, r) {
|
||
if (e > r) {
|
||
var n = e;
|
||
e = r, r = n;
|
||
}
|
||
return _e(t[e], r);
|
||
}
|
||
function EB(t, e, r, n) {
|
||
var i = {}, s = {}, a = {};
|
||
return kt(e, function(o) {
|
||
kt(o, function(l, u) {
|
||
i[l] = l, s[l] = l, a[l] = u;
|
||
});
|
||
}), kt(e, function(o) {
|
||
var l = -1;
|
||
kt(o, function(u) {
|
||
var d = n(u);
|
||
if (d.length) {
|
||
d = Jo(d, function(k) {
|
||
return a[k];
|
||
});
|
||
for (var f = (d.length - 1) / 2, p = Math.floor(f), g = Math.ceil(f); p <= g; ++p) {
|
||
var b = d[p];
|
||
s[u] === u && l < a[b] && !TB(r, u, b) && (s[b] = u, s[u] = i[u] = i[b], l = a[b]);
|
||
}
|
||
}
|
||
});
|
||
}), { root: i, align: s };
|
||
}
|
||
function CB(t, e, r, n, i) {
|
||
var s = {}, a = SB(t, e, r, i), o = i ? "borderLeft" : "borderRight";
|
||
function l(f, p) {
|
||
for (var g = a.nodes(), b = g.pop(), k = {}; b; )
|
||
k[b] ? f(b) : (k[b] = !0, g.push(b), g = g.concat(p(b))), b = g.pop();
|
||
}
|
||
function u(f) {
|
||
s[f] = a.inEdges(f).reduce(function(p, g) {
|
||
return Math.max(p, s[g.v] + a.edge(g));
|
||
}, 0);
|
||
}
|
||
function d(f) {
|
||
var p = a.outEdges(f).reduce(function(b, k) {
|
||
return Math.min(b, s[k.w] - a.edge(k));
|
||
}, Number.POSITIVE_INFINITY), g = t.node(f);
|
||
p !== Number.POSITIVE_INFINITY && g.borderType !== o && (s[f] = Math.max(s[f], p));
|
||
}
|
||
return l(u, a.predecessors.bind(a)), l(d, a.successors.bind(a)), kt(n, function(f) {
|
||
s[f] = s[r[f]];
|
||
}), s;
|
||
}
|
||
function SB(t, e, r, n) {
|
||
var i = new lr(), s = t.graph(), a = NB(s.nodesep, s.edgesep, n);
|
||
return kt(e, function(o) {
|
||
var l;
|
||
kt(o, function(u) {
|
||
var d = r[u];
|
||
if (i.setNode(d), l) {
|
||
var f = r[l], p = i.edge(f, d);
|
||
i.setEdge(f, d, Math.max(a(t, u, l), p || 0));
|
||
}
|
||
l = u;
|
||
});
|
||
}), i;
|
||
}
|
||
function AB(t, e) {
|
||
return sd(xi(e), function(r) {
|
||
var n = Number.NEGATIVE_INFINITY, i = Number.POSITIVE_INFINITY;
|
||
return XM(r, function(s, a) {
|
||
var o = BB(t, a) / 2;
|
||
n = Math.max(s + o, n), i = Math.min(s - o, i);
|
||
}), n - i;
|
||
});
|
||
}
|
||
function LB(t, e) {
|
||
var r = xi(e), n = Ro(r), i = Ts(r);
|
||
kt(["u", "d"], function(s) {
|
||
kt(["l", "r"], function(a) {
|
||
var o = s + a, l = t[o], u;
|
||
if (l !== e) {
|
||
var d = xi(l);
|
||
u = a === "l" ? n - Ro(d) : i - Ts(d), u && (t[o] = Ru(l, function(f) {
|
||
return f + u;
|
||
}));
|
||
}
|
||
});
|
||
});
|
||
}
|
||
function DB(t, e) {
|
||
return Ru(t.ul, function(r, n) {
|
||
if (e)
|
||
return t[e.toLowerCase()][n];
|
||
var i = Jo(ar(t, n));
|
||
return (i[1] + i[2]) / 2;
|
||
});
|
||
}
|
||
function MB(t) {
|
||
var e = Pu(t), r = M1(vB(t, e), kB(t, e)), n = {}, i;
|
||
kt(["u", "d"], function(a) {
|
||
i = a === "u" ? e : xi(e).reverse(), kt(["l", "r"], function(o) {
|
||
o === "r" && (i = ar(i, function(f) {
|
||
return xi(f).reverse();
|
||
}));
|
||
var l = (a === "u" ? t.predecessors : t.successors).bind(t), u = EB(t, i, r, l), d = CB(t, i, u.root, u.align, o === "r");
|
||
o === "r" && (d = Ru(d, function(f) {
|
||
return -f;
|
||
})), n[a + o] = d;
|
||
});
|
||
});
|
||
var s = AB(t, n);
|
||
return LB(n, s), DB(n, t.graph().align);
|
||
}
|
||
function NB(t, e, r) {
|
||
return function(n, i, s) {
|
||
var a = n.node(i), o = n.node(s), l = 0, u;
|
||
if (l += a.width / 2, _e(a, "labelpos"))
|
||
switch (a.labelpos.toLowerCase()) {
|
||
case "l":
|
||
u = -a.width / 2;
|
||
break;
|
||
case "r":
|
||
u = a.width / 2;
|
||
break;
|
||
}
|
||
if (u && (l += r ? u : -u), u = 0, l += (a.dummy ? e : t) / 2, l += (o.dummy ? e : t) / 2, l += o.width / 2, _e(o, "labelpos"))
|
||
switch (o.labelpos.toLowerCase()) {
|
||
case "l":
|
||
u = o.width / 2;
|
||
break;
|
||
case "r":
|
||
u = -o.width / 2;
|
||
break;
|
||
}
|
||
return u && (l += r ? u : -u), u = 0, l;
|
||
};
|
||
}
|
||
function BB(t, e) {
|
||
return t.node(e).width;
|
||
}
|
||
function IB(t) {
|
||
t = i3(t), OB(t), kt(MB(t), function(e, r) {
|
||
t.node(r).x = e;
|
||
});
|
||
}
|
||
function OB(t) {
|
||
var e = Pu(t), r = t.graph().ranksep, n = 0;
|
||
kt(e, function(i) {
|
||
var s = Ts(
|
||
ar(i, function(a) {
|
||
return t.node(a).height;
|
||
})
|
||
);
|
||
kt(i, function(a) {
|
||
t.node(a).y = n + s / 2;
|
||
}), n += s + r;
|
||
});
|
||
}
|
||
function Pa(t, e) {
|
||
var r = e && e.debugTiming ? GN : qN;
|
||
r("layout", function() {
|
||
var n = r(" buildLayoutGraph", function() {
|
||
return qB(t);
|
||
});
|
||
r(" runLayout", function() {
|
||
RB(n, r);
|
||
}), r(" updateInputGraph", function() {
|
||
FB(t, n);
|
||
});
|
||
});
|
||
}
|
||
function RB(t, e) {
|
||
e(" makeSpaceForEdgeLabels", function() {
|
||
jB(t);
|
||
}), e(" removeSelfEdges", function() {
|
||
rI(t);
|
||
}), e(" acyclic", function() {
|
||
PN(t);
|
||
}), e(" nestingGraph.run", function() {
|
||
QN(t);
|
||
}), e(" rank", function() {
|
||
mI(i3(t));
|
||
}), e(" injectEdgeLabelProxies", function() {
|
||
XB(t);
|
||
}), e(" removeEmptyRanks", function() {
|
||
WN(t);
|
||
}), e(" nestingGraph.cleanup", function() {
|
||
eB(t);
|
||
}), e(" normalizeRanks", function() {
|
||
zN(t);
|
||
}), e(" assignRankMinMax", function() {
|
||
$B(t);
|
||
}), e(" removeEdgeLabelProxies", function() {
|
||
KB(t);
|
||
}), e(" normalize.run", function() {
|
||
sI(t);
|
||
}), e(" parentDummyChains", function() {
|
||
bB(t);
|
||
}), e(" addBorderSegments", function() {
|
||
jN(t);
|
||
}), e(" order", function() {
|
||
yB(t);
|
||
}), e(" insertSelfEdges", function() {
|
||
nI(t);
|
||
}), e(" adjustCoordinateSystem", function() {
|
||
XN(t);
|
||
}), e(" position", function() {
|
||
IB(t);
|
||
}), e(" positionSelfEdges", function() {
|
||
iI(t);
|
||
}), e(" removeBorderNodes", function() {
|
||
eI(t);
|
||
}), e(" normalize.undo", function() {
|
||
oI(t);
|
||
}), e(" fixupEdgeLabelCoords", function() {
|
||
JB(t);
|
||
}), e(" undoCoordinateSystem", function() {
|
||
$N(t);
|
||
}), e(" translateGraph", function() {
|
||
ZB(t);
|
||
}), e(" assignNodeIntersects", function() {
|
||
QB(t);
|
||
}), e(" reversePoints", function() {
|
||
tI(t);
|
||
}), e(" acyclic.undo", function() {
|
||
VN(t);
|
||
});
|
||
}
|
||
function FB(t, e) {
|
||
kt(t.nodes(), function(r) {
|
||
var n = t.node(r), i = e.node(r);
|
||
n && (n.x = i.x, n.y = i.y, e.children(r).length && (n.width = i.width, n.height = i.height));
|
||
}), kt(t.edges(), function(r) {
|
||
var n = t.edge(r), i = e.edge(r);
|
||
n.points = i.points, _e(i, "x") && (n.x = i.x, n.y = i.y);
|
||
}), t.graph().width = e.graph().width, t.graph().height = e.graph().height;
|
||
}
|
||
var PB = ["nodesep", "edgesep", "ranksep", "marginx", "marginy"], YB = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: "tb" }, VB = ["acyclicer", "ranker", "rankdir", "align"], UB = ["width", "height"], zB = { width: 0, height: 0 }, WB = ["minlen", "weight", "width", "height", "labeloffset"], HB = {
|
||
minlen: 1,
|
||
weight: 1,
|
||
width: 0,
|
||
height: 0,
|
||
labeloffset: 10,
|
||
labelpos: "r"
|
||
}, GB = ["labelpos"];
|
||
function qB(t) {
|
||
var e = new lr({ multigraph: !0, compound: !0 }), r = Rh(t.graph());
|
||
return e.setGraph(
|
||
M1({}, YB, Oh(r, PB), Fo(r, VB))
|
||
), kt(t.nodes(), function(n) {
|
||
var i = Rh(t.node(n));
|
||
e.setNode(n, Hs(Oh(i, UB), zB)), e.setParent(n, t.parent(n));
|
||
}), kt(t.edges(), function(n) {
|
||
var i = Rh(t.edge(n));
|
||
e.setEdge(
|
||
n,
|
||
M1({}, HB, Oh(i, WB), Fo(i, GB))
|
||
);
|
||
}), e;
|
||
}
|
||
function jB(t) {
|
||
var e = t.graph();
|
||
e.ranksep /= 2, kt(t.edges(), function(r) {
|
||
var n = t.edge(r);
|
||
n.minlen *= 2, n.labelpos.toLowerCase() !== "c" && (e.rankdir === "TB" || e.rankdir === "BT" ? n.width += n.labeloffset : n.height += n.labeloffset);
|
||
});
|
||
}
|
||
function XB(t) {
|
||
kt(t.edges(), function(e) {
|
||
var r = t.edge(e);
|
||
if (r.width && r.height) {
|
||
var n = t.node(e.v), i = t.node(e.w), s = { rank: (i.rank - n.rank) / 2 + n.rank, e };
|
||
Fa(t, "edge-proxy", s, "_ep");
|
||
}
|
||
});
|
||
}
|
||
function $B(t) {
|
||
var e = 0;
|
||
kt(t.nodes(), function(r) {
|
||
var n = t.node(r);
|
||
n.borderTop && (n.minRank = t.node(n.borderTop).rank, n.maxRank = t.node(n.borderBottom).rank, e = Ts(e, n.maxRank));
|
||
}), t.graph().maxRank = e;
|
||
}
|
||
function KB(t) {
|
||
kt(t.nodes(), function(e) {
|
||
var r = t.node(e);
|
||
r.dummy === "edge-proxy" && (t.edge(r.e).labelRank = r.rank, t.removeNode(e));
|
||
});
|
||
}
|
||
function ZB(t) {
|
||
var e = Number.POSITIVE_INFINITY, r = 0, n = Number.POSITIVE_INFINITY, i = 0, s = t.graph(), a = s.marginx || 0, o = s.marginy || 0;
|
||
function l(u) {
|
||
var d = u.x, f = u.y, p = u.width, g = u.height;
|
||
e = Math.min(e, d - p / 2), r = Math.max(r, d + p / 2), n = Math.min(n, f - g / 2), i = Math.max(i, f + g / 2);
|
||
}
|
||
kt(t.nodes(), function(u) {
|
||
l(t.node(u));
|
||
}), kt(t.edges(), function(u) {
|
||
var d = t.edge(u);
|
||
_e(d, "x") && l(d);
|
||
}), e -= a, n -= o, kt(t.nodes(), function(u) {
|
||
var d = t.node(u);
|
||
d.x -= e, d.y -= n;
|
||
}), kt(t.edges(), function(u) {
|
||
var d = t.edge(u);
|
||
kt(d.points, function(f) {
|
||
f.x -= e, f.y -= n;
|
||
}), _e(d, "x") && (d.x -= e), _e(d, "y") && (d.y -= n);
|
||
}), s.width = r - e + a, s.height = i - n + o;
|
||
}
|
||
function QB(t) {
|
||
kt(t.edges(), function(e) {
|
||
var r = t.edge(e), n = t.node(e.v), i = t.node(e.w), s, a;
|
||
r.points ? (s = r.points[0], a = r.points[r.points.length - 1]) : (r.points = [], s = i, a = n), r.points.unshift(Q2(n, s)), r.points.push(Q2(i, a));
|
||
});
|
||
}
|
||
function JB(t) {
|
||
kt(t.edges(), function(e) {
|
||
var r = t.edge(e);
|
||
if (_e(r, "x"))
|
||
switch ((r.labelpos === "l" || r.labelpos === "r") && (r.width -= r.labeloffset), r.labelpos) {
|
||
case "l":
|
||
r.x -= r.width / 2 + r.labeloffset;
|
||
break;
|
||
case "r":
|
||
r.x += r.width / 2 + r.labeloffset;
|
||
break;
|
||
}
|
||
});
|
||
}
|
||
function tI(t) {
|
||
kt(t.edges(), function(e) {
|
||
var r = t.edge(e);
|
||
r.reversed && r.points.reverse();
|
||
});
|
||
}
|
||
function eI(t) {
|
||
kt(t.nodes(), function(e) {
|
||
if (t.children(e).length) {
|
||
var r = t.node(e), n = t.node(r.borderTop), i = t.node(r.borderBottom), s = t.node(jc(r.borderLeft)), a = t.node(jc(r.borderRight));
|
||
r.width = Math.abs(a.x - s.x), r.height = Math.abs(i.y - n.y), r.x = s.x + r.width / 2, r.y = n.y + r.height / 2;
|
||
}
|
||
}), kt(t.nodes(), function(e) {
|
||
t.node(e).dummy === "border" && t.removeNode(e);
|
||
});
|
||
}
|
||
function rI(t) {
|
||
kt(t.edges(), function(e) {
|
||
if (e.v === e.w) {
|
||
var r = t.node(e.v);
|
||
r.selfEdges || (r.selfEdges = []), r.selfEdges.push({ e, label: t.edge(e) }), t.removeEdge(e);
|
||
}
|
||
});
|
||
}
|
||
function nI(t) {
|
||
var e = Pu(t);
|
||
kt(e, function(r) {
|
||
var n = 0;
|
||
kt(r, function(i, s) {
|
||
var a = t.node(i);
|
||
a.order = s + n, kt(a.selfEdges, function(o) {
|
||
Fa(
|
||
t,
|
||
"selfedge",
|
||
{
|
||
width: o.label.width,
|
||
height: o.label.height,
|
||
rank: a.rank,
|
||
order: s + ++n,
|
||
e: o.e,
|
||
label: o.label
|
||
},
|
||
"_se"
|
||
);
|
||
}), delete a.selfEdges;
|
||
});
|
||
});
|
||
}
|
||
function iI(t) {
|
||
kt(t.nodes(), function(e) {
|
||
var r = t.node(e);
|
||
if (r.dummy === "selfedge") {
|
||
var n = t.node(r.e.v), i = n.x + n.width / 2, s = n.y, a = r.x - i, o = n.height / 2;
|
||
t.setEdge(r.e, r.label), t.removeNode(e), r.label.points = [
|
||
{ x: i + 2 * a / 3, y: s - o },
|
||
{ x: i + 5 * a / 6, y: s - o },
|
||
{ x: i + a, y: s },
|
||
{ x: i + 5 * a / 6, y: s + o },
|
||
{ x: i + 2 * a / 3, y: s + o }
|
||
], r.label.x = r.x, r.label.y = r.y;
|
||
}
|
||
});
|
||
}
|
||
function Oh(t, e) {
|
||
return Ru(Fo(t, e), Number);
|
||
}
|
||
function Rh(t) {
|
||
var e = {};
|
||
return kt(t, function(r, n) {
|
||
e[n.toLowerCase()] = r;
|
||
}), e;
|
||
}
|
||
function sI(t) {
|
||
t.graph().dummyChains = [], kt(t.edges(), function(e) {
|
||
aI(t, e);
|
||
});
|
||
}
|
||
function aI(t, e) {
|
||
var r = e.v, n = t.node(r).rank, i = e.w, s = t.node(i).rank, a = e.name, o = t.edge(e), l = o.labelRank;
|
||
if (s !== n + 1) {
|
||
t.removeEdge(e);
|
||
var u, d, f;
|
||
for (f = 0, ++n; n < s; ++f, ++n)
|
||
o.points = [], d = {
|
||
width: 0,
|
||
height: 0,
|
||
edgeLabel: o,
|
||
edgeObj: e,
|
||
rank: n
|
||
}, u = Fa(t, "edge", d, "_d"), n === l && (d.width = o.width, d.height = o.height, d.dummy = "edge-label", d.labelpos = o.labelpos), t.setEdge(r, u, { weight: o.weight }, a), f === 0 && t.graph().dummyChains.push(u), r = u;
|
||
t.setEdge(r, i, { weight: o.weight }, a);
|
||
}
|
||
}
|
||
function oI(t) {
|
||
kt(t.graph().dummyChains, function(e) {
|
||
var r = t.node(e), n = r.edgeLabel, i;
|
||
for (t.setEdge(r.edgeObj, n); r.dummy; )
|
||
i = t.successors(e)[0], t.removeNode(e), n.points.push({ x: r.x, y: r.y }), r.dummy === "edge-label" && (n.x = r.x, n.y = r.y, n.width = r.width, n.height = r.height), e = i, r = t.node(e);
|
||
});
|
||
}
|
||
function ad(t) {
|
||
var e = {};
|
||
function r(n) {
|
||
var i = t.node(n);
|
||
if (_e(e, n))
|
||
return i.rank;
|
||
e[n] = !0;
|
||
var s = Ro(
|
||
ar(t.outEdges(n), function(a) {
|
||
return r(a.w) - t.edge(a).minlen;
|
||
})
|
||
);
|
||
return (s === Number.POSITIVE_INFINITY || s === void 0 || s === null) && (s = 0), i.rank = s;
|
||
}
|
||
kt(t.sources(), r);
|
||
}
|
||
function Po(t, e) {
|
||
return t.node(e.w).rank - t.node(e.v).rank - t.edge(e).minlen;
|
||
}
|
||
function u3(t) {
|
||
var e = new lr({ directed: !1 }), r = t.nodes()[0], n = t.nodeCount();
|
||
e.setNode(r, {});
|
||
for (var i, s; lI(e, t) < n; )
|
||
i = cI(e, t), s = e.hasNode(i.v) ? Po(t, i) : -Po(t, i), uI(e, t, s);
|
||
return e;
|
||
}
|
||
function lI(t, e) {
|
||
function r(n) {
|
||
kt(e.nodeEdges(n), function(i) {
|
||
var s = i.v, a = n === s ? i.w : s;
|
||
!t.hasNode(a) && !Po(e, i) && (t.setNode(a, {}), t.setEdge(n, a, {}), r(a));
|
||
});
|
||
}
|
||
return kt(t.nodes(), r), t.nodeCount();
|
||
}
|
||
function cI(t, e) {
|
||
return sd(e.edges(), function(r) {
|
||
if (t.hasNode(r.v) !== t.hasNode(r.w))
|
||
return Po(e, r);
|
||
});
|
||
}
|
||
function uI(t, e, r) {
|
||
kt(t.nodes(), function(n) {
|
||
e.node(n).rank += r;
|
||
});
|
||
}
|
||
function hI() {
|
||
}
|
||
hI.prototype = new Error();
|
||
function h3(t, e, r) {
|
||
or(e) || (e = [e]);
|
||
var n = (t.isDirected() ? t.successors : t.neighbors).bind(t), i = [], s = {};
|
||
return kt(e, function(a) {
|
||
if (!t.hasNode(a))
|
||
throw new Error("Graph does not have node: " + a);
|
||
d3(t, a, r === "post", s, n, i);
|
||
}), i;
|
||
}
|
||
function d3(t, e, r, n, i, s) {
|
||
_e(n, e) || (n[e] = !0, r || s.push(e), kt(i(e), function(a) {
|
||
d3(t, a, r, n, i, s);
|
||
}), r && s.push(e));
|
||
}
|
||
function dI(t, e) {
|
||
return h3(t, e, "post");
|
||
}
|
||
function fI(t, e) {
|
||
return h3(t, e, "pre");
|
||
}
|
||
Rs.initLowLimValues = ld;
|
||
Rs.initCutValues = od;
|
||
Rs.calcCutValue = f3;
|
||
Rs.leaveEdge = g3;
|
||
Rs.enterEdge = y3;
|
||
Rs.exchangeEdges = m3;
|
||
function Rs(t) {
|
||
t = UN(t), ad(t);
|
||
var e = u3(t);
|
||
ld(e), od(e, t);
|
||
for (var r, n; r = g3(e); )
|
||
n = y3(e, t, r), m3(e, t, r, n);
|
||
}
|
||
function od(t, e) {
|
||
var r = dI(t, t.nodes());
|
||
r = r.slice(0, r.length - 1), kt(r, function(n) {
|
||
pI(t, e, n);
|
||
});
|
||
}
|
||
function pI(t, e, r) {
|
||
var n = t.node(r), i = n.parent;
|
||
t.edge(r, i).cutvalue = f3(t, e, r);
|
||
}
|
||
function f3(t, e, r) {
|
||
var n = t.node(r), i = n.parent, s = !0, a = e.edge(r, i), o = 0;
|
||
return a || (s = !1, a = e.edge(i, r)), o = a.weight, kt(e.nodeEdges(r), function(l) {
|
||
var u = l.v === r, d = u ? l.w : l.v;
|
||
if (d !== i) {
|
||
var f = u === s, p = e.edge(l).weight;
|
||
if (o += f ? p : -p, yI(t, r, d)) {
|
||
var g = t.edge(r, d).cutvalue;
|
||
o += f ? -g : g;
|
||
}
|
||
}
|
||
}), o;
|
||
}
|
||
function ld(t, e) {
|
||
arguments.length < 2 && (e = t.nodes()[0]), p3(t, {}, 1, e);
|
||
}
|
||
function p3(t, e, r, n, i) {
|
||
var s = r, a = t.node(n);
|
||
return e[n] = !0, kt(t.neighbors(n), function(o) {
|
||
_e(e, o) || (r = p3(t, e, r, o, n));
|
||
}), a.low = s, a.lim = r++, i ? a.parent = i : delete a.parent, r;
|
||
}
|
||
function g3(t) {
|
||
return nd(t.edges(), function(e) {
|
||
return t.edge(e).cutvalue < 0;
|
||
});
|
||
}
|
||
function y3(t, e, r) {
|
||
var n = r.v, i = r.w;
|
||
e.hasEdge(n, i) || (n = r.w, i = r.v);
|
||
var s = t.node(n), a = t.node(i), o = s, l = !1;
|
||
s.lim > a.lim && (o = a, l = !0);
|
||
var u = yi(e.edges(), function(d) {
|
||
return l === sp(t, t.node(d.v), o) && l !== sp(t, t.node(d.w), o);
|
||
});
|
||
return sd(u, function(d) {
|
||
return Po(e, d);
|
||
});
|
||
}
|
||
function m3(t, e, r, n) {
|
||
var i = r.v, s = r.w;
|
||
t.removeEdge(i, s), t.setEdge(n.v, n.w, {}), ld(t), od(t, e), gI(t, e);
|
||
}
|
||
function gI(t, e) {
|
||
var r = nd(t.nodes(), function(i) {
|
||
return !e.node(i).parent;
|
||
}), n = fI(t, r);
|
||
n = n.slice(1), kt(n, function(i) {
|
||
var s = t.node(i).parent, a = e.edge(i, s), o = !1;
|
||
a || (a = e.edge(s, i), o = !0), e.node(i).rank = e.node(s).rank + (o ? a.minlen : -a.minlen);
|
||
});
|
||
}
|
||
function yI(t, e, r) {
|
||
return t.hasEdge(e, r);
|
||
}
|
||
function sp(t, e, r) {
|
||
return r.low <= e.lim && e.lim <= r.lim;
|
||
}
|
||
function mI(t) {
|
||
switch (t.graph().ranker) {
|
||
case "network-simplex":
|
||
ap(t);
|
||
break;
|
||
case "tight-tree":
|
||
_I(t);
|
||
break;
|
||
case "longest-path":
|
||
bI(t);
|
||
break;
|
||
default:
|
||
ap(t);
|
||
}
|
||
}
|
||
var bI = ad;
|
||
function _I(t) {
|
||
ad(t), u3(t);
|
||
}
|
||
function ap(t) {
|
||
Rs(t);
|
||
}
|
||
let op = 0;
|
||
const xI = function(t, e, r, n, i) {
|
||
const s = function(E) {
|
||
switch (E) {
|
||
case i.db.relationType.AGGREGATION:
|
||
return "aggregation";
|
||
case i.db.relationType.EXTENSION:
|
||
return "extension";
|
||
case i.db.relationType.COMPOSITION:
|
||
return "composition";
|
||
case i.db.relationType.DEPENDENCY:
|
||
return "dependency";
|
||
case i.db.relationType.LOLLIPOP:
|
||
return "lollipop";
|
||
}
|
||
};
|
||
e.points = e.points.filter((E) => !Number.isNaN(E.y));
|
||
const a = e.points, o = Na().x(function(E) {
|
||
return E.x;
|
||
}).y(function(E) {
|
||
return E.y;
|
||
}).curve(ga), l = t.append("path").attr("d", o(a)).attr("id", "edge" + op).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.lineType == 10 && l.attr("class", "relation dotted-line"), r.relation.type1 !== "none" && l.attr(
|
||
"marker-start",
|
||
"url(" + u + "#" + s(r.relation.type1) + "Start)"
|
||
), r.relation.type2 !== "none" && l.attr(
|
||
"marker-end",
|
||
"url(" + u + "#" + s(r.relation.type2) + "End)"
|
||
);
|
||
let d, f;
|
||
const p = e.points.length;
|
||
let g = ye.calcLabelPosition(e.points);
|
||
d = g.x, f = g.y;
|
||
let b, k, T, L;
|
||
if (p % 2 !== 0 && p > 1) {
|
||
let E = ye.calcCardinalityPosition(
|
||
r.relation.type1 !== "none",
|
||
e.points,
|
||
e.points[0]
|
||
), I = ye.calcCardinalityPosition(
|
||
r.relation.type2 !== "none",
|
||
e.points,
|
||
e.points[p - 1]
|
||
);
|
||
B.debug("cardinality_1_point " + JSON.stringify(E)), B.debug("cardinality_2_point " + JSON.stringify(I)), b = E.x, k = E.y, T = I.x, L = I.y;
|
||
}
|
||
if (r.title !== void 0) {
|
||
const E = t.append("g").attr("class", "classLabel"), I = E.append("text").attr("class", "label").attr("x", d).attr("y", f).attr("fill", "red").attr("text-anchor", "middle").text(r.title);
|
||
window.label = I;
|
||
const V = I.node().getBBox();
|
||
E.insert("rect", ":first-child").attr("class", "box").attr("x", V.x - n.padding / 2).attr("y", V.y - n.padding / 2).attr("width", V.width + n.padding).attr("height", V.height + n.padding);
|
||
}
|
||
B.info("Rendering relation " + JSON.stringify(r)), r.relationTitle1 !== void 0 && r.relationTitle1 !== "none" && t.append("g").attr("class", "cardinality").append("text").attr("class", "type1").attr("x", b).attr("y", k).attr("fill", "black").attr("font-size", "6").text(r.relationTitle1), r.relationTitle2 !== void 0 && r.relationTitle2 !== "none" && t.append("g").attr("class", "cardinality").append("text").attr("class", "type2").attr("x", T).attr("y", L).attr("fill", "black").attr("font-size", "6").text(r.relationTitle2), op++;
|
||
}, vI = function(t, e, r, n) {
|
||
B.debug("Rendering class ", e, r);
|
||
const i = e.id, s = {
|
||
id: i,
|
||
label: e.id,
|
||
width: 0,
|
||
height: 0
|
||
}, a = t.append("g").attr("id", n.db.lookUpDomId(i)).attr("class", "classGroup");
|
||
let o;
|
||
e.link ? o = a.append("svg:a").attr("xlink:href", e.link).attr("target", e.linkTarget).append("text").attr("y", r.textHeight + r.padding).attr("x", 0) : o = a.append("text").attr("y", r.textHeight + r.padding).attr("x", 0);
|
||
let l = !0;
|
||
e.annotations.forEach(function(H) {
|
||
const G = o.append("tspan").text("\xAB" + H + "\xBB");
|
||
l || G.attr("dy", r.textHeight), l = !1;
|
||
});
|
||
let u = e.id;
|
||
e.type !== void 0 && e.type !== "" && (u += "<" + e.type + ">");
|
||
const d = o.append("tspan").text(u).attr("class", "title");
|
||
l || d.attr("dy", r.textHeight);
|
||
const f = o.node().getBBox().height, p = a.append("line").attr("x1", 0).attr("y1", r.padding + f + r.dividerMargin / 2).attr("y2", r.padding + f + r.dividerMargin / 2), g = a.append("text").attr("x", r.padding).attr("y", f + r.dividerMargin + r.textHeight).attr("fill", "white").attr("class", "classText");
|
||
l = !0, e.members.forEach(function(H) {
|
||
lp(g, H, l, r), l = !1;
|
||
});
|
||
const b = g.node().getBBox(), k = a.append("line").attr("x1", 0).attr("y1", r.padding + f + r.dividerMargin + b.height).attr("y2", r.padding + f + r.dividerMargin + b.height), T = a.append("text").attr("x", r.padding).attr("y", f + 2 * r.dividerMargin + b.height + r.textHeight).attr("fill", "white").attr("class", "classText");
|
||
l = !0, e.methods.forEach(function(H) {
|
||
lp(T, H, l, r), l = !1;
|
||
});
|
||
const L = a.node().getBBox();
|
||
var E = " ";
|
||
e.cssClasses.length > 0 && (E = E + e.cssClasses.join(" "));
|
||
const V = a.insert("rect", ":first-child").attr("x", 0).attr("y", 0).attr("width", L.width + 2 * r.padding).attr("height", L.height + r.padding + 0.5 * r.dividerMargin).attr("class", E).node().getBBox().width;
|
||
return o.node().childNodes.forEach(function(H) {
|
||
H.setAttribute("x", (V - H.getBBox().width) / 2);
|
||
}), e.tooltip && o.insert("title").text(e.tooltip), p.attr("x2", V), k.attr("x2", V), s.width = V, s.height = L.height + r.padding + 0.5 * r.dividerMargin, s;
|
||
}, kI = function(t, e, r, n) {
|
||
B.debug("Rendering note ", e, r);
|
||
const i = e.id, s = {
|
||
id: i,
|
||
text: e.text,
|
||
width: 0,
|
||
height: 0
|
||
}, a = t.append("g").attr("id", i).attr("class", "classGroup");
|
||
let o = a.append("text").attr("y", r.textHeight + r.padding).attr("x", 0);
|
||
const l = JSON.parse(`"${e.text}"`).split(`
|
||
`);
|
||
l.forEach(function(p) {
|
||
B.debug(`Adding line: ${p}`), o.append("tspan").text(p).attr("class", "title").attr("dy", r.textHeight);
|
||
});
|
||
const u = a.node().getBBox(), f = a.insert("rect", ":first-child").attr("x", 0).attr("y", 0).attr("width", u.width + 2 * r.padding).attr(
|
||
"height",
|
||
u.height + l.length * r.textHeight + r.padding + 0.5 * r.dividerMargin
|
||
).node().getBBox().width;
|
||
return o.node().childNodes.forEach(function(p) {
|
||
p.setAttribute("x", (f - p.getBBox().width) / 2);
|
||
}), s.width = f, s.height = u.height + l.length * r.textHeight + r.padding + 0.5 * r.dividerMargin, s;
|
||
}, Xc = 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 ? wI(n) : i ? TI(i) : EI(t);
|
||
}, wI = function(t) {
|
||
let e = "", r = "";
|
||
try {
|
||
let n = t[1] ? t[1].trim() : "", i = t[2] ? t[2].trim() : "", s = t[3] ? zi(t[3].trim()) : "", a = t[4] ? t[4].trim() : "", o = t[5] ? t[5].trim() : "";
|
||
r = n + i + s + " " + a, e = cd(o);
|
||
} catch {
|
||
r = t;
|
||
}
|
||
return {
|
||
displayText: r,
|
||
cssStyle: e
|
||
};
|
||
}, TI = function(t) {
|
||
let e = "", r = "";
|
||
try {
|
||
let n = t[1] ? t[1].trim() : "", i = t[2] ? t[2].trim() : "", s = t[3] ? zi(t[3].trim()) : "", a = t[4] ? t[4].trim() : "", o = t[5] ? " : " + zi(t[5]).trim() : "";
|
||
r = n + i + "(" + s + ")" + o, e = cd(a);
|
||
} catch {
|
||
r = t;
|
||
}
|
||
return {
|
||
displayText: r,
|
||
cssStyle: e
|
||
};
|
||
}, EI = function(t) {
|
||
let e = "", r = "", n = "", i = t.indexOf("("), s = t.indexOf(")");
|
||
if (i > 1 && s > i && s <= t.length) {
|
||
let a = "", o = "", l = t.substring(0, 1);
|
||
l.match(/\w/) ? o = t.substring(0, i).trim() : (l.match(/[#+~-]/) && (a = l), o = t.substring(1, i).trim());
|
||
const u = t.substring(i + 1, s);
|
||
t.substring(s + 1, 1), r = cd(t.substring(s + 1, s + 2)), e = a + o + "(" + zi(u.trim()) + ")", s < t.length && (n = t.substring(s + 2).trim(), n !== "" && (n = " : " + zi(n), e += n));
|
||
} else
|
||
e = zi(t);
|
||
return {
|
||
displayText: e,
|
||
cssStyle: r
|
||
};
|
||
}, lp = function(t, e, r, n) {
|
||
let i = Xc(e);
|
||
const s = t.append("tspan").attr("x", n.padding).text(i.displayText);
|
||
i.cssStyle !== "" && s.attr("style", i.cssStyle), r || s.attr("dy", n.textHeight);
|
||
}, cd = function(t) {
|
||
switch (t) {
|
||
case "*":
|
||
return "font-style:italic;";
|
||
case "$":
|
||
return "text-decoration:underline;";
|
||
default:
|
||
return "";
|
||
}
|
||
}, Fh = {
|
||
drawClass: vI,
|
||
drawEdge: xI,
|
||
drawNote: kI,
|
||
parseMember: Xc
|
||
};
|
||
let Zl = {};
|
||
const Ll = 20, $a = function(t) {
|
||
const e = Object.entries(Zl).find((r) => r[1].label === t);
|
||
if (e)
|
||
return e[0];
|
||
}, CI = 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");
|
||
}, SI = function(t, e, r, n) {
|
||
const i = X().class;
|
||
Zl = {}, B.info("Rendering diagram " + t);
|
||
const s = X().securityLevel;
|
||
let a;
|
||
s === "sandbox" && (a = At("#i" + e));
|
||
const o = At(s === "sandbox" ? a.nodes()[0].contentDocument.body : "body"), l = o.select(`[id='${e}']`);
|
||
CI(l);
|
||
const u = new lr({
|
||
multigraph: !0
|
||
});
|
||
u.setGraph({
|
||
isMultiGraph: !0
|
||
}), u.setDefaultEdgeLabel(function() {
|
||
return {};
|
||
});
|
||
const d = n.db.getClasses(), f = Object.keys(d);
|
||
for (const E of f) {
|
||
const I = d[E], V = Fh.drawClass(l, I, i, n);
|
||
Zl[V.id] = V, u.setNode(V.id, V), B.info("Org height: " + V.height);
|
||
}
|
||
n.db.getRelations().forEach(function(E) {
|
||
B.info(
|
||
"tjoho" + $a(E.id1) + $a(E.id2) + JSON.stringify(E)
|
||
), u.setEdge(
|
||
$a(E.id1),
|
||
$a(E.id2),
|
||
{
|
||
relation: E
|
||
},
|
||
E.title || "DEFAULT"
|
||
);
|
||
}), n.db.getNotes().forEach(function(E) {
|
||
B.debug(`Adding note: ${JSON.stringify(E)}`);
|
||
const I = Fh.drawNote(l, E, i, n);
|
||
Zl[I.id] = I, u.setNode(I.id, I), E.class && E.class in d && u.setEdge(
|
||
E.id,
|
||
$a(E.class),
|
||
{
|
||
relation: {
|
||
id1: E.id,
|
||
id2: E.class,
|
||
relation: {
|
||
type1: "none",
|
||
type2: "none",
|
||
lineType: 10
|
||
}
|
||
}
|
||
},
|
||
"DEFAULT"
|
||
);
|
||
}), Pa(u), u.nodes().forEach(function(E) {
|
||
E !== void 0 && u.node(E) !== void 0 && (B.debug("Node " + E + ": " + JSON.stringify(u.node(E))), o.select("#" + (n.db.lookUpDomId(E) || E)).attr(
|
||
"transform",
|
||
"translate(" + (u.node(E).x - u.node(E).width / 2) + "," + (u.node(E).y - u.node(E).height / 2) + " )"
|
||
));
|
||
}), u.edges().forEach(function(E) {
|
||
E !== void 0 && u.edge(E) !== void 0 && (B.debug("Edge " + E.v + " -> " + E.w + ": " + JSON.stringify(u.edge(E))), Fh.drawEdge(l, u.edge(E), u.edge(E).relation, i, n));
|
||
});
|
||
const b = l.node().getBBox(), k = b.width + Ll * 2, T = b.height + Ll * 2;
|
||
Ln(l, T, k, i.useMaxWidth);
|
||
const L = `${b.x - Ll} ${b.y - Ll} ${k} ${T}`;
|
||
B.debug(`viewBox ${L}`), l.attr("viewBox", L);
|
||
}, AI = {
|
||
draw: SI
|
||
};
|
||
function mi(t) {
|
||
var e = {
|
||
options: {
|
||
directed: t.isDirected(),
|
||
multigraph: t.isMultigraph(),
|
||
compound: t.isCompound()
|
||
},
|
||
nodes: LI(t),
|
||
edges: DI(t)
|
||
};
|
||
return Qe(t.graph()) || (e.value = WD(t.graph())), e;
|
||
}
|
||
function LI(t) {
|
||
return ar(t.nodes(), function(e) {
|
||
var r = t.node(e), n = t.parent(e), i = { v: e };
|
||
return Qe(r) || (i.value = r), Qe(n) || (i.parent = n), i;
|
||
});
|
||
}
|
||
function DI(t) {
|
||
return ar(t.edges(), function(e) {
|
||
var r = t.edge(e), n = { v: e.v, w: e.w };
|
||
return Qe(e.name) || (n.name = e.name), Qe(r) || (n.value = r), n;
|
||
});
|
||
}
|
||
const MI = (t, e, r, n) => {
|
||
e.forEach((i) => {
|
||
UI[i](t, r, n);
|
||
});
|
||
}, NI = (t, e, r) => {
|
||
B.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");
|
||
}, BI = (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");
|
||
}, II = (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");
|
||
}, OI = (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");
|
||
}, RI = (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);
|
||
}, FI = (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");
|
||
}, PI = (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");
|
||
}, YI = (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");
|
||
}, VI = (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");
|
||
}, UI = {
|
||
extension: NI,
|
||
composition: BI,
|
||
aggregation: II,
|
||
dependency: OI,
|
||
lollipop: RI,
|
||
point: FI,
|
||
circle: PI,
|
||
cross: YI,
|
||
barb: VI
|
||
}, zI = MI;
|
||
function WI(t, e) {
|
||
e && t.attr("style", e);
|
||
}
|
||
function HI(t) {
|
||
const e = At(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(
|
||
'<span class="' + i + '" ' + (t.labelStyle ? 'style="' + t.labelStyle + '"' : "") + ">" + n + "</span>"
|
||
), WI(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 GI = (t, e, r, n) => {
|
||
let i = t || "";
|
||
if (typeof i == "object" && (i = i[0]), gr(X().flowchart.htmlLabels)) {
|
||
i = i.replace(/\\n|\n/g, "<br />"), B.info("vertexText" + i);
|
||
const s = {
|
||
isNode: n,
|
||
label: Vd(i).replace(
|
||
/fa[blrs]?:fa-[\w-]+/g,
|
||
(o) => `<i class='${o.replace(":", " ")}'></i>`
|
||
),
|
||
labelStyle: e.replace("fill:", "color:")
|
||
};
|
||
return HI(s);
|
||
} else {
|
||
const s = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
||
s.setAttribute("style", e.replace("color:", "fill:"));
|
||
let a = [];
|
||
typeof i == "string" ? a = i.split(/\\n|\n|<br\s*\/?>/gi) : Array.isArray(i) ? a = i : a = [];
|
||
for (const o of a) {
|
||
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 = o.trim(), s.appendChild(l);
|
||
}
|
||
return s;
|
||
}
|
||
}, Vr = GI, Sr = (t, e, r, n) => {
|
||
let i;
|
||
r ? i = r : i = "node default";
|
||
const s = t.insert("g").attr("class", i).attr("id", e.domId || e.id), a = s.insert("g").attr("class", "label").attr("style", e.labelStyle);
|
||
let o;
|
||
e.labelText === void 0 ? o = "" : o = typeof e.labelText == "string" ? e.labelText : e.labelText[0];
|
||
const l = a.node().appendChild(
|
||
Vr(
|
||
wn(Vd(o), X()),
|
||
e.labelStyle,
|
||
!1,
|
||
n
|
||
)
|
||
);
|
||
let u = l.getBBox();
|
||
if (gr(X().flowchart.htmlLabels)) {
|
||
const f = l.children[0], p = At(l);
|
||
u = f.getBoundingClientRect(), p.attr("width", u.width), p.attr("height", u.height);
|
||
}
|
||
const d = e.padding / 2;
|
||
return a.attr("transform", "translate(" + -u.width / 2 + ", " + -u.height / 2 + ")"), { shapeSvg: s, bbox: u, halfPadding: d, label: a };
|
||
}, Je = (t, e) => {
|
||
const r = e.node().getBBox();
|
||
t.width = r.width, t.height = r.height;
|
||
};
|
||
function Li(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 Te = {}, yn = {}, b3 = {};
|
||
const qI = () => {
|
||
yn = {}, b3 = {}, Te = {};
|
||
}, $c = (t, e) => (B.trace("In isDecendant", e, " ", t, " = ", yn[e].includes(t)), !!yn[e].includes(t)), jI = (t, e) => (B.info("Decendants of ", e, " is ", yn[e]), B.info("Edge is ", t), t.v === e || t.w === e ? !1 : yn[e] ? yn[e].includes(t.v) || $c(t.v, e) || $c(t.w, e) || yn[e].includes(t.w) : (B.debug("Tilt, ", e, ",not in decendants"), !1)), _3 = (t, e, r, n) => {
|
||
B.warn(
|
||
"Copying children of ",
|
||
t,
|
||
"root",
|
||
n,
|
||
"data",
|
||
e.node(t),
|
||
n
|
||
);
|
||
const i = e.children(t) || [];
|
||
t !== n && i.push(t), B.warn("Copying (nodes) clusterId", t, "nodes", i), i.forEach((s) => {
|
||
if (e.children(s).length > 0)
|
||
_3(s, e, r, n);
|
||
else {
|
||
const a = e.node(s);
|
||
B.info("cp ", s, " to ", n, " with parent ", t), r.setNode(s, a), n !== e.parent(s) && (B.warn("Setting parent", s, e.parent(s)), r.setParent(s, e.parent(s))), t !== n && s !== t ? (B.debug("Setting parent", s, t), r.setParent(s, t)) : (B.info("In copy ", t, "root", n, "data", e.node(t), n), B.debug(
|
||
"Not Setting parent for node=",
|
||
s,
|
||
"cluster!==rootId",
|
||
t !== n,
|
||
"node!==clusterId",
|
||
s !== t
|
||
));
|
||
const o = e.edges(s);
|
||
B.debug("Copying Edges", o), o.forEach((l) => {
|
||
B.info("Edge", l);
|
||
const u = e.edge(l.v, l.w, l.name);
|
||
B.info("Edge data", u, n);
|
||
try {
|
||
jI(l, n) ? (B.info("Copying as ", l.v, l.w, u, l.name), r.setEdge(l.v, l.w, u, l.name), B.info("newGraph edges ", r.edges(), r.edge(r.edges()[0]))) : B.info(
|
||
"Skipping copy of edge ",
|
||
l.v,
|
||
"-->",
|
||
l.w,
|
||
" rootId: ",
|
||
n,
|
||
" clusterId:",
|
||
t
|
||
);
|
||
} catch (d) {
|
||
B.error(d);
|
||
}
|
||
});
|
||
}
|
||
B.debug("Removing node", s), e.removeNode(s);
|
||
});
|
||
}, x3 = (t, e) => {
|
||
const r = e.children(t);
|
||
let n = [...r];
|
||
for (const i of r)
|
||
b3[i] = t, n = [...n, ...x3(i, e)];
|
||
return n;
|
||
}, Yo = (t, e) => {
|
||
B.trace("Searching", t);
|
||
const r = e.children(t);
|
||
if (B.trace("Searching children of id ", t, r), r.length < 1)
|
||
return B.trace("This is a valid node", t), t;
|
||
for (const n of r) {
|
||
const i = Yo(n, e);
|
||
if (i)
|
||
return B.trace("Found replacement for", t, " => ", i), i;
|
||
}
|
||
}, Dl = (t) => !Te[t] || !Te[t].externalConnections ? t : Te[t] ? Te[t].id : t, XI = (t, e) => {
|
||
if (!t || e > 10) {
|
||
B.debug("Opting out, no graph ");
|
||
return;
|
||
} else
|
||
B.debug("Opting in, graph ");
|
||
t.nodes().forEach(function(r) {
|
||
t.children(r).length > 0 && (B.warn(
|
||
"Cluster identified",
|
||
r,
|
||
" Replacement id in edges: ",
|
||
Yo(r, t)
|
||
), yn[r] = x3(r, t), Te[r] = { id: Yo(r, t), clusterData: t.node(r) });
|
||
}), t.nodes().forEach(function(r) {
|
||
const n = t.children(r), i = t.edges();
|
||
n.length > 0 ? (B.debug("Cluster identified", r, yn), i.forEach((s) => {
|
||
if (s.v !== r && s.w !== r) {
|
||
const a = $c(s.v, r), o = $c(s.w, r);
|
||
a ^ o && (B.warn("Edge: ", s, " leaves cluster ", r), B.warn("Decendants of XXX ", r, ": ", yn[r]), Te[r].externalConnections = !0);
|
||
}
|
||
})) : B.debug("Not a cluster ", r, yn);
|
||
}), t.edges().forEach(function(r) {
|
||
const n = t.edge(r);
|
||
B.warn("Edge " + r.v + " -> " + r.w + ": " + JSON.stringify(r)), B.warn("Edge " + r.v + " -> " + r.w + ": " + JSON.stringify(t.edge(r)));
|
||
let i = r.v, s = r.w;
|
||
if (B.warn(
|
||
"Fix XXX",
|
||
Te,
|
||
"ids:",
|
||
r.v,
|
||
r.w,
|
||
"Translating: ",
|
||
Te[r.v],
|
||
" --- ",
|
||
Te[r.w]
|
||
), Te[r.v] && Te[r.w] && Te[r.v] === Te[r.w]) {
|
||
B.warn("Fixing and trixing link to self - removing XXX", r.v, r.w, r.name), B.warn("Fixing and trixing - removing XXX", r.v, r.w, r.name), i = Dl(r.v), s = Dl(r.w), t.removeEdge(r.v, r.w, r.name);
|
||
const a = r.w + "---" + r.v;
|
||
t.setNode(a, {
|
||
domId: a,
|
||
id: a,
|
||
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, a, o, r.name + "-cyclic-special"), t.setEdge(a, s, l, r.name + "-cyclic-special");
|
||
} else
|
||
(Te[r.v] || Te[r.w]) && (B.warn("Fixing and trixing - removing XXX", r.v, r.w, r.name), i = Dl(r.v), s = Dl(r.w), t.removeEdge(r.v, r.w, r.name), i !== r.v && (n.fromCluster = r.v), s !== r.w && (n.toCluster = r.w), B.warn("Fix Replacing with XXX", i, s, r.name), t.setEdge(i, s, n, r.name));
|
||
}), B.warn("Adjusted Graph", mi(t)), v3(t, 0), B.trace(Te);
|
||
}, v3 = (t, e) => {
|
||
if (B.warn("extractor - ", e, mi(t), t.children("D")), e > 10) {
|
||
B.error("Bailing out");
|
||
return;
|
||
}
|
||
let r = t.nodes(), n = !1;
|
||
for (const i of r) {
|
||
const s = t.children(i);
|
||
n = n || s.length > 0;
|
||
}
|
||
if (!n) {
|
||
B.debug("Done, no node has children", t.nodes());
|
||
return;
|
||
}
|
||
B.debug("Nodes = ", r, e);
|
||
for (const i of r)
|
||
if (B.debug(
|
||
"Extracting node",
|
||
i,
|
||
Te,
|
||
Te[i] && !Te[i].externalConnections,
|
||
!t.parent(i),
|
||
t.node(i),
|
||
t.children("D"),
|
||
" Depth ",
|
||
e
|
||
), !Te[i])
|
||
B.debug("Not a cluster", i, e);
|
||
else if (!Te[i].externalConnections && t.children(i) && t.children(i).length > 0) {
|
||
B.warn(
|
||
"Cluster without external connections, without a parent and with children",
|
||
i,
|
||
e
|
||
);
|
||
let a = t.graph().rankdir === "TB" ? "LR" : "TB";
|
||
Te[i] && Te[i].clusterData && Te[i].clusterData.dir && (a = Te[i].clusterData.dir, B.warn("Fixing dir", Te[i].clusterData.dir, a));
|
||
const o = new lr({
|
||
multigraph: !0,
|
||
compound: !0
|
||
}).setGraph({
|
||
rankdir: a,
|
||
nodesep: 50,
|
||
ranksep: 50,
|
||
marginx: 8,
|
||
marginy: 8
|
||
}).setDefaultEdgeLabel(function() {
|
||
return {};
|
||
});
|
||
B.warn("Old graph before copy", mi(t)), _3(i, t, o, i), t.setNode(i, {
|
||
clusterNode: !0,
|
||
id: i,
|
||
clusterData: Te[i].clusterData,
|
||
labelText: Te[i].labelText,
|
||
graph: o
|
||
}), B.warn("New graph after copy node: (", i, ")", mi(o)), B.debug("Old graph after copy", mi(t));
|
||
} else
|
||
B.warn(
|
||
"Cluster ** ",
|
||
i,
|
||
" **not meeting the criteria !externalConnections:",
|
||
!Te[i].externalConnections,
|
||
" no parent: ",
|
||
!t.parent(i),
|
||
" children ",
|
||
t.children(i) && t.children(i).length > 0,
|
||
t.children("D"),
|
||
e
|
||
), B.debug(Te);
|
||
r = t.nodes(), B.warn("New list of nodes", r);
|
||
for (const i of r) {
|
||
const s = t.node(i);
|
||
B.warn(" Now next level", i, s), s.clusterNode && v3(s.graph, e + 1);
|
||
}
|
||
}, k3 = (t, e) => {
|
||
if (e.length === 0)
|
||
return [];
|
||
let r = Object.assign(e);
|
||
return e.forEach((n) => {
|
||
const i = t.children(n), s = k3(t, i);
|
||
r = [...r, ...s];
|
||
}), r;
|
||
}, $I = (t) => k3(t, t.children());
|
||
function KI(t, e) {
|
||
return t.intersect(e);
|
||
}
|
||
function w3(t, e, r, n) {
|
||
var i = t.x, s = t.y, a = i - n.x, o = s - n.y, l = Math.sqrt(e * e * o * o + r * r * a * a), u = Math.abs(e * r * a / l);
|
||
n.x < i && (u = -u);
|
||
var d = Math.abs(e * r * o / l);
|
||
return n.y < s && (d = -d), { x: i + u, y: s + d };
|
||
}
|
||
function ZI(t, e, r) {
|
||
return w3(t, e, e, r);
|
||
}
|
||
function QI(t, e, r, n) {
|
||
var i, s, a, o, l, u, d, f, p, g, b, k, T, L, E;
|
||
if (i = e.y - t.y, a = t.x - e.x, l = e.x * t.y - t.x * e.y, p = i * r.x + a * r.y + l, g = i * n.x + a * n.y + l, !(p !== 0 && g !== 0 && cp(p, g)) && (s = n.y - r.y, o = r.x - n.x, u = n.x * r.y - r.x * n.y, d = s * t.x + o * t.y + u, f = s * e.x + o * e.y + u, !(d !== 0 && f !== 0 && cp(d, f)) && (b = i * o - s * a, b !== 0)))
|
||
return k = Math.abs(b / 2), T = a * u - o * l, L = T < 0 ? (T - k) / b : (T + k) / b, T = s * l - i * u, E = T < 0 ? (T - k) / b : (T + k) / b, { x: L, y: E };
|
||
}
|
||
function cp(t, e) {
|
||
return t * e > 0;
|
||
}
|
||
function JI(t, e, r) {
|
||
var n = t.x, i = t.y, s = [], a = Number.POSITIVE_INFINITY, o = Number.POSITIVE_INFINITY;
|
||
typeof e.forEach == "function" ? e.forEach(function(b) {
|
||
a = Math.min(a, b.x), o = Math.min(o, b.y);
|
||
}) : (a = Math.min(a, e.x), o = Math.min(o, e.y));
|
||
for (var l = n - t.width / 2 - a, u = i - t.height / 2 - o, d = 0; d < e.length; d++) {
|
||
var f = e[d], p = e[d < e.length - 1 ? d + 1 : 0], g = QI(
|
||
t,
|
||
r,
|
||
{ x: l + f.x, y: u + f.y },
|
||
{ x: l + p.x, y: u + p.y }
|
||
);
|
||
g && s.push(g);
|
||
}
|
||
return s.length ? (s.length > 1 && s.sort(function(b, k) {
|
||
var T = b.x - r.x, L = b.y - r.y, E = Math.sqrt(T * T + L * L), I = k.x - r.x, V = k.y - r.y, H = Math.sqrt(I * I + V * V);
|
||
return E < H ? -1 : E === H ? 0 : 1;
|
||
}), s[0]) : t;
|
||
}
|
||
const tO = (t, e) => {
|
||
var r = t.x, n = t.y, i = e.x - r, s = e.y - n, a = t.width / 2, o = t.height / 2, l, u;
|
||
return Math.abs(s) * a > Math.abs(i) * o ? (s < 0 && (o = -o), l = s === 0 ? 0 : o * i / s, u = o) : (i < 0 && (a = -a), l = a, u = i === 0 ? 0 : a * s / i), { x: r + l, y: n + u };
|
||
}, tl = tO, Xe = {
|
||
node: KI,
|
||
circle: ZI,
|
||
ellipse: w3,
|
||
polygon: JI,
|
||
rect: tl
|
||
}, eO = (t, e) => {
|
||
const { shapeSvg: r, bbox: n, halfPadding: i } = Sr(t, e, "node " + e.classes, !0);
|
||
B.info("Classes = ", e.classes);
|
||
const s = r.insert("rect", ":first-child");
|
||
return s.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), Je(e, s), e.intersect = function(a) {
|
||
return Xe.rect(e, a);
|
||
}, r;
|
||
}, rO = eO, nO = (t, e) => {
|
||
const { shapeSvg: r, bbox: n } = Sr(t, e, void 0, !0), i = n.width + e.padding, s = n.height + e.padding, a = i + s, o = [
|
||
{ x: a / 2, y: 0 },
|
||
{ x: a, y: -a / 2 },
|
||
{ x: a / 2, y: -a },
|
||
{ x: 0, y: -a / 2 }
|
||
];
|
||
B.info("Question main (Circle)");
|
||
const l = Li(r, a, a, o);
|
||
return l.attr("style", e.style), Je(e, l), e.intersect = function(u) {
|
||
return B.warn("Intersect called"), Xe.polygon(e, o, u);
|
||
}, r;
|
||
}, iO = (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(a) {
|
||
return a.x + "," + a.y;
|
||
}).join(" ")
|
||
).attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28), e.width = 28, e.height = 28, e.intersect = function(a) {
|
||
return Xe.circle(e, 14, a);
|
||
}, r;
|
||
}, sO = (t, e) => {
|
||
const { shapeSvg: r, bbox: n } = Sr(t, e, void 0, !0), i = 4, s = n.height + e.padding, a = s / i, o = n.width + 2 * a + e.padding, l = [
|
||
{ x: a, y: 0 },
|
||
{ x: o - a, y: 0 },
|
||
{ x: o, y: -s / 2 },
|
||
{ x: o - a, y: -s },
|
||
{ x: a, y: -s },
|
||
{ x: 0, y: -s / 2 }
|
||
], u = Li(r, o, s, l);
|
||
return u.attr("style", e.style), Je(e, u), e.intersect = function(d) {
|
||
return Xe.polygon(e, l, d);
|
||
}, r;
|
||
}, aO = (t, e) => {
|
||
const { shapeSvg: r, bbox: n } = Sr(t, e, void 0, !0), i = n.width + e.padding, s = n.height + e.padding, a = [
|
||
{ x: -s / 2, y: 0 },
|
||
{ x: i, y: 0 },
|
||
{ x: i, y: -s },
|
||
{ x: -s / 2, y: -s },
|
||
{ x: 0, y: -s / 2 }
|
||
];
|
||
return Li(r, i, s, a).attr("style", e.style), e.width = i + s, e.height = s, e.intersect = function(l) {
|
||
return Xe.polygon(e, a, l);
|
||
}, r;
|
||
}, oO = (t, e) => {
|
||
const { shapeSvg: r, bbox: n } = Sr(t, e, void 0, !0), i = n.width + e.padding, s = n.height + e.padding, a = [
|
||
{ x: -2 * s / 6, y: 0 },
|
||
{ x: i - s / 6, y: 0 },
|
||
{ x: i + 2 * s / 6, y: -s },
|
||
{ x: s / 6, y: -s }
|
||
], o = Li(r, i, s, a);
|
||
return o.attr("style", e.style), Je(e, o), e.intersect = function(l) {
|
||
return Xe.polygon(e, a, l);
|
||
}, r;
|
||
}, lO = (t, e) => {
|
||
const { shapeSvg: r, bbox: n } = Sr(t, e, void 0, !0), i = n.width + e.padding, s = n.height + e.padding, a = [
|
||
{ x: 2 * s / 6, y: 0 },
|
||
{ x: i + s / 6, y: 0 },
|
||
{ x: i - 2 * s / 6, y: -s },
|
||
{ x: -s / 6, y: -s }
|
||
], o = Li(r, i, s, a);
|
||
return o.attr("style", e.style), Je(e, o), e.intersect = function(l) {
|
||
return Xe.polygon(e, a, l);
|
||
}, r;
|
||
}, cO = (t, e) => {
|
||
const { shapeSvg: r, bbox: n } = Sr(t, e, void 0, !0), i = n.width + e.padding, s = n.height + e.padding, a = [
|
||
{ x: -2 * s / 6, y: 0 },
|
||
{ x: i + 2 * s / 6, y: 0 },
|
||
{ x: i - s / 6, y: -s },
|
||
{ x: s / 6, y: -s }
|
||
], o = Li(r, i, s, a);
|
||
return o.attr("style", e.style), Je(e, o), e.intersect = function(l) {
|
||
return Xe.polygon(e, a, l);
|
||
}, r;
|
||
}, uO = (t, e) => {
|
||
const { shapeSvg: r, bbox: n } = Sr(t, e, void 0, !0), i = n.width + e.padding, s = n.height + e.padding, a = [
|
||
{ x: s / 6, y: 0 },
|
||
{ x: i - s / 6, y: 0 },
|
||
{ x: i + 2 * s / 6, y: -s },
|
||
{ x: -2 * s / 6, y: -s }
|
||
], o = Li(r, i, s, a);
|
||
return o.attr("style", e.style), Je(e, o), e.intersect = function(l) {
|
||
return Xe.polygon(e, a, l);
|
||
}, r;
|
||
}, hO = (t, e) => {
|
||
const { shapeSvg: r, bbox: n } = Sr(t, e, void 0, !0), i = n.width + e.padding, s = n.height + e.padding, a = [
|
||
{ x: 0, y: 0 },
|
||
{ x: i + s / 2, y: 0 },
|
||
{ x: i, y: -s / 2 },
|
||
{ x: i + s / 2, y: -s },
|
||
{ x: 0, y: -s }
|
||
], o = Li(r, i, s, a);
|
||
return o.attr("style", e.style), Je(e, o), e.intersect = function(l) {
|
||
return Xe.polygon(e, a, l);
|
||
}, r;
|
||
}, dO = (t, e) => {
|
||
const { shapeSvg: r, bbox: n } = Sr(t, e, void 0, !0), i = n.width + e.padding, s = i / 2, a = s / (2.5 + i / 50), o = n.height + a + e.padding, l = "M 0," + a + " a " + s + "," + a + " 0,0,0 " + i + " 0 a " + s + "," + a + " 0,0,0 " + -i + " 0 l 0," + o + " a " + s + "," + a + " 0,0,0 " + i + " 0 l 0," + -o, u = r.attr("label-offset-y", a).insert("path", ":first-child").attr("style", e.style).attr("d", l).attr("transform", "translate(" + -i / 2 + "," + -(o / 2 + a) + ")");
|
||
return Je(e, u), e.intersect = function(d) {
|
||
const f = Xe.rect(e, d), p = f.x - e.x;
|
||
if (s != 0 && (Math.abs(p) < e.width / 2 || Math.abs(p) == e.width / 2 && Math.abs(f.y - e.y) > e.height / 2 - a)) {
|
||
let g = a * a * (1 - p * p / (s * s));
|
||
g != 0 && (g = Math.sqrt(g)), g = a - g, d.y - e.y > 0 && (g = -g), f.y += g;
|
||
}
|
||
return f;
|
||
}, r;
|
||
}, fO = (t, e) => {
|
||
const { shapeSvg: r, bbox: n, halfPadding: i } = Sr(t, e, "node " + e.classes, !0);
|
||
B.trace("Classes = ", e.classes);
|
||
const s = r.insert("rect", ":first-child"), a = n.width + e.padding, o = n.height + e.padding;
|
||
if (s.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", a).attr("height", o), e.props) {
|
||
const l = new Set(Object.keys(e.props));
|
||
e.props.borders && (T3(s, e.props.borders, a, o), l.delete("borders")), l.forEach((u) => {
|
||
B.warn(`Unknown node property ${u}`);
|
||
});
|
||
}
|
||
return Je(e, s), e.intersect = function(l) {
|
||
return Xe.rect(e, l);
|
||
}, r;
|
||
}, pO = (t, e) => {
|
||
const { shapeSvg: r } = Sr(t, e, "label", !0);
|
||
B.trace("Classes = ", e.classes);
|
||
const n = r.insert("rect", ":first-child"), i = 0, s = 0;
|
||
if (n.attr("width", i).attr("height", s), r.attr("class", "label edgeLabel"), e.props) {
|
||
const a = new Set(Object.keys(e.props));
|
||
e.props.borders && (T3(n, e.props.borders, i, s), a.delete("borders")), a.forEach((o) => {
|
||
B.warn(`Unknown node property ${o}`);
|
||
});
|
||
}
|
||
return Je(e, n), e.intersect = function(a) {
|
||
return Xe.rect(e, a);
|
||
}, r;
|
||
};
|
||
function T3(t, e, r, n) {
|
||
const i = [], s = (o) => {
|
||
i.push(o, 0);
|
||
}, a = (o) => {
|
||
i.push(0, o);
|
||
};
|
||
e.includes("t") ? (B.debug("add top border"), s(r)) : a(r), e.includes("r") ? (B.debug("add right border"), s(n)) : a(n), e.includes("b") ? (B.debug("add bottom border"), s(r)) : a(r), e.includes("l") ? (B.debug("add left border"), s(n)) : a(n), t.attr("stroke-dasharray", i.join(" "));
|
||
}
|
||
const gO = (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"), s = n.insert("line"), a = 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, B.info("Label text abc79", l, o, typeof o == "object");
|
||
const u = a.node().appendChild(Vr(l, e.labelStyle, !0, !0));
|
||
let d = { width: 0, height: 0 };
|
||
if (gr(X().flowchart.htmlLabels)) {
|
||
const k = u.children[0], T = At(u);
|
||
d = k.getBoundingClientRect(), T.attr("width", d.width), T.attr("height", d.height);
|
||
}
|
||
B.info("Text 2", o);
|
||
const f = o.slice(1, o.length);
|
||
let p = u.getBBox();
|
||
const g = a.node().appendChild(
|
||
Vr(f.join ? f.join("<br/>") : f, e.labelStyle, !0, !0)
|
||
);
|
||
if (gr(X().flowchart.htmlLabels)) {
|
||
const k = g.children[0], T = At(g);
|
||
d = k.getBoundingClientRect(), T.attr("width", d.width), T.attr("height", d.height);
|
||
}
|
||
const b = e.padding / 2;
|
||
return At(g).attr(
|
||
"transform",
|
||
"translate( " + (d.width > p.width ? 0 : (p.width - d.width) / 2) + ", " + (p.height + b + 5) + ")"
|
||
), At(u).attr(
|
||
"transform",
|
||
"translate( " + (d.width < p.width ? 0 : -(p.width - d.width) / 2) + ", " + 0 + ")"
|
||
), d = a.node().getBBox(), a.attr(
|
||
"transform",
|
||
"translate(" + -d.width / 2 + ", " + (-d.height / 2 - b + 3) + ")"
|
||
), i.attr("class", "outer title-state").attr("x", -d.width / 2 - b).attr("y", -d.height / 2 - b).attr("width", d.width + e.padding).attr("height", d.height + e.padding), s.attr("class", "divider").attr("x1", -d.width / 2 - b).attr("x2", d.width / 2 + b).attr("y1", -d.height / 2 - b + p.height + b).attr("y2", -d.height / 2 - b + p.height + b), Je(e, i), e.intersect = function(k) {
|
||
return Xe.rect(e, k);
|
||
}, n;
|
||
}, yO = (t, e) => {
|
||
const { shapeSvg: r, bbox: n } = Sr(t, e, void 0, !0), i = n.height + e.padding, s = n.width + i / 4 + e.padding, a = r.insert("rect", ":first-child").attr("style", e.style).attr("rx", i / 2).attr("ry", i / 2).attr("x", -s / 2).attr("y", -i / 2).attr("width", s).attr("height", i);
|
||
return Je(e, a), e.intersect = function(o) {
|
||
return Xe.rect(e, o);
|
||
}, r;
|
||
}, mO = (t, e) => {
|
||
const { shapeSvg: r, bbox: n, halfPadding: i } = Sr(t, e, void 0, !0), s = r.insert("circle", ":first-child");
|
||
return s.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), B.info("Circle main"), Je(e, s), e.intersect = function(a) {
|
||
return B.info("Circle intersect", e, n.width / 2 + i, a), Xe.circle(e, n.width / 2 + i, a);
|
||
}, r;
|
||
}, bO = (t, e) => {
|
||
const { shapeSvg: r, bbox: n, halfPadding: i } = Sr(t, e, void 0, !0), s = 5, a = r.insert("g", ":first-child"), o = a.insert("circle"), l = a.insert("circle");
|
||
return o.attr("style", e.style).attr("rx", e.rx).attr("ry", e.ry).attr("r", n.width / 2 + i + s).attr("width", n.width + e.padding + s * 2).attr("height", n.height + e.padding + s * 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), B.info("DoubleCircle main"), Je(e, o), e.intersect = function(u) {
|
||
return B.info("DoubleCircle intersect", e, n.width / 2 + i + s, u), Xe.circle(e, n.width / 2 + i + s, u);
|
||
}, r;
|
||
}, _O = (t, e) => {
|
||
const { shapeSvg: r, bbox: n } = Sr(t, e, void 0, !0), i = n.width + e.padding, s = n.height + e.padding, a = [
|
||
{ x: 0, y: 0 },
|
||
{ x: i, y: 0 },
|
||
{ x: i, y: -s },
|
||
{ x: 0, y: -s },
|
||
{ x: 0, y: 0 },
|
||
{ x: -8, y: 0 },
|
||
{ x: i + 8, y: 0 },
|
||
{ x: i + 8, y: -s },
|
||
{ x: -8, y: -s },
|
||
{ x: -8, y: 0 }
|
||
], o = Li(r, i, s, a);
|
||
return o.attr("style", e.style), Je(e, o), e.intersect = function(l) {
|
||
return Xe.polygon(e, a, l);
|
||
}, r;
|
||
}, xO = (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), Je(e, n), e.intersect = function(i) {
|
||
return Xe.circle(e, 7, i);
|
||
}, r;
|
||
}, up = (t, e, r) => {
|
||
const n = t.insert("g").attr("class", "node default").attr("id", e.domId || e.id);
|
||
let i = 70, s = 10;
|
||
r === "LR" && (i = 10, s = 70);
|
||
const a = n.append("rect").attr("x", -1 * i / 2).attr("y", -1 * s / 2).attr("width", i).attr("height", s).attr("class", "fork-join");
|
||
return Je(e, a), e.height = e.height + e.padding / 2, e.width = e.width + e.padding / 2, e.intersect = function(o) {
|
||
return Xe.rect(e, o);
|
||
}, n;
|
||
}, vO = (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), Je(e, i), e.intersect = function(s) {
|
||
return Xe.circle(e, 7, s);
|
||
}, r;
|
||
}, kO = (t, e) => {
|
||
const r = e.padding / 2, n = 4, i = 8;
|
||
let s;
|
||
e.classes ? s = "node " + e.classes : s = "node default";
|
||
const a = t.insert("g").attr("class", s).attr("id", e.domId || e.id), o = a.insert("rect", ":first-child"), l = a.insert("line"), u = a.insert("line");
|
||
let d = 0, f = n;
|
||
const p = a.insert("g").attr("class", "label");
|
||
let g = 0;
|
||
const b = e.classData.annotations && e.classData.annotations[0], k = e.classData.annotations[0] ? "\xAB" + e.classData.annotations[0] + "\xBB" : "", T = p.node().appendChild(Vr(k, e.labelStyle, !0, !0));
|
||
let L = T.getBBox();
|
||
if (gr(X().flowchart.htmlLabels)) {
|
||
const W = T.children[0], N = At(T);
|
||
L = W.getBoundingClientRect(), N.attr("width", L.width), N.attr("height", L.height);
|
||
}
|
||
e.classData.annotations[0] && (f += L.height + n, d += L.width);
|
||
let E = e.classData.id;
|
||
e.classData.type !== void 0 && e.classData.type !== "" && (X().flowchart.htmlLabels ? E += "<" + e.classData.type + ">" : E += "<" + e.classData.type + ">");
|
||
const I = p.node().appendChild(Vr(E, e.labelStyle, !0, !0));
|
||
At(I).attr("class", "classTitle");
|
||
let V = I.getBBox();
|
||
if (gr(X().flowchart.htmlLabels)) {
|
||
const W = I.children[0], N = At(I);
|
||
V = W.getBoundingClientRect(), N.attr("width", V.width), N.attr("height", V.height);
|
||
}
|
||
f += V.height + n, V.width > d && (d = V.width);
|
||
const H = [];
|
||
e.classData.members.forEach((W) => {
|
||
const N = Xc(W);
|
||
let D = N.displayText;
|
||
X().flowchart.htmlLabels && (D = D.replace(/</g, "<").replace(/>/g, ">"));
|
||
const w = p.node().appendChild(
|
||
Vr(
|
||
D,
|
||
N.cssStyle ? N.cssStyle : e.labelStyle,
|
||
!0,
|
||
!0
|
||
)
|
||
);
|
||
let v = w.getBBox();
|
||
if (gr(X().flowchart.htmlLabels)) {
|
||
const M = w.children[0], m = At(w);
|
||
v = M.getBoundingClientRect(), m.attr("width", v.width), m.attr("height", v.height);
|
||
}
|
||
v.width > d && (d = v.width), f += v.height + n, H.push(w);
|
||
}), f += i;
|
||
const G = [];
|
||
if (e.classData.methods.forEach((W) => {
|
||
const N = Xc(W);
|
||
let D = N.displayText;
|
||
X().flowchart.htmlLabels && (D = D.replace(/</g, "<").replace(/>/g, ">"));
|
||
const w = p.node().appendChild(
|
||
Vr(
|
||
D,
|
||
N.cssStyle ? N.cssStyle : e.labelStyle,
|
||
!0,
|
||
!0
|
||
)
|
||
);
|
||
let v = w.getBBox();
|
||
if (gr(X().flowchart.htmlLabels)) {
|
||
const M = w.children[0], m = At(w);
|
||
v = M.getBoundingClientRect(), m.attr("width", v.width), m.attr("height", v.height);
|
||
}
|
||
v.width > d && (d = v.width), f += v.height + n, G.push(w);
|
||
}), f += i, b) {
|
||
let W = (d - L.width) / 2;
|
||
At(T).attr(
|
||
"transform",
|
||
"translate( " + (-1 * d / 2 + W) + ", " + -1 * f / 2 + ")"
|
||
), g = L.height + n;
|
||
}
|
||
let Y = (d - V.width) / 2;
|
||
return At(I).attr(
|
||
"transform",
|
||
"translate( " + (-1 * d / 2 + Y) + ", " + (-1 * f / 2 + g) + ")"
|
||
), g += V.height + n, l.attr("class", "divider").attr("x1", -d / 2 - r).attr("x2", d / 2 + r).attr("y1", -f / 2 - r + i + g).attr("y2", -f / 2 - r + i + g), g += i, H.forEach((W) => {
|
||
At(W).attr(
|
||
"transform",
|
||
"translate( " + -d / 2 + ", " + (-1 * f / 2 + g + i / 2) + ")"
|
||
), g += V.height + n;
|
||
}), g += i, u.attr("class", "divider").attr("x1", -d / 2 - r).attr("x2", d / 2 + r).attr("y1", -f / 2 - r + i + g).attr("y2", -f / 2 - r + i + g), g += i, G.forEach((W) => {
|
||
At(W).attr(
|
||
"transform",
|
||
"translate( " + -d / 2 + ", " + (-1 * f / 2 + g) + ")"
|
||
), g += V.height + n;
|
||
}), o.attr("class", "outer title-state").attr("x", -d / 2 - r).attr("y", -(f / 2) - r).attr("width", d + e.padding).attr("height", f + e.padding), Je(e, o), e.intersect = function(W) {
|
||
return Xe.rect(e, W);
|
||
}, a;
|
||
}, hp = {
|
||
question: nO,
|
||
rect: fO,
|
||
labelRect: pO,
|
||
rectWithTitle: gO,
|
||
choice: iO,
|
||
circle: mO,
|
||
doublecircle: bO,
|
||
stadium: yO,
|
||
hexagon: sO,
|
||
rect_left_inv_arrow: aO,
|
||
lean_right: oO,
|
||
lean_left: lO,
|
||
trapezoid: cO,
|
||
inv_trapezoid: uO,
|
||
rect_right_inv_arrow: hO,
|
||
cylinder: dO,
|
||
start: xO,
|
||
end: vO,
|
||
note: rO,
|
||
subroutine: _O,
|
||
fork: up,
|
||
join: up,
|
||
class_box: kO
|
||
};
|
||
let sa = {};
|
||
const wO = (t, e, r) => {
|
||
let n, i;
|
||
if (e.link) {
|
||
let s;
|
||
X().securityLevel === "sandbox" ? s = "_top" : e.linkTarget && (s = e.linkTarget || "_blank"), n = t.insert("svg:a").attr("xlink:href", e.link).attr("target", s), i = hp[e.shape](n, e, r);
|
||
} else
|
||
i = hp[e.shape](t, e, r), n = i;
|
||
e.tooltip && i.attr("title", e.tooltip), e.class && i.attr("class", "node default " + e.class), sa[e.id] = n, e.haveCallback && sa[e.id].attr("class", sa[e.id].attr("class") + " clickable");
|
||
}, TO = (t, e) => {
|
||
sa[e.id] = t;
|
||
}, EO = () => {
|
||
sa = {};
|
||
}, dp = (t) => {
|
||
const e = sa[t.id];
|
||
B.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;
|
||
}, CO = (t, e) => {
|
||
B.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"), s = i.node().appendChild(Vr(e.labelText, e.labelStyle, void 0, !0));
|
||
let a = s.getBBox();
|
||
if (gr(X().flowchart.htmlLabels)) {
|
||
const f = s.children[0], p = At(s);
|
||
a = f.getBoundingClientRect(), p.attr("width", a.width), p.attr("height", a.height);
|
||
}
|
||
const o = 0 * e.padding, l = o / 2, u = e.width <= a.width + o ? a.width + o : e.width;
|
||
e.width <= a.width + o ? e.diff = (a.width - e.width) / 2 - e.padding / 2 : e.diff = -e.padding / 2, B.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 - a.width / 2) + ", " + (e.y - e.height / 2) + ")"
|
||
);
|
||
const d = n.node().getBBox();
|
||
return e.width = d.width, e.height = d.height, e.intersect = function(f) {
|
||
return tl(e, f);
|
||
}, r;
|
||
}, SO = (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, s = i / 2;
|
||
n.attr("rx", e.rx).attr("ry", e.ry).attr("x", e.x - e.width / 2 - s).attr("y", e.y - e.height / 2 - s).attr("width", e.width + i).attr("height", e.height + i).attr("fill", "none");
|
||
const a = n.node().getBBox();
|
||
return e.width = a.width, e.height = a.height, e.intersect = function(o) {
|
||
return tl(e, o);
|
||
}, r;
|
||
}, AO = (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"), s = r.append("rect"), a = i.node().appendChild(Vr(e.labelText, e.labelStyle, void 0, !0));
|
||
let o = a.getBBox();
|
||
if (gr(X().flowchart.htmlLabels)) {
|
||
const p = a.children[0], g = At(a);
|
||
o = p.getBoundingClientRect(), g.attr("width", o.width), g.attr("height", o.height);
|
||
}
|
||
o = a.getBBox();
|
||
const l = 0 * e.padding, u = l / 2, d = 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 - d / 2 - u).attr("y", e.y - e.height / 2 - u).attr("width", d + l).attr("height", e.height + l), s.attr("class", "inner").attr("x", e.x - d / 2 - u).attr("y", e.y - e.height / 2 - u + o.height - 1).attr("width", d + 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 + (gr(X().flowchart.htmlLabels) ? 5 : 3)) + ")"
|
||
);
|
||
const f = n.node().getBBox();
|
||
return e.height = f.height, e.intersect = function(p) {
|
||
return tl(e, p);
|
||
}, r;
|
||
}, LO = (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, s = i / 2;
|
||
n.attr("class", "divider").attr("x", e.x - e.width / 2 - s).attr("y", e.y - e.height / 2).attr("width", e.width + i).attr("height", e.height + i);
|
||
const a = n.node().getBBox();
|
||
return e.width = a.width, e.height = a.height, e.diff = -e.padding / 2, e.intersect = function(o) {
|
||
return tl(e, o);
|
||
}, r;
|
||
}, DO = { rect: CO, roundedWithTitle: AO, noteGroup: SO, divider: LO };
|
||
let E3 = {};
|
||
const MO = (t, e) => {
|
||
B.trace("Inserting cluster");
|
||
const r = e.shape || "rect";
|
||
E3[e.id] = DO[r](t, e);
|
||
}, NO = () => {
|
||
E3 = {};
|
||
};
|
||
let Kc = {}, xr = {};
|
||
const BO = () => {
|
||
Kc = {}, xr = {};
|
||
}, IO = (t, e) => {
|
||
const r = Vr(e.label, e.labelStyle), n = t.insert("g").attr("class", "edgeLabel"), i = n.insert("g").attr("class", "label");
|
||
i.node().appendChild(r);
|
||
let s = r.getBBox();
|
||
if (gr(X().flowchart.htmlLabels)) {
|
||
const o = r.children[0], l = At(r);
|
||
s = o.getBoundingClientRect(), l.attr("width", s.width), l.attr("height", s.height);
|
||
}
|
||
i.attr("transform", "translate(" + -s.width / 2 + ", " + -s.height / 2 + ")"), Kc[e.id] = n, e.width = s.width, e.height = s.height;
|
||
let a;
|
||
if (e.startLabelLeft) {
|
||
const o = Vr(e.startLabelLeft, e.labelStyle), l = t.insert("g").attr("class", "edgeTerminals"), u = l.insert("g").attr("class", "inner");
|
||
a = u.node().appendChild(o);
|
||
const d = o.getBBox();
|
||
u.attr("transform", "translate(" + -d.width / 2 + ", " + -d.height / 2 + ")"), xr[e.id] || (xr[e.id] = {}), xr[e.id].startLeft = l, Ml(a, e.startLabelLeft);
|
||
}
|
||
if (e.startLabelRight) {
|
||
const o = Vr(e.startLabelRight, e.labelStyle), l = t.insert("g").attr("class", "edgeTerminals"), u = l.insert("g").attr("class", "inner");
|
||
a = l.node().appendChild(o), u.node().appendChild(o);
|
||
const d = o.getBBox();
|
||
u.attr("transform", "translate(" + -d.width / 2 + ", " + -d.height / 2 + ")"), xr[e.id] || (xr[e.id] = {}), xr[e.id].startRight = l, Ml(a, e.startLabelRight);
|
||
}
|
||
if (e.endLabelLeft) {
|
||
const o = Vr(e.endLabelLeft, e.labelStyle), l = t.insert("g").attr("class", "edgeTerminals"), u = l.insert("g").attr("class", "inner");
|
||
a = u.node().appendChild(o);
|
||
const d = o.getBBox();
|
||
u.attr("transform", "translate(" + -d.width / 2 + ", " + -d.height / 2 + ")"), l.node().appendChild(o), xr[e.id] || (xr[e.id] = {}), xr[e.id].endLeft = l, Ml(a, e.endLabelLeft);
|
||
}
|
||
if (e.endLabelRight) {
|
||
const o = Vr(e.endLabelRight, e.labelStyle), l = t.insert("g").attr("class", "edgeTerminals"), u = l.insert("g").attr("class", "inner");
|
||
a = u.node().appendChild(o);
|
||
const d = o.getBBox();
|
||
u.attr("transform", "translate(" + -d.width / 2 + ", " + -d.height / 2 + ")"), l.node().appendChild(o), xr[e.id] || (xr[e.id] = {}), xr[e.id].endRight = l, Ml(a, e.endLabelRight);
|
||
}
|
||
};
|
||
function Ml(t, e) {
|
||
X().flowchart.htmlLabels && t && (t.style.width = e.length * 9 + "px", t.style.height = "12px");
|
||
}
|
||
const OO = (t, e) => {
|
||
B.info("Moving label abc78 ", t.id, t.label, Kc[t.id]);
|
||
let r = e.updatedPath ? e.updatedPath : e.originalPath;
|
||
if (t.label) {
|
||
const n = Kc[t.id];
|
||
let i = t.x, s = t.y;
|
||
if (r) {
|
||
const a = ye.calcLabelPosition(r);
|
||
B.info(
|
||
"Moving label " + t.label + " from (",
|
||
i,
|
||
",",
|
||
s,
|
||
") to (",
|
||
a.x,
|
||
",",
|
||
a.y,
|
||
") abc78"
|
||
), e.updatedPath && (i = a.x, s = a.y);
|
||
}
|
||
n.attr("transform", "translate(" + i + ", " + s + ")");
|
||
}
|
||
if (t.startLabelLeft) {
|
||
const n = xr[t.id].startLeft;
|
||
let i = t.x, s = t.y;
|
||
if (r) {
|
||
const a = ye.calcTerminalLabelPosition(t.arrowTypeStart ? 10 : 0, "start_left", r);
|
||
i = a.x, s = a.y;
|
||
}
|
||
n.attr("transform", "translate(" + i + ", " + s + ")");
|
||
}
|
||
if (t.startLabelRight) {
|
||
const n = xr[t.id].startRight;
|
||
let i = t.x, s = t.y;
|
||
if (r) {
|
||
const a = ye.calcTerminalLabelPosition(
|
||
t.arrowTypeStart ? 10 : 0,
|
||
"start_right",
|
||
r
|
||
);
|
||
i = a.x, s = a.y;
|
||
}
|
||
n.attr("transform", "translate(" + i + ", " + s + ")");
|
||
}
|
||
if (t.endLabelLeft) {
|
||
const n = xr[t.id].endLeft;
|
||
let i = t.x, s = t.y;
|
||
if (r) {
|
||
const a = ye.calcTerminalLabelPosition(t.arrowTypeEnd ? 10 : 0, "end_left", r);
|
||
i = a.x, s = a.y;
|
||
}
|
||
n.attr("transform", "translate(" + i + ", " + s + ")");
|
||
}
|
||
if (t.endLabelRight) {
|
||
const n = xr[t.id].endRight;
|
||
let i = t.x, s = t.y;
|
||
if (r) {
|
||
const a = ye.calcTerminalLabelPosition(t.arrowTypeEnd ? 10 : 0, "end_right", r);
|
||
i = a.x, s = a.y;
|
||
}
|
||
n.attr("transform", "translate(" + i + ", " + s + ")");
|
||
}
|
||
}, RO = (t, e) => {
|
||
const r = t.x, n = t.y, i = Math.abs(e.x - r), s = Math.abs(e.y - n), a = t.width / 2, o = t.height / 2;
|
||
return i >= a || s >= o;
|
||
}, FO = (t, e, r) => {
|
||
B.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, s = Math.abs(n - r.x), a = t.width / 2;
|
||
let o = r.x < e.x ? a - s : a + s;
|
||
const l = t.height / 2, u = Math.abs(e.y - r.y), d = Math.abs(e.x - r.x);
|
||
if (Math.abs(i - e.y) * a > Math.abs(n - e.x) * l) {
|
||
let f = r.y < e.y ? e.y - l - i : i - l - e.y;
|
||
o = d * f / u;
|
||
const p = {
|
||
x: r.x < e.x ? r.x + o : r.x - d + o,
|
||
y: r.y < e.y ? r.y + u - f : r.y - u + f
|
||
};
|
||
return o === 0 && (p.x = e.x, p.y = e.y), d === 0 && (p.x = e.x), u === 0 && (p.y = e.y), B.warn(`abc89 topp/bott calc, Q ${u}, q ${f}, R ${d}, r ${o}`, p), p;
|
||
} else {
|
||
r.x < e.x ? o = e.x - a - n : o = n - a - e.x;
|
||
let f = u * o / d, p = r.x < e.x ? r.x + d - o : r.x - d + o, g = r.y < e.y ? r.y + f : r.y - f;
|
||
return B.warn(`sides calc abc89, Q ${u}, q ${f}, R ${d}, r ${o}`, { _x: p, _y: g }), o === 0 && (p = e.x, g = e.y), d === 0 && (p = e.x), u === 0 && (g = e.y), { x: p, y: g };
|
||
}
|
||
}, fp = (t, e) => {
|
||
B.warn("abc88 cutPathAtIntersect", t, e);
|
||
let r = [], n = t[0], i = !1;
|
||
return t.forEach((s) => {
|
||
if (B.info("abc88 checking point", s, e), !RO(e, s) && !i) {
|
||
const a = FO(e, n, s);
|
||
B.warn("abc88 inside", s, n, a), B.warn("abc88 intersection", a);
|
||
let o = !1;
|
||
r.forEach((l) => {
|
||
o = o || l.x === a.x && l.y === a.y;
|
||
}), r.some((l) => l.x === a.x && l.y === a.y) ? B.warn("abc88 no intersect", a, r) : r.push(a), i = !0;
|
||
} else
|
||
B.warn("abc88 outside", s, n), n = s, i || r.push(s);
|
||
}), B.warn("abc88 returning points", r), r;
|
||
}, PO = function(t, e, r, n, i, s) {
|
||
let a = r.points, o = !1;
|
||
const l = s.node(e.v);
|
||
var u = s.node(e.w);
|
||
B.info("abc88 InsertEdge: ", r), u.intersect && l.intersect && (a = a.slice(1, r.points.length - 1), a.unshift(l.intersect(a[0])), B.info(
|
||
"Last point",
|
||
a[a.length - 1],
|
||
u,
|
||
u.intersect(a[a.length - 1])
|
||
), a.push(u.intersect(a[a.length - 1]))), r.toCluster && (B.info("to cluster abc88", n[r.toCluster]), a = fp(r.points, n[r.toCluster].node), o = !0), r.fromCluster && (B.info("from cluster abc88", n[r.fromCluster]), a = fp(a.reverse(), n[r.fromCluster].node).reverse(), o = !0);
|
||
const d = a.filter((L) => !Number.isNaN(L.y));
|
||
let f;
|
||
i === "graph" || i === "flowchart" ? f = r.curve || ga : f = ga;
|
||
const p = Na().x(function(L) {
|
||
return L.x;
|
||
}).y(function(L) {
|
||
return L.y;
|
||
}).curve(f);
|
||
let g;
|
||
switch (r.thickness) {
|
||
case "normal":
|
||
g = "edge-thickness-normal";
|
||
break;
|
||
case "thick":
|
||
g = "edge-thickness-thick";
|
||
break;
|
||
default:
|
||
g = "";
|
||
}
|
||
switch (r.pattern) {
|
||
case "solid":
|
||
g += " edge-pattern-solid";
|
||
break;
|
||
case "dotted":
|
||
g += " edge-pattern-dotted";
|
||
break;
|
||
case "dashed":
|
||
g += " edge-pattern-dashed";
|
||
break;
|
||
}
|
||
const b = t.append("path").attr("d", p(d)).attr("id", r.id).attr("class", " " + g + (r.classes ? " " + r.classes : "")).attr("style", r.style);
|
||
let k = "";
|
||
switch ((X().flowchart.arrowMarkerAbsolute || X().state.arrowMarkerAbsolute) && (k = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, k = k.replace(/\(/g, "\\("), k = k.replace(/\)/g, "\\)")), B.info("arrowTypeStart", r.arrowTypeStart), B.info("arrowTypeEnd", r.arrowTypeEnd), r.arrowTypeStart) {
|
||
case "arrow_cross":
|
||
b.attr("marker-start", "url(" + k + "#" + i + "-crossStart)");
|
||
break;
|
||
case "arrow_point":
|
||
b.attr("marker-start", "url(" + k + "#" + i + "-pointStart)");
|
||
break;
|
||
case "arrow_barb":
|
||
b.attr("marker-start", "url(" + k + "#" + i + "-barbStart)");
|
||
break;
|
||
case "arrow_circle":
|
||
b.attr("marker-start", "url(" + k + "#" + i + "-circleStart)");
|
||
break;
|
||
case "aggregation":
|
||
b.attr("marker-start", "url(" + k + "#" + i + "-aggregationStart)");
|
||
break;
|
||
case "extension":
|
||
b.attr("marker-start", "url(" + k + "#" + i + "-extensionStart)");
|
||
break;
|
||
case "composition":
|
||
b.attr("marker-start", "url(" + k + "#" + i + "-compositionStart)");
|
||
break;
|
||
case "dependency":
|
||
b.attr("marker-start", "url(" + k + "#" + i + "-dependencyStart)");
|
||
break;
|
||
case "lollipop":
|
||
b.attr("marker-start", "url(" + k + "#" + i + "-lollipopStart)");
|
||
break;
|
||
}
|
||
switch (r.arrowTypeEnd) {
|
||
case "arrow_cross":
|
||
b.attr("marker-end", "url(" + k + "#" + i + "-crossEnd)");
|
||
break;
|
||
case "arrow_point":
|
||
b.attr("marker-end", "url(" + k + "#" + i + "-pointEnd)");
|
||
break;
|
||
case "arrow_barb":
|
||
b.attr("marker-end", "url(" + k + "#" + i + "-barbEnd)");
|
||
break;
|
||
case "arrow_circle":
|
||
b.attr("marker-end", "url(" + k + "#" + i + "-circleEnd)");
|
||
break;
|
||
case "aggregation":
|
||
b.attr("marker-end", "url(" + k + "#" + i + "-aggregationEnd)");
|
||
break;
|
||
case "extension":
|
||
b.attr("marker-end", "url(" + k + "#" + i + "-extensionEnd)");
|
||
break;
|
||
case "composition":
|
||
b.attr("marker-end", "url(" + k + "#" + i + "-compositionEnd)");
|
||
break;
|
||
case "dependency":
|
||
b.attr("marker-end", "url(" + k + "#" + i + "-dependencyEnd)");
|
||
break;
|
||
case "lollipop":
|
||
b.attr("marker-end", "url(" + k + "#" + i + "-lollipopEnd)");
|
||
break;
|
||
}
|
||
let T = {};
|
||
return o && (T.updatedPath = a), T.originalPath = r.points, T;
|
||
}, C3 = (t, e, r, n) => {
|
||
B.info("Graph in recursive render: XXX", mi(e), n);
|
||
const i = e.graph().rankdir;
|
||
B.trace("Dir in recursive render - dir:", i);
|
||
const s = t.insert("g").attr("class", "root");
|
||
e.nodes() ? B.info("Recursive render XXX", e.nodes()) : B.info("No nodes found for", e), e.edges().length > 0 && B.trace("Recursive edges", e.edge(e.edges()[0]));
|
||
const a = s.insert("g").attr("class", "clusters"), o = s.insert("g").attr("class", "edgePaths"), l = s.insert("g").attr("class", "edgeLabels"), u = s.insert("g").attr("class", "nodes");
|
||
e.nodes().forEach(function(f) {
|
||
const p = e.node(f);
|
||
if (n !== void 0) {
|
||
const g = JSON.parse(JSON.stringify(n.clusterData));
|
||
B.info("Setting data for cluster XXX (", f, ") ", g, n), e.setNode(n.id, g), e.parent(f) || (B.trace("Setting parent", f, n.id), e.setParent(f, n.id, g));
|
||
}
|
||
if (B.info("(Insert) Node XXX" + f + ": " + JSON.stringify(e.node(f))), p && p.clusterNode) {
|
||
B.info("Cluster identified", f, p.width, e.node(f));
|
||
const g = C3(u, p.graph, r, e.node(f)), b = g.elem;
|
||
Je(p, b), p.diff = g.diff || 0, B.info("Node bounds (abc123)", f, p, p.width, p.x, p.y), TO(b, p), B.warn("Recursive render complete ", b, p);
|
||
} else
|
||
e.children(f).length > 0 ? (B.info("Cluster - the non recursive path XXX", f, p.id, p, e), B.info(Yo(p.id, e)), Te[p.id] = { id: Yo(p.id, e), node: p }) : (B.info("Node - the non recursive path", f, p.id, p), wO(u, e.node(f), i));
|
||
}), e.edges().forEach(function(f) {
|
||
const p = e.edge(f.v, f.w, f.name);
|
||
B.info("Edge " + f.v + " -> " + f.w + ": " + JSON.stringify(f)), B.info("Edge " + f.v + " -> " + f.w + ": ", f, " ", JSON.stringify(e.edge(f))), B.info("Fix", Te, "ids:", f.v, f.w, "Translateing: ", Te[f.v], Te[f.w]), IO(l, p);
|
||
}), e.edges().forEach(function(f) {
|
||
B.info("Edge " + f.v + " -> " + f.w + ": " + JSON.stringify(f));
|
||
}), B.info("#############################################"), B.info("### Layout ###"), B.info("#############################################"), B.info(e), Pa(e), B.info("Graph after layout:", mi(e));
|
||
let d = 0;
|
||
return $I(e).forEach(function(f) {
|
||
const p = e.node(f);
|
||
B.info("Position " + f + ": " + JSON.stringify(e.node(f))), B.info(
|
||
"Position " + f + ": (" + p.x,
|
||
"," + p.y,
|
||
") width: ",
|
||
p.width,
|
||
" height: ",
|
||
p.height
|
||
), p && p.clusterNode ? dp(p) : e.children(f).length > 0 ? (MO(a, p), Te[p.id].node = p) : dp(p);
|
||
}), e.edges().forEach(function(f) {
|
||
const p = e.edge(f);
|
||
B.info("Edge " + f.v + " -> " + f.w + ": " + JSON.stringify(p), p);
|
||
const g = PO(o, f, p, Te, r, e);
|
||
OO(p, g);
|
||
}), e.nodes().forEach(function(f) {
|
||
const p = e.node(f);
|
||
B.info(f, p.type, p.diff), p.type === "group" && (d = p.diff);
|
||
}), { elem: s, diff: d };
|
||
}, ud = (t, e, r, n, i) => {
|
||
zI(t, r, n, i), EO(), BO(), NO(), qI(), B.warn("Graph at first:", mi(e)), XI(e), B.warn("Graph after:", mi(e)), C3(t, e, n);
|
||
}, S3 = (t) => he.sanitizeText(t, X());
|
||
let A3 = {
|
||
dividerMargin: 10,
|
||
padding: 5,
|
||
textHeight: 10
|
||
};
|
||
const YO = function(t, e, r, n) {
|
||
const i = Object.keys(t);
|
||
B.info("keys:", i), B.info(t), i.forEach(function(s) {
|
||
const a = t[s];
|
||
let o = "";
|
||
a.cssClasses.length > 0 && (o = o + " " + a.cssClasses.join(" "));
|
||
const l = { labelStyle: "" };
|
||
let u = a.text !== void 0 ? a.text : a.id, d = 0, f = "";
|
||
switch (a.type) {
|
||
case "class":
|
||
f = "class_box";
|
||
break;
|
||
default:
|
||
f = "class_box";
|
||
}
|
||
e.setNode(a.id, {
|
||
labelStyle: l.labelStyle,
|
||
shape: f,
|
||
labelText: S3(u),
|
||
classData: a,
|
||
rx: d,
|
||
ry: d,
|
||
class: o,
|
||
style: l.style,
|
||
id: a.id,
|
||
domId: a.domId,
|
||
tooltip: n.db.getTooltip(a.id) || "",
|
||
haveCallback: a.haveCallback,
|
||
link: a.link,
|
||
width: a.type === "group" ? 500 : void 0,
|
||
type: a.type,
|
||
padding: X().flowchart.padding
|
||
}), B.info("setNode", {
|
||
labelStyle: l.labelStyle,
|
||
shape: f,
|
||
labelText: u,
|
||
rx: d,
|
||
ry: d,
|
||
class: o,
|
||
style: l.style,
|
||
id: a.id,
|
||
width: a.type === "group" ? 500 : void 0,
|
||
type: a.type,
|
||
padding: X().flowchart.padding
|
||
});
|
||
});
|
||
}, VO = function(t, e, r, n) {
|
||
B.info(t), t.forEach(function(i, s) {
|
||
const a = i;
|
||
let o = "";
|
||
const l = { labelStyle: "", style: "" };
|
||
let u = a.text, d = 0, f = "note";
|
||
if (e.setNode(a.id, {
|
||
labelStyle: l.labelStyle,
|
||
shape: f,
|
||
labelText: S3(u),
|
||
noteData: a,
|
||
rx: d,
|
||
ry: d,
|
||
class: o,
|
||
style: l.style,
|
||
id: a.id,
|
||
domId: a.id,
|
||
tooltip: "",
|
||
type: "note",
|
||
padding: X().flowchart.padding
|
||
}), B.info("setNode", {
|
||
labelStyle: l.labelStyle,
|
||
shape: f,
|
||
labelText: u,
|
||
rx: d,
|
||
ry: d,
|
||
style: l.style,
|
||
id: a.id,
|
||
type: "note",
|
||
padding: X().flowchart.padding
|
||
}), !a.class || !(a.class in n))
|
||
return;
|
||
const p = r + s, g = {};
|
||
g.classes = "relation", g.pattern = "dotted", g.id = `edgeNote${p}`, g.arrowhead = "none", B.info(`Note edge: ${JSON.stringify(g)}, ${JSON.stringify(a)}`), g.startLabelRight = "", g.endLabelLeft = "", g.arrowTypeStart = "none", g.arrowTypeEnd = "none";
|
||
let b = "fill:none", k = "";
|
||
g.style = b, g.labelStyle = k, g.curve = mn(A3.curve, $r), e.setEdge(a.id, a.class, g, p);
|
||
});
|
||
}, UO = function(t, e) {
|
||
const r = X().flowchart;
|
||
let n = 0;
|
||
t.forEach(function(i) {
|
||
n++;
|
||
const s = {};
|
||
s.classes = "relation", s.pattern = i.relation.lineType == 1 ? "dashed" : "solid", s.id = "id" + n, i.type === "arrow_open" ? s.arrowhead = "none" : s.arrowhead = "normal", B.info(s, i), s.startLabelRight = i.relationTitle1 === "none" ? "" : i.relationTitle1, s.endLabelLeft = i.relationTitle2 === "none" ? "" : i.relationTitle2, s.arrowTypeStart = pp(i.relation.type1), s.arrowTypeEnd = pp(i.relation.type2);
|
||
let a = "", o = "";
|
||
if (i.style !== void 0) {
|
||
const l = Xi(i.style);
|
||
a = l.style, o = l.labelStyle;
|
||
} else
|
||
a = "fill:none";
|
||
s.style = a, s.labelStyle = o, i.interpolate !== void 0 ? s.curve = mn(i.interpolate, $r) : t.defaultInterpolate !== void 0 ? s.curve = mn(t.defaultInterpolate, $r) : s.curve = mn(r.curve, $r), i.text = i.title, i.text === void 0 ? i.style !== void 0 && (s.arrowheadStyle = "fill: #333") : (s.arrowheadStyle = "fill: #333", s.labelpos = "c", X().flowchart.htmlLabels ? (s.labelType = "html", s.label = '<span class="edgeLabel">' + i.text + "</span>") : (s.labelType = "text", s.label = i.text.replace(he.lineBreakRegex, `
|
||
`), i.style === void 0 && (s.style = s.style || "stroke: #333; stroke-width: 1.5px;fill:none"), s.labelStyle = s.labelStyle.replace("color:", "fill:"))), e.setEdge(i.id1, i.id2, s, n);
|
||
});
|
||
}, zO = function(t) {
|
||
Object.keys(t).forEach(function(r) {
|
||
A3[r] = t[r];
|
||
});
|
||
}, WO = function(t, e, r, n) {
|
||
B.info("Drawing class - ", e);
|
||
const i = X().flowchart, s = X().securityLevel;
|
||
B.info("config:", i);
|
||
const a = i.nodeSpacing || 50, o = i.rankSpacing || 50, l = new lr({
|
||
multigraph: !0,
|
||
compound: !0
|
||
}).setGraph({
|
||
rankdir: n.db.getDirection(),
|
||
nodesep: a,
|
||
ranksep: o,
|
||
marginx: 8,
|
||
marginy: 8
|
||
}).setDefaultEdgeLabel(function() {
|
||
return {};
|
||
}), u = n.db.getClasses(), d = n.db.getRelations(), f = n.db.getNotes();
|
||
B.info(d), YO(u, l, e, n), UO(d, l), VO(f, l, d.length + 1, u);
|
||
let p;
|
||
s === "sandbox" && (p = At("#i" + e));
|
||
const g = At(s === "sandbox" ? p.nodes()[0].contentDocument.body : "body"), b = g.select(`[id="${e}"]`), k = g.select("#" + e + " g");
|
||
if (ud(
|
||
k,
|
||
l,
|
||
["aggregation", "extension", "composition", "dependency", "lollipop"],
|
||
"classDiagram",
|
||
e
|
||
), ye.insertTitle(b, "classTitleText", i.titleTopMargin, n.db.getDiagramTitle()), wu(l, b, i.diagramPadding, i.useMaxWidth), !i.htmlLabels) {
|
||
const T = s === "sandbox" ? p.nodes()[0].contentDocument : document, L = T.querySelectorAll('[id="' + e + '"] .edgeLabel .label');
|
||
for (const E of L) {
|
||
const I = E.getBBox(), V = T.createElementNS("http://www.w3.org/2000/svg", "rect");
|
||
V.setAttribute("rx", 0), V.setAttribute("ry", 0), V.setAttribute("width", I.width), V.setAttribute("height", I.height), E.insertBefore(V, E.firstChild);
|
||
}
|
||
}
|
||
};
|
||
function pp(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 HO = {
|
||
setConf: zO,
|
||
draw: WO
|
||
};
|
||
var B1 = function() {
|
||
var t = function(N, D, w, v) {
|
||
for (w = w || {}, v = N.length; v--; w[N[v]] = D)
|
||
;
|
||
return w;
|
||
}, e = [1, 2], r = [1, 5], n = [6, 9, 11, 23, 25, 27, 29, 30, 31, 49], i = [1, 17], s = [1, 18], a = [1, 19], o = [1, 20], l = [1, 21], u = [1, 22], d = [1, 25], f = [1, 30], p = [1, 31], g = [1, 32], b = [1, 33], k = [6, 9, 11, 15, 20, 23, 25, 27, 29, 30, 31, 42, 43, 44, 45, 49], T = [1, 45], L = [30, 31, 46, 47], E = [4, 6, 9, 11, 23, 25, 27, 29, 30, 31, 49], I = [42, 43, 44, 45], V = [22, 37], H = [1, 64], G = {
|
||
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(D, w, v, M, m, Q, x) {
|
||
var ct = Q.length - 1;
|
||
switch (m) {
|
||
case 1:
|
||
break;
|
||
case 3:
|
||
this.$ = [];
|
||
break;
|
||
case 4:
|
||
Q[ct - 1].push(Q[ct]), this.$ = Q[ct - 1];
|
||
break;
|
||
case 5:
|
||
case 6:
|
||
this.$ = Q[ct];
|
||
break;
|
||
case 7:
|
||
case 8:
|
||
this.$ = [];
|
||
break;
|
||
case 12:
|
||
M.addEntity(Q[ct - 4]), M.addEntity(Q[ct - 2]), M.addRelationship(Q[ct - 4], Q[ct], Q[ct - 2], Q[ct - 3]);
|
||
break;
|
||
case 13:
|
||
M.addEntity(Q[ct - 3]), M.addAttributes(Q[ct - 3], Q[ct - 1]);
|
||
break;
|
||
case 14:
|
||
M.addEntity(Q[ct - 2]);
|
||
break;
|
||
case 15:
|
||
M.addEntity(Q[ct]);
|
||
break;
|
||
case 16:
|
||
case 17:
|
||
this.$ = Q[ct].trim(), M.setAccTitle(this.$);
|
||
break;
|
||
case 18:
|
||
case 19:
|
||
this.$ = Q[ct].trim(), M.setAccDescription(this.$);
|
||
break;
|
||
case 20:
|
||
case 41:
|
||
this.$ = Q[ct];
|
||
break;
|
||
case 21:
|
||
case 39:
|
||
case 40:
|
||
this.$ = Q[ct].replace(/"/g, "");
|
||
break;
|
||
case 22:
|
||
this.$ = [Q[ct]];
|
||
break;
|
||
case 23:
|
||
Q[ct].push(Q[ct - 1]), this.$ = Q[ct];
|
||
break;
|
||
case 24:
|
||
this.$ = { attributeType: Q[ct - 1], attributeName: Q[ct] };
|
||
break;
|
||
case 25:
|
||
this.$ = { attributeType: Q[ct - 2], attributeName: Q[ct - 1], attributeKeyType: Q[ct] };
|
||
break;
|
||
case 26:
|
||
this.$ = { attributeType: Q[ct - 2], attributeName: Q[ct - 1], attributeComment: Q[ct] };
|
||
break;
|
||
case 27:
|
||
this.$ = { attributeType: Q[ct - 3], attributeName: Q[ct - 2], attributeKeyType: Q[ct - 1], attributeComment: Q[ct] };
|
||
break;
|
||
case 28:
|
||
case 29:
|
||
case 30:
|
||
this.$ = Q[ct];
|
||
break;
|
||
case 31:
|
||
this.$ = Q[ct].replace(/"/g, "");
|
||
break;
|
||
case 32:
|
||
this.$ = { cardA: Q[ct], relType: Q[ct - 1], cardB: Q[ct - 2] };
|
||
break;
|
||
case 33:
|
||
this.$ = M.Cardinality.ZERO_OR_ONE;
|
||
break;
|
||
case 34:
|
||
this.$ = M.Cardinality.ZERO_OR_MORE;
|
||
break;
|
||
case 35:
|
||
this.$ = M.Cardinality.ONE_OR_MORE;
|
||
break;
|
||
case 36:
|
||
this.$ = M.Cardinality.ONLY_ONE;
|
||
break;
|
||
case 37:
|
||
this.$ = M.Identification.NON_IDENTIFYING;
|
||
break;
|
||
case 38:
|
||
this.$ = M.Identification.IDENTIFYING;
|
||
break;
|
||
case 42:
|
||
M.parseDirective("%%{", "open_directive");
|
||
break;
|
||
case 43:
|
||
M.parseDirective(Q[ct], "type_directive");
|
||
break;
|
||
case 44:
|
||
Q[ct] = Q[ct].trim().replace(/'/g, '"'), M.parseDirective(Q[ct], "arg_directive");
|
||
break;
|
||
case 45:
|
||
M.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: s, 27: a, 29: o, 30: l, 31: u, 49: r }, { 1: [2, 2] }, { 14: 23, 15: [1, 24], 52: d }, 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: s, 27: a, 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: f, 43: p, 44: g, 45: b }), { 24: [1, 34] }, { 26: [1, 35] }, { 28: [1, 36] }, t(n, [2, 19]), t(k, [2, 20]), t(k, [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: T }, { 41: 46, 46: [1, 47], 47: [1, 48] }, t(L, [2, 33]), t(L, [2, 34]), t(L, [2, 35]), t(L, [2, 36]), t(n, [2, 16]), t(n, [2, 17]), t(n, [2, 18]), t(E, [2, 9]), { 14: 49, 52: d }, { 52: [2, 44] }, { 15: [1, 50] }, { 22: [1, 51] }, t(n, [2, 14]), { 21: 52, 22: [2, 22], 32: 43, 33: 44, 37: T }, { 34: 53, 37: [1, 54] }, { 37: [2, 28] }, { 40: 55, 42: f, 43: p, 44: g, 45: b }, t(I, [2, 37]), t(I, [2, 38]), { 11: [1, 56] }, { 19: 57, 30: [1, 60], 31: [1, 59], 48: [1, 58] }, t(n, [2, 13]), { 22: [2, 23] }, t(V, [2, 24], { 35: 61, 36: 62, 38: [1, 63], 39: H }), t([22, 37, 38, 39], [2, 29]), t([30, 31], [2, 32]), t(E, [2, 10]), t(n, [2, 12]), t(n, [2, 39]), t(n, [2, 40]), t(n, [2, 41]), t(V, [2, 25], { 36: 65, 39: H }), t(V, [2, 26]), t([22, 37, 39], [2, 30]), t(V, [2, 31]), t(V, [2, 27])],
|
||
defaultActions: { 5: [2, 42], 7: [2, 2], 25: [2, 45], 39: [2, 44], 45: [2, 28], 52: [2, 23] },
|
||
parseError: function(D, w) {
|
||
if (w.recoverable)
|
||
this.trace(D);
|
||
else {
|
||
var v = new Error(D);
|
||
throw v.hash = w, v;
|
||
}
|
||
},
|
||
parse: function(D) {
|
||
var w = this, v = [0], M = [], m = [null], Q = [], x = this.table, ct = "", Dt = 0, vt = 0, j = 2, ot = 1, rt = Q.slice.call(arguments, 1), nt = Object.create(this.lexer), ut = { yy: {} };
|
||
for (var _t in this.yy)
|
||
Object.prototype.hasOwnProperty.call(this.yy, _t) && (ut.yy[_t] = this.yy[_t]);
|
||
nt.setInput(D, ut.yy), ut.yy.lexer = nt, ut.yy.parser = this, typeof nt.yylloc > "u" && (nt.yylloc = {});
|
||
var K = nt.yylloc;
|
||
Q.push(K);
|
||
var Ot = nt.options && nt.options.ranges;
|
||
typeof ut.yy.parseError == "function" ? this.parseError = ut.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
||
function P() {
|
||
var et;
|
||
return et = M.pop() || nt.lex() || ot, typeof et != "number" && (et instanceof Array && (M = et, et = M.pop()), et = w.symbols_[et] || et), et;
|
||
}
|
||
for (var z, $, F, O, A = {}, J, C, ht, U; ; ) {
|
||
if ($ = v[v.length - 1], this.defaultActions[$] ? F = this.defaultActions[$] : ((z === null || typeof z > "u") && (z = P()), F = x[$] && x[$][z]), typeof F > "u" || !F.length || !F[0]) {
|
||
var Yt = "";
|
||
U = [];
|
||
for (J in x[$])
|
||
this.terminals_[J] && J > j && U.push("'" + this.terminals_[J] + "'");
|
||
nt.showPosition ? Yt = "Parse error on line " + (Dt + 1) + `:
|
||
` + nt.showPosition() + `
|
||
Expecting ` + U.join(", ") + ", got '" + (this.terminals_[z] || z) + "'" : Yt = "Parse error on line " + (Dt + 1) + ": Unexpected " + (z == ot ? "end of input" : "'" + (this.terminals_[z] || z) + "'"), this.parseError(Yt, {
|
||
text: nt.match,
|
||
token: this.terminals_[z] || z,
|
||
line: nt.yylineno,
|
||
loc: K,
|
||
expected: U
|
||
});
|
||
}
|
||
if (F[0] instanceof Array && F.length > 1)
|
||
throw new Error("Parse Error: multiple actions possible at state: " + $ + ", token: " + z);
|
||
switch (F[0]) {
|
||
case 1:
|
||
v.push(z), m.push(nt.yytext), Q.push(nt.yylloc), v.push(F[1]), z = null, vt = nt.yyleng, ct = nt.yytext, Dt = nt.yylineno, K = nt.yylloc;
|
||
break;
|
||
case 2:
|
||
if (C = this.productions_[F[1]][1], A.$ = m[m.length - C], A._$ = {
|
||
first_line: Q[Q.length - (C || 1)].first_line,
|
||
last_line: Q[Q.length - 1].last_line,
|
||
first_column: Q[Q.length - (C || 1)].first_column,
|
||
last_column: Q[Q.length - 1].last_column
|
||
}, Ot && (A._$.range = [
|
||
Q[Q.length - (C || 1)].range[0],
|
||
Q[Q.length - 1].range[1]
|
||
]), O = this.performAction.apply(A, [
|
||
ct,
|
||
vt,
|
||
Dt,
|
||
ut.yy,
|
||
F[1],
|
||
m,
|
||
Q
|
||
].concat(rt)), typeof O < "u")
|
||
return O;
|
||
C && (v = v.slice(0, -1 * C * 2), m = m.slice(0, -1 * C), Q = Q.slice(0, -1 * C)), v.push(this.productions_[F[1]][0]), m.push(A.$), Q.push(A._$), ht = x[v[v.length - 2]][v[v.length - 1]], v.push(ht);
|
||
break;
|
||
case 3:
|
||
return !0;
|
||
}
|
||
}
|
||
return !0;
|
||
}
|
||
}, Y = function() {
|
||
var N = {
|
||
EOF: 1,
|
||
parseError: function(w, v) {
|
||
if (this.yy.parser)
|
||
this.yy.parser.parseError(w, v);
|
||
else
|
||
throw new Error(w);
|
||
},
|
||
setInput: function(D, w) {
|
||
return this.yy = w || this.yy || {}, this._input = D, 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 D = this._input[0];
|
||
this.yytext += D, this.yyleng++, this.offset++, this.match += D, this.matched += D;
|
||
var w = D.match(/(?:\r\n?|\n).*/g);
|
||
return w ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), D;
|
||
},
|
||
unput: function(D) {
|
||
var w = D.length, v = D.split(/(?:\r\n?|\n)/g);
|
||
this._input = D + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - w), this.offset -= w;
|
||
var M = 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), v.length - 1 && (this.yylineno -= v.length - 1);
|
||
var m = 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: v ? (v.length === M.length ? this.yylloc.first_column : 0) + M[M.length - v.length].length - v[0].length : this.yylloc.first_column - w
|
||
}, this.options.ranges && (this.yylloc.range = [m[0], m[0] + this.yyleng - w]), 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(D) {
|
||
this.unput(this.match.slice(D));
|
||
},
|
||
pastInput: function() {
|
||
var D = this.matched.substr(0, this.matched.length - this.match.length);
|
||
return (D.length > 20 ? "..." : "") + D.substr(-20).replace(/\n/g, "");
|
||
},
|
||
upcomingInput: function() {
|
||
var D = this.match;
|
||
return D.length < 20 && (D += this._input.substr(0, 20 - D.length)), (D.substr(0, 20) + (D.length > 20 ? "..." : "")).replace(/\n/g, "");
|
||
},
|
||
showPosition: function() {
|
||
var D = this.pastInput(), w = new Array(D.length + 1).join("-");
|
||
return D + this.upcomingInput() + `
|
||
` + w + "^";
|
||
},
|
||
test_match: function(D, w) {
|
||
var v, M, m;
|
||
if (this.options.backtrack_lexer && (m = {
|
||
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 && (m.yylloc.range = this.yylloc.range.slice(0))), M = D[0].match(/(?:\r\n?|\n).*/g), M && (this.yylineno += M.length), this.yylloc = {
|
||
first_line: this.yylloc.last_line,
|
||
last_line: this.yylineno + 1,
|
||
first_column: this.yylloc.last_column,
|
||
last_column: M ? M[M.length - 1].length - M[M.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + D[0].length
|
||
}, this.yytext += D[0], this.match += D[0], this.matches = D, 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(D[0].length), this.matched += D[0], v = this.performAction.call(this, this.yy, this, w, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), v)
|
||
return v;
|
||
if (this._backtrack) {
|
||
for (var Q in m)
|
||
this[Q] = m[Q];
|
||
return !1;
|
||
}
|
||
return !1;
|
||
},
|
||
next: function() {
|
||
if (this.done)
|
||
return this.EOF;
|
||
this._input || (this.done = !0);
|
||
var D, w, v, M;
|
||
this._more || (this.yytext = "", this.match = "");
|
||
for (var m = this._currentRules(), Q = 0; Q < m.length; Q++)
|
||
if (v = this._input.match(this.rules[m[Q]]), v && (!w || v[0].length > w[0].length)) {
|
||
if (w = v, M = Q, this.options.backtrack_lexer) {
|
||
if (D = this.test_match(v, m[Q]), D !== !1)
|
||
return D;
|
||
if (this._backtrack) {
|
||
w = !1;
|
||
continue;
|
||
} else
|
||
return !1;
|
||
} else if (!this.options.flex)
|
||
break;
|
||
}
|
||
return w ? (D = this.test_match(w, m[M]), D !== !1 ? D : !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 w = this.next();
|
||
return w || this.lex();
|
||
},
|
||
begin: function(w) {
|
||
this.conditionStack.push(w);
|
||
},
|
||
popState: function() {
|
||
var w = this.conditionStack.length - 1;
|
||
return w > 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(w) {
|
||
return w = this.conditionStack.length - 1 - Math.abs(w || 0), w >= 0 ? this.conditionStack[w] : "INITIAL";
|
||
},
|
||
pushState: function(w) {
|
||
this.begin(w);
|
||
},
|
||
stateStackSize: function() {
|
||
return this.conditionStack.length;
|
||
},
|
||
options: { "case-insensitive": !0 },
|
||
performAction: function(w, v, M, m) {
|
||
switch (M) {
|
||
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 v.yytext[0];
|
||
case 29:
|
||
return 42;
|
||
case 30:
|
||
return 44;
|
||
case 31:
|
||
return 44;
|
||
case 32:
|
||
return 44;
|
||
case 33:
|
||
return 42;
|
||
case 34:
|
||
return 42;
|
||
case 35:
|
||
return 43;
|
||
case 36:
|
||
return 43;
|
||
case 37:
|
||
return 43;
|
||
case 38:
|
||
return 43;
|
||
case 39:
|
||
return 43;
|
||
case 40:
|
||
return 44;
|
||
case 41:
|
||
return 43;
|
||
case 42:
|
||
return 44;
|
||
case 43:
|
||
return 45;
|
||
case 44:
|
||
return 45;
|
||
case 45:
|
||
return 45;
|
||
case 46:
|
||
return 45;
|
||
case 47:
|
||
return 42;
|
||
case 48:
|
||
return 43;
|
||
case 49:
|
||
return 44;
|
||
case 50:
|
||
return 46;
|
||
case 51:
|
||
return 47;
|
||
case 52:
|
||
return 47;
|
||
case 53:
|
||
return 46;
|
||
case 54:
|
||
return 46;
|
||
case 55:
|
||
return 46;
|
||
case 56:
|
||
return 30;
|
||
case 57:
|
||
return v.yytext[0];
|
||
case 58:
|
||
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, /^(?:one or zero\b)/i, /^(?:one or more\b)/i, /^(?:one or many\b)/i, /^(?:1\+)/i, /^(?:\|o\b)/i, /^(?:zero or one\b)/i, /^(?:zero or more\b)/i, /^(?:zero or many\b)/i, /^(?:0\+)/i, /^(?:\}o\b)/i, /^(?:many\(0\))/i, /^(?:many\(1\))/i, /^(?:many\b)/i, /^(?:\}\|)/i, /^(?:one\b)/i, /^(?:only one\b)/i, /^(?:1\b)/i, /^(?:\|\|)/i, /^(?:o\|)/i, /^(?:o\{)/i, /^(?:\|\{)/i, /^(?:\.\.)/i, /^(?:--)/i, /^(?:to\b)/i, /^(?:optionally to\b)/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, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58], inclusive: !0 } }
|
||
};
|
||
return N;
|
||
}();
|
||
G.lexer = Y;
|
||
function W() {
|
||
this.yy = {};
|
||
}
|
||
return W.prototype = G, G.Parser = W, new W();
|
||
}();
|
||
B1.parser = B1;
|
||
const GO = B1, qO = (t) => t.match(/^\s*erDiagram/) !== null;
|
||
let go = {}, hd = [];
|
||
const jO = {
|
||
ZERO_OR_ONE: "ZERO_OR_ONE",
|
||
ZERO_OR_MORE: "ZERO_OR_MORE",
|
||
ONE_OR_MORE: "ONE_OR_MORE",
|
||
ONLY_ONE: "ONLY_ONE"
|
||
}, XO = {
|
||
NON_IDENTIFYING: "NON_IDENTIFYING",
|
||
IDENTIFYING: "IDENTIFYING"
|
||
}, $O = function(t, e, r) {
|
||
ze.parseDirective(this, t, e, r);
|
||
}, L3 = function(t) {
|
||
return go[t] === void 0 && (go[t] = { attributes: [] }, B.info("Added new entity :", t)), go[t];
|
||
}, KO = () => go, ZO = function(t, e) {
|
||
let r = L3(t), n;
|
||
for (n = e.length - 1; n >= 0; n--)
|
||
r.attributes.push(e[n]), B.debug("Added attribute ", e[n].attributeName);
|
||
}, QO = function(t, e, r, n) {
|
||
let i = {
|
||
entityA: t,
|
||
roleA: e,
|
||
entityB: r,
|
||
relSpec: n
|
||
};
|
||
hd.push(i), B.debug("Added new relationship :", i);
|
||
}, JO = () => hd, tR = function() {
|
||
go = {}, hd = [], Dn();
|
||
}, eR = {
|
||
Cardinality: jO,
|
||
Identification: XO,
|
||
parseDirective: $O,
|
||
getConfig: () => X().er,
|
||
addEntity: L3,
|
||
addAttributes: ZO,
|
||
getEntities: KO,
|
||
addRelationship: QO,
|
||
getRelationships: JO,
|
||
clear: tR,
|
||
setAccTitle: sn,
|
||
getAccTitle: Mn,
|
||
setAccDescription: Nn,
|
||
getAccDescription: Bn,
|
||
setDiagramTitle: Si,
|
||
getDiagramTitle: Ai
|
||
}, oi = {
|
||
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"
|
||
}, rR = function(t, e) {
|
||
let r;
|
||
t.append("defs").append("marker").attr("id", oi.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", oi.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", oi.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", oi.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", oi.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", oi.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", oi.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", oi.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");
|
||
}, li = {
|
||
ERMarkers: oi,
|
||
insertMarkers: rR
|
||
};
|
||
let Nl;
|
||
const nR = new Uint8Array(16);
|
||
function iR() {
|
||
if (!Nl && (Nl = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !Nl))
|
||
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
||
return Nl(nR);
|
||
}
|
||
const _r = [];
|
||
for (let t = 0; t < 256; ++t)
|
||
_r.push((t + 256).toString(16).slice(1));
|
||
function sR(t, e = 0) {
|
||
return (_r[t[e + 0]] + _r[t[e + 1]] + _r[t[e + 2]] + _r[t[e + 3]] + "-" + _r[t[e + 4]] + _r[t[e + 5]] + "-" + _r[t[e + 6]] + _r[t[e + 7]] + "-" + _r[t[e + 8]] + _r[t[e + 9]] + "-" + _r[t[e + 10]] + _r[t[e + 11]] + _r[t[e + 12]] + _r[t[e + 13]] + _r[t[e + 14]] + _r[t[e + 15]]).toLowerCase();
|
||
}
|
||
const aR = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), gp = {
|
||
randomUUID: aR
|
||
};
|
||
function oR(t, e, r) {
|
||
if (gp.randomUUID && !e && !t)
|
||
return gp.randomUUID();
|
||
t = t || {};
|
||
const n = t.random || (t.rng || iR)();
|
||
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 sR(n);
|
||
}
|
||
const lR = /[^\dA-Za-z](\W)*/g;
|
||
let ur = {}, Vo = /* @__PURE__ */ new Map();
|
||
const cR = function(t) {
|
||
const e = Object.keys(t);
|
||
for (const r of e)
|
||
ur[r] = t[r];
|
||
}, uR = (t, e, r) => {
|
||
const n = ur.entityPadding / 3, i = ur.entityPadding / 3, s = ur.fontSize * 0.85, a = e.node().getBBox(), o = [];
|
||
let l = !1, u = !1, d = 0, f = 0, p = 0, g = 0, b = a.height + n * 2, k = 1;
|
||
r.forEach((I) => {
|
||
I.attributeKeyType !== void 0 && (l = !0), I.attributeComment !== void 0 && (u = !0);
|
||
}), r.forEach((I) => {
|
||
const V = `${e.node().id}-attr-${k}`;
|
||
let H = 0;
|
||
const G = zi(I.attributeType), Y = t.append("text").classed("er entityLabel", !0).attr("id", `${V}-type`).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "left").style("font-family", X().fontFamily).style("font-size", s + "px").text(G), W = t.append("text").classed("er entityLabel", !0).attr("id", `${V}-name`).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "left").style("font-family", X().fontFamily).style("font-size", s + "px").text(I.attributeName), N = {};
|
||
N.tn = Y, N.nn = W;
|
||
const D = Y.node().getBBox(), w = W.node().getBBox();
|
||
if (d = Math.max(d, D.width), f = Math.max(f, w.width), H = Math.max(D.height, w.height), l) {
|
||
const v = t.append("text").classed("er entityLabel", !0).attr("id", `${V}-key`).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "left").style("font-family", X().fontFamily).style("font-size", s + "px").text(I.attributeKeyType || "");
|
||
N.kn = v;
|
||
const M = v.node().getBBox();
|
||
p = Math.max(p, M.width), H = Math.max(H, M.height);
|
||
}
|
||
if (u) {
|
||
const v = t.append("text").classed("er entityLabel", !0).attr("id", `${V}-comment`).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "left").style("font-family", X().fontFamily).style("font-size", s + "px").text(I.attributeComment || "");
|
||
N.cn = v;
|
||
const M = v.node().getBBox();
|
||
g = Math.max(g, M.width), H = Math.max(H, M.height);
|
||
}
|
||
N.height = H, o.push(N), b += H + n * 2, k += 1;
|
||
});
|
||
let T = 4;
|
||
l && (T += 2), u && (T += 2);
|
||
const L = d + f + p + g, E = {
|
||
width: Math.max(
|
||
ur.minEntityWidth,
|
||
Math.max(
|
||
a.width + ur.entityPadding * 2,
|
||
L + i * T
|
||
)
|
||
),
|
||
height: r.length > 0 ? b : Math.max(ur.minEntityHeight, a.height + ur.entityPadding * 2)
|
||
};
|
||
if (r.length > 0) {
|
||
const I = Math.max(
|
||
0,
|
||
(E.width - L - i * T) / (T / 2)
|
||
);
|
||
e.attr(
|
||
"transform",
|
||
"translate(" + E.width / 2 + "," + (n + a.height / 2) + ")"
|
||
);
|
||
let V = a.height + n * 2, H = "attributeBoxOdd";
|
||
o.forEach((G) => {
|
||
const Y = V + n + G.height / 2;
|
||
G.tn.attr("transform", "translate(" + i + "," + Y + ")");
|
||
const W = t.insert("rect", "#" + G.tn.node().id).classed(`er ${H}`, !0).attr("x", 0).attr("y", V).attr("width", d + i * 2 + I).attr("height", G.height + n * 2), N = parseFloat(W.attr("x")) + parseFloat(W.attr("width"));
|
||
G.nn.attr(
|
||
"transform",
|
||
"translate(" + (N + i) + "," + Y + ")"
|
||
);
|
||
const D = t.insert("rect", "#" + G.nn.node().id).classed(`er ${H}`, !0).attr("x", N).attr("y", V).attr("width", f + i * 2 + I).attr("height", G.height + n * 2);
|
||
let w = parseFloat(D.attr("x")) + parseFloat(D.attr("width"));
|
||
if (l) {
|
||
G.kn.attr(
|
||
"transform",
|
||
"translate(" + (w + i) + "," + Y + ")"
|
||
);
|
||
const v = t.insert("rect", "#" + G.kn.node().id).classed(`er ${H}`, !0).attr("x", w).attr("y", V).attr("width", p + i * 2 + I).attr("height", G.height + n * 2);
|
||
w = parseFloat(v.attr("x")) + parseFloat(v.attr("width"));
|
||
}
|
||
u && (G.cn.attr(
|
||
"transform",
|
||
"translate(" + (w + i) + "," + Y + ")"
|
||
), t.insert("rect", "#" + G.cn.node().id).classed(`er ${H}`, "true").attr("x", w).attr("y", V).attr("width", g + i * 2 + I).attr("height", G.height + n * 2)), V += G.height + n * 2, H = H === "attributeBoxOdd" ? "attributeBoxEven" : "attributeBoxOdd";
|
||
});
|
||
} else
|
||
E.height = Math.max(ur.minEntityHeight, b), e.attr("transform", "translate(" + E.width / 2 + "," + E.height / 2 + ")");
|
||
return E;
|
||
}, hR = function(t, e, r) {
|
||
const n = Object.keys(e);
|
||
let i;
|
||
return n.forEach(function(s) {
|
||
const a = yR(s, "entity");
|
||
Vo.set(s, a);
|
||
const o = t.append("g").attr("id", a);
|
||
i = i === void 0 ? a : i;
|
||
const l = "text-" + a, u = o.append("text").classed("er entityLabel", !0).attr("id", l).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "middle").style("font-family", X().fontFamily).style("font-size", ur.fontSize + "px").text(s), { width: d, height: f } = uR(
|
||
o,
|
||
u,
|
||
e[s].attributes
|
||
), g = o.insert("rect", "#" + l).classed("er entityBox", !0).attr("x", 0).attr("y", 0).attr("width", d).attr("height", f).node().getBBox();
|
||
r.setNode(a, {
|
||
width: g.width,
|
||
height: g.height,
|
||
shape: "rect",
|
||
id: a
|
||
});
|
||
}), i;
|
||
}, dR = function(t, e) {
|
||
e.nodes().forEach(function(r) {
|
||
r !== void 0 && e.node(r) !== void 0 && t.select("#" + r).attr(
|
||
"transform",
|
||
"translate(" + (e.node(r).x - e.node(r).width / 2) + "," + (e.node(r).y - e.node(r).height / 2) + " )"
|
||
);
|
||
});
|
||
}, D3 = function(t) {
|
||
return (t.entityA + t.roleA + t.entityB).replace(/\s/g, "");
|
||
}, fR = function(t, e) {
|
||
return t.forEach(function(r) {
|
||
e.setEdge(
|
||
Vo.get(r.entityA),
|
||
Vo.get(r.entityB),
|
||
{ relationship: r },
|
||
D3(r)
|
||
);
|
||
}), t;
|
||
};
|
||
let yp = 0;
|
||
const pR = function(t, e, r, n, i) {
|
||
yp++;
|
||
const s = r.edge(
|
||
Vo.get(e.entityA),
|
||
Vo.get(e.entityB),
|
||
D3(e)
|
||
), a = Na().x(function(b) {
|
||
return b.x;
|
||
}).y(function(b) {
|
||
return b.y;
|
||
}).curve(ga), o = t.insert("path", "#" + n).classed("er relationshipLine", !0).attr("d", a(s.points)).style("stroke", ur.stroke).style("fill", "none");
|
||
e.relSpec.relType === i.db.Identification.NON_IDENTIFYING && o.attr("stroke-dasharray", "8,8");
|
||
let l = "";
|
||
switch (ur.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 + "#" + li.ERMarkers.ZERO_OR_ONE_END + ")");
|
||
break;
|
||
case i.db.Cardinality.ZERO_OR_MORE:
|
||
o.attr("marker-end", "url(" + l + "#" + li.ERMarkers.ZERO_OR_MORE_END + ")");
|
||
break;
|
||
case i.db.Cardinality.ONE_OR_MORE:
|
||
o.attr("marker-end", "url(" + l + "#" + li.ERMarkers.ONE_OR_MORE_END + ")");
|
||
break;
|
||
case i.db.Cardinality.ONLY_ONE:
|
||
o.attr("marker-end", "url(" + l + "#" + li.ERMarkers.ONLY_ONE_END + ")");
|
||
break;
|
||
}
|
||
switch (e.relSpec.cardB) {
|
||
case i.db.Cardinality.ZERO_OR_ONE:
|
||
o.attr(
|
||
"marker-start",
|
||
"url(" + l + "#" + li.ERMarkers.ZERO_OR_ONE_START + ")"
|
||
);
|
||
break;
|
||
case i.db.Cardinality.ZERO_OR_MORE:
|
||
o.attr(
|
||
"marker-start",
|
||
"url(" + l + "#" + li.ERMarkers.ZERO_OR_MORE_START + ")"
|
||
);
|
||
break;
|
||
case i.db.Cardinality.ONE_OR_MORE:
|
||
o.attr(
|
||
"marker-start",
|
||
"url(" + l + "#" + li.ERMarkers.ONE_OR_MORE_START + ")"
|
||
);
|
||
break;
|
||
case i.db.Cardinality.ONLY_ONE:
|
||
o.attr("marker-start", "url(" + l + "#" + li.ERMarkers.ONLY_ONE_START + ")");
|
||
break;
|
||
}
|
||
const u = o.node().getTotalLength(), d = o.node().getPointAtLength(u * 0.5), f = "rel" + yp, g = t.append("text").classed("er relationshipLabel", !0).attr("id", f).attr("x", d.x).attr("y", d.y).style("text-anchor", "middle").style("dominant-baseline", "middle").style("font-family", X().fontFamily).style("font-size", ur.fontSize + "px").text(e.roleA).node().getBBox();
|
||
t.insert("rect", "#" + f).classed("er relationshipLabelBox", !0).attr("x", d.x - g.width / 2).attr("y", d.y - g.height / 2).attr("width", g.width).attr("height", g.height);
|
||
}, gR = function(t, e, r, n) {
|
||
ur = X().er, B.info("Drawing ER diagram");
|
||
const i = X().securityLevel;
|
||
let s;
|
||
i === "sandbox" && (s = At("#i" + e));
|
||
const o = At(i === "sandbox" ? s.nodes()[0].contentDocument.body : "body").select(`[id='${e}']`);
|
||
li.insertMarkers(o, ur);
|
||
let l;
|
||
l = new lr({
|
||
multigraph: !0,
|
||
directed: !0,
|
||
compound: !1
|
||
}).setGraph({
|
||
rankdir: ur.layoutDirection,
|
||
marginx: 20,
|
||
marginy: 20,
|
||
nodesep: 100,
|
||
edgesep: 100,
|
||
ranksep: 100
|
||
}).setDefaultEdgeLabel(function() {
|
||
return {};
|
||
});
|
||
const u = hR(o, n.db.getEntities(), l), d = fR(n.db.getRelationships(), l);
|
||
Pa(l), dR(o, l), d.forEach(function(k) {
|
||
pR(o, k, l, u, n);
|
||
});
|
||
const f = ur.diagramPadding;
|
||
ye.insertTitle(o, "entityTitleText", ur.titleTopMargin, n.db.getDiagramTitle());
|
||
const p = o.node().getBBox(), g = p.width + f * 2, b = p.height + f * 2;
|
||
Ln(o, b, g, ur.useMaxWidth), o.attr("viewBox", `${p.x - f} ${p.y - f} ${g} ${b}`);
|
||
};
|
||
function yR(t = "", e = "") {
|
||
const r = t.replace(lR, "");
|
||
return `${mp(e)}${mp(r)}${oR()}`;
|
||
}
|
||
function mp(t = "") {
|
||
return t.length > 0 ? `${t}-` : "";
|
||
}
|
||
const mR = {
|
||
setConf: cR,
|
||
draw: gR
|
||
};
|
||
var I1 = function() {
|
||
var t = function(Rr, qt, te, oe) {
|
||
for (te = te || {}, oe = Rr.length; oe--; te[Rr[oe]] = qt)
|
||
;
|
||
return te;
|
||
}, e = [1, 9], r = [1, 7], n = [1, 6], i = [1, 8], s = [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], a = [2, 10], o = [1, 20], l = [1, 21], u = [1, 22], d = [1, 23], f = [1, 30], p = [1, 32], g = [1, 33], b = [1, 34], k = [1, 62], T = [1, 48], L = [1, 52], E = [1, 36], I = [1, 37], V = [1, 38], H = [1, 39], G = [1, 40], Y = [1, 56], W = [1, 63], N = [1, 51], D = [1, 53], w = [1, 55], v = [1, 59], M = [1, 60], m = [1, 41], Q = [1, 42], x = [1, 43], ct = [1, 44], Dt = [1, 61], vt = [1, 50], j = [1, 54], ot = [1, 57], rt = [1, 58], nt = [1, 49], ut = [1, 66], _t = [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], Ot = [1, 75], P = [1, 74], z = [1, 76], $ = [20, 21, 23, 81, 82], F = [1, 99], O = [1, 104], A = [1, 107], J = [1, 108], C = [1, 101], ht = [1, 106], U = [1, 109], Yt = [1, 102], et = [1, 114], Mt = [1, 113], Tt = [1, 103], gt = [1, 105], Et = [1, 110], wt = [1, 111], pt = [1, 112], st = [1, 115], le = [20, 21, 22, 23, 81, 82], $t = [20, 21, 22, 23, 53, 81, 82], jt = [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], Kt = [20, 21, 23], Gt = [20, 21, 23, 52, 66, 67, 81, 82, 91, 95, 105, 106, 109, 111, 112, 122, 123, 124, 125, 126, 127], Ee = [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], Ht = [52, 66, 67, 91, 95, 105, 106, 109, 111, 112, 122, 123, 124, 125, 126, 127], Vt = [1, 149], Ft = [1, 157], xt = [1, 158], ft = [1, 159], Lt = [1, 160], bt = [1, 144], Ut = [1, 145], at = [1, 141], ne = [1, 152], dt = [1, 153], ee = [1, 154], de = [1, 155], me = [1, 156], be = [1, 161], ke = [1, 162], Xt = [1, 147], ie = [1, 150], ge = [1, 146], Qt = [1, 143], an = [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], Wr = [1, 165], De = [20, 21, 22, 23, 26, 52, 66, 67, 91, 105, 106, 109, 111, 112, 122, 123, 124, 125, 126, 127], ae = [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], Be = [12, 21, 22, 24], Oe = [22, 106], Fe = [1, 250], Pe = [1, 245], Ie = [1, 246], Ge = [1, 254], tr = [1, 251], zt = [1, 248], Z = [1, 247], St = [1, 249], Nt = [1, 252], fe = [1, 253], Me = [1, 255], Le = [1, 273], We = [20, 21, 23, 106], xe = [20, 21, 22, 23, 66, 67, 86, 102, 105, 106, 109, 110, 111, 112, 113], Ne = {
|
||
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(qt, te, oe, Rt, Ye, q, Qi) {
|
||
var tt = q.length - 1;
|
||
switch (Ye) {
|
||
case 5:
|
||
Rt.parseDirective("%%{", "open_directive");
|
||
break;
|
||
case 6:
|
||
Rt.parseDirective(q[tt], "type_directive");
|
||
break;
|
||
case 7:
|
||
q[tt] = q[tt].trim().replace(/'/g, '"'), Rt.parseDirective(q[tt], "arg_directive");
|
||
break;
|
||
case 8:
|
||
Rt.parseDirective("}%%", "close_directive", "flowchart");
|
||
break;
|
||
case 10:
|
||
this.$ = [];
|
||
break;
|
||
case 11:
|
||
(!Array.isArray(q[tt]) || q[tt].length > 0) && q[tt - 1].push(q[tt]), this.$ = q[tt - 1];
|
||
break;
|
||
case 12:
|
||
case 82:
|
||
case 84:
|
||
case 96:
|
||
case 152:
|
||
case 154:
|
||
case 155:
|
||
this.$ = q[tt];
|
||
break;
|
||
case 19:
|
||
Rt.setDirection("TB"), this.$ = "TB";
|
||
break;
|
||
case 20:
|
||
Rt.setDirection(q[tt - 1]), this.$ = q[tt - 1];
|
||
break;
|
||
case 35:
|
||
this.$ = q[tt - 1].nodes;
|
||
break;
|
||
case 36:
|
||
case 37:
|
||
case 38:
|
||
case 39:
|
||
case 40:
|
||
this.$ = [];
|
||
break;
|
||
case 41:
|
||
this.$ = Rt.addSubGraph(q[tt - 6], q[tt - 1], q[tt - 4]);
|
||
break;
|
||
case 42:
|
||
this.$ = Rt.addSubGraph(q[tt - 3], q[tt - 1], q[tt - 3]);
|
||
break;
|
||
case 43:
|
||
this.$ = Rt.addSubGraph(void 0, q[tt - 1], void 0);
|
||
break;
|
||
case 45:
|
||
this.$ = q[tt].trim(), Rt.setAccTitle(this.$);
|
||
break;
|
||
case 46:
|
||
case 47:
|
||
this.$ = q[tt].trim(), Rt.setAccDescription(this.$);
|
||
break;
|
||
case 51:
|
||
Rt.addLink(q[tt - 2].stmt, q[tt], q[tt - 1]), this.$ = { stmt: q[tt], nodes: q[tt].concat(q[tt - 2].nodes) };
|
||
break;
|
||
case 52:
|
||
Rt.addLink(q[tt - 3].stmt, q[tt - 1], q[tt - 2]), this.$ = { stmt: q[tt - 1], nodes: q[tt - 1].concat(q[tt - 3].nodes) };
|
||
break;
|
||
case 53:
|
||
this.$ = { stmt: q[tt - 1], nodes: q[tt - 1] };
|
||
break;
|
||
case 54:
|
||
this.$ = { stmt: q[tt], nodes: q[tt] };
|
||
break;
|
||
case 55:
|
||
this.$ = [q[tt]];
|
||
break;
|
||
case 56:
|
||
this.$ = q[tt - 4].concat(q[tt]);
|
||
break;
|
||
case 57:
|
||
this.$ = [q[tt - 2]], Rt.setClass(q[tt - 2], q[tt]);
|
||
break;
|
||
case 58:
|
||
this.$ = q[tt - 3], Rt.addVertex(q[tt - 3], q[tt - 1], "square");
|
||
break;
|
||
case 59:
|
||
this.$ = q[tt - 3], Rt.addVertex(q[tt - 3], q[tt - 1], "doublecircle");
|
||
break;
|
||
case 60:
|
||
this.$ = q[tt - 5], Rt.addVertex(q[tt - 5], q[tt - 2], "circle");
|
||
break;
|
||
case 61:
|
||
this.$ = q[tt - 3], Rt.addVertex(q[tt - 3], q[tt - 1], "ellipse");
|
||
break;
|
||
case 62:
|
||
this.$ = q[tt - 3], Rt.addVertex(q[tt - 3], q[tt - 1], "stadium");
|
||
break;
|
||
case 63:
|
||
this.$ = q[tt - 3], Rt.addVertex(q[tt - 3], q[tt - 1], "subroutine");
|
||
break;
|
||
case 64:
|
||
this.$ = q[tt - 7], Rt.addVertex(q[tt - 7], q[tt - 1], "rect", void 0, void 0, void 0, Object.fromEntries([[q[tt - 5], q[tt - 3]]]));
|
||
break;
|
||
case 65:
|
||
this.$ = q[tt - 3], Rt.addVertex(q[tt - 3], q[tt - 1], "cylinder");
|
||
break;
|
||
case 66:
|
||
this.$ = q[tt - 3], Rt.addVertex(q[tt - 3], q[tt - 1], "round");
|
||
break;
|
||
case 67:
|
||
this.$ = q[tt - 3], Rt.addVertex(q[tt - 3], q[tt - 1], "diamond");
|
||
break;
|
||
case 68:
|
||
this.$ = q[tt - 5], Rt.addVertex(q[tt - 5], q[tt - 2], "hexagon");
|
||
break;
|
||
case 69:
|
||
this.$ = q[tt - 3], Rt.addVertex(q[tt - 3], q[tt - 1], "odd");
|
||
break;
|
||
case 70:
|
||
this.$ = q[tt - 3], Rt.addVertex(q[tt - 3], q[tt - 1], "trapezoid");
|
||
break;
|
||
case 71:
|
||
this.$ = q[tt - 3], Rt.addVertex(q[tt - 3], q[tt - 1], "inv_trapezoid");
|
||
break;
|
||
case 72:
|
||
this.$ = q[tt - 3], Rt.addVertex(q[tt - 3], q[tt - 1], "lean_right");
|
||
break;
|
||
case 73:
|
||
this.$ = q[tt - 3], Rt.addVertex(q[tt - 3], q[tt - 1], "lean_left");
|
||
break;
|
||
case 74:
|
||
this.$ = q[tt], Rt.addVertex(q[tt]);
|
||
break;
|
||
case 75:
|
||
q[tt - 1].text = q[tt], this.$ = q[tt - 1];
|
||
break;
|
||
case 76:
|
||
case 77:
|
||
q[tt - 2].text = q[tt - 1], this.$ = q[tt - 2];
|
||
break;
|
||
case 78:
|
||
this.$ = q[tt];
|
||
break;
|
||
case 79:
|
||
var vr = Rt.destructLink(q[tt], q[tt - 2]);
|
||
this.$ = { type: vr.type, stroke: vr.stroke, length: vr.length, text: q[tt - 1] };
|
||
break;
|
||
case 80:
|
||
var vr = Rt.destructLink(q[tt]);
|
||
this.$ = { type: vr.type, stroke: vr.stroke, length: vr.length };
|
||
break;
|
||
case 81:
|
||
this.$ = q[tt - 1];
|
||
break;
|
||
case 83:
|
||
case 97:
|
||
case 153:
|
||
this.$ = q[tt - 1] + "" + q[tt];
|
||
break;
|
||
case 98:
|
||
case 99:
|
||
this.$ = q[tt - 4], Rt.addClass(q[tt - 2], q[tt]);
|
||
break;
|
||
case 100:
|
||
this.$ = q[tt - 4], Rt.setClass(q[tt - 2], q[tt]);
|
||
break;
|
||
case 101:
|
||
case 109:
|
||
this.$ = q[tt - 1], Rt.setClickEvent(q[tt - 1], q[tt]);
|
||
break;
|
||
case 102:
|
||
case 110:
|
||
this.$ = q[tt - 3], Rt.setClickEvent(q[tt - 3], q[tt - 2]), Rt.setTooltip(q[tt - 3], q[tt]);
|
||
break;
|
||
case 103:
|
||
this.$ = q[tt - 2], Rt.setClickEvent(q[tt - 2], q[tt - 1], q[tt]);
|
||
break;
|
||
case 104:
|
||
this.$ = q[tt - 4], Rt.setClickEvent(q[tt - 4], q[tt - 3], q[tt - 2]), Rt.setTooltip(q[tt - 4], q[tt]);
|
||
break;
|
||
case 105:
|
||
case 111:
|
||
this.$ = q[tt - 1], Rt.setLink(q[tt - 1], q[tt]);
|
||
break;
|
||
case 106:
|
||
case 112:
|
||
this.$ = q[tt - 3], Rt.setLink(q[tt - 3], q[tt - 2]), Rt.setTooltip(q[tt - 3], q[tt]);
|
||
break;
|
||
case 107:
|
||
case 113:
|
||
this.$ = q[tt - 3], Rt.setLink(q[tt - 3], q[tt - 2], q[tt]);
|
||
break;
|
||
case 108:
|
||
case 114:
|
||
this.$ = q[tt - 5], Rt.setLink(q[tt - 5], q[tt - 4], q[tt]), Rt.setTooltip(q[tt - 5], q[tt - 2]);
|
||
break;
|
||
case 115:
|
||
this.$ = q[tt - 4], Rt.addVertex(q[tt - 2], void 0, void 0, q[tt]);
|
||
break;
|
||
case 116:
|
||
case 118:
|
||
this.$ = q[tt - 4], Rt.updateLink(q[tt - 2], q[tt]);
|
||
break;
|
||
case 117:
|
||
this.$ = q[tt - 4], Rt.updateLink([q[tt - 2]], q[tt]);
|
||
break;
|
||
case 119:
|
||
this.$ = q[tt - 8], Rt.updateLinkInterpolate([q[tt - 6]], q[tt - 2]), Rt.updateLink([q[tt - 6]], q[tt]);
|
||
break;
|
||
case 120:
|
||
this.$ = q[tt - 8], Rt.updateLinkInterpolate(q[tt - 6], q[tt - 2]), Rt.updateLink(q[tt - 6], q[tt]);
|
||
break;
|
||
case 121:
|
||
this.$ = q[tt - 6], Rt.updateLinkInterpolate([q[tt - 4]], q[tt]);
|
||
break;
|
||
case 122:
|
||
this.$ = q[tt - 6], Rt.updateLinkInterpolate(q[tt - 4], q[tt]);
|
||
break;
|
||
case 123:
|
||
case 125:
|
||
this.$ = [q[tt]];
|
||
break;
|
||
case 124:
|
||
case 126:
|
||
q[tt - 2].push(q[tt]), this.$ = q[tt - 2];
|
||
break;
|
||
case 128:
|
||
this.$ = q[tt - 1] + q[tt];
|
||
break;
|
||
case 150:
|
||
this.$ = q[tt];
|
||
break;
|
||
case 151:
|
||
this.$ = q[tt - 1] + "" + q[tt];
|
||
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(s, a, { 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: d, 32: 24, 33: 25, 34: 26, 35: 27, 36: 28, 37: 29, 38: f, 43: 31, 44: p, 46: g, 48: b, 50: 35, 51: 45, 52: k, 54: 46, 66: T, 67: L, 86: E, 87: I, 88: V, 89: H, 90: G, 91: Y, 95: W, 105: N, 106: D, 109: w, 111: v, 112: M, 116: 47, 118: m, 119: Q, 120: x, 121: ct, 122: Dt, 123: vt, 124: j, 125: ot, 126: rt, 127: nt }, { 8: 64, 10: [1, 65], 15: ut }, t([10, 15], [2, 6]), t(s, [2, 17]), t(s, [2, 18]), t(s, [2, 19]), { 20: [1, 68], 21: [1, 69], 22: _t, 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: Ot, 21: P, 23: z, 49: 73, 78: 77, 81: [1, 78], 82: [1, 79] }, { 9: 80, 20: Ot, 21: P, 23: z }, { 9: 81, 20: Ot, 21: P, 23: z }, { 9: 82, 20: Ot, 21: P, 23: z }, { 9: 83, 20: Ot, 21: P, 23: z }, { 9: 84, 20: Ot, 21: P, 23: z }, { 9: 86, 20: Ot, 21: P, 22: [1, 85], 23: z }, t(K, [2, 44]), { 45: [1, 87] }, { 47: [1, 88] }, t(K, [2, 47]), t($, [2, 54], { 30: 89, 22: _t }), { 22: [1, 90] }, { 22: [1, 91] }, { 22: [1, 92] }, { 22: [1, 93] }, { 26: F, 52: O, 66: A, 67: J, 84: [1, 97], 91: C, 97: 96, 98: [1, 94], 100: [1, 95], 105: ht, 106: U, 109: Yt, 111: et, 112: Mt, 115: 100, 117: 98, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }, t(K, [2, 158]), t(K, [2, 159]), t(K, [2, 160]), t(K, [2, 161]), t(le, [2, 55], { 53: [1, 116] }), t($t, [2, 74], { 116: 129, 40: [1, 117], 52: k, 55: [1, 118], 57: [1, 119], 59: [1, 120], 61: [1, 121], 63: [1, 122], 65: [1, 123], 66: T, 67: L, 69: [1, 124], 71: [1, 125], 73: [1, 126], 74: [1, 127], 76: [1, 128], 91: Y, 95: W, 105: N, 106: D, 109: w, 111: v, 112: M, 122: Dt, 123: vt, 124: j, 125: ot, 126: rt, 127: nt }), t(jt, [2, 150]), t(jt, [2, 175]), t(jt, [2, 176]), t(jt, [2, 177]), t(jt, [2, 178]), t(jt, [2, 179]), t(jt, [2, 180]), t(jt, [2, 181]), t(jt, [2, 182]), t(jt, [2, 183]), t(jt, [2, 184]), t(jt, [2, 185]), t(jt, [2, 186]), t(jt, [2, 187]), t(jt, [2, 188]), t(jt, [2, 189]), t(jt, [2, 190]), { 9: 130, 20: Ot, 21: P, 23: z }, { 11: 131, 14: [1, 132] }, t(Kt, [2, 8]), t(s, [2, 20]), t(s, [2, 26]), t(s, [2, 27]), { 21: [1, 133] }, t(Gt, [2, 34], { 30: 134, 22: _t }), t(K, [2, 35]), { 50: 135, 51: 45, 52: k, 54: 46, 66: T, 67: L, 91: Y, 95: W, 105: N, 106: D, 109: w, 111: v, 112: M, 116: 47, 122: Dt, 123: vt, 124: j, 125: ot, 126: rt, 127: nt }, t(Ee, [2, 48]), t(Ee, [2, 49]), t(Ee, [2, 50]), t(Ht, [2, 78], { 79: 136, 68: [1, 138], 80: [1, 137] }), { 22: Vt, 24: Ft, 26: xt, 38: ft, 39: 139, 42: Lt, 52: O, 66: A, 67: J, 73: bt, 81: Ut, 83: 140, 84: at, 85: 151, 86: ne, 87: dt, 88: ee, 89: de, 90: me, 91: be, 92: ke, 94: 142, 95: Xt, 105: ht, 106: U, 109: ie, 111: et, 112: Mt, 113: ge, 114: Qt, 115: 148, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }, 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: Vt, 24: Ft, 26: xt, 38: ft, 39: 163, 42: Lt, 52: O, 66: A, 67: J, 73: bt, 81: Ut, 83: 140, 84: at, 85: 151, 86: ne, 87: dt, 88: ee, 89: de, 90: me, 91: be, 92: ke, 94: 142, 95: Xt, 105: ht, 106: U, 109: ie, 111: et, 112: Mt, 113: ge, 114: Qt, 115: 148, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }, t(an, a, { 17: 164 }), t(K, [2, 45]), t(K, [2, 46]), t($, [2, 53], { 52: Wr }), { 26: F, 52: O, 66: A, 67: J, 91: C, 97: 166, 102: [1, 167], 105: ht, 106: U, 109: Yt, 111: et, 112: Mt, 115: 100, 117: 98, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }, { 95: [1, 168], 103: 169, 105: [1, 170] }, { 26: F, 52: O, 66: A, 67: J, 91: C, 95: [1, 171], 97: 172, 105: ht, 106: U, 109: Yt, 111: et, 112: Mt, 115: 100, 117: 98, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }, { 26: F, 52: O, 66: A, 67: J, 91: C, 97: 173, 105: ht, 106: U, 109: Yt, 111: et, 112: Mt, 115: 100, 117: 98, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }, t(Kt, [2, 101], { 22: [1, 174], 99: [1, 175] }), t(Kt, [2, 105], { 22: [1, 176] }), t(Kt, [2, 109], { 115: 100, 117: 178, 22: [1, 177], 26: F, 52: O, 66: A, 67: J, 91: C, 105: ht, 106: U, 109: Yt, 111: et, 112: Mt, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }), t(Kt, [2, 111], { 22: [1, 179] }), t(De, [2, 152]), t(De, [2, 154]), t(De, [2, 155]), t(De, [2, 156]), t(De, [2, 157]), t(ae, [2, 162]), t(ae, [2, 163]), t(ae, [2, 164]), t(ae, [2, 165]), t(ae, [2, 166]), t(ae, [2, 167]), t(ae, [2, 168]), t(ae, [2, 169]), t(ae, [2, 170]), t(ae, [2, 171]), t(ae, [2, 172]), t(ae, [2, 173]), t(ae, [2, 174]), { 52: k, 54: 180, 66: T, 67: L, 91: Y, 95: W, 105: N, 106: D, 109: w, 111: v, 112: M, 116: 47, 122: Dt, 123: vt, 124: j, 125: ot, 126: rt, 127: nt }, { 22: Vt, 24: Ft, 26: xt, 38: ft, 39: 181, 42: Lt, 52: O, 66: A, 67: J, 73: bt, 81: Ut, 83: 140, 84: at, 85: 151, 86: ne, 87: dt, 88: ee, 89: de, 90: me, 91: be, 92: ke, 94: 142, 95: Xt, 105: ht, 106: U, 109: ie, 111: et, 112: Mt, 113: ge, 114: Qt, 115: 148, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }, { 22: Vt, 24: Ft, 26: xt, 38: ft, 39: 182, 42: Lt, 52: O, 66: A, 67: J, 73: bt, 81: Ut, 83: 140, 84: at, 85: 151, 86: ne, 87: dt, 88: ee, 89: de, 90: me, 91: be, 92: ke, 94: 142, 95: Xt, 105: ht, 106: U, 109: ie, 111: et, 112: Mt, 113: ge, 114: Qt, 115: 148, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }, { 22: Vt, 24: Ft, 26: xt, 38: ft, 39: 184, 42: Lt, 52: O, 57: [1, 183], 66: A, 67: J, 73: bt, 81: Ut, 83: 140, 84: at, 85: 151, 86: ne, 87: dt, 88: ee, 89: de, 90: me, 91: be, 92: ke, 94: 142, 95: Xt, 105: ht, 106: U, 109: ie, 111: et, 112: Mt, 113: ge, 114: Qt, 115: 148, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }, { 22: Vt, 24: Ft, 26: xt, 38: ft, 39: 185, 42: Lt, 52: O, 66: A, 67: J, 73: bt, 81: Ut, 83: 140, 84: at, 85: 151, 86: ne, 87: dt, 88: ee, 89: de, 90: me, 91: be, 92: ke, 94: 142, 95: Xt, 105: ht, 106: U, 109: ie, 111: et, 112: Mt, 113: ge, 114: Qt, 115: 148, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }, { 22: Vt, 24: Ft, 26: xt, 38: ft, 39: 186, 42: Lt, 52: O, 66: A, 67: J, 73: bt, 81: Ut, 83: 140, 84: at, 85: 151, 86: ne, 87: dt, 88: ee, 89: de, 90: me, 91: be, 92: ke, 94: 142, 95: Xt, 105: ht, 106: U, 109: ie, 111: et, 112: Mt, 113: ge, 114: Qt, 115: 148, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }, { 22: Vt, 24: Ft, 26: xt, 38: ft, 39: 187, 42: Lt, 52: O, 66: A, 67: J, 73: bt, 81: Ut, 83: 140, 84: at, 85: 151, 86: ne, 87: dt, 88: ee, 89: de, 90: me, 91: be, 92: ke, 94: 142, 95: Xt, 105: ht, 106: U, 109: ie, 111: et, 112: Mt, 113: ge, 114: Qt, 115: 148, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }, { 66: [1, 188] }, { 22: Vt, 24: Ft, 26: xt, 38: ft, 39: 189, 42: Lt, 52: O, 66: A, 67: J, 73: bt, 81: Ut, 83: 140, 84: at, 85: 151, 86: ne, 87: dt, 88: ee, 89: de, 90: me, 91: be, 92: ke, 94: 142, 95: Xt, 105: ht, 106: U, 109: ie, 111: et, 112: Mt, 113: ge, 114: Qt, 115: 148, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }, { 22: Vt, 24: Ft, 26: xt, 38: ft, 39: 190, 42: Lt, 52: O, 66: A, 67: J, 71: [1, 191], 73: bt, 81: Ut, 83: 140, 84: at, 85: 151, 86: ne, 87: dt, 88: ee, 89: de, 90: me, 91: be, 92: ke, 94: 142, 95: Xt, 105: ht, 106: U, 109: ie, 111: et, 112: Mt, 113: ge, 114: Qt, 115: 148, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }, { 22: Vt, 24: Ft, 26: xt, 38: ft, 39: 192, 42: Lt, 52: O, 66: A, 67: J, 73: bt, 81: Ut, 83: 140, 84: at, 85: 151, 86: ne, 87: dt, 88: ee, 89: de, 90: me, 91: be, 92: ke, 94: 142, 95: Xt, 105: ht, 106: U, 109: ie, 111: et, 112: Mt, 113: ge, 114: Qt, 115: 148, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }, { 22: Vt, 24: Ft, 26: xt, 38: ft, 39: 193, 42: Lt, 52: O, 66: A, 67: J, 73: bt, 81: Ut, 83: 140, 84: at, 85: 151, 86: ne, 87: dt, 88: ee, 89: de, 90: me, 91: be, 92: ke, 94: 142, 95: Xt, 105: ht, 106: U, 109: ie, 111: et, 112: Mt, 113: ge, 114: Qt, 115: 148, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }, { 22: Vt, 24: Ft, 26: xt, 38: ft, 39: 194, 42: Lt, 52: O, 66: A, 67: J, 73: bt, 81: Ut, 83: 140, 84: at, 85: 151, 86: ne, 87: dt, 88: ee, 89: de, 90: me, 91: be, 92: ke, 94: 142, 95: Xt, 105: ht, 106: U, 109: ie, 111: et, 112: Mt, 113: ge, 114: Qt, 115: 148, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }, t(jt, [2, 151]), t(Be, [2, 3]), { 8: 195, 15: ut }, { 15: [2, 7] }, t(s, [2, 28]), t(Gt, [2, 33]), t($, [2, 51], { 30: 196, 22: _t }), t(Ht, [2, 75], { 22: [1, 197] }), { 22: [1, 198] }, { 22: Vt, 24: Ft, 26: xt, 38: ft, 39: 199, 42: Lt, 52: O, 66: A, 67: J, 73: bt, 81: Ut, 83: 140, 84: at, 85: 151, 86: ne, 87: dt, 88: ee, 89: de, 90: me, 91: be, 92: ke, 94: 142, 95: Xt, 105: ht, 106: U, 109: ie, 111: et, 112: Mt, 113: ge, 114: Qt, 115: 148, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }, { 22: Vt, 24: Ft, 26: xt, 38: ft, 42: Lt, 52: O, 66: A, 67: J, 73: bt, 81: Ut, 82: [1, 200], 83: 201, 85: 151, 86: ne, 87: dt, 88: ee, 89: de, 90: me, 91: be, 92: ke, 94: 142, 95: Xt, 105: ht, 106: U, 109: ie, 111: et, 112: Mt, 113: ge, 114: Qt, 115: 148, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }, t(ae, [2, 82]), t(ae, [2, 84]), t(ae, [2, 140]), t(ae, [2, 141]), t(ae, [2, 142]), t(ae, [2, 143]), t(ae, [2, 144]), t(ae, [2, 145]), t(ae, [2, 146]), t(ae, [2, 147]), t(ae, [2, 148]), t(ae, [2, 149]), t(ae, [2, 85]), t(ae, [2, 86]), t(ae, [2, 87]), t(ae, [2, 88]), t(ae, [2, 89]), t(ae, [2, 90]), t(ae, [2, 91]), t(ae, [2, 92]), t(ae, [2, 93]), t(ae, [2, 94]), t(ae, [2, 95]), { 9: 203, 20: Ot, 21: P, 22: Vt, 23: z, 24: Ft, 26: xt, 38: ft, 40: [1, 202], 42: Lt, 52: O, 66: A, 67: J, 73: bt, 81: Ut, 83: 201, 85: 151, 86: ne, 87: dt, 88: ee, 89: de, 90: me, 91: be, 92: ke, 94: 142, 95: Xt, 105: ht, 106: U, 109: ie, 111: et, 112: Mt, 113: ge, 114: Qt, 115: 148, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }, { 18: 18, 19: 19, 20: o, 21: l, 22: u, 23: d, 32: 24, 33: 25, 34: 26, 35: 27, 36: 28, 37: 29, 38: f, 42: [1, 204], 43: 31, 44: p, 46: g, 48: b, 50: 35, 51: 45, 52: k, 54: 46, 66: T, 67: L, 86: E, 87: I, 88: V, 89: H, 90: G, 91: Y, 95: W, 105: N, 106: D, 109: w, 111: v, 112: M, 116: 47, 118: m, 119: Q, 120: x, 121: ct, 122: Dt, 123: vt, 124: j, 125: ot, 126: rt, 127: nt }, { 22: _t, 30: 205 }, { 22: [1, 206], 26: F, 52: O, 66: A, 67: J, 91: C, 105: ht, 106: U, 109: Yt, 111: et, 112: Mt, 115: 100, 117: 178, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }, { 22: [1, 207] }, { 22: [1, 208] }, { 22: [1, 209], 106: [1, 210] }, t(Oe, [2, 123]), { 22: [1, 211] }, { 22: [1, 212], 26: F, 52: O, 66: A, 67: J, 91: C, 105: ht, 106: U, 109: Yt, 111: et, 112: Mt, 115: 100, 117: 178, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }, { 22: [1, 213], 26: F, 52: O, 66: A, 67: J, 91: C, 105: ht, 106: U, 109: Yt, 111: et, 112: Mt, 115: 100, 117: 178, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }, { 84: [1, 214] }, t(Kt, [2, 103], { 22: [1, 215] }), { 84: [1, 216], 101: [1, 217] }, { 84: [1, 218] }, t(De, [2, 153]), { 84: [1, 219], 101: [1, 220] }, t(le, [2, 57], { 116: 129, 52: k, 66: T, 67: L, 91: Y, 95: W, 105: N, 106: D, 109: w, 111: v, 112: M, 122: Dt, 123: vt, 124: j, 125: ot, 126: rt, 127: nt }), { 22: Vt, 24: Ft, 26: xt, 38: ft, 41: [1, 221], 42: Lt, 52: O, 66: A, 67: J, 73: bt, 81: Ut, 83: 201, 85: 151, 86: ne, 87: dt, 88: ee, 89: de, 90: me, 91: be, 92: ke, 94: 142, 95: Xt, 105: ht, 106: U, 109: ie, 111: et, 112: Mt, 113: ge, 114: Qt, 115: 148, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }, { 22: Vt, 24: Ft, 26: xt, 38: ft, 42: Lt, 52: O, 56: [1, 222], 66: A, 67: J, 73: bt, 81: Ut, 83: 201, 85: 151, 86: ne, 87: dt, 88: ee, 89: de, 90: me, 91: be, 92: ke, 94: 142, 95: Xt, 105: ht, 106: U, 109: ie, 111: et, 112: Mt, 113: ge, 114: Qt, 115: 148, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }, { 22: Vt, 24: Ft, 26: xt, 38: ft, 39: 223, 42: Lt, 52: O, 66: A, 67: J, 73: bt, 81: Ut, 83: 140, 84: at, 85: 151, 86: ne, 87: dt, 88: ee, 89: de, 90: me, 91: be, 92: ke, 94: 142, 95: Xt, 105: ht, 106: U, 109: ie, 111: et, 112: Mt, 113: ge, 114: Qt, 115: 148, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }, { 22: Vt, 24: Ft, 26: xt, 38: ft, 42: Lt, 52: O, 58: [1, 224], 66: A, 67: J, 73: bt, 81: Ut, 83: 201, 85: 151, 86: ne, 87: dt, 88: ee, 89: de, 90: me, 91: be, 92: ke, 94: 142, 95: Xt, 105: ht, 106: U, 109: ie, 111: et, 112: Mt, 113: ge, 114: Qt, 115: 148, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }, { 22: Vt, 24: Ft, 26: xt, 38: ft, 42: Lt, 52: O, 60: [1, 225], 66: A, 67: J, 73: bt, 81: Ut, 83: 201, 85: 151, 86: ne, 87: dt, 88: ee, 89: de, 90: me, 91: be, 92: ke, 94: 142, 95: Xt, 105: ht, 106: U, 109: ie, 111: et, 112: Mt, 113: ge, 114: Qt, 115: 148, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }, { 22: Vt, 24: Ft, 26: xt, 38: ft, 42: Lt, 52: O, 62: [1, 226], 66: A, 67: J, 73: bt, 81: Ut, 83: 201, 85: 151, 86: ne, 87: dt, 88: ee, 89: de, 90: me, 91: be, 92: ke, 94: 142, 95: Xt, 105: ht, 106: U, 109: ie, 111: et, 112: Mt, 113: ge, 114: Qt, 115: 148, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }, { 22: Vt, 24: Ft, 26: xt, 38: ft, 42: Lt, 52: O, 64: [1, 227], 66: A, 67: J, 73: bt, 81: Ut, 83: 201, 85: 151, 86: ne, 87: dt, 88: ee, 89: de, 90: me, 91: be, 92: ke, 94: 142, 95: Xt, 105: ht, 106: U, 109: ie, 111: et, 112: Mt, 113: ge, 114: Qt, 115: 148, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }, { 67: [1, 228] }, { 22: Vt, 24: Ft, 26: xt, 38: ft, 42: Lt, 52: O, 66: A, 67: J, 70: [1, 229], 73: bt, 81: Ut, 83: 201, 85: 151, 86: ne, 87: dt, 88: ee, 89: de, 90: me, 91: be, 92: ke, 94: 142, 95: Xt, 105: ht, 106: U, 109: ie, 111: et, 112: Mt, 113: ge, 114: Qt, 115: 148, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }, { 22: Vt, 24: Ft, 26: xt, 38: ft, 42: Lt, 52: O, 66: A, 67: J, 72: [1, 230], 73: bt, 81: Ut, 83: 201, 85: 151, 86: ne, 87: dt, 88: ee, 89: de, 90: me, 91: be, 92: ke, 94: 142, 95: Xt, 105: ht, 106: U, 109: ie, 111: et, 112: Mt, 113: ge, 114: Qt, 115: 148, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }, { 22: Vt, 24: Ft, 26: xt, 38: ft, 39: 231, 42: Lt, 52: O, 66: A, 67: J, 73: bt, 81: Ut, 83: 140, 84: at, 85: 151, 86: ne, 87: dt, 88: ee, 89: de, 90: me, 91: be, 92: ke, 94: 142, 95: Xt, 105: ht, 106: U, 109: ie, 111: et, 112: Mt, 113: ge, 114: Qt, 115: 148, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }, { 22: Vt, 24: Ft, 26: xt, 38: ft, 41: [1, 232], 42: Lt, 52: O, 66: A, 67: J, 73: bt, 81: Ut, 83: 201, 85: 151, 86: ne, 87: dt, 88: ee, 89: de, 90: me, 91: be, 92: ke, 94: 142, 95: Xt, 105: ht, 106: U, 109: ie, 111: et, 112: Mt, 113: ge, 114: Qt, 115: 148, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }, { 22: Vt, 24: Ft, 26: xt, 38: ft, 42: Lt, 52: O, 66: A, 67: J, 73: bt, 75: [1, 233], 77: [1, 234], 81: Ut, 83: 201, 85: 151, 86: ne, 87: dt, 88: ee, 89: de, 90: me, 91: be, 92: ke, 94: 142, 95: Xt, 105: ht, 106: U, 109: ie, 111: et, 112: Mt, 113: ge, 114: Qt, 115: 148, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }, { 22: Vt, 24: Ft, 26: xt, 38: ft, 42: Lt, 52: O, 66: A, 67: J, 73: bt, 75: [1, 236], 77: [1, 235], 81: Ut, 83: 201, 85: 151, 86: ne, 87: dt, 88: ee, 89: de, 90: me, 91: be, 92: ke, 94: 142, 95: Xt, 105: ht, 106: U, 109: ie, 111: et, 112: Mt, 113: ge, 114: Qt, 115: 148, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }, { 9: 237, 20: Ot, 21: P, 23: z }, t($, [2, 52], { 52: Wr }), t(Ht, [2, 77]), t(Ht, [2, 76]), { 22: Vt, 24: Ft, 26: xt, 38: ft, 42: Lt, 52: O, 66: A, 67: J, 68: [1, 238], 73: bt, 81: Ut, 83: 201, 85: 151, 86: ne, 87: dt, 88: ee, 89: de, 90: me, 91: be, 92: ke, 94: 142, 95: Xt, 105: ht, 106: U, 109: ie, 111: et, 112: Mt, 113: ge, 114: Qt, 115: 148, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }, t(Ht, [2, 79]), t(ae, [2, 83]), { 22: Vt, 24: Ft, 26: xt, 38: ft, 39: 239, 42: Lt, 52: O, 66: A, 67: J, 73: bt, 81: Ut, 83: 140, 84: at, 85: 151, 86: ne, 87: dt, 88: ee, 89: de, 90: me, 91: be, 92: ke, 94: 142, 95: Xt, 105: ht, 106: U, 109: ie, 111: et, 112: Mt, 113: ge, 114: Qt, 115: 148, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }, t(an, a, { 17: 240 }), t(K, [2, 43]), { 51: 241, 52: k, 54: 46, 66: T, 67: L, 91: Y, 95: W, 105: N, 106: D, 109: w, 111: v, 112: M, 116: 47, 122: Dt, 123: vt, 124: j, 125: ot, 126: rt, 127: nt }, { 22: Fe, 66: Pe, 67: Ie, 86: Ge, 96: 242, 102: tr, 105: zt, 107: 243, 108: 244, 109: Z, 110: St, 111: Nt, 112: fe, 113: Me }, { 22: Fe, 66: Pe, 67: Ie, 86: Ge, 96: 256, 102: tr, 105: zt, 107: 243, 108: 244, 109: Z, 110: St, 111: Nt, 112: fe, 113: Me }, { 22: Fe, 66: Pe, 67: Ie, 86: Ge, 96: 257, 102: tr, 104: [1, 258], 105: zt, 107: 243, 108: 244, 109: Z, 110: St, 111: Nt, 112: fe, 113: Me }, { 22: Fe, 66: Pe, 67: Ie, 86: Ge, 96: 259, 102: tr, 104: [1, 260], 105: zt, 107: 243, 108: 244, 109: Z, 110: St, 111: Nt, 112: fe, 113: Me }, { 105: [1, 261] }, { 22: Fe, 66: Pe, 67: Ie, 86: Ge, 96: 262, 102: tr, 105: zt, 107: 243, 108: 244, 109: Z, 110: St, 111: Nt, 112: fe, 113: Me }, { 22: Fe, 66: Pe, 67: Ie, 86: Ge, 96: 263, 102: tr, 105: zt, 107: 243, 108: 244, 109: Z, 110: St, 111: Nt, 112: fe, 113: Me }, { 26: F, 52: O, 66: A, 67: J, 91: C, 97: 264, 105: ht, 106: U, 109: Yt, 111: et, 112: Mt, 115: 100, 117: 98, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }, t(Kt, [2, 102]), { 84: [1, 265] }, t(Kt, [2, 106], { 22: [1, 266] }), t(Kt, [2, 107]), t(Kt, [2, 110]), t(Kt, [2, 112], { 22: [1, 267] }), t(Kt, [2, 113]), t($t, [2, 58]), t($t, [2, 59]), { 22: Vt, 24: Ft, 26: xt, 38: ft, 42: Lt, 52: O, 58: [1, 268], 66: A, 67: J, 73: bt, 81: Ut, 83: 201, 85: 151, 86: ne, 87: dt, 88: ee, 89: de, 90: me, 91: be, 92: ke, 94: 142, 95: Xt, 105: ht, 106: U, 109: ie, 111: et, 112: Mt, 113: ge, 114: Qt, 115: 148, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }, t($t, [2, 66]), t($t, [2, 61]), t($t, [2, 62]), t($t, [2, 63]), { 66: [1, 269] }, t($t, [2, 65]), t($t, [2, 67]), { 22: Vt, 24: Ft, 26: xt, 38: ft, 42: Lt, 52: O, 66: A, 67: J, 72: [1, 270], 73: bt, 81: Ut, 83: 201, 85: 151, 86: ne, 87: dt, 88: ee, 89: de, 90: me, 91: be, 92: ke, 94: 142, 95: Xt, 105: ht, 106: U, 109: ie, 111: et, 112: Mt, 113: ge, 114: Qt, 115: 148, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }, t($t, [2, 69]), t($t, [2, 70]), t($t, [2, 72]), t($t, [2, 71]), t($t, [2, 73]), t(Be, [2, 4]), t([22, 52, 66, 67, 91, 95, 105, 106, 109, 111, 112, 122, 123, 124, 125, 126, 127], [2, 81]), { 22: Vt, 24: Ft, 26: xt, 38: ft, 41: [1, 271], 42: Lt, 52: O, 66: A, 67: J, 73: bt, 81: Ut, 83: 201, 85: 151, 86: ne, 87: dt, 88: ee, 89: de, 90: me, 91: be, 92: ke, 94: 142, 95: Xt, 105: ht, 106: U, 109: ie, 111: et, 112: Mt, 113: ge, 114: Qt, 115: 148, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }, { 18: 18, 19: 19, 20: o, 21: l, 22: u, 23: d, 32: 24, 33: 25, 34: 26, 35: 27, 36: 28, 37: 29, 38: f, 42: [1, 272], 43: 31, 44: p, 46: g, 48: b, 50: 35, 51: 45, 52: k, 54: 46, 66: T, 67: L, 86: E, 87: I, 88: V, 89: H, 90: G, 91: Y, 95: W, 105: N, 106: D, 109: w, 111: v, 112: M, 116: 47, 118: m, 119: Q, 120: x, 121: ct, 122: Dt, 123: vt, 124: j, 125: ot, 126: rt, 127: nt }, t(le, [2, 56]), t(Kt, [2, 115], { 106: Le }), t(We, [2, 125], { 108: 274, 22: Fe, 66: Pe, 67: Ie, 86: Ge, 102: tr, 105: zt, 109: Z, 110: St, 111: Nt, 112: fe, 113: Me }), t(xe, [2, 127]), t(xe, [2, 129]), t(xe, [2, 130]), t(xe, [2, 131]), t(xe, [2, 132]), t(xe, [2, 133]), t(xe, [2, 134]), t(xe, [2, 135]), t(xe, [2, 136]), t(xe, [2, 137]), t(xe, [2, 138]), t(xe, [2, 139]), t(Kt, [2, 116], { 106: Le }), t(Kt, [2, 117], { 106: Le }), { 22: [1, 275] }, t(Kt, [2, 118], { 106: Le }), { 22: [1, 276] }, t(Oe, [2, 124]), t(Kt, [2, 98], { 106: Le }), t(Kt, [2, 99], { 106: Le }), t(Kt, [2, 100], { 115: 100, 117: 178, 26: F, 52: O, 66: A, 67: J, 91: C, 105: ht, 106: U, 109: Yt, 111: et, 112: Mt, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }), t(Kt, [2, 104]), { 101: [1, 277] }, { 101: [1, 278] }, { 58: [1, 279] }, { 68: [1, 280] }, { 72: [1, 281] }, { 9: 282, 20: Ot, 21: P, 23: z }, t(K, [2, 42]), { 22: Fe, 66: Pe, 67: Ie, 86: Ge, 102: tr, 105: zt, 107: 283, 108: 244, 109: Z, 110: St, 111: Nt, 112: fe, 113: Me }, t(xe, [2, 128]), { 26: F, 52: O, 66: A, 67: J, 91: C, 97: 284, 105: ht, 106: U, 109: Yt, 111: et, 112: Mt, 115: 100, 117: 98, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }, { 26: F, 52: O, 66: A, 67: J, 91: C, 97: 285, 105: ht, 106: U, 109: Yt, 111: et, 112: Mt, 115: 100, 117: 98, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }, t(Kt, [2, 108]), t(Kt, [2, 114]), t($t, [2, 60]), { 22: Vt, 24: Ft, 26: xt, 38: ft, 39: 286, 42: Lt, 52: O, 66: A, 67: J, 73: bt, 81: Ut, 83: 140, 84: at, 85: 151, 86: ne, 87: dt, 88: ee, 89: de, 90: me, 91: be, 92: ke, 94: 142, 95: Xt, 105: ht, 106: U, 109: ie, 111: et, 112: Mt, 113: ge, 114: Qt, 115: 148, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }, t($t, [2, 68]), t(an, a, { 17: 287 }), t(We, [2, 126], { 108: 274, 22: Fe, 66: Pe, 67: Ie, 86: Ge, 102: tr, 105: zt, 109: Z, 110: St, 111: Nt, 112: fe, 113: Me }), t(Kt, [2, 121], { 115: 100, 117: 178, 22: [1, 288], 26: F, 52: O, 66: A, 67: J, 91: C, 105: ht, 106: U, 109: Yt, 111: et, 112: Mt, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }), t(Kt, [2, 122], { 115: 100, 117: 178, 22: [1, 289], 26: F, 52: O, 66: A, 67: J, 91: C, 105: ht, 106: U, 109: Yt, 111: et, 112: Mt, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }), { 22: Vt, 24: Ft, 26: xt, 38: ft, 41: [1, 290], 42: Lt, 52: O, 66: A, 67: J, 73: bt, 81: Ut, 83: 201, 85: 151, 86: ne, 87: dt, 88: ee, 89: de, 90: me, 91: be, 92: ke, 94: 142, 95: Xt, 105: ht, 106: U, 109: ie, 111: et, 112: Mt, 113: ge, 114: Qt, 115: 148, 122: Tt, 123: gt, 124: Et, 125: wt, 126: pt, 127: st }, { 18: 18, 19: 19, 20: o, 21: l, 22: u, 23: d, 32: 24, 33: 25, 34: 26, 35: 27, 36: 28, 37: 29, 38: f, 42: [1, 291], 43: 31, 44: p, 46: g, 48: b, 50: 35, 51: 45, 52: k, 54: 46, 66: T, 67: L, 86: E, 87: I, 88: V, 89: H, 90: G, 91: Y, 95: W, 105: N, 106: D, 109: w, 111: v, 112: M, 116: 47, 118: m, 119: Q, 120: x, 121: ct, 122: Dt, 123: vt, 124: j, 125: ot, 126: rt, 127: nt }, { 22: Fe, 66: Pe, 67: Ie, 86: Ge, 96: 292, 102: tr, 105: zt, 107: 243, 108: 244, 109: Z, 110: St, 111: Nt, 112: fe, 113: Me }, { 22: Fe, 66: Pe, 67: Ie, 86: Ge, 96: 293, 102: tr, 105: zt, 107: 243, 108: 244, 109: Z, 110: St, 111: Nt, 112: fe, 113: Me }, t($t, [2, 64]), t(K, [2, 41]), t(Kt, [2, 119], { 106: Le }), t(Kt, [2, 120], { 106: Le })],
|
||
defaultActions: { 2: [2, 1], 9: [2, 5], 10: [2, 2], 132: [2, 7] },
|
||
parseError: function(qt, te) {
|
||
if (te.recoverable)
|
||
this.trace(qt);
|
||
else {
|
||
var oe = new Error(qt);
|
||
throw oe.hash = te, oe;
|
||
}
|
||
},
|
||
parse: function(qt) {
|
||
var te = this, oe = [0], Rt = [], Ye = [null], q = [], Qi = this.table, tt = "", vr = 0, ol = 0, $u = 2, ll = 1, cl = q.slice.call(arguments, 1), er = Object.create(this.lexer), In = { yy: {} };
|
||
for (var On in this.yy)
|
||
Object.prototype.hasOwnProperty.call(this.yy, On) && (In.yy[On] = this.yy[On]);
|
||
er.setInput(qt, In.yy), In.yy.lexer = er, In.yy.parser = this, typeof er.yylloc > "u" && (er.yylloc = {});
|
||
var Ji = er.yylloc;
|
||
q.push(Ji);
|
||
var Va = er.options && er.options.ranges;
|
||
typeof In.yy.parseError == "function" ? this.parseError = In.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
||
function ul() {
|
||
var Gr;
|
||
return Gr = Rt.pop() || er.lex() || ll, typeof Gr != "number" && (Gr instanceof Array && (Rt = Gr, Gr = Rt.pop()), Gr = te.symbols_[Gr] || Gr), Gr;
|
||
}
|
||
for (var br, Se, Ar, Zn, on = {}, Qn, Hr, Ua, Fs; ; ) {
|
||
if (Se = oe[oe.length - 1], this.defaultActions[Se] ? Ar = this.defaultActions[Se] : ((br === null || typeof br > "u") && (br = ul()), Ar = Qi[Se] && Qi[Se][br]), typeof Ar > "u" || !Ar.length || !Ar[0]) {
|
||
var ts = "";
|
||
Fs = [];
|
||
for (Qn in Qi[Se])
|
||
this.terminals_[Qn] && Qn > $u && Fs.push("'" + this.terminals_[Qn] + "'");
|
||
er.showPosition ? ts = "Parse error on line " + (vr + 1) + `:
|
||
` + er.showPosition() + `
|
||
Expecting ` + Fs.join(", ") + ", got '" + (this.terminals_[br] || br) + "'" : ts = "Parse error on line " + (vr + 1) + ": Unexpected " + (br == ll ? "end of input" : "'" + (this.terminals_[br] || br) + "'"), this.parseError(ts, {
|
||
text: er.match,
|
||
token: this.terminals_[br] || br,
|
||
line: er.yylineno,
|
||
loc: Ji,
|
||
expected: Fs
|
||
});
|
||
}
|
||
if (Ar[0] instanceof Array && Ar.length > 1)
|
||
throw new Error("Parse Error: multiple actions possible at state: " + Se + ", token: " + br);
|
||
switch (Ar[0]) {
|
||
case 1:
|
||
oe.push(br), Ye.push(er.yytext), q.push(er.yylloc), oe.push(Ar[1]), br = null, ol = er.yyleng, tt = er.yytext, vr = er.yylineno, Ji = er.yylloc;
|
||
break;
|
||
case 2:
|
||
if (Hr = this.productions_[Ar[1]][1], on.$ = Ye[Ye.length - Hr], on._$ = {
|
||
first_line: q[q.length - (Hr || 1)].first_line,
|
||
last_line: q[q.length - 1].last_line,
|
||
first_column: q[q.length - (Hr || 1)].first_column,
|
||
last_column: q[q.length - 1].last_column
|
||
}, Va && (on._$.range = [
|
||
q[q.length - (Hr || 1)].range[0],
|
||
q[q.length - 1].range[1]
|
||
]), Zn = this.performAction.apply(on, [
|
||
tt,
|
||
ol,
|
||
vr,
|
||
In.yy,
|
||
Ar[1],
|
||
Ye,
|
||
q
|
||
].concat(cl)), typeof Zn < "u")
|
||
return Zn;
|
||
Hr && (oe = oe.slice(0, -1 * Hr * 2), Ye = Ye.slice(0, -1 * Hr), q = q.slice(0, -1 * Hr)), oe.push(this.productions_[Ar[1]][0]), Ye.push(on.$), q.push(on._$), Ua = Qi[oe[oe.length - 2]][oe[oe.length - 1]], oe.push(Ua);
|
||
break;
|
||
case 3:
|
||
return !0;
|
||
}
|
||
}
|
||
return !0;
|
||
}
|
||
}, Mi = function() {
|
||
var Rr = {
|
||
EOF: 1,
|
||
parseError: function(te, oe) {
|
||
if (this.yy.parser)
|
||
this.yy.parser.parseError(te, oe);
|
||
else
|
||
throw new Error(te);
|
||
},
|
||
setInput: function(qt, te) {
|
||
return this.yy = te || this.yy || {}, this._input = qt, 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 qt = this._input[0];
|
||
this.yytext += qt, this.yyleng++, this.offset++, this.match += qt, this.matched += qt;
|
||
var te = qt.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), qt;
|
||
},
|
||
unput: function(qt) {
|
||
var te = qt.length, oe = qt.split(/(?:\r\n?|\n)/g);
|
||
this._input = qt + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - te), this.offset -= te;
|
||
var Rt = 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), oe.length - 1 && (this.yylineno -= oe.length - 1);
|
||
var Ye = 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: oe ? (oe.length === Rt.length ? this.yylloc.first_column : 0) + Rt[Rt.length - oe.length].length - oe[0].length : this.yylloc.first_column - te
|
||
}, this.options.ranges && (this.yylloc.range = [Ye[0], Ye[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(qt) {
|
||
this.unput(this.match.slice(qt));
|
||
},
|
||
pastInput: function() {
|
||
var qt = this.matched.substr(0, this.matched.length - this.match.length);
|
||
return (qt.length > 20 ? "..." : "") + qt.substr(-20).replace(/\n/g, "");
|
||
},
|
||
upcomingInput: function() {
|
||
var qt = this.match;
|
||
return qt.length < 20 && (qt += this._input.substr(0, 20 - qt.length)), (qt.substr(0, 20) + (qt.length > 20 ? "..." : "")).replace(/\n/g, "");
|
||
},
|
||
showPosition: function() {
|
||
var qt = this.pastInput(), te = new Array(qt.length + 1).join("-");
|
||
return qt + this.upcomingInput() + `
|
||
` + te + "^";
|
||
},
|
||
test_match: function(qt, te) {
|
||
var oe, Rt, Ye;
|
||
if (this.options.backtrack_lexer && (Ye = {
|
||
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 && (Ye.yylloc.range = this.yylloc.range.slice(0))), Rt = qt[0].match(/(?:\r\n?|\n).*/g), Rt && (this.yylineno += Rt.length), this.yylloc = {
|
||
first_line: this.yylloc.last_line,
|
||
last_line: this.yylineno + 1,
|
||
first_column: this.yylloc.last_column,
|
||
last_column: Rt ? Rt[Rt.length - 1].length - Rt[Rt.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + qt[0].length
|
||
}, this.yytext += qt[0], this.match += qt[0], this.matches = qt, 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(qt[0].length), this.matched += qt[0], oe = this.performAction.call(this, this.yy, this, te, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), oe)
|
||
return oe;
|
||
if (this._backtrack) {
|
||
for (var q in Ye)
|
||
this[q] = Ye[q];
|
||
return !1;
|
||
}
|
||
return !1;
|
||
},
|
||
next: function() {
|
||
if (this.done)
|
||
return this.EOF;
|
||
this._input || (this.done = !0);
|
||
var qt, te, oe, Rt;
|
||
this._more || (this.yytext = "", this.match = "");
|
||
for (var Ye = this._currentRules(), q = 0; q < Ye.length; q++)
|
||
if (oe = this._input.match(this.rules[Ye[q]]), oe && (!te || oe[0].length > te[0].length)) {
|
||
if (te = oe, Rt = q, this.options.backtrack_lexer) {
|
||
if (qt = this.test_match(oe, Ye[q]), qt !== !1)
|
||
return qt;
|
||
if (this._backtrack) {
|
||
te = !1;
|
||
continue;
|
||
} else
|
||
return !1;
|
||
} else if (!this.options.flex)
|
||
break;
|
||
}
|
||
return te ? (qt = this.test_match(te, Ye[Rt]), qt !== !1 ? qt : !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, oe, Rt, Ye) {
|
||
switch (Rt) {
|
||
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 81;
|
||
case 70:
|
||
return 81;
|
||
case 71:
|
||
return 81;
|
||
case 72:
|
||
return 59;
|
||
case 73:
|
||
return 60;
|
||
case 74:
|
||
return 61;
|
||
case 75:
|
||
return 62;
|
||
case 76:
|
||
return 63;
|
||
case 77:
|
||
return 64;
|
||
case 78:
|
||
return 65;
|
||
case 79:
|
||
return 69;
|
||
case 80:
|
||
return 70;
|
||
case 81:
|
||
return 55;
|
||
case 82:
|
||
return 56;
|
||
case 83:
|
||
return 109;
|
||
case 84:
|
||
return 112;
|
||
case 85:
|
||
return 127;
|
||
case 86:
|
||
return 124;
|
||
case 87:
|
||
return 113;
|
||
case 88:
|
||
return 125;
|
||
case 89:
|
||
return 125;
|
||
case 90:
|
||
return 114;
|
||
case 91:
|
||
return 73;
|
||
case 92:
|
||
return 92;
|
||
case 93:
|
||
return "SEP";
|
||
case 94:
|
||
return 91;
|
||
case 95:
|
||
return 66;
|
||
case 96:
|
||
return 75;
|
||
case 97:
|
||
return 74;
|
||
case 98:
|
||
return 77;
|
||
case 99:
|
||
return 76;
|
||
case 100:
|
||
return 122;
|
||
case 101:
|
||
return 123;
|
||
case 102:
|
||
return 68;
|
||
case 103:
|
||
return 57;
|
||
case 104:
|
||
return 58;
|
||
case 105:
|
||
return 40;
|
||
case 106:
|
||
return 41;
|
||
case 107:
|
||
return 71;
|
||
case 108:
|
||
return 72;
|
||
case 109:
|
||
return 133;
|
||
case 110:
|
||
return 21;
|
||
case 111:
|
||
return 22;
|
||
case 112:
|
||
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*[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], inclusive: !0 } }
|
||
};
|
||
return Rr;
|
||
}();
|
||
Ne.lexer = Mi;
|
||
function Ni() {
|
||
this.yy = {};
|
||
}
|
||
return Ni.prototype = Ne, Ne.Parser = Ni, new Ni();
|
||
}();
|
||
I1.parser = I1;
|
||
const bp = I1, bR = (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;
|
||
}, _R = (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;
|
||
}, xR = "flowchart-";
|
||
let _p = 0, dd = X(), Ue = {}, Cs = [], Js = {}, wi = [], Zc = {}, fd = {}, Ql = 0, O1 = !0, Pn, Yu, Vu = [];
|
||
const Uu = (t) => he.sanitizeText(t, dd), vR = function(t, e, r) {
|
||
ze.parseDirective(this, t, e, r);
|
||
}, zu = function(t) {
|
||
const e = Object.keys(Ue);
|
||
for (const r of e)
|
||
if (Ue[r].id === t)
|
||
return Ue[r].domId;
|
||
return t;
|
||
}, kR = function(t, e, r, n, i, s, a = {}) {
|
||
let o, l = t;
|
||
l !== void 0 && l.trim().length !== 0 && (Ue[l] === void 0 && (Ue[l] = {
|
||
id: l,
|
||
domId: xR + l + "-" + _p,
|
||
styles: [],
|
||
classes: []
|
||
}), _p++, e !== void 0 ? (dd = X(), o = Uu(e.trim()), o[0] === '"' && o[o.length - 1] === '"' && (o = o.substring(1, o.length - 1)), Ue[l].text = o) : Ue[l].text === void 0 && (Ue[l].text = t), r !== void 0 && (Ue[l].type = r), n != null && n.forEach(function(u) {
|
||
Ue[l].styles.push(u);
|
||
}), i != null && i.forEach(function(u) {
|
||
Ue[l].classes.push(u);
|
||
}), s !== void 0 && (Ue[l].dir = s), Ue[l].props === void 0 ? Ue[l].props = a : a !== void 0 && Object.assign(Ue[l].props, a));
|
||
}, wR = function(t, e, r, n) {
|
||
const a = { start: t, end: e, type: void 0, text: "" };
|
||
n = r.text, n !== void 0 && (a.text = Uu(n.trim()), a.text[0] === '"' && a.text[a.text.length - 1] === '"' && (a.text = a.text.substring(1, a.text.length - 1))), r !== void 0 && (a.type = r.type, a.stroke = r.stroke, a.length = r.length), Cs.push(a);
|
||
}, TR = function(t, e, r, n) {
|
||
let i, s;
|
||
for (i = 0; i < t.length; i++)
|
||
for (s = 0; s < e.length; s++)
|
||
wR(t[i], e[s], r, n);
|
||
}, ER = function(t, e) {
|
||
t.forEach(function(r) {
|
||
r === "default" ? Cs.defaultInterpolate = e : Cs[r].interpolate = e;
|
||
});
|
||
}, CR = function(t, e) {
|
||
t.forEach(function(r) {
|
||
r === "default" ? Cs.defaultStyle = e : (ye.isSubstringInArray("fill", e) === -1 && e.push("fill:none"), Cs[r].style = e);
|
||
});
|
||
}, SR = function(t, e) {
|
||
Js[t] === void 0 && (Js[t] = { id: t, styles: [], textStyles: [] }), e != null && e.forEach(function(r) {
|
||
if (r.match("color")) {
|
||
const i = r.replace("fill", "bgFill").replace("color", "fill");
|
||
Js[t].textStyles.push(i);
|
||
}
|
||
Js[t].styles.push(r);
|
||
});
|
||
}, AR = function(t) {
|
||
Pn = t, Pn.match(/.*</) && (Pn = "RL"), Pn.match(/.*\^/) && (Pn = "BT"), Pn.match(/.*>/) && (Pn = "LR"), Pn.match(/.*v/) && (Pn = "TB");
|
||
}, pd = function(t, e) {
|
||
t.split(",").forEach(function(r) {
|
||
let n = r;
|
||
Ue[n] !== void 0 && Ue[n].classes.push(e), Zc[n] !== void 0 && Zc[n].classes.push(e);
|
||
});
|
||
}, LR = function(t, e) {
|
||
t.split(",").forEach(function(r) {
|
||
e !== void 0 && (fd[Yu === "gen-1" ? zu(r) : r] = Uu(e));
|
||
});
|
||
}, DR = function(t, e, r) {
|
||
let n = zu(t);
|
||
if (X().securityLevel !== "loose" || e === void 0)
|
||
return;
|
||
let i = [];
|
||
if (typeof r == "string") {
|
||
i = r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
|
||
for (let s = 0; s < i.length; s++) {
|
||
let a = i[s].trim();
|
||
a.charAt(0) === '"' && a.charAt(a.length - 1) === '"' && (a = a.substr(1, a.length - 2)), i[s] = a;
|
||
}
|
||
}
|
||
i.length === 0 && i.push(t), Ue[t] !== void 0 && (Ue[t].haveCallback = !0, Vu.push(function() {
|
||
const s = document.querySelector(`[id="${n}"]`);
|
||
s !== null && s.addEventListener(
|
||
"click",
|
||
function() {
|
||
ye.runFunc(e, ...i);
|
||
},
|
||
!1
|
||
);
|
||
}));
|
||
}, MR = function(t, e, r) {
|
||
t.split(",").forEach(function(n) {
|
||
Ue[n] !== void 0 && (Ue[n].link = ye.formatUrl(e, dd), Ue[n].linkTarget = r);
|
||
}), pd(t, "clickable");
|
||
}, NR = function(t) {
|
||
return fd[t];
|
||
}, BR = function(t, e, r) {
|
||
t.split(",").forEach(function(n) {
|
||
DR(n, e, r);
|
||
}), pd(t, "clickable");
|
||
}, IR = function(t) {
|
||
Vu.forEach(function(e) {
|
||
e(t);
|
||
});
|
||
}, OR = function() {
|
||
return Pn.trim();
|
||
}, RR = function() {
|
||
return Ue;
|
||
}, FR = function() {
|
||
return Cs;
|
||
}, PR = function() {
|
||
return Js;
|
||
}, M3 = function(t) {
|
||
let e = At(".mermaidTooltip");
|
||
(e._groups || e)[0][0] === null && (e = At("body").append("div").attr("class", "mermaidTooltip").style("opacity", 0)), At(t).select("svg").selectAll("g.node").on("mouseover", function() {
|
||
const i = At(this);
|
||
if (i.attr("title") === null)
|
||
return;
|
||
const a = this.getBoundingClientRect();
|
||
e.transition().duration(200).style("opacity", ".9"), e.text(i.attr("title")).style("left", window.scrollX + a.left + (a.right - a.left) / 2 + "px").style("top", window.scrollY + a.top - 14 + document.body.scrollTop + "px"), e.html(e.html().replace(/<br\/>/g, "<br/>")), i.classed("hover", !0);
|
||
}).on("mouseout", function() {
|
||
e.transition().duration(500).style("opacity", 0), At(this).classed("hover", !1);
|
||
});
|
||
};
|
||
Vu.push(M3);
|
||
const YR = function(t = "gen-1") {
|
||
Ue = {}, Js = {}, Cs = [], Vu = [M3], wi = [], Zc = {}, Ql = 0, fd = [], O1 = !0, Yu = t, Dn();
|
||
}, VR = (t) => {
|
||
Yu = t || "gen-1";
|
||
}, UR = function() {
|
||
return "fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;";
|
||
}, zR = function(t, e, r) {
|
||
let n = t.trim(), i = r;
|
||
t === r && r.match(/\s/) && (n = void 0);
|
||
function s(d) {
|
||
const f = { boolean: {}, number: {}, string: {} }, p = [];
|
||
let g;
|
||
return { nodeList: d.filter(function(k) {
|
||
const T = typeof k;
|
||
return k.stmt && k.stmt === "dir" ? (g = k.value, !1) : k.trim() === "" ? !1 : T in f ? f[T].hasOwnProperty(k) ? !1 : f[T][k] = !0 : p.includes(k) ? !1 : p.push(k);
|
||
}), dir: g };
|
||
}
|
||
let a = [];
|
||
const { nodeList: o, dir: l } = s(a.concat.apply(a, e));
|
||
if (a = o, Yu === "gen-1")
|
||
for (let d = 0; d < a.length; d++)
|
||
a[d] = zu(a[d]);
|
||
n = n || "subGraph" + Ql, i = i || "", i = Uu(i), Ql = Ql + 1;
|
||
const u = { id: n, nodes: a, title: i.trim(), classes: [], dir: l };
|
||
return B.info("Adding", u.id, u.nodes, u.dir), u.nodes = O3(u, wi).nodes, wi.push(u), Zc[n] = u, n;
|
||
}, WR = function(t) {
|
||
for (const [e, r] of wi.entries())
|
||
if (r.id === t)
|
||
return e;
|
||
return -1;
|
||
};
|
||
let io = -1;
|
||
const N3 = [], B3 = function(t, e) {
|
||
const r = wi[e].nodes;
|
||
if (io = io + 1, io > 2e3)
|
||
return;
|
||
if (N3[io] = e, wi[e].id === t)
|
||
return {
|
||
result: !0,
|
||
count: 0
|
||
};
|
||
let n = 0, i = 1;
|
||
for (; n < r.length; ) {
|
||
const s = WR(r[n]);
|
||
if (s >= 0) {
|
||
const a = B3(t, s);
|
||
if (a.result)
|
||
return {
|
||
result: !0,
|
||
count: i + a.count
|
||
};
|
||
i = i + a.count;
|
||
}
|
||
n = n + 1;
|
||
}
|
||
return {
|
||
result: !1,
|
||
count: i
|
||
};
|
||
}, HR = function(t) {
|
||
return N3[t];
|
||
}, GR = function() {
|
||
io = -1, wi.length > 0 && B3("none", wi.length - 1);
|
||
}, qR = function() {
|
||
return wi;
|
||
}, jR = () => O1 ? (O1 = !1, !0) : !1, XR = (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.includes("=") && (n = "thick"), e.includes(".") && (n = "dotted"), { type: r, stroke: n };
|
||
}, $R = (t, e) => {
|
||
const r = e.length;
|
||
let n = 0;
|
||
for (let i = 0; i < r; ++i)
|
||
e[i] === t && ++n;
|
||
return n;
|
||
}, KR = (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", s = r.length - 1;
|
||
r[0] === "=" && (i = "thick");
|
||
let a = $R(".", r);
|
||
return a && (i = "dotted", s = a), { type: n, stroke: i, length: s };
|
||
}, ZR = (t, e) => {
|
||
const r = KR(t);
|
||
let n;
|
||
if (e) {
|
||
if (n = XR(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;
|
||
}, I3 = (t, e) => {
|
||
let r = !1;
|
||
return t.forEach((n) => {
|
||
n.nodes.indexOf(e) >= 0 && (r = !0);
|
||
}), r;
|
||
}, O3 = (t, e) => {
|
||
const r = [];
|
||
return t.nodes.forEach((n, i) => {
|
||
I3(e, n) || r.push(t.nodes[i]);
|
||
}), { nodes: r };
|
||
}, ci = {
|
||
parseDirective: vR,
|
||
defaultConfig: () => _a.flowchart,
|
||
setAccTitle: sn,
|
||
getAccTitle: Mn,
|
||
getAccDescription: Bn,
|
||
setAccDescription: Nn,
|
||
addVertex: kR,
|
||
lookUpDomId: zu,
|
||
addLink: TR,
|
||
updateLinkInterpolate: ER,
|
||
updateLink: CR,
|
||
addClass: SR,
|
||
setDirection: AR,
|
||
setClass: pd,
|
||
setTooltip: LR,
|
||
getTooltip: NR,
|
||
setClickEvent: BR,
|
||
setLink: MR,
|
||
bindFunctions: IR,
|
||
getDirection: OR,
|
||
getVertices: RR,
|
||
getEdges: FR,
|
||
getClasses: PR,
|
||
clear: YR,
|
||
setGen: VR,
|
||
defaultStyle: UR,
|
||
addSubGraph: zR,
|
||
getDepthFirstPos: HR,
|
||
indexNodes: GR,
|
||
getSubGraphs: qR,
|
||
destructLink: ZR,
|
||
lex: {
|
||
firstGraph: jR
|
||
},
|
||
exists: I3,
|
||
makeUniq: O3,
|
||
setDiagramTitle: Si,
|
||
getDiagramTitle: Ai
|
||
};
|
||
function R3(t, e) {
|
||
return !!t.children(e).length;
|
||
}
|
||
function F3(t) {
|
||
return Ph(t.v) + ":" + Ph(t.w) + ":" + Ph(t.name);
|
||
}
|
||
var QR = /:/g;
|
||
function Ph(t) {
|
||
return t ? String(t).replace(QR, "\\:") : "";
|
||
}
|
||
function $n(t, e) {
|
||
e && t.attr("style", e);
|
||
}
|
||
function P3(t, e, r) {
|
||
e && t.attr("class", e).attr("class", r + " " + t.attr("class"));
|
||
}
|
||
function En(t, e) {
|
||
var r = e.graph();
|
||
if (Bm(r)) {
|
||
var n = r.transition;
|
||
if (ma(n))
|
||
return n(t);
|
||
}
|
||
return t;
|
||
}
|
||
var R1 = {
|
||
normal: tF,
|
||
vee: eF,
|
||
undirected: rF
|
||
};
|
||
function JR(t) {
|
||
R1 = t;
|
||
}
|
||
function tF(t, e, r, n) {
|
||
var i = t.append("marker").attr("id", e).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto"), s = i.append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").style("stroke-width", 1).style("stroke-dasharray", "1,0");
|
||
$n(s, r[n + "Style"]), r[n + "Class"] && s.attr("class", r[n + "Class"]);
|
||
}
|
||
function eF(t, e, r, n) {
|
||
var i = t.append("marker").attr("id", e).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto"), s = i.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");
|
||
$n(s, r[n + "Style"]), r[n + "Class"] && s.attr("class", r[n + "Class"]);
|
||
}
|
||
function rF(t, e, r, n) {
|
||
var i = t.append("marker").attr("id", e).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto"), s = i.append("path").attr("d", "M 0 5 L 10 5").style("stroke-width", 1).style("stroke-dasharray", "1,0");
|
||
$n(s, r[n + "Style"]), r[n + "Class"] && s.attr("class", r[n + "Class"]);
|
||
}
|
||
function gd(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);
|
||
}
|
||
$n(n, e.labelStyle), n.style("display", "inline-block"), n.style("white-space", "nowrap");
|
||
var s = n.node().getBoundingClientRect();
|
||
return r.attr("width", s.width).attr("height", s.height), r;
|
||
}
|
||
function nF(t, e) {
|
||
var r = t;
|
||
return r.node().appendChild(e.label), $n(r, e.labelStyle), r;
|
||
}
|
||
function iF(t, e) {
|
||
for (var r = t.append("text"), n = sF(e.label).split(`
|
||
`), i = 0; i < n.length; i++)
|
||
r.append("tspan").attr("xml:space", "preserve").attr("dy", "1em").attr("x", "1").text(n[i]);
|
||
return $n(r, e.labelStyle), r;
|
||
}
|
||
function sF(t) {
|
||
for (var e = "", r = !1, n, i = 0; i < t.length; ++i)
|
||
if (n = t[i], r) {
|
||
switch (n) {
|
||
case "n":
|
||
e += `
|
||
`;
|
||
break;
|
||
default:
|
||
e += n;
|
||
}
|
||
r = !1;
|
||
} else
|
||
n === "\\" ? r = !0 : e += n;
|
||
return e;
|
||
}
|
||
function yd(t, e, r) {
|
||
var n = e.label, i = t.append("g");
|
||
e.labelType === "svg" ? nF(i, e) : typeof n != "string" || e.labelType === "html" ? gd(i, e) : iF(i, e);
|
||
var s = i.node().getBBox(), a;
|
||
switch (r) {
|
||
case "top":
|
||
a = -e.height / 2;
|
||
break;
|
||
case "bottom":
|
||
a = e.height / 2 - s.height;
|
||
break;
|
||
default:
|
||
a = -s.height / 2;
|
||
}
|
||
return i.attr("transform", "translate(" + -s.width / 2 + "," + a + ")"), i;
|
||
}
|
||
var F1 = function(t, e) {
|
||
var r = e.nodes().filter(function(s) {
|
||
return R3(e, s);
|
||
}), n = t.selectAll("g.cluster").data(r, function(s) {
|
||
return s;
|
||
});
|
||
En(n.exit(), e).style("opacity", 0).remove();
|
||
var i = n.enter().append("g").attr("class", "cluster").attr("id", function(s) {
|
||
var a = e.node(s);
|
||
return a.id;
|
||
}).style("opacity", 0).each(function(s) {
|
||
var a = e.node(s), o = At(this);
|
||
At(this).append("rect");
|
||
var l = o.append("g").attr("class", "label");
|
||
yd(l, a, a.clusterLabelPos);
|
||
});
|
||
return n = n.merge(i), n = En(n, e).style("opacity", 1), n.selectAll("rect").each(function(s) {
|
||
var a = e.node(s), o = At(this);
|
||
$n(o, a.style);
|
||
}), n;
|
||
};
|
||
function aF(t) {
|
||
F1 = t;
|
||
}
|
||
let P1 = function(t, e) {
|
||
var r = t.selectAll("g.edgeLabel").data(e.edges(), function(i) {
|
||
return F3(i);
|
||
}).classed("update", !0);
|
||
r.exit().remove(), r.enter().append("g").classed("edgeLabel", !0).style("opacity", 0), r = t.selectAll("g.edgeLabel"), r.each(function(i) {
|
||
var s = At(this);
|
||
s.select(".label").remove();
|
||
var a = e.edge(i), o = yd(s, e.edge(i), 0).classed("label", !0), l = o.node().getBBox();
|
||
a.labelId && o.attr("id", a.labelId), _e(a, "width") || (a.width = l.width), _e(a, "height") || (a.height = l.height);
|
||
});
|
||
var n;
|
||
return r.exit ? n = r.exit() : n = r.selectAll(null), En(n, e).style("opacity", 0).remove(), r;
|
||
};
|
||
function oF(t) {
|
||
P1 = t;
|
||
}
|
||
function xp(t, e) {
|
||
return t.intersect(e);
|
||
}
|
||
var Y1 = function(t, e, r) {
|
||
var n = t.selectAll("g.edgePath").data(e.edges(), function(a) {
|
||
return F3(a);
|
||
}).classed("update", !0), i = dF(n, e);
|
||
fF(n, e);
|
||
var s = n.merge !== void 0 ? n.merge(i) : n;
|
||
return En(s, e).style("opacity", 1), s.each(function(a) {
|
||
var o = At(this), l = e.edge(a);
|
||
l.elem = this, l.id && o.attr("id", l.id), P3(
|
||
o,
|
||
l.class,
|
||
(o.classed("update") ? "update " : "") + "edgePath"
|
||
);
|
||
}), s.selectAll("path.path").each(function(a) {
|
||
var o = e.edge(a);
|
||
o.arrowheadId = Fu("arrowhead");
|
||
var l = At(this).attr("marker-end", function() {
|
||
return "url(" + cF(location.href, o.arrowheadId) + ")";
|
||
}).style("fill", "none");
|
||
En(l, e).attr("d", function(u) {
|
||
return uF(e, u);
|
||
}), $n(l, o.style);
|
||
}), s.selectAll("defs *").remove(), s.selectAll("defs").each(function(a) {
|
||
var o = e.edge(a), l = r[o.arrowhead];
|
||
l(At(this), o.arrowheadId, o, "arrowhead");
|
||
}), s;
|
||
};
|
||
function lF(t) {
|
||
Y1 = t;
|
||
}
|
||
function cF(t, e) {
|
||
var r = t.split("#")[0];
|
||
return r + "#" + e;
|
||
}
|
||
function uF(t, e) {
|
||
var r = t.edge(e), n = t.node(e.v), i = t.node(e.w), s = r.points.slice(1, r.points.length - 1);
|
||
return s.unshift(xp(n, s[0])), s.push(xp(i, s[s.length - 1])), Y3(r, s);
|
||
}
|
||
function Y3(t, e) {
|
||
var r = (Na || P6.line)().x(function(n) {
|
||
return n.x;
|
||
}).y(function(n) {
|
||
return n.y;
|
||
});
|
||
return (r.curve || r.interpolate)(t.curve), r(e);
|
||
}
|
||
function hF(t) {
|
||
var e = t.getBBox(), r = t.ownerSVGElement.getScreenCTM().inverse().multiply(t.getScreenCTM()).translate(e.width / 2, e.height / 2);
|
||
return { x: r.e, y: r.f };
|
||
}
|
||
function dF(t, e) {
|
||
var r = t.enter().append("g").attr("class", "edgePath").style("opacity", 0);
|
||
return r.append("path").attr("class", "path").attr("d", function(n) {
|
||
var i = e.edge(n), s = e.node(n.v).elem, a = Es(i.points.length).map(function() {
|
||
return hF(s);
|
||
});
|
||
return Y3(i, a);
|
||
}), r.append("defs"), r;
|
||
}
|
||
function fF(t, e) {
|
||
var r = t.exit();
|
||
En(r, e).style("opacity", 0).remove();
|
||
}
|
||
var V1 = function(t, e, r) {
|
||
var n = e.nodes().filter(function(a) {
|
||
return !R3(e, a);
|
||
}), i = t.selectAll("g.node").data(n, function(a) {
|
||
return a;
|
||
}).classed("update", !0);
|
||
i.exit().remove(), i.enter().append("g").attr("class", "node").style("opacity", 0), i = t.selectAll("g.node"), i.each(function(a) {
|
||
var o = e.node(a), l = At(this);
|
||
P3(
|
||
l,
|
||
o.class,
|
||
(l.classed("update") ? "update " : "") + "node"
|
||
), l.select("g.label").remove();
|
||
var u = l.append("g").attr("class", "label"), d = yd(u, o), f = r[o.shape], p = Fo(d.node().getBBox(), "width", "height");
|
||
o.elem = this, o.id && l.attr("id", o.id), o.labelId && u.attr("id", o.labelId), _e(o, "width") && (p.width = o.width), _e(o, "height") && (p.height = o.height), p.width += o.paddingLeft + o.paddingRight, p.height += o.paddingTop + o.paddingBottom, u.attr(
|
||
"transform",
|
||
"translate(" + (o.paddingLeft - o.paddingRight) / 2 + "," + (o.paddingTop - o.paddingBottom) / 2 + ")"
|
||
);
|
||
var g = At(this);
|
||
g.select(".label-container").remove();
|
||
var b = f(g, p, o).classed("label-container", !0);
|
||
$n(b, o.style);
|
||
var k = b.node().getBBox();
|
||
o.width = k.width, o.height = k.height;
|
||
});
|
||
var s;
|
||
return i.exit ? s = i.exit() : s = i.selectAll(null), En(s, e).style("opacity", 0).remove(), i;
|
||
};
|
||
function pF(t) {
|
||
V1 = t;
|
||
}
|
||
function gF(t, e) {
|
||
var r = t.filter(function() {
|
||
return !At(this).classed("update");
|
||
});
|
||
function n(i) {
|
||
var s = e.node(i);
|
||
return "translate(" + s.x + "," + s.y + ")";
|
||
}
|
||
r.attr("transform", n), En(t, e).style("opacity", 1).attr("transform", n), En(r.selectAll("rect"), e).attr("width", function(i) {
|
||
return e.node(i).width;
|
||
}).attr("height", function(i) {
|
||
return e.node(i).height;
|
||
}).attr("x", function(i) {
|
||
var s = e.node(i);
|
||
return -s.width / 2;
|
||
}).attr("y", function(i) {
|
||
var s = e.node(i);
|
||
return -s.height / 2;
|
||
});
|
||
}
|
||
function yF(t, e) {
|
||
var r = t.filter(function() {
|
||
return !At(this).classed("update");
|
||
});
|
||
function n(i) {
|
||
var s = e.edge(i);
|
||
return _e(s, "x") ? "translate(" + s.x + "," + s.y + ")" : "";
|
||
}
|
||
r.attr("transform", n), En(t, e).style("opacity", 1).attr("transform", n);
|
||
}
|
||
function mF(t, e) {
|
||
var r = t.filter(function() {
|
||
return !At(this).classed("update");
|
||
});
|
||
function n(i) {
|
||
var s = e.node(i);
|
||
return "translate(" + s.x + "," + s.y + ")";
|
||
}
|
||
r.attr("transform", n), En(t, e).style("opacity", 1).attr("transform", n);
|
||
}
|
||
function V3(t, e, r, n) {
|
||
var i = t.x, s = t.y, a = i - n.x, o = s - n.y, l = Math.sqrt(e * e * o * o + r * r * a * a), u = Math.abs(e * r * a / l);
|
||
n.x < i && (u = -u);
|
||
var d = Math.abs(e * r * o / l);
|
||
return n.y < s && (d = -d), { x: i + u, y: s + d };
|
||
}
|
||
function bF(t, e, r) {
|
||
return V3(t, e, e, r);
|
||
}
|
||
function _F(t, e, r, n) {
|
||
var i, s, a, o, l, u, d, f, p, g, b, k, T, L, E;
|
||
if (i = e.y - t.y, a = t.x - e.x, l = e.x * t.y - t.x * e.y, p = i * r.x + a * r.y + l, g = i * n.x + a * n.y + l, !(p !== 0 && g !== 0 && vp(p, g)) && (s = n.y - r.y, o = r.x - n.x, u = n.x * r.y - r.x * n.y, d = s * t.x + o * t.y + u, f = s * e.x + o * e.y + u, !(d !== 0 && f !== 0 && vp(d, f)) && (b = i * o - s * a, b !== 0)))
|
||
return k = Math.abs(b / 2), T = a * u - o * l, L = T < 0 ? (T - k) / b : (T + k) / b, T = s * l - i * u, E = T < 0 ? (T - k) / b : (T + k) / b, { x: L, y: E };
|
||
}
|
||
function vp(t, e) {
|
||
return t * e > 0;
|
||
}
|
||
function Kn(t, e, r) {
|
||
var n = t.x, i = t.y, s = [], a = Number.POSITIVE_INFINITY, o = Number.POSITIVE_INFINITY;
|
||
e.forEach(function(b) {
|
||
a = Math.min(a, b.x), o = Math.min(o, b.y);
|
||
});
|
||
for (var l = n - t.width / 2 - a, u = i - t.height / 2 - o, d = 0; d < e.length; d++) {
|
||
var f = e[d], p = e[d < e.length - 1 ? d + 1 : 0], g = _F(
|
||
t,
|
||
r,
|
||
{ x: l + f.x, y: u + f.y },
|
||
{ x: l + p.x, y: u + p.y }
|
||
);
|
||
g && s.push(g);
|
||
}
|
||
return s.length ? (s.length > 1 && s.sort(function(b, k) {
|
||
var T = b.x - r.x, L = b.y - r.y, E = Math.sqrt(T * T + L * L), I = k.x - r.x, V = k.y - r.y, H = Math.sqrt(I * I + V * V);
|
||
return E < H ? -1 : E === H ? 0 : 1;
|
||
}), s[0]) : (console.log("NO INTERSECTION FOUND, RETURN NODE CENTER", t), t);
|
||
}
|
||
function md(t, e) {
|
||
var r = t.x, n = t.y, i = e.x - r, s = e.y - n, a = t.width / 2, o = t.height / 2, l, u;
|
||
return Math.abs(s) * a > Math.abs(i) * o ? (s < 0 && (o = -o), l = s === 0 ? 0 : o * i / s, u = o) : (i < 0 && (a = -a), l = a, u = i === 0 ? 0 : a * s / i), { x: r + l, y: n + u };
|
||
}
|
||
var U1 = {
|
||
rect: vF,
|
||
ellipse: kF,
|
||
circle: wF,
|
||
diamond: TF
|
||
};
|
||
function xF(t) {
|
||
U1 = t;
|
||
}
|
||
function vF(t, e, r) {
|
||
var n = t.insert("rect", ":first-child").attr("rx", r.rx).attr("ry", r.ry).attr("x", -e.width / 2).attr("y", -e.height / 2).attr("width", e.width).attr("height", e.height);
|
||
return r.intersect = function(i) {
|
||
return md(r, i);
|
||
}, n;
|
||
}
|
||
function kF(t, e, r) {
|
||
var n = e.width / 2, i = e.height / 2, s = t.insert("ellipse", ":first-child").attr("x", -e.width / 2).attr("y", -e.height / 2).attr("rx", n).attr("ry", i);
|
||
return r.intersect = function(a) {
|
||
return V3(r, n, i, a);
|
||
}, s;
|
||
}
|
||
function wF(t, e, r) {
|
||
var n = Math.max(e.width, e.height) / 2, i = t.insert("circle", ":first-child").attr("x", -e.width / 2).attr("y", -e.height / 2).attr("r", n);
|
||
return r.intersect = function(s) {
|
||
return bF(r, n, s);
|
||
}, i;
|
||
}
|
||
function TF(t, e, r) {
|
||
var n = e.width * Math.SQRT2 / 2, i = e.height * Math.SQRT2 / 2, s = [
|
||
{ x: 0, y: -i },
|
||
{ x: -n, y: 0 },
|
||
{ x: 0, y: i },
|
||
{ x: n, y: 0 }
|
||
], a = t.insert("polygon", ":first-child").attr(
|
||
"points",
|
||
s.map(function(o) {
|
||
return o.x + "," + o.y;
|
||
}).join(" ")
|
||
);
|
||
return r.intersect = function(o) {
|
||
return Kn(r, s, o);
|
||
}, a;
|
||
}
|
||
function EF() {
|
||
var t = function(e, r) {
|
||
AF(r);
|
||
var n = Ka(e, "output"), i = Ka(n, "clusters"), s = Ka(n, "edgePaths"), a = P1(Ka(n, "edgeLabels"), r), o = V1(Ka(n, "nodes"), r, U1);
|
||
Pa(r), mF(o, r), yF(a, r), Y1(s, r, R1);
|
||
var l = F1(i, r);
|
||
gF(l, r), LF(r);
|
||
};
|
||
return t.createNodes = function(e) {
|
||
return arguments.length ? (pF(e), t) : V1;
|
||
}, t.createClusters = function(e) {
|
||
return arguments.length ? (aF(e), t) : F1;
|
||
}, t.createEdgeLabels = function(e) {
|
||
return arguments.length ? (oF(e), t) : P1;
|
||
}, t.createEdgePaths = function(e) {
|
||
return arguments.length ? (lF(e), t) : Y1;
|
||
}, t.shapes = function(e) {
|
||
return arguments.length ? (xF(e), t) : U1;
|
||
}, t.arrows = function(e) {
|
||
return arguments.length ? (JR(e), t) : R1;
|
||
}, t;
|
||
}
|
||
var CF = {
|
||
paddingLeft: 10,
|
||
paddingRight: 10,
|
||
paddingTop: 10,
|
||
paddingBottom: 10,
|
||
rx: 0,
|
||
ry: 0,
|
||
shape: "rect"
|
||
}, SF = {
|
||
arrowhead: "normal",
|
||
curve: $r
|
||
};
|
||
function AF(t) {
|
||
t.nodes().forEach(function(e) {
|
||
var r = t.node(e);
|
||
!_e(r, "label") && !t.children(e).length && (r.label = e), _e(r, "paddingX") && Hs(r, {
|
||
paddingLeft: r.paddingX,
|
||
paddingRight: r.paddingX
|
||
}), _e(r, "paddingY") && Hs(r, {
|
||
paddingTop: r.paddingY,
|
||
paddingBottom: r.paddingY
|
||
}), _e(r, "padding") && Hs(r, {
|
||
paddingLeft: r.padding,
|
||
paddingRight: r.padding,
|
||
paddingTop: r.padding,
|
||
paddingBottom: r.padding
|
||
}), Hs(r, CF), kt(["paddingLeft", "paddingRight", "paddingTop", "paddingBottom"], function(n) {
|
||
r[n] = Number(r[n]);
|
||
}), _e(r, "width") && (r._prevWidth = r.width), _e(r, "height") && (r._prevHeight = r.height);
|
||
}), t.edges().forEach(function(e) {
|
||
var r = t.edge(e);
|
||
_e(r, "label") || (r.label = ""), Hs(r, SF);
|
||
});
|
||
}
|
||
function LF(t) {
|
||
kt(t.nodes(), function(e) {
|
||
var r = t.node(e);
|
||
_e(r, "_prevWidth") ? r.width = r._prevWidth : delete r.width, _e(r, "_prevHeight") ? r.height = r._prevHeight : delete r.height, delete r._prevWidth, delete r._prevHeight;
|
||
});
|
||
}
|
||
function Ka(t, e) {
|
||
var r = t.select("g." + e);
|
||
return r.empty() && (r = t.append("g").attr("class", e)), r;
|
||
}
|
||
function U3(t, e, r) {
|
||
const n = e.width, i = e.height, s = (n + i) * 0.9, a = [
|
||
{ x: s / 2, y: 0 },
|
||
{ x: s, y: -s / 2 },
|
||
{ x: s / 2, y: -s },
|
||
{ x: 0, y: -s / 2 }
|
||
], o = Di(t, s, s, a);
|
||
return r.intersect = function(l) {
|
||
return Kn(r, a, l);
|
||
}, o;
|
||
}
|
||
function z3(t, e, r) {
|
||
const i = e.height, s = i / 4, a = e.width + 2 * s, o = [
|
||
{ x: s, y: 0 },
|
||
{ x: a - s, y: 0 },
|
||
{ x: a, y: -i / 2 },
|
||
{ x: a - s, y: -i },
|
||
{ x: s, y: -i },
|
||
{ x: 0, y: -i / 2 }
|
||
], l = Di(t, a, i, o);
|
||
return r.intersect = function(u) {
|
||
return Kn(r, o, u);
|
||
}, l;
|
||
}
|
||
function W3(t, e, r) {
|
||
const n = e.width, i = e.height, s = [
|
||
{ x: -i / 2, y: 0 },
|
||
{ x: n, y: 0 },
|
||
{ x: n, y: -i },
|
||
{ x: -i / 2, y: -i },
|
||
{ x: 0, y: -i / 2 }
|
||
], a = Di(t, n, i, s);
|
||
return r.intersect = function(o) {
|
||
return Kn(r, s, o);
|
||
}, a;
|
||
}
|
||
function H3(t, e, r) {
|
||
const n = e.width, i = e.height, s = [
|
||
{ x: -2 * i / 6, y: 0 },
|
||
{ x: n - i / 6, y: 0 },
|
||
{ x: n + 2 * i / 6, y: -i },
|
||
{ x: i / 6, y: -i }
|
||
], a = Di(t, n, i, s);
|
||
return r.intersect = function(o) {
|
||
return Kn(r, s, o);
|
||
}, a;
|
||
}
|
||
function G3(t, e, r) {
|
||
const n = e.width, i = e.height, s = [
|
||
{ x: 2 * i / 6, y: 0 },
|
||
{ x: n + i / 6, y: 0 },
|
||
{ x: n - 2 * i / 6, y: -i },
|
||
{ x: -i / 6, y: -i }
|
||
], a = Di(t, n, i, s);
|
||
return r.intersect = function(o) {
|
||
return Kn(r, s, o);
|
||
}, a;
|
||
}
|
||
function q3(t, e, r) {
|
||
const n = e.width, i = e.height, s = [
|
||
{ x: -2 * i / 6, y: 0 },
|
||
{ x: n + 2 * i / 6, y: 0 },
|
||
{ x: n - i / 6, y: -i },
|
||
{ x: i / 6, y: -i }
|
||
], a = Di(t, n, i, s);
|
||
return r.intersect = function(o) {
|
||
return Kn(r, s, o);
|
||
}, a;
|
||
}
|
||
function j3(t, e, r) {
|
||
const n = e.width, i = e.height, s = [
|
||
{ x: i / 6, y: 0 },
|
||
{ x: n - i / 6, y: 0 },
|
||
{ x: n + 2 * i / 6, y: -i },
|
||
{ x: -2 * i / 6, y: -i }
|
||
], a = Di(t, n, i, s);
|
||
return r.intersect = function(o) {
|
||
return Kn(r, s, o);
|
||
}, a;
|
||
}
|
||
function X3(t, e, r) {
|
||
const n = e.width, i = e.height, s = [
|
||
{ 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 }
|
||
], a = Di(t, n, i, s);
|
||
return r.intersect = function(o) {
|
||
return Kn(r, s, o);
|
||
}, a;
|
||
}
|
||
function $3(t, e, r) {
|
||
const n = e.height, i = e.width + n / 4, s = 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(a) {
|
||
return md(r, a);
|
||
}, s;
|
||
}
|
||
function K3(t, e, r) {
|
||
const n = e.width, i = e.height, s = [
|
||
{ 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 }
|
||
], a = Di(t, n, i, s);
|
||
return r.intersect = function(o) {
|
||
return Kn(r, s, o);
|
||
}, a;
|
||
}
|
||
function Z3(t, e, r) {
|
||
const n = e.width, i = n / 2, s = i / (2.5 + n / 50), a = e.height + s, o = "M 0," + s + " a " + i + "," + s + " 0,0,0 " + n + " 0 a " + i + "," + s + " 0,0,0 " + -n + " 0 l 0," + a + " a " + i + "," + s + " 0,0,0 " + n + " 0 l 0," + -a, l = t.attr("label-offset-y", s).insert("path", ":first-child").attr("d", o).attr("transform", "translate(" + -n / 2 + "," + -(a / 2 + s) + ")");
|
||
return r.intersect = function(u) {
|
||
const d = md(r, u), f = d.x - r.x;
|
||
if (i != 0 && (Math.abs(f) < r.width / 2 || Math.abs(f) == r.width / 2 && Math.abs(d.y - r.y) > r.height / 2 - s)) {
|
||
let p = s * s * (1 - f * f / (i * i));
|
||
p != 0 && (p = Math.sqrt(p)), p = s - p, u.y - r.y > 0 && (p = -p), d.y += p;
|
||
}
|
||
return d;
|
||
}, l;
|
||
}
|
||
function DF(t) {
|
||
t.shapes().question = U3, t.shapes().hexagon = z3, t.shapes().stadium = $3, t.shapes().subroutine = K3, t.shapes().cylinder = Z3, t.shapes().rect_left_inv_arrow = W3, t.shapes().lean_right = H3, t.shapes().lean_left = G3, t.shapes().trapezoid = q3, t.shapes().inv_trapezoid = j3, t.shapes().rect_right_inv_arrow = X3;
|
||
}
|
||
function MF(t) {
|
||
t({ question: U3 }), t({ hexagon: z3 }), t({ stadium: $3 }), t({ subroutine: K3 }), t({ cylinder: Z3 }), t({ rect_left_inv_arrow: W3 }), t({ lean_right: H3 }), t({ lean_left: G3 }), t({ trapezoid: q3 }), t({ inv_trapezoid: j3 }), t({ rect_right_inv_arrow: X3 });
|
||
}
|
||
function Di(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 NF = {
|
||
addToRender: DF,
|
||
addToRenderV2: MF
|
||
}, Q3 = {}, BF = function(t) {
|
||
const e = Object.keys(t);
|
||
for (const r of e)
|
||
Q3[r] = t[r];
|
||
}, J3 = function(t, e, r, n, i, s) {
|
||
const a = n ? n.select(`[id="${r}"]`) : At(`[id="${r}"]`), o = i || document;
|
||
Object.keys(t).forEach(function(u) {
|
||
const d = t[u];
|
||
let f = "default";
|
||
d.classes.length > 0 && (f = d.classes.join(" "));
|
||
const p = Xi(d.styles);
|
||
let g = d.text !== void 0 ? d.text : d.id, b;
|
||
if (gr(X().flowchart.htmlLabels)) {
|
||
const L = {
|
||
label: g.replace(
|
||
/fa[blrs]?:fa-[\w-]+/g,
|
||
(E) => `<i class='${E.replace(":", " ")}'></i>`
|
||
)
|
||
};
|
||
b = gd(a, L).node(), b.parentNode.removeChild(b);
|
||
} else {
|
||
const L = o.createElementNS("http://www.w3.org/2000/svg", "text");
|
||
L.setAttribute("style", p.labelStyle.replace("color:", "fill:"));
|
||
const E = g.split(he.lineBreakRegex);
|
||
for (const I of E) {
|
||
const V = o.createElementNS("http://www.w3.org/2000/svg", "tspan");
|
||
V.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), V.setAttribute("dy", "1em"), V.setAttribute("x", "1"), V.textContent = I, L.appendChild(V);
|
||
}
|
||
b = L;
|
||
}
|
||
let k = 0, T = "";
|
||
switch (d.type) {
|
||
case "round":
|
||
k = 5, T = "rect";
|
||
break;
|
||
case "square":
|
||
T = "rect";
|
||
break;
|
||
case "diamond":
|
||
T = "question";
|
||
break;
|
||
case "hexagon":
|
||
T = "hexagon";
|
||
break;
|
||
case "odd":
|
||
T = "rect_left_inv_arrow";
|
||
break;
|
||
case "lean_right":
|
||
T = "lean_right";
|
||
break;
|
||
case "lean_left":
|
||
T = "lean_left";
|
||
break;
|
||
case "trapezoid":
|
||
T = "trapezoid";
|
||
break;
|
||
case "inv_trapezoid":
|
||
T = "inv_trapezoid";
|
||
break;
|
||
case "odd_right":
|
||
T = "rect_left_inv_arrow";
|
||
break;
|
||
case "circle":
|
||
T = "circle";
|
||
break;
|
||
case "ellipse":
|
||
T = "ellipse";
|
||
break;
|
||
case "stadium":
|
||
T = "stadium";
|
||
break;
|
||
case "subroutine":
|
||
T = "subroutine";
|
||
break;
|
||
case "cylinder":
|
||
T = "cylinder";
|
||
break;
|
||
case "group":
|
||
T = "rect";
|
||
break;
|
||
default:
|
||
T = "rect";
|
||
}
|
||
B.warn("Adding node", d.id, d.domId), e.setNode(s.db.lookUpDomId(d.id), {
|
||
labelType: "svg",
|
||
labelStyle: p.labelStyle,
|
||
shape: T,
|
||
label: b,
|
||
rx: k,
|
||
ry: k,
|
||
class: f,
|
||
style: p.style,
|
||
id: s.db.lookUpDomId(d.id)
|
||
});
|
||
});
|
||
}, t4 = function(t, e, r) {
|
||
let n = 0, i, s;
|
||
if (t.defaultStyle !== void 0) {
|
||
const a = Xi(t.defaultStyle);
|
||
i = a.style, s = a.labelStyle;
|
||
}
|
||
t.forEach(function(a) {
|
||
n++;
|
||
var o = "L-" + a.start + "-" + a.end, l = "LS-" + a.start, u = "LE-" + a.end;
|
||
const d = {};
|
||
a.type === "arrow_open" ? d.arrowhead = "none" : d.arrowhead = "normal";
|
||
let f = "", p = "";
|
||
if (a.style !== void 0) {
|
||
const g = Xi(a.style);
|
||
f = g.style, p = g.labelStyle;
|
||
} else
|
||
switch (a.stroke) {
|
||
case "normal":
|
||
f = "fill:none", i !== void 0 && (f = i), s !== void 0 && (p = s);
|
||
break;
|
||
case "dotted":
|
||
f = "fill:none;stroke-width:2px;stroke-dasharray:3;";
|
||
break;
|
||
case "thick":
|
||
f = " stroke-width: 3.5px;fill:none";
|
||
break;
|
||
}
|
||
d.style = f, d.labelStyle = p, a.interpolate !== void 0 ? d.curve = mn(a.interpolate, $r) : t.defaultInterpolate !== void 0 ? d.curve = mn(t.defaultInterpolate, $r) : d.curve = mn(Q3.curve, $r), a.text === void 0 ? a.style !== void 0 && (d.arrowheadStyle = "fill: #333") : (d.arrowheadStyle = "fill: #333", d.labelpos = "c", gr(X().flowchart.htmlLabels) ? (d.labelType = "html", d.label = `<span id="L-${o}" class="edgeLabel L-${l}' L-${u}" style="${d.labelStyle}">${a.text.replace(
|
||
/fa[blrs]?:fa-[\w-]+/g,
|
||
(g) => `<i class='${g.replace(":", " ")}'></i>`
|
||
)}</span>`) : (d.labelType = "text", d.label = a.text.replace(he.lineBreakRegex, `
|
||
`), a.style === void 0 && (d.style = d.style || "stroke: #333; stroke-width: 1.5px;fill:none"), d.labelStyle = d.labelStyle.replace("color:", "fill:"))), d.id = o, d.class = l + " " + u, d.minlen = a.length || 1, e.setEdge(r.db.lookUpDomId(a.start), r.db.lookUpDomId(a.end), d, n);
|
||
});
|
||
}, IF = function(t, e) {
|
||
B.info("Extracting classes"), e.db.clear();
|
||
try {
|
||
return e.parse(t), e.db.getClasses();
|
||
} catch (r) {
|
||
return B.error(r), {};
|
||
}
|
||
}, OF = function(t, e, r, n) {
|
||
B.info("Drawing flowchart"), n.db.clear();
|
||
const { securityLevel: i, flowchart: s } = X();
|
||
let a;
|
||
i === "sandbox" && (a = At("#i" + e));
|
||
const o = At(i === "sandbox" ? a.nodes()[0].contentDocument.body : "body"), l = i === "sandbox" ? a.nodes()[0].contentDocument : document;
|
||
try {
|
||
n.parser.parse(t);
|
||
} catch {
|
||
B.debug("Parsing failed");
|
||
}
|
||
let u = n.db.getDirection();
|
||
u === void 0 && (u = "TD");
|
||
const d = s.nodeSpacing || 50, f = s.rankSpacing || 50, p = new lr({
|
||
multigraph: !0,
|
||
compound: !0
|
||
}).setGraph({
|
||
rankdir: u,
|
||
nodesep: d,
|
||
ranksep: f,
|
||
marginx: 8,
|
||
marginy: 8
|
||
}).setDefaultEdgeLabel(function() {
|
||
return {};
|
||
});
|
||
let g;
|
||
const b = n.db.getSubGraphs();
|
||
for (let G = b.length - 1; G >= 0; G--)
|
||
g = b[G], n.db.addVertex(g.id, g.title, "group", void 0, g.classes);
|
||
const k = n.db.getVertices();
|
||
B.warn("Get vertices", k);
|
||
const T = n.db.getEdges();
|
||
let L = 0;
|
||
for (L = b.length - 1; L >= 0; L--) {
|
||
g = b[L], y0("cluster").append("text");
|
||
for (let G = 0; G < g.nodes.length; G++)
|
||
B.warn(
|
||
"Setting subgraph",
|
||
g.nodes[G],
|
||
n.db.lookUpDomId(g.nodes[G]),
|
||
n.db.lookUpDomId(g.id)
|
||
), p.setParent(n.db.lookUpDomId(g.nodes[G]), n.db.lookUpDomId(g.id));
|
||
}
|
||
J3(k, p, e, o, l, n), t4(T, p, n);
|
||
const E = new EF();
|
||
NF.addToRender(E), E.arrows().none = function(Y, W, N, D) {
|
||
const v = Y.append("marker").attr("id", W).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");
|
||
$n(v, N[D + "Style"]);
|
||
}, E.arrows().normal = function(Y, W) {
|
||
Y.append("marker").attr("id", W).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 I = o.select(`[id="${e}"]`), V = o.select("#" + e + " g");
|
||
for (E(V, p), V.selectAll("g.node").attr("title", function() {
|
||
return n.db.getTooltip(this.id);
|
||
}), n.db.indexNodes("subGraph" + L), L = 0; L < b.length; L++)
|
||
if (g = b[L], g.title !== "undefined") {
|
||
const G = l.querySelectorAll(
|
||
"#" + e + ' [id="' + n.db.lookUpDomId(g.id) + '"] rect'
|
||
), Y = l.querySelectorAll(
|
||
"#" + e + ' [id="' + n.db.lookUpDomId(g.id) + '"]'
|
||
), W = G[0].x.baseVal.value, N = G[0].y.baseVal.value, D = G[0].width.baseVal.value, v = At(Y[0]).select(".label");
|
||
v.attr("transform", `translate(${W + D / 2}, ${N + 14})`), v.attr("id", e + "Text");
|
||
for (let M = 0; M < g.classes.length; M++)
|
||
Y[0].classList.add(g.classes[M]);
|
||
}
|
||
if (!s.htmlLabels) {
|
||
const G = l.querySelectorAll('[id="' + e + '"] .edgeLabel .label');
|
||
for (const Y of G) {
|
||
const W = Y.getBBox(), N = l.createElementNS("http://www.w3.org/2000/svg", "rect");
|
||
N.setAttribute("rx", 0), N.setAttribute("ry", 0), N.setAttribute("width", W.width), N.setAttribute("height", W.height), Y.insertBefore(N, Y.firstChild);
|
||
}
|
||
}
|
||
wu(p, I, s.diagramPadding, s.useMaxWidth), Object.keys(k).forEach(function(G) {
|
||
const Y = k[G];
|
||
if (Y.link) {
|
||
const W = o.select("#" + e + ' [id="' + n.db.lookUpDomId(G) + '"]');
|
||
if (W) {
|
||
const N = l.createElementNS("http://www.w3.org/2000/svg", "a");
|
||
N.setAttributeNS("http://www.w3.org/2000/svg", "class", Y.classes.join(" ")), N.setAttributeNS("http://www.w3.org/2000/svg", "href", Y.link), N.setAttributeNS("http://www.w3.org/2000/svg", "rel", "noopener"), i === "sandbox" ? N.setAttributeNS("http://www.w3.org/2000/svg", "target", "_top") : Y.linkTarget && N.setAttributeNS("http://www.w3.org/2000/svg", "target", Y.linkTarget);
|
||
const D = W.insert(function() {
|
||
return N;
|
||
}, ":first-child"), w = W.select(".label-container");
|
||
w && D.append(function() {
|
||
return w.node();
|
||
});
|
||
const v = W.select(".label");
|
||
v && D.append(function() {
|
||
return v.node();
|
||
});
|
||
}
|
||
}
|
||
});
|
||
}, RF = {
|
||
setConf: BF,
|
||
addVertices: J3,
|
||
addEdges: t4,
|
||
getClasses: IF,
|
||
draw: OF
|
||
}, e4 = {}, FF = function(t) {
|
||
const e = Object.keys(t);
|
||
for (const r of e)
|
||
e4[r] = t[r];
|
||
}, r4 = function(t, e, r, n, i, s) {
|
||
const a = n.select(`[id="${r}"]`);
|
||
Object.keys(t).forEach(function(l) {
|
||
const u = t[l];
|
||
let d = "default";
|
||
u.classes.length > 0 && (d = u.classes.join(" "));
|
||
const f = Xi(u.styles);
|
||
let p = u.text !== void 0 ? u.text : u.id, g;
|
||
if (gr(X().flowchart.htmlLabels)) {
|
||
const T = {
|
||
label: p.replace(
|
||
/fa[blrs]?:fa-[\w-]+/g,
|
||
(L) => `<i class='${L.replace(":", " ")}'></i>`
|
||
)
|
||
};
|
||
g = gd(a, T).node(), g.parentNode.removeChild(g);
|
||
} else {
|
||
const T = i.createElementNS("http://www.w3.org/2000/svg", "text");
|
||
T.setAttribute("style", f.labelStyle.replace("color:", "fill:"));
|
||
const L = p.split(he.lineBreakRegex);
|
||
for (const E of L) {
|
||
const I = i.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", "1"), I.textContent = E, T.appendChild(I);
|
||
}
|
||
g = T;
|
||
}
|
||
let b = 0, k = "";
|
||
switch (u.type) {
|
||
case "round":
|
||
b = 5, k = "rect";
|
||
break;
|
||
case "square":
|
||
k = "rect";
|
||
break;
|
||
case "diamond":
|
||
k = "question";
|
||
break;
|
||
case "hexagon":
|
||
k = "hexagon";
|
||
break;
|
||
case "odd":
|
||
k = "rect_left_inv_arrow";
|
||
break;
|
||
case "lean_right":
|
||
k = "lean_right";
|
||
break;
|
||
case "lean_left":
|
||
k = "lean_left";
|
||
break;
|
||
case "trapezoid":
|
||
k = "trapezoid";
|
||
break;
|
||
case "inv_trapezoid":
|
||
k = "inv_trapezoid";
|
||
break;
|
||
case "odd_right":
|
||
k = "rect_left_inv_arrow";
|
||
break;
|
||
case "circle":
|
||
k = "circle";
|
||
break;
|
||
case "ellipse":
|
||
k = "ellipse";
|
||
break;
|
||
case "stadium":
|
||
k = "stadium";
|
||
break;
|
||
case "subroutine":
|
||
k = "subroutine";
|
||
break;
|
||
case "cylinder":
|
||
k = "cylinder";
|
||
break;
|
||
case "group":
|
||
k = "rect";
|
||
break;
|
||
case "doublecircle":
|
||
k = "doublecircle";
|
||
break;
|
||
default:
|
||
k = "rect";
|
||
}
|
||
e.setNode(u.id, {
|
||
labelStyle: f.labelStyle,
|
||
shape: k,
|
||
labelText: p,
|
||
rx: b,
|
||
ry: b,
|
||
class: d,
|
||
style: f.style,
|
||
id: u.id,
|
||
link: u.link,
|
||
linkTarget: u.linkTarget,
|
||
tooltip: s.db.getTooltip(u.id) || "",
|
||
domId: s.db.lookUpDomId(u.id),
|
||
haveCallback: u.haveCallback,
|
||
width: u.type === "group" ? 500 : void 0,
|
||
dir: u.dir,
|
||
type: u.type,
|
||
props: u.props,
|
||
padding: X().flowchart.padding
|
||
}), B.info("setNode", {
|
||
labelStyle: f.labelStyle,
|
||
shape: k,
|
||
labelText: p,
|
||
rx: b,
|
||
ry: b,
|
||
class: d,
|
||
style: f.style,
|
||
id: u.id,
|
||
domId: s.db.lookUpDomId(u.id),
|
||
width: u.type === "group" ? 500 : void 0,
|
||
type: u.type,
|
||
dir: u.dir,
|
||
props: u.props,
|
||
padding: X().flowchart.padding
|
||
});
|
||
});
|
||
}, n4 = function(t, e, r) {
|
||
B.info("abc78 edges = ", t);
|
||
let n = 0, i = {}, s, a;
|
||
if (t.defaultStyle !== void 0) {
|
||
const o = Xi(t.defaultStyle);
|
||
s = o.style, a = o.labelStyle;
|
||
}
|
||
t.forEach(function(o) {
|
||
n++;
|
||
var l = "L-" + o.start + "-" + o.end;
|
||
i[l] === void 0 ? (i[l] = 0, B.info("abc78 new entry", l, i[l])) : (i[l]++, B.info("abc78 new entry", l, i[l]));
|
||
let u = l + "-" + i[l];
|
||
B.info("abc78 new link id to be used is", l, u, i[l]);
|
||
var d = "LS-" + o.start, f = "LE-" + o.end;
|
||
const p = { style: "", labelStyle: "" };
|
||
switch (p.minlen = o.length || 1, o.type === "arrow_open" ? p.arrowhead = "none" : p.arrowhead = "normal", p.arrowTypeStart = "arrow_open", p.arrowTypeEnd = "arrow_open", o.type) {
|
||
case "double_arrow_cross":
|
||
p.arrowTypeStart = "arrow_cross";
|
||
case "arrow_cross":
|
||
p.arrowTypeEnd = "arrow_cross";
|
||
break;
|
||
case "double_arrow_point":
|
||
p.arrowTypeStart = "arrow_point";
|
||
case "arrow_point":
|
||
p.arrowTypeEnd = "arrow_point";
|
||
break;
|
||
case "double_arrow_circle":
|
||
p.arrowTypeStart = "arrow_circle";
|
||
case "arrow_circle":
|
||
p.arrowTypeEnd = "arrow_circle";
|
||
break;
|
||
}
|
||
let g = "", b = "";
|
||
switch (o.stroke) {
|
||
case "normal":
|
||
g = "fill:none;", s !== void 0 && (g = s), a !== void 0 && (b = a), p.thickness = "normal", p.pattern = "solid";
|
||
break;
|
||
case "dotted":
|
||
p.thickness = "normal", p.pattern = "dotted", p.style = "fill:none;stroke-width:2px;stroke-dasharray:3;";
|
||
break;
|
||
case "thick":
|
||
p.thickness = "thick", p.pattern = "solid", p.style = "stroke-width: 3.5px;fill:none;";
|
||
break;
|
||
}
|
||
if (o.style !== void 0) {
|
||
const k = Xi(o.style);
|
||
g = k.style, b = k.labelStyle;
|
||
}
|
||
p.style = p.style += g, p.labelStyle = p.labelStyle += b, o.interpolate !== void 0 ? p.curve = mn(o.interpolate, $r) : t.defaultInterpolate !== void 0 ? p.curve = mn(t.defaultInterpolate, $r) : p.curve = mn(e4.curve, $r), o.text === void 0 ? o.style !== void 0 && (p.arrowheadStyle = "fill: #333") : (p.arrowheadStyle = "fill: #333", p.labelpos = "c"), p.labelType = "text", p.label = o.text.replace(he.lineBreakRegex, `
|
||
`), o.style === void 0 && (p.style = p.style || "stroke: #333; stroke-width: 1.5px;fill:none;"), p.labelStyle = p.labelStyle.replace("color:", "fill:"), p.id = u, p.classes = "flowchart-link " + d + " " + f, e.setEdge(o.start, o.end, p, n);
|
||
});
|
||
}, PF = function(t, e) {
|
||
B.info("Extracting classes"), e.db.clear();
|
||
try {
|
||
return e.parse(t), e.db.getClasses();
|
||
} catch {
|
||
return;
|
||
}
|
||
}, YF = function(t, e, r, n) {
|
||
B.info("Drawing flowchart"), n.db.clear(), ci.setGen("gen-2"), n.parser.parse(t);
|
||
let i = n.db.getDirection();
|
||
i === void 0 && (i = "TD");
|
||
const { securityLevel: s, flowchart: a } = X(), o = a.nodeSpacing || 50, l = a.rankSpacing || 50;
|
||
let u;
|
||
s === "sandbox" && (u = At("#i" + e));
|
||
const d = At(s === "sandbox" ? u.nodes()[0].contentDocument.body : "body"), f = s === "sandbox" ? u.nodes()[0].contentDocument : document, p = new lr({
|
||
multigraph: !0,
|
||
compound: !0
|
||
}).setGraph({
|
||
rankdir: i,
|
||
nodesep: o,
|
||
ranksep: l,
|
||
marginx: 0,
|
||
marginy: 0
|
||
}).setDefaultEdgeLabel(function() {
|
||
return {};
|
||
});
|
||
let g;
|
||
const b = n.db.getSubGraphs();
|
||
B.info("Subgraphs - ", b);
|
||
for (let H = b.length - 1; H >= 0; H--)
|
||
g = b[H], B.info("Subgraph - ", g), n.db.addVertex(g.id, g.title, "group", void 0, g.classes, g.dir);
|
||
const k = n.db.getVertices(), T = n.db.getEdges();
|
||
B.info(T);
|
||
let L = 0;
|
||
for (L = b.length - 1; L >= 0; L--) {
|
||
g = b[L], y0("cluster").append("text");
|
||
for (let H = 0; H < g.nodes.length; H++)
|
||
B.info("Setting up subgraphs", g.nodes[H], g.id), p.setParent(g.nodes[H], g.id);
|
||
}
|
||
r4(k, p, e, d, f, n), n4(T, p);
|
||
const E = d.select(`[id="${e}"]`), I = d.select("#" + e + " g");
|
||
if (ud(I, p, ["point", "circle", "cross"], "flowchart", e), ye.insertTitle(E, "flowchartTitleText", a.titleTopMargin, n.db.getDiagramTitle()), wu(p, E, a.diagramPadding, a.useMaxWidth), n.db.indexNodes("subGraph" + L), !a.htmlLabels) {
|
||
const H = f.querySelectorAll('[id="' + e + '"] .edgeLabel .label');
|
||
for (const G of H) {
|
||
const Y = G.getBBox(), W = f.createElementNS("http://www.w3.org/2000/svg", "rect");
|
||
W.setAttribute("rx", 0), W.setAttribute("ry", 0), W.setAttribute("width", Y.width), W.setAttribute("height", Y.height), G.insertBefore(W, G.firstChild);
|
||
}
|
||
}
|
||
Object.keys(k).forEach(function(H) {
|
||
const G = k[H];
|
||
if (G.link) {
|
||
const Y = At("#" + e + ' [id="' + H + '"]');
|
||
if (Y) {
|
||
const W = f.createElementNS("http://www.w3.org/2000/svg", "a");
|
||
W.setAttributeNS("http://www.w3.org/2000/svg", "class", G.classes.join(" ")), W.setAttributeNS("http://www.w3.org/2000/svg", "href", G.link), W.setAttributeNS("http://www.w3.org/2000/svg", "rel", "noopener"), s === "sandbox" ? W.setAttributeNS("http://www.w3.org/2000/svg", "target", "_top") : G.linkTarget && W.setAttributeNS("http://www.w3.org/2000/svg", "target", G.linkTarget);
|
||
const N = Y.insert(function() {
|
||
return W;
|
||
}, ":first-child"), D = Y.select(".label-container");
|
||
D && N.append(function() {
|
||
return D.node();
|
||
});
|
||
const w = Y.select(".label");
|
||
w && N.append(function() {
|
||
return w.node();
|
||
});
|
||
}
|
||
}
|
||
});
|
||
}, Yh = {
|
||
setConf: FF,
|
||
addVertices: r4,
|
||
addEdges: n4,
|
||
getClasses: PF,
|
||
draw: YF
|
||
};
|
||
var z1 = function() {
|
||
var t = function(W, N, D, w) {
|
||
for (D = D || {}, w = W.length; w--; D[W[w]] = N)
|
||
;
|
||
return D;
|
||
}, e = [1, 3], r = [1, 5], n = [7, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 25, 26, 28, 35, 40], i = [1, 15], s = [1, 16], a = [1, 17], o = [1, 18], l = [1, 19], u = [1, 20], d = [1, 21], f = [1, 22], p = [1, 23], g = [1, 24], b = [1, 25], k = [1, 26], T = [1, 27], L = [1, 29], E = [1, 31], I = [1, 34], V = [5, 7, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 25, 26, 28, 35, 40], H = {
|
||
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, tickInterval: 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: 26, clickStatement: 27, taskTxt: 28, taskData: 29, openDirective: 30, typeDirective: 31, closeDirective: 32, ":": 33, argDirective: 34, click: 35, callbackname: 36, callbackargs: 37, href: 38, clickStatementDebug: 39, open_directive: 40, type_directive: 41, arg_directive: 42, close_directive: 43, $accept: 0, $end: 1 },
|
||
terminals_: { 2: "error", 5: "gantt", 7: "EOF", 9: "SPACE", 11: "NL", 12: "dateFormat", 13: "inclusiveEndDates", 14: "topAxis", 15: "axisFormat", 16: "tickInterval", 17: "excludes", 18: "includes", 19: "todayMarker", 20: "title", 21: "acc_title", 22: "acc_title_value", 23: "acc_descr", 24: "acc_descr_value", 25: "acc_descr_multiline_value", 26: "section", 28: "taskTxt", 29: "taskData", 33: ":", 35: "click", 36: "callbackname", 37: "callbackargs", 38: "href", 40: "open_directive", 41: "type_directive", 42: "arg_directive", 43: "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, 1], [10, 2], [10, 2], [10, 1], [10, 1], [10, 1], [10, 2], [10, 1], [4, 4], [4, 6], [27, 2], [27, 3], [27, 3], [27, 4], [27, 3], [27, 4], [27, 2], [39, 2], [39, 3], [39, 3], [39, 4], [39, 3], [39, 4], [39, 2], [30, 1], [31, 1], [34, 1], [32, 1]],
|
||
performAction: function(N, D, w, v, M, m, Q) {
|
||
var x = m.length - 1;
|
||
switch (M) {
|
||
case 2:
|
||
return m[x - 1];
|
||
case 3:
|
||
this.$ = [];
|
||
break;
|
||
case 4:
|
||
m[x - 1].push(m[x]), this.$ = m[x - 1];
|
||
break;
|
||
case 5:
|
||
case 6:
|
||
this.$ = m[x];
|
||
break;
|
||
case 7:
|
||
case 8:
|
||
this.$ = [];
|
||
break;
|
||
case 9:
|
||
v.setDateFormat(m[x].substr(11)), this.$ = m[x].substr(11);
|
||
break;
|
||
case 10:
|
||
v.enableInclusiveEndDates(), this.$ = m[x].substr(18);
|
||
break;
|
||
case 11:
|
||
v.TopAxis(), this.$ = m[x].substr(8);
|
||
break;
|
||
case 12:
|
||
v.setAxisFormat(m[x].substr(11)), this.$ = m[x].substr(11);
|
||
break;
|
||
case 13:
|
||
v.setTickInterval(m[x].substr(13)), this.$ = m[x].substr(13);
|
||
break;
|
||
case 14:
|
||
v.setExcludes(m[x].substr(9)), this.$ = m[x].substr(9);
|
||
break;
|
||
case 15:
|
||
v.setIncludes(m[x].substr(9)), this.$ = m[x].substr(9);
|
||
break;
|
||
case 16:
|
||
v.setTodayMarker(m[x].substr(12)), this.$ = m[x].substr(12);
|
||
break;
|
||
case 17:
|
||
v.setDiagramTitle(m[x].substr(6)), this.$ = m[x].substr(6);
|
||
break;
|
||
case 18:
|
||
this.$ = m[x].trim(), v.setAccTitle(this.$);
|
||
break;
|
||
case 19:
|
||
case 20:
|
||
this.$ = m[x].trim(), v.setAccDescription(this.$);
|
||
break;
|
||
case 21:
|
||
v.addSection(m[x].substr(8)), this.$ = m[x].substr(8);
|
||
break;
|
||
case 23:
|
||
v.addTask(m[x - 1], m[x]), this.$ = "task";
|
||
break;
|
||
case 27:
|
||
this.$ = m[x - 1], v.setClickEvent(m[x - 1], m[x], null);
|
||
break;
|
||
case 28:
|
||
this.$ = m[x - 2], v.setClickEvent(m[x - 2], m[x - 1], m[x]);
|
||
break;
|
||
case 29:
|
||
this.$ = m[x - 2], v.setClickEvent(m[x - 2], m[x - 1], null), v.setLink(m[x - 2], m[x]);
|
||
break;
|
||
case 30:
|
||
this.$ = m[x - 3], v.setClickEvent(m[x - 3], m[x - 2], m[x - 1]), v.setLink(m[x - 3], m[x]);
|
||
break;
|
||
case 31:
|
||
this.$ = m[x - 2], v.setClickEvent(m[x - 2], m[x], null), v.setLink(m[x - 2], m[x - 1]);
|
||
break;
|
||
case 32:
|
||
this.$ = m[x - 3], v.setClickEvent(m[x - 3], m[x - 1], m[x]), v.setLink(m[x - 3], m[x - 2]);
|
||
break;
|
||
case 33:
|
||
this.$ = m[x - 1], v.setLink(m[x - 1], m[x]);
|
||
break;
|
||
case 34:
|
||
case 40:
|
||
this.$ = m[x - 1] + " " + m[x];
|
||
break;
|
||
case 35:
|
||
case 36:
|
||
case 38:
|
||
this.$ = m[x - 2] + " " + m[x - 1] + " " + m[x];
|
||
break;
|
||
case 37:
|
||
case 39:
|
||
this.$ = m[x - 3] + " " + m[x - 2] + " " + m[x - 1] + " " + m[x];
|
||
break;
|
||
case 41:
|
||
v.parseDirective("%%{", "open_directive");
|
||
break;
|
||
case 42:
|
||
v.parseDirective(m[x], "type_directive");
|
||
break;
|
||
case 43:
|
||
m[x] = m[x].trim().replace(/'/g, '"'), v.parseDirective(m[x], "arg_directive");
|
||
break;
|
||
case 44:
|
||
v.parseDirective("}%%", "close_directive", "gantt");
|
||
break;
|
||
}
|
||
},
|
||
table: [{ 3: 1, 4: 2, 5: e, 30: 4, 40: r }, { 1: [3] }, { 3: 6, 4: 2, 5: e, 30: 4, 40: r }, t(n, [2, 3], { 6: 7 }), { 31: 8, 41: [1, 9] }, { 41: [2, 41] }, { 1: [2, 1] }, { 4: 30, 7: [1, 10], 8: 11, 9: [1, 12], 10: 13, 11: [1, 14], 12: i, 13: s, 14: a, 15: o, 16: l, 17: u, 18: d, 19: f, 20: p, 21: g, 23: b, 25: k, 26: T, 27: 28, 28: L, 30: 4, 35: E, 40: r }, { 32: 32, 33: [1, 33], 43: I }, t([33, 43], [2, 42]), t(n, [2, 8], { 1: [2, 2] }), t(n, [2, 4]), { 4: 30, 10: 35, 12: i, 13: s, 14: a, 15: o, 16: l, 17: u, 18: d, 19: f, 20: p, 21: g, 23: b, 25: k, 26: T, 27: 28, 28: L, 30: 4, 35: E, 40: 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]), t(n, [2, 17]), { 22: [1, 36] }, { 24: [1, 37] }, t(n, [2, 20]), t(n, [2, 21]), t(n, [2, 22]), { 29: [1, 38] }, t(n, [2, 24]), { 36: [1, 39], 38: [1, 40] }, { 11: [1, 41] }, { 34: 42, 42: [1, 43] }, { 11: [2, 44] }, t(n, [2, 5]), t(n, [2, 18]), t(n, [2, 19]), t(n, [2, 23]), t(n, [2, 27], { 37: [1, 44], 38: [1, 45] }), t(n, [2, 33], { 36: [1, 46] }), t(V, [2, 25]), { 32: 47, 43: I }, { 43: [2, 43] }, t(n, [2, 28], { 38: [1, 48] }), t(n, [2, 29]), t(n, [2, 31], { 37: [1, 49] }), { 11: [1, 50] }, t(n, [2, 30]), t(n, [2, 32]), t(V, [2, 26])],
|
||
defaultActions: { 5: [2, 41], 6: [2, 1], 34: [2, 44], 43: [2, 43] },
|
||
parseError: function(N, D) {
|
||
if (D.recoverable)
|
||
this.trace(N);
|
||
else {
|
||
var w = new Error(N);
|
||
throw w.hash = D, w;
|
||
}
|
||
},
|
||
parse: function(N) {
|
||
var D = this, w = [0], v = [], M = [null], m = [], Q = this.table, x = "", ct = 0, Dt = 0, vt = 2, j = 1, ot = m.slice.call(arguments, 1), rt = Object.create(this.lexer), nt = { yy: {} };
|
||
for (var ut in this.yy)
|
||
Object.prototype.hasOwnProperty.call(this.yy, ut) && (nt.yy[ut] = this.yy[ut]);
|
||
rt.setInput(N, nt.yy), nt.yy.lexer = rt, nt.yy.parser = this, typeof rt.yylloc > "u" && (rt.yylloc = {});
|
||
var _t = rt.yylloc;
|
||
m.push(_t);
|
||
var K = rt.options && rt.options.ranges;
|
||
typeof nt.yy.parseError == "function" ? this.parseError = nt.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
||
function Ot() {
|
||
var Yt;
|
||
return Yt = v.pop() || rt.lex() || j, typeof Yt != "number" && (Yt instanceof Array && (v = Yt, Yt = v.pop()), Yt = D.symbols_[Yt] || Yt), Yt;
|
||
}
|
||
for (var P, z, $, F, O = {}, A, J, C, ht; ; ) {
|
||
if (z = w[w.length - 1], this.defaultActions[z] ? $ = this.defaultActions[z] : ((P === null || typeof P > "u") && (P = Ot()), $ = Q[z] && Q[z][P]), typeof $ > "u" || !$.length || !$[0]) {
|
||
var U = "";
|
||
ht = [];
|
||
for (A in Q[z])
|
||
this.terminals_[A] && A > vt && ht.push("'" + this.terminals_[A] + "'");
|
||
rt.showPosition ? U = "Parse error on line " + (ct + 1) + `:
|
||
` + rt.showPosition() + `
|
||
Expecting ` + ht.join(", ") + ", got '" + (this.terminals_[P] || P) + "'" : U = "Parse error on line " + (ct + 1) + ": Unexpected " + (P == j ? "end of input" : "'" + (this.terminals_[P] || P) + "'"), this.parseError(U, {
|
||
text: rt.match,
|
||
token: this.terminals_[P] || P,
|
||
line: rt.yylineno,
|
||
loc: _t,
|
||
expected: ht
|
||
});
|
||
}
|
||
if ($[0] instanceof Array && $.length > 1)
|
||
throw new Error("Parse Error: multiple actions possible at state: " + z + ", token: " + P);
|
||
switch ($[0]) {
|
||
case 1:
|
||
w.push(P), M.push(rt.yytext), m.push(rt.yylloc), w.push($[1]), P = null, Dt = rt.yyleng, x = rt.yytext, ct = rt.yylineno, _t = rt.yylloc;
|
||
break;
|
||
case 2:
|
||
if (J = this.productions_[$[1]][1], O.$ = M[M.length - J], O._$ = {
|
||
first_line: m[m.length - (J || 1)].first_line,
|
||
last_line: m[m.length - 1].last_line,
|
||
first_column: m[m.length - (J || 1)].first_column,
|
||
last_column: m[m.length - 1].last_column
|
||
}, K && (O._$.range = [
|
||
m[m.length - (J || 1)].range[0],
|
||
m[m.length - 1].range[1]
|
||
]), F = this.performAction.apply(O, [
|
||
x,
|
||
Dt,
|
||
ct,
|
||
nt.yy,
|
||
$[1],
|
||
M,
|
||
m
|
||
].concat(ot)), typeof F < "u")
|
||
return F;
|
||
J && (w = w.slice(0, -1 * J * 2), M = M.slice(0, -1 * J), m = m.slice(0, -1 * J)), w.push(this.productions_[$[1]][0]), M.push(O.$), m.push(O._$), C = Q[w[w.length - 2]][w[w.length - 1]], w.push(C);
|
||
break;
|
||
case 3:
|
||
return !0;
|
||
}
|
||
}
|
||
return !0;
|
||
}
|
||
}, G = function() {
|
||
var W = {
|
||
EOF: 1,
|
||
parseError: function(D, w) {
|
||
if (this.yy.parser)
|
||
this.yy.parser.parseError(D, w);
|
||
else
|
||
throw new Error(D);
|
||
},
|
||
setInput: function(N, D) {
|
||
return this.yy = D || this.yy || {}, this._input = N, 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 N = this._input[0];
|
||
this.yytext += N, this.yyleng++, this.offset++, this.match += N, this.matched += N;
|
||
var D = N.match(/(?:\r\n?|\n).*/g);
|
||
return D ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), N;
|
||
},
|
||
unput: function(N) {
|
||
var D = N.length, w = N.split(/(?:\r\n?|\n)/g);
|
||
this._input = N + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - D), this.offset -= D;
|
||
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), w.length - 1 && (this.yylineno -= w.length - 1);
|
||
var M = 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: w ? (w.length === v.length ? this.yylloc.first_column : 0) + v[v.length - w.length].length - w[0].length : this.yylloc.first_column - D
|
||
}, this.options.ranges && (this.yylloc.range = [M[0], M[0] + this.yyleng - D]), 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(N) {
|
||
this.unput(this.match.slice(N));
|
||
},
|
||
pastInput: function() {
|
||
var N = this.matched.substr(0, this.matched.length - this.match.length);
|
||
return (N.length > 20 ? "..." : "") + N.substr(-20).replace(/\n/g, "");
|
||
},
|
||
upcomingInput: function() {
|
||
var N = this.match;
|
||
return N.length < 20 && (N += this._input.substr(0, 20 - N.length)), (N.substr(0, 20) + (N.length > 20 ? "..." : "")).replace(/\n/g, "");
|
||
},
|
||
showPosition: function() {
|
||
var N = this.pastInput(), D = new Array(N.length + 1).join("-");
|
||
return N + this.upcomingInput() + `
|
||
` + D + "^";
|
||
},
|
||
test_match: function(N, D) {
|
||
var w, v, M;
|
||
if (this.options.backtrack_lexer && (M = {
|
||
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 && (M.yylloc.range = this.yylloc.range.slice(0))), v = N[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 + N[0].length
|
||
}, this.yytext += N[0], this.match += N[0], this.matches = N, 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(N[0].length), this.matched += N[0], w = this.performAction.call(this, this.yy, this, D, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), w)
|
||
return w;
|
||
if (this._backtrack) {
|
||
for (var m in M)
|
||
this[m] = M[m];
|
||
return !1;
|
||
}
|
||
return !1;
|
||
},
|
||
next: function() {
|
||
if (this.done)
|
||
return this.EOF;
|
||
this._input || (this.done = !0);
|
||
var N, D, w, v;
|
||
this._more || (this.yytext = "", this.match = "");
|
||
for (var M = this._currentRules(), m = 0; m < M.length; m++)
|
||
if (w = this._input.match(this.rules[M[m]]), w && (!D || w[0].length > D[0].length)) {
|
||
if (D = w, v = m, this.options.backtrack_lexer) {
|
||
if (N = this.test_match(w, M[m]), N !== !1)
|
||
return N;
|
||
if (this._backtrack) {
|
||
D = !1;
|
||
continue;
|
||
} else
|
||
return !1;
|
||
} else if (!this.options.flex)
|
||
break;
|
||
}
|
||
return D ? (N = this.test_match(D, M[v]), N !== !1 ? N : !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 D = this.next();
|
||
return D || this.lex();
|
||
},
|
||
begin: function(D) {
|
||
this.conditionStack.push(D);
|
||
},
|
||
popState: function() {
|
||
var D = this.conditionStack.length - 1;
|
||
return D > 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(D) {
|
||
return D = this.conditionStack.length - 1 - Math.abs(D || 0), D >= 0 ? this.conditionStack[D] : "INITIAL";
|
||
},
|
||
pushState: function(D) {
|
||
this.begin(D);
|
||
},
|
||
stateStackSize: function() {
|
||
return this.conditionStack.length;
|
||
},
|
||
options: { "case-insensitive": !0 },
|
||
performAction: function(D, w, v, M) {
|
||
switch (v) {
|
||
case 0:
|
||
return this.begin("open_directive"), 40;
|
||
case 1:
|
||
return this.begin("type_directive"), 41;
|
||
case 2:
|
||
return this.popState(), this.begin("arg_directive"), 33;
|
||
case 3:
|
||
return this.popState(), this.popState(), 43;
|
||
case 4:
|
||
return 42;
|
||
case 5:
|
||
return this.begin("acc_title"), 21;
|
||
case 6:
|
||
return this.popState(), "acc_title_value";
|
||
case 7:
|
||
return this.begin("acc_descr"), 23;
|
||
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 38;
|
||
case 22:
|
||
this.begin("callbackname");
|
||
break;
|
||
case 23:
|
||
this.popState();
|
||
break;
|
||
case 24:
|
||
this.popState(), this.begin("callbackargs");
|
||
break;
|
||
case 25:
|
||
return 36;
|
||
case 26:
|
||
this.popState();
|
||
break;
|
||
case 27:
|
||
return 37;
|
||
case 28:
|
||
this.begin("click");
|
||
break;
|
||
case 29:
|
||
this.popState();
|
||
break;
|
||
case 30:
|
||
return 35;
|
||
case 31:
|
||
return 5;
|
||
case 32:
|
||
return 12;
|
||
case 33:
|
||
return 13;
|
||
case 34:
|
||
return 14;
|
||
case 35:
|
||
return 15;
|
||
case 36:
|
||
return 16;
|
||
case 37:
|
||
return 18;
|
||
case 38:
|
||
return 17;
|
||
case 39:
|
||
return 19;
|
||
case 40:
|
||
return "date";
|
||
case 41:
|
||
return 20;
|
||
case 42:
|
||
return "accDescription";
|
||
case 43:
|
||
return 26;
|
||
case 44:
|
||
return 28;
|
||
case 45:
|
||
return 29;
|
||
case 46:
|
||
return 33;
|
||
case 47:
|
||
return 7;
|
||
case 48:
|
||
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, /^(?:tickInterval\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, 48], inclusive: !0 } }
|
||
};
|
||
return W;
|
||
}();
|
||
H.lexer = G;
|
||
function Y() {
|
||
this.yy = {};
|
||
}
|
||
return Y.prototype = H, H.Parser = Y, new Y();
|
||
}();
|
||
z1.parser = z1;
|
||
const VF = z1, UF = (t) => t.match(/^\s*gantt/) !== null;
|
||
let Un = "", bd = "", _d, xd = "", el = [], rl = [], vd = {}, kd = [], Qc = [], Ea = "";
|
||
const i4 = ["active", "done", "crit", "milestone"];
|
||
let wd = [], nl = !1, Td = !1, W1 = 0;
|
||
const zF = function(t, e, r) {
|
||
ze.parseDirective(this, t, e, r);
|
||
}, WF = function() {
|
||
kd = [], Qc = [], Ea = "", wd = [], Jl = 0, G1 = void 0, tc = void 0, cr = [], Un = "", bd = "", _d = void 0, xd = "", el = [], rl = [], nl = !1, Td = !1, W1 = 0, vd = {}, Dn();
|
||
}, HF = function(t) {
|
||
bd = t;
|
||
}, GF = function() {
|
||
return bd;
|
||
}, qF = function(t) {
|
||
_d = t;
|
||
}, jF = function() {
|
||
return _d;
|
||
}, XF = function(t) {
|
||
xd = t;
|
||
}, $F = function() {
|
||
return xd;
|
||
}, KF = function(t) {
|
||
Un = t;
|
||
}, ZF = function() {
|
||
nl = !0;
|
||
}, QF = function() {
|
||
return nl;
|
||
}, JF = function() {
|
||
Td = !0;
|
||
}, tP = function() {
|
||
return Td;
|
||
}, eP = function() {
|
||
return Un;
|
||
}, rP = function(t) {
|
||
el = t.toLowerCase().split(/[\s,]+/);
|
||
}, nP = function() {
|
||
return el;
|
||
}, iP = function(t) {
|
||
rl = t.toLowerCase().split(/[\s,]+/);
|
||
}, sP = function() {
|
||
return rl;
|
||
}, aP = function() {
|
||
return vd;
|
||
}, oP = function(t) {
|
||
Ea = t, kd.push(t);
|
||
}, lP = function() {
|
||
return kd;
|
||
}, cP = function() {
|
||
let t = kp();
|
||
const e = 10;
|
||
let r = 0;
|
||
for (; !t && r < e; )
|
||
t = kp(), r++;
|
||
return Qc = cr, Qc;
|
||
}, s4 = function(t, e, r, n) {
|
||
return n.includes(t.format(e.trim())) ? !1 : t.isoWeekday() >= 6 && r.includes("weekends") || r.includes(t.format("dddd").toLowerCase()) ? !0 : r.includes(t.format(e.trim()));
|
||
}, a4 = function(t, e, r, n) {
|
||
if (!r.length || t.manualEndTime)
|
||
return;
|
||
let i = vn(t.startTime, e, !0);
|
||
i.add(1, "d");
|
||
let s = vn(t.endTime, e, !0), a = uP(i, s, e, r, n);
|
||
t.endTime = s.toDate(), t.renderEndTime = a;
|
||
}, uP = function(t, e, r, n, i) {
|
||
let s = !1, a = null;
|
||
for (; t <= e; )
|
||
s || (a = e.toDate()), s = s4(t, r, n, i), s && e.add(1, "d"), t.add(1, "d");
|
||
return a;
|
||
}, H1 = function(t, e, r) {
|
||
r = r.trim();
|
||
const i = /^after\s+([\d\w- ]+)/.exec(r.trim());
|
||
if (i !== null) {
|
||
let a = null;
|
||
if (i[1].split(" ").forEach(function(o) {
|
||
let l = Ya(o);
|
||
l !== void 0 && (a ? l.endTime > a.endTime && (a = l) : a = l);
|
||
}), a)
|
||
return a.endTime;
|
||
{
|
||
const o = new Date();
|
||
return o.setHours(0, 0, 0, 0), o;
|
||
}
|
||
}
|
||
let s = vn(r, e.trim(), !0);
|
||
if (s.isValid())
|
||
return s.toDate();
|
||
{
|
||
B.debug("Invalid date:" + r), B.debug("With date format:" + e.trim());
|
||
const a = new Date(r);
|
||
if (a === void 0 || isNaN(a.getTime()))
|
||
throw new Error("Invalid date:" + r);
|
||
return a;
|
||
}
|
||
}, o4 = function(t) {
|
||
const e = /^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());
|
||
return e !== null ? vn.duration(Number.parseFloat(e[1]), e[2]) : vn.duration.invalid();
|
||
}, l4 = function(t, e, r, n = !1) {
|
||
r = r.trim();
|
||
let i = vn(r, e.trim(), !0);
|
||
if (i.isValid())
|
||
return n && i.add(1, "d"), i.toDate();
|
||
const s = vn(t), a = o4(r);
|
||
return a.isValid() && s.add(a), s.toDate();
|
||
};
|
||
let Jl = 0;
|
||
const aa = function(t) {
|
||
return t === void 0 ? (Jl = Jl + 1, "task" + Jl) : t;
|
||
}, hP = function(t, e) {
|
||
let r;
|
||
e.substr(0, 1) === ":" ? r = e.substr(1, e.length) : r = e;
|
||
const n = r.split(","), i = {};
|
||
d4(n, i, i4);
|
||
for (let a = 0; a < n.length; a++)
|
||
n[a] = n[a].trim();
|
||
let s = "";
|
||
switch (n.length) {
|
||
case 1:
|
||
i.id = aa(), i.startTime = t.endTime, s = n[0];
|
||
break;
|
||
case 2:
|
||
i.id = aa(), i.startTime = H1(void 0, Un, n[0]), s = n[1];
|
||
break;
|
||
case 3:
|
||
i.id = aa(n[0]), i.startTime = H1(void 0, Un, n[1]), s = n[2];
|
||
break;
|
||
}
|
||
return s && (i.endTime = l4(i.startTime, Un, s, nl), i.manualEndTime = vn(s, "YYYY-MM-DD", !0).isValid(), a4(i, Un, rl, el)), i;
|
||
}, dP = function(t, e) {
|
||
let r;
|
||
e.substr(0, 1) === ":" ? r = e.substr(1, e.length) : r = e;
|
||
const n = r.split(","), i = {};
|
||
d4(n, i, i4);
|
||
for (let s = 0; s < n.length; s++)
|
||
n[s] = n[s].trim();
|
||
switch (n.length) {
|
||
case 1:
|
||
i.id = aa(), i.startTime = {
|
||
type: "prevTaskEnd",
|
||
id: t
|
||
}, i.endTime = {
|
||
data: n[0]
|
||
};
|
||
break;
|
||
case 2:
|
||
i.id = aa(), i.startTime = {
|
||
type: "getStartDate",
|
||
startData: n[0]
|
||
}, i.endTime = {
|
||
data: n[1]
|
||
};
|
||
break;
|
||
case 3:
|
||
i.id = aa(n[0]), i.startTime = {
|
||
type: "getStartDate",
|
||
startData: n[1]
|
||
}, i.endTime = {
|
||
data: n[2]
|
||
};
|
||
break;
|
||
}
|
||
return i;
|
||
};
|
||
let G1, tc, cr = [];
|
||
const c4 = {}, fP = function(t, e) {
|
||
const r = {
|
||
section: Ea,
|
||
type: Ea,
|
||
processed: !1,
|
||
manualEndTime: !1,
|
||
renderEndTime: null,
|
||
raw: { data: e },
|
||
task: t,
|
||
classes: []
|
||
}, n = dP(tc, e);
|
||
r.raw.startTime = n.startTime, r.raw.endTime = n.endTime, r.id = n.id, r.prevTaskId = tc, r.active = n.active, r.done = n.done, r.crit = n.crit, r.milestone = n.milestone, r.order = W1, W1++;
|
||
const i = cr.push(r);
|
||
tc = r.id, c4[r.id] = i - 1;
|
||
}, Ya = function(t) {
|
||
const e = c4[t];
|
||
return cr[e];
|
||
}, pP = function(t, e) {
|
||
const r = {
|
||
section: Ea,
|
||
type: Ea,
|
||
description: t,
|
||
task: t,
|
||
classes: []
|
||
}, n = hP(G1, 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, G1 = r, Qc.push(r);
|
||
}, kp = function() {
|
||
const t = function(r) {
|
||
const n = cr[r];
|
||
let i = "";
|
||
switch (cr[r].raw.startTime.type) {
|
||
case "prevTaskEnd": {
|
||
const s = Ya(n.prevTaskId);
|
||
n.startTime = s.endTime;
|
||
break;
|
||
}
|
||
case "getStartDate":
|
||
i = H1(void 0, Un, cr[r].raw.startTime.startData), i && (cr[r].startTime = i);
|
||
break;
|
||
}
|
||
return cr[r].startTime && (cr[r].endTime = l4(
|
||
cr[r].startTime,
|
||
Un,
|
||
cr[r].raw.endTime.data,
|
||
nl
|
||
), cr[r].endTime && (cr[r].processed = !0, cr[r].manualEndTime = vn(
|
||
cr[r].raw.endTime.data,
|
||
"YYYY-MM-DD",
|
||
!0
|
||
).isValid(), a4(cr[r], Un, rl, el))), cr[r].processed;
|
||
};
|
||
let e = !0;
|
||
for (const [r, n] of cr.entries())
|
||
t(r), e = e && n.processed;
|
||
return e;
|
||
}, gP = function(t, e) {
|
||
let r = e;
|
||
X().securityLevel !== "loose" && (r = Ti(e)), t.split(",").forEach(function(n) {
|
||
Ya(n) !== void 0 && (h4(n, () => {
|
||
window.open(r, "_self");
|
||
}), vd[n] = r);
|
||
}), u4(t, "clickable");
|
||
}, u4 = function(t, e) {
|
||
t.split(",").forEach(function(r) {
|
||
let n = Ya(r);
|
||
n !== void 0 && n.classes.push(e);
|
||
});
|
||
}, yP = function(t, e, r) {
|
||
if (X().securityLevel !== "loose" || e === void 0)
|
||
return;
|
||
let n = [];
|
||
if (typeof r == "string") {
|
||
n = r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
|
||
for (let s = 0; s < n.length; s++) {
|
||
let a = n[s].trim();
|
||
a.charAt(0) === '"' && a.charAt(a.length - 1) === '"' && (a = a.substr(1, a.length - 2)), n[s] = a;
|
||
}
|
||
}
|
||
n.length === 0 && n.push(t), Ya(t) !== void 0 && h4(t, () => {
|
||
ye.runFunc(e, ...n);
|
||
});
|
||
}, h4 = function(t, e) {
|
||
wd.push(
|
||
function() {
|
||
const r = document.querySelector(`[id="${t}"]`);
|
||
r !== null && r.addEventListener("click", function() {
|
||
e();
|
||
});
|
||
},
|
||
function() {
|
||
const r = document.querySelector(`[id="${t}-text"]`);
|
||
r !== null && r.addEventListener("click", function() {
|
||
e();
|
||
});
|
||
}
|
||
);
|
||
}, mP = function(t, e, r) {
|
||
t.split(",").forEach(function(n) {
|
||
yP(n, e, r);
|
||
}), u4(t, "clickable");
|
||
}, bP = function(t) {
|
||
wd.forEach(function(e) {
|
||
e(t);
|
||
});
|
||
}, Ed = {
|
||
parseDirective: zF,
|
||
getConfig: () => X().gantt,
|
||
clear: WF,
|
||
setDateFormat: KF,
|
||
getDateFormat: eP,
|
||
enableInclusiveEndDates: ZF,
|
||
endDatesAreInclusive: QF,
|
||
enableTopAxis: JF,
|
||
topAxisEnabled: tP,
|
||
setAxisFormat: HF,
|
||
getAxisFormat: GF,
|
||
setTickInterval: qF,
|
||
getTickInterval: jF,
|
||
setTodayMarker: XF,
|
||
getTodayMarker: $F,
|
||
setAccTitle: sn,
|
||
getAccTitle: Mn,
|
||
setDiagramTitle: Si,
|
||
getDiagramTitle: Ai,
|
||
setAccDescription: Nn,
|
||
getAccDescription: Bn,
|
||
addSection: oP,
|
||
getSections: lP,
|
||
getTasks: cP,
|
||
addTask: fP,
|
||
findTaskById: Ya,
|
||
addTaskOrg: pP,
|
||
setIncludes: rP,
|
||
getIncludes: nP,
|
||
setExcludes: iP,
|
||
getExcludes: sP,
|
||
setClickEvent: mP,
|
||
setLink: gP,
|
||
getLinks: aP,
|
||
bindFunctions: bP,
|
||
parseDuration: o4,
|
||
isInvalidDate: s4
|
||
};
|
||
function d4(t, e, r) {
|
||
let n = !0;
|
||
for (; n; )
|
||
n = !1, r.forEach(function(i) {
|
||
const s = "^\\s*" + i + "\\s*$", a = new RegExp(s);
|
||
t[0].match(a) && (e[i] = !0, t.shift(1), n = !0);
|
||
});
|
||
}
|
||
const _P = function() {
|
||
B.debug("Something is calling, setConf, remove the call");
|
||
};
|
||
let ii;
|
||
const xP = function(t, e, r, n) {
|
||
const i = X().gantt, s = X().securityLevel;
|
||
let a;
|
||
s === "sandbox" && (a = At("#i" + e));
|
||
const o = At(s === "sandbox" ? a.nodes()[0].contentDocument.body : "body"), l = s === "sandbox" ? a.nodes()[0].contentDocument : document, u = l.getElementById(e);
|
||
ii = u.parentElement.offsetWidth, ii === void 0 && (ii = 1200), i.useWidth !== void 0 && (ii = i.useWidth);
|
||
const d = n.db.getTasks(), f = d.length * (i.barHeight + i.barGap) + 2 * i.topPadding;
|
||
u.setAttribute("viewBox", "0 0 " + ii + " " + f);
|
||
const p = o.select(`[id="${e}"]`), g = kk().domain([
|
||
t5(d, function(D) {
|
||
return D.startTime;
|
||
}),
|
||
Jb(d, function(D) {
|
||
return D.endTime;
|
||
})
|
||
]).rangeRound([0, ii - i.leftPadding - i.rightPadding]);
|
||
let b = [];
|
||
for (const D of d)
|
||
b.push(D.type);
|
||
const k = b;
|
||
b = Y(b);
|
||
function T(D, w) {
|
||
const v = D.startTime, M = w.startTime;
|
||
let m = 0;
|
||
return v > M ? m = 1 : v < M && (m = -1), m;
|
||
}
|
||
d.sort(T), L(d, ii, f), Ln(p, f, ii, i.useMaxWidth), p.append("text").text(n.db.getDiagramTitle()).attr("x", ii / 2).attr("y", i.titleTopMargin).attr("class", "titleText");
|
||
function L(D, w, v) {
|
||
const M = i.barHeight, m = M + i.barGap, Q = i.topPadding, x = i.leftPadding, ct = Dg().domain([0, b.length]).range(["#00B9FA", "#F95002"]).interpolate(vx);
|
||
I(
|
||
m,
|
||
Q,
|
||
x,
|
||
w,
|
||
v,
|
||
D,
|
||
n.db.getExcludes(),
|
||
n.db.getIncludes()
|
||
), V(x, Q, w, v), E(D, m, Q, x, M, ct, w), H(m, Q), G(x, Q, w, v);
|
||
}
|
||
function E(D, w, v, M, m, Q, x) {
|
||
p.append("g").selectAll("rect").data(D).enter().append("rect").attr("x", 0).attr("y", function(j, ot) {
|
||
return ot = j.order, ot * w + v - 2;
|
||
}).attr("width", function() {
|
||
return x - i.rightPadding / 2;
|
||
}).attr("height", w).attr("class", function(j) {
|
||
for (const [ot, rt] of b.entries())
|
||
if (j.type === rt)
|
||
return "section section" + ot % i.numberSectionStyles;
|
||
return "section section0";
|
||
});
|
||
const ct = p.append("g").selectAll("rect").data(D).enter(), Dt = n.db.getLinks();
|
||
if (ct.append("rect").attr("id", function(j) {
|
||
return j.id;
|
||
}).attr("rx", 3).attr("ry", 3).attr("x", function(j) {
|
||
return j.milestone ? g(j.startTime) + M + 0.5 * (g(j.endTime) - g(j.startTime)) - 0.5 * m : g(j.startTime) + M;
|
||
}).attr("y", function(j, ot) {
|
||
return ot = j.order, ot * w + v;
|
||
}).attr("width", function(j) {
|
||
return j.milestone ? m : g(j.renderEndTime || j.endTime) - g(j.startTime);
|
||
}).attr("height", m).attr("transform-origin", function(j, ot) {
|
||
return ot = j.order, (g(j.startTime) + M + 0.5 * (g(j.endTime) - g(j.startTime))).toString() + "px " + (ot * w + v + 0.5 * m).toString() + "px";
|
||
}).attr("class", function(j) {
|
||
const ot = "task";
|
||
let rt = "";
|
||
j.classes.length > 0 && (rt = j.classes.join(" "));
|
||
let nt = 0;
|
||
for (const [_t, K] of b.entries())
|
||
j.type === K && (nt = _t % i.numberSectionStyles);
|
||
let ut = "";
|
||
return j.active ? j.crit ? ut += " activeCrit" : ut = " active" : j.done ? j.crit ? ut = " doneCrit" : ut = " done" : j.crit && (ut += " crit"), ut.length === 0 && (ut = " task"), j.milestone && (ut = " milestone " + ut), ut += nt, ut += " " + rt, ot + ut;
|
||
}), ct.append("text").attr("id", function(j) {
|
||
return j.id + "-text";
|
||
}).text(function(j) {
|
||
return j.task;
|
||
}).attr("font-size", i.fontSize).attr("x", function(j) {
|
||
let ot = g(j.startTime), rt = g(j.renderEndTime || j.endTime);
|
||
j.milestone && (ot += 0.5 * (g(j.endTime) - g(j.startTime)) - 0.5 * m), j.milestone && (rt = ot + m);
|
||
const nt = this.getBBox().width;
|
||
return nt > rt - ot ? rt + nt + 1.5 * i.leftPadding > x ? ot + M - 5 : rt + M + 5 : (rt - ot) / 2 + ot + M;
|
||
}).attr("y", function(j, ot) {
|
||
return ot = j.order, ot * w + i.barHeight / 2 + (i.fontSize / 2 - 2) + v;
|
||
}).attr("text-height", m).attr("class", function(j) {
|
||
const ot = g(j.startTime);
|
||
let rt = g(j.endTime);
|
||
j.milestone && (rt = ot + m);
|
||
const nt = this.getBBox().width;
|
||
let ut = "";
|
||
j.classes.length > 0 && (ut = j.classes.join(" "));
|
||
let _t = 0;
|
||
for (const [Ot, P] of b.entries())
|
||
j.type === P && (_t = Ot % i.numberSectionStyles);
|
||
let K = "";
|
||
return j.active && (j.crit ? K = "activeCritText" + _t : K = "activeText" + _t), j.done ? j.crit ? K = K + " doneCritText" + _t : K = K + " doneText" + _t : j.crit && (K = K + " critText" + _t), j.milestone && (K += " milestoneText"), nt > rt - ot ? rt + nt + 1.5 * i.leftPadding > x ? ut + " taskTextOutsideLeft taskTextOutside" + _t + " " + K : ut + " taskTextOutsideRight taskTextOutside" + _t + " " + K + " width-" + nt : ut + " taskText taskText" + _t + " " + K + " width-" + nt;
|
||
}), X().securityLevel === "sandbox") {
|
||
let j;
|
||
j = At("#i" + e);
|
||
const ot = j.nodes()[0].contentDocument;
|
||
ct.filter(function(rt) {
|
||
return Dt[rt.id] !== void 0;
|
||
}).each(function(rt) {
|
||
var nt = ot.querySelector("#" + rt.id), ut = ot.querySelector("#" + rt.id + "-text");
|
||
const _t = nt.parentNode;
|
||
var K = ot.createElement("a");
|
||
K.setAttribute("xlink:href", Dt[rt.id]), K.setAttribute("target", "_top"), _t.appendChild(K), K.appendChild(nt), K.appendChild(ut);
|
||
});
|
||
}
|
||
}
|
||
function I(D, w, v, M, m, Q, x, ct) {
|
||
const Dt = Q.reduce(
|
||
(_t, { startTime: K }) => _t ? Math.min(_t, K) : K,
|
||
0
|
||
), vt = Q.reduce((_t, { endTime: K }) => _t ? Math.max(_t, K) : K, 0), j = n.db.getDateFormat();
|
||
if (!Dt || !vt)
|
||
return;
|
||
const ot = [];
|
||
let rt = null, nt = vn(Dt);
|
||
for (; nt.valueOf() <= vt; )
|
||
n.db.isInvalidDate(nt, j, x, ct) ? rt ? rt.end = nt.clone() : rt = {
|
||
start: nt.clone(),
|
||
end: nt.clone()
|
||
} : rt && (ot.push(rt), rt = null), nt.add(1, "d");
|
||
p.append("g").selectAll("rect").data(ot).enter().append("rect").attr("id", function(_t) {
|
||
return "exclude-" + _t.start.format("YYYY-MM-DD");
|
||
}).attr("x", function(_t) {
|
||
return g(_t.start) + v;
|
||
}).attr("y", i.gridLineStartPadding).attr("width", function(_t) {
|
||
const K = _t.end.clone().add(1, "day");
|
||
return g(K) - g(_t.start);
|
||
}).attr("height", m - w - i.gridLineStartPadding).attr("transform-origin", function(_t, K) {
|
||
return (g(_t.start) + v + 0.5 * (g(_t.end) - g(_t.start))).toString() + "px " + (K * D + 0.5 * m).toString() + "px";
|
||
}).attr("class", "exclude-range");
|
||
}
|
||
function V(D, w, v, M) {
|
||
let m = l5(g).tickSize(-M + w + i.gridLineStartPadding).tickFormat(xc(n.db.getAxisFormat() || i.axisFormat || "%Y-%m-%d"));
|
||
const x = /^([1-9]\d*)(minute|hour|day|week|month)$/.exec(
|
||
n.db.getTickInterval() || i.tickInterval
|
||
);
|
||
if (x !== null) {
|
||
const ct = x[1];
|
||
switch (x[2]) {
|
||
case "minute":
|
||
m.ticks(gc.every(ct));
|
||
break;
|
||
case "hour":
|
||
m.ticks(yc.every(ct));
|
||
break;
|
||
case "day":
|
||
m.ticks(ua.every(ct));
|
||
break;
|
||
case "week":
|
||
m.ticks(ha.every(ct));
|
||
break;
|
||
case "month":
|
||
m.ticks(bc.every(ct));
|
||
break;
|
||
}
|
||
}
|
||
if (p.append("g").attr("class", "grid").attr("transform", "translate(" + D + ", " + (M - 50) + ")").call(m).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 ct = o5(g).tickSize(-M + w + i.gridLineStartPadding).tickFormat(xc(n.db.getAxisFormat() || i.axisFormat || "%Y-%m-%d"));
|
||
if (x !== null) {
|
||
const Dt = x[1];
|
||
switch (x[2]) {
|
||
case "minute":
|
||
ct.ticks(gc.every(Dt));
|
||
break;
|
||
case "hour":
|
||
ct.ticks(yc.every(Dt));
|
||
break;
|
||
case "day":
|
||
ct.ticks(ua.every(Dt));
|
||
break;
|
||
case "week":
|
||
ct.ticks(ha.every(Dt));
|
||
break;
|
||
case "month":
|
||
ct.ticks(bc.every(Dt));
|
||
break;
|
||
}
|
||
}
|
||
p.append("g").attr("class", "grid").attr("transform", "translate(" + D + ", " + w + ")").call(ct).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10);
|
||
}
|
||
}
|
||
function H(D, w) {
|
||
const v = [];
|
||
let M = 0;
|
||
for (const [m, Q] of b.entries())
|
||
v[m] = [Q, N(Q, k)];
|
||
p.append("g").selectAll("text").data(v).enter().append(function(m) {
|
||
const Q = m[0].split(he.lineBreakRegex), x = -(Q.length - 1) / 2, ct = l.createElementNS("http://www.w3.org/2000/svg", "text");
|
||
ct.setAttribute("dy", x + "em");
|
||
for (const [Dt, vt] of Q.entries()) {
|
||
const j = l.createElementNS("http://www.w3.org/2000/svg", "tspan");
|
||
j.setAttribute("alignment-baseline", "central"), j.setAttribute("x", "10"), Dt > 0 && j.setAttribute("dy", "1em"), j.textContent = vt, ct.appendChild(j);
|
||
}
|
||
return ct;
|
||
}).attr("x", 10).attr("y", function(m, Q) {
|
||
if (Q > 0)
|
||
for (let x = 0; x < Q; x++)
|
||
return M += v[Q - 1][1], m[1] * D / 2 + M * D + w;
|
||
else
|
||
return m[1] * D / 2 + w;
|
||
}).attr("font-size", i.sectionFontSize).attr("font-size", i.sectionFontSize).attr("class", function(m) {
|
||
for (const [Q, x] of b.entries())
|
||
if (m[0] === x)
|
||
return "sectionTitle sectionTitle" + Q % i.numberSectionStyles;
|
||
return "sectionTitle";
|
||
});
|
||
}
|
||
function G(D, w, v, M) {
|
||
const m = n.db.getTodayMarker();
|
||
if (m === "off")
|
||
return;
|
||
const Q = p.append("g").attr("class", "today"), x = new Date(), ct = Q.append("line");
|
||
ct.attr("x1", g(x) + D).attr("x2", g(x) + D).attr("y1", i.titleTopMargin).attr("y2", M - i.titleTopMargin).attr("class", "today"), m !== "" && ct.attr("style", m.replace(/,/g, ";"));
|
||
}
|
||
function Y(D) {
|
||
const w = {}, v = [];
|
||
for (let M = 0, m = D.length; M < m; ++M)
|
||
Object.prototype.hasOwnProperty.call(w, D[M]) || (w[D[M]] = !0, v.push(D[M]));
|
||
return v;
|
||
}
|
||
function W(D) {
|
||
let w = D.length;
|
||
const v = {};
|
||
for (; w; )
|
||
v[D[--w]] = (v[D[w]] || 0) + 1;
|
||
return v;
|
||
}
|
||
function N(D, w) {
|
||
return W(w)[D] || 0;
|
||
}
|
||
}, vP = {
|
||
setConf: _P,
|
||
draw: xP
|
||
};
|
||
var q1 = function() {
|
||
var t = function(s, a, o, l) {
|
||
for (o = o || {}, l = s.length; l--; o[s[l]] = a)
|
||
;
|
||
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(a, o, l, u, d, f, p) {
|
||
switch (f.length - 1, d) {
|
||
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(a, o) {
|
||
if (o.recoverable)
|
||
this.trace(a);
|
||
else {
|
||
var l = new Error(a);
|
||
throw l.hash = o, l;
|
||
}
|
||
},
|
||
parse: function(a) {
|
||
var o = this, l = [0], u = [], d = [null], f = [], p = this.table, g = "", b = 0, k = 0, T = 2, L = 1, E = f.slice.call(arguments, 1), I = Object.create(this.lexer), V = { yy: {} };
|
||
for (var H in this.yy)
|
||
Object.prototype.hasOwnProperty.call(this.yy, H) && (V.yy[H] = this.yy[H]);
|
||
I.setInput(a, V.yy), V.yy.lexer = I, V.yy.parser = this, typeof I.yylloc > "u" && (I.yylloc = {});
|
||
var G = I.yylloc;
|
||
f.push(G);
|
||
var Y = I.options && I.options.ranges;
|
||
typeof V.yy.parseError == "function" ? this.parseError = V.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
||
function W() {
|
||
var vt;
|
||
return vt = u.pop() || I.lex() || L, typeof vt != "number" && (vt instanceof Array && (u = vt, vt = u.pop()), vt = o.symbols_[vt] || vt), vt;
|
||
}
|
||
for (var N, D, w, v, M = {}, m, Q, x, ct; ; ) {
|
||
if (D = l[l.length - 1], this.defaultActions[D] ? w = this.defaultActions[D] : ((N === null || typeof N > "u") && (N = W()), w = p[D] && p[D][N]), typeof w > "u" || !w.length || !w[0]) {
|
||
var Dt = "";
|
||
ct = [];
|
||
for (m in p[D])
|
||
this.terminals_[m] && m > T && ct.push("'" + this.terminals_[m] + "'");
|
||
I.showPosition ? Dt = "Parse error on line " + (b + 1) + `:
|
||
` + I.showPosition() + `
|
||
Expecting ` + ct.join(", ") + ", got '" + (this.terminals_[N] || N) + "'" : Dt = "Parse error on line " + (b + 1) + ": Unexpected " + (N == L ? "end of input" : "'" + (this.terminals_[N] || N) + "'"), this.parseError(Dt, {
|
||
text: I.match,
|
||
token: this.terminals_[N] || N,
|
||
line: I.yylineno,
|
||
loc: G,
|
||
expected: ct
|
||
});
|
||
}
|
||
if (w[0] instanceof Array && w.length > 1)
|
||
throw new Error("Parse Error: multiple actions possible at state: " + D + ", token: " + N);
|
||
switch (w[0]) {
|
||
case 1:
|
||
l.push(N), d.push(I.yytext), f.push(I.yylloc), l.push(w[1]), N = null, k = I.yyleng, g = I.yytext, b = I.yylineno, G = I.yylloc;
|
||
break;
|
||
case 2:
|
||
if (Q = this.productions_[w[1]][1], M.$ = d[d.length - Q], M._$ = {
|
||
first_line: f[f.length - (Q || 1)].first_line,
|
||
last_line: f[f.length - 1].last_line,
|
||
first_column: f[f.length - (Q || 1)].first_column,
|
||
last_column: f[f.length - 1].last_column
|
||
}, Y && (M._$.range = [
|
||
f[f.length - (Q || 1)].range[0],
|
||
f[f.length - 1].range[1]
|
||
]), v = this.performAction.apply(M, [
|
||
g,
|
||
k,
|
||
b,
|
||
V.yy,
|
||
w[1],
|
||
d,
|
||
f
|
||
].concat(E)), typeof v < "u")
|
||
return v;
|
||
Q && (l = l.slice(0, -1 * Q * 2), d = d.slice(0, -1 * Q), f = f.slice(0, -1 * Q)), l.push(this.productions_[w[1]][0]), d.push(M.$), f.push(M._$), x = p[l[l.length - 2]][l[l.length - 1]], l.push(x);
|
||
break;
|
||
case 3:
|
||
return !0;
|
||
}
|
||
}
|
||
return !0;
|
||
}
|
||
}, n = function() {
|
||
var s = {
|
||
EOF: 1,
|
||
parseError: function(o, l) {
|
||
if (this.yy.parser)
|
||
this.yy.parser.parseError(o, l);
|
||
else
|
||
throw new Error(o);
|
||
},
|
||
setInput: function(a, o) {
|
||
return this.yy = o || this.yy || {}, this._input = a, 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 a = this._input[0];
|
||
this.yytext += a, this.yyleng++, this.offset++, this.match += a, this.matched += a;
|
||
var o = a.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), a;
|
||
},
|
||
unput: function(a) {
|
||
var o = a.length, l = a.split(/(?:\r\n?|\n)/g);
|
||
this._input = a + 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 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: 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 = [d[0], d[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(a) {
|
||
this.unput(this.match.slice(a));
|
||
},
|
||
pastInput: function() {
|
||
var a = this.matched.substr(0, this.matched.length - this.match.length);
|
||
return (a.length > 20 ? "..." : "") + a.substr(-20).replace(/\n/g, "");
|
||
},
|
||
upcomingInput: function() {
|
||
var a = this.match;
|
||
return a.length < 20 && (a += this._input.substr(0, 20 - a.length)), (a.substr(0, 20) + (a.length > 20 ? "..." : "")).replace(/\n/g, "");
|
||
},
|
||
showPosition: function() {
|
||
var a = this.pastInput(), o = new Array(a.length + 1).join("-");
|
||
return a + this.upcomingInput() + `
|
||
` + o + "^";
|
||
},
|
||
test_match: function(a, o) {
|
||
var l, u, 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))), u = a[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 + a[0].length
|
||
}, this.yytext += a[0], this.match += a[0], this.matches = a, 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(a[0].length), this.matched += a[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 f in d)
|
||
this[f] = d[f];
|
||
return !1;
|
||
}
|
||
return !1;
|
||
},
|
||
next: function() {
|
||
if (this.done)
|
||
return this.EOF;
|
||
this._input || (this.done = !0);
|
||
var a, o, l, u;
|
||
this._more || (this.yytext = "", this.match = "");
|
||
for (var d = this._currentRules(), f = 0; f < d.length; f++)
|
||
if (l = this._input.match(this.rules[d[f]]), l && (!o || l[0].length > o[0].length)) {
|
||
if (o = l, u = f, this.options.backtrack_lexer) {
|
||
if (a = this.test_match(l, d[f]), a !== !1)
|
||
return a;
|
||
if (this._backtrack) {
|
||
o = !1;
|
||
continue;
|
||
} else
|
||
return !1;
|
||
} else if (!this.options.flex)
|
||
break;
|
||
}
|
||
return o ? (a = this.test_match(o, d[u]), a !== !1 ? a : !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, d) {
|
||
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 s;
|
||
}();
|
||
r.lexer = n;
|
||
function i() {
|
||
this.yy = {};
|
||
}
|
||
return i.prototype = r, r.Parser = i, new i();
|
||
}();
|
||
q1.parser = q1;
|
||
const kP = q1;
|
||
var f4 = "", p4 = !1;
|
||
const wP = (t) => {
|
||
B.debug("Setting message to: " + t), f4 = t;
|
||
}, TP = () => f4, EP = (t) => {
|
||
p4 = t;
|
||
}, CP = () => p4, SP = {
|
||
setMessage: wP,
|
||
getMessage: TP,
|
||
setInfo: EP,
|
||
getInfo: CP,
|
||
clear: Dn
|
||
}, AP = (t, e, r) => {
|
||
try {
|
||
B.debug(`Rendering info diagram
|
||
` + t);
|
||
const n = X().securityLevel;
|
||
let i;
|
||
n === "sandbox" && (i = At("#i" + e));
|
||
const a = At(n === "sandbox" ? i.nodes()[0].contentDocument.body : "body").select("#" + e);
|
||
a.append("g").append("text").attr("x", 100).attr("y", 40).attr("class", "version").attr("font-size", "32px").style("text-anchor", "middle").text("v " + r), a.attr("height", 100), a.attr("width", 400);
|
||
} catch (n) {
|
||
B.error("Error while rendering info diagram"), B.error(n.message);
|
||
}
|
||
}, LP = {
|
||
draw: AP
|
||
}, DP = (t) => t.match(/^\s*info/) !== null;
|
||
var j1 = function() {
|
||
var t = function(G, Y, W, N) {
|
||
for (W = W || {}, N = G.length; N--; W[G[N]] = Y)
|
||
;
|
||
return W;
|
||
}, e = [1, 4], r = [1, 5], n = [1, 6], i = [1, 7], s = [1, 9], a = [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], d = [2, 8], f = [1, 18], p = [1, 19], g = [1, 20], b = [1, 21], k = [1, 22], T = [1, 23], L = [1, 28], E = [6, 26, 27, 28, 29], I = {
|
||
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(Y, W, N, D, w, v, M) {
|
||
var m = v.length - 1;
|
||
switch (w) {
|
||
case 4:
|
||
D.setShowData(!0);
|
||
break;
|
||
case 7:
|
||
this.$ = v[m - 1];
|
||
break;
|
||
case 9:
|
||
D.addSection(v[m - 1], D.cleanupValue(v[m]));
|
||
break;
|
||
case 10:
|
||
this.$ = v[m].trim(), D.setDiagramTitle(this.$);
|
||
break;
|
||
case 11:
|
||
this.$ = v[m].trim(), D.setAccTitle(this.$);
|
||
break;
|
||
case 12:
|
||
case 13:
|
||
this.$ = v[m].trim(), D.setAccDescription(this.$);
|
||
break;
|
||
case 14:
|
||
D.addSection(v[m].substr(8)), this.$ = v[m].substr(8);
|
||
break;
|
||
case 21:
|
||
D.parseDirective("%%{", "open_directive");
|
||
break;
|
||
case 22:
|
||
D.parseDirective(v[m], "type_directive");
|
||
break;
|
||
case 23:
|
||
v[m] = v[m].trim().replace(/'/g, '"'), D.parseDirective(v[m], "arg_directive");
|
||
break;
|
||
case 24:
|
||
D.parseDirective("}%%", "close_directive", "pie");
|
||
break;
|
||
}
|
||
},
|
||
table: [{ 3: 1, 4: 2, 5: 3, 6: e, 21: 8, 26: r, 27: n, 28: i, 29: s }, { 1: [3] }, { 3: 10, 4: 2, 5: 3, 6: e, 21: 8, 26: r, 27: n, 28: i, 29: s }, { 3: 11, 4: 2, 5: 3, 6: e, 21: 8, 26: r, 27: n, 28: i, 29: s }, t(a, 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, d, { 21: 8, 9: 16, 10: 17, 5: 24, 1: [2, 3], 11: f, 13: p, 15: g, 17: b, 19: k, 20: T, 29: s }), t(a, o, { 7: 25 }), { 23: 26, 24: [1, 27], 32: L }, t([24, 32], [2, 22]), t(a, [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, d, { 21: 8, 9: 16, 10: 17, 5: 24, 1: [2, 4], 11: f, 13: p, 15: g, 17: b, 19: k, 20: T, 29: s }), t(E, [2, 16]), { 25: 34, 31: [1, 35] }, t(E, [2, 24]), t(a, [2, 7]), t(u, [2, 9]), t(u, [2, 10]), t(u, [2, 11]), t(u, [2, 12]), { 23: 36, 32: L }, { 32: [2, 23] }, t(E, [2, 17])],
|
||
defaultActions: { 9: [2, 21], 10: [2, 1], 11: [2, 2], 35: [2, 23] },
|
||
parseError: function(Y, W) {
|
||
if (W.recoverable)
|
||
this.trace(Y);
|
||
else {
|
||
var N = new Error(Y);
|
||
throw N.hash = W, N;
|
||
}
|
||
},
|
||
parse: function(Y) {
|
||
var W = this, N = [0], D = [], w = [null], v = [], M = this.table, m = "", Q = 0, x = 0, ct = 2, Dt = 1, vt = v.slice.call(arguments, 1), j = Object.create(this.lexer), ot = { yy: {} };
|
||
for (var rt in this.yy)
|
||
Object.prototype.hasOwnProperty.call(this.yy, rt) && (ot.yy[rt] = this.yy[rt]);
|
||
j.setInput(Y, ot.yy), ot.yy.lexer = j, ot.yy.parser = this, typeof j.yylloc > "u" && (j.yylloc = {});
|
||
var nt = j.yylloc;
|
||
v.push(nt);
|
||
var ut = j.options && j.options.ranges;
|
||
typeof ot.yy.parseError == "function" ? this.parseError = ot.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
||
function _t() {
|
||
var ht;
|
||
return ht = D.pop() || j.lex() || Dt, typeof ht != "number" && (ht instanceof Array && (D = ht, ht = D.pop()), ht = W.symbols_[ht] || ht), ht;
|
||
}
|
||
for (var K, Ot, P, z, $ = {}, F, O, A, J; ; ) {
|
||
if (Ot = N[N.length - 1], this.defaultActions[Ot] ? P = this.defaultActions[Ot] : ((K === null || typeof K > "u") && (K = _t()), P = M[Ot] && M[Ot][K]), typeof P > "u" || !P.length || !P[0]) {
|
||
var C = "";
|
||
J = [];
|
||
for (F in M[Ot])
|
||
this.terminals_[F] && F > ct && J.push("'" + this.terminals_[F] + "'");
|
||
j.showPosition ? C = "Parse error on line " + (Q + 1) + `:
|
||
` + j.showPosition() + `
|
||
Expecting ` + J.join(", ") + ", got '" + (this.terminals_[K] || K) + "'" : C = "Parse error on line " + (Q + 1) + ": Unexpected " + (K == Dt ? "end of input" : "'" + (this.terminals_[K] || K) + "'"), this.parseError(C, {
|
||
text: j.match,
|
||
token: this.terminals_[K] || K,
|
||
line: j.yylineno,
|
||
loc: nt,
|
||
expected: J
|
||
});
|
||
}
|
||
if (P[0] instanceof Array && P.length > 1)
|
||
throw new Error("Parse Error: multiple actions possible at state: " + Ot + ", token: " + K);
|
||
switch (P[0]) {
|
||
case 1:
|
||
N.push(K), w.push(j.yytext), v.push(j.yylloc), N.push(P[1]), K = null, x = j.yyleng, m = j.yytext, Q = j.yylineno, nt = j.yylloc;
|
||
break;
|
||
case 2:
|
||
if (O = this.productions_[P[1]][1], $.$ = w[w.length - O], $._$ = {
|
||
first_line: v[v.length - (O || 1)].first_line,
|
||
last_line: v[v.length - 1].last_line,
|
||
first_column: v[v.length - (O || 1)].first_column,
|
||
last_column: v[v.length - 1].last_column
|
||
}, ut && ($._$.range = [
|
||
v[v.length - (O || 1)].range[0],
|
||
v[v.length - 1].range[1]
|
||
]), z = this.performAction.apply($, [
|
||
m,
|
||
x,
|
||
Q,
|
||
ot.yy,
|
||
P[1],
|
||
w,
|
||
v
|
||
].concat(vt)), typeof z < "u")
|
||
return z;
|
||
O && (N = N.slice(0, -1 * O * 2), w = w.slice(0, -1 * O), v = v.slice(0, -1 * O)), N.push(this.productions_[P[1]][0]), w.push($.$), v.push($._$), A = M[N[N.length - 2]][N[N.length - 1]], N.push(A);
|
||
break;
|
||
case 3:
|
||
return !0;
|
||
}
|
||
}
|
||
return !0;
|
||
}
|
||
}, V = function() {
|
||
var G = {
|
||
EOF: 1,
|
||
parseError: function(W, N) {
|
||
if (this.yy.parser)
|
||
this.yy.parser.parseError(W, N);
|
||
else
|
||
throw new Error(W);
|
||
},
|
||
setInput: function(Y, W) {
|
||
return this.yy = W || 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 W = Y.match(/(?:\r\n?|\n).*/g);
|
||
return W ? (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 W = Y.length, N = Y.split(/(?:\r\n?|\n)/g);
|
||
this._input = Y + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - W), this.offset -= W;
|
||
var D = 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), N.length - 1 && (this.yylineno -= N.length - 1);
|
||
var w = 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: N ? (N.length === D.length ? this.yylloc.first_column : 0) + D[D.length - N.length].length - N[0].length : this.yylloc.first_column - W
|
||
}, this.options.ranges && (this.yylloc.range = [w[0], w[0] + this.yyleng - W]), 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(), W = new Array(Y.length + 1).join("-");
|
||
return Y + this.upcomingInput() + `
|
||
` + W + "^";
|
||
},
|
||
test_match: function(Y, W) {
|
||
var N, D, w;
|
||
if (this.options.backtrack_lexer && (w = {
|
||
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 && (w.yylloc.range = this.yylloc.range.slice(0))), D = Y[0].match(/(?:\r\n?|\n).*/g), D && (this.yylineno += D.length), this.yylloc = {
|
||
first_line: this.yylloc.last_line,
|
||
last_line: this.yylineno + 1,
|
||
first_column: this.yylloc.last_column,
|
||
last_column: D ? D[D.length - 1].length - D[D.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], N = this.performAction.call(this, this.yy, this, W, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), N)
|
||
return N;
|
||
if (this._backtrack) {
|
||
for (var v in w)
|
||
this[v] = w[v];
|
||
return !1;
|
||
}
|
||
return !1;
|
||
},
|
||
next: function() {
|
||
if (this.done)
|
||
return this.EOF;
|
||
this._input || (this.done = !0);
|
||
var Y, W, N, D;
|
||
this._more || (this.yytext = "", this.match = "");
|
||
for (var w = this._currentRules(), v = 0; v < w.length; v++)
|
||
if (N = this._input.match(this.rules[w[v]]), N && (!W || N[0].length > W[0].length)) {
|
||
if (W = N, D = v, this.options.backtrack_lexer) {
|
||
if (Y = this.test_match(N, w[v]), Y !== !1)
|
||
return Y;
|
||
if (this._backtrack) {
|
||
W = !1;
|
||
continue;
|
||
} else
|
||
return !1;
|
||
} else if (!this.options.flex)
|
||
break;
|
||
}
|
||
return W ? (Y = this.test_match(W, w[D]), 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 W = this.next();
|
||
return W || this.lex();
|
||
},
|
||
begin: function(W) {
|
||
this.conditionStack.push(W);
|
||
},
|
||
popState: function() {
|
||
var W = this.conditionStack.length - 1;
|
||
return W > 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(W) {
|
||
return W = this.conditionStack.length - 1 - Math.abs(W || 0), W >= 0 ? this.conditionStack[W] : "INITIAL";
|
||
},
|
||
pushState: function(W) {
|
||
this.begin(W);
|
||
},
|
||
stateStackSize: function() {
|
||
return this.conditionStack.length;
|
||
},
|
||
options: { "case-insensitive": !0 },
|
||
performAction: function(W, N, D, w) {
|
||
switch (D) {
|
||
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 G;
|
||
}();
|
||
I.lexer = V;
|
||
function H() {
|
||
this.yy = {};
|
||
}
|
||
return H.prototype = I, I.Parser = H, new H();
|
||
}();
|
||
j1.parser = j1;
|
||
const MP = j1, NP = (t) => t.match(/^\s*pie/) !== null || t.match(/^\s*bar/) !== null;
|
||
let Jc = {}, Cd = !1;
|
||
const BP = function(t, e, r) {
|
||
ze.parseDirective(this, t, e, r);
|
||
}, IP = function(t, e) {
|
||
t = he.sanitizeText(t, X()), Jc[t] === void 0 && (Jc[t] = e, B.debug("Added new section :", t));
|
||
}, OP = () => Jc, RP = function(t) {
|
||
Cd = t;
|
||
}, FP = function() {
|
||
return Cd;
|
||
}, PP = function(t) {
|
||
return t.substring(0, 1) === ":" && (t = t.substring(1).trim()), Number(t.trim());
|
||
}, YP = function() {
|
||
Jc = {}, Cd = !1, Dn();
|
||
}, VP = {
|
||
parseDirective: BP,
|
||
getConfig: () => X().pie,
|
||
addSection: IP,
|
||
getSections: OP,
|
||
cleanupValue: PP,
|
||
clear: YP,
|
||
setAccTitle: sn,
|
||
getAccTitle: Mn,
|
||
setDiagramTitle: Si,
|
||
getDiagramTitle: Ai,
|
||
setShowData: RP,
|
||
getShowData: FP,
|
||
getAccDescription: Bn,
|
||
setAccDescription: Nn
|
||
};
|
||
let si = X(), ai;
|
||
const Za = 450, UP = (t, e, r, n) => {
|
||
try {
|
||
si = X(), B.debug(`Rendering info diagram
|
||
` + t);
|
||
const E = X().securityLevel;
|
||
let I;
|
||
E === "sandbox" && (I = At("#i" + e));
|
||
const V = At(E === "sandbox" ? I.nodes()[0].contentDocument.body : "body"), H = E === "sandbox" ? I.nodes()[0].contentDocument : document;
|
||
n.db.clear(), n.parser.parse(t), B.debug("Parsed info diagram");
|
||
const G = H.getElementById(e);
|
||
ai = G.parentElement.offsetWidth, ai === void 0 && (ai = 1200), si.useWidth !== void 0 && (ai = si.useWidth), si.pie.useWidth !== void 0 && (ai = si.pie.useWidth);
|
||
const Y = V.select("#" + e);
|
||
Ln(Y, Za, ai, si.pie.useMaxWidth), G.setAttribute("viewBox", "0 0 " + ai + " " + Za);
|
||
var i = 40, s = 18, a = 4, o = Math.min(ai, Za) / 2 - i, l = Y.append("g").attr("transform", "translate(" + ai / 2 + "," + Za / 2 + ")"), u = n.db.getSections(), d = 0;
|
||
Object.keys(u).forEach(function(N) {
|
||
d += u[N];
|
||
});
|
||
const W = si.themeVariables;
|
||
var f = [
|
||
W.pie1,
|
||
W.pie2,
|
||
W.pie3,
|
||
W.pie4,
|
||
W.pie5,
|
||
W.pie6,
|
||
W.pie7,
|
||
W.pie8,
|
||
W.pie9,
|
||
W.pie10,
|
||
W.pie11,
|
||
W.pie12
|
||
], p = Sg().range(f), g = Object.entries(u).map(function(N, D) {
|
||
return {
|
||
order: D,
|
||
name: N[0],
|
||
value: N[1]
|
||
};
|
||
}), b = Ok().value(function(N) {
|
||
return N.value;
|
||
}).sort(function(N, D) {
|
||
return N.order - D.order;
|
||
}), k = b(g), T = l1().innerRadius(0).outerRadius(o);
|
||
l.selectAll("mySlices").data(k).enter().append("path").attr("d", T).attr("fill", function(N) {
|
||
return p(N.data.name);
|
||
}).attr("class", "pieCircle"), l.selectAll("mySlices").data(k).enter().append("text").text(function(N) {
|
||
return (N.data.value / d * 100).toFixed(0) + "%";
|
||
}).attr("transform", function(N) {
|
||
return "translate(" + T.centroid(N) + ")";
|
||
}).style("text-anchor", "middle").attr("class", "slice"), l.append("text").text(n.db.getDiagramTitle()).attr("x", 0).attr("y", -(Za - 50) / 2).attr("class", "pieTitleText");
|
||
var L = l.selectAll(".legend").data(p.domain()).enter().append("g").attr("class", "legend").attr("transform", function(N, D) {
|
||
const w = s + a, v = w * p.domain().length / 2, M = 12 * s, m = D * w - v;
|
||
return "translate(" + M + "," + m + ")";
|
||
});
|
||
L.append("rect").attr("width", s).attr("height", s).style("fill", p).style("stroke", p), L.data(k).append("text").attr("x", s + a).attr("y", s - a).text(function(N) {
|
||
return n.db.getShowData() || si.showData || si.pie.showData ? N.data.name + " [" + N.data.value + "]" : N.data.name;
|
||
});
|
||
} catch (E) {
|
||
B.error("Error while rendering info diagram"), B.error(E);
|
||
}
|
||
}, zP = {
|
||
draw: UP
|
||
};
|
||
var X1 = function() {
|
||
var t = function(Ot, P, z, $) {
|
||
for (z = z || {}, $ = Ot.length; $--; z[Ot[$]] = P)
|
||
;
|
||
return z;
|
||
}, e = [1, 3], r = [1, 5], n = [1, 6], i = [1, 7], s = [1, 8], a = [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], d = [1, 27], f = [1, 28], p = [1, 29], g = [1, 30], b = [1, 31], k = [1, 24], T = [1, 32], L = [1, 33], E = [1, 36], I = [71, 72], V = [5, 8, 14, 16, 18, 19, 40, 41, 42, 43, 44, 45, 53, 60, 62, 71, 72], H = [1, 56], G = [1, 57], Y = [1, 58], W = [1, 59], N = [1, 60], D = [1, 61], w = [1, 62], v = [62, 63], M = [1, 74], m = [1, 70], Q = [1, 71], x = [1, 72], ct = [1, 73], Dt = [1, 75], vt = [1, 79], j = [1, 80], ot = [1, 77], rt = [1, 78], nt = [5, 8, 14, 16, 18, 19, 40, 41, 42, 43, 44, 45, 53, 71, 72], ut = {
|
||
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(P, z, $, F, O, A, J) {
|
||
var C = A.length - 1;
|
||
switch (O) {
|
||
case 6:
|
||
this.$ = A[C].trim(), F.setAccTitle(this.$);
|
||
break;
|
||
case 7:
|
||
case 8:
|
||
this.$ = A[C].trim(), F.setAccDescription(this.$);
|
||
break;
|
||
case 9:
|
||
F.parseDirective("%%{", "open_directive");
|
||
break;
|
||
case 10:
|
||
F.parseDirective(A[C], "type_directive");
|
||
break;
|
||
case 11:
|
||
A[C] = A[C].trim().replace(/'/g, '"'), F.parseDirective(A[C], "arg_directive");
|
||
break;
|
||
case 12:
|
||
F.parseDirective("}%%", "close_directive", "pie");
|
||
break;
|
||
case 13:
|
||
this.$ = [];
|
||
break;
|
||
case 19:
|
||
F.addRequirement(A[C - 3], A[C - 4]);
|
||
break;
|
||
case 20:
|
||
F.setNewReqId(A[C - 2]);
|
||
break;
|
||
case 21:
|
||
F.setNewReqText(A[C - 2]);
|
||
break;
|
||
case 22:
|
||
F.setNewReqRisk(A[C - 2]);
|
||
break;
|
||
case 23:
|
||
F.setNewReqVerifyMethod(A[C - 2]);
|
||
break;
|
||
case 26:
|
||
this.$ = F.RequirementType.REQUIREMENT;
|
||
break;
|
||
case 27:
|
||
this.$ = F.RequirementType.FUNCTIONAL_REQUIREMENT;
|
||
break;
|
||
case 28:
|
||
this.$ = F.RequirementType.INTERFACE_REQUIREMENT;
|
||
break;
|
||
case 29:
|
||
this.$ = F.RequirementType.PERFORMANCE_REQUIREMENT;
|
||
break;
|
||
case 30:
|
||
this.$ = F.RequirementType.PHYSICAL_REQUIREMENT;
|
||
break;
|
||
case 31:
|
||
this.$ = F.RequirementType.DESIGN_CONSTRAINT;
|
||
break;
|
||
case 32:
|
||
this.$ = F.RiskLevel.LOW_RISK;
|
||
break;
|
||
case 33:
|
||
this.$ = F.RiskLevel.MED_RISK;
|
||
break;
|
||
case 34:
|
||
this.$ = F.RiskLevel.HIGH_RISK;
|
||
break;
|
||
case 35:
|
||
this.$ = F.VerifyType.VERIFY_ANALYSIS;
|
||
break;
|
||
case 36:
|
||
this.$ = F.VerifyType.VERIFY_DEMONSTRATION;
|
||
break;
|
||
case 37:
|
||
this.$ = F.VerifyType.VERIFY_INSPECTION;
|
||
break;
|
||
case 38:
|
||
this.$ = F.VerifyType.VERIFY_TEST;
|
||
break;
|
||
case 39:
|
||
F.addElement(A[C - 3]);
|
||
break;
|
||
case 40:
|
||
F.setNewElementType(A[C - 2]);
|
||
break;
|
||
case 41:
|
||
F.setNewElementDocRef(A[C - 2]);
|
||
break;
|
||
case 44:
|
||
F.addRelationship(A[C - 2], A[C], A[C - 4]);
|
||
break;
|
||
case 45:
|
||
F.addRelationship(A[C - 2], A[C - 4], A[C]);
|
||
break;
|
||
case 46:
|
||
this.$ = F.Relationships.CONTAINS;
|
||
break;
|
||
case 47:
|
||
this.$ = F.Relationships.COPIES;
|
||
break;
|
||
case 48:
|
||
this.$ = F.Relationships.DERIVES;
|
||
break;
|
||
case 49:
|
||
this.$ = F.Relationships.SATISFIES;
|
||
break;
|
||
case 50:
|
||
this.$ = F.Relationships.VERIFIES;
|
||
break;
|
||
case 51:
|
||
this.$ = F.Relationships.REFINES;
|
||
break;
|
||
case 52:
|
||
this.$ = F.Relationships.TRACES;
|
||
break;
|
||
}
|
||
},
|
||
table: [{ 3: 1, 4: 2, 6: e, 9: 4, 14: r, 16: n, 18: i, 19: s }, { 1: [3] }, { 3: 10, 4: 2, 5: [1, 9], 6: e, 9: 4, 14: r, 16: n, 18: i, 19: s }, { 5: [1, 11] }, { 10: 12, 20: [1, 13] }, { 15: [1, 14] }, { 17: [1, 15] }, t(a, [2, 8]), { 20: [2, 9] }, { 3: 16, 4: 2, 6: e, 9: 4, 14: r, 16: n, 18: i, 19: s }, { 1: [2, 2] }, { 4: 21, 5: o, 7: 17, 8: l, 9: 4, 14: r, 16: n, 18: i, 19: s, 23: 18, 24: 19, 25: 20, 26: 23, 32: 25, 40: u, 41: d, 42: f, 43: p, 44: g, 45: b, 53: k, 71: T, 72: L }, { 11: 34, 12: [1, 35], 22: E }, t([12, 22], [2, 10]), t(a, [2, 6]), t(a, [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: s, 23: 18, 24: 19, 25: 20, 26: 23, 32: 25, 40: u, 41: d, 42: f, 43: p, 44: g, 45: b, 53: k, 71: T, 72: L }, { 4: 21, 5: o, 7: 39, 8: l, 9: 4, 14: r, 16: n, 18: i, 19: s, 23: 18, 24: 19, 25: 20, 26: 23, 32: 25, 40: u, 41: d, 42: f, 43: p, 44: g, 45: b, 53: k, 71: T, 72: L }, { 4: 21, 5: o, 7: 40, 8: l, 9: 4, 14: r, 16: n, 18: i, 19: s, 23: 18, 24: 19, 25: 20, 26: 23, 32: 25, 40: u, 41: d, 42: f, 43: p, 44: g, 45: b, 53: k, 71: T, 72: L }, { 4: 21, 5: o, 7: 41, 8: l, 9: 4, 14: r, 16: n, 18: i, 19: s, 23: 18, 24: 19, 25: 20, 26: 23, 32: 25, 40: u, 41: d, 42: f, 43: p, 44: g, 45: b, 53: k, 71: T, 72: L }, { 4: 21, 5: o, 7: 42, 8: l, 9: 4, 14: r, 16: n, 18: i, 19: s, 23: 18, 24: 19, 25: 20, 26: 23, 32: 25, 40: u, 41: d, 42: f, 43: p, 44: g, 45: b, 53: k, 71: T, 72: L }, { 27: 43, 71: [1, 44], 72: [1, 45] }, { 54: 46, 71: [1, 47], 72: [1, 48] }, { 60: [1, 49], 62: [1, 50] }, t(I, [2, 26]), t(I, [2, 27]), t(I, [2, 28]), t(I, [2, 29]), t(I, [2, 30]), t(I, [2, 31]), t(V, [2, 55]), t(V, [2, 56]), t(a, [2, 4]), { 13: 51, 21: [1, 52] }, t(a, [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: H, 65: G, 66: Y, 67: W, 68: N, 69: D, 70: w }, { 61: 63, 64: H, 65: G, 66: Y, 67: W, 68: N, 69: D, 70: w }, { 11: 64, 22: E }, { 22: [2, 11] }, { 5: [1, 65] }, { 5: [1, 66] }, { 62: [1, 67] }, t(v, [2, 46]), t(v, [2, 47]), t(v, [2, 48]), t(v, [2, 49]), t(v, [2, 50]), t(v, [2, 51]), t(v, [2, 52]), { 63: [1, 68] }, t(a, [2, 5]), { 5: M, 29: 69, 30: m, 33: Q, 35: x, 37: ct, 39: Dt }, { 5: vt, 39: j, 55: 76, 56: ot, 58: rt }, { 32: 81, 71: T, 72: L }, { 32: 82, 71: T, 72: L }, t(nt, [2, 19]), { 31: [1, 83] }, { 31: [1, 84] }, { 31: [1, 85] }, { 31: [1, 86] }, { 5: M, 29: 87, 30: m, 33: Q, 35: x, 37: ct, 39: Dt }, t(nt, [2, 25]), t(nt, [2, 39]), { 31: [1, 88] }, { 31: [1, 89] }, { 5: vt, 39: j, 55: 90, 56: ot, 58: rt }, t(nt, [2, 43]), t(nt, [2, 44]), t(nt, [2, 45]), { 32: 91, 71: T, 72: L }, { 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(nt, [2, 24]), { 57: 104, 71: [1, 105], 72: [1, 106] }, { 59: 107, 71: [1, 108], 72: [1, 109] }, t(nt, [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: M, 29: 116, 30: m, 33: Q, 35: x, 37: ct, 39: Dt }, { 5: M, 29: 117, 30: m, 33: Q, 35: x, 37: ct, 39: Dt }, { 5: M, 29: 118, 30: m, 33: Q, 35: x, 37: ct, 39: Dt }, { 5: M, 29: 119, 30: m, 33: Q, 35: x, 37: ct, 39: Dt }, { 5: vt, 39: j, 55: 120, 56: ot, 58: rt }, { 5: vt, 39: j, 55: 121, 56: ot, 58: rt }, t(nt, [2, 20]), t(nt, [2, 21]), t(nt, [2, 22]), t(nt, [2, 23]), t(nt, [2, 40]), t(nt, [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(P, z) {
|
||
if (z.recoverable)
|
||
this.trace(P);
|
||
else {
|
||
var $ = new Error(P);
|
||
throw $.hash = z, $;
|
||
}
|
||
},
|
||
parse: function(P) {
|
||
var z = this, $ = [0], F = [], O = [null], A = [], J = this.table, C = "", ht = 0, U = 0, Yt = 2, et = 1, Mt = A.slice.call(arguments, 1), Tt = Object.create(this.lexer), gt = { yy: {} };
|
||
for (var Et in this.yy)
|
||
Object.prototype.hasOwnProperty.call(this.yy, Et) && (gt.yy[Et] = this.yy[Et]);
|
||
Tt.setInput(P, gt.yy), gt.yy.lexer = Tt, gt.yy.parser = this, typeof Tt.yylloc > "u" && (Tt.yylloc = {});
|
||
var wt = Tt.yylloc;
|
||
A.push(wt);
|
||
var pt = Tt.options && Tt.options.ranges;
|
||
typeof gt.yy.parseError == "function" ? this.parseError = gt.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
||
function st() {
|
||
var ft;
|
||
return ft = F.pop() || Tt.lex() || et, typeof ft != "number" && (ft instanceof Array && (F = ft, ft = F.pop()), ft = z.symbols_[ft] || ft), ft;
|
||
}
|
||
for (var le, $t, jt, Kt, Gt = {}, Ee, Ht, Vt, Ft; ; ) {
|
||
if ($t = $[$.length - 1], this.defaultActions[$t] ? jt = this.defaultActions[$t] : ((le === null || typeof le > "u") && (le = st()), jt = J[$t] && J[$t][le]), typeof jt > "u" || !jt.length || !jt[0]) {
|
||
var xt = "";
|
||
Ft = [];
|
||
for (Ee in J[$t])
|
||
this.terminals_[Ee] && Ee > Yt && Ft.push("'" + this.terminals_[Ee] + "'");
|
||
Tt.showPosition ? xt = "Parse error on line " + (ht + 1) + `:
|
||
` + Tt.showPosition() + `
|
||
Expecting ` + Ft.join(", ") + ", got '" + (this.terminals_[le] || le) + "'" : xt = "Parse error on line " + (ht + 1) + ": Unexpected " + (le == et ? "end of input" : "'" + (this.terminals_[le] || le) + "'"), this.parseError(xt, {
|
||
text: Tt.match,
|
||
token: this.terminals_[le] || le,
|
||
line: Tt.yylineno,
|
||
loc: wt,
|
||
expected: Ft
|
||
});
|
||
}
|
||
if (jt[0] instanceof Array && jt.length > 1)
|
||
throw new Error("Parse Error: multiple actions possible at state: " + $t + ", token: " + le);
|
||
switch (jt[0]) {
|
||
case 1:
|
||
$.push(le), O.push(Tt.yytext), A.push(Tt.yylloc), $.push(jt[1]), le = null, U = Tt.yyleng, C = Tt.yytext, ht = Tt.yylineno, wt = Tt.yylloc;
|
||
break;
|
||
case 2:
|
||
if (Ht = this.productions_[jt[1]][1], Gt.$ = O[O.length - Ht], Gt._$ = {
|
||
first_line: A[A.length - (Ht || 1)].first_line,
|
||
last_line: A[A.length - 1].last_line,
|
||
first_column: A[A.length - (Ht || 1)].first_column,
|
||
last_column: A[A.length - 1].last_column
|
||
}, pt && (Gt._$.range = [
|
||
A[A.length - (Ht || 1)].range[0],
|
||
A[A.length - 1].range[1]
|
||
]), Kt = this.performAction.apply(Gt, [
|
||
C,
|
||
U,
|
||
ht,
|
||
gt.yy,
|
||
jt[1],
|
||
O,
|
||
A
|
||
].concat(Mt)), typeof Kt < "u")
|
||
return Kt;
|
||
Ht && ($ = $.slice(0, -1 * Ht * 2), O = O.slice(0, -1 * Ht), A = A.slice(0, -1 * Ht)), $.push(this.productions_[jt[1]][0]), O.push(Gt.$), A.push(Gt._$), Vt = J[$[$.length - 2]][$[$.length - 1]], $.push(Vt);
|
||
break;
|
||
case 3:
|
||
return !0;
|
||
}
|
||
}
|
||
return !0;
|
||
}
|
||
}, _t = function() {
|
||
var Ot = {
|
||
EOF: 1,
|
||
parseError: function(z, $) {
|
||
if (this.yy.parser)
|
||
this.yy.parser.parseError(z, $);
|
||
else
|
||
throw new Error(z);
|
||
},
|
||
setInput: function(P, z) {
|
||
return this.yy = z || this.yy || {}, this._input = P, 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 P = this._input[0];
|
||
this.yytext += P, this.yyleng++, this.offset++, this.match += P, this.matched += P;
|
||
var z = P.match(/(?:\r\n?|\n).*/g);
|
||
return z ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), P;
|
||
},
|
||
unput: function(P) {
|
||
var z = P.length, $ = P.split(/(?:\r\n?|\n)/g);
|
||
this._input = P + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - z), this.offset -= z;
|
||
var F = 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 O = 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 === F.length ? this.yylloc.first_column : 0) + F[F.length - $.length].length - $[0].length : this.yylloc.first_column - z
|
||
}, this.options.ranges && (this.yylloc.range = [O[0], O[0] + this.yyleng - z]), 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(P) {
|
||
this.unput(this.match.slice(P));
|
||
},
|
||
pastInput: function() {
|
||
var P = this.matched.substr(0, this.matched.length - this.match.length);
|
||
return (P.length > 20 ? "..." : "") + P.substr(-20).replace(/\n/g, "");
|
||
},
|
||
upcomingInput: function() {
|
||
var P = this.match;
|
||
return P.length < 20 && (P += this._input.substr(0, 20 - P.length)), (P.substr(0, 20) + (P.length > 20 ? "..." : "")).replace(/\n/g, "");
|
||
},
|
||
showPosition: function() {
|
||
var P = this.pastInput(), z = new Array(P.length + 1).join("-");
|
||
return P + this.upcomingInput() + `
|
||
` + z + "^";
|
||
},
|
||
test_match: function(P, z) {
|
||
var $, F, O;
|
||
if (this.options.backtrack_lexer && (O = {
|
||
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 && (O.yylloc.range = this.yylloc.range.slice(0))), F = P[0].match(/(?:\r\n?|\n).*/g), F && (this.yylineno += F.length), this.yylloc = {
|
||
first_line: this.yylloc.last_line,
|
||
last_line: this.yylineno + 1,
|
||
first_column: this.yylloc.last_column,
|
||
last_column: F ? F[F.length - 1].length - F[F.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + P[0].length
|
||
}, this.yytext += P[0], this.match += P[0], this.matches = P, 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(P[0].length), this.matched += P[0], $ = this.performAction.call(this, this.yy, this, z, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), $)
|
||
return $;
|
||
if (this._backtrack) {
|
||
for (var A in O)
|
||
this[A] = O[A];
|
||
return !1;
|
||
}
|
||
return !1;
|
||
},
|
||
next: function() {
|
||
if (this.done)
|
||
return this.EOF;
|
||
this._input || (this.done = !0);
|
||
var P, z, $, F;
|
||
this._more || (this.yytext = "", this.match = "");
|
||
for (var O = this._currentRules(), A = 0; A < O.length; A++)
|
||
if ($ = this._input.match(this.rules[O[A]]), $ && (!z || $[0].length > z[0].length)) {
|
||
if (z = $, F = A, this.options.backtrack_lexer) {
|
||
if (P = this.test_match($, O[A]), P !== !1)
|
||
return P;
|
||
if (this._backtrack) {
|
||
z = !1;
|
||
continue;
|
||
} else
|
||
return !1;
|
||
} else if (!this.options.flex)
|
||
break;
|
||
}
|
||
return z ? (P = this.test_match(z, O[F]), P !== !1 ? P : !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 z = this.next();
|
||
return z || this.lex();
|
||
},
|
||
begin: function(z) {
|
||
this.conditionStack.push(z);
|
||
},
|
||
popState: function() {
|
||
var z = this.conditionStack.length - 1;
|
||
return z > 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(z) {
|
||
return z = this.conditionStack.length - 1 - Math.abs(z || 0), z >= 0 ? this.conditionStack[z] : "INITIAL";
|
||
},
|
||
pushState: function(z) {
|
||
this.begin(z);
|
||
},
|
||
stateStackSize: function() {
|
||
return this.conditionStack.length;
|
||
},
|
||
options: { "case-insensitive": !0 },
|
||
performAction: function(z, $, F, O) {
|
||
switch (F) {
|
||
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 $.yytext = $.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 Ot;
|
||
}();
|
||
ut.lexer = _t;
|
||
function K() {
|
||
this.yy = {};
|
||
}
|
||
return K.prototype = ut, ut.Parser = K, new K();
|
||
}();
|
||
X1.parser = X1;
|
||
const WP = X1, HP = (t) => t.match(/^\s*requirement(Diagram)?/) !== null;
|
||
let Sd = [], Ur = {}, yo = {}, qi = {}, mo = {};
|
||
const GP = {
|
||
REQUIREMENT: "Requirement",
|
||
FUNCTIONAL_REQUIREMENT: "Functional Requirement",
|
||
INTERFACE_REQUIREMENT: "Interface Requirement",
|
||
PERFORMANCE_REQUIREMENT: "Performance Requirement",
|
||
PHYSICAL_REQUIREMENT: "Physical Requirement",
|
||
DESIGN_CONSTRAINT: "Design Constraint"
|
||
}, qP = {
|
||
LOW_RISK: "Low",
|
||
MED_RISK: "Medium",
|
||
HIGH_RISK: "High"
|
||
}, jP = {
|
||
VERIFY_ANALYSIS: "Analysis",
|
||
VERIFY_DEMONSTRATION: "Demonstration",
|
||
VERIFY_INSPECTION: "Inspection",
|
||
VERIFY_TEST: "Test"
|
||
}, XP = {
|
||
CONTAINS: "contains",
|
||
COPIES: "copies",
|
||
DERIVES: "derives",
|
||
SATISFIES: "satisfies",
|
||
VERIFIES: "verifies",
|
||
REFINES: "refines",
|
||
TRACES: "traces"
|
||
}, $P = function(t, e, r) {
|
||
ze.parseDirective(this, t, e, r);
|
||
}, KP = (t, e) => (yo[t] === void 0 && (yo[t] = {
|
||
name: t,
|
||
type: e,
|
||
id: Ur.id,
|
||
text: Ur.text,
|
||
risk: Ur.risk,
|
||
verifyMethod: Ur.verifyMethod
|
||
}), Ur = {}, yo[t]), ZP = () => yo, QP = (t) => {
|
||
Ur !== void 0 && (Ur.id = t);
|
||
}, JP = (t) => {
|
||
Ur !== void 0 && (Ur.text = t);
|
||
}, tY = (t) => {
|
||
Ur !== void 0 && (Ur.risk = t);
|
||
}, eY = (t) => {
|
||
Ur !== void 0 && (Ur.verifyMethod = t);
|
||
}, rY = (t) => (mo[t] === void 0 && (mo[t] = {
|
||
name: t,
|
||
type: qi.type,
|
||
docRef: qi.docRef
|
||
}, B.info("Added new requirement: ", t)), qi = {}, mo[t]), nY = () => mo, iY = (t) => {
|
||
qi !== void 0 && (qi.type = t);
|
||
}, sY = (t) => {
|
||
qi !== void 0 && (qi.docRef = t);
|
||
}, aY = (t, e, r) => {
|
||
Sd.push({
|
||
type: t,
|
||
src: e,
|
||
dst: r
|
||
});
|
||
}, oY = () => Sd, lY = () => {
|
||
Sd = [], Ur = {}, yo = {}, qi = {}, mo = {}, Dn();
|
||
}, cY = {
|
||
RequirementType: GP,
|
||
RiskLevel: qP,
|
||
VerifyType: jP,
|
||
Relationships: XP,
|
||
parseDirective: $P,
|
||
getConfig: () => X().req,
|
||
addRequirement: KP,
|
||
getRequirements: ZP,
|
||
setNewReqId: QP,
|
||
setNewReqText: JP,
|
||
setNewReqRisk: tY,
|
||
setNewReqVerifyMethod: eY,
|
||
setAccTitle: sn,
|
||
getAccTitle: Mn,
|
||
setAccDescription: Nn,
|
||
getAccDescription: Bn,
|
||
addElement: rY,
|
||
getElements: nY,
|
||
setNewElementType: iY,
|
||
setNewElementDocRef: sY,
|
||
addRelationship: aY,
|
||
getRelationships: oY,
|
||
clear: lY
|
||
}, $1 = {
|
||
CONTAINS: "contains",
|
||
ARROW: "arrow"
|
||
}, uY = (t, e) => {
|
||
let r = t.append("defs").append("marker").attr("id", $1.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", $1.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);
|
||
}, g4 = {
|
||
ReqMarkers: $1,
|
||
insertLineEndings: uY
|
||
};
|
||
let je = {}, wp = 0;
|
||
const y4 = (t, e) => t.insert("rect", "#" + e).attr("class", "req reqBox").attr("x", 0).attr("y", 0).attr("width", je.rect_min_width + "px").attr("height", je.rect_min_height + "px"), m4 = (t, e, r) => {
|
||
let n = je.rect_min_width / 2, i = t.append("text").attr("class", "req reqLabel reqTitle").attr("id", e).attr("x", n).attr("y", je.rect_padding).attr("dominant-baseline", "hanging"), s = 0;
|
||
r.forEach((u) => {
|
||
s == 0 ? i.append("tspan").attr("text-anchor", "middle").attr("x", je.rect_min_width / 2).attr("dy", 0).text(u) : i.append("tspan").attr("text-anchor", "middle").attr("x", je.rect_min_width / 2).attr("dy", je.line_height * 0.75).text(u), s++;
|
||
});
|
||
let a = 1.5 * je.rect_padding, o = s * je.line_height * 0.75, l = a + o;
|
||
return t.append("line").attr("class", "req-title-line").attr("x1", "0").attr("x2", je.rect_min_width).attr("y1", l).attr("y2", l), {
|
||
titleNode: i,
|
||
y: l
|
||
};
|
||
}, b4 = (t, e, r, n) => {
|
||
let i = t.append("text").attr("class", "req reqLabel").attr("id", e).attr("x", je.rect_padding).attr("y", n).attr("dominant-baseline", "hanging"), s = 0;
|
||
const a = 30;
|
||
let o = [];
|
||
return r.forEach((l) => {
|
||
let u = l.length;
|
||
for (; u > a && s < 3; ) {
|
||
let d = l.substring(0, a);
|
||
l = l.substring(a, l.length), u = l.length, o[o.length] = d, s++;
|
||
}
|
||
if (s == 3) {
|
||
let d = o[o.length - 1];
|
||
o[o.length - 1] = d.substring(0, d.length - 4) + "...";
|
||
} else
|
||
o[o.length] = l;
|
||
s = 0;
|
||
}), o.forEach((l) => {
|
||
i.append("tspan").attr("x", je.rect_padding).attr("dy", je.line_height).text(l);
|
||
}), i;
|
||
}, hY = (t, e, r, n) => {
|
||
const i = e.node().getTotalLength(), s = e.node().getPointAtLength(i * 0.5), a = "rel" + wp;
|
||
wp++;
|
||
const l = t.append("text").attr("class", "req relationshipLabel").attr("id", a).attr("x", s.x).attr("y", s.y).attr("text-anchor", "middle").attr("dominant-baseline", "middle").text(n).node().getBBox();
|
||
t.insert("rect", "#" + a).attr("class", "req reqLabelBox").attr("x", s.x - l.width / 2).attr("y", s.y - l.height / 2).attr("width", l.width).attr("height", l.height).attr("fill", "white").attr("fill-opacity", "85%");
|
||
}, dY = function(t, e, r, n, i) {
|
||
const s = r.edge(Ca(e.src), Ca(e.dst)), a = Na().x(function(l) {
|
||
return l.x;
|
||
}).y(function(l) {
|
||
return l.y;
|
||
}), o = t.insert("path", "#" + n).attr("class", "er relationshipLine").attr("d", a(s.points)).attr("fill", "none");
|
||
e.type == i.db.Relationships.CONTAINS ? o.attr(
|
||
"marker-start",
|
||
"url(" + he.getUrl(je.arrowMarkerAbsolute) + "#" + e.type + "_line_ending)"
|
||
) : (o.attr("stroke-dasharray", "10,7"), o.attr(
|
||
"marker-end",
|
||
"url(" + he.getUrl(je.arrowMarkerAbsolute) + "#" + g4.ReqMarkers.ARROW + "_line_ending)"
|
||
)), hY(t, o, je, `<<${e.type}>>`);
|
||
}, fY = (t, e, r) => {
|
||
Object.keys(t).forEach((n) => {
|
||
let i = t[n];
|
||
n = Ca(n), B.info("Added new requirement: ", n);
|
||
const s = r.append("g").attr("id", n), a = "req-" + n, o = y4(s, a);
|
||
let l = m4(s, n + "_title", [
|
||
`<<${i.type}>>`,
|
||
`${i.name}`
|
||
]);
|
||
b4(
|
||
s,
|
||
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
|
||
});
|
||
});
|
||
}, pY = (t, e, r) => {
|
||
Object.keys(t).forEach((n) => {
|
||
let i = t[n];
|
||
const s = Ca(n), a = r.append("g").attr("id", s), o = "element-" + s, l = y4(a, o);
|
||
let u = m4(a, o + "_title", ["<<Element>>", `${n}`]);
|
||
b4(
|
||
a,
|
||
o + "_body",
|
||
[`Type: ${i.type || "Not Specified"}`, `Doc Ref: ${i.docRef || "None"}`],
|
||
u.y
|
||
);
|
||
const d = l.node().getBBox();
|
||
e.setNode(s, {
|
||
width: d.width,
|
||
height: d.height,
|
||
shape: "rect",
|
||
id: s
|
||
});
|
||
});
|
||
}, gY = (t, e) => (t.forEach(function(r) {
|
||
let n = Ca(r.src), i = Ca(r.dst);
|
||
e.setEdge(n, i, { relationship: r });
|
||
}), t), yY = function(t, e) {
|
||
e.nodes().forEach(function(r) {
|
||
r !== void 0 && e.node(r) !== void 0 && (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) + " )"
|
||
));
|
||
});
|
||
}, Ca = (t) => t.replace(/\s/g, "").replace(/\./g, "_"), mY = (t, e, r, n) => {
|
||
je = X().requirement, n.db.clear(), n.parser.parse(t);
|
||
const i = je.securityLevel;
|
||
let s;
|
||
i === "sandbox" && (s = At("#i" + e));
|
||
const o = At(i === "sandbox" ? s.nodes()[0].contentDocument.body : "body").select(`[id='${e}']`);
|
||
g4.insertLineEndings(o, je);
|
||
const l = new lr({
|
||
multigraph: !1,
|
||
compound: !1,
|
||
directed: !0
|
||
}).setGraph({
|
||
rankdir: je.layoutDirection,
|
||
marginx: 20,
|
||
marginy: 20,
|
||
nodesep: 100,
|
||
edgesep: 100,
|
||
ranksep: 100
|
||
}).setDefaultEdgeLabel(function() {
|
||
return {};
|
||
});
|
||
let u = n.db.getRequirements(), d = n.db.getElements(), f = n.db.getRelationships();
|
||
fY(u, l, o), pY(d, l, o), gY(f, l), Pa(l), yY(o, l), f.forEach(function(T) {
|
||
dY(o, T, l, e, n);
|
||
});
|
||
const p = je.rect_padding, g = o.node().getBBox(), b = g.width + p * 2, k = g.height + p * 2;
|
||
Ln(o, k, b, je.useMaxWidth), o.attr("viewBox", `${g.x - p} ${g.y - p} ${b} ${k}`);
|
||
}, bY = {
|
||
draw: mY
|
||
};
|
||
var K1 = function() {
|
||
var t = function(Ot, P, z, $) {
|
||
for (z = z || {}, $ = Ot.length; $--; z[Ot[$]] = P)
|
||
;
|
||
return z;
|
||
}, e = [1, 2], r = [1, 3], n = [1, 5], i = [1, 7], s = [2, 5], a = [1, 15], o = [1, 17], l = [1, 18], u = [1, 19], d = [1, 21], f = [1, 22], p = [1, 23], g = [1, 29], b = [1, 30], k = [1, 31], T = [1, 32], L = [1, 33], E = [1, 34], I = [1, 35], V = [1, 36], H = [1, 37], G = [1, 38], Y = [1, 39], W = [1, 40], N = [1, 43], D = [1, 44], w = [1, 45], v = [1, 46], M = [1, 47], m = [1, 48], Q = [1, 51], x = [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], ct = [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], Dt = [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], vt = [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], j = [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], ot = [67, 68, 69], rt = [1, 121], nt = [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], ut = {
|
||
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(P, z, $, F, O, A, J) {
|
||
var C = A.length - 1;
|
||
switch (O) {
|
||
case 4:
|
||
return F.apply(A[C]), A[C];
|
||
case 5:
|
||
this.$ = [];
|
||
break;
|
||
case 6:
|
||
A[C - 1].push(A[C]), this.$ = A[C - 1];
|
||
break;
|
||
case 7:
|
||
case 8:
|
||
this.$ = A[C];
|
||
break;
|
||
case 9:
|
||
this.$ = [];
|
||
break;
|
||
case 12:
|
||
A[C - 3].type = "addParticipant", A[C - 3].description = F.parseMessage(A[C - 1]), this.$ = A[C - 3];
|
||
break;
|
||
case 13:
|
||
A[C - 1].type = "addParticipant", this.$ = A[C - 1];
|
||
break;
|
||
case 14:
|
||
A[C - 3].type = "addActor", A[C - 3].description = F.parseMessage(A[C - 1]), this.$ = A[C - 3];
|
||
break;
|
||
case 15:
|
||
A[C - 1].type = "addActor", this.$ = A[C - 1];
|
||
break;
|
||
case 17:
|
||
this.$ = { type: "sequenceIndex", sequenceIndex: Number(A[C - 2]), sequenceIndexStep: Number(A[C - 1]), sequenceVisible: !0, signalType: F.LINETYPE.AUTONUMBER };
|
||
break;
|
||
case 18:
|
||
this.$ = { type: "sequenceIndex", sequenceIndex: Number(A[C - 1]), sequenceIndexStep: 1, sequenceVisible: !0, signalType: F.LINETYPE.AUTONUMBER };
|
||
break;
|
||
case 19:
|
||
this.$ = { type: "sequenceIndex", sequenceVisible: !1, signalType: F.LINETYPE.AUTONUMBER };
|
||
break;
|
||
case 20:
|
||
this.$ = { type: "sequenceIndex", sequenceVisible: !0, signalType: F.LINETYPE.AUTONUMBER };
|
||
break;
|
||
case 21:
|
||
this.$ = { type: "activeStart", signalType: F.LINETYPE.ACTIVE_START, actor: A[C - 1] };
|
||
break;
|
||
case 22:
|
||
this.$ = { type: "activeEnd", signalType: F.LINETYPE.ACTIVE_END, actor: A[C - 1] };
|
||
break;
|
||
case 28:
|
||
F.setDiagramTitle(A[C].substring(6)), this.$ = A[C].substring(6);
|
||
break;
|
||
case 29:
|
||
F.setDiagramTitle(A[C].substring(7)), this.$ = A[C].substring(7);
|
||
break;
|
||
case 30:
|
||
this.$ = A[C].trim(), F.setAccTitle(this.$);
|
||
break;
|
||
case 31:
|
||
case 32:
|
||
this.$ = A[C].trim(), F.setAccDescription(this.$);
|
||
break;
|
||
case 33:
|
||
A[C - 1].unshift({ type: "loopStart", loopText: F.parseMessage(A[C - 2]), signalType: F.LINETYPE.LOOP_START }), A[C - 1].push({ type: "loopEnd", loopText: A[C - 2], signalType: F.LINETYPE.LOOP_END }), this.$ = A[C - 1];
|
||
break;
|
||
case 34:
|
||
A[C - 1].unshift({ type: "rectStart", color: F.parseMessage(A[C - 2]), signalType: F.LINETYPE.RECT_START }), A[C - 1].push({ type: "rectEnd", color: F.parseMessage(A[C - 2]), signalType: F.LINETYPE.RECT_END }), this.$ = A[C - 1];
|
||
break;
|
||
case 35:
|
||
A[C - 1].unshift({ type: "optStart", optText: F.parseMessage(A[C - 2]), signalType: F.LINETYPE.OPT_START }), A[C - 1].push({ type: "optEnd", optText: F.parseMessage(A[C - 2]), signalType: F.LINETYPE.OPT_END }), this.$ = A[C - 1];
|
||
break;
|
||
case 36:
|
||
A[C - 1].unshift({ type: "altStart", altText: F.parseMessage(A[C - 2]), signalType: F.LINETYPE.ALT_START }), A[C - 1].push({ type: "altEnd", signalType: F.LINETYPE.ALT_END }), this.$ = A[C - 1];
|
||
break;
|
||
case 37:
|
||
A[C - 1].unshift({ type: "parStart", parText: F.parseMessage(A[C - 2]), signalType: F.LINETYPE.PAR_START }), A[C - 1].push({ type: "parEnd", signalType: F.LINETYPE.PAR_END }), this.$ = A[C - 1];
|
||
break;
|
||
case 38:
|
||
A[C - 1].unshift({ type: "criticalStart", criticalText: F.parseMessage(A[C - 2]), signalType: F.LINETYPE.CRITICAL_START }), A[C - 1].push({ type: "criticalEnd", signalType: F.LINETYPE.CRITICAL_END }), this.$ = A[C - 1];
|
||
break;
|
||
case 39:
|
||
A[C - 1].unshift({ type: "breakStart", breakText: F.parseMessage(A[C - 2]), signalType: F.LINETYPE.BREAK_START }), A[C - 1].push({ type: "breakEnd", optText: F.parseMessage(A[C - 2]), signalType: F.LINETYPE.BREAK_END }), this.$ = A[C - 1];
|
||
break;
|
||
case 42:
|
||
this.$ = A[C - 3].concat([{ type: "option", optionText: F.parseMessage(A[C - 1]), signalType: F.LINETYPE.CRITICAL_OPTION }, A[C]]);
|
||
break;
|
||
case 44:
|
||
this.$ = A[C - 3].concat([{ type: "and", parText: F.parseMessage(A[C - 1]), signalType: F.LINETYPE.PAR_AND }, A[C]]);
|
||
break;
|
||
case 46:
|
||
this.$ = A[C - 3].concat([{ type: "else", altText: F.parseMessage(A[C - 1]), signalType: F.LINETYPE.ALT_ELSE }, A[C]]);
|
||
break;
|
||
case 47:
|
||
this.$ = [A[C - 1], { type: "addNote", placement: A[C - 2], actor: A[C - 1].actor, text: A[C] }];
|
||
break;
|
||
case 48:
|
||
A[C - 2] = [].concat(A[C - 1], A[C - 1]).slice(0, 2), A[C - 2][0] = A[C - 2][0].actor, A[C - 2][1] = A[C - 2][1].actor, this.$ = [A[C - 1], { type: "addNote", placement: F.PLACEMENT.OVER, actor: A[C - 2].slice(0, 2), text: A[C] }];
|
||
break;
|
||
case 49:
|
||
this.$ = [A[C - 1], { type: "addLinks", actor: A[C - 1].actor, text: A[C] }];
|
||
break;
|
||
case 50:
|
||
this.$ = [A[C - 1], { type: "addALink", actor: A[C - 1].actor, text: A[C] }];
|
||
break;
|
||
case 51:
|
||
this.$ = [A[C - 1], { type: "addProperties", actor: A[C - 1].actor, text: A[C] }];
|
||
break;
|
||
case 52:
|
||
this.$ = [A[C - 1], { type: "addDetails", actor: A[C - 1].actor, text: A[C] }];
|
||
break;
|
||
case 55:
|
||
this.$ = [A[C - 2], A[C]];
|
||
break;
|
||
case 56:
|
||
this.$ = A[C];
|
||
break;
|
||
case 57:
|
||
this.$ = F.PLACEMENT.LEFTOF;
|
||
break;
|
||
case 58:
|
||
this.$ = F.PLACEMENT.RIGHTOF;
|
||
break;
|
||
case 59:
|
||
this.$ = [
|
||
A[C - 4],
|
||
A[C - 1],
|
||
{ type: "addMessage", from: A[C - 4].actor, to: A[C - 1].actor, signalType: A[C - 3], msg: A[C] },
|
||
{ type: "activeStart", signalType: F.LINETYPE.ACTIVE_START, actor: A[C - 1] }
|
||
];
|
||
break;
|
||
case 60:
|
||
this.$ = [
|
||
A[C - 4],
|
||
A[C - 1],
|
||
{ type: "addMessage", from: A[C - 4].actor, to: A[C - 1].actor, signalType: A[C - 3], msg: A[C] },
|
||
{ type: "activeEnd", signalType: F.LINETYPE.ACTIVE_END, actor: A[C - 4] }
|
||
];
|
||
break;
|
||
case 61:
|
||
this.$ = [A[C - 3], A[C - 1], { type: "addMessage", from: A[C - 3].actor, to: A[C - 1].actor, signalType: A[C - 2], msg: A[C] }];
|
||
break;
|
||
case 62:
|
||
this.$ = { type: "addParticipant", actor: A[C] };
|
||
break;
|
||
case 63:
|
||
this.$ = F.LINETYPE.SOLID_OPEN;
|
||
break;
|
||
case 64:
|
||
this.$ = F.LINETYPE.DOTTED_OPEN;
|
||
break;
|
||
case 65:
|
||
this.$ = F.LINETYPE.SOLID;
|
||
break;
|
||
case 66:
|
||
this.$ = F.LINETYPE.DOTTED;
|
||
break;
|
||
case 67:
|
||
this.$ = F.LINETYPE.SOLID_CROSS;
|
||
break;
|
||
case 68:
|
||
this.$ = F.LINETYPE.DOTTED_CROSS;
|
||
break;
|
||
case 69:
|
||
this.$ = F.LINETYPE.SOLID_POINT;
|
||
break;
|
||
case 70:
|
||
this.$ = F.LINETYPE.DOTTED_POINT;
|
||
break;
|
||
case 71:
|
||
this.$ = F.parseMessage(A[C].trim().substring(1));
|
||
break;
|
||
case 72:
|
||
F.parseDirective("%%{", "open_directive");
|
||
break;
|
||
case 73:
|
||
F.parseDirective(A[C], "type_directive");
|
||
break;
|
||
case 74:
|
||
A[C] = A[C].trim().replace(/'/g, '"'), F.parseDirective(A[C], "arg_directive");
|
||
break;
|
||
case 75:
|
||
F.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], s, { 8: 11 }), { 12: 12, 80: [1, 13] }, { 80: [2, 72] }, { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3] }, { 1: [2, 4], 4: a, 5: o, 6: 41, 9: 14, 10: 16, 11: 6, 16: l, 17: 42, 20: u, 21: 20, 22: d, 25: f, 26: p, 27: 24, 28: 25, 29: 26, 30: 27, 31: 28, 32: g, 33: b, 34: k, 36: T, 38: L, 39: E, 41: I, 42: V, 43: H, 45: G, 47: Y, 49: W, 53: N, 58: D, 59: w, 60: v, 61: M, 69: m, 79: i }, { 13: 49, 14: [1, 50], 82: Q }, t([14, 82], [2, 73]), t(x, [2, 6]), { 6: 41, 10: 52, 11: 6, 16: l, 17: 42, 20: u, 21: 20, 22: d, 25: f, 26: p, 27: 24, 28: 25, 29: 26, 30: 27, 31: 28, 32: g, 33: b, 34: k, 36: T, 38: L, 39: E, 41: I, 42: V, 43: H, 45: G, 47: Y, 49: W, 53: N, 58: D, 59: w, 60: v, 61: M, 69: m, 79: i }, t(x, [2, 8]), t(x, [2, 9]), { 17: 53, 69: m }, { 17: 54, 69: m }, { 5: [1, 55] }, { 5: [1, 58], 23: [1, 56], 24: [1, 57] }, { 17: 59, 69: m }, { 17: 60, 69: m }, { 5: [1, 61] }, { 5: [1, 62] }, { 5: [1, 63] }, { 5: [1, 64] }, { 5: [1, 65] }, t(x, [2, 28]), t(x, [2, 29]), { 35: [1, 66] }, { 37: [1, 67] }, t(x, [2, 32]), { 19: [1, 68] }, { 19: [1, 69] }, { 19: [1, 70] }, { 19: [1, 71] }, { 19: [1, 72] }, { 19: [1, 73] }, { 19: [1, 74] }, t(x, [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: m }, { 17: 89, 69: m }, { 17: 90, 69: m }, { 17: 91, 69: m }, 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(x, [2, 7]), { 5: [1, 96], 18: [1, 95] }, { 5: [1, 98], 18: [1, 97] }, t(x, [2, 16]), { 5: [1, 100], 23: [1, 99] }, { 5: [1, 101] }, t(x, [2, 20]), { 5: [1, 102] }, { 5: [1, 103] }, t(x, [2, 23]), t(x, [2, 24]), t(x, [2, 25]), t(x, [2, 26]), t(x, [2, 27]), t(x, [2, 30]), t(x, [2, 31]), t(ct, s, { 8: 104 }), t(ct, s, { 8: 105 }), t(ct, s, { 8: 106 }), t(Dt, s, { 44: 107, 8: 108 }), t(vt, s, { 46: 109, 8: 110 }), t(j, s, { 48: 111, 8: 112 }), t(ct, s, { 8: 113 }), { 17: 116, 67: [1, 114], 68: [1, 115], 69: m }, t(ot, [2, 63]), t(ot, [2, 64]), t(ot, [2, 65]), t(ot, [2, 66]), t(ot, [2, 67]), t(ot, [2, 68]), t(ot, [2, 69]), t(ot, [2, 70]), { 17: 117, 69: m }, { 17: 119, 57: 118, 69: m }, { 69: [2, 57] }, { 69: [2, 58] }, { 55: 120, 78: rt }, { 55: 122, 78: rt }, { 55: 123, 78: rt }, { 55: 124, 78: rt }, t(nt, [2, 10]), { 13: 125, 82: Q }, { 82: [2, 74] }, { 19: [1, 126] }, t(x, [2, 13]), { 19: [1, 127] }, t(x, [2, 15]), { 5: [1, 128] }, t(x, [2, 18]), t(x, [2, 19]), t(x, [2, 21]), t(x, [2, 22]), { 4: a, 5: o, 6: 41, 9: 14, 10: 16, 11: 6, 16: l, 17: 42, 20: u, 21: 20, 22: d, 25: f, 26: p, 27: 24, 28: 25, 29: 26, 30: 27, 31: 28, 32: g, 33: b, 34: k, 36: T, 38: L, 39: E, 40: [1, 129], 41: I, 42: V, 43: H, 45: G, 47: Y, 49: W, 53: N, 58: D, 59: w, 60: v, 61: M, 69: m, 79: i }, { 4: a, 5: o, 6: 41, 9: 14, 10: 16, 11: 6, 16: l, 17: 42, 20: u, 21: 20, 22: d, 25: f, 26: p, 27: 24, 28: 25, 29: 26, 30: 27, 31: 28, 32: g, 33: b, 34: k, 36: T, 38: L, 39: E, 40: [1, 130], 41: I, 42: V, 43: H, 45: G, 47: Y, 49: W, 53: N, 58: D, 59: w, 60: v, 61: M, 69: m, 79: i }, { 4: a, 5: o, 6: 41, 9: 14, 10: 16, 11: 6, 16: l, 17: 42, 20: u, 21: 20, 22: d, 25: f, 26: p, 27: 24, 28: 25, 29: 26, 30: 27, 31: 28, 32: g, 33: b, 34: k, 36: T, 38: L, 39: E, 40: [1, 131], 41: I, 42: V, 43: H, 45: G, 47: Y, 49: W, 53: N, 58: D, 59: w, 60: v, 61: M, 69: m, 79: i }, { 40: [1, 132] }, { 4: a, 5: o, 6: 41, 9: 14, 10: 16, 11: 6, 16: l, 17: 42, 20: u, 21: 20, 22: d, 25: f, 26: p, 27: 24, 28: 25, 29: 26, 30: 27, 31: 28, 32: g, 33: b, 34: k, 36: T, 38: L, 39: E, 40: [2, 45], 41: I, 42: V, 43: H, 45: G, 47: Y, 49: W, 52: [1, 133], 53: N, 58: D, 59: w, 60: v, 61: M, 69: m, 79: i }, { 40: [1, 134] }, { 4: a, 5: o, 6: 41, 9: 14, 10: 16, 11: 6, 16: l, 17: 42, 20: u, 21: 20, 22: d, 25: f, 26: p, 27: 24, 28: 25, 29: 26, 30: 27, 31: 28, 32: g, 33: b, 34: k, 36: T, 38: L, 39: E, 40: [2, 43], 41: I, 42: V, 43: H, 45: G, 47: Y, 49: W, 51: [1, 135], 53: N, 58: D, 59: w, 60: v, 61: M, 69: m, 79: i }, { 40: [1, 136] }, { 4: a, 5: o, 6: 41, 9: 14, 10: 16, 11: 6, 16: l, 17: 42, 20: u, 21: 20, 22: d, 25: f, 26: p, 27: 24, 28: 25, 29: 26, 30: 27, 31: 28, 32: g, 33: b, 34: k, 36: T, 38: L, 39: E, 40: [2, 41], 41: I, 42: V, 43: H, 45: G, 47: Y, 49: W, 50: [1, 137], 53: N, 58: D, 59: w, 60: v, 61: M, 69: m, 79: i }, { 4: a, 5: o, 6: 41, 9: 14, 10: 16, 11: 6, 16: l, 17: 42, 20: u, 21: 20, 22: d, 25: f, 26: p, 27: 24, 28: 25, 29: 26, 30: 27, 31: 28, 32: g, 33: b, 34: k, 36: T, 38: L, 39: E, 40: [1, 138], 41: I, 42: V, 43: H, 45: G, 47: Y, 49: W, 53: N, 58: D, 59: w, 60: v, 61: M, 69: m, 79: i }, { 17: 139, 69: m }, { 17: 140, 69: m }, { 55: 141, 78: rt }, { 55: 142, 78: rt }, { 55: 143, 78: rt }, { 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(x, [2, 17]), t(x, [2, 33]), t(x, [2, 34]), t(x, [2, 35]), t(x, [2, 36]), { 19: [1, 148] }, t(x, [2, 37]), { 19: [1, 149] }, t(x, [2, 38]), { 19: [1, 150] }, t(x, [2, 39]), { 55: 151, 78: rt }, { 55: 152, 78: rt }, { 5: [2, 61] }, { 5: [2, 47] }, { 5: [2, 48] }, { 17: 153, 69: m }, t(nt, [2, 11]), t(x, [2, 12]), t(x, [2, 14]), t(Dt, s, { 8: 108, 44: 154 }), t(vt, s, { 8: 110, 46: 155 }), t(j, s, { 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(P, z) {
|
||
if (z.recoverable)
|
||
this.trace(P);
|
||
else {
|
||
var $ = new Error(P);
|
||
throw $.hash = z, $;
|
||
}
|
||
},
|
||
parse: function(P) {
|
||
var z = this, $ = [0], F = [], O = [null], A = [], J = this.table, C = "", ht = 0, U = 0, Yt = 2, et = 1, Mt = A.slice.call(arguments, 1), Tt = Object.create(this.lexer), gt = { yy: {} };
|
||
for (var Et in this.yy)
|
||
Object.prototype.hasOwnProperty.call(this.yy, Et) && (gt.yy[Et] = this.yy[Et]);
|
||
Tt.setInput(P, gt.yy), gt.yy.lexer = Tt, gt.yy.parser = this, typeof Tt.yylloc > "u" && (Tt.yylloc = {});
|
||
var wt = Tt.yylloc;
|
||
A.push(wt);
|
||
var pt = Tt.options && Tt.options.ranges;
|
||
typeof gt.yy.parseError == "function" ? this.parseError = gt.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
||
function st() {
|
||
var ft;
|
||
return ft = F.pop() || Tt.lex() || et, typeof ft != "number" && (ft instanceof Array && (F = ft, ft = F.pop()), ft = z.symbols_[ft] || ft), ft;
|
||
}
|
||
for (var le, $t, jt, Kt, Gt = {}, Ee, Ht, Vt, Ft; ; ) {
|
||
if ($t = $[$.length - 1], this.defaultActions[$t] ? jt = this.defaultActions[$t] : ((le === null || typeof le > "u") && (le = st()), jt = J[$t] && J[$t][le]), typeof jt > "u" || !jt.length || !jt[0]) {
|
||
var xt = "";
|
||
Ft = [];
|
||
for (Ee in J[$t])
|
||
this.terminals_[Ee] && Ee > Yt && Ft.push("'" + this.terminals_[Ee] + "'");
|
||
Tt.showPosition ? xt = "Parse error on line " + (ht + 1) + `:
|
||
` + Tt.showPosition() + `
|
||
Expecting ` + Ft.join(", ") + ", got '" + (this.terminals_[le] || le) + "'" : xt = "Parse error on line " + (ht + 1) + ": Unexpected " + (le == et ? "end of input" : "'" + (this.terminals_[le] || le) + "'"), this.parseError(xt, {
|
||
text: Tt.match,
|
||
token: this.terminals_[le] || le,
|
||
line: Tt.yylineno,
|
||
loc: wt,
|
||
expected: Ft
|
||
});
|
||
}
|
||
if (jt[0] instanceof Array && jt.length > 1)
|
||
throw new Error("Parse Error: multiple actions possible at state: " + $t + ", token: " + le);
|
||
switch (jt[0]) {
|
||
case 1:
|
||
$.push(le), O.push(Tt.yytext), A.push(Tt.yylloc), $.push(jt[1]), le = null, U = Tt.yyleng, C = Tt.yytext, ht = Tt.yylineno, wt = Tt.yylloc;
|
||
break;
|
||
case 2:
|
||
if (Ht = this.productions_[jt[1]][1], Gt.$ = O[O.length - Ht], Gt._$ = {
|
||
first_line: A[A.length - (Ht || 1)].first_line,
|
||
last_line: A[A.length - 1].last_line,
|
||
first_column: A[A.length - (Ht || 1)].first_column,
|
||
last_column: A[A.length - 1].last_column
|
||
}, pt && (Gt._$.range = [
|
||
A[A.length - (Ht || 1)].range[0],
|
||
A[A.length - 1].range[1]
|
||
]), Kt = this.performAction.apply(Gt, [
|
||
C,
|
||
U,
|
||
ht,
|
||
gt.yy,
|
||
jt[1],
|
||
O,
|
||
A
|
||
].concat(Mt)), typeof Kt < "u")
|
||
return Kt;
|
||
Ht && ($ = $.slice(0, -1 * Ht * 2), O = O.slice(0, -1 * Ht), A = A.slice(0, -1 * Ht)), $.push(this.productions_[jt[1]][0]), O.push(Gt.$), A.push(Gt._$), Vt = J[$[$.length - 2]][$[$.length - 1]], $.push(Vt);
|
||
break;
|
||
case 3:
|
||
return !0;
|
||
}
|
||
}
|
||
return !0;
|
||
}
|
||
}, _t = function() {
|
||
var Ot = {
|
||
EOF: 1,
|
||
parseError: function(z, $) {
|
||
if (this.yy.parser)
|
||
this.yy.parser.parseError(z, $);
|
||
else
|
||
throw new Error(z);
|
||
},
|
||
setInput: function(P, z) {
|
||
return this.yy = z || this.yy || {}, this._input = P, 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 P = this._input[0];
|
||
this.yytext += P, this.yyleng++, this.offset++, this.match += P, this.matched += P;
|
||
var z = P.match(/(?:\r\n?|\n).*/g);
|
||
return z ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), P;
|
||
},
|
||
unput: function(P) {
|
||
var z = P.length, $ = P.split(/(?:\r\n?|\n)/g);
|
||
this._input = P + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - z), this.offset -= z;
|
||
var F = 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 O = 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 === F.length ? this.yylloc.first_column : 0) + F[F.length - $.length].length - $[0].length : this.yylloc.first_column - z
|
||
}, this.options.ranges && (this.yylloc.range = [O[0], O[0] + this.yyleng - z]), 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(P) {
|
||
this.unput(this.match.slice(P));
|
||
},
|
||
pastInput: function() {
|
||
var P = this.matched.substr(0, this.matched.length - this.match.length);
|
||
return (P.length > 20 ? "..." : "") + P.substr(-20).replace(/\n/g, "");
|
||
},
|
||
upcomingInput: function() {
|
||
var P = this.match;
|
||
return P.length < 20 && (P += this._input.substr(0, 20 - P.length)), (P.substr(0, 20) + (P.length > 20 ? "..." : "")).replace(/\n/g, "");
|
||
},
|
||
showPosition: function() {
|
||
var P = this.pastInput(), z = new Array(P.length + 1).join("-");
|
||
return P + this.upcomingInput() + `
|
||
` + z + "^";
|
||
},
|
||
test_match: function(P, z) {
|
||
var $, F, O;
|
||
if (this.options.backtrack_lexer && (O = {
|
||
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 && (O.yylloc.range = this.yylloc.range.slice(0))), F = P[0].match(/(?:\r\n?|\n).*/g), F && (this.yylineno += F.length), this.yylloc = {
|
||
first_line: this.yylloc.last_line,
|
||
last_line: this.yylineno + 1,
|
||
first_column: this.yylloc.last_column,
|
||
last_column: F ? F[F.length - 1].length - F[F.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + P[0].length
|
||
}, this.yytext += P[0], this.match += P[0], this.matches = P, 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(P[0].length), this.matched += P[0], $ = this.performAction.call(this, this.yy, this, z, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), $)
|
||
return $;
|
||
if (this._backtrack) {
|
||
for (var A in O)
|
||
this[A] = O[A];
|
||
return !1;
|
||
}
|
||
return !1;
|
||
},
|
||
next: function() {
|
||
if (this.done)
|
||
return this.EOF;
|
||
this._input || (this.done = !0);
|
||
var P, z, $, F;
|
||
this._more || (this.yytext = "", this.match = "");
|
||
for (var O = this._currentRules(), A = 0; A < O.length; A++)
|
||
if ($ = this._input.match(this.rules[O[A]]), $ && (!z || $[0].length > z[0].length)) {
|
||
if (z = $, F = A, this.options.backtrack_lexer) {
|
||
if (P = this.test_match($, O[A]), P !== !1)
|
||
return P;
|
||
if (this._backtrack) {
|
||
z = !1;
|
||
continue;
|
||
} else
|
||
return !1;
|
||
} else if (!this.options.flex)
|
||
break;
|
||
}
|
||
return z ? (P = this.test_match(z, O[F]), P !== !1 ? P : !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 z = this.next();
|
||
return z || this.lex();
|
||
},
|
||
begin: function(z) {
|
||
this.conditionStack.push(z);
|
||
},
|
||
popState: function() {
|
||
var z = this.conditionStack.length - 1;
|
||
return z > 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(z) {
|
||
return z = this.conditionStack.length - 1 - Math.abs(z || 0), z >= 0 ? this.conditionStack[z] : "INITIAL";
|
||
},
|
||
pushState: function(z) {
|
||
this.begin(z);
|
||
},
|
||
stateStackSize: function() {
|
||
return this.conditionStack.length;
|
||
},
|
||
options: { "case-insensitive": !0 },
|
||
performAction: function(z, $, F, O) {
|
||
switch (F) {
|
||
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 $.yytext = $.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 $.yytext = $.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 Ot;
|
||
}();
|
||
ut.lexer = _t;
|
||
function K() {
|
||
this.yy = {};
|
||
}
|
||
return K.prototype = ut, ut.Parser = K, new K();
|
||
}();
|
||
K1.parser = K1;
|
||
const _Y = K1, xY = (t) => t.match(/^\s*sequenceDiagram/) !== null;
|
||
let Qa, Ui = {}, pn = [], Wu = !1, Z1;
|
||
const vY = function(t, e, r) {
|
||
ze.parseDirective(this, t, e, r);
|
||
}, Q1 = function(t, e, r, n) {
|
||
const i = Ui[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 }), Ui[t] = {
|
||
name: e,
|
||
description: r.text,
|
||
wrap: r.wrap === void 0 && Sa() || !!r.wrap,
|
||
prevActor: Qa,
|
||
links: {},
|
||
properties: {},
|
||
actorCnt: null,
|
||
rectData: null,
|
||
type: n || "participant"
|
||
}, Qa && Ui[Qa] && (Ui[Qa].nextActor = t), Qa = t);
|
||
}, kY = (t) => {
|
||
let e, r = 0;
|
||
for (e = 0; e < pn.length; e++)
|
||
pn[e].type === Uo.ACTIVE_START && pn[e].from.actor === t && r++, pn[e].type === Uo.ACTIVE_END && pn[e].from.actor === t && r--;
|
||
return r;
|
||
}, wY = function(t, e, r, n) {
|
||
pn.push({
|
||
from: t,
|
||
to: e,
|
||
message: r.text,
|
||
wrap: r.wrap === void 0 && Sa() || !!r.wrap,
|
||
answer: n
|
||
});
|
||
}, $e = function(t, e, r = { text: void 0, wrap: void 0 }, n) {
|
||
if (n === Uo.ACTIVE_END && kY(t.actor) < 1) {
|
||
let s = new Error("Trying to inactivate an inactive participant (" + t.actor + ")");
|
||
throw s.hash = {
|
||
text: "->>-",
|
||
token: "->>-",
|
||
line: "1",
|
||
loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
|
||
expected: ["'ACTIVE_PARTICIPANT'"]
|
||
}, s;
|
||
}
|
||
return pn.push({
|
||
from: t,
|
||
to: e,
|
||
message: r.text,
|
||
wrap: r.wrap === void 0 && Sa() || !!r.wrap,
|
||
type: n
|
||
}), !0;
|
||
}, TY = function() {
|
||
return pn;
|
||
}, EY = function() {
|
||
return Ui;
|
||
}, il = function(t) {
|
||
return Ui[t];
|
||
}, CY = function() {
|
||
return Object.keys(Ui);
|
||
}, SY = function() {
|
||
Wu = !0;
|
||
}, AY = function() {
|
||
Wu = !1;
|
||
}, LY = () => Wu, DY = function(t) {
|
||
Z1 = t;
|
||
}, Sa = () => Z1 !== void 0 ? Z1 : X().sequence.wrap, MY = function() {
|
||
Ui = {}, pn = [], Wu = !1, Dn();
|
||
}, NY = 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 B.debug("parseMessage:", r), r;
|
||
}, Uo = {
|
||
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
|
||
}, BY = {
|
||
FILLED: 0,
|
||
OPEN: 1
|
||
}, IY = {
|
||
LEFTOF: 0,
|
||
RIGHTOF: 1,
|
||
OVER: 2
|
||
}, _4 = function(t, e, r) {
|
||
r.text, r.wrap === void 0 && Sa() || r.wrap;
|
||
const n = [].concat(t, t);
|
||
pn.push({
|
||
from: n[0],
|
||
to: n[1],
|
||
message: r.text,
|
||
wrap: r.wrap === void 0 && Sa() || !!r.wrap,
|
||
type: Uo.NOTE,
|
||
placement: e
|
||
});
|
||
}, x4 = function(t, e) {
|
||
const r = il(t);
|
||
try {
|
||
let n = wn(e.text, X());
|
||
n = n.replace(/&/g, "&"), n = n.replace(/=/g, "=");
|
||
const i = JSON.parse(n);
|
||
Ad(r, i);
|
||
} catch (n) {
|
||
B.error("error while parsing actor link text", n);
|
||
}
|
||
}, OY = function(t, e) {
|
||
const r = il(t);
|
||
try {
|
||
const a = {};
|
||
let o = wn(e.text, X());
|
||
var n = o.indexOf("@");
|
||
o = o.replace(/&/g, "&"), o = o.replace(/=/g, "=");
|
||
var i = o.slice(0, n - 1).trim(), s = o.slice(n + 1).trim();
|
||
a[i] = s, Ad(r, a);
|
||
} catch (a) {
|
||
B.error("error while parsing actor link text", a);
|
||
}
|
||
};
|
||
function Ad(t, e) {
|
||
if (t.links == null)
|
||
t.links = e;
|
||
else
|
||
for (let r in e)
|
||
t.links[r] = e[r];
|
||
}
|
||
const v4 = function(t, e) {
|
||
const r = il(t);
|
||
try {
|
||
let n = wn(e.text, X());
|
||
const i = JSON.parse(n);
|
||
k4(r, i);
|
||
} catch (n) {
|
||
B.error("error while parsing actor properties text", n);
|
||
}
|
||
};
|
||
function k4(t, e) {
|
||
if (t.properties == null)
|
||
t.properties = e;
|
||
else
|
||
for (let r in e)
|
||
t.properties[r] = e[r];
|
||
}
|
||
const w4 = function(t, e) {
|
||
const r = il(t), n = document.getElementById(e.text);
|
||
try {
|
||
const i = n.innerHTML, s = JSON.parse(i);
|
||
s.properties && k4(r, s.properties), s.links && Ad(r, s.links);
|
||
} catch (i) {
|
||
B.error("error while parsing actor details text", i);
|
||
}
|
||
}, RY = function(t, e) {
|
||
if (t !== void 0 && t.properties !== void 0)
|
||
return t.properties[e];
|
||
}, T4 = function(t) {
|
||
if (Array.isArray(t))
|
||
t.forEach(function(e) {
|
||
T4(e);
|
||
});
|
||
else
|
||
switch (t.type) {
|
||
case "sequenceIndex":
|
||
pn.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":
|
||
Q1(t.actor, t.actor, t.description, "participant");
|
||
break;
|
||
case "addActor":
|
||
Q1(t.actor, t.actor, t.description, "actor");
|
||
break;
|
||
case "activeStart":
|
||
$e(t.actor, void 0, void 0, t.signalType);
|
||
break;
|
||
case "activeEnd":
|
||
$e(t.actor, void 0, void 0, t.signalType);
|
||
break;
|
||
case "addNote":
|
||
_4(t.actor, t.placement, t.text);
|
||
break;
|
||
case "addLinks":
|
||
x4(t.actor, t.text);
|
||
break;
|
||
case "addALink":
|
||
OY(t.actor, t.text);
|
||
break;
|
||
case "addProperties":
|
||
v4(t.actor, t.text);
|
||
break;
|
||
case "addDetails":
|
||
w4(t.actor, t.text);
|
||
break;
|
||
case "addMessage":
|
||
$e(t.from, t.to, t.msg, t.signalType);
|
||
break;
|
||
case "loopStart":
|
||
$e(void 0, void 0, t.loopText, t.signalType);
|
||
break;
|
||
case "loopEnd":
|
||
$e(void 0, void 0, void 0, t.signalType);
|
||
break;
|
||
case "rectStart":
|
||
$e(void 0, void 0, t.color, t.signalType);
|
||
break;
|
||
case "rectEnd":
|
||
$e(void 0, void 0, void 0, t.signalType);
|
||
break;
|
||
case "optStart":
|
||
$e(void 0, void 0, t.optText, t.signalType);
|
||
break;
|
||
case "optEnd":
|
||
$e(void 0, void 0, void 0, t.signalType);
|
||
break;
|
||
case "altStart":
|
||
$e(void 0, void 0, t.altText, t.signalType);
|
||
break;
|
||
case "else":
|
||
$e(void 0, void 0, t.altText, t.signalType);
|
||
break;
|
||
case "altEnd":
|
||
$e(void 0, void 0, void 0, t.signalType);
|
||
break;
|
||
case "setAccTitle":
|
||
sn(t.text);
|
||
break;
|
||
case "parStart":
|
||
$e(void 0, void 0, t.parText, t.signalType);
|
||
break;
|
||
case "and":
|
||
$e(void 0, void 0, t.parText, t.signalType);
|
||
break;
|
||
case "parEnd":
|
||
$e(void 0, void 0, void 0, t.signalType);
|
||
break;
|
||
case "criticalStart":
|
||
$e(void 0, void 0, t.criticalText, t.signalType);
|
||
break;
|
||
case "option":
|
||
$e(void 0, void 0, t.optionText, t.signalType);
|
||
break;
|
||
case "criticalEnd":
|
||
$e(void 0, void 0, void 0, t.signalType);
|
||
break;
|
||
case "breakStart":
|
||
$e(void 0, void 0, t.breakText, t.signalType);
|
||
break;
|
||
case "breakEnd":
|
||
$e(void 0, void 0, void 0, t.signalType);
|
||
break;
|
||
}
|
||
}, Tp = {
|
||
addActor: Q1,
|
||
addMessage: wY,
|
||
addSignal: $e,
|
||
addLinks: x4,
|
||
addDetails: w4,
|
||
addProperties: v4,
|
||
autoWrap: Sa,
|
||
setWrap: DY,
|
||
enableSequenceNumbers: SY,
|
||
disableSequenceNumbers: AY,
|
||
showSequenceNumbers: LY,
|
||
getMessages: TY,
|
||
getActors: EY,
|
||
getActor: il,
|
||
getActorKeys: CY,
|
||
getActorProperty: RY,
|
||
getAccTitle: Mn,
|
||
getDiagramTitle: Ai,
|
||
setDiagramTitle: Si,
|
||
parseDirective: vY,
|
||
getConfig: () => X().sequence,
|
||
clear: MY,
|
||
parseMessage: NY,
|
||
LINETYPE: Uo,
|
||
ARROWTYPE: BY,
|
||
PLACEMENT: IY,
|
||
addNote: _4,
|
||
setAccTitle: sn,
|
||
apply: T4,
|
||
setAccDescription: Nn,
|
||
getAccDescription: Bn
|
||
};
|
||
let J1 = [];
|
||
const FY = (t) => {
|
||
J1.push(t);
|
||
}, E4 = () => {
|
||
J1.forEach((t) => {
|
||
t();
|
||
}), J1 = [];
|
||
}, Hu = 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), e.class !== void 0 && r.attr("class", e.class), r;
|
||
}, C4 = (t, e) => {
|
||
FY(() => {
|
||
const r = document.querySelectorAll(t);
|
||
r.length !== 0 && (r[0].addEventListener("mouseover", function() {
|
||
UY("actor" + e + "_popup");
|
||
}), r[0].addEventListener("mouseout", function() {
|
||
zY("actor" + e + "_popup");
|
||
}));
|
||
});
|
||
}, PY = 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 s = e.links, a = e.actorCnt, o = e.rectData;
|
||
var l = "none";
|
||
i && (l = "block !important");
|
||
const u = t.append("g");
|
||
u.attr("id", "actor" + a + "_popup"), u.attr("class", "actorPopupMenu"), u.attr("display", l), C4("#actor" + a + "_popup", a);
|
||
var d = "";
|
||
o.class !== void 0 && (d = " " + o.class);
|
||
let f = o.width > r ? o.width : r;
|
||
const p = u.append("rect");
|
||
if (p.attr("class", "actorPopupMenuPanel" + d), p.attr("x", o.x), p.attr("y", o.height), p.attr("fill", o.fill), p.attr("stroke", o.stroke), p.attr("width", f), p.attr("height", o.height), p.attr("rx", o.rx), p.attr("ry", o.ry), s != null) {
|
||
var g = 20;
|
||
for (let T in s) {
|
||
var b = u.append("a"), k = Ti(s[T]);
|
||
b.attr("xlink:href", k), b.attr("target", "_blank"), nV(n)(
|
||
T,
|
||
b,
|
||
o.x + 10,
|
||
o.height + g,
|
||
f,
|
||
20,
|
||
{ class: "actor" },
|
||
n
|
||
), g += 30;
|
||
}
|
||
}
|
||
return p.attr("height", g), { height: o.height + g, width: f };
|
||
}, S4 = function(t, e, r, n) {
|
||
const i = t.append("image");
|
||
i.attr("x", e), i.attr("y", r);
|
||
var s = Ti(n);
|
||
i.attr("xlink:href", s);
|
||
}, A4 = function(t, e, r, n) {
|
||
const i = t.append("use");
|
||
i.attr("x", e), i.attr("y", r);
|
||
var s = Ti(n);
|
||
i.attr("xlink:href", "#" + s);
|
||
}, YY = function(t) {
|
||
return "var pu = document.getElementById('" + t + "'); if (pu != null) { pu.style.display = 'block'; }";
|
||
}, VY = function(t) {
|
||
return "var pu = document.getElementById('" + t + "'); if (pu != null) { pu.style.display = 'none'; }";
|
||
}, UY = function(t) {
|
||
var e = document.getElementById(t);
|
||
e != null && (e.style.display = "block");
|
||
}, zY = function(t) {
|
||
var e = document.getElementById(t);
|
||
e != null && (e.style.display = "none");
|
||
}, Aa = function(t, e) {
|
||
let r = 0, n = 0;
|
||
const i = e.text.split(he.lineBreakRegex);
|
||
let s = [], a = 0, o = () => e.y;
|
||
if (e.valign !== void 0 && e.textMargin !== void 0 && 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 (e.anchor !== void 0 && e.textMargin !== void 0 && e.width !== void 0)
|
||
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, u] of i.entries()) {
|
||
e.textMargin !== void 0 && e.textMargin === 0 && e.fontSize !== void 0 && (a = l * e.fontSize);
|
||
const d = t.append("text");
|
||
if (d.attr("x", e.x), d.attr("y", o()), e.anchor !== void 0 && d.attr("text-anchor", e.anchor).attr("dominant-baseline", e.dominantBaseline).attr("alignment-baseline", e.alignmentBaseline), e.fontFamily !== void 0 && d.style("font-family", e.fontFamily), e.fontSize !== void 0 && d.style("font-size", e.fontSize), e.fontWeight !== void 0 && d.style("font-weight", e.fontWeight), e.fill !== void 0 && d.attr("fill", e.fill), e.class !== void 0 && d.attr("class", e.class), e.dy !== void 0 ? d.attr("dy", e.dy) : a !== 0 && d.attr("dy", a), e.tspan) {
|
||
const f = d.append("tspan");
|
||
f.attr("x", e.x), e.fill !== void 0 && f.attr("fill", e.fill), f.text(u);
|
||
} else
|
||
d.text(u);
|
||
e.valign !== void 0 && e.textMargin !== void 0 && e.textMargin > 0 && (n += (d._groups || d)[0][0].getBBox().height, r = n), s.push(d);
|
||
}
|
||
return s;
|
||
}, L4 = function(t, e) {
|
||
function r(i, s, a, o, l) {
|
||
return i + "," + s + " " + (i + a) + "," + s + " " + (i + a) + "," + (s + o - l) + " " + (i + a - l * 1.2) + "," + (s + o) + " " + i + "," + (s + 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, Aa(t, e), n;
|
||
};
|
||
let Vn = -1;
|
||
const D4 = (t, e) => {
|
||
!t.selectAll || t.selectAll(".actor-line").attr("class", "200").attr("y2", e - 55);
|
||
}, WY = function(t, e, r) {
|
||
const n = e.x + e.width / 2, i = t.append("g");
|
||
var s = i;
|
||
e.y === 0 && (Vn++, s.append("line").attr("id", "actor" + Vn).attr("x1", n).attr("y1", 5).attr("x2", n).attr("y2", 2e3).attr("class", "actor-line").attr("stroke-width", "0.5px").attr("stroke", "#999"), s = i.append("g"), e.actorCnt = Vn, e.links != null && (s.attr("id", "root-" + Vn), C4("#root-" + Vn, Vn)));
|
||
const a = Gu();
|
||
var o = "actor";
|
||
e.properties != null && e.properties.class ? o = e.properties.class : a.fill = "#eaeaea", a.x = e.x, a.y = e.y, a.width = e.width, a.height = e.height, a.class = o, a.rx = 3, a.ry = 3;
|
||
const l = Hu(s, a);
|
||
if (e.rectData = a, e.properties != null && e.properties.icon) {
|
||
const d = e.properties.icon.trim();
|
||
d.charAt(0) === "@" ? A4(s, a.x + a.width - 20, a.y + 10, d.substr(1)) : S4(s, a.x + a.width - 20, a.y + 10, d);
|
||
}
|
||
M4(r)(
|
||
e.description,
|
||
s,
|
||
a.x,
|
||
a.y,
|
||
a.width,
|
||
a.height,
|
||
{ class: "actor" },
|
||
r
|
||
);
|
||
let u = e.height;
|
||
if (l.node) {
|
||
const d = l.node().getBBox();
|
||
e.height = d.height, u = d.height;
|
||
}
|
||
return u;
|
||
}, HY = function(t, e, r) {
|
||
const n = e.x + e.width / 2;
|
||
e.y === 0 && (Vn++, t.append("line").attr("id", "actor" + Vn).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 s = Gu();
|
||
s.x = e.x, s.y = e.y, s.fill = "#eaeaea", s.width = e.width, s.height = e.height, s.class = "actor", s.rx = 3, s.ry = 3, i.append("line").attr("id", "actor-man-torso" + Vn).attr("x1", n).attr("y1", e.y + 25).attr("x2", n).attr("y2", e.y + 45), i.append("line").attr("id", "actor-man-arms" + Vn).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 a = i.append("circle");
|
||
a.attr("cx", e.x + e.width / 2), a.attr("cy", e.y + 10), a.attr("r", 15), a.attr("width", e.width), a.attr("height", e.height);
|
||
const o = i.node().getBBox();
|
||
return e.height = o.height, M4(r)(
|
||
e.description,
|
||
i,
|
||
s.x,
|
||
s.y + 35,
|
||
s.width,
|
||
s.height,
|
||
{ class: "actor" },
|
||
r
|
||
), e.height;
|
||
}, GY = function(t, e, r) {
|
||
switch (e.type) {
|
||
case "actor":
|
||
return HY(t, e, r);
|
||
case "participant":
|
||
return WY(t, e, r);
|
||
}
|
||
}, qY = function(t) {
|
||
return t.append("g");
|
||
}, jY = function(t, e, r, n, i) {
|
||
const s = Gu(), a = e.anchored;
|
||
s.x = e.startx, s.y = e.starty, s.class = "activation" + i % 3, s.width = e.stopx - e.startx, s.height = r - e.starty, Hu(a, s);
|
||
}, XY = function(t, e, r, n) {
|
||
const {
|
||
boxMargin: i,
|
||
boxTextMargin: s,
|
||
labelBoxHeight: a,
|
||
labelBoxWidth: o,
|
||
messageFontFamily: l,
|
||
messageFontSize: u,
|
||
messageFontWeight: d
|
||
} = n, f = t.append("g"), p = function(k, T, L, E) {
|
||
return f.append("line").attr("x1", k).attr("y1", T).attr("x2", L).attr("y2", E).attr("class", "loopLine");
|
||
};
|
||
p(e.startx, e.starty, e.stopx, e.starty), p(e.stopx, e.starty, e.stopx, e.stopy), p(e.startx, e.stopy, e.stopx, e.stopy), p(e.startx, e.starty, e.startx, e.stopy), e.sections !== void 0 && e.sections.forEach(function(k) {
|
||
p(e.startx, k.y, e.stopx, k.y).style(
|
||
"stroke-dasharray",
|
||
"3, 3"
|
||
);
|
||
});
|
||
let g = t0();
|
||
g.text = r, g.x = e.startx, g.y = e.starty, g.fontFamily = l, g.fontSize = u, g.fontWeight = d, g.anchor = "middle", g.valign = "middle", g.tspan = !1, g.width = o || 50, g.height = a || 20, g.textMargin = s, g.class = "labelText", L4(f, g), g = t0(), g.text = e.title, g.x = e.startx + o / 2 + (e.stopx - e.startx) / 2, g.y = e.starty + i + s, g.anchor = "middle", g.valign = "middle", g.textMargin = s, g.class = "loopText", g.fontFamily = l, g.fontSize = u, g.fontWeight = d, g.wrap = !0;
|
||
let b = Aa(f, g);
|
||
return e.sectionTitles !== void 0 && e.sectionTitles.forEach(function(k, T) {
|
||
if (k.message) {
|
||
g.text = k.message, g.x = e.startx + (e.stopx - e.startx) / 2, g.y = e.sections[T].y + i + s, g.class = "loopText", g.anchor = "middle", g.valign = "middle", g.tspan = !1, g.fontFamily = l, g.fontSize = u, g.fontWeight = d, g.wrap = e.wrap, b = Aa(f, g);
|
||
let L = Math.round(
|
||
b.map((E) => (E._groups || E)[0][0].getBBox().height).reduce((E, I) => E + I)
|
||
);
|
||
e.sections[T].height += L - (i + s);
|
||
}
|
||
}), e.height = Math.round(e.stopy - e.starty), f;
|
||
}, $Y = function(t, e) {
|
||
Hu(t, {
|
||
x: e.startx,
|
||
y: e.starty,
|
||
width: e.stopx - e.startx,
|
||
height: e.stopy - e.starty,
|
||
fill: e.fill,
|
||
class: "rect"
|
||
}).lower();
|
||
}, KY = 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"
|
||
);
|
||
}, ZY = 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"
|
||
);
|
||
}, QY = 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"
|
||
);
|
||
}, JY = 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");
|
||
}, tV = 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");
|
||
}, eV = 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);
|
||
}, rV = function(t) {
|
||
t.append("defs").append("marker").attr("id", "crosshead").attr("markerWidth", 15).attr("markerHeight", 8).attr("orient", "auto").attr("refX", 4).attr("refY", 5).append("path").attr("fill", "none").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1pt").attr("d", "M 1,2 L 6,7 M 6,2 L 1,7");
|
||
}, t0 = 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
|
||
};
|
||
}, Gu = function() {
|
||
return {
|
||
x: 0,
|
||
y: 0,
|
||
fill: "#EDF2AE",
|
||
stroke: "#666",
|
||
width: 100,
|
||
anchor: "start",
|
||
height: 100,
|
||
rx: 0,
|
||
ry: 0
|
||
};
|
||
}, M4 = function() {
|
||
function t(i, s, a, o, l, u, d) {
|
||
const f = s.append("text").attr("x", a + l / 2).attr("y", o + u / 2 + 5).style("text-anchor", "middle").text(i);
|
||
n(f, d);
|
||
}
|
||
function e(i, s, a, o, l, u, d, f) {
|
||
const { actorFontSize: p, actorFontFamily: g, actorFontWeight: b } = f;
|
||
let k = p && p.replace ? p.replace("px", "") : p;
|
||
const T = i.split(he.lineBreakRegex);
|
||
for (let L = 0; L < T.length; L++) {
|
||
const E = L * k - k * (T.length - 1) / 2, I = s.append("text").attr("x", a + l / 2).attr("y", o).style("text-anchor", "middle").style("font-size", p).style("font-weight", b).style("font-family", g);
|
||
I.append("tspan").attr("x", a + l / 2).attr("dy", E).text(T[L]), I.attr("y", o + u / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), n(I, d);
|
||
}
|
||
}
|
||
function r(i, s, a, o, l, u, d, f) {
|
||
const p = s.append("switch"), b = p.append("foreignObject").attr("x", a).attr("y", o).attr("width", l).attr("height", u).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
|
||
b.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(i), e(i, p, a, o, l, u, d, f), n(b, d);
|
||
}
|
||
function n(i, s) {
|
||
for (const a in s)
|
||
s.hasOwnProperty(a) && i.attr(a, s[a]);
|
||
}
|
||
return function(i) {
|
||
return i.textPlacement === "fo" ? r : i.textPlacement === "old" ? t : e;
|
||
};
|
||
}(), nV = function() {
|
||
function t(i, s, a, o, l, u, d) {
|
||
const f = s.append("text").attr("x", a).attr("y", o).style("text-anchor", "start").text(i);
|
||
n(f, d);
|
||
}
|
||
function e(i, s, a, o, l, u, d, f) {
|
||
const { actorFontSize: p, actorFontFamily: g, actorFontWeight: b } = f, k = i.split(he.lineBreakRegex);
|
||
for (let T = 0; T < k.length; T++) {
|
||
const L = T * p - p * (k.length - 1) / 2, E = s.append("text").attr("x", a).attr("y", o).style("text-anchor", "start").style("font-size", p).style("font-weight", b).style("font-family", g);
|
||
E.append("tspan").attr("x", a).attr("dy", L).text(k[T]), E.attr("y", o + u / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), n(E, d);
|
||
}
|
||
}
|
||
function r(i, s, a, o, l, u, d, f) {
|
||
const p = s.append("switch"), b = p.append("foreignObject").attr("x", a).attr("y", o).attr("width", l).attr("height", u).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
|
||
b.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(i), e(i, p, a, o, l, u, d, f), n(b, d);
|
||
}
|
||
function n(i, s) {
|
||
for (const a in s)
|
||
s.hasOwnProperty(a) && i.attr(a, s[a]);
|
||
}
|
||
return function(i) {
|
||
return i.textPlacement === "fo" ? r : i.textPlacement === "old" ? t : e;
|
||
};
|
||
}(), qe = {
|
||
drawRect: Hu,
|
||
drawText: Aa,
|
||
drawLabel: L4,
|
||
drawActor: GY,
|
||
drawPopup: PY,
|
||
drawImage: S4,
|
||
drawEmbeddedImage: A4,
|
||
anchorElement: qY,
|
||
drawActivation: jY,
|
||
drawLoop: XY,
|
||
drawBackgroundRect: $Y,
|
||
insertArrowHead: JY,
|
||
insertArrowFilledHead: tV,
|
||
insertSequenceNumber: eV,
|
||
insertArrowCrossHead: rV,
|
||
insertDatabaseIcon: KY,
|
||
insertComputerIcon: ZY,
|
||
insertClockIcon: QY,
|
||
getTextObj: t0,
|
||
getNoteRect: Gu,
|
||
popupMenu: YY,
|
||
popdownMenu: VY,
|
||
fixLifeLineHeights: D4,
|
||
sanitizeUrl: Ti
|
||
};
|
||
let lt = {};
|
||
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, B4(X());
|
||
},
|
||
updateVal: function(t, e, r, n) {
|
||
t[e] === void 0 ? t[e] = r : t[e] = n(r, t[e]);
|
||
},
|
||
updateBounds: function(t, e, r, n) {
|
||
const i = this;
|
||
let s = 0;
|
||
function a(o) {
|
||
return function(u) {
|
||
s++;
|
||
const d = i.sequenceItems.length - s + 1;
|
||
i.updateVal(u, "starty", e - d * lt.boxMargin, Math.min), i.updateVal(u, "stopy", n + d * lt.boxMargin, Math.max), i.updateVal(Bt.data, "startx", t - d * lt.boxMargin, Math.min), i.updateVal(Bt.data, "stopx", r + d * lt.boxMargin, Math.max), o !== "activation" && (i.updateVal(u, "startx", t - d * lt.boxMargin, Math.min), i.updateVal(u, "stopx", r + d * lt.boxMargin, Math.max), i.updateVal(Bt.data, "starty", e - d * lt.boxMargin, Math.min), i.updateVal(Bt.data, "stopy", n + d * lt.boxMargin, Math.max));
|
||
};
|
||
}
|
||
this.sequenceItems.forEach(a()), this.activations.forEach(a("activation"));
|
||
},
|
||
insert: function(t, e, r, n) {
|
||
const i = Math.min(t, r), s = Math.max(t, r), a = Math.min(e, n), o = Math.max(e, n);
|
||
this.updateVal(Bt.data, "startx", i, Math.min), this.updateVal(Bt.data, "starty", a, Math.min), this.updateVal(Bt.data, "stopx", s, Math.max), this.updateVal(Bt.data, "stopy", o, Math.max), this.updateBounds(i, a, s, o);
|
||
},
|
||
newActivation: function(t, e, r) {
|
||
const n = r[t.from.actor], i = qu(t.from.actor).length || 0, s = n.x + n.width / 2 + (i - 1) * lt.activationWidth / 2;
|
||
this.activations.push({
|
||
startx: s,
|
||
starty: this.verticalPos + 2,
|
||
stopx: s + lt.activationWidth,
|
||
stopy: void 0,
|
||
actor: t.from.actor,
|
||
anchored: qe.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 };
|
||
}
|
||
}, iV = function(t, e) {
|
||
Bt.bumpVerticalPos(lt.boxMargin), e.height = lt.boxMargin, e.starty = Bt.getVerticalPos();
|
||
const r = qe.getNoteRect();
|
||
r.x = e.startx, r.y = e.starty, r.width = e.width || lt.width, r.class = "note";
|
||
const n = t.append("g"), i = qe.drawRect(n, r), s = qe.getTextObj();
|
||
s.x = e.startx, s.y = e.starty, s.width = r.width, s.dy = "1em", s.text = e.message, s.class = "noteText", s.fontFamily = lt.noteFontFamily, s.fontSize = lt.noteFontSize, s.fontWeight = lt.noteFontWeight, s.anchor = lt.noteAlign, s.textMargin = lt.noteMargin, s.valign = "center";
|
||
const a = Aa(n, s), o = Math.round(
|
||
a.map((l) => (l._groups || l)[0][0].getBBox().height).reduce((l, u) => l + u)
|
||
);
|
||
i.attr("height", o + 2 * lt.noteMargin), e.height += o + 2 * lt.noteMargin, Bt.bumpVerticalPos(o + 2 * lt.noteMargin), e.stopy = e.starty + o + 2 * lt.noteMargin, e.stopx = e.startx + r.width, Bt.insert(e.startx, e.starty, e.stopx, e.stopy), Bt.models.addNote(e);
|
||
}, La = (t) => ({
|
||
fontFamily: t.messageFontFamily,
|
||
fontSize: t.messageFontSize,
|
||
fontWeight: t.messageFontWeight
|
||
}), Gs = (t) => ({
|
||
fontFamily: t.noteFontFamily,
|
||
fontSize: t.noteFontSize,
|
||
fontWeight: t.noteFontWeight
|
||
}), e0 = (t) => ({
|
||
fontFamily: t.actorFontFamily,
|
||
fontSize: t.actorFontSize,
|
||
fontWeight: t.actorFontWeight
|
||
});
|
||
function sV(t, e) {
|
||
Bt.bumpVerticalPos(10);
|
||
const { startx: r, stopx: n, message: i } = e, s = he.splitBreaks(i).length, a = ye.calculateTextDimensions(i, La(lt)), o = a.height / s;
|
||
e.height += o, Bt.bumpVerticalPos(o);
|
||
let l, u = a.height - 10;
|
||
const d = a.width;
|
||
if (r === n) {
|
||
l = Bt.getVerticalPos() + u, lt.rightAngles || (u += lt.boxMargin, l = Bt.getVerticalPos() + u), u += 30;
|
||
const f = Math.max(d / 2, lt.width / 2);
|
||
Bt.insert(
|
||
r - f,
|
||
Bt.getVerticalPos() - 10 + u,
|
||
n + f,
|
||
Bt.getVerticalPos() + 30 + u
|
||
);
|
||
} else
|
||
u += lt.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;
|
||
}
|
||
const aV = function(t, e, r, n) {
|
||
const { startx: i, stopx: s, starty: a, message: o, type: l, sequenceIndex: u, sequenceVisible: d } = e, f = ye.calculateTextDimensions(o, La(lt)), p = qe.getTextObj();
|
||
p.x = i, p.y = a + 10, p.width = s - i, p.class = "messageText", p.dy = "1em", p.text = o, p.fontFamily = lt.messageFontFamily, p.fontSize = lt.messageFontSize, p.fontWeight = lt.messageFontWeight, p.anchor = lt.messageAlign, p.valign = "center", p.textMargin = lt.wrapPadding, p.tspan = !1, Aa(t, p);
|
||
const g = f.width;
|
||
let b;
|
||
i === s ? lt.rightAngles ? b = t.append("path").attr(
|
||
"d",
|
||
`M ${i},${r} H ${i + Math.max(lt.width / 2, g / 2)} V ${r + 25} H ${i}`
|
||
) : b = t.append("path").attr(
|
||
"d",
|
||
"M " + i + "," + r + " C " + (i + 60) + "," + (r - 10) + " " + (i + 60) + "," + (r + 30) + " " + i + "," + (r + 20)
|
||
) : (b = t.append("line"), b.attr("x1", i), b.attr("y1", r), b.attr("x2", s), b.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 ? (b.style("stroke-dasharray", "3, 3"), b.attr("class", "messageLine1")) : b.attr("class", "messageLine0");
|
||
let k = "";
|
||
lt.arrowMarkerAbsolute && (k = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, k = k.replace(/\(/g, "\\("), k = k.replace(/\)/g, "\\)")), b.attr("stroke-width", 2), b.attr("stroke", "none"), b.style("fill", "none"), (l === n.db.LINETYPE.SOLID || l === n.db.LINETYPE.DOTTED) && b.attr("marker-end", "url(" + k + "#arrowhead)"), (l === n.db.LINETYPE.SOLID_POINT || l === n.db.LINETYPE.DOTTED_POINT) && b.attr("marker-end", "url(" + k + "#filled-head)"), (l === n.db.LINETYPE.SOLID_CROSS || l === n.db.LINETYPE.DOTTED_CROSS) && b.attr("marker-end", "url(" + k + "#crosshead)"), (d || lt.showSequenceNumbers) && (b.attr("marker-start", "url(" + k + "#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));
|
||
}, r0 = function(t, e, r, n, i, s) {
|
||
if (i.hideUnusedParticipants === !0) {
|
||
const u = /* @__PURE__ */ new Set();
|
||
s.forEach((d) => {
|
||
u.add(d.from), u.add(d.to);
|
||
}), r = r.filter((d) => u.has(d));
|
||
}
|
||
let a = 0, o = 0, l = 0;
|
||
for (const u of r) {
|
||
const d = e[u];
|
||
d.width = d.width || lt.width, d.height = Math.max(d.height || lt.height, lt.height), d.margin = d.margin || lt.actorMargin, d.x = a + o, d.y = n;
|
||
const f = qe.drawActor(t, d, lt);
|
||
l = Math.max(l, f), Bt.insert(d.x, n, d.x + d.width, d.height), a += d.width, o += d.margin, Bt.models.addActor(d);
|
||
}
|
||
Bt.bumpVerticalPos(l);
|
||
}, N4 = function(t, e, r, n) {
|
||
let i = 0, s = 0;
|
||
for (const a of r) {
|
||
const o = e[a], l = cV(o), u = qe.drawPopup(
|
||
t,
|
||
o,
|
||
l,
|
||
lt,
|
||
lt.forceMenus,
|
||
n
|
||
);
|
||
u.height > i && (i = u.height), u.width + o.x > s && (s = u.width + o.x);
|
||
}
|
||
return { maxHeight: i, maxWidth: s };
|
||
}, B4 = function(t) {
|
||
pr(lt, t), t.fontFamily && (lt.actorFontFamily = lt.noteFontFamily = lt.messageFontFamily = t.fontFamily), t.fontSize && (lt.actorFontSize = lt.noteFontSize = lt.messageFontSize = t.fontSize), t.fontWeight && (lt.actorFontWeight = lt.noteFontWeight = lt.messageFontWeight = t.fontWeight);
|
||
}, qu = function(t) {
|
||
return Bt.activations.filter(function(e) {
|
||
return e.actor === t;
|
||
});
|
||
}, Ep = function(t, e) {
|
||
const r = e[t], n = qu(t), i = n.reduce(function(a, o) {
|
||
return Math.min(a, o.startx);
|
||
}, r.x + r.width / 2), s = n.reduce(function(a, o) {
|
||
return Math.max(a, o.stopx);
|
||
}, r.x + r.width / 2);
|
||
return [i, s];
|
||
};
|
||
function Fn(t, e, r, n, i) {
|
||
Bt.bumpVerticalPos(r);
|
||
let s = n;
|
||
if (e.id && e.message && t[e.id]) {
|
||
const a = t[e.id].width, o = La(lt);
|
||
e.message = ye.wrapLabel(`[${e.message}]`, a - 2 * lt.wrapPadding, o), e.width = a, e.wrap = !0;
|
||
const l = ye.calculateTextDimensions(e.message, o), u = Math.max(l.height, lt.labelBoxHeight);
|
||
s = n + u, B.debug(`${u} - ${e.message}`);
|
||
}
|
||
i(e), Bt.bumpVerticalPos(s);
|
||
}
|
||
const oV = function(t, e, r, n) {
|
||
const { securityLevel: i, sequence: s } = X();
|
||
lt = s;
|
||
let a;
|
||
i === "sandbox" && (a = At("#i" + e));
|
||
const o = At(i === "sandbox" ? a.nodes()[0].contentDocument.body : "body"), l = i === "sandbox" ? a.nodes()[0].contentDocument : document;
|
||
Bt.init(), B.debug(n.db);
|
||
const u = i === "sandbox" ? o.select(`[id="${e}"]`) : At(`[id="${e}"]`), d = n.db.getActors(), f = n.db.getActorKeys(), p = n.db.getMessages(), g = n.db.getDiagramTitle(), b = lV(d, p, n);
|
||
lt.height = uV(d, b), qe.insertComputerIcon(u), qe.insertDatabaseIcon(u), qe.insertClockIcon(u), r0(u, d, f, 0, lt, p);
|
||
const k = fV(p, d, b, n);
|
||
qe.insertArrowHead(u), qe.insertArrowCrossHead(u), qe.insertArrowFilledHead(u), qe.insertSequenceNumber(u);
|
||
function T(v, M) {
|
||
const m = Bt.endActivation(v);
|
||
m.starty + 18 > M && (m.starty = M - 6, M += 12), qe.drawActivation(
|
||
u,
|
||
m,
|
||
M,
|
||
lt,
|
||
qu(v.from.actor).length
|
||
), Bt.insert(m.startx, M - 10, m.stopx, M);
|
||
}
|
||
let L = 1, E = 1;
|
||
const I = [];
|
||
p.forEach(function(v) {
|
||
let M, m, Q;
|
||
switch (v.type) {
|
||
case n.db.LINETYPE.NOTE:
|
||
m = v.noteModel, iV(u, m);
|
||
break;
|
||
case n.db.LINETYPE.ACTIVE_START:
|
||
Bt.newActivation(v, u, d);
|
||
break;
|
||
case n.db.LINETYPE.ACTIVE_END:
|
||
T(v, Bt.getVerticalPos());
|
||
break;
|
||
case n.db.LINETYPE.LOOP_START:
|
||
Fn(
|
||
k,
|
||
v,
|
||
lt.boxMargin,
|
||
lt.boxMargin + lt.boxTextMargin,
|
||
(x) => Bt.newLoop(x)
|
||
);
|
||
break;
|
||
case n.db.LINETYPE.LOOP_END:
|
||
M = Bt.endLoop(), qe.drawLoop(u, M, "loop", lt), Bt.bumpVerticalPos(M.stopy - Bt.getVerticalPos()), Bt.models.addLoop(M);
|
||
break;
|
||
case n.db.LINETYPE.RECT_START:
|
||
Fn(
|
||
k,
|
||
v,
|
||
lt.boxMargin,
|
||
lt.boxMargin,
|
||
(x) => Bt.newLoop(void 0, x.message)
|
||
);
|
||
break;
|
||
case n.db.LINETYPE.RECT_END:
|
||
M = Bt.endLoop(), qe.drawBackgroundRect(u, M), Bt.models.addLoop(M), Bt.bumpVerticalPos(M.stopy - Bt.getVerticalPos());
|
||
break;
|
||
case n.db.LINETYPE.OPT_START:
|
||
Fn(
|
||
k,
|
||
v,
|
||
lt.boxMargin,
|
||
lt.boxMargin + lt.boxTextMargin,
|
||
(x) => Bt.newLoop(x)
|
||
);
|
||
break;
|
||
case n.db.LINETYPE.OPT_END:
|
||
M = Bt.endLoop(), qe.drawLoop(u, M, "opt", lt), Bt.bumpVerticalPos(M.stopy - Bt.getVerticalPos()), Bt.models.addLoop(M);
|
||
break;
|
||
case n.db.LINETYPE.ALT_START:
|
||
Fn(
|
||
k,
|
||
v,
|
||
lt.boxMargin,
|
||
lt.boxMargin + lt.boxTextMargin,
|
||
(x) => Bt.newLoop(x)
|
||
);
|
||
break;
|
||
case n.db.LINETYPE.ALT_ELSE:
|
||
Fn(
|
||
k,
|
||
v,
|
||
lt.boxMargin + lt.boxTextMargin,
|
||
lt.boxMargin,
|
||
(x) => Bt.addSectionToLoop(x)
|
||
);
|
||
break;
|
||
case n.db.LINETYPE.ALT_END:
|
||
M = Bt.endLoop(), qe.drawLoop(u, M, "alt", lt), Bt.bumpVerticalPos(M.stopy - Bt.getVerticalPos()), Bt.models.addLoop(M);
|
||
break;
|
||
case n.db.LINETYPE.PAR_START:
|
||
Fn(
|
||
k,
|
||
v,
|
||
lt.boxMargin,
|
||
lt.boxMargin + lt.boxTextMargin,
|
||
(x) => Bt.newLoop(x)
|
||
);
|
||
break;
|
||
case n.db.LINETYPE.PAR_AND:
|
||
Fn(
|
||
k,
|
||
v,
|
||
lt.boxMargin + lt.boxTextMargin,
|
||
lt.boxMargin,
|
||
(x) => Bt.addSectionToLoop(x)
|
||
);
|
||
break;
|
||
case n.db.LINETYPE.PAR_END:
|
||
M = Bt.endLoop(), qe.drawLoop(u, M, "par", lt), Bt.bumpVerticalPos(M.stopy - Bt.getVerticalPos()), Bt.models.addLoop(M);
|
||
break;
|
||
case n.db.LINETYPE.AUTONUMBER:
|
||
L = v.message.start || L, E = v.message.step || E, v.message.visible ? n.db.enableSequenceNumbers() : n.db.disableSequenceNumbers();
|
||
break;
|
||
case n.db.LINETYPE.CRITICAL_START:
|
||
Fn(
|
||
k,
|
||
v,
|
||
lt.boxMargin,
|
||
lt.boxMargin + lt.boxTextMargin,
|
||
(x) => Bt.newLoop(x)
|
||
);
|
||
break;
|
||
case n.db.LINETYPE.CRITICAL_OPTION:
|
||
Fn(
|
||
k,
|
||
v,
|
||
lt.boxMargin + lt.boxTextMargin,
|
||
lt.boxMargin,
|
||
(x) => Bt.addSectionToLoop(x)
|
||
);
|
||
break;
|
||
case n.db.LINETYPE.CRITICAL_END:
|
||
M = Bt.endLoop(), qe.drawLoop(u, M, "critical", lt), Bt.bumpVerticalPos(M.stopy - Bt.getVerticalPos()), Bt.models.addLoop(M);
|
||
break;
|
||
case n.db.LINETYPE.BREAK_START:
|
||
Fn(
|
||
k,
|
||
v,
|
||
lt.boxMargin,
|
||
lt.boxMargin + lt.boxTextMargin,
|
||
(x) => Bt.newLoop(x)
|
||
);
|
||
break;
|
||
case n.db.LINETYPE.BREAK_END:
|
||
M = Bt.endLoop(), qe.drawLoop(u, M, "break", lt), Bt.bumpVerticalPos(M.stopy - Bt.getVerticalPos()), Bt.models.addLoop(M);
|
||
break;
|
||
default:
|
||
try {
|
||
Q = v.msgModel, Q.starty = Bt.getVerticalPos(), Q.sequenceIndex = L, Q.sequenceVisible = n.db.showSequenceNumbers();
|
||
const x = sV(u, Q);
|
||
I.push({ messageModel: Q, lineStartY: x }), Bt.models.addMessage(Q);
|
||
} catch (x) {
|
||
B.error("error while drawing message", x);
|
||
}
|
||
}
|
||
[
|
||
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(v.type) && (L = L + E);
|
||
}), I.forEach((v) => aV(u, v.messageModel, v.lineStartY, n)), lt.mirrorActors && (Bt.bumpVerticalPos(lt.boxMargin * 2), r0(u, d, f, Bt.getVerticalPos(), lt, p), Bt.bumpVerticalPos(lt.boxMargin), D4(u, Bt.getVerticalPos()));
|
||
const V = N4(u, d, f, l), { bounds: H } = Bt.getBounds();
|
||
B.debug("For line height fix Querying: #" + e + " .actor-line"), y0("#" + e + " .actor-line").attr("y2", H.stopy);
|
||
let Y = H.stopy - H.starty;
|
||
Y < V.maxHeight && (Y = V.maxHeight);
|
||
let W = Y + 2 * lt.diagramMarginY;
|
||
lt.mirrorActors && (W = W - lt.boxMargin + lt.bottomMarginAdj);
|
||
let N = H.stopx - H.startx;
|
||
N < V.maxWidth && (N = V.maxWidth);
|
||
const D = N + 2 * lt.diagramMarginX;
|
||
g && u.append("text").text(g).attr("x", (H.stopx - H.startx) / 2 - 2 * lt.diagramMarginX).attr("y", -25), Ln(u, W, D, lt.useMaxWidth);
|
||
const w = g ? 40 : 0;
|
||
u.attr(
|
||
"viewBox",
|
||
H.startx - lt.diagramMarginX + " -" + (lt.diagramMarginY + w) + " " + D + " " + (W + w)
|
||
), B.debug("models:", Bt.models);
|
||
};
|
||
function lV(t, e, r) {
|
||
const n = {};
|
||
return e.forEach(function(i) {
|
||
if (t[i.to] && t[i.from]) {
|
||
const s = t[i.to];
|
||
if (i.placement === r.db.PLACEMENT.LEFTOF && !s.prevActor || i.placement === r.db.PLACEMENT.RIGHTOF && !s.nextActor)
|
||
return;
|
||
const a = i.placement !== void 0, o = !a, l = a ? Gs(lt) : La(lt), u = i.wrap ? ye.wrapLabel(i.message, lt.width - 2 * lt.wrapPadding, l) : i.message, f = ye.calculateTextDimensions(u, l).width + 2 * lt.wrapPadding;
|
||
o && i.from === s.nextActor ? n[i.to] = Math.max(
|
||
n[i.to] || 0,
|
||
f
|
||
) : o && i.from === s.prevActor ? n[i.from] = Math.max(
|
||
n[i.from] || 0,
|
||
f
|
||
) : o && i.from === i.to ? (n[i.from] = Math.max(
|
||
n[i.from] || 0,
|
||
f / 2
|
||
), n[i.to] = Math.max(
|
||
n[i.to] || 0,
|
||
f / 2
|
||
)) : i.placement === r.db.PLACEMENT.RIGHTOF ? n[i.from] = Math.max(
|
||
n[i.from] || 0,
|
||
f
|
||
) : i.placement === r.db.PLACEMENT.LEFTOF ? n[s.prevActor] = Math.max(
|
||
n[s.prevActor] || 0,
|
||
f
|
||
) : i.placement === r.db.PLACEMENT.OVER && (s.prevActor && (n[s.prevActor] = Math.max(
|
||
n[s.prevActor] || 0,
|
||
f / 2
|
||
)), s.nextActor && (n[i.from] = Math.max(
|
||
n[i.from] || 0,
|
||
f / 2
|
||
)));
|
||
}
|
||
}), B.debug("maxMessageWidthPerActor:", n), n;
|
||
}
|
||
const cV = function(t) {
|
||
let e = 0;
|
||
const r = e0(lt);
|
||
for (const n in t.links) {
|
||
const s = ye.calculateTextDimensions(n, r).width + 2 * lt.wrapPadding + 2 * lt.boxMargin;
|
||
e < s && (e = s);
|
||
}
|
||
return e;
|
||
};
|
||
function uV(t, e) {
|
||
let r = 0;
|
||
Object.keys(t).forEach((n) => {
|
||
const i = t[n];
|
||
i.wrap && (i.description = ye.wrapLabel(
|
||
i.description,
|
||
lt.width - 2 * lt.wrapPadding,
|
||
e0(lt)
|
||
));
|
||
const s = ye.calculateTextDimensions(i.description, e0(lt));
|
||
i.width = i.wrap ? lt.width : Math.max(lt.width, s.width + 2 * lt.wrapPadding), i.height = i.wrap ? Math.max(s.height, lt.height) : lt.height, r = Math.max(r, i.height);
|
||
});
|
||
for (const n in e) {
|
||
const i = t[n];
|
||
if (!i)
|
||
continue;
|
||
const s = t[i.nextActor];
|
||
if (!s)
|
||
continue;
|
||
const o = e[n] + lt.actorMargin - i.width / 2 - s.width / 2;
|
||
i.margin = Math.max(o, lt.actorMargin);
|
||
}
|
||
return Math.max(r, lt.height);
|
||
}
|
||
const hV = function(t, e, r) {
|
||
const n = e[t.from].x, i = e[t.to].x, s = t.wrap && t.message;
|
||
let a = ye.calculateTextDimensions(
|
||
s ? ye.wrapLabel(t.message, lt.width, Gs(lt)) : t.message,
|
||
Gs(lt)
|
||
);
|
||
const o = {
|
||
width: s ? lt.width : Math.max(lt.width, a.width + 2 * lt.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 = s ? Math.max(lt.width, a.width) : Math.max(
|
||
e[t.from].width / 2 + e[t.to].width / 2,
|
||
a.width + 2 * lt.noteMargin
|
||
), o.startx = n + (e[t.from].width + lt.actorMargin) / 2) : t.placement === r.db.PLACEMENT.LEFTOF ? (o.width = Math.max(s ? lt.width : e[t.from].width / 2 + e[t.to].width / 2, a.width + 2 * lt.noteMargin), o.startx = n - o.width + (e[t.from].width - lt.actorMargin) / 2) : t.to === t.from ? (a = ye.calculateTextDimensions(
|
||
s ? ye.wrapLabel(t.message, Math.max(lt.width, e[t.from].width), Gs(lt)) : t.message,
|
||
Gs(lt)
|
||
), o.width = s ? Math.max(lt.width, e[t.from].width) : Math.max(e[t.from].width, lt.width, a.width + 2 * lt.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)) + lt.actorMargin, o.startx = n < i ? n + e[t.from].width / 2 - lt.actorMargin / 2 : i + e[t.to].width / 2 - lt.actorMargin / 2), s && (o.message = ye.wrapLabel(
|
||
t.message,
|
||
o.width - 2 * lt.wrapPadding,
|
||
Gs(lt)
|
||
)), B.debug(
|
||
`NM:[${o.startx},${o.stopx},${o.starty},${o.stopy}:${o.width},${o.height}=${t.message}]`
|
||
), o;
|
||
}, dV = 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 = Ep(t.from, e), s = Ep(t.to, e), a = i[0] <= s[0] ? 1 : 0, o = i[0] < s[0] ? 0 : 1, l = [...i, ...s], u = Math.abs(s[o] - i[a]);
|
||
t.wrap && t.message && (t.message = ye.wrapLabel(
|
||
t.message,
|
||
Math.max(u + 2 * lt.wrapPadding, lt.width),
|
||
La(lt)
|
||
));
|
||
const d = ye.calculateTextDimensions(t.message, La(lt));
|
||
return {
|
||
width: Math.max(
|
||
t.wrap ? 0 : d.width + 2 * lt.wrapPadding,
|
||
u + 2 * lt.wrapPadding,
|
||
lt.width
|
||
),
|
||
height: 0,
|
||
startx: i[a],
|
||
stopx: s[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)
|
||
};
|
||
}, fV = function(t, e, r, n) {
|
||
const i = {}, s = [];
|
||
let a, o, l;
|
||
return t.forEach(function(u) {
|
||
switch (u.id = ye.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:
|
||
s.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 && (a = s.pop(), i[a.id] = a, i[u.id] = a, s.push(a));
|
||
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:
|
||
a = s.pop(), i[a.id] = a;
|
||
break;
|
||
case n.db.LINETYPE.ACTIVE_START:
|
||
{
|
||
const f = e[u.from ? u.from.actor : u.to.actor], p = qu(u.from ? u.from.actor : u.to.actor).length, g = f.x + f.width / 2 + (p - 1) * lt.activationWidth / 2, b = {
|
||
startx: g,
|
||
stopx: g + lt.activationWidth,
|
||
actor: u.from.actor,
|
||
enabled: !0
|
||
};
|
||
Bt.activations.push(b);
|
||
}
|
||
break;
|
||
case n.db.LINETYPE.ACTIVE_END:
|
||
{
|
||
const f = Bt.activations.map((p) => p.actor).lastIndexOf(u.from.actor);
|
||
delete Bt.activations.splice(f, 1)[0];
|
||
}
|
||
break;
|
||
}
|
||
u.placement !== void 0 ? (o = hV(u, e, n), u.noteModel = o, s.forEach((f) => {
|
||
a = f, a.from = Math.min(a.from, o.startx), a.to = Math.max(a.to, o.startx + o.width), a.width = Math.max(a.width, Math.abs(a.from - a.to)) - lt.labelBoxWidth;
|
||
})) : (l = dV(u, e, n), u.msgModel = l, l.startx && l.stopx && s.length > 0 && s.forEach((f) => {
|
||
if (a = f, l.startx === l.stopx) {
|
||
const p = e[u.from], g = e[u.to];
|
||
a.from = Math.min(
|
||
p.x - l.width / 2,
|
||
p.x - p.width / 2,
|
||
a.from
|
||
), a.to = Math.max(g.x + l.width / 2, g.x + p.width / 2, a.to), a.width = Math.max(a.width, Math.abs(a.to - a.from)) - lt.labelBoxWidth;
|
||
} else
|
||
a.from = Math.min(l.startx, a.from), a.to = Math.max(l.stopx, a.to), a.width = Math.max(a.width, l.width) - lt.labelBoxWidth;
|
||
}));
|
||
}), Bt.activations = [], B.debug("Loop type widths:", i), i;
|
||
}, Cp = {
|
||
bounds: Bt,
|
||
drawActors: r0,
|
||
drawActorsPopup: N4,
|
||
setConf: B4,
|
||
draw: oV
|
||
};
|
||
var n0 = function() {
|
||
var t = function(j, ot, rt, nt) {
|
||
for (rt = rt || {}, nt = j.length; nt--; rt[j[nt]] = ot)
|
||
;
|
||
return rt;
|
||
}, e = [1, 2], r = [1, 3], n = [1, 5], i = [1, 7], s = [2, 5], a = [1, 15], o = [1, 17], l = [1, 21], u = [1, 22], d = [1, 23], f = [1, 24], p = [1, 37], g = [1, 25], b = [1, 26], k = [1, 27], T = [1, 28], L = [1, 29], E = [1, 32], I = [1, 33], V = [1, 34], H = [1, 35], G = [1, 36], Y = [1, 39], W = [1, 40], N = [1, 41], D = [1, 42], w = [1, 38], v = [1, 45], M = [1, 4, 5, 16, 17, 19, 21, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 42, 50, 51, 52, 53, 56, 60], m = [1, 4, 5, 14, 15, 16, 17, 19, 21, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 42, 50, 51, 52, 53, 56, 60], Q = [1, 4, 5, 7, 16, 17, 19, 21, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 42, 50, 51, 52, 53, 56, 60], x = [4, 5, 16, 17, 19, 21, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 42, 50, 51, 52, 53, 56, 60], ct = {
|
||
trace: function() {
|
||
},
|
||
yy: {},
|
||
symbols_: { error: 2, start: 3, SPACE: 4, NL: 5, directive: 6, SD: 7, document: 8, line: 9, statement: 10, classDefStatement: 11, cssClassStatement: 12, idStatement: 13, DESCR: 14, "-->": 15, HIDE_EMPTY: 16, scale: 17, WIDTH: 18, COMPOSIT_STATE: 19, STRUCT_START: 20, STRUCT_STOP: 21, STATE_DESCR: 22, AS: 23, ID: 24, FORK: 25, JOIN: 26, CHOICE: 27, CONCURRENT: 28, note: 29, notePosition: 30, NOTE_TEXT: 31, direction: 32, acc_title: 33, acc_title_value: 34, acc_descr: 35, acc_descr_value: 36, acc_descr_multiline_value: 37, classDef: 38, CLASSDEF_ID: 39, CLASSDEF_STYLEOPTS: 40, DEFAULT: 41, class: 42, CLASSENTITY_IDS: 43, STYLECLASS: 44, openDirective: 45, typeDirective: 46, closeDirective: 47, ":": 48, argDirective: 49, direction_tb: 50, direction_bt: 51, direction_rl: 52, direction_lr: 53, eol: 54, ";": 55, EDGE_STATE: 56, STYLE_SEPARATOR: 57, left_of: 58, right_of: 59, open_directive: 60, type_directive: 61, arg_directive: 62, close_directive: 63, $accept: 0, $end: 1 },
|
||
terminals_: { 2: "error", 4: "SPACE", 5: "NL", 7: "SD", 14: "DESCR", 15: "-->", 16: "HIDE_EMPTY", 17: "scale", 18: "WIDTH", 19: "COMPOSIT_STATE", 20: "STRUCT_START", 21: "STRUCT_STOP", 22: "STATE_DESCR", 23: "AS", 24: "ID", 25: "FORK", 26: "JOIN", 27: "CHOICE", 28: "CONCURRENT", 29: "note", 31: "NOTE_TEXT", 33: "acc_title", 34: "acc_title_value", 35: "acc_descr", 36: "acc_descr_value", 37: "acc_descr_multiline_value", 38: "classDef", 39: "CLASSDEF_ID", 40: "CLASSDEF_STYLEOPTS", 41: "DEFAULT", 42: "class", 43: "CLASSENTITY_IDS", 44: "STYLECLASS", 48: ":", 50: "direction_tb", 51: "direction_bt", 52: "direction_rl", 53: "direction_lr", 55: ";", 56: "EDGE_STATE", 57: "STYLE_SEPARATOR", 58: "left_of", 59: "right_of", 60: "open_directive", 61: "type_directive", 62: "arg_directive", 63: "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, 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], [11, 3], [11, 3], [12, 3], [6, 3], [6, 5], [32, 1], [32, 1], [32, 1], [32, 1], [54, 1], [54, 1], [13, 1], [13, 1], [13, 3], [13, 3], [30, 1], [30, 1], [45, 1], [46, 1], [49, 1], [47, 1]],
|
||
performAction: function(ot, rt, nt, ut, _t, K, Ot) {
|
||
var P = K.length - 1;
|
||
switch (_t) {
|
||
case 4:
|
||
return ut.setRootDoc(K[P]), K[P];
|
||
case 5:
|
||
this.$ = [];
|
||
break;
|
||
case 6:
|
||
K[P] != "nl" && (K[P - 1].push(K[P]), this.$ = K[P - 1]);
|
||
break;
|
||
case 7:
|
||
case 8:
|
||
this.$ = K[P];
|
||
break;
|
||
case 9:
|
||
this.$ = "nl";
|
||
break;
|
||
case 12:
|
||
this.$ = K[P];
|
||
break;
|
||
case 13:
|
||
const O = K[P - 1];
|
||
O.description = ut.trimColon(K[P]), this.$ = O;
|
||
break;
|
||
case 14:
|
||
this.$ = { stmt: "relation", state1: K[P - 2], state2: K[P] };
|
||
break;
|
||
case 15:
|
||
const A = ut.trimColon(K[P]);
|
||
this.$ = { stmt: "relation", state1: K[P - 3], state2: K[P - 1], description: A };
|
||
break;
|
||
case 19:
|
||
this.$ = { stmt: "state", id: K[P - 3], type: "default", description: "", doc: K[P - 1] };
|
||
break;
|
||
case 20:
|
||
var z = K[P], $ = K[P - 2].trim();
|
||
if (K[P].match(":")) {
|
||
var F = K[P].split(":");
|
||
z = F[0], $ = [$, F[1]];
|
||
}
|
||
this.$ = { stmt: "state", id: z, type: "default", description: $ };
|
||
break;
|
||
case 21:
|
||
this.$ = { stmt: "state", id: K[P - 3], type: "default", description: K[P - 5], doc: K[P - 1] };
|
||
break;
|
||
case 22:
|
||
this.$ = { stmt: "state", id: K[P], type: "fork" };
|
||
break;
|
||
case 23:
|
||
this.$ = { stmt: "state", id: K[P], type: "join" };
|
||
break;
|
||
case 24:
|
||
this.$ = { stmt: "state", id: K[P], type: "choice" };
|
||
break;
|
||
case 25:
|
||
this.$ = { stmt: "state", id: ut.getDividerId(), type: "divider" };
|
||
break;
|
||
case 26:
|
||
this.$ = { stmt: "state", id: K[P - 1].trim(), note: { position: K[P - 2].trim(), text: K[P].trim() } };
|
||
break;
|
||
case 30:
|
||
this.$ = K[P].trim(), ut.setAccTitle(this.$);
|
||
break;
|
||
case 31:
|
||
case 32:
|
||
this.$ = K[P].trim(), ut.setAccDescription(this.$);
|
||
break;
|
||
case 33:
|
||
case 34:
|
||
this.$ = { stmt: "classDef", id: K[P - 1].trim(), classes: K[P].trim() };
|
||
break;
|
||
case 35:
|
||
this.$ = { stmt: "applyClass", id: K[P - 1].trim(), styleClass: K[P].trim() };
|
||
break;
|
||
case 38:
|
||
ut.setDirection("TB"), this.$ = { stmt: "dir", value: "TB" };
|
||
break;
|
||
case 39:
|
||
ut.setDirection("BT"), this.$ = { stmt: "dir", value: "BT" };
|
||
break;
|
||
case 40:
|
||
ut.setDirection("RL"), this.$ = { stmt: "dir", value: "RL" };
|
||
break;
|
||
case 41:
|
||
ut.setDirection("LR"), this.$ = { stmt: "dir", value: "LR" };
|
||
break;
|
||
case 44:
|
||
case 45:
|
||
this.$ = { stmt: "state", id: K[P].trim(), type: "default", description: "" };
|
||
break;
|
||
case 46:
|
||
this.$ = { stmt: "state", id: K[P - 2].trim(), classes: [K[P].trim()], type: "default", description: "" };
|
||
break;
|
||
case 47:
|
||
this.$ = { stmt: "state", id: K[P - 2].trim(), classes: [K[P].trim()], type: "default", description: "" };
|
||
break;
|
||
case 50:
|
||
ut.parseDirective("%%{", "open_directive");
|
||
break;
|
||
case 51:
|
||
ut.parseDirective(K[P], "type_directive");
|
||
break;
|
||
case 52:
|
||
K[P] = K[P].trim().replace(/'/g, '"'), ut.parseDirective(K[P], "arg_directive");
|
||
break;
|
||
case 53:
|
||
ut.parseDirective("}%%", "close_directive", "state");
|
||
break;
|
||
}
|
||
},
|
||
table: [{ 3: 1, 4: e, 5: r, 6: 4, 7: n, 45: 6, 60: i }, { 1: [3] }, { 3: 8, 4: e, 5: r, 6: 4, 7: n, 45: 6, 60: i }, { 3: 9, 4: e, 5: r, 6: 4, 7: n, 45: 6, 60: i }, { 3: 10, 4: e, 5: r, 6: 4, 7: n, 45: 6, 60: i }, t([1, 4, 5, 16, 17, 19, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 42, 50, 51, 52, 53, 56, 60], s, { 8: 11 }), { 46: 12, 61: [1, 13] }, { 61: [2, 50] }, { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3] }, { 1: [2, 4], 4: a, 5: o, 6: 30, 9: 14, 10: 16, 11: 18, 12: 19, 13: 20, 16: l, 17: u, 19: d, 22: f, 24: p, 25: g, 26: b, 27: k, 28: T, 29: L, 32: 31, 33: E, 35: I, 37: V, 38: H, 42: G, 45: 6, 50: Y, 51: W, 52: N, 53: D, 56: w, 60: i }, { 47: 43, 48: [1, 44], 63: v }, t([48, 63], [2, 51]), t(M, [2, 6]), { 6: 30, 10: 46, 11: 18, 12: 19, 13: 20, 16: l, 17: u, 19: d, 22: f, 24: p, 25: g, 26: b, 27: k, 28: T, 29: L, 32: 31, 33: E, 35: I, 37: V, 38: H, 42: G, 45: 6, 50: Y, 51: W, 52: N, 53: D, 56: w, 60: i }, t(M, [2, 8]), t(M, [2, 9]), t(M, [2, 10]), t(M, [2, 11]), t(M, [2, 12], { 14: [1, 47], 15: [1, 48] }), t(M, [2, 16]), { 18: [1, 49] }, t(M, [2, 18], { 20: [1, 50] }), { 23: [1, 51] }, t(M, [2, 22]), t(M, [2, 23]), t(M, [2, 24]), t(M, [2, 25]), { 30: 52, 31: [1, 53], 58: [1, 54], 59: [1, 55] }, t(M, [2, 28]), t(M, [2, 29]), { 34: [1, 56] }, { 36: [1, 57] }, t(M, [2, 32]), { 39: [1, 58], 41: [1, 59] }, { 43: [1, 60] }, t(m, [2, 44], { 57: [1, 61] }), t(m, [2, 45], { 57: [1, 62] }), t(M, [2, 38]), t(M, [2, 39]), t(M, [2, 40]), t(M, [2, 41]), t(Q, [2, 36]), { 49: 63, 62: [1, 64] }, t(Q, [2, 53]), t(M, [2, 7]), t(M, [2, 13]), { 13: 65, 24: p, 56: w }, t(M, [2, 17]), t(x, s, { 8: 66 }), { 24: [1, 67] }, { 24: [1, 68] }, { 23: [1, 69] }, { 24: [2, 48] }, { 24: [2, 49] }, t(M, [2, 30]), t(M, [2, 31]), { 40: [1, 70] }, { 40: [1, 71] }, { 44: [1, 72] }, { 24: [1, 73] }, { 24: [1, 74] }, { 47: 75, 63: v }, { 63: [2, 52] }, t(M, [2, 14], { 14: [1, 76] }), { 4: a, 5: o, 6: 30, 9: 14, 10: 16, 11: 18, 12: 19, 13: 20, 16: l, 17: u, 19: d, 21: [1, 77], 22: f, 24: p, 25: g, 26: b, 27: k, 28: T, 29: L, 32: 31, 33: E, 35: I, 37: V, 38: H, 42: G, 45: 6, 50: Y, 51: W, 52: N, 53: D, 56: w, 60: i }, t(M, [2, 20], { 20: [1, 78] }), { 31: [1, 79] }, { 24: [1, 80] }, t(M, [2, 33]), t(M, [2, 34]), t(M, [2, 35]), t(m, [2, 46]), t(m, [2, 47]), t(Q, [2, 37]), t(M, [2, 15]), t(M, [2, 19]), t(x, s, { 8: 81 }), t(M, [2, 26]), t(M, [2, 27]), { 4: a, 5: o, 6: 30, 9: 14, 10: 16, 11: 18, 12: 19, 13: 20, 16: l, 17: u, 19: d, 21: [1, 82], 22: f, 24: p, 25: g, 26: b, 27: k, 28: T, 29: L, 32: 31, 33: E, 35: I, 37: V, 38: H, 42: G, 45: 6, 50: Y, 51: W, 52: N, 53: D, 56: w, 60: i }, t(M, [2, 21])],
|
||
defaultActions: { 7: [2, 50], 8: [2, 1], 9: [2, 2], 10: [2, 3], 54: [2, 48], 55: [2, 49], 64: [2, 52] },
|
||
parseError: function(ot, rt) {
|
||
if (rt.recoverable)
|
||
this.trace(ot);
|
||
else {
|
||
var nt = new Error(ot);
|
||
throw nt.hash = rt, nt;
|
||
}
|
||
},
|
||
parse: function(ot) {
|
||
var rt = this, nt = [0], ut = [], _t = [null], K = [], Ot = this.table, P = "", z = 0, $ = 0, F = 2, O = 1, A = K.slice.call(arguments, 1), J = Object.create(this.lexer), C = { yy: {} };
|
||
for (var ht in this.yy)
|
||
Object.prototype.hasOwnProperty.call(this.yy, ht) && (C.yy[ht] = this.yy[ht]);
|
||
J.setInput(ot, C.yy), C.yy.lexer = J, C.yy.parser = this, typeof J.yylloc > "u" && (J.yylloc = {});
|
||
var U = J.yylloc;
|
||
K.push(U);
|
||
var Yt = J.options && J.options.ranges;
|
||
typeof C.yy.parseError == "function" ? this.parseError = C.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
||
function et() {
|
||
var Kt;
|
||
return Kt = ut.pop() || J.lex() || O, typeof Kt != "number" && (Kt instanceof Array && (ut = Kt, Kt = ut.pop()), Kt = rt.symbols_[Kt] || Kt), Kt;
|
||
}
|
||
for (var Mt, Tt, gt, Et, wt = {}, pt, st, le, $t; ; ) {
|
||
if (Tt = nt[nt.length - 1], this.defaultActions[Tt] ? gt = this.defaultActions[Tt] : ((Mt === null || typeof Mt > "u") && (Mt = et()), gt = Ot[Tt] && Ot[Tt][Mt]), typeof gt > "u" || !gt.length || !gt[0]) {
|
||
var jt = "";
|
||
$t = [];
|
||
for (pt in Ot[Tt])
|
||
this.terminals_[pt] && pt > F && $t.push("'" + this.terminals_[pt] + "'");
|
||
J.showPosition ? jt = "Parse error on line " + (z + 1) + `:
|
||
` + J.showPosition() + `
|
||
Expecting ` + $t.join(", ") + ", got '" + (this.terminals_[Mt] || Mt) + "'" : jt = "Parse error on line " + (z + 1) + ": Unexpected " + (Mt == O ? "end of input" : "'" + (this.terminals_[Mt] || Mt) + "'"), this.parseError(jt, {
|
||
text: J.match,
|
||
token: this.terminals_[Mt] || Mt,
|
||
line: J.yylineno,
|
||
loc: U,
|
||
expected: $t
|
||
});
|
||
}
|
||
if (gt[0] instanceof Array && gt.length > 1)
|
||
throw new Error("Parse Error: multiple actions possible at state: " + Tt + ", token: " + Mt);
|
||
switch (gt[0]) {
|
||
case 1:
|
||
nt.push(Mt), _t.push(J.yytext), K.push(J.yylloc), nt.push(gt[1]), Mt = null, $ = J.yyleng, P = J.yytext, z = J.yylineno, U = J.yylloc;
|
||
break;
|
||
case 2:
|
||
if (st = this.productions_[gt[1]][1], wt.$ = _t[_t.length - st], wt._$ = {
|
||
first_line: K[K.length - (st || 1)].first_line,
|
||
last_line: K[K.length - 1].last_line,
|
||
first_column: K[K.length - (st || 1)].first_column,
|
||
last_column: K[K.length - 1].last_column
|
||
}, Yt && (wt._$.range = [
|
||
K[K.length - (st || 1)].range[0],
|
||
K[K.length - 1].range[1]
|
||
]), Et = this.performAction.apply(wt, [
|
||
P,
|
||
$,
|
||
z,
|
||
C.yy,
|
||
gt[1],
|
||
_t,
|
||
K
|
||
].concat(A)), typeof Et < "u")
|
||
return Et;
|
||
st && (nt = nt.slice(0, -1 * st * 2), _t = _t.slice(0, -1 * st), K = K.slice(0, -1 * st)), nt.push(this.productions_[gt[1]][0]), _t.push(wt.$), K.push(wt._$), le = Ot[nt[nt.length - 2]][nt[nt.length - 1]], nt.push(le);
|
||
break;
|
||
case 3:
|
||
return !0;
|
||
}
|
||
}
|
||
return !0;
|
||
}
|
||
}, Dt = function() {
|
||
var j = {
|
||
EOF: 1,
|
||
parseError: function(rt, nt) {
|
||
if (this.yy.parser)
|
||
this.yy.parser.parseError(rt, nt);
|
||
else
|
||
throw new Error(rt);
|
||
},
|
||
setInput: function(ot, rt) {
|
||
return this.yy = rt || this.yy || {}, this._input = ot, 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 ot = this._input[0];
|
||
this.yytext += ot, this.yyleng++, this.offset++, this.match += ot, this.matched += ot;
|
||
var rt = ot.match(/(?:\r\n?|\n).*/g);
|
||
return rt ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), ot;
|
||
},
|
||
unput: function(ot) {
|
||
var rt = ot.length, nt = ot.split(/(?:\r\n?|\n)/g);
|
||
this._input = ot + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - rt), this.offset -= rt;
|
||
var ut = 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), nt.length - 1 && (this.yylineno -= nt.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: nt ? (nt.length === ut.length ? this.yylloc.first_column : 0) + ut[ut.length - nt.length].length - nt[0].length : this.yylloc.first_column - rt
|
||
}, this.options.ranges && (this.yylloc.range = [_t[0], _t[0] + this.yyleng - rt]), 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(ot) {
|
||
this.unput(this.match.slice(ot));
|
||
},
|
||
pastInput: function() {
|
||
var ot = this.matched.substr(0, this.matched.length - this.match.length);
|
||
return (ot.length > 20 ? "..." : "") + ot.substr(-20).replace(/\n/g, "");
|
||
},
|
||
upcomingInput: function() {
|
||
var ot = this.match;
|
||
return ot.length < 20 && (ot += this._input.substr(0, 20 - ot.length)), (ot.substr(0, 20) + (ot.length > 20 ? "..." : "")).replace(/\n/g, "");
|
||
},
|
||
showPosition: function() {
|
||
var ot = this.pastInput(), rt = new Array(ot.length + 1).join("-");
|
||
return ot + this.upcomingInput() + `
|
||
` + rt + "^";
|
||
},
|
||
test_match: function(ot, rt) {
|
||
var nt, ut, _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))), ut = ot[0].match(/(?:\r\n?|\n).*/g), ut && (this.yylineno += ut.length), this.yylloc = {
|
||
first_line: this.yylloc.last_line,
|
||
last_line: this.yylineno + 1,
|
||
first_column: this.yylloc.last_column,
|
||
last_column: ut ? ut[ut.length - 1].length - ut[ut.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + ot[0].length
|
||
}, this.yytext += ot[0], this.match += ot[0], this.matches = ot, 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(ot[0].length), this.matched += ot[0], nt = this.performAction.call(this, this.yy, this, rt, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), nt)
|
||
return nt;
|
||
if (this._backtrack) {
|
||
for (var K in _t)
|
||
this[K] = _t[K];
|
||
return !1;
|
||
}
|
||
return !1;
|
||
},
|
||
next: function() {
|
||
if (this.done)
|
||
return this.EOF;
|
||
this._input || (this.done = !0);
|
||
var ot, rt, nt, ut;
|
||
this._more || (this.yytext = "", this.match = "");
|
||
for (var _t = this._currentRules(), K = 0; K < _t.length; K++)
|
||
if (nt = this._input.match(this.rules[_t[K]]), nt && (!rt || nt[0].length > rt[0].length)) {
|
||
if (rt = nt, ut = K, this.options.backtrack_lexer) {
|
||
if (ot = this.test_match(nt, _t[K]), ot !== !1)
|
||
return ot;
|
||
if (this._backtrack) {
|
||
rt = !1;
|
||
continue;
|
||
} else
|
||
return !1;
|
||
} else if (!this.options.flex)
|
||
break;
|
||
}
|
||
return rt ? (ot = this.test_match(rt, _t[ut]), ot !== !1 ? ot : !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 rt = this.next();
|
||
return rt || this.lex();
|
||
},
|
||
begin: function(rt) {
|
||
this.conditionStack.push(rt);
|
||
},
|
||
popState: function() {
|
||
var rt = this.conditionStack.length - 1;
|
||
return rt > 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(rt) {
|
||
return rt = this.conditionStack.length - 1 - Math.abs(rt || 0), rt >= 0 ? this.conditionStack[rt] : "INITIAL";
|
||
},
|
||
pushState: function(rt) {
|
||
this.begin(rt);
|
||
},
|
||
stateStackSize: function() {
|
||
return this.conditionStack.length;
|
||
},
|
||
options: { "case-insensitive": !0 },
|
||
performAction: function(rt, nt, ut, _t) {
|
||
switch (ut) {
|
||
case 0:
|
||
return 41;
|
||
case 1:
|
||
return 50;
|
||
case 2:
|
||
return 51;
|
||
case 3:
|
||
return 52;
|
||
case 4:
|
||
return 53;
|
||
case 5:
|
||
return this.begin("open_directive"), 60;
|
||
case 6:
|
||
return this.begin("type_directive"), 61;
|
||
case 7:
|
||
return this.popState(), this.begin("arg_directive"), 48;
|
||
case 8:
|
||
return this.popState(), this.popState(), 63;
|
||
case 9:
|
||
return 62;
|
||
case 10:
|
||
break;
|
||
case 11:
|
||
break;
|
||
case 12:
|
||
return 5;
|
||
case 13:
|
||
break;
|
||
case 14:
|
||
break;
|
||
case 15:
|
||
break;
|
||
case 16:
|
||
break;
|
||
case 17:
|
||
return this.pushState("SCALE"), 17;
|
||
case 18:
|
||
return 18;
|
||
case 19:
|
||
this.popState();
|
||
break;
|
||
case 20:
|
||
return this.begin("acc_title"), 33;
|
||
case 21:
|
||
return this.popState(), "acc_title_value";
|
||
case 22:
|
||
return this.begin("acc_descr"), 35;
|
||
case 23:
|
||
return this.popState(), "acc_descr_value";
|
||
case 24:
|
||
this.begin("acc_descr_multiline");
|
||
break;
|
||
case 25:
|
||
this.popState();
|
||
break;
|
||
case 26:
|
||
return "acc_descr_multiline_value";
|
||
case 27:
|
||
return this.pushState("CLASSDEF"), 38;
|
||
case 28:
|
||
return this.popState(), this.pushState("CLASSDEFID"), "DEFAULT_CLASSDEF_ID";
|
||
case 29:
|
||
return this.popState(), this.pushState("CLASSDEFID"), 39;
|
||
case 30:
|
||
return this.popState(), 40;
|
||
case 31:
|
||
return this.pushState("CLASS"), 42;
|
||
case 32:
|
||
return this.popState(), this.pushState("CLASS_STYLE"), 43;
|
||
case 33:
|
||
return this.popState(), 44;
|
||
case 34:
|
||
return this.pushState("SCALE"), 17;
|
||
case 35:
|
||
return 18;
|
||
case 36:
|
||
this.popState();
|
||
break;
|
||
case 37:
|
||
this.pushState("STATE");
|
||
break;
|
||
case 38:
|
||
return this.popState(), nt.yytext = nt.yytext.slice(0, -8).trim(), 25;
|
||
case 39:
|
||
return this.popState(), nt.yytext = nt.yytext.slice(0, -8).trim(), 26;
|
||
case 40:
|
||
return this.popState(), nt.yytext = nt.yytext.slice(0, -10).trim(), 27;
|
||
case 41:
|
||
return this.popState(), nt.yytext = nt.yytext.slice(0, -8).trim(), 25;
|
||
case 42:
|
||
return this.popState(), nt.yytext = nt.yytext.slice(0, -8).trim(), 26;
|
||
case 43:
|
||
return this.popState(), nt.yytext = nt.yytext.slice(0, -10).trim(), 27;
|
||
case 44:
|
||
return 50;
|
||
case 45:
|
||
return 51;
|
||
case 46:
|
||
return 52;
|
||
case 47:
|
||
return 53;
|
||
case 48:
|
||
this.begin("STATE_STRING");
|
||
break;
|
||
case 49:
|
||
return this.popState(), this.pushState("STATE_ID"), "AS";
|
||
case 50:
|
||
return this.popState(), "ID";
|
||
case 51:
|
||
this.popState();
|
||
break;
|
||
case 52:
|
||
return "STATE_DESCR";
|
||
case 53:
|
||
return 19;
|
||
case 54:
|
||
this.popState();
|
||
break;
|
||
case 55:
|
||
return this.popState(), this.pushState("struct"), 20;
|
||
case 56:
|
||
break;
|
||
case 57:
|
||
return this.popState(), 21;
|
||
case 58:
|
||
break;
|
||
case 59:
|
||
return this.begin("NOTE"), 29;
|
||
case 60:
|
||
return this.popState(), this.pushState("NOTE_ID"), 58;
|
||
case 61:
|
||
return this.popState(), this.pushState("NOTE_ID"), 59;
|
||
case 62:
|
||
this.popState(), this.pushState("FLOATING_NOTE");
|
||
break;
|
||
case 63:
|
||
return this.popState(), this.pushState("FLOATING_NOTE_ID"), "AS";
|
||
case 64:
|
||
break;
|
||
case 65:
|
||
return "NOTE_TEXT";
|
||
case 66:
|
||
return this.popState(), "ID";
|
||
case 67:
|
||
return this.popState(), this.pushState("NOTE_TEXT"), 24;
|
||
case 68:
|
||
return this.popState(), nt.yytext = nt.yytext.substr(2).trim(), 31;
|
||
case 69:
|
||
return this.popState(), nt.yytext = nt.yytext.slice(0, -8).trim(), 31;
|
||
case 70:
|
||
return 7;
|
||
case 71:
|
||
return 7;
|
||
case 72:
|
||
return 16;
|
||
case 73:
|
||
return 56;
|
||
case 74:
|
||
return 24;
|
||
case 75:
|
||
return nt.yytext = nt.yytext.trim(), 14;
|
||
case 76:
|
||
return 15;
|
||
case 77:
|
||
return 28;
|
||
case 78:
|
||
return 57;
|
||
case 79:
|
||
return 5;
|
||
case 80:
|
||
return "INVALID";
|
||
}
|
||
},
|
||
rules: [/^(?:default\b)/i, /^(?:.*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, /^(?:classDef\s+)/i, /^(?:DEFAULT\s+)/i, /^(?:\w+\s+)/i, /^(?:[^\n]*)/i, /^(?:class\s+)/i, /^(?:(\w+)+((,\s*\w+)*))/i, /^(?:[^\n]*)/i, /^(?:scale\s+)/i, /^(?:\d+)/i, /^(?:\s+width\b)/i, /^(?:state\s+)/i, /^(?:.*<<fork>>)/i, /^(?:.*<<join>>)/i, /^(?:.*<<choice>>)/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, /^(?:%%(?!\{)[^\n]*)/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, /^(?:.)/i],
|
||
conditions: { LINE: { rules: [14, 15], inclusive: !1 }, close_directive: { rules: [14, 15], inclusive: !1 }, arg_directive: { rules: [8, 9, 14, 15], inclusive: !1 }, type_directive: { rules: [7, 8, 14, 15], inclusive: !1 }, open_directive: { rules: [6, 14, 15], inclusive: !1 }, struct: { rules: [14, 15, 27, 31, 37, 44, 45, 46, 47, 56, 57, 58, 59, 73, 74, 75, 76, 77], inclusive: !1 }, FLOATING_NOTE_ID: { rules: [66], inclusive: !1 }, FLOATING_NOTE: { rules: [63, 64, 65], inclusive: !1 }, NOTE_TEXT: { rules: [68, 69], inclusive: !1 }, NOTE_ID: { rules: [67], inclusive: !1 }, NOTE: { rules: [60, 61, 62], inclusive: !1 }, CLASS_STYLE: { rules: [33], inclusive: !1 }, CLASS: { rules: [32], inclusive: !1 }, CLASSDEFID: { rules: [30], inclusive: !1 }, CLASSDEF: { rules: [28, 29], inclusive: !1 }, acc_descr_multiline: { rules: [25, 26], inclusive: !1 }, acc_descr: { rules: [23], inclusive: !1 }, acc_title: { rules: [21], inclusive: !1 }, SCALE: { rules: [18, 19, 35, 36], inclusive: !1 }, ALIAS: { rules: [], inclusive: !1 }, STATE_ID: { rules: [50], inclusive: !1 }, STATE_STRING: { rules: [51, 52], inclusive: !1 }, FORK_STATE: { rules: [], inclusive: !1 }, STATE: { rules: [14, 15, 38, 39, 40, 41, 42, 43, 48, 49, 53, 54, 55], inclusive: !1 }, ID: { rules: [14, 15], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 10, 11, 12, 13, 15, 16, 17, 20, 22, 24, 27, 31, 34, 37, 55, 59, 70, 71, 72, 73, 74, 75, 76, 78, 79, 80], inclusive: !0 } }
|
||
};
|
||
return j;
|
||
}();
|
||
ct.lexer = Dt;
|
||
function vt() {
|
||
this.yy = {};
|
||
}
|
||
return vt.prototype = ct, ct.Parser = vt, new vt();
|
||
}();
|
||
n0.parser = n0;
|
||
const Sp = n0, pV = (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;
|
||
}, gV = (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");
|
||
}, I4 = "LR", yV = "TB", tu = "state", Ld = "relation", mV = "classDef", bV = "applyClass", sl = "default", O4 = "divider", Dd = "[*]", R4 = "start", F4 = Dd, P4 = "end", Ap = "color", Lp = "fill", _V = "bgFill", xV = ",";
|
||
function Y4() {
|
||
return {};
|
||
}
|
||
let V4 = I4, eu = [], bo = Y4();
|
||
const U4 = () => ({
|
||
relations: [],
|
||
states: {},
|
||
documents: {}
|
||
});
|
||
let ru = {
|
||
root: U4()
|
||
}, Tr = ru.root, zo = 0, Dp = 0;
|
||
const vV = {
|
||
LINE: 0,
|
||
DOTTED_LINE: 1
|
||
}, kV = {
|
||
AGGREGATION: 0,
|
||
EXTENSION: 1,
|
||
COMPOSITION: 2,
|
||
DEPENDENCY: 3
|
||
}, Bl = (t) => JSON.parse(JSON.stringify(t)), wV = function(t, e, r) {
|
||
ze.parseDirective(this, t, e, r);
|
||
}, TV = (t) => {
|
||
B.info("Setting root doc", t), eu = t;
|
||
}, EV = () => eu, ec = (t, e, r) => {
|
||
if (e.stmt === Ld)
|
||
ec(t, e.state1, !0), ec(t, e.state2, !1);
|
||
else if (e.stmt === tu && e.id === "[*]" && (e.id = r ? t.id + "_start" : t.id + "_end", e.start = r), e.doc) {
|
||
const n = [];
|
||
let i = [], s;
|
||
for (s = 0; s < e.doc.length; s++)
|
||
if (e.doc[s].type === O4) {
|
||
const a = Bl(e.doc[s]);
|
||
a.doc = Bl(i), n.push(a), i = [];
|
||
} else
|
||
i.push(e.doc[s]);
|
||
if (n.length > 0 && i.length > 0) {
|
||
const a = {
|
||
stmt: tu,
|
||
id: Ay(),
|
||
type: "divider",
|
||
doc: Bl(i)
|
||
};
|
||
n.push(Bl(a)), e.doc = n;
|
||
}
|
||
e.doc.forEach((a) => ec(e, a, !0));
|
||
}
|
||
}, CV = () => (ec({ id: "root" }, { id: "root", doc: eu }, !0), { id: "root", doc: eu }), SV = (t) => {
|
||
let e;
|
||
t.doc ? e = t.doc : e = t, B.info(e), z4(!0), B.info("Extract", e), e.forEach((r) => {
|
||
switch (r.stmt) {
|
||
case tu:
|
||
Ss(
|
||
r.id,
|
||
r.type,
|
||
r.doc,
|
||
r.description,
|
||
r.note,
|
||
r.classes,
|
||
r.styles,
|
||
r.textStyles
|
||
);
|
||
break;
|
||
case Ld:
|
||
W4(r.state1, r.state2, r.description);
|
||
break;
|
||
case mV:
|
||
H4(r.id, r.classes);
|
||
break;
|
||
case bV:
|
||
Md(r.id, r.styleClass);
|
||
break;
|
||
}
|
||
});
|
||
}, Ss = function(t, e = sl, r = null, n = null, i = null, s = null, a = null, o = null) {
|
||
Tr.states[t] === void 0 ? (B.info("Adding state ", t, n), Tr.states[t] = {
|
||
id: t,
|
||
descriptions: [],
|
||
type: e,
|
||
doc: r,
|
||
note: i,
|
||
classes: [],
|
||
styles: [],
|
||
textStyles: []
|
||
}) : (Tr.states[t].doc || (Tr.states[t].doc = r), Tr.states[t].type || (Tr.states[t].type = e)), n && (B.info("Setting state description", t, n), typeof n == "string" && a0(t, n.trim()), typeof n == "object" && n.forEach((l) => a0(t, l.trim()))), i && (Tr.states[t].note = i, Tr.states[t].note.text = he.sanitizeText(
|
||
Tr.states[t].note.text,
|
||
X()
|
||
)), s && (B.info("Setting state classes", t, s), (typeof s == "string" ? [s] : s).forEach((u) => Md(t, u.trim()))), a && (B.info("Setting state styles", t, a), (typeof a == "string" ? [a] : a).forEach((u) => FV(t, u.trim()))), o && (B.info("Setting state styles", t, a), (typeof o == "string" ? [o] : o).forEach((u) => PV(t, u.trim())));
|
||
}, z4 = function(t) {
|
||
ru = {
|
||
root: U4()
|
||
}, Tr = ru.root, zo = 0, bo = Y4(), t || Dn();
|
||
}, Wo = function(t) {
|
||
return Tr.states[t];
|
||
}, AV = function() {
|
||
return Tr.states;
|
||
}, LV = function() {
|
||
B.info("Documents = ", ru);
|
||
}, DV = function() {
|
||
return Tr.relations;
|
||
};
|
||
function i0(t = "") {
|
||
let e = t;
|
||
return t === Dd && (zo++, e = `${R4}${zo}`), e;
|
||
}
|
||
function s0(t = "", e = sl) {
|
||
return t === Dd ? R4 : e;
|
||
}
|
||
function MV(t = "") {
|
||
let e = t;
|
||
return t === F4 && (zo++, e = `${P4}${zo}`), e;
|
||
}
|
||
function NV(t = "", e = sl) {
|
||
return t === F4 ? P4 : e;
|
||
}
|
||
function BV(t, e, r) {
|
||
let n = i0(t.id), i = s0(t.id, t.type), s = i0(e.id), a = s0(e.id, e.type);
|
||
Ss(
|
||
n,
|
||
i,
|
||
t.doc,
|
||
t.description,
|
||
t.note,
|
||
t.classes,
|
||
t.styles,
|
||
t.textStyles
|
||
), Ss(
|
||
s,
|
||
a,
|
||
e.doc,
|
||
e.description,
|
||
e.note,
|
||
e.classes,
|
||
e.styles,
|
||
e.textStyles
|
||
), Tr.relations.push({
|
||
id1: n,
|
||
id2: s,
|
||
relationTitle: he.sanitizeText(r, X())
|
||
});
|
||
}
|
||
const W4 = function(t, e, r) {
|
||
if (typeof t == "object")
|
||
BV(t, e, r);
|
||
else {
|
||
const n = i0(t), i = s0(t), s = MV(e), a = NV(e);
|
||
Ss(n, i), Ss(s, a), Tr.relations.push({
|
||
id1: n,
|
||
id2: s,
|
||
title: he.sanitizeText(r, X())
|
||
});
|
||
}
|
||
}, a0 = function(t, e) {
|
||
const r = Tr.states[t], n = e.startsWith(":") ? e.replace(":", "").trim() : e;
|
||
r.descriptions.push(he.sanitizeText(n, X()));
|
||
}, IV = function(t) {
|
||
return t.substring(0, 1) === ":" ? t.substr(2).trim() : t.trim();
|
||
}, OV = () => (Dp++, "divider-id-" + Dp), H4 = function(t, e = "") {
|
||
bo[t] === void 0 && (bo[t] = { id: t, styles: [], textStyles: [] });
|
||
const r = bo[t];
|
||
e != null && e.split(xV).forEach((n) => {
|
||
const i = n.replace(/([^;]*);/, "$1").trim();
|
||
if (n.match(Ap)) {
|
||
const a = i.replace(Lp, _V).replace(Ap, Lp);
|
||
r.textStyles.push(a);
|
||
}
|
||
r.styles.push(i);
|
||
});
|
||
}, RV = function() {
|
||
return bo;
|
||
}, Md = function(t, e) {
|
||
t.split(",").forEach(function(r) {
|
||
let n = Wo(r);
|
||
if (n === void 0) {
|
||
const i = r.trim();
|
||
Ss(i), n = Wo(i);
|
||
}
|
||
n.classes.push(e);
|
||
});
|
||
}, FV = function(t, e) {
|
||
const r = Wo(t);
|
||
r !== void 0 && r.textStyles.push(e);
|
||
}, PV = function(t, e) {
|
||
const r = Wo(t);
|
||
r !== void 0 && r.textStyles.push(e);
|
||
}, YV = () => V4, VV = (t) => {
|
||
V4 = t;
|
||
}, UV = (t) => t && t[0] === ":" ? t.substr(1).trim() : t.trim(), hi = {
|
||
parseDirective: wV,
|
||
getConfig: () => X().state,
|
||
addState: Ss,
|
||
clear: z4,
|
||
getState: Wo,
|
||
getStates: AV,
|
||
getRelations: DV,
|
||
getClasses: RV,
|
||
getDirection: YV,
|
||
addRelation: W4,
|
||
getDividerId: OV,
|
||
setDirection: VV,
|
||
cleanupLabel: IV,
|
||
lineType: vV,
|
||
relationType: kV,
|
||
logDocuments: LV,
|
||
getRootDoc: EV,
|
||
setRootDoc: TV,
|
||
getRootDocV2: CV,
|
||
extract: SV,
|
||
trimColon: UV,
|
||
getAccTitle: Mn,
|
||
setAccTitle: sn,
|
||
getAccDescription: Bn,
|
||
setAccDescription: Nn,
|
||
addStyleClass: H4,
|
||
setCssClass: Md,
|
||
addDescription: a0,
|
||
setDiagramTitle: Si,
|
||
getDiagramTitle: Ai
|
||
}, Nd = {}, zV = (t, e) => {
|
||
Nd[t] = e;
|
||
}, WV = (t) => Nd[t], G4 = () => Object.keys(Nd), HV = () => G4().length, GV = {
|
||
get: WV,
|
||
set: zV,
|
||
keys: G4,
|
||
size: HV
|
||
}, qV = (t) => t.append("circle").attr("class", "start-state").attr("r", X().state.sizeUnit).attr("cx", X().state.padding + X().state.sizeUnit).attr("cy", X().state.padding + X().state.sizeUnit), jV = (t) => t.append("line").style("stroke", "grey").style("stroke-dasharray", "3").attr("x1", X().state.textHeight).attr("class", "divider").attr("x2", X().state.textHeight * 2).attr("y1", 0).attr("y2", 0), XV = (t, e) => {
|
||
const r = t.append("text").attr("x", 2 * X().state.padding).attr("y", X().state.textHeight + 2 * X().state.padding).attr("font-size", X().state.fontSize).attr("class", "state-title").text(e.id), n = r.node().getBBox();
|
||
return t.insert("rect", ":first-child").attr("x", X().state.padding).attr("y", X().state.padding).attr("width", n.width + 2 * X().state.padding).attr("height", n.height + 2 * X().state.padding).attr("rx", X().state.radius), r;
|
||
}, $V = (t, e) => {
|
||
const r = function(p, g, b) {
|
||
const k = p.append("tspan").attr("x", 2 * X().state.padding).text(g);
|
||
b || k.attr("dy", X().state.textHeight);
|
||
}, i = t.append("text").attr("x", 2 * X().state.padding).attr("y", X().state.textHeight + 1.3 * X().state.padding).attr("font-size", X().state.fontSize).attr("class", "state-title").text(e.descriptions[0]).node().getBBox(), s = i.height, a = t.append("text").attr("x", X().state.padding).attr(
|
||
"y",
|
||
s + X().state.padding * 0.4 + X().state.dividerMargin + X().state.textHeight
|
||
).attr("class", "state-description");
|
||
let o = !0, l = !0;
|
||
e.descriptions.forEach(function(p) {
|
||
o || (r(a, p, l), l = !1), o = !1;
|
||
});
|
||
const u = t.append("line").attr("x1", X().state.padding).attr("y1", X().state.padding + s + X().state.dividerMargin / 2).attr("y2", X().state.padding + s + X().state.dividerMargin / 2).attr("class", "descr-divider"), d = a.node().getBBox(), f = Math.max(d.width, i.width);
|
||
return u.attr("x2", f + 3 * X().state.padding), t.insert("rect", ":first-child").attr("x", X().state.padding).attr("y", X().state.padding).attr("width", f + 2 * X().state.padding).attr("height", d.height + s + 2 * X().state.padding).attr("rx", X().state.radius), t;
|
||
}, KV = (t, e, r) => {
|
||
const n = X().state.padding, i = 2 * X().state.padding, s = t.node().getBBox(), a = s.width, o = s.x, l = t.append("text").attr("x", 0).attr("y", X().state.titleShift).attr("font-size", X().state.fontSize).attr("class", "state-title").text(e.id), d = l.node().getBBox().width + i;
|
||
let f = Math.max(d, a);
|
||
f === a && (f = f + i);
|
||
let p;
|
||
const g = t.node().getBBox();
|
||
e.doc, p = o - n, d > a && (p = (a - f) / 2 + n), Math.abs(o - g.x) < n && d > a && (p = o - (d - a) / 2);
|
||
const b = 1 - X().state.textHeight;
|
||
return t.insert("rect", ":first-child").attr("x", p).attr("y", b).attr("class", r ? "alt-composit" : "composit").attr("width", f).attr(
|
||
"height",
|
||
g.height + X().state.textHeight + X().state.titleShift + 1
|
||
).attr("rx", "0"), l.attr("x", p + n), d <= a && l.attr("x", o + (f - i) / 2 - d / 2 + n), t.insert("rect", ":first-child").attr("x", p).attr(
|
||
"y",
|
||
X().state.titleShift - X().state.textHeight - X().state.padding
|
||
).attr("width", f).attr("height", X().state.textHeight * 3).attr("rx", X().state.radius), t.insert("rect", ":first-child").attr("x", p).attr(
|
||
"y",
|
||
X().state.titleShift - X().state.textHeight - X().state.padding
|
||
).attr("width", f).attr("height", g.height + 3 + 2 * X().state.textHeight).attr("rx", X().state.radius), t;
|
||
}, ZV = (t) => (t.append("circle").attr("class", "end-state-outer").attr("r", X().state.sizeUnit + X().state.miniPadding).attr(
|
||
"cx",
|
||
X().state.padding + X().state.sizeUnit + X().state.miniPadding
|
||
).attr(
|
||
"cy",
|
||
X().state.padding + X().state.sizeUnit + X().state.miniPadding
|
||
), t.append("circle").attr("class", "end-state-inner").attr("r", X().state.sizeUnit).attr("cx", X().state.padding + X().state.sizeUnit + 2).attr("cy", X().state.padding + X().state.sizeUnit + 2)), QV = (t, e) => {
|
||
let r = X().state.forkWidth, n = X().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", X().state.padding).attr("y", X().state.padding);
|
||
}, JV = (t, e, r, n) => {
|
||
let i = 0;
|
||
const s = n.append("text");
|
||
s.style("text-anchor", "start"), s.attr("class", "noteText");
|
||
let a = t.replace(/\r\n/g, "<br/>");
|
||
a = a.replace(/\n/g, "<br/>");
|
||
const o = a.split(he.lineBreakRegex);
|
||
let l = 1.25 * X().state.noteMargin;
|
||
for (const u of o) {
|
||
const d = u.trim();
|
||
if (d.length > 0) {
|
||
const f = s.append("tspan");
|
||
if (f.text(d), l === 0) {
|
||
const p = f.node().getBBox();
|
||
l += p.height;
|
||
}
|
||
i += l, f.attr("x", e + X().state.noteMargin), f.attr("y", r + i + 1.25 * X().state.noteMargin);
|
||
}
|
||
}
|
||
return { textWidth: s.node().getBBox().width, textHeight: i };
|
||
}, tU = (t, e) => {
|
||
e.attr("class", "state-note");
|
||
const r = e.append("rect").attr("x", 0).attr("y", X().state.padding), n = e.append("g"), { textWidth: i, textHeight: s } = JV(t, 0, 0, n);
|
||
return r.attr("height", s + 2 * X().state.noteMargin), r.attr("width", i + X().state.noteMargin * 2), r;
|
||
}, Mp = 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" && qV(i), e.type === "end" && ZV(i), (e.type === "fork" || e.type === "join") && QV(i, e), e.type === "note" && tU(e.note.text, i), e.type === "divider" && jV(i), e.type === "default" && e.descriptions.length === 0 && XV(i, e), e.type === "default" && e.descriptions.length > 0 && $V(i, e);
|
||
const s = i.node().getBBox();
|
||
return n.width = s.width + 2 * X().state.padding, n.height = s.height + 2 * X().state.padding, GV.set(r, n), n;
|
||
};
|
||
let Np = 0;
|
||
const eU = function(t, e, r) {
|
||
const n = function(l) {
|
||
switch (l) {
|
||
case hi.relationType.AGGREGATION:
|
||
return "aggregation";
|
||
case hi.relationType.EXTENSION:
|
||
return "extension";
|
||
case hi.relationType.COMPOSITION:
|
||
return "composition";
|
||
case hi.relationType.DEPENDENCY:
|
||
return "dependency";
|
||
}
|
||
};
|
||
e.points = e.points.filter((l) => !Number.isNaN(l.y));
|
||
const i = e.points, s = Na().x(function(l) {
|
||
return l.x;
|
||
}).y(function(l) {
|
||
return l.y;
|
||
}).curve(ga), a = t.append("path").attr("d", s(i)).attr("id", "edge" + Np).attr("class", "transition");
|
||
let o = "";
|
||
if (X().state.arrowMarkerAbsolute && (o = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, o = o.replace(/\(/g, "\\("), o = o.replace(/\)/g, "\\)")), a.attr(
|
||
"marker-end",
|
||
"url(" + o + "#" + n(hi.relationType.DEPENDENCY) + "End)"
|
||
), r.title !== void 0) {
|
||
const l = t.append("g").attr("class", "stateLabel"), { x: u, y: d } = ye.calcLabelPosition(e.points), f = he.getRows(r.title);
|
||
let p = 0;
|
||
const g = [];
|
||
let b = 0, k = 0;
|
||
for (let E = 0; E <= f.length; E++) {
|
||
const I = l.append("text").attr("text-anchor", "middle").text(f[E]).attr("x", u).attr("y", d + p), V = I.node().getBBox();
|
||
b = Math.max(b, V.width), k = Math.min(k, V.x), B.info(V.x, u, d + p), p === 0 && (p = I.node().getBBox().height, B.info("Title height", p, d)), g.push(I);
|
||
}
|
||
let T = p * f.length;
|
||
if (f.length > 1) {
|
||
const E = (f.length - 1) * p * 0.5;
|
||
g.forEach((I, V) => I.attr("y", d + V * p - E)), T = p * f.length;
|
||
}
|
||
const L = l.node().getBBox();
|
||
l.insert("rect", ":first-child").attr("class", "box").attr("x", u - b / 2 - X().state.padding / 2).attr("y", d - T / 2 - X().state.padding / 2 - 3.5).attr("width", b + X().state.padding).attr("height", T + X().state.padding), B.info(L);
|
||
}
|
||
Np++;
|
||
};
|
||
let jr;
|
||
const Vh = {}, rU = function() {
|
||
}, nU = 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");
|
||
}, iU = function(t, e, r, n) {
|
||
jr = X().state;
|
||
const i = X().securityLevel;
|
||
let s;
|
||
i === "sandbox" && (s = At("#i" + e));
|
||
const a = At(i === "sandbox" ? s.nodes()[0].contentDocument.body : "body"), o = i === "sandbox" ? s.nodes()[0].contentDocument : document;
|
||
B.debug("Rendering diagram " + t);
|
||
const l = a.select(`[id='${e}']`);
|
||
nU(l), new lr({
|
||
multigraph: !0,
|
||
compound: !0,
|
||
rankdir: "RL"
|
||
}).setDefaultEdgeLabel(function() {
|
||
return {};
|
||
});
|
||
const d = n.db.getRootDoc();
|
||
q4(d, l, void 0, !1, a, o, n);
|
||
const f = jr.padding, p = l.node().getBBox(), g = p.width + f * 2, b = p.height + f * 2, k = g * 1.75;
|
||
Ln(l, b, k, jr.useMaxWidth), l.attr(
|
||
"viewBox",
|
||
`${p.x - jr.padding} ${p.y - jr.padding} ` + g + " " + b
|
||
);
|
||
}, sU = (t) => t ? t.length * jr.fontSizeFactor : 1, q4 = (t, e, r, n, i, s, a) => {
|
||
const o = new lr({
|
||
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 : jr.edgeLengthFactor,
|
||
nodeSep: u ? 1 : 50,
|
||
isMultiGraph: !0
|
||
}) : o.setGraph({
|
||
rankdir: "TB",
|
||
multigraph: !0,
|
||
compound: !0,
|
||
ranksep: u ? 1 : jr.edgeLengthFactor,
|
||
nodeSep: u ? 1 : 50,
|
||
ranker: "tight-tree",
|
||
isMultiGraph: !0
|
||
}), o.setDefaultEdgeLabel(function() {
|
||
return {};
|
||
}), a.db.extract(t);
|
||
const d = a.db.getStates(), f = a.db.getRelations(), p = Object.keys(d);
|
||
for (const L of p) {
|
||
const E = d[L];
|
||
r && (E.parentId = r);
|
||
let I;
|
||
if (E.doc) {
|
||
let V = e.append("g").attr("id", E.id).attr("class", "stateGroup");
|
||
I = q4(E.doc, V, E.id, !n, i, s, a);
|
||
{
|
||
V = KV(V, E, n);
|
||
let H = V.node().getBBox();
|
||
I.width = H.width, I.height = H.height + jr.padding / 2, Vh[E.id] = { y: jr.compositTitleSize };
|
||
}
|
||
} else
|
||
I = Mp(e, E);
|
||
if (E.note) {
|
||
const V = {
|
||
descriptions: [],
|
||
id: E.id + "-note",
|
||
note: E.note,
|
||
type: "note"
|
||
}, H = Mp(e, V);
|
||
E.note.position === "left of" ? (o.setNode(I.id + "-note", H), o.setNode(I.id, I)) : (o.setNode(I.id, I), o.setNode(I.id + "-note", H)), o.setParent(I.id, I.id + "-group"), o.setParent(I.id + "-note", I.id + "-group");
|
||
} else
|
||
o.setNode(I.id, I);
|
||
}
|
||
B.debug("Count=", o.nodeCount(), o);
|
||
let g = 0;
|
||
f.forEach(function(L) {
|
||
g++, B.debug("Setting edge", L), o.setEdge(
|
||
L.id1,
|
||
L.id2,
|
||
{
|
||
relation: L,
|
||
width: sU(L.title),
|
||
height: jr.labelHeight * he.getRows(L.title).length,
|
||
labelpos: "c"
|
||
},
|
||
"id" + g
|
||
);
|
||
}), Pa(o), B.debug("Graph after layout", o.nodes());
|
||
const b = e.node();
|
||
o.nodes().forEach(function(L) {
|
||
L !== void 0 && o.node(L) !== void 0 ? (B.warn("Node " + L + ": " + JSON.stringify(o.node(L))), i.select("#" + b.id + " #" + L).attr(
|
||
"transform",
|
||
"translate(" + (o.node(L).x - o.node(L).width / 2) + "," + (o.node(L).y + (Vh[L] ? Vh[L].y : 0) - o.node(L).height / 2) + " )"
|
||
), i.select("#" + b.id + " #" + L).attr("data-x-shift", o.node(L).x - o.node(L).width / 2), s.querySelectorAll("#" + b.id + " #" + L + " .divider").forEach((I) => {
|
||
const V = I.parentElement;
|
||
let H = 0, G = 0;
|
||
V && (V.parentElement && (H = V.parentElement.getBBox().width), G = parseInt(V.getAttribute("data-x-shift"), 10), Number.isNaN(G) && (G = 0)), I.setAttribute("x1", 0 - G + 8), I.setAttribute("x2", H - G - 8);
|
||
})) : B.debug("No Node " + L + ": " + JSON.stringify(o.node(L)));
|
||
});
|
||
let k = b.getBBox();
|
||
o.edges().forEach(function(L) {
|
||
L !== void 0 && o.edge(L) !== void 0 && (B.debug("Edge " + L.v + " -> " + L.w + ": " + JSON.stringify(o.edge(L))), eU(e, o.edge(L), o.edge(L).relation));
|
||
}), k = b.getBBox();
|
||
const T = {
|
||
id: r || "root",
|
||
label: r || "root",
|
||
width: 0,
|
||
height: 0
|
||
};
|
||
return T.width = k.width + 2 * jr.padding, T.height = k.height + 2 * jr.padding, B.debug("Doc rendered", T, o), T;
|
||
}, aU = {
|
||
setConf: rU,
|
||
draw: iU
|
||
}, rc = "rect", Uh = "rectWithTitle", oU = "start", lU = "end", cU = "divider", uU = "roundedWithTitle", hU = "note", dU = "noteGroup", Da = "statediagram", fU = "state", pU = `${Da}-${fU}`, j4 = "transition", gU = "note", yU = "note-edge", mU = `${j4} ${yU}`, bU = `${Da}-${gU}`, _U = "cluster", xU = `${Da}-${_U}`, vU = "cluster-alt", kU = `${Da}-${vU}`, X4 = "parent", $4 = "note", wU = "state", Bd = "----", TU = `${Bd}${$4}`, Bp = `${Bd}${X4}`, K4 = "fill:none", Z4 = "fill: #333", Q4 = "c", J4 = "text", tb = "normal";
|
||
let nc = {}, Vi = 0;
|
||
const EU = function(t) {
|
||
const e = Object.keys(t);
|
||
for (const r of e)
|
||
t[r];
|
||
}, CU = function(t, e) {
|
||
B.trace("Extracting classes"), e.db.clear();
|
||
try {
|
||
return e.parser.parse(t), e.db.extract(e.db.getRootDocV2()), e.db.getClasses();
|
||
} catch (r) {
|
||
return r;
|
||
}
|
||
};
|
||
function SU(t) {
|
||
return t == null ? "" : t.classes ? t.classes.join(" ") : "";
|
||
}
|
||
function zh(t = "", e = 0, r = "", n = Bd) {
|
||
const i = r !== null && r.length > 0 ? `${n}${r}` : "";
|
||
return `${wU}-${t}${i}-${e}`;
|
||
}
|
||
const so = (t, e, r, n, i, s) => {
|
||
const a = r.id, o = SU(n[a]);
|
||
if (a !== "root") {
|
||
let l = rc;
|
||
r.start === !0 && (l = oU), r.start === !1 && (l = lU), r.type !== sl && (l = r.type), nc[a] || (nc[a] = {
|
||
id: a,
|
||
shape: l,
|
||
description: he.sanitizeText(a, X()),
|
||
classes: `${o} ${pU}`
|
||
});
|
||
const u = nc[a];
|
||
r.description && (Array.isArray(u.description) ? (u.shape = Uh, u.description.push(r.description)) : u.description.length > 0 ? (u.shape = Uh, u.description === a ? u.description = [r.description] : u.description = [u.description, r.description]) : (u.shape = rc, u.description = r.description), u.description = he.sanitizeTextOrArray(u.description, X())), u.description.length === 1 && u.shape === Uh && (u.shape = rc), !u.type && r.doc && (B.info("Setting cluster for ", a, o0(r)), u.type = "group", u.dir = o0(r), u.shape = r.type === O4 ? cU : uU, u.classes = u.classes + " " + xU + " " + (s ? kU : ""));
|
||
const d = {
|
||
labelStyle: "",
|
||
shape: u.shape,
|
||
labelText: u.description,
|
||
classes: u.classes,
|
||
style: "",
|
||
id: a,
|
||
dir: u.dir,
|
||
domId: zh(a, Vi),
|
||
type: u.type,
|
||
padding: 15
|
||
};
|
||
if (r.note) {
|
||
const f = {
|
||
labelStyle: "",
|
||
shape: hU,
|
||
labelText: r.note.text,
|
||
classes: bU,
|
||
style: "",
|
||
id: a + TU + "-" + Vi,
|
||
domId: zh(a, Vi, $4),
|
||
type: u.type,
|
||
padding: 15
|
||
}, p = {
|
||
labelStyle: "",
|
||
shape: dU,
|
||
labelText: r.note.text,
|
||
classes: u.classes,
|
||
style: "",
|
||
id: a + Bp,
|
||
domId: zh(a, Vi, X4),
|
||
type: "group",
|
||
padding: 0
|
||
};
|
||
Vi++;
|
||
const g = a + Bp;
|
||
t.setNode(g, p), t.setNode(f.id, f), t.setNode(a, d), t.setParent(a, g), t.setParent(f.id, g);
|
||
let b = a, k = f.id;
|
||
r.note.position === "left of" && (b = f.id, k = a), t.setEdge(b, k, {
|
||
arrowhead: "none",
|
||
arrowType: "",
|
||
style: K4,
|
||
labelStyle: "",
|
||
classes: mU,
|
||
arrowheadStyle: Z4,
|
||
labelpos: Q4,
|
||
labelType: J4,
|
||
thickness: tb
|
||
});
|
||
} else
|
||
t.setNode(a, d);
|
||
}
|
||
e && e.id !== "root" && (B.trace("Setting node ", a, " to be child of its parent ", e.id), t.setParent(a, e.id)), r.doc && (B.trace("Adding nodes children "), AU(t, r, r.doc, n, i, !s));
|
||
}, AU = (t, e, r, n, i, s) => {
|
||
B.trace("items", r), r.forEach((a) => {
|
||
switch (a.stmt) {
|
||
case tu:
|
||
so(t, e, a, n, i, s);
|
||
break;
|
||
case sl:
|
||
so(t, e, a, n, i, s);
|
||
break;
|
||
case Ld:
|
||
{
|
||
so(t, e, a.state1, n, i, s), so(t, e, a.state2, n, i, s);
|
||
const o = {
|
||
id: "edge" + Vi,
|
||
arrowhead: "normal",
|
||
arrowTypeEnd: "arrow_barb",
|
||
style: K4,
|
||
labelStyle: "",
|
||
label: he.sanitizeText(a.description, X()),
|
||
arrowheadStyle: Z4,
|
||
labelpos: Q4,
|
||
labelType: J4,
|
||
thickness: tb,
|
||
classes: j4
|
||
};
|
||
t.setEdge(a.state1.id, a.state2.id, o, Vi), Vi++;
|
||
}
|
||
break;
|
||
}
|
||
});
|
||
}, o0 = (t, e = yV) => {
|
||
let r = e;
|
||
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;
|
||
}, LU = function(t, e, r, n) {
|
||
B.info("Drawing state diagram (v2)", e), nc = {};
|
||
let i = n.db.getDirection();
|
||
i === void 0 && (i = I4);
|
||
const { securityLevel: s, state: a } = X(), o = a.nodeSpacing || 50, l = a.rankSpacing || 50;
|
||
B.info(n.db.getRootDocV2()), n.db.extract(n.db.getRootDocV2()), B.info(n.db.getRootDocV2());
|
||
const u = n.db.getStates(), d = new lr({
|
||
multigraph: !0,
|
||
compound: !0
|
||
}).setGraph({
|
||
rankdir: o0(n.db.getRootDocV2()),
|
||
nodesep: o,
|
||
ranksep: l,
|
||
marginx: 8,
|
||
marginy: 8
|
||
}).setDefaultEdgeLabel(function() {
|
||
return {};
|
||
});
|
||
so(d, void 0, n.db.getRootDocV2(), u, n.db, !0);
|
||
let f;
|
||
s === "sandbox" && (f = At("#i" + e));
|
||
const p = At(s === "sandbox" ? f.nodes()[0].contentDocument.body : "body"), g = p.select(`[id="${e}"]`), b = p.select("#" + e + " g");
|
||
ud(b, d, ["barb"], Da, e);
|
||
const k = 8;
|
||
ye.insertTitle(g, "statediagramTitleText", a.titleTopMargin, n.db.getDiagramTitle());
|
||
const T = g.node().getBBox(), L = T.width + k * 2, E = T.height + k * 2;
|
||
g.attr("class", Da);
|
||
const I = g.node().getBBox();
|
||
Ln(g, E, L, a.useMaxWidth);
|
||
const V = `${I.x - k} ${I.y - k} ${L} ${E}`;
|
||
B.debug(`viewBox ${V}`), g.attr("viewBox", V);
|
||
const H = document.querySelectorAll('[id="' + e + '"] .edgeLabel .label');
|
||
for (const G of H) {
|
||
const Y = G.getBBox(), W = document.createElementNS("http://www.w3.org/2000/svg", rc);
|
||
W.setAttribute("rx", 0), W.setAttribute("ry", 0), W.setAttribute("width", Y.width), W.setAttribute("height", Y.height), G.insertBefore(W, G.firstChild);
|
||
}
|
||
}, DU = {
|
||
setConf: EU,
|
||
getClasses: CU,
|
||
draw: LU
|
||
};
|
||
var l0 = function() {
|
||
var t = function(k, T, L, E) {
|
||
for (L = L || {}, E = k.length; E--; L[k[E]] = T)
|
||
;
|
||
return L;
|
||
}, e = [1, 2], r = [1, 5], n = [6, 9, 11, 17, 18, 20, 22, 23, 24, 26], i = [1, 15], s = [1, 16], a = [1, 17], o = [1, 18], l = [1, 19], u = [1, 20], d = [1, 24], f = [4, 6, 9, 11, 17, 18, 20, 22, 23, 24, 26], p = {
|
||
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(T, L, E, I, V, H, G) {
|
||
var Y = H.length - 1;
|
||
switch (V) {
|
||
case 1:
|
||
return H[Y - 1];
|
||
case 3:
|
||
this.$ = [];
|
||
break;
|
||
case 4:
|
||
H[Y - 1].push(H[Y]), this.$ = H[Y - 1];
|
||
break;
|
||
case 5:
|
||
case 6:
|
||
this.$ = H[Y];
|
||
break;
|
||
case 7:
|
||
case 8:
|
||
this.$ = [];
|
||
break;
|
||
case 11:
|
||
I.setDiagramTitle(H[Y].substr(6)), this.$ = H[Y].substr(6);
|
||
break;
|
||
case 12:
|
||
this.$ = H[Y].trim(), I.setAccTitle(this.$);
|
||
break;
|
||
case 13:
|
||
case 14:
|
||
this.$ = H[Y].trim(), I.setAccDescription(this.$);
|
||
break;
|
||
case 15:
|
||
I.addSection(H[Y].substr(8)), this.$ = H[Y].substr(8);
|
||
break;
|
||
case 16:
|
||
I.addTask(H[Y - 1], H[Y]), this.$ = "task";
|
||
break;
|
||
case 18:
|
||
I.parseDirective("%%{", "open_directive");
|
||
break;
|
||
case 19:
|
||
I.parseDirective(H[Y], "type_directive");
|
||
break;
|
||
case 20:
|
||
H[Y] = H[Y].trim().replace(/'/g, '"'), I.parseDirective(H[Y], "arg_directive");
|
||
break;
|
||
case 21:
|
||
I.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: s, 20: a, 22: o, 23: l, 24: u, 26: r }, { 1: [2, 2] }, { 14: 22, 15: [1, 23], 29: d }, 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: s, 20: a, 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(f, [2, 9]), { 14: 32, 29: d }, { 29: [2, 20] }, { 11: [1, 33] }, t(f, [2, 10])],
|
||
defaultActions: { 5: [2, 18], 7: [2, 2], 24: [2, 21], 31: [2, 20] },
|
||
parseError: function(T, L) {
|
||
if (L.recoverable)
|
||
this.trace(T);
|
||
else {
|
||
var E = new Error(T);
|
||
throw E.hash = L, E;
|
||
}
|
||
},
|
||
parse: function(T) {
|
||
var L = this, E = [0], I = [], V = [null], H = [], G = this.table, Y = "", W = 0, N = 0, D = 2, w = 1, v = H.slice.call(arguments, 1), M = Object.create(this.lexer), m = { yy: {} };
|
||
for (var Q in this.yy)
|
||
Object.prototype.hasOwnProperty.call(this.yy, Q) && (m.yy[Q] = this.yy[Q]);
|
||
M.setInput(T, m.yy), m.yy.lexer = M, m.yy.parser = this, typeof M.yylloc > "u" && (M.yylloc = {});
|
||
var x = M.yylloc;
|
||
H.push(x);
|
||
var ct = M.options && M.options.ranges;
|
||
typeof m.yy.parseError == "function" ? this.parseError = m.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
||
function Dt() {
|
||
var z;
|
||
return z = I.pop() || M.lex() || w, typeof z != "number" && (z instanceof Array && (I = z, z = I.pop()), z = L.symbols_[z] || z), z;
|
||
}
|
||
for (var vt, j, ot, rt, nt = {}, ut, _t, K, Ot; ; ) {
|
||
if (j = E[E.length - 1], this.defaultActions[j] ? ot = this.defaultActions[j] : ((vt === null || typeof vt > "u") && (vt = Dt()), ot = G[j] && G[j][vt]), typeof ot > "u" || !ot.length || !ot[0]) {
|
||
var P = "";
|
||
Ot = [];
|
||
for (ut in G[j])
|
||
this.terminals_[ut] && ut > D && Ot.push("'" + this.terminals_[ut] + "'");
|
||
M.showPosition ? P = "Parse error on line " + (W + 1) + `:
|
||
` + M.showPosition() + `
|
||
Expecting ` + Ot.join(", ") + ", got '" + (this.terminals_[vt] || vt) + "'" : P = "Parse error on line " + (W + 1) + ": Unexpected " + (vt == w ? "end of input" : "'" + (this.terminals_[vt] || vt) + "'"), this.parseError(P, {
|
||
text: M.match,
|
||
token: this.terminals_[vt] || vt,
|
||
line: M.yylineno,
|
||
loc: x,
|
||
expected: Ot
|
||
});
|
||
}
|
||
if (ot[0] instanceof Array && ot.length > 1)
|
||
throw new Error("Parse Error: multiple actions possible at state: " + j + ", token: " + vt);
|
||
switch (ot[0]) {
|
||
case 1:
|
||
E.push(vt), V.push(M.yytext), H.push(M.yylloc), E.push(ot[1]), vt = null, N = M.yyleng, Y = M.yytext, W = M.yylineno, x = M.yylloc;
|
||
break;
|
||
case 2:
|
||
if (_t = this.productions_[ot[1]][1], nt.$ = V[V.length - _t], nt._$ = {
|
||
first_line: H[H.length - (_t || 1)].first_line,
|
||
last_line: H[H.length - 1].last_line,
|
||
first_column: H[H.length - (_t || 1)].first_column,
|
||
last_column: H[H.length - 1].last_column
|
||
}, ct && (nt._$.range = [
|
||
H[H.length - (_t || 1)].range[0],
|
||
H[H.length - 1].range[1]
|
||
]), rt = this.performAction.apply(nt, [
|
||
Y,
|
||
N,
|
||
W,
|
||
m.yy,
|
||
ot[1],
|
||
V,
|
||
H
|
||
].concat(v)), typeof rt < "u")
|
||
return rt;
|
||
_t && (E = E.slice(0, -1 * _t * 2), V = V.slice(0, -1 * _t), H = H.slice(0, -1 * _t)), E.push(this.productions_[ot[1]][0]), V.push(nt.$), H.push(nt._$), K = G[E[E.length - 2]][E[E.length - 1]], E.push(K);
|
||
break;
|
||
case 3:
|
||
return !0;
|
||
}
|
||
}
|
||
return !0;
|
||
}
|
||
}, g = function() {
|
||
var k = {
|
||
EOF: 1,
|
||
parseError: function(L, E) {
|
||
if (this.yy.parser)
|
||
this.yy.parser.parseError(L, E);
|
||
else
|
||
throw new Error(L);
|
||
},
|
||
setInput: function(T, L) {
|
||
return this.yy = L || this.yy || {}, this._input = T, 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 T = this._input[0];
|
||
this.yytext += T, this.yyleng++, this.offset++, this.match += T, this.matched += T;
|
||
var L = T.match(/(?:\r\n?|\n).*/g);
|
||
return L ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), T;
|
||
},
|
||
unput: function(T) {
|
||
var L = T.length, E = T.split(/(?:\r\n?|\n)/g);
|
||
this._input = T + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - L), this.offset -= L;
|
||
var I = 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), E.length - 1 && (this.yylineno -= E.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: E ? (E.length === I.length ? this.yylloc.first_column : 0) + I[I.length - E.length].length - E[0].length : this.yylloc.first_column - L
|
||
}, this.options.ranges && (this.yylloc.range = [V[0], V[0] + this.yyleng - L]), 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(T) {
|
||
this.unput(this.match.slice(T));
|
||
},
|
||
pastInput: function() {
|
||
var T = this.matched.substr(0, this.matched.length - this.match.length);
|
||
return (T.length > 20 ? "..." : "") + T.substr(-20).replace(/\n/g, "");
|
||
},
|
||
upcomingInput: function() {
|
||
var T = this.match;
|
||
return T.length < 20 && (T += this._input.substr(0, 20 - T.length)), (T.substr(0, 20) + (T.length > 20 ? "..." : "")).replace(/\n/g, "");
|
||
},
|
||
showPosition: function() {
|
||
var T = this.pastInput(), L = new Array(T.length + 1).join("-");
|
||
return T + this.upcomingInput() + `
|
||
` + L + "^";
|
||
},
|
||
test_match: function(T, L) {
|
||
var E, I, 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))), I = T[0].match(/(?:\r\n?|\n).*/g), I && (this.yylineno += I.length), this.yylloc = {
|
||
first_line: this.yylloc.last_line,
|
||
last_line: this.yylineno + 1,
|
||
first_column: this.yylloc.last_column,
|
||
last_column: I ? I[I.length - 1].length - I[I.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + T[0].length
|
||
}, this.yytext += T[0], this.match += T[0], this.matches = T, 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(T[0].length), this.matched += T[0], E = this.performAction.call(this, this.yy, this, L, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), E)
|
||
return E;
|
||
if (this._backtrack) {
|
||
for (var H in V)
|
||
this[H] = V[H];
|
||
return !1;
|
||
}
|
||
return !1;
|
||
},
|
||
next: function() {
|
||
if (this.done)
|
||
return this.EOF;
|
||
this._input || (this.done = !0);
|
||
var T, L, E, I;
|
||
this._more || (this.yytext = "", this.match = "");
|
||
for (var V = this._currentRules(), H = 0; H < V.length; H++)
|
||
if (E = this._input.match(this.rules[V[H]]), E && (!L || E[0].length > L[0].length)) {
|
||
if (L = E, I = H, this.options.backtrack_lexer) {
|
||
if (T = this.test_match(E, V[H]), T !== !1)
|
||
return T;
|
||
if (this._backtrack) {
|
||
L = !1;
|
||
continue;
|
||
} else
|
||
return !1;
|
||
} else if (!this.options.flex)
|
||
break;
|
||
}
|
||
return L ? (T = this.test_match(L, V[I]), T !== !1 ? T : !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 L = this.next();
|
||
return L || this.lex();
|
||
},
|
||
begin: function(L) {
|
||
this.conditionStack.push(L);
|
||
},
|
||
popState: function() {
|
||
var L = this.conditionStack.length - 1;
|
||
return L > 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(L) {
|
||
return L = this.conditionStack.length - 1 - Math.abs(L || 0), L >= 0 ? this.conditionStack[L] : "INITIAL";
|
||
},
|
||
pushState: function(L) {
|
||
this.begin(L);
|
||
},
|
||
stateStackSize: function() {
|
||
return this.conditionStack.length;
|
||
},
|
||
options: { "case-insensitive": !0 },
|
||
performAction: function(L, E, I, V) {
|
||
switch (I) {
|
||
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 k;
|
||
}();
|
||
p.lexer = g;
|
||
function b() {
|
||
this.yy = {};
|
||
}
|
||
return b.prototype = p, p.Parser = b, new b();
|
||
}();
|
||
l0.parser = l0;
|
||
const MU = l0, NU = (t) => t.match(/^\s*journey/) !== null;
|
||
let Ma = "";
|
||
const Id = [], Ho = [], Go = [], BU = function(t, e, r) {
|
||
ze.parseDirective(this, t, e, r);
|
||
}, IU = function() {
|
||
Id.length = 0, Ho.length = 0, Ma = "", Go.length = 0, Dn();
|
||
}, OU = function(t) {
|
||
Ma = t, Id.push(t);
|
||
}, RU = function() {
|
||
return Id;
|
||
}, FU = function() {
|
||
let t = Ip();
|
||
const e = 100;
|
||
let r = 0;
|
||
for (; !t && r < e; )
|
||
t = Ip(), r++;
|
||
return Ho.push(...Go), Ho;
|
||
}, PU = function() {
|
||
const t = [];
|
||
return Ho.forEach((r) => {
|
||
r.people && t.push(...r.people);
|
||
}), [...new Set(t)].sort();
|
||
}, YU = 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 s = i.map((o) => o.trim()), a = {
|
||
section: Ma,
|
||
type: Ma,
|
||
people: s,
|
||
task: t,
|
||
score: n
|
||
};
|
||
Go.push(a);
|
||
}, VU = function(t) {
|
||
const e = {
|
||
section: Ma,
|
||
type: Ma,
|
||
description: t,
|
||
task: t,
|
||
classes: []
|
||
};
|
||
Ho.push(e);
|
||
}, Ip = function() {
|
||
const t = function(r) {
|
||
return Go[r].processed;
|
||
};
|
||
let e = !0;
|
||
for (const [r, n] of Go.entries())
|
||
t(r), e = e && n.processed;
|
||
return e;
|
||
}, UU = function() {
|
||
return PU();
|
||
}, Op = {
|
||
parseDirective: BU,
|
||
getConfig: () => X().journey,
|
||
clear: IU,
|
||
setDiagramTitle: Si,
|
||
getDiagramTitle: Ai,
|
||
setAccTitle: sn,
|
||
getAccTitle: Mn,
|
||
setAccDescription: Nn,
|
||
getAccDescription: Bn,
|
||
addSection: OU,
|
||
getSections: RU,
|
||
getTasks: FU,
|
||
addTask: YU,
|
||
addTaskOrg: VU,
|
||
getActors: UU
|
||
}, ju = 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), e.class !== void 0 && r.attr("class", e.class), r;
|
||
}, zU = 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 s(l) {
|
||
const u = l1().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 a(l) {
|
||
const u = l1().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 ? s(i) : e.score < 3 ? a(i) : o(i), n;
|
||
}, eb = 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), r.class !== void 0 && r.attr("class", r.class), e.title !== void 0 && r.append("title").text(e.title), r;
|
||
}, rb = function(t, e) {
|
||
const r = e.text.replace(/<br\s*\/?>/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), e.class !== void 0 && n.attr("class", e.class);
|
||
const i = n.append("tspan");
|
||
return i.attr("x", e.x + e.textMargin * 2), i.text(r), n;
|
||
}, WU = function(t, e) {
|
||
function r(i, s, a, o, l) {
|
||
return i + "," + s + " " + (i + a) + "," + s + " " + (i + a) + "," + (s + o - l) + " " + (i + a - l * 1.2) + "," + (s + o) + " " + i + "," + (s + 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, rb(t, e);
|
||
}, HU = function(t, e, r) {
|
||
const n = t.append("g"), i = Od();
|
||
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, ju(n, i), nb(r)(
|
||
e.text,
|
||
n,
|
||
i.x,
|
||
i.y,
|
||
i.width,
|
||
i.height,
|
||
{ class: "journey-section section-type-" + e.num },
|
||
r,
|
||
e.colour
|
||
);
|
||
};
|
||
let Rp = -1;
|
||
const GU = function(t, e, r) {
|
||
const n = e.x + r.width / 2, i = t.append("g");
|
||
Rp++;
|
||
const s = 300 + 5 * 30;
|
||
i.append("line").attr("id", "task" + Rp).attr("x1", n).attr("y1", e.y).attr("x2", n).attr("y2", s).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"), zU(i, {
|
||
cx: n,
|
||
cy: 300 + (5 - e.score) * 30,
|
||
score: e.score
|
||
});
|
||
const a = Od();
|
||
a.x = e.x, a.y = e.y, a.fill = e.fill, a.width = r.width, a.height = r.height, a.class = "task task-type-" + e.num, a.rx = 3, a.ry = 3, ju(i, a);
|
||
let o = e.x + 14;
|
||
e.people.forEach((l) => {
|
||
const u = e.actors[l].color, d = {
|
||
cx: o,
|
||
cy: e.y,
|
||
r: 7,
|
||
fill: u,
|
||
stroke: "#000",
|
||
title: l,
|
||
pos: e.actors[l].position
|
||
};
|
||
eb(i, d), o += 10;
|
||
}), nb(r)(
|
||
e.task,
|
||
i,
|
||
a.x,
|
||
a.y,
|
||
a.width,
|
||
a.height,
|
||
{ class: "task" },
|
||
r,
|
||
e.colour
|
||
);
|
||
}, qU = function(t, e) {
|
||
ju(t, {
|
||
x: e.startx,
|
||
y: e.starty,
|
||
width: e.stopx - e.startx,
|
||
height: e.stopy - e.starty,
|
||
fill: e.fill,
|
||
class: "rect"
|
||
}).lower();
|
||
}, jU = function() {
|
||
return {
|
||
x: 0,
|
||
y: 0,
|
||
fill: void 0,
|
||
"text-anchor": "start",
|
||
width: 100,
|
||
height: 100,
|
||
textMargin: 0,
|
||
rx: 0,
|
||
ry: 0
|
||
};
|
||
}, Od = function() {
|
||
return {
|
||
x: 0,
|
||
y: 0,
|
||
width: 100,
|
||
anchor: "start",
|
||
height: 100,
|
||
rx: 0,
|
||
ry: 0
|
||
};
|
||
}, nb = function() {
|
||
function t(i, s, a, o, l, u, d, f) {
|
||
const p = s.append("text").attr("x", a + l / 2).attr("y", o + u / 2 + 5).style("font-color", f).style("text-anchor", "middle").text(i);
|
||
n(p, d);
|
||
}
|
||
function e(i, s, a, o, l, u, d, f, p) {
|
||
const { taskFontSize: g, taskFontFamily: b } = f, k = i.split(/<br\s*\/?>/gi);
|
||
for (let T = 0; T < k.length; T++) {
|
||
const L = T * g - g * (k.length - 1) / 2, E = s.append("text").attr("x", a + l / 2).attr("y", o).attr("fill", p).style("text-anchor", "middle").style("font-size", g).style("font-family", b);
|
||
E.append("tspan").attr("x", a + l / 2).attr("dy", L).text(k[T]), E.attr("y", o + u / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), n(E, d);
|
||
}
|
||
}
|
||
function r(i, s, a, o, l, u, d, f) {
|
||
const p = s.append("switch"), b = p.append("foreignObject").attr("x", a).attr("y", o).attr("width", l).attr("height", u).attr("position", "fixed").append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
|
||
b.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(i), e(i, p, a, o, l, u, d, f), n(b, d);
|
||
}
|
||
function n(i, s) {
|
||
for (const a in s)
|
||
a in s && i.attr(a, s[a]);
|
||
}
|
||
return function(i) {
|
||
return i.textPlacement === "fo" ? r : i.textPlacement === "old" ? t : e;
|
||
};
|
||
}(), XU = 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");
|
||
}, qo = {
|
||
drawRect: ju,
|
||
drawCircle: eb,
|
||
drawSection: HU,
|
||
drawText: rb,
|
||
drawLabel: WU,
|
||
drawTask: GU,
|
||
drawBackgroundRect: qU,
|
||
getTextObj: jU,
|
||
getNoteRect: Od,
|
||
initGraphics: XU
|
||
}, $U = function(t) {
|
||
Object.keys(t).forEach(function(r) {
|
||
Xu[r] = t[r];
|
||
});
|
||
}, bi = {};
|
||
function KU(t) {
|
||
const e = X().journey;
|
||
let r = 60;
|
||
Object.keys(bi).forEach((n) => {
|
||
const i = bi[n].color, s = {
|
||
cx: 20,
|
||
cy: r,
|
||
r: 7,
|
||
fill: i,
|
||
stroke: "#000",
|
||
pos: bi[n].position
|
||
};
|
||
qo.drawCircle(t, s);
|
||
const a = {
|
||
x: 40,
|
||
y: r + 7,
|
||
fill: "#666",
|
||
text: n,
|
||
textMargin: e.boxTextMargin | 5
|
||
};
|
||
qo.drawText(t, a), r += 20;
|
||
});
|
||
}
|
||
const Xu = X().journey, hs = Xu.leftMargin, ZU = function(t, e, r, n) {
|
||
const i = X().journey;
|
||
n.db.clear(), n.parser.parse(t + `
|
||
`);
|
||
const s = X().securityLevel;
|
||
let a;
|
||
s === "sandbox" && (a = At("#i" + e));
|
||
const o = At(s === "sandbox" ? a.nodes()[0].contentDocument.body : "body");
|
||
Jr.init();
|
||
const l = o.select("#" + e);
|
||
qo.initGraphics(l);
|
||
const u = n.db.getTasks(), d = n.db.getDiagramTitle(), f = n.db.getActors();
|
||
for (const L in bi)
|
||
delete bi[L];
|
||
let p = 0;
|
||
f.forEach((L) => {
|
||
bi[L] = {
|
||
color: i.actorColours[p % i.actorColours.length],
|
||
position: p
|
||
}, p++;
|
||
}), KU(l), Jr.insert(0, 0, hs, Object.keys(bi).length * 50), QU(l, u, 0);
|
||
const g = Jr.getBounds();
|
||
d && l.append("text").text(d).attr("x", hs).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 25);
|
||
const b = g.stopy - g.starty + 2 * i.diagramMarginY, k = hs + g.stopx + 2 * i.diagramMarginX;
|
||
Ln(l, b, k, i.useMaxWidth), l.append("line").attr("x1", hs).attr("y1", i.height * 4).attr("x2", k - hs - 4).attr("y2", i.height * 4).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)");
|
||
const T = d ? 70 : 0;
|
||
l.attr("viewBox", `${g.startx} -25 ${k} ${b + T}`), l.attr("preserveAspectRatio", "xMinYMin meet"), l.attr("height", b + T + 25);
|
||
}, Jr = {
|
||
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) {
|
||
t[e] === void 0 ? t[e] = r : t[e] = n(r, t[e]);
|
||
},
|
||
updateBounds: function(t, e, r, n) {
|
||
const i = X().journey, s = this;
|
||
let a = 0;
|
||
function o(l) {
|
||
return function(d) {
|
||
a++;
|
||
const f = s.sequenceItems.length - a + 1;
|
||
s.updateVal(d, "starty", e - f * i.boxMargin, Math.min), s.updateVal(d, "stopy", n + f * i.boxMargin, Math.max), s.updateVal(Jr.data, "startx", t - f * i.boxMargin, Math.min), s.updateVal(Jr.data, "stopx", r + f * i.boxMargin, Math.max), l !== "activation" && (s.updateVal(d, "startx", t - f * i.boxMargin, Math.min), s.updateVal(d, "stopx", r + f * i.boxMargin, Math.max), s.updateVal(Jr.data, "starty", e - f * i.boxMargin, Math.min), s.updateVal(Jr.data, "stopy", n + f * i.boxMargin, Math.max));
|
||
};
|
||
}
|
||
this.sequenceItems.forEach(o());
|
||
},
|
||
insert: function(t, e, r, n) {
|
||
const i = Math.min(t, r), s = Math.max(t, r), a = Math.min(e, n), o = Math.max(e, n);
|
||
this.updateVal(Jr.data, "startx", i, Math.min), this.updateVal(Jr.data, "starty", a, Math.min), this.updateVal(Jr.data, "stopx", s, Math.max), this.updateVal(Jr.data, "stopy", o, Math.max), this.updateBounds(i, a, s, o);
|
||
},
|
||
bumpVerticalPos: function(t) {
|
||
this.verticalPos = this.verticalPos + t, this.data.stopy = this.verticalPos;
|
||
},
|
||
getVerticalPos: function() {
|
||
return this.verticalPos;
|
||
},
|
||
getBounds: function() {
|
||
return this.data;
|
||
}
|
||
}, Wh = Xu.sectionFills, Fp = Xu.sectionColours, QU = function(t, e, r) {
|
||
const n = X().journey;
|
||
let i = "";
|
||
const s = n.height * 2 + n.diagramMarginY, a = r + s;
|
||
let o = 0, l = "#CCC", u = "black", d = 0;
|
||
for (const [f, p] of e.entries()) {
|
||
if (i !== p.section) {
|
||
l = Wh[o % Wh.length], d = o % Wh.length, u = Fp[o % Fp.length];
|
||
const b = {
|
||
x: f * n.taskMargin + f * n.width + hs,
|
||
y: 50,
|
||
text: p.section,
|
||
fill: l,
|
||
num: d,
|
||
colour: u
|
||
};
|
||
qo.drawSection(t, b, n), i = p.section, o++;
|
||
}
|
||
const g = p.people.reduce((b, k) => (bi[k] && (b[k] = bi[k]), b), {});
|
||
p.x = f * n.taskMargin + f * n.width + hs, p.y = a, p.width = n.diagramMarginX, p.height = n.diagramMarginY, p.colour = u, p.fill = l, p.num = d, p.actors = g, qo.drawTask(t, p, n), Jr.insert(p.x, p.y, p.x + p.width + n.taskMargin, 300 + 5 * 30);
|
||
}
|
||
}, Pp = {
|
||
setConf: $U,
|
||
draw: ZU
|
||
};
|
||
let Yp = {};
|
||
const JU = function(t) {
|
||
Yp = { ...Yp, ...t };
|
||
}, tz = (t, e, r) => {
|
||
try {
|
||
B.debug(`Renering svg for syntax error
|
||
`);
|
||
const n = At("#" + 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) {
|
||
B.error("Error while rendering info diagram"), B.error(gE(n));
|
||
}
|
||
}, Rd = {
|
||
setConf: JU,
|
||
draw: tz
|
||
};
|
||
let Vp = !1;
|
||
const al = () => {
|
||
Vp || (Vp = !0, dr(
|
||
"error",
|
||
{
|
||
db: {
|
||
clear: () => {
|
||
}
|
||
},
|
||
styles: Hy,
|
||
renderer: Rd,
|
||
parser: {
|
||
parser: { yy: {} },
|
||
parse: () => {
|
||
}
|
||
},
|
||
init: () => {
|
||
}
|
||
},
|
||
(t) => t.toLowerCase().trim() === "error"
|
||
), dr(
|
||
"c4",
|
||
{
|
||
parser: KC,
|
||
db: om,
|
||
renderer: y2,
|
||
styles: Zy,
|
||
init: (t) => {
|
||
y2.setConf(t.c4);
|
||
}
|
||
},
|
||
ZC
|
||
), dr(
|
||
"class",
|
||
{
|
||
parser: m2,
|
||
db: Zs,
|
||
renderer: AI,
|
||
styles: uo,
|
||
init: (t) => {
|
||
t.class || (t.class = {}), t.class.arrowMarkerAbsolute = t.arrowMarkerAbsolute, Zs.clear();
|
||
}
|
||
},
|
||
W9
|
||
), dr(
|
||
"classDiagram",
|
||
{
|
||
parser: m2,
|
||
db: Zs,
|
||
renderer: HO,
|
||
styles: uo,
|
||
init: (t) => {
|
||
t.class || (t.class = {}), t.class.arrowMarkerAbsolute = t.arrowMarkerAbsolute, Zs.clear();
|
||
}
|
||
},
|
||
H9
|
||
), dr(
|
||
"er",
|
||
{
|
||
parser: GO,
|
||
db: eR,
|
||
renderer: mR,
|
||
styles: Wy
|
||
},
|
||
qO
|
||
), dr(
|
||
"gantt",
|
||
{
|
||
parser: VF,
|
||
db: Ed,
|
||
renderer: vP,
|
||
styles: Gy
|
||
},
|
||
UF
|
||
), dr(
|
||
"info",
|
||
{
|
||
parser: kP,
|
||
db: SP,
|
||
renderer: LP,
|
||
styles: qy
|
||
},
|
||
DP
|
||
), dr(
|
||
"pie",
|
||
{
|
||
parser: MP,
|
||
db: VP,
|
||
renderer: zP,
|
||
styles: jy
|
||
},
|
||
NP
|
||
), dr(
|
||
"requirement",
|
||
{
|
||
parser: WP,
|
||
db: cY,
|
||
renderer: bY,
|
||
styles: Xy
|
||
},
|
||
HP
|
||
), dr(
|
||
"sequence",
|
||
{
|
||
parser: _Y,
|
||
db: Tp,
|
||
renderer: Cp,
|
||
styles: $y,
|
||
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."
|
||
);
|
||
Tp.setWrap(t.wrap), Cp.setConf(t.sequence);
|
||
}
|
||
},
|
||
xY
|
||
), dr(
|
||
"state",
|
||
{
|
||
parser: Sp,
|
||
db: hi,
|
||
renderer: aU,
|
||
styles: Bc,
|
||
init: (t) => {
|
||
t.state || (t.state = {}), t.state.arrowMarkerAbsolute = t.arrowMarkerAbsolute, hi.clear();
|
||
}
|
||
},
|
||
pV
|
||
), dr(
|
||
"stateDiagram",
|
||
{
|
||
parser: Sp,
|
||
db: hi,
|
||
renderer: DU,
|
||
styles: Bc,
|
||
init: (t) => {
|
||
t.state || (t.state = {}), t.state.arrowMarkerAbsolute = t.arrowMarkerAbsolute, hi.clear();
|
||
}
|
||
},
|
||
gV
|
||
), dr(
|
||
"journey",
|
||
{
|
||
parser: MU,
|
||
db: Op,
|
||
renderer: Pp,
|
||
styles: Ky,
|
||
init: (t) => {
|
||
Pp.setConf(t.journey), Op.clear();
|
||
}
|
||
},
|
||
NU
|
||
), dr(
|
||
"flowchart",
|
||
{
|
||
parser: bp,
|
||
db: ci,
|
||
renderer: Yh,
|
||
styles: Nc,
|
||
init: (t) => {
|
||
t.flowchart || (t.flowchart = {}), t.flowchart.arrowMarkerAbsolute = t.arrowMarkerAbsolute, RF.setConf(t.flowchart), ci.clear(), ci.setGen("gen-1");
|
||
}
|
||
},
|
||
bR
|
||
), dr(
|
||
"flowchart-v2",
|
||
{
|
||
parser: bp,
|
||
db: ci,
|
||
renderer: Yh,
|
||
styles: Nc,
|
||
init: (t) => {
|
||
t.flowchart || (t.flowchart = {}), t.flowchart.arrowMarkerAbsolute = t.arrowMarkerAbsolute, Yy({ flowchart: { arrowMarkerAbsolute: t.arrowMarkerAbsolute } }), Yh.setConf(t.flowchart), ci.clear(), ci.setGen("gen-2");
|
||
}
|
||
},
|
||
_R
|
||
), dr(
|
||
"gitGraph",
|
||
{ parser: _C, db: YC, renderer: jC, styles: $C },
|
||
xC
|
||
));
|
||
};
|
||
class c0 {
|
||
constructor(e, r) {
|
||
Us(this, "type", "graph");
|
||
Us(this, "parser");
|
||
Us(this, "renderer");
|
||
Us(this, "db");
|
||
Us(this, "detectTypeFailed", !1);
|
||
var a, o;
|
||
this.txt = e;
|
||
const n = X();
|
||
this.txt = e;
|
||
try {
|
||
this.type = N0(e, n);
|
||
} catch (l) {
|
||
this.handleError(l, r), this.type = "error", this.detectTypeFailed = !0;
|
||
}
|
||
const i = Jy(this.type);
|
||
B.debug("Type " + this.type), this.db = i.db, (o = (a = this.db).clear) == null || o.call(a), this.renderer = i.renderer, this.parser = i.parser;
|
||
const s = this.parser.parse.bind(this.parser);
|
||
this.parser.parse = (l) => s(j7(l, this.db)), this.parser.parser.yy = this.db, i.init && (i.init(n), B.debug("Initialized diagram " + this.type, n)), this.txt += `
|
||
`, this.parse(this.txt, r);
|
||
}
|
||
parse(e, r) {
|
||
var n, i;
|
||
if (this.detectTypeFailed)
|
||
return !1;
|
||
try {
|
||
return e = e + `
|
||
`, (i = (n = this.db).clear) == null || i.call(n), this.parser.parse(e), !0;
|
||
} catch (s) {
|
||
this.handleError(s, r);
|
||
}
|
||
return !1;
|
||
}
|
||
handleError(e, r) {
|
||
if (r === void 0)
|
||
throw e;
|
||
if (I0(e)) {
|
||
r(e.str, e.hash);
|
||
return;
|
||
}
|
||
r(e);
|
||
}
|
||
getParser() {
|
||
return this.parser;
|
||
}
|
||
getType() {
|
||
return this.type;
|
||
}
|
||
}
|
||
const Fd = (t, e) => {
|
||
const r = N0(t, X());
|
||
try {
|
||
Jy(r);
|
||
} catch {
|
||
const i = K7(r);
|
||
if (!i)
|
||
throw new Error(`Diagram ${r} not found.`);
|
||
return i().then(({ diagram: s }) => (dr(r, s, void 0), new c0(t, e)));
|
||
}
|
||
return new c0(t, e);
|
||
}, Pd = c0;
|
||
function ez(t, e) {
|
||
ia(e) || t.attr("aria-roledescription", e);
|
||
}
|
||
function rz(t, e, r, n) {
|
||
if (t.insert !== void 0)
|
||
if (e || r) {
|
||
if (r) {
|
||
const i = "chart-desc-" + n;
|
||
t.attr("aria-describedby", i), t.insert("desc", ":first-child").attr("id", i).text(r);
|
||
}
|
||
if (e) {
|
||
const i = "chart-title-" + n;
|
||
t.attr("aria-labelledby", i), t.insert("title", ":first-child").attr("id", i).text(e);
|
||
}
|
||
} else
|
||
return;
|
||
}
|
||
const Yd = ["graph", "flowchart", "flowchart-v2", "stateDiagram", "stateDiagram-v2"], ib = "graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa", sb = "sandbox", ab = "loose", nz = "http://www.w3.org/2000/svg", ob = "http://www.w3.org/1999/xlink", lb = "http://www.w3.org/1999/xhtml", iz = "100%", sz = "100%", az = "border:0;margin:0;", oz = "margin:0", lz = "allow-top-navigation-by-user-activation allow-popups", cz = 'The "iframe" tag is not supported by your browser.', cb = ["foreignobject"], ub = ["dominant-baseline"];
|
||
function uz(t, e) {
|
||
return al(), new Pd(t, e).parse(t, e);
|
||
}
|
||
async function hz(t, e) {
|
||
return al(), (await Fd(t, e)).parse(t, e);
|
||
}
|
||
const hb = 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;
|
||
}, Vd = function(t) {
|
||
let e = t;
|
||
return e = e.replace(/fl°°/g, "&#"), e = e.replace(/fl°/g, "&"), e = e.replace(/¶ß/g, ";"), e;
|
||
}, Up = (t, e, r = []) => `
|
||
.${t} ${e} { ${r.join(" !important; ")} !important; }`, dz = (t, e, r = {}) => {
|
||
var i;
|
||
let n = "";
|
||
if (t.themeCSS !== void 0 && (n += `
|
||
${t.themeCSS}`), t.fontFamily !== void 0 && (n += `
|
||
:root { --mermaid-font-family: ${t.fontFamily}}`), t.altFontFamily !== void 0 && (n += `
|
||
:root { --mermaid-alt-font-family: ${t.altFontFamily}}`), !ia(r) && Yd.includes(e)) {
|
||
const l = t.htmlLabels || ((i = t.flowchart) == null ? void 0 : i.htmlLabels) ? ["> *", "span"] : ["rect", "polygon", "ellipse", "circle", "path"];
|
||
for (const u in r) {
|
||
const d = r[u];
|
||
ia(d.styles) || l.forEach((f) => {
|
||
n += Up(d.id, f, d.styles);
|
||
}), ia(d.textStyles) || (n += Up(d.id, "tspan", d.textStyles));
|
||
}
|
||
}
|
||
return n;
|
||
}, db = (t, e, r, n) => {
|
||
const i = dz(t, e, r), s = gC(e, i, t.themeVariables);
|
||
return b1(LE(`${n}{${s}}`), ME);
|
||
}, fb = (t = "", e, r) => {
|
||
let n = t;
|
||
return !r && !e && (n = n.replace(/marker-end="url\(.*?#/g, 'marker-end="url(#')), n = Vd(n), n = n.replace(/<br>/g, "<br/>"), n;
|
||
}, pb = (t = "", e) => {
|
||
const r = e ? e.viewBox.baseVal.height + "px" : sz, n = btoa('<body style="' + oz + '">' + t + "</body>");
|
||
return `<iframe style="width:${iz};height:${r};${az}" src="data:text/html;base64,${n}" sandbox="${lz}">
|
||
${cz}
|
||
</iframe>`;
|
||
}, nu = (t, e, r, n, i) => {
|
||
const s = t.append("div");
|
||
s.attr("id", r), n && s.attr("style", n);
|
||
const a = s.append("svg").attr("id", e).attr("width", "100%").attr("xmlns", nz);
|
||
return i && a.attr("xmlns:xlink", i), a.append("g"), t;
|
||
};
|
||
function iu(t, e) {
|
||
return t.append("iframe").attr("id", e).attr("style", "width: 100%; height: 100%;").attr("sandbox", "");
|
||
}
|
||
const gb = (t, e, r, n) => {
|
||
var i, s, a;
|
||
(i = t.getElementById(e)) == null || i.remove(), (s = t.getElementById(r)) == null || s.remove(), (a = t.getElementById(n)) == null || a.remove();
|
||
}, fz = function(t, e, r, n) {
|
||
var m, Q, x, ct, Dt;
|
||
al(), Ao();
|
||
const i = ye.detectInit(e);
|
||
i && (vs(i), F0(i));
|
||
const s = X();
|
||
B.debug(s), e.length > ((m = s == null ? void 0 : s.maxTextSize) != null ? m : 5e4) && (e = ib), e = e.replace(/\r\n?/g, `
|
||
`);
|
||
const a = "#" + t, o = "i" + t, l = "#" + o, u = "d" + t, d = "#" + u;
|
||
let f = At("body");
|
||
const p = s.securityLevel === sb, g = s.securityLevel === ab, b = s.fontFamily;
|
||
if (n !== void 0) {
|
||
if (n && (n.innerHTML = ""), p) {
|
||
const vt = iu(At(n), o);
|
||
f = At(vt.nodes()[0].contentDocument.body), f.node().style.margin = 0;
|
||
} else
|
||
f = At(n);
|
||
nu(f, t, u, `font-family: ${b}`, ob);
|
||
} else {
|
||
if (gb(document, t, u, o), p) {
|
||
const vt = iu(At("body"), o);
|
||
f = At(vt.nodes()[0].contentDocument.body), f.node().style.margin = 0;
|
||
} else
|
||
f = At("body");
|
||
nu(f, t, u);
|
||
}
|
||
e = hb(e);
|
||
let k, T;
|
||
try {
|
||
if (k = Fd(e), "then" in k)
|
||
throw new Error("Diagram is a promise. Use renderAsync.");
|
||
} catch (vt) {
|
||
k = new Pd("error"), T = vt;
|
||
}
|
||
const L = f.select(d).node(), E = k.type, I = L.firstChild, V = I.firstChild, H = Yd.includes(E) ? k.renderer.getClasses(e, k) : {}, G = db(
|
||
s,
|
||
E,
|
||
H,
|
||
a
|
||
), Y = document.createElement("style");
|
||
Y.innerHTML = G, I.insertBefore(Y, V);
|
||
try {
|
||
k.renderer.draw(e, t, Mc.version, k);
|
||
} catch (vt) {
|
||
throw Rd.draw(e, t, Mc.version), vt;
|
||
}
|
||
const W = f.select(`${d} svg`), N = (x = (Q = k.db).getAccTitle) == null ? void 0 : x.call(Q), D = (Dt = (ct = k.db).getAccDescription) == null ? void 0 : Dt.call(ct);
|
||
yb(E, W, N, D), f.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns", lb);
|
||
let w = f.select(d).node().innerHTML;
|
||
if (B.debug("config.arrowMarkerAbsolute", s.arrowMarkerAbsolute), w = fb(w, p, gr(s.arrowMarkerAbsolute)), p) {
|
||
const vt = f.select(d + " svg").node();
|
||
w = pb(w, vt);
|
||
} else
|
||
g || (w = wo.sanitize(w, {
|
||
ADD_TAGS: cb,
|
||
ADD_ATTR: ub
|
||
}));
|
||
if (r !== void 0)
|
||
switch (E) {
|
||
case "flowchart":
|
||
case "flowchart-v2":
|
||
r(w, ci.bindFunctions);
|
||
break;
|
||
case "gantt":
|
||
r(w, Ed.bindFunctions);
|
||
break;
|
||
case "class":
|
||
case "classDiagram":
|
||
r(w, Zs.bindFunctions);
|
||
break;
|
||
default:
|
||
r(w);
|
||
}
|
||
else
|
||
B.debug("CB = undefined!");
|
||
E4();
|
||
const M = At(p ? l : d).node();
|
||
if (M && "remove" in M && M.remove(), T)
|
||
throw T;
|
||
return w;
|
||
}, pz = async function(t, e, r, n) {
|
||
var m, Q, x, ct, Dt;
|
||
al(), Ao();
|
||
const i = ye.detectInit(e);
|
||
i && (vs(i), F0(i));
|
||
const s = X();
|
||
B.debug(s), e.length > ((m = s == null ? void 0 : s.maxTextSize) != null ? m : 5e4) && (e = ib), e = e.replace(/\r\n?/g, `
|
||
`);
|
||
const a = "#" + t, o = "i" + t, l = "#" + o, u = "d" + t, d = "#" + u;
|
||
let f = At("body");
|
||
const p = s.securityLevel === sb, g = s.securityLevel === ab, b = s.fontFamily;
|
||
if (n !== void 0) {
|
||
if (n && (n.innerHTML = ""), p) {
|
||
const vt = iu(At(n), o);
|
||
f = At(vt.nodes()[0].contentDocument.body), f.node().style.margin = 0;
|
||
} else
|
||
f = At(n);
|
||
nu(f, t, u, `font-family: ${b}`, ob);
|
||
} else {
|
||
if (gb(document, t, u, o), p) {
|
||
const vt = iu(At("body"), o);
|
||
f = At(vt.nodes()[0].contentDocument.body), f.node().style.margin = 0;
|
||
} else
|
||
f = At("body");
|
||
nu(f, t, u);
|
||
}
|
||
e = hb(e);
|
||
let k, T;
|
||
try {
|
||
k = await Fd(e);
|
||
} catch (vt) {
|
||
k = new Pd("error"), T = vt;
|
||
}
|
||
const L = f.select(d).node(), E = k.type, I = L.firstChild, V = I.firstChild, H = Yd.includes(E) ? k.renderer.getClasses(e, k) : {}, G = db(
|
||
s,
|
||
E,
|
||
H,
|
||
a
|
||
), Y = document.createElement("style");
|
||
Y.innerHTML = G, I.insertBefore(Y, V);
|
||
try {
|
||
await k.renderer.draw(e, t, Mc.version, k);
|
||
} catch (vt) {
|
||
throw Rd.draw(e, t, Mc.version), vt;
|
||
}
|
||
const W = f.select(`${d} svg`), N = (x = (Q = k.db).getAccTitle) == null ? void 0 : x.call(Q), D = (Dt = (ct = k.db).getAccDescription) == null ? void 0 : Dt.call(ct);
|
||
yb(E, W, N, D), f.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns", lb);
|
||
let w = f.select(d).node().innerHTML;
|
||
if (B.debug("config.arrowMarkerAbsolute", s.arrowMarkerAbsolute), w = fb(w, p, gr(s.arrowMarkerAbsolute)), p) {
|
||
const vt = f.select(d + " svg").node();
|
||
w = pb(w, vt);
|
||
} else
|
||
g || (w = wo.sanitize(w, {
|
||
ADD_TAGS: cb,
|
||
ADD_ATTR: ub
|
||
}));
|
||
if (r !== void 0)
|
||
switch (E) {
|
||
case "flowchart":
|
||
case "flowchart-v2":
|
||
r(w, ci.bindFunctions);
|
||
break;
|
||
case "gantt":
|
||
r(w, Ed.bindFunctions);
|
||
break;
|
||
case "class":
|
||
case "classDiagram":
|
||
r(w, Zs.bindFunctions);
|
||
break;
|
||
default:
|
||
r(w);
|
||
}
|
||
else
|
||
B.debug("CB = undefined!");
|
||
E4();
|
||
const M = At(p ? l : d).node();
|
||
if (M && "remove" in M && M.remove(), T)
|
||
throw T;
|
||
return w;
|
||
};
|
||
let os = {};
|
||
const gz = function(t, e, r, n) {
|
||
try {
|
||
if (e !== void 0)
|
||
switch (e = e.trim(), r) {
|
||
case "open_directive":
|
||
os = {};
|
||
break;
|
||
case "type_directive":
|
||
if (!os)
|
||
throw new Error("currentDirective is undefined");
|
||
os.type = e.toLowerCase();
|
||
break;
|
||
case "arg_directive":
|
||
if (!os)
|
||
throw new Error("currentDirective is undefined");
|
||
os.args = JSON.parse(e);
|
||
break;
|
||
case "close_directive":
|
||
yz(t, os, n), os = void 0;
|
||
break;
|
||
}
|
||
} catch (i) {
|
||
B.error(
|
||
`Error while rendering sequenceDiagram directive: ${e} jison context: ${r}`
|
||
), B.error(i.message);
|
||
}
|
||
}, yz = function(t, e, r) {
|
||
switch (B.debug(`Directive type=${e.type} with args:`, e.args), e.type) {
|
||
case "init":
|
||
case "initialize": {
|
||
["config"].forEach((n) => {
|
||
e.args[n] !== void 0 && (r === "flowchart-v2" && (r = "flowchart"), e.args[r] = e.args[n], delete e.args[n]);
|
||
}), B.debug("sanitize in handleDirective", e.args), vs(e.args), B.debug("sanitize in handleDirective (done)", e.args), F0(e.args);
|
||
break;
|
||
}
|
||
case "wrap":
|
||
case "nowrap":
|
||
t && t.setWrap && t.setWrap(e.type === "wrap");
|
||
break;
|
||
case "themeCss":
|
||
B.warn("themeCss encountered");
|
||
break;
|
||
default:
|
||
B.warn(
|
||
`Unhandled directive: source: '%%{${e.type}: ${JSON.stringify(
|
||
e.args ? e.args : {}
|
||
)}}%%`,
|
||
e
|
||
);
|
||
break;
|
||
}
|
||
};
|
||
function mz(t = {}) {
|
||
var r;
|
||
(t == null ? void 0 : t.fontFamily) && !((r = t.themeVariables) != null && r.fontFamily) && (t.themeVariables = { fontFamily: t.fontFamily }), KE(t), (t == null ? void 0 : t.theme) && t.theme in _i ? t.themeVariables = _i[t.theme].getThemeVariables(
|
||
t.themeVariables
|
||
) : t && (t.themeVariables = _i.default.getThemeVariables(t.themeVariables));
|
||
const e = typeof t == "object" ? $E(t) : Py();
|
||
u0(e.logLevel), al();
|
||
}
|
||
function yb(t, e, r, n) {
|
||
ez(e, t), rz(e, r, n, e.attr("id"));
|
||
}
|
||
const ze = Object.freeze({
|
||
render: fz,
|
||
renderAsync: pz,
|
||
parse: uz,
|
||
parseAsync: hz,
|
||
parseDirective: gz,
|
||
initialize: mz,
|
||
getConfig: X,
|
||
setConfig: Yy,
|
||
getSiteConfig: Py,
|
||
updateSiteConfig: ZE,
|
||
reset: () => {
|
||
Ao();
|
||
},
|
||
globalReset: () => {
|
||
Ao(_a);
|
||
},
|
||
defaultConfig: _a
|
||
});
|
||
u0(X().logLevel);
|
||
Ao(X());
|
||
let mb = !1;
|
||
const bz = async function(t, e, r) {
|
||
try {
|
||
mb ? await xb(t, e, r) : _b(t, e, r);
|
||
} catch (n) {
|
||
B.warn("Syntax Error rendering"), I0(n) && B.warn(n.str), Cn.parseError && Cn.parseError(n);
|
||
}
|
||
}, bb = (t, e, r) => {
|
||
B.warn(t), I0(t) ? (r && r(t.str, t.hash), e.push({ ...t, message: t.str, error: t })) : (r && r(t), t instanceof Error && e.push({
|
||
str: t.message,
|
||
message: t.message,
|
||
hash: t.name,
|
||
error: t
|
||
}));
|
||
}, _b = function(t, e, r) {
|
||
const n = ze.getConfig();
|
||
t && (Cn.sequenceConfig = t), B.debug(`${r ? "" : "No "}Callback function found`);
|
||
let i;
|
||
if (e === void 0)
|
||
i = document.querySelectorAll(".mermaid");
|
||
else if (typeof e == "string")
|
||
i = document.querySelectorAll(e);
|
||
else if (e instanceof HTMLElement)
|
||
i = [e];
|
||
else if (e instanceof NodeList)
|
||
i = e;
|
||
else
|
||
throw new Error("Invalid argument nodes for mermaid.init");
|
||
B.debug(`Found ${i.length} diagrams`), (t == null ? void 0 : t.startOnLoad) !== void 0 && (B.debug("Start On Load: " + (t == null ? void 0 : t.startOnLoad)), ze.updateSiteConfig({ startOnLoad: t == null ? void 0 : t.startOnLoad }));
|
||
const s = new ye.initIdGenerator(n.deterministicIds, n.deterministicIDSeed);
|
||
let a;
|
||
const o = [];
|
||
for (const l of Array.from(i)) {
|
||
B.info("Rendering diagram: " + l.id);
|
||
/*! Check if previously processed */
|
||
if (l.getAttribute("data-processed"))
|
||
continue;
|
||
l.setAttribute("data-processed", "true");
|
||
const u = `mermaid-${s.next()}`;
|
||
a = l.innerHTML, a = ye.entityDecode(a).trim().replace(/<br\s*\/?>/gi, "<br/>");
|
||
const d = ye.detectInit(a);
|
||
d && B.debug("Detected early reinit: ", d);
|
||
try {
|
||
ze.render(
|
||
u,
|
||
a,
|
||
(f, p) => {
|
||
l.innerHTML = f, r !== void 0 && r(u), p && p(l);
|
||
},
|
||
l
|
||
);
|
||
} catch (f) {
|
||
bb(f, o, Cn.parseError);
|
||
}
|
||
}
|
||
if (o.length > 0)
|
||
throw o[0];
|
||
}, _z = (t) => {
|
||
for (const { id: e, detector: r, loader: n } of t)
|
||
Ty(e, r, n);
|
||
}, xz = async (t) => {
|
||
B.debug(`Loading ${t.length} external diagrams`);
|
||
const r = (await Promise.allSettled(
|
||
t.map(async ({ id: n, detector: i, loader: s }) => {
|
||
const { diagram: a } = await s();
|
||
dr(n, a, i);
|
||
})
|
||
)).filter((n) => n.status === "rejected");
|
||
if (r.length > 0) {
|
||
B.error(`Failed to load ${r.length} external diagrams`);
|
||
for (const n of r)
|
||
B.error(n);
|
||
throw new Error(`Failed to load ${r.length} external diagrams`);
|
||
}
|
||
}, xb = async function(t, e, r) {
|
||
const n = ze.getConfig();
|
||
t && (Cn.sequenceConfig = t), B.debug(`${r ? "" : "No "}Callback function found`);
|
||
let i;
|
||
if (e === void 0)
|
||
i = document.querySelectorAll(".mermaid");
|
||
else if (typeof e == "string")
|
||
i = document.querySelectorAll(e);
|
||
else if (e instanceof HTMLElement)
|
||
i = [e];
|
||
else if (e instanceof NodeList)
|
||
i = e;
|
||
else
|
||
throw new Error("Invalid argument nodes for mermaid.init");
|
||
B.debug(`Found ${i.length} diagrams`), (t == null ? void 0 : t.startOnLoad) !== void 0 && (B.debug("Start On Load: " + (t == null ? void 0 : t.startOnLoad)), ze.updateSiteConfig({ startOnLoad: t == null ? void 0 : t.startOnLoad }));
|
||
const s = new ye.initIdGenerator(n.deterministicIds, n.deterministicIDSeed);
|
||
let a;
|
||
const o = [];
|
||
for (const l of Array.from(i)) {
|
||
B.info("Rendering diagram: " + l.id);
|
||
/*! Check if previously processed */
|
||
if (l.getAttribute("data-processed"))
|
||
continue;
|
||
l.setAttribute("data-processed", "true");
|
||
const u = `mermaid-${s.next()}`;
|
||
a = l.innerHTML, a = ye.entityDecode(a).trim().replace(/<br\s*\/?>/gi, "<br/>");
|
||
const d = ye.detectInit(a);
|
||
d && B.debug("Detected early reinit: ", d);
|
||
try {
|
||
await ze.renderAsync(
|
||
u,
|
||
a,
|
||
(f, p) => {
|
||
l.innerHTML = f, r !== void 0 && r(u), p && p(l);
|
||
},
|
||
l
|
||
);
|
||
} catch (f) {
|
||
bb(f, o, Cn.parseError);
|
||
}
|
||
}
|
||
if (o.length > 0)
|
||
throw o[0];
|
||
}, vz = function(t) {
|
||
ze.initialize(t);
|
||
}, kz = async (t, {
|
||
lazyLoad: e = !0
|
||
} = {}) => {
|
||
e ? _z(t) : await xz(t), mb = !0;
|
||
}, vb = function() {
|
||
if (Cn.startOnLoad) {
|
||
const { startOnLoad: t } = ze.getConfig();
|
||
t && Cn.init();
|
||
}
|
||
};
|
||
if (typeof document < "u") {
|
||
/*!
|
||
* Wait for document loaded before starting the execution
|
||
*/
|
||
window.addEventListener("load", vb, !1);
|
||
}
|
||
const wz = function(t) {
|
||
Cn.parseError = t;
|
||
}, Tz = (t) => ze.parse(t, Cn.parseError), su = [];
|
||
let Hh = !1;
|
||
const kb = async () => {
|
||
if (!Hh) {
|
||
for (Hh = !0; su.length > 0; ) {
|
||
const t = su.shift();
|
||
if (t)
|
||
try {
|
||
await t();
|
||
} catch (e) {
|
||
B.error("Error executing queue", e);
|
||
}
|
||
}
|
||
Hh = !1;
|
||
}
|
||
}, Ez = (t) => new Promise((e, r) => {
|
||
const n = () => new Promise((i, s) => {
|
||
ze.parseAsync(t, Cn.parseError).then(
|
||
(a) => {
|
||
i(a), e(a);
|
||
},
|
||
(a) => {
|
||
B.error("Error parsing", a), s(a), r(a);
|
||
}
|
||
);
|
||
});
|
||
su.push(n), kb();
|
||
}), Cz = (t, e, r, n) => new Promise((i, s) => {
|
||
const a = () => new Promise((o, l) => {
|
||
ze.renderAsync(t, e, r, n).then(
|
||
(u) => {
|
||
o(u), i(u);
|
||
},
|
||
(u) => {
|
||
B.error("Error parsing", u), l(u), s(u);
|
||
}
|
||
);
|
||
});
|
||
su.push(a), kb();
|
||
}), Cn = {
|
||
startOnLoad: !0,
|
||
diagrams: {},
|
||
mermaidAPI: ze,
|
||
parse: Tz,
|
||
parseAsync: Ez,
|
||
render: ze.render,
|
||
renderAsync: Cz,
|
||
init: bz,
|
||
initThrowsErrors: _b,
|
||
initThrowsErrorsAsync: xb,
|
||
registerExternalDiagrams: kz,
|
||
initialize: vz,
|
||
parseError: void 0,
|
||
contentLoaded: vb,
|
||
setParseErrorHandler: wz
|
||
};
|
||
export {
|
||
Cn as default
|
||
};
|
||
//# sourceMappingURL=mermaid.esm.min.mjs.map
|