diff --git a/cmd/gopcomm/yap/component/GoplusMarkdown.js b/cmd/gopcomm/yap/component/GoplusMarkdown.js
new file mode 100644
index 00000000..73ccc50c
--- /dev/null
+++ b/cmd/gopcomm/yap/component/GoplusMarkdown.js
@@ -0,0 +1,112251 @@
+import { openBlock as Y7t, createElementBlock as J7t, createElementVNode as ofn } from "vue";
+var jy = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
+function v$(r) {
+ return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
+}
+function su(r, i) {
+ return r(i = { exports: {} }, i.exports), i.exports;
+}
+function lMe() {
+ throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");
+}
+var tO, Cpe, _ge = function(r) {
+ return r && r.Math == Math && r;
+}, Qi = _ge(typeof globalThis == "object" && globalThis) || _ge(typeof window == "object" && window) || _ge(typeof self == "object" && self) || _ge(typeof jy == "object" && jy) || /* @__PURE__ */ function() {
+ return this;
+}() || Function("return this")(), oh = function(r) {
+ try {
+ return !!r();
+ } catch {
+ return !0;
+ }
+}, sX = !oh(function() {
+ var r = (function() {
+ }).bind();
+ return typeof r != "function" || r.hasOwnProperty("prototype");
+}), Z7t = Function.prototype, qwt = Z7t.apply, Ywt = Z7t.call, gL = typeof Reflect == "object" && Reflect.apply || (sX ? Ywt.bind(qwt) : function() {
+ return Ywt.apply(qwt, arguments);
+}), e9t = Function.prototype, sfn = e9t.bind, cDe = e9t.call, cfn = sX && sfn.bind(cDe, cDe), Do = sX ? function(r) {
+ return r && cfn(r);
+} : function(r) {
+ return r && function() {
+ return cDe.apply(r, arguments);
+ };
+}, vf = function(r) {
+ return typeof r == "function";
+}, of = !oh(function() {
+ return Object.defineProperty({}, 1, { get: function() {
+ return 7;
+ } })[1] != 7;
+}), Ege = Function.prototype.call, rl = sX ? Ege.bind(Ege) : function() {
+ return Ege.apply(Ege, arguments);
+}, Jwt = {}.propertyIsEnumerable, Zwt = Object.getOwnPropertyDescriptor, _ie = { f: Zwt && !Jwt.call({ 1: 2 }, 1) ? function(r) {
+ var i = Zwt(this, r);
+ return !!i && i.enumerable;
+} : Jwt }, bk = function(r, i) {
+ return { enumerable: !(1 & r), configurable: !(2 & r), writable: !(4 & r), value: i };
+}, lfn = Do({}.toString), ufn = Do("".slice), BT = function(r) {
+ return ufn(lfn(r), 8, -1);
+}, uMe = Qi.Object, hfn = Do("".split), Mbe = oh(function() {
+ return !uMe("z").propertyIsEnumerable(0);
+}) ? function(r) {
+ return BT(r) == "String" ? hfn(r, "") : uMe(r);
+} : uMe, ffn = Qi.TypeError, DO = function(r) {
+ if (r == null)
+ throw ffn("Can't call method on " + r);
+ return r;
+}, v5 = function(r) {
+ return Mbe(DO(r));
+}, Id = function(r) {
+ return typeof r == "object" ? r !== null : vf(r);
+}, ql = {}, e3t = function(r) {
+ return vf(r) ? r : void 0;
+}, b2 = function(r, i) {
+ return arguments.length < 2 ? e3t(ql[r]) || e3t(Qi[r]) : ql[r] && ql[r][i] || Qi[r] && Qi[r][i];
+}, E1 = Do({}.isPrototypeOf), ST = b2("navigator", "userAgent") || "", t3t = Qi.process, n3t = Qi.Deno, r3t = t3t && t3t.versions || n3t && n3t.version, i3t = r3t && r3t.v8;
+i3t && (Cpe = (tO = i3t.split("."))[0] > 0 && tO[0] < 4 ? 1 : +(tO[0] + tO[1])), !Cpe && ST && (!(tO = ST.match(/Edge\/(\d+)/)) || tO[1] >= 74) && (tO = ST.match(/Chrome\/(\d+)/)) && (Cpe = +tO[1]);
+var MT = Cpe, aC = !!Object.getOwnPropertySymbols && !oh(function() {
+ var r = Symbol();
+ return !String(r) || !(Object(r) instanceof Symbol) || !Symbol.sham && MT && MT < 41;
+}), EPe = aC && !Symbol.sham && typeof Symbol.iterator == "symbol", dfn = Qi.Object, OG = EPe ? function(r) {
+ return typeof r == "symbol";
+} : function(r) {
+ var i = b2("Symbol");
+ return vf(i) && E1(i.prototype, dfn(r));
+}, Afn = Qi.String, Eie = function(r) {
+ try {
+ return Afn(r);
+ } catch {
+ return "Object";
+ }
+}, gfn = Qi.TypeError, Fh = function(r) {
+ if (vf(r))
+ return r;
+ throw gfn(Eie(r) + " is not a function");
+}, Cme = function(r, i) {
+ var o = r[i];
+ return o == null ? void 0 : Fh(o);
+}, pfn = Qi.TypeError, mfn = Object.defineProperty, a3t = "__core-js_shared__", kO = Qi[a3t] || function(r, i) {
+ try {
+ mfn(Qi, r, { value: i, configurable: !0, writable: !0 });
+ } catch {
+ Qi[r] = i;
+ }
+ return i;
+}(a3t, {}), NO = su(function(r) {
+ (r.exports = function(i, o) {
+ return kO[i] || (kO[i] = o !== void 0 ? o : {});
+ })("versions", []).push({ version: "3.22.6", mode: "pure", copyright: "© 2014-2022 Denis Pushkarev (zloirock.ru)", license: "https://github.com/zloirock/core-js/blob/v3.22.6/LICENSE", source: "https://github.com/zloirock/core-js" });
+}), bfn = Qi.Object, y5 = function(r) {
+ return bfn(DO(r));
+}, vfn = Do({}.hasOwnProperty), nl = Object.hasOwn || function(r, i) {
+ return vfn(y5(r), i);
+}, yfn = 0, wfn = Math.random(), kfn = Do(1 .toString), $re = function(r) {
+ return "Symbol(" + (r === void 0 ? "" : r) + ")_" + kfn(++yfn + wfn, 36);
+}, yne = NO("wks"), e$ = Qi.Symbol, o3t = e$ && e$.for, xfn = EPe ? e$ : e$ && e$.withoutSetter || $re, TA = function(r) {
+ if (!nl(yne, r) || !aC && typeof yne[r] != "string") {
+ var i = "Symbol." + r;
+ aC && nl(e$, r) ? yne[r] = e$[r] : yne[r] = EPe && o3t ? o3t(i) : xfn(i);
+ }
+ return yne[r];
+}, Cfn = Qi.TypeError, _fn = TA("toPrimitive"), Efn = function(r, i) {
+ if (!Id(r) || OG(r))
+ return r;
+ var o, l = Cme(r, _fn);
+ if (l) {
+ if (i === void 0 && (i = "default"), o = rl(l, r, i), !Id(o) || OG(o))
+ return o;
+ throw Cfn("Can't convert object to primitive value");
+ }
+ return i === void 0 && (i = "number"), function(f, g) {
+ var A, b;
+ if (g === "string" && vf(A = f.toString) && !Id(b = rl(A, f)) || vf(A = f.valueOf) && !Id(b = rl(A, f)) || g !== "string" && vf(A = f.toString) && !Id(b = rl(A, f)))
+ return b;
+ throw pfn("Can't convert object to primitive value");
+ }(r, i);
+}, a$ = function(r) {
+ var i = Efn(r, "string");
+ return OG(i) ? i : i + "";
+}, lDe = Qi.document, Tfn = Id(lDe) && Id(lDe.createElement), _me = function(r) {
+ return Tfn ? lDe.createElement(r) : {};
+}, t9t = !of && !oh(function() {
+ return Object.defineProperty(_me("div"), "a", { get: function() {
+ return 7;
+ } }).a != 7;
+}), s3t = Object.getOwnPropertyDescriptor, DT = { f: of ? s3t : function(r, i) {
+ if (r = v5(r), i = a$(i), t9t)
+ try {
+ return s3t(r, i);
+ } catch {
+ }
+ if (nl(r, i))
+ return bk(!rl(_ie.f, r, i), r[i]);
+} }, Bfn = /#|\.prototype\./, Tie = function(r, i) {
+ var o = Lfn[Sfn(r)];
+ return o == Mfn || o != Ifn && (vf(i) ? oh(i) : !!i);
+}, Sfn = Tie.normalize = function(r) {
+ return String(r).replace(Bfn, ".").toLowerCase();
+}, Lfn = Tie.data = {}, Ifn = Tie.NATIVE = "N", Mfn = Tie.POLYFILL = "P", n9t = Tie, Ffn = Do(Do.bind), hm = function(r, i) {
+ return Fh(r), i === void 0 ? r : sX ? Ffn(r, i) : function() {
+ return r.apply(i, arguments);
+ };
+}, r9t = of && oh(function() {
+ return Object.defineProperty(function() {
+ }, "prototype", { value: 42, writable: !1 }).prototype != 42;
+}), Ofn = Qi.String, Dfn = Qi.TypeError, Oh = function(r) {
+ if (Id(r))
+ return r;
+ throw Dfn(Ofn(r) + " is not an object");
+}, Nfn = Qi.TypeError, hMe = Object.defineProperty, Pfn = Object.getOwnPropertyDescriptor, fMe = "enumerable", dMe = "configurable", AMe = "writable", _3 = { f: of ? r9t ? function(r, i, o) {
+ if (Oh(r), i = a$(i), Oh(o), typeof r == "function" && i === "prototype" && "value" in o && AMe in o && !o[AMe]) {
+ var l = Pfn(r, i);
+ l && l[AMe] && (r[i] = o.value, o = { configurable: dMe in o ? o[dMe] : l[dMe], enumerable: fMe in o ? o[fMe] : l[fMe], writable: !1 });
+ }
+ return hMe(r, i, o);
+} : hMe : function(r, i, o) {
+ if (Oh(r), i = a$(i), Oh(o), t9t)
+ try {
+ return hMe(r, i, o);
+ } catch {
+ }
+ if ("get" in o || "set" in o)
+ throw Nfn("Accessors not supported");
+ return "value" in o && (r[i] = o.value), r;
+} }, Uy = of ? function(r, i, o) {
+ return _3.f(r, i, bk(1, o));
+} : function(r, i, o) {
+ return r[i] = o, r;
+}, Rfn = DT.f, Qfn = function(r) {
+ var i = function(o, l, f) {
+ if (this instanceof i) {
+ switch (arguments.length) {
+ case 0:
+ return new r();
+ case 1:
+ return new r(o);
+ case 2:
+ return new r(o, l);
+ }
+ return new r(o, l, f);
+ }
+ return gL(r, this, arguments);
+ };
+ return i.prototype = r.prototype, i;
+}, qa = function(r, i) {
+ var o, l, f, g, A, b, v, k, _ = r.target, T = r.global, L = r.stat, F = r.proto, U = T ? Qi : L ? Qi[_] : (Qi[_] || {}).prototype, q = T ? ql : ql[_] || Uy(ql, _, {})[_], Z = q.prototype;
+ for (f in i)
+ o = !n9t(T ? f : _ + (L ? "." : "#") + f, r.forced) && U && nl(U, f), A = q[f], o && (b = r.dontCallGetSet ? (k = Rfn(U, f)) && k.value : U[f]), g = o && b ? b : i[f], o && typeof A == typeof g || (v = r.bind && o ? hm(g, Qi) : r.wrap && o ? Qfn(g) : F && vf(g) ? Do(g) : g, (r.sham || g && g.sham || A && A.sham) && Uy(v, "sham", !0), Uy(q, f, v), F && (nl(ql, l = _ + "Prototype") || Uy(ql, l, {}), Uy(ql[l], f, g), r.real && Z && !Z[f] && Uy(Z, f, g)));
+}, _O = Do([].slice), c3t = Qi.Function, $fn = Do([].concat), Ufn = Do([].join), gMe = {}, uDe = sX ? c3t.bind : function(r) {
+ var i = Fh(this), o = i.prototype, l = _O(arguments, 1), f = function() {
+ var g = $fn(l, _O(arguments));
+ return this instanceof f ? function(A, b, v) {
+ if (!nl(gMe, b)) {
+ for (var k = [], _ = 0; _ < b; _++)
+ k[_] = "a[" + _ + "]";
+ gMe[b] = c3t("C,a", "return new C(" + Ufn(k, ",") + ")");
+ }
+ return gMe[b](A, v);
+ }(i, g.length, g) : i.apply(r, g);
+ };
+ return Id(o) && (f.prototype = o), f;
+}, i9t = {};
+i9t[TA("toStringTag")] = "z";
+var TPe = String(i9t) === "[object z]", Hfn = TA("toStringTag"), jfn = Qi.Object, Kfn = BT(/* @__PURE__ */ function() {
+ return arguments;
+}()) == "Arguments", PO = TPe ? BT : function(r) {
+ var i, o, l;
+ return r === void 0 ? "Undefined" : r === null ? "Null" : typeof (o = function(f, g) {
+ try {
+ return f[g];
+ } catch {
+ }
+ }(i = jfn(r), Hfn)) == "string" ? o : Kfn ? BT(i) : (l = BT(i)) == "Object" && vf(i.callee) ? "Arguments" : l;
+}, zfn = Do(Function.toString);
+vf(kO.inspectSource) || (kO.inspectSource = function(r) {
+ return zfn(r);
+});
+var BPe = kO.inspectSource, a9t = function() {
+}, Gfn = [], o9t = b2("Reflect", "construct"), SPe = /^\s*(?:class|function)\b/, Xfn = Do(SPe.exec), Wfn = !SPe.exec(a9t), wne = function(r) {
+ if (!vf(r))
+ return !1;
+ try {
+ return o9t(a9t, Gfn, r), !0;
+ } catch {
+ return !1;
+ }
+}, s9t = function(r) {
+ if (!vf(r))
+ return !1;
+ switch (PO(r)) {
+ case "AsyncFunction":
+ case "GeneratorFunction":
+ case "AsyncGeneratorFunction":
+ return !1;
+ }
+ try {
+ return Wfn || !!Xfn(SPe, BPe(r));
+ } catch {
+ return !0;
+ }
+};
+s9t.sham = !0;
+var Tge, Fbe = !o9t || oh(function() {
+ var r;
+ return wne(wne.call) || !wne(Object) || !wne(function() {
+ r = !0;
+ }) || r;
+}) ? s9t : wne, Vfn = Qi.TypeError, Eme = function(r) {
+ if (Fbe(r))
+ return r;
+ throw Vfn(Eie(r) + " is not a constructor");
+}, qfn = Math.ceil, Yfn = Math.floor, Jfn = Math.trunc || function(r) {
+ var i = +r;
+ return (i > 0 ? Yfn : qfn)(i);
+}, cX = function(r) {
+ var i = +r;
+ return i != i || i === 0 ? 0 : Jfn(i);
+}, Zfn = Math.max, e1n = Math.min, yL = function(r, i) {
+ var o = cX(r);
+ return o < 0 ? Zfn(o + i, 0) : e1n(o, i);
+}, t1n = Math.min, LPe = function(r) {
+ return r > 0 ? t1n(cX(r), 9007199254740991) : 0;
+}, Ck = function(r) {
+ return LPe(r.length);
+}, l3t = function(r) {
+ return function(i, o, l) {
+ var f, g = v5(i), A = Ck(g), b = yL(l, A);
+ if (r && o != o) {
+ for (; A > b; )
+ if ((f = g[b++]) != f)
+ return !0;
+ } else
+ for (; A > b; b++)
+ if ((r || b in g) && g[b] === o)
+ return r || b || 0;
+ return !r && -1;
+ };
+}, IPe = { includes: l3t(!0), indexOf: l3t(!1) }, lX = {}, n1n = IPe.indexOf, u3t = Do([].push), c9t = function(r, i) {
+ var o, l = v5(r), f = 0, g = [];
+ for (o in l)
+ !nl(lX, o) && nl(l, o) && u3t(g, o);
+ for (; i.length > f; )
+ nl(l, o = i[f++]) && (~n1n(g, o) || u3t(g, o));
+ return g;
+}, Tme = ["constructor", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "toLocaleString", "toString", "valueOf"], pL = Object.keys || function(r) {
+ return c9t(r, Tme);
+}, r1n = of && !r9t ? Object.defineProperties : function(r, i) {
+ Oh(r);
+ for (var o, l = v5(i), f = pL(i), g = f.length, A = 0; g > A; )
+ _3.f(r, o = f[A++], l[o]);
+ return r;
+}, MPe = { f: r1n }, hDe = b2("document", "documentElement"), h3t = NO("keys"), Obe = function(r) {
+ return h3t[r] || (h3t[r] = $re(r));
+}, fDe = "prototype", dDe = "script", l9t = Obe("IE_PROTO"), pMe = function() {
+}, u9t = function(r) {
+ return "<" + dDe + ">" + r + "" + dDe + ">";
+}, f3t = function(r) {
+ r.write(u9t("")), r.close();
+ var i = r.parentWindow.Object;
+ return r = null, i;
+}, _pe = function() {
+ try {
+ Tge = new ActiveXObject("htmlfile");
+ } catch {
+ }
+ var r, i, o;
+ _pe = typeof document < "u" ? document.domain && Tge ? f3t(Tge) : (i = _me("iframe"), o = "java" + dDe + ":", i.style.display = "none", hDe.appendChild(i), i.src = String(o), (r = i.contentWindow.document).open(), r.write(u9t("document.F=Object")), r.close(), r.F) : f3t(Tge);
+ for (var l = Tme.length; l--; )
+ delete _pe[fDe][Tme[l]];
+ return _pe();
+};
+lX[l9t] = !0;
+var wk = Object.create || function(r, i) {
+ var o;
+ return r !== null ? (pMe[fDe] = Oh(r), o = new pMe(), pMe[fDe] = null, o[l9t] = r) : o = _pe(), i === void 0 ? o : MPe.f(o, i);
+}, FPe = b2("Reflect", "construct"), i1n = Object.prototype, a1n = [].push, h9t = oh(function() {
+ function r() {
+ }
+ return !(FPe(function() {
+ }, [], r) instanceof r);
+}), f9t = !oh(function() {
+ FPe(function() {
+ });
+}), d3t = h9t || f9t;
+qa({ target: "Reflect", stat: !0, forced: d3t, sham: d3t }, { construct: function(r, i) {
+ Eme(r), Oh(i);
+ var o = arguments.length < 3 ? r : Eme(arguments[2]);
+ if (f9t && !h9t)
+ return FPe(r, i, o);
+ if (r == o) {
+ switch (i.length) {
+ case 0:
+ return new r();
+ case 1:
+ return new r(i[0]);
+ case 2:
+ return new r(i[0], i[1]);
+ case 3:
+ return new r(i[0], i[1], i[2]);
+ case 4:
+ return new r(i[0], i[1], i[2], i[3]);
+ }
+ var l = [null];
+ return gL(a1n, l, i), new (gL(uDe, r, l))();
+ }
+ var f = o.prototype, g = wk(Id(f) ? f : i1n), A = gL(r, g, i);
+ return Id(A) ? A : g;
+} });
+var d9t = ql.Reflect.construct, yt = d9t, o1n = oh(function() {
+ pL(1);
+});
+qa({ target: "Object", stat: !0, forced: o1n }, { keys: function(r) {
+ return pL(y5(r));
+} });
+var Bme, bre, Sme, A9t = ql.Object.keys, yh = A9t, s1n = Qi.String, ah = function(r) {
+ if (PO(r) === "Symbol")
+ throw TypeError("Cannot convert a Symbol value to a string");
+ return s1n(r);
+}, c1n = Tme.concat("length", "prototype"), Ure = { f: Object.getOwnPropertyNames || function(r) {
+ return c9t(r, c1n);
+} }, EO = function(r, i, o) {
+ var l = a$(i);
+ l in r ? _3.f(r, l, bk(0, o)) : r[l] = o;
+}, l1n = Qi.Array, u1n = Math.max, c5 = function(r, i, o) {
+ for (var l = Ck(r), f = yL(i, l), g = yL(o === void 0 ? l : o, l), A = l1n(u1n(g - f, 0)), b = 0; f < g; f++, b++)
+ EO(A, b, r[f]);
+ return A.length = b, A;
+}, A3t = Ure.f, g3t = typeof window == "object" && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : [], OPe = { f: function(r) {
+ return g3t && BT(r) == "Window" ? function(i) {
+ try {
+ return A3t(i);
+ } catch {
+ return c5(g3t);
+ }
+ }(r) : A3t(v5(r));
+} }, Bie = { f: Object.getOwnPropertySymbols }, m5 = function(r, i, o, l) {
+ return l && l.enumerable ? r[i] = o : Uy(r, i, o), r;
+}, DPe = { f: TA }, h1n = _3.f, kp = function(r) {
+ var i = ql.Symbol || (ql.Symbol = {});
+ nl(i, r) || h1n(i, r, { value: DPe.f(r) });
+}, g9t = function() {
+ var r = b2("Symbol"), i = r && r.prototype, o = i && i.valueOf, l = TA("toPrimitive");
+ i && !i[l] && m5(i, l, function(f) {
+ return rl(o, this);
+ }, { arity: 1 });
+}, f1n = TPe ? {}.toString : function() {
+ return "[object " + PO(this) + "]";
+}, d1n = _3.f, p3t = TA("toStringTag"), wL = function(r, i, o, l) {
+ if (r) {
+ var f = o ? r : r.prototype;
+ nl(f, p3t) || d1n(f, p3t, { configurable: !0, value: i }), l && !TPe && Uy(f, "toString", f1n);
+ }
+}, m3t = Qi.WeakMap, A1n = vf(m3t) && /native code/.test(BPe(m3t)), b3t = "Object already initialized", ADe = Qi.TypeError, g1n = Qi.WeakMap;
+if (A1n || kO.state) {
+ var BQ = kO.state || (kO.state = new g1n()), p1n = Do(BQ.get), v3t = Do(BQ.has), m1n = Do(BQ.set);
+ Bme = function(r, i) {
+ if (v3t(BQ, r))
+ throw new ADe(b3t);
+ return i.facade = r, m1n(BQ, r, i), i;
+ }, bre = function(r) {
+ return p1n(BQ, r) || {};
+ }, Sme = function(r) {
+ return v3t(BQ, r);
+ };
+} else {
+ var Qz = Obe("state");
+ lX[Qz] = !0, Bme = function(r, i) {
+ if (nl(r, Qz))
+ throw new ADe(b3t);
+ return i.facade = r, Uy(r, Qz, i), i;
+ }, bre = function(r) {
+ return nl(r, Qz) ? r[Qz] : {};
+ }, Sme = function(r) {
+ return nl(r, Qz);
+ };
+}
+var Bv = { set: Bme, get: bre, has: Sme, enforce: function(r) {
+ return Sme(r) ? bre(r) : Bme(r, {});
+}, getterFor: function(r) {
+ return function(i) {
+ var o;
+ if (!Id(i) || (o = bre(i)).type !== r)
+ throw ADe("Incompatible receiver, " + r + " required");
+ return o;
+ };
+} }, kL = Array.isArray || function(r) {
+ return BT(r) == "Array";
+}, b1n = TA("species"), y3t = Qi.Array, Dbe = function(r, i) {
+ return new (function(o) {
+ var l;
+ return kL(o) && (l = o.constructor, (Fbe(l) && (l === y3t || kL(l.prototype)) || Id(l) && (l = l[b1n]) === null) && (l = void 0)), l === void 0 ? y3t : l;
+ }(r))(i === 0 ? 0 : i);
+}, w3t = Do([].push), nO = function(r) {
+ var i = r == 1, o = r == 2, l = r == 3, f = r == 4, g = r == 6, A = r == 7, b = r == 5 || g;
+ return function(v, k, _, T) {
+ for (var L, F, U = y5(v), q = Mbe(U), Z = hm(k, _), R = Ck(q), J = 0, he = T || Dbe, Y = i ? he(v, R) : o || A ? he(v, 0) : void 0; R > J; J++)
+ if ((b || J in q) && (F = Z(L = q[J], J, U), r))
+ if (i)
+ Y[J] = F;
+ else if (F)
+ switch (r) {
+ case 3:
+ return !0;
+ case 5:
+ return L;
+ case 6:
+ return J;
+ case 2:
+ w3t(Y, L);
+ }
+ else
+ switch (r) {
+ case 4:
+ return !1;
+ case 7:
+ w3t(Y, L);
+ }
+ return g ? -1 : l || f ? f : Y;
+ };
+}, LL = { forEach: nO(0), map: nO(1), filter: nO(2), some: nO(3), every: nO(4), find: nO(5), findIndex: nO(6), filterReject: nO(7) }, Nbe = LL.forEach, f5 = Obe("hidden"), Lme = "Symbol", Hre = "prototype", v1n = Bv.set, k3t = Bv.getterFor(Lme), Q9 = Object[Hre], jQ = Qi.Symbol, Yne = jQ && jQ[Hre], y1n = Qi.TypeError, mMe = Qi.QObject, p9t = DT.f, pO = _3.f, m9t = OPe.f, w1n = _ie.f, b9t = Do([].push), xL = NO("symbols"), Sie = NO("op-symbols"), k1n = NO("wks"), bMe = !mMe || !mMe[Hre] || !mMe[Hre].findChild, gDe = of && oh(function() {
+ return wk(pO({}, "a", { get: function() {
+ return pO(this, "a", { value: 7 }).a;
+ } })).a != 7;
+}) ? function(r, i, o) {
+ var l = p9t(Q9, i);
+ l && delete Q9[i], pO(r, i, o), l && r !== Q9 && pO(Q9, i, l);
+} : pO, vMe = function(r, i) {
+ var o = xL[r] = wk(Yne);
+ return v1n(o, { type: Lme, tag: r, description: i }), of || (o.description = i), o;
+}, Ime = function(r, i, o) {
+ r === Q9 && Ime(Sie, i, o), Oh(r);
+ var l = a$(i);
+ return Oh(o), nl(xL, l) ? (o.enumerable ? (nl(r, f5) && r[f5][l] && (r[f5][l] = !1), o = wk(o, { enumerable: bk(0, !1) })) : (nl(r, f5) || pO(r, f5, bk(1, {})), r[f5][l] = !0), gDe(r, l, o)) : pO(r, l, o);
+}, yMe = function(r, i) {
+ Oh(r);
+ var o = v5(i), l = pL(o).concat(y9t(o));
+ return Nbe(l, function(f) {
+ of && !rl(v9t, o, f) || Ime(r, f, o[f]);
+ }), r;
+}, v9t = function(r) {
+ var i = a$(r), o = rl(w1n, this, i);
+ return !(this === Q9 && nl(xL, i) && !nl(Sie, i)) && (!(o || !nl(this, i) || !nl(xL, i) || nl(this, f5) && this[f5][i]) || o);
+}, x3t = function(r, i) {
+ var o = v5(r), l = a$(i);
+ if (o !== Q9 || !nl(xL, l) || nl(Sie, l)) {
+ var f = p9t(o, l);
+ return !f || !nl(xL, l) || nl(o, f5) && o[f5][l] || (f.enumerable = !0), f;
+ }
+}, C3t = function(r) {
+ var i = m9t(v5(r)), o = [];
+ return Nbe(i, function(l) {
+ nl(xL, l) || nl(lX, l) || b9t(o, l);
+ }), o;
+}, y9t = function(r) {
+ var i = r === Q9, o = m9t(i ? Sie : v5(r)), l = [];
+ return Nbe(o, function(f) {
+ !nl(xL, f) || i && !nl(Q9, f) || b9t(l, xL[f]);
+ }), l;
+};
+aC || (jQ = function() {
+ if (E1(Yne, this))
+ throw y1n("Symbol is not a constructor");
+ var r = arguments.length && arguments[0] !== void 0 ? ah(arguments[0]) : void 0, i = $re(r), o = function(l) {
+ this === Q9 && rl(o, Sie, l), nl(this, f5) && nl(this[f5], i) && (this[f5][i] = !1), gDe(this, i, bk(1, l));
+ };
+ return of && bMe && gDe(Q9, i, { configurable: !0, set: o }), vMe(i, r);
+}, Yne = jQ[Hre], m5(Yne, "toString", function() {
+ return k3t(this).tag;
+}), m5(jQ, "withoutSetter", function(r) {
+ return vMe($re(r), r);
+}), _ie.f = v9t, _3.f = Ime, MPe.f = yMe, DT.f = x3t, Ure.f = OPe.f = C3t, Bie.f = y9t, DPe.f = function(r) {
+ return vMe(TA(r), r);
+}, of && pO(Yne, "description", { configurable: !0, get: function() {
+ return k3t(this).description;
+} })), qa({ global: !0, constructor: !0, wrap: !0, forced: !aC, sham: !aC }, { Symbol: jQ }), Nbe(pL(k1n), function(r) {
+ kp(r);
+}), qa({ target: Lme, stat: !0, forced: !aC }, { useSetter: function() {
+ bMe = !0;
+}, useSimple: function() {
+ bMe = !1;
+} }), qa({ target: "Object", stat: !0, forced: !aC, sham: !of }, { create: function(r, i) {
+ return i === void 0 ? wk(r) : yMe(wk(r), i);
+}, defineProperty: Ime, defineProperties: yMe, getOwnPropertyDescriptor: x3t }), qa({ target: "Object", stat: !0, forced: !aC }, { getOwnPropertyNames: C3t }), g9t(), wL(jQ, Lme), lX[f5] = !0;
+var w9t = aC && !!Symbol.for && !!Symbol.keyFor, wMe = NO("string-to-symbol-registry"), x1n = NO("symbol-to-string-registry");
+qa({ target: "Symbol", stat: !0, forced: !w9t }, { for: function(r) {
+ var i = ah(r);
+ if (nl(wMe, i))
+ return wMe[i];
+ var o = b2("Symbol")(i);
+ return wMe[i] = o, x1n[o] = i, o;
+} });
+var _3t = NO("symbol-to-string-registry");
+qa({ target: "Symbol", stat: !0, forced: !w9t }, { keyFor: function(r) {
+ if (!OG(r))
+ throw TypeError(Eie(r) + " is not a symbol");
+ if (nl(_3t, r))
+ return _3t[r];
+} });
+var xO = b2("JSON", "stringify"), Bge = Do(/./.exec), E3t = Do("".charAt), C1n = Do("".charCodeAt), _1n = Do("".replace), E1n = Do(1 .toString), T1n = /[\uD800-\uDFFF]/g, T3t = /^[\uD800-\uDBFF]$/, B3t = /^[\uDC00-\uDFFF]$/, S3t = !aC || oh(function() {
+ var r = b2("Symbol")();
+ return xO([r]) != "[null]" || xO({ a: r }) != "{}" || xO(Object(r)) != "{}";
+}), L3t = oh(function() {
+ return xO("\uDF06\uD834") !== '"\\udf06\\ud834"' || xO("\uDEAD") !== '"\\udead"';
+}), B1n = function(r, i) {
+ var o = _O(arguments), l = i;
+ if ((Id(i) || r !== void 0) && !OG(r))
+ return kL(i) || (i = function(f, g) {
+ if (vf(l) && (g = rl(l, this, f, g)), !OG(g))
+ return g;
+ }), o[1] = i, gL(xO, null, o);
+}, S1n = function(r, i, o) {
+ var l = E3t(o, i - 1), f = E3t(o, i + 1);
+ return Bge(T3t, r) && !Bge(B3t, f) || Bge(B3t, r) && !Bge(T3t, l) ? "\\u" + E1n(C1n(r, 0), 16) : r;
+};
+xO && qa({ target: "JSON", stat: !0, arity: 3, forced: S3t || L3t }, { stringify: function(r, i, o) {
+ var l = _O(arguments), f = gL(S3t ? B1n : xO, null, l);
+ return L3t && typeof f == "string" ? _1n(f, T1n, S1n) : f;
+} });
+var L1n = !aC || oh(function() {
+ Bie.f(1);
+});
+qa({ target: "Object", stat: !0, forced: L1n }, { getOwnPropertySymbols: function(r) {
+ var i = Bie.f;
+ return i ? i(y5(r)) : [];
+} });
+var k9t = ql.Object.getOwnPropertySymbols, rA = k9t, I1n = TA("species"), Lie = function(r) {
+ return MT >= 51 || !oh(function() {
+ var i = [];
+ return (i.constructor = {})[I1n] = function() {
+ return { foo: 1 };
+ }, i[r](Boolean).foo !== 1;
+ });
+}, M1n = LL.filter, F1n = Lie("filter");
+qa({ target: "Array", proto: !0, forced: !F1n }, { filter: function(r) {
+ return M1n(this, r, arguments.length > 1 ? arguments[1] : void 0);
+} });
+var a0 = function(r) {
+ return ql[r + "Prototype"];
+}, O1n = a0("Array").filter, kMe = Array.prototype, dd = function(r) {
+ var i = r.filter;
+ return r === kMe || E1(kMe, r) && i === kMe.filter ? O1n : i;
+}, x9t = DT.f, D1n = oh(function() {
+ x9t(1);
+});
+qa({ target: "Object", stat: !0, forced: !of || D1n, sham: !of }, { getOwnPropertyDescriptor: function(r, i) {
+ return x9t(v5(r), i);
+} });
+var bO, I3t, M3t, N1n = su(function(r) {
+ var i = ql.Object, o = r.exports = function(l, f) {
+ return i.getOwnPropertyDescriptor(l, f);
+ };
+ i.getOwnPropertyDescriptor.sham && (o.sham = !0);
+}), C9t = N1n, o0 = C9t, CL = {}, _9t = Function.prototype, P1n = of && Object.getOwnPropertyDescriptor, xMe = nl(_9t, "name"), E9t = { EXISTS: xMe, PROPER: xMe && (function() {
+}).name === "something", CONFIGURABLE: xMe && (!of || of && P1n(_9t, "name").configurable) }, T9t = !oh(function() {
+ function r() {
+ }
+ return r.prototype.constructor = null, Object.getPrototypeOf(new r()) !== r.prototype;
+}), F3t = Obe("IE_PROTO"), pDe = Qi.Object, R1n = pDe.prototype, o$ = T9t ? pDe.getPrototypeOf : function(r) {
+ var i = y5(r);
+ if (nl(i, F3t))
+ return i[F3t];
+ var o = i.constructor;
+ return vf(o) && i instanceof o ? o.prototype : i instanceof pDe ? R1n : null;
+}, mDe = TA("iterator"), B9t = !1;
+[].keys && ("next" in (M3t = [].keys()) ? (I3t = o$(o$(M3t))) !== Object.prototype && (bO = I3t) : B9t = !0);
+var Q1n = bO == null || oh(function() {
+ var r = {};
+ return bO[mDe].call(r) !== r;
+});
+bO = Q1n ? {} : wk(bO), vf(bO[mDe]) || m5(bO, mDe, function() {
+ return this;
+});
+var S9t = { IteratorPrototype: bO, BUGGY_SAFARI_ITERATORS: B9t }, $1n = S9t.IteratorPrototype, U1n = function() {
+ return this;
+}, L9t = function(r, i, o, l) {
+ var f = i + " Iterator";
+ return r.prototype = wk($1n, { next: bk(+!l, o) }), wL(r, f, !1, !0), CL[f] = U1n, r;
+}, H1n = Qi.String, j1n = Qi.TypeError, jre = Object.setPrototypeOf || ("__proto__" in {} ? function() {
+ var r, i = !1, o = {};
+ try {
+ (r = Do(Object.getOwnPropertyDescriptor(Object.prototype, "__proto__").set))(o, []), i = o instanceof Array;
+ } catch {
+ }
+ return function(l, f) {
+ return Oh(l), function(g) {
+ if (typeof g == "object" || vf(g))
+ return g;
+ throw j1n("Can't set " + H1n(g) + " as a prototype");
+ }(f), i ? r(l, f) : l.__proto__ = f, l;
+ };
+}() : void 0), K1n = E9t.PROPER, Sge = S9t.BUGGY_SAFARI_ITERATORS, CMe = TA("iterator"), O3t = "keys", Lge = "values", D3t = "entries", z1n = function() {
+ return this;
+}, NPe = function(r, i, o, l, f, g, A) {
+ L9t(o, i, l);
+ var b, v, k, _ = function(R) {
+ if (R === f && q)
+ return q;
+ if (!Sge && R in F)
+ return F[R];
+ switch (R) {
+ case O3t:
+ case Lge:
+ case D3t:
+ return function() {
+ return new o(this, R);
+ };
+ }
+ return function() {
+ return new o(this);
+ };
+ }, T = i + " Iterator", L = !1, F = r.prototype, U = F[CMe] || F["@@iterator"] || f && F[f], q = !Sge && U || _(f), Z = i == "Array" && F.entries || U;
+ if (Z && (b = o$(Z.call(new r()))) !== Object.prototype && b.next && (wL(b, T, !0, !0), CL[T] = z1n), K1n && f == Lge && U && U.name !== Lge && (L = !0, q = function() {
+ return rl(U, this);
+ }), f)
+ if (v = { values: _(Lge), keys: g ? q : _(O3t), entries: _(D3t) }, A)
+ for (k in v)
+ (Sge || L || !(k in F)) && m5(F, k, v[k]);
+ else
+ qa({ target: i, proto: !0, forced: Sge || L }, v);
+ return A && F[CMe] !== q && m5(F, CMe, q, { name: f }), CL[i] = q, v;
+};
+_3.f;
+var I9t = "Array Iterator", G1n = Bv.set, X1n = Bv.getterFor(I9t);
+NPe(Array, "Array", function(r, i) {
+ G1n(this, { type: I9t, target: v5(r), index: 0, kind: i });
+}, function() {
+ var r = X1n(this), i = r.target, o = r.kind, l = r.index++;
+ return !i || l >= i.length ? (r.target = void 0, { value: void 0, done: !0 }) : o == "keys" ? { value: l, done: !1 } : o == "values" ? { value: i[l], done: !1 } : { value: [l, i[l]], done: !1 };
+}, "values"), CL.Arguments = CL.Array;
+var N3t = TA("toStringTag");
+for (var _Me in { CSSRuleList: 0, CSSStyleDeclaration: 0, CSSValueList: 0, ClientRectList: 0, DOMRectList: 0, DOMStringList: 0, DOMTokenList: 1, DataTransferItemList: 0, FileList: 0, HTMLAllCollection: 0, HTMLCollection: 0, HTMLFormElement: 0, HTMLSelectElement: 0, MediaList: 0, MimeTypeArray: 0, NamedNodeMap: 0, NodeList: 1, PaintRequestList: 0, Plugin: 0, PluginArray: 0, SVGLengthList: 0, SVGNumberList: 0, SVGPathSegList: 0, SVGPointList: 0, SVGStringList: 0, SVGTransformList: 0, SourceBufferList: 0, StyleSheetList: 0, TextTrackCueList: 0, TextTrackList: 0, TouchList: 0 }) {
+ var P3t = Qi[_Me], EMe = P3t && P3t.prototype;
+ EMe && PO(EMe) !== N3t && Uy(EMe, N3t, _Me), CL[_Me] = CL.Array;
+}
+var uX = function(r, i) {
+ var o = [][r];
+ return !!o && oh(function() {
+ o.call(null, i || function() {
+ return 1;
+ }, 1);
+ });
+}, W1n = LL.forEach, R3t = uX("forEach") ? [].forEach : function(r) {
+ return W1n(this, r, arguments.length > 1 ? arguments[1] : void 0);
+};
+qa({ target: "Array", proto: !0, forced: [].forEach != R3t }, { forEach: R3t });
+var V1n = a0("Array").forEach, TMe = Array.prototype, q1n = { DOMTokenList: !0, NodeList: !0 }, M9t = function(r) {
+ var i = r.forEach;
+ return r === TMe || E1(TMe, r) && i === TMe.forEach || nl(q1n, PO(r)) ? V1n : i;
+}, no = M9t, Y1n = Do([].concat), F9t = b2("Reflect", "ownKeys") || function(r) {
+ var i = Ure.f(Oh(r)), o = Bie.f;
+ return o ? Y1n(i, o(r)) : i;
+};
+qa({ target: "Object", stat: !0, sham: !of }, { getOwnPropertyDescriptors: function(r) {
+ for (var i, o, l = v5(r), f = DT.f, g = F9t(l), A = {}, b = 0; g.length > b; )
+ (o = f(l, i = g[b++])) !== void 0 && EO(A, i, o);
+ return A;
+} });
+var i0 = ql.Object.getOwnPropertyDescriptors, Q3t = MPe.f;
+qa({ target: "Object", stat: !0, forced: Object.defineProperties !== Q3t, sham: !of }, { defineProperties: Q3t });
+var J1n = su(function(r) {
+ var i = ql.Object, o = r.exports = function(l, f) {
+ return i.defineProperties(l, f);
+ };
+ i.defineProperties.sham && (o.sham = !0);
+}), uC = J1n, $3t = _3.f;
+qa({ target: "Object", stat: !0, forced: Object.defineProperty !== $3t, sham: !of }, { defineProperty: $3t });
+var O9t = su(function(r) {
+ var i = ql.Object, o = r.exports = function(l, f, g) {
+ return i.defineProperty(l, f, g);
+ };
+ i.defineProperty.sham && (o.sham = !0);
+}), C3 = O9t;
+function vi(r, i) {
+ if (!(r instanceof i))
+ throw new TypeError("Cannot call a class as a function");
+}
+var Iie = O9t;
+function U3t(r, i) {
+ for (var o = 0; o < i.length; o++) {
+ var l = i[o];
+ l.enumerable = l.enumerable || !1, l.configurable = !0, "value" in l && (l.writable = !0), Iie(r, l.key, l);
+ }
+}
+function yi(r, i, o) {
+ return i && U3t(r.prototype, i), o && U3t(r, o), Iie(r, "prototype", { writable: !1 }), r;
+}
+function Xs(r) {
+ if (r === void 0)
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
+ return r;
+}
+qa({ target: "Object", stat: !0, sham: !of }, { create: wk });
+var Z1n = ql.Object, D9t = function(r, i) {
+ return Z1n.create(r, i);
+}, vre = D9t;
+qa({ target: "Object", stat: !0 }, { setPrototypeOf: jre });
+var Mme = ql.Object.setPrototypeOf;
+function Kre(r, i) {
+ return Kre = Mme || function(o, l) {
+ return o.__proto__ = l, o;
+ }, Kre(r, i);
+}
+function ja(r, i) {
+ if (typeof i != "function" && i !== null)
+ throw new TypeError("Super expression must either be null or a function");
+ r.prototype = vre(i && i.prototype, { constructor: { value: r, writable: !0, configurable: !0 } }), Iie(r, "prototype", { writable: !1 }), i && Kre(r, i);
+}
+var N9t = TA("isConcatSpreadable"), H3t = 9007199254740991, j3t = "Maximum allowed index exceeded", K3t = Qi.TypeError, edn = MT >= 51 || !oh(function() {
+ var r = [];
+ return r[N9t] = !1, r.concat()[0] !== r;
+}), tdn = Lie("concat"), ndn = function(r) {
+ if (!Id(r))
+ return !1;
+ var i = r[N9t];
+ return i !== void 0 ? !!i : kL(r);
+};
+qa({ target: "Array", proto: !0, arity: 1, forced: !edn || !tdn }, { concat: function(r) {
+ var i, o, l, f, g, A = y5(this), b = Dbe(A, 0), v = 0;
+ for (i = -1, l = arguments.length; i < l; i++)
+ if (ndn(g = i === -1 ? A : arguments[i])) {
+ if (v + (f = Ck(g)) > H3t)
+ throw K3t(j3t);
+ for (o = 0; o < f; o++, v++)
+ o in g && EO(b, v, g[o]);
+ } else {
+ if (v >= H3t)
+ throw K3t(j3t);
+ EO(b, v++, g);
+ }
+ return b.length = v, b;
+} }), kp("asyncIterator"), kp("hasInstance"), kp("isConcatSpreadable"), kp("iterator"), kp("match"), kp("matchAll"), kp("replace"), kp("search"), kp("species"), kp("split"), kp("toPrimitive"), g9t(), kp("toStringTag"), wL(b2("Symbol"), "Symbol"), kp("unscopables"), wL(Qi.JSON, "JSON", !0);
+var P9t = ql.Symbol, rdn = P9t;
+kp("asyncDispose"), kp("dispose"), kp("matcher"), kp("metadata"), kp("observable"), kp("patternMatch"), kp("replaceAll");
+var oC = rdn, idn = Do("".charAt), z3t = Do("".charCodeAt), adn = Do("".slice), G3t = function(r) {
+ return function(i, o) {
+ var l, f, g = ah(DO(i)), A = cX(o), b = g.length;
+ return A < 0 || A >= b ? r ? "" : void 0 : (l = z3t(g, A)) < 55296 || l > 56319 || A + 1 === b || (f = z3t(g, A + 1)) < 56320 || f > 57343 ? r ? idn(g, A) : l : r ? adn(g, A, A + 2) : f - 56320 + (l - 55296 << 10) + 65536;
+ };
+}, R9t = { codeAt: G3t(!1), charAt: G3t(!0) }, odn = R9t.charAt, Q9t = "String Iterator", sdn = Bv.set, cdn = Bv.getterFor(Q9t);
+NPe(String, "String", function(r) {
+ sdn(this, { type: Q9t, string: ah(r), index: 0 });
+}, function() {
+ var r, i = cdn(this), o = i.string, l = i.index;
+ return l >= o.length ? { value: void 0, done: !0 } : (r = odn(o, l), i.index += r.length, { value: r, done: !1 });
+});
+var $9t = DPe.f("iterator"), U9t = $9t;
+function Yl(r) {
+ return Yl = typeof oC == "function" && typeof U9t == "symbol" ? function(i) {
+ return typeof i;
+ } : function(i) {
+ return i && typeof oC == "function" && i.constructor === oC && i !== oC.prototype ? "symbol" : typeof i;
+ }, Yl(r);
+}
+function Ea(r, i) {
+ if (i && (Yl(i) === "object" || typeof i == "function"))
+ return i;
+ if (i !== void 0)
+ throw new TypeError("Derived constructors may only return object or undefined");
+ return Xs(r);
+}
+var ldn = oh(function() {
+ o$(1);
+});
+qa({ target: "Object", stat: !0, forced: ldn, sham: !T9t }, { getPrototypeOf: function(r) {
+ return o$(y5(r));
+} });
+var H9t = ql.Object.getPrototypeOf, yre = H9t;
+function Rn(r) {
+ return Rn = Mme ? yre : function(i) {
+ return i.__proto__ || yre(i);
+ }, Rn(r);
+}
+function Ui(r, i, o) {
+ return i in r ? Iie(r, i, { value: o, enumerable: !0, configurable: !0, writable: !0 }) : r[i] = o, r;
+}
+var udn = a0("Array").concat, BMe = Array.prototype, At = function(r) {
+ var i = r.concat;
+ return r === BMe || E1(BMe, r) && i === BMe.concat ? udn : i;
+};
+qa({ target: "Function", proto: !0, forced: Function.bind !== uDe }, { bind: uDe });
+var hdn = a0("Function").bind, SMe = Function.prototype, j9t = function(r) {
+ var i = r.bind;
+ return r === SMe || E1(SMe, r) && i === SMe.bind ? hdn : i;
+}, Bo = j9t, fdn = Qi.TypeError, tL = function(r, i) {
+ if (r < i)
+ throw fdn("Not enough arguments");
+ return r;
+}, ddn = /MSIE .\./.test(ST), Adn = Qi.Function, X3t = function(r) {
+ return ddn ? function(i, o) {
+ var l = tL(arguments.length, 1) > 2, f = vf(i) ? i : Adn(i), g = l ? _O(arguments, 2) : void 0;
+ return r(l ? function() {
+ gL(f, this, g);
+ } : f, o);
+ } : r;
+}, K9t = { setTimeout: X3t(Qi.setTimeout), setInterval: X3t(Qi.setInterval) }, W3t = K9t.setInterval;
+qa({ global: !0, bind: !0, forced: Qi.setInterval !== W3t }, { setInterval: W3t });
+var V3t = K9t.setTimeout;
+qa({ global: !0, bind: !0, forced: Qi.setTimeout !== V3t }, { setTimeout: V3t });
+var lm = ql.setTimeout, gdn = function() {
+ this.__data__ = [], this.size = 0;
+}, Pbe = function(r, i) {
+ return r === i || r != r && i != i;
+}, Rbe = function(r, i) {
+ for (var o = r.length; o--; )
+ if (Pbe(r[o][0], i))
+ return o;
+ return -1;
+}, pdn = Array.prototype.splice, mdn = function(r) {
+ var i = this.__data__, o = Rbe(i, r);
+ return !(o < 0) && (o == i.length - 1 ? i.pop() : pdn.call(i, o, 1), --this.size, !0);
+}, bdn = function(r) {
+ var i = this.__data__, o = Rbe(i, r);
+ return o < 0 ? void 0 : i[o][1];
+}, vdn = function(r) {
+ return Rbe(this.__data__, r) > -1;
+}, ydn = function(r, i) {
+ var o = this.__data__, l = Rbe(o, r);
+ return l < 0 ? (++this.size, o.push([r, i])) : o[l][1] = i, this;
+};
+function Jz(r) {
+ var i = -1, o = r == null ? 0 : r.length;
+ for (this.clear(); ++i < o; ) {
+ var l = r[i];
+ this.set(l[0], l[1]);
+ }
+}
+Jz.prototype.clear = gdn, Jz.prototype.delete = mdn, Jz.prototype.get = bdn, Jz.prototype.has = vdn, Jz.prototype.set = ydn;
+var Qbe = Jz, wdn = function() {
+ this.__data__ = new Qbe(), this.size = 0;
+}, kdn = function(r) {
+ var i = this.__data__, o = i.delete(r);
+ return this.size = i.size, o;
+}, xdn = function(r) {
+ return this.__data__.get(r);
+}, Cdn = function(r) {
+ return this.__data__.has(r);
+}, z9t = typeof jy == "object" && jy && jy.Object === Object && jy, _dn = typeof self == "object" && self && self.Object === Object && self, X9 = z9t || _dn || Function("return this")(), TO = X9.Symbol, G9t = Object.prototype, Edn = G9t.hasOwnProperty, Tdn = G9t.toString, kne = TO ? TO.toStringTag : void 0, Bdn = function(r) {
+ var i = Edn.call(r, kne), o = r[kne];
+ try {
+ r[kne] = void 0;
+ var l = !0;
+ } catch {
+ }
+ var f = Tdn.call(r);
+ return l && (i ? r[kne] = o : delete r[kne]), f;
+}, Sdn = Object.prototype.toString, Ldn = function(r) {
+ return Sdn.call(r);
+}, q3t = TO ? TO.toStringTag : void 0, y$ = function(r) {
+ return r == null ? r === void 0 ? "[object Undefined]" : "[object Null]" : q3t && q3t in Object(r) ? Bdn(r) : Ldn(r);
+}, z9 = function(r) {
+ var i = typeof r;
+ return r != null && (i == "object" || i == "function");
+}, PPe = function(r) {
+ if (!z9(r))
+ return !1;
+ var i = y$(r);
+ return i == "[object Function]" || i == "[object GeneratorFunction]" || i == "[object AsyncFunction]" || i == "[object Proxy]";
+}, LMe = X9["__core-js_shared__"], Y3t = function() {
+ var r = /[^.]+$/.exec(LMe && LMe.keys && LMe.keys.IE_PROTO || "");
+ return r ? "Symbol(src)_1." + r : "";
+}(), Idn = function(r) {
+ return !!Y3t && Y3t in r;
+}, Mdn = Function.prototype.toString, w$ = function(r) {
+ if (r != null) {
+ try {
+ return Mdn.call(r);
+ } catch {
+ }
+ try {
+ return r + "";
+ } catch {
+ }
+ }
+ return "";
+}, Fdn = /^\[object .+?Constructor\]$/, Odn = Function.prototype, Ddn = Object.prototype, Ndn = Odn.toString, Pdn = Ddn.hasOwnProperty, Rdn = RegExp("^" + Ndn.call(Pdn).replace(/[\\^$.*+?()[\]{}|]/g, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"), Qdn = function(r) {
+ return !(!z9(r) || Idn(r)) && (PPe(r) ? Rdn : Fdn).test(w$(r));
+}, $dn = function(r, i) {
+ return r == null ? void 0 : r[i];
+}, k$ = function(r, i) {
+ var o = $dn(r, i);
+ return Qdn(o) ? o : void 0;
+}, zre = k$(X9, "Map"), Gre = k$(Object, "create"), Udn = function() {
+ this.__data__ = Gre ? Gre(null) : {}, this.size = 0;
+}, Hdn = function(r) {
+ var i = this.has(r) && delete this.__data__[r];
+ return this.size -= i ? 1 : 0, i;
+}, jdn = Object.prototype.hasOwnProperty, Kdn = function(r) {
+ var i = this.__data__;
+ if (Gre) {
+ var o = i[r];
+ return o === "__lodash_hash_undefined__" ? void 0 : o;
+ }
+ return jdn.call(i, r) ? i[r] : void 0;
+}, zdn = Object.prototype.hasOwnProperty, Gdn = function(r) {
+ var i = this.__data__;
+ return Gre ? i[r] !== void 0 : zdn.call(i, r);
+}, Xdn = function(r, i) {
+ var o = this.__data__;
+ return this.size += this.has(r) ? 0 : 1, o[r] = Gre && i === void 0 ? "__lodash_hash_undefined__" : i, this;
+};
+function Zz(r) {
+ var i = -1, o = r == null ? 0 : r.length;
+ for (this.clear(); ++i < o; ) {
+ var l = r[i];
+ this.set(l[0], l[1]);
+ }
+}
+Zz.prototype.clear = Udn, Zz.prototype.delete = Hdn, Zz.prototype.get = Kdn, Zz.prototype.has = Gdn, Zz.prototype.set = Xdn;
+var J3t = Zz, Wdn = function() {
+ this.size = 0, this.__data__ = { hash: new J3t(), map: new (zre || Qbe)(), string: new J3t() };
+}, Vdn = function(r) {
+ var i = typeof r;
+ return i == "string" || i == "number" || i == "symbol" || i == "boolean" ? r !== "__proto__" : r === null;
+}, $be = function(r, i) {
+ var o = r.__data__;
+ return Vdn(i) ? o[typeof i == "string" ? "string" : "hash"] : o.map;
+}, qdn = function(r) {
+ var i = $be(this, r).delete(r);
+ return this.size -= i ? 1 : 0, i;
+}, Ydn = function(r) {
+ return $be(this, r).get(r);
+}, Jdn = function(r) {
+ return $be(this, r).has(r);
+}, Zdn = function(r, i) {
+ var o = $be(this, r), l = o.size;
+ return o.set(r, i), this.size += o.size == l ? 0 : 1, this;
+};
+function eG(r) {
+ var i = -1, o = r == null ? 0 : r.length;
+ for (this.clear(); ++i < o; ) {
+ var l = r[i];
+ this.set(l[0], l[1]);
+ }
+}
+eG.prototype.clear = Wdn, eG.prototype.delete = qdn, eG.prototype.get = Ydn, eG.prototype.has = Jdn, eG.prototype.set = Zdn;
+var eAn = eG, tAn = function(r, i) {
+ var o = this.__data__;
+ if (o instanceof Qbe) {
+ var l = o.__data__;
+ if (!zre || l.length < 199)
+ return l.push([r, i]), this.size = ++o.size, this;
+ o = this.__data__ = new eAn(l);
+ }
+ return o.set(r, i), this.size = o.size, this;
+};
+function tG(r) {
+ var i = this.__data__ = new Qbe(r);
+ this.size = i.size;
+}
+tG.prototype.clear = wdn, tG.prototype.delete = kdn, tG.prototype.get = xdn, tG.prototype.has = Cdn, tG.prototype.set = tAn;
+var X9t = tG, nAn = function() {
+ try {
+ var r = k$(Object, "defineProperty");
+ return r({}, "", {}), r;
+ } catch {
+ }
+}(), Fme = nAn, RPe = function(r, i, o) {
+ i == "__proto__" && Fme ? Fme(r, i, { configurable: !0, enumerable: !0, value: o, writable: !0 }) : r[i] = o;
+}, bDe = function(r, i, o) {
+ (o !== void 0 && !Pbe(r[i], o) || o === void 0 && !(i in r)) && RPe(r, i, o);
+}, rAn = function(r) {
+ return function(i, o, l) {
+ for (var f = -1, g = Object(i), A = l(i), b = A.length; b--; ) {
+ var v = A[r ? b : ++f];
+ if (o(g[v], v, g) === !1)
+ break;
+ }
+ return i;
+ };
+}, iAn = rAn(), W9t = su(function(r, i) {
+ var o = i && !i.nodeType && i, l = o && r && !r.nodeType && r, f = l && l.exports === o ? X9.Buffer : void 0, g = f ? f.allocUnsafe : void 0;
+ r.exports = function(A, b) {
+ if (b)
+ return A.slice();
+ var v = A.length, k = g ? g(v) : new A.constructor(v);
+ return A.copy(k), k;
+ };
+}), Z3t = X9.Uint8Array, QPe = function(r) {
+ var i = new r.constructor(r.byteLength);
+ return new Z3t(i).set(new Z3t(r)), i;
+}, V9t = function(r, i) {
+ var o = i ? QPe(r.buffer) : r.buffer;
+ return new r.constructor(o, r.byteOffset, r.length);
+}, q9t = function(r, i) {
+ var o = -1, l = r.length;
+ for (i || (i = Array(l)); ++o < l; )
+ i[o] = r[o];
+ return i;
+}, e4t = Object.create, aAn = /* @__PURE__ */ function() {
+ function r() {
+ }
+ return function(i) {
+ if (!z9(i))
+ return {};
+ if (e4t)
+ return e4t(i);
+ r.prototype = i;
+ var o = new r();
+ return r.prototype = void 0, o;
+ };
+}(), oAn = aAn, Y9t = function(r, i) {
+ return function(o) {
+ return r(i(o));
+ };
+}, $Pe = Y9t(Object.getPrototypeOf, Object), sAn = Object.prototype, UPe = function(r) {
+ var i = r && r.constructor;
+ return r === (typeof i == "function" && i.prototype || sAn);
+}, J9t = function(r) {
+ return typeof r.constructor != "function" || UPe(r) ? {} : oAn($Pe(r));
+}, RO = function(r) {
+ return r != null && typeof r == "object";
+}, t4t = function(r) {
+ return RO(r) && y$(r) == "[object Arguments]";
+}, Z9t = Object.prototype, cAn = Z9t.hasOwnProperty, lAn = Z9t.propertyIsEnumerable, vDe = t4t(/* @__PURE__ */ function() {
+ return arguments;
+}()) ? t4t : function(r) {
+ return RO(r) && cAn.call(r, "callee") && !lAn.call(r, "callee");
+}, DG = Array.isArray, e_t = function(r) {
+ return typeof r == "number" && r > -1 && r % 1 == 0 && r <= 9007199254740991;
+}, Ube = function(r) {
+ return r != null && e_t(r.length) && !PPe(r);
+}, uAn = function(r) {
+ return RO(r) && Ube(r);
+}, hAn = function() {
+ return !1;
+}, HPe = su(function(r, i) {
+ var o = i && !i.nodeType && i, l = o && r && !r.nodeType && r, f = l && l.exports === o ? X9.Buffer : void 0, g = (f ? f.isBuffer : void 0) || hAn;
+ r.exports = g;
+}), fAn = Function.prototype, dAn = Object.prototype, t_t = fAn.toString, AAn = dAn.hasOwnProperty, gAn = t_t.call(Object), pAn = function(r) {
+ if (!RO(r) || y$(r) != "[object Object]")
+ return !1;
+ var i = $Pe(r);
+ if (i === null)
+ return !0;
+ var o = AAn.call(i, "constructor") && i.constructor;
+ return typeof o == "function" && o instanceof o && t_t.call(o) == gAn;
+}, CA = {};
+CA["[object Float32Array]"] = CA["[object Float64Array]"] = CA["[object Int8Array]"] = CA["[object Int16Array]"] = CA["[object Int32Array]"] = CA["[object Uint8Array]"] = CA["[object Uint8ClampedArray]"] = CA["[object Uint16Array]"] = CA["[object Uint32Array]"] = !0, CA["[object Arguments]"] = CA["[object Array]"] = CA["[object ArrayBuffer]"] = CA["[object Boolean]"] = CA["[object DataView]"] = CA["[object Date]"] = CA["[object Error]"] = CA["[object Function]"] = CA["[object Map]"] = CA["[object Number]"] = CA["[object Object]"] = CA["[object RegExp]"] = CA["[object Set]"] = CA["[object String]"] = CA["[object WeakMap]"] = !1;
+var mAn = function(r) {
+ return RO(r) && e_t(r.length) && !!CA[y$(r)];
+}, jPe = function(r) {
+ return function(i) {
+ return r(i);
+ };
+}, NG = su(function(r, i) {
+ var o = i && !i.nodeType && i, l = o && r && !r.nodeType && r, f = l && l.exports === o && z9t.process, g = function() {
+ try {
+ var A = l && l.require && l.require("util").types;
+ return A || f && f.binding && f.binding("util");
+ } catch {
+ }
+ }();
+ r.exports = g;
+}), n4t = NG && NG.isTypedArray, n_t = n4t ? jPe(n4t) : mAn, yDe = function(r, i) {
+ if ((i !== "constructor" || typeof r[i] != "function") && i != "__proto__")
+ return r[i];
+}, bAn = Object.prototype.hasOwnProperty, r_t = function(r, i, o) {
+ var l = r[i];
+ bAn.call(r, i) && Pbe(l, o) && (o !== void 0 || i in r) || RPe(r, i, o);
+}, Mie = function(r, i, o, l) {
+ var f = !o;
+ o || (o = {});
+ for (var g = -1, A = i.length; ++g < A; ) {
+ var b = i[g], v = l ? l(o[b], r[b], b, o, r) : void 0;
+ v === void 0 && (v = r[b]), f ? RPe(o, b, v) : r_t(o, b, v);
+ }
+ return o;
+}, vAn = function(r, i) {
+ for (var o = -1, l = Array(r); ++o < r; )
+ l[o] = i(o);
+ return l;
+}, yAn = /^(?:0|[1-9]\d*)$/, i_t = function(r, i) {
+ var o = typeof r;
+ return !!(i = i ?? 9007199254740991) && (o == "number" || o != "symbol" && yAn.test(r)) && r > -1 && r % 1 == 0 && r < i;
+}, wAn = Object.prototype.hasOwnProperty, a_t = function(r, i) {
+ var o = DG(r), l = !o && vDe(r), f = !o && !l && HPe(r), g = !o && !l && !f && n_t(r), A = o || l || f || g, b = A ? vAn(r.length, String) : [], v = b.length;
+ for (var k in r)
+ !i && !wAn.call(r, k) || A && (k == "length" || f && (k == "offset" || k == "parent") || g && (k == "buffer" || k == "byteLength" || k == "byteOffset") || i_t(k, v)) || b.push(k);
+ return b;
+}, kAn = function(r) {
+ var i = [];
+ if (r != null)
+ for (var o in Object(r))
+ i.push(o);
+ return i;
+}, xAn = Object.prototype.hasOwnProperty, CAn = function(r) {
+ if (!z9(r))
+ return kAn(r);
+ var i = UPe(r), o = [];
+ for (var l in r)
+ (l != "constructor" || !i && xAn.call(r, l)) && o.push(l);
+ return o;
+}, Fie = function(r) {
+ return Ube(r) ? a_t(r, !0) : CAn(r);
+}, _An = function(r) {
+ return Mie(r, Fie(r));
+}, EAn = function(r, i, o, l, f, g, A) {
+ var b = yDe(r, o), v = yDe(i, o), k = A.get(v);
+ if (k)
+ bDe(r, o, k);
+ else {
+ var _ = g ? g(b, v, o + "", r, i, A) : void 0, T = _ === void 0;
+ if (T) {
+ var L = DG(v), F = !L && HPe(v), U = !L && !F && n_t(v);
+ _ = v, L || F || U ? DG(b) ? _ = b : uAn(b) ? _ = q9t(b) : F ? (T = !1, _ = W9t(v, !0)) : U ? (T = !1, _ = V9t(v, !0)) : _ = [] : pAn(v) || vDe(v) ? (_ = b, vDe(b) ? _ = _An(b) : z9(b) && !PPe(b) || (_ = J9t(v))) : T = !1;
+ }
+ T && (A.set(v, _), f(_, v, l, g, A), A.delete(v)), bDe(r, o, _);
+ }
+}, TAn = function r(i, o, l, f, g) {
+ i !== o && iAn(o, function(A, b) {
+ if (g || (g = new X9t()), z9(A))
+ EAn(i, o, b, l, r, f, g);
+ else {
+ var v = f ? f(yDe(i, b), A, b + "", i, o, g) : void 0;
+ v === void 0 && (v = A), bDe(i, b, v);
+ }
+ }, Fie);
+}, o_t = function(r) {
+ return r;
+}, BAn = function(r, i, o) {
+ switch (o.length) {
+ case 0:
+ return r.call(i);
+ case 1:
+ return r.call(i, o[0]);
+ case 2:
+ return r.call(i, o[0], o[1]);
+ case 3:
+ return r.call(i, o[0], o[1], o[2]);
+ }
+ return r.apply(i, o);
+}, r4t = Math.max, SAn = function(r, i, o) {
+ return i = r4t(i === void 0 ? r.length - 1 : i, 0), function() {
+ for (var l = arguments, f = -1, g = r4t(l.length - i, 0), A = Array(g); ++f < g; )
+ A[f] = l[i + f];
+ f = -1;
+ for (var b = Array(i + 1); ++f < i; )
+ b[f] = l[f];
+ return b[i] = o(A), BAn(r, this, b);
+ };
+}, LAn = function(r) {
+ return function() {
+ return r;
+ };
+}, IAn = Fme ? function(r, i) {
+ return Fme(r, "toString", { configurable: !0, enumerable: !1, value: LAn(i), writable: !0 });
+} : o_t, MAn = IAn, FAn = Date.now, OAn = function(r) {
+ var i = 0, o = 0;
+ return function() {
+ var l = FAn(), f = 16 - (l - o);
+ if (o = l, f > 0) {
+ if (++i >= 800)
+ return arguments[0];
+ } else
+ i = 0;
+ return r.apply(void 0, arguments);
+ };
+}, DAn = OAn(MAn), NAn = function(r, i) {
+ return DAn(SAn(r, i, o_t), r + "");
+}, PAn = function(r, i, o) {
+ if (!z9(o))
+ return !1;
+ var l = typeof i;
+ return !!(l == "number" ? Ube(o) && i_t(i, o.length) : l == "string" && i in o) && Pbe(o[i], r);
+}, RAn = function(r) {
+ return NAn(function(i, o) {
+ var l = -1, f = o.length, g = f > 1 ? o[f - 1] : void 0, A = f > 2 ? o[2] : void 0;
+ for (g = r.length > 3 && typeof g == "function" ? (f--, g) : void 0, A && PAn(o[0], o[1], A) && (g = f < 3 ? void 0 : g, f = 1), i = Object(i); ++l < f; ) {
+ var b = o[l];
+ b && r(i, b, l, g);
+ }
+ return i;
+ });
+}, QAn = RAn(function(r, i, o, l) {
+ TAn(r, i, o, l);
+}), KPe = QAn, i4t = k9t, $An = IPe.indexOf, wDe = Do([].indexOf), a4t = !!wDe && 1 / wDe([1], 1, -0) < 0, UAn = uX("indexOf");
+qa({ target: "Array", proto: !0, forced: a4t || !UAn }, { indexOf: function(r) {
+ var i = arguments.length > 1 ? arguments[1] : void 0;
+ return a4t ? wDe(this, r, i) || 0 : $An(this, r, i);
+} });
+var HAn = a0("Array").indexOf, IMe = Array.prototype, s_t = function(r) {
+ var i = r.indexOf;
+ return r === IMe || E1(IMe, r) && i === IMe.indexOf ? HAn : i;
+}, kDe = s_t, jAn = A9t;
+function KAn(r, i) {
+ if (r == null)
+ return {};
+ var o, l, f = function(A, b) {
+ if (A == null)
+ return {};
+ var v, k, _ = {}, T = jAn(A);
+ for (k = 0; k < T.length; k++)
+ v = T[k], kDe(b).call(b, v) >= 0 || (_[v] = A[v]);
+ return _;
+ }(r, i);
+ if (i4t) {
+ var g = i4t(r);
+ for (l = 0; l < g.length; l++)
+ o = g[l], kDe(i).call(i, o) >= 0 || Object.prototype.propertyIsEnumerable.call(r, o) && (f[o] = r[o]);
+ }
+ return f;
+}
+var $z = Object.assign, o4t = Object.defineProperty, zAn = Do([].concat), Xre = !$z || oh(function() {
+ if (of && $z({ b: 1 }, $z(o4t({}, "a", { enumerable: !0, get: function() {
+ o4t(this, "b", { value: 3, enumerable: !1 });
+ } }), { b: 2 })).b !== 1)
+ return !0;
+ var r = {}, i = {}, o = Symbol(), l = "abcdefghijklmnopqrst";
+ return r[o] = 7, l.split("").forEach(function(f) {
+ i[f] = f;
+ }), $z({}, r)[o] != 7 || pL($z({}, i)).join("") != l;
+}) ? function(r, i) {
+ for (var o = y5(r), l = arguments.length, f = 1, g = Bie.f, A = _ie.f; l > f; )
+ for (var b, v = Mbe(arguments[f++]), k = g ? zAn(pL(v), g(v)) : pL(v), _ = k.length, T = 0; _ > T; )
+ b = k[T++], of && !rl(A, v, b) || (o[b] = v[b]);
+ return o;
+} : $z;
+qa({ target: "Object", stat: !0, arity: 2, forced: Object.assign !== Xre }, { assign: Xre });
+var c_t = ql.Object.assign, lL = c_t;
+ql.JSON || (ql.JSON = { stringify: JSON.stringify });
+var zPe = function(r, i, o) {
+ return gL(ql.JSON.stringify, null, arguments);
+}, GAn = LL.find, s4t = "find", c4t = !0;
+s4t in [] && Array(1)[s4t](function() {
+ c4t = !1;
+}), qa({ target: "Array", proto: !0, forced: c4t }, { find: function(r) {
+ return GAn(this, r, arguments.length > 1 ? arguments[1] : void 0);
+} });
+var xne, XAn = a0("Array").find, MMe = Array.prototype, Wre = function(r) {
+ var i = r.find;
+ return r === MMe || E1(MMe, r) && i === MMe.find ? XAn : i;
+}, PG = `
+\v\f\r \u2028\u2029\uFEFF`, l4t = Do("".replace), Ome = "[" + PG + "]", WAn = RegExp("^" + Ome + Ome + "*"), VAn = RegExp(Ome + Ome + "*$"), FMe = function(r) {
+ return function(i) {
+ var o = ah(DO(i));
+ return 1 & r && (o = l4t(o, WAn, "")), 2 & r && (o = l4t(o, VAn, "")), o;
+ };
+}, GPe = { start: FMe(1), end: FMe(2), trim: FMe(3) }, qAn = E9t.PROPER, YAn = GPe.trim;
+qa({ target: "String", proto: !0, forced: (xne = "trim", oh(function() {
+ return !!PG[xne]() || "
"[xne]() !== "
" || qAn && PG[xne].name !== xne;
+})) }, { trim: function() {
+ return YAn(this);
+} });
+var JAn = a0("String").trim, OMe = String.prototype, Go = function(r) {
+ var i = r.trim;
+ return typeof r == "string" || r === OMe || E1(OMe, r) && i === OMe.trim ? JAn : i;
+}, xDe = function(r, i, o) {
+ var l, f;
+ Oh(r);
+ try {
+ if (!(l = Cme(r, "return"))) {
+ if (i === "throw")
+ throw o;
+ return o;
+ }
+ l = rl(l, r);
+ } catch (g) {
+ f = !0, l = g;
+ }
+ if (i === "throw")
+ throw o;
+ if (f)
+ throw l;
+ return Oh(l), o;
+}, ZAn = function(r, i, o, l) {
+ try {
+ return l ? i(Oh(o)[0], o[1]) : i(o);
+ } catch (f) {
+ xDe(r, "throw", f);
+ }
+}, e0n = TA("iterator"), t0n = Array.prototype, l_t = function(r) {
+ return r !== void 0 && (CL.Array === r || t0n[e0n] === r);
+}, n0n = TA("iterator"), Oie = function(r) {
+ if (r != null)
+ return Cme(r, n0n) || Cme(r, "@@iterator") || CL[PO(r)];
+}, r0n = Qi.TypeError, s$ = function(r, i) {
+ var o = arguments.length < 2 ? Oie(r) : i;
+ if (Fh(o))
+ return Oh(rl(o, r));
+ throw r0n(Eie(r) + " is not iterable");
+}, u4t = Qi.Array, NQ = function(r) {
+ var i = y5(r), o = Fbe(this), l = arguments.length, f = l > 1 ? arguments[1] : void 0, g = f !== void 0;
+ g && (f = hm(f, l > 2 ? arguments[2] : void 0));
+ var A, b, v, k, _, T, L = Oie(i), F = 0;
+ if (!L || this == u4t && l_t(L))
+ for (A = Ck(i), b = o ? new this(A) : u4t(A); A > F; F++)
+ T = g ? f(i[F], F) : i[F], EO(b, F, T);
+ else
+ for (_ = (k = s$(i, L)).next, b = o ? new this() : []; !(v = rl(_, k)).done; F++)
+ T = g ? ZAn(k, f, [v.value, F], !0) : v.value, EO(b, F, T);
+ return b.length = F, b;
+}, u_t = TA("iterator"), h_t = !1;
+try {
+ var i0n = 0, h4t = { next: function() {
+ return { done: !!i0n++ };
+ }, return: function() {
+ h_t = !0;
+ } };
+ h4t[u_t] = function() {
+ return this;
+ }, Array.from(h4t, function() {
+ throw 2;
+ });
+} catch {
+}
+var f_t = function(r, i) {
+ if (!i && !h_t)
+ return !1;
+ var o = !1;
+ try {
+ var l = {};
+ l[u_t] = function() {
+ return { next: function() {
+ return { done: o = !0 };
+ } };
+ }, r(l);
+ } catch {
+ }
+ return o;
+}, a0n = !f_t(function(r) {
+ Array.from(r);
+});
+qa({ target: "Array", stat: !0, forced: a0n }, { from: NQ });
+var d_t = ql.Array.from, Su = d_t, o0n = TA("match"), s0n = Qi.TypeError, XPe = function(r) {
+ if (function(i) {
+ var o;
+ return Id(i) && ((o = i[o0n]) !== void 0 ? !!o : BT(i) == "RegExp");
+ }(r))
+ throw s0n("The method doesn't accept regular expressions");
+ return r;
+}, c0n = TA("match"), WPe = function(r) {
+ var i = /./;
+ try {
+ "/./"[r](i);
+ } catch {
+ try {
+ return i[c0n] = !1, "/./"[r](i);
+ } catch {
+ }
+ }
+ return !1;
+};
+DT.f;
+var f4t = Do("".startsWith), l0n = Do("".slice), u0n = Math.min, h0n = WPe("startsWith");
+qa({ target: "String", proto: !0, forced: !h0n }, { startsWith: function(r) {
+ var i = ah(DO(this));
+ XPe(r);
+ var o = LPe(u0n(arguments.length > 1 ? arguments[1] : void 0, i.length)), l = ah(r);
+ return f4t ? f4t(i, l, o) : l0n(i, o, o + l.length) === l;
+} });
+var f0n = a0("String").startsWith, DMe = String.prototype, RG = function(r) {
+ var i = r.startsWith;
+ return typeof r == "string" || r === DMe || E1(DMe, r) && i === DMe.startsWith ? f0n : i;
+}, m2 = su(function(r, i) {
+ r.exports = function() {
+ var o = navigator.userAgent, l = navigator.platform, f = /gecko\/\d/i.test(o), g = /MSIE \d/.test(o), A = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(o), b = /Edge\/(\d+)/.exec(o), v = g || A || b, k = v && (g ? document.documentMode || 6 : +(b || A)[1]), _ = !b && /WebKit\//.test(o), T = _ && /Qt\/\d+\.\d+/.test(o), L = !b && /Chrome\//.test(o), F = /Opera\//.test(o), U = /Apple Computer/.test(navigator.vendor), q = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(o), Z = /PhantomJS/.test(o), R = !b && /AppleWebKit/.test(o) && /Mobile\/\w+/.test(o), J = /Android/.test(o), he = R || J || /webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(o), Y = R || /Mac/.test(l), ue = /\bCrOS\b/.test(o), le = /win/i.test(l), be = F && o.match(/Version\/(\d*\.\d*)/);
+ be && (be = Number(be[1])), be && be >= 15 && (F = !1, _ = !0);
+ var ke = Y && (T || F && (be == null || be < 12.11)), de = f || v && k >= 9;
+ function Te(x) {
+ return new RegExp("(^|\\s)" + x + "(?:$|\\s)\\s*");
+ }
+ var xe, ie = function(x, S) {
+ var G = x.className, j = Te(S).exec(G);
+ if (j) {
+ var V = G.slice(j.index + j[0].length);
+ x.className = G.slice(0, j.index) + (V ? j[1] + V : "");
+ }
+ };
+ function Be(x) {
+ for (var S = x.childNodes.length; S > 0; --S)
+ x.removeChild(x.firstChild);
+ return x;
+ }
+ function te(x, S) {
+ return Be(x).appendChild(S);
+ }
+ function Me(x, S, G, j) {
+ var V = document.createElement(x);
+ if (G && (V.className = G), j && (V.style.cssText = j), typeof S == "string")
+ V.appendChild(document.createTextNode(S));
+ else if (S)
+ for (var we = 0; we < S.length; ++we)
+ V.appendChild(S[we]);
+ return V;
+ }
+ function ve(x, S, G, j) {
+ var V = Me(x, S, G, j);
+ return V.setAttribute("role", "presentation"), V;
+ }
+ function ge(x, S) {
+ if (S.nodeType == 3 && (S = S.parentNode), x.contains)
+ return x.contains(S);
+ do
+ if (S.nodeType == 11 && (S = S.host), S == x)
+ return !0;
+ while (S = S.parentNode);
+ }
+ function Je() {
+ var x;
+ try {
+ x = document.activeElement;
+ } catch {
+ x = document.body || null;
+ }
+ for (; x && x.shadowRoot && x.shadowRoot.activeElement; )
+ x = x.shadowRoot.activeElement;
+ return x;
+ }
+ function ot(x, S) {
+ var G = x.className;
+ Te(S).test(G) || (x.className += (G ? " " : "") + S);
+ }
+ function bt(x, S) {
+ for (var G = x.split(" "), j = 0; j < G.length; j++)
+ G[j] && !Te(G[j]).test(S) && (S += " " + G[j]);
+ return S;
+ }
+ xe = document.createRange ? function(x, S, G, j) {
+ var V = document.createRange();
+ return V.setEnd(j || x, G), V.setStart(x, S), V;
+ } : function(x, S, G) {
+ var j = document.body.createTextRange();
+ try {
+ j.moveToElementText(x.parentNode);
+ } catch {
+ return j;
+ }
+ return j.collapse(!0), j.moveEnd("character", G), j.moveStart("character", S), j;
+ };
+ var gt = function(x) {
+ x.select();
+ };
+ function je(x) {
+ var S = Array.prototype.slice.call(arguments, 1);
+ return function() {
+ return x.apply(null, S);
+ };
+ }
+ function Qe(x, S, G) {
+ for (var j in S || (S = {}), x)
+ !x.hasOwnProperty(j) || G === !1 && S.hasOwnProperty(j) || (S[j] = x[j]);
+ return S;
+ }
+ function kt(x, S, G, j, V) {
+ S == null && (S = x.search(/[^\s\u00a0]/)) == -1 && (S = x.length);
+ for (var we = j || 0, $e = V || 0; ; ) {
+ var ze = x.indexOf(" ", we);
+ if (ze < 0 || ze >= S)
+ return $e + (S - we);
+ $e += ze - we, $e += G - $e % G, we = ze + 1;
+ }
+ }
+ R ? gt = function(x) {
+ x.selectionStart = 0, x.selectionEnd = x.value.length;
+ } : v && (gt = function(x) {
+ try {
+ x.select();
+ } catch {
+ }
+ });
+ var Wt = function() {
+ this.id = null, this.f = null, this.time = 0, this.handler = je(this.onTimeout, this);
+ };
+ function jt(x, S) {
+ for (var G = 0; G < x.length; ++G)
+ if (x[G] == S)
+ return G;
+ return -1;
+ }
+ Wt.prototype.onTimeout = function(x) {
+ x.id = 0, x.time <= +/* @__PURE__ */ new Date() ? x.f() : setTimeout(x.handler, x.time - +/* @__PURE__ */ new Date());
+ }, Wt.prototype.set = function(x, S) {
+ this.f = S;
+ var G = +/* @__PURE__ */ new Date() + x;
+ (!this.id || G < this.time) && (clearTimeout(this.id), this.id = setTimeout(this.handler, x), this.time = G);
+ };
+ var Zn = 50, Ft = { toString: function() {
+ return "CodeMirror.Pass";
+ } }, wn = { scroll: !1 }, un = { origin: "*mouse" }, ln = { origin: "+move" };
+ function an(x, S, G) {
+ for (var j = 0, V = 0; ; ) {
+ var we = x.indexOf(" ", j);
+ we == -1 && (we = x.length);
+ var $e = we - j;
+ if (we == x.length || V + $e >= S)
+ return j + Math.min($e, S - V);
+ if (V += we - j, j = we + 1, (V += G - V % G) >= S)
+ return j;
+ }
+ }
+ var Ot = [""];
+ function $n(x) {
+ for (; Ot.length <= x; )
+ Ot.push(pt(Ot) + " ");
+ return Ot[x];
+ }
+ function pt(x) {
+ return x[x.length - 1];
+ }
+ function Ci(x, S) {
+ for (var G = [], j = 0; j < x.length; j++)
+ G[j] = S(x[j], j);
+ return G;
+ }
+ function ut(x, S, G) {
+ for (var j = 0, V = G(S); j < x.length && G(x[j]) <= V; )
+ j++;
+ x.splice(j, 0, S);
+ }
+ function br() {
+ }
+ function zt(x, S) {
+ var G;
+ return Object.create ? G = Object.create(x) : (br.prototype = x, G = new br()), S && Qe(S, G), G;
+ }
+ var Wr = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;
+ function zr(x) {
+ return /\w/.test(x) || x > "" && (x.toUpperCase() != x.toLowerCase() || Wr.test(x));
+ }
+ function Si(x, S) {
+ return S ? !!(S.source.indexOf("\\w") > -1 && zr(x)) || S.test(x) : zr(x);
+ }
+ function vr(x) {
+ for (var S in x)
+ if (x.hasOwnProperty(S) && x[S])
+ return !1;
+ return !0;
+ }
+ var Qr = /[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;
+ function or(x) {
+ return x.charCodeAt(0) >= 768 && Qr.test(x);
+ }
+ function Gr(x, S, G) {
+ for (; (G < 0 ? S > 0 : S < x.length) && or(x.charAt(S)); )
+ S += G;
+ return S;
+ }
+ function An(x, S, G) {
+ for (var j = S > G ? -1 : 1; ; ) {
+ if (S == G)
+ return S;
+ var V = (S + G) / 2, we = j < 0 ? Math.ceil(V) : Math.floor(V);
+ if (we == S)
+ return x(we) ? S : G;
+ x(we) ? G = we : S = we + j;
+ }
+ }
+ function _i(x, S, G, j) {
+ if (!x)
+ return j(S, G, "ltr", 0);
+ for (var V = !1, we = 0; we < x.length; ++we) {
+ var $e = x[we];
+ ($e.from < G && $e.to > S || S == G && $e.to == S) && (j(Math.max($e.from, S), Math.min($e.to, G), $e.level == 1 ? "rtl" : "ltr", we), V = !0);
+ }
+ V || j(S, G, "ltr");
+ }
+ var Cr = null;
+ function la(x, S, G) {
+ var j;
+ Cr = null;
+ for (var V = 0; V < x.length; ++V) {
+ var we = x[V];
+ if (we.from < S && we.to > S)
+ return V;
+ we.to == S && (we.from != we.to && G == "before" ? j = V : Cr = V), we.from == S && (we.from != we.to && G != "before" ? j = V : Cr = V);
+ }
+ return j ?? Cr;
+ }
+ var Ra = /* @__PURE__ */ function() {
+ var x = "bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN", S = "nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";
+ function G(at) {
+ return at <= 247 ? x.charAt(at) : 1424 <= at && at <= 1524 ? "R" : 1536 <= at && at <= 1785 ? S.charAt(at - 1536) : 1774 <= at && at <= 2220 ? "r" : 8192 <= at && at <= 8203 ? "w" : at == 8204 ? "b" : "L";
+ }
+ var j = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/, V = /[stwN]/, we = /[LRr]/, $e = /[Lb1n]/, ze = /[1n]/;
+ function nt(at, Yt, Vt) {
+ this.level = at, this.from = Yt, this.to = Vt;
+ }
+ return function(at, Yt) {
+ var Vt = Yt == "ltr" ? "L" : "R";
+ if (at.length == 0 || Yt == "ltr" && !j.test(at))
+ return !1;
+ for (var Nn = at.length, Vn = [], mr = 0; mr < Nn; ++mr)
+ Vn.push(G(at.charCodeAt(mr)));
+ for (var si = 0, Mi = Vt; si < Nn; ++si) {
+ var _r = Vn[si];
+ _r == "m" ? Vn[si] = Mi : Mi = _r;
+ }
+ for (var ao = 0, ea = Vt; ao < Nn; ++ao) {
+ var zi = Vn[ao];
+ zi == "1" && ea == "r" ? Vn[ao] = "n" : we.test(zi) && (ea = zi, zi == "r" && (Vn[ao] = "R"));
+ }
+ for (var Qo = 1, $a = Vn[0]; Qo < Nn - 1; ++Qo) {
+ var Ll = Vn[Qo];
+ Ll == "+" && $a == "1" && Vn[Qo + 1] == "1" ? Vn[Qo] = "1" : Ll != "," || $a != Vn[Qo + 1] || $a != "1" && $a != "n" || (Vn[Qo] = $a), $a = Ll;
+ }
+ for (var hu = 0; hu < Nn; ++hu) {
+ var I1 = Vn[hu];
+ if (I1 == ",")
+ Vn[hu] = "N";
+ else if (I1 == "%") {
+ var ac = void 0;
+ for (ac = hu + 1; ac < Nn && Vn[ac] == "%"; ++ac)
+ ;
+ for (var _f = hu && Vn[hu - 1] == "!" || ac < Nn && Vn[ac] == "1" ? "1" : "N", J1 = hu; J1 < ac; ++J1)
+ Vn[J1] = _f;
+ hu = ac - 1;
+ }
+ }
+ for (var qh = 0, Rd = Vt; qh < Nn; ++qh) {
+ var oA = Vn[qh];
+ Rd == "L" && oA == "1" ? Vn[qh] = "L" : we.test(oA) && (Rd = oA);
+ }
+ for (var Wu = 0; Wu < Nn; ++Wu)
+ if (V.test(Vn[Wu])) {
+ var Yh = void 0;
+ for (Yh = Wu + 1; Yh < Nn && V.test(Vn[Yh]); ++Yh)
+ ;
+ for (var t1 = (Wu ? Vn[Wu - 1] : Vt) == "L", sA = t1 == ((Yh < Nn ? Vn[Yh] : Vt) == "L") ? t1 ? "L" : "R" : Vt, Pp = Wu; Pp < Yh; ++Pp)
+ Vn[Pp] = sA;
+ Wu = Yh - 1;
+ }
+ for (var g0, Uo = [], n1 = 0; n1 < Nn; )
+ if ($e.test(Vn[n1])) {
+ var V2 = n1;
+ for (++n1; n1 < Nn && $e.test(Vn[n1]); ++n1)
+ ;
+ Uo.push(new nt(0, V2, n1));
+ } else {
+ var p0 = n1, Rp = Uo.length, jg = Yt == "rtl" ? 1 : 0;
+ for (++n1; n1 < Nn && Vn[n1] != "L"; ++n1)
+ ;
+ for (var Dh = p0; Dh < n1; )
+ if (ze.test(Vn[Dh])) {
+ p0 < Dh && (Uo.splice(Rp, 0, new nt(1, p0, Dh)), Rp += jg);
+ var Lb = Dh;
+ for (++Dh; Dh < n1 && ze.test(Vn[Dh]); ++Dh)
+ ;
+ Uo.splice(Rp, 0, new nt(2, Lb, Dh)), Rp += jg, p0 = Dh;
+ } else
+ ++Dh;
+ p0 < n1 && Uo.splice(Rp, 0, new nt(1, p0, n1));
+ }
+ return Yt == "ltr" && (Uo[0].level == 1 && (g0 = at.match(/^\s+/)) && (Uo[0].from = g0[0].length, Uo.unshift(new nt(0, 0, g0[0].length))), pt(Uo).level == 1 && (g0 = at.match(/\s+$/)) && (pt(Uo).to -= g0[0].length, Uo.push(new nt(0, Nn - g0[0].length, Nn)))), Yt == "rtl" ? Uo.reverse() : Uo;
+ };
+ }();
+ function Jo(x, S) {
+ var G = x.order;
+ return G == null && (G = x.order = Ra(x.text, S)), G;
+ }
+ var Cc = [], ji = function(x, S, G) {
+ if (x.addEventListener)
+ x.addEventListener(S, G, !1);
+ else if (x.attachEvent)
+ x.attachEvent("on" + S, G);
+ else {
+ var j = x._handlers || (x._handlers = {});
+ j[S] = (j[S] || Cc).concat(G);
+ }
+ };
+ function Ya(x, S) {
+ return x._handlers && x._handlers[S] || Cc;
+ }
+ function Hr(x, S, G) {
+ if (x.removeEventListener)
+ x.removeEventListener(S, G, !1);
+ else if (x.detachEvent)
+ x.detachEvent("on" + S, G);
+ else {
+ var j = x._handlers, V = j && j[S];
+ if (V) {
+ var we = jt(V, G);
+ we > -1 && (j[S] = V.slice(0, we).concat(V.slice(we + 1)));
+ }
+ }
+ }
+ function Yr(x, S) {
+ var G = Ya(x, S);
+ if (G.length)
+ for (var j = Array.prototype.slice.call(arguments, 2), V = 0; V < G.length; ++V)
+ G[V].apply(null, j);
+ }
+ function ni(x, S, G) {
+ return typeof S == "string" && (S = { type: S, preventDefault: function() {
+ this.defaultPrevented = !0;
+ } }), Yr(x, G || S.type, x, S), So(S) || S.codemirrorIgnore;
+ }
+ function Vr(x) {
+ var S = x._handlers && x._handlers.cursorActivity;
+ if (S)
+ for (var G = x.curOp.cursorActivityHandlers || (x.curOp.cursorActivityHandlers = []), j = 0; j < S.length; ++j)
+ jt(G, S[j]) == -1 && G.push(S[j]);
+ }
+ function Na(x, S) {
+ return Ya(x, S).length > 0;
+ }
+ function er(x) {
+ x.prototype.on = function(S, G) {
+ ji(this, S, G);
+ }, x.prototype.off = function(S, G) {
+ Hr(this, S, G);
+ };
+ }
+ function as(x) {
+ x.preventDefault ? x.preventDefault() : x.returnValue = !1;
+ }
+ function xr(x) {
+ x.stopPropagation ? x.stopPropagation() : x.cancelBubble = !0;
+ }
+ function So(x) {
+ return x.defaultPrevented != null ? x.defaultPrevented : x.returnValue == 0;
+ }
+ function cs(x) {
+ as(x), xr(x);
+ }
+ function xa(x) {
+ return x.target || x.srcElement;
+ }
+ function ro(x) {
+ var S = x.which;
+ return S == null && (1 & x.button ? S = 1 : 2 & x.button ? S = 3 : 4 & x.button && (S = 2)), Y && x.ctrlKey && S == 1 && (S = 3), S;
+ }
+ var Lo, Xo, Zo = function() {
+ if (v && k < 9)
+ return !1;
+ var x = Me("div");
+ return "draggable" in x || "dragDrop" in x;
+ }();
+ function Fs(x) {
+ if (Lo == null) {
+ var S = Me("span", "");
+ te(x, Me("span", [S, document.createTextNode("x")])), x.firstChild.offsetHeight != 0 && (Lo = S.offsetWidth <= 1 && S.offsetHeight > 2 && !(v && k < 8));
+ }
+ var G = Lo ? Me("span", "") : Me("span", " ", null, "display: inline-block; width: 1px; margin-right: -1px");
+ return G.setAttribute("cm-text", ""), G;
+ }
+ function Hs(x) {
+ if (Xo != null)
+ return Xo;
+ var S = te(x, document.createTextNode("AخA")), G = xe(S, 0, 1).getBoundingClientRect(), j = xe(S, 1, 2).getBoundingClientRect();
+ return Be(x), !(!G || G.left == G.right) && (Xo = j.right - G.right < 3);
+ }
+ var Qa, Ff = `
+
+b`.split(/\n/).length != 3 ? function(x) {
+ for (var S = 0, G = [], j = x.length; S <= j; ) {
+ var V = x.indexOf(`
+`, S);
+ V == -1 && (V = x.length);
+ var we = x.slice(S, x.charAt(V - 1) == "\r" ? V - 1 : V), $e = we.indexOf("\r");
+ $e != -1 ? (G.push(we.slice(0, $e)), S += $e + 1) : (G.push(we), S = V + 1);
+ }
+ return G;
+ } : function(x) {
+ return x.split(/\r\n?|\n/);
+ }, Oc = window.getSelection ? function(x) {
+ try {
+ return x.selectionStart != x.selectionEnd;
+ } catch {
+ return !1;
+ }
+ } : function(x) {
+ var S;
+ try {
+ S = x.ownerDocument.selection.createRange();
+ } catch {
+ }
+ return !(!S || S.parentElement() != x) && S.compareEndPoints("StartToEnd", S) != 0;
+ }, Iu = "oncopy" in (Qa = Me("div")) || (Qa.setAttribute("oncopy", "return;"), typeof Qa.oncopy == "function"), da = null;
+ function _c(x) {
+ if (da != null)
+ return da;
+ var S = te(x, Me("span", "x")), G = S.getBoundingClientRect(), j = xe(S, 0, 1).getBoundingClientRect();
+ return da = Math.abs(G.left - j.left) > 1;
+ }
+ var qf = {}, wu = {};
+ function jo(x, S) {
+ arguments.length > 2 && (S.dependencies = Array.prototype.slice.call(arguments, 2)), qf[x] = S;
+ }
+ function yf(x, S) {
+ wu[x] = S;
+ }
+ function bl(x) {
+ if (typeof x == "string" && wu.hasOwnProperty(x))
+ x = wu[x];
+ else if (x && typeof x.name == "string" && wu.hasOwnProperty(x.name)) {
+ var S = wu[x.name];
+ typeof S == "string" && (S = { name: S }), (x = zt(S, x)).name = S.name;
+ } else {
+ if (typeof x == "string" && /^[\w\-]+\/[\w\-]+\+xml$/.test(x))
+ return bl("application/xml");
+ if (typeof x == "string" && /^[\w\-]+\/[\w\-]+\+json$/.test(x))
+ return bl("application/json");
+ }
+ return typeof x == "string" ? { name: x } : x || { name: "null" };
+ }
+ function cu(x, S) {
+ S = bl(S);
+ var G = qf[S.name];
+ if (!G)
+ return cu(x, "text/plain");
+ var j = G(x, S);
+ if (qc.hasOwnProperty(S.name)) {
+ var V = qc[S.name];
+ for (var we in V)
+ V.hasOwnProperty(we) && (j.hasOwnProperty(we) && (j["_" + we] = j[we]), j[we] = V[we]);
+ }
+ if (j.name = S.name, S.helperType && (j.helperType = S.helperType), S.modeProps)
+ for (var $e in S.modeProps)
+ j[$e] = S.modeProps[$e];
+ return j;
+ }
+ var qc = {};
+ function Jl(x, S) {
+ Qe(S, qc.hasOwnProperty(x) ? qc[x] : qc[x] = {});
+ }
+ function js(x, S) {
+ if (S === !0)
+ return S;
+ if (x.copyState)
+ return x.copyState(S);
+ var G = {};
+ for (var j in S) {
+ var V = S[j];
+ V instanceof Array && (V = V.concat([])), G[j] = V;
+ }
+ return G;
+ }
+ function Dc(x, S) {
+ for (var G; x.innerMode && (G = x.innerMode(S)) && G.mode != x; )
+ S = G.state, x = G.mode;
+ return G || { mode: x, state: S };
+ }
+ function gs(x, S, G) {
+ return !x.startState || x.startState(S, G);
+ }
+ var rc = function(x, S, G) {
+ this.pos = this.start = 0, this.string = x, this.tabSize = S || 8, this.lastColumnPos = this.lastColumnValue = 0, this.lineStart = 0, this.lineOracle = G;
+ };
+ function Ki(x, S) {
+ if ((S -= x.first) < 0 || S >= x.size)
+ throw new Error("There is no line " + (S + x.first) + " in the document.");
+ for (var G = x; !G.lines; )
+ for (var j = 0; ; ++j) {
+ var V = G.children[j], we = V.chunkSize();
+ if (S < we) {
+ G = V;
+ break;
+ }
+ S -= we;
+ }
+ return G.lines[S];
+ }
+ function Ta(x, S, G) {
+ var j = [], V = S.line;
+ return x.iter(S.line, G.line + 1, function(we) {
+ var $e = we.text;
+ V == G.line && ($e = $e.slice(0, G.ch)), V == S.line && ($e = $e.slice(S.ch)), j.push($e), ++V;
+ }), j;
+ }
+ function Bl(x, S, G) {
+ var j = [];
+ return x.iter(S, G, function(V) {
+ j.push(V.text);
+ }), j;
+ }
+ function sf(x, S) {
+ var G = S - x.height;
+ if (G)
+ for (var j = x; j; j = j.parent)
+ j.height += G;
+ }
+ function mc(x) {
+ if (x.parent == null)
+ return null;
+ for (var S = x.parent, G = jt(S.lines, x), j = S.parent; j; S = j, j = j.parent)
+ for (var V = 0; j.children[V] != S; ++V)
+ G += j.children[V].chunkSize();
+ return G + S.first;
+ }
+ function wh(x, S) {
+ var G = x.first;
+ e:
+ do {
+ for (var j = 0; j < x.children.length; ++j) {
+ var V = x.children[j], we = V.height;
+ if (S < we) {
+ x = V;
+ continue e;
+ }
+ S -= we, G += V.chunkSize();
+ }
+ return G;
+ } while (!x.lines);
+ for (var $e = 0; $e < x.lines.length; ++$e) {
+ var ze = x.lines[$e].height;
+ if (S < ze)
+ break;
+ S -= ze;
+ }
+ return G + $e;
+ }
+ function ra(x, S) {
+ return S >= x.first && S < x.first + x.size;
+ }
+ function Ls(x, S) {
+ return String(x.lineNumberFormatter(S + x.firstLineNumber));
+ }
+ function pr(x, S, G) {
+ if (G === void 0 && (G = null), !(this instanceof pr))
+ return new pr(x, S, G);
+ this.line = x, this.ch = S, this.sticky = G;
+ }
+ function Pr(x, S) {
+ return x.line - S.line || x.ch - S.ch;
+ }
+ function Wo(x, S) {
+ return x.sticky == S.sticky && Pr(x, S) == 0;
+ }
+ function hn(x) {
+ return pr(x.line, x.ch);
+ }
+ function wf(x, S) {
+ return Pr(x, S) < 0 ? S : x;
+ }
+ function Sn(x, S) {
+ return Pr(x, S) < 0 ? x : S;
+ }
+ function Nc(x, S) {
+ return Math.max(x.first, Math.min(S, x.first + x.size - 1));
+ }
+ function Ro(x, S) {
+ if (S.line < x.first)
+ return pr(x.first, 0);
+ var G = x.first + x.size - 1;
+ return S.line > G ? pr(G, Ki(x, G).text.length) : T1(S, Ki(x, S.line).text.length);
+ }
+ function T1(x, S) {
+ var G = x.ch;
+ return G == null || G > S ? pr(x.line, S) : G < 0 ? pr(x.line, 0) : x;
+ }
+ function tr(x, S) {
+ for (var G = [], j = 0; j < S.length; j++)
+ G[j] = Ro(x, S[j]);
+ return G;
+ }
+ rc.prototype.eol = function() {
+ return this.pos >= this.string.length;
+ }, rc.prototype.sol = function() {
+ return this.pos == this.lineStart;
+ }, rc.prototype.peek = function() {
+ return this.string.charAt(this.pos) || void 0;
+ }, rc.prototype.next = function() {
+ if (this.pos < this.string.length)
+ return this.string.charAt(this.pos++);
+ }, rc.prototype.eat = function(x) {
+ var S = this.string.charAt(this.pos);
+ if (typeof x == "string" ? S == x : S && (x.test ? x.test(S) : x(S)))
+ return ++this.pos, S;
+ }, rc.prototype.eatWhile = function(x) {
+ for (var S = this.pos; this.eat(x); )
+ ;
+ return this.pos > S;
+ }, rc.prototype.eatSpace = function() {
+ for (var x = this.pos; /[\s\u00a0]/.test(this.string.charAt(this.pos)); )
+ ++this.pos;
+ return this.pos > x;
+ }, rc.prototype.skipToEnd = function() {
+ this.pos = this.string.length;
+ }, rc.prototype.skipTo = function(x) {
+ var S = this.string.indexOf(x, this.pos);
+ if (S > -1)
+ return this.pos = S, !0;
+ }, rc.prototype.backUp = function(x) {
+ this.pos -= x;
+ }, rc.prototype.column = function() {
+ return this.lastColumnPos < this.start && (this.lastColumnValue = kt(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue), this.lastColumnPos = this.start), this.lastColumnValue - (this.lineStart ? kt(this.string, this.lineStart, this.tabSize) : 0);
+ }, rc.prototype.indentation = function() {
+ return kt(this.string, null, this.tabSize) - (this.lineStart ? kt(this.string, this.lineStart, this.tabSize) : 0);
+ }, rc.prototype.match = function(x, S, G) {
+ if (typeof x != "string") {
+ var j = this.string.slice(this.pos).match(x);
+ return j && j.index > 0 ? null : (j && S !== !1 && (this.pos += j[0].length), j);
+ }
+ var V = function(we) {
+ return G ? we.toLowerCase() : we;
+ };
+ if (V(this.string.substr(this.pos, x.length)) == V(x))
+ return S !== !1 && (this.pos += x.length), !0;
+ }, rc.prototype.current = function() {
+ return this.string.slice(this.start, this.pos);
+ }, rc.prototype.hideFirstChars = function(x, S) {
+ this.lineStart += x;
+ try {
+ return S();
+ } finally {
+ this.lineStart -= x;
+ }
+ }, rc.prototype.lookAhead = function(x) {
+ var S = this.lineOracle;
+ return S && S.lookAhead(x);
+ }, rc.prototype.baseToken = function() {
+ var x = this.lineOracle;
+ return x && x.baseToken(this.pos);
+ };
+ var ei = function(x, S) {
+ this.state = x, this.lookAhead = S;
+ }, fi = function(x, S, G, j) {
+ this.state = S, this.doc = x, this.line = G, this.maxLookAhead = j || 0, this.baseTokens = null, this.baseTokenPos = 1;
+ };
+ function ri(x, S, G, j) {
+ var V = [x.state.modeGen], we = {};
+ V1(x, S.text, x.doc.mode, G, function(at, Yt) {
+ return V.push(at, Yt);
+ }, we, j);
+ for (var $e = G.state, ze = function(at) {
+ G.baseTokens = V;
+ var Yt = x.state.overlays[at], Vt = 1, Nn = 0;
+ G.state = !0, V1(x, S.text, Yt.mode, G, function(Vn, mr) {
+ for (var si = Vt; Nn < Vn; ) {
+ var Mi = V[Vt];
+ Mi > Vn && V.splice(Vt, 1, Vn, V[Vt + 1], Mi), Vt += 2, Nn = Math.min(Vn, Mi);
+ }
+ if (mr)
+ if (Yt.opaque)
+ V.splice(si, Vt - si, Vn, "overlay " + mr), Vt = si + 2;
+ else
+ for (; si < Vt; si += 2) {
+ var _r = V[si + 1];
+ V[si + 1] = (_r ? _r + " " : "") + "overlay " + mr;
+ }
+ }, we), G.state = $e, G.baseTokens = null, G.baseTokenPos = 1;
+ }, nt = 0; nt < x.state.overlays.length; ++nt)
+ ze(nt);
+ return { styles: V, classes: we.bgClass || we.textClass ? we : null };
+ }
+ function Aa(x, S, G) {
+ if (!S.styles || S.styles[0] != x.state.modeGen) {
+ var j = ya(x, mc(S)), V = S.text.length > x.options.maxHighlightLength && js(x.doc.mode, j.state), we = ri(x, S, j);
+ V && (j.state = V), S.stateAfter = j.save(!V), S.styles = we.styles, we.classes ? S.styleClasses = we.classes : S.styleClasses && (S.styleClasses = null), G === x.doc.highlightFrontier && (x.doc.modeFrontier = Math.max(x.doc.modeFrontier, ++x.doc.highlightFrontier));
+ }
+ return S.styles;
+ }
+ function ya(x, S, G) {
+ var j = x.doc, V = x.display;
+ if (!j.mode.startState)
+ return new fi(j, !0, S);
+ var we = il(x, S, G), $e = we > j.first && Ki(j, we - 1).stateAfter, ze = $e ? fi.fromSaved(j, $e, we) : new fi(j, gs(j.mode), we);
+ return j.iter(we, S, function(nt) {
+ fo(x, nt.text, ze);
+ var at = ze.line;
+ nt.stateAfter = at == S - 1 || at % 5 == 0 || at >= V.viewFrom && at < V.viewTo ? ze.save() : null, ze.nextLine();
+ }), G && (j.modeFrontier = ze.line), ze;
+ }
+ function fo(x, S, G, j) {
+ var V = x.doc.mode, we = new rc(S, x.options.tabSize, G);
+ for (we.start = we.pos = j || 0, S == "" && bs(V, G.state); !we.eol(); )
+ xo(V, we, G.state), we.start = we.pos;
+ }
+ function bs(x, S) {
+ if (x.blankLine)
+ return x.blankLine(S);
+ if (x.innerMode) {
+ var G = Dc(x, S);
+ return G.mode.blankLine ? G.mode.blankLine(G.state) : void 0;
+ }
+ }
+ function xo(x, S, G, j) {
+ for (var V = 0; V < 10; V++) {
+ j && (j[0] = Dc(x, G).mode);
+ var we = x.token(S, G);
+ if (S.pos > S.start)
+ return we;
+ }
+ throw new Error("Mode " + x.name + " failed to advance stream.");
+ }
+ fi.prototype.lookAhead = function(x) {
+ var S = this.doc.getLine(this.line + x);
+ return S != null && x > this.maxLookAhead && (this.maxLookAhead = x), S;
+ }, fi.prototype.baseToken = function(x) {
+ if (!this.baseTokens)
+ return null;
+ for (; this.baseTokens[this.baseTokenPos] <= x; )
+ this.baseTokenPos += 2;
+ var S = this.baseTokens[this.baseTokenPos + 1];
+ return { type: S && S.replace(/( |^)overlay .*/, ""), size: this.baseTokens[this.baseTokenPos] - x };
+ }, fi.prototype.nextLine = function() {
+ this.line++, this.maxLookAhead > 0 && this.maxLookAhead--;
+ }, fi.fromSaved = function(x, S, G) {
+ return S instanceof ei ? new fi(x, js(x.mode, S.state), G, S.lookAhead) : new fi(x, js(x.mode, S), G);
+ }, fi.prototype.save = function(x) {
+ var S = x !== !1 ? js(this.doc.mode, this.state) : this.state;
+ return this.maxLookAhead > 0 ? new ei(S, this.maxLookAhead) : S;
+ };
+ var sl = function(x, S, G) {
+ this.start = x.start, this.end = x.pos, this.string = x.current(), this.type = S || null, this.state = G;
+ };
+ function Mu(x, S, G, j) {
+ var V, we, $e = x.doc, ze = $e.mode, nt = Ki($e, (S = Ro($e, S)).line), at = ya(x, S.line, G), Yt = new rc(nt.text, x.options.tabSize, at);
+ for (j && (we = []); (j || Yt.pos < S.ch) && !Yt.eol(); )
+ Yt.start = Yt.pos, V = xo(ze, Yt, at.state), j && we.push(new sl(Yt, V, js($e.mode, at.state)));
+ return j ? we : new sl(Yt, V, at.state);
+ }
+ function Zl(x, S) {
+ if (x)
+ for (; ; ) {
+ var G = x.match(/(?:^|\s+)line-(background-)?(\S+)/);
+ if (!G)
+ break;
+ x = x.slice(0, G.index) + x.slice(G.index + G[0].length);
+ var j = G[1] ? "bgClass" : "textClass";
+ S[j] == null ? S[j] = G[2] : new RegExp("(?:^|\\s)" + G[2] + "(?:$|\\s)").test(S[j]) || (S[j] += " " + G[2]);
+ }
+ return x;
+ }
+ function V1(x, S, G, j, V, we, $e) {
+ var ze = G.flattenSpans;
+ ze == null && (ze = x.options.flattenSpans);
+ var nt, at = 0, Yt = null, Vt = new rc(S, x.options.tabSize, j), Nn = x.options.addModeClass && [null];
+ for (S == "" && Zl(bs(G, j.state), we); !Vt.eol(); ) {
+ if (Vt.pos > x.options.maxHighlightLength ? (ze = !1, $e && fo(x, S, j, Vt.pos), Vt.pos = S.length, nt = null) : nt = Zl(xo(G, Vt, j.state, Nn), we), Nn) {
+ var Vn = Nn[0].name;
+ Vn && (nt = "m-" + (nt ? Vn + " " + nt : Vn));
+ }
+ if (!ze || Yt != nt) {
+ for (; at < Vt.start; )
+ V(at = Math.min(Vt.start, at + 5e3), Yt);
+ Yt = nt;
+ }
+ Vt.start = Vt.pos;
+ }
+ for (; at < Vt.pos; ) {
+ var mr = Math.min(Vt.pos, at + 5e3);
+ V(mr, Yt), at = mr;
+ }
+ }
+ function il(x, S, G) {
+ for (var j, V, we = x.doc, $e = G ? -1 : S - (x.doc.mode.innerMode ? 1e3 : 100), ze = S; ze > $e; --ze) {
+ if (ze <= we.first)
+ return we.first;
+ var nt = Ki(we, ze - 1), at = nt.stateAfter;
+ if (at && (!G || ze + (at instanceof ei ? at.lookAhead : 0) <= we.modeFrontier))
+ return ze;
+ var Yt = kt(nt.text, null, x.options.tabSize);
+ (V == null || j > Yt) && (V = ze - 1, j = Yt);
+ }
+ return V;
+ }
+ function kf(x, S) {
+ if (x.modeFrontier = Math.min(x.modeFrontier, S), !(x.highlightFrontier < S - 10)) {
+ for (var G = x.first, j = S - 1; j > G; j--) {
+ var V = Ki(x, j).stateAfter;
+ if (V && (!(V instanceof ei) || j + V.lookAhead < S)) {
+ G = j + 1;
+ break;
+ }
+ }
+ x.highlightFrontier = Math.min(x.highlightFrontier, G);
+ }
+ }
+ var eu = !1, cl = !1;
+ function Ps() {
+ eu = !0;
+ }
+ function hb() {
+ cl = !0;
+ }
+ function Of(x, S, G) {
+ this.marker = x, this.from = S, this.to = G;
+ }
+ function Sl(x, S) {
+ if (x)
+ for (var G = 0; G < x.length; ++G) {
+ var j = x[G];
+ if (j.marker == S)
+ return j;
+ }
+ }
+ function U0(x, S) {
+ for (var G, j = 0; j < x.length; ++j)
+ x[j] != S && (G || (G = [])).push(x[j]);
+ return G;
+ }
+ function Yf(x, S) {
+ x.markedSpans = x.markedSpans ? x.markedSpans.concat([S]) : [S], S.marker.attachLine(x);
+ }
+ function H0(x, S, G) {
+ var j;
+ if (x)
+ for (var V = 0; V < x.length; ++V) {
+ var we = x[V], $e = we.marker;
+ if (we.from == null || ($e.inclusiveLeft ? we.from <= S : we.from < S) || we.from == S && $e.type == "bookmark" && (!G || !we.marker.insertLeft)) {
+ var ze = we.to == null || ($e.inclusiveRight ? we.to >= S : we.to > S);
+ (j || (j = [])).push(new Of($e, we.from, ze ? null : we.to));
+ }
+ }
+ return j;
+ }
+ function cf(x, S, G) {
+ var j;
+ if (x)
+ for (var V = 0; V < x.length; ++V) {
+ var we = x[V], $e = we.marker;
+ if (we.to == null || ($e.inclusiveRight ? we.to >= S : we.to > S) || we.from == S && $e.type == "bookmark" && (!G || we.marker.insertLeft)) {
+ var ze = we.from == null || ($e.inclusiveLeft ? we.from <= S : we.from < S);
+ (j || (j = [])).push(new Of($e, ze ? null : we.from - S, we.to == null ? null : we.to - S));
+ }
+ }
+ return j;
+ }
+ function Ad(x, S) {
+ if (S.full)
+ return null;
+ var G = ra(x, S.from.line) && Ki(x, S.from.line).markedSpans, j = ra(x, S.to.line) && Ki(x, S.to.line).markedSpans;
+ if (!G && !j)
+ return null;
+ var V = S.from.ch, we = S.to.ch, $e = Pr(S.from, S.to) == 0, ze = H0(G, V, $e), nt = cf(j, we, $e), at = S.text.length == 1, Yt = pt(S.text).length + (at ? V : 0);
+ if (ze)
+ for (var Vt = 0; Vt < ze.length; ++Vt) {
+ var Nn = ze[Vt];
+ if (Nn.to == null) {
+ var Vn = Sl(nt, Nn.marker);
+ Vn ? at && (Nn.to = Vn.to == null ? null : Vn.to + Yt) : Nn.to = V;
+ }
+ }
+ if (nt)
+ for (var mr = 0; mr < nt.length; ++mr) {
+ var si = nt[mr];
+ si.to != null && (si.to += Yt), si.from == null ? Sl(ze, si.marker) || (si.from = Yt, at && (ze || (ze = [])).push(si)) : (si.from += Yt, at && (ze || (ze = [])).push(si));
+ }
+ ze && (ze = Ep(ze)), nt && nt != ze && (nt = Ep(nt));
+ var Mi = [ze];
+ if (!at) {
+ var _r, ao = S.text.length - 2;
+ if (ao > 0 && ze)
+ for (var ea = 0; ea < ze.length; ++ea)
+ ze[ea].to == null && (_r || (_r = [])).push(new Of(ze[ea].marker, null, null));
+ for (var zi = 0; zi < ao; ++zi)
+ Mi.push(_r);
+ Mi.push(nt);
+ }
+ return Mi;
+ }
+ function Ep(x) {
+ for (var S = 0; S < x.length; ++S) {
+ var G = x[S];
+ G.from != null && G.from == G.to && G.marker.clearWhenEmpty !== !1 && x.splice(S--, 1);
+ }
+ return x.length ? x : null;
+ }
+ function Md(x, S, G) {
+ var j = null;
+ if (x.iter(S.line, G.line + 1, function(Vn) {
+ if (Vn.markedSpans)
+ for (var mr = 0; mr < Vn.markedSpans.length; ++mr) {
+ var si = Vn.markedSpans[mr].marker;
+ !si.readOnly || j && jt(j, si) != -1 || (j || (j = [])).push(si);
+ }
+ }), !j)
+ return null;
+ for (var V = [{ from: S, to: G }], we = 0; we < j.length; ++we)
+ for (var $e = j[we], ze = $e.find(0), nt = 0; nt < V.length; ++nt) {
+ var at = V[nt];
+ if (!(Pr(at.to, ze.from) < 0 || Pr(at.from, ze.to) > 0)) {
+ var Yt = [nt, 1], Vt = Pr(at.from, ze.from), Nn = Pr(at.to, ze.to);
+ (Vt < 0 || !$e.inclusiveLeft && !Vt) && Yt.push({ from: at.from, to: ze.from }), (Nn > 0 || !$e.inclusiveRight && !Nn) && Yt.push({ from: ze.to, to: at.to }), V.splice.apply(V, Yt), nt += Yt.length - 3;
+ }
+ }
+ return V;
+ }
+ function mn(x) {
+ var S = x.markedSpans;
+ if (S) {
+ for (var G = 0; G < S.length; ++G)
+ S[G].marker.detachLine(x);
+ x.markedSpans = null;
+ }
+ }
+ function io(x, S) {
+ if (S) {
+ for (var G = 0; G < S.length; ++G)
+ S[G].marker.attachLine(x);
+ x.markedSpans = S;
+ }
+ }
+ function Ba(x) {
+ return x.inclusiveLeft ? -1 : 0;
+ }
+ function bc(x) {
+ return x.inclusiveRight ? 1 : 0;
+ }
+ function jc(x, S) {
+ var G = x.lines.length - S.lines.length;
+ if (G != 0)
+ return G;
+ var j = x.find(), V = S.find(), we = Pr(j.from, V.from) || Ba(x) - Ba(S);
+ if (we)
+ return -we;
+ var $e = Pr(j.to, V.to) || bc(x) - bc(S);
+ return $e || S.id - x.id;
+ }
+ function ll(x, S) {
+ var G, j = cl && x.markedSpans;
+ if (j)
+ for (var V = void 0, we = 0; we < j.length; ++we)
+ (V = j[we]).marker.collapsed && (S ? V.from : V.to) == null && (!G || jc(G, V.marker) < 0) && (G = V.marker);
+ return G;
+ }
+ function Df(x) {
+ return ll(x, !0);
+ }
+ function Jf(x) {
+ return ll(x, !1);
+ }
+ function Fd(x, S) {
+ var G, j = cl && x.markedSpans;
+ if (j)
+ for (var V = 0; V < j.length; ++V) {
+ var we = j[V];
+ we.marker.collapsed && (we.from == null || we.from < S) && (we.to == null || we.to > S) && (!G || jc(G, we.marker) < 0) && (G = we.marker);
+ }
+ return G;
+ }
+ function Gh(x, S, G, j, V) {
+ var we = Ki(x, S), $e = cl && we.markedSpans;
+ if ($e)
+ for (var ze = 0; ze < $e.length; ++ze) {
+ var nt = $e[ze];
+ if (nt.marker.collapsed) {
+ var at = nt.marker.find(0), Yt = Pr(at.from, G) || Ba(nt.marker) - Ba(V), Vt = Pr(at.to, j) || bc(nt.marker) - bc(V);
+ if (!(Yt >= 0 && Vt <= 0 || Yt <= 0 && Vt >= 0) && (Yt <= 0 && (nt.marker.inclusiveRight && V.inclusiveLeft ? Pr(at.to, G) >= 0 : Pr(at.to, G) > 0) || Yt >= 0 && (nt.marker.inclusiveRight && V.inclusiveLeft ? Pr(at.from, j) <= 0 : Pr(at.from, j) < 0)))
+ return !0;
+ }
+ }
+ }
+ function iA(x) {
+ for (var S; S = Df(x); )
+ x = S.find(-1, !0).line;
+ return x;
+ }
+ function bn(x) {
+ for (var S; S = Jf(x); )
+ x = S.find(1, !0).line;
+ return x;
+ }
+ function ia(x) {
+ for (var S, G; S = Jf(x); )
+ x = S.find(1, !0).line, (G || (G = [])).push(x);
+ return G;
+ }
+ function Ca(x, S) {
+ var G = Ki(x, S), j = iA(G);
+ return G == j ? S : mc(j);
+ }
+ function vl(x, S) {
+ if (S > x.lastLine())
+ return S;
+ var G, j = Ki(x, S);
+ if (!ku(x, j))
+ return S;
+ for (; G = Jf(j); )
+ j = G.find(1, !0).line;
+ return mc(j) + 1;
+ }
+ function ku(x, S) {
+ var G = cl && S.markedSpans;
+ if (G) {
+ for (var j = void 0, V = 0; V < G.length; ++V)
+ if ((j = G[V]).marker.collapsed && (j.from == null || !j.marker.widgetNode && j.from == 0 && j.marker.inclusiveLeft && lf(x, S, j)))
+ return !0;
+ }
+ }
+ function lf(x, S, G) {
+ if (G.to == null) {
+ var j = G.marker.find(1, !0);
+ return lf(x, j.line, Sl(j.line.markedSpans, G.marker));
+ }
+ if (G.marker.inclusiveRight && G.to == S.text.length)
+ return !0;
+ for (var V = void 0, we = 0; we < S.markedSpans.length; ++we)
+ if ((V = S.markedSpans[we]).marker.collapsed && !V.marker.widgetNode && V.from == G.to && (V.to == null || V.to != G.from) && (V.marker.inclusiveLeft || G.marker.inclusiveRight) && lf(x, S, V))
+ return !0;
+ }
+ function uf(x) {
+ for (var S = 0, G = (x = iA(x)).parent, j = 0; j < G.lines.length; ++j) {
+ var V = G.lines[j];
+ if (V == x)
+ break;
+ S += V.height;
+ }
+ for (var we = G.parent; we; we = (G = we).parent)
+ for (var $e = 0; $e < we.children.length; ++$e) {
+ var ze = we.children[$e];
+ if (ze == G)
+ break;
+ S += ze.height;
+ }
+ return S;
+ }
+ function Tp(x) {
+ if (x.height == 0)
+ return 0;
+ for (var S, G = x.text.length, j = x; S = Df(j); ) {
+ var V = S.find(0, !0);
+ j = V.from.line, G += V.from.ch - V.to.ch;
+ }
+ for (j = x; S = Jf(j); ) {
+ var we = S.find(0, !0);
+ G -= j.text.length - we.from.ch, G += (j = we.to.line).text.length - we.to.ch;
+ }
+ return G;
+ }
+ function s0(x) {
+ var S = x.display, G = x.doc;
+ S.maxLine = Ki(G, G.first), S.maxLineLength = Tp(S.maxLine), S.maxLineChanged = !0, G.iter(function(j) {
+ var V = Tp(j);
+ V > S.maxLineLength && (S.maxLineLength = V, S.maxLine = j);
+ });
+ }
+ var Zf = function(x, S, G) {
+ this.text = x, io(this, S), this.height = G ? G(this) : 1;
+ };
+ function Br(x, S, G, j) {
+ x.text = S, x.stateAfter && (x.stateAfter = null), x.styles && (x.styles = null), x.order != null && (x.order = null), mn(x), io(x, G);
+ var V = j ? j(x) : 1;
+ V != x.height && sf(x, V);
+ }
+ function Bk(x) {
+ x.parent = null, mn(x);
+ }
+ Zf.prototype.lineNo = function() {
+ return mc(this);
+ }, er(Zf);
+ var Sk = {}, hC = {};
+ function E3(x, S) {
+ if (!x || /^\s*$/.test(x))
+ return null;
+ var G = S.addModeClass ? hC : Sk;
+ return G[x] || (G[x] = x.replace(/\S+/g, "cm-$&"));
+ }
+ function Gy(x, S) {
+ var G = ve("span", null, null, _ ? "padding-right: .1px" : null), j = { pre: ve("pre", [G], "CodeMirror-line"), content: G, col: 0, pos: 0, cm: x, trailingSpace: !1, splitSpaces: x.getOption("lineWrapping") };
+ S.measure = {};
+ for (var V = 0; V <= (S.rest ? S.rest.length : 0); V++) {
+ var we = V ? S.rest[V - 1] : S.line, $e = void 0;
+ j.pos = 0, j.addToken = Rs, Hs(x.display.measure) && ($e = Jo(we, x.doc.direction)) && (j.addToken = T3(j.addToken, $e)), j.map = [], Z9(we, j, Aa(x, we, S != x.display.externalMeasured && mc(we))), we.styleClasses && (we.styleClasses.bgClass && (j.bgClass = bt(we.styleClasses.bgClass, j.bgClass || "")), we.styleClasses.textClass && (j.textClass = bt(we.styleClasses.textClass, j.textClass || ""))), j.map.length == 0 && j.map.push(0, 0, j.content.appendChild(Fs(x.display.measure))), V == 0 ? (S.measure.map = j.map, S.measure.cache = {}) : ((S.measure.maps || (S.measure.maps = [])).push(j.map), (S.measure.caches || (S.measure.caches = [])).push({}));
+ }
+ if (_) {
+ var ze = j.content.lastChild;
+ (/\bcm-tab\b/.test(ze.className) || ze.querySelector && ze.querySelector(".cm-tab")) && (j.content.className = "cm-tab-wrap-hack");
+ }
+ return Yr(x, "renderLine", x, S.line, j.pre), j.pre.className && (j.textClass = bt(j.pre.className, j.textClass || "")), j;
+ }
+ function ic(x) {
+ var S = Me("span", "•", "cm-invalidchar");
+ return S.title = "\\u" + x.charCodeAt(0).toString(16), S.setAttribute("aria-label", S.title), S;
+ }
+ function Rs(x, S, G, j, V, we, $e) {
+ if (S) {
+ var ze, nt = x.splitSpaces ? J9(S, x.trailingSpace) : S, at = x.cm.state.specialChars, Yt = !1;
+ if (at.test(S)) {
+ ze = document.createDocumentFragment();
+ for (var Vt = 0; ; ) {
+ at.lastIndex = Vt;
+ var Nn = at.exec(S), Vn = Nn ? Nn.index - Vt : S.length - Vt;
+ if (Vn) {
+ var mr = document.createTextNode(nt.slice(Vt, Vt + Vn));
+ v && k < 9 ? ze.appendChild(Me("span", [mr])) : ze.appendChild(mr), x.map.push(x.pos, x.pos + Vn, mr), x.col += Vn, x.pos += Vn;
+ }
+ if (!Nn)
+ break;
+ Vt += Vn + 1;
+ var si = void 0;
+ if (Nn[0] == " ") {
+ var Mi = x.cm.options.tabSize, _r = Mi - x.col % Mi;
+ (si = ze.appendChild(Me("span", $n(_r), "cm-tab"))).setAttribute("role", "presentation"), si.setAttribute("cm-text", " "), x.col += _r;
+ } else
+ Nn[0] == "\r" || Nn[0] == `
+` ? ((si = ze.appendChild(Me("span", Nn[0] == "\r" ? "␍" : "", "cm-invalidchar"))).setAttribute("cm-text", Nn[0]), x.col += 1) : ((si = x.cm.options.specialCharPlaceholder(Nn[0])).setAttribute("cm-text", Nn[0]), v && k < 9 ? ze.appendChild(Me("span", [si])) : ze.appendChild(si), x.col += 1);
+ x.map.push(x.pos, x.pos + 1, si), x.pos++;
+ }
+ } else
+ x.col += S.length, ze = document.createTextNode(nt), x.map.push(x.pos, x.pos + S.length, ze), v && k < 9 && (Yt = !0), x.pos += S.length;
+ if (x.trailingSpace = nt.charCodeAt(S.length - 1) == 32, G || j || V || Yt || we || $e) {
+ var ao = G || "";
+ j && (ao += j), V && (ao += V);
+ var ea = Me("span", [ze], ao, we);
+ if ($e)
+ for (var zi in $e)
+ $e.hasOwnProperty(zi) && zi != "style" && zi != "class" && ea.setAttribute(zi, $e[zi]);
+ return x.content.appendChild(ea);
+ }
+ x.content.appendChild(ze);
+ }
+ }
+ function J9(x, S) {
+ if (x.length > 1 && !/ /.test(x))
+ return x;
+ for (var G = S, j = "", V = 0; V < x.length; V++) {
+ var we = x.charAt(V);
+ we != " " || !G || V != x.length - 1 && x.charCodeAt(V + 1) != 32 || (we = " "), j += we, G = we == " ";
+ }
+ return j;
+ }
+ function T3(x, S) {
+ return function(G, j, V, we, $e, ze, nt) {
+ V = V ? V + " cm-force-border" : "cm-force-border";
+ for (var at = G.pos, Yt = at + j.length; ; ) {
+ for (var Vt = void 0, Nn = 0; Nn < S.length && !((Vt = S[Nn]).to > at && Vt.from <= at); Nn++)
+ ;
+ if (Vt.to >= Yt)
+ return x(G, j, V, we, $e, ze, nt);
+ x(G, j.slice(0, Vt.to - at), V, we, null, ze, nt), we = null, j = j.slice(Vt.to - at), at = Vt.to;
+ }
+ };
+ }
+ function Lk(x, S, G, j) {
+ var V = !j && G.widgetNode;
+ V && x.map.push(x.pos, x.pos + S, V), !j && x.cm.display.input.needsContentAttribute && (V || (V = x.content.appendChild(document.createElement("span"))), V.setAttribute("cm-marker", G.id)), V && (x.cm.display.input.setUneditable(V), x.content.appendChild(V)), x.pos += S, x.trailingSpace = !1;
+ }
+ function Z9(x, S, G) {
+ var j = x.markedSpans, V = x.text, we = 0;
+ if (j)
+ for (var $e, ze, nt, at, Yt, Vt, Nn, Vn = V.length, mr = 0, si = 1, Mi = "", _r = 0; ; ) {
+ if (_r == mr) {
+ nt = at = Yt = ze = "", Nn = null, Vt = null, _r = 1 / 0;
+ for (var ao = [], ea = void 0, zi = 0; zi < j.length; ++zi) {
+ var Qo = j[zi], $a = Qo.marker;
+ if ($a.type == "bookmark" && Qo.from == mr && $a.widgetNode)
+ ao.push($a);
+ else if (Qo.from <= mr && (Qo.to == null || Qo.to > mr || $a.collapsed && Qo.to == mr && Qo.from == mr)) {
+ if (Qo.to != null && Qo.to != mr && _r > Qo.to && (_r = Qo.to, at = ""), $a.className && (nt += " " + $a.className), $a.css && (ze = (ze ? ze + ";" : "") + $a.css), $a.startStyle && Qo.from == mr && (Yt += " " + $a.startStyle), $a.endStyle && Qo.to == _r && (ea || (ea = [])).push($a.endStyle, Qo.to), $a.title && ((Nn || (Nn = {})).title = $a.title), $a.attributes)
+ for (var Ll in $a.attributes)
+ (Nn || (Nn = {}))[Ll] = $a.attributes[Ll];
+ $a.collapsed && (!Vt || jc(Vt.marker, $a) < 0) && (Vt = Qo);
+ } else
+ Qo.from > mr && _r > Qo.from && (_r = Qo.from);
+ }
+ if (ea)
+ for (var hu = 0; hu < ea.length; hu += 2)
+ ea[hu + 1] == _r && (at += " " + ea[hu]);
+ if (!Vt || Vt.from == mr)
+ for (var I1 = 0; I1 < ao.length; ++I1)
+ Lk(S, 0, ao[I1]);
+ if (Vt && (Vt.from || 0) == mr) {
+ if (Lk(S, (Vt.to == null ? Vn + 1 : Vt.to) - mr, Vt.marker, Vt.from == null), Vt.to == null)
+ return;
+ Vt.to == mr && (Vt = !1);
+ }
+ }
+ if (mr >= Vn)
+ break;
+ for (var ac = Math.min(Vn, _r); ; ) {
+ if (Mi) {
+ var _f = mr + Mi.length;
+ if (!Vt) {
+ var J1 = _f > ac ? Mi.slice(0, ac - mr) : Mi;
+ S.addToken(S, J1, $e ? $e + nt : nt, Yt, mr + J1.length == _r ? at : "", ze, Nn);
+ }
+ if (_f >= ac) {
+ Mi = Mi.slice(ac - mr), mr = ac;
+ break;
+ }
+ mr = _f, Yt = "";
+ }
+ Mi = V.slice(we, we = G[si++]), $e = E3(G[si++], S.cm.options);
+ }
+ }
+ else
+ for (var qh = 1; qh < G.length; qh += 2)
+ S.addToken(S, V.slice(we, we = G[qh]), E3(G[qh + 1], S.cm.options));
+ }
+ function fC(x, S, G) {
+ this.line = S, this.rest = ia(S), this.size = this.rest ? mc(pt(this.rest)) - G + 1 : 1, this.node = this.text = null, this.hidden = ku(x, S);
+ }
+ function Sv(x, S, G) {
+ for (var j, V = [], we = S; we < G; we = j) {
+ var $e = new fC(x.doc, Ki(x.doc, we), we);
+ j = we + $e.size, V.push($e);
+ }
+ return V;
+ }
+ var fb = null;
+ function Xy(x) {
+ fb ? fb.ops.push(x) : x.ownsGroup = fb = { ops: [x], delayedCallbacks: [] };
+ }
+ function Ec(x) {
+ var S = x.delayedCallbacks, G = 0;
+ do {
+ for (; G < S.length; G++)
+ S[G].call(null);
+ for (var j = 0; j < x.ops.length; j++) {
+ var V = x.ops[j];
+ if (V.cursorActivityHandlers)
+ for (; V.cursorActivityCalled < V.cursorActivityHandlers.length; )
+ V.cursorActivityHandlers[V.cursorActivityCalled++].call(null, V.cm);
+ }
+ } while (G < S.length);
+ }
+ function j0(x, S) {
+ var G = x.ownsGroup;
+ if (G)
+ try {
+ Ec(G);
+ } finally {
+ fb = null, S(G);
+ }
+ }
+ var c0 = null;
+ function Dl(x, S) {
+ var G = Ya(x, S);
+ if (G.length) {
+ var j, V = Array.prototype.slice.call(arguments, 2);
+ fb ? j = fb.delayedCallbacks : c0 ? j = c0 : (j = c0 = [], setTimeout(k2, 0));
+ for (var we = function(ze) {
+ j.push(function() {
+ return G[ze].apply(null, V);
+ });
+ }, $e = 0; $e < G.length; ++$e)
+ we($e);
+ }
+ }
+ function k2() {
+ var x = c0;
+ c0 = null;
+ for (var S = 0; S < x.length; ++S)
+ x[S]();
+ }
+ function x2(x, S, G, j) {
+ for (var V = 0; V < S.changes.length; V++) {
+ var we = S.changes[V];
+ we == "text" ? x5(x, S) : we == "gutter" ? C2(x, S, G, j) : we == "class" ? B3(x, S) : we == "widget" && K0(x, S, j);
+ }
+ S.changes = null;
+ }
+ function l0(x) {
+ return x.node == x.text && (x.node = Me("div", null, null, "position: relative"), x.text.parentNode && x.text.parentNode.replaceChild(x.node, x.text), x.node.appendChild(x.text), v && k < 8 && (x.node.style.zIndex = 2)), x.node;
+ }
+ function vc(x, S) {
+ var G = S.bgClass ? S.bgClass + " " + (S.line.bgClass || "") : S.line.bgClass;
+ if (G && (G += " CodeMirror-linebackground"), S.background)
+ G ? S.background.className = G : (S.background.parentNode.removeChild(S.background), S.background = null);
+ else if (G) {
+ var j = l0(S);
+ S.background = j.insertBefore(Me("div", null, G), j.firstChild), x.display.input.setUneditable(S.background);
+ }
+ }
+ function Ik(x, S) {
+ var G = x.display.externalMeasured;
+ return G && G.line == S.line ? (x.display.externalMeasured = null, S.measure = G.measure, G.built) : Gy(x, S);
+ }
+ function x5(x, S) {
+ var G = S.text.className, j = Ik(x, S);
+ S.text == S.node && (S.node = j.pre), S.text.parentNode.replaceChild(j.pre, S.text), S.text = j.pre, j.bgClass != S.bgClass || j.textClass != S.textClass ? (S.bgClass = j.bgClass, S.textClass = j.textClass, B3(x, S)) : G && (S.text.className = G);
+ }
+ function B3(x, S) {
+ vc(x, S), S.line.wrapClass ? l0(S).className = S.line.wrapClass : S.node != S.text && (S.node.className = "");
+ var G = S.textClass ? S.textClass + " " + (S.line.textClass || "") : S.line.textClass;
+ S.text.className = G || "";
+ }
+ function C2(x, S, G, j) {
+ if (S.gutter && (S.node.removeChild(S.gutter), S.gutter = null), S.gutterBackground && (S.node.removeChild(S.gutterBackground), S.gutterBackground = null), S.line.gutterClass) {
+ var V = l0(S);
+ S.gutterBackground = Me("div", null, "CodeMirror-gutter-background " + S.line.gutterClass, "left: " + (x.options.fixedGutter ? j.fixedPos : -j.gutterTotalWidth) + "px; width: " + j.gutterTotalWidth + "px"), x.display.input.setUneditable(S.gutterBackground), V.insertBefore(S.gutterBackground, S.text);
+ }
+ var we = S.line.gutterMarkers;
+ if (x.options.lineNumbers || we) {
+ var $e = l0(S), ze = S.gutter = Me("div", null, "CodeMirror-gutter-wrapper", "left: " + (x.options.fixedGutter ? j.fixedPos : -j.gutterTotalWidth) + "px");
+ if (x.display.input.setUneditable(ze), $e.insertBefore(ze, S.text), S.line.gutterClass && (ze.className += " " + S.line.gutterClass), !x.options.lineNumbers || we && we["CodeMirror-linenumbers"] || (S.lineNumber = ze.appendChild(Me("div", Ls(x.options, G), "CodeMirror-linenumber CodeMirror-gutter-elt", "left: " + j.gutterLeft["CodeMirror-linenumbers"] + "px; width: " + x.display.lineNumInnerWidth + "px"))), we)
+ for (var nt = 0; nt < x.display.gutterSpecs.length; ++nt) {
+ var at = x.display.gutterSpecs[nt].className, Yt = we.hasOwnProperty(at) && we[at];
+ Yt && ze.appendChild(Me("div", [Yt], "CodeMirror-gutter-elt", "left: " + j.gutterLeft[at] + "px; width: " + j.gutterWidth[at] + "px"));
+ }
+ }
+ }
+ function K0(x, S, G) {
+ S.alignable && (S.alignable = null);
+ for (var j = Te("CodeMirror-linewidget"), V = S.node.firstChild, we = void 0; V; V = we)
+ we = V.nextSibling, j.test(V.className) && S.node.removeChild(V);
+ dm(x, S, G);
+ }
+ function Mk(x, S, G, j) {
+ var V = Ik(x, S);
+ return S.text = S.node = V.pre, V.bgClass && (S.bgClass = V.bgClass), V.textClass && (S.textClass = V.textClass), B3(x, S), C2(x, S, G, j), dm(x, S, j), S.node;
+ }
+ function dm(x, S, G) {
+ if (Xh(x, S.line, S, G, !0), S.rest)
+ for (var j = 0; j < S.rest.length; j++)
+ Xh(x, S.rest[j], S, G, !1);
+ }
+ function Xh(x, S, G, j, V) {
+ if (S.widgets)
+ for (var we = l0(G), $e = 0, ze = S.widgets; $e < ze.length; ++$e) {
+ var nt = ze[$e], at = Me("div", [nt.node], "CodeMirror-linewidget" + (nt.className ? " " + nt.className : ""));
+ nt.handleMouseEvents || at.setAttribute("cm-ignore-events", "true"), Bp(nt, at, G, j), x.display.input.setUneditable(at), V && nt.above ? we.insertBefore(at, G.gutter || G.text) : we.appendChild(at), Dl(nt, "redraw");
+ }
+ }
+ function Bp(x, S, G, j) {
+ if (x.noHScroll) {
+ (G.alignable || (G.alignable = [])).push(S);
+ var V = j.wrapperWidth;
+ S.style.left = j.fixedPos + "px", x.coverGutter || (V -= j.gutterTotalWidth, S.style.paddingLeft = j.gutterTotalWidth + "px"), S.style.width = V + "px";
+ }
+ x.coverGutter && (S.style.zIndex = 5, S.style.position = "relative", x.noHScroll || (S.style.marginLeft = -j.gutterTotalWidth + "px"));
+ }
+ function xf(x) {
+ if (x.height != null)
+ return x.height;
+ var S = x.doc.cm;
+ if (!S)
+ return 0;
+ if (!ge(document.body, x.node)) {
+ var G = "position: relative;";
+ x.coverGutter && (G += "margin-left: -" + S.display.gutters.offsetWidth + "px;"), x.noHScroll && (G += "width: " + S.display.wrapper.clientWidth + "px;"), te(S.display.measure, Me("div", [x.node], null, G));
+ }
+ return x.height = x.node.parentNode.offsetHeight;
+ }
+ function Lg(x, S) {
+ for (var G = xa(S); G != x.wrapper; G = G.parentNode)
+ if (!G || G.nodeType == 1 && G.getAttribute("cm-ignore-events") == "true" || G.parentNode == x.sizer && G != x.mover)
+ return !0;
+ }
+ function Nf(x) {
+ return x.lineSpace.offsetTop;
+ }
+ function Lv(x) {
+ return x.mover.offsetHeight - x.lineSpace.offsetHeight;
+ }
+ function Fu(x) {
+ if (x.cachedPaddingH)
+ return x.cachedPaddingH;
+ var S = te(x.measure, Me("pre", "x", "CodeMirror-line-like")), G = window.getComputedStyle ? window.getComputedStyle(S) : S.currentStyle, j = { left: parseInt(G.paddingLeft), right: parseInt(G.paddingRight) };
+ return isNaN(j.left) || isNaN(j.right) || (x.cachedPaddingH = j), j;
+ }
+ function Sp(x) {
+ return Zn - x.display.nativeBarWidth;
+ }
+ function _2(x) {
+ return x.display.scroller.clientWidth - Sp(x) - x.display.barWidth;
+ }
+ function S3(x) {
+ return x.display.scroller.clientHeight - Sp(x) - x.display.barHeight;
+ }
+ function Fk(x, S, G) {
+ var j = x.options.lineWrapping, V = j && _2(x);
+ if (!S.measure.heights || j && S.measure.width != V) {
+ var we = S.measure.heights = [];
+ if (j) {
+ S.measure.width = V;
+ for (var $e = S.text.firstChild.getClientRects(), ze = 0; ze < $e.length - 1; ze++) {
+ var nt = $e[ze], at = $e[ze + 1];
+ Math.abs(nt.bottom - at.bottom) > 2 && we.push((nt.bottom + at.top) / 2 - G.top);
+ }
+ }
+ we.push(G.bottom - G.top);
+ }
+ }
+ function gd(x, S, G) {
+ if (x.line == S)
+ return { map: x.measure.map, cache: x.measure.cache };
+ for (var j = 0; j < x.rest.length; j++)
+ if (x.rest[j] == S)
+ return { map: x.measure.maps[j], cache: x.measure.caches[j] };
+ for (var V = 0; V < x.rest.length; V++)
+ if (mc(x.rest[V]) > G)
+ return { map: x.measure.maps[V], cache: x.measure.caches[V], before: !0 };
+ }
+ function Ig(x, S) {
+ var G = mc(S = iA(S)), j = x.display.externalMeasured = new fC(x.doc, S, G);
+ j.lineN = G;
+ var V = j.built = Gy(x, j);
+ return j.text = V.pre, te(x.display.lineMeasure, V.pre), j;
+ }
+ function Wy(x, S, G, j) {
+ return Od(x, aA(x, S), G, j);
+ }
+ function h1(x, S) {
+ if (S >= x.display.viewFrom && S < x.display.viewTo)
+ return x.display.view[f0(x, S)];
+ var G = x.display.externalMeasured;
+ return G && S >= G.lineN && S < G.lineN + G.size ? G : void 0;
+ }
+ function aA(x, S) {
+ var G = mc(S), j = h1(x, G);
+ j && !j.text ? j = null : j && j.changes && (x2(x, j, G, Lp(x)), x.curOp.forceUpdate = !0), j || (j = Ig(x, S));
+ var V = gd(j, S, G);
+ return { line: S, view: j, rect: null, map: V.map, cache: V.cache, before: V.before, hasHeights: !1 };
+ }
+ function Od(x, S, G, j, V) {
+ S.before && (G = -1);
+ var we, $e = G + (j || "");
+ return S.cache.hasOwnProperty($e) ? we = S.cache[$e] : (S.rect || (S.rect = S.view.text.getBoundingClientRect()), S.hasHeights || (Fk(x, S.view, S.rect), S.hasHeights = !0), (we = E2(x, S, G, j)).bogus || (S.cache[$e] = we)), { left: we.left, right: we.right, top: V ? we.rtop : we.top, bottom: V ? we.rbottom : we.bottom };
+ }
+ var Ks, u0 = { left: 0, right: 0, top: 0, bottom: 0 };
+ function L3(x, S, G) {
+ for (var j, V, we, $e, ze, nt, at = 0; at < x.length; at += 3)
+ if (ze = x[at], nt = x[at + 1], S < ze ? (V = 0, we = 1, $e = "left") : S < nt ? we = 1 + (V = S - ze) : (at == x.length - 3 || S == nt && x[at + 3] > S) && (V = (we = nt - ze) - 1, S >= nt && ($e = "right")), V != null) {
+ if (j = x[at + 2], ze == nt && G == (j.insertLeft ? "left" : "right") && ($e = G), G == "left" && V == 0)
+ for (; at && x[at - 2] == x[at - 3] && x[at - 1].insertLeft; )
+ j = x[2 + (at -= 3)], $e = "left";
+ if (G == "right" && V == nt - ze)
+ for (; at < x.length - 3 && x[at + 3] == x[at + 4] && !x[at + 5].insertLeft; )
+ j = x[(at += 3) + 2], $e = "right";
+ break;
+ }
+ return { node: j, start: V, end: we, collapse: $e, coverStart: ze, coverEnd: nt };
+ }
+ function db(x, S) {
+ var G = u0;
+ if (S == "left")
+ for (var j = 0; j < x.length && (G = x[j]).left == G.right; j++)
+ ;
+ else
+ for (var V = x.length - 1; V >= 0 && (G = x[V]).left == G.right; V--)
+ ;
+ return G;
+ }
+ function E2(x, S, G, j) {
+ var V, we = L3(S.map, G, j), $e = we.node, ze = we.start, nt = we.end, at = we.collapse;
+ if ($e.nodeType == 3) {
+ for (var Yt = 0; Yt < 4; Yt++) {
+ for (; ze && or(S.line.text.charAt(we.coverStart + ze)); )
+ --ze;
+ for (; we.coverStart + nt < we.coverEnd && or(S.line.text.charAt(we.coverStart + nt)); )
+ ++nt;
+ if ((V = v && k < 9 && ze == 0 && nt == we.coverEnd - we.coverStart ? $e.parentNode.getBoundingClientRect() : db(xe($e, ze, nt).getClientRects(), j)).left || V.right || ze == 0)
+ break;
+ nt = ze, ze -= 1, at = "right";
+ }
+ v && k < 11 && (V = Iv(x.display.measure, V));
+ } else {
+ var Vt;
+ ze > 0 && (at = j = "right"), V = x.options.lineWrapping && (Vt = $e.getClientRects()).length > 1 ? Vt[j == "right" ? Vt.length - 1 : 0] : $e.getBoundingClientRect();
+ }
+ if (v && k < 9 && !ze && (!V || !V.left && !V.right)) {
+ var Nn = $e.parentNode.getClientRects()[0];
+ V = Nn ? { left: Nn.left, right: Nn.left + Nd(x.display), top: Nn.top, bottom: Nn.bottom } : u0;
+ }
+ for (var Vn = V.top - S.rect.top, mr = V.bottom - S.rect.top, si = (Vn + mr) / 2, Mi = S.view.measure.heights, _r = 0; _r < Mi.length - 1 && !(si < Mi[_r]); _r++)
+ ;
+ var ao = _r ? Mi[_r - 1] : 0, ea = Mi[_r], zi = { left: (at == "right" ? V.right : V.left) - S.rect.left, right: (at == "left" ? V.left : V.right) - S.rect.left, top: ao, bottom: ea };
+ return V.left || V.right || (zi.bogus = !0), x.options.singleCursorHeightPerLine || (zi.rtop = Vn, zi.rbottom = mr), zi;
+ }
+ function Iv(x, S) {
+ if (!window.screen || screen.logicalXDPI == null || screen.logicalXDPI == screen.deviceXDPI || !_c(x))
+ return S;
+ var G = screen.logicalXDPI / screen.deviceXDPI, j = screen.logicalYDPI / screen.deviceYDPI;
+ return { left: S.left * G, right: S.right * G, top: S.top * j, bottom: S.bottom * j };
+ }
+ function Vy(x) {
+ if (x.measure && (x.measure.cache = {}, x.measure.heights = null, x.rest))
+ for (var S = 0; S < x.rest.length; S++)
+ x.measure.caches[S] = {};
+ }
+ function B1(x) {
+ x.display.externalMeasure = null, Be(x.display.lineMeasure);
+ for (var S = 0; S < x.display.view.length; S++)
+ Vy(x.display.view[S]);
+ }
+ function BA(x) {
+ B1(x), x.display.cachedCharWidth = x.display.cachedTextHeight = x.display.cachedPaddingH = null, x.options.lineWrapping || (x.display.maxLineChanged = !0), x.display.lineNumChars = null;
+ }
+ function qy() {
+ return L && J ? -(document.body.getBoundingClientRect().left - parseInt(getComputedStyle(document.body).marginLeft)) : window.pageXOffset || (document.documentElement || document.body).scrollLeft;
+ }
+ function Yy() {
+ return L && J ? -(document.body.getBoundingClientRect().top - parseInt(getComputedStyle(document.body).marginTop)) : window.pageYOffset || (document.documentElement || document.body).scrollTop;
+ }
+ function h0(x) {
+ var S = 0;
+ if (x.widgets)
+ for (var G = 0; G < x.widgets.length; ++G)
+ x.widgets[G].above && (S += xf(x.widgets[G]));
+ return S;
+ }
+ function Jy(x, S, G, j, V) {
+ if (!V) {
+ var we = h0(S);
+ G.top += we, G.bottom += we;
+ }
+ if (j == "line")
+ return G;
+ j || (j = "local");
+ var $e = uf(S);
+ if (j == "local" ? $e += Nf(x.display) : $e -= x.display.viewOffset, j == "page" || j == "window") {
+ var ze = x.display.lineSpace.getBoundingClientRect();
+ $e += ze.top + (j == "window" ? 0 : Yy());
+ var nt = ze.left + (j == "window" ? 0 : qy());
+ G.left += nt, G.right += nt;
+ }
+ return G.top += $e, G.bottom += $e, G;
+ }
+ function Ok(x, S, G) {
+ if (G == "div")
+ return S;
+ var j = S.left, V = S.top;
+ if (G == "page")
+ j -= qy(), V -= Yy();
+ else if (G == "local" || !G) {
+ var we = x.display.sizer.getBoundingClientRect();
+ j += we.left, V += we.top;
+ }
+ var $e = x.display.lineSpace.getBoundingClientRect();
+ return { left: j - $e.left, top: V - $e.top };
+ }
+ function I3(x, S, G, j, V) {
+ return j || (j = Ki(x.doc, S.line)), Jy(x, j, Wy(x, j, S.ch, V), G);
+ }
+ function Wh(x, S, G, j, V, we) {
+ function $e(mr, si) {
+ var Mi = Od(x, V, mr, si ? "right" : "left", we);
+ return si ? Mi.left = Mi.right : Mi.right = Mi.left, Jy(x, j, Mi, G);
+ }
+ j = j || Ki(x.doc, S.line), V || (V = aA(x, j));
+ var ze = Jo(j, x.doc.direction), nt = S.ch, at = S.sticky;
+ if (nt >= j.text.length ? (nt = j.text.length, at = "before") : nt <= 0 && (nt = 0, at = "after"), !ze)
+ return $e(at == "before" ? nt - 1 : nt, at == "before");
+ function Yt(mr, si, Mi) {
+ return $e(Mi ? mr - 1 : mr, ze[si].level == 1 != Mi);
+ }
+ var Vt = la(ze, nt, at), Nn = Cr, Vn = Yt(nt, Vt, at == "before");
+ return Nn != null && (Vn.other = Yt(nt, Nn, at != "before")), Vn;
+ }
+ function Mg(x, S) {
+ var G = 0;
+ S = Ro(x.doc, S), x.options.lineWrapping || (G = Nd(x.display) * S.ch);
+ var j = Ki(x.doc, S.line), V = uf(j) + Nf(x.display);
+ return { left: G, right: G, top: V, bottom: V + j.height };
+ }
+ function M3(x, S, G, j, V) {
+ var we = pr(x, S, G);
+ return we.xRel = V, j && (we.outside = j), we;
+ }
+ function SA(x, S, G) {
+ var j = x.doc;
+ if ((G += x.display.viewOffset) < 0)
+ return M3(j.first, 0, null, -1, -1);
+ var V = wh(j, G), we = j.first + j.size - 1;
+ if (V > we)
+ return M3(j.first + j.size - 1, Ki(j, we).text.length, null, 1, 1);
+ S < 0 && (S = 0);
+ for (var $e = Ki(j, V); ; ) {
+ var ze = Mv(x, $e, V, S, G), nt = Fd($e, ze.ch + (ze.xRel > 0 || ze.outside > 0 ? 1 : 0));
+ if (!nt)
+ return ze;
+ var at = nt.find(1);
+ if (at.line == V)
+ return at;
+ $e = Ki(j, V = at.line);
+ }
+ }
+ function Fg(x, S, G, j) {
+ j -= h0(S);
+ var V = S.text.length, we = An(function($e) {
+ return Od(x, G, $e - 1).bottom <= j;
+ }, V, 0);
+ return { begin: we, end: V = An(function($e) {
+ return Od(x, G, $e).top > j;
+ }, we, V) };
+ }
+ function Am(x, S, G, j) {
+ return G || (G = aA(x, S)), Fg(x, S, G, Jy(x, S, Od(x, G, j), "line").top);
+ }
+ function Dd(x, S, G, j) {
+ return !(x.bottom <= G) && (x.top > G || (j ? x.left : x.right) > S);
+ }
+ function Mv(x, S, G, j, V) {
+ V -= uf(S);
+ var we = aA(x, S), $e = h0(S), ze = 0, nt = S.text.length, at = !0, Yt = Jo(S, x.doc.direction);
+ if (Yt) {
+ var Vt = (x.options.lineWrapping ? dC : Zy)(x, S, G, we, Yt, j, V);
+ ze = (at = Vt.level != 1) ? Vt.from : Vt.to - 1, nt = at ? Vt.to : Vt.from - 1;
+ }
+ var Nn, Vn, mr = null, si = null, Mi = An(function(Qo) {
+ var $a = Od(x, we, Qo);
+ return $a.top += $e, $a.bottom += $e, !!Dd($a, j, V, !1) && ($a.top <= V && $a.left <= j && (mr = Qo, si = $a), !0);
+ }, ze, nt), _r = !1;
+ if (si) {
+ var ao = j - si.left < si.right - j, ea = ao == at;
+ Mi = mr + (ea ? 0 : 1), Vn = ea ? "after" : "before", Nn = ao ? si.left : si.right;
+ } else {
+ at || Mi != nt && Mi != ze || Mi++, Vn = Mi == 0 ? "after" : Mi == S.text.length ? "before" : Od(x, we, Mi - (at ? 1 : 0)).bottom + $e <= V == at ? "after" : "before";
+ var zi = Wh(x, pr(G, Mi, Vn), "line", S, we);
+ Nn = zi.left, _r = V < zi.top ? -1 : V >= zi.bottom ? 1 : 0;
+ }
+ return M3(G, Mi = Gr(S.text, Mi, 1), Vn, _r, j - Nn);
+ }
+ function Zy(x, S, G, j, V, we, $e) {
+ var ze = An(function(Vt) {
+ var Nn = V[Vt], Vn = Nn.level != 1;
+ return Dd(Wh(x, pr(G, Vn ? Nn.to : Nn.from, Vn ? "before" : "after"), "line", S, j), we, $e, !0);
+ }, 0, V.length - 1), nt = V[ze];
+ if (ze > 0) {
+ var at = nt.level != 1, Yt = Wh(x, pr(G, at ? nt.from : nt.to, at ? "after" : "before"), "line", S, j);
+ Dd(Yt, we, $e, !0) && Yt.top > $e && (nt = V[ze - 1]);
+ }
+ return nt;
+ }
+ function dC(x, S, G, j, V, we, $e) {
+ var ze = Fg(x, S, j, $e), nt = ze.begin, at = ze.end;
+ /\s/.test(S.text.charAt(at - 1)) && at--;
+ for (var Yt = null, Vt = null, Nn = 0; Nn < V.length; Nn++) {
+ var Vn = V[Nn];
+ if (!(Vn.from >= at || Vn.to <= nt)) {
+ var mr = Od(x, j, Vn.level != 1 ? Math.min(at, Vn.to) - 1 : Math.max(nt, Vn.from)).right, si = mr < we ? we - mr + 1e9 : mr - we;
+ (!Yt || Vt > si) && (Yt = Vn, Vt = si);
+ }
+ }
+ return Yt || (Yt = V[V.length - 1]), Yt.from < nt && (Yt = { from: nt, to: Yt.to, level: Yt.level }), Yt.to > at && (Yt = { from: Yt.from, to: at, level: Yt.level }), Yt;
+ }
+ function T2(x) {
+ if (x.cachedTextHeight != null)
+ return x.cachedTextHeight;
+ if (Ks == null) {
+ Ks = Me("pre", null, "CodeMirror-line-like");
+ for (var S = 0; S < 49; ++S)
+ Ks.appendChild(document.createTextNode("x")), Ks.appendChild(Me("br"));
+ Ks.appendChild(document.createTextNode("x"));
+ }
+ te(x.measure, Ks);
+ var G = Ks.offsetHeight / 50;
+ return G > 3 && (x.cachedTextHeight = G), Be(x.measure), G || 1;
+ }
+ function Nd(x) {
+ if (x.cachedCharWidth != null)
+ return x.cachedCharWidth;
+ var S = Me("span", "xxxxxxxxxx"), G = Me("pre", [S], "CodeMirror-line-like");
+ te(x.measure, G);
+ var j = S.getBoundingClientRect(), V = (j.right - j.left) / 10;
+ return V > 2 && (x.cachedCharWidth = V), V || 10;
+ }
+ function Lp(x) {
+ for (var S = x.display, G = {}, j = {}, V = S.gutters.clientLeft, we = S.gutters.firstChild, $e = 0; we; we = we.nextSibling, ++$e) {
+ var ze = x.display.gutterSpecs[$e].className;
+ G[ze] = we.offsetLeft + we.clientLeft + V, j[ze] = we.clientWidth;
+ }
+ return { fixedPos: B2(S), gutterTotalWidth: S.gutters.offsetWidth, gutterLeft: G, gutterWidth: j, wrapperWidth: S.wrapper.clientWidth };
+ }
+ function B2(x) {
+ return x.scroller.getBoundingClientRect().left - x.sizer.getBoundingClientRect().left;
+ }
+ function AC(x) {
+ var S = T2(x.display), G = x.options.lineWrapping, j = G && Math.max(5, x.display.scroller.clientWidth / Nd(x.display) - 3);
+ return function(V) {
+ if (ku(x.doc, V))
+ return 0;
+ var we = 0;
+ if (V.widgets)
+ for (var $e = 0; $e < V.widgets.length; $e++)
+ V.widgets[$e].height && (we += V.widgets[$e].height);
+ return G ? we + (Math.ceil(V.text.length / j) || 1) * S : we + S;
+ };
+ }
+ function Ab(x) {
+ var S = x.doc, G = AC(x);
+ S.iter(function(j) {
+ var V = G(j);
+ V != j.height && sf(j, V);
+ });
+ }
+ function S2(x, S, G, j) {
+ var V = x.display;
+ if (!G && xa(S).getAttribute("cm-not-content") == "true")
+ return null;
+ var we, $e, ze = V.lineSpace.getBoundingClientRect();
+ try {
+ we = S.clientX - ze.left, $e = S.clientY - ze.top;
+ } catch {
+ return null;
+ }
+ var nt, at = SA(x, we, $e);
+ if (j && at.xRel > 0 && (nt = Ki(x.doc, at.line).text).length == at.ch) {
+ var Yt = kt(nt, nt.length, x.options.tabSize) - nt.length;
+ at = pr(at.line, Math.max(0, Math.round((we - Fu(x.display).left) / Nd(x.display)) - Yt));
+ }
+ return at;
+ }
+ function f0(x, S) {
+ if (S >= x.display.viewTo || (S -= x.display.viewFrom) < 0)
+ return null;
+ for (var G = x.display.view, j = 0; j < G.length; j++)
+ if ((S -= G[j].size) < 0)
+ return j;
+ }
+ function pd(x, S, G, j) {
+ S == null && (S = x.doc.first), G == null && (G = x.doc.first + x.doc.size), j || (j = 0);
+ var V = x.display;
+ if (j && G < V.viewTo && (V.updateLineNumbers == null || V.updateLineNumbers > S) && (V.updateLineNumbers = S), x.curOp.viewChanged = !0, S >= V.viewTo)
+ cl && Ca(x.doc, S) < V.viewTo && LA(x);
+ else if (G <= V.viewFrom)
+ cl && vl(x.doc, G + j) > V.viewFrom ? LA(x) : (V.viewFrom += j, V.viewTo += j);
+ else if (S <= V.viewFrom && G >= V.viewTo)
+ LA(x);
+ else if (S <= V.viewFrom) {
+ var we = z0(x, G, G + j, 1);
+ we ? (V.view = V.view.slice(we.index), V.viewFrom = we.lineN, V.viewTo += j) : LA(x);
+ } else if (G >= V.viewTo) {
+ var $e = z0(x, S, S, -1);
+ $e ? (V.view = V.view.slice(0, $e.index), V.viewTo = $e.lineN) : LA(x);
+ } else {
+ var ze = z0(x, S, S, -1), nt = z0(x, G, G + j, 1);
+ ze && nt ? (V.view = V.view.slice(0, ze.index).concat(Sv(x, ze.lineN, nt.lineN)).concat(V.view.slice(nt.index)), V.viewTo += j) : LA(x);
+ }
+ var at = V.externalMeasured;
+ at && (G < at.lineN ? at.lineN += j : S < at.lineN + at.size && (V.externalMeasured = null));
+ }
+ function L2(x, S, G) {
+ x.curOp.viewChanged = !0;
+ var j = x.display, V = x.display.externalMeasured;
+ if (V && S >= V.lineN && S < V.lineN + V.size && (j.externalMeasured = null), !(S < j.viewFrom || S >= j.viewTo)) {
+ var we = j.view[f0(x, S)];
+ if (we.node != null) {
+ var $e = we.changes || (we.changes = []);
+ jt($e, G) == -1 && $e.push(G);
+ }
+ }
+ }
+ function LA(x) {
+ x.display.viewFrom = x.display.viewTo = x.doc.first, x.display.view = [], x.display.viewOffset = 0;
+ }
+ function z0(x, S, G, j) {
+ var V, we = f0(x, S), $e = x.display.view;
+ if (!cl || G == x.doc.first + x.doc.size)
+ return { index: we, lineN: G };
+ for (var ze = x.display.viewFrom, nt = 0; nt < we; nt++)
+ ze += $e[nt].size;
+ if (ze != S) {
+ if (j > 0) {
+ if (we == $e.length - 1)
+ return null;
+ V = ze + $e[we].size - S, we++;
+ } else
+ V = ze - S;
+ S += V, G += V;
+ }
+ for (; Ca(x.doc, G) != G; ) {
+ if (we == (j < 0 ? 0 : $e.length - 1))
+ return null;
+ G += j * $e[we - (j < 0 ? 1 : 0)].size, we += j;
+ }
+ return { index: we, lineN: G };
+ }
+ function F3(x, S, G) {
+ var j = x.display;
+ j.view.length == 0 || S >= j.viewTo || G <= j.viewFrom ? (j.view = Sv(x, S, G), j.viewFrom = S) : (j.viewFrom > S ? j.view = Sv(x, S, j.viewFrom).concat(j.view) : j.viewFrom < S && (j.view = j.view.slice(f0(x, S))), j.viewFrom = S, j.viewTo < G ? j.view = j.view.concat(Sv(x, j.viewTo, G)) : j.viewTo > G && (j.view = j.view.slice(0, f0(x, G)))), j.viewTo = G;
+ }
+ function Dk(x) {
+ for (var S = x.display.view, G = 0, j = 0; j < S.length; j++) {
+ var V = S[j];
+ V.hidden || V.node && !V.changes || ++G;
+ }
+ return G;
+ }
+ function I2(x) {
+ x.display.input.showSelection(x.display.input.prepareSelection());
+ }
+ function O3(x, S) {
+ S === void 0 && (S = !0);
+ for (var G = x.doc, j = {}, V = j.cursors = document.createDocumentFragment(), we = j.selection = document.createDocumentFragment(), $e = 0; $e < G.sel.ranges.length; $e++)
+ if (S || $e != G.sel.primIndex) {
+ var ze = G.sel.ranges[$e];
+ if (!(ze.from().line >= x.display.viewTo || ze.to().line < x.display.viewFrom)) {
+ var nt = ze.empty();
+ (nt || x.options.showCursorWhenSelecting) && C5(x, ze.head, V), nt || Fv(x, ze, we);
+ }
+ }
+ return j;
+ }
+ function C5(x, S, G) {
+ var j = Wh(x, S, "div", null, null, !x.options.singleCursorHeightPerLine), V = G.appendChild(Me("div", " ", "CodeMirror-cursor"));
+ if (V.style.left = j.left + "px", V.style.top = j.top + "px", V.style.height = Math.max(0, j.bottom - j.top) * x.options.cursorHeight + "px", j.other) {
+ var we = G.appendChild(Me("div", " ", "CodeMirror-cursor CodeMirror-secondarycursor"));
+ we.style.display = "", we.style.left = j.other.left + "px", we.style.top = j.other.top + "px", we.style.height = 0.85 * (j.other.bottom - j.other.top) + "px";
+ }
+ }
+ function gm(x, S) {
+ return x.top - S.top || x.left - S.left;
+ }
+ function Fv(x, S, G) {
+ var j = x.display, V = x.doc, we = document.createDocumentFragment(), $e = Fu(x.display), ze = $e.left, nt = Math.max(j.sizerWidth, _2(x) - j.sizer.offsetLeft) - $e.right, at = V.direction == "ltr";
+ function Yt(ea, zi, Qo, $a) {
+ zi < 0 && (zi = 0), zi = Math.round(zi), $a = Math.round($a), we.appendChild(Me("div", null, "CodeMirror-selected", "position: absolute; left: " + ea + `px;
+ top: ` + zi + "px; width: " + (Qo ?? nt - ea) + `px;
+ height: ` + ($a - zi) + "px"));
+ }
+ function Vt(ea, zi, Qo) {
+ var $a, Ll, hu = Ki(V, ea), I1 = hu.text.length;
+ function ac(qh, Rd) {
+ return I3(x, pr(ea, qh), "div", hu, Rd);
+ }
+ function _f(qh, Rd, oA) {
+ var Wu = Am(x, hu, null, qh), Yh = Rd == "ltr" == (oA == "after") ? "left" : "right";
+ return ac(oA == "after" ? Wu.begin : Wu.end - (/\s/.test(hu.text.charAt(Wu.end - 1)) ? 2 : 1), Yh)[Yh];
+ }
+ var J1 = Jo(hu, V.direction);
+ return _i(J1, zi || 0, Qo ?? I1, function(qh, Rd, oA, Wu) {
+ var Yh = oA == "ltr", t1 = ac(qh, Yh ? "left" : "right"), sA = ac(Rd - 1, Yh ? "right" : "left"), Pp = zi == null && qh == 0, g0 = Qo == null && Rd == I1, Uo = Wu == 0, n1 = !J1 || Wu == J1.length - 1;
+ if (sA.top - t1.top <= 3) {
+ var V2 = (at ? g0 : Pp) && n1, p0 = (at ? Pp : g0) && Uo ? ze : (Yh ? t1 : sA).left, Rp = V2 ? nt : (Yh ? sA : t1).right;
+ Yt(p0, t1.top, Rp - p0, t1.bottom);
+ } else {
+ var jg, Dh, Lb, Kg;
+ Yh ? (jg = at && Pp && Uo ? ze : t1.left, Dh = at ? nt : _f(qh, oA, "before"), Lb = at ? ze : _f(Rd, oA, "after"), Kg = at && g0 && n1 ? nt : sA.right) : (jg = at ? _f(qh, oA, "before") : ze, Dh = !at && Pp && Uo ? nt : t1.right, Lb = !at && g0 && n1 ? ze : sA.left, Kg = at ? _f(Rd, oA, "after") : nt), Yt(jg, t1.top, Dh - jg, t1.bottom), t1.bottom < sA.top && Yt(ze, t1.bottom, null, sA.top), Yt(Lb, sA.top, Kg - Lb, sA.bottom);
+ }
+ (!$a || gm(t1, $a) < 0) && ($a = t1), gm(sA, $a) < 0 && ($a = sA), (!Ll || gm(t1, Ll) < 0) && (Ll = t1), gm(sA, Ll) < 0 && (Ll = sA);
+ }), { start: $a, end: Ll };
+ }
+ var Nn = S.from(), Vn = S.to();
+ if (Nn.line == Vn.line)
+ Vt(Nn.line, Nn.ch, Vn.ch);
+ else {
+ var mr = Ki(V, Nn.line), si = Ki(V, Vn.line), Mi = iA(mr) == iA(si), _r = Vt(Nn.line, Nn.ch, Mi ? mr.text.length + 1 : null).end, ao = Vt(Vn.line, Mi ? 0 : null, Vn.ch).start;
+ Mi && (_r.top < ao.top - 2 ? (Yt(_r.right, _r.top, null, _r.bottom), Yt(ze, ao.top, ao.left, ao.bottom)) : Yt(_r.right, _r.top, ao.left - _r.right, _r.bottom)), _r.bottom < ao.top && Yt(ze, _r.bottom, null, ao.top);
+ }
+ G.appendChild(we);
+ }
+ function gb(x) {
+ if (x.state.focused) {
+ var S = x.display;
+ clearInterval(S.blinker);
+ var G = !0;
+ S.cursorDiv.style.visibility = "", x.options.cursorBlinkRate > 0 ? S.blinker = setInterval(function() {
+ x.hasFocus() || pm(x), S.cursorDiv.style.visibility = (G = !G) ? "" : "hidden";
+ }, x.options.cursorBlinkRate) : x.options.cursorBlinkRate < 0 && (S.cursorDiv.style.visibility = "hidden");
+ }
+ }
+ function pb(x) {
+ x.state.focused || (x.display.input.focus(), ew(x));
+ }
+ function Nk(x) {
+ x.state.delayingBlurEvent = !0, setTimeout(function() {
+ x.state.delayingBlurEvent && (x.state.delayingBlurEvent = !1, pm(x));
+ }, 100);
+ }
+ function ew(x, S) {
+ x.state.delayingBlurEvent && (x.state.delayingBlurEvent = !1), x.options.readOnly != "nocursor" && (x.state.focused || (Yr(x, "focus", x, S), x.state.focused = !0, ot(x.display.wrapper, "CodeMirror-focused"), x.curOp || x.display.selForContextMenu == x.doc.sel || (x.display.input.reset(), _ && setTimeout(function() {
+ return x.display.input.reset(!0);
+ }, 20)), x.display.input.receivedFocus()), gb(x));
+ }
+ function pm(x, S) {
+ x.state.delayingBlurEvent || (x.state.focused && (Yr(x, "blur", x, S), x.state.focused = !1, ie(x.display.wrapper, "CodeMirror-focused")), clearInterval(x.display.blinker), setTimeout(function() {
+ x.state.focused || (x.display.shift = !1);
+ }, 150));
+ }
+ function M2(x) {
+ for (var S = x.display, G = S.lineDiv.offsetTop, j = 0; j < S.view.length; j++) {
+ var V = S.view[j], we = x.options.lineWrapping, $e = void 0, ze = 0;
+ if (!V.hidden) {
+ if (v && k < 8) {
+ var nt = V.node.offsetTop + V.node.offsetHeight;
+ $e = nt - G, G = nt;
+ } else {
+ var at = V.node.getBoundingClientRect();
+ $e = at.bottom - at.top, !we && V.text.firstChild && (ze = V.text.firstChild.getBoundingClientRect().right - at.left - 1);
+ }
+ var Yt = V.line.height - $e;
+ if ((Yt > 5e-3 || Yt < -5e-3) && (sf(V.line, $e), tw(V.line), V.rest))
+ for (var Vt = 0; Vt < V.rest.length; Vt++)
+ tw(V.rest[Vt]);
+ if (ze > x.display.sizerWidth) {
+ var Nn = Math.ceil(ze / Nd(x.display));
+ Nn > x.display.maxLineLength && (x.display.maxLineLength = Nn, x.display.maxLine = V.line, x.display.maxLineChanged = !0);
+ }
+ }
+ }
+ }
+ function tw(x) {
+ if (x.widgets)
+ for (var S = 0; S < x.widgets.length; ++S) {
+ var G = x.widgets[S], j = G.node.parentNode;
+ j && (G.height = j.offsetHeight);
+ }
+ }
+ function nw(x, S, G) {
+ var j = G && G.top != null ? Math.max(0, G.top) : x.scroller.scrollTop;
+ j = Math.floor(j - Nf(x));
+ var V = G && G.bottom != null ? G.bottom : j + x.wrapper.clientHeight, we = wh(S, j), $e = wh(S, V);
+ if (G && G.ensure) {
+ var ze = G.ensure.from.line, nt = G.ensure.to.line;
+ ze < we ? (we = ze, $e = wh(S, uf(Ki(S, ze)) + x.wrapper.clientHeight)) : Math.min(nt, S.lastLine()) >= $e && (we = wh(S, uf(Ki(S, nt)) - x.wrapper.clientHeight), $e = nt);
+ }
+ return { from: we, to: Math.max($e, we + 1) };
+ }
+ function F2(x, S) {
+ if (!ni(x, "scrollCursorIntoView")) {
+ var G = x.display, j = G.sizer.getBoundingClientRect(), V = null;
+ if (S.top + j.top < 0 ? V = !0 : S.bottom + j.top > (window.innerHeight || document.documentElement.clientHeight) && (V = !1), V != null && !Z) {
+ var we = Me("div", "", null, `position: absolute;
+ top: ` + (S.top - G.viewOffset - Nf(x.display)) + `px;
+ height: ` + (S.bottom - S.top + Sp(x) + G.barHeight) + `px;
+ left: ` + S.left + "px; width: " + Math.max(2, S.right - S.left) + "px;");
+ x.display.lineSpace.appendChild(we), we.scrollIntoView(V), x.display.lineSpace.removeChild(we);
+ }
+ }
+ }
+ function _5(x, S, G, j) {
+ var V;
+ j == null && (j = 0), x.options.lineWrapping || S != G || (G = (S = S.ch ? pr(S.line, S.sticky == "before" ? S.ch - 1 : S.ch, "after") : S).sticky == "before" ? pr(S.line, S.ch + 1, "before") : S);
+ for (var we = 0; we < 5; we++) {
+ var $e = !1, ze = Wh(x, S), nt = G && G != S ? Wh(x, G) : ze, at = Ov(x, V = { left: Math.min(ze.left, nt.left), top: Math.min(ze.top, nt.top) - j, right: Math.max(ze.left, nt.left), bottom: Math.max(ze.bottom, nt.bottom) + j }), Yt = x.doc.scrollTop, Vt = x.doc.scrollLeft;
+ if (at.scrollTop != null && (Dv(x, at.scrollTop), Math.abs(x.doc.scrollTop - Yt) > 1 && ($e = !0)), at.scrollLeft != null && (Nv(x, at.scrollLeft), Math.abs(x.doc.scrollLeft - Vt) > 1 && ($e = !0)), !$e)
+ break;
+ }
+ return V;
+ }
+ function gC(x, S) {
+ var G = Ov(x, S);
+ G.scrollTop != null && Dv(x, G.scrollTop), G.scrollLeft != null && Nv(x, G.scrollLeft);
+ }
+ function Ov(x, S) {
+ var G = x.display, j = T2(x.display);
+ S.top < 0 && (S.top = 0);
+ var V = x.curOp && x.curOp.scrollTop != null ? x.curOp.scrollTop : G.scroller.scrollTop, we = S3(x), $e = {};
+ S.bottom - S.top > we && (S.bottom = S.top + we);
+ var ze = x.doc.height + Lv(G), nt = S.top < j, at = S.bottom > ze - j;
+ if (S.top < V)
+ $e.scrollTop = nt ? 0 : S.top;
+ else if (S.bottom > V + we) {
+ var Yt = Math.min(S.top, (at ? ze : S.bottom) - we);
+ Yt != V && ($e.scrollTop = Yt);
+ }
+ var Vt = x.options.fixedGutter ? 0 : G.gutters.offsetWidth, Nn = x.curOp && x.curOp.scrollLeft != null ? x.curOp.scrollLeft : G.scroller.scrollLeft - Vt, Vn = _2(x) - G.gutters.offsetWidth, mr = S.right - S.left > Vn;
+ return mr && (S.right = S.left + Vn), S.left < 10 ? $e.scrollLeft = 0 : S.left < Nn ? $e.scrollLeft = Math.max(0, S.left + Vt - (mr ? 0 : 10)) : S.right > Vn + Nn - 3 && ($e.scrollLeft = S.right + (mr ? 0 : 10) - Vn), $e;
+ }
+ function E5(x, S) {
+ S != null && (O2(x), x.curOp.scrollTop = (x.curOp.scrollTop == null ? x.doc.scrollTop : x.curOp.scrollTop) + S);
+ }
+ function rw(x) {
+ O2(x);
+ var S = x.getCursor();
+ x.curOp.scrollToPos = { from: S, to: S, margin: x.options.cursorScrollMargin };
+ }
+ function D3(x, S, G) {
+ S == null && G == null || O2(x), S != null && (x.curOp.scrollLeft = S), G != null && (x.curOp.scrollTop = G);
+ }
+ function pC(x, S) {
+ O2(x), x.curOp.scrollToPos = S;
+ }
+ function O2(x) {
+ var S = x.curOp.scrollToPos;
+ S && (x.curOp.scrollToPos = null, Pk(x, Mg(x, S.from), Mg(x, S.to), S.margin));
+ }
+ function Pk(x, S, G, j) {
+ var V = Ov(x, { left: Math.min(S.left, G.left), top: Math.min(S.top, G.top) - j, right: Math.max(S.right, G.right), bottom: Math.max(S.bottom, G.bottom) + j });
+ D3(x, V.scrollLeft, V.scrollTop);
+ }
+ function Dv(x, S) {
+ Math.abs(x.doc.scrollTop - S) < 2 || (f || aw(x, { top: S }), mC(x, S, !0), f && aw(x), Ip(x, 100));
+ }
+ function mC(x, S, G) {
+ S = Math.max(0, Math.min(x.display.scroller.scrollHeight - x.display.scroller.clientHeight, S)), (x.display.scroller.scrollTop != S || G) && (x.doc.scrollTop = S, x.display.scrollbars.setScrollTop(S), x.display.scroller.scrollTop != S && (x.display.scroller.scrollTop = S));
+ }
+ function Nv(x, S, G, j) {
+ S = Math.max(0, Math.min(S, x.display.scroller.scrollWidth - x.display.scroller.clientWidth)), (G ? S == x.doc.scrollLeft : Math.abs(x.doc.scrollLeft - S) < 2) && !j || (x.doc.scrollLeft = S, $3(x), x.display.scroller.scrollLeft != S && (x.display.scroller.scrollLeft = S), x.display.scrollbars.setScrollLeft(S));
+ }
+ function N3(x) {
+ var S = x.display, G = S.gutters.offsetWidth, j = Math.round(x.doc.height + Lv(x.display));
+ return { clientHeight: S.scroller.clientHeight, viewHeight: S.wrapper.clientHeight, scrollWidth: S.scroller.scrollWidth, clientWidth: S.scroller.clientWidth, viewWidth: S.wrapper.clientWidth, barLeft: x.options.fixedGutter ? G : 0, docHeight: j, scrollHeight: j + Sp(x) + S.barHeight, nativeBarWidth: S.nativeBarWidth, gutterWidth: G };
+ }
+ var d0 = function(x, S, G) {
+ this.cm = G;
+ var j = this.vert = Me("div", [Me("div", null, null, "min-width: 1px")], "CodeMirror-vscrollbar"), V = this.horiz = Me("div", [Me("div", null, null, "height: 100%; min-height: 1px")], "CodeMirror-hscrollbar");
+ j.tabIndex = V.tabIndex = -1, x(j), x(V), ji(j, "scroll", function() {
+ j.clientHeight && S(j.scrollTop, "vertical");
+ }), ji(V, "scroll", function() {
+ V.clientWidth && S(V.scrollLeft, "horizontal");
+ }), this.checkedZeroWidth = !1, v && k < 8 && (this.horiz.style.minHeight = this.vert.style.minWidth = "18px");
+ };
+ d0.prototype.update = function(x) {
+ var S = x.scrollWidth > x.clientWidth + 1, G = x.scrollHeight > x.clientHeight + 1, j = x.nativeBarWidth;
+ if (G) {
+ this.vert.style.display = "block", this.vert.style.bottom = S ? j + "px" : "0";
+ var V = x.viewHeight - (S ? j : 0);
+ this.vert.firstChild.style.height = Math.max(0, x.scrollHeight - x.clientHeight + V) + "px";
+ } else
+ this.vert.style.display = "", this.vert.firstChild.style.height = "0";
+ if (S) {
+ this.horiz.style.display = "block", this.horiz.style.right = G ? j + "px" : "0", this.horiz.style.left = x.barLeft + "px";
+ var we = x.viewWidth - x.barLeft - (G ? j : 0);
+ this.horiz.firstChild.style.width = Math.max(0, x.scrollWidth - x.clientWidth + we) + "px";
+ } else
+ this.horiz.style.display = "", this.horiz.firstChild.style.width = "0";
+ return !this.checkedZeroWidth && x.clientHeight > 0 && (j == 0 && this.zeroWidthHack(), this.checkedZeroWidth = !0), { right: G ? j : 0, bottom: S ? j : 0 };
+ }, d0.prototype.setScrollLeft = function(x) {
+ this.horiz.scrollLeft != x && (this.horiz.scrollLeft = x), this.disableHoriz && this.enableZeroWidthBar(this.horiz, this.disableHoriz, "horiz");
+ }, d0.prototype.setScrollTop = function(x) {
+ this.vert.scrollTop != x && (this.vert.scrollTop = x), this.disableVert && this.enableZeroWidthBar(this.vert, this.disableVert, "vert");
+ }, d0.prototype.zeroWidthHack = function() {
+ var x = Y && !q ? "12px" : "18px";
+ this.horiz.style.height = this.vert.style.width = x, this.horiz.style.pointerEvents = this.vert.style.pointerEvents = "none", this.disableHoriz = new Wt(), this.disableVert = new Wt();
+ }, d0.prototype.enableZeroWidthBar = function(x, S, G) {
+ function j() {
+ var V = x.getBoundingClientRect();
+ (G == "vert" ? document.elementFromPoint(V.right - 1, (V.top + V.bottom) / 2) : document.elementFromPoint((V.right + V.left) / 2, V.bottom - 1)) != x ? x.style.pointerEvents = "none" : S.set(1e3, j);
+ }
+ x.style.pointerEvents = "auto", S.set(1e3, j);
+ }, d0.prototype.clear = function() {
+ var x = this.horiz.parentNode;
+ x.removeChild(this.horiz), x.removeChild(this.vert);
+ };
+ var Pv = function() {
+ };
+ function mm(x, S) {
+ S || (S = N3(x));
+ var G = x.display.barWidth, j = x.display.barHeight;
+ bC(x, S);
+ for (var V = 0; V < 4 && G != x.display.barWidth || j != x.display.barHeight; V++)
+ G != x.display.barWidth && x.options.lineWrapping && M2(x), bC(x, N3(x)), G = x.display.barWidth, j = x.display.barHeight;
+ }
+ function bC(x, S) {
+ var G = x.display, j = G.scrollbars.update(S);
+ G.sizer.style.paddingRight = (G.barWidth = j.right) + "px", G.sizer.style.paddingBottom = (G.barHeight = j.bottom) + "px", G.heightForcer.style.borderBottom = j.bottom + "px solid transparent", j.right && j.bottom ? (G.scrollbarFiller.style.display = "block", G.scrollbarFiller.style.height = j.bottom + "px", G.scrollbarFiller.style.width = j.right + "px") : G.scrollbarFiller.style.display = "", j.bottom && x.options.coverGutterNextToScrollbar && x.options.fixedGutter ? (G.gutterFiller.style.display = "block", G.gutterFiller.style.height = j.bottom + "px", G.gutterFiller.style.width = S.gutterWidth + "px") : G.gutterFiller.style.display = "";
+ }
+ Pv.prototype.update = function() {
+ return { bottom: 0, right: 0 };
+ }, Pv.prototype.setScrollLeft = function() {
+ }, Pv.prototype.setScrollTop = function() {
+ }, Pv.prototype.clear = function() {
+ };
+ var bm = { native: d0, null: Pv };
+ function D2(x) {
+ x.display.scrollbars && (x.display.scrollbars.clear(), x.display.scrollbars.addClass && ie(x.display.wrapper, x.display.scrollbars.addClass)), x.display.scrollbars = new bm[x.options.scrollbarStyle](function(S) {
+ x.display.wrapper.insertBefore(S, x.display.scrollbarFiller), ji(S, "mousedown", function() {
+ x.state.focused && setTimeout(function() {
+ return x.display.input.focus();
+ }, 0);
+ }), S.setAttribute("cm-not-content", "true");
+ }, function(S, G) {
+ G == "horizontal" ? Nv(x, S) : Dv(x, S);
+ }, x), x.display.scrollbars.addClass && ot(x.display.wrapper, x.display.scrollbars.addClass);
+ }
+ var e_ = 0;
+ function mb(x) {
+ x.curOp = { cm: x, viewChanged: !1, startHeight: x.doc.height, forceUpdate: !1, updateInput: 0, typing: !1, changeObjs: null, cursorActivityHandlers: null, cursorActivityCalled: 0, selectionChanged: !1, updateMaxLine: !1, scrollLeft: null, scrollTop: null, scrollToPos: null, focus: !1, id: ++e_ }, Xy(x.curOp);
+ }
+ function bb(x) {
+ var S = x.curOp;
+ S && j0(S, function(G) {
+ for (var j = 0; j < G.ops.length; j++)
+ G.ops[j].cm.curOp = null;
+ vC(G);
+ });
+ }
+ function vC(x) {
+ for (var S = x.ops, G = 0; G < S.length; G++)
+ yC(S[G]);
+ for (var j = 0; j < S.length; j++)
+ P3(S[j]);
+ for (var V = 0; V < S.length; V++)
+ R3(S[V]);
+ for (var we = 0; we < S.length; we++)
+ iw(S[we]);
+ for (var $e = 0; $e < S.length; $e++)
+ T5(S[$e]);
+ }
+ function yC(x) {
+ var S = x.cm, G = S.display;
+ B5(S), x.updateMaxLine && s0(S), x.mustUpdate = x.viewChanged || x.forceUpdate || x.scrollTop != null || x.scrollToPos && (x.scrollToPos.from.line < G.viewFrom || x.scrollToPos.to.line >= G.viewTo) || G.maxLineChanged && S.options.lineWrapping, x.update = x.mustUpdate && new N2(S, x.mustUpdate && { top: x.scrollTop, ensure: x.scrollToPos }, x.forceUpdate);
+ }
+ function P3(x) {
+ x.updatedDisplay = x.mustUpdate && Q3(x.cm, x.update);
+ }
+ function R3(x) {
+ var S = x.cm, G = S.display;
+ x.updatedDisplay && M2(S), x.barMeasure = N3(S), G.maxLineChanged && !S.options.lineWrapping && (x.adjustWidthTo = Wy(S, G.maxLine, G.maxLine.text.length).left + 3, S.display.sizerWidth = x.adjustWidthTo, x.barMeasure.scrollWidth = Math.max(G.scroller.clientWidth, G.sizer.offsetLeft + x.adjustWidthTo + Sp(S) + S.display.barWidth), x.maxScrollLeft = Math.max(0, G.sizer.offsetLeft + x.adjustWidthTo - _2(S))), (x.updatedDisplay || x.selectionChanged) && (x.preparedSelection = G.input.prepareSelection());
+ }
+ function iw(x) {
+ var S = x.cm;
+ x.adjustWidthTo != null && (S.display.sizer.style.minWidth = x.adjustWidthTo + "px", x.maxScrollLeft < S.doc.scrollLeft && Nv(S, Math.min(S.display.scroller.scrollLeft, x.maxScrollLeft), !0), S.display.maxLineChanged = !1);
+ var G = x.focus && x.focus == Je();
+ x.preparedSelection && S.display.input.showSelection(x.preparedSelection, G), (x.updatedDisplay || x.startHeight != S.doc.height) && mm(S, x.barMeasure), x.updatedDisplay && P2(S, x.barMeasure), x.selectionChanged && gb(S), S.state.focused && x.updateInput && S.display.input.reset(x.typing), G && pb(x.cm);
+ }
+ function T5(x) {
+ var S = x.cm, G = S.display, j = S.doc;
+ x.updatedDisplay && Qk(S, x.update), G.wheelStartX == null || x.scrollTop == null && x.scrollLeft == null && !x.scrollToPos || (G.wheelStartX = G.wheelStartY = null), x.scrollTop != null && mC(S, x.scrollTop, x.forceScroll), x.scrollLeft != null && Nv(S, x.scrollLeft, !0, !0), x.scrollToPos && F2(S, _5(S, Ro(j, x.scrollToPos.from), Ro(j, x.scrollToPos.to), x.scrollToPos.margin));
+ var V = x.maybeHiddenMarkers, we = x.maybeUnhiddenMarkers;
+ if (V)
+ for (var $e = 0; $e < V.length; ++$e)
+ V[$e].lines.length || Yr(V[$e], "hide");
+ if (we)
+ for (var ze = 0; ze < we.length; ++ze)
+ we[ze].lines.length && Yr(we[ze], "unhide");
+ G.wrapper.offsetHeight && (j.scrollTop = S.display.scroller.scrollTop), x.changeObjs && Yr(S, "changes", S, x.changeObjs), x.update && x.update.finish();
+ }
+ function IA(x, S) {
+ if (x.curOp)
+ return S();
+ mb(x);
+ try {
+ return S();
+ } finally {
+ bb(x);
+ }
+ }
+ function q1(x, S) {
+ return function() {
+ if (x.curOp)
+ return S.apply(x, arguments);
+ mb(x);
+ try {
+ return S.apply(x, arguments);
+ } finally {
+ bb(x);
+ }
+ };
+ }
+ function Pd(x) {
+ return function() {
+ if (this.curOp)
+ return x.apply(this, arguments);
+ mb(this);
+ try {
+ return x.apply(this, arguments);
+ } finally {
+ bb(this);
+ }
+ };
+ }
+ function e1(x) {
+ return function() {
+ var S = this.cm;
+ if (!S || S.curOp)
+ return x.apply(this, arguments);
+ mb(S);
+ try {
+ return x.apply(this, arguments);
+ } finally {
+ bb(S);
+ }
+ };
+ }
+ function Ip(x, S) {
+ x.doc.highlightFrontier < x.display.viewTo && x.state.highlight.set(S, je(wC, x));
+ }
+ function wC(x) {
+ var S = x.doc;
+ if (!(S.highlightFrontier >= x.display.viewTo)) {
+ var G = +/* @__PURE__ */ new Date() + x.options.workTime, j = ya(x, S.highlightFrontier), V = [];
+ S.iter(j.line, Math.min(S.first + S.size, x.display.viewTo + 500), function(we) {
+ if (j.line >= x.display.viewFrom) {
+ var $e = we.styles, ze = we.text.length > x.options.maxHighlightLength ? js(S.mode, j.state) : null, nt = ri(x, we, j, !0);
+ ze && (j.state = ze), we.styles = nt.styles;
+ var at = we.styleClasses, Yt = nt.classes;
+ Yt ? we.styleClasses = Yt : at && (we.styleClasses = null);
+ for (var Vt = !$e || $e.length != we.styles.length || at != Yt && (!at || !Yt || at.bgClass != Yt.bgClass || at.textClass != Yt.textClass), Nn = 0; !Vt && Nn < $e.length; ++Nn)
+ Vt = $e[Nn] != we.styles[Nn];
+ Vt && V.push(j.line), we.stateAfter = j.save(), j.nextLine();
+ } else
+ we.text.length <= x.options.maxHighlightLength && fo(x, we.text, j), we.stateAfter = j.line % 5 == 0 ? j.save() : null, j.nextLine();
+ if (+/* @__PURE__ */ new Date() > G)
+ return Ip(x, x.options.workDelay), !0;
+ }), S.highlightFrontier = j.line, S.modeFrontier = Math.max(S.modeFrontier, j.line), V.length && IA(x, function() {
+ for (var we = 0; we < V.length; we++)
+ L2(x, V[we], "text");
+ });
+ }
+ }
+ var N2 = function(x, S, G) {
+ var j = x.display;
+ this.viewport = S, this.visible = nw(j, x.doc, S), this.editorIsHidden = !j.wrapper.offsetWidth, this.wrapperHeight = j.wrapper.clientHeight, this.wrapperWidth = j.wrapper.clientWidth, this.oldDisplayWidth = _2(x), this.force = G, this.dims = Lp(x), this.events = [];
+ };
+ function B5(x) {
+ var S = x.display;
+ !S.scrollbarsClipped && S.scroller.offsetWidth && (S.nativeBarWidth = S.scroller.offsetWidth - S.scroller.clientWidth, S.heightForcer.style.height = Sp(x) + "px", S.sizer.style.marginBottom = -S.nativeBarWidth + "px", S.sizer.style.borderRightWidth = Sp(x) + "px", S.scrollbarsClipped = !0);
+ }
+ function Rk(x) {
+ if (x.hasFocus())
+ return null;
+ var S = Je();
+ if (!S || !ge(x.display.lineDiv, S))
+ return null;
+ var G = { activeElt: S };
+ if (window.getSelection) {
+ var j = window.getSelection();
+ j.anchorNode && j.extend && ge(x.display.lineDiv, j.anchorNode) && (G.anchorNode = j.anchorNode, G.anchorOffset = j.anchorOffset, G.focusNode = j.focusNode, G.focusOffset = j.focusOffset);
+ }
+ return G;
+ }
+ function Og(x) {
+ if (x && x.activeElt && x.activeElt != Je() && (x.activeElt.focus(), !/^(INPUT|TEXTAREA)$/.test(x.activeElt.nodeName) && x.anchorNode && ge(document.body, x.anchorNode) && ge(document.body, x.focusNode))) {
+ var S = window.getSelection(), G = document.createRange();
+ G.setEnd(x.anchorNode, x.anchorOffset), G.collapse(!1), S.removeAllRanges(), S.addRange(G), S.extend(x.focusNode, x.focusOffset);
+ }
+ }
+ function Q3(x, S) {
+ var G = x.display, j = x.doc;
+ if (S.editorIsHidden)
+ return LA(x), !1;
+ if (!S.force && S.visible.from >= G.viewFrom && S.visible.to <= G.viewTo && (G.updateLineNumbers == null || G.updateLineNumbers >= G.viewTo) && G.renderedView == G.view && Dk(x) == 0)
+ return !1;
+ Dg(x) && (LA(x), S.dims = Lp(x));
+ var V = j.first + j.size, we = Math.max(S.visible.from - x.options.viewportMargin, j.first), $e = Math.min(V, S.visible.to + x.options.viewportMargin);
+ G.viewFrom < we && we - G.viewFrom < 20 && (we = Math.max(j.first, G.viewFrom)), G.viewTo > $e && G.viewTo - $e < 20 && ($e = Math.min(V, G.viewTo)), cl && (we = Ca(x.doc, we), $e = vl(x.doc, $e));
+ var ze = we != G.viewFrom || $e != G.viewTo || G.lastWrapHeight != S.wrapperHeight || G.lastWrapWidth != S.wrapperWidth;
+ F3(x, we, $e), G.viewOffset = uf(Ki(x.doc, G.viewFrom)), x.display.mover.style.top = G.viewOffset + "px";
+ var nt = Dk(x);
+ if (!ze && nt == 0 && !S.force && G.renderedView == G.view && (G.updateLineNumbers == null || G.updateLineNumbers >= G.viewTo))
+ return !1;
+ var at = Rk(x);
+ return nt > 4 && (G.lineDiv.style.display = "none"), $k(x, G.updateLineNumbers, S.dims), nt > 4 && (G.lineDiv.style.display = ""), G.renderedView = G.view, Og(at), Be(G.cursorDiv), Be(G.selectionDiv), G.gutters.style.height = G.sizer.style.minHeight = 0, ze && (G.lastWrapHeight = S.wrapperHeight, G.lastWrapWidth = S.wrapperWidth, Ip(x, 400)), G.updateLineNumbers = null, !0;
+ }
+ function Qk(x, S) {
+ for (var G = S.viewport, j = !0; ; j = !1) {
+ if (j && x.options.lineWrapping && S.oldDisplayWidth != _2(x))
+ j && (S.visible = nw(x.display, x.doc, G));
+ else if (G && G.top != null && (G = { top: Math.min(x.doc.height + Lv(x.display) - S3(x), G.top) }), S.visible = nw(x.display, x.doc, G), S.visible.from >= x.display.viewFrom && S.visible.to <= x.display.viewTo)
+ break;
+ if (!Q3(x, S))
+ break;
+ M2(x);
+ var V = N3(x);
+ I2(x), mm(x, V), P2(x, V), S.force = !1;
+ }
+ S.signal(x, "update", x), x.display.viewFrom == x.display.reportedViewFrom && x.display.viewTo == x.display.reportedViewTo || (S.signal(x, "viewportChange", x, x.display.viewFrom, x.display.viewTo), x.display.reportedViewFrom = x.display.viewFrom, x.display.reportedViewTo = x.display.viewTo);
+ }
+ function aw(x, S) {
+ var G = new N2(x, S);
+ if (Q3(x, G)) {
+ M2(x), Qk(x, G);
+ var j = N3(x);
+ I2(x), mm(x, j), P2(x, j), G.finish();
+ }
+ }
+ function $k(x, S, G) {
+ var j = x.display, V = x.options.lineNumbers, we = j.lineDiv, $e = we.firstChild;
+ function ze(mr) {
+ var si = mr.nextSibling;
+ return _ && Y && x.display.currentWheelTarget == mr ? mr.style.display = "none" : mr.parentNode.removeChild(mr), si;
+ }
+ for (var nt = j.view, at = j.viewFrom, Yt = 0; Yt < nt.length; Yt++) {
+ var Vt = nt[Yt];
+ if (!Vt.hidden)
+ if (Vt.node && Vt.node.parentNode == we) {
+ for (; $e != Vt.node; )
+ $e = ze($e);
+ var Nn = V && S != null && S <= at && Vt.lineNumber;
+ Vt.changes && (jt(Vt.changes, "gutter") > -1 && (Nn = !1), x2(x, Vt, at, G)), Nn && (Be(Vt.lineNumber), Vt.lineNumber.appendChild(document.createTextNode(Ls(x.options, at)))), $e = Vt.node.nextSibling;
+ } else {
+ var Vn = Mk(x, Vt, at, G);
+ we.insertBefore(Vn, $e);
+ }
+ at += Vt.size;
+ }
+ for (; $e; )
+ $e = ze($e);
+ }
+ function Uk(x) {
+ var S = x.gutters.offsetWidth;
+ x.sizer.style.marginLeft = S + "px";
+ }
+ function P2(x, S) {
+ x.display.sizer.style.minHeight = S.docHeight + "px", x.display.heightForcer.style.top = S.docHeight + "px", x.display.gutters.style.height = S.docHeight + x.display.barHeight + Sp(x) + "px";
+ }
+ function $3(x) {
+ var S = x.display, G = S.view;
+ if (S.alignWidgets || S.gutters.firstChild && x.options.fixedGutter) {
+ for (var j = B2(S) - S.scroller.scrollLeft + x.doc.scrollLeft, V = S.gutters.offsetWidth, we = j + "px", $e = 0; $e < G.length; $e++)
+ if (!G[$e].hidden) {
+ x.options.fixedGutter && (G[$e].gutter && (G[$e].gutter.style.left = we), G[$e].gutterBackground && (G[$e].gutterBackground.style.left = we));
+ var ze = G[$e].alignable;
+ if (ze)
+ for (var nt = 0; nt < ze.length; nt++)
+ ze[nt].style.left = we;
+ }
+ x.options.fixedGutter && (S.gutters.style.left = j + V + "px");
+ }
+ }
+ function Dg(x) {
+ if (!x.options.lineNumbers)
+ return !1;
+ var S = x.doc, G = Ls(x.options, S.first + S.size - 1), j = x.display;
+ if (G.length != j.lineNumChars) {
+ var V = j.measure.appendChild(Me("div", [Me("div", G)], "CodeMirror-linenumber CodeMirror-gutter-elt")), we = V.firstChild.offsetWidth, $e = V.offsetWidth - we;
+ return j.lineGutter.style.width = "", j.lineNumInnerWidth = Math.max(we, j.lineGutter.offsetWidth - $e) + 1, j.lineNumWidth = j.lineNumInnerWidth + $e, j.lineNumChars = j.lineNumInnerWidth ? G.length : -1, j.lineGutter.style.width = j.lineNumWidth + "px", Uk(x.display), !0;
+ }
+ return !1;
+ }
+ function S5(x, S) {
+ for (var G = [], j = !1, V = 0; V < x.length; V++) {
+ var we = x[V], $e = null;
+ if (typeof we != "string" && ($e = we.style, we = we.className), we == "CodeMirror-linenumbers") {
+ if (!S)
+ continue;
+ j = !0;
+ }
+ G.push({ className: we, style: $e });
+ }
+ return S && !j && G.push({ className: "CodeMirror-linenumbers", style: null }), G;
+ }
+ function L5(x) {
+ var S = x.gutters, G = x.gutterSpecs;
+ Be(S), x.lineGutter = null;
+ for (var j = 0; j < G.length; ++j) {
+ var V = G[j], we = V.className, $e = V.style, ze = S.appendChild(Me("div", null, "CodeMirror-gutter " + we));
+ $e && (ze.style.cssText = $e), we == "CodeMirror-linenumbers" && (x.lineGutter = ze, ze.style.width = (x.lineNumWidth || 1) + "px");
+ }
+ S.style.display = G.length ? "" : "none", Uk(x);
+ }
+ function vb(x) {
+ L5(x.display), pd(x), $3(x);
+ }
+ function t_(x, S, G, j) {
+ var V = this;
+ this.input = G, V.scrollbarFiller = Me("div", null, "CodeMirror-scrollbar-filler"), V.scrollbarFiller.setAttribute("cm-not-content", "true"), V.gutterFiller = Me("div", null, "CodeMirror-gutter-filler"), V.gutterFiller.setAttribute("cm-not-content", "true"), V.lineDiv = ve("div", null, "CodeMirror-code"), V.selectionDiv = Me("div", null, null, "position: relative; z-index: 1"), V.cursorDiv = Me("div", null, "CodeMirror-cursors"), V.measure = Me("div", null, "CodeMirror-measure"), V.lineMeasure = Me("div", null, "CodeMirror-measure"), V.lineSpace = ve("div", [V.measure, V.lineMeasure, V.selectionDiv, V.cursorDiv, V.lineDiv], null, "position: relative; outline: none");
+ var we = ve("div", [V.lineSpace], "CodeMirror-lines");
+ V.mover = Me("div", [we], null, "position: relative"), V.sizer = Me("div", [V.mover], "CodeMirror-sizer"), V.sizerWidth = null, V.heightForcer = Me("div", null, null, "position: absolute; height: " + Zn + "px; width: 1px;"), V.gutters = Me("div", null, "CodeMirror-gutters"), V.lineGutter = null, V.scroller = Me("div", [V.sizer, V.heightForcer, V.gutters], "CodeMirror-scroll"), V.scroller.setAttribute("tabIndex", "-1"), V.wrapper = Me("div", [V.scrollbarFiller, V.gutterFiller, V.scroller], "CodeMirror"), v && k < 8 && (V.gutters.style.zIndex = -1, V.scroller.style.paddingRight = 0), _ || f && he || (V.scroller.draggable = !0), x && (x.appendChild ? x.appendChild(V.wrapper) : x(V.wrapper)), V.viewFrom = V.viewTo = S.first, V.reportedViewFrom = V.reportedViewTo = S.first, V.view = [], V.renderedView = null, V.externalMeasured = null, V.viewOffset = 0, V.lastWrapHeight = V.lastWrapWidth = 0, V.updateLineNumbers = null, V.nativeBarWidth = V.barHeight = V.barWidth = 0, V.scrollbarsClipped = !1, V.lineNumWidth = V.lineNumInnerWidth = V.lineNumChars = null, V.alignWidgets = !1, V.cachedCharWidth = V.cachedTextHeight = V.cachedPaddingH = null, V.maxLine = null, V.maxLineLength = 0, V.maxLineChanged = !1, V.wheelDX = V.wheelDY = V.wheelStartX = V.wheelStartY = null, V.shift = !1, V.selForContextMenu = null, V.activeTouch = null, V.gutterSpecs = S5(j.gutters, j.lineNumbers), L5(V), G.init(V);
+ }
+ N2.prototype.signal = function(x, S) {
+ Na(x, S) && this.events.push(arguments);
+ }, N2.prototype.finish = function() {
+ for (var x = 0; x < this.events.length; x++)
+ Yr.apply(null, this.events[x]);
+ };
+ var yb = 0, A0 = null;
+ function Hk(x) {
+ var S = x.wheelDeltaX, G = x.wheelDeltaY;
+ return S == null && x.detail && x.axis == x.HORIZONTAL_AXIS && (S = x.detail), G == null && x.detail && x.axis == x.VERTICAL_AXIS ? G = x.detail : G == null && (G = x.wheelDelta), { x: S, y: G };
+ }
+ function n_(x) {
+ var S = Hk(x);
+ return S.x *= A0, S.y *= A0, S;
+ }
+ function jk(x, S) {
+ var G = Hk(S), j = G.x, V = G.y, we = x.display, $e = we.scroller, ze = $e.scrollWidth > $e.clientWidth, nt = $e.scrollHeight > $e.clientHeight;
+ if (j && ze || V && nt) {
+ if (V && Y && _) {
+ e:
+ for (var at = S.target, Yt = we.view; at != $e; at = at.parentNode)
+ for (var Vt = 0; Vt < Yt.length; Vt++)
+ if (Yt[Vt].node == at) {
+ x.display.currentWheelTarget = at;
+ break e;
+ }
+ }
+ if (j && !f && !F && A0 != null)
+ return V && nt && Dv(x, Math.max(0, $e.scrollTop + V * A0)), Nv(x, Math.max(0, $e.scrollLeft + j * A0)), (!V || V && nt) && as(S), void (we.wheelStartX = null);
+ if (V && A0 != null) {
+ var Nn = V * A0, Vn = x.doc.scrollTop, mr = Vn + we.wrapper.clientHeight;
+ Nn < 0 ? Vn = Math.max(0, Vn + Nn - 50) : mr = Math.min(x.doc.height, mr + Nn + 50), aw(x, { top: Vn, bottom: mr });
+ }
+ yb < 20 && (we.wheelStartX == null ? (we.wheelStartX = $e.scrollLeft, we.wheelStartY = $e.scrollTop, we.wheelDX = j, we.wheelDY = V, setTimeout(function() {
+ if (we.wheelStartX != null) {
+ var si = $e.scrollLeft - we.wheelStartX, Mi = $e.scrollTop - we.wheelStartY, _r = Mi && we.wheelDY && Mi / we.wheelDY || si && we.wheelDX && si / we.wheelDX;
+ we.wheelStartX = we.wheelStartY = null, _r && (A0 = (A0 * yb + _r) / (yb + 1), ++yb);
+ }
+ }, 200)) : (we.wheelDX += j, we.wheelDY += V));
+ }
+ }
+ v ? A0 = -0.53 : f ? A0 = 15 : L ? A0 = -0.7 : U && (A0 = -1 / 3);
+ var G0 = function(x, S) {
+ this.ranges = x, this.primIndex = S;
+ };
+ G0.prototype.primary = function() {
+ return this.ranges[this.primIndex];
+ }, G0.prototype.equals = function(x) {
+ if (x == this)
+ return !0;
+ if (x.primIndex != this.primIndex || x.ranges.length != this.ranges.length)
+ return !1;
+ for (var S = 0; S < this.ranges.length; S++) {
+ var G = this.ranges[S], j = x.ranges[S];
+ if (!Wo(G.anchor, j.anchor) || !Wo(G.head, j.head))
+ return !1;
+ }
+ return !0;
+ }, G0.prototype.deepCopy = function() {
+ for (var x = [], S = 0; S < this.ranges.length; S++)
+ x[S] = new lu(hn(this.ranges[S].anchor), hn(this.ranges[S].head));
+ return new G0(x, this.primIndex);
+ }, G0.prototype.somethingSelected = function() {
+ for (var x = 0; x < this.ranges.length; x++)
+ if (!this.ranges[x].empty())
+ return !0;
+ return !1;
+ }, G0.prototype.contains = function(x, S) {
+ S || (S = x);
+ for (var G = 0; G < this.ranges.length; G++) {
+ var j = this.ranges[G];
+ if (Pr(S, j.from()) >= 0 && Pr(x, j.to()) <= 0)
+ return G;
+ }
+ return -1;
+ };
+ var lu = function(x, S) {
+ this.anchor = x, this.head = S;
+ };
+ function Mp(x, S, G) {
+ var j = x && x.options.selectionsMayTouch, V = S[G];
+ S.sort(function(Nn, Vn) {
+ return Pr(Nn.from(), Vn.from());
+ }), G = jt(S, V);
+ for (var we = 1; we < S.length; we++) {
+ var $e = S[we], ze = S[we - 1], nt = Pr(ze.to(), $e.from());
+ if (j && !$e.empty() ? nt > 0 : nt >= 0) {
+ var at = Sn(ze.from(), $e.from()), Yt = wf(ze.to(), $e.to()), Vt = ze.empty() ? $e.from() == $e.head : ze.from() == ze.head;
+ we <= G && --G, S.splice(--we, 2, new lu(Vt ? Yt : at, Vt ? at : Yt));
+ }
+ }
+ return new G0(S, G);
+ }
+ function R2(x, S) {
+ return new G0([new lu(x, S || x)], 0);
+ }
+ function Q2(x) {
+ return x.text ? pr(x.from.line + x.text.length - 1, pt(x.text).length + (x.text.length == 1 ? x.from.ch : 0)) : x.to;
+ }
+ function Nl(x, S) {
+ if (Pr(x, S.from) < 0)
+ return x;
+ if (Pr(x, S.to) <= 0)
+ return Q2(S);
+ var G = x.line + S.text.length - (S.to.line - S.from.line) - 1, j = x.ch;
+ return x.line == S.to.line && (j += Q2(S).ch - S.to.ch), pr(G, j);
+ }
+ function md(x, S) {
+ for (var G = [], j = 0; j < x.sel.ranges.length; j++) {
+ var V = x.sel.ranges[j];
+ G.push(new lu(Nl(V.anchor, S), Nl(V.head, S)));
+ }
+ return Mp(x.cm, G, x.sel.primIndex);
+ }
+ function Pc(x, S, G) {
+ return x.line == S.line ? pr(G.line, x.ch - S.ch + G.ch) : pr(G.line + (x.line - S.line), x.ch);
+ }
+ function r_(x, S, G) {
+ for (var j = [], V = pr(x.first, 0), we = V, $e = 0; $e < S.length; $e++) {
+ var ze = S[$e], nt = Pc(ze.from, V, we), at = Pc(Q2(ze), V, we);
+ if (V = ze.to, we = at, G == "around") {
+ var Yt = x.sel.ranges[$e], Vt = Pr(Yt.head, Yt.anchor) < 0;
+ j[$e] = new lu(Vt ? at : nt, Vt ? nt : at);
+ } else
+ j[$e] = new lu(nt, nt);
+ }
+ return new G0(j, x.sel.primIndex);
+ }
+ function I5(x) {
+ x.doc.mode = cu(x.options, x.doc.modeOption), wa(x);
+ }
+ function wa(x) {
+ x.doc.iter(function(S) {
+ S.stateAfter && (S.stateAfter = null), S.styles && (S.styles = null);
+ }), x.doc.modeFrontier = x.doc.highlightFrontier = x.doc.first, Ip(x, 100), x.state.modeGen++, x.curOp && pd(x);
+ }
+ function Ao(x, S) {
+ return S.from.ch == 0 && S.to.ch == 0 && pt(S.text) == "" && (!x.cm || x.cm.options.wholeLineUpdateBefore);
+ }
+ function Kk(x, S, G, j) {
+ function V(ao) {
+ return G ? G[ao] : null;
+ }
+ function we(ao, ea, zi) {
+ Br(ao, ea, zi, j), Dl(ao, "change", ao, S);
+ }
+ function $e(ao, ea) {
+ for (var zi = [], Qo = ao; Qo < ea; ++Qo)
+ zi.push(new Zf(at[Qo], V(Qo), j));
+ return zi;
+ }
+ var ze = S.from, nt = S.to, at = S.text, Yt = Ki(x, ze.line), Vt = Ki(x, nt.line), Nn = pt(at), Vn = V(at.length - 1), mr = nt.line - ze.line;
+ if (S.full)
+ x.insert(0, $e(0, at.length)), x.remove(at.length, x.size - at.length);
+ else if (Ao(x, S)) {
+ var si = $e(0, at.length - 1);
+ we(Vt, Vt.text, Vn), mr && x.remove(ze.line, mr), si.length && x.insert(ze.line, si);
+ } else if (Yt == Vt)
+ if (at.length == 1)
+ we(Yt, Yt.text.slice(0, ze.ch) + Nn + Yt.text.slice(nt.ch), Vn);
+ else {
+ var Mi = $e(1, at.length - 1);
+ Mi.push(new Zf(Nn + Yt.text.slice(nt.ch), Vn, j)), we(Yt, Yt.text.slice(0, ze.ch) + at[0], V(0)), x.insert(ze.line + 1, Mi);
+ }
+ else if (at.length == 1)
+ we(Yt, Yt.text.slice(0, ze.ch) + at[0] + Vt.text.slice(nt.ch), V(0)), x.remove(ze.line + 1, mr);
+ else {
+ we(Yt, Yt.text.slice(0, ze.ch) + at[0], V(0)), we(Vt, Nn + Vt.text.slice(nt.ch), Vn);
+ var _r = $e(1, at.length - 1);
+ mr > 1 && x.remove(ze.line + 1, mr - 1), x.insert(ze.line + 1, _r);
+ }
+ Dl(x, "change", x, S);
+ }
+ function Fp(x, S, G) {
+ function j(V, we, $e) {
+ if (V.linked)
+ for (var ze = 0; ze < V.linked.length; ++ze) {
+ var nt = V.linked[ze];
+ if (nt.doc != we) {
+ var at = $e && nt.sharedHist;
+ G && !at || (S(nt.doc, at), j(nt.doc, V, at));
+ }
+ }
+ }
+ j(x, null, !0);
+ }
+ function U3(x, S) {
+ if (S.cm)
+ throw new Error("This document is already in use.");
+ x.doc = S, S.cm = x, Ab(x), I5(x), kC(x), x.options.lineWrapping || s0(x), x.options.mode = S.modeOption, pd(x);
+ }
+ function kC(x) {
+ (x.doc.direction == "rtl" ? ot : ie)(x.display.lineDiv, "CodeMirror-rtl");
+ }
+ function i_(x) {
+ IA(x, function() {
+ kC(x), pd(x);
+ });
+ }
+ function M5(x) {
+ this.done = [], this.undone = [], this.undoDepth = 1 / 0, this.lastModTime = this.lastSelTime = 0, this.lastOp = this.lastSelOp = null, this.lastOrigin = this.lastSelOrigin = null, this.generation = this.maxGeneration = x || 1;
+ }
+ function H3(x, S) {
+ var G = { from: hn(S.from), to: Q2(S), text: Ta(x, S.from, S.to) };
+ return j3(x, G, S.from.line, S.to.line + 1), Fp(x, function(j) {
+ return j3(j, G, S.from.line, S.to.line + 1);
+ }, !0), G;
+ }
+ function Io(x) {
+ for (; x.length && pt(x).ranges; )
+ x.pop();
+ }
+ function ow(x, S) {
+ return S ? (Io(x.done), pt(x.done)) : x.done.length && !pt(x.done).ranges ? pt(x.done) : x.done.length > 1 && !x.done[x.done.length - 2].ranges ? (x.done.pop(), pt(x.done)) : void 0;
+ }
+ function sw(x, S, G, j) {
+ var V = x.history;
+ V.undone.length = 0;
+ var we, $e, ze = +/* @__PURE__ */ new Date();
+ if ((V.lastOp == j || V.lastOrigin == S.origin && S.origin && (S.origin.charAt(0) == "+" && V.lastModTime > ze - (x.cm ? x.cm.options.historyEventDelay : 500) || S.origin.charAt(0) == "*")) && (we = ow(V, V.lastOp == j)))
+ $e = pt(we.changes), Pr(S.from, S.to) == 0 && Pr(S.from, $e.to) == 0 ? $e.to = Q2(S) : we.changes.push(H3(x, S));
+ else {
+ var nt = pt(V.done);
+ for (nt && nt.ranges || O5(x.sel, V.done), we = { changes: [H3(x, S)], generation: V.generation }, V.done.push(we); V.done.length > V.undoDepth; )
+ V.done.shift(), V.done[0].ranges || V.done.shift();
+ }
+ V.done.push(G), V.generation = ++V.maxGeneration, V.lastModTime = V.lastSelTime = ze, V.lastOp = V.lastSelOp = j, V.lastOrigin = V.lastSelOrigin = S.origin, $e || Yr(x, "historyAdded");
+ }
+ function F5(x, S, G, j) {
+ var V = S.charAt(0);
+ return V == "*" || V == "+" && G.ranges.length == j.ranges.length && G.somethingSelected() == j.somethingSelected() && /* @__PURE__ */ new Date() - x.history.lastSelTime <= (x.cm ? x.cm.options.historyEventDelay : 500);
+ }
+ function vm(x, S, G, j) {
+ var V = x.history, we = j && j.origin;
+ G == V.lastSelOp || we && V.lastSelOrigin == we && (V.lastModTime == V.lastSelTime && V.lastOrigin == we || F5(x, we, pt(V.done), S)) ? V.done[V.done.length - 1] = S : O5(S, V.done), V.lastSelTime = +/* @__PURE__ */ new Date(), V.lastSelOrigin = we, V.lastSelOp = G, j && j.clearRedo !== !1 && Io(V.undone);
+ }
+ function O5(x, S) {
+ var G = pt(S);
+ G && G.ranges && G.equals(x) || S.push(x);
+ }
+ function j3(x, S, G, j) {
+ var V = S["spans_" + x.id], we = 0;
+ x.iter(Math.max(x.first, G), Math.min(x.first + x.size, j), function($e) {
+ $e.markedSpans && ((V || (V = S["spans_" + x.id] = {}))[we] = $e.markedSpans), ++we;
+ });
+ }
+ function cw(x) {
+ if (!x)
+ return null;
+ for (var S, G = 0; G < x.length; ++G)
+ x[G].marker.explicitlyCleared ? S || (S = x.slice(0, G)) : S && S.push(x[G]);
+ return S ? S.length ? S : null : x;
+ }
+ function $2(x, S) {
+ var G = S["spans_" + x.id];
+ if (!G)
+ return null;
+ for (var j = [], V = 0; V < S.text.length; ++V)
+ j.push(cw(G[V]));
+ return j;
+ }
+ function Op(x, S) {
+ var G = $2(x, S), j = Ad(x, S);
+ if (!G)
+ return j;
+ if (!j)
+ return G;
+ for (var V = 0; V < G.length; ++V) {
+ var we = G[V], $e = j[V];
+ if (we && $e)
+ e:
+ for (var ze = 0; ze < $e.length; ++ze) {
+ for (var nt = $e[ze], at = 0; at < we.length; ++at)
+ if (we[at].marker == nt.marker)
+ continue e;
+ we.push(nt);
+ }
+ else
+ $e && (G[V] = $e);
+ }
+ return G;
+ }
+ function X0(x, S, G) {
+ for (var j = [], V = 0; V < x.length; ++V) {
+ var we = x[V];
+ if (we.ranges)
+ j.push(G ? G0.prototype.deepCopy.call(we) : we);
+ else {
+ var $e = we.changes, ze = [];
+ j.push({ changes: ze });
+ for (var nt = 0; nt < $e.length; ++nt) {
+ var at = $e[nt], Yt = void 0;
+ if (ze.push({ from: at.from, to: at.to, text: at.text }), S)
+ for (var Vt in at)
+ (Yt = Vt.match(/^spans_(\d+)$/)) && jt(S, Number(Yt[1])) > -1 && (pt(ze)[Vt] = at[Vt], delete at[Vt]);
+ }
+ }
+ }
+ return j;
+ }
+ function D5(x, S, G, j) {
+ if (j) {
+ var V = x.anchor;
+ if (G) {
+ var we = Pr(S, V) < 0;
+ we != Pr(G, V) < 0 ? (V = S, S = G) : we != Pr(S, G) < 0 && (S = G);
+ }
+ return new lu(V, S);
+ }
+ return new lu(G || S, S);
+ }
+ function ym(x, S, G, j, V) {
+ V == null && (V = x.cm && (x.cm.display.shift || x.extend)), bd(x, new G0([D5(x.sel.primary(), S, G, V)], 0), j);
+ }
+ function K3(x, S, G) {
+ for (var j = [], V = x.cm && (x.cm.display.shift || x.extend), we = 0; we < x.sel.ranges.length; we++)
+ j[we] = D5(x.sel.ranges[we], S[we], null, V);
+ bd(x, Mp(x.cm, j, x.sel.primIndex), G);
+ }
+ function wb(x, S, G, j) {
+ var V = x.sel.ranges.slice(0);
+ V[S] = G, bd(x, Mp(x.cm, V, x.sel.primIndex), j);
+ }
+ function zk(x, S, G, j) {
+ bd(x, R2(S, G), j);
+ }
+ function Gk(x, S, G) {
+ var j = { ranges: S.ranges, update: function(V) {
+ this.ranges = [];
+ for (var we = 0; we < V.length; we++)
+ this.ranges[we] = new lu(Ro(x, V[we].anchor), Ro(x, V[we].head));
+ }, origin: G && G.origin };
+ return Yr(x, "beforeSelectionChange", x, j), x.cm && Yr(x.cm, "beforeSelectionChange", x.cm, j), j.ranges != S.ranges ? Mp(x.cm, j.ranges, j.ranges.length - 1) : S;
+ }
+ function xC(x, S, G) {
+ var j = x.history.done, V = pt(j);
+ V && V.ranges ? (j[j.length - 1] = S, wm(x, S, G)) : bd(x, S, G);
+ }
+ function bd(x, S, G) {
+ wm(x, S, G), vm(x, x.sel, x.cm ? x.cm.curOp.id : NaN, G);
+ }
+ function wm(x, S, G) {
+ (Na(x, "beforeSelectionChange") || x.cm && Na(x.cm, "beforeSelectionChange")) && (S = Gk(x, S, G));
+ var j = G && G.bias || (Pr(S.primary().head, x.sel.primary().head) < 0 ? -1 : 1);
+ km(x, P5(x, S, j, !0)), G && G.scroll === !1 || !x.cm || rw(x.cm);
+ }
+ function km(x, S) {
+ S.equals(x.sel) || (x.sel = S, x.cm && (x.cm.curOp.updateInput = 1, x.cm.curOp.selectionChanged = !0, Vr(x.cm)), Dl(x, "cursorActivity", x));
+ }
+ function N5(x) {
+ km(x, P5(x, x.sel, null, !1));
+ }
+ function P5(x, S, G, j) {
+ for (var V, we = 0; we < S.ranges.length; we++) {
+ var $e = S.ranges[we], ze = S.ranges.length == x.sel.ranges.length && x.sel.ranges[we], nt = z3(x, $e.anchor, ze && ze.anchor, G, j), at = z3(x, $e.head, ze && ze.head, G, j);
+ (V || nt != $e.anchor || at != $e.head) && (V || (V = S.ranges.slice(0, we)), V[we] = new lu(nt, at));
+ }
+ return V ? Mp(x.cm, V, S.primIndex) : S;
+ }
+ function Rv(x, S, G, j, V) {
+ var we = Ki(x, S.line);
+ if (we.markedSpans)
+ for (var $e = 0; $e < we.markedSpans.length; ++$e) {
+ var ze = we.markedSpans[$e], nt = ze.marker, at = "selectLeft" in nt ? !nt.selectLeft : nt.inclusiveLeft, Yt = "selectRight" in nt ? !nt.selectRight : nt.inclusiveRight;
+ if ((ze.from == null || (at ? ze.from <= S.ch : ze.from < S.ch)) && (ze.to == null || (Yt ? ze.to >= S.ch : ze.to > S.ch))) {
+ if (V && (Yr(nt, "beforeCursorEnter"), nt.explicitlyCleared)) {
+ if (we.markedSpans) {
+ --$e;
+ continue;
+ }
+ break;
+ }
+ if (!nt.atomic)
+ continue;
+ if (G) {
+ var Vt = nt.find(j < 0 ? 1 : -1), Nn = void 0;
+ if ((j < 0 ? Yt : at) && (Vt = Qv(x, Vt, -j, Vt && Vt.line == S.line ? we : null)), Vt && Vt.line == S.line && (Nn = Pr(Vt, G)) && (j < 0 ? Nn < 0 : Nn > 0))
+ return Rv(x, Vt, S, j, V);
+ }
+ var Vn = nt.find(j < 0 ? -1 : 1);
+ return (j < 0 ? at : Yt) && (Vn = Qv(x, Vn, j, Vn.line == S.line ? we : null)), Vn ? Rv(x, Vn, S, j, V) : null;
+ }
+ }
+ return S;
+ }
+ function z3(x, S, G, j, V) {
+ var we = j || 1, $e = Rv(x, S, G, we, V) || !V && Rv(x, S, G, we, !0) || Rv(x, S, G, -we, V) || !V && Rv(x, S, G, -we, !0);
+ return $e || (x.cantEdit = !0, pr(x.first, 0));
+ }
+ function Qv(x, S, G, j) {
+ return G < 0 && S.ch == 0 ? S.line > x.first ? Ro(x, pr(S.line - 1)) : null : G > 0 && S.ch == (j || Ki(x, S.line)).text.length ? S.line < x.first + x.size - 1 ? pr(S.line + 1, 0) : null : new pr(S.line, S.ch + G);
+ }
+ function Ng(x) {
+ x.setSelection(pr(x.firstLine(), 0), pr(x.lastLine()), wn);
+ }
+ function lw(x, S, G) {
+ var j = { canceled: !1, from: S.from, to: S.to, text: S.text, origin: S.origin, cancel: function() {
+ return j.canceled = !0;
+ } };
+ return G && (j.update = function(V, we, $e, ze) {
+ V && (j.from = Ro(x, V)), we && (j.to = Ro(x, we)), $e && (j.text = $e), ze !== void 0 && (j.origin = ze);
+ }), Yr(x, "beforeChange", x, j), x.cm && Yr(x.cm, "beforeChange", x.cm, j), j.canceled ? (x.cm && (x.cm.curOp.updateInput = 2), null) : { from: j.from, to: j.to, text: j.text, origin: j.origin };
+ }
+ function uw(x, S, G) {
+ if (x.cm) {
+ if (!x.cm.curOp)
+ return q1(x.cm, uw)(x, S, G);
+ if (x.cm.state.suppressEdits)
+ return;
+ }
+ if (!(Na(x, "beforeChange") || x.cm && Na(x.cm, "beforeChange")) || (S = lw(x, S, !0))) {
+ var j = eu && !G && Md(x, S.from, S.to);
+ if (j)
+ for (var V = j.length - 1; V >= 0; --V)
+ R5(x, { from: j[V].from, to: j[V].to, text: V ? [""] : S.text, origin: S.origin });
+ else
+ R5(x, S);
+ }
+ }
+ function R5(x, S) {
+ if (S.text.length != 1 || S.text[0] != "" || Pr(S.from, S.to) != 0) {
+ var G = md(x, S);
+ sw(x, S, G, x.cm ? x.cm.curOp.id : NaN), kb(x, S, G, Ad(x, S));
+ var j = [];
+ Fp(x, function(V, we) {
+ we || jt(j, V.history) != -1 || (Hv(V.history, S), j.push(V.history)), kb(V, S, null, Ad(V, S));
+ });
+ }
+ }
+ function $v(x, S, G) {
+ var j = x.cm && x.cm.state.suppressEdits;
+ if (!j || G) {
+ for (var V, we = x.history, $e = x.sel, ze = S == "undo" ? we.done : we.undone, nt = S == "undo" ? we.undone : we.done, at = 0; at < ze.length && (V = ze[at], G ? !V.ranges || V.equals(x.sel) : V.ranges); at++)
+ ;
+ if (at != ze.length) {
+ for (we.lastOrigin = we.lastSelOrigin = null; ; ) {
+ if (!(V = ze.pop()).ranges) {
+ if (j)
+ return void ze.push(V);
+ break;
+ }
+ if (O5(V, nt), G && !V.equals(x.sel))
+ return void bd(x, V, { clearRedo: !1 });
+ $e = V;
+ }
+ var Yt = [];
+ O5($e, nt), nt.push({ changes: Yt, generation: we.generation }), we.generation = V.generation || ++we.maxGeneration;
+ for (var Vt = Na(x, "beforeChange") || x.cm && Na(x.cm, "beforeChange"), Nn = function(si) {
+ var Mi = V.changes[si];
+ if (Mi.origin = S, Vt && !lw(x, Mi, !1))
+ return ze.length = 0, {};
+ Yt.push(H3(x, Mi));
+ var _r = si ? md(x, Mi) : pt(ze);
+ kb(x, Mi, _r, Op(x, Mi)), !si && x.cm && x.cm.scrollIntoView({ from: Mi.from, to: Q2(Mi) });
+ var ao = [];
+ Fp(x, function(ea, zi) {
+ zi || jt(ao, ea.history) != -1 || (Hv(ea.history, Mi), ao.push(ea.history)), kb(ea, Mi, null, Op(ea, Mi));
+ });
+ }, Vn = V.changes.length - 1; Vn >= 0; --Vn) {
+ var mr = Nn(Vn);
+ if (mr)
+ return mr.v;
+ }
+ }
+ }
+ }
+ function Xk(x, S) {
+ if (S != 0 && (x.first += S, x.sel = new G0(Ci(x.sel.ranges, function(V) {
+ return new lu(pr(V.anchor.line + S, V.anchor.ch), pr(V.head.line + S, V.head.ch));
+ }), x.sel.primIndex), x.cm)) {
+ pd(x.cm, x.first, x.first - S, S);
+ for (var G = x.cm.display, j = G.viewFrom; j < G.viewTo; j++)
+ L2(x.cm, j, "gutter");
+ }
+ }
+ function kb(x, S, G, j) {
+ if (x.cm && !x.cm.curOp)
+ return q1(x.cm, kb)(x, S, G, j);
+ if (S.to.line < x.first)
+ Xk(x, S.text.length - 1 - (S.to.line - S.from.line));
+ else if (!(S.from.line > x.lastLine())) {
+ if (S.from.line < x.first) {
+ var V = S.text.length - 1 - (x.first - S.from.line);
+ Xk(x, V), S = { from: pr(x.first, 0), to: pr(S.to.line + V, S.to.ch), text: [pt(S.text)], origin: S.origin };
+ }
+ var we = x.lastLine();
+ S.to.line > we && (S = { from: S.from, to: pr(we, Ki(x, we).text.length), text: [S.text[0]], origin: S.origin }), S.removed = Ta(x, S.from, S.to), G || (G = md(x, S)), x.cm ? a_(x.cm, S, j) : Kk(x, S, j), wm(x, G, wn), x.cantEdit && z3(x, pr(x.firstLine(), 0)) && (x.cantEdit = !1);
+ }
+ }
+ function a_(x, S, G) {
+ var j = x.doc, V = x.display, we = S.from, $e = S.to, ze = !1, nt = we.line;
+ x.options.lineWrapping || (nt = mc(iA(Ki(j, we.line))), j.iter(nt, $e.line + 1, function(Vn) {
+ if (Vn == V.maxLine)
+ return ze = !0, !0;
+ })), j.sel.contains(S.from, S.to) > -1 && Vr(x), Kk(j, S, G, AC(x)), x.options.lineWrapping || (j.iter(nt, we.line + S.text.length, function(Vn) {
+ var mr = Tp(Vn);
+ mr > V.maxLineLength && (V.maxLine = Vn, V.maxLineLength = mr, V.maxLineChanged = !0, ze = !1);
+ }), ze && (x.curOp.updateMaxLine = !0)), kf(j, we.line), Ip(x, 400);
+ var at = S.text.length - ($e.line - we.line) - 1;
+ S.full ? pd(x) : we.line != $e.line || S.text.length != 1 || Ao(x.doc, S) ? pd(x, we.line, $e.line + 1, at) : L2(x, we.line, "text");
+ var Yt = Na(x, "changes"), Vt = Na(x, "change");
+ if (Vt || Yt) {
+ var Nn = { from: we, to: $e, text: S.text, removed: S.removed, origin: S.origin };
+ Vt && Dl(x, "change", x, Nn), Yt && (x.curOp.changeObjs || (x.curOp.changeObjs = [])).push(Nn);
+ }
+ x.display.selForContextMenu = null;
+ }
+ function Uv(x, S, G, j, V) {
+ var we;
+ j || (j = G), Pr(j, G) < 0 && (G = (we = [j, G])[0], j = we[1]), typeof S == "string" && (S = x.splitLines(S)), uw(x, { from: G, to: j, text: S, origin: V });
+ }
+ function xm(x, S, G, j) {
+ G < x.line ? x.line += j : S < x.line && (x.line = S, x.ch = 0);
+ }
+ function U2(x, S, G, j) {
+ for (var V = 0; V < x.length; ++V) {
+ var we = x[V], $e = !0;
+ if (we.ranges) {
+ we.copied || ((we = x[V] = we.deepCopy()).copied = !0);
+ for (var ze = 0; ze < we.ranges.length; ze++)
+ xm(we.ranges[ze].anchor, S, G, j), xm(we.ranges[ze].head, S, G, j);
+ } else {
+ for (var nt = 0; nt < we.changes.length; ++nt) {
+ var at = we.changes[nt];
+ if (G < at.from.line)
+ at.from = pr(at.from.line + j, at.from.ch), at.to = pr(at.to.line + j, at.to.ch);
+ else if (S <= at.to.line) {
+ $e = !1;
+ break;
+ }
+ }
+ $e || (x.splice(0, V + 1), V = 0);
+ }
+ }
+ }
+ function Hv(x, S) {
+ var G = S.from.line, j = S.to.line, V = S.text.length - (j - G) - 1;
+ U2(x.done, G, j, V), U2(x.undone, G, j, V);
+ }
+ function hw(x, S, G, j) {
+ var V = S, we = S;
+ return typeof S == "number" ? we = Ki(x, Nc(x, S)) : V = mc(S), V == null ? null : (j(we, V) && x.cm && L2(x.cm, V, G), we);
+ }
+ function fw(x) {
+ this.lines = x, this.parent = null;
+ for (var S = 0, G = 0; G < x.length; ++G)
+ x[G].parent = this, S += x[G].height;
+ this.height = S;
+ }
+ function dw(x) {
+ this.children = x;
+ for (var S = 0, G = 0, j = 0; j < x.length; ++j) {
+ var V = x[j];
+ S += V.chunkSize(), G += V.height, V.parent = this;
+ }
+ this.size = S, this.height = G, this.parent = null;
+ }
+ lu.prototype.from = function() {
+ return Sn(this.anchor, this.head);
+ }, lu.prototype.to = function() {
+ return wf(this.anchor, this.head);
+ }, lu.prototype.empty = function() {
+ return this.head.line == this.anchor.line && this.head.ch == this.anchor.ch;
+ }, fw.prototype = { chunkSize: function() {
+ return this.lines.length;
+ }, removeInner: function(x, S) {
+ for (var G = x, j = x + S; G < j; ++G) {
+ var V = this.lines[G];
+ this.height -= V.height, Bk(V), Dl(V, "delete");
+ }
+ this.lines.splice(x, S);
+ }, collapse: function(x) {
+ x.push.apply(x, this.lines);
+ }, insertInner: function(x, S, G) {
+ this.height += G, this.lines = this.lines.slice(0, x).concat(S).concat(this.lines.slice(x));
+ for (var j = 0; j < S.length; ++j)
+ S[j].parent = this;
+ }, iterN: function(x, S, G) {
+ for (var j = x + S; x < j; ++x)
+ if (G(this.lines[x]))
+ return !0;
+ } }, dw.prototype = { chunkSize: function() {
+ return this.size;
+ }, removeInner: function(x, S) {
+ this.size -= S;
+ for (var G = 0; G < this.children.length; ++G) {
+ var j = this.children[G], V = j.chunkSize();
+ if (x < V) {
+ var we = Math.min(S, V - x), $e = j.height;
+ if (j.removeInner(x, we), this.height -= $e - j.height, V == we && (this.children.splice(G--, 1), j.parent = null), (S -= we) == 0)
+ break;
+ x = 0;
+ } else
+ x -= V;
+ }
+ if (this.size - S < 25 && (this.children.length > 1 || !(this.children[0] instanceof fw))) {
+ var ze = [];
+ this.collapse(ze), this.children = [new fw(ze)], this.children[0].parent = this;
+ }
+ }, collapse: function(x) {
+ for (var S = 0; S < this.children.length; ++S)
+ this.children[S].collapse(x);
+ }, insertInner: function(x, S, G) {
+ this.size += S.length, this.height += G;
+ for (var j = 0; j < this.children.length; ++j) {
+ var V = this.children[j], we = V.chunkSize();
+ if (x <= we) {
+ if (V.insertInner(x, S, G), V.lines && V.lines.length > 50) {
+ for (var $e = V.lines.length % 25 + 25, ze = $e; ze < V.lines.length; ) {
+ var nt = new fw(V.lines.slice(ze, ze += 25));
+ V.height -= nt.height, this.children.splice(++j, 0, nt), nt.parent = this;
+ }
+ V.lines = V.lines.slice(0, $e), this.maybeSpill();
+ }
+ break;
+ }
+ x -= we;
+ }
+ }, maybeSpill: function() {
+ if (!(this.children.length <= 10)) {
+ var x = this;
+ do {
+ var S = new dw(x.children.splice(x.children.length - 5, 5));
+ if (x.parent) {
+ x.size -= S.size, x.height -= S.height;
+ var G = jt(x.parent.children, x);
+ x.parent.children.splice(G + 1, 0, S);
+ } else {
+ var j = new dw(x.children);
+ j.parent = x, x.children = [j, S], x = j;
+ }
+ S.parent = x.parent;
+ } while (x.children.length > 10);
+ x.parent.maybeSpill();
+ }
+ }, iterN: function(x, S, G) {
+ for (var j = 0; j < this.children.length; ++j) {
+ var V = this.children[j], we = V.chunkSize();
+ if (x < we) {
+ var $e = Math.min(S, we - x);
+ if (V.iterN(x, $e, G))
+ return !0;
+ if ((S -= $e) == 0)
+ break;
+ x = 0;
+ } else
+ x -= we;
+ }
+ } };
+ var jv = function(x, S, G) {
+ if (G)
+ for (var j in G)
+ G.hasOwnProperty(j) && (this[j] = G[j]);
+ this.doc = x, this.node = S;
+ };
+ function CC(x, S, G) {
+ uf(S) < (x.curOp && x.curOp.scrollTop || x.doc.scrollTop) && E5(x, G);
+ }
+ function Aw(x, S, G, j) {
+ var V = new jv(x, G, j), we = x.cm;
+ return we && V.noHScroll && (we.display.alignWidgets = !0), hw(x, S, "widget", function($e) {
+ var ze = $e.widgets || ($e.widgets = []);
+ if (V.insertAt == null ? ze.push(V) : ze.splice(Math.min(ze.length - 1, Math.max(0, V.insertAt)), 0, V), V.line = $e, we && !ku(x, $e)) {
+ var nt = uf($e) < x.scrollTop;
+ sf($e, $e.height + xf(V)), nt && E5(we, V.height), we.curOp.forceUpdate = !0;
+ }
+ return !0;
+ }), we && Dl(we, "lineWidgetAdded", we, V, typeof S == "number" ? S : mc(S)), V;
+ }
+ jv.prototype.clear = function() {
+ var x = this.doc.cm, S = this.line.widgets, G = this.line, j = mc(G);
+ if (j != null && S) {
+ for (var V = 0; V < S.length; ++V)
+ S[V] == this && S.splice(V--, 1);
+ S.length || (G.widgets = null);
+ var we = xf(this);
+ sf(G, Math.max(0, G.height - we)), x && (IA(x, function() {
+ CC(x, G, -we), L2(x, j, "widget");
+ }), Dl(x, "lineWidgetCleared", x, this, j));
+ }
+ }, jv.prototype.changed = function() {
+ var x = this, S = this.height, G = this.doc.cm, j = this.line;
+ this.height = null;
+ var V = xf(this) - S;
+ V && (ku(this.doc, j) || sf(j, j.height + V), G && IA(G, function() {
+ G.curOp.forceUpdate = !0, CC(G, j, V), Dl(G, "lineWidgetChanged", G, x, mc(j));
+ }));
+ }, er(jv);
+ var _C = 0, Cf = function(x, S) {
+ this.lines = [], this.type = S, this.doc = x, this.id = ++_C;
+ };
+ function xb(x, S, G, j, V) {
+ if (j && j.shared)
+ return o_(x, S, G, j, V);
+ if (x.cm && !x.cm.curOp)
+ return q1(x.cm, xb)(x, S, G, j, V);
+ var we = new Cf(x, V), $e = Pr(S, G);
+ if (j && Qe(j, we, !1), $e > 0 || $e == 0 && we.clearWhenEmpty !== !1)
+ return we;
+ if (we.replacedWith && (we.collapsed = !0, we.widgetNode = ve("span", [we.replacedWith], "CodeMirror-widget"), j.handleMouseEvents || we.widgetNode.setAttribute("cm-ignore-events", "true"), j.insertLeft && (we.widgetNode.insertLeft = !0)), we.collapsed) {
+ if (Gh(x, S.line, S, G, we) || S.line != G.line && Gh(x, G.line, S, G, we))
+ throw new Error("Inserting collapsed marker partially overlapping an existing one");
+ hb();
+ }
+ we.addToHistory && sw(x, { from: S, to: G, origin: "markText" }, x.sel, NaN);
+ var ze, nt = S.line, at = x.cm;
+ if (x.iter(nt, G.line + 1, function(Vt) {
+ at && we.collapsed && !at.options.lineWrapping && iA(Vt) == at.display.maxLine && (ze = !0), we.collapsed && nt != S.line && sf(Vt, 0), Yf(Vt, new Of(we, nt == S.line ? S.ch : null, nt == G.line ? G.ch : null)), ++nt;
+ }), we.collapsed && x.iter(S.line, G.line + 1, function(Vt) {
+ ku(x, Vt) && sf(Vt, 0);
+ }), we.clearOnEnter && ji(we, "beforeCursorEnter", function() {
+ return we.clear();
+ }), we.readOnly && (Ps(), (x.history.done.length || x.history.undone.length) && x.clearHistory()), we.collapsed && (we.id = ++_C, we.atomic = !0), at) {
+ if (ze && (at.curOp.updateMaxLine = !0), we.collapsed)
+ pd(at, S.line, G.line + 1);
+ else if (we.className || we.startStyle || we.endStyle || we.css || we.attributes || we.title)
+ for (var Yt = S.line; Yt <= G.line; Yt++)
+ L2(at, Yt, "text");
+ we.atomic && N5(at.doc), Dl(at, "markerAdded", at, we);
+ }
+ return we;
+ }
+ Cf.prototype.clear = function() {
+ if (!this.explicitlyCleared) {
+ var x = this.doc.cm, S = x && !x.curOp;
+ if (S && mb(x), Na(this, "clear")) {
+ var G = this.find();
+ G && Dl(this, "clear", G.from, G.to);
+ }
+ for (var j = null, V = null, we = 0; we < this.lines.length; ++we) {
+ var $e = this.lines[we], ze = Sl($e.markedSpans, this);
+ x && !this.collapsed ? L2(x, mc($e), "text") : x && (ze.to != null && (V = mc($e)), ze.from != null && (j = mc($e))), $e.markedSpans = U0($e.markedSpans, ze), ze.from == null && this.collapsed && !ku(this.doc, $e) && x && sf($e, T2(x.display));
+ }
+ if (x && this.collapsed && !x.options.lineWrapping)
+ for (var nt = 0; nt < this.lines.length; ++nt) {
+ var at = iA(this.lines[nt]), Yt = Tp(at);
+ Yt > x.display.maxLineLength && (x.display.maxLine = at, x.display.maxLineLength = Yt, x.display.maxLineChanged = !0);
+ }
+ j != null && x && this.collapsed && pd(x, j, V + 1), this.lines.length = 0, this.explicitlyCleared = !0, this.atomic && this.doc.cantEdit && (this.doc.cantEdit = !1, x && N5(x.doc)), x && Dl(x, "markerCleared", x, this, j, V), S && bb(x), this.parent && this.parent.clear();
+ }
+ }, Cf.prototype.find = function(x, S) {
+ var G, j;
+ x == null && this.type == "bookmark" && (x = 1);
+ for (var V = 0; V < this.lines.length; ++V) {
+ var we = this.lines[V], $e = Sl(we.markedSpans, this);
+ if ($e.from != null && (G = pr(S ? we : mc(we), $e.from), x == -1))
+ return G;
+ if ($e.to != null && (j = pr(S ? we : mc(we), $e.to), x == 1))
+ return j;
+ }
+ return G && { from: G, to: j };
+ }, Cf.prototype.changed = function() {
+ var x = this, S = this.find(-1, !0), G = this, j = this.doc.cm;
+ S && j && IA(j, function() {
+ var V = S.line, we = mc(S.line), $e = h1(j, we);
+ if ($e && (Vy($e), j.curOp.selectionChanged = j.curOp.forceUpdate = !0), j.curOp.updateMaxLine = !0, !ku(G.doc, V) && G.height != null) {
+ var ze = G.height;
+ G.height = null;
+ var nt = xf(G) - ze;
+ nt && sf(V, V.height + nt);
+ }
+ Dl(j, "markerChanged", j, x);
+ });
+ }, Cf.prototype.attachLine = function(x) {
+ if (!this.lines.length && this.doc.cm) {
+ var S = this.doc.cm.curOp;
+ S.maybeHiddenMarkers && jt(S.maybeHiddenMarkers, this) != -1 || (S.maybeUnhiddenMarkers || (S.maybeUnhiddenMarkers = [])).push(this);
+ }
+ this.lines.push(x);
+ }, Cf.prototype.detachLine = function(x) {
+ if (this.lines.splice(jt(this.lines, x), 1), !this.lines.length && this.doc.cm) {
+ var S = this.doc.cm.curOp;
+ (S.maybeHiddenMarkers || (S.maybeHiddenMarkers = [])).push(this);
+ }
+ }, er(Cf);
+ var G3 = function(x, S) {
+ this.markers = x, this.primary = S;
+ for (var G = 0; G < x.length; ++G)
+ x[G].parent = this;
+ };
+ function o_(x, S, G, j, V) {
+ (j = Qe(j)).shared = !1;
+ var we = [xb(x, S, G, j, V)], $e = we[0], ze = j.widgetNode;
+ return Fp(x, function(nt) {
+ ze && (j.widgetNode = ze.cloneNode(!0)), we.push(xb(nt, Ro(nt, S), Ro(nt, G), j, V));
+ for (var at = 0; at < nt.linked.length; ++at)
+ if (nt.linked[at].isParent)
+ return;
+ $e = pt(we);
+ }), new G3(we, $e);
+ }
+ function X3(x) {
+ return x.findMarks(pr(x.first, 0), x.clipPos(pr(x.lastLine())), function(S) {
+ return S.parent;
+ });
+ }
+ function s_(x, S) {
+ for (var G = 0; G < S.length; G++) {
+ var j = S[G], V = j.find(), we = x.clipPos(V.from), $e = x.clipPos(V.to);
+ if (Pr(we, $e)) {
+ var ze = xb(x, we, $e, j.primary, j.primary.type);
+ j.markers.push(ze), ze.parent = j;
+ }
+ }
+ }
+ function c_(x) {
+ for (var S = function(j) {
+ var V = x[j], we = [V.primary.doc];
+ Fp(V.primary.doc, function(nt) {
+ return we.push(nt);
+ });
+ for (var $e = 0; $e < V.markers.length; $e++) {
+ var ze = V.markers[$e];
+ jt(we, ze.doc) == -1 && (ze.parent = null, V.markers.splice($e--, 1));
+ }
+ }, G = 0; G < x.length; G++)
+ S(G);
+ }
+ G3.prototype.clear = function() {
+ if (!this.explicitlyCleared) {
+ this.explicitlyCleared = !0;
+ for (var x = 0; x < this.markers.length; ++x)
+ this.markers[x].clear();
+ Dl(this, "clear");
+ }
+ }, G3.prototype.find = function(x, S) {
+ return this.primary.find(x, S);
+ }, er(G3);
+ var Q5 = 0, MA = function(x, S, G, j, V) {
+ if (!(this instanceof MA))
+ return new MA(x, S, G, j, V);
+ G == null && (G = 0), dw.call(this, [new fw([new Zf("", null)])]), this.first = G, this.scrollTop = this.scrollLeft = 0, this.cantEdit = !1, this.cleanGeneration = 1, this.modeFrontier = this.highlightFrontier = G;
+ var we = pr(G, 0);
+ this.sel = R2(we), this.history = new M5(null), this.id = ++Q5, this.modeOption = S, this.lineSep = j, this.direction = V == "rtl" ? "rtl" : "ltr", this.extend = !1, typeof x == "string" && (x = this.splitLines(x)), Kk(this, { from: we, to: we, text: x }), bd(this, R2(we), wn);
+ };
+ MA.prototype = zt(dw.prototype, { constructor: MA, iter: function(x, S, G) {
+ G ? this.iterN(x - this.first, S - x, G) : this.iterN(this.first, this.first + this.size, x);
+ }, insert: function(x, S) {
+ for (var G = 0, j = 0; j < S.length; ++j)
+ G += S[j].height;
+ this.insertInner(x - this.first, S, G);
+ }, remove: function(x, S) {
+ this.removeInner(x - this.first, S);
+ }, getValue: function(x) {
+ var S = Bl(this, this.first, this.first + this.size);
+ return x === !1 ? S : S.join(x || this.lineSeparator());
+ }, setValue: e1(function(x) {
+ var S = pr(this.first, 0), G = this.first + this.size - 1;
+ uw(this, { from: S, to: pr(G, Ki(this, G).text.length), text: this.splitLines(x), origin: "setValue", full: !0 }, !0), this.cm && D3(this.cm, 0, 0), bd(this, R2(S), wn);
+ }), replaceRange: function(x, S, G, j) {
+ Uv(this, x, S = Ro(this, S), G = G ? Ro(this, G) : S, j);
+ }, getRange: function(x, S, G) {
+ var j = Ta(this, Ro(this, x), Ro(this, S));
+ return G === !1 ? j : j.join(G || this.lineSeparator());
+ }, getLine: function(x) {
+ var S = this.getLineHandle(x);
+ return S && S.text;
+ }, getLineHandle: function(x) {
+ if (ra(this, x))
+ return Ki(this, x);
+ }, getLineNumber: function(x) {
+ return mc(x);
+ }, getLineHandleVisualStart: function(x) {
+ return typeof x == "number" && (x = Ki(this, x)), iA(x);
+ }, lineCount: function() {
+ return this.size;
+ }, firstLine: function() {
+ return this.first;
+ }, lastLine: function() {
+ return this.first + this.size - 1;
+ }, clipPos: function(x) {
+ return Ro(this, x);
+ }, getCursor: function(x) {
+ var S = this.sel.primary();
+ return x == null || x == "head" ? S.head : x == "anchor" ? S.anchor : x == "end" || x == "to" || x === !1 ? S.to() : S.from();
+ }, listSelections: function() {
+ return this.sel.ranges;
+ }, somethingSelected: function() {
+ return this.sel.somethingSelected();
+ }, setCursor: e1(function(x, S, G) {
+ zk(this, Ro(this, typeof x == "number" ? pr(x, S || 0) : x), null, G);
+ }), setSelection: e1(function(x, S, G) {
+ zk(this, Ro(this, x), Ro(this, S || x), G);
+ }), extendSelection: e1(function(x, S, G) {
+ ym(this, Ro(this, x), S && Ro(this, S), G);
+ }), extendSelections: e1(function(x, S) {
+ K3(this, tr(this, x), S);
+ }), extendSelectionsBy: e1(function(x, S) {
+ K3(this, tr(this, Ci(this.sel.ranges, x)), S);
+ }), setSelections: e1(function(x, S, G) {
+ if (x.length) {
+ for (var j = [], V = 0; V < x.length; V++)
+ j[V] = new lu(Ro(this, x[V].anchor), Ro(this, x[V].head));
+ S == null && (S = Math.min(x.length - 1, this.sel.primIndex)), bd(this, Mp(this.cm, j, S), G);
+ }
+ }), addSelection: e1(function(x, S, G) {
+ var j = this.sel.ranges.slice(0);
+ j.push(new lu(Ro(this, x), Ro(this, S || x))), bd(this, Mp(this.cm, j, j.length - 1), G);
+ }), getSelection: function(x) {
+ for (var S, G = this.sel.ranges, j = 0; j < G.length; j++) {
+ var V = Ta(this, G[j].from(), G[j].to());
+ S = S ? S.concat(V) : V;
+ }
+ return x === !1 ? S : S.join(x || this.lineSeparator());
+ }, getSelections: function(x) {
+ for (var S = [], G = this.sel.ranges, j = 0; j < G.length; j++) {
+ var V = Ta(this, G[j].from(), G[j].to());
+ x !== !1 && (V = V.join(x || this.lineSeparator())), S[j] = V;
+ }
+ return S;
+ }, replaceSelection: function(x, S, G) {
+ for (var j = [], V = 0; V < this.sel.ranges.length; V++)
+ j[V] = x;
+ this.replaceSelections(j, S, G || "+input");
+ }, replaceSelections: e1(function(x, S, G) {
+ for (var j = [], V = this.sel, we = 0; we < V.ranges.length; we++) {
+ var $e = V.ranges[we];
+ j[we] = { from: $e.from(), to: $e.to(), text: this.splitLines(x[we]), origin: G };
+ }
+ for (var ze = S && S != "end" && r_(this, j, S), nt = j.length - 1; nt >= 0; nt--)
+ uw(this, j[nt]);
+ ze ? xC(this, ze) : this.cm && rw(this.cm);
+ }), undo: e1(function() {
+ $v(this, "undo");
+ }), redo: e1(function() {
+ $v(this, "redo");
+ }), undoSelection: e1(function() {
+ $v(this, "undo", !0);
+ }), redoSelection: e1(function() {
+ $v(this, "redo", !0);
+ }), setExtending: function(x) {
+ this.extend = x;
+ }, getExtending: function() {
+ return this.extend;
+ }, historySize: function() {
+ for (var x = this.history, S = 0, G = 0, j = 0; j < x.done.length; j++)
+ x.done[j].ranges || ++S;
+ for (var V = 0; V < x.undone.length; V++)
+ x.undone[V].ranges || ++G;
+ return { undo: S, redo: G };
+ }, clearHistory: function() {
+ var x = this;
+ this.history = new M5(this.history.maxGeneration), Fp(this, function(S) {
+ return S.history = x.history;
+ }, !0);
+ }, markClean: function() {
+ this.cleanGeneration = this.changeGeneration(!0);
+ }, changeGeneration: function(x) {
+ return x && (this.history.lastOp = this.history.lastSelOp = this.history.lastOrigin = null), this.history.generation;
+ }, isClean: function(x) {
+ return this.history.generation == (x || this.cleanGeneration);
+ }, getHistory: function() {
+ return { done: X0(this.history.done), undone: X0(this.history.undone) };
+ }, setHistory: function(x) {
+ var S = this.history = new M5(this.history.maxGeneration);
+ S.done = X0(x.done.slice(0), null, !0), S.undone = X0(x.undone.slice(0), null, !0);
+ }, setGutterMarker: e1(function(x, S, G) {
+ return hw(this, x, "gutter", function(j) {
+ var V = j.gutterMarkers || (j.gutterMarkers = {});
+ return V[S] = G, !G && vr(V) && (j.gutterMarkers = null), !0;
+ });
+ }), clearGutter: e1(function(x) {
+ var S = this;
+ this.iter(function(G) {
+ G.gutterMarkers && G.gutterMarkers[x] && hw(S, G, "gutter", function() {
+ return G.gutterMarkers[x] = null, vr(G.gutterMarkers) && (G.gutterMarkers = null), !0;
+ });
+ });
+ }), lineInfo: function(x) {
+ var S;
+ if (typeof x == "number") {
+ if (!ra(this, x) || (S = x, !(x = Ki(this, x))))
+ return null;
+ } else if ((S = mc(x)) == null)
+ return null;
+ return { line: S, handle: x, text: x.text, gutterMarkers: x.gutterMarkers, textClass: x.textClass, bgClass: x.bgClass, wrapClass: x.wrapClass, widgets: x.widgets };
+ }, addLineClass: e1(function(x, S, G) {
+ return hw(this, x, S == "gutter" ? "gutter" : "class", function(j) {
+ var V = S == "text" ? "textClass" : S == "background" ? "bgClass" : S == "gutter" ? "gutterClass" : "wrapClass";
+ if (j[V]) {
+ if (Te(G).test(j[V]))
+ return !1;
+ j[V] += " " + G;
+ } else
+ j[V] = G;
+ return !0;
+ });
+ }), removeLineClass: e1(function(x, S, G) {
+ return hw(this, x, S == "gutter" ? "gutter" : "class", function(j) {
+ var V = S == "text" ? "textClass" : S == "background" ? "bgClass" : S == "gutter" ? "gutterClass" : "wrapClass", we = j[V];
+ if (!we)
+ return !1;
+ if (G == null)
+ j[V] = null;
+ else {
+ var $e = we.match(Te(G));
+ if (!$e)
+ return !1;
+ var ze = $e.index + $e[0].length;
+ j[V] = we.slice(0, $e.index) + ($e.index && ze != we.length ? " " : "") + we.slice(ze) || null;
+ }
+ return !0;
+ });
+ }), addLineWidget: e1(function(x, S, G) {
+ return Aw(this, x, S, G);
+ }), removeLineWidget: function(x) {
+ x.clear();
+ }, markText: function(x, S, G) {
+ return xb(this, Ro(this, x), Ro(this, S), G, G && G.type || "range");
+ }, setBookmark: function(x, S) {
+ var G = { replacedWith: S && (S.nodeType == null ? S.widget : S), insertLeft: S && S.insertLeft, clearWhenEmpty: !1, shared: S && S.shared, handleMouseEvents: S && S.handleMouseEvents };
+ return xb(this, x = Ro(this, x), x, G, "bookmark");
+ }, findMarksAt: function(x) {
+ var S = [], G = Ki(this, (x = Ro(this, x)).line).markedSpans;
+ if (G)
+ for (var j = 0; j < G.length; ++j) {
+ var V = G[j];
+ (V.from == null || V.from <= x.ch) && (V.to == null || V.to >= x.ch) && S.push(V.marker.parent || V.marker);
+ }
+ return S;
+ }, findMarks: function(x, S, G) {
+ x = Ro(this, x), S = Ro(this, S);
+ var j = [], V = x.line;
+ return this.iter(x.line, S.line + 1, function(we) {
+ var $e = we.markedSpans;
+ if ($e)
+ for (var ze = 0; ze < $e.length; ze++) {
+ var nt = $e[ze];
+ nt.to != null && V == x.line && x.ch >= nt.to || nt.from == null && V != x.line || nt.from != null && V == S.line && nt.from >= S.ch || G && !G(nt.marker) || j.push(nt.marker.parent || nt.marker);
+ }
+ ++V;
+ }), j;
+ }, getAllMarks: function() {
+ var x = [];
+ return this.iter(function(S) {
+ var G = S.markedSpans;
+ if (G)
+ for (var j = 0; j < G.length; ++j)
+ G[j].from != null && x.push(G[j].marker);
+ }), x;
+ }, posFromIndex: function(x) {
+ var S, G = this.first, j = this.lineSeparator().length;
+ return this.iter(function(V) {
+ var we = V.text.length + j;
+ if (we > x)
+ return S = x, !0;
+ x -= we, ++G;
+ }), Ro(this, pr(G, S));
+ }, indexFromPos: function(x) {
+ var S = (x = Ro(this, x)).ch;
+ if (x.line < this.first || x.ch < 0)
+ return 0;
+ var G = this.lineSeparator().length;
+ return this.iter(this.first, x.line, function(j) {
+ S += j.text.length + G;
+ }), S;
+ }, copy: function(x) {
+ var S = new MA(Bl(this, this.first, this.first + this.size), this.modeOption, this.first, this.lineSep, this.direction);
+ return S.scrollTop = this.scrollTop, S.scrollLeft = this.scrollLeft, S.sel = this.sel, S.extend = !1, x && (S.history.undoDepth = this.history.undoDepth, S.setHistory(this.getHistory())), S;
+ }, linkedDoc: function(x) {
+ x || (x = {});
+ var S = this.first, G = this.first + this.size;
+ x.from != null && x.from > S && (S = x.from), x.to != null && x.to < G && (G = x.to);
+ var j = new MA(Bl(this, S, G), x.mode || this.modeOption, S, this.lineSep, this.direction);
+ return x.sharedHist && (j.history = this.history), (this.linked || (this.linked = [])).push({ doc: j, sharedHist: x.sharedHist }), j.linked = [{ doc: this, isParent: !0, sharedHist: x.sharedHist }], s_(j, X3(this)), j;
+ }, unlinkDoc: function(x) {
+ if (x instanceof hf && (x = x.doc), this.linked) {
+ for (var S = 0; S < this.linked.length; ++S)
+ if (this.linked[S].doc == x) {
+ this.linked.splice(S, 1), x.unlinkDoc(this), c_(X3(this));
+ break;
+ }
+ }
+ if (x.history == this.history) {
+ var G = [x.id];
+ Fp(x, function(j) {
+ return G.push(j.id);
+ }, !0), x.history = new M5(null), x.history.done = X0(this.history.done, G), x.history.undone = X0(this.history.undone, G);
+ }
+ }, iterLinkedDocs: function(x) {
+ Fp(this, x);
+ }, getMode: function() {
+ return this.mode;
+ }, getEditor: function() {
+ return this.cm;
+ }, splitLines: function(x) {
+ return this.lineSep ? x.split(this.lineSep) : Ff(x);
+ }, lineSeparator: function() {
+ return this.lineSep || `
+`;
+ }, setDirection: e1(function(x) {
+ x != "rtl" && (x = "ltr"), x != this.direction && (this.direction = x, this.iter(function(S) {
+ return S.order = null;
+ }), this.cm && i_(this.cm));
+ }) }), MA.prototype.eachLine = MA.prototype.iter;
+ var Kv = 0;
+ function l_(x) {
+ var S = this;
+ if (W3(S), !ni(S, x) && !Lg(S.display, x)) {
+ as(x), v && (Kv = +/* @__PURE__ */ new Date());
+ var G = S2(S, x, !0), j = x.dataTransfer.files;
+ if (G && !S.isReadOnly())
+ if (j && j.length && window.FileReader && window.File)
+ for (var V = j.length, we = Array(V), $e = 0, ze = function() {
+ ++$e == V && q1(S, function() {
+ var Vn = { from: G = Ro(S.doc, G), to: G, text: S.doc.splitLines(we.filter(function(mr) {
+ return mr != null;
+ }).join(S.doc.lineSeparator())), origin: "paste" };
+ uw(S.doc, Vn), xC(S.doc, R2(Ro(S.doc, G), Ro(S.doc, Q2(Vn))));
+ })();
+ }, nt = function(Vn, mr) {
+ if (S.options.allowDropFileTypes && jt(S.options.allowDropFileTypes, Vn.type) == -1)
+ ze();
+ else {
+ var si = new FileReader();
+ si.onerror = function() {
+ return ze();
+ }, si.onload = function() {
+ var Mi = si.result;
+ /[\x00-\x08\x0e-\x1f]{2}/.test(Mi) || (we[mr] = Mi), ze();
+ }, si.readAsText(Vn);
+ }
+ }, at = 0; at < j.length; at++)
+ nt(j[at], at);
+ else {
+ if (S.state.draggingText && S.doc.sel.contains(G) > -1)
+ return S.state.draggingText(x), void setTimeout(function() {
+ return S.display.input.focus();
+ }, 20);
+ try {
+ var Yt = x.dataTransfer.getData("Text");
+ if (Yt) {
+ var Vt;
+ if (S.state.draggingText && !S.state.draggingText.copy && (Vt = S.listSelections()), wm(S.doc, R2(G, G)), Vt)
+ for (var Nn = 0; Nn < Vt.length; ++Nn)
+ Uv(S.doc, "", Vt[Nn].anchor, Vt[Nn].head, "drag");
+ S.replaceSelection(Yt, "around", "paste"), S.display.input.focus();
+ }
+ } catch {
+ }
+ }
+ }
+ }
+ function EC(x, S) {
+ if (v && (!x.state.draggingText || +/* @__PURE__ */ new Date() - Kv < 100))
+ cs(S);
+ else if (!ni(x, S) && !Lg(x.display, S) && (S.dataTransfer.setData("Text", x.getSelection()), S.dataTransfer.effectAllowed = "copyMove", S.dataTransfer.setDragImage && !U)) {
+ var G = Me("img", null, null, "position: fixed; left: 0; top: 0;");
+ G.src = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==", F && (G.width = G.height = 1, x.display.wrapper.appendChild(G), G._top = G.offsetTop), S.dataTransfer.setDragImage(G, 0, 0), F && G.parentNode.removeChild(G);
+ }
+ }
+ function gw(x, S) {
+ var G = S2(x, S);
+ if (G) {
+ var j = document.createDocumentFragment();
+ C5(x, G, j), x.display.dragCursor || (x.display.dragCursor = Me("div", null, "CodeMirror-cursors CodeMirror-dragcursors"), x.display.lineSpace.insertBefore(x.display.dragCursor, x.display.cursorDiv)), te(x.display.dragCursor, j);
+ }
+ }
+ function W3(x) {
+ x.display.dragCursor && (x.display.lineSpace.removeChild(x.display.dragCursor), x.display.dragCursor = null);
+ }
+ function pw(x) {
+ if (document.getElementsByClassName) {
+ for (var S = document.getElementsByClassName("CodeMirror"), G = [], j = 0; j < S.length; j++) {
+ var V = S[j].CodeMirror;
+ V && G.push(V);
+ }
+ G.length && G[0].operation(function() {
+ for (var we = 0; we < G.length; we++)
+ x(G[we]);
+ });
+ }
+ }
+ var S1 = !1;
+ function Pg() {
+ S1 || (TC(), S1 = !0);
+ }
+ function TC() {
+ var x;
+ ji(window, "resize", function() {
+ x == null && (x = setTimeout(function() {
+ x = null, pw(BC);
+ }, 100));
+ }), ji(window, "blur", function() {
+ return pw(pm);
+ });
+ }
+ function BC(x) {
+ var S = x.display;
+ S.cachedCharWidth = S.cachedTextHeight = S.cachedPaddingH = null, S.scrollbarsClipped = !1, x.setSize();
+ }
+ for (var Rg = { 3: "Pause", 8: "Backspace", 9: "Tab", 13: "Enter", 16: "Shift", 17: "Ctrl", 18: "Alt", 19: "Pause", 20: "CapsLock", 27: "Esc", 32: "Space", 33: "PageUp", 34: "PageDown", 35: "End", 36: "Home", 37: "Left", 38: "Up", 39: "Right", 40: "Down", 44: "PrintScrn", 45: "Insert", 46: "Delete", 59: ";", 61: "=", 91: "Mod", 92: "Mod", 93: "Mod", 106: "*", 107: "=", 109: "-", 110: ".", 111: "/", 145: "ScrollLock", 173: "-", 186: ";", 187: "=", 188: ",", 189: "-", 190: ".", 191: "/", 192: "`", 219: "[", 220: "\\", 221: "]", 222: "'", 224: "Mod", 63232: "Up", 63233: "Down", 63234: "Left", 63235: "Right", 63272: "Delete", 63273: "Home", 63275: "End", 63276: "PageUp", 63277: "PageDown", 63302: "Insert" }, Cb = 0; Cb < 10; Cb++)
+ Rg[Cb + 48] = Rg[Cb + 96] = String(Cb);
+ for (var V3 = 65; V3 <= 90; V3++)
+ Rg[V3] = String.fromCharCode(V3);
+ for (var mw = 1; mw <= 12; mw++)
+ Rg[mw + 111] = Rg[mw + 63235] = "F" + mw;
+ var Cm = {};
+ function u_(x) {
+ var S, G, j, V, we = x.split(/-(?!$)/);
+ x = we[we.length - 1];
+ for (var $e = 0; $e < we.length - 1; $e++) {
+ var ze = we[$e];
+ if (/^(cmd|meta|m)$/i.test(ze))
+ V = !0;
+ else if (/^a(lt)?$/i.test(ze))
+ S = !0;
+ else if (/^(c|ctrl|control)$/i.test(ze))
+ G = !0;
+ else {
+ if (!/^s(hift)?$/i.test(ze))
+ throw new Error("Unrecognized modifier name: " + ze);
+ j = !0;
+ }
+ }
+ return S && (x = "Alt-" + x), G && (x = "Ctrl-" + x), V && (x = "Cmd-" + x), j && (x = "Shift-" + x), x;
+ }
+ function SC(x) {
+ var S = {};
+ for (var G in x)
+ if (x.hasOwnProperty(G)) {
+ var j = x[G];
+ if (/^(name|fallthrough|(de|at)tach)$/.test(G))
+ continue;
+ if (j == "...") {
+ delete x[G];
+ continue;
+ }
+ for (var V = Ci(G.split(" "), u_), we = 0; we < V.length; we++) {
+ var $e = void 0, ze = void 0;
+ we == V.length - 1 ? (ze = V.join(" "), $e = j) : (ze = V.slice(0, we + 1).join(" "), $e = "...");
+ var nt = S[ze];
+ if (nt) {
+ if (nt != $e)
+ throw new Error("Inconsistent bindings for " + ze);
+ } else
+ S[ze] = $e;
+ }
+ delete x[G];
+ }
+ for (var at in S)
+ x[at] = S[at];
+ return x;
+ }
+ function H2(x, S, G, j) {
+ var V = (S = Qg(S)).call ? S.call(x, j) : S[x];
+ if (V === !1)
+ return "nothing";
+ if (V === "...")
+ return "multi";
+ if (V != null && G(V))
+ return "handled";
+ if (S.fallthrough) {
+ if (Object.prototype.toString.call(S.fallthrough) != "[object Array]")
+ return H2(x, S.fallthrough, G, j);
+ for (var we = 0; we < S.fallthrough.length; we++) {
+ var $e = H2(x, S.fallthrough[we], G, j);
+ if ($e)
+ return $e;
+ }
+ }
+ }
+ function Wk(x) {
+ var S = typeof x == "string" ? x : Rg[x.keyCode];
+ return S == "Ctrl" || S == "Alt" || S == "Shift" || S == "Mod";
+ }
+ function $5(x, S, G) {
+ var j = x;
+ return S.altKey && j != "Alt" && (x = "Alt-" + x), (ke ? S.metaKey : S.ctrlKey) && j != "Ctrl" && (x = "Ctrl-" + x), (ke ? S.ctrlKey : S.metaKey) && j != "Mod" && (x = "Cmd-" + x), !G && S.shiftKey && j != "Shift" && (x = "Shift-" + x), x;
+ }
+ function q3(x, S) {
+ if (F && x.keyCode == 34 && x.char)
+ return !1;
+ var G = Rg[x.keyCode];
+ return G != null && !x.altGraphKey && (x.keyCode == 3 && x.code && (G = x.code), $5(G, x, S));
+ }
+ function Qg(x) {
+ return typeof x == "string" ? Cm[x] : x;
+ }
+ function _b(x, S) {
+ for (var G = x.doc.sel.ranges, j = [], V = 0; V < G.length; V++) {
+ for (var we = S(G[V]); j.length && Pr(we.from, pt(j).to) <= 0; ) {
+ var $e = j.pop();
+ if (Pr($e.from, we.from) < 0) {
+ we.from = $e.from;
+ break;
+ }
+ }
+ j.push(we);
+ }
+ IA(x, function() {
+ for (var ze = j.length - 1; ze >= 0; ze--)
+ Uv(x.doc, "", j[ze].from, j[ze].to, "+delete");
+ rw(x);
+ });
+ }
+ function bw(x, S, G) {
+ var j = Gr(x.text, S + G, G);
+ return j < 0 || j > x.text.length ? null : j;
+ }
+ function vw(x, S, G) {
+ var j = bw(x, S.ch, G);
+ return j == null ? null : new pr(S.line, j, G < 0 ? "after" : "before");
+ }
+ function Vk(x, S, G, j, V) {
+ if (x) {
+ S.doc.direction == "rtl" && (V = -V);
+ var we = Jo(G, S.doc.direction);
+ if (we) {
+ var $e, ze = V < 0 ? pt(we) : we[0], nt = V < 0 == (ze.level == 1) ? "after" : "before";
+ if (ze.level > 0 || S.doc.direction == "rtl") {
+ var at = aA(S, G);
+ $e = V < 0 ? G.text.length - 1 : 0;
+ var Yt = Od(S, at, $e).top;
+ $e = An(function(Vt) {
+ return Od(S, at, Vt).top == Yt;
+ }, V < 0 == (ze.level == 1) ? ze.from : ze.to - 1, $e), nt == "before" && ($e = bw(G, $e, 1));
+ } else
+ $e = V < 0 ? ze.to : ze.from;
+ return new pr(j, $e, nt);
+ }
+ }
+ return new pr(j, V < 0 ? G.text.length : 0, V < 0 ? "before" : "after");
+ }
+ function h_(x, S, G, j) {
+ var V = Jo(S, x.doc.direction);
+ if (!V)
+ return vw(S, G, j);
+ G.ch >= S.text.length ? (G.ch = S.text.length, G.sticky = "before") : G.ch <= 0 && (G.ch = 0, G.sticky = "after");
+ var we = la(V, G.ch, G.sticky), $e = V[we];
+ if (x.doc.direction == "ltr" && $e.level % 2 == 0 && (j > 0 ? $e.to > G.ch : $e.from < G.ch))
+ return vw(S, G, j);
+ var ze, nt = function(_r, ao) {
+ return bw(S, _r instanceof pr ? _r.ch : _r, ao);
+ }, at = function(_r) {
+ return x.options.lineWrapping ? (ze = ze || aA(x, S), Am(x, S, ze, _r)) : { begin: 0, end: S.text.length };
+ }, Yt = at(G.sticky == "before" ? nt(G, -1) : G.ch);
+ if (x.doc.direction == "rtl" || $e.level == 1) {
+ var Vt = $e.level == 1 == j < 0, Nn = nt(G, Vt ? 1 : -1);
+ if (Nn != null && (Vt ? Nn <= $e.to && Nn <= Yt.end : Nn >= $e.from && Nn >= Yt.begin)) {
+ var Vn = Vt ? "before" : "after";
+ return new pr(G.line, Nn, Vn);
+ }
+ }
+ var mr = function(_r, ao, ea) {
+ for (var zi = function(hu, I1) {
+ return I1 ? new pr(G.line, nt(hu, 1), "before") : new pr(G.line, hu, "after");
+ }; _r >= 0 && _r < V.length; _r += ao) {
+ var Qo = V[_r], $a = ao > 0 == (Qo.level != 1), Ll = $a ? ea.begin : nt(ea.end, -1);
+ if (Qo.from <= Ll && Ll < Qo.to || (Ll = $a ? Qo.from : nt(Qo.to, -1), ea.begin <= Ll && Ll < ea.end))
+ return zi(Ll, $a);
+ }
+ }, si = mr(we + j, j, Yt);
+ if (si)
+ return si;
+ var Mi = j > 0 ? Yt.end : nt(Yt.begin, -1);
+ return Mi == null || j > 0 && Mi == S.text.length || !(si = mr(j > 0 ? 0 : V.length - 1, j, at(Mi))) ? null : si;
+ }
+ Cm.basic = { Left: "goCharLeft", Right: "goCharRight", Up: "goLineUp", Down: "goLineDown", End: "goLineEnd", Home: "goLineStartSmart", PageUp: "goPageUp", PageDown: "goPageDown", Delete: "delCharAfter", Backspace: "delCharBefore", "Shift-Backspace": "delCharBefore", Tab: "defaultTab", "Shift-Tab": "indentAuto", Enter: "newlineAndIndent", Insert: "toggleOverwrite", Esc: "singleSelection" }, Cm.pcDefault = { "Ctrl-A": "selectAll", "Ctrl-D": "deleteLine", "Ctrl-Z": "undo", "Shift-Ctrl-Z": "redo", "Ctrl-Y": "redo", "Ctrl-Home": "goDocStart", "Ctrl-End": "goDocEnd", "Ctrl-Up": "goLineUp", "Ctrl-Down": "goLineDown", "Ctrl-Left": "goGroupLeft", "Ctrl-Right": "goGroupRight", "Alt-Left": "goLineStart", "Alt-Right": "goLineEnd", "Ctrl-Backspace": "delGroupBefore", "Ctrl-Delete": "delGroupAfter", "Ctrl-S": "save", "Ctrl-F": "find", "Ctrl-G": "findNext", "Shift-Ctrl-G": "findPrev", "Shift-Ctrl-F": "replace", "Shift-Ctrl-R": "replaceAll", "Ctrl-[": "indentLess", "Ctrl-]": "indentMore", "Ctrl-U": "undoSelection", "Shift-Ctrl-U": "redoSelection", "Alt-U": "redoSelection", fallthrough: "basic" }, Cm.emacsy = { "Ctrl-F": "goCharRight", "Ctrl-B": "goCharLeft", "Ctrl-P": "goLineUp", "Ctrl-N": "goLineDown", "Alt-F": "goWordRight", "Alt-B": "goWordLeft", "Ctrl-A": "goLineStart", "Ctrl-E": "goLineEnd", "Ctrl-V": "goPageDown", "Shift-Ctrl-V": "goPageUp", "Ctrl-D": "delCharAfter", "Ctrl-H": "delCharBefore", "Alt-D": "delWordAfter", "Alt-Backspace": "delWordBefore", "Ctrl-K": "killLine", "Ctrl-T": "transposeChars", "Ctrl-O": "openLine" }, Cm.macDefault = { "Cmd-A": "selectAll", "Cmd-D": "deleteLine", "Cmd-Z": "undo", "Shift-Cmd-Z": "redo", "Cmd-Y": "redo", "Cmd-Home": "goDocStart", "Cmd-Up": "goDocStart", "Cmd-End": "goDocEnd", "Cmd-Down": "goDocEnd", "Alt-Left": "goGroupLeft", "Alt-Right": "goGroupRight", "Cmd-Left": "goLineLeft", "Cmd-Right": "goLineRight", "Alt-Backspace": "delGroupBefore", "Ctrl-Alt-Backspace": "delGroupAfter", "Alt-Delete": "delGroupAfter", "Cmd-S": "save", "Cmd-F": "find", "Cmd-G": "findNext", "Shift-Cmd-G": "findPrev", "Cmd-Alt-F": "replace", "Shift-Cmd-Alt-F": "replaceAll", "Cmd-[": "indentLess", "Cmd-]": "indentMore", "Cmd-Backspace": "delWrappedLineLeft", "Cmd-Delete": "delWrappedLineRight", "Cmd-U": "undoSelection", "Shift-Cmd-U": "redoSelection", "Ctrl-Up": "goDocStart", "Ctrl-Down": "goDocEnd", fallthrough: ["basic", "emacsy"] }, Cm.default = Y ? Cm.macDefault : Cm.pcDefault;
+ var j2 = { selectAll: Ng, singleSelection: function(x) {
+ return x.setSelection(x.getCursor("anchor"), x.getCursor("head"), wn);
+ }, killLine: function(x) {
+ return _b(x, function(S) {
+ if (S.empty()) {
+ var G = Ki(x.doc, S.head.line).text.length;
+ return S.head.ch == G && S.head.line < x.lastLine() ? { from: S.head, to: pr(S.head.line + 1, 0) } : { from: S.head, to: pr(S.head.line, G) };
+ }
+ return { from: S.from(), to: S.to() };
+ });
+ }, deleteLine: function(x) {
+ return _b(x, function(S) {
+ return { from: pr(S.from().line, 0), to: Ro(x.doc, pr(S.to().line + 1, 0)) };
+ });
+ }, delLineLeft: function(x) {
+ return _b(x, function(S) {
+ return { from: pr(S.from().line, 0), to: S.from() };
+ });
+ }, delWrappedLineLeft: function(x) {
+ return _b(x, function(S) {
+ var G = x.charCoords(S.head, "div").top + 5;
+ return { from: x.coordsChar({ left: 0, top: G }, "div"), to: S.from() };
+ });
+ }, delWrappedLineRight: function(x) {
+ return _b(x, function(S) {
+ var G = x.charCoords(S.head, "div").top + 5, j = x.coordsChar({ left: x.display.lineDiv.offsetWidth + 100, top: G }, "div");
+ return { from: S.from(), to: j };
+ });
+ }, undo: function(x) {
+ return x.undo();
+ }, redo: function(x) {
+ return x.redo();
+ }, undoSelection: function(x) {
+ return x.undoSelection();
+ }, redoSelection: function(x) {
+ return x.redoSelection();
+ }, goDocStart: function(x) {
+ return x.extendSelection(pr(x.firstLine(), 0));
+ }, goDocEnd: function(x) {
+ return x.extendSelection(pr(x.lastLine()));
+ }, goLineStart: function(x) {
+ return x.extendSelectionsBy(function(S) {
+ return Eb(x, S.head.line);
+ }, { origin: "+move", bias: 1 });
+ }, goLineStartSmart: function(x) {
+ return x.extendSelectionsBy(function(S) {
+ return _m(x, S.head);
+ }, { origin: "+move", bias: 1 });
+ }, goLineEnd: function(x) {
+ return x.extendSelectionsBy(function(S) {
+ return K2(x, S.head.line);
+ }, { origin: "+move", bias: -1 });
+ }, goLineRight: function(x) {
+ return x.extendSelectionsBy(function(S) {
+ var G = x.cursorCoords(S.head, "div").top + 5;
+ return x.coordsChar({ left: x.display.lineDiv.offsetWidth + 100, top: G }, "div");
+ }, ln);
+ }, goLineLeft: function(x) {
+ return x.extendSelectionsBy(function(S) {
+ var G = x.cursorCoords(S.head, "div").top + 5;
+ return x.coordsChar({ left: 0, top: G }, "div");
+ }, ln);
+ }, goLineLeftSmart: function(x) {
+ return x.extendSelectionsBy(function(S) {
+ var G = x.cursorCoords(S.head, "div").top + 5, j = x.coordsChar({ left: 0, top: G }, "div");
+ return j.ch < x.getLine(j.line).search(/\S/) ? _m(x, S.head) : j;
+ }, ln);
+ }, goLineUp: function(x) {
+ return x.moveV(-1, "line");
+ }, goLineDown: function(x) {
+ return x.moveV(1, "line");
+ }, goPageUp: function(x) {
+ return x.moveV(-1, "page");
+ }, goPageDown: function(x) {
+ return x.moveV(1, "page");
+ }, goCharLeft: function(x) {
+ return x.moveH(-1, "char");
+ }, goCharRight: function(x) {
+ return x.moveH(1, "char");
+ }, goColumnLeft: function(x) {
+ return x.moveH(-1, "column");
+ }, goColumnRight: function(x) {
+ return x.moveH(1, "column");
+ }, goWordLeft: function(x) {
+ return x.moveH(-1, "word");
+ }, goGroupRight: function(x) {
+ return x.moveH(1, "group");
+ }, goGroupLeft: function(x) {
+ return x.moveH(-1, "group");
+ }, goWordRight: function(x) {
+ return x.moveH(1, "word");
+ }, delCharBefore: function(x) {
+ return x.deleteH(-1, "codepoint");
+ }, delCharAfter: function(x) {
+ return x.deleteH(1, "char");
+ }, delWordBefore: function(x) {
+ return x.deleteH(-1, "word");
+ }, delWordAfter: function(x) {
+ return x.deleteH(1, "word");
+ }, delGroupBefore: function(x) {
+ return x.deleteH(-1, "group");
+ }, delGroupAfter: function(x) {
+ return x.deleteH(1, "group");
+ }, indentAuto: function(x) {
+ return x.indentSelection("smart");
+ }, indentMore: function(x) {
+ return x.indentSelection("add");
+ }, indentLess: function(x) {
+ return x.indentSelection("subtract");
+ }, insertTab: function(x) {
+ return x.replaceSelection(" ");
+ }, insertSoftTab: function(x) {
+ for (var S = [], G = x.listSelections(), j = x.options.tabSize, V = 0; V < G.length; V++) {
+ var we = G[V].from(), $e = kt(x.getLine(we.line), we.ch, j);
+ S.push($n(j - $e % j));
+ }
+ x.replaceSelections(S);
+ }, defaultTab: function(x) {
+ x.somethingSelected() ? x.indentSelection("add") : x.execCommand("insertTab");
+ }, transposeChars: function(x) {
+ return IA(x, function() {
+ for (var S = x.listSelections(), G = [], j = 0; j < S.length; j++)
+ if (S[j].empty()) {
+ var V = S[j].head, we = Ki(x.doc, V.line).text;
+ if (we) {
+ if (V.ch == we.length && (V = new pr(V.line, V.ch - 1)), V.ch > 0)
+ V = new pr(V.line, V.ch + 1), x.replaceRange(we.charAt(V.ch - 1) + we.charAt(V.ch - 2), pr(V.line, V.ch - 2), V, "+transpose");
+ else if (V.line > x.doc.first) {
+ var $e = Ki(x.doc, V.line - 1).text;
+ $e && (V = new pr(V.line, 1), x.replaceRange(we.charAt(0) + x.doc.lineSeparator() + $e.charAt($e.length - 1), pr(V.line - 1, $e.length - 1), V, "+transpose"));
+ }
+ }
+ G.push(new lu(V, V));
+ }
+ x.setSelections(G);
+ });
+ }, newlineAndIndent: function(x) {
+ return IA(x, function() {
+ for (var S = x.listSelections(), G = S.length - 1; G >= 0; G--)
+ x.replaceRange(x.doc.lineSeparator(), S[G].anchor, S[G].head, "+input");
+ S = x.listSelections();
+ for (var j = 0; j < S.length; j++)
+ x.indentLine(S[j].from().line, null, !0);
+ rw(x);
+ });
+ }, openLine: function(x) {
+ return x.replaceSelection(`
+`, "start");
+ }, toggleOverwrite: function(x) {
+ return x.toggleOverwrite();
+ } };
+ function Eb(x, S) {
+ var G = Ki(x.doc, S), j = iA(G);
+ return j != G && (S = mc(j)), Vk(!0, x, j, S, 1);
+ }
+ function K2(x, S) {
+ var G = Ki(x.doc, S), j = bn(G);
+ return j != G && (S = mc(j)), Vk(!0, x, G, S, -1);
+ }
+ function _m(x, S) {
+ var G = Eb(x, S.line), j = Ki(x.doc, G.line), V = Jo(j, x.doc.direction);
+ if (!V || V[0].level == 0) {
+ var we = Math.max(G.ch, j.text.search(/\S/)), $e = S.line == G.line && S.ch <= we && S.ch;
+ return pr(G.line, $e ? 0 : we, G.sticky);
+ }
+ return G;
+ }
+ function U5(x, S, G) {
+ if (typeof S == "string" && !(S = j2[S]))
+ return !1;
+ x.display.input.ensurePolled();
+ var j = x.display.shift, V = !1;
+ try {
+ x.isReadOnly() && (x.state.suppressEdits = !0), G && (x.display.shift = !1), V = S(x) != Ft;
+ } finally {
+ x.display.shift = j, x.state.suppressEdits = !1;
+ }
+ return V;
+ }
+ function H5(x, S, G) {
+ for (var j = 0; j < x.state.keyMaps.length; j++) {
+ var V = H2(S, x.state.keyMaps[j], G, x);
+ if (V)
+ return V;
+ }
+ return x.options.extraKeys && H2(S, x.options.extraKeys, G, x) || H2(S, x.options.keyMap, G, x);
+ }
+ var Y3 = new Wt();
+ function yw(x, S, G, j) {
+ var V = x.state.keySeq;
+ if (V) {
+ if (Wk(S))
+ return "handled";
+ if (/\'$/.test(S) ? x.state.keySeq = null : Y3.set(50, function() {
+ x.state.keySeq == V && (x.state.keySeq = null, x.display.input.reset());
+ }), qk(x, V + " " + S, G, j))
+ return !0;
+ }
+ return qk(x, S, G, j);
+ }
+ function qk(x, S, G, j) {
+ var V = H5(x, S, j);
+ return V == "multi" && (x.state.keySeq = S), V == "handled" && Dl(x, "keyHandled", x, S, G), V != "handled" && V != "multi" || (as(G), gb(x)), !!V;
+ }
+ function J3(x, S) {
+ var G = q3(S, !0);
+ return !!G && (S.shiftKey && !x.state.keySeq ? yw(x, "Shift-" + G, S, function(j) {
+ return U5(x, j, !0);
+ }) || yw(x, G, S, function(j) {
+ if (typeof j == "string" ? /^go[A-Z]/.test(j) : j.motion)
+ return U5(x, j);
+ }) : yw(x, G, S, function(j) {
+ return U5(x, j);
+ }));
+ }
+ function f_(x, S, G) {
+ return yw(x, "'" + G + "'", S, function(j) {
+ return U5(x, j, !0);
+ });
+ }
+ var zv = null;
+ function LC(x) {
+ var S = this;
+ if (!(x.target && x.target != S.display.input.getField() || (S.curOp.focus = Je(), ni(S, x)))) {
+ v && k < 11 && x.keyCode == 27 && (x.returnValue = !1);
+ var G = x.keyCode;
+ S.display.shift = G == 16 || x.shiftKey;
+ var j = J3(S, x);
+ F && (zv = j ? G : null, j || G != 88 || Iu || !(Y ? x.metaKey : x.ctrlKey) || S.replaceSelection("", null, "cut")), f && !Y && !j && G == 46 && x.shiftKey && !x.ctrlKey && document.execCommand && document.execCommand("cut"), G != 18 || /\bCodeMirror-crosshair\b/.test(S.display.lineDiv.className) || Vh(S);
+ }
+ }
+ function Vh(x) {
+ var S = x.display.lineDiv;
+ function G(j) {
+ j.keyCode != 18 && j.altKey || (ie(S, "CodeMirror-crosshair"), Hr(document, "keyup", G), Hr(document, "mouseover", G));
+ }
+ ot(S, "CodeMirror-crosshair"), ji(document, "keyup", G), ji(document, "mouseover", G);
+ }
+ function IC(x) {
+ x.keyCode == 16 && (this.doc.sel.shift = !1), ni(this, x);
+ }
+ function j5(x) {
+ var S = this;
+ if (!(x.target && x.target != S.display.input.getField() || Lg(S.display, x) || ni(S, x) || x.ctrlKey && !x.altKey || Y && x.metaKey)) {
+ var G = x.keyCode, j = x.charCode;
+ if (F && G == zv)
+ return zv = null, void as(x);
+ if (!F || x.which && !(x.which < 10) || !J3(S, x)) {
+ var V = String.fromCharCode(j ?? G);
+ V != "\b" && (f_(S, x, V) || S.display.input.onKeyPress(x));
+ }
+ }
+ }
+ var Dp, Np, K5 = 400, z2 = function(x, S, G) {
+ this.time = x, this.pos = S, this.button = G;
+ };
+ function $g(x, S) {
+ var G = +/* @__PURE__ */ new Date();
+ return Np && Np.compare(G, x, S) ? (Dp = Np = null, "triple") : Dp && Dp.compare(G, x, S) ? (Np = new z2(G, x, S), Dp = null, "double") : (Dp = new z2(G, x, S), Np = null, "single");
+ }
+ function Yk(x) {
+ var S = this, G = S.display;
+ if (!(ni(S, x) || G.activeTouch && G.input.supportsTouch())) {
+ if (G.input.ensurePolled(), G.shift = x.shiftKey, Lg(G, x))
+ _ || (G.scroller.draggable = !1, setTimeout(function() {
+ return G.scroller.draggable = !0;
+ }, 100));
+ else if (!G5(S, x)) {
+ var j = S2(S, x), V = ro(x), we = j ? $g(j, V) : "single";
+ window.focus(), V == 1 && S.state.selectingText && S.state.selectingText(x), j && Ug(S, V, j, we, x) || (V == 1 ? j ? FC(S, j, we, x) : xa(x) == G.scroller && as(x) : V == 2 ? (j && ym(S.doc, j), setTimeout(function() {
+ return G.input.focus();
+ }, 20)) : V == 3 && (de ? S.display.input.onContextMenu(x) : Nk(S)));
+ }
+ }
+ }
+ function Ug(x, S, G, j, V) {
+ var we = "Click";
+ return j == "double" ? we = "Double" + we : j == "triple" && (we = "Triple" + we), yw(x, $5(we = (S == 1 ? "Left" : S == 2 ? "Middle" : "Right") + we, V), V, function($e) {
+ if (typeof $e == "string" && ($e = j2[$e]), !$e)
+ return !1;
+ var ze = !1;
+ try {
+ x.isReadOnly() && (x.state.suppressEdits = !0), ze = $e(x, G) != Ft;
+ } finally {
+ x.state.suppressEdits = !1;
+ }
+ return ze;
+ });
+ }
+ function MC(x, S, G) {
+ var j = x.getOption("configureMouse"), V = j ? j(x, S, G) : {};
+ if (V.unit == null) {
+ var we = ue ? G.shiftKey && G.metaKey : G.altKey;
+ V.unit = we ? "rectangle" : S == "single" ? "char" : S == "double" ? "word" : "line";
+ }
+ return (V.extend == null || x.doc.extend) && (V.extend = x.doc.extend || G.shiftKey), V.addNew == null && (V.addNew = Y ? G.metaKey : G.ctrlKey), V.moveOnDrag == null && (V.moveOnDrag = !(Y ? G.altKey : G.ctrlKey)), V;
+ }
+ function FC(x, S, G, j) {
+ v ? setTimeout(je(pb, x), 0) : x.curOp.focus = Je();
+ var V, we = MC(x, G, j), $e = x.doc.sel;
+ x.options.dragDrop && Zo && !x.isReadOnly() && G == "single" && (V = $e.contains(S)) > -1 && (Pr((V = $e.ranges[V]).from(), S) < 0 || S.xRel > 0) && (Pr(V.to(), S) > 0 || S.xRel < 0) ? z5(x, j, S, we) : Zk(x, j, S, we);
+ }
+ function z5(x, S, G, j) {
+ var V = x.display, we = !1, $e = q1(x, function(at) {
+ _ && (V.scroller.draggable = !1), x.state.draggingText = !1, Hr(V.wrapper.ownerDocument, "mouseup", $e), Hr(V.wrapper.ownerDocument, "mousemove", ze), Hr(V.scroller, "dragstart", nt), Hr(V.scroller, "drop", $e), we || (as(at), j.addNew || ym(x.doc, G, null, null, j.extend), _ && !U || v && k == 9 ? setTimeout(function() {
+ V.wrapper.ownerDocument.body.focus({ preventScroll: !0 }), V.input.focus();
+ }, 20) : V.input.focus());
+ }), ze = function(at) {
+ we = we || Math.abs(S.clientX - at.clientX) + Math.abs(S.clientY - at.clientY) >= 10;
+ }, nt = function() {
+ return we = !0;
+ };
+ _ && (V.scroller.draggable = !0), x.state.draggingText = $e, $e.copy = !j.moveOnDrag, V.scroller.dragDrop && V.scroller.dragDrop(), ji(V.wrapper.ownerDocument, "mouseup", $e), ji(V.wrapper.ownerDocument, "mousemove", ze), ji(V.scroller, "dragstart", nt), ji(V.scroller, "drop", $e), Nk(x), setTimeout(function() {
+ return V.input.focus();
+ }, 20);
+ }
+ function Jk(x, S, G) {
+ if (G == "char")
+ return new lu(S, S);
+ if (G == "word")
+ return x.findWordAt(S);
+ if (G == "line")
+ return new lu(pr(S.line, 0), Ro(x.doc, pr(S.line + 1, 0)));
+ var j = G(x, S);
+ return new lu(j.from, j.to);
+ }
+ function Zk(x, S, G, j) {
+ var V = x.display, we = x.doc;
+ as(S);
+ var $e, ze, nt = we.sel, at = nt.ranges;
+ if (j.addNew && !j.extend ? (ze = we.sel.contains(G), $e = ze > -1 ? at[ze] : new lu(G, G)) : ($e = we.sel.primary(), ze = we.sel.primIndex), j.unit == "rectangle")
+ j.addNew || ($e = new lu(G, G)), G = S2(x, S, !0, !0), ze = -1;
+ else {
+ var Yt = Jk(x, G, j.unit);
+ $e = j.extend ? D5($e, Yt.anchor, Yt.head, j.extend) : Yt;
+ }
+ j.addNew ? ze == -1 ? (ze = at.length, bd(we, Mp(x, at.concat([$e]), ze), { scroll: !1, origin: "*mouse" })) : at.length > 1 && at[ze].empty() && j.unit == "char" && !j.extend ? (bd(we, Mp(x, at.slice(0, ze).concat(at.slice(ze + 1)), 0), { scroll: !1, origin: "*mouse" }), nt = we.sel) : wb(we, ze, $e, un) : (ze = 0, bd(we, new G0([$e], 0), un), nt = we.sel);
+ var Vt = G;
+ function Nn(ea) {
+ if (Pr(Vt, ea) != 0)
+ if (Vt = ea, j.unit == "rectangle") {
+ for (var zi = [], Qo = x.options.tabSize, $a = kt(Ki(we, G.line).text, G.ch, Qo), Ll = kt(Ki(we, ea.line).text, ea.ch, Qo), hu = Math.min($a, Ll), I1 = Math.max($a, Ll), ac = Math.min(G.line, ea.line), _f = Math.min(x.lastLine(), Math.max(G.line, ea.line)); ac <= _f; ac++) {
+ var J1 = Ki(we, ac).text, qh = an(J1, hu, Qo);
+ hu == I1 ? zi.push(new lu(pr(ac, qh), pr(ac, qh))) : J1.length > qh && zi.push(new lu(pr(ac, qh), pr(ac, an(J1, I1, Qo))));
+ }
+ zi.length || zi.push(new lu(G, G)), bd(we, Mp(x, nt.ranges.slice(0, ze).concat(zi), ze), { origin: "*mouse", scroll: !1 }), x.scrollIntoView(ea);
+ } else {
+ var Rd, oA = $e, Wu = Jk(x, ea, j.unit), Yh = oA.anchor;
+ Pr(Wu.anchor, Yh) > 0 ? (Rd = Wu.head, Yh = Sn(oA.from(), Wu.anchor)) : (Rd = Wu.anchor, Yh = wf(oA.to(), Wu.head));
+ var t1 = nt.ranges.slice(0);
+ t1[ze] = ex(x, new lu(Ro(we, Yh), Rd)), bd(we, Mp(x, t1, ze), un);
+ }
+ }
+ var Vn = V.wrapper.getBoundingClientRect(), mr = 0;
+ function si(ea) {
+ var zi = ++mr, Qo = S2(x, ea, !0, j.unit == "rectangle");
+ if (Qo)
+ if (Pr(Qo, Vt) != 0) {
+ x.curOp.focus = Je(), Nn(Qo);
+ var $a = nw(V, we);
+ (Qo.line >= $a.to || Qo.line < $a.from) && setTimeout(q1(x, function() {
+ mr == zi && si(ea);
+ }), 150);
+ } else {
+ var Ll = ea.clientY < Vn.top ? -20 : ea.clientY > Vn.bottom ? 20 : 0;
+ Ll && setTimeout(q1(x, function() {
+ mr == zi && (V.scroller.scrollTop += Ll, si(ea));
+ }), 50);
+ }
+ }
+ function Mi(ea) {
+ x.state.selectingText = !1, mr = 1 / 0, ea && (as(ea), V.input.focus()), Hr(V.wrapper.ownerDocument, "mousemove", _r), Hr(V.wrapper.ownerDocument, "mouseup", ao), we.history.lastSelOrigin = null;
+ }
+ var _r = q1(x, function(ea) {
+ ea.buttons !== 0 && ro(ea) ? si(ea) : Mi(ea);
+ }), ao = q1(x, Mi);
+ x.state.selectingText = ao, ji(V.wrapper.ownerDocument, "mousemove", _r), ji(V.wrapper.ownerDocument, "mouseup", ao);
+ }
+ function ex(x, S) {
+ var G = S.anchor, j = S.head, V = Ki(x.doc, G.line);
+ if (Pr(G, j) == 0 && G.sticky == j.sticky)
+ return S;
+ var we = Jo(V);
+ if (!we)
+ return S;
+ var $e = la(we, G.ch, G.sticky), ze = we[$e];
+ if (ze.from != G.ch && ze.to != G.ch)
+ return S;
+ var nt, at = $e + (ze.from == G.ch == (ze.level != 1) ? 0 : 1);
+ if (at == 0 || at == we.length)
+ return S;
+ if (j.line != G.line)
+ nt = (j.line - G.line) * (x.doc.direction == "ltr" ? 1 : -1) > 0;
+ else {
+ var Yt = la(we, j.ch, j.sticky), Vt = Yt - $e || (j.ch - G.ch) * (ze.level == 1 ? -1 : 1);
+ nt = Yt == at - 1 || Yt == at ? Vt < 0 : Vt > 0;
+ }
+ var Nn = we[at + (nt ? -1 : 0)], Vn = nt == (Nn.level == 1), mr = Vn ? Nn.from : Nn.to, si = Vn ? "after" : "before";
+ return G.ch == mr && G.sticky == si ? S : new lu(new pr(G.line, mr, si), j);
+ }
+ function tx(x, S, G, j) {
+ var V, we;
+ if (S.touches)
+ V = S.touches[0].clientX, we = S.touches[0].clientY;
+ else
+ try {
+ V = S.clientX, we = S.clientY;
+ } catch {
+ return !1;
+ }
+ if (V >= Math.floor(x.display.gutters.getBoundingClientRect().right))
+ return !1;
+ j && as(S);
+ var $e = x.display, ze = $e.lineDiv.getBoundingClientRect();
+ if (we > ze.bottom || !Na(x, G))
+ return So(S);
+ we -= ze.top - $e.viewOffset;
+ for (var nt = 0; nt < x.display.gutterSpecs.length; ++nt) {
+ var at = $e.gutters.childNodes[nt];
+ if (at && at.getBoundingClientRect().right >= V)
+ return Yr(x, G, x, wh(x.doc, we), x.display.gutterSpecs[nt].className, S), So(S);
+ }
+ }
+ function G5(x, S) {
+ return tx(x, S, "gutterClick", !0);
+ }
+ function ww(x, S) {
+ Lg(x.display, S) || uu(x, S) || ni(x, S, "contextmenu") || de || x.display.input.onContextMenu(S);
+ }
+ function uu(x, S) {
+ return !!Na(x, "gutterContextMenu") && tx(x, S, "gutterContextMenu", !1);
+ }
+ function Z3(x) {
+ x.display.wrapper.className = x.display.wrapper.className.replace(/\s*cm-s-\S+/g, "") + x.options.theme.replace(/(^|\s)\s*/g, " cm-s-"), BA(x);
+ }
+ z2.prototype.compare = function(x, S, G) {
+ return this.time + K5 > x && Pr(S, this.pos) == 0 && G == this.button;
+ };
+ var Em = { toString: function() {
+ return "CodeMirror.Init";
+ } }, Pl = {}, Ou = {};
+ function Po(x) {
+ var S = x.optionHandlers;
+ function G(j, V, we, $e) {
+ x.defaults[j] = V, we && (S[j] = $e ? function(ze, nt, at) {
+ at != Em && we(ze, nt, at);
+ } : we);
+ }
+ x.defineOption = G, x.Init = Em, G("value", "", function(j, V) {
+ return j.setValue(V);
+ }, !0), G("mode", null, function(j, V) {
+ j.doc.modeOption = V, I5(j);
+ }, !0), G("indentUnit", 2, I5, !0), G("indentWithTabs", !1), G("smartIndent", !0), G("tabSize", 4, function(j) {
+ wa(j), BA(j), pd(j);
+ }, !0), G("lineSeparator", null, function(j, V) {
+ if (j.doc.lineSep = V, V) {
+ var we = [], $e = j.doc.first;
+ j.doc.iter(function(nt) {
+ for (var at = 0; ; ) {
+ var Yt = nt.text.indexOf(V, at);
+ if (Yt == -1)
+ break;
+ at = Yt + V.length, we.push(pr($e, Yt));
+ }
+ $e++;
+ });
+ for (var ze = we.length - 1; ze >= 0; ze--)
+ Uv(j.doc, V, we[ze], pr(we[ze].line, we[ze].ch + V.length));
+ }
+ }), G("specialChars", /[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g, function(j, V, we) {
+ j.state.specialChars = new RegExp(V.source + (V.test(" ") ? "" : "| "), "g"), we != Em && j.refresh();
+ }), G("specialCharPlaceholder", ic, function(j) {
+ return j.refresh();
+ }, !0), G("electricChars", !0), G("inputStyle", he ? "contenteditable" : "textarea", function() {
+ throw new Error("inputStyle can not (yet) be changed in a running editor");
+ }, !0), G("spellcheck", !1, function(j, V) {
+ return j.getInputField().spellcheck = V;
+ }, !0), G("autocorrect", !1, function(j, V) {
+ return j.getInputField().autocorrect = V;
+ }, !0), G("autocapitalize", !1, function(j, V) {
+ return j.getInputField().autocapitalize = V;
+ }, !0), G("rtlMoveVisually", !le), G("wholeLineUpdateBefore", !0), G("theme", "default", function(j) {
+ Z3(j), vb(j);
+ }, !0), G("keyMap", "default", function(j, V, we) {
+ var $e = Qg(V), ze = we != Em && Qg(we);
+ ze && ze.detach && ze.detach(j, $e), $e.attach && $e.attach(j, ze || null);
+ }), G("extraKeys", null), G("configureMouse", null), G("lineWrapping", !1, d_, !0), G("gutters", [], function(j, V) {
+ j.display.gutterSpecs = S5(V, j.options.lineNumbers), vb(j);
+ }, !0), G("fixedGutter", !0, function(j, V) {
+ j.display.gutters.style.left = V ? B2(j.display) + "px" : "0", j.refresh();
+ }, !0), G("coverGutterNextToScrollbar", !1, function(j) {
+ return mm(j);
+ }, !0), G("scrollbarStyle", "native", function(j) {
+ D2(j), mm(j), j.display.scrollbars.setScrollTop(j.doc.scrollTop), j.display.scrollbars.setScrollLeft(j.doc.scrollLeft);
+ }, !0), G("lineNumbers", !1, function(j, V) {
+ j.display.gutterSpecs = S5(j.options.gutters, V), vb(j);
+ }, !0), G("firstLineNumber", 1, vb, !0), G("lineNumberFormatter", function(j) {
+ return j;
+ }, vb, !0), G("showCursorWhenSelecting", !1, I2, !0), G("resetSelectionOnContextMenu", !0), G("lineWiseCopyCut", !0), G("pasteLinesPerSelection", !0), G("selectionsMayTouch", !1), G("readOnly", !1, function(j, V) {
+ V == "nocursor" && (pm(j), j.display.input.blur()), j.display.input.readOnlyChanged(V);
+ }), G("screenReaderLabel", null, function(j, V) {
+ V = V === "" ? null : V, j.display.input.screenReaderLabelChanged(V);
+ }), G("disableInput", !1, function(j, V) {
+ V || j.display.input.reset();
+ }, !0), G("dragDrop", !0, X5), G("allowDropFileTypes", null), G("cursorBlinkRate", 530), G("cursorScrollMargin", 0), G("cursorHeight", 1, I2, !0), G("singleCursorHeightPerLine", !0, I2, !0), G("workTime", 100), G("workDelay", 100), G("flattenSpans", !0, wa, !0), G("addModeClass", !1, wa, !0), G("pollInterval", 100), G("undoDepth", 200, function(j, V) {
+ return j.doc.history.undoDepth = V;
+ }), G("historyEventDelay", 1250), G("viewportMargin", 10, function(j) {
+ return j.refresh();
+ }, !0), G("maxHighlightLength", 1e4, wa, !0), G("moveInputWithCursor", !0, function(j, V) {
+ V || j.display.input.resetPosition();
+ }), G("tabindex", null, function(j, V) {
+ return j.display.input.getField().tabIndex = V || "";
+ }), G("autofocus", null), G("direction", "ltr", function(j, V) {
+ return j.doc.setDirection(V);
+ }, !0), G("phrases", null);
+ }
+ function X5(x, S, G) {
+ if (!S != !(G && G != Em)) {
+ var j = x.display.dragFunctions, V = S ? ji : Hr;
+ V(x.display.scroller, "dragstart", j.start), V(x.display.scroller, "dragenter", j.enter), V(x.display.scroller, "dragover", j.over), V(x.display.scroller, "dragleave", j.leave), V(x.display.scroller, "drop", j.drop);
+ }
+ }
+ function d_(x) {
+ x.options.lineWrapping ? (ot(x.display.wrapper, "CodeMirror-wrap"), x.display.sizer.style.minWidth = "", x.display.sizerWidth = null) : (ie(x.display.wrapper, "CodeMirror-wrap"), s0(x)), Ab(x), pd(x), BA(x), setTimeout(function() {
+ return mm(x);
+ }, 100);
+ }
+ function hf(x, S) {
+ var G = this;
+ if (!(this instanceof hf))
+ return new hf(x, S);
+ this.options = S = S ? Qe(S) : {}, Qe(Pl, S, !1);
+ var j = S.value;
+ typeof j == "string" ? j = new MA(j, S.mode, null, S.lineSeparator, S.direction) : S.mode && (j.modeOption = S.mode), this.doc = j;
+ var V = new hf.inputStyles[S.inputStyle](this), we = this.display = new t_(x, j, V, S);
+ for (var $e in we.wrapper.CodeMirror = this, Z3(this), S.lineWrapping && (this.display.wrapper.className += " CodeMirror-wrap"), D2(this), this.state = { keyMaps: [], overlays: [], modeGen: 0, overwrite: !1, delayingBlurEvent: !1, focused: !1, suppressEdits: !1, pasteIncoming: -1, cutIncoming: -1, selectingText: !1, draggingText: !1, highlight: new Wt(), keySeq: null, specialChars: null }, S.autofocus && !he && we.input.focus(), v && k < 11 && setTimeout(function() {
+ return G.display.input.reset(!0);
+ }, 20), kw(this), Pg(), mb(this), this.curOp.forceUpdate = !0, U3(this, j), S.autofocus && !he || this.hasFocus() ? setTimeout(function() {
+ G.hasFocus() && !G.state.focused && ew(G);
+ }, 20) : pm(this), Ou)
+ Ou.hasOwnProperty($e) && Ou[$e](this, S[$e], Em);
+ Dg(this), S.finishInit && S.finishInit(this);
+ for (var ze = 0; ze < Tb.length; ++ze)
+ Tb[ze](this);
+ bb(this), _ && S.lineWrapping && getComputedStyle(we.lineDiv).textRendering == "optimizelegibility" && (we.lineDiv.style.textRendering = "auto");
+ }
+ function kw(x) {
+ var S = x.display;
+ ji(S.scroller, "mousedown", q1(x, Yk)), ji(S.scroller, "dblclick", v && k < 11 ? q1(x, function(nt) {
+ if (!ni(x, nt)) {
+ var at = S2(x, nt);
+ if (at && !G5(x, nt) && !Lg(x.display, nt)) {
+ as(nt);
+ var Yt = x.findWordAt(at);
+ ym(x.doc, Yt.anchor, Yt.head);
+ }
+ }
+ }) : function(nt) {
+ return ni(x, nt) || as(nt);
+ }), ji(S.scroller, "contextmenu", function(nt) {
+ return ww(x, nt);
+ }), ji(S.input.getField(), "contextmenu", function(nt) {
+ S.scroller.contains(nt.target) || ww(x, nt);
+ });
+ var G, j = { end: 0 };
+ function V() {
+ S.activeTouch && (G = setTimeout(function() {
+ return S.activeTouch = null;
+ }, 1e3), (j = S.activeTouch).end = +/* @__PURE__ */ new Date());
+ }
+ function we(nt) {
+ if (nt.touches.length != 1)
+ return !1;
+ var at = nt.touches[0];
+ return at.radiusX <= 1 && at.radiusY <= 1;
+ }
+ function $e(nt, at) {
+ if (at.left == null)
+ return !0;
+ var Yt = at.left - nt.left, Vt = at.top - nt.top;
+ return Yt * Yt + Vt * Vt > 400;
+ }
+ ji(S.scroller, "touchstart", function(nt) {
+ if (!ni(x, nt) && !we(nt) && !G5(x, nt)) {
+ S.input.ensurePolled(), clearTimeout(G);
+ var at = +/* @__PURE__ */ new Date();
+ S.activeTouch = { start: at, moved: !1, prev: at - j.end <= 300 ? j : null }, nt.touches.length == 1 && (S.activeTouch.left = nt.touches[0].pageX, S.activeTouch.top = nt.touches[0].pageY);
+ }
+ }), ji(S.scroller, "touchmove", function() {
+ S.activeTouch && (S.activeTouch.moved = !0);
+ }), ji(S.scroller, "touchend", function(nt) {
+ var at = S.activeTouch;
+ if (at && !Lg(S, nt) && at.left != null && !at.moved && /* @__PURE__ */ new Date() - at.start < 300) {
+ var Yt, Vt = x.coordsChar(S.activeTouch, "page");
+ Yt = !at.prev || $e(at, at.prev) ? new lu(Vt, Vt) : !at.prev.prev || $e(at, at.prev.prev) ? x.findWordAt(Vt) : new lu(pr(Vt.line, 0), Ro(x.doc, pr(Vt.line + 1, 0))), x.setSelection(Yt.anchor, Yt.head), x.focus(), as(nt);
+ }
+ V();
+ }), ji(S.scroller, "touchcancel", V), ji(S.scroller, "scroll", function() {
+ S.scroller.clientHeight && (Dv(x, S.scroller.scrollTop), Nv(x, S.scroller.scrollLeft, !0), Yr(x, "scroll", x));
+ }), ji(S.scroller, "mousewheel", function(nt) {
+ return jk(x, nt);
+ }), ji(S.scroller, "DOMMouseScroll", function(nt) {
+ return jk(x, nt);
+ }), ji(S.wrapper, "scroll", function() {
+ return S.wrapper.scrollTop = S.wrapper.scrollLeft = 0;
+ }), S.dragFunctions = { enter: function(nt) {
+ ni(x, nt) || cs(nt);
+ }, over: function(nt) {
+ ni(x, nt) || (gw(x, nt), cs(nt));
+ }, start: function(nt) {
+ return EC(x, nt);
+ }, drop: q1(x, l_), leave: function(nt) {
+ ni(x, nt) || W3(x);
+ } };
+ var ze = S.input.getField();
+ ji(ze, "keyup", function(nt) {
+ return IC.call(x, nt);
+ }), ji(ze, "keydown", q1(x, LC)), ji(ze, "keypress", q1(x, j5)), ji(ze, "focus", function(nt) {
+ return ew(x, nt);
+ }), ji(ze, "blur", function(nt) {
+ return pm(x, nt);
+ });
+ }
+ hf.defaults = Pl, hf.optionHandlers = Ou;
+ var Tb = [];
+ function xu(x, S, G, j) {
+ var V, we = x.doc;
+ G == null && (G = "add"), G == "smart" && (we.mode.indent ? V = ya(x, S).state : G = "prev");
+ var $e = x.options.tabSize, ze = Ki(we, S), nt = kt(ze.text, null, $e);
+ ze.stateAfter && (ze.stateAfter = null);
+ var at, Yt = ze.text.match(/^\s*/)[0];
+ if (j || /\S/.test(ze.text)) {
+ if (G == "smart" && ((at = we.mode.indent(V, ze.text.slice(Yt.length), ze.text)) == Ft || at > 150)) {
+ if (!j)
+ return;
+ G = "prev";
+ }
+ } else
+ at = 0, G = "not";
+ G == "prev" ? at = S > we.first ? kt(Ki(we, S - 1).text, null, $e) : 0 : G == "add" ? at = nt + x.options.indentUnit : G == "subtract" ? at = nt - x.options.indentUnit : typeof G == "number" && (at = nt + G), at = Math.max(0, at);
+ var Vt = "", Nn = 0;
+ if (x.options.indentWithTabs)
+ for (var Vn = Math.floor(at / $e); Vn; --Vn)
+ Nn += $e, Vt += " ";
+ if (Nn < at && (Vt += $n(at - Nn)), Vt != Yt)
+ return Uv(we, Vt, pr(S, 0), pr(S, Yt.length), "+input"), ze.stateAfter = null, !0;
+ for (var mr = 0; mr < we.sel.ranges.length; mr++) {
+ var si = we.sel.ranges[mr];
+ if (si.head.line == S && si.head.ch < Yt.length) {
+ var Mi = pr(S, Yt.length);
+ wb(we, mr, new lu(Mi, Mi));
+ break;
+ }
+ }
+ }
+ hf.defineInitHook = function(x) {
+ return Tb.push(x);
+ };
+ var Y1 = null;
+ function In(x) {
+ Y1 = x;
+ }
+ function Tm(x, S, G, j, V) {
+ var we = x.doc;
+ x.display.shift = !1, j || (j = we.sel);
+ var $e = +/* @__PURE__ */ new Date() - 200, ze = V == "paste" || x.state.pasteIncoming > $e, nt = Ff(S), at = null;
+ if (ze && j.ranges.length > 1)
+ if (Y1 && Y1.text.join(`
+`) == S) {
+ if (j.ranges.length % Y1.text.length == 0) {
+ at = [];
+ for (var Yt = 0; Yt < Y1.text.length; Yt++)
+ at.push(we.splitLines(Y1.text[Yt]));
+ }
+ } else
+ nt.length == j.ranges.length && x.options.pasteLinesPerSelection && (at = Ci(nt, function(_r) {
+ return [_r];
+ }));
+ for (var Vt = x.curOp.updateInput, Nn = j.ranges.length - 1; Nn >= 0; Nn--) {
+ var Vn = j.ranges[Nn], mr = Vn.from(), si = Vn.to();
+ Vn.empty() && (G && G > 0 ? mr = pr(mr.line, mr.ch - G) : x.state.overwrite && !ze ? si = pr(si.line, Math.min(Ki(we, si.line).text.length, si.ch + pt(nt).length)) : ze && Y1 && Y1.lineWise && Y1.text.join(`
+`) == nt.join(`
+`) && (mr = si = pr(mr.line, 0)));
+ var Mi = { from: mr, to: si, text: at ? at[Nn % at.length] : nt, origin: V || (ze ? "paste" : x.state.cutIncoming > $e ? "cut" : "+input") };
+ uw(x.doc, Mi), Dl(x, "inputRead", x, Mi);
+ }
+ S && !ze && xw(x, S), rw(x), x.curOp.updateInput < 2 && (x.curOp.updateInput = Vt), x.curOp.typing = !0, x.state.pasteIncoming = x.state.cutIncoming = -1;
+ }
+ function Bb(x, S) {
+ var G = x.clipboardData && x.clipboardData.getData("Text");
+ if (G)
+ return x.preventDefault(), S.isReadOnly() || S.options.disableInput || IA(S, function() {
+ return Tm(S, G, 0, null, "paste");
+ }), !0;
+ }
+ function xw(x, S) {
+ if (x.options.electricChars && x.options.smartIndent)
+ for (var G = x.doc.sel, j = G.ranges.length - 1; j >= 0; j--) {
+ var V = G.ranges[j];
+ if (!(V.head.ch > 100 || j && G.ranges[j - 1].head.line == V.head.line)) {
+ var we = x.getModeAt(V.head), $e = !1;
+ if (we.electricChars) {
+ for (var ze = 0; ze < we.electricChars.length; ze++)
+ if (S.indexOf(we.electricChars.charAt(ze)) > -1) {
+ $e = xu(x, V.head.line, "smart");
+ break;
+ }
+ } else
+ we.electricInput && we.electricInput.test(Ki(x.doc, V.head.line).text.slice(0, V.head.ch)) && ($e = xu(x, V.head.line, "smart"));
+ $e && Dl(x, "electricInput", x, V.head.line);
+ }
+ }
+ }
+ function f1(x) {
+ for (var S = [], G = [], j = 0; j < x.doc.sel.ranges.length; j++) {
+ var V = x.doc.sel.ranges[j].head.line, we = { anchor: pr(V, 0), head: pr(V + 1, 0) };
+ G.push(we), S.push(x.getRange(we.anchor, we.head));
+ }
+ return { text: S, ranges: G };
+ }
+ function L1(x, S, G, j) {
+ x.setAttribute("autocorrect", G ? "" : "off"), x.setAttribute("autocapitalize", j ? "" : "off"), x.setAttribute("spellcheck", !!S);
+ }
+ function nx() {
+ var x = Me("textarea", null, null, "position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"), S = Me("div", [x], null, "overflow: hidden; position: relative; width: 3px; height: 0px;");
+ return _ ? x.style.width = "1000px" : x.setAttribute("wrap", "off"), R && (x.style.border = "1px solid black"), L1(x), S;
+ }
+ function W5(x) {
+ var S = x.optionHandlers, G = x.helpers = {};
+ x.prototype = { constructor: x, focus: function() {
+ window.focus(), this.display.input.focus();
+ }, setOption: function(j, V) {
+ var we = this.options, $e = we[j];
+ we[j] == V && j != "mode" || (we[j] = V, S.hasOwnProperty(j) && q1(this, S[j])(this, V, $e), Yr(this, "optionChange", this, j));
+ }, getOption: function(j) {
+ return this.options[j];
+ }, getDoc: function() {
+ return this.doc;
+ }, addKeyMap: function(j, V) {
+ this.state.keyMaps[V ? "push" : "unshift"](Qg(j));
+ }, removeKeyMap: function(j) {
+ for (var V = this.state.keyMaps, we = 0; we < V.length; ++we)
+ if (V[we] == j || V[we].name == j)
+ return V.splice(we, 1), !0;
+ }, addOverlay: Pd(function(j, V) {
+ var we = j.token ? j : x.getMode(this.options, j);
+ if (we.startState)
+ throw new Error("Overlays may not be stateful.");
+ ut(this.state.overlays, { mode: we, modeSpec: j, opaque: V && V.opaque, priority: V && V.priority || 0 }, function($e) {
+ return $e.priority;
+ }), this.state.modeGen++, pd(this);
+ }), removeOverlay: Pd(function(j) {
+ for (var V = this.state.overlays, we = 0; we < V.length; ++we) {
+ var $e = V[we].modeSpec;
+ if ($e == j || typeof j == "string" && $e.name == j)
+ return V.splice(we, 1), this.state.modeGen++, void pd(this);
+ }
+ }), indentLine: Pd(function(j, V, we) {
+ typeof V != "string" && typeof V != "number" && (V = V == null ? this.options.smartIndent ? "smart" : "prev" : V ? "add" : "subtract"), ra(this.doc, j) && xu(this, j, V, we);
+ }), indentSelection: Pd(function(j) {
+ for (var V = this.doc.sel.ranges, we = -1, $e = 0; $e < V.length; $e++) {
+ var ze = V[$e];
+ if (ze.empty())
+ ze.head.line > we && (xu(this, ze.head.line, j, !0), we = ze.head.line, $e == this.doc.sel.primIndex && rw(this));
+ else {
+ var nt = ze.from(), at = ze.to(), Yt = Math.max(we, nt.line);
+ we = Math.min(this.lastLine(), at.line - (at.ch ? 0 : 1)) + 1;
+ for (var Vt = Yt; Vt < we; ++Vt)
+ xu(this, Vt, j);
+ var Nn = this.doc.sel.ranges;
+ nt.ch == 0 && V.length == Nn.length && Nn[$e].from().ch > 0 && wb(this.doc, $e, new lu(nt, Nn[$e].to()), wn);
+ }
+ }
+ }), getTokenAt: function(j, V) {
+ return Mu(this, j, V);
+ }, getLineTokens: function(j, V) {
+ return Mu(this, pr(j), V, !0);
+ }, getTokenTypeAt: function(j) {
+ j = Ro(this.doc, j);
+ var V, we = Aa(this, Ki(this.doc, j.line)), $e = 0, ze = (we.length - 1) / 2, nt = j.ch;
+ if (nt == 0)
+ V = we[2];
+ else
+ for (; ; ) {
+ var at = $e + ze >> 1;
+ if ((at ? we[2 * at - 1] : 0) >= nt)
+ ze = at;
+ else {
+ if (!(we[2 * at + 1] < nt)) {
+ V = we[2 * at + 2];
+ break;
+ }
+ $e = at + 1;
+ }
+ }
+ var Yt = V ? V.indexOf("overlay ") : -1;
+ return Yt < 0 ? V : Yt == 0 ? null : V.slice(0, Yt - 1);
+ }, getModeAt: function(j) {
+ var V = this.doc.mode;
+ return V.innerMode ? x.innerMode(V, this.getTokenAt(j).state).mode : V;
+ }, getHelper: function(j, V) {
+ return this.getHelpers(j, V)[0];
+ }, getHelpers: function(j, V) {
+ var we = [];
+ if (!G.hasOwnProperty(V))
+ return we;
+ var $e = G[V], ze = this.getModeAt(j);
+ if (typeof ze[V] == "string")
+ $e[ze[V]] && we.push($e[ze[V]]);
+ else if (ze[V])
+ for (var nt = 0; nt < ze[V].length; nt++) {
+ var at = $e[ze[V][nt]];
+ at && we.push(at);
+ }
+ else
+ ze.helperType && $e[ze.helperType] ? we.push($e[ze.helperType]) : $e[ze.name] && we.push($e[ze.name]);
+ for (var Yt = 0; Yt < $e._global.length; Yt++) {
+ var Vt = $e._global[Yt];
+ Vt.pred(ze, this) && jt(we, Vt.val) == -1 && we.push(Vt.val);
+ }
+ return we;
+ }, getStateAfter: function(j, V) {
+ var we = this.doc;
+ return ya(this, (j = Nc(we, j ?? we.first + we.size - 1)) + 1, V).state;
+ }, cursorCoords: function(j, V) {
+ var we = this.doc.sel.primary();
+ return Wh(this, j == null ? we.head : typeof j == "object" ? Ro(this.doc, j) : j ? we.from() : we.to(), V || "page");
+ }, charCoords: function(j, V) {
+ return I3(this, Ro(this.doc, j), V || "page");
+ }, coordsChar: function(j, V) {
+ return SA(this, (j = Ok(this, j, V || "page")).left, j.top);
+ }, lineAtHeight: function(j, V) {
+ return j = Ok(this, { top: j, left: 0 }, V || "page").top, wh(this.doc, j + this.display.viewOffset);
+ }, heightAtLine: function(j, V, we) {
+ var $e, ze = !1;
+ if (typeof j == "number") {
+ var nt = this.doc.first + this.doc.size - 1;
+ j < this.doc.first ? j = this.doc.first : j > nt && (j = nt, ze = !0), $e = Ki(this.doc, j);
+ } else
+ $e = j;
+ return Jy(this, $e, { top: 0, left: 0 }, V || "page", we || ze).top + (ze ? this.doc.height - uf($e) : 0);
+ }, defaultTextHeight: function() {
+ return T2(this.display);
+ }, defaultCharWidth: function() {
+ return Nd(this.display);
+ }, getViewport: function() {
+ return { from: this.display.viewFrom, to: this.display.viewTo };
+ }, addWidget: function(j, V, we, $e, ze) {
+ var nt = this.display, at = (j = Wh(this, Ro(this.doc, j))).bottom, Yt = j.left;
+ if (V.style.position = "absolute", V.setAttribute("cm-ignore-events", "true"), this.display.input.setUneditable(V), nt.sizer.appendChild(V), $e == "over")
+ at = j.top;
+ else if ($e == "above" || $e == "near") {
+ var Vt = Math.max(nt.wrapper.clientHeight, this.doc.height), Nn = Math.max(nt.sizer.clientWidth, nt.lineSpace.clientWidth);
+ ($e == "above" || j.bottom + V.offsetHeight > Vt) && j.top > V.offsetHeight ? at = j.top - V.offsetHeight : j.bottom + V.offsetHeight <= Vt && (at = j.bottom), Yt + V.offsetWidth > Nn && (Yt = Nn - V.offsetWidth);
+ }
+ V.style.top = at + "px", V.style.left = V.style.right = "", ze == "right" ? (Yt = nt.sizer.clientWidth - V.offsetWidth, V.style.right = "0px") : (ze == "left" ? Yt = 0 : ze == "middle" && (Yt = (nt.sizer.clientWidth - V.offsetWidth) / 2), V.style.left = Yt + "px"), we && gC(this, { left: Yt, top: at, right: Yt + V.offsetWidth, bottom: at + V.offsetHeight });
+ }, triggerOnKeyDown: Pd(LC), triggerOnKeyPress: Pd(j5), triggerOnKeyUp: IC, triggerOnMouseDown: Pd(Yk), execCommand: function(j) {
+ if (j2.hasOwnProperty(j))
+ return j2[j].call(null, this);
+ }, triggerElectric: Pd(function(j) {
+ xw(this, j);
+ }), findPosH: function(j, V, we, $e) {
+ var ze = 1;
+ V < 0 && (ze = -1, V = -V);
+ for (var nt = Ro(this.doc, j), at = 0; at < V && !(nt = G2(this.doc, nt, ze, we, $e)).hitSide; ++at)
+ ;
+ return nt;
+ }, moveH: Pd(function(j, V) {
+ var we = this;
+ this.extendSelectionsBy(function($e) {
+ return we.display.shift || we.doc.extend || $e.empty() ? G2(we.doc, $e.head, j, V, we.options.rtlMoveVisually) : j < 0 ? $e.from() : $e.to();
+ }, ln);
+ }), deleteH: Pd(function(j, V) {
+ var we = this.doc.sel, $e = this.doc;
+ we.somethingSelected() ? $e.replaceSelection("", null, "+delete") : _b(this, function(ze) {
+ var nt = G2($e, ze.head, j, V, !1);
+ return j < 0 ? { from: nt, to: ze.head } : { from: ze.head, to: nt };
+ });
+ }), findPosV: function(j, V, we, $e) {
+ var ze = 1, nt = $e;
+ V < 0 && (ze = -1, V = -V);
+ for (var at = Ro(this.doc, j), Yt = 0; Yt < V; ++Yt) {
+ var Vt = Wh(this, at, "div");
+ if (nt == null ? nt = Vt.left : Vt.left = nt, (at = d1(this, Vt, ze, we)).hitSide)
+ break;
+ }
+ return at;
+ }, moveV: Pd(function(j, V) {
+ var we = this, $e = this.doc, ze = [], nt = !this.display.shift && !$e.extend && $e.sel.somethingSelected();
+ if ($e.extendSelectionsBy(function(Yt) {
+ if (nt)
+ return j < 0 ? Yt.from() : Yt.to();
+ var Vt = Wh(we, Yt.head, "div");
+ Yt.goalColumn != null && (Vt.left = Yt.goalColumn), ze.push(Vt.left);
+ var Nn = d1(we, Vt, j, V);
+ return V == "page" && Yt == $e.sel.primary() && E5(we, I3(we, Nn, "div").top - Vt.top), Nn;
+ }, ln), ze.length)
+ for (var at = 0; at < $e.sel.ranges.length; at++)
+ $e.sel.ranges[at].goalColumn = ze[at];
+ }), findWordAt: function(j) {
+ var V = Ki(this.doc, j.line).text, we = j.ch, $e = j.ch;
+ if (V) {
+ var ze = this.getHelper(j, "wordChars");
+ j.sticky != "before" && $e != V.length || !we ? ++$e : --we;
+ for (var nt = V.charAt(we), at = Si(nt, ze) ? function(Yt) {
+ return Si(Yt, ze);
+ } : /\s/.test(nt) ? function(Yt) {
+ return /\s/.test(Yt);
+ } : function(Yt) {
+ return !/\s/.test(Yt) && !Si(Yt);
+ }; we > 0 && at(V.charAt(we - 1)); )
+ --we;
+ for (; $e < V.length && at(V.charAt($e)); )
+ ++$e;
+ }
+ return new lu(pr(j.line, we), pr(j.line, $e));
+ }, toggleOverwrite: function(j) {
+ j != null && j == this.state.overwrite || ((this.state.overwrite = !this.state.overwrite) ? ot(this.display.cursorDiv, "CodeMirror-overwrite") : ie(this.display.cursorDiv, "CodeMirror-overwrite"), Yr(this, "overwriteToggle", this, this.state.overwrite));
+ }, hasFocus: function() {
+ return this.display.input.getField() == Je();
+ }, isReadOnly: function() {
+ return !(!this.options.readOnly && !this.doc.cantEdit);
+ }, scrollTo: Pd(function(j, V) {
+ D3(this, j, V);
+ }), getScrollInfo: function() {
+ var j = this.display.scroller;
+ return { left: j.scrollLeft, top: j.scrollTop, height: j.scrollHeight - Sp(this) - this.display.barHeight, width: j.scrollWidth - Sp(this) - this.display.barWidth, clientHeight: S3(this), clientWidth: _2(this) };
+ }, scrollIntoView: Pd(function(j, V) {
+ j == null ? (j = { from: this.doc.sel.primary().head, to: null }, V == null && (V = this.options.cursorScrollMargin)) : typeof j == "number" ? j = { from: pr(j, 0), to: null } : j.from == null && (j = { from: j, to: null }), j.to || (j.to = j.from), j.margin = V || 0, j.from.line != null ? pC(this, j) : Pk(this, j.from, j.to, j.margin);
+ }), setSize: Pd(function(j, V) {
+ var we = this, $e = function(nt) {
+ return typeof nt == "number" || /^\d+$/.test(String(nt)) ? nt + "px" : nt;
+ };
+ j != null && (this.display.wrapper.style.width = $e(j)), V != null && (this.display.wrapper.style.height = $e(V)), this.options.lineWrapping && B1(this);
+ var ze = this.display.viewFrom;
+ this.doc.iter(ze, this.display.viewTo, function(nt) {
+ if (nt.widgets) {
+ for (var at = 0; at < nt.widgets.length; at++)
+ if (nt.widgets[at].noHScroll) {
+ L2(we, ze, "widget");
+ break;
+ }
+ }
+ ++ze;
+ }), this.curOp.forceUpdate = !0, Yr(this, "refresh", this);
+ }), operation: function(j) {
+ return IA(this, j);
+ }, startOperation: function() {
+ return mb(this);
+ }, endOperation: function() {
+ return bb(this);
+ }, refresh: Pd(function() {
+ var j = this.display.cachedTextHeight;
+ pd(this), this.curOp.forceUpdate = !0, BA(this), D3(this, this.doc.scrollLeft, this.doc.scrollTop), Uk(this.display), (j == null || Math.abs(j - T2(this.display)) > 0.5 || this.options.lineWrapping) && Ab(this), Yr(this, "refresh", this);
+ }), swapDoc: Pd(function(j) {
+ var V = this.doc;
+ return V.cm = null, this.state.selectingText && this.state.selectingText(), U3(this, j), BA(this), this.display.input.reset(), D3(this, j.scrollLeft, j.scrollTop), this.curOp.forceScroll = !0, Dl(this, "swapDoc", this, V), V;
+ }), phrase: function(j) {
+ var V = this.options.phrases;
+ return V && Object.prototype.hasOwnProperty.call(V, j) ? V[j] : j;
+ }, getInputField: function() {
+ return this.display.input.getField();
+ }, getWrapperElement: function() {
+ return this.display.wrapper;
+ }, getScrollerElement: function() {
+ return this.display.scroller;
+ }, getGutterElement: function() {
+ return this.display.gutters;
+ } }, er(x), x.registerHelper = function(j, V, we) {
+ G.hasOwnProperty(j) || (G[j] = x[j] = { _global: [] }), G[j][V] = we;
+ }, x.registerGlobalHelper = function(j, V, we, $e) {
+ x.registerHelper(j, V, $e), G[j]._global.push({ pred: we, val: $e });
+ };
+ }
+ function G2(x, S, G, j, V) {
+ var we = S, $e = G, ze = Ki(x, S.line), nt = V && x.direction == "rtl" ? -G : G;
+ function at() {
+ var ao = S.line + nt;
+ return !(ao < x.first || ao >= x.first + x.size) && (S = new pr(ao, S.ch, S.sticky), ze = Ki(x, ao));
+ }
+ function Yt(ao) {
+ var ea;
+ if (j == "codepoint") {
+ var zi = ze.text.charCodeAt(S.ch + (j > 0 ? 0 : -1));
+ ea = isNaN(zi) ? null : new pr(S.line, Math.max(0, Math.min(ze.text.length, S.ch + G * (zi >= 55296 && zi < 56320 ? 2 : 1))), -G);
+ } else
+ ea = V ? h_(x.cm, ze, S, G) : vw(ze, S, G);
+ if (ea == null) {
+ if (ao || !at())
+ return !1;
+ S = Vk(V, x.cm, ze, S.line, nt);
+ } else
+ S = ea;
+ return !0;
+ }
+ if (j == "char" || j == "codepoint")
+ Yt();
+ else if (j == "column")
+ Yt(!0);
+ else if (j == "word" || j == "group")
+ for (var Vt = null, Nn = j == "group", Vn = x.cm && x.cm.getHelper(S, "wordChars"), mr = !0; !(G < 0) || Yt(!mr); mr = !1) {
+ var si = ze.text.charAt(S.ch) || `
+`, Mi = Si(si, Vn) ? "w" : Nn && si == `
+` ? "n" : !Nn || /\s/.test(si) ? null : "p";
+ if (!Nn || mr || Mi || (Mi = "s"), Vt && Vt != Mi) {
+ G < 0 && (G = 1, Yt(), S.sticky = "after");
+ break;
+ }
+ if (Mi && (Vt = Mi), G > 0 && !Yt(!mr))
+ break;
+ }
+ var _r = z3(x, S, we, $e, !0);
+ return Wo(we, _r) && (_r.hitSide = !0), _r;
+ }
+ function d1(x, S, G, j) {
+ var V, we, $e = x.doc, ze = S.left;
+ if (j == "page") {
+ var nt = Math.min(x.display.wrapper.clientHeight, window.innerHeight || document.documentElement.clientHeight), at = Math.max(nt - 0.5 * T2(x.display), 3);
+ V = (G > 0 ? S.bottom : S.top) + G * at;
+ } else
+ j == "line" && (V = G > 0 ? S.bottom + 3 : S.top - 3);
+ for (; (we = SA(x, ze, V)).outside; ) {
+ if (G < 0 ? V <= 0 : V >= $e.height) {
+ we.hitSide = !0;
+ break;
+ }
+ V += 5 * G;
+ }
+ return we;
+ }
+ var Os = function(x) {
+ this.cm = x, this.lastAnchorNode = this.lastAnchorOffset = this.lastFocusNode = this.lastFocusOffset = null, this.polling = new Wt(), this.composing = null, this.gracePeriod = !1, this.readDOMTimeout = null;
+ };
+ function Du(x, S) {
+ var G = h1(x, S.line);
+ if (!G || G.hidden)
+ return null;
+ var j = Ki(x.doc, S.line), V = gd(G, j, S.line), we = Jo(j, x.doc.direction), $e = "left";
+ we && ($e = la(we, S.ch) % 2 ? "right" : "left");
+ var ze = L3(V.map, S.ch, $e);
+ return ze.offset = ze.collapse == "right" ? ze.end : ze.start, ze;
+ }
+ function nn(x) {
+ for (var S = x; S; S = S.parentNode)
+ if (/CodeMirror-gutter-wrapper/.test(S.className))
+ return !0;
+ return !1;
+ }
+ function Sb(x, S) {
+ return S && (x.bad = !0), x;
+ }
+ function X2(x, S, G, j, V) {
+ var we = "", $e = !1, ze = x.doc.lineSeparator(), nt = !1;
+ function at(Vn) {
+ return function(mr) {
+ return mr.id == Vn;
+ };
+ }
+ function Yt() {
+ $e && (we += ze, nt && (we += ze), $e = nt = !1);
+ }
+ function Vt(Vn) {
+ Vn && (Yt(), we += Vn);
+ }
+ function Nn(Vn) {
+ if (Vn.nodeType == 1) {
+ var mr = Vn.getAttribute("cm-text");
+ if (mr)
+ return void Vt(mr);
+ var si, Mi = Vn.getAttribute("cm-marker");
+ if (Mi) {
+ var _r = x.findMarks(pr(j, 0), pr(V + 1, 0), at(+Mi));
+ return void (_r.length && (si = _r[0].find(0)) && Vt(Ta(x.doc, si.from, si.to).join(ze)));
+ }
+ if (Vn.getAttribute("contenteditable") == "false")
+ return;
+ var ao = /^(pre|div|p|li|table|br)$/i.test(Vn.nodeName);
+ if (!/^br$/i.test(Vn.nodeName) && Vn.textContent.length == 0)
+ return;
+ ao && Yt();
+ for (var ea = 0; ea < Vn.childNodes.length; ea++)
+ Nn(Vn.childNodes[ea]);
+ /^(pre|p)$/i.test(Vn.nodeName) && (nt = !0), ao && ($e = !0);
+ } else
+ Vn.nodeType == 3 && Vt(Vn.nodeValue.replace(/\u200b/g, "").replace(/\u00a0/g, " "));
+ }
+ for (; Nn(S), S != G; )
+ S = S.nextSibling, nt = !1;
+ return we;
+ }
+ function Hg(x, S, G) {
+ var j;
+ if (S == x.display.lineDiv) {
+ if (!(j = x.display.lineDiv.childNodes[G]))
+ return Sb(x.clipPos(pr(x.display.viewTo - 1)), !0);
+ S = null, G = 0;
+ } else
+ for (j = S; ; j = j.parentNode) {
+ if (!j || j == x.display.lineDiv)
+ return null;
+ if (j.parentNode && j.parentNode == x.display.lineDiv)
+ break;
+ }
+ for (var V = 0; V < x.display.view.length; V++) {
+ var we = x.display.view[V];
+ if (we.node == j)
+ return W2(we, S, G);
+ }
+ }
+ function W2(x, S, G) {
+ var j = x.text.firstChild, V = !1;
+ if (!S || !ge(j, S))
+ return Sb(pr(mc(x.line), 0), !0);
+ if (S == j && (V = !0, S = j.childNodes[G], G = 0, !S)) {
+ var we = x.rest ? pt(x.rest) : x.line;
+ return Sb(pr(mc(we), we.text.length), V);
+ }
+ var $e = S.nodeType == 3 ? S : null, ze = S;
+ for ($e || S.childNodes.length != 1 || S.firstChild.nodeType != 3 || ($e = S.firstChild, G && (G = $e.nodeValue.length)); ze.parentNode != j; )
+ ze = ze.parentNode;
+ var nt = x.measure, at = nt.maps;
+ function Yt(Mi, _r, ao) {
+ for (var ea = -1; ea < (at ? at.length : 0); ea++)
+ for (var zi = ea < 0 ? nt.map : at[ea], Qo = 0; Qo < zi.length; Qo += 3) {
+ var $a = zi[Qo + 2];
+ if ($a == Mi || $a == _r) {
+ var Ll = mc(ea < 0 ? x.line : x.rest[ea]), hu = zi[Qo] + ao;
+ return (ao < 0 || $a != Mi) && (hu = zi[Qo + (ao ? 1 : 0)]), pr(Ll, hu);
+ }
+ }
+ }
+ var Vt = Yt($e, ze, G);
+ if (Vt)
+ return Sb(Vt, V);
+ for (var Nn = ze.nextSibling, Vn = $e ? $e.nodeValue.length - G : 0; Nn; Nn = Nn.nextSibling) {
+ if (Vt = Yt(Nn, Nn.firstChild, 0))
+ return Sb(pr(Vt.line, Vt.ch - Vn), V);
+ Vn += Nn.textContent.length;
+ }
+ for (var mr = ze.previousSibling, si = G; mr; mr = mr.previousSibling) {
+ if (Vt = Yt(mr, mr.firstChild, -1))
+ return Sb(pr(Vt.line, Vt.ch + si), V);
+ si += mr.textContent.length;
+ }
+ }
+ Os.prototype.init = function(x) {
+ var S = this, G = this, j = G.cm, V = G.div = x.lineDiv;
+ function we(ze) {
+ for (var nt = ze.target; nt; nt = nt.parentNode) {
+ if (nt == V)
+ return !0;
+ if (/\bCodeMirror-(?:line)?widget\b/.test(nt.className))
+ break;
+ }
+ return !1;
+ }
+ function $e(ze) {
+ if (we(ze) && !ni(j, ze)) {
+ if (j.somethingSelected())
+ In({ lineWise: !1, text: j.getSelections() }), ze.type == "cut" && j.replaceSelection("", null, "cut");
+ else {
+ if (!j.options.lineWiseCopyCut)
+ return;
+ var nt = f1(j);
+ In({ lineWise: !0, text: nt.text }), ze.type == "cut" && j.operation(function() {
+ j.setSelections(nt.ranges, 0, wn), j.replaceSelection("", null, "cut");
+ });
+ }
+ if (ze.clipboardData) {
+ ze.clipboardData.clearData();
+ var at = Y1.text.join(`
+`);
+ if (ze.clipboardData.setData("Text", at), ze.clipboardData.getData("Text") == at)
+ return void ze.preventDefault();
+ }
+ var Yt = nx(), Vt = Yt.firstChild;
+ j.display.lineSpace.insertBefore(Yt, j.display.lineSpace.firstChild), Vt.value = Y1.text.join(`
+`);
+ var Nn = document.activeElement;
+ gt(Vt), setTimeout(function() {
+ j.display.lineSpace.removeChild(Yt), Nn.focus(), Nn == V && G.showPrimarySelection();
+ }, 50);
+ }
+ }
+ L1(V, j.options.spellcheck, j.options.autocorrect, j.options.autocapitalize), ji(V, "paste", function(ze) {
+ !we(ze) || ni(j, ze) || Bb(ze, j) || k <= 11 && setTimeout(q1(j, function() {
+ return S.updateFromDOM();
+ }), 20);
+ }), ji(V, "compositionstart", function(ze) {
+ S.composing = { data: ze.data, done: !1 };
+ }), ji(V, "compositionupdate", function(ze) {
+ S.composing || (S.composing = { data: ze.data, done: !1 });
+ }), ji(V, "compositionend", function(ze) {
+ S.composing && (ze.data != S.composing.data && S.readFromDOMSoon(), S.composing.done = !0);
+ }), ji(V, "touchstart", function() {
+ return G.forceCompositionEnd();
+ }), ji(V, "input", function() {
+ S.composing || S.readFromDOMSoon();
+ }), ji(V, "copy", $e), ji(V, "cut", $e);
+ }, Os.prototype.screenReaderLabelChanged = function(x) {
+ x ? this.div.setAttribute("aria-label", x) : this.div.removeAttribute("aria-label");
+ }, Os.prototype.prepareSelection = function() {
+ var x = O3(this.cm, !1);
+ return x.focus = document.activeElement == this.div, x;
+ }, Os.prototype.showSelection = function(x, S) {
+ x && this.cm.display.view.length && ((x.focus || S) && this.showPrimarySelection(), this.showMultipleSelections(x));
+ }, Os.prototype.getSelection = function() {
+ return this.cm.display.wrapper.ownerDocument.getSelection();
+ }, Os.prototype.showPrimarySelection = function() {
+ var x = this.getSelection(), S = this.cm, G = S.doc.sel.primary(), j = G.from(), V = G.to();
+ if (S.display.viewTo == S.display.viewFrom || j.line >= S.display.viewTo || V.line < S.display.viewFrom)
+ x.removeAllRanges();
+ else {
+ var we = Hg(S, x.anchorNode, x.anchorOffset), $e = Hg(S, x.focusNode, x.focusOffset);
+ if (!we || we.bad || !$e || $e.bad || Pr(Sn(we, $e), j) != 0 || Pr(wf(we, $e), V) != 0) {
+ var ze = S.display.view, nt = j.line >= S.display.viewFrom && Du(S, j) || { node: ze[0].measure.map[2], offset: 0 }, at = V.line < S.display.viewTo && Du(S, V);
+ if (!at) {
+ var Yt = ze[ze.length - 1].measure, Vt = Yt.maps ? Yt.maps[Yt.maps.length - 1] : Yt.map;
+ at = { node: Vt[Vt.length - 1], offset: Vt[Vt.length - 2] - Vt[Vt.length - 3] };
+ }
+ if (nt && at) {
+ var Nn, Vn = x.rangeCount && x.getRangeAt(0);
+ try {
+ Nn = xe(nt.node, nt.offset, at.offset, at.node);
+ } catch {
+ }
+ Nn && (!f && S.state.focused ? (x.collapse(nt.node, nt.offset), Nn.collapsed || (x.removeAllRanges(), x.addRange(Nn))) : (x.removeAllRanges(), x.addRange(Nn)), Vn && x.anchorNode == null ? x.addRange(Vn) : f && this.startGracePeriod()), this.rememberSelection();
+ } else
+ x.removeAllRanges();
+ }
+ }
+ }, Os.prototype.startGracePeriod = function() {
+ var x = this;
+ clearTimeout(this.gracePeriod), this.gracePeriod = setTimeout(function() {
+ x.gracePeriod = !1, x.selectionChanged() && x.cm.operation(function() {
+ return x.cm.curOp.selectionChanged = !0;
+ });
+ }, 20);
+ }, Os.prototype.showMultipleSelections = function(x) {
+ te(this.cm.display.cursorDiv, x.cursors), te(this.cm.display.selectionDiv, x.selection);
+ }, Os.prototype.rememberSelection = function() {
+ var x = this.getSelection();
+ this.lastAnchorNode = x.anchorNode, this.lastAnchorOffset = x.anchorOffset, this.lastFocusNode = x.focusNode, this.lastFocusOffset = x.focusOffset;
+ }, Os.prototype.selectionInEditor = function() {
+ var x = this.getSelection();
+ if (!x.rangeCount)
+ return !1;
+ var S = x.getRangeAt(0).commonAncestorContainer;
+ return ge(this.div, S);
+ }, Os.prototype.focus = function() {
+ this.cm.options.readOnly != "nocursor" && (this.selectionInEditor() && document.activeElement == this.div || this.showSelection(this.prepareSelection(), !0), this.div.focus());
+ }, Os.prototype.blur = function() {
+ this.div.blur();
+ }, Os.prototype.getField = function() {
+ return this.div;
+ }, Os.prototype.supportsTouch = function() {
+ return !0;
+ }, Os.prototype.receivedFocus = function() {
+ var x = this;
+ function S() {
+ x.cm.state.focused && (x.pollSelection(), x.polling.set(x.cm.options.pollInterval, S));
+ }
+ this.selectionInEditor() ? this.pollSelection() : IA(this.cm, function() {
+ return x.cm.curOp.selectionChanged = !0;
+ }), this.polling.set(this.cm.options.pollInterval, S);
+ }, Os.prototype.selectionChanged = function() {
+ var x = this.getSelection();
+ return x.anchorNode != this.lastAnchorNode || x.anchorOffset != this.lastAnchorOffset || x.focusNode != this.lastFocusNode || x.focusOffset != this.lastFocusOffset;
+ }, Os.prototype.pollSelection = function() {
+ if (this.readDOMTimeout == null && !this.gracePeriod && this.selectionChanged()) {
+ var x = this.getSelection(), S = this.cm;
+ if (J && L && this.cm.display.gutterSpecs.length && nn(x.anchorNode))
+ return this.cm.triggerOnKeyDown({ type: "keydown", keyCode: 8, preventDefault: Math.abs }), this.blur(), void this.focus();
+ if (!this.composing) {
+ this.rememberSelection();
+ var G = Hg(S, x.anchorNode, x.anchorOffset), j = Hg(S, x.focusNode, x.focusOffset);
+ G && j && IA(S, function() {
+ bd(S.doc, R2(G, j), wn), (G.bad || j.bad) && (S.curOp.selectionChanged = !0);
+ });
+ }
+ }
+ }, Os.prototype.pollContent = function() {
+ this.readDOMTimeout != null && (clearTimeout(this.readDOMTimeout), this.readDOMTimeout = null);
+ var x, S, G, j = this.cm, V = j.display, we = j.doc.sel.primary(), $e = we.from(), ze = we.to();
+ if ($e.ch == 0 && $e.line > j.firstLine() && ($e = pr($e.line - 1, Ki(j.doc, $e.line - 1).length)), ze.ch == Ki(j.doc, ze.line).text.length && ze.line < j.lastLine() && (ze = pr(ze.line + 1, 0)), $e.line < V.viewFrom || ze.line > V.viewTo - 1)
+ return !1;
+ $e.line == V.viewFrom || (x = f0(j, $e.line)) == 0 ? (S = mc(V.view[0].line), G = V.view[0].node) : (S = mc(V.view[x].line), G = V.view[x - 1].node.nextSibling);
+ var nt, at, Yt = f0(j, ze.line);
+ if (Yt == V.view.length - 1 ? (nt = V.viewTo - 1, at = V.lineDiv.lastChild) : (nt = mc(V.view[Yt + 1].line) - 1, at = V.view[Yt + 1].node.previousSibling), !G)
+ return !1;
+ for (var Vt = j.doc.splitLines(X2(j, G, at, S, nt)), Nn = Ta(j.doc, pr(S, 0), pr(nt, Ki(j.doc, nt).text.length)); Vt.length > 1 && Nn.length > 1; )
+ if (pt(Vt) == pt(Nn))
+ Vt.pop(), Nn.pop(), nt--;
+ else {
+ if (Vt[0] != Nn[0])
+ break;
+ Vt.shift(), Nn.shift(), S++;
+ }
+ for (var Vn = 0, mr = 0, si = Vt[0], Mi = Nn[0], _r = Math.min(si.length, Mi.length); Vn < _r && si.charCodeAt(Vn) == Mi.charCodeAt(Vn); )
+ ++Vn;
+ for (var ao = pt(Vt), ea = pt(Nn), zi = Math.min(ao.length - (Vt.length == 1 ? Vn : 0), ea.length - (Nn.length == 1 ? Vn : 0)); mr < zi && ao.charCodeAt(ao.length - mr - 1) == ea.charCodeAt(ea.length - mr - 1); )
+ ++mr;
+ if (Vt.length == 1 && Nn.length == 1 && S == $e.line)
+ for (; Vn && Vn > $e.ch && ao.charCodeAt(ao.length - mr - 1) == ea.charCodeAt(ea.length - mr - 1); )
+ Vn--, mr++;
+ Vt[Vt.length - 1] = ao.slice(0, ao.length - mr).replace(/^\u200b+/, ""), Vt[0] = Vt[0].slice(Vn).replace(/\u200b+$/, "");
+ var Qo = pr(S, Vn), $a = pr(nt, Nn.length ? pt(Nn).length - mr : 0);
+ return Vt.length > 1 || Vt[0] || Pr(Qo, $a) ? (Uv(j.doc, Vt, Qo, $a, "+input"), !0) : void 0;
+ }, Os.prototype.ensurePolled = function() {
+ this.forceCompositionEnd();
+ }, Os.prototype.reset = function() {
+ this.forceCompositionEnd();
+ }, Os.prototype.forceCompositionEnd = function() {
+ this.composing && (clearTimeout(this.readDOMTimeout), this.composing = null, this.updateFromDOM(), this.div.blur(), this.div.focus());
+ }, Os.prototype.readFromDOMSoon = function() {
+ var x = this;
+ this.readDOMTimeout == null && (this.readDOMTimeout = setTimeout(function() {
+ if (x.readDOMTimeout = null, x.composing) {
+ if (!x.composing.done)
+ return;
+ x.composing = null;
+ }
+ x.updateFromDOM();
+ }, 80));
+ }, Os.prototype.updateFromDOM = function() {
+ var x = this;
+ !this.cm.isReadOnly() && this.pollContent() || IA(this.cm, function() {
+ return pd(x.cm);
+ });
+ }, Os.prototype.setUneditable = function(x) {
+ x.contentEditable = "false";
+ }, Os.prototype.onKeyPress = function(x) {
+ x.charCode == 0 || this.composing || (x.preventDefault(), this.cm.isReadOnly() || q1(this.cm, Tm)(this.cm, String.fromCharCode(x.charCode == null ? x.keyCode : x.charCode), 0));
+ }, Os.prototype.readOnlyChanged = function(x) {
+ this.div.contentEditable = String(x != "nocursor");
+ }, Os.prototype.onContextMenu = function() {
+ }, Os.prototype.resetPosition = function() {
+ }, Os.prototype.needsContentAttribute = !0;
+ var kh = function(x) {
+ this.cm = x, this.prevInput = "", this.pollingFast = !1, this.polling = new Wt(), this.hasSelection = !1, this.composing = null;
+ };
+ function Gv(x, S) {
+ if ((S = S ? Qe(S) : {}).value = x.value, !S.tabindex && x.tabIndex && (S.tabindex = x.tabIndex), !S.placeholder && x.placeholder && (S.placeholder = x.placeholder), S.autofocus == null) {
+ var G = Je();
+ S.autofocus = G == x || x.getAttribute("autofocus") != null && G == document.body;
+ }
+ function j() {
+ x.value = ze.getValue();
+ }
+ var V;
+ if (x.form && (ji(x.form, "submit", j), !S.leaveSubmitMethodAlone)) {
+ var we = x.form;
+ V = we.submit;
+ try {
+ var $e = we.submit = function() {
+ j(), we.submit = V, we.submit(), we.submit = $e;
+ };
+ } catch {
+ }
+ }
+ S.finishInit = function(nt) {
+ nt.save = j, nt.getTextArea = function() {
+ return x;
+ }, nt.toTextArea = function() {
+ nt.toTextArea = isNaN, j(), x.parentNode.removeChild(nt.getWrapperElement()), x.style.display = "", x.form && (Hr(x.form, "submit", j), S.leaveSubmitMethodAlone || typeof x.form.submit != "function" || (x.form.submit = V));
+ };
+ }, x.style.display = "none";
+ var ze = hf(function(nt) {
+ return x.parentNode.insertBefore(nt, x.nextSibling);
+ }, S);
+ return ze;
+ }
+ function Qs(x) {
+ x.off = Hr, x.on = ji, x.wheelEventPixels = n_, x.Doc = MA, x.splitLines = Ff, x.countColumn = kt, x.findColumn = an, x.isWordChar = zr, x.Pass = Ft, x.signal = Yr, x.Line = Zf, x.changeEnd = Q2, x.scrollbarModel = bm, x.Pos = pr, x.cmpPos = Pr, x.modes = qf, x.mimeModes = wu, x.resolveMode = bl, x.getMode = cu, x.modeExtensions = qc, x.extendMode = Jl, x.copyState = js, x.startState = gs, x.innerMode = Dc, x.commands = j2, x.keyMap = Cm, x.keyName = q3, x.isModifierKey = Wk, x.lookupKey = H2, x.normalizeKeyMap = SC, x.StringStream = rc, x.SharedTextMarker = G3, x.TextMarker = Cf, x.LineWidget = jv, x.e_preventDefault = as, x.e_stopPropagation = xr, x.e_stop = cs, x.addClass = ot, x.contains = ge, x.rmClass = ie, x.keyNames = Rg;
+ }
+ kh.prototype.init = function(x) {
+ var S = this, G = this, j = this.cm;
+ this.createField(x);
+ var V = this.textarea;
+ function we($e) {
+ if (!ni(j, $e)) {
+ if (j.somethingSelected())
+ In({ lineWise: !1, text: j.getSelections() });
+ else {
+ if (!j.options.lineWiseCopyCut)
+ return;
+ var ze = f1(j);
+ In({ lineWise: !0, text: ze.text }), $e.type == "cut" ? j.setSelections(ze.ranges, null, wn) : (G.prevInput = "", V.value = ze.text.join(`
+`), gt(V));
+ }
+ $e.type == "cut" && (j.state.cutIncoming = +/* @__PURE__ */ new Date());
+ }
+ }
+ x.wrapper.insertBefore(this.wrapper, x.wrapper.firstChild), R && (V.style.width = "0px"), ji(V, "input", function() {
+ v && k >= 9 && S.hasSelection && (S.hasSelection = null), G.poll();
+ }), ji(V, "paste", function($e) {
+ ni(j, $e) || Bb($e, j) || (j.state.pasteIncoming = +/* @__PURE__ */ new Date(), G.fastPoll());
+ }), ji(V, "cut", we), ji(V, "copy", we), ji(x.scroller, "paste", function($e) {
+ if (!Lg(x, $e) && !ni(j, $e)) {
+ if (!V.dispatchEvent)
+ return j.state.pasteIncoming = +/* @__PURE__ */ new Date(), void G.focus();
+ var ze = new Event("paste");
+ ze.clipboardData = $e.clipboardData, V.dispatchEvent(ze);
+ }
+ }), ji(x.lineSpace, "selectstart", function($e) {
+ Lg(x, $e) || as($e);
+ }), ji(V, "compositionstart", function() {
+ var $e = j.getCursor("from");
+ G.composing && G.composing.range.clear(), G.composing = { start: $e, range: j.markText($e, j.getCursor("to"), { className: "CodeMirror-composing" }) };
+ }), ji(V, "compositionend", function() {
+ G.composing && (G.poll(), G.composing.range.clear(), G.composing = null);
+ });
+ }, kh.prototype.createField = function(x) {
+ this.wrapper = nx(), this.textarea = this.wrapper.firstChild;
+ }, kh.prototype.screenReaderLabelChanged = function(x) {
+ x ? this.textarea.setAttribute("aria-label", x) : this.textarea.removeAttribute("aria-label");
+ }, kh.prototype.prepareSelection = function() {
+ var x = this.cm, S = x.display, G = x.doc, j = O3(x);
+ if (x.options.moveInputWithCursor) {
+ var V = Wh(x, G.sel.primary().head, "div"), we = S.wrapper.getBoundingClientRect(), $e = S.lineDiv.getBoundingClientRect();
+ j.teTop = Math.max(0, Math.min(S.wrapper.clientHeight - 10, V.top + $e.top - we.top)), j.teLeft = Math.max(0, Math.min(S.wrapper.clientWidth - 10, V.left + $e.left - we.left));
+ }
+ return j;
+ }, kh.prototype.showSelection = function(x) {
+ var S = this.cm.display;
+ te(S.cursorDiv, x.cursors), te(S.selectionDiv, x.selection), x.teTop != null && (this.wrapper.style.top = x.teTop + "px", this.wrapper.style.left = x.teLeft + "px");
+ }, kh.prototype.reset = function(x) {
+ if (!this.contextMenuPending && !this.composing) {
+ var S = this.cm;
+ if (S.somethingSelected()) {
+ this.prevInput = "";
+ var G = S.getSelection();
+ this.textarea.value = G, S.state.focused && gt(this.textarea), v && k >= 9 && (this.hasSelection = G);
+ } else
+ x || (this.prevInput = this.textarea.value = "", v && k >= 9 && (this.hasSelection = null));
+ }
+ }, kh.prototype.getField = function() {
+ return this.textarea;
+ }, kh.prototype.supportsTouch = function() {
+ return !1;
+ }, kh.prototype.focus = function() {
+ if (this.cm.options.readOnly != "nocursor" && (!he || Je() != this.textarea))
+ try {
+ this.textarea.focus();
+ } catch {
+ }
+ }, kh.prototype.blur = function() {
+ this.textarea.blur();
+ }, kh.prototype.resetPosition = function() {
+ this.wrapper.style.top = this.wrapper.style.left = 0;
+ }, kh.prototype.receivedFocus = function() {
+ this.slowPoll();
+ }, kh.prototype.slowPoll = function() {
+ var x = this;
+ this.pollingFast || this.polling.set(this.cm.options.pollInterval, function() {
+ x.poll(), x.cm.state.focused && x.slowPoll();
+ });
+ }, kh.prototype.fastPoll = function() {
+ var x = !1, S = this;
+ function G() {
+ S.poll() || x ? (S.pollingFast = !1, S.slowPoll()) : (x = !0, S.polling.set(60, G));
+ }
+ S.pollingFast = !0, S.polling.set(20, G);
+ }, kh.prototype.poll = function() {
+ var x = this, S = this.cm, G = this.textarea, j = this.prevInput;
+ if (this.contextMenuPending || !S.state.focused || Oc(G) && !j && !this.composing || S.isReadOnly() || S.options.disableInput || S.state.keySeq)
+ return !1;
+ var V = G.value;
+ if (V == j && !S.somethingSelected())
+ return !1;
+ if (v && k >= 9 && this.hasSelection === V || Y && /[\uf700-\uf7ff]/.test(V))
+ return S.display.input.reset(), !1;
+ if (S.doc.sel == S.display.selForContextMenu) {
+ var we = V.charCodeAt(0);
+ if (we != 8203 || j || (j = ""), we == 8666)
+ return this.reset(), this.cm.execCommand("undo");
+ }
+ for (var $e = 0, ze = Math.min(j.length, V.length); $e < ze && j.charCodeAt($e) == V.charCodeAt($e); )
+ ++$e;
+ return IA(S, function() {
+ Tm(S, V.slice($e), j.length - $e, null, x.composing ? "*compose" : null), V.length > 1e3 || V.indexOf(`
+`) > -1 ? G.value = x.prevInput = "" : x.prevInput = V, x.composing && (x.composing.range.clear(), x.composing.range = S.markText(x.composing.start, S.getCursor("to"), { className: "CodeMirror-composing" }));
+ }), !0;
+ }, kh.prototype.ensurePolled = function() {
+ this.pollingFast && this.poll() && (this.pollingFast = !1);
+ }, kh.prototype.onKeyPress = function() {
+ v && k >= 9 && (this.hasSelection = null), this.fastPoll();
+ }, kh.prototype.onContextMenu = function(x) {
+ var S = this, G = S.cm, j = G.display, V = S.textarea;
+ S.contextMenuPending && S.contextMenuPending();
+ var we = S2(G, x), $e = j.scroller.scrollTop;
+ if (we && !F) {
+ G.options.resetSelectionOnContextMenu && G.doc.sel.contains(we) == -1 && q1(G, bd)(G.doc, R2(we), wn);
+ var ze, nt = V.style.cssText, at = S.wrapper.style.cssText, Yt = S.wrapper.offsetParent.getBoundingClientRect();
+ if (S.wrapper.style.cssText = "position: static", V.style.cssText = `position: absolute; width: 30px; height: 30px;
+ top: ` + (x.clientY - Yt.top - 5) + "px; left: " + (x.clientX - Yt.left - 5) + `px;
+ z-index: 1000; background: ` + (v ? "rgba(255, 255, 255, .05)" : "transparent") + `;
+ outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`, _ && (ze = window.scrollY), j.input.focus(), _ && window.scrollTo(null, ze), j.input.reset(), G.somethingSelected() || (V.value = S.prevInput = " "), S.contextMenuPending = Vn, j.selForContextMenu = G.doc.sel, clearTimeout(j.detectingSelectAll), v && k >= 9 && Nn(), de) {
+ cs(x);
+ var Vt = function() {
+ Hr(window, "mouseup", Vt), setTimeout(Vn, 20);
+ };
+ ji(window, "mouseup", Vt);
+ } else
+ setTimeout(Vn, 50);
+ }
+ function Nn() {
+ if (V.selectionStart != null) {
+ var mr = G.somethingSelected(), si = "" + (mr ? V.value : "");
+ V.value = "⇚", V.value = si, S.prevInput = mr ? "" : "", V.selectionStart = 1, V.selectionEnd = si.length, j.selForContextMenu = G.doc.sel;
+ }
+ }
+ function Vn() {
+ if (S.contextMenuPending == Vn && (S.contextMenuPending = !1, S.wrapper.style.cssText = at, V.style.cssText = nt, v && k < 9 && j.scrollbars.setScrollTop(j.scroller.scrollTop = $e), V.selectionStart != null)) {
+ (!v || v && k < 9) && Nn();
+ var mr = 0, si = function() {
+ j.selForContextMenu == G.doc.sel && V.selectionStart == 0 && V.selectionEnd > 0 && S.prevInput == "" ? q1(G, Ng)(G) : mr++ < 10 ? j.detectingSelectAll = setTimeout(si, 500) : (j.selForContextMenu = null, j.input.reset());
+ };
+ j.detectingSelectAll = setTimeout(si, 200);
+ }
+ }
+ }, kh.prototype.readOnlyChanged = function(x) {
+ x || this.reset(), this.textarea.disabled = x == "nocursor", this.textarea.readOnly = !!x;
+ }, kh.prototype.setUneditable = function() {
+ }, kh.prototype.needsContentAttribute = !1, Po(hf), W5(hf);
+ var Cw = "iter insert remove copy getEditor constructor".split(" ");
+ for (var sh in MA.prototype)
+ MA.prototype.hasOwnProperty(sh) && jt(Cw, sh) < 0 && (hf.prototype[sh] = /* @__PURE__ */ function(x) {
+ return function() {
+ return x.apply(this.doc, arguments);
+ };
+ }(MA.prototype[sh]));
+ return er(MA), hf.inputStyles = { textarea: kh, contenteditable: Os }, hf.defineMode = function(x) {
+ hf.defaults.mode || x == "null" || (hf.defaults.mode = x), jo.apply(this, arguments);
+ }, hf.defineMIME = yf, hf.defineMode("null", function() {
+ return { token: function(x) {
+ return x.skipToEnd();
+ } };
+ }), hf.defineMIME("text/plain", "null"), hf.defineExtension = function(x, S) {
+ hf.prototype[x] = S;
+ }, hf.defineDocExtension = function(x, S) {
+ MA.prototype[x] = S;
+ }, hf.fromTextArea = Gv, Qs(hf), hf.version = "5.58.2", hf;
+ }();
+});
+su(function(r, i) {
+ var o, l, f;
+ l = { autoSelfClosers: { area: !0, base: !0, br: !0, col: !0, command: !0, embed: !0, frame: !0, hr: !0, img: !0, input: !0, keygen: !0, link: !0, meta: !0, param: !0, source: !0, track: !0, wbr: !0, menuitem: !0 }, implicitlyClosed: { dd: !0, li: !0, optgroup: !0, option: !0, p: !0, rp: !0, rt: !0, tbody: !0, td: !0, tfoot: !0, th: !0, tr: !0 }, contextGrabbers: { dd: { dd: !0, dt: !0 }, dt: { dd: !0, dt: !0 }, li: { li: !0 }, option: { option: !0, optgroup: !0 }, optgroup: { optgroup: !0 }, p: { address: !0, article: !0, aside: !0, blockquote: !0, dir: !0, div: !0, dl: !0, fieldset: !0, footer: !0, form: !0, h1: !0, h2: !0, h3: !0, h4: !0, h5: !0, h6: !0, header: !0, hgroup: !0, hr: !0, menu: !0, nav: !0, ol: !0, p: !0, pre: !0, section: !0, table: !0, ul: !0 }, rp: { rp: !0, rt: !0 }, rt: { rp: !0, rt: !0 }, tbody: { tbody: !0, tfoot: !0 }, td: { td: !0, th: !0 }, tfoot: { tbody: !0 }, th: { td: !0, th: !0 }, thead: { tbody: !0, tfoot: !0 }, tr: { tr: !0 } }, doNotIndent: { pre: !0 }, allowUnquoted: !0, allowMissing: !0, caseFold: !0 }, f = { autoSelfClosers: {}, implicitlyClosed: {}, contextGrabbers: {}, doNotIndent: {}, allowUnquoted: !1, allowMissing: !1, allowMissingTagName: !1, caseFold: !1 }, (o = m2).defineMode("xml", function(g, A) {
+ var b, v, k = g.indentUnit, _ = {}, T = A.htmlMode ? l : f;
+ for (var L in T)
+ _[L] = T[L];
+ for (var L in A)
+ _[L] = A[L];
+ function F(te, Me) {
+ function ve(Je) {
+ return Me.tokenize = Je, Je(te, Me);
+ }
+ var ge = te.next();
+ return ge == "<" ? te.eat("!") ? te.eat("[") ? te.match("CDATA[") ? ve(Z("atom", "]]>")) : null : te.match("--") ? ve(Z("comment", "-->")) : te.match("DOCTYPE", !0, !0) ? (te.eatWhile(/[\w\._\-]/), ve(R(1))) : null : te.eat("?") ? (te.eatWhile(/[\w\._\-]/), Me.tokenize = Z("meta", "?>"), "meta") : (b = te.eat("/") ? "closeTag" : "openTag", Me.tokenize = U, "tag bracket") : ge == "&" ? (te.eat("#") ? te.eat("x") ? te.eatWhile(/[a-fA-F\d]/) && te.eat(";") : te.eatWhile(/[\d]/) && te.eat(";") : te.eatWhile(/[\w\.\-:]/) && te.eat(";")) ? "atom" : "error" : (te.eatWhile(/[^&<]/), null);
+ }
+ function U(te, Me) {
+ var ve = te.next();
+ if (ve == ">" || ve == "/" && te.eat(">"))
+ return Me.tokenize = F, b = ve == ">" ? "endTag" : "selfcloseTag", "tag bracket";
+ if (ve == "=")
+ return b = "equals", null;
+ if (ve == "<") {
+ Me.tokenize = F, Me.state = ue, Me.tagName = Me.tagStart = null;
+ var ge = Me.tokenize(te, Me);
+ return ge ? ge + " tag error" : "tag error";
+ }
+ return /[\'\"]/.test(ve) ? (Me.tokenize = q(ve), Me.stringStartCol = te.column(), Me.tokenize(te, Me)) : (te.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/), "word");
+ }
+ function q(te) {
+ var Me = function(ve, ge) {
+ for (; !ve.eol(); )
+ if (ve.next() == te) {
+ ge.tokenize = U;
+ break;
+ }
+ return "string";
+ };
+ return Me.isInAttribute = !0, Me;
+ }
+ function Z(te, Me) {
+ return function(ve, ge) {
+ for (; !ve.eol(); ) {
+ if (ve.match(Me)) {
+ ge.tokenize = F;
+ break;
+ }
+ ve.next();
+ }
+ return te;
+ };
+ }
+ function R(te) {
+ return function(Me, ve) {
+ for (var ge; (ge = Me.next()) != null; ) {
+ if (ge == "<")
+ return ve.tokenize = R(te + 1), ve.tokenize(Me, ve);
+ if (ge == ">") {
+ if (te == 1) {
+ ve.tokenize = F;
+ break;
+ }
+ return ve.tokenize = R(te - 1), ve.tokenize(Me, ve);
+ }
+ }
+ return "meta";
+ };
+ }
+ function J(te, Me, ve) {
+ this.prev = te.context, this.tagName = Me, this.indent = te.indented, this.startOfLine = ve, (_.doNotIndent.hasOwnProperty(Me) || te.context && te.context.noIndent) && (this.noIndent = !0);
+ }
+ function he(te) {
+ te.context && (te.context = te.context.prev);
+ }
+ function Y(te, Me) {
+ for (var ve; ; ) {
+ if (!te.context || (ve = te.context.tagName, !_.contextGrabbers.hasOwnProperty(ve) || !_.contextGrabbers[ve].hasOwnProperty(Me)))
+ return;
+ he(te);
+ }
+ }
+ function ue(te, Me, ve) {
+ return te == "openTag" ? (ve.tagStart = Me.column(), le) : te == "closeTag" ? be : ue;
+ }
+ function le(te, Me, ve) {
+ return te == "word" ? (ve.tagName = Me.current(), v = "tag", Te) : _.allowMissingTagName && te == "endTag" ? (v = "tag bracket", Te(te, Me, ve)) : (v = "error", le);
+ }
+ function be(te, Me, ve) {
+ if (te == "word") {
+ var ge = Me.current();
+ return ve.context && ve.context.tagName != ge && _.implicitlyClosed.hasOwnProperty(ve.context.tagName) && he(ve), ve.context && ve.context.tagName == ge || _.matchClosing === !1 ? (v = "tag", ke) : (v = "tag error", de);
+ }
+ return _.allowMissingTagName && te == "endTag" ? (v = "tag bracket", ke(te, Me, ve)) : (v = "error", de);
+ }
+ function ke(te, Me, ve) {
+ return te != "endTag" ? (v = "error", ke) : (he(ve), ue);
+ }
+ function de(te, Me, ve) {
+ return v = "error", ke(te, Me, ve);
+ }
+ function Te(te, Me, ve) {
+ if (te == "word")
+ return v = "attribute", xe;
+ if (te == "endTag" || te == "selfcloseTag") {
+ var ge = ve.tagName, Je = ve.tagStart;
+ return ve.tagName = ve.tagStart = null, te == "selfcloseTag" || _.autoSelfClosers.hasOwnProperty(ge) ? Y(ve, ge) : (Y(ve, ge), ve.context = new J(ve, ge, Je == ve.indented)), ue;
+ }
+ return v = "error", Te;
+ }
+ function xe(te, Me, ve) {
+ return te == "equals" ? ie : (_.allowMissing || (v = "error"), Te(te, Me, ve));
+ }
+ function ie(te, Me, ve) {
+ return te == "string" ? Be : te == "word" && _.allowUnquoted ? (v = "string", Te) : (v = "error", Te(te, Me, ve));
+ }
+ function Be(te, Me, ve) {
+ return te == "string" ? Be : Te(te, Me, ve);
+ }
+ return F.isInText = !0, { startState: function(te) {
+ var Me = { tokenize: F, state: ue, indented: te || 0, tagName: null, tagStart: null, context: null };
+ return te != null && (Me.baseIndent = te), Me;
+ }, token: function(te, Me) {
+ if (!Me.tagName && te.sol() && (Me.indented = te.indentation()), te.eatSpace())
+ return null;
+ b = null;
+ var ve = Me.tokenize(te, Me);
+ return (ve || b) && ve != "comment" && (v = null, Me.state = Me.state(b || ve, te, Me), v && (ve = v == "error" ? ve + " error" : v)), ve;
+ }, indent: function(te, Me, ve) {
+ var ge = te.context;
+ if (te.tokenize.isInAttribute)
+ return te.tagStart == te.indented ? te.stringStartCol + 1 : te.indented + k;
+ if (ge && ge.noIndent)
+ return o.Pass;
+ if (te.tokenize != U && te.tokenize != F)
+ return ve ? ve.match(/^(\s*)/)[0].length : 0;
+ if (te.tagName)
+ return _.multilineTagIndentPastTag !== !1 ? te.tagStart + te.tagName.length + 2 : te.tagStart + k * (_.multilineTagIndentFactor || 1);
+ if (_.alignCDATA && /$/, blockCommentStart: "", configuration: _.htmlMode ? "html" : "xml", helperType: _.htmlMode ? "html" : "xml", skipAttribute: function(te) {
+ te.state == ie && (te.state = Te);
+ }, xmlCurrentTag: function(te) {
+ return te.tagName ? { name: te.tagName, close: te.type == "closeTag" } : null;
+ }, xmlCurrentContext: function(te) {
+ for (var Me = [], ve = te.context; ve; ve = ve.prev)
+ ve.tagName && Me.push(ve.tagName);
+ return Me.reverse();
+ } };
+ }), o.defineMIME("text/xml", "xml"), o.defineMIME("application/xml", "xml"), o.mimeModes.hasOwnProperty("text/html") || o.defineMIME("text/html", { name: "xml", htmlMode: !0 });
+}), su(function(r, i) {
+ (function(o) {
+ o.modeInfo = [{ name: "APL", mime: "text/apl", mode: "apl", ext: ["dyalog", "apl"] }, { name: "PGP", mimes: ["application/pgp", "application/pgp-encrypted", "application/pgp-keys", "application/pgp-signature"], mode: "asciiarmor", ext: ["asc", "pgp", "sig"] }, { name: "ASN.1", mime: "text/x-ttcn-asn", mode: "asn.1", ext: ["asn", "asn1"] }, { name: "Asterisk", mime: "text/x-asterisk", mode: "asterisk", file: /^extensions\.conf$/i }, { name: "Brainfuck", mime: "text/x-brainfuck", mode: "brainfuck", ext: ["b", "bf"] }, { name: "C", mime: "text/x-csrc", mode: "clike", ext: ["c", "h", "ino"] }, { name: "C++", mime: "text/x-c++src", mode: "clike", ext: ["cpp", "c++", "cc", "cxx", "hpp", "h++", "hh", "hxx"], alias: ["cpp"] }, { name: "Cobol", mime: "text/x-cobol", mode: "cobol", ext: ["cob", "cpy"] }, { name: "C#", mime: "text/x-csharp", mode: "clike", ext: ["cs"], alias: ["csharp", "cs"] }, { name: "Clojure", mime: "text/x-clojure", mode: "clojure", ext: ["clj", "cljc", "cljx"] }, { name: "ClojureScript", mime: "text/x-clojurescript", mode: "clojure", ext: ["cljs"] }, { name: "Closure Stylesheets (GSS)", mime: "text/x-gss", mode: "css", ext: ["gss"] }, { name: "CMake", mime: "text/x-cmake", mode: "cmake", ext: ["cmake", "cmake.in"], file: /^CMakeLists\.txt$/ }, { name: "CoffeeScript", mimes: ["application/vnd.coffeescript", "text/coffeescript", "text/x-coffeescript"], mode: "coffeescript", ext: ["coffee"], alias: ["coffee", "coffee-script"] }, { name: "Common Lisp", mime: "text/x-common-lisp", mode: "commonlisp", ext: ["cl", "lisp", "el"], alias: ["lisp"] }, { name: "Cypher", mime: "application/x-cypher-query", mode: "cypher", ext: ["cyp", "cypher"] }, { name: "Cython", mime: "text/x-cython", mode: "python", ext: ["pyx", "pxd", "pxi"] }, { name: "Crystal", mime: "text/x-crystal", mode: "crystal", ext: ["cr"] }, { name: "CSS", mime: "text/css", mode: "css", ext: ["css"] }, { name: "CQL", mime: "text/x-cassandra", mode: "sql", ext: ["cql"] }, { name: "D", mime: "text/x-d", mode: "d", ext: ["d"] }, { name: "Dart", mimes: ["application/dart", "text/x-dart"], mode: "dart", ext: ["dart"] }, { name: "diff", mime: "text/x-diff", mode: "diff", ext: ["diff", "patch"] }, { name: "Django", mime: "text/x-django", mode: "django" }, { name: "Dockerfile", mime: "text/x-dockerfile", mode: "dockerfile", file: /^Dockerfile$/ }, { name: "DTD", mime: "application/xml-dtd", mode: "dtd", ext: ["dtd"] }, { name: "Dylan", mime: "text/x-dylan", mode: "dylan", ext: ["dylan", "dyl", "intr"] }, { name: "EBNF", mime: "text/x-ebnf", mode: "ebnf" }, { name: "ECL", mime: "text/x-ecl", mode: "ecl", ext: ["ecl"] }, { name: "edn", mime: "application/edn", mode: "clojure", ext: ["edn"] }, { name: "Eiffel", mime: "text/x-eiffel", mode: "eiffel", ext: ["e"] }, { name: "Elm", mime: "text/x-elm", mode: "elm", ext: ["elm"] }, { name: "Embedded Javascript", mime: "application/x-ejs", mode: "htmlembedded", ext: ["ejs"] }, { name: "Embedded Ruby", mime: "application/x-erb", mode: "htmlembedded", ext: ["erb"] }, { name: "Erlang", mime: "text/x-erlang", mode: "erlang", ext: ["erl"] }, { name: "Esper", mime: "text/x-esper", mode: "sql" }, { name: "Factor", mime: "text/x-factor", mode: "factor", ext: ["factor"] }, { name: "FCL", mime: "text/x-fcl", mode: "fcl" }, { name: "Forth", mime: "text/x-forth", mode: "forth", ext: ["forth", "fth", "4th"] }, { name: "Fortran", mime: "text/x-fortran", mode: "fortran", ext: ["f", "for", "f77", "f90", "f95"] }, { name: "F#", mime: "text/x-fsharp", mode: "mllike", ext: ["fs"], alias: ["fsharp"] }, { name: "Gas", mime: "text/x-gas", mode: "gas", ext: ["s"] }, { name: "Gherkin", mime: "text/x-feature", mode: "gherkin", ext: ["feature"] }, { name: "GitHub Flavored Markdown", mime: "text/x-gfm", mode: "gfm", file: /^(readme|contributing|history)\.md$/i }, { name: "Go", mime: "text/x-go", mode: "go", ext: ["go"] }, { name: "Groovy", mime: "text/x-groovy", mode: "groovy", ext: ["groovy", "gradle"], file: /^Jenkinsfile$/ }, { name: "HAML", mime: "text/x-haml", mode: "haml", ext: ["haml"] }, { name: "Haskell", mime: "text/x-haskell", mode: "haskell", ext: ["hs"] }, { name: "Haskell (Literate)", mime: "text/x-literate-haskell", mode: "haskell-literate", ext: ["lhs"] }, { name: "Haxe", mime: "text/x-haxe", mode: "haxe", ext: ["hx"] }, { name: "HXML", mime: "text/x-hxml", mode: "haxe", ext: ["hxml"] }, { name: "ASP.NET", mime: "application/x-aspx", mode: "htmlembedded", ext: ["aspx"], alias: ["asp", "aspx"] }, { name: "HTML", mime: "text/html", mode: "htmlmixed", ext: ["html", "htm", "handlebars", "hbs"], alias: ["xhtml"] }, { name: "HTTP", mime: "message/http", mode: "http" }, { name: "IDL", mime: "text/x-idl", mode: "idl", ext: ["pro"] }, { name: "Pug", mime: "text/x-pug", mode: "pug", ext: ["jade", "pug"], alias: ["jade"] }, { name: "Java", mime: "text/x-java", mode: "clike", ext: ["java"] }, { name: "Java Server Pages", mime: "application/x-jsp", mode: "htmlembedded", ext: ["jsp"], alias: ["jsp"] }, { name: "JavaScript", mimes: ["text/javascript", "text/ecmascript", "application/javascript", "application/x-javascript", "application/ecmascript"], mode: "javascript", ext: ["js"], alias: ["ecmascript", "js", "node"] }, { name: "JSON", mimes: ["application/json", "application/x-json"], mode: "javascript", ext: ["json", "map"], alias: ["json5"] }, { name: "JSON-LD", mime: "application/ld+json", mode: "javascript", ext: ["jsonld"], alias: ["jsonld"] }, { name: "JSX", mime: "text/jsx", mode: "jsx", ext: ["jsx"] }, { name: "Jinja2", mime: "text/jinja2", mode: "jinja2", ext: ["j2", "jinja", "jinja2"] }, { name: "Julia", mime: "text/x-julia", mode: "julia", ext: ["jl"] }, { name: "Kotlin", mime: "text/x-kotlin", mode: "clike", ext: ["kt"] }, { name: "LESS", mime: "text/x-less", mode: "css", ext: ["less"] }, { name: "LiveScript", mime: "text/x-livescript", mode: "livescript", ext: ["ls"], alias: ["ls"] }, { name: "Lua", mime: "text/x-lua", mode: "lua", ext: ["lua"] }, { name: "Markdown", mime: "text/x-markdown", mode: "markdown", ext: ["markdown", "md", "mkd"] }, { name: "mIRC", mime: "text/mirc", mode: "mirc" }, { name: "MariaDB SQL", mime: "text/x-mariadb", mode: "sql" }, { name: "Mathematica", mime: "text/x-mathematica", mode: "mathematica", ext: ["m", "nb", "wl", "wls"] }, { name: "Modelica", mime: "text/x-modelica", mode: "modelica", ext: ["mo"] }, { name: "MUMPS", mime: "text/x-mumps", mode: "mumps", ext: ["mps"] }, { name: "MS SQL", mime: "text/x-mssql", mode: "sql" }, { name: "mbox", mime: "application/mbox", mode: "mbox", ext: ["mbox"] }, { name: "MySQL", mime: "text/x-mysql", mode: "sql" }, { name: "Nginx", mime: "text/x-nginx-conf", mode: "nginx", file: /nginx.*\.conf$/i }, { name: "NSIS", mime: "text/x-nsis", mode: "nsis", ext: ["nsh", "nsi"] }, { name: "NTriples", mimes: ["application/n-triples", "application/n-quads", "text/n-triples"], mode: "ntriples", ext: ["nt", "nq"] }, { name: "Objective-C", mime: "text/x-objectivec", mode: "clike", ext: ["m"], alias: ["objective-c", "objc"] }, { name: "Objective-C++", mime: "text/x-objectivec++", mode: "clike", ext: ["mm"], alias: ["objective-c++", "objc++"] }, { name: "OCaml", mime: "text/x-ocaml", mode: "mllike", ext: ["ml", "mli", "mll", "mly"] }, { name: "Octave", mime: "text/x-octave", mode: "octave", ext: ["m"] }, { name: "Oz", mime: "text/x-oz", mode: "oz", ext: ["oz"] }, { name: "Pascal", mime: "text/x-pascal", mode: "pascal", ext: ["p", "pas"] }, { name: "PEG.js", mime: "null", mode: "pegjs", ext: ["jsonld"] }, { name: "Perl", mime: "text/x-perl", mode: "perl", ext: ["pl", "pm"] }, { name: "PHP", mimes: ["text/x-php", "application/x-httpd-php", "application/x-httpd-php-open"], mode: "php", ext: ["php", "php3", "php4", "php5", "php7", "phtml"] }, { name: "Pig", mime: "text/x-pig", mode: "pig", ext: ["pig"] }, { name: "Plain Text", mime: "text/plain", mode: "null", ext: ["txt", "text", "conf", "def", "list", "log"] }, { name: "PLSQL", mime: "text/x-plsql", mode: "sql", ext: ["pls"] }, { name: "PostgreSQL", mime: "text/x-pgsql", mode: "sql" }, { name: "PowerShell", mime: "application/x-powershell", mode: "powershell", ext: ["ps1", "psd1", "psm1"] }, { name: "Properties files", mime: "text/x-properties", mode: "properties", ext: ["properties", "ini", "in"], alias: ["ini", "properties"] }, { name: "ProtoBuf", mime: "text/x-protobuf", mode: "protobuf", ext: ["proto"] }, { name: "Python", mime: "text/x-python", mode: "python", ext: ["BUILD", "bzl", "py", "pyw"], file: /^(BUCK|BUILD)$/ }, { name: "Puppet", mime: "text/x-puppet", mode: "puppet", ext: ["pp"] }, { name: "Q", mime: "text/x-q", mode: "q", ext: ["q"] }, { name: "R", mime: "text/x-rsrc", mode: "r", ext: ["r", "R"], alias: ["rscript"] }, { name: "reStructuredText", mime: "text/x-rst", mode: "rst", ext: ["rst"], alias: ["rst"] }, { name: "RPM Changes", mime: "text/x-rpm-changes", mode: "rpm" }, { name: "RPM Spec", mime: "text/x-rpm-spec", mode: "rpm", ext: ["spec"] }, { name: "Ruby", mime: "text/x-ruby", mode: "ruby", ext: ["rb"], alias: ["jruby", "macruby", "rake", "rb", "rbx"] }, { name: "Rust", mime: "text/x-rustsrc", mode: "rust", ext: ["rs"] }, { name: "SAS", mime: "text/x-sas", mode: "sas", ext: ["sas"] }, { name: "Sass", mime: "text/x-sass", mode: "sass", ext: ["sass"] }, { name: "Scala", mime: "text/x-scala", mode: "clike", ext: ["scala"] }, { name: "Scheme", mime: "text/x-scheme", mode: "scheme", ext: ["scm", "ss"] }, { name: "SCSS", mime: "text/x-scss", mode: "css", ext: ["scss"] }, { name: "Shell", mimes: ["text/x-sh", "application/x-sh"], mode: "shell", ext: ["sh", "ksh", "bash"], alias: ["bash", "sh", "zsh"], file: /^PKGBUILD$/ }, { name: "Sieve", mime: "application/sieve", mode: "sieve", ext: ["siv", "sieve"] }, { name: "Slim", mimes: ["text/x-slim", "application/x-slim"], mode: "slim", ext: ["slim"] }, { name: "Smalltalk", mime: "text/x-stsrc", mode: "smalltalk", ext: ["st"] }, { name: "Smarty", mime: "text/x-smarty", mode: "smarty", ext: ["tpl"] }, { name: "Solr", mime: "text/x-solr", mode: "solr" }, { name: "SML", mime: "text/x-sml", mode: "mllike", ext: ["sml", "sig", "fun", "smackspec"] }, { name: "Soy", mime: "text/x-soy", mode: "soy", ext: ["soy"], alias: ["closure template"] }, { name: "SPARQL", mime: "application/sparql-query", mode: "sparql", ext: ["rq", "sparql"], alias: ["sparul"] }, { name: "Spreadsheet", mime: "text/x-spreadsheet", mode: "spreadsheet", alias: ["excel", "formula"] }, { name: "SQL", mime: "text/x-sql", mode: "sql", ext: ["sql"] }, { name: "SQLite", mime: "text/x-sqlite", mode: "sql" }, { name: "Squirrel", mime: "text/x-squirrel", mode: "clike", ext: ["nut"] }, { name: "Stylus", mime: "text/x-styl", mode: "stylus", ext: ["styl"] }, { name: "Swift", mime: "text/x-swift", mode: "swift", ext: ["swift"] }, { name: "sTeX", mime: "text/x-stex", mode: "stex" }, { name: "LaTeX", mime: "text/x-latex", mode: "stex", ext: ["text", "ltx", "tex"], alias: ["tex"] }, { name: "SystemVerilog", mime: "text/x-systemverilog", mode: "verilog", ext: ["v", "sv", "svh"] }, { name: "Tcl", mime: "text/x-tcl", mode: "tcl", ext: ["tcl"] }, { name: "Textile", mime: "text/x-textile", mode: "textile", ext: ["textile"] }, { name: "TiddlyWiki", mime: "text/x-tiddlywiki", mode: "tiddlywiki" }, { name: "Tiki wiki", mime: "text/tiki", mode: "tiki" }, { name: "TOML", mime: "text/x-toml", mode: "toml", ext: ["toml"] }, { name: "Tornado", mime: "text/x-tornado", mode: "tornado" }, { name: "troff", mime: "text/troff", mode: "troff", ext: ["1", "2", "3", "4", "5", "6", "7", "8", "9"] }, { name: "TTCN", mime: "text/x-ttcn", mode: "ttcn", ext: ["ttcn", "ttcn3", "ttcnpp"] }, { name: "TTCN_CFG", mime: "text/x-ttcn-cfg", mode: "ttcn-cfg", ext: ["cfg"] }, { name: "Turtle", mime: "text/turtle", mode: "turtle", ext: ["ttl"] }, { name: "TypeScript", mime: "application/typescript", mode: "javascript", ext: ["ts"], alias: ["ts"] }, { name: "TypeScript-JSX", mime: "text/typescript-jsx", mode: "jsx", ext: ["tsx"], alias: ["tsx"] }, { name: "Twig", mime: "text/x-twig", mode: "twig" }, { name: "Web IDL", mime: "text/x-webidl", mode: "webidl", ext: ["webidl"] }, { name: "VB.NET", mime: "text/x-vb", mode: "vb", ext: ["vb"] }, { name: "VBScript", mime: "text/vbscript", mode: "vbscript", ext: ["vbs"] }, { name: "Velocity", mime: "text/velocity", mode: "velocity", ext: ["vtl"] }, { name: "Verilog", mime: "text/x-verilog", mode: "verilog", ext: ["v"] }, { name: "VHDL", mime: "text/x-vhdl", mode: "vhdl", ext: ["vhd", "vhdl"] }, { name: "Vue.js Component", mimes: ["script/x-vue", "text/x-vue"], mode: "vue", ext: ["vue"] }, { name: "XML", mimes: ["application/xml", "text/xml"], mode: "xml", ext: ["xml", "xsl", "xsd", "svg"], alias: ["rss", "wsdl", "xsd"] }, { name: "XQuery", mime: "application/xquery", mode: "xquery", ext: ["xy", "xquery"] }, { name: "Yacas", mime: "text/x-yacas", mode: "yacas", ext: ["ys"] }, { name: "YAML", mimes: ["text/x-yaml", "text/yaml"], mode: "yaml", ext: ["yaml", "yml"], alias: ["yml"] }, { name: "Z80", mime: "text/x-z80", mode: "z80", ext: ["z80"] }, { name: "mscgen", mime: "text/x-mscgen", mode: "mscgen", ext: ["mscgen", "mscin", "msc"] }, { name: "xu", mime: "text/x-xu", mode: "mscgen", ext: ["xu"] }, { name: "msgenny", mime: "text/x-msgenny", mode: "mscgen", ext: ["msgenny"] }, { name: "WebAssembly", mime: "text/webassembly", mode: "wast", ext: ["wat", "wast"] }];
+ for (var l = 0; l < o.modeInfo.length; l++) {
+ var f = o.modeInfo[l];
+ f.mimes && (f.mime = f.mimes[0]);
+ }
+ o.findModeByMIME = function(g) {
+ g = g.toLowerCase();
+ for (var A = 0; A < o.modeInfo.length; A++) {
+ var b = o.modeInfo[A];
+ if (b.mime == g)
+ return b;
+ if (b.mimes) {
+ for (var v = 0; v < b.mimes.length; v++)
+ if (b.mimes[v] == g)
+ return b;
+ }
+ }
+ return /\+xml$/.test(g) ? o.findModeByMIME("application/xml") : /\+json$/.test(g) ? o.findModeByMIME("application/json") : void 0;
+ }, o.findModeByExtension = function(g) {
+ g = g.toLowerCase();
+ for (var A = 0; A < o.modeInfo.length; A++) {
+ var b = o.modeInfo[A];
+ if (b.ext) {
+ for (var v = 0; v < b.ext.length; v++)
+ if (b.ext[v] == g)
+ return b;
+ }
+ }
+ }, o.findModeByFileName = function(g) {
+ for (var A = 0; A < o.modeInfo.length; A++) {
+ var b = o.modeInfo[A];
+ if (b.file && b.file.test(g))
+ return b;
+ }
+ var v = g.lastIndexOf("."), k = v > -1 && g.substring(v + 1, g.length);
+ if (k)
+ return o.findModeByExtension(k);
+ }, o.findModeByName = function(g) {
+ g = g.toLowerCase();
+ for (var A = 0; A < o.modeInfo.length; A++) {
+ var b = o.modeInfo[A];
+ if (b.name.toLowerCase() == g)
+ return b;
+ if (b.alias) {
+ for (var v = 0; v < b.alias.length; v++)
+ if (b.alias[v].toLowerCase() == g)
+ return b;
+ }
+ }
+ };
+ })(m2);
+}), su(function(r, i) {
+ var o;
+ (o = m2).defineMode("markdown", function(l, f) {
+ var g = o.getMode(l, "text/html"), A = g.name == "null";
+ function b(je) {
+ if (o.findModeByName) {
+ var Qe = o.findModeByName(je);
+ Qe && (je = Qe.mime || Qe.mimes[0]);
+ }
+ var kt = o.getMode(l, je);
+ return kt.name == "null" ? null : kt;
+ }
+ f.highlightFormatting === void 0 && (f.highlightFormatting = !1), f.maxBlockquoteDepth === void 0 && (f.maxBlockquoteDepth = 0), f.taskLists === void 0 && (f.taskLists = !1), f.strikethrough === void 0 && (f.strikethrough = !1), f.emoji === void 0 && (f.emoji = !1), f.fencedCodeBlockHighlighting === void 0 && (f.fencedCodeBlockHighlighting = !0), f.fencedCodeBlockDefaultMode === void 0 && (f.fencedCodeBlockDefaultMode = "text/plain"), f.xml === void 0 && (f.xml = !0), f.tokenTypeOverrides === void 0 && (f.tokenTypeOverrides = {});
+ var v = { header: "header", code: "comment", quote: "quote", list1: "variable-2", list2: "variable-3", list3: "keyword", hr: "hr", image: "image", imageAltText: "image-alt-text", imageMarker: "image-marker", formatting: "formatting", linkInline: "link", linkEmail: "link", linkText: "link", linkHref: "string", em: "em", strong: "strong", strikethrough: "strikethrough", emoji: "builtin" };
+ for (var k in v)
+ v.hasOwnProperty(k) && f.tokenTypeOverrides[k] && (v[k] = f.tokenTypeOverrides[k]);
+ var _ = /^([*\-_])(?:\s*\1){2,}\s*$/, T = /^(?:[*\-+]|^[0-9]+([.)]))\s+/, L = /^\[(x| )\](?=\s)/i, F = f.allowAtxHeaderWithoutSpace ? /^(#+)/ : /^(#+)(?: |$)/, U = /^ {0,3}(?:\={1,}|-{2,})\s*$/, q = /^[^#!\[\]*_\\<>` "'(~:]+/, Z = /^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/, R = /^\s*\[[^\]]+?\]:.*$/, J = /[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/, he = " ";
+ function Y(je, Qe, kt) {
+ return Qe.f = Qe.inline = kt, kt(je, Qe);
+ }
+ function ue(je, Qe, kt) {
+ return Qe.f = Qe.block = kt, kt(je, Qe);
+ }
+ function le(je) {
+ return !je || !/\S/.test(je.string);
+ }
+ function be(je) {
+ if (je.linkTitle = !1, je.linkHref = !1, je.linkText = !1, je.em = !1, je.strong = !1, je.strikethrough = !1, je.quote = 0, je.indentedCode = !1, je.f == de) {
+ var Qe = A;
+ if (!Qe) {
+ var kt = o.innerMode(g, je.htmlState);
+ Qe = kt.mode.name == "xml" && kt.state.tagStart === null && !kt.state.context && kt.state.tokenize.isInText;
+ }
+ Qe && (je.f = Be, je.block = ke, je.htmlState = null);
+ }
+ return je.trailingSpace = 0, je.trailingSpaceNewLine = !1, je.prevLine = je.thisLine, je.thisLine = { stream: null }, null;
+ }
+ function ke(je, Qe) {
+ var kt = je.column() === Qe.indentation, Wt = le(Qe.prevLine.stream), jt = Qe.indentedCode, Zn = Qe.prevLine.hr, Ft = Qe.list !== !1, wn = (Qe.listStack[Qe.listStack.length - 1] || 0) + 3;
+ Qe.indentedCode = !1;
+ var un = Qe.indentation;
+ if (Qe.indentationDiff === null && (Qe.indentationDiff = Qe.indentation, Ft)) {
+ for (Qe.list = null; un < Qe.listStack[Qe.listStack.length - 1]; )
+ Qe.listStack.pop(), Qe.listStack.length ? Qe.indentation = Qe.listStack[Qe.listStack.length - 1] : Qe.list = !1;
+ Qe.list !== !1 && (Qe.indentationDiff = un - Qe.listStack[Qe.listStack.length - 1]);
+ }
+ var ln = !(Wt || Zn || Qe.prevLine.header || Ft && jt || Qe.prevLine.fencedCodeEnd), an = (Qe.list === !1 || Zn || Wt) && Qe.indentation <= wn && je.match(_), Ot = null;
+ if (Qe.indentationDiff >= 4 && (jt || Qe.prevLine.fencedCodeEnd || Qe.prevLine.header || Wt))
+ return je.skipToEnd(), Qe.indentedCode = !0, v.code;
+ if (je.eatSpace())
+ return null;
+ if (kt && Qe.indentation <= wn && (Ot = je.match(F)) && Ot[1].length <= 6)
+ return Qe.quote = 0, Qe.header = Ot[1].length, Qe.thisLine.header = !0, f.highlightFormatting && (Qe.formatting = "header"), Qe.f = Qe.inline, xe(Qe);
+ if (Qe.indentation <= wn && je.eat(">"))
+ return Qe.quote = kt ? 1 : Qe.quote + 1, f.highlightFormatting && (Qe.formatting = "quote"), je.eatSpace(), xe(Qe);
+ if (!an && !Qe.setext && kt && Qe.indentation <= wn && (Ot = je.match(T))) {
+ var $n = Ot[1] ? "ol" : "ul";
+ return Qe.indentation = un + je.current().length, Qe.list = !0, Qe.quote = 0, Qe.listStack.push(Qe.indentation), Qe.em = !1, Qe.strong = !1, Qe.code = !1, Qe.strikethrough = !1, f.taskLists && je.match(L, !1) && (Qe.taskList = !0), Qe.f = Qe.inline, f.highlightFormatting && (Qe.formatting = ["list", "list-" + $n]), xe(Qe);
+ }
+ return kt && Qe.indentation <= wn && (Ot = je.match(Z, !0)) ? (Qe.quote = 0, Qe.fencedEndRE = new RegExp(Ot[1] + "+ *$"), Qe.localMode = f.fencedCodeBlockHighlighting && b(Ot[2] || f.fencedCodeBlockDefaultMode), Qe.localMode && (Qe.localState = o.startState(Qe.localMode)), Qe.f = Qe.block = Te, f.highlightFormatting && (Qe.formatting = "code-block"), Qe.code = -1, xe(Qe)) : Qe.setext || !(ln && Ft || Qe.quote || Qe.list !== !1 || Qe.code || an || R.test(je.string)) && (Ot = je.lookAhead(1)) && (Ot = Ot.match(U)) ? (Qe.setext ? (Qe.header = Qe.setext, Qe.setext = 0, je.skipToEnd(), f.highlightFormatting && (Qe.formatting = "header")) : (Qe.header = Ot[0].charAt(0) == "=" ? 1 : 2, Qe.setext = Qe.header), Qe.thisLine.header = !0, Qe.f = Qe.inline, xe(Qe)) : an ? (je.skipToEnd(), Qe.hr = !0, Qe.thisLine.hr = !0, v.hr) : je.peek() === "[" ? Y(je, Qe, Je) : Y(je, Qe, Qe.inline);
+ }
+ function de(je, Qe) {
+ var kt = g.token(je, Qe.htmlState);
+ if (!A) {
+ var Wt = o.innerMode(g, Qe.htmlState);
+ (Wt.mode.name == "xml" && Wt.state.tagStart === null && !Wt.state.context && Wt.state.tokenize.isInText || Qe.md_inside && je.current().indexOf(">") > -1) && (Qe.f = Be, Qe.block = ke, Qe.htmlState = null);
+ }
+ return kt;
+ }
+ function Te(je, Qe) {
+ var kt, Wt = Qe.listStack[Qe.listStack.length - 1] || 0, jt = Qe.indentation < Wt, Zn = Wt + 3;
+ return Qe.fencedEndRE && Qe.indentation <= Zn && (jt || je.match(Qe.fencedEndRE)) ? (f.highlightFormatting && (Qe.formatting = "code-block"), jt || (kt = xe(Qe)), Qe.localMode = Qe.localState = null, Qe.block = ke, Qe.f = Be, Qe.fencedEndRE = null, Qe.code = 0, Qe.thisLine.fencedCodeEnd = !0, jt ? ue(je, Qe, Qe.block) : kt) : Qe.localMode ? Qe.localMode.token(je, Qe.localState) : (je.skipToEnd(), v.code);
+ }
+ function xe(je) {
+ var Qe = [];
+ if (je.formatting) {
+ Qe.push(v.formatting), typeof je.formatting == "string" && (je.formatting = [je.formatting]);
+ for (var kt = 0; kt < je.formatting.length; kt++)
+ Qe.push(v.formatting + "-" + je.formatting[kt]), je.formatting[kt] === "header" && Qe.push(v.formatting + "-" + je.formatting[kt] + "-" + je.header), je.formatting[kt] === "quote" && (!f.maxBlockquoteDepth || f.maxBlockquoteDepth >= je.quote ? Qe.push(v.formatting + "-" + je.formatting[kt] + "-" + je.quote) : Qe.push("error"));
+ }
+ if (je.taskOpen)
+ return Qe.push("meta"), Qe.length ? Qe.join(" ") : null;
+ if (je.taskClosed)
+ return Qe.push("property"), Qe.length ? Qe.join(" ") : null;
+ if (je.linkHref ? Qe.push(v.linkHref, "url") : (je.strong && Qe.push(v.strong), je.em && Qe.push(v.em), je.strikethrough && Qe.push(v.strikethrough), je.emoji && Qe.push(v.emoji), je.linkText && Qe.push(v.linkText), je.code && Qe.push(v.code), je.image && Qe.push(v.image), je.imageAltText && Qe.push(v.imageAltText, "link"), je.imageMarker && Qe.push(v.imageMarker)), je.header && Qe.push(v.header, v.header + "-" + je.header), je.quote && (Qe.push(v.quote), !f.maxBlockquoteDepth || f.maxBlockquoteDepth >= je.quote ? Qe.push(v.quote + "-" + je.quote) : Qe.push(v.quote + "-" + f.maxBlockquoteDepth)), je.list !== !1) {
+ var Wt = (je.listStack.length - 1) % 3;
+ Wt ? Wt === 1 ? Qe.push(v.list2) : Qe.push(v.list3) : Qe.push(v.list1);
+ }
+ return je.trailingSpaceNewLine ? Qe.push("trailing-space-new-line") : je.trailingSpace && Qe.push("trailing-space-" + (je.trailingSpace % 2 ? "a" : "b")), Qe.length ? Qe.join(" ") : null;
+ }
+ function ie(je, Qe) {
+ if (je.match(q, !0))
+ return xe(Qe);
+ }
+ function Be(je, Qe) {
+ var kt = Qe.text(je, Qe);
+ if (kt !== void 0)
+ return kt;
+ if (Qe.list)
+ return Qe.list = null, xe(Qe);
+ if (Qe.taskList)
+ return je.match(L, !0)[1] === " " ? Qe.taskOpen = !0 : Qe.taskClosed = !0, f.highlightFormatting && (Qe.formatting = "task"), Qe.taskList = !1, xe(Qe);
+ if (Qe.taskOpen = !1, Qe.taskClosed = !1, Qe.header && je.match(/^#+$/, !0))
+ return f.highlightFormatting && (Qe.formatting = "header"), xe(Qe);
+ var Wt = je.next();
+ if (Qe.linkTitle) {
+ Qe.linkTitle = !1;
+ var jt = Wt;
+ Wt === "(" && (jt = ")");
+ var Zn = "^\\s*(?:[^" + (jt = (jt + "").replace(/([.?*+^\[\]\\(){}|-])/g, "\\$1")) + "\\\\]+|\\\\\\\\|\\\\.)" + jt;
+ if (je.match(new RegExp(Zn), !0))
+ return v.linkHref;
+ }
+ if (Wt === "`") {
+ var Ft = Qe.formatting;
+ f.highlightFormatting && (Qe.formatting = "code"), je.eatWhile("`");
+ var wn = je.current().length;
+ if (Qe.code != 0 || Qe.quote && wn != 1) {
+ if (wn == Qe.code) {
+ var un = xe(Qe);
+ return Qe.code = 0, un;
+ }
+ return Qe.formatting = Ft, xe(Qe);
+ }
+ return Qe.code = wn, xe(Qe);
+ }
+ if (Qe.code)
+ return xe(Qe);
+ if (Wt === "\\" && (je.next(), f.highlightFormatting)) {
+ var ln = xe(Qe), an = v.formatting + "-escape";
+ return ln ? ln + " " + an : an;
+ }
+ if (Wt === "!" && je.match(/\[[^\]]*\] ?(?:\(|\[)/, !1))
+ return Qe.imageMarker = !0, Qe.image = !0, f.highlightFormatting && (Qe.formatting = "image"), xe(Qe);
+ if (Wt === "[" && Qe.imageMarker && je.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/, !1))
+ return Qe.imageMarker = !1, Qe.imageAltText = !0, f.highlightFormatting && (Qe.formatting = "image"), xe(Qe);
+ if (Wt === "]" && Qe.imageAltText) {
+ f.highlightFormatting && (Qe.formatting = "image");
+ var ln = xe(Qe);
+ return Qe.imageAltText = !1, Qe.image = !1, Qe.inline = Qe.f = Me, ln;
+ }
+ if (Wt === "[" && !Qe.image)
+ return Qe.linkText && je.match(/^.*?\]/) || (Qe.linkText = !0, f.highlightFormatting && (Qe.formatting = "link")), xe(Qe);
+ if (Wt === "]" && Qe.linkText) {
+ f.highlightFormatting && (Qe.formatting = "link");
+ var ln = xe(Qe);
+ return Qe.linkText = !1, Qe.inline = Qe.f = je.match(/\(.*?\)| ?\[.*?\]/, !1) ? Me : Be, ln;
+ }
+ if (Wt === "<" && je.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/, !1))
+ return Qe.f = Qe.inline = te, f.highlightFormatting && (Qe.formatting = "link"), (ln = xe(Qe)) ? ln += " " : ln = "", ln + v.linkInline;
+ if (Wt === "<" && je.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/, !1))
+ return Qe.f = Qe.inline = te, f.highlightFormatting && (Qe.formatting = "link"), (ln = xe(Qe)) ? ln += " " : ln = "", ln + v.linkEmail;
+ if (f.xml && Wt === "<" && je.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i, !1)) {
+ var Ot = je.string.indexOf(">", je.pos);
+ if (Ot != -1) {
+ var $n = je.string.substring(je.start, Ot);
+ /markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test($n) && (Qe.md_inside = !0);
+ }
+ return je.backUp(1), Qe.htmlState = o.startState(g), ue(je, Qe, de);
+ }
+ if (f.xml && Wt === "<" && je.match(/^\/\w*?>/))
+ return Qe.md_inside = !1, "tag";
+ if (Wt === "*" || Wt === "_") {
+ for (var pt = 1, Ci = je.pos == 1 ? " " : je.string.charAt(je.pos - 2); pt < 3 && je.eat(Wt); )
+ pt++;
+ var ut = je.peek() || " ", br = !/\s/.test(ut) && (!J.test(ut) || /\s/.test(Ci) || J.test(Ci)), zt = !/\s/.test(Ci) && (!J.test(Ci) || /\s/.test(ut) || J.test(ut)), Wr = null, zr = null;
+ if (pt % 2 && (Qe.em || !br || Wt !== "*" && zt && !J.test(Ci) ? Qe.em != Wt || !zt || Wt !== "*" && br && !J.test(ut) || (Wr = !1) : Wr = !0), pt > 1 && (Qe.strong || !br || Wt !== "*" && zt && !J.test(Ci) ? Qe.strong != Wt || !zt || Wt !== "*" && br && !J.test(ut) || (zr = !1) : zr = !0), zr != null || Wr != null)
+ return f.highlightFormatting && (Qe.formatting = Wr == null ? "strong" : zr == null ? "em" : "strong em"), Wr === !0 && (Qe.em = Wt), zr === !0 && (Qe.strong = Wt), un = xe(Qe), Wr === !1 && (Qe.em = !1), zr === !1 && (Qe.strong = !1), un;
+ } else if (Wt === " " && (je.eat("*") || je.eat("_"))) {
+ if (je.peek() === " ")
+ return xe(Qe);
+ je.backUp(1);
+ }
+ if (f.strikethrough) {
+ if (Wt === "~" && je.eatWhile(Wt)) {
+ if (Qe.strikethrough)
+ return f.highlightFormatting && (Qe.formatting = "strikethrough"), un = xe(Qe), Qe.strikethrough = !1, un;
+ if (je.match(/^[^\s]/, !1))
+ return Qe.strikethrough = !0, f.highlightFormatting && (Qe.formatting = "strikethrough"), xe(Qe);
+ } else if (Wt === " " && je.match(/^~~/, !0)) {
+ if (je.peek() === " ")
+ return xe(Qe);
+ je.backUp(2);
+ }
+ }
+ if (f.emoji && Wt === ":" && je.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)) {
+ Qe.emoji = !0, f.highlightFormatting && (Qe.formatting = "emoji");
+ var Si = xe(Qe);
+ return Qe.emoji = !1, Si;
+ }
+ return Wt === " " && (je.match(/^ +$/, !1) ? Qe.trailingSpace++ : Qe.trailingSpace && (Qe.trailingSpaceNewLine = !0)), xe(Qe);
+ }
+ function te(je, Qe) {
+ if (je.next() === ">") {
+ Qe.f = Qe.inline = Be, f.highlightFormatting && (Qe.formatting = "link");
+ var kt = xe(Qe);
+ return kt ? kt += " " : kt = "", kt + v.linkInline;
+ }
+ return je.match(/^[^>]+/, !0), v.linkInline;
+ }
+ function Me(je, Qe) {
+ if (je.eatSpace())
+ return null;
+ var kt = je.next();
+ return kt === "(" || kt === "[" ? (Qe.f = Qe.inline = ge(kt === "(" ? ")" : "]"), f.highlightFormatting && (Qe.formatting = "link-string"), Qe.linkHref = !0, xe(Qe)) : "error";
+ }
+ var ve = { ")": /^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/, "]": /^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/ };
+ function ge(je) {
+ return function(Qe, kt) {
+ if (Qe.next() === je) {
+ kt.f = kt.inline = Be, f.highlightFormatting && (kt.formatting = "link-string");
+ var Wt = xe(kt);
+ return kt.linkHref = !1, Wt;
+ }
+ return Qe.match(ve[je]), kt.linkHref = !0, xe(kt);
+ };
+ }
+ function Je(je, Qe) {
+ return je.match(/^([^\]\\]|\\.)*\]:/, !1) ? (Qe.f = ot, je.next(), f.highlightFormatting && (Qe.formatting = "link"), Qe.linkText = !0, xe(Qe)) : Y(je, Qe, Be);
+ }
+ function ot(je, Qe) {
+ if (je.match(/^\]:/, !0)) {
+ Qe.f = Qe.inline = bt, f.highlightFormatting && (Qe.formatting = "link");
+ var kt = xe(Qe);
+ return Qe.linkText = !1, kt;
+ }
+ return je.match(/^([^\]\\]|\\.)+/, !0), v.linkText;
+ }
+ function bt(je, Qe) {
+ return je.eatSpace() ? null : (je.match(/^[^\s]+/, !0), je.peek() === void 0 ? Qe.linkTitle = !0 : je.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/, !0), Qe.f = Qe.inline = Be, v.linkHref + " url");
+ }
+ var gt = { startState: function() {
+ return { f: ke, prevLine: { stream: null }, thisLine: { stream: null }, block: ke, htmlState: null, indentation: 0, inline: Be, text: ie, formatting: !1, linkText: !1, linkHref: !1, linkTitle: !1, code: 0, em: !1, strong: !1, header: 0, setext: 0, hr: !1, taskList: !1, list: !1, listStack: [], quote: 0, trailingSpace: 0, trailingSpaceNewLine: !1, strikethrough: !1, emoji: !1, fencedEndRE: null };
+ }, copyState: function(je) {
+ return { f: je.f, prevLine: je.prevLine, thisLine: je.thisLine, block: je.block, htmlState: je.htmlState && o.copyState(g, je.htmlState), indentation: je.indentation, localMode: je.localMode, localState: je.localMode ? o.copyState(je.localMode, je.localState) : null, inline: je.inline, text: je.text, formatting: !1, linkText: je.linkText, linkTitle: je.linkTitle, linkHref: je.linkHref, code: je.code, em: je.em, strong: je.strong, strikethrough: je.strikethrough, emoji: je.emoji, header: je.header, setext: je.setext, hr: je.hr, taskList: je.taskList, list: je.list, listStack: je.listStack.slice(0), quote: je.quote, indentedCode: je.indentedCode, trailingSpace: je.trailingSpace, trailingSpaceNewLine: je.trailingSpaceNewLine, md_inside: je.md_inside, fencedEndRE: je.fencedEndRE };
+ }, token: function(je, Qe) {
+ if (Qe.formatting = !1, je != Qe.thisLine.stream) {
+ if (Qe.header = 0, Qe.hr = !1, je.match(/^\s*$/, !0))
+ return be(Qe), null;
+ if (Qe.prevLine = Qe.thisLine, Qe.thisLine = { stream: je }, Qe.taskList = !1, Qe.trailingSpace = 0, Qe.trailingSpaceNewLine = !1, !Qe.localState && (Qe.f = Qe.block, Qe.f != de)) {
+ var kt = je.match(/^\s*/, !0)[0].replace(/\t/g, he).length;
+ if (Qe.indentation = kt, Qe.indentationDiff = null, kt > 0)
+ return null;
+ }
+ }
+ return Qe.f(je, Qe);
+ }, innerMode: function(je) {
+ return je.block == de ? { state: je.htmlState, mode: g } : je.localState ? { state: je.localState, mode: je.localMode } : { state: je, mode: gt };
+ }, indent: function(je, Qe, kt) {
+ return je.block == de && g.indent ? g.indent(je.htmlState, Qe, kt) : je.localState && je.localMode.indent ? je.localMode.indent(je.localState, Qe, kt) : o.Pass;
+ }, blankLine: be, getType: xe, blockCommentStart: "", closeBrackets: "()[]{}''\"\"``", fold: "markdown" };
+ return gt;
+ }, "xml"), o.defineMIME("text/markdown", "markdown"), o.defineMIME("text/x-markdown", "markdown");
+}), su(function(r, i) {
+ var o;
+ (o = m2).overlayMode = function(l, f, g) {
+ return { startState: function() {
+ return { base: o.startState(l), overlay: o.startState(f), basePos: 0, baseCur: null, overlayPos: 0, overlayCur: null, streamSeen: null };
+ }, copyState: function(A) {
+ return { base: o.copyState(l, A.base), overlay: o.copyState(f, A.overlay), basePos: A.basePos, baseCur: null, overlayPos: A.overlayPos, overlayCur: null };
+ }, token: function(A, b) {
+ return (A != b.streamSeen || Math.min(b.basePos, b.overlayPos) < A.start) && (b.streamSeen = A, b.basePos = b.overlayPos = A.start), A.start == b.basePos && (b.baseCur = l.token(A, b.base), b.basePos = A.pos), A.start == b.overlayPos && (A.pos = A.start, b.overlayCur = f.token(A, b.overlay), b.overlayPos = A.pos), A.pos = Math.min(b.basePos, b.overlayPos), b.overlayCur == null ? b.baseCur : b.baseCur != null && b.overlay.combineTokens || g && b.overlay.combineTokens == null ? b.baseCur + " " + b.overlayCur : b.overlayCur;
+ }, indent: l.indent && function(A, b, v) {
+ return l.indent(A.base, b, v);
+ }, electricChars: l.electricChars, innerMode: function(A) {
+ return { state: A.base, mode: l };
+ }, blankLine: function(A) {
+ var b, v;
+ return l.blankLine && (b = l.blankLine(A.base)), f.blankLine && (v = f.blankLine(A.overlay)), v == null ? b : g && b != null ? b + " " + v : v;
+ } };
+ };
+});
+su(function(r, i) {
+ var o, l;
+ l = /^((?:(?:aaas?|about|acap|adiumxtra|af[ps]|aim|apt|attachment|aw|beshare|bitcoin|bolo|callto|cap|chrome(?:-extension)?|cid|coap|com-eventbrite-attendee|content|crid|cvs|data|dav|dict|dlna-(?:playcontainer|playsingle)|dns|doi|dtn|dvb|ed2k|facetime|feed|file|finger|fish|ftp|geo|gg|git|gizmoproject|go|gopher|gtalk|h323|hcp|https?|iax|icap|icon|im|imap|info|ipn|ipp|irc[6s]?|iris(?:\.beep|\.lwz|\.xpc|\.xpcs)?|itms|jar|javascript|jms|keyparc|lastfm|ldaps?|magnet|mailto|maps|market|message|mid|mms|ms-help|msnim|msrps?|mtqp|mumble|mupdate|mvn|news|nfs|nih?|nntp|notes|oid|opaquelocktoken|palm|paparazzi|platform|pop|pres|proxy|psyc|query|res(?:ource)?|rmi|rsync|rtmp|rtsp|secondlife|service|session|sftp|sgn|shttp|sieve|sips?|skype|sm[bs]|snmp|soap\.beeps?|soldat|spotify|ssh|steam|svn|tag|teamspeak|tel(?:net)?|tftp|things|thismessage|tip|tn3270|tv|udp|unreal|urn|ut2004|vemmi|ventrilo|view-source|webcal|wss?|wtai|wyciwyg|xcon(?:-userid)?|xfire|xmlrpc\.beeps?|xmpp|xri|ymsgr|z39\.50[rs]?):(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))/i, (o = m2).defineMode("gfm", function(f, g) {
+ var A = 0;
+ function b(T) {
+ return T.code = !1, null;
+ }
+ var v = { startState: function() {
+ return { code: !1, codeBlock: !1, ateSpace: !1 };
+ }, copyState: function(T) {
+ return { code: T.code, codeBlock: T.codeBlock, ateSpace: T.ateSpace };
+ }, token: function(T, L) {
+ if (L.combineTokens = null, L.codeBlock)
+ return T.match(/^```+/) ? (L.codeBlock = !1, null) : (T.skipToEnd(), null);
+ if (T.sol() && (L.code = !1), T.sol() && T.match(/^```+/))
+ return T.skipToEnd(), L.codeBlock = !0, null;
+ if (T.peek() === "`") {
+ T.next();
+ var F = T.pos;
+ T.eatWhile("`");
+ var U = 1 + T.pos - F;
+ return L.code ? U === A && (L.code = !1) : (A = U, L.code = !0), null;
+ }
+ return L.code ? (T.next(), null) : T.eatSpace() ? (L.ateSpace = !0, null) : (T.sol() || L.ateSpace) && (L.ateSpace = !1, g.gitHubSpice !== !1) && (T.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?=.{0,6}\d)(?:[a-f0-9]{7,40}\b)/) || T.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/)) || T.match(l) && T.string.slice(T.start - 2, T.start) != "](" && (T.start == 0 || /\W/.test(T.string.charAt(T.start - 1))) ? (L.combineTokens = !0, "link") : (T.next(), null);
+ }, blankLine: b }, k = { taskLists: !0, strikethrough: !0, emoji: !0 };
+ for (var _ in g)
+ k[_] = g[_];
+ return k.name = "markdown", o.overlayMode(o.getMode(f, k), v);
+ }, "markdown"), o.defineMIME("text/x-gfm", "gfm");
+}), su(function(r, i) {
+ (function(o) {
+ var l = /^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/, f = /^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/, g = /[*+-]\s/;
+ function A(b, v) {
+ var k = v.line, _ = 0, T = 0, L = l.exec(b.getLine(k)), F = L[1];
+ do {
+ var U = k + (_ += 1), q = b.getLine(U), Z = l.exec(q);
+ if (Z) {
+ var R = Z[1], J = parseInt(L[3], 10) + _ - T, he = parseInt(Z[3], 10), Y = he;
+ if (F !== R || isNaN(he)) {
+ if (F.length > R.length || F.length < R.length && _ === 1)
+ return;
+ T += 1;
+ } else
+ J === he && (Y = he + 1), J > he && (Y = J + 1), b.replaceRange(q.replace(l, R + Y + Z[4] + Z[5]), { line: U, ch: 0 }, { line: U, ch: q.length });
+ }
+ } while (Z);
+ }
+ o.commands.newlineAndIndentContinueMarkdownList = function(b) {
+ if (b.getOption("disableInput"))
+ return o.Pass;
+ for (var v = b.listSelections(), k = [], _ = 0; _ < v.length; _++) {
+ var T = v[_].head, L = b.getStateAfter(T.line), F = o.innerMode(b.getMode(), L);
+ if (F.mode.name !== "markdown")
+ return void b.execCommand("newlineAndIndent");
+ var U = (L = F.state).list !== !1, q = L.quote !== 0, Z = b.getLine(T.line), R = l.exec(Z), J = /^\s*$/.test(Z.slice(0, T.ch));
+ if (!v[_].empty() || !U && !q || !R || J)
+ return void b.execCommand("newlineAndIndent");
+ if (f.test(Z)) {
+ var he = q && />\s*$/.test(Z), Y = !/>\s*$/.test(Z);
+ (he || Y) && b.replaceRange("", { line: T.line, ch: 0 }, { line: T.line, ch: T.ch + 1 }), k[_] = `
+`;
+ } else {
+ var ue = R[1], le = R[5], be = !(g.test(R[2]) || R[2].indexOf(">") >= 0), ke = be ? parseInt(R[3], 10) + 1 + R[4] : R[2].replace("x", " ");
+ k[_] = `
+` + ue + ke + le, be && A(b, T);
+ }
+ }
+ b.replaceSelections(k);
+ };
+ })(m2);
+});
+su(function(r, i) {
+ (function(o) {
+ var l = o.Pos;
+ function f(R, J) {
+ return R.line - J.line || R.ch - J.ch;
+ }
+ var g = "A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD", A = new RegExp("<(/?)([" + g + "][" + g + "-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)", "g");
+ function b(R, J, he, Y) {
+ this.line = J, this.ch = he, this.cm = R, this.text = R.getLine(J), this.min = Y ? Math.max(Y.from, R.firstLine()) : R.firstLine(), this.max = Y ? Math.min(Y.to - 1, R.lastLine()) : R.lastLine();
+ }
+ function v(R, J) {
+ var he = R.cm.getTokenTypeAt(l(R.line, J));
+ return he && /\btag\b/.test(he);
+ }
+ function k(R) {
+ if (!(R.line >= R.max))
+ return R.ch = 0, R.text = R.cm.getLine(++R.line), !0;
+ }
+ function _(R) {
+ if (!(R.line <= R.min))
+ return R.text = R.cm.getLine(--R.line), R.ch = R.text.length, !0;
+ }
+ function T(R) {
+ for (; ; ) {
+ var J = R.text.indexOf(">", R.ch);
+ if (J == -1) {
+ if (k(R))
+ continue;
+ return;
+ }
+ if (v(R, J + 1)) {
+ var he = R.text.lastIndexOf("/", J), Y = he > -1 && !/\S/.test(R.text.slice(he + 1, J));
+ return R.ch = J + 1, Y ? "selfClose" : "regular";
+ }
+ R.ch = J + 1;
+ }
+ }
+ function L(R) {
+ for (; ; ) {
+ var J = R.ch ? R.text.lastIndexOf("<", R.ch - 1) : -1;
+ if (J == -1) {
+ if (_(R))
+ continue;
+ return;
+ }
+ if (v(R, J + 1)) {
+ A.lastIndex = J, R.ch = J;
+ var he = A.exec(R.text);
+ if (he && he.index == J)
+ return he;
+ } else
+ R.ch = J;
+ }
+ }
+ function F(R) {
+ for (; ; ) {
+ A.lastIndex = R.ch;
+ var J = A.exec(R.text);
+ if (!J) {
+ if (k(R))
+ continue;
+ return;
+ }
+ if (v(R, J.index + 1))
+ return R.ch = J.index + J[0].length, J;
+ R.ch = J.index + 1;
+ }
+ }
+ function U(R) {
+ for (; ; ) {
+ var J = R.ch ? R.text.lastIndexOf(">", R.ch - 1) : -1;
+ if (J == -1) {
+ if (_(R))
+ continue;
+ return;
+ }
+ if (v(R, J + 1)) {
+ var he = R.text.lastIndexOf("/", J), Y = he > -1 && !/\S/.test(R.text.slice(he + 1, J));
+ return R.ch = J + 1, Y ? "selfClose" : "regular";
+ }
+ R.ch = J;
+ }
+ }
+ function q(R, J) {
+ for (var he = []; ; ) {
+ var Y, ue = F(R), le = R.line, be = R.ch - (ue ? ue[0].length : 0);
+ if (!ue || !(Y = T(R)))
+ return;
+ if (Y != "selfClose")
+ if (ue[1]) {
+ for (var ke = he.length - 1; ke >= 0; --ke)
+ if (he[ke] == ue[2]) {
+ he.length = ke;
+ break;
+ }
+ if (ke < 0 && (!J || J == ue[2]))
+ return { tag: ue[2], from: l(le, be), to: l(R.line, R.ch) };
+ } else
+ he.push(ue[2]);
+ }
+ }
+ function Z(R, J) {
+ for (var he = []; ; ) {
+ var Y = U(R);
+ if (!Y)
+ return;
+ if (Y != "selfClose") {
+ var ue = R.line, le = R.ch, be = L(R);
+ if (!be)
+ return;
+ if (be[1])
+ he.push(be[2]);
+ else {
+ for (var ke = he.length - 1; ke >= 0; --ke)
+ if (he[ke] == be[2]) {
+ he.length = ke;
+ break;
+ }
+ if (ke < 0 && (!J || J == be[2]))
+ return { tag: be[2], from: l(R.line, R.ch), to: l(ue, le) };
+ }
+ } else
+ L(R);
+ }
+ }
+ o.registerHelper("fold", "xml", function(R, J) {
+ for (var he = new b(R, J.line, 0); ; ) {
+ var Y = F(he);
+ if (!Y || he.line != J.line)
+ return;
+ var ue = T(he);
+ if (!ue)
+ return;
+ if (!Y[1] && ue != "selfClose") {
+ var le = l(he.line, he.ch), be = q(he, Y[2]);
+ return be && f(be.from, le) > 0 ? { from: le, to: be.from } : null;
+ }
+ }
+ }), o.findMatchingTag = function(R, J, he) {
+ var Y = new b(R, J.line, J.ch, he);
+ if (Y.text.indexOf(">") != -1 || Y.text.indexOf("<") != -1) {
+ var ue = T(Y), le = ue && l(Y.line, Y.ch), be = ue && L(Y);
+ if (ue && be && !(f(Y, J) > 0)) {
+ var ke = { from: l(Y.line, Y.ch), to: le, tag: be[2] };
+ return ue == "selfClose" ? { open: ke, close: null, at: "open" } : be[1] ? { open: Z(Y, be[2]), close: ke, at: "close" } : { open: ke, close: q(Y = new b(R, le.line, le.ch, he), be[2]), at: "open" };
+ }
+ }
+ }, o.findEnclosingTag = function(R, J, he, Y) {
+ for (var ue = new b(R, J.line, J.ch, he); ; ) {
+ var le = Z(ue, Y);
+ if (!le)
+ break;
+ var be = q(new b(R, J.line, J.ch, he), le.tag);
+ if (be)
+ return { open: le, close: be };
+ }
+ }, o.scanForClosingTag = function(R, J, he, Y) {
+ return q(new b(R, J.line, J.ch, Y ? { from: 0, to: Y } : null), he);
+ };
+ })(m2);
+});
+su(function(r, i) {
+ (function(o) {
+ o.defineOption("autoCloseTags", !1, function(_, T, L) {
+ if (L != o.Init && L && _.removeKeyMap("autoCloseTags"), T) {
+ var F = { name: "autoCloseTags" };
+ typeof T == "object" && T.whenClosing === !1 || (F["'/'"] = function(U) {
+ return b(U);
+ }), typeof T == "object" && T.whenOpening === !1 || (F["'>'"] = function(U) {
+ return g(U);
+ }), _.addKeyMap(F);
+ }
+ });
+ var l = ["area", "base", "br", "col", "command", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"], f = ["applet", "blockquote", "body", "button", "div", "dl", "fieldset", "form", "frameset", "h1", "h2", "h3", "h4", "h5", "h6", "head", "html", "iframe", "layer", "legend", "object", "ol", "p", "select", "table", "ul"];
+ function g(_) {
+ if (_.getOption("disableInput"))
+ return o.Pass;
+ for (var T = _.listSelections(), L = [], F = _.getOption("autoCloseTags"), U = 0; U < T.length; U++) {
+ if (!T[U].empty())
+ return o.Pass;
+ var q = T[U].head, Z = _.getTokenAt(q), R = o.innerMode(_.getMode(), Z.state), J = R.state, he = R.mode.xmlCurrentTag && R.mode.xmlCurrentTag(J), Y = he && he.name;
+ if (!Y)
+ return o.Pass;
+ var ue = R.mode.configuration == "html", le = typeof F == "object" && F.dontCloseTags || ue && l, be = typeof F == "object" && F.indentTags || ue && f;
+ Z.end > q.ch && (Y = Y.slice(0, Y.length - Z.end + q.ch));
+ var ke = Y.toLowerCase();
+ if (!Y || Z.type == "string" && (Z.end != q.ch || !/[\"\']/.test(Z.string.charAt(Z.string.length - 1)) || Z.string.length == 1) || Z.type == "tag" && he.close || Z.string.indexOf("/") == q.ch - Z.start - 1 || le && v(le, ke) > -1 || k(_, R.mode.xmlCurrentContext && R.mode.xmlCurrentContext(J) || [], Y, q, !0))
+ return o.Pass;
+ var de = typeof F == "object" && F.emptyTags;
+ if (de && v(de, Y) > -1)
+ L[U] = { text: "/>", newPos: o.Pos(q.line, q.ch + 2) };
+ else {
+ var Te = be && v(be, ke) > -1;
+ L[U] = { indent: Te, text: ">" + (Te ? `
+
+` : "") + "" + Y + ">", newPos: Te ? o.Pos(q.line + 1, 0) : o.Pos(q.line, q.ch + 1) };
+ }
+ }
+ var xe = typeof F == "object" && F.dontIndentOnAutoClose;
+ for (U = T.length - 1; U >= 0; U--) {
+ var ie = L[U];
+ _.replaceRange(ie.text, T[U].head, T[U].anchor, "+insert");
+ var Be = _.listSelections().slice(0);
+ Be[U] = { head: ie.newPos, anchor: ie.newPos }, _.setSelections(Be), !xe && ie.indent && (_.indentLine(ie.newPos.line, null, !0), _.indentLine(ie.newPos.line + 1, null, !0));
+ }
+ }
+ function A(_, T) {
+ for (var L = _.listSelections(), F = [], U = T ? "/" : "", q = _.getOption("autoCloseTags"), Z = typeof q == "object" && q.dontIndentOnSlash, R = 0; R < L.length; R++) {
+ if (!L[R].empty())
+ return o.Pass;
+ var J = L[R].head, he = _.getTokenAt(J), Y = o.innerMode(_.getMode(), he.state), ue = Y.state;
+ if (T && (he.type == "string" || he.string.charAt(0) != "<" || he.start != J.ch - 1))
+ return o.Pass;
+ var le, be = Y.mode.name != "xml" && _.getMode().name == "htmlmixed";
+ if (be && Y.mode.name == "javascript")
+ le = U + "script";
+ else if (be && Y.mode.name == "css")
+ le = U + "style";
+ else {
+ var ke = Y.mode.xmlCurrentContext && Y.mode.xmlCurrentContext(ue);
+ if (!ke || ke.length && k(_, ke, ke[ke.length - 1], J))
+ return o.Pass;
+ le = U + ke[ke.length - 1];
+ }
+ _.getLine(J.line).charAt(he.end) != ">" && (le += ">"), F[R] = le;
+ }
+ if (_.replaceSelections(F), L = _.listSelections(), !Z)
+ for (R = 0; R < L.length; R++)
+ (R == L.length - 1 || L[R].head.line < L[R + 1].head.line) && _.indentLine(L[R].head.line);
+ }
+ function b(_) {
+ return _.getOption("disableInput") ? o.Pass : A(_, !0);
+ }
+ function v(_, T) {
+ if (_.indexOf)
+ return _.indexOf(T);
+ for (var L = 0, F = _.length; L < F; ++L)
+ if (_[L] == T)
+ return L;
+ return -1;
+ }
+ function k(_, T, L, F, U) {
+ if (!o.scanForClosingTag)
+ return !1;
+ var q = Math.min(_.lastLine() + 1, F.line + 500), Z = o.scanForClosingTag(_, F, null, q);
+ if (!Z || Z.tag != L)
+ return !1;
+ for (var R = U ? 1 : 0, J = T.length - 1; J >= 0 && T[J] == L; J--)
+ ++R;
+ for (F = Z.to, J = 1; J < R; J++) {
+ var he = o.scanForClosingTag(_, F, null, q);
+ if (!he || he.tag != L)
+ return !1;
+ F = he.to;
+ }
+ return !0;
+ }
+ o.commands.closeTag = function(_) {
+ return A(_);
+ };
+ })(m2);
+}), su(function(r, i) {
+ (function(o) {
+ function l(A) {
+ A.state.tagHit && A.state.tagHit.clear(), A.state.tagOther && A.state.tagOther.clear(), A.state.tagHit = A.state.tagOther = null;
+ }
+ function f(A) {
+ A.state.failedTagMatch = !1, A.operation(function() {
+ if (l(A), !A.somethingSelected()) {
+ var b = A.getCursor(), v = A.getViewport();
+ v.from = Math.min(v.from, b.line), v.to = Math.max(b.line + 1, v.to);
+ var k = o.findMatchingTag(A, b, v);
+ if (k) {
+ if (A.state.matchBothTags) {
+ var _ = k.at == "open" ? k.open : k.close;
+ _ && (A.state.tagHit = A.markText(_.from, _.to, { className: "CodeMirror-matchingtag" }));
+ }
+ var T = k.at == "close" ? k.open : k.close;
+ T ? A.state.tagOther = A.markText(T.from, T.to, { className: "CodeMirror-matchingtag" }) : A.state.failedTagMatch = !0;
+ }
+ }
+ });
+ }
+ function g(A) {
+ A.state.failedTagMatch && f(A);
+ }
+ o.defineOption("matchTags", !1, function(A, b, v) {
+ v && v != o.Init && (A.off("cursorActivity", f), A.off("viewportChange", g), l(A)), b && (A.state.matchBothTags = typeof b == "object" && b.bothTags, A.on("cursorActivity", f), A.on("viewportChange", g), f(A));
+ }), o.commands.toMatchingTag = function(A) {
+ var b = o.findMatchingTag(A, A.getCursor());
+ if (b) {
+ var v = b.at == "close" ? b.open : b.close;
+ v && A.extendSelection(v.to, v.from);
+ }
+ };
+ })(m2);
+});
+su(function(r, i) {
+ (function(o) {
+ var l, f, g = o.Pos;
+ function A(J) {
+ var he = J.flags;
+ return he ?? (J.ignoreCase ? "i" : "") + (J.global ? "g" : "") + (J.multiline ? "m" : "");
+ }
+ function b(J, he) {
+ for (var Y = A(J), ue = Y, le = 0; le < he.length; le++)
+ ue.indexOf(he.charAt(le)) == -1 && (ue += he.charAt(le));
+ return Y == ue ? J : new RegExp(J.source, ue);
+ }
+ function v(J) {
+ return /\\s|\\n|\n|\\W|\\D|\[\^/.test(J.source);
+ }
+ function k(J, he, Y) {
+ he = b(he, "g");
+ for (var ue = Y.line, le = Y.ch, be = J.lastLine(); ue <= be; ue++, le = 0) {
+ he.lastIndex = le;
+ var ke = J.getLine(ue), de = he.exec(ke);
+ if (de)
+ return { from: g(ue, de.index), to: g(ue, de.index + de[0].length), match: de };
+ }
+ }
+ function _(J, he, Y) {
+ if (!v(he))
+ return k(J, he, Y);
+ he = b(he, "gm");
+ for (var ue, le = 1, be = Y.line, ke = J.lastLine(); be <= ke; ) {
+ for (var de = 0; de < le && !(be > ke); de++) {
+ var Te = J.getLine(be++);
+ ue = ue == null ? Te : ue + `
+` + Te;
+ }
+ le *= 2, he.lastIndex = Y.ch;
+ var xe = he.exec(ue);
+ if (xe) {
+ var ie = ue.slice(0, xe.index).split(`
+`), Be = xe[0].split(`
+`), te = Y.line + ie.length - 1, Me = ie[ie.length - 1].length;
+ return { from: g(te, Me), to: g(te + Be.length - 1, Be.length == 1 ? Me + Be[0].length : Be[Be.length - 1].length), match: xe };
+ }
+ }
+ }
+ function T(J, he, Y) {
+ for (var ue, le = 0; le <= J.length; ) {
+ he.lastIndex = le;
+ var be = he.exec(J);
+ if (!be)
+ break;
+ var ke = be.index + be[0].length;
+ if (ke > J.length - Y)
+ break;
+ (!ue || ke > ue.index + ue[0].length) && (ue = be), le = be.index + 1;
+ }
+ return ue;
+ }
+ function L(J, he, Y) {
+ he = b(he, "g");
+ for (var ue = Y.line, le = Y.ch, be = J.firstLine(); ue >= be; ue--, le = -1) {
+ var ke = J.getLine(ue), de = T(ke, he, le < 0 ? 0 : ke.length - le);
+ if (de)
+ return { from: g(ue, de.index), to: g(ue, de.index + de[0].length), match: de };
+ }
+ }
+ function F(J, he, Y) {
+ if (!v(he))
+ return L(J, he, Y);
+ he = b(he, "gm");
+ for (var ue, le = 1, be = J.getLine(Y.line).length - Y.ch, ke = Y.line, de = J.firstLine(); ke >= de; ) {
+ for (var Te = 0; Te < le && ke >= de; Te++) {
+ var xe = J.getLine(ke--);
+ ue = ue == null ? xe : xe + `
+` + ue;
+ }
+ le *= 2;
+ var ie = T(ue, he, be);
+ if (ie) {
+ var Be = ue.slice(0, ie.index).split(`
+`), te = ie[0].split(`
+`), Me = ke + Be.length, ve = Be[Be.length - 1].length;
+ return { from: g(Me, ve), to: g(Me + te.length - 1, te.length == 1 ? ve + te[0].length : te[te.length - 1].length), match: ie };
+ }
+ }
+ }
+ function U(J, he, Y, ue) {
+ if (J.length == he.length)
+ return Y;
+ for (var le = 0, be = Y + Math.max(0, J.length - he.length); ; ) {
+ if (le == be)
+ return le;
+ var ke = le + be >> 1, de = ue(J.slice(0, ke)).length;
+ if (de == Y)
+ return ke;
+ de > Y ? be = ke : le = ke + 1;
+ }
+ }
+ function q(J, he, Y, ue) {
+ if (!he.length)
+ return null;
+ var le = ue ? l : f, be = le(he).split(/\r|\n\r?/);
+ e:
+ for (var ke = Y.line, de = Y.ch, Te = J.lastLine() + 1 - be.length; ke <= Te; ke++, de = 0) {
+ var xe = J.getLine(ke).slice(de), ie = le(xe);
+ if (be.length == 1) {
+ var Be = ie.indexOf(be[0]);
+ if (Be == -1)
+ continue e;
+ return Y = U(xe, ie, Be, le) + de, { from: g(ke, U(xe, ie, Be, le) + de), to: g(ke, U(xe, ie, Be + be[0].length, le) + de) };
+ }
+ var te = ie.length - be[0].length;
+ if (ie.slice(te) == be[0]) {
+ for (var Me = 1; Me < be.length - 1; Me++)
+ if (le(J.getLine(ke + Me)) != be[Me])
+ continue e;
+ var ve = J.getLine(ke + be.length - 1), ge = le(ve), Je = be[be.length - 1];
+ if (ge.slice(0, Je.length) == Je)
+ return { from: g(ke, U(xe, ie, te, le) + de), to: g(ke + be.length - 1, U(ve, ge, Je.length, le)) };
+ }
+ }
+ }
+ function Z(J, he, Y, ue) {
+ if (!he.length)
+ return null;
+ var le = ue ? l : f, be = le(he).split(/\r|\n\r?/);
+ e:
+ for (var ke = Y.line, de = Y.ch, Te = J.firstLine() - 1 + be.length; ke >= Te; ke--, de = -1) {
+ var xe = J.getLine(ke);
+ de > -1 && (xe = xe.slice(0, de));
+ var ie = le(xe);
+ if (be.length == 1) {
+ var Be = ie.lastIndexOf(be[0]);
+ if (Be == -1)
+ continue e;
+ return { from: g(ke, U(xe, ie, Be, le)), to: g(ke, U(xe, ie, Be + be[0].length, le)) };
+ }
+ var te = be[be.length - 1];
+ if (ie.slice(0, te.length) == te) {
+ var Me = 1;
+ for (Y = ke - be.length + 1; Me < be.length - 1; Me++)
+ if (le(J.getLine(Y + Me)) != be[Me])
+ continue e;
+ var ve = J.getLine(ke + 1 - be.length), ge = le(ve);
+ if (ge.slice(ge.length - be[0].length) == be[0])
+ return { from: g(ke + 1 - be.length, U(ve, ge, ve.length - be[0].length, le)), to: g(ke, U(xe, ie, te.length, le)) };
+ }
+ }
+ }
+ function R(J, he, Y, ue) {
+ var le;
+ this.atOccurrence = !1, this.doc = J, Y = Y ? J.clipPos(Y) : g(0, 0), this.pos = { from: Y, to: Y }, typeof ue == "object" ? le = ue.caseFold : (le = ue, ue = null), typeof he == "string" ? (le == null && (le = !1), this.matches = function(be, ke) {
+ return (be ? Z : q)(J, he, ke, le);
+ }) : (he = b(he, "gm"), ue && ue.multiline === !1 ? this.matches = function(be, ke) {
+ return (be ? L : k)(J, he, ke);
+ } : this.matches = function(be, ke) {
+ return (be ? F : _)(J, he, ke);
+ });
+ }
+ String.prototype.normalize ? (l = function(J) {
+ return J.normalize("NFD").toLowerCase();
+ }, f = function(J) {
+ return J.normalize("NFD");
+ }) : (l = function(J) {
+ return J.toLowerCase();
+ }, f = function(J) {
+ return J;
+ }), R.prototype = { findNext: function() {
+ return this.find(!1);
+ }, findPrevious: function() {
+ return this.find(!0);
+ }, find: function(J) {
+ for (var he = this.matches(J, this.doc.clipPos(J ? this.pos.from : this.pos.to)); he && o.cmpPos(he.from, he.to) == 0; )
+ J ? he.from.ch ? he.from = g(he.from.line, he.from.ch - 1) : he = he.from.line == this.doc.firstLine() ? null : this.matches(J, this.doc.clipPos(g(he.from.line - 1))) : he.to.ch < this.doc.getLine(he.to.line).length ? he.to = g(he.to.line, he.to.ch + 1) : he = he.to.line == this.doc.lastLine() ? null : this.matches(J, g(he.to.line + 1, 0));
+ if (he)
+ return this.pos = he, this.atOccurrence = !0, this.pos.match || !0;
+ var Y = g(J ? this.doc.firstLine() : this.doc.lastLine() + 1, 0);
+ return this.pos = { from: Y, to: Y }, this.atOccurrence = !1;
+ }, from: function() {
+ if (this.atOccurrence)
+ return this.pos.from;
+ }, to: function() {
+ if (this.atOccurrence)
+ return this.pos.to;
+ }, replace: function(J, he) {
+ if (this.atOccurrence) {
+ var Y = o.splitLines(J);
+ this.doc.replaceRange(Y, this.pos.from, this.pos.to, he), this.pos.to = g(this.pos.from.line + Y.length - 1, Y[Y.length - 1].length + (Y.length == 1 ? this.pos.from.ch : 0));
+ }
+ } }, o.defineExtension("getSearchCursor", function(J, he, Y) {
+ return new R(this.doc, J, he, Y);
+ }), o.defineDocExtension("getSearchCursor", function(J, he, Y) {
+ return new R(this, J, he, Y);
+ }), o.defineExtension("selectMatches", function(J, he) {
+ for (var Y = [], ue = this.getSearchCursor(J, this.getCursor("from"), he); ue.findNext() && !(o.cmpPos(ue.to(), this.getCursor("to")) > 0); )
+ Y.push({ anchor: ue.from(), head: ue.to() });
+ Y.length && this.setSelections(Y, 0);
+ });
+ })(m2);
+});
+su(function(r, i) {
+ (function(o) {
+ function l(k) {
+ k.state.placeholder && (k.state.placeholder.parentNode.removeChild(k.state.placeholder), k.state.placeholder = null);
+ }
+ function f(k) {
+ l(k);
+ var _ = k.state.placeholder = document.createElement("pre");
+ _.style.cssText = "height: 0; overflow: visible", _.style.direction = k.getOption("direction"), _.className = "CodeMirror-placeholder CodeMirror-line-like";
+ var T = k.getOption("placeholder");
+ typeof T == "string" && (T = document.createTextNode(T)), _.appendChild(T), k.display.lineSpace.insertBefore(_, k.display.lineSpace.firstChild);
+ }
+ function g(k) {
+ setTimeout(function() {
+ var _ = !1, T = k.getInputField();
+ T.nodeName == "TEXTAREA" ? _ = !T.value : k.lineCount() == 1 && (_ = !/[^\u200b]/.test(T.querySelector(".CodeMirror-line").textContent)), _ ? f(k) : l(k);
+ }, 20);
+ }
+ function A(k) {
+ v(k) && f(k);
+ }
+ function b(k) {
+ var _ = k.getWrapperElement(), T = v(k);
+ _.className = _.className.replace(" CodeMirror-empty", "") + (T ? " CodeMirror-empty" : ""), T ? f(k) : l(k);
+ }
+ function v(k) {
+ return k.lineCount() === 1 && k.getLine(0) === "";
+ }
+ o.defineOption("placeholder", "", function(k, _, T) {
+ var L = T && T != o.Init;
+ if (_ && !L)
+ k.on("blur", A), k.on("change", b), k.on("swapDoc", b), o.on(k.getInputField(), "compositionupdate", k.state.placeholderCompose = function() {
+ g(k);
+ }), b(k);
+ else if (!_ && L) {
+ k.off("blur", A), k.off("change", b), k.off("swapDoc", b), o.off(k.getInputField(), "compositionupdate", k.state.placeholderCompose), l(k);
+ var F = k.getWrapperElement();
+ F.className = F.className.replace(" CodeMirror-empty", "");
+ }
+ _ && !k.hasFocus() && A(k);
+ });
+ })(m2);
+});
+su(function(r, i) {
+ (function(o) {
+ var l = /MSIE \d/.test(navigator.userAgent) && (document.documentMode == null || document.documentMode < 8), f = o.Pos, g = { "(": ")>", ")": "(<", "[": "]>", "]": "[<", "{": "}>", "}": "{<", "<": ">>", ">": "<<" };
+ function A(T) {
+ return T && T.bracketRegex || /[(){}[\]]/;
+ }
+ function b(T, L, F) {
+ var U = T.getLineHandle(L.line), q = L.ch - 1, Z = F && F.afterCursor;
+ Z == null && (Z = /(^| )cm-fat-cursor($| )/.test(T.getWrapperElement().className));
+ var R = A(F), J = !Z && q >= 0 && R.test(U.text.charAt(q)) && g[U.text.charAt(q)] || R.test(U.text.charAt(q + 1)) && g[U.text.charAt(++q)];
+ if (!J)
+ return null;
+ var he = J.charAt(1) == ">" ? 1 : -1;
+ if (F && F.strict && he > 0 != (q == L.ch))
+ return null;
+ var Y = T.getTokenTypeAt(f(L.line, q + 1)), ue = v(T, f(L.line, q + (he > 0 ? 1 : 0)), he, Y || null, F);
+ return ue == null ? null : { from: f(L.line, q), to: ue && ue.pos, match: ue && ue.ch == J.charAt(0), forward: he > 0 };
+ }
+ function v(T, L, F, U, q) {
+ for (var Z = q && q.maxScanLineLength || 1e4, R = q && q.maxScanLines || 1e3, J = [], he = A(q), Y = F > 0 ? Math.min(L.line + R, T.lastLine() + 1) : Math.max(T.firstLine() - 1, L.line - R), ue = L.line; ue != Y; ue += F) {
+ var le = T.getLine(ue);
+ if (le) {
+ var be = F > 0 ? 0 : le.length - 1, ke = F > 0 ? le.length : -1;
+ if (!(le.length > Z))
+ for (ue == L.line && (be = L.ch - (F < 0 ? 1 : 0)); be != ke; be += F) {
+ var de = le.charAt(be);
+ if (he.test(de) && (U === void 0 || T.getTokenTypeAt(f(ue, be + 1)) == U)) {
+ var Te = g[de];
+ if (Te && Te.charAt(1) == ">" == F > 0)
+ J.push(de);
+ else {
+ if (!J.length)
+ return { pos: f(ue, be), ch: de };
+ J.pop();
+ }
+ }
+ }
+ }
+ }
+ return ue - F != (F > 0 ? T.lastLine() : T.firstLine()) && null;
+ }
+ function k(T, L, F) {
+ for (var U = T.state.matchBrackets.maxHighlightLineLength || 1e3, q = [], Z = T.listSelections(), R = 0; R < Z.length; R++) {
+ var J = Z[R].empty() && b(T, Z[R].head, F);
+ if (J && T.getLine(J.from.line).length <= U) {
+ var he = J.match ? "CodeMirror-matchingbracket" : "CodeMirror-nonmatchingbracket";
+ q.push(T.markText(J.from, f(J.from.line, J.from.ch + 1), { className: he })), J.to && T.getLine(J.to.line).length <= U && q.push(T.markText(J.to, f(J.to.line, J.to.ch + 1), { className: he }));
+ }
+ }
+ if (q.length) {
+ l && T.state.focused && T.focus();
+ var Y = function() {
+ T.operation(function() {
+ for (var ue = 0; ue < q.length; ue++)
+ q[ue].clear();
+ });
+ };
+ if (!L)
+ return Y;
+ setTimeout(Y, 800);
+ }
+ }
+ function _(T) {
+ T.operation(function() {
+ T.state.matchBrackets.currentlyHighlighted && (T.state.matchBrackets.currentlyHighlighted(), T.state.matchBrackets.currentlyHighlighted = null), T.state.matchBrackets.currentlyHighlighted = k(T, !1, T.state.matchBrackets);
+ });
+ }
+ o.defineOption("matchBrackets", !1, function(T, L, F) {
+ function U(q) {
+ q.state.matchBrackets && q.state.matchBrackets.currentlyHighlighted && (q.state.matchBrackets.currentlyHighlighted(), q.state.matchBrackets.currentlyHighlighted = null);
+ }
+ F && F != o.Init && (T.off("cursorActivity", _), T.off("focus", _), T.off("blur", U), U(T)), L && (T.state.matchBrackets = typeof L == "object" ? L : {}, T.on("cursorActivity", _), T.on("focus", _), T.on("blur", U));
+ }), o.defineExtension("matchBrackets", function() {
+ k(this, !0);
+ }), o.defineExtension("findMatchingBracket", function(T, L, F) {
+ return (F || typeof L == "boolean") && (F ? (F.strict = L, L = F) : L = L ? { strict: !0 } : null), b(this, T, L);
+ }), o.defineExtension("scanForBracket", function(T, L, F, U) {
+ return v(this, T, L, F, U);
+ });
+ })(m2);
+});
+su(function(r, i) {
+ (function(o) {
+ var l = o.commands, f = o.Pos;
+ function g(Y, ue, le) {
+ if (le < 0 && ue.ch == 0)
+ return Y.clipPos(f(ue.line - 1));
+ var be = Y.getLine(ue.line);
+ if (le > 0 && ue.ch >= be.length)
+ return Y.clipPos(f(ue.line + 1, 0));
+ for (var ke, de = "start", Te = ue.ch, xe = Te, ie = le < 0 ? 0 : be.length, Be = 0; xe != ie; xe += le, Be++) {
+ var te = be.charAt(le < 0 ? xe - 1 : xe), Me = te != "_" && o.isWordChar(te) ? "w" : "o";
+ if (Me == "w" && te.toUpperCase() == te && (Me = "W"), de == "start")
+ Me != "o" ? (de = "in", ke = Me) : Te = xe + le;
+ else if (de == "in" && ke != Me) {
+ if (ke == "w" && Me == "W" && le < 0 && xe--, ke == "W" && Me == "w" && le > 0) {
+ if (xe == Te + 1) {
+ ke = "w";
+ continue;
+ }
+ xe--;
+ }
+ break;
+ }
+ }
+ return f(ue.line, xe);
+ }
+ function A(Y, ue) {
+ Y.extendSelectionsBy(function(le) {
+ return Y.display.shift || Y.doc.extend || le.empty() ? g(Y.doc, le.head, ue) : ue < 0 ? le.from() : le.to();
+ });
+ }
+ function b(Y, ue) {
+ if (Y.isReadOnly())
+ return o.Pass;
+ Y.operation(function() {
+ for (var le = Y.listSelections().length, be = [], ke = -1, de = 0; de < le; de++) {
+ var Te = Y.listSelections()[de].head;
+ if (!(Te.line <= ke)) {
+ var xe = f(Te.line + (ue ? 0 : 1), 0);
+ Y.replaceRange(`
+`, xe, null, "+insertLine"), Y.indentLine(xe.line, null, !0), be.push({ head: xe, anchor: xe }), ke = Te.line + 1;
+ }
+ }
+ Y.setSelections(be);
+ }), Y.execCommand("indentAuto");
+ }
+ function v(Y, ue) {
+ for (var le = ue.ch, be = le, ke = Y.getLine(ue.line); le && o.isWordChar(ke.charAt(le - 1)); )
+ --le;
+ for (; be < ke.length && o.isWordChar(ke.charAt(be)); )
+ ++be;
+ return { from: f(ue.line, le), to: f(ue.line, be), word: ke.slice(le, be) };
+ }
+ function k(Y, ue) {
+ for (var le = Y.listSelections(), be = [], ke = 0; ke < le.length; ke++) {
+ var de = le[ke], Te = Y.findPosV(de.anchor, ue, "line", de.anchor.goalColumn), xe = Y.findPosV(de.head, ue, "line", de.head.goalColumn);
+ Te.goalColumn = de.anchor.goalColumn != null ? de.anchor.goalColumn : Y.cursorCoords(de.anchor, "div").left, xe.goalColumn = de.head.goalColumn != null ? de.head.goalColumn : Y.cursorCoords(de.head, "div").left;
+ var ie = { anchor: Te, head: xe };
+ be.push(de), be.push(ie);
+ }
+ Y.setSelections(be);
+ }
+ function _(Y, ue, le) {
+ for (var be = 0; be < Y.length; be++)
+ if (o.cmpPos(Y[be].from(), ue) == 0 && o.cmpPos(Y[be].to(), le) == 0)
+ return !0;
+ return !1;
+ }
+ l.goSubwordLeft = function(Y) {
+ A(Y, -1);
+ }, l.goSubwordRight = function(Y) {
+ A(Y, 1);
+ }, l.scrollLineUp = function(Y) {
+ var ue = Y.getScrollInfo();
+ if (!Y.somethingSelected()) {
+ var le = Y.lineAtHeight(ue.top + ue.clientHeight, "local");
+ Y.getCursor().line >= le && Y.execCommand("goLineUp");
+ }
+ Y.scrollTo(null, ue.top - Y.defaultTextHeight());
+ }, l.scrollLineDown = function(Y) {
+ var ue = Y.getScrollInfo();
+ if (!Y.somethingSelected()) {
+ var le = Y.lineAtHeight(ue.top, "local") + 1;
+ Y.getCursor().line <= le && Y.execCommand("goLineDown");
+ }
+ Y.scrollTo(null, ue.top + Y.defaultTextHeight());
+ }, l.splitSelectionByLine = function(Y) {
+ for (var ue = Y.listSelections(), le = [], be = 0; be < ue.length; be++)
+ for (var ke = ue[be].from(), de = ue[be].to(), Te = ke.line; Te <= de.line; ++Te)
+ de.line > ke.line && Te == de.line && de.ch == 0 || le.push({ anchor: Te == ke.line ? ke : f(Te, 0), head: Te == de.line ? de : f(Te) });
+ Y.setSelections(le, 0);
+ }, l.singleSelectionTop = function(Y) {
+ var ue = Y.listSelections()[0];
+ Y.setSelection(ue.anchor, ue.head, { scroll: !1 });
+ }, l.selectLine = function(Y) {
+ for (var ue = Y.listSelections(), le = [], be = 0; be < ue.length; be++) {
+ var ke = ue[be];
+ le.push({ anchor: f(ke.from().line, 0), head: f(ke.to().line + 1, 0) });
+ }
+ Y.setSelections(le);
+ }, l.insertLineAfter = function(Y) {
+ return b(Y, !1);
+ }, l.insertLineBefore = function(Y) {
+ return b(Y, !0);
+ }, l.selectNextOccurrence = function(Y) {
+ var ue = Y.getCursor("from"), le = Y.getCursor("to"), be = Y.state.sublimeFindFullWord == Y.doc.sel;
+ if (o.cmpPos(ue, le) == 0) {
+ var ke = v(Y, ue);
+ if (!ke.word)
+ return;
+ Y.setSelection(ke.from, ke.to), be = !0;
+ } else {
+ var de = Y.getRange(ue, le), Te = be ? new RegExp("\\b" + de + "\\b") : de, xe = Y.getSearchCursor(Te, le), ie = xe.findNext();
+ if (ie || (ie = (xe = Y.getSearchCursor(Te, f(Y.firstLine(), 0))).findNext()), !ie || _(Y.listSelections(), xe.from(), xe.to()))
+ return;
+ Y.addSelection(xe.from(), xe.to());
+ }
+ be && (Y.state.sublimeFindFullWord = Y.doc.sel);
+ }, l.skipAndSelectNextOccurrence = function(Y) {
+ var ue = Y.getCursor("anchor"), le = Y.getCursor("head");
+ l.selectNextOccurrence(Y), o.cmpPos(ue, le) != 0 && Y.doc.setSelections(Y.doc.listSelections().filter(function(be) {
+ return be.anchor != ue || be.head != le;
+ }));
+ }, l.addCursorToPrevLine = function(Y) {
+ k(Y, -1);
+ }, l.addCursorToNextLine = function(Y) {
+ k(Y, 1);
+ };
+ var T = "(){}[]";
+ function L(Y) {
+ for (var ue = Y.listSelections(), le = [], be = 0; be < ue.length; be++) {
+ var ke = ue[be], de = ke.head, Te = Y.scanForBracket(de, -1);
+ if (!Te)
+ return !1;
+ for (; ; ) {
+ var xe = Y.scanForBracket(de, 1);
+ if (!xe)
+ return !1;
+ if (xe.ch == T.charAt(T.indexOf(Te.ch) + 1)) {
+ var ie = f(Te.pos.line, Te.pos.ch + 1);
+ if (o.cmpPos(ie, ke.from()) != 0 || o.cmpPos(xe.pos, ke.to()) != 0) {
+ le.push({ anchor: ie, head: xe.pos });
+ break;
+ }
+ if (!(Te = Y.scanForBracket(Te.pos, -1)))
+ return !1;
+ }
+ de = f(xe.pos.line, xe.pos.ch + 1);
+ }
+ }
+ return Y.setSelections(le), !0;
+ }
+ function F(Y) {
+ return Y ? /\bpunctuation\b/.test(Y) ? Y : void 0 : null;
+ }
+ function U(Y, ue) {
+ if (Y.isReadOnly())
+ return o.Pass;
+ for (var le, be = Y.listSelections(), ke = [], de = 0; de < be.length; de++) {
+ var Te = be[de];
+ if (!Te.empty()) {
+ for (var xe = Te.from().line, ie = Te.to().line; de < be.length - 1 && be[de + 1].from().line == ie; )
+ ie = be[++de].to().line;
+ be[de].to().ch || ie--, ke.push(xe, ie);
+ }
+ }
+ ke.length ? le = !0 : ke.push(Y.firstLine(), Y.lastLine()), Y.operation(function() {
+ for (var Be = [], te = 0; te < ke.length; te += 2) {
+ var Me = ke[te], ve = ke[te + 1], ge = f(Me, 0), Je = f(ve), ot = Y.getRange(ge, Je, !1);
+ ue ? ot.sort() : ot.sort(function(bt, gt) {
+ var je = bt.toUpperCase(), Qe = gt.toUpperCase();
+ return je != Qe && (bt = je, gt = Qe), bt < gt ? -1 : bt == gt ? 0 : 1;
+ }), Y.replaceRange(ot, ge, Je), le && Be.push({ anchor: ge, head: f(ve + 1, 0) });
+ }
+ le && Y.setSelections(Be, 0);
+ });
+ }
+ function q(Y, ue) {
+ Y.operation(function() {
+ for (var le = Y.listSelections(), be = [], ke = [], de = 0; de < le.length; de++)
+ (xe = le[de]).empty() ? (be.push(de), ke.push("")) : ke.push(ue(Y.getRange(xe.from(), xe.to())));
+ var Te;
+ for (Y.replaceSelections(ke, "around", "case"), de = be.length - 1; de >= 0; de--) {
+ var xe = le[be[de]];
+ if (!(Te && o.cmpPos(xe.head, Te) > 0)) {
+ var ie = v(Y, xe.head);
+ Te = ie.from, Y.replaceRange(ue(ie.word), ie.from, ie.to);
+ }
+ }
+ });
+ }
+ function Z(Y) {
+ var ue = Y.getCursor("from"), le = Y.getCursor("to");
+ if (o.cmpPos(ue, le) == 0) {
+ var be = v(Y, ue);
+ if (!be.word)
+ return;
+ ue = be.from, le = be.to;
+ }
+ return { from: ue, to: le, query: Y.getRange(ue, le), word: be };
+ }
+ function R(Y, ue) {
+ var le = Z(Y);
+ if (le) {
+ var be = le.query, ke = Y.getSearchCursor(be, ue ? le.to : le.from);
+ (ue ? ke.findNext() : ke.findPrevious()) ? Y.setSelection(ke.from(), ke.to()) : (ke = Y.getSearchCursor(be, ue ? f(Y.firstLine(), 0) : Y.clipPos(f(Y.lastLine()))), (ue ? ke.findNext() : ke.findPrevious()) ? Y.setSelection(ke.from(), ke.to()) : le.word && Y.setSelection(le.from, le.to));
+ }
+ }
+ l.selectScope = function(Y) {
+ L(Y) || Y.execCommand("selectAll");
+ }, l.selectBetweenBrackets = function(Y) {
+ if (!L(Y))
+ return o.Pass;
+ }, l.goToBracket = function(Y) {
+ Y.extendSelectionsBy(function(ue) {
+ var le = Y.scanForBracket(ue.head, 1, F(Y.getTokenTypeAt(ue.head)));
+ if (le && o.cmpPos(le.pos, ue.head) != 0)
+ return le.pos;
+ var be = Y.scanForBracket(ue.head, -1, F(Y.getTokenTypeAt(f(ue.head.line, ue.head.ch + 1))));
+ return be && f(be.pos.line, be.pos.ch + 1) || ue.head;
+ });
+ }, l.swapLineUp = function(Y) {
+ if (Y.isReadOnly())
+ return o.Pass;
+ for (var ue = Y.listSelections(), le = [], be = Y.firstLine() - 1, ke = [], de = 0; de < ue.length; de++) {
+ var Te = ue[de], xe = Te.from().line - 1, ie = Te.to().line;
+ ke.push({ anchor: f(Te.anchor.line - 1, Te.anchor.ch), head: f(Te.head.line - 1, Te.head.ch) }), Te.to().ch != 0 || Te.empty() || --ie, xe > be ? le.push(xe, ie) : le.length && (le[le.length - 1] = ie), be = ie;
+ }
+ Y.operation(function() {
+ for (var Be = 0; Be < le.length; Be += 2) {
+ var te = le[Be], Me = le[Be + 1], ve = Y.getLine(te);
+ Y.replaceRange("", f(te, 0), f(te + 1, 0), "+swapLine"), Me > Y.lastLine() ? Y.replaceRange(`
+` + ve, f(Y.lastLine()), null, "+swapLine") : Y.replaceRange(ve + `
+`, f(Me, 0), null, "+swapLine");
+ }
+ Y.setSelections(ke), Y.scrollIntoView();
+ });
+ }, l.swapLineDown = function(Y) {
+ if (Y.isReadOnly())
+ return o.Pass;
+ for (var ue = Y.listSelections(), le = [], be = Y.lastLine() + 1, ke = ue.length - 1; ke >= 0; ke--) {
+ var de = ue[ke], Te = de.to().line + 1, xe = de.from().line;
+ de.to().ch != 0 || de.empty() || Te--, Te < be ? le.push(Te, xe) : le.length && (le[le.length - 1] = xe), be = xe;
+ }
+ Y.operation(function() {
+ for (var ie = le.length - 2; ie >= 0; ie -= 2) {
+ var Be = le[ie], te = le[ie + 1], Me = Y.getLine(Be);
+ Be == Y.lastLine() ? Y.replaceRange("", f(Be - 1), f(Be), "+swapLine") : Y.replaceRange("", f(Be, 0), f(Be + 1, 0), "+swapLine"), Y.replaceRange(Me + `
+`, f(te, 0), null, "+swapLine");
+ }
+ Y.scrollIntoView();
+ });
+ }, l.toggleCommentIndented = function(Y) {
+ Y.toggleComment({ indent: !0 });
+ }, l.joinLines = function(Y) {
+ for (var ue = Y.listSelections(), le = [], be = 0; be < ue.length; be++) {
+ for (var ke = ue[be], de = ke.from(), Te = de.line, xe = ke.to().line; be < ue.length - 1 && ue[be + 1].from().line == xe; )
+ xe = ue[++be].to().line;
+ le.push({ start: Te, end: xe, anchor: !ke.empty() && de });
+ }
+ Y.operation(function() {
+ for (var ie = 0, Be = [], te = 0; te < le.length; te++) {
+ for (var Me, ve = le[te], ge = ve.anchor && f(ve.anchor.line - ie, ve.anchor.ch), Je = ve.start; Je <= ve.end; Je++) {
+ var ot = Je - ie;
+ Je == ve.end && (Me = f(ot, Y.getLine(ot).length + 1)), ot < Y.lastLine() && (Y.replaceRange(" ", f(ot), f(ot + 1, /^\s*/.exec(Y.getLine(ot + 1))[0].length)), ++ie);
+ }
+ Be.push({ anchor: ge || Me, head: Me });
+ }
+ Y.setSelections(Be, 0);
+ });
+ }, l.duplicateLine = function(Y) {
+ Y.operation(function() {
+ for (var ue = Y.listSelections().length, le = 0; le < ue; le++) {
+ var be = Y.listSelections()[le];
+ be.empty() ? Y.replaceRange(Y.getLine(be.head.line) + `
+`, f(be.head.line, 0)) : Y.replaceRange(Y.getRange(be.from(), be.to()), be.from());
+ }
+ Y.scrollIntoView();
+ });
+ }, l.sortLines = function(Y) {
+ U(Y, !0);
+ }, l.sortLinesInsensitive = function(Y) {
+ U(Y, !1);
+ }, l.nextBookmark = function(Y) {
+ var ue = Y.state.sublimeBookmarks;
+ if (ue)
+ for (; ue.length; ) {
+ var le = ue.shift(), be = le.find();
+ if (be)
+ return ue.push(le), Y.setSelection(be.from, be.to);
+ }
+ }, l.prevBookmark = function(Y) {
+ var ue = Y.state.sublimeBookmarks;
+ if (ue)
+ for (; ue.length; ) {
+ ue.unshift(ue.pop());
+ var le = ue[ue.length - 1].find();
+ if (le)
+ return Y.setSelection(le.from, le.to);
+ ue.pop();
+ }
+ }, l.toggleBookmark = function(Y) {
+ for (var ue = Y.listSelections(), le = Y.state.sublimeBookmarks || (Y.state.sublimeBookmarks = []), be = 0; be < ue.length; be++) {
+ for (var ke = ue[be].from(), de = ue[be].to(), Te = ue[be].empty() ? Y.findMarksAt(ke) : Y.findMarks(ke, de), xe = 0; xe < Te.length; xe++)
+ if (Te[xe].sublimeBookmark) {
+ Te[xe].clear();
+ for (var ie = 0; ie < le.length; ie++)
+ le[ie] == Te[xe] && le.splice(ie--, 1);
+ break;
+ }
+ xe == Te.length && le.push(Y.markText(ke, de, { sublimeBookmark: !0, clearWhenEmpty: !1 }));
+ }
+ }, l.clearBookmarks = function(Y) {
+ var ue = Y.state.sublimeBookmarks;
+ if (ue)
+ for (var le = 0; le < ue.length; le++)
+ ue[le].clear();
+ ue.length = 0;
+ }, l.selectBookmarks = function(Y) {
+ var ue = Y.state.sublimeBookmarks, le = [];
+ if (ue)
+ for (var be = 0; be < ue.length; be++) {
+ var ke = ue[be].find();
+ ke ? le.push({ anchor: ke.from, head: ke.to }) : ue.splice(be--, 0);
+ }
+ le.length && Y.setSelections(le, 0);
+ }, l.smartBackspace = function(Y) {
+ if (Y.somethingSelected())
+ return o.Pass;
+ Y.operation(function() {
+ for (var ue = Y.listSelections(), le = Y.getOption("indentUnit"), be = ue.length - 1; be >= 0; be--) {
+ var ke = ue[be].head, de = Y.getRange({ line: ke.line, ch: 0 }, ke), Te = o.countColumn(de, null, Y.getOption("tabSize")), xe = Y.findPosH(ke, -1, "char", !1);
+ if (de && !/\S/.test(de) && Te % le == 0) {
+ var ie = new f(ke.line, o.findColumn(de, Te - le, le));
+ ie.ch != ke.ch && (xe = ie);
+ }
+ Y.replaceRange("", xe, ke, "+delete");
+ }
+ });
+ }, l.delLineRight = function(Y) {
+ Y.operation(function() {
+ for (var ue = Y.listSelections(), le = ue.length - 1; le >= 0; le--)
+ Y.replaceRange("", ue[le].anchor, f(ue[le].to().line), "+delete");
+ Y.scrollIntoView();
+ });
+ }, l.upcaseAtCursor = function(Y) {
+ q(Y, function(ue) {
+ return ue.toUpperCase();
+ });
+ }, l.downcaseAtCursor = function(Y) {
+ q(Y, function(ue) {
+ return ue.toLowerCase();
+ });
+ }, l.setSublimeMark = function(Y) {
+ Y.state.sublimeMark && Y.state.sublimeMark.clear(), Y.state.sublimeMark = Y.setBookmark(Y.getCursor());
+ }, l.selectToSublimeMark = function(Y) {
+ var ue = Y.state.sublimeMark && Y.state.sublimeMark.find();
+ ue && Y.setSelection(Y.getCursor(), ue);
+ }, l.deleteToSublimeMark = function(Y) {
+ var ue = Y.state.sublimeMark && Y.state.sublimeMark.find();
+ if (ue) {
+ var le = Y.getCursor(), be = ue;
+ if (o.cmpPos(le, be) > 0) {
+ var ke = be;
+ be = le, le = ke;
+ }
+ Y.state.sublimeKilled = Y.getRange(le, be), Y.replaceRange("", le, be);
+ }
+ }, l.swapWithSublimeMark = function(Y) {
+ var ue = Y.state.sublimeMark && Y.state.sublimeMark.find();
+ ue && (Y.state.sublimeMark.clear(), Y.state.sublimeMark = Y.setBookmark(Y.getCursor()), Y.setCursor(ue));
+ }, l.sublimeYank = function(Y) {
+ Y.state.sublimeKilled != null && Y.replaceSelection(Y.state.sublimeKilled, null, "paste");
+ }, l.showInCenter = function(Y) {
+ var ue = Y.cursorCoords(null, "local");
+ Y.scrollTo(null, (ue.top + ue.bottom) / 2 - Y.getScrollInfo().clientHeight / 2);
+ }, l.findUnder = function(Y) {
+ R(Y, !0);
+ }, l.findUnderPrevious = function(Y) {
+ R(Y, !1);
+ }, l.findAllUnder = function(Y) {
+ var ue = Z(Y);
+ if (ue) {
+ for (var le = Y.getSearchCursor(ue.query), be = [], ke = -1; le.findNext(); )
+ be.push({ anchor: le.from(), head: le.to() }), le.from().line <= ue.from.line && le.from().ch <= ue.from.ch && ke++;
+ Y.setSelections(be, ke);
+ }
+ };
+ var J = o.keyMap;
+ J.macSublime = { "Cmd-Left": "goLineStartSmart", "Shift-Tab": "indentLess", "Shift-Ctrl-K": "deleteLine", "Alt-Q": "wrapLines", "Ctrl-Left": "goSubwordLeft", "Ctrl-Right": "goSubwordRight", "Ctrl-Alt-Up": "scrollLineUp", "Ctrl-Alt-Down": "scrollLineDown", "Cmd-L": "selectLine", "Shift-Cmd-L": "splitSelectionByLine", Esc: "singleSelectionTop", "Cmd-Enter": "insertLineAfter", "Shift-Cmd-Enter": "insertLineBefore", "Cmd-D": "selectNextOccurrence", "Shift-Cmd-Space": "selectScope", "Shift-Cmd-M": "selectBetweenBrackets", "Cmd-M": "goToBracket", "Cmd-Ctrl-Up": "swapLineUp", "Cmd-Ctrl-Down": "swapLineDown", "Cmd-/": "toggleCommentIndented", "Cmd-J": "joinLines", "Shift-Cmd-D": "duplicateLine", F5: "sortLines", "Cmd-F5": "sortLinesInsensitive", F2: "nextBookmark", "Shift-F2": "prevBookmark", "Cmd-F2": "toggleBookmark", "Shift-Cmd-F2": "clearBookmarks", "Alt-F2": "selectBookmarks", Backspace: "smartBackspace", "Cmd-K Cmd-D": "skipAndSelectNextOccurrence", "Cmd-K Cmd-K": "delLineRight", "Cmd-K Cmd-U": "upcaseAtCursor", "Cmd-K Cmd-L": "downcaseAtCursor", "Cmd-K Cmd-Space": "setSublimeMark", "Cmd-K Cmd-A": "selectToSublimeMark", "Cmd-K Cmd-W": "deleteToSublimeMark", "Cmd-K Cmd-X": "swapWithSublimeMark", "Cmd-K Cmd-Y": "sublimeYank", "Cmd-K Cmd-C": "showInCenter", "Cmd-K Cmd-G": "clearBookmarks", "Cmd-K Cmd-Backspace": "delLineLeft", "Cmd-K Cmd-1": "foldAll", "Cmd-K Cmd-0": "unfoldAll", "Cmd-K Cmd-J": "unfoldAll", "Ctrl-Shift-Up": "addCursorToPrevLine", "Ctrl-Shift-Down": "addCursorToNextLine", "Cmd-F3": "findUnder", "Shift-Cmd-F3": "findUnderPrevious", "Alt-F3": "findAllUnder", "Shift-Cmd-[": "fold", "Shift-Cmd-]": "unfold", "Cmd-I": "findIncremental", "Shift-Cmd-I": "findIncrementalReverse", "Cmd-H": "replace", F3: "findNext", "Shift-F3": "findPrev", fallthrough: "macDefault" }, o.normalizeKeyMap(J.macSublime), J.pcSublime = { "Shift-Tab": "indentLess", "Shift-Ctrl-K": "deleteLine", "Alt-Q": "wrapLines", "Ctrl-T": "transposeChars", "Alt-Left": "goSubwordLeft", "Alt-Right": "goSubwordRight", "Ctrl-Up": "scrollLineUp", "Ctrl-Down": "scrollLineDown", "Ctrl-L": "selectLine", "Shift-Ctrl-L": "splitSelectionByLine", Esc: "singleSelectionTop", "Ctrl-Enter": "insertLineAfter", "Shift-Ctrl-Enter": "insertLineBefore", "Ctrl-D": "selectNextOccurrence", "Shift-Ctrl-Space": "selectScope", "Shift-Ctrl-M": "selectBetweenBrackets", "Ctrl-M": "goToBracket", "Shift-Ctrl-Up": "swapLineUp", "Shift-Ctrl-Down": "swapLineDown", "Ctrl-/": "toggleCommentIndented", "Ctrl-J": "joinLines", "Shift-Ctrl-D": "duplicateLine", F9: "sortLines", "Ctrl-F9": "sortLinesInsensitive", F2: "nextBookmark", "Shift-F2": "prevBookmark", "Ctrl-F2": "toggleBookmark", "Shift-Ctrl-F2": "clearBookmarks", "Alt-F2": "selectBookmarks", Backspace: "smartBackspace", "Ctrl-K Ctrl-D": "skipAndSelectNextOccurrence", "Ctrl-K Ctrl-K": "delLineRight", "Ctrl-K Ctrl-U": "upcaseAtCursor", "Ctrl-K Ctrl-L": "downcaseAtCursor", "Ctrl-K Ctrl-Space": "setSublimeMark", "Ctrl-K Ctrl-A": "selectToSublimeMark", "Ctrl-K Ctrl-W": "deleteToSublimeMark", "Ctrl-K Ctrl-X": "swapWithSublimeMark", "Ctrl-K Ctrl-Y": "sublimeYank", "Ctrl-K Ctrl-C": "showInCenter", "Ctrl-K Ctrl-G": "clearBookmarks", "Ctrl-K Ctrl-Backspace": "delLineLeft", "Ctrl-K Ctrl-1": "foldAll", "Ctrl-K Ctrl-0": "unfoldAll", "Ctrl-K Ctrl-J": "unfoldAll", "Ctrl-Alt-Up": "addCursorToPrevLine", "Ctrl-Alt-Down": "addCursorToNextLine", "Ctrl-F3": "findUnder", "Shift-Ctrl-F3": "findUnderPrevious", "Alt-F3": "findAllUnder", "Shift-Ctrl-[": "fold", "Shift-Ctrl-]": "unfold", "Ctrl-I": "findIncremental", "Shift-Ctrl-I": "findIncrementalReverse", "Ctrl-H": "replace", F3: "findNext", "Shift-F3": "findPrev", fallthrough: "pcDefault" }, o.normalizeKeyMap(J.pcSublime);
+ var he = J.default == J.macDefault;
+ J.sublime = he ? J.macSublime : J.pcSublime;
+ })(m2);
+}), su(function(r, i) {
+ (function(o) {
+ var l;
+ function f(k) {
+ var _ = this;
+ function T(xe) {
+ _.searchBox = xe.querySelector(".ace_search_form"), _.replaceBox = xe.querySelector(".ace_replace_form"), _.searchOptions = xe.querySelector(".ace_search_options"), _.regExpOption = xe.querySelector("[action=toggleRegexpMode]"), _.caseSensitiveOption = xe.querySelector("[action=toggleCaseSensitive]"), _.wholeWordOption = xe.querySelector("[action=toggleWholeWords]"), _.searchInput = _.searchBox.querySelector(".ace_search_field"), _.replaceInput = _.replaceBox.querySelector(".ace_search_field");
+ }
+ function L() {
+ var xe = _.element = Te();
+ de(), T(xe), F(), xe.addEventListener("mousedown", function(ie) {
+ setTimeout(function() {
+ _.activeInput.focus();
+ }, 0), ie.stopPropagation();
+ }), xe.addEventListener("click", function(ie) {
+ var Be = (ie.target || ie.srcElement).getAttribute("action");
+ Be && _[Be] ? _[Be]() : _.commands[Be] && _.commands[Be](), ie.stopPropagation();
+ }), _.searchInput.addEventListener("input", function() {
+ _.$onChange.schedule(20);
+ }), _.searchInput.addEventListener("focus", function() {
+ _.activeInput = _.searchInput;
+ }), _.replaceInput.addEventListener("focus", function() {
+ _.activeInput = _.replaceInput;
+ }), _.$onChange = A(function() {
+ _.find(!1, !1);
+ });
+ }
+ function F() {
+ var xe = _, ie = { "Ctrl-F|Cmd-F|Ctrl-H|Command-Alt-F": function() {
+ var Be = xe.isReplace = !xe.isReplace;
+ xe.replaceBox.style.display = Be ? "" : "none", xe[Be ? "replaceInput" : "searchInput"].focus();
+ }, "Ctrl-G|Cmd-G": function() {
+ xe.findNext();
+ }, "Ctrl-Shift-G|Cmd-Shift-G": function() {
+ xe.findPrev();
+ }, Esc: function() {
+ setTimeout(function() {
+ xe.hide();
+ });
+ }, Enter: function() {
+ xe.activeInput === xe.replaceInput && xe.replace(), xe.findNext();
+ }, "Shift-Enter": function() {
+ xe.activeInput === xe.replaceInput && xe.replace(), xe.findPrev();
+ }, "Alt-Enter": function() {
+ xe.activeInput === xe.replaceInput && xe.replaceAll(), xe.findAll();
+ }, Tab: function() {
+ _.activeInput === _.replaceInput ? _.searchInput.focus() : _.replaceInput.focus();
+ } };
+ _.element.addEventListener("keydown", function(Be) {
+ Object.keys(ie).some(function(te) {
+ var Me = b(te, Be);
+ return Me && (Be.stopPropagation(), Be.preventDefault(), ie[te](Be)), Me;
+ });
+ });
+ }
+ function U(xe, ie, Be) {
+ if (!xe)
+ return be(k), void ke();
+ var te, Me, ve, ge, Je, ot, bt, gt = xe, je = ie, Qe = !0, kt = je.caseSensitive, Wt = je.regExp, jt = je.wholeWord;
+ Wt && (gt = gt.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&")), jt && (gt = kt ? gt = RegExp("\\b" + gt + "\\b") : RegExp("\\b" + gt + "\\b", "i")), Wt && (gt = RegExp(gt)), be(k), q(k, gt, kt), ke(), bt = je.backwards ? je.skipCurrent ? "from" : "to" : je.skipCurrent ? "to" : "from", ot = k.getCursor(bt), ge = (ve = k.getSearchCursor(gt, ot, !kt)).findNext.bind(ve), Je = ve.findPrevious.bind(ve), ve.matches.bind(ve), je.backwards && !Je() ? (Qe = ge()) && (k.setCursor(k.doc.size - 1, 0), U(xe, ie, Be), te = !0) : je.backwards || ge() || (Qe = Je()) && (k.setCursor(0, 0), U(xe, ie, Be), te = !0), Me = !Qe && _.searchInput.value, g(_.searchBox, "ace_nomatch", Me), !te && Qe && Be(ve);
+ }
+ function q(xe, ie, Be) {
+ var te = le(xe), Me = ie;
+ Me && Me !== te.queryText && (J(xe, te, Me, Be), te.posFrom = te.posTo = xe.getCursor());
+ }
+ function Z(xe) {
+ return xe.replace(/\\([nrt\\])/g, function(ie, Be) {
+ return Be == "n" ? `
+` : Be == "r" ? "\r" : Be == "t" ? " " : Be == "\\" ? "\\" : ie;
+ });
+ }
+ function R(xe) {
+ var ie = (typeof xe == "object" ? xe.toString() : xe).match(/^\/(.*)\/([a-z]*)$/);
+ if (ie)
+ try {
+ xe = new RegExp(ie[1], ie[2].indexOf("i") == -1 ? "" : "i");
+ } catch {
+ }
+ else
+ xe = Z(xe);
+ return (typeof xe == "string" ? xe == "" : xe.test("")) && (xe = /x^/), xe;
+ }
+ function J(xe, ie, Be, te) {
+ ie.queryText = Be, ie.query = R(Be), xe.removeOverlay(ie.overlay, he(ie.query, te)), ie.overlay = Y(ie.query, he(ie.query, te)), xe.addOverlay(ie.overlay), xe.showMatchesOnScrollbar && (ie.annotate && (ie.annotate.clear(), ie.annotate = null), ie.annotate = xe.showMatchesOnScrollbar(ie.query, he(ie.query, te)));
+ }
+ function he(xe, ie) {
+ return typeof xe == "string" && !ie;
+ }
+ function Y(xe, ie) {
+ return typeof xe == "string" ? xe = new RegExp(xe.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), ie ? "gi" : "g") : xe.global || (xe = new RegExp(xe.source, xe.ignoreCase ? "gi" : "g")), { token: function(Be) {
+ xe.lastIndex = Be.pos;
+ var te = xe.exec(Be.string);
+ if (te && te.index == Be.pos)
+ return Be.pos += te[0].length || 1, "searching";
+ te ? Be.pos = te.index : Be.skipToEnd();
+ } };
+ }
+ function ue() {
+ this.posFrom = this.posTo = this.lastQuery = this.query = null, this.overlay = null;
+ }
+ function le(xe) {
+ return xe.state.search || (xe.state.search = new ue());
+ }
+ function be(xe) {
+ xe.operation(function() {
+ var ie = le(xe);
+ ie.lastQuery = ie.query, ie.query && (ie.query = ie.queryText = null, xe.removeOverlay(ie.overlay), ie.annotate && (ie.annotate.clear(), ie.annotate = null));
+ });
+ }
+ function ke() {
+ var xe, ie = _.searchInput.value, Be = [];
+ ie && (ie = ie.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), xe = _.caseSensitiveOption.checked ? RegExp(ie, "g") : RegExp(ie, "gi"), _.wholeWordOption.checked && (xe = _.caseSensitiveOption.checked ? RegExp("\\b" + ie + "\\b", "g") : RegExp("\\b" + ie + "\\b", "gi")), _.regExpOption.checked && (xe = RegExp(ie, "gi")), Be = k.getValue().match(xe));
+ var te = Be ? Be.length : 0, Me = k.display.wrapper.parentElement.querySelector(".ace_search_counter");
+ Me && (Me.innerText = te + " matches found."), te === 0 && k.setSelection({ ch: 0, line: 0 }, { ch: 0, line: 0 });
+ }
+ function de() {
+ var xe = document.createElement("style"), ie = [".ace_search {", "color: black;", "background-color: #ddd;", "border: 1px solid #cbcbcb;", "border-top: 0 none;", "max-width: 325px;", "overflow: hidden;", "margin: 0;", "padding: 4px;", "padding-right: 6px;", "padding-bottom: 0;", "position: absolute;", "top: 0px;", "z-index: 99;", "white-space: normal;", "font-size: 12px;", "}", ".ace_search.left {", "border-left: 0 none;", "border-radius: 0px 0px 5px 0px;", "left: 0;", "}", ".ace_search.right {", "border-radius: 0px 0px 0px 5px;", "border-right: 0 none;", "right: 0;", "}", ".ace_search_form, .ace_replace_form {", "border-radius: 3px;", "border: 1px solid #cbcbcb;", "float: left;", "margin-bottom: 4px;", "overflow: hidden;", "}", ".ace_search_form.ace_nomatch {", "outline: 1px solid red;", "}", ".ace_search_field {", "background-color: white;", "border-right: 1px solid #cbcbcb;", "border: 0 none;", "-webkit-box-sizing: border-box;", "-moz-box-sizing: border-box;", "box-sizing: border-box;", "float: left;", "height: 22px;", "outline: 0;", "padding: 0 7px;", "width: 238px;", "margin: 0;", "}", ".ace_searchbtn,", ".ace_replacebtn {", "background: #fff;", "border: 0 none;", "border-left: 1px solid #dcdcdc;", "cursor: pointer;", "float: left;", "height: 22px;", "padding: 0 5px;", "margin: 0;", "position: relative;", "}", ".ace_searchbtn:last-child,", ".ace_replacebtn:last-child {", "border-top-right-radius: 3px;", "border-bottom-right-radius: 3px;", "}", ".ace_searchbtn:disabled {", "background: none;", "cursor: default;", "}", ".ace_searchbtn {", "background-position: 50% 50%;", "background-repeat: no-repeat;", "width: 27px;", "}", ".ace_searchbtn.prev {", "background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADFJREFUeNpiSU1NZUAC/6E0I0yACYskCpsJiySKIiY0SUZk40FyTEgCjGgKwTRAgAEAQJUIPCE+qfkAAAAASUVORK5CYII=); ", "}", ".ace_searchbtn.next {", "background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADRJREFUeNpiTE1NZQCC/0DMyIAKwGJMUAYDEo3M/s+EpvM/mkKwCQxYjIeLMaELoLMBAgwAU7UJObTKsvAAAAAASUVORK5CYII=); ", "}", ".ace_searchbtn_close {", "background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;", "border-radius: 50%;", "border: 0 none;", "color: #656565;", "cursor: pointer;", "float: right;", "font: 16px/16px Arial;", "height: 14px;", "margin: 5px 1px 9px 5px;", "padding: 0;", "text-align: center;", "width: 14px;", "}", ".ace_searchbtn_close:hover {", "background-color: #656565;", "background-position: 50% 100%;", "color: white;", "}", ".ace_replacebtn.prev {", "width: 54px", "}", ".ace_replacebtn.next {", "width: 27px", "}", ".ace_button {", "margin-left: 2px;", "cursor: pointer;", "-webkit-user-select: none;", "-moz-user-select: none;", "-o-user-select: none;", "-ms-user-select: none;", "user-select: none;", "overflow: hidden;", "opacity: 0.7;", "border: 1px solid rgba(100,100,100,0.23);", "padding: 1px;", "-moz-box-sizing: border-box;", "box-sizing: border-box;", "color: black;", "}", ".ace_button:hover {", "background-color: #eee;", "opacity:1;", "}", ".ace_button:active {", "background-color: #ddd;", "}", ".ace_button.checked {", "border-color: #3399ff;", "opacity:1;", "}", ".ace_search_options{", "clear: both;", "margin: 4px 0;", "text-align: right;", "-webkit-user-select: none;", "-moz-user-select: none;", "-o-user-select: none;", "-ms-user-select: none;", "user-select: none;", "}", ".replace_toggle{", "float: left;", "margin-top: -2px;", "padding: 0 5px;", " }", ".ace_search_counter{", "float: left;", "font-family: arial;", "padding: 0 8px;", "}", "button svg,path {", "pointer-events: none;", "}"].join("");
+ xe.setAttribute("data-name", "js-searchbox"), xe.textContent = ie, document.head.appendChild(xe);
+ }
+ function Te() {
+ var xe, ie = k.getWrapperElement(), Be = document.createElement("div"), te = ['
', '
', '
', '', '', '', "
", '
", '
', '+', '0 matches found.', '', 'Aa', '', "
", "
"].join("");
+ return Be.innerHTML = te, xe = Be.firstChild, ie.appendChild(xe), xe;
+ }
+ L(), this.commands = { toggleRegexpMode: function() {
+ _.regExpOption.checked = !_.regExpOption.checked, _.$syncOptions();
+ }, toggleCaseSensitive: function() {
+ _.caseSensitiveOption.checked = !_.caseSensitiveOption.checked, _.$syncOptions();
+ }, toggleWholeWords: function() {
+ _.wholeWordOption.checked = !_.wholeWordOption.checked, _.$syncOptions();
+ } }, this.$syncOptions = function() {
+ g(this.regExpOption, "checked", this.regExpOption.checked), g(this.wholeWordOption, "checked", this.wholeWordOption.checked), g(this.caseSensitiveOption, "checked", this.caseSensitiveOption.checked), this.find(!1, !1);
+ }, this.find = function(xe, ie) {
+ U(this.searchInput.value, { skipCurrent: xe, backwards: ie, regExp: this.regExpOption.checked, caseSensitive: this.caseSensitiveOption.checked, wholeWord: this.wholeWordOption.checked }, function(Be) {
+ var te = Be.matches(!1, Be.from());
+ k.setSelection(te.from, te.to);
+ });
+ }, this.findNext = function() {
+ this.find(!0, !1);
+ }, this.findPrev = function() {
+ this.find(!0, !0);
+ }, this.findAll = function() {
+ var xe = this.searchInput.value, ie = this.searchInput.value;
+ g(this.searchBox, "ace_nomatch", ie), k.showMatchesOnScrollbar && k.showMatchesOnScrollbar(xe), this.hide();
+ }, this.replace = function() {
+ var xe = k.getOption("readOnly"), ie = !!k.getSelection();
+ !xe && ie && k.replaceSelection(this.replaceInput.value, "start"), ke();
+ }, this.replaceAndFindNext = function() {
+ k.getOption("readOnly") || (this.replace(), this.findNext());
+ }, this.replaceAll = function() {
+ var xe, ie, Be = this.searchInput.value, te = this.replaceInput.value, Me = RegExp(Be, this.caseSensitiveOption.checked ? "g" : "gi");
+ this.wholeWordOption.checked && !this.regExpOption.checked && (Me = this.caseSensitiveOption.checked ? RegExp("\\b" + Be + "\\b", "g") : RegExp("\\b" + Be + "\\b", "gi")), !k.getOption("readOnly") && k.getSelection() && (ie = k.getCursor(), xe = (xe = k.getValue()).replace(Me, te), k.setValue(xe), k.setCursor(ie)), ke();
+ }, this.toggleReplace = function() {
+ var xe = k.display.wrapper;
+ xe.parentElement.querySelector("[action=toggleReplace]").innerText === "+" ? (xe.parentElement.querySelector("[action=toggleReplace]").innerText = "-", this.replaceBox.style.display = "", this.isReplace = !0) : (xe.parentElement.querySelector("[action=toggleReplace]").innerText = "+", this.replaceBox.style.display = "none", this.isReplace = !1);
+ }, this.hide = function() {
+ be(k);
+ var xe = k.getWrapperElement();
+ l = null, xe.removeChild(this.element), k.focus();
+ }, this.isVisible = function() {
+ return this.element.style.display === "";
+ }, this.show = function(xe, ie) {
+ this.element.style.display = "", ie || (this.replaceBox.style.display = ie ? "" : "none"), this.isReplace = ie, xe && (this.searchInput.value = xe, this.find(!1, !1)), this.searchInput.focus(), this.searchInput.select();
+ }, this.isFocused = function() {
+ var xe = document.activeElement;
+ return xe === this.searchInput || xe === this.replaceInput;
+ };
+ }
+ function g(k, _, T) {
+ k.classList[T ? "add" : "remove"](_);
+ }
+ function A(k, _) {
+ var T, L = function() {
+ T = null, k();
+ }, F = function(U) {
+ T || (T = setTimeout(L, U || _));
+ };
+ return F.delay = function(U) {
+ T && clearTimeout(T), T = setTimeout(L, U || _);
+ }, F.schedule = F, F.call = function() {
+ this.cancel(), k();
+ }, F.cancel = function() {
+ T && clearTimeout(T), T = null;
+ }, F.isPending = function() {
+ return T;
+ }, F;
+ }
+ function b(k, _) {
+ var T, L = { BACKSPACE: 8, TAB: 9, ENTER: 13, ESC: 27, SPACE: 32, PAGE_UP: 33, PAGE_DOWN: 34, END: 35, HOME: 36, UP: 38, DOWN: 40, INSERT: 45, DELETE: 46, INSERT_MAC: 96, ASTERISK: 106, PLUS: 107, MINUS: 109, F1: 112, F2: 113, F3: 114, F4: 115, F5: 116, F6: 117, F7: 118, F8: 119, F9: 120, F10: 121, SLASH: 191, TRA: 192, BACKSLASH: 220 };
+ return v(k, _), T = k.split("|").some(function(F) {
+ var U;
+ return U = F.split("-").some(function(q) {
+ var Z;
+ switch (q) {
+ case "Ctrl":
+ Z = _.ctrlKey;
+ break;
+ case "Shift":
+ Z = _.shiftKey;
+ break;
+ case "Alt":
+ Z = _.altKey;
+ break;
+ case "Cmd":
+ Z = _.metaKey;
+ break;
+ default:
+ q.length === 1 ? Z = _.keyCode === q.charCodeAt(0) : Object.keys(L).some(function(R) {
+ q.toUpperCase() === R && (Z = _.keyCode === L[R]);
+ });
+ }
+ return !Z;
+ }), !U;
+ }), T;
+ }
+ function v(k, _) {
+ if (typeof k != "string")
+ throw Error("str should be string!");
+ if (typeof _ != "object")
+ throw Error("event should be object!");
+ }
+ o.defineOption("searchbox", !1, function(k) {
+ k.addKeyMap({ "Ctrl-F": function() {
+ var _ = k.display.wrapper;
+ l && _.parentElement.contains(l.searchBox) || (l = new f(k));
+ var T = !1;
+ _.parentElement.querySelector("[action=toggleReplace]") && (T = _.parentElement.querySelector("[action=toggleReplace]").innerText === "-"), l.show(k.getSelection(), T);
+ }, Esc: function() {
+ if (!l || !l.isVisible())
+ return o.Pass;
+ l.hide(), typeof event < "u" && event.stopPropagation();
+ }, "Cmd-F": function() {
+ var _ = k.display.wrapper;
+ l && _.parentElement.contains(l.searchBox) || (l = new f(k));
+ var T = !1;
+ _.parentElement.querySelector("[action=toggleReplace]") && (T = _.parentElement.querySelector("[action=toggleReplace]").innerText === "-"), l.show(k.getSelection(), T);
+ } });
+ });
+ })(m2);
+});
+su(function(r, i) {
+ (function(o) {
+ function l(f, g) {
+ function A(v) {
+ clearTimeout(b.doRedraw), b.doRedraw = setTimeout(function() {
+ b.redraw();
+ }, v);
+ }
+ this.cm = f, this.options = g, this.buttonHeight = g.scrollButtonHeight || f.getOption("scrollButtonHeight"), this.annotations = [], this.doRedraw = this.doUpdate = null, this.div = f.getWrapperElement().appendChild(document.createElement("div")), this.div.style.cssText = "position: absolute; right: 0; top: 0; z-index: 7; pointer-events: none", this.computeScale();
+ var b = this;
+ f.on("refresh", this.resizeHandler = function() {
+ clearTimeout(b.doUpdate), b.doUpdate = setTimeout(function() {
+ b.computeScale() && A(20);
+ }, 100);
+ }), f.on("markerAdded", this.resizeHandler), f.on("markerCleared", this.resizeHandler), g.listenForChanges !== !1 && f.on("changes", this.changeHandler = function() {
+ A(250);
+ });
+ }
+ o.defineExtension("annotateScrollbar", function(f) {
+ return typeof f == "string" && (f = { className: f }), new l(this, f);
+ }), o.defineOption("scrollButtonHeight", 0), l.prototype.computeScale = function() {
+ var f = this.cm, g = (f.getWrapperElement().clientHeight - f.display.barHeight - 2 * this.buttonHeight) / f.getScrollerElement().scrollHeight;
+ if (g != this.hScale)
+ return this.hScale = g, !0;
+ }, l.prototype.update = function(f) {
+ this.annotations = f, this.redraw();
+ }, l.prototype.redraw = function(f) {
+ f !== !1 && this.computeScale();
+ var g = this.cm, A = this.hScale, b = document.createDocumentFragment(), v = this.annotations, k = g.getOption("lineWrapping"), _ = k && 1.5 * g.defaultTextHeight(), T = null, L = null;
+ function F(le, be) {
+ if (T != le.line) {
+ T = le.line, L = g.getLineHandle(le.line);
+ var ke = g.getLineHandleVisualStart(L);
+ ke != L && (T = g.getLineNumber(ke), L = ke);
+ }
+ return L.widgets && L.widgets.length || k && L.height > _ ? g.charCoords(le, "local")[be ? "top" : "bottom"] : g.heightAtLine(L, "local") + (be ? 0 : L.height);
+ }
+ var U = g.lastLine();
+ if (g.display.barWidth)
+ for (var q, Z = 0; Z < v.length; Z++) {
+ var R = v[Z];
+ if (!(R.to.line > U)) {
+ for (var J = q || F(R.from, !0) * A, he = F(R.to, !1) * A; Z < v.length - 1 && !(v[Z + 1].to.line > U) && !((q = F(v[Z + 1].from, !0) * A) > he + 0.9); )
+ he = F((R = v[++Z]).to, !1) * A;
+ if (he != J) {
+ var Y = Math.max(he - J, 3), ue = b.appendChild(document.createElement("div"));
+ ue.style.cssText = "position: absolute; right: 0px; width: " + Math.max(g.display.barWidth - 1, 2) + "px; top: " + (J + this.buttonHeight) + "px; height: " + Y + "px", ue.className = this.options.className, R.id && ue.setAttribute("annotation-id", R.id);
+ }
+ }
+ }
+ this.div.textContent = "", this.div.appendChild(b);
+ }, l.prototype.clear = function() {
+ this.cm.off("refresh", this.resizeHandler), this.cm.off("markerAdded", this.resizeHandler), this.cm.off("markerCleared", this.resizeHandler), this.changeHandler && this.cm.off("changes", this.changeHandler), this.div.parentNode.removeChild(this.div);
+ };
+ })(m2);
+});
+su(function(r, i) {
+ (function(o) {
+ function l(A, b, v, k) {
+ this.cm = A, this.options = k;
+ var _ = { listenForChanges: !1 };
+ for (var T in k)
+ _[T] = k[T];
+ _.className || (_.className = "CodeMirror-search-match"), this.annotation = A.annotateScrollbar(_), this.query = b, this.caseFold = v, this.gap = { from: A.firstLine(), to: A.lastLine() + 1 }, this.matches = [], this.update = null, this.findMatches(), this.annotation.update(this.matches);
+ var L = this;
+ A.on("change", this.changeHandler = function(F, U) {
+ L.onChange(U);
+ });
+ }
+ o.defineExtension("showMatchesOnScrollbar", function(A, b, v) {
+ return typeof v == "string" && (v = { className: v }), v || (v = {}), new l(this, A, b, v);
+ });
+ var f = 1e3;
+ function g(A, b, v) {
+ return A <= b ? A : Math.max(b, A + v);
+ }
+ l.prototype.findMatches = function() {
+ if (this.gap) {
+ for (var A = 0; A < this.matches.length && !((k = this.matches[A]).from.line >= this.gap.to); A++)
+ k.to.line >= this.gap.from && this.matches.splice(A--, 1);
+ for (var b = this.cm.getSearchCursor(this.query, o.Pos(this.gap.from, 0), { caseFold: this.caseFold, multiline: this.options.multiline }), v = this.options && this.options.maxMatches || f; b.findNext(); ) {
+ var k;
+ if ((k = { from: b.from(), to: b.to() }).from.line >= this.gap.to || (this.matches.splice(A++, 0, k), this.matches.length > v))
+ break;
+ }
+ this.gap = null;
+ }
+ }, l.prototype.onChange = function(A) {
+ var b = A.from.line, v = o.changeEnd(A).line, k = v - A.to.line;
+ if (this.gap ? (this.gap.from = Math.min(g(this.gap.from, b, k), A.from.line), this.gap.to = Math.max(g(this.gap.to, b, k), A.from.line)) : this.gap = { from: A.from.line, to: v + 1 }, k)
+ for (var _ = 0; _ < this.matches.length; _++) {
+ var T = this.matches[_], L = g(T.from.line, b, k);
+ L != T.from.line && (T.from = o.Pos(L, T.from.ch));
+ var F = g(T.to.line, b, k);
+ F != T.to.line && (T.to = o.Pos(F, T.to.ch));
+ }
+ clearTimeout(this.update);
+ var U = this;
+ this.update = setTimeout(function() {
+ U.updateAfterChange();
+ }, 250);
+ }, l.prototype.updateAfterChange = function() {
+ this.findMatches(), this.annotation.update(this.matches);
+ }, l.prototype.clear = function() {
+ this.cm.off("change", this.changeHandler), this.annotation.clear();
+ };
+ })(m2);
+}), qa({ target: "Array", stat: !0 }, { isArray: kL });
+var A_t = ql.Array.isArray, g_t = A_t;
+function p_t(r) {
+ if (g_t(r))
+ return r;
+}
+var QO = Oie, d0n = Lie("slice"), A0n = TA("species"), NMe = Qi.Array, g0n = Math.max;
+qa({ target: "Array", proto: !0, forced: !d0n }, { slice: function(r, i) {
+ var o, l, f, g = v5(this), A = Ck(g), b = yL(r, A), v = yL(i === void 0 ? A : i, A);
+ if (kL(g) && (o = g.constructor, (Fbe(o) && (o === NMe || kL(o.prototype)) || Id(o) && (o = o[A0n]) === null) && (o = void 0), o === NMe || o === void 0))
+ return _O(g, b, v);
+ for (l = new (o === void 0 ? NMe : o)(g0n(v - b, 0)), f = 0; b < v; b++, f++)
+ b in g && EO(l, f, g[b]);
+ return l.length = f, l;
+} });
+var p0n = a0("Array").slice, PMe = Array.prototype, m_t = function(r) {
+ var i = r.slice;
+ return r === PMe || E1(PMe, r) && i === PMe.slice ? p0n : i;
+}, b_t = m_t, v_t = d_t;
+function CDe(r, i) {
+ (i == null || i > r.length) && (i = r.length);
+ for (var o = 0, l = new Array(i); o < i; o++)
+ l[o] = r[o];
+ return l;
+}
+function VPe(r, i) {
+ var o;
+ if (r) {
+ if (typeof r == "string")
+ return CDe(r, i);
+ var l = b_t(o = Object.prototype.toString.call(r)).call(o, 8, -1);
+ return l === "Object" && r.constructor && (l = r.constructor.name), l === "Map" || l === "Set" ? v_t(r) : l === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l) ? CDe(r, i) : void 0;
+ }
+}
+function y_t() {
+ throw new TypeError(`Invalid attempt to destructure non-iterable instance.
+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
+}
+function vh(r, i) {
+ return p_t(r) || function(o, l) {
+ var f = o == null ? null : oC !== void 0 && QO(o) || o["@@iterator"];
+ if (f != null) {
+ var g, A, b = [], v = !0, k = !1;
+ try {
+ for (f = f.call(o); !(v = (g = f.next()).done) && (b.push(g.value), !l || b.length !== l); v = !0)
+ ;
+ } catch (_) {
+ k = !0, A = _;
+ } finally {
+ try {
+ v || f.return == null || f.return();
+ } finally {
+ if (k)
+ throw A;
+ }
+ }
+ return b;
+ }
+ }(r, i) || VPe(r, i) || y_t();
+}
+var Lu = s_t, Vre = D9t, Da = m_t, m0n = GPe.trim, Cne = Qi.parseInt, d4t = Qi.Symbol, A4t = d4t && d4t.iterator, w_t = /^[+-]?0x/i, b0n = Do(w_t.exec), g4t = Cne(PG + "08") !== 8 || Cne(PG + "0x16") !== 22 || A4t && !oh(function() {
+ Cne(Object(A4t));
+}) ? function(r, i) {
+ var o = m0n(ah(r));
+ return Cne(o, i >>> 0 || (b0n(w_t, o) ? 16 : 10));
+} : Cne;
+qa({ global: !0, forced: parseInt != g4t }, { parseInt: g4t });
+var Ky = ql.parseInt, v0n = Qi.RangeError;
+qa({ target: "String", proto: !0 }, { repeat: function(r) {
+ var i = ah(DO(this)), o = "", l = cX(r);
+ if (l < 0 || l == 1 / 0)
+ throw v0n("Wrong number of repetitions");
+ for (; l > 0; (l >>>= 1) && (i += i))
+ 1 & l && (o += i);
+ return o;
+} });
+var y0n = a0("String").repeat, RMe = String.prototype, fd = function(r) {
+ var i = r.repeat;
+ return typeof r == "string" || r === RMe || E1(RMe, r) && i === RMe.repeat ? y0n : i;
+}, w0n = { run: function(r) {
+ var i, o = "".concat(r, "
");
+ this.tagParser.formatEngine = this.mdFormatEngine, o = o.replace(//g, "");
+ var l = this.htmlParser.parseHtml(o);
+ return l = this.paragraphStyleClear(l), Go(i = this.$dealHtml(l).replace(/\n{3,}/g, `
+
+
+`).replace(/>/g, ">").replace(/</g, "<").replace(/&/g, "&")).call(i, `
+`);
+}, $dealHtml: function(r) {
+ for (var i = "", o = 0; o < r.length; o++) {
+ var l = r[o];
+ l.type === "tag" ? i = this.$handleTagObject(l, i) : l.type === "text" && l.content.length > 0 && (i += l.content.replace(/ /g, " ").replace(/[\n]+/g, `
+`).replace(/^[ \t\n]+\n\s*$/, `
+`));
+ }
+ return i;
+}, $handleTagObject: function(r, i) {
+ var o, l = i;
+ return r.attrs.class && /(ch-icon-square|ch-icon-check)/.test(r.attrs.class) ? Lu(o = r.attrs.class).call(o, "ch-icon-check") >= 0 ? l += "[x]" : l += "[ ]" : r.attrs.class && /cherry-code-preview-lang-select/.test(r.attrs.class) ? l += "" : l += this.$dealTag(r), l;
+}, $dealTag: function(r) {
+ var i = this, o = "";
+ return r.children && (o = i.$dealHtml(r.children)), /(style|meta|link|script)/.test(r.name) ? "" : r.name === "code" || r.name === "pre" ? i.tagParser.codeParser(r, i.$dealCodeTag(r), r.name === "pre") : typeof i.tagParser["".concat(r.name, "Parser")] == "function" ? i.tagParser["".concat(r.name, "Parser")](r, o) : o;
+}, $dealCodeTag: function(r) {
+ if (r.children.length < 0)
+ return "";
+ for (var i = "", o = 0; o < r.children.length; o++) {
+ var l = r.children[o];
+ l.type !== "text" ? (l.name === "li" && (i += `
+`), l.name === "br" && (i += `
+`), i += this.$dealCodeTag(l)) : i += l.content;
+ }
+ return i;
+}, htmlParser: { attrRE: /([\w-]+)|['"]{1}([^'"]*)['"]{1}/g, lookup: { area: !0, base: !0, br: !0, col: !0, embed: !0, hr: !0, img: !0, video: !0, input: !0, keygen: !0, link: !0, menuitem: !0, meta: !0, param: !0, source: !0, track: !0, wbr: !0 }, tagRE: /<(?:"[^"]*"['"]*|'[^']*'['"]*|[^'">])+>/g, empty: Vre ? Vre(null) : {}, parseTags: function(r) {
+ var i, o = this, l = 0, f = { type: "tag", name: "", voidElement: !1, attrs: {}, children: [] };
+ return r.replace(this.attrRE, function(g) {
+ l % 2 ? i = g : l === 0 ? ((o.lookup[g] || r.charAt(r.length - 2) === "/") && (f.voidElement = !0), f.name = g) : f.attrs[i] = g.replace(/['"]/g, ""), l += 1;
+ }), f;
+}, parseHtml: function(r, i) {
+ var o = this, l = i || {};
+ l.components || (l.components = this.empty);
+ var f, g = [], A = -1, b = [], v = {}, k = !1;
+ return r.replace(this.tagRE, function(_, T) {
+ if (k) {
+ if (_ !== "".concat(f.name, ">"))
+ return;
+ k = !1;
+ }
+ var L, F = _.charAt(1) !== "/", U = T + _.length, q = r.charAt(U);
+ F && (A += 1, (f = o.parseTags(_)).type === "tag" && l.components[f.name] && (f.type = "component", k = !0), f.voidElement || k || !q || q === "<" || f.children.push({ type: "text", content: Da(r).call(r, U, Lu(r).call(r, "<", U)) }), v[f.tagName] = f, A === 0 && g.push(f), (L = b[A - 1]) && L.children.push(f), b[A] = f), F && !f.voidElement || (A -= 1, !k && q !== "<" && q && b[A] && b[A].children.push({ type: "text", content: Da(r).call(r, U, Lu(r).call(r, "<", U)) }));
+ }), g;
+} }, tagParser: { formatEngine: {}, pParser: function(r, i) {
+ var o = i;
+ return /\n$/.test(o) ? o : "".concat(o, `
+`);
+}, divParser: function(r, i) {
+ var o = i;
+ return /\n$/.test(o) ? o : "".concat(o, `
+`);
+}, spanParser: function(r, i) {
+ var o = i.replace(/\t/g, "").replace(/\n/g, " ");
+ return r.attrs && r.attrs.style, o;
+}, codeParser: function(r, i) {
+ var o = arguments.length > 2 && arguments[2] !== void 0 && arguments[2];
+ return this.formatEngine.convertCode(i, o);
+}, brParser: function(r, i) {
+ return this.formatEngine.convertBr(i, `
+`);
+}, imgParser: function(r, i) {
+ return r.attrs && r.attrs["data-control"] === "tapd-graph" ? this.formatEngine.convertGraph(r.attrs.title, r.attrs.src, r.attrs["data-origin-xml"], r) : r.attrs && r.attrs.src ? this.formatEngine.convertImg(r.attrs.alt, r.attrs.src) : void 0;
+}, videoParser: function(r, i) {
+ if (r.attrs && r.attrs.src)
+ return this.formatEngine.convertVideo(i, r.attrs.src, r.attrs.poster, r.attrs.title);
+}, bParser: function(r, i) {
+ for (var o = i.split(`
+`), l = [], f = 0; f < o.length; f++)
+ l.push(this.formatEngine.convertB(o[f]));
+ return l.join(`
+`);
+}, iParser: function(r, i) {
+ for (var o = i.split(`
+`), l = [], f = 0; f < o.length; f++)
+ l.push(this.formatEngine.convertI(o[f]));
+ return l.join(`
+`);
+}, strikeParser: function(r, i) {
+ for (var o = i.split(`
+`), l = [], f = 0; f < o.length; f++)
+ l.push(this.formatEngine.convertStrike(o[f]));
+ return l.join(`
+`);
+}, delParser: function(r, i) {
+ for (var o = i.split(`
+`), l = [], f = 0; f < o.length; f++)
+ l.push(this.formatEngine.convertDel(o[f]));
+ return l.join(`
+`);
+}, uParser: function(r, i) {
+ for (var o = i.split(`
+`), l = [], f = 0; f < o.length; f++)
+ l.push(this.formatEngine.convertU(o[f]));
+ return l.join(`
+`);
+}, aParser: function(r, i) {
+ return r.attrs && r.attrs.href ? this.formatEngine.convertA(i, r.attrs.href) : "";
+}, supParser: function(r, i) {
+ return this.formatEngine.convertSup(i);
+}, subParser: function(r, i) {
+ return this.formatEngine.convertSub(i);
+}, tdParser: function(r, i) {
+ return this.formatEngine.convertTd(i);
+}, trParser: function(r, i) {
+ return this.formatEngine.convertTr(i);
+}, thParser: function(r, i) {
+ return this.formatEngine.convertTh(i);
+}, theadParser: function(r, i) {
+ return this.formatEngine.convertThead(i);
+}, tableParser: function(r, i) {
+ return this.formatEngine.convertTable(i);
+}, liParser: function(r, i) {
+ return this.formatEngine.convertLi(i);
+}, ulParser: function(r, i) {
+ return this.formatEngine.convertUl(i);
+}, olParser: function(r, i) {
+ return this.formatEngine.convertOl(i);
+}, strongParser: function(r, i) {
+ return this.formatEngine.convertStrong(i);
+}, hrParser: function(r, i) {
+ return this.formatEngine.convertHr(i);
+}, h1Parser: function(r, i) {
+ return this.formatEngine.convertH1(i);
+}, h2Parser: function(r, i) {
+ return this.formatEngine.convertH2(i);
+}, h3Parser: function(r, i) {
+ return this.formatEngine.convertH3(i);
+}, h4Parser: function(r, i) {
+ return this.formatEngine.convertH4(i);
+}, h5Parser: function(r, i) {
+ return this.formatEngine.convertH5(i);
+}, h6Parser: function(r, i) {
+ return this.formatEngine.convertH6(i);
+}, blockquoteParser: function(r, i) {
+ return this.formatEngine.convertBlockquote(i.replace(/\n+/g, `
+`));
+}, addressParser: function(r, i) {
+ return this.formatEngine.convertAddress(i.replace(/\n+/g, `
+`));
+}, styleParser: { colorAttrParser: function(r) {
+ var i = r.match(/color:\s*(#[a-zA-Z0-9]{3,6});/);
+ return i && i[1] ? i[1] : "";
+}, sizeAttrParser: function(r) {
+ var i = r.match(/font-size:\s*([a-zA-Z0-9-]+?);/);
+ if (i && i[1]) {
+ var o, l = 0;
+ if (/[0-9]+px/.test(i[1]))
+ l = Go(o = i[1].replace(/px/, "")).call(o);
+ else
+ switch (i[1]) {
+ case "x-small":
+ l = 10;
+ break;
+ case "small":
+ l = 12;
+ break;
+ case "medium":
+ l = 16;
+ break;
+ case "large":
+ l = 18;
+ break;
+ case "x-large":
+ l = 24;
+ break;
+ case "xx-large":
+ l = 32;
+ break;
+ default:
+ l = "";
+ }
+ return l > 0 ? l : "";
+ }
+ return "";
+}, bgColorAttrParser: function(r) {
+ var i = r.match(/background-color:\s*([^;]+?);/);
+ if (i && i[1]) {
+ var o = "";
+ if (/rgb\([ 0-9]+,[ 0-9]+,[ 0-9]+\)/.test(i[1])) {
+ var l, f, g, A, b, v = i[1].match(/rgb\(([ 0-9]+),([ 0-9]+),([ 0-9]+)\)/);
+ v[1] && v[2] && v[3] && (v[1] = Ky(Go(l = v[1]).call(l), 10), v[2] = Ky(Go(f = v[2]).call(f), 10), v[3] = Ky(Go(g = v[3]).call(g), 10), o = At(A = At(b = "#".concat(v[1].toString(16))).call(b, v[2].toString(16))).call(A, v[3].toString(16)));
+ } else
+ o = vh(i, 2)[1];
+ return o;
+ }
+ return "";
+} } }, mdFormatEngine: { convertColor: function(r, i) {
+ var o, l = Go(r).call(r);
+ return !l || /\n/.test(l) ? l : i ? At(o = "!!".concat(i, " ")).call(o, l, "!!") : l;
+}, convertSize: function(r, i) {
+ var o, l = Go(r).call(r);
+ return !l || /\n/.test(l) ? l : i ? At(o = "!".concat(i, " ")).call(o, l, "!") : l;
+}, convertBgColor: function(r, i) {
+ var o, l = Go(r).call(r);
+ return !l || /\n/.test(l) ? l : i ? At(o = "!!!".concat(i, " ")).call(o, l, "!!!") : l;
+}, convertBr: function(r, i) {
+ return r + i;
+}, convertCode: function(r) {
+ var i = arguments.length > 1 && arguments[1] !== void 0 && arguments[1];
+ return /\n/.test(r) || i ? "```\n".concat(r.replace(/\n+$/, ""), "\n```") : "`".concat(r.replace(/`/g, "\\`"), "`");
+}, convertB: function(r) {
+ return /^\s*$/.test(r) ? "" : "**".concat(r, "**");
+}, convertI: function(r) {
+ return /^\s*$/.test(r) ? "" : "*".concat(r, "*");
+}, convertU: function(r) {
+ return /^\s*$/.test(r) ? "" : " /".concat(r, "/ ");
+}, convertImg: function(r, i) {
+ var o, l = r && r.length > 0 ? r : "image";
+ return At(o = "![".concat(l, "](")).call(o, i, ")");
+}, convertGraph: function(r, i, o, l) {
+ var f, g, A, b = r && r.length > 0 ? r : "graph", v = "";
+ if (l)
+ try {
+ var k, _ = l.attrs;
+ no(k = yh(_)).call(k, function(T) {
+ var L;
+ Object.prototype.hasOwnProperty.call(_, T) && Lu(T).call(T, "data-graph-") >= 0 && _[T] && (v += At(L = " ".concat(T, "=")).call(L, _[T]));
+ });
+ } catch {
+ }
+ return At(f = At(g = At(A = "![".concat(b, "](")).call(A, i, "){data-control=tapd-graph data-origin-xml=")).call(g, o)).call(f, v, "}");
+}, convertVideo: function(r, i, o, l) {
+ var f, g, A = l && l.length > 0 ? l : "video";
+ return At(f = At(g = "!video[".concat(A, "](")).call(g, i, "){poster=")).call(f, o, "}");
+}, convertA: function(r, i) {
+ var o;
+ if (r === i)
+ return "".concat(r, " ");
+ var l = Go(r).call(r);
+ return l && At(o = "[".concat(l, "](")).call(o, i, ")");
+}, convertSup: function(r) {
+ return "^".concat(Go(r).call(r).replace(/\^/g, "\\^"), "^");
+}, convertSub: function(r) {
+ return "^^".concat(Go(r).call(r).replace(/\^\^/g, "\\^\\^"), "^^");
+}, convertTd: function(r) {
+ return "~|".concat(Go(r).call(r).replace(/\n{1,}/g, "
").replace(/ /g, "~s~"), " ~|");
+}, convertTh: function(r) {
+ return /^\s*$/.test(r) ? "" : "~|".concat(Go(r).call(r).replace(/\n{1,}/g, "
"), " ~|");
+}, convertTr: function(r) {
+ return /^\s*$/.test(r) ? "" : "".concat(Go(r).call(r).replace(/\n/g, ""), `
+`);
+}, convertThead: function(r) {
+ var i, o = "".concat(r.replace(/[ \t]+/g, "").replace(/~\|~\|/g, "~|").replace(/~\|/g, "|"), `
+`), l = o.match(/\|/g).length - 1;
+ return At(i = "".concat(o, "|")).call(i, fd(":-:|").call(":-:|", l), `
+`);
+}, convertTable: function(r) {
+ var i = `
+`.concat(r.replace(/[ \t]+/g, "").replace(/~\|~\|/g, "~|").replace(/~\|/g, "|"), `
+`).replace(/\n{2,}/g, `
+`).replace(/\n[ \t]+\n/g, `
+`).replace(/~s~/g, " ");
+ if (!/\|:-:\|/.test(i)) {
+ var o, l, f = i.match(/^\n[^\n]+\n/)[0].match(/\|/g).length - 1;
+ i = At(o = At(l = `
+|`.concat(fd(" |").call(" |", f), `
+|`)).call(l, fd(":-:|").call(":-:|", f))).call(o, i);
+ }
+ return i;
+}, convertLi: function(r) {
+ return "- ".concat(r.replace(/^\n/, "").replace(/\n+$/, "").replace(/\n+/g, `
+ `), `
+`);
+}, convertUl: function(r) {
+ return "".concat(r, `
+`);
+}, convertOl: function(r) {
+ for (var i = r.split(`
+`), o = 1, l = 0; l < i.length; l++)
+ /^- /.test(i[l]) && (i[l] = i[l].replace(/^- /, "".concat(o, ". ")), o += 1);
+ var f = i.join(`
+`);
+ return "".concat(f, `
+`);
+}, convertStrong: function(r) {
+ return /^\s*$/.test(r) ? "" : "**".concat(r, "**");
+}, convertStrike: function(r) {
+ return /^\s*$/.test(r) ? "" : "~~".concat(r, "~~");
+}, convertDel: function(r) {
+ return /^\s*$/.test(r) ? "" : "~~".concat(r, "~~");
+}, convertHr: function(r) {
+ return /^\s*$/.test(r) ? `
+
+----
+` : `
+
+----
+`.concat(r);
+}, convertH1: function(r) {
+ return "# ".concat(Go(r).call(r).replace(/\n+$/, ""), `
+
+`);
+}, convertH2: function(r) {
+ return "## ".concat(Go(r).call(r).replace(/\n+$/, ""), `
+
+`);
+}, convertH3: function(r) {
+ return "### ".concat(Go(r).call(r).replace(/\n+$/, ""), `
+
+`);
+}, convertH4: function(r) {
+ return "#### ".concat(Go(r).call(r).replace(/\n+$/, ""), `
+
+`);
+}, convertH5: function(r) {
+ return "##### ".concat(Go(r).call(r).replace(/\n+$/, ""), `
+
+`);
+}, convertH6: function(r) {
+ return "###### ".concat(Go(r).call(r).replace(/\n+$/, ""), `
+
+`);
+}, convertBlockquote: function(r) {
+ return ">".concat(Go(r).call(r), `
+
+`);
+}, convertAddress: function(r) {
+ return ">".concat(Go(r).call(r), `
+
+`);
+} }, paragraphStyleClear: function(r) {
+ for (var i = 0; i < r[0].children.length; i++) {
+ for (var o = [r[0].children[i]], l = []; o.length; ) {
+ var f = o.shift(), g = this.notEmptyTagCount(f);
+ if (g === 1)
+ l.push(f);
+ else if (g > 1)
+ for (var A = 0; A < f.children.length; A++)
+ o.push(f.children[A]);
+ else
+ l.length === 1 && this.clearChildColorAttrs(l.pop()), l = [];
+ }
+ l.length === 1 && this.clearChildColorAttrs(l.pop());
+ }
+ return r;
+}, notEmptyTagCount: function(r) {
+ if (!r || r.voidElement || r.type === "tag" && !r.children.length || r.type === "text" && !r.content.replace(/(\r|\n|\s)+/g, ""))
+ return 0;
+ if (r.children && r.children.length) {
+ for (var i = 0, o = 0; o < r.children.length; o++)
+ i += this.notEmptyTagCount(r.children[o]);
+ return i;
+ }
+ return 1;
+}, clearChildColorAttrs: function(r) {
+ var i = this;
+ this.forEachHtmlParsedItems(r, function(o) {
+ i.clearSelfNodeColorAttrs(o);
+ });
+}, clearSelfNodeColorAttrs: function(r) {
+ if (r.attrs && r.attrs.style) {
+ for (var i = r.attrs.style.split(";"), o = [], l = 0; l < i.length; l++) {
+ var f;
+ i[l] && Lu(f = i[l]).call(f, "color") === -1 && o.push(i[l]);
+ }
+ o.length ? r.attrs.style = "".concat(o.join(";"), ";") : delete r.attrs.style;
+ }
+}, forEachHtmlParsedItems: function(r, i) {
+ if (r && (i(r), r.children && r.children.length))
+ for (var o = 0; o < r.children.length; o++)
+ this.forEachHtmlParsedItems(r.children[o], i);
+} }, k_t = w0n, k0n = c_t;
+function _De() {
+ return _De = k0n || function(r) {
+ for (var i = 1; i < arguments.length; i++) {
+ var o = arguments[i];
+ for (var l in o)
+ Object.prototype.hasOwnProperty.call(o, l) && (r[l] = o[l]);
+ }
+ return r;
+ }, _De.apply(this, arguments);
+}
+var x0n = GPe.trim, C0n = Do("".charAt), Ige = Qi.parseFloat, p4t = Qi.Symbol, m4t = p4t && p4t.iterator, b4t = 1 / Ige(PG + "-0") != -1 / 0 || m4t && !oh(function() {
+ Ige(Object(m4t));
+}) ? function(r) {
+ var i = x0n(ah(r)), o = Ige(i);
+ return o === 0 && C0n(i, 0) == "-" ? -0 : o;
+} : Ige;
+qa({ global: !0, forced: parseFloat != b4t }, { parseFloat: b4t });
+var g2 = ql.parseFloat;
+function v4t(r, i) {
+ var o = g2(r), l = g2(i);
+ return l >= 0 ? o : o >= 0 ? o + l : Math.min(o, l);
+}
+function _0n(r) {
+ var i = r.previousElementSibling, o = r.nextElementSibling;
+ if (!i) {
+ var l = getComputedStyle(r), f = r.getBoundingClientRect();
+ if (!o)
+ return { height: Math.max(g2(l.marginTop) + f.height + g2(l.marginBottom), 0), offsetTop: r.offsetTop - Math.abs(g2(l.marginTop)) };
+ var g = getComputedStyle(o), A = v4t(l.marginBottom, g.marginTop);
+ return { height: Math.max(g2(l.marginTop) + f.height + A, 0), offsetTop: r.offsetTop - Math.abs(g2(l.marginTop)) };
+ }
+ var b = getComputedStyle(r), v = r.getBoundingClientRect(), k = function(L, F) {
+ var U = g2(L), q = g2(F);
+ return q < 0 ? 0 : U >= 0 ? Math.max(q - U, 0) : q;
+ }(getComputedStyle(i).marginBottom, b.marginTop);
+ if (!o)
+ return { height: Math.max(k + v.height + g2(b.marginBottom), 0), offsetTop: r.offsetTop - Math.abs(g2(b.marginTop)) };
+ var _ = getComputedStyle(o), T = v4t(b.marginBottom, _.marginTop);
+ return { height: Math.max(k + v.height + T, 0), offsetTop: r.offsetTop - Math.abs(k) };
+}
+function x_t(r, i) {
+ if (!r || !r.tagName)
+ return "";
+ var o, l, f = document.createElement("div");
+ return f.appendChild(r.cloneNode(!1)), o = f.innerHTML, i && (l = Lu(o).call(o, ">") + 1, o = o.substring(0, l) + r.innerHTML + o.substring(l)), f = null, o;
+}
+function ih(r) {
+ var i, o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "", l = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, f = document.createElement(r);
+ return f.className = o, l !== void 0 && no(i = yh(l)).call(i, function(g) {
+ var A = l[g];
+ if (RG(g).call(g, "data-")) {
+ var b = g.replace(/^data-/, "");
+ f.dataset[b] = A;
+ } else
+ f.setAttribute(g, A);
+ }), f;
+}
+var E0n = { showSwitchBtnAfterPasteHtml: function(r, i, o, l, f) {
+ Go(l).call(l) !== Go(f).call(f) && (this.init(r, i, o, l, f), this.setSelection(), this.bindListener(), this.initBubble(), this.showBubble(), this.getTypeFromLocalStorage() === "text" && this.switchTextClick());
+}, init: function(r, i, o, l, f) {
+ this.$cherry = r, this.html = l, this.md = f, this.codemirror = o, this.currentCursor = i, this.locale = r.locale;
+}, getTypeFromLocalStorage: function() {
+ return typeof localStorage > "u" ? "md" : localStorage.getItem("cherry-paste-type") || "md";
+}, setTypeToLocalStorage: function(r) {
+ typeof localStorage < "u" && localStorage.setItem("cherry-paste-type", r);
+}, setSelection: function() {
+ var r = _De({}, this.codemirror.getCursor()), i = this.currentCursor;
+ this.codemirror.setSelection(i, r);
+}, bindListener: function() {
+ var r = this;
+ if (this.hasBindListener)
+ return !0;
+ this.hasBindListener = !0, this.codemirror.on("beforeSelectionChange", function(i, o) {
+ r.hideBubble();
+ }), this.codemirror.on("beforeChange", function(i, o) {
+ r.hideBubble();
+ }), this.codemirror.on("scroll", function(i) {
+ r.updatePositionWhenScroll();
+ });
+}, isHidden: function() {
+ return this.bubbleDom.style.display === "none";
+}, toggleBubbleDisplay: function() {
+ this.isHidden() ? this.bubbleDom.style.display = "" : this.bubbleDom.style.display = "none";
+}, hideBubble: function() {
+ if (this.noHide)
+ return !0;
+ this.isHidden() || this.toggleBubbleDisplay();
+}, updatePositionWhenScroll: function() {
+ if (!this.isHidden()) {
+ var r = this.bubbleDom.dataset.scrollTop - this.getScrollTop();
+ this.bubbleDom.style.marginTop = "".concat(r, "px");
+ }
+}, getScrollTop: function() {
+ return this.codemirror.getScrollInfo().top;
+}, showBubble: function() {
+ var r = this.getLastSelectedPosition().top;
+ this.isHidden() && (this.toggleBubbleDisplay(), this.bubbleDom.style.marginTop = "0", this.bubbleDom.dataset.scrollTop = this.getScrollTop()), r > this.codemirror.getWrapperElement().clientHeight - this.bubbleDom.getBoundingClientRect().height - 15 ? (this.bubbleDom.style.top = "", this.bubbleDom.style.bottom = "".concat(15, "px")) : (this.bubbleDom.style.top = "".concat(r, "px"), this.bubbleDom.style.bottom = "");
+}, initBubble: function() {
+ var r, i;
+ if (this.bubbleDom)
+ return this.bubbleDom.setAttribute("data-type", "md"), !0;
+ var o = ih("div", "cherry-bubble cherry-bubble--centered cherry-switch-paste");
+ o.style.display = "none";
+ var l = ih("span", "cherry-toolbar-button cherry-text-btn", { title: this.locale.pastePlain });
+ l.innerText = "TEXT";
+ var f = ih("span", "cherry-toolbar-button cherry-md-btn", { title: this.locale.pasteMarkdown });
+ f.innerText = "Markdown";
+ var g = ih("span", "switch-btn--bg");
+ this.bubbleDom = o, this.switchText = l, this.switchMd = f, this.switchBG = g, this.bubbleDom.appendChild(l), this.bubbleDom.appendChild(f), this.bubbleDom.appendChild(g), this.bubbleDom.setAttribute("data-type", "md"), this.codemirror.getWrapperElement().appendChild(this.bubbleDom), this.switchMd.addEventListener("click", Bo(r = this.switchMDClick).call(r, this)), this.switchText.addEventListener("click", Bo(i = this.switchTextClick).call(i, this));
+}, switchMDClick: function(r) {
+ this.setTypeToLocalStorage("md"), this.bubbleDom.getAttribute("data-type") !== "md" && (this.noHide = !0, this.bubbleDom.setAttribute("data-type", "md"), this.codemirror.doc.replaceSelection(this.md), this.setSelection(), this.showBubble(), this.noHide = !1);
+}, switchTextClick: function(r) {
+ this.setTypeToLocalStorage("text"), this.bubbleDom.getAttribute("data-type") !== "text" && (this.noHide = !0, this.bubbleDom.setAttribute("data-type", "text"), this.codemirror.doc.replaceSelection(this.html), this.setSelection(), this.showBubble(), this.noHide = !1);
+}, getLastSelectedPosition: function() {
+ var r = Su(this.codemirror.getWrapperElement().getElementsByClassName("CodeMirror-selected")), i = 0, o = 0;
+ if (r.length <= 0)
+ return this.hideBubble(), {};
+ for (var l = 0; l < r.length; l++) {
+ var f = r[l].getBoundingClientRect(), g = f.left + f.width / 2, A = f.top + f.height;
+ A > o && g >= i && (o = A), g > i && (i = g);
+ }
+ return { top: o };
+} }, T0n = E0n;
+function hO(r, i, o, l) {
+ return r.addEventListener ? (r.addEventListener(i, o, l), !0) : r.attachEvent ? r.attachEvent("on".concat(i), o) : void (r["on".concat(i)] = o);
+}
+function QMe(r, i, o, l) {
+ if (r.removeEventListener)
+ r.removeEventListener(i, o, l);
+ else {
+ if (r.detachEvent)
+ return r.detachEvent("on".concat(i), o);
+ r["on".concat(i)] = null;
+ }
+}
+var k3 = new Proxy({}, { get: function(r, i, o) {
+ return function() {
+ };
+} }), kc = new (function() {
+ function r() {
+ var i;
+ vi(this, r), Ui(this, "Events", { previewerClose: "previewer:close", previewerOpen: "previewer:open", editorClose: "editor:close", editorOpen: "editor:open", toolbarHide: "toolbar:hide", toolbarShow: "toolbar:show", cleanAllSubMenus: "cleanAllSubMenus" }), Ui(this, "emitter", { all: i = i || /* @__PURE__ */ new Map(), on: function(o, l) {
+ var f = i.get(o);
+ f ? f.push(l) : i.set(o, [l]);
+ }, off: function(o, l) {
+ var f = i.get(o);
+ f && (l ? f.splice(f.indexOf(l) >>> 0, 1) : i.set(o, []));
+ }, emit: function(o, l) {
+ var f = i.get(o);
+ f && f.slice().map(function(g) {
+ g(l);
+ }), (f = i.get("*")) && f.slice().map(function(g) {
+ g(o, l);
+ });
+ } });
+ }
+ return yi(r, [{ key: "on", value: function(i, o, l) {
+ var f;
+ this.emitter.on(At(f = "".concat(i, ":")).call(f, o), l);
+ } }, { key: "emit", value: function(i, o) {
+ var l;
+ this.emitter.emit(At(l = "".concat(i, ":")).call(l, o));
+ } }]), r;
+}())();
+function hX(r) {
+ var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "image", o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "*", l = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : null, f = document.createElement("input");
+ f.type = "file", f.id = "fileUpload", f.value = "", f.style.display = "none", f.accept = o, f.addEventListener("change", function(g) {
+ var A = vh(g.target.files, 1)[0];
+ r.options.fileUpload(A, function(b) {
+ var v = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
+ if (typeof b == "string" && b) {
+ if (l)
+ return l(A.name, b, v);
+ var k, _ = "";
+ if (i === "image")
+ _ = At(k = "![".concat(A.name, "](")).call(k, b, ")");
+ else if (i === "video") {
+ var T;
+ _ = At(T = "!video[".concat(A.name, "](")).call(T, b, ")");
+ } else if (i === "audio") {
+ var L;
+ _ = At(L = "!audio[".concat(A.name, "](")).call(L, b, ")");
+ } else {
+ var F;
+ _ = At(F = "[".concat(A.name, "](")).call(F, b, ")");
+ }
+ r.editor.doc.replaceSelection(_);
+ }
+ });
+ }), f.click();
+}
+function Hbe(r) {
+ var i = [];
+ return r != null && r.isBorder && i.push("#B"), r != null && r.isShadow && i.push("#S"), r != null && r.isRadius && i.push("#R"), r != null && r.width && i.push("#".concat(r.width)), r != null && r.height && (r.width || i.push("#auto"), i.push("#".concat(r.height))), i.join(" ");
+}
+function y4t(r, i, o) {
+ var l, f, g, A, b, v = (l = i == null ? void 0 : i.name) !== null && l !== void 0 ? l : o.name, k = "", _ = "";
+ /video/i.test(o.type) && (k = "!video", _ = i != null && i.poster ? "{poster=".concat(i.poster, "}") : ""), /audio/i.test(o.type) && (k = "!audio"), /image/i.test(o.type) && (k = "!");
+ var T = k ? Hbe(i) : "";
+ return At(f = At(g = At(A = At(b = "".concat(k, "[")).call(b, v)).call(A, T, "](")).call(g, r, ")")).call(f, _);
+}
+function w4t(r, i) {
+ var o = yh(r);
+ if (rA) {
+ var l = rA(r);
+ i && (l = dd(l).call(l, function(f) {
+ return o0(r, f).enumerable;
+ })), o.push.apply(o, l);
+ }
+ return o;
+}
+function k4t(r) {
+ for (var i = 1; i < arguments.length; i++) {
+ var o, l, f = arguments[i] != null ? arguments[i] : {};
+ i % 2 ? no(o = w4t(Object(f), !0)).call(o, function(g) {
+ Ui(r, g, f[g]);
+ }) : i0 ? uC(r, i0(f)) : no(l = w4t(Object(f))).call(l, function(g) {
+ C3(r, g, o0(f, g));
+ });
+ }
+ return r;
+}
+function Tv(r, i, o) {
+ var l = r.begin + r.content + r.end;
+ return o && (l = l.replace(/\[\\h\]/g, x4t).replace(/\\h/g, x4t)), new RegExp(l, i || "g");
+}
+function Bg() {
+ try {
+ return new RegExp("(?<=.)"), !0;
+ } catch {
+ }
+ return !1;
+}
+var x4t = "[ \\t\\u00a0]", C_t = "(?:[^\\n]*?\\S[^\\n]*?)", __t = "[\\u0021-\\u002F\\u003a-\\u0040\\u005b-\\u0060\\u007b-\\u007e]", C4t = "[\\u0021-\\u002F\\u003a-\\u0040\\u005b\\u005d\\u005e\\u0060\\u007b-\\u007e \\t\\n!“”¥‘’(),。—:;《》?【】「」·~|]", EDe = new RegExp([/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+/.source, "@", /[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*/.source].join("")), $Me = new RegExp("^".concat(EDe.source, "$")), qPe = new RegExp('(?:\\S+(?::\\S*)?@)?(?:(?:1\\d\\d|2[01]\\d|22[0-3]|[1-9]\\d?)(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:1\\d\\d|2[0-4]\\d|25[0-4]|[1-9]\\d?))|(?![-_])(?:[-\\w\\xa1-\\xff]{0,63}[^-_]\\.)+(?:[a-zA-Z\\xa1-\\xff]{2,}\\.?))(?::\\d{2,5})?(?:[/?#][^\\s<>\\x00-\\x1f"\\(\\)]*)?'), E_t = new RegExp("(?:\\/\\/)".concat(qPe.source)), _4t = new RegExp("^".concat(qPe.source, "$")), E4t = new RegExp("^".concat(E_t.source, "$")), T_t = /^([ \t]*)([*+-][ ](\[[ x]\])?|[0-9一二三四五六七八九十零]+\.|[a-z]\.|\b(?:M{0,3}(?:CM|CD|D?C{0,3})(?:XC|XL|L?X{0,3})(?:IX|IV|V?I{0,3}))\b\.)([^\r\n]*)/;
+function jbe() {
+ var r, i = arguments.length > 0 && arguments[0] !== void 0 && arguments[0], o = { begin: "(?:^|\\n)(\\n*)", content: ["(\\h*\\|[^\\n]+\\|?\\h*)", "\\n", "(?:(?:\\h*\\|\\h*:?[-]{1,}:?\\h*)+\\|?\\h*)", "((\\n\\h*\\|[^\\n]+\\|?\\h*)*)"].join(""), end: "(?=$|\\n)" };
+ o.reg = Tv(o, "g", !0);
+ var l = { begin: "(?:^|\\n)(\\n*)", content: ["(\\|?[^\\n|]+(\\|[^\\n|]+)+\\|?)", "\\n", "(?:\\|?\\h*:?[-]{1,}:?[\\h]*(?:\\|[\\h]*:?[-]{1,}:?\\h*)+\\|?)", "((\\n\\|?([^\\n|]+(\\|[^\\n|]*)+)\\|?)*)"].join(""), end: "(?=$|\\n)" };
+ return l.reg = Tv(l, "g", !0), i === !1 ? { strict: o, loose: l } : Tv({ begin: "", content: At(r = "(?:".concat(o.begin + o.content + o.end, "|")).call(r, l.begin + l.content + l.end, ")"), end: "" }, "g", !0);
+}
+function Kbe() {
+ var r = { begin: /(?:^|\n)(\n*((?:>[\t ]*)*)(?:[^\S\n]*))(`{3,})([^`]*?)\n/, content: /([\w\W]*?)/, end: /[^\S\n]*\3[ \t]*(?=$|\n+)/, reg: new RegExp("") };
+ return r.reg = new RegExp(r.begin.source + r.content.source + r.end.source, "g"), k4t(k4t({}, r), {}, { begin: r.begin.source, content: r.content.source, end: r.end.source });
+}
+function zbe(r, i) {
+ var o = r || `Item 1
+ Item 1.1
+Item 2`;
+ o = o.replace(/^\n+/, "").replace(/\n+$/, "");
+ var l = "1.";
+ switch (i) {
+ case "ol":
+ l = "1.";
+ break;
+ case "ul":
+ l = "-";
+ break;
+ case "checklist":
+ l = "- [x]";
+ }
+ if (o = o.replace(/^(\s*)([0-9a-zA-Z]+\.|- \[x\]|- \[ \]|-) /gm, "$1"), l === "1.") {
+ var f = {};
+ o = o.replace(/^(\s*)(\S[\s\S]*?)$/gm, function(g, A, b) {
+ var v, k, _, T = ((v = A.match(/[ \t]/g)) === null || v === void 0 ? void 0 : v.length) || 0;
+ return f[T] = f[T] ? f[T] + 1 : 1, At(k = At(_ = "".concat(A)).call(_, f[T], ". ")).call(k, b);
+ });
+ } else
+ o = o.replace(/^(\s*)(\S[\s\S]*?)$/gm, "$1".concat(l, " $2"));
+ return o;
+}
+function YPe() {
+ var r = { begin: /(?:^|\n)(\n*(?:[^\S\n]*)):::([^:][^\n]+?)\s*\n/, content: /([\w\W]*?)/, end: /\n[ \t]*:::[ \t]*(?=$|\n+)/ };
+ return r.reg = new RegExp(r.begin.source + r.content.source + r.end.source, "g"), r;
+}
+function B_t() {
+ var r = { begin: /(?:^|\n)(\n*(?:[^\S\n]*))\+\+\+([-]{0,1})\s+([^\n]+)\n/, content: /([\w\W]+?)/, end: /\n[ \t]*\+\+\+[ \t]*(?=$|\n+)/ };
+ return r.reg = new RegExp(r.begin.source + r.content.source + r.end.source, "g"), r;
+}
+var B0n = /(\[[^\n]*?\]\(data:image\/[a-z]{1,10};base64,)([^)]+)\)/g, S0n = /(!\[[^\n]*?\]\([^)]+\)\{[^}]* data-xml=)([^}]+)\}/g, T4t = /(!\[[^\n]*?\]\(data:image\/[a-z]{1,10};base64,[^)]+\)\{data-type=drawio data-xml=[^}]+\})/g, Epe = function() {
+ return (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "").replace(Kbe().reg, function(r) {
+ return r.replace(/^.*$/gm, "/n");
+ }).replace(/(`+)(.+?(?:\n.+?)*?)\1/g, function(r) {
+ return r.replace(/[![\]()]/g, ".");
+ });
+};
+function L0n(r) {
+ (function(i) {
+ var o = /^(\s*)([I一二三四五六七八九十]+)\.(\s+)/, l = /^(\s*)([I一二三四五六七八九十]+)\.(\s+)$/;
+ if (i.getOption("disableInput"))
+ return !1;
+ for (var f = i.listSelections(), g = [], A = 0; A < f.length; A++) {
+ var b = f[A].head, v = i.getLine(b.line), k = o.exec(v), _ = /^\s*$/.test(Da(v).call(v, 0, b.ch));
+ if (!f[A].empty() || _ || !k)
+ return;
+ if (l.test(v))
+ i.replaceRange("", { line: b.line, ch: 0 }, { line: b.line, ch: b.ch + 1 }), g[A] = `
+`;
+ else {
+ var T, L = k[1], F = k[3];
+ g[A] = At(T = `
+`.concat(L, "I.")).call(T, F);
+ }
+ }
+ return i.replaceSelections(g), !0;
+ })(r) || r.execCommand("newlineAndIndentContinueMarkdownList");
+}
+var I0n = ["codemirror"], M0n = function() {
+ function r(i) {
+ var o = this;
+ vi(this, r), Ui(this, "dealSpecialWords", function() {
+ o.noChange ? o.noChange = !1 : (o.formatFullWidthMark(), o.formatBigData2Mark(B0n, "cm-url base64"), o.formatBigData2Mark(S0n, "cm-url drawio"));
+ }), Ui(this, "formatBigData2Mark", function(g, A) {
+ for (var b = o.editor, v = b.getSearchCursor(g), k = v.findNext(); k !== !1; k = v.findNext()) {
+ var _, T, L = v.from();
+ if (L) {
+ var F = (_ = k[2]) !== null && _ !== void 0 ? _ : "", U = L.ch + ((T = k[1]) === null || T === void 0 ? void 0 : T.length), q = U + F.length, Z = L.line, R = { line: Z, ch: U }, J = { line: Z, ch: q };
+ if (!(b.findMarks(R, J).length > 0)) {
+ var he = ih("span", "cm-string ".concat(A), { title: F });
+ he.textContent = F, o.noChange = !0, b.markText(R, J, { replacedWith: he, atomic: !0 });
+ }
+ }
+ }
+ }), Ui(this, "onKeyup", function(g, A) {
+ var b = A.getCursor().line;
+ o.previewer.highlightLine(b + 1);
+ }), Ui(this, "onScroll", function(g) {
+ if (kc.emit(o.instanceId, kc.Events.cleanAllSubMenus), o.disableScrollListener)
+ o.disableScrollListener = !1;
+ else {
+ var A = g.getScrollerElement();
+ if (A.scrollTop <= 0)
+ o.previewer.scrollToLineNum(0);
+ else if (A.scrollTop + A.clientHeight >= A.scrollHeight - 20)
+ o.previewer.scrollToLineNum(null);
+ else {
+ var b = g.getScrollInfo().top, v = g.lineAtHeight(b, "local"), k = g.charCoords({ line: v, ch: 0 }, "local"), _ = g.getLineHandle(v).height, T = 100 * (b - (k.bottom - _)) / _ / 100;
+ o.previewer.scrollToLineNum(v + 1, T);
+ }
+ }
+ }), Ui(this, "onMouseDown", function(g, A) {
+ kc.emit(o.instanceId, kc.Events.cleanAllSubMenus);
+ var b = g.getCursor().line, v = Math.abs(A.y - g.getWrapperElement().getBoundingClientRect().y);
+ o.previewer.scrollToLineNumWithOffset(b + 1, v), o.toHalfWidth(g, A);
+ }), Ui(this, "onCursorActivity", function() {
+ o.refreshWritingStatus();
+ }), this.options = { id: "code", name: "code", autoSave2Textarea: !1, editorDom: document.createElement("div"), wrapperDom: null, autoScrollByCursor: !0, convertWhenPaste: !0, codemirror: { lineNumbers: !1, cursorHeight: 0.85, indentUnit: 4, tabSize: 4, mode: "gfm", lineWrapping: !0, indentWithTabs: !0, autofocus: !0, theme: "default", autoCloseTags: !0, extraKeys: { Enter: L0n }, matchTags: { bothTags: !0 }, placeholder: "", keyMap: "sublime" }, toolbars: {}, onKeydown: function() {
+ }, onChange: function() {
+ }, onFocus: function() {
+ }, onBlur: function() {
+ }, onPaste: this.onPaste, onScroll: this.onScroll }, this.animation = {};
+ var l = i.codemirror, f = KAn(i, I0n);
+ l && lL(this.options.codemirror, l), lL(this.options, f), this.$cherry = this.options.$cherry, this.instanceId = this.$cherry.getInstanceId();
+ }
+ return yi(r, [{ key: "formatFullWidthMark", value: function() {
+ var i, o = this.editor, l = /[·¥、:“”【】()《》]/, f = o.getSearchCursor(l), g = f.findNext();
+ for (no(i = o.getAllMarks()).call(i, function(_) {
+ if (_.className === "cm-fullWidth") {
+ var T = JSON.parse(zPe(Wre(_).call(_))), L = o.getRange(T.from, T.to);
+ l.test(L) || _.clear();
+ }
+ }); g !== !1; g = f.findNext()) {
+ var A, b = f.from();
+ if (b) {
+ var v = { line: b.line, ch: b.ch }, k = { line: b.line, ch: b.ch + 1 };
+ dd(A = o.findMarks(v, k)).call(A, function(_) {
+ return _.className === "cm-fullWidth";
+ }).length === 0 && o.markText(v, k, { className: "cm-fullWidth", title: "按住Ctrl/Cmd点击切换成半角(Hold down Ctrl/Cmd and click to switch to half-width)" });
+ }
+ }
+ } }, { key: "toHalfWidth", value: function(i, o) {
+ var l = o.target;
+ if (l instanceof HTMLElement && l.classList.contains("cm-fullWidth") && (o.ctrlKey || o.metaKey) && o.buttons === 1) {
+ var f = l.getBoundingClientRect(), g = i.coordsChar({ left: f.left, top: f.top }), A = { line: g.line, ch: g.ch + 1 };
+ i.setSelection(g, A), i.replaceSelection(l.innerText.replace("·", "`").replace("¥", "$").replace("、", "/").replace(":", ":").replace("“", '"').replace("”", '"').replace("【", "[").replace("】", "]").replace("(", "(").replace(")", ")").replace("《", "<").replace("》", ">"));
+ }
+ } }, { key: "onPaste", value: function(i, o) {
+ var l = i.clipboardData;
+ l ? this.handlePaste(i, l, o) : (l = window.clipboardData, this.handlePaste(i, l, o));
+ } }, { key: "handlePaste", value: function(i, o, l) {
+ var f = this;
+ this.pasterHtml = !1;
+ for (var g = o.items, A = o.types || [], b = l.getDoc(), v = 0; v < A.length; v++) {
+ var k = g[v];
+ k && k.kind === "file" && k.type.match(/^image\//i) && function() {
+ var Z = k.getAsFile();
+ f.options.fileUpload(Z, function(R) {
+ if (typeof R == "string") {
+ var J = y4t(R, arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, Z);
+ if (f.pasterHtml) {
+ var he = l.getCursor(), Y = he.line, ue = he.ch;
+ l.setSelection({ line: Y, ch: ue }, { line: Y, ch: ue }), b.replaceSelection(`
+`.concat(J), "end");
+ } else
+ b.replaceSelection(J);
+ }
+ }), i.preventDefault();
+ }();
+ }
+ var _ = o.getData("text/plain"), T = o.getData("Text/Html");
+ if (!T || !this.options.convertWhenPaste)
+ return !0;
+ var L = document.createElement("DIV");
+ L.innerHTML = T, T = L.innerHTML;
+ var F = k_t.run(T);
+ if (typeof F == "string" && Go(F).call(F).length > 0) {
+ this.pasterHtml = !0;
+ var U = l.listSelections();
+ if (l.getSelections().length <= 1 && U[0] && U[0].anchor) {
+ var q = {};
+ q.line = U[0].anchor.line, q.ch = U[0].anchor.ch, b.replaceSelection(F), T0n.showSwitchBtnAfterPasteHtml(this.$cherry, q, l, _, F);
+ } else
+ b.replaceSelection(F);
+ i.preventDefault();
+ }
+ L = null;
+ } }, { key: "storeDocumentScroll", value: function() {
+ this.options.keepDocumentScrollAfterInit && (this.needRestoreDocumentScroll = !0, this.documentElementScrollTop = document.documentElement.scrollTop, this.documentElementScrollLeft = document.documentElement.scrollLeft);
+ } }, { key: "restoreDocumentScroll", value: function() {
+ this.options.keepDocumentScrollAfterInit && this.needRestoreDocumentScroll && (this.needRestoreDocumentScroll = !1, window.scrollTo(this.documentElementScrollLeft, this.documentElementScrollTop));
+ } }, { key: "init", value: function(i) {
+ var o = this;
+ this.storeDocumentScroll();
+ var l = this.options.editorDom.querySelector("#".concat(this.options.id));
+ if (!(l instanceof HTMLTextAreaElement))
+ throw new Error("The specific element is not a textarea.");
+ var f = m2.fromTextArea(l, this.options.codemirror);
+ f.addOverlay({ name: "invisibles", token: function(g) {
+ var A, b = 0, v = g.peek() === " ";
+ if (v) {
+ for (; v && b < Number.MAX_VALUE; )
+ b += 1, g.next(), v = g.peek() === " ";
+ A = "whitespace whitespace-".concat(b);
+ } else {
+ for (; !g.eol(); )
+ g.next();
+ A = "";
+ }
+ return A;
+ } }), this.previewer = i, this.disableScrollListener = !1, this.options.value && f.setOption("value", this.options.value), f.on("blur", function(g, A) {
+ o.options.onBlur(A, g);
+ }), f.on("focus", function(g, A) {
+ o.options.onFocus(A, g);
+ }), f.on("change", function(g, A) {
+ o.options.onChange(A, g), o.dealSpecialWords(), o.options.autoSave2Textarea && g.save();
+ }), f.on("keydown", function(g, A) {
+ o.options.onKeydown(A, g);
+ }), f.on("keyup", function(g, A) {
+ o.onKeyup(A, g);
+ }), f.on("paste", function(g, A) {
+ o.options.onPaste.call(o, A, g);
+ }), this.options.autoScrollByCursor && f.on("mousedown", function(g, A) {
+ lm(function() {
+ o.onMouseDown(g, A);
+ });
+ }), f.on("drop", function(g, A) {
+ var b = A.dataTransfer.files || [];
+ b && b.length > 0 && lm(function() {
+ for (var v = function(_) {
+ var T = b[_], L = T.type || "";
+ if (L === "" || /^text/i.test(L))
+ return "continue";
+ o.options.fileUpload(T, function(F) {
+ var U = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
+ if (typeof F == "string") {
+ g.setSelection(g.getCursor());
+ var q = y4t(F, U, T), Z = _ > 0 ? `
+`.concat(q, " ") : "".concat(q, " ");
+ g.replaceSelection(Z), o.dealSpecialWords();
+ }
+ });
+ }, k = 0; k < b.length; k++)
+ v(k);
+ }, 50);
+ }), f.on("scroll", function(g) {
+ o.options.onScroll(g), o.options.writingStyle === "focus" && o.refreshWritingStatus();
+ }), f.on("cursorActivity", function() {
+ o.onCursorActivity();
+ }), hO(this.getEditorDom(), "wheel", function() {
+ o.disableScrollListener = !1, cancelAnimationFrame(o.animation.timer), o.animation.timer = 0;
+ }, !1), this.editor = f, this.options.writingStyle !== "normal" && this.initWritingStyle(), this.dealSpecialWords(), this.restoreDocumentScroll();
+ } }, { key: "jumpToLine", value: function(i, o, l) {
+ var f = this;
+ if (i === null)
+ return cancelAnimationFrame(this.animation.timer), this.disableScrollListener = !0, this.editor.scrollIntoView({ line: this.editor.lineCount() - 1, ch: 1 }), void (this.animation.timer = 0);
+ var g = this.editor.charCoords({ line: i, ch: 0 }, "local"), A = g.top;
+ A += (this.editor.charCoords({ line: i + o, ch: 0 }, "local").top - g.top) * l, this.animation.destinationTop = Math.ceil(A - 15), !this.animation.timer && (this.animation.timer = requestAnimationFrame(function b() {
+ var v = f.editor.getScrollInfo().top, k = f.animation.destinationTop - v, _ = Math.ceil(Math.min(Math.abs(k), Math.max(1, Math.abs(k) / (100 / 16.7))));
+ if (k > 0) {
+ if (v >= f.animation.destinationTop)
+ return void (f.animation.timer = 0);
+ f.disableScrollListener = !0, f.editor.scrollTo(null, v + _);
+ } else {
+ if (!(k < 0) || v <= f.animation.destinationTop || v <= 0)
+ return void (f.animation.timer = 0);
+ f.disableScrollListener = !0, f.editor.scrollTo(null, v - _);
+ }
+ v === f.editor.getScrollInfo().top || _ >= Math.abs(k) ? f.animation.timer = 0 : f.animation.timer = requestAnimationFrame(b);
+ }));
+ } }, { key: "scrollToLineNum", value: function(i, o, l) {
+ if (i !== null) {
+ var f = Math.max(0, i);
+ this.jumpToLine(f, o, l), k3.log("滚动预览区域,左侧应scroll to ", f);
+ } else
+ this.jumpToLine(null);
+ } }, { key: "getEditorDom", value: function() {
+ return this.options.editorDom;
+ } }, { key: "addListener", value: function(i, o) {
+ this.editor.on(i, o);
+ } }, { key: "initWritingStyle", value: function() {
+ var i, o, l = this.options.writingStyle, f = "cherry-editor-writing-style--".concat(l), g = this.getEditorDom();
+ no(i = dd(o = Su(g.classList)).call(o, function(A) {
+ return RG(A).call(A, "cherry-editor-writing-style--");
+ })).call(i, function(A) {
+ return g.classList.remove(A);
+ }), l !== "normal" && (g.classList.add(f), this.refreshWritingStatus());
+ } }, { key: "refreshWritingStatus", value: function() {
+ var i, o, l = this.options.writingStyle;
+ if (l === "focus" || l === "typewriter") {
+ var f = "cherry-editor-writing-style--".concat(l), g = document.querySelector("#cherry-editor-writing-style") || document.createElement("style");
+ g.id = "cherry-editor-writing-style", Wre(i = Su(document.head.childNodes)).call(i, function(J) {
+ return J === g;
+ }) || document.head.appendChild(g);
+ var A = g.sheet;
+ if (no(o = Su(Array(A.cssRules.length))).call(o, function() {
+ return A.deleteRule(0);
+ }), l === "focus") {
+ var b, v, k = this.getEditorDom().getBoundingClientRect(), _ = this.editor.charCoords(this.editor.getCursor()), T = _.top, L = _.bottom, F = T - k.top, U = k.height - (L - k.top);
+ A.insertRule(At(b = ".".concat(f, "::before { height: ")).call(b, F > 0 ? F : 0, "px; }"), 0), A.insertRule(At(v = ".".concat(f, "::after { height: ")).call(v, U > 0 ? U : 0, "px; }"), 0);
+ }
+ if (l === "typewriter") {
+ var q, Z, R = this.editor.getScrollInfo().clientHeight / 2;
+ A.insertRule(At(q = ".".concat(f, " .CodeMirror-lines::before { height: ")).call(q, R, "px; }"), 0), A.insertRule(At(Z = ".".concat(f, " .CodeMirror-lines::after { height: ")).call(Z, R, "px; }"), 0), this.editor.scrollTo(null, this.editor.cursorCoords(null, "local").top - R);
+ }
+ }
+ } }, { key: "setWritingStyle", value: function(i) {
+ this.options.writingStyle = i, this.initWritingStyle();
+ } }]), r;
+}(), F0n = LL.findIndex, B4t = "findIndex", S4t = !0;
+B4t in [] && Array(1)[B4t](function() {
+ S4t = !1;
+}), qa({ target: "Array", proto: !0, forced: S4t }, { findIndex: function(r) {
+ return F0n(this, r, arguments.length > 1 ? arguments[1] : void 0);
+} });
+var O0n = a0("Array").findIndex, UMe = Array.prototype, Dme = function(r) {
+ var i = r.findIndex;
+ return r === UMe || E1(UMe, r) && i === UMe.findIndex ? O0n : i;
+}, D0n = Lie("splice"), N0n = Qi.TypeError, P0n = Math.max, R0n = Math.min;
+qa({ target: "Array", proto: !0, forced: !D0n }, { splice: function(r, i) {
+ var o, l, f, g, A, b, v = y5(this), k = Ck(v), _ = yL(r, k), T = arguments.length;
+ if (T === 0 ? o = l = 0 : T === 1 ? (o = 0, l = k - _) : (o = T - 2, l = R0n(P0n(cX(i), 0), k - _)), k + o - l > 9007199254740991)
+ throw N0n("Maximum allowed length exceeded");
+ for (f = Dbe(v, l), g = 0; g < l; g++)
+ (A = _ + g) in v && EO(f, g, v[A]);
+ if (f.length = l, o < l) {
+ for (g = _; g < k - l; g++)
+ b = g + o, (A = g + l) in v ? v[b] = v[A] : delete v[b];
+ for (g = k; g > k - l + o; g--)
+ delete v[g - 1];
+ } else if (o > l)
+ for (g = k - l; g > _; g--)
+ b = g + o - 1, (A = g + l - 1) in v ? v[b] = v[A] : delete v[b];
+ for (g = 0; g < o; g++)
+ v[g + _] = arguments[g + 2];
+ return v.length = k - l + o, f;
+} });
+var Q0n = a0("Array").splice, HMe = Array.prototype, gk = function(r) {
+ var i = r.splice;
+ return r === HMe || E1(HMe, r) && i === HMe.splice ? Q0n : i;
+}, L4t = !1, QG = { SEN: "sentence", PAR: "paragraph", DEFAULT: "sentence" }, Sg = function() {
+ function r(i) {
+ vi(this, r), Ui(this, "$engine", void 0), Ui(this, "$locale", void 0), this.RULE = this.rule(i);
+ }
+ return yi(r, [{ key: "getType", value: function() {
+ return this.constructor.HOOK_TYPE || QG.DEFAULT;
+ } }, { key: "getName", value: function() {
+ return this.constructor.HOOK_NAME;
+ } }, { key: "afterInit", value: function(i) {
+ typeof i == "function" && i();
+ } }, { key: "setLocale", value: function(i) {
+ this.$locale = i;
+ } }, { key: "beforeMakeHtml", value: function(i) {
+ return i;
+ } }, { key: "makeHtml", value: function(i) {
+ return i;
+ } }, { key: "afterMakeHtml", value: function(i) {
+ return i;
+ } }, { key: "onKeyDown", value: function(i, o) {
+ } }, { key: "getOnKeyDown", value: function() {
+ return this.onKeyDown || !1;
+ } }, { key: "getAttributesTest", value: function() {
+ return /^(color|fontSize|font-size|id|title|class|target|underline|line-through|overline|sub|super)$/;
+ } }, { key: "$testAttributes", value: function(i, o) {
+ this.getAttributesTest().test(i) && o();
+ } }, { key: "getAttributes", value: function(i) {
+ return { attrs: {}, str: i };
+ } }, { key: "test", value: function(i) {
+ return !!this.RULE.reg && this.RULE.reg.test(i);
+ } }, { key: "rule", value: function(i) {
+ return { begin: "", end: "", content: "", reg: new RegExp("") };
+ } }, { key: "mounted", value: function() {
+ } }], [{ key: "getMathJaxConfig", value: function() {
+ return L4t;
+ } }, { key: "setMathJaxConfig", value: function(i) {
+ L4t = i;
+ } }]), r;
+}();
+Ui(Sg, "HOOK_NAME", "default"), Ui(Sg, "HOOK_TYPE", QG.DEFAULT);
+var $0n = LL.map, U0n = Lie("map");
+qa({ target: "Array", proto: !0, forced: !U0n }, { map: function(r) {
+ return $0n(this, r, arguments.length > 1 ? arguments[1] : void 0);
+} });
+var H0n = a0("Array").map, jMe = Array.prototype, Zs = function(r) {
+ var i = r.map;
+ return r === jMe || E1(jMe, r) && i === jMe.map ? H0n : i;
+};
+function c$(r, i) {
+ var o, l, f, g = arguments.length > 2 && arguments[2] !== void 0 && arguments[2];
+ return /^\n/.test(r) ? g ? ((o = (l = r.match(/^\n+/g)) === null || l === void 0 || (f = l[0]) === null || f === void 0 ? void 0 : f.length) !== null && o !== void 0 ? o : 0) > 1 ? `
+
+`.concat(i) : `
+`.concat(i) : `
+
+`.concat(i) : i;
+}
+function TDe(r, i) {
+ var o = (r.match(/\n/g) || []).length;
+ return r !== "" && (o -= 2), o + i;
+}
+var kk = A_t;
+function j0n(r, i) {
+ if (kk(i))
+ return i;
+}
+function JPe(r) {
+ return typeof localStorage < "u" && localStorage.getItem("cherry-".concat(r)) !== null;
+}
+function Nme() {
+ var r = "false";
+ return typeof localStorage < "u" && (r = localStorage.getItem("cherry-classicBr")), r === "true";
+}
+function BDe() {
+ var r = arguments.length > 0 && arguments[0] !== void 0 && arguments[0], i = "default";
+ if (typeof localStorage < "u") {
+ var o = localStorage.getItem("cherry-theme");
+ o && (i = o);
+ }
+ return r ? "theme__".concat(i) : i;
+}
+function S_t(r) {
+ var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "", o = (i || BDe()).replace(/^.*theme__/, ""), l = " theme__".concat(o);
+ r.wrapperDom.className = r.wrapperDom.className.replace(/ theme__[^ $]+?( |$)/g, " ") + l, r.previewer.getDomContainer().className = r.previewer.getDomContainer().className.replace(/ theme__[^ $]+?( |$)/g, " ") + l, function(f) {
+ typeof localStorage < "u" && localStorage.setItem("cherry-theme", f);
+ }(o);
+}
+var K0n = Qi.RangeError, I4t = String.fromCharCode, M4t = String.fromCodePoint, z0n = Do([].join), G0n = !!M4t && M4t.length != 1;
+qa({ target: "String", stat: !0, arity: 1, forced: G0n }, { fromCodePoint: function(r) {
+ for (var i, o = [], l = arguments.length, f = 0; l > f; ) {
+ if (i = +arguments[f++], yL(i, 1114111) !== i)
+ throw K0n(i + " is not a valid code point");
+ o[f] = i < 65536 ? I4t(i) : I4t(55296 + ((i -= 65536) >> 10), i % 1024 + 56320);
+ }
+ return z0n(o, "");
+} });
+var F4t, O4t, SDe = ql.String.fromCodePoint;
+function D4t(r, i) {
+ var o = yh(r);
+ if (rA) {
+ var l = rA(r);
+ i && (l = dd(l).call(l, function(f) {
+ return o0(r, f).enumerable;
+ })), o.push.apply(o, l);
+ }
+ return o;
+}
+function Uz(r) {
+ for (var i = 1; i < arguments.length; i++) {
+ var o, l, f = arguments[i] != null ? arguments[i] : {};
+ i % 2 ? no(o = D4t(Object(f), !0)).call(o, function(g) {
+ Ui(r, g, f[g]);
+ }) : i0 ? uC(r, i0(f)) : no(l = D4t(Object(f))).call(l, function(g) {
+ C3(r, g, o0(f, g));
+ });
+ }
+ return r;
+}
+var N4t = { "<": "<", ">": ">", "&": "&", '"': """, "'": "'" }, X0n = { lt: "<", gt: ">", amp: "&", quot: '"', apos: "'" }, ZPe = Uz(Uz(Uz(Uz(Uz(Uz({}, { 34: """, 38: "&", 39: "'", 60: "<", 62: ">" }), { 192: "À", 193: "Á", 194: "Â", 195: "Ã", 196: "Ä", 197: "Å", 198: "Æ", 199: "Ç", 200: "È", 201: "É", 202: "Ê", 203: "Ë", 204: "Ì", 205: "Í", 206: "Î", 207: "Ï", 208: "Ð", 209: "Ñ", 210: "Ò", 211: "Ó", 212: "Ô", 213: "Õ", 214: "Ö", 216: "Ø", 217: "Ù", 218: "Ú", 219: "Û", 220: "Ü", 221: "Ý", 222: "Þ", 223: "ß", 224: "à", 225: "á", 226: "â", 227: "ã", 228: "ä", 229: "å", 230: "æ", 231: "ç", 232: "è", 233: "é", 234: "ê", 235: "ë", 236: "ì", 237: "í", 238: "î", 239: "ï", 240: "ð", 241: "ñ", 242: "ò", 243: "ó", 244: "ô", 245: "õ", 246: "ö", 248: "ø", 249: "ù", 250: "ú", 251: "û", 252: "ü", 253: "ý", 254: "þ", 255: "ÿ" }), { 160: " ", 161: "¡", 162: "¢", 163: "£", 164: "¤", 165: "¥", 166: "¦", 167: "§", 168: "¨", 169: "©", 170: "ª", 171: "«", 172: "¬", 173: "", 174: "®", 175: "¯", 176: "°", 177: "±", 178: "²", 179: "³", 180: "´", 181: "µ", 182: "¶", 184: "¸", 185: "¹", 186: "º", 187: "»", 188: "¼", 189: "½", 190: "¾", 191: "¿", 215: "×", 247: "÷" }), { 8704: "∀", 8706: "∂", 8707: "∃", 8709: "∅", 8711: "∇", 8712: "∈", 8713: "∉", 8715: "∋", 8719: "∏", 8721: "∑", 8722: "−", 8727: "∗", 8730: "√", 8733: "∝", 8734: "∞", 8736: "∠", 8743: "∧", 8744: "∨", 8745: "∩", 8746: "∪", 8747: "∫", 8756: "∴", 8764: "∼", 8773: "≅", 8776: "≈", 8800: "≠", 8801: "≡", 8804: "≤", 8805: "≥", 8834: "⊂", 8835: "⊃", 8836: "⊄", 8838: "⊆", 8839: "⊇", 8853: "⊕", 8855: "⊗", 8869: "⊥", 8901: "⋅" }), { 913: "Α", 914: "Β", 915: "Γ", 916: "Δ", 917: "Ε", 918: "Ζ", 919: "Η", 920: "Θ", 921: "Ι", 922: "Κ", 923: "Λ", 924: "Μ", 925: "Ν", 926: "Ξ", 927: "Ο", 928: "Π", 929: "Ρ", 931: "Σ", 932: "Τ", 933: "Υ", 934: "Φ", 935: "Χ", 936: "Ψ", 937: "Ω", 945: "α", 946: "β", 947: "γ", 948: "δ", 949: "ε", 950: "ζ", 951: "η", 952: "θ", 953: "ι", 954: "κ", 955: "λ", 956: "μ", 957: "ν", 958: "ξ", 959: "ο", 960: "π", 961: "ρ", 962: "ς", 963: "σ", 964: "τ", 965: "υ", 966: "φ", 967: "χ", 968: "ψ", 969: "ω", 977: "ϑ", 978: "ϒ", 982: "ϖ" }), { 338: "Œ", 339: "œ", 352: "Š", 353: "š", 376: "Ÿ", 402: "ƒ", 710: "ˆ", 732: "˜", 8194: " ", 8195: " ", 8201: " ", 8204: "", 8205: "", 8206: "", 8207: "", 8211: "–", 8212: "—", 8216: "‘", 8217: "’", 8218: "‚", 8220: "“", 8221: "”", 8222: "„", 8224: "†", 8225: "‡", 8226: "•", 8230: "…", 8240: "‰", 8242: "′", 8243: "″", 8249: "‹", 8250: "›", 8254: "‾", 8364: "€", 8482: "™", 8592: "←", 8593: "↑", 8594: "→", 8595: "↓", 8596: "↔", 8629: "↵", 8968: "⌈", 8969: "⌉", 8970: "⌊", 8971: "⌋", 9674: "◊", 9824: "♠", 9827: "♣", 9829: "♥", 9830: "♦" }), P4t = yh(ZPe), R4t = Zs(P4t).call(P4t, function(r) {
+ return ZPe[r].replace(/^&(\w+);$/g, function(i, o) {
+ return o.toLowerCase();
+ });
+}), LDe = function(r) {
+ return typeof r != "string" || r.length <= 0;
+}, Q4t = function(r) {
+ try {
+ var i = SDe(r);
+ return !LDe(i);
+ } catch {
+ return !1;
+ }
+}, Die = ["h1|h2|h3|h4|h5|h6", "ul|ol|li|dd|dl|dt", "table|thead|tbody|tfoot|col|colgroup|th|td|tr", "div|article|section|footer|aside|details|summary|code|audio|video|canvas|figure", "address|center|cite|p|pre|blockquote|marquee|caption|figcaption|track|source|output|svg"].join("|"), W0n = ["span|a|link|b|s|i|del|u|em|strong|sup|sub|kbd", "nav|font|bdi|samp|map|area|small|time|bdo|var|wbr|meter|dfn", "ruby|rt|rp|mark|q|progress|input|textarea|select|ins"].join("|"), V0n = new RegExp(At(F4t = At(O4t = "^(".concat(Die, "|")).call(O4t, W0n, "|")).call(F4t, "br|img|hr", ")( |$|/)"), "i");
+function $G(r, i) {
+ return typeof r != "string" ? "" : i ? r.replace(/[<>&]/g, function(o) {
+ return N4t[o] || o;
+ }) : r.replace(/[<>&"']/g, function(o) {
+ return N4t[o] || o;
+ });
+}
+function p5(r, i) {
+ if (typeof r != "string")
+ return "";
+ var o = L_t(r);
+ return o = function(l) {
+ return typeof l != "string" ? "" : l.replace(/&(\w+);?/g, function(f, g) {
+ return X0n[g] || f;
+ });
+ }(o), $G(o, i);
+}
+function L_t(r) {
+ return r.replace(/(\d+);?/g, function(i, o) {
+ return ZPe[o] || i;
+ });
+}
+function q0n(r) {
+ var i = function(f) {
+ return f.replace(/([0-9a-f]+);?/gi, function(g, A) {
+ var b = Ky("0x".concat(A), 16);
+ try {
+ return SDe(b);
+ } catch {
+ return g;
+ }
+ });
+ }(function(f) {
+ return f.replace(/(\d+);?/g, function(g, A) {
+ try {
+ return SDe(A);
+ } catch {
+ return g;
+ }
+ });
+ }(r)).match(/^\s*([\w\W]+?)(?=:)/i);
+ if (!i)
+ return !0;
+ var o = ["javascript", "data"], l = i[1].replace(/[\s]/g, "");
+ return Lu(o).call(o, l.toLowerCase()) === -1;
+}
+function vO(r) {
+ return encodeURI(r).replace(/%25/g, "%");
+}
+function Y0n(r) {
+ var i = function() {
+ if (typeof Reflect > "u" || !yt || yt.sham)
+ return !1;
+ if (typeof Proxy == "function")
+ return !0;
+ try {
+ return Boolean.prototype.valueOf.call(yt(Boolean, [], function() {
+ })), !0;
+ } catch {
+ return !1;
+ }
+ }();
+ return function() {
+ var o, l = Rn(r);
+ if (i) {
+ var f = Rn(this).constructor;
+ o = yt(l, arguments, f);
+ } else
+ o = l.apply(this, arguments);
+ return Ea(this, o);
+ };
+}
+var $4t = 0, r0 = function(r) {
+ ja(o, Sg);
+ var i = Y0n(o);
+ function o() {
+ var l, f = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : { needCache: !1 }, g = f.needCache, A = f.defaultCache, b = A === void 0 ? {} : A;
+ return vi(this, o), (l = i.call(this, {})).needCache = !!g, l.sign = "", g && (l.cache = b || {}, l.cacheKey = "~~C".concat($4t), $4t += 1), l;
+ }
+ return yi(o, [{ key: "initBrReg", value: function() {
+ var l = arguments.length > 0 && arguments[0] !== void 0 && arguments[0];
+ this.classicBr = JPe("classicBr") ? Nme() : l, this.removeBrAfterBlock = null, this.removeBrBeforeBlock = null, this.removeNewlinesBetweenTags = null;
+ } }, { key: "$cleanParagraph", value: function(l) {
+ var f = l.replace(/^\n+/, "").replace(/\n+$/, "");
+ return this.classicBr ? f : this.joinRawHtml(f).replace(/\n/g, "
").replace(/\r/g, `
+`);
+ } }, { key: "joinRawHtml", value: function(l) {
+ if (!this.removeBrAfterBlock) {
+ var f, g, A, b, v = (f = (g = this.$engine.htmlWhiteListAppend) === null || g === void 0 ? void 0 : g.split("|")) !== null && f !== void 0 ? f : [];
+ v = dd(A = Zs(v).call(v, function(_) {
+ return /[a-z-]+/gi.test(_) ? _ : null;
+ })).call(A, function(_) {
+ return _ !== null;
+ });
+ var k = At(v).call(v, Die).join("|");
+ this.removeBrAfterBlock = new RegExp("<(".concat(k, ")(>| [^>]*?>)[^\\S\\n]*?\\n"), "ig"), this.removeBrBeforeBlock = new RegExp("\\n[^\\S\\n]*?<\\/(".concat(k, ")>[^\\S\\n]*?\\n"), "ig"), this.removeNewlinesBetweenTags = new RegExp(At(b = "<\\/(".concat(k, ")>[^\\S\\n]*?\\n([^\\S\\n]*?)<(")).call(b, k, ")(>| [^>]*?>)"), "ig");
+ }
+ return l.replace(this.removeBrAfterBlock, "<$1$2").replace(this.removeBrBeforeBlock, "$1>").replace(this.removeNewlinesBetweenTags, "$1>\r$2<$3$4");
+ } }, { key: "toHtml", value: function(l, f) {
+ return l;
+ } }, { key: "makeHtml", value: function(l, f) {
+ return f(l).html;
+ } }, { key: "afterMakeHtml", value: function(l) {
+ return this.restoreCache(l);
+ } }, { key: "isContainsCache", value: function(l, f) {
+ if (f) {
+ var g = /^(\s*~~C\d+I\w+\$\s*)+$/g.test(l), A = new RegExp("~~C\\d+I".concat(o.IN_PARAGRAPH_CACHE_KEY_PREFIX_REGEX, "\\w+\\$"), "g").test(l);
+ return g && !A;
+ }
+ return new RegExp("~~C\\d+I(?!".concat(o.IN_PARAGRAPH_CACHE_KEY_PREFIX_REGEX, ")\\w+\\$"), "g").test(l);
+ } }, { key: "$splitHtmlByCache", value: function(l) {
+ var f = new RegExp("\\n*~~C\\d+I(?!".concat(o.IN_PARAGRAPH_CACHE_KEY_PREFIX_REGEX, ")\\w+\\$\\n?"), "g");
+ return { caches: l.match(f), contents: l.split(f) };
+ } }, { key: "makeExcludingCached", value: function(l, f) {
+ for (var g = this.$splitHtmlByCache(l), A = g.caches, b = g.contents, v = Zs(b).call(b, f), k = "", _ = 0; _ < v.length; _++) {
+ var T;
+ k += v[_], A && A[_] && (k += Go(T = A[_]).call(T));
+ }
+ return k;
+ } }, { key: "getCacheWithSpace", value: function(l, f) {
+ var g, A, b, v, k, _, T = arguments.length > 2 && arguments[2] !== void 0 && arguments[2], L = (g = (A = f.match(/^\n+/)) === null || A === void 0 ? void 0 : A[0]) !== null && g !== void 0 ? g : "", F = (b = (v = f.match(/\n+$/)) === null || v === void 0 ? void 0 : v[0]) !== null && b !== void 0 ? b : "";
+ return T ? c$(f, l) : At(k = At(_ = "".concat(L)).call(_, l)).call(k, F);
+ } }, { key: "getLineCount", value: function(l) {
+ var f, g, A, b = l, v = (f = (g = (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "").match(/^\n+/g)) === null || g === void 0 || (A = g[0]) === null || A === void 0 ? void 0 : A.length) !== null && f !== void 0 ? f : 0;
+ v = v === 1 ? 1 : 0, b = b.replace(/^\n+/g, "");
+ var k = new RegExp(`
+*~~C\\d+I(?:`.concat(o.IN_PARAGRAPH_CACHE_KEY_PREFIX_REGEX, ")?\\w+?_L(\\d+)\\$"), "g"), _ = 0;
+ return b = b.replace(k, function(T, L) {
+ return _ += Ky(L, 10), T.replace(/^\n+/g, "");
+ }), v + _ + (b.match(/\n/g) || []).length + 1;
+ } }, { key: "pushCache", value: function(l) {
+ var f, g, A = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "", b = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0;
+ if (this.needCache) {
+ var v = A || this.$engine.md5(l);
+ return this.cache[v] = { content: l, using: !0 }, At(f = At(g = "".concat(this.cacheKey, "I")).call(g, v, "_L")).call(f, b, "$");
+ }
+ } }, { key: "popCache", value: function(l) {
+ if (this.needCache)
+ return this.cache[l].content || "";
+ } }, { key: "resetCache", value: function() {
+ if (this.needCache) {
+ for (var l = 0, f = yh(this.cache); l < f.length; l++) {
+ var g = f[l];
+ this.cache[g].using || delete this.cache[g];
+ }
+ for (var A = 0, b = yh(this.cache); A < b.length; A++) {
+ var v = b[A];
+ this.cache[v].using = !1;
+ }
+ }
+ } }, { key: "restoreCache", value: function(l) {
+ var f, g = this;
+ if (!this.needCache)
+ return l;
+ var A = new RegExp(At(f = "".concat(this.cacheKey, "I((?:")).call(f, o.IN_PARAGRAPH_CACHE_KEY_PREFIX_REGEX, ")?\\w+)\\$"), "g"), b = l.replace(A, function(v, k) {
+ return g.popCache(k.replace(/_L\d+$/, ""));
+ });
+ return this.resetCache(), b;
+ } }, { key: "checkCache", value: function(l, f) {
+ var g, A, b = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0;
+ return this.sign = this.$engine.md5(l), this.cache[this.sign] ? (this.cache[this.sign].using = !0, At(g = At(A = "".concat(this.cacheKey, "I")).call(A, this.sign, "_L")).call(g, b, "$")) : this.toHtml(l, f);
+ } }, { key: "mounted", value: function() {
+ } }, { key: "signWithCache", value: function(l) {
+ return !1;
+ } }]), o;
+}();
+Ui(r0, "HOOK_TYPE", QG.PAR), Ui(r0, "IN_PARAGRAPH_CACHE_KEY_PREFIX", "!"), Ui(r0, "IN_PARAGRAPH_CACHE_KEY_PREFIX_REGEX", "\\!");
+var U4t = oh(function() {
+ if (typeof ArrayBuffer == "function") {
+ var r = new ArrayBuffer(8);
+ Object.isExtensible(r) && Object.defineProperty(r, "a", { value: 8 });
+ }
+}), Mge = Object.isExtensible, KMe = oh(function() {
+ Mge(1);
+}) || U4t ? function(r) {
+ return !!Id(r) && (!U4t || BT(r) != "ArrayBuffer") && (!Mge || Mge(r));
+} : Mge, I_t = !oh(function() {
+ return Object.isExtensible(Object.preventExtensions({}));
+}), VQ = su(function(r) {
+ var i = _3.f, o = !1, l = $re("meta"), f = 0, g = function(b) {
+ i(b, l, { value: { objectID: "O" + f++, weakData: {} } });
+ }, A = r.exports = { enable: function() {
+ A.enable = function() {
+ }, o = !0;
+ var b = Ure.f, v = Do([].splice), k = {};
+ k[l] = 1, b(k).length && (Ure.f = function(_) {
+ for (var T = b(_), L = 0, F = T.length; L < F; L++)
+ if (T[L] === l) {
+ v(T, L, 1);
+ break;
+ }
+ return T;
+ }, qa({ target: "Object", stat: !0, forced: !0 }, { getOwnPropertyNames: OPe.f }));
+ }, fastKey: function(b, v) {
+ if (!Id(b))
+ return typeof b == "symbol" ? b : (typeof b == "string" ? "S" : "P") + b;
+ if (!nl(b, l)) {
+ if (!KMe(b))
+ return "F";
+ if (!v)
+ return "E";
+ g(b);
+ }
+ return b[l].objectID;
+ }, getWeakData: function(b, v) {
+ if (!nl(b, l)) {
+ if (!KMe(b))
+ return !0;
+ if (!v)
+ return !1;
+ g(b);
+ }
+ return b[l].weakData;
+ }, onFreeze: function(b) {
+ return I_t && o && KMe(b) && !nl(b, l) && g(b), b;
+ } };
+ lX[l] = !0;
+});
+VQ.enable, VQ.fastKey, VQ.getWeakData, VQ.onFreeze;
+var J0n = Qi.TypeError, Tpe = function(r, i) {
+ this.stopped = r, this.result = i;
+}, H4t = Tpe.prototype, Tg = function(r, i, o) {
+ var l, f, g, A, b, v, k, _ = o && o.that, T = !(!o || !o.AS_ENTRIES), L = !(!o || !o.IS_ITERATOR), F = !(!o || !o.INTERRUPTED), U = hm(i, _), q = function(R) {
+ return l && xDe(l, "normal", R), new Tpe(!0, R);
+ }, Z = function(R) {
+ return T ? (Oh(R), F ? U(R[0], R[1], q) : U(R[0], R[1])) : F ? U(R, q) : U(R);
+ };
+ if (L)
+ l = r;
+ else {
+ if (!(f = Oie(r)))
+ throw J0n(Eie(r) + " is not iterable");
+ if (l_t(f)) {
+ for (g = 0, A = Ck(r); A > g; g++)
+ if ((b = Z(r[g])) && E1(H4t, b))
+ return b;
+ return new Tpe(!1);
+ }
+ l = s$(r, f);
+ }
+ for (v = l.next; !(k = rl(v, l)).done; ) {
+ try {
+ b = Z(k.value);
+ } catch (R) {
+ xDe(l, "throw", R);
+ }
+ if (typeof b == "object" && b && E1(H4t, b))
+ return b;
+ }
+ return new Tpe(!1);
+}, Z0n = Qi.TypeError, fX = function(r, i) {
+ if (E1(i, r))
+ return r;
+ throw Z0n("Incorrect invocation");
+}, egn = _3.f, tgn = LL.forEach, ngn = Bv.set, rgn = Bv.getterFor, IDe = function(r, i, o) {
+ for (var l in i)
+ o && o.unsafe && r[l] ? r[l] = i[l] : m5(r, l, i[l], o);
+ return r;
+}, j4t = TA("species"), M_t = function(r) {
+ var i = b2(r), o = _3.f;
+ of && i && !i[j4t] && o(i, j4t, { configurable: !0, get: function() {
+ return this;
+ } });
+}, ign = _3.f, K4t = VQ.fastKey, z4t = Bv.set, zMe = Bv.getterFor, agn = { getConstructor: function(r, i, o, l) {
+ var f = r(function(k, _) {
+ fX(k, g), z4t(k, { type: i, index: wk(null), first: void 0, last: void 0, size: 0 }), of || (k.size = 0), _ != null && Tg(_, k[l], { that: k, AS_ENTRIES: o });
+ }), g = f.prototype, A = zMe(i), b = function(k, _, T) {
+ var L, F, U = A(k), q = v(k, _);
+ return q ? q.value = T : (U.last = q = { index: F = K4t(_, !0), key: _, value: T, previous: L = U.last, next: void 0, removed: !1 }, U.first || (U.first = q), L && (L.next = q), of ? U.size++ : k.size++, F !== "F" && (U.index[F] = q)), k;
+ }, v = function(k, _) {
+ var T, L = A(k), F = K4t(_);
+ if (F !== "F")
+ return L.index[F];
+ for (T = L.first; T; T = T.next)
+ if (T.key == _)
+ return T;
+ };
+ return IDe(g, { clear: function() {
+ for (var k = A(this), _ = k.index, T = k.first; T; )
+ T.removed = !0, T.previous && (T.previous = T.previous.next = void 0), delete _[T.index], T = T.next;
+ k.first = k.last = void 0, of ? k.size = 0 : this.size = 0;
+ }, delete: function(k) {
+ var _ = this, T = A(_), L = v(_, k);
+ if (L) {
+ var F = L.next, U = L.previous;
+ delete T.index[L.index], L.removed = !0, U && (U.next = F), F && (F.previous = U), T.first == L && (T.first = F), T.last == L && (T.last = U), of ? T.size-- : _.size--;
+ }
+ return !!L;
+ }, forEach: function(k) {
+ for (var _, T = A(this), L = hm(k, arguments.length > 1 ? arguments[1] : void 0); _ = _ ? _.next : T.first; )
+ for (L(_.value, _.key, this); _ && _.removed; )
+ _ = _.previous;
+ }, has: function(k) {
+ return !!v(this, k);
+ } }), IDe(g, o ? { get: function(k) {
+ var _ = v(this, k);
+ return _ && _.value;
+ }, set: function(k, _) {
+ return b(this, k === 0 ? 0 : k, _);
+ } } : { add: function(k) {
+ return b(this, k = k === 0 ? 0 : k, k);
+ } }), of && ign(g, "size", { get: function() {
+ return A(this).size;
+ } }), f;
+}, setStrong: function(r, i, o) {
+ var l = i + " Iterator", f = zMe(i), g = zMe(l);
+ NPe(r, i, function(A, b) {
+ z4t(this, { type: l, target: A, state: f(A), kind: b, last: void 0 });
+ }, function() {
+ for (var A = g(this), b = A.kind, v = A.last; v && v.removed; )
+ v = v.previous;
+ return A.target && (A.last = v = v ? v.next : A.state.first) ? b == "keys" ? { value: v.key, done: !1 } : b == "values" ? { value: v.value, done: !1 } : { value: [v.key, v.value], done: !1 } : (A.target = void 0, { value: void 0, done: !0 });
+ }, o ? "entries" : "values", !o, !0), M_t(i);
+} };
+(function(r, i, o) {
+ var l, f = r.indexOf("Map") !== -1, g = r.indexOf("Weak") !== -1, A = f ? "set" : "add", b = Qi[r], v = b && b.prototype, k = {};
+ if (of && vf(b) && (g || v.forEach && !oh(function() {
+ new b().entries().next();
+ }))) {
+ var _ = (l = i(function(L, F) {
+ ngn(fX(L, _), { type: r, collection: new b() }), F != null && Tg(F, L[A], { that: L, AS_ENTRIES: f });
+ })).prototype, T = rgn(r);
+ tgn(["add", "clear", "delete", "forEach", "get", "has", "set", "keys", "values", "entries"], function(L) {
+ var F = L == "add" || L == "set";
+ !(L in v) || g && L == "clear" || Uy(_, L, function(U, q) {
+ var Z = T(this).collection;
+ if (!F && g && !Id(U))
+ return L == "get" && void 0;
+ var R = Z[L](U === 0 ? 0 : U, q);
+ return F ? this : R;
+ });
+ }), g || egn(_, "size", { configurable: !0, get: function() {
+ return T(this).collection.size;
+ } });
+ } else
+ l = o.getConstructor(i, r, f, A), VQ.enable();
+ wL(l, r, !1, !0), k[r] = l, qa({ global: !0, forced: !0 }, k), g || o.setStrong(l, r, f);
+})("Map", function(r) {
+ return function() {
+ return r(this, arguments.length ? arguments[0] : void 0);
+ };
+}, agn);
+var F_t = ql.Map, ogn = F_t, G4t = [].push;
+qa({ target: "Map", stat: !0, forced: !0 }, { from: function(r) {
+ var i, o, l, f, g = arguments.length, A = g > 1 ? arguments[1] : void 0;
+ return Eme(this), (i = A !== void 0) && Fh(A), r == null ? new this() : (o = [], i ? (l = 0, f = hm(A, g > 2 ? arguments[2] : void 0), Tg(r, function(b) {
+ rl(G4t, o, f(b, l++));
+ })) : Tg(r, G4t, { that: o }), new this(o));
+} });
+qa({ target: "Map", stat: !0, forced: !0 }, { of: function() {
+ return new this(_O(arguments));
+} });
+qa({ target: "Map", proto: !0, real: !0, forced: !0 }, { deleteAll: function() {
+ for (var r, i = Oh(this), o = Fh(i.delete), l = !0, f = 0, g = arguments.length; f < g; f++)
+ r = rl(o, i, arguments[f]), l = l && r;
+ return !!l;
+} });
+qa({ target: "Map", proto: !0, real: !0, forced: !0 }, { emplace: function(r, i) {
+ var o = Oh(this), l = Fh(o.get), f = Fh(o.has), g = Fh(o.set), A = rl(f, o, r) && "update" in i ? i.update(rl(l, o, r), r, o) : i.insert(r, o);
+ return rl(g, o, r, A), A;
+} });
+var xT = s$;
+qa({ target: "Map", proto: !0, real: !0, forced: !0 }, { every: function(r) {
+ var i = Oh(this), o = xT(i), l = hm(r, arguments.length > 1 ? arguments[1] : void 0);
+ return !Tg(o, function(f, g, A) {
+ if (!l(g, f, i))
+ return A();
+ }, { AS_ENTRIES: !0, IS_ITERATOR: !0, INTERRUPTED: !0 }).stopped;
+} });
+var sgn = TA("species"), qre = function(r, i) {
+ var o, l = Oh(r).constructor;
+ return l === void 0 || (o = Oh(l)[sgn]) == null ? i : Eme(o);
+};
+qa({ target: "Map", proto: !0, real: !0, forced: !0 }, { filter: function(r) {
+ var i = Oh(this), o = xT(i), l = hm(r, arguments.length > 1 ? arguments[1] : void 0), f = new (qre(i, b2("Map")))(), g = Fh(f.set);
+ return Tg(o, function(A, b) {
+ l(b, A, i) && rl(g, f, A, b);
+ }, { AS_ENTRIES: !0, IS_ITERATOR: !0 }), f;
+} }), qa({ target: "Map", proto: !0, real: !0, forced: !0 }, { find: function(r) {
+ var i = Oh(this), o = xT(i), l = hm(r, arguments.length > 1 ? arguments[1] : void 0);
+ return Tg(o, function(f, g, A) {
+ if (l(g, f, i))
+ return A(g);
+ }, { AS_ENTRIES: !0, IS_ITERATOR: !0, INTERRUPTED: !0 }).result;
+} }), qa({ target: "Map", proto: !0, real: !0, forced: !0 }, { findKey: function(r) {
+ var i = Oh(this), o = xT(i), l = hm(r, arguments.length > 1 ? arguments[1] : void 0);
+ return Tg(o, function(f, g, A) {
+ if (l(g, f, i))
+ return A(f);
+ }, { AS_ENTRIES: !0, IS_ITERATOR: !0, INTERRUPTED: !0 }).result;
+} });
+var cgn = Do([].push);
+qa({ target: "Map", stat: !0, forced: !0 }, { groupBy: function(r, i) {
+ Fh(i);
+ var o = s$(r), l = new this(), f = Fh(l.has), g = Fh(l.get), A = Fh(l.set);
+ return Tg(o, function(b) {
+ var v = i(b);
+ rl(f, l, v) ? cgn(rl(g, l, v), b) : rl(A, l, v, [b]);
+ }, { IS_ITERATOR: !0 }), l;
+} });
+qa({ target: "Map", proto: !0, real: !0, forced: !0 }, { includes: function(r) {
+ return Tg(xT(Oh(this)), function(i, o, l) {
+ if (function(f, g) {
+ return f === g || f != f && g != g;
+ }(o, r))
+ return l();
+ }, { AS_ENTRIES: !0, IS_ITERATOR: !0, INTERRUPTED: !0 }).stopped;
+} }), qa({ target: "Map", stat: !0, forced: !0 }, { keyBy: function(r, i) {
+ var o = new this();
+ Fh(i);
+ var l = Fh(o.set);
+ return Tg(r, function(f) {
+ rl(l, o, i(f), f);
+ }), o;
+} }), qa({ target: "Map", proto: !0, real: !0, forced: !0 }, { keyOf: function(r) {
+ return Tg(xT(Oh(this)), function(i, o, l) {
+ if (o === r)
+ return l(i);
+ }, { AS_ENTRIES: !0, IS_ITERATOR: !0, INTERRUPTED: !0 }).result;
+} }), qa({ target: "Map", proto: !0, real: !0, forced: !0 }, { mapKeys: function(r) {
+ var i = Oh(this), o = xT(i), l = hm(r, arguments.length > 1 ? arguments[1] : void 0), f = new (qre(i, b2("Map")))(), g = Fh(f.set);
+ return Tg(o, function(A, b) {
+ rl(g, f, l(b, A, i), b);
+ }, { AS_ENTRIES: !0, IS_ITERATOR: !0 }), f;
+} }), qa({ target: "Map", proto: !0, real: !0, forced: !0 }, { mapValues: function(r) {
+ var i = Oh(this), o = xT(i), l = hm(r, arguments.length > 1 ? arguments[1] : void 0), f = new (qre(i, b2("Map")))(), g = Fh(f.set);
+ return Tg(o, function(A, b) {
+ rl(g, f, A, l(b, A, i));
+ }, { AS_ENTRIES: !0, IS_ITERATOR: !0 }), f;
+} }), qa({ target: "Map", proto: !0, real: !0, arity: 1, forced: !0 }, { merge: function(r) {
+ for (var i = Oh(this), o = Fh(i.set), l = arguments.length, f = 0; f < l; )
+ Tg(arguments[f++], o, { that: i, AS_ENTRIES: !0 });
+ return i;
+} });
+var lgn = Qi.TypeError;
+qa({ target: "Map", proto: !0, real: !0, forced: !0 }, { reduce: function(r) {
+ var i = Oh(this), o = xT(i), l = arguments.length < 2, f = l ? void 0 : arguments[1];
+ if (Fh(r), Tg(o, function(g, A) {
+ l ? (l = !1, f = A) : f = r(f, A, g, i);
+ }, { AS_ENTRIES: !0, IS_ITERATOR: !0 }), l)
+ throw lgn("Reduce of empty map with no initial value");
+ return f;
+} }), qa({ target: "Map", proto: !0, real: !0, forced: !0 }, { some: function(r) {
+ var i = Oh(this), o = xT(i), l = hm(r, arguments.length > 1 ? arguments[1] : void 0);
+ return Tg(o, function(f, g, A) {
+ if (l(g, f, i))
+ return A();
+ }, { AS_ENTRIES: !0, IS_ITERATOR: !0, INTERRUPTED: !0 }).stopped;
+} });
+var ugn = Qi.TypeError;
+qa({ target: "Map", proto: !0, real: !0, forced: !0 }, { update: function(r, i) {
+ var o = Oh(this), l = Fh(o.get), f = Fh(o.has), g = Fh(o.set), A = arguments.length;
+ Fh(i);
+ var b = rl(f, o, r);
+ if (!b && A < 3)
+ throw ugn("Updating absent value");
+ var v = b ? rl(l, o, r) : Fh(A > 2 ? arguments[2] : void 0)(r, o);
+ return rl(g, o, r, i(v, r, o)), o;
+} });
+var hgn = Qi.TypeError, X4t = function(r, i) {
+ var o, l = Oh(this), f = Fh(l.get), g = Fh(l.has), A = Fh(l.set), b = arguments.length > 2 ? arguments[2] : void 0;
+ if (!vf(i) && !vf(b))
+ throw hgn("At least one callback required");
+ return rl(g, l, r) ? (o = rl(f, l, r), vf(i) && (o = i(o), rl(A, l, r, o))) : vf(b) && (o = b(), rl(A, l, r, o)), o;
+};
+qa({ target: "Map", proto: !0, real: !0, forced: !0 }, { upsert: X4t }), qa({ target: "Map", proto: !0, real: !0, name: "upsert", forced: !0 }, { updateOrInsert: X4t });
+var W4t = ogn, Fge = d9t, fgn = j9t;
+function Pme(r, i, o) {
+ return Pme = function() {
+ if (typeof Reflect > "u" || !Fge || Fge.sham)
+ return !1;
+ if (typeof Proxy == "function")
+ return !0;
+ try {
+ return Boolean.prototype.valueOf.call(Fge(Boolean, [], function() {
+ })), !0;
+ } catch {
+ return !1;
+ }
+ }() ? Fge : function(l, f, g) {
+ var A = [null];
+ A.push.apply(A, f);
+ var b = new (fgn(Function).apply(l, A))();
+ return g && Kre(b, g.prototype), b;
+ }, Pme.apply(null, arguments);
+}
+function MDe(r) {
+ var i = typeof W4t == "function" ? new W4t() : void 0;
+ return MDe = function(o) {
+ if (o === null || !function(f) {
+ var g;
+ return kDe(g = Function.toString.call(f)).call(g, "[native code]") !== -1;
+ }(o))
+ return o;
+ if (typeof o != "function")
+ throw new TypeError("Super expression must either be null or a function");
+ if (i !== void 0) {
+ if (i.has(o))
+ return i.get(o);
+ i.set(o, l);
+ }
+ function l() {
+ return Pme(o, arguments, Rn(this).constructor);
+ }
+ return l.prototype = vre(o.prototype, { constructor: { value: l, enumerable: !1, writable: !0, configurable: !0 } }), Kre(l, o);
+ }, MDe(r);
+}
+function dgn(r) {
+ var i = function() {
+ if (typeof Reflect > "u" || !yt || yt.sham)
+ return !1;
+ if (typeof Proxy == "function")
+ return !0;
+ try {
+ return Boolean.prototype.valueOf.call(yt(Boolean, [], function() {
+ })), !0;
+ } catch {
+ return !1;
+ }
+ }();
+ return function() {
+ var o, l = Rn(r);
+ if (i) {
+ var f = Rn(this).constructor;
+ o = yt(l, arguments, f);
+ } else
+ o = l.apply(this, arguments);
+ return Ea(this, o);
+ };
+}
+var KQ = function(r, i) {
+ if (!kk(r) && Yl(r) !== i.name.toLowerCase() || !kk(r) && i.name.toLowerCase() === "array")
+ throw new TypeError("parameter given must be ".concat(i.name));
+ return !0;
+}, V4t = function(r, i) {
+ if (!(r instanceof i))
+ throw new Error("the hook does not correctly inherit");
+ return !0;
+}, Agn = function(r) {
+ if (Yl(r) !== "object")
+ throw new Error("the hook must be a instance, not a class");
+ return !0;
+}, Bpe = function(r) {
+ ja(o, MDe(Error));
+ var i = dgn(o);
+ function o(l, f) {
+ var g;
+ return vi(this, o), (g = i.call(this, l)).name = "Error", g.stack = g.buildStackTrace(f), g;
+ }
+ return yi(o, [{ key: "buildStackTrace", value: function(l) {
+ var f, g = l && l.stack ? l.stack : "";
+ return At(f = "".concat(this.stack, `
+Caused By: `)).call(f, g);
+ } }]), o;
+}();
+function q4t(r, i, o) {
+ var l, f;
+ if (r === -1)
+ k3.warn(At(l = At(f = "Duplicate hook name [".concat(i.HOOK_NAME, "] found, hook [")).call(f, i.toString(), "] ")).call(l, isNaN(o) ? "" : "at index [".concat(o, "] "), "will not take effect."));
+ else if (r === -2) {
+ var g;
+ k3.warn(At(g = "Hook [".concat(i.toString(), "] ")).call(g, isNaN(o) ? "" : "at index [".concat(o, "] "), "is not a valid hook, and will not take effect."));
+ }
+}
+function Spe(r) {
+ return FDe(r) || O_t(r);
+}
+function FDe(r) {
+ return Object.prototype.isPrototypeOf.call(Sg, r);
+}
+function O_t(r) {
+ return Object.prototype.isPrototypeOf.call(r0, r);
+}
+function GMe(r) {
+ return Spe(r) && (r == null ? void 0 : r.Cherry$$CUSTOM) === !0;
+}
+var ggn = function() {
+ function r(i, o, l) {
+ vi(this, r), this.$locale = l.locale, this.hookList = {}, this.hookNameList = {}, KQ(i, Array), this.registerInternalHooks(i, o), this.registerCustomHooks(o.engine.customSyntax, o);
+ }
+ return yi(r, [{ key: "registerInternalHooks", value: function(i, o) {
+ var l = this;
+ no(i).call(i, function(f, g) {
+ q4t(l.register(f, o), f, g);
+ });
+ } }, { key: "registerCustomHooks", value: function(i, o) {
+ var l = this;
+ if (i) {
+ var f = yh(i);
+ no(f).call(f, function(g) {
+ var A, b, v, k, _ = {}, T = i[g];
+ if (FDe(T))
+ b = T;
+ else {
+ if (!FDe(k = (v = T) == null ? void 0 : v.syntaxClass) && !O_t(k))
+ return;
+ b = T.syntaxClass, _.force = !!T.force, T.before ? _.before = T.before : T.after && (_.after = T.after);
+ }
+ Spe(b) ? (C3(b, "Cherry$$CUSTOM", { enumerable: !1, configurable: !1, writable: !1, value: !0 }), A = l.register(b, o, _)) : A = -2, q4t(A, b, void 0);
+ });
+ }
+ } }, { key: "getHookList", value: function() {
+ return this.hookList;
+ } }, { key: "getHookNameList", value: function() {
+ return this.hookNameList;
+ } }, { key: "register", value: function(i, o, l) {
+ var f, g, A = this, b = o.externals, v = o.engine, k = v.syntax;
+ if (Spe(i)) {
+ g = i.HOOK_NAME;
+ var _ = (k == null ? void 0 : k[g]) || {};
+ (f = new i({ externals: b, config: _, globalConfig: v.global })).afterInit(function() {
+ f.setLocale(A.$locale);
+ });
+ } else {
+ if (typeof i != "function" || !(f = i(o)) || !Spe(f.constructor))
+ return -2;
+ g = f.getName();
+ }
+ if (k[g] !== !1 || GMe(i)) {
+ var T = f.getType();
+ if (this.hookNameList[g]) {
+ var L;
+ if (!GMe(i) || !l.force)
+ return -1;
+ var F = this.hookNameList[g].type;
+ this.hookList[F] = dd(L = this.hookList[F]).call(L, function(Y) {
+ return Y.getName() !== g;
+ });
+ }
+ if (this.hookNameList[g] = { type: T }, this.hookList[T] = this.hookList[T] || [], GMe(i)) {
+ var U, q, Z, R = -1;
+ if (l.before)
+ (R = Dme(U = this.hookList[T]).call(U, function(Y) {
+ return Y.getName() === l.before;
+ })) === -1 && k3.warn(At(q = "Cannot find hook named [".concat(l.before, `],
+ custom hook [`)).call(q, g, "] will append to the end of the hooks."));
+ else if (l.after) {
+ var J, he;
+ (R = Dme(J = this.hookList[T]).call(J, function(Y) {
+ return Y.getName() === l.after;
+ })) === -1 ? k3.warn(At(he = "Cannot find hook named [".concat(l.after, `],
+ custom hook [`)).call(he, g, "] will append to the end of the hooks.")) : R += 1;
+ }
+ R < 0 || R >= this.hookList[T].length ? this.hookList[T].push(f) : gk(Z = this.hookList[T]).call(Z, R, 0, f);
+ } else
+ this.hookList[T].push(f);
+ }
+ } }]), r;
+}();
+function D_t(r) {
+ if (oC !== void 0 && QO(r) != null || r["@@iterator"] != null)
+ return v_t(r);
+}
+function BO(r) {
+ return function(i) {
+ if (g_t(i))
+ return CDe(i);
+ }(r) || D_t(r) || VPe(r) || function() {
+ throw new TypeError(`Invalid attempt to spread non-iterable instance.
+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
+ }();
+}
+function N_t(r) {
+ return p_t(r) || D_t(r) || VPe(r) || y_t();
+}
+function Y4t(r, i) {
+ var o = yh(r);
+ if (rA) {
+ var l = rA(r);
+ i && (l = dd(l).call(l, function(f) {
+ return o0(r, f).enumerable;
+ })), o.push.apply(o, l);
+ }
+ return o;
+}
+function J4t(r) {
+ for (var i = 1; i < arguments.length; i++) {
+ var o, l, f = arguments[i] != null ? arguments[i] : {};
+ i % 2 ? no(o = Y4t(Object(f), !0)).call(o, function(g) {
+ Ui(r, g, f[g]);
+ }) : i0 ? uC(r, i0(f)) : no(l = Y4t(Object(f))).call(l, function(g) {
+ C3(r, g, o0(f, g));
+ });
+ }
+ return r;
+}
+function G9(r, i, o) {
+ var l, f = arguments.length > 3 && arguments[3] !== void 0 && arguments[3], g = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 1;
+ if (!i)
+ return r;
+ i.lastIndex = 0;
+ for (var A = 0, b = []; (l = i.exec(r)) !== null; ) {
+ var v = { begin: l.index, length: l[0].length };
+ if (f && l.index === A - g) {
+ var k, _ = N_t(l), T = _[0], L = Da(_).call(_, 2);
+ b.push({ begin: v.begin + g, length: v.length - g, replacedText: o.apply(void 0, At(k = [Da(T).call(T, g), ""]).call(k, BO(L))) });
+ } else
+ b.push(J4t(J4t({}, v), {}, { replacedText: o.apply(void 0, BO(l)) }));
+ A = i.lastIndex, i.lastIndex -= g;
+ }
+ return i.lastIndex = 0, function(F, U) {
+ if (!U.length)
+ return F;
+ var q = [], Z = 0;
+ return no(U).call(U, function(R, J) {
+ q.push(Da(F).call(F, Z, R.begin)), q.push(R.replacedText), Z = R.begin + R.length, J === U.length - 1 && q.push(Da(F).call(F, Z));
+ }), q.join("");
+ }(r, b);
+}
+function pgn(r) {
+ var i = function() {
+ if (typeof Reflect > "u" || !yt || yt.sham)
+ return !1;
+ if (typeof Proxy == "function")
+ return !0;
+ try {
+ return Boolean.prototype.valueOf.call(yt(Boolean, [], function() {
+ })), !0;
+ } catch {
+ return !1;
+ }
+ }();
+ return function() {
+ var o, l = Rn(r);
+ if (i) {
+ var f = Rn(this).constructor;
+ o = yt(l, arguments, f);
+ } else
+ o = l.apply(this, arguments);
+ return Ea(this, o);
+ };
+}
+var P_t = function(r) {
+ ja(o, Sg);
+ var i = pgn(o);
+ function o() {
+ return vi(this, o), i.apply(this, arguments);
+ }
+ return yi(o, [{ key: "toHtml", value: function(l, f, g, A) {
+ var b, v;
+ return At(b = At(v = "".concat(f, '')).call(b, A, "");
+ } }, { key: "makeHtml", value: function(l) {
+ return Bg() ? l.replace(this.RULE.reg, this.toHtml) : G9(l, this.RULE.reg, this.toHtml, !0, 1);
+ } }, { key: "rule", value: function() {
+ var l = { begin: Bg() ? "((? "u" || !yt || yt.sham)
+ return !1;
+ if (typeof Proxy == "function")
+ return !0;
+ try {
+ return Boolean.prototype.valueOf.call(yt(Boolean, [], function() {
+ })), !0;
+ } catch {
+ return !1;
+ }
+ }();
+ return function() {
+ var o, l = Rn(r);
+ if (i) {
+ var f = Rn(this).constructor;
+ o = yt(l, arguments, f);
+ } else
+ o = l.apply(this, arguments);
+ return Ea(this, o);
+ };
+}
+Ui(P_t, "HOOK_NAME", "fontColor");
+var R_t = function(r) {
+ ja(o, Sg);
+ var i = mgn(o);
+ function o() {
+ return vi(this, o), i.apply(this, arguments);
+ }
+ return yi(o, [{ key: "toHtml", value: function(l, f, g, A) {
+ var b, v;
+ return At(b = At(v = "".concat(f, '')).call(b, A, "");
+ } }, { key: "makeHtml", value: function(l) {
+ return Bg() ? l.replace(this.RULE.reg, this.toHtml) : G9(l, this.RULE.reg, this.toHtml, !0, 1);
+ } }, { key: "rule", value: function() {
+ var l = { begin: Bg() ? "((? "u" || !yt || yt.sham)
+ return !1;
+ if (typeof Proxy == "function")
+ return !0;
+ try {
+ return Boolean.prototype.valueOf.call(yt(Boolean, [], function() {
+ })), !0;
+ } catch {
+ return !1;
+ }
+ }();
+ return function() {
+ var o, l = Rn(r);
+ if (i) {
+ var f = Rn(this).constructor;
+ o = yt(l, arguments, f);
+ } else
+ o = l.apply(this, arguments);
+ return Ea(this, o);
+ };
+}
+Ui(R_t, "HOOK_NAME", "bgColor");
+var Q_t = function(r) {
+ ja(o, Sg);
+ var i = bgn(o);
+ function o() {
+ return vi(this, o), i.apply(this, arguments);
+ }
+ return yi(o, [{ key: "toHtml", value: function(l, f, g, A) {
+ var b, v;
+ return At(b = At(v = "".concat(f, '')).call(b, A, "");
+ } }, { key: "makeHtml", value: function(l) {
+ return this.test(l) ? Bg() ? l.replace(this.RULE.reg, this.toHtml) : G9(l, this.RULE.reg, this.toHtml, !0, 1) : l;
+ } }, { key: "rule", value: function() {
+ var l = { begin: Bg() ? "((? "u" || !yt || yt.sham)
+ return !1;
+ if (typeof Proxy == "function")
+ return !0;
+ try {
+ return Boolean.prototype.valueOf.call(yt(Boolean, [], function() {
+ })), !0;
+ } catch {
+ return !1;
+ }
+ }();
+ return function() {
+ var o, l = Rn(r);
+ if (i) {
+ var f = Rn(this).constructor;
+ o = yt(l, arguments, f);
+ } else
+ o = l.apply(this, arguments);
+ return Ea(this, o);
+ };
+}
+Ui(Q_t, "HOOK_NAME", "fontSize");
+var $_t = function(r) {
+ ja(o, Sg);
+ var i = vgn(o);
+ function o() {
+ var l, f = (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : { config: void 0 }).config;
+ return vi(this, o), l = i.call(this, { config: f }), f ? (l.needWhitespace = !!f.needWhitespace, l) : Ea(l);
+ }
+ return yi(o, [{ key: "makeHtml", value: function(l) {
+ return this.test(l) ? l.replace(this.RULE.reg, "$1$2") : l;
+ } }, { key: "rule", value: function() {
+ var l = {};
+ return (l = (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : { config: void 0 }).config.needWhitespace ? Oge(Oge({}, l), {}, { begin: "(^|[\\s])\\~T\\~T", end: "\\~T\\~T(?=\\s|$)", content: "([\\w\\W]+?)" }) : Oge(Oge({}, l), {}, { begin: "(^|[^\\\\])\\~T\\~T", end: "\\~T\\~T", content: "([\\w\\W]+?)" })).reg = new RegExp(l.begin + l.content + l.end, "g"), l;
+ } }]), o;
+}();
+function ygn(r) {
+ var i = function() {
+ if (typeof Reflect > "u" || !yt || yt.sham)
+ return !1;
+ if (typeof Proxy == "function")
+ return !0;
+ try {
+ return Boolean.prototype.valueOf.call(yt(Boolean, [], function() {
+ })), !0;
+ } catch {
+ return !1;
+ }
+ }();
+ return function() {
+ var o, l = Rn(r);
+ if (i) {
+ var f = Rn(this).constructor;
+ o = yt(l, arguments, f);
+ } else
+ o = l.apply(this, arguments);
+ return Ea(this, o);
+ };
+}
+Ui($_t, "HOOK_NAME", "strikethrough");
+var U_t = function(r) {
+ ja(o, Sg);
+ var i = ygn(o);
+ function o() {
+ return vi(this, o), i.apply(this, arguments);
+ }
+ return yi(o, [{ key: "toHtml", value: function(l, f, g) {
+ var A;
+ return At(A = "".concat(f, "")).call(A, g, "");
+ } }, { key: "makeHtml", value: function(l) {
+ return Bg() ? l.replace(this.RULE.reg, this.toHtml) : G9(l, this.RULE.reg, this.toHtml, !0, 1);
+ } }, { key: "rule", value: function() {
+ var l = { begin: Bg() ? "((? "u" || !yt || yt.sham)
+ return !1;
+ if (typeof Proxy == "function")
+ return !0;
+ try {
+ return Boolean.prototype.valueOf.call(yt(Boolean, [], function() {
+ })), !0;
+ } catch {
+ return !1;
+ }
+ }();
+ return function() {
+ var o, l = Rn(r);
+ if (i) {
+ var f = Rn(this).constructor;
+ o = yt(l, arguments, f);
+ } else
+ o = l.apply(this, arguments);
+ return Ea(this, o);
+ };
+}
+Ui(U_t, "HOOK_NAME", "sup");
+var H_t = function(r) {
+ ja(o, Sg);
+ var i = wgn(o);
+ function o() {
+ return vi(this, o), i.apply(this, arguments);
+ }
+ return yi(o, [{ key: "toHtml", value: function(l, f, g) {
+ var A;
+ return At(A = "".concat(f, "")).call(A, g, "");
+ } }, { key: "makeHtml", value: function(l) {
+ return Bg() ? l.replace(this.RULE.reg, this.toHtml) : G9(l, this.RULE.reg, this.toHtml, !0, 1);
+ } }, { key: "rule", value: function() {
+ var l = { begin: Bg() ? "((? "u")
+ return null;
+ if ("currentScript" in document)
+ return document.currentScript;
+ try {
+ throw new Error();
+ } catch (he) {
+ var Z = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(he.stack) || [])[1];
+ if (Z) {
+ var R = document.getElementsByTagName("script");
+ for (var J in R)
+ if (R[J].src == Z)
+ return R[J];
+ }
+ return null;
+ }
+ }, isActive: function(Z, R, J) {
+ for (var he = "no-" + R; Z; ) {
+ var Y = Z.classList;
+ if (Y.contains(R))
+ return !0;
+ if (Y.contains(he))
+ return !1;
+ Z = Z.parentElement;
+ }
+ return !!J;
+ } }, languages: { plain: g, plaintext: g, text: g, txt: g, extend: function(Z, R) {
+ var J = A.util.clone(A.languages[Z]);
+ for (var he in R)
+ J[he] = R[he];
+ return J;
+ }, insertBefore: function(Z, R, J, he) {
+ var Y = (he = he || A.languages)[Z], ue = {};
+ for (var le in Y)
+ if (Y.hasOwnProperty(le)) {
+ if (le == R)
+ for (var be in J)
+ J.hasOwnProperty(be) && (ue[be] = J[be]);
+ J.hasOwnProperty(le) || (ue[le] = Y[le]);
+ }
+ var ke = he[Z];
+ return he[Z] = ue, A.languages.DFS(A.languages, function(de, Te) {
+ Te === ke && de != Z && (this[de] = ue);
+ }), ue;
+ }, DFS: function Z(R, J, he, Y) {
+ Y = Y || {};
+ var ue = A.util.objId;
+ for (var le in R)
+ if (R.hasOwnProperty(le)) {
+ J.call(R, le, R[le], he || le);
+ var be = R[le], ke = A.util.type(be);
+ ke !== "Object" || Y[ue(be)] ? ke !== "Array" || Y[ue(be)] || (Y[ue(be)] = !0, Z(be, J, le, Y)) : (Y[ue(be)] = !0, Z(be, J, null, Y));
+ }
+ } }, plugins: {}, highlightAll: function(Z, R) {
+ A.highlightAllUnder(document, Z, R);
+ }, highlightAllUnder: function(Z, R, J) {
+ var he = { callback: J, container: Z, selector: 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code' };
+ A.hooks.run("before-highlightall", he), he.elements = Array.prototype.slice.apply(he.container.querySelectorAll(he.selector)), A.hooks.run("before-all-elements-highlight", he);
+ for (var Y, ue = 0; Y = he.elements[ue++]; )
+ A.highlightElement(Y, R === !0, he.callback);
+ }, highlightElement: function(Z, R, J) {
+ var he = A.util.getLanguage(Z), Y = A.languages[he];
+ A.util.setLanguage(Z, he);
+ var ue = Z.parentElement;
+ ue && ue.nodeName.toLowerCase() === "pre" && A.util.setLanguage(ue, he);
+ var le = { element: Z, language: he, grammar: Y, code: Z.textContent };
+ function be(de) {
+ le.highlightedCode = de, A.hooks.run("before-insert", le), le.element.innerHTML = le.highlightedCode, A.hooks.run("after-highlight", le), A.hooks.run("complete", le), J && J.call(le.element);
+ }
+ if (A.hooks.run("before-sanity-check", le), (ue = le.element.parentElement) && ue.nodeName.toLowerCase() === "pre" && !ue.hasAttribute("tabindex") && ue.setAttribute("tabindex", "0"), !le.code)
+ return A.hooks.run("complete", le), void (J && J.call(le.element));
+ if (A.hooks.run("before-highlight", le), le.grammar)
+ if (R && o.Worker) {
+ var ke = new Worker(A.filename);
+ ke.onmessage = function(de) {
+ be(de.data);
+ }, ke.postMessage(JSON.stringify({ language: le.language, code: le.code, immediateClose: !0 }));
+ } else
+ be(A.highlight(le.code, le.grammar, le.language));
+ else
+ be(A.util.encode(le.code));
+ }, highlight: function(Z, R, J) {
+ var he = { code: Z, grammar: R, language: J };
+ if (A.hooks.run("before-tokenize", he), !he.grammar)
+ throw new Error('The language "' + he.language + '" has no grammar.');
+ return he.tokens = A.tokenize(he.code, he.grammar), A.hooks.run("after-tokenize", he), b.stringify(A.util.encode(he.tokens), he.language);
+ }, tokenize: function(Z, R) {
+ var J = R.rest;
+ if (J) {
+ for (var he in J)
+ R[he] = J[he];
+ delete R.rest;
+ }
+ var Y = new _();
+ return T(Y, Y.head, Z), k(Z, Y, R, Y.head, 0), function(ue) {
+ for (var le = [], be = ue.head.next; be !== ue.tail; )
+ le.push(be.value), be = be.next;
+ return le;
+ }(Y);
+ }, hooks: { all: {}, add: function(Z, R) {
+ var J = A.hooks.all;
+ J[Z] = J[Z] || [], J[Z].push(R);
+ }, run: function(Z, R) {
+ var J = A.hooks.all[Z];
+ if (J && J.length)
+ for (var he, Y = 0; he = J[Y++]; )
+ he(R);
+ } }, Token: b };
+ function b(Z, R, J, he) {
+ this.type = Z, this.content = R, this.alias = J, this.length = 0 | (he || "").length;
+ }
+ function v(Z, R, J, he) {
+ Z.lastIndex = R;
+ var Y = Z.exec(J);
+ if (Y && he && Y[1]) {
+ var ue = Y[1].length;
+ Y.index += ue, Y[0] = Y[0].slice(ue);
+ }
+ return Y;
+ }
+ function k(Z, R, J, he, Y, ue) {
+ for (var le in J)
+ if (J.hasOwnProperty(le) && J[le]) {
+ var be = J[le];
+ be = Array.isArray(be) ? be : [be];
+ for (var ke = 0; ke < be.length; ++ke) {
+ if (ue && ue.cause == le + "," + ke)
+ return;
+ var de = be[ke], Te = de.inside, xe = !!de.lookbehind, ie = !!de.greedy, Be = de.alias;
+ if (ie && !de.pattern.global) {
+ var te = de.pattern.toString().match(/[imsuy]*$/)[0];
+ de.pattern = RegExp(de.pattern.source, te + "g");
+ }
+ for (var Me = de.pattern || de, ve = he.next, ge = Y; ve !== R.tail && !(ue && ge >= ue.reach); ge += ve.value.length, ve = ve.next) {
+ var Je = ve.value;
+ if (R.length > Z.length)
+ return;
+ if (!(Je instanceof b)) {
+ var ot, bt = 1;
+ if (ie) {
+ if (!(ot = v(Me, ge, Z, xe)) || ot.index >= Z.length)
+ break;
+ var gt = ot.index, je = ot.index + ot[0].length, Qe = ge;
+ for (Qe += ve.value.length; gt >= Qe; )
+ Qe += (ve = ve.next).value.length;
+ if (ge = Qe -= ve.value.length, ve.value instanceof b)
+ continue;
+ for (var kt = ve; kt !== R.tail && (Qe < je || typeof kt.value == "string"); kt = kt.next)
+ bt++, Qe += kt.value.length;
+ bt--, Je = Z.slice(ge, Qe), ot.index -= ge;
+ } else if (!(ot = v(Me, 0, Je, xe)))
+ continue;
+ gt = ot.index;
+ var Wt = ot[0], jt = Je.slice(0, gt), Zn = Je.slice(gt + Wt.length), Ft = ge + Je.length;
+ ue && Ft > ue.reach && (ue.reach = Ft);
+ var wn = ve.prev;
+ if (jt && (wn = T(R, wn, jt), ge += jt.length), L(R, wn, bt), ve = T(R, wn, new b(le, Te ? A.tokenize(Wt, Te) : Wt, Be, Wt)), Zn && T(R, ve, Zn), bt > 1) {
+ var un = { cause: le + "," + ke, reach: Ft };
+ k(Z, R, J, ve.prev, ge, un), ue && un.reach > ue.reach && (ue.reach = un.reach);
+ }
+ }
+ }
+ }
+ }
+ }
+ function _() {
+ var Z = { value: null, prev: null, next: null }, R = { value: null, prev: Z, next: null };
+ Z.next = R, this.head = Z, this.tail = R, this.length = 0;
+ }
+ function T(Z, R, J) {
+ var he = R.next, Y = { value: J, prev: R, next: he };
+ return R.next = Y, he.prev = Y, Z.length++, Y;
+ }
+ function L(Z, R, J) {
+ for (var he = R.next, Y = 0; Y < J && he !== Z.tail; Y++)
+ he = he.next;
+ R.next = he, he.prev = R, Z.length -= Y;
+ }
+ if (o.Prism = A, b.stringify = function Z(R, J) {
+ if (typeof R == "string")
+ return R;
+ if (Array.isArray(R)) {
+ var he = "";
+ return R.forEach(function(ke) {
+ he += Z(ke, J);
+ }), he;
+ }
+ var Y = { type: R.type, content: Z(R.content, J), tag: "span", classes: ["token", R.type], attributes: {}, language: J }, ue = R.alias;
+ ue && (Array.isArray(ue) ? Array.prototype.push.apply(Y.classes, ue) : Y.classes.push(ue)), A.hooks.run("wrap", Y);
+ var le = "";
+ for (var be in Y.attributes)
+ le += " " + be + '="' + (Y.attributes[be] || "").replace(/"/g, """) + '"';
+ return "<" + Y.tag + ' class="' + Y.classes.join(" ") + '"' + le + ">" + Y.content + "" + Y.tag + ">";
+ }, !o.document)
+ return o.addEventListener && (A.disableWorkerMessageHandler || o.addEventListener("message", function(Z) {
+ var R = JSON.parse(Z.data), J = R.language, he = R.code, Y = R.immediateClose;
+ o.postMessage(A.highlight(he, A.languages[J], J)), Y && o.close();
+ }, !1)), A;
+ var F = A.util.currentScript();
+ function U() {
+ A.manual || A.highlightAll();
+ }
+ if (F && (A.filename = F.src, F.hasAttribute("data-manual") && (A.manual = !0)), !A.manual) {
+ var q = document.readyState;
+ q === "loading" || q === "interactive" && F && F.defer ? document.addEventListener("DOMContentLoaded", U) : window.requestAnimationFrame ? window.requestAnimationFrame(U) : window.setTimeout(U, 16);
+ }
+ return A;
+ }(typeof window < "u" ? window : typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope ? self : {});
+ r.exports && (r.exports = i), jy !== void 0 && (jy.Prism = i);
+});
+function e5t(r, i) {
+ var o = yh(r);
+ if (rA) {
+ var l = rA(r);
+ i && (l = dd(l).call(l, function(f) {
+ return o0(r, f).enumerable;
+ })), o.push.apply(o, l);
+ }
+ return o;
+}
+function kgn(r) {
+ var i = function() {
+ if (typeof Reflect > "u" || !yt || yt.sham)
+ return !1;
+ if (typeof Proxy == "function")
+ return !0;
+ try {
+ return Boolean.prototype.valueOf.call(yt(Boolean, [], function() {
+ })), !0;
+ } catch {
+ return !1;
+ }
+ }();
+ return function() {
+ var o, l = Rn(r);
+ if (i) {
+ var f = Rn(this).constructor;
+ o = yt(l, arguments, f);
+ } else
+ o = l.apply(this, arguments);
+ return Ea(this, o);
+ };
+}
+Prism.languages.clike = { comment: [{ pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/, lookbehind: !0, greedy: !0 }, { pattern: /(^|[^\\:])\/\/.*/, lookbehind: !0, greedy: !0 }], string: { pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, greedy: !0 }, "class-name": { pattern: /(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i, lookbehind: !0, inside: { punctuation: /[.\\]/ } }, keyword: /\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/, boolean: /\b(?:false|true)\b/, function: /\b\w+(?=\()/, number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i, operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/, punctuation: /[{}[\];(),.:]/ }, Prism.languages.c = Prism.languages.extend("clike", { comment: { pattern: /\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/, greedy: !0 }, string: { pattern: /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/, greedy: !0 }, "class-name": { pattern: /(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/, lookbehind: !0 }, keyword: /\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/, function: /\b[a-z_]\w*(?=\s*\()/i, number: /(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i, operator: />>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/ }), Prism.languages.insertBefore("c", "string", { char: { pattern: /'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/, greedy: !0 } }), Prism.languages.insertBefore("c", "string", { macro: { pattern: /(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im, lookbehind: !0, greedy: !0, alias: "property", inside: { string: [{ pattern: /^(#\s*include\s*)<[^>]+>/, lookbehind: !0 }, Prism.languages.c.string], char: Prism.languages.c.char, comment: Prism.languages.c.comment, "macro-name": [{ pattern: /(^#\s*define\s+)\w+\b(?!\()/i, lookbehind: !0 }, { pattern: /(^#\s*define\s+)\w+\b(?=\()/i, lookbehind: !0, alias: "function" }], directive: { pattern: /^(#\s*)[a-z]+/, lookbehind: !0, alias: "keyword" }, "directive-hash": /^#/, punctuation: /##|\\(?=[\r\n])/, expression: { pattern: /\S[\s\S]*/, inside: Prism.languages.c } } } }), Prism.languages.insertBefore("c", "function", { constant: /\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/ }), delete Prism.languages.c.boolean, function(r) {
+ function i(je, Qe) {
+ return je.replace(/<<(\d+)>>/g, function(kt, Wt) {
+ return "(?:" + Qe[+Wt] + ")";
+ });
+ }
+ function o(je, Qe, kt) {
+ return RegExp(i(je, Qe), kt || "");
+ }
+ function l(je, Qe) {
+ for (var kt = 0; kt < Qe; kt++)
+ je = je.replace(/<>/g, function() {
+ return "(?:" + je + ")";
+ });
+ return je.replace(/<>/g, "[^\\s\\S]");
+ }
+ var f = "bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void", g = "class enum interface record struct", A = "add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)", b = "abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";
+ function v(je) {
+ return "\\b(?:" + je.trim().replace(/ /g, "|") + ")\\b";
+ }
+ var k = v(g), _ = RegExp(v(f + " " + g + " " + A + " " + b)), T = v(g + " " + A + " " + b), L = v(f + " " + g + " " + b), F = l(/<(?:[^<>;=+\-*/%&|^]|<>)*>/.source, 2), U = l(/\((?:[^()]|<>)*\)/.source, 2), q = /@?\b[A-Za-z_]\w*\b/.source, Z = i(/<<0>>(?:\s*<<1>>)?/.source, [q, F]), R = i(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source, [T, Z]), J = /\[\s*(?:,\s*)*\]/.source, he = i(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source, [R, J]), Y = i(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source, [F, U, J]), ue = i(/\(<<0>>+(?:,<<0>>+)+\)/.source, [Y]), le = i(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source, [ue, R, J]), be = { keyword: _, punctuation: /[<>()?,.:[\]]/ }, ke = /'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source, de = /"(?:\\.|[^\\"\r\n])*"/.source, Te = /@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;
+ r.languages.csharp = r.languages.extend("clike", { string: [{ pattern: o(/(^|[^$\\])<<0>>/.source, [Te]), lookbehind: !0, greedy: !0 }, { pattern: o(/(^|[^@$\\])<<0>>/.source, [de]), lookbehind: !0, greedy: !0 }], "class-name": [{ pattern: o(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source, [R]), lookbehind: !0, inside: be }, { pattern: o(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source, [q, le]), lookbehind: !0, inside: be }, { pattern: o(/(\busing\s+)<<0>>(?=\s*=)/.source, [q]), lookbehind: !0 }, { pattern: o(/(\b<<0>>\s+)<<1>>/.source, [k, Z]), lookbehind: !0, inside: be }, { pattern: o(/(\bcatch\s*\(\s*)<<0>>/.source, [R]), lookbehind: !0, inside: be }, { pattern: o(/(\bwhere\s+)<<0>>/.source, [q]), lookbehind: !0 }, { pattern: o(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source, [he]), lookbehind: !0, inside: be }, { pattern: o(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source, [le, L, q]), inside: be }], keyword: _, number: /(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i, operator: />>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/, punctuation: /\?\.?|::|[{}[\];(),.:]/ }), r.languages.insertBefore("csharp", "number", { range: { pattern: /\.\./, alias: "operator" } }), r.languages.insertBefore("csharp", "punctuation", { "named-parameter": { pattern: o(/([(,]\s*)<<0>>(?=\s*:)/.source, [q]), lookbehind: !0, alias: "punctuation" } }), r.languages.insertBefore("csharp", "class-name", { namespace: { pattern: o(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source, [q]), lookbehind: !0, inside: { punctuation: /\./ } }, "type-expression": { pattern: o(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source, [U]), lookbehind: !0, alias: "class-name", inside: be }, "return-type": { pattern: o(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source, [le, R]), inside: be, alias: "class-name" }, "constructor-invocation": { pattern: o(/(\bnew\s+)<<0>>(?=\s*[[({])/.source, [le]), lookbehind: !0, inside: be, alias: "class-name" }, "generic-method": { pattern: o(/<<0>>\s*<<1>>(?=\s*\()/.source, [q, F]), inside: { function: o(/^<<0>>/.source, [q]), generic: { pattern: RegExp(F), alias: "class-name", inside: be } } }, "type-list": { pattern: o(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source, [k, Z, q, le, _.source, U, /\bnew\s*\(\s*\)/.source]), lookbehind: !0, inside: { "record-arguments": { pattern: o(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source, [Z, U]), lookbehind: !0, greedy: !0, inside: r.languages.csharp }, keyword: _, "class-name": { pattern: RegExp(le), greedy: !0, inside: be }, punctuation: /[,()]/ } }, preprocessor: { pattern: /(^[\t ]*)#.*/m, lookbehind: !0, alias: "property", inside: { directive: { pattern: /(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/, lookbehind: !0, alias: "keyword" } } } });
+ var xe = de + "|" + ke, ie = i(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source, [xe]), Be = l(i(/[^"'/()]|<<0>>|\(<>*\)/.source, [ie]), 2), te = /\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source, Me = i(/<<0>>(?:\s*\(<<1>>*\))?/.source, [R, Be]);
+ r.languages.insertBefore("csharp", "class-name", { attribute: { pattern: o(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source, [te, Me]), lookbehind: !0, greedy: !0, inside: { target: { pattern: o(/^<<0>>(?=\s*:)/.source, [te]), alias: "keyword" }, "attribute-arguments": { pattern: o(/\(<<0>>*\)/.source, [Be]), inside: r.languages.csharp }, "class-name": { pattern: RegExp(R), inside: { punctuation: /\./ } }, punctuation: /[:,]/ } } });
+ var ve = /:[^}\r\n]+/.source, ge = l(i(/[^"'/()]|<<0>>|\(<>*\)/.source, [ie]), 2), Je = i(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source, [ge, ve]), ot = l(i(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<>*\)/.source, [xe]), 2), bt = i(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source, [ot, ve]);
+ function gt(je, Qe) {
+ return { interpolation: { pattern: o(/((?:^|[^{])(?:\{\{)*)<<0>>/.source, [je]), lookbehind: !0, inside: { "format-string": { pattern: o(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source, [Qe, ve]), lookbehind: !0, inside: { punctuation: /^:/ } }, punctuation: /^\{|\}$/, expression: { pattern: /[\s\S]+/, alias: "language-csharp", inside: r.languages.csharp } } }, string: /[\s\S]+/ };
+ }
+ r.languages.insertBefore("csharp", "string", { "interpolation-string": [{ pattern: o(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source, [Je]), lookbehind: !0, greedy: !0, inside: gt(Je, ge) }, { pattern: o(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source, [bt]), lookbehind: !0, greedy: !0, inside: gt(bt, ot) }], char: { pattern: RegExp(ke), greedy: !0 } }), r.languages.dotnet = r.languages.cs = r.languages.csharp;
+}(Prism), function(r) {
+ var i = /\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/, o = /\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g, function() {
+ return i.source;
+ });
+ r.languages.cpp = r.languages.extend("c", { "class-name": [{ pattern: RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g, function() {
+ return i.source;
+ })), lookbehind: !0 }, /\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/, /\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i, /\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/], keyword: i, number: { pattern: /(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i, greedy: !0 }, operator: />>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/, boolean: /\b(?:false|true)\b/ }), r.languages.insertBefore("cpp", "string", { module: { pattern: RegExp(/(\b(?:import|module)\s+)/.source + "(?:" + /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source + "|" + /(?:\s*:\s*)?|:\s*/.source.replace(//g, function() {
+ return o;
+ }) + ")"), lookbehind: !0, greedy: !0, inside: { string: /^[<"][\s\S]+/, operator: /:/, punctuation: /\./ } }, "raw-string": { pattern: /R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/, alias: "string", greedy: !0 } }), r.languages.insertBefore("cpp", "keyword", { "generic-function": { pattern: /\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i, inside: { function: /^\w+/, generic: { pattern: /<[\s\S]+/, alias: "class-name", inside: r.languages.cpp } } } }), r.languages.insertBefore("cpp", "operator", { "double-colon": { pattern: /::/, alias: "punctuation" } }), r.languages.insertBefore("cpp", "class-name", { "base-clause": { pattern: /(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/, lookbehind: !0, greedy: !0, inside: r.languages.extend("cpp", {}) } }), r.languages.insertBefore("inside", "double-colon", { "class-name": /\b[a-z_]\w*\b(?!\s*::)/i }, r.languages.cpp["base-clause"]);
+}(Prism), Prism.languages.markup = { comment: { pattern: //, greedy: !0 }, prolog: { pattern: /<\?[\s\S]+?\?>/, greedy: !0 }, doctype: { pattern: /"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i, greedy: !0, inside: { "internal-subset": { pattern: /(^[^\[]*\[)[\s\S]+(?=\]>$)/, lookbehind: !0, greedy: !0, inside: null }, string: { pattern: /"[^"]*"|'[^']*'/, greedy: !0 }, punctuation: /^$|[[\]]/, "doctype-tag": /^DOCTYPE/i, name: /[^\s<>'"]+/ } }, cdata: { pattern: //i, greedy: !0 }, tag: { pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/, greedy: !0, inside: { tag: { pattern: /^<\/?[^\s>\/]+/, inside: { punctuation: /^<\/?/, namespace: /^[^\s>\/:]+:/ } }, "special-attr": [], "attr-value": { pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/, inside: { punctuation: [{ pattern: /^=/, alias: "attr-equals" }, /"|'/] } }, punctuation: /\/?>/, "attr-name": { pattern: /[^\s>\/]+/, inside: { namespace: /^[^\s>\/:]+:/ } } } }, entity: [{ pattern: /&[\da-z]{1,8};/i, alias: "named-entity" }, /?[\da-f]{1,8};/i] }, Prism.languages.markup.tag.inside["attr-value"].inside.entity = Prism.languages.markup.entity, Prism.languages.markup.doctype.inside["internal-subset"].inside = Prism.languages.markup, Prism.hooks.add("wrap", function(r) {
+ r.type === "entity" && (r.attributes.title = r.content.replace(/&/, "&"));
+}), Object.defineProperty(Prism.languages.markup.tag, "addInlined", { value: function(r, i) {
+ var o = {};
+ o["language-" + i] = { pattern: /(^$)/i, lookbehind: !0, inside: Prism.languages[i] }, o.cdata = /^$/i;
+ var l = { "included-cdata": { pattern: //i, inside: o } };
+ l["language-" + i] = { pattern: /[\s\S]+/, inside: Prism.languages[i] };
+ var f = {};
+ f[r] = { pattern: RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g, function() {
+ return r;
+ }), "i"), lookbehind: !0, greedy: !0, inside: l }, Prism.languages.insertBefore("markup", "cdata", f);
+} }), Object.defineProperty(Prism.languages.markup.tag, "addAttribute", { value: function(r, i) {
+ Prism.languages.markup.tag.inside["special-attr"].push({ pattern: RegExp(/(^|["'\s])/.source + "(?:" + r + ")" + /\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source, "i"), lookbehind: !0, inside: { "attr-name": /^[^\s=]+/, "attr-value": { pattern: /=[\s\S]+/, inside: { value: { pattern: /(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/, lookbehind: !0, alias: [i, "language-" + i], inside: Prism.languages[i] }, punctuation: [{ pattern: /^=/, alias: "attr-equals" }, /"|'/] } } } });
+} }), Prism.languages.html = Prism.languages.markup, Prism.languages.mathml = Prism.languages.markup, Prism.languages.svg = Prism.languages.markup, Prism.languages.xml = Prism.languages.extend("markup", {}), Prism.languages.ssml = Prism.languages.xml, Prism.languages.atom = Prism.languages.xml, Prism.languages.rss = Prism.languages.xml, function(r) {
+ var i = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;
+ r.languages.css = { comment: /\/\*[\s\S]*?\*\//, atrule: { pattern: /@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/, inside: { rule: /^@[\w-]+/, "selector-function-argument": { pattern: /(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/, lookbehind: !0, alias: "selector" }, keyword: { pattern: /(^|[^\w-])(?:and|not|only|or)(?![\w-])/, lookbehind: !0 } } }, url: { pattern: RegExp("\\burl\\((?:" + i.source + "|" + /(?:[^\\\r\n()"']|\\[\s\S])*/.source + ")\\)", "i"), greedy: !0, inside: { function: /^url/i, punctuation: /^\(|\)$/, string: { pattern: RegExp("^" + i.source + "$"), alias: "url" } } }, selector: { pattern: RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|` + i.source + ")*(?=\\s*\\{)"), lookbehind: !0 }, string: { pattern: i, greedy: !0 }, property: { pattern: /(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i, lookbehind: !0 }, important: /!important\b/i, function: { pattern: /(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i, lookbehind: !0 }, punctuation: /[(){};:,]/ }, r.languages.css.atrule.inside.rest = r.languages.css;
+ var o = r.languages.markup;
+ o && (o.tag.addInlined("style", "css"), o.tag.addAttribute("style", "css"));
+}(Prism), function(r) {
+ var i = [/\b(?:async|sync|yield)\*/, /\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extends|extension|external|factory|final|finally|for|get|hide|if|implements|import|in|interface|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/], o = /(^|[^\w.])(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source, l = { pattern: RegExp(o + /[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source), lookbehind: !0, inside: { namespace: { pattern: /^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/, inside: { punctuation: /\./ } } } };
+ r.languages.dart = r.languages.extend("clike", { "class-name": [l, { pattern: RegExp(o + /[A-Z]\w*(?=\s+\w+\s*[;,=()])/.source), lookbehind: !0, inside: l.inside }], keyword: i, operator: /\bis!|\b(?:as|is)\b|\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/ }), r.languages.insertBefore("dart", "string", { "string-literal": { pattern: /r?(?:("""|''')[\s\S]*?\1|(["'])(?:\\.|(?!\2)[^\\\r\n])*\2(?!\2))/, greedy: !0, inside: { interpolation: { pattern: /((?:^|[^\\])(?:\\{2})*)\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/, lookbehind: !0, inside: { punctuation: /^\$\{?|\}$/, expression: { pattern: /[\s\S]+/, inside: r.languages.dart } } }, string: /[\s\S]+/ } }, string: void 0 }), r.languages.insertBefore("dart", "class-name", { metadata: { pattern: /@\w+/, alias: "function" } }), r.languages.insertBefore("dart", "class-name", { generics: { pattern: /<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/, inside: { "class-name": l, keyword: i, punctuation: /[<>(),.:]/, operator: /[?&|]/ } } });
+}(Prism), function(r) {
+ r.languages.diff = { coord: [/^(?:\*{3}|-{3}|\+{3}).*$/m, /^@@.*@@$/m, /^\d.*$/m] };
+ var i = { "deleted-sign": "-", "deleted-arrow": "<", "inserted-sign": "+", "inserted-arrow": ">", unchanged: " ", diff: "!" };
+ Object.keys(i).forEach(function(o) {
+ var l = i[o], f = [];
+ /^\w+$/.test(o) || f.push(/\w+/.exec(o)[0]), o === "diff" && f.push("bold"), r.languages.diff[o] = { pattern: RegExp("^(?:[" + l + `].*(?:\r
+?|
+|(?![\\s\\S])))+`, "m"), alias: f, inside: { line: { pattern: /(.)(?=[\s\S]).*(?:\r\n?|\n)?/, lookbehind: !0 }, prefix: { pattern: /[\s\S]/, alias: /\w+/.exec(o)[0] } } };
+ }), Object.defineProperty(r.languages.diff, "PREFIXES", { value: i });
+}(Prism), function(r) {
+ var i = /\\[\r\n](?:\s|\\[\r\n]|#.*(?!.))*(?![\s#]|\\[\r\n])/.source, o = /(?:[ \t]+(?![ \t])(?:)?|)/.source.replace(//g, function() {
+ return i;
+ }), l = /"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*"|'(?:[^'\\\r\n]|\\(?:\r\n|[\s\S]))*'/.source, f = /--[\w-]+=(?:|(?!["'])(?:[^\s\\]|\\.)+)/.source.replace(//g, function() {
+ return l;
+ }), g = { pattern: RegExp(l), greedy: !0 }, A = { pattern: /(^[ \t]*)#.*/m, lookbehind: !0, greedy: !0 };
+ function b(v, k) {
+ return v = v.replace(//g, function() {
+ return f;
+ }).replace(//g, function() {
+ return o;
+ }), RegExp(v, k);
+ }
+ r.languages.docker = { instruction: { pattern: /(^[ \t]*)(?:ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|ONBUILD|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)(?=\s)(?:\\.|[^\r\n\\])*(?:\\$(?:\s|#.*$)*(?![\s#])(?:\\.|[^\r\n\\])*)*/im, lookbehind: !0, greedy: !0, inside: { options: { pattern: b(/(^(?:ONBUILD)?\w+)(?:)*/.source, "i"), lookbehind: !0, greedy: !0, inside: { property: { pattern: /(^|\s)--[\w-]+/, lookbehind: !0 }, string: [g, { pattern: /(=)(?!["'])(?:[^\s\\]|\\.)+/, lookbehind: !0 }], operator: /\\$/m, punctuation: /=/ } }, keyword: [{ pattern: b(/(^(?:ONBUILD)?HEALTHCHECK(?:)*)(?:CMD|NONE)\b/.source, "i"), lookbehind: !0, greedy: !0 }, { pattern: b(/(^(?:ONBUILD)?FROM(?:)*(?!--)[^ \t\\]+)AS/.source, "i"), lookbehind: !0, greedy: !0 }, { pattern: b(/(^ONBUILD)\w+/.source, "i"), lookbehind: !0, greedy: !0 }, { pattern: /^\w+/, greedy: !0 }], comment: A, string: g, variable: /\$(?:\w+|\{[^{}"'\\]*\})/, operator: /\\$/m } }, comment: A }, r.languages.dockerfile = r.languages.docker;
+}(Prism), Prism.languages.git = { comment: /^#.*/m, deleted: /^[-–].*/m, inserted: /^\+.*/m, string: /("|')(?:\\.|(?!\1)[^\\\r\n])*\1/, command: { pattern: /^.*\$ git .*$/m, inside: { parameter: /\s--?\w+/ } }, coord: /^@@.*@@$/m, "commit-sha1": /^commit \w{40}$/m }, Prism.languages.glsl = Prism.languages.extend("c", { keyword: /\b(?:active|asm|atomic_uint|attribute|[ibdu]?vec[234]|bool|break|buffer|case|cast|centroid|class|coherent|common|const|continue|d?mat[234](?:x[234])?|default|discard|do|double|else|enum|extern|external|false|filter|fixed|flat|float|for|fvec[234]|goto|half|highp|hvec[234]|[iu]?sampler2DMS(?:Array)?|[iu]?sampler2DRect|[iu]?samplerBuffer|[iu]?samplerCube|[iu]?samplerCubeArray|[iu]?sampler[123]D|[iu]?sampler[12]DArray|[iu]?image2DMS(?:Array)?|[iu]?image2DRect|[iu]?imageBuffer|[iu]?imageCube|[iu]?imageCubeArray|[iu]?image[123]D|[iu]?image[12]DArray|if|in|inline|inout|input|int|interface|invariant|layout|long|lowp|mediump|namespace|noinline|noperspective|out|output|partition|patch|precise|precision|public|readonly|resource|restrict|return|sample|sampler[12]DArrayShadow|sampler[12]DShadow|sampler2DRectShadow|sampler3DRect|samplerCubeArrayShadow|samplerCubeShadow|shared|short|sizeof|smooth|static|struct|subroutine|superp|switch|template|this|true|typedef|uint|uniform|union|unsigned|using|varying|void|volatile|while|writeonly)\b/ }), Prism.languages.go = Prism.languages.extend("clike", { string: { pattern: /(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/, lookbehind: !0, greedy: !0 }, keyword: /\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/, boolean: /\b(?:_|false|iota|nil|true)\b/, number: [/\b0(?:b[01_]+|o[0-7_]+)i?\b/i, /\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i, /(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i], operator: /[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./, builtin: /\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/ }), Prism.languages.insertBefore("go", "string", { char: { pattern: /'(?:\\.|[^'\\\r\n]){0,10}'/, greedy: !0 } }), delete Prism.languages.go["class-name"], Prism.languages["go-mod"] = Prism.languages["go-module"] = { comment: { pattern: /\/\/.*/, greedy: !0 }, version: { pattern: /(^|[\s()[\],])v\d+\.\d+\.\d+(?:[+-][-+.\w]*)?(?![^\s()[\],])/, lookbehind: !0, alias: "number" }, "go-version": { pattern: /((?:^|\s)go\s+)\d+(?:\.\d+){1,2}/, lookbehind: !0, alias: "number" }, keyword: { pattern: /^([ \t]*)(?:exclude|go|module|replace|require|retract)\b/m, lookbehind: !0 }, operator: /=>/, punctuation: /[()[\],]/ }, function(r) {
+ var i = /[*&][^\s[\]{},]+/, o = /!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/, l = "(?:" + o.source + "(?:[ ]+" + i.source + ")?|" + i.source + "(?:[ ]+" + o.source + ")?)", f = /(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g, function() {
+ return /[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source;
+ }), g = /"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;
+ function A(b, v) {
+ v = (v || "").replace(/m/g, "") + "m";
+ var k = /([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g, function() {
+ return l;
+ }).replace(/<>/g, function() {
+ return b;
+ });
+ return RegExp(k, v);
+ }
+ r.languages.yaml = { scalar: { pattern: RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g, function() {
+ return l;
+ })), lookbehind: !0, alias: "string" }, comment: /#.*/, key: { pattern: RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g, function() {
+ return l;
+ }).replace(/<>/g, function() {
+ return "(?:" + f + "|" + g + ")";
+ })), lookbehind: !0, greedy: !0, alias: "atrule" }, directive: { pattern: /(^[ \t]*)%.+/m, lookbehind: !0, alias: "important" }, datetime: { pattern: A(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source), lookbehind: !0, alias: "number" }, boolean: { pattern: A(/false|true/.source, "i"), lookbehind: !0, alias: "important" }, null: { pattern: A(/null|~/.source, "i"), lookbehind: !0, alias: "important" }, string: { pattern: A(g), lookbehind: !0, greedy: !0 }, number: { pattern: A(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source, "i"), lookbehind: !0 }, tag: o, important: i, punctuation: /---|[:[\]{}\-,|>?]|\.\.\./ }, r.languages.yml = r.languages.yaml;
+}(Prism), function(r) {
+ var i = /(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;
+ function o(k) {
+ return k = k.replace(//g, function() {
+ return i;
+ }), RegExp(/((?:^|[^\\])(?:\\{2})*)/.source + "(?:" + k + ")");
+ }
+ var l = /(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source, f = /\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g, function() {
+ return l;
+ }), g = /\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;
+ r.languages.markdown = r.languages.extend("markup", {}), r.languages.insertBefore("markdown", "prolog", { "front-matter-block": { pattern: /(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/, lookbehind: !0, greedy: !0, inside: { punctuation: /^---|---$/, "front-matter": { pattern: /\S+(?:\s+\S+)*/, alias: ["yaml", "language-yaml"], inside: r.languages.yaml } } }, blockquote: { pattern: /^>(?:[\t ]*>)*/m, alias: "punctuation" }, table: { pattern: RegExp("^" + f + g + "(?:" + f + ")*", "m"), inside: { "table-data-rows": { pattern: RegExp("^(" + f + g + ")(?:" + f + ")*$"), lookbehind: !0, inside: { "table-data": { pattern: RegExp(l), inside: r.languages.markdown }, punctuation: /\|/ } }, "table-line": { pattern: RegExp("^(" + f + ")" + g + "$"), lookbehind: !0, inside: { punctuation: /\||:?-{3,}:?/ } }, "table-header-row": { pattern: RegExp("^" + f + "$"), inside: { "table-header": { pattern: RegExp(l), alias: "important", inside: r.languages.markdown }, punctuation: /\|/ } } } }, code: [{ pattern: /((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/, lookbehind: !0, alias: "keyword" }, { pattern: /^```[\s\S]*?^```$/m, greedy: !0, inside: { "code-block": { pattern: /^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m, lookbehind: !0 }, "code-language": { pattern: /^(```).+/, lookbehind: !0 }, punctuation: /```/ } }], title: [{ pattern: /\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m, alias: "important", inside: { punctuation: /==+$|--+$/ } }, { pattern: /(^\s*)#.+/m, lookbehind: !0, alias: "important", inside: { punctuation: /^#+|#+$/ } }], hr: { pattern: /(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m, lookbehind: !0, alias: "punctuation" }, list: { pattern: /(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m, lookbehind: !0, alias: "punctuation" }, "url-reference": { pattern: /!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/, inside: { variable: { pattern: /^(!?\[)[^\]]+/, lookbehind: !0 }, string: /(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/, punctuation: /^[\[\]!:]|[<>]/ }, alias: "url" }, bold: { pattern: o(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source), lookbehind: !0, greedy: !0, inside: { content: { pattern: /(^..)[\s\S]+(?=..$)/, lookbehind: !0, inside: {} }, punctuation: /\*\*|__/ } }, italic: { pattern: o(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source), lookbehind: !0, greedy: !0, inside: { content: { pattern: /(^.)[\s\S]+(?=.$)/, lookbehind: !0, inside: {} }, punctuation: /[*_]/ } }, strike: { pattern: o(/(~~?)(?:(?!~))+\2/.source), lookbehind: !0, greedy: !0, inside: { content: { pattern: /(^~~?)[\s\S]+(?=\1$)/, lookbehind: !0, inside: {} }, punctuation: /~~?/ } }, "code-snippet": { pattern: /(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/, lookbehind: !0, greedy: !0, alias: ["code", "keyword"] }, url: { pattern: o(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source), lookbehind: !0, greedy: !0, inside: { operator: /^!/, content: { pattern: /(^\[)[^\]]+(?=\])/, lookbehind: !0, inside: {} }, variable: { pattern: /(^\][ \t]?\[)[^\]]+(?=\]$)/, lookbehind: !0 }, url: { pattern: /(^\]\()[^\s)]+/, lookbehind: !0 }, string: { pattern: /(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/, lookbehind: !0 } } } }), ["url", "bold", "italic", "strike"].forEach(function(k) {
+ ["url", "bold", "italic", "strike", "code-snippet"].forEach(function(_) {
+ k !== _ && (r.languages.markdown[k].inside.content.inside[_] = r.languages.markdown[_]);
+ });
+ }), r.hooks.add("after-tokenize", function(k) {
+ k.language !== "markdown" && k.language !== "md" || function _(T) {
+ if (T && typeof T != "string")
+ for (var L = 0, F = T.length; L < F; L++) {
+ var U = T[L];
+ if (U.type === "code") {
+ var q = U.content[1], Z = U.content[3];
+ if (q && Z && q.type === "code-language" && Z.type === "code-block" && typeof q.content == "string") {
+ var R = q.content.replace(/\b#/g, "sharp").replace(/\b\+\+/g, "pp"), J = "language-" + (R = (/[a-z][\w-]*/i.exec(R) || [""])[0].toLowerCase());
+ Z.alias ? typeof Z.alias == "string" ? Z.alias = [Z.alias, J] : Z.alias.push(J) : Z.alias = [J];
+ }
+ } else
+ _(U.content);
+ }
+ }(k.tokens);
+ }), r.hooks.add("wrap", function(k) {
+ if (k.type === "code-block") {
+ for (var _ = "", T = 0, L = k.classes.length; T < L; T++) {
+ var F = k.classes[T], U = /language-(.+)/.exec(F);
+ if (U) {
+ _ = U[1];
+ break;
+ }
+ }
+ var q = r.languages[_];
+ if (q)
+ k.content = r.highlight(function(R) {
+ var J = R.replace(A, "");
+ return J = J.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi, function(he, Y) {
+ var ue;
+ if ((Y = Y.toLowerCase())[0] === "#")
+ return ue = Y[1] === "x" ? parseInt(Y.slice(2), 16) : Number(Y.slice(1)), v(ue);
+ var le = b[Y];
+ return le || he;
+ }), J;
+ }(k.content), q, _);
+ else if (_ && _ !== "none" && r.plugins.autoloader) {
+ var Z = "md-" + (/* @__PURE__ */ new Date()).valueOf() + "-" + Math.floor(1e16 * Math.random());
+ k.attributes.id = Z, r.plugins.autoloader.loadLanguages(_, function() {
+ var R = document.getElementById(Z);
+ R && (R.innerHTML = r.highlight(R.textContent, r.languages[_], _));
+ });
+ }
+ }
+ });
+ var A = RegExp(r.languages.markup.tag.pattern.source, "gi"), b = { amp: "&", lt: "<", gt: ">", quot: '"' }, v = String.fromCodePoint || String.fromCharCode;
+ r.languages.md = r.languages.markdown;
+}(Prism), Prism.languages.graphql = { comment: /#.*/, description: { pattern: /(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i, greedy: !0, alias: "string", inside: { "language-markdown": { pattern: /(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/, lookbehind: !0, inside: Prism.languages.markdown } } }, string: { pattern: /"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/, greedy: !0 }, number: /(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i, boolean: /\b(?:false|true)\b/, variable: /\$[a-z_]\w*/i, directive: { pattern: /@[a-z_]\w*/i, alias: "function" }, "attr-name": { pattern: /\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i, greedy: !0 }, "atom-input": { pattern: /\b[A-Z]\w*Input\b/, alias: "class-name" }, scalar: /\b(?:Boolean|Float|ID|Int|String)\b/, constant: /\b[A-Z][A-Z_\d]*\b/, "class-name": { pattern: /(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/, lookbehind: !0 }, fragment: { pattern: /(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/, lookbehind: !0, alias: "function" }, "definition-mutation": { pattern: /(\bmutation\s+)[a-zA-Z_]\w*/, lookbehind: !0, alias: "function" }, "definition-query": { pattern: /(\bquery\s+)[a-zA-Z_]\w*/, lookbehind: !0, alias: "function" }, keyword: /\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/, operator: /[!=|&]|\.{3}/, "property-query": /\w+(?=\s*\()/, object: /\w+(?=\s*\{)/, punctuation: /[!(){}\[\]:=,]/, property: /\w+/ }, Prism.hooks.add("after-tokenize", function(r) {
+ if (r.language === "graphql")
+ for (var i = r.tokens.filter(function(U) {
+ return typeof U != "string" && U.type !== "comment" && U.type !== "scalar";
+ }), o = 0; o < i.length; ) {
+ var l = i[o++];
+ if (l.type === "keyword" && l.content === "mutation") {
+ var f = [];
+ if (T(["definition-mutation", "punctuation"]) && _(1).content === "(") {
+ o += 2;
+ var g = L(/^\($/, /^\)$/);
+ if (g === -1)
+ continue;
+ for (; o < g; o++) {
+ var A = _(0);
+ A.type === "variable" && (F(A, "variable-input"), f.push(A.content));
+ }
+ o = g + 1;
+ }
+ if (T(["punctuation", "property-query"]) && _(0).content === "{" && (o++, F(_(0), "property-mutation"), f.length > 0)) {
+ var b = L(/^\{$/, /^\}$/);
+ if (b === -1)
+ continue;
+ for (var v = o; v < b; v++) {
+ var k = i[v];
+ k.type === "variable" && f.indexOf(k.content) >= 0 && F(k, "variable-input");
+ }
+ }
+ }
+ }
+ function _(U) {
+ return i[o + U];
+ }
+ function T(U, q) {
+ q = q || 0;
+ for (var Z = 0; Z < U.length; Z++) {
+ var R = _(Z + q);
+ if (!R || R.type !== U[Z])
+ return !1;
+ }
+ return !0;
+ }
+ function L(U, q) {
+ for (var Z = 1, R = o; R < i.length; R++) {
+ var J = i[R], he = J.content;
+ if (J.type === "punctuation" && typeof he == "string") {
+ if (U.test(he))
+ Z++;
+ else if (q.test(he) && --Z === 0)
+ return R;
+ }
+ }
+ return -1;
+ }
+ function F(U, q) {
+ var Z = U.alias;
+ Z ? Array.isArray(Z) || (U.alias = Z = [Z]) : U.alias = Z = [], Z.push(q);
+ }
+}), function(r) {
+ r.languages.ruby = r.languages.extend("clike", { comment: { pattern: /#.*|^=begin\s[\s\S]*?^=end/m, greedy: !0 }, "class-name": { pattern: /(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/, lookbehind: !0, inside: { punctuation: /[.\\]/ } }, keyword: /\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/, operator: /\.{2,3}|&\.|===|=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/, punctuation: /[(){}[\].,;]/ }), r.languages.insertBefore("ruby", "operator", { "double-colon": { pattern: /::/, alias: "punctuation" } });
+ var i = { pattern: /((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/, lookbehind: !0, inside: { content: { pattern: /^(#\{)[\s\S]+(?=\}$)/, lookbehind: !0, inside: r.languages.ruby }, delimiter: { pattern: /^#\{|\}$/, alias: "punctuation" } } };
+ delete r.languages.ruby.function;
+ var o = "(?:" + [/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source, /\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source, /\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source, /\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source, /<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|") + ")", l = /(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;
+ r.languages.insertBefore("ruby", "keyword", { "regex-literal": [{ pattern: RegExp(/%r/.source + o + /[egimnosux]{0,6}/.source), greedy: !0, inside: { interpolation: i, regex: /[\s\S]+/ } }, { pattern: /(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/, lookbehind: !0, greedy: !0, inside: { interpolation: i, regex: /[\s\S]+/ } }], variable: /[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/, symbol: [{ pattern: RegExp(/(^|[^:]):/.source + l), lookbehind: !0, greedy: !0 }, { pattern: RegExp(/([\r\n{(,][ \t]*)/.source + l + /(?=:(?!:))/.source), lookbehind: !0, greedy: !0 }], "method-definition": { pattern: /(\bdef\s+)\w+(?:\s*\.\s*\w+)?/, lookbehind: !0, inside: { function: /\b\w+$/, keyword: /^self\b/, "class-name": /^\w+/, punctuation: /\./ } } }), r.languages.insertBefore("ruby", "string", { "string-literal": [{ pattern: RegExp(/%[qQiIwWs]?/.source + o), greedy: !0, inside: { interpolation: i, string: /[\s\S]+/ } }, { pattern: /("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/, greedy: !0, inside: { interpolation: i, string: /[\s\S]+/ } }, { pattern: /<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i, alias: "heredoc-string", greedy: !0, inside: { delimiter: { pattern: /^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i, inside: { symbol: /\b\w+/, punctuation: /^<<[-~]?/ } }, interpolation: i, string: /[\s\S]+/ } }, { pattern: /<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i, alias: "heredoc-string", greedy: !0, inside: { delimiter: { pattern: /^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i, inside: { symbol: /\b\w+/, punctuation: /^<<[-~]?'|'$/ } }, string: /[\s\S]+/ } }], "command-literal": [{ pattern: RegExp(/%x/.source + o), greedy: !0, inside: { interpolation: i, command: { pattern: /[\s\S]+/, alias: "string" } } }, { pattern: /`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/, greedy: !0, inside: { interpolation: i, command: { pattern: /[\s\S]+/, alias: "string" } } }] }), delete r.languages.ruby.string, r.languages.insertBefore("ruby", "number", { builtin: /\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/, constant: /\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/ }), r.languages.rb = r.languages.ruby;
+}(Prism), function(r) {
+ var i = { pattern: /\\[\\(){}[\]^$+*?|.]/, alias: "escape" }, o = /\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/, l = "(?:[^\\\\-]|" + o.source + ")", f = RegExp(l + "-" + l), g = { pattern: /(<|')[^<>']+(?=[>']$)/, lookbehind: !0, alias: "variable" };
+ r.languages.regex = { "char-class": { pattern: /((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/, lookbehind: !0, inside: { "char-class-negation": { pattern: /(^\[)\^/, lookbehind: !0, alias: "operator" }, "char-class-punctuation": { pattern: /^\[|\]$/, alias: "punctuation" }, range: { pattern: f, inside: { escape: o, "range-punctuation": { pattern: /-/, alias: "operator" } } }, "special-escape": i, "char-set": { pattern: /\\[wsd]|\\p\{[^{}]+\}/i, alias: "class-name" }, escape: o } }, "special-escape": i, "char-set": { pattern: /\.|\\[wsd]|\\p\{[^{}]+\}/i, alias: "class-name" }, backreference: [{ pattern: /\\(?![123][0-7]{2})[1-9]/, alias: "keyword" }, { pattern: /\\k<[^<>']+>/, alias: "keyword", inside: { "group-name": g } }], anchor: { pattern: /[$^]|\\[ABbGZz]/, alias: "function" }, escape: o, group: [{ pattern: /\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/, alias: "punctuation", inside: { "group-name": g } }, { pattern: /\)/, alias: "punctuation" }], quantifier: { pattern: /(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/, alias: "number" }, alternation: { pattern: /\|/, alias: "keyword" } };
+}(Prism), Prism.languages.javascript = Prism.languages.extend("clike", { "class-name": [Prism.languages.clike["class-name"], { pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/, lookbehind: !0 }], keyword: [{ pattern: /((?:^|\})\s*)catch\b/, lookbehind: !0 }, { pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/, lookbehind: !0 }], function: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/, number: { pattern: RegExp(/(^|[^\w$])/.source + "(?:" + /NaN|Infinity/.source + "|" + /0[bB][01]+(?:_[01]+)*n?/.source + "|" + /0[oO][0-7]+(?:_[0-7]+)*n?/.source + "|" + /0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source + "|" + /\d+(?:_\d+)*n/.source + "|" + /(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source + ")" + /(?![\w$])/.source), lookbehind: !0 }, operator: /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/ }), Prism.languages.javascript["class-name"][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/, Prism.languages.insertBefore("javascript", "keyword", { regex: { pattern: RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source + /\//.source + "(?:" + /(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source + "|" + /(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source + ")" + /(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source), lookbehind: !0, greedy: !0, inside: { "regex-source": { pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/, lookbehind: !0, alias: "language-regex", inside: Prism.languages.regex }, "regex-delimiter": /^\/|\/$/, "regex-flags": /^[a-z]+$/ } }, "function-variable": { pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/, alias: "function" }, parameter: [{ pattern: /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/, lookbehind: !0, inside: Prism.languages.javascript }, { pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i, lookbehind: !0, inside: Prism.languages.javascript }, { pattern: /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/, lookbehind: !0, inside: Prism.languages.javascript }, { pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/, lookbehind: !0, inside: Prism.languages.javascript }], constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/ }), Prism.languages.insertBefore("javascript", "string", { hashbang: { pattern: /^#!.*/, greedy: !0, alias: "comment" }, "template-string": { pattern: /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/, greedy: !0, inside: { "template-punctuation": { pattern: /^`|`$/, alias: "string" }, interpolation: { pattern: /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/, lookbehind: !0, inside: { "interpolation-punctuation": { pattern: /^\$\{|\}$/, alias: "punctuation" }, rest: Prism.languages.javascript } }, string: /[\s\S]+/ } }, "string-property": { pattern: /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m, lookbehind: !0, greedy: !0, alias: "property" } }), Prism.languages.insertBefore("javascript", "operator", { "literal-property": { pattern: /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m, lookbehind: !0, alias: "property" } }), Prism.languages.markup && (Prism.languages.markup.tag.addInlined("script", "javascript"), Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source, "javascript")), Prism.languages.js = Prism.languages.javascript, function(r) {
+ function i(o, l) {
+ return "___" + o.toUpperCase() + l + "___";
+ }
+ Object.defineProperties(r.languages["markup-templating"] = {}, { buildPlaceholders: { value: function(o, l, f, g) {
+ if (o.language === l) {
+ var A = o.tokenStack = [];
+ o.code = o.code.replace(f, function(b) {
+ if (typeof g == "function" && !g(b))
+ return b;
+ for (var v, k = A.length; o.code.indexOf(v = i(l, k)) !== -1; )
+ ++k;
+ return A[k] = b, v;
+ }), o.grammar = r.languages.markup;
+ }
+ } }, tokenizePlaceholders: { value: function(o, l) {
+ if (o.language === l && o.tokenStack) {
+ o.grammar = r.languages[l];
+ var f = 0, g = Object.keys(o.tokenStack);
+ (function A(b) {
+ for (var v = 0; v < b.length && !(f >= g.length); v++) {
+ var k = b[v];
+ if (typeof k == "string" || k.content && typeof k.content == "string") {
+ var _ = g[f], T = o.tokenStack[_], L = typeof k == "string" ? k : k.content, F = i(l, _), U = L.indexOf(F);
+ if (U > -1) {
+ ++f;
+ var q = L.substring(0, U), Z = new r.Token(l, r.tokenize(T, o.grammar), "language-" + l, T), R = L.substring(U + F.length), J = [];
+ q && J.push.apply(J, A([q])), J.push(Z), R && J.push.apply(J, A([R])), typeof k == "string" ? b.splice.apply(b, [v, 1].concat(J)) : k.content = J;
+ }
+ } else
+ k.content && A(k.content);
+ }
+ return b;
+ })(o.tokens);
+ }
+ } } });
+}(Prism), Prism.languages.less = Prism.languages.extend("css", { comment: [/\/\*[\s\S]*?\*\//, { pattern: /(^|[^\\])\/\/.*/, lookbehind: !0 }], atrule: { pattern: /@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/, inside: { punctuation: /[:()]/ } }, selector: { pattern: /(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/, inside: { variable: /@+[\w-]+/ } }, property: /(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/, operator: /[+\-*\/]/ }), Prism.languages.insertBefore("less", "property", { variable: [{ pattern: /@[\w-]+\s*:/, inside: { punctuation: /:/ } }, /@@?[\w-]+/], "mixin-usage": { pattern: /([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/, lookbehind: !0, alias: "function" } }), Prism.languages.scss = Prism.languages.extend("css", { comment: { pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/, lookbehind: !0 }, atrule: { pattern: /@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/, inside: { rule: /@[\w-]+/ } }, url: /(?:[-a-z]+-)?url(?=\()/i, selector: { pattern: /(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/, inside: { parent: { pattern: /&/, alias: "important" }, placeholder: /%[-\w]+/, variable: /\$[-\w]+|#\{\$[-\w]+\}/ } }, property: { pattern: /(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/, inside: { variable: /\$[-\w]+|#\{\$[-\w]+\}/ } } }), Prism.languages.insertBefore("scss", "atrule", { keyword: [/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i, { pattern: /( )(?:from|through)(?= )/, lookbehind: !0 }] }), Prism.languages.insertBefore("scss", "important", { variable: /\$[-\w]+|#\{\$[-\w]+\}/ }), Prism.languages.insertBefore("scss", "function", { "module-modifier": { pattern: /\b(?:as|hide|show|with)\b/i, alias: "keyword" }, placeholder: { pattern: /%[-\w]+/, alias: "selector" }, statement: { pattern: /\B!(?:default|optional)\b/i, alias: "keyword" }, boolean: /\b(?:false|true)\b/, null: { pattern: /\bnull\b/, alias: "keyword" }, operator: { pattern: /(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/, lookbehind: !0 } }), Prism.languages.scss.atrule.inside.rest = Prism.languages.scss, function(r) {
+ r.languages.haml = { "multiline-comment": { pattern: /((?:^|\r?\n|\r)([\t ]*))(?:\/|-#).*(?:(?:\r?\n|\r)\2[\t ].+)*/, lookbehind: !0, alias: "comment" }, "multiline-code": [{ pattern: /((?:^|\r?\n|\r)([\t ]*)(?:[~-]|[&!]?=)).*,[\t ]*(?:(?:\r?\n|\r)\2[\t ].*,[\t ]*)*(?:(?:\r?\n|\r)\2[\t ].+)/, lookbehind: !0, inside: r.languages.ruby }, { pattern: /((?:^|\r?\n|\r)([\t ]*)(?:[~-]|[&!]?=)).*\|[\t ]*(?:(?:\r?\n|\r)\2[\t ].*\|[\t ]*)*/, lookbehind: !0, inside: r.languages.ruby }], filter: { pattern: /((?:^|\r?\n|\r)([\t ]*)):[\w-]+(?:(?:\r?\n|\r)(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/, lookbehind: !0, inside: { "filter-name": { pattern: /^:[\w-]+/, alias: "symbol" } } }, markup: { pattern: /((?:^|\r?\n|\r)[\t ]*)<.+/, lookbehind: !0, inside: r.languages.markup }, doctype: { pattern: /((?:^|\r?\n|\r)[\t ]*)!!!(?: .+)?/, lookbehind: !0 }, tag: { pattern: /((?:^|\r?\n|\r)[\t ]*)[%.#][\w\-#.]*[\w\-](?:\([^)]+\)|\{(?:\{[^}]+\}|[^{}])+\}|\[[^\]]+\])*[\/<>]*/, lookbehind: !0, inside: { attributes: [{ pattern: /(^|[^#])\{(?:\{[^}]+\}|[^{}])+\}/, lookbehind: !0, inside: r.languages.ruby }, { pattern: /\([^)]+\)/, inside: { "attr-value": { pattern: /(=\s*)(?:"(?:\\.|[^\\"\r\n])*"|[^)\s]+)/, lookbehind: !0 }, "attr-name": /[\w:-]+(?=\s*!?=|\s*[,)])/, punctuation: /[=(),]/ } }, { pattern: /\[[^\]]+\]/, inside: r.languages.ruby }], punctuation: /[<>]/ } }, code: { pattern: /((?:^|\r?\n|\r)[\t ]*(?:[~-]|[&!]?=)).+/, lookbehind: !0, inside: r.languages.ruby }, interpolation: { pattern: /#\{[^}]+\}/, inside: { delimiter: { pattern: /^#\{|\}$/, alias: "punctuation" }, ruby: { pattern: /[\s\S]+/, inside: r.languages.ruby } } }, punctuation: { pattern: /((?:^|\r?\n|\r)[\t ]*)[~=\-&!]+/, lookbehind: !0 } };
+ for (var i = ["css", { filter: "coffee", language: "coffeescript" }, "erb", "javascript", "less", "markdown", "ruby", "scss", "textile"], o = {}, l = 0, f = i.length; l < f; l++) {
+ var g = i[l];
+ g = typeof g == "string" ? { filter: g, language: g } : g, r.languages[g.language] && (o["filter-" + g.filter] = { pattern: RegExp("((?:^|\\r?\\n|\\r)([\\t ]*)):{{filter_name}}(?:(?:\\r?\\n|\\r)(?:\\2[\\t ].+|\\s*?(?=\\r?\\n|\\r)))+".replace("{{filter_name}}", function() {
+ return g.filter;
+ })), lookbehind: !0, inside: { "filter-name": { pattern: /^:[\w-]+/, alias: "symbol" }, text: { pattern: /[\s\S]+/, alias: [g.language, "language-" + g.language], inside: r.languages[g.language] } } });
+ }
+ r.languages.insertBefore("haml", "filter", o);
+}(Prism), Prism.languages.ini = { comment: { pattern: /(^[ \f\t\v]*)[#;][^\n\r]*/m, lookbehind: !0 }, section: { pattern: /(^[ \f\t\v]*)\[[^\n\r\]]*\]?/m, lookbehind: !0, inside: { "section-name": { pattern: /(^\[[ \f\t\v]*)[^ \f\t\v\]]+(?:[ \f\t\v]+[^ \f\t\v\]]+)*/, lookbehind: !0, alias: "selector" }, punctuation: /\[|\]/ } }, key: { pattern: /(^[ \f\t\v]*)[^ \f\n\r\t\v=]+(?:[ \f\t\v]+[^ \f\n\r\t\v=]+)*(?=[ \f\t\v]*=)/m, lookbehind: !0, alias: "attr-name" }, value: { pattern: /(=[ \f\t\v]*)[^ \f\n\r\t\v]+(?:[ \f\t\v]+[^ \f\n\r\t\v]+)*/, lookbehind: !0, alias: "attr-value", inside: { "inner-value": { pattern: /^("|').+(?=\1$)/, lookbehind: !0 } } }, punctuation: /=/ }, function(r) {
+ var i = /\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/, o = /(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source, l = { pattern: RegExp(/(^|[^\w.])/.source + o + /[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source), lookbehind: !0, inside: { namespace: { pattern: /^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/, inside: { punctuation: /\./ } }, punctuation: /\./ } };
+ r.languages.java = r.languages.extend("clike", { string: { pattern: /(^|[^\\])"(?:\\.|[^"\\\r\n])*"/, lookbehind: !0, greedy: !0 }, "class-name": [l, { pattern: RegExp(/(^|[^\w.])/.source + o + /[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source), lookbehind: !0, inside: l.inside }, { pattern: RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source + o + /[A-Z]\w*\b/.source), lookbehind: !0, inside: l.inside }], keyword: i, function: [r.languages.clike.function, { pattern: /(::\s*)[a-z_]\w*/, lookbehind: !0 }], number: /\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i, operator: { pattern: /(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m, lookbehind: !0 } }), r.languages.insertBefore("java", "string", { "triple-quoted-string": { pattern: /"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/, greedy: !0, alias: "string" }, char: { pattern: /'(?:\\.|[^'\\\r\n]){1,6}'/, greedy: !0 } }), r.languages.insertBefore("java", "class-name", { annotation: { pattern: /(^|[^.])@\w+(?:\s*\.\s*\w+)*/, lookbehind: !0, alias: "punctuation" }, generics: { pattern: /<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/, inside: { "class-name": l, keyword: i, punctuation: /[<>(),.:]/, operator: /[?&|]/ } }, import: [{ pattern: RegExp(/(\bimport\s+)/.source + o + /(?:[A-Z]\w*|\*)(?=\s*;)/.source), lookbehind: !0, inside: { namespace: l.inside.namespace, punctuation: /\./, operator: /\*/, "class-name": /\w+/ } }, { pattern: RegExp(/(\bimport\s+static\s+)/.source + o + /(?:\w+|\*)(?=\s*;)/.source), lookbehind: !0, alias: "static", inside: { namespace: l.inside.namespace, static: /\b\w+$/, punctuation: /\./, operator: /\*/, "class-name": /\w+/ } }], namespace: { pattern: RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(//g, function() {
+ return i.source;
+ })), lookbehind: !0, inside: { punctuation: /\./ } } });
+}(Prism), Prism.languages.json = { property: { pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/, lookbehind: !0, greedy: !0 }, string: { pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/, lookbehind: !0, greedy: !0 }, comment: { pattern: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/, greedy: !0 }, number: /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i, punctuation: /[{}[\],]/, operator: /:/, boolean: /\b(?:false|true)\b/, null: { pattern: /\bnull\b/, alias: "keyword" } }, Prism.languages.webmanifest = Prism.languages.json, function(r) {
+ var i = /("|')(?:\\(?:\r\n?|\n|.)|(?!\1)[^\\\r\n])*\1/;
+ r.languages.json5 = r.languages.extend("json", { property: [{ pattern: RegExp(i.source + "(?=\\s*:)"), greedy: !0 }, { pattern: /(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/, alias: "unquoted" }], string: { pattern: i, greedy: !0 }, number: /[+-]?\b(?:NaN|Infinity|0x[a-fA-F\d]+)\b|[+-]?(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[eE][+-]?\d+\b)?/ });
+}(Prism), Prism.languages.lua = { comment: /^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m, string: { pattern: /(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/, greedy: !0 }, number: /\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i, keyword: /\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/, function: /(?!\d)\w+(?=\s*(?:[({]))/, operator: [/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/, { pattern: /(^|[^.])\.\.(?!\.)/, lookbehind: !0 }], punctuation: /[\[\](){},;]|\.+|:+/ }, Prism.languages.matlab = { comment: [/%\{[\s\S]*?\}%/, /%.+/], string: { pattern: /\B'(?:''|[^'\r\n])*'/, greedy: !0 }, number: /(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[eE][+-]?\d+)?(?:[ij])?|\b[ij]\b/, keyword: /\b(?:NaN|break|case|catch|continue|else|elseif|end|for|function|if|inf|otherwise|parfor|pause|pi|return|switch|try|while)\b/, function: /\b(?!\d)\w+(?=\s*\()/, operator: /\.?[*^\/\\']|[+\-:@]|[<>=~]=?|&&?|\|\|?/, punctuation: /\.{3}|[.,;\[\](){}!]/ }, function(r) {
+ var i = ["$eq", "$gt", "$gte", "$in", "$lt", "$lte", "$ne", "$nin", "$and", "$not", "$nor", "$or", "$exists", "$type", "$expr", "$jsonSchema", "$mod", "$regex", "$text", "$where", "$geoIntersects", "$geoWithin", "$near", "$nearSphere", "$all", "$elemMatch", "$size", "$bitsAllClear", "$bitsAllSet", "$bitsAnyClear", "$bitsAnySet", "$comment", "$elemMatch", "$meta", "$slice", "$currentDate", "$inc", "$min", "$max", "$mul", "$rename", "$set", "$setOnInsert", "$unset", "$addToSet", "$pop", "$pull", "$push", "$pullAll", "$each", "$position", "$slice", "$sort", "$bit", "$addFields", "$bucket", "$bucketAuto", "$collStats", "$count", "$currentOp", "$facet", "$geoNear", "$graphLookup", "$group", "$indexStats", "$limit", "$listLocalSessions", "$listSessions", "$lookup", "$match", "$merge", "$out", "$planCacheStats", "$project", "$redact", "$replaceRoot", "$replaceWith", "$sample", "$set", "$skip", "$sort", "$sortByCount", "$unionWith", "$unset", "$unwind", "$setWindowFields", "$abs", "$accumulator", "$acos", "$acosh", "$add", "$addToSet", "$allElementsTrue", "$and", "$anyElementTrue", "$arrayElemAt", "$arrayToObject", "$asin", "$asinh", "$atan", "$atan2", "$atanh", "$avg", "$binarySize", "$bsonSize", "$ceil", "$cmp", "$concat", "$concatArrays", "$cond", "$convert", "$cos", "$dateFromParts", "$dateToParts", "$dateFromString", "$dateToString", "$dayOfMonth", "$dayOfWeek", "$dayOfYear", "$degreesToRadians", "$divide", "$eq", "$exp", "$filter", "$first", "$floor", "$function", "$gt", "$gte", "$hour", "$ifNull", "$in", "$indexOfArray", "$indexOfBytes", "$indexOfCP", "$isArray", "$isNumber", "$isoDayOfWeek", "$isoWeek", "$isoWeekYear", "$last", "$last", "$let", "$literal", "$ln", "$log", "$log10", "$lt", "$lte", "$ltrim", "$map", "$max", "$mergeObjects", "$meta", "$min", "$millisecond", "$minute", "$mod", "$month", "$multiply", "$ne", "$not", "$objectToArray", "$or", "$pow", "$push", "$radiansToDegrees", "$range", "$reduce", "$regexFind", "$regexFindAll", "$regexMatch", "$replaceOne", "$replaceAll", "$reverseArray", "$round", "$rtrim", "$second", "$setDifference", "$setEquals", "$setIntersection", "$setIsSubset", "$setUnion", "$size", "$sin", "$slice", "$split", "$sqrt", "$stdDevPop", "$stdDevSamp", "$strcasecmp", "$strLenBytes", "$strLenCP", "$substr", "$substrBytes", "$substrCP", "$subtract", "$sum", "$switch", "$tan", "$toBool", "$toDate", "$toDecimal", "$toDouble", "$toInt", "$toLong", "$toObjectId", "$toString", "$toLower", "$toUpper", "$trim", "$trunc", "$type", "$week", "$year", "$zip", "$count", "$dateAdd", "$dateDiff", "$dateSubtract", "$dateTrunc", "$getField", "$rand", "$sampleRate", "$setField", "$unsetField", "$comment", "$explain", "$hint", "$max", "$maxTimeMS", "$min", "$orderby", "$query", "$returnKey", "$showDiskLoc", "$natural"], o = "(?:" + (i = i.map(function(l) {
+ return l.replace("$", "\\$");
+ })).join("|") + ")\\b";
+ r.languages.mongodb = r.languages.extend("javascript", {}), r.languages.insertBefore("mongodb", "string", { property: { pattern: /(?:(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)(?=\s*:)/, greedy: !0, inside: { keyword: RegExp(`^(['"])?` + o + "(?:\\1)?$") } } }), r.languages.mongodb.string.inside = { url: { pattern: /https?:\/\/[-\w@:%.+~#=]{1,256}\.[a-z0-9()]{1,6}\b[-\w()@:%+.~#?&/=]*/i, greedy: !0 }, entity: { pattern: /\b(?:(?:[01]?\d\d?|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d\d?|2[0-4]\d|25[0-5])\b/, greedy: !0 } }, r.languages.insertBefore("mongodb", "constant", { builtin: { pattern: RegExp("\\b(?:" + ["ObjectId", "Code", "BinData", "DBRef", "Timestamp", "NumberLong", "NumberDecimal", "MaxKey", "MinKey", "RegExp", "ISODate", "UUID"].join("|") + ")\\b"), alias: "keyword" } });
+}(Prism), function(r) {
+ var i = /\$(?:\w[a-z\d]*(?:_[^\x00-\x1F\s"'\\()$]*)?|\{[^}\s"'\\]+\})/i;
+ r.languages.nginx = { comment: { pattern: /(^|[\s{};])#.*/, lookbehind: !0, greedy: !0 }, directive: { pattern: /(^|\s)\w(?:[^;{}"'\\\s]|\\.|"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|\s+(?:#.*(?!.)|(?![#\s])))*?(?=\s*[;{])/, lookbehind: !0, greedy: !0, inside: { string: { pattern: /((?:^|[^\\])(?:\\\\)*)(?:"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/, lookbehind: !0, greedy: !0, inside: { escape: { pattern: /\\["'\\nrt]/, alias: "entity" }, variable: i } }, comment: { pattern: /(\s)#.*/, lookbehind: !0, greedy: !0 }, keyword: { pattern: /^\S+/, greedy: !0 }, boolean: { pattern: /(\s)(?:off|on)(?!\S)/, lookbehind: !0 }, number: { pattern: /(\s)\d+[a-z]*(?!\S)/i, lookbehind: !0 }, variable: i } }, punctuation: /[{};]/ };
+}(Prism), Prism.languages.objectivec = Prism.languages.extend("c", { string: { pattern: /@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/, greedy: !0 }, keyword: /\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/, operator: /-[->]?|\+\+?|!=?|<=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/ }), delete Prism.languages.objectivec["class-name"], Prism.languages.objc = Prism.languages.objectivec, Prism.languages.pascal = { directive: { pattern: /\{\$[\s\S]*?\}/, greedy: !0, alias: ["marco", "property"] }, comment: { pattern: /\(\*[\s\S]*?\*\)|\{[\s\S]*?\}|\/\/.*/, greedy: !0 }, string: { pattern: /(?:'(?:''|[^'\r\n])*'(?!')|#[&$%]?[a-f\d]+)+|\^[a-z]/i, greedy: !0 }, asm: { pattern: /(\basm\b)[\s\S]+?(?=\bend\s*[;[])/i, lookbehind: !0, greedy: !0, inside: null }, keyword: [{ pattern: /(^|[^&])\b(?:absolute|array|asm|begin|case|const|constructor|destructor|do|downto|else|end|file|for|function|goto|if|implementation|inherited|inline|interface|label|nil|object|of|operator|packed|procedure|program|record|reintroduce|repeat|self|set|string|then|to|type|unit|until|uses|var|while|with)\b/i, lookbehind: !0 }, { pattern: /(^|[^&])\b(?:dispose|exit|false|new|true)\b/i, lookbehind: !0 }, { pattern: /(^|[^&])\b(?:class|dispinterface|except|exports|finalization|finally|initialization|inline|library|on|out|packed|property|raise|resourcestring|threadvar|try)\b/i, lookbehind: !0 }, { pattern: /(^|[^&])\b(?:absolute|abstract|alias|assembler|bitpacked|break|cdecl|continue|cppdecl|cvar|default|deprecated|dynamic|enumerator|experimental|export|external|far|far16|forward|generic|helper|implements|index|interrupt|iochecks|local|message|name|near|nodefault|noreturn|nostackframe|oldfpccall|otherwise|overload|override|pascal|platform|private|protected|public|published|read|register|reintroduce|result|safecall|saveregisters|softfloat|specialize|static|stdcall|stored|strict|unaligned|unimplemented|varargs|virtual|write)\b/i, lookbehind: !0 }], number: [/(?:[&%]\d+|\$[a-f\d]+)/i, /\b\d+(?:\.\d+)?(?:e[+-]?\d+)?/i], operator: [/\.\.|\*\*|:=|<[<=>]?|>[>=]?|[+\-*\/]=?|[@^=]/, { pattern: /(^|[^&])\b(?:and|as|div|exclude|in|include|is|mod|not|or|shl|shr|xor)\b/, lookbehind: !0 }], punctuation: /\(\.|\.\)|[()\[\]:;,.]/ }, Prism.languages.pascal.asm.inside = Prism.languages.extend("pascal", { asm: void 0, keyword: void 0, operator: void 0 }), Prism.languages.objectpascal = Prism.languages.pascal, function(r) {
+ var i = /\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/, o = [{ pattern: /\b(?:false|true)\b/i, alias: "boolean" }, { pattern: /(::\s*)\b[a-z_]\w*\b(?!\s*\()/i, greedy: !0, lookbehind: !0 }, { pattern: /(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i, greedy: !0, lookbehind: !0 }, /\b(?:null)\b/i, /\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/], l = /\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i, f = /=>|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/, g = /[{}\[\](),:;]/;
+ r.languages.php = { delimiter: { pattern: /\?>$|^<\?(?:php(?=\s)|=)?/i, alias: "important" }, comment: i, variable: /\$+(?:\w+\b|(?=\{))/, package: { pattern: /(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i, lookbehind: !0, inside: { punctuation: /\\/ } }, "class-name-definition": { pattern: /(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i, lookbehind: !0, alias: "class-name" }, "function-definition": { pattern: /(\bfunction\s+)[a-z_]\w*(?=\s*\()/i, lookbehind: !0, alias: "function" }, keyword: [{ pattern: /(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i, alias: "type-casting", greedy: !0, lookbehind: !0 }, { pattern: /([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i, alias: "type-hint", greedy: !0, lookbehind: !0 }, { pattern: /(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i, alias: "return-type", greedy: !0, lookbehind: !0 }, { pattern: /\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i, alias: "type-declaration", greedy: !0 }, { pattern: /(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i, alias: "type-declaration", greedy: !0, lookbehind: !0 }, { pattern: /\b(?:parent|self|static)(?=\s*::)/i, alias: "static-context", greedy: !0 }, { pattern: /(\byield\s+)from\b/i, lookbehind: !0 }, /\bclass\b/i, { pattern: /((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i, lookbehind: !0 }], "argument-name": { pattern: /([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i, lookbehind: !0 }, "class-name": [{ pattern: /(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i, greedy: !0, lookbehind: !0 }, { pattern: /(\|\s*)\b[a-z_]\w*(?!\\)\b/i, greedy: !0, lookbehind: !0 }, { pattern: /\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i, greedy: !0 }, { pattern: /(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i, alias: "class-name-fully-qualified", greedy: !0, lookbehind: !0, inside: { punctuation: /\\/ } }, { pattern: /(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i, alias: "class-name-fully-qualified", greedy: !0, inside: { punctuation: /\\/ } }, { pattern: /(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i, alias: "class-name-fully-qualified", greedy: !0, lookbehind: !0, inside: { punctuation: /\\/ } }, { pattern: /\b[a-z_]\w*(?=\s*\$)/i, alias: "type-declaration", greedy: !0 }, { pattern: /(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i, alias: ["class-name-fully-qualified", "type-declaration"], greedy: !0, inside: { punctuation: /\\/ } }, { pattern: /\b[a-z_]\w*(?=\s*::)/i, alias: "static-context", greedy: !0 }, { pattern: /(?:\\?\b[a-z_]\w*)+(?=\s*::)/i, alias: ["class-name-fully-qualified", "static-context"], greedy: !0, inside: { punctuation: /\\/ } }, { pattern: /([(,?]\s*)[a-z_]\w*(?=\s*\$)/i, alias: "type-hint", greedy: !0, lookbehind: !0 }, { pattern: /([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i, alias: ["class-name-fully-qualified", "type-hint"], greedy: !0, lookbehind: !0, inside: { punctuation: /\\/ } }, { pattern: /(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i, alias: "return-type", greedy: !0, lookbehind: !0 }, { pattern: /(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i, alias: ["class-name-fully-qualified", "return-type"], greedy: !0, lookbehind: !0, inside: { punctuation: /\\/ } }], constant: o, function: { pattern: /(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i, lookbehind: !0, inside: { punctuation: /\\/ } }, property: { pattern: /(->\s*)\w+/, lookbehind: !0 }, number: l, operator: f, punctuation: g };
+ var A = { pattern: /\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/, lookbehind: !0, inside: r.languages.php }, b = [{ pattern: /<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/, alias: "nowdoc-string", greedy: !0, inside: { delimiter: { pattern: /^<<<'[^']+'|[a-z_]\w*;$/i, alias: "symbol", inside: { punctuation: /^<<<'?|[';]$/ } } } }, { pattern: /<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i, alias: "heredoc-string", greedy: !0, inside: { delimiter: { pattern: /^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i, alias: "symbol", inside: { punctuation: /^<<<"?|[";]$/ } }, interpolation: A } }, { pattern: /`(?:\\[\s\S]|[^\\`])*`/, alias: "backtick-quoted-string", greedy: !0 }, { pattern: /'(?:\\[\s\S]|[^\\'])*'/, alias: "single-quoted-string", greedy: !0 }, { pattern: /"(?:\\[\s\S]|[^\\"])*"/, alias: "double-quoted-string", greedy: !0, inside: { interpolation: A } }];
+ r.languages.insertBefore("php", "variable", { string: b, attribute: { pattern: /#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im, greedy: !0, inside: { "attribute-content": { pattern: /^(#\[)[\s\S]+(?=\]$)/, lookbehind: !0, inside: { comment: i, string: b, "attribute-class-name": [{ pattern: /([^:]|^)\b[a-z_]\w*(?!\\)\b/i, alias: "class-name", greedy: !0, lookbehind: !0 }, { pattern: /([^:]|^)(?:\\?\b[a-z_]\w*)+/i, alias: ["class-name", "class-name-fully-qualified"], greedy: !0, lookbehind: !0, inside: { punctuation: /\\/ } }], constant: o, number: l, operator: f, punctuation: g } }, delimiter: { pattern: /^#\[|\]$/, alias: "punctuation" } } } }), r.hooks.add("before-tokenize", function(v) {
+ /<\?/.test(v.code) && r.languages["markup-templating"].buildPlaceholders(v, "php", /<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g);
+ }), r.hooks.add("after-tokenize", function(v) {
+ r.languages["markup-templating"].tokenizePlaceholders(v, "php");
+ });
+}(Prism), function(r) {
+ var i = /\b(?:bool|bytes|double|s?fixed(?:32|64)|float|[su]?int(?:32|64)|string)\b/;
+ r.languages.protobuf = r.languages.extend("clike", { "class-name": [{ pattern: /(\b(?:enum|extend|message|service)\s+)[A-Za-z_]\w*(?=\s*\{)/, lookbehind: !0 }, { pattern: /(\b(?:rpc\s+\w+|returns)\s*\(\s*(?:stream\s+)?)\.?[A-Za-z_]\w*(?:\.[A-Za-z_]\w*)*(?=\s*\))/, lookbehind: !0 }], keyword: /\b(?:enum|extend|extensions|import|message|oneof|option|optional|package|public|repeated|required|reserved|returns|rpc(?=\s+\w)|service|stream|syntax|to)\b(?!\s*=\s*\d)/, function: /\b[a-z_]\w*(?=\s*\()/i }), r.languages.insertBefore("protobuf", "operator", { map: { pattern: /\bmap<\s*[\w.]+\s*,\s*[\w.]+\s*>(?=\s+[a-z_]\w*\s*[=;])/i, alias: "class-name", inside: { punctuation: /[<>.,]/, builtin: i } }, builtin: i, "positional-class-name": { pattern: /(?:\b|\B\.)[a-z_]\w*(?:\.[a-z_]\w*)*(?=\s+[a-z_]\w*\s*[=;])/i, alias: "class-name", inside: { punctuation: /\./ } }, annotation: { pattern: /(\[\s*)[a-z_]\w*(?=\s*=)/i, lookbehind: !0 } });
+}(Prism), Prism.languages.python = { comment: { pattern: /(^|[^\\])#.*/, lookbehind: !0, greedy: !0 }, "string-interpolation": { pattern: /(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i, greedy: !0, inside: { interpolation: { pattern: /((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/, lookbehind: !0, inside: { "format-spec": { pattern: /(:)[^:(){}]+(?=\}$)/, lookbehind: !0 }, "conversion-option": { pattern: /![sra](?=[:}]$)/, alias: "punctuation" }, rest: null } }, string: /[\s\S]+/ } }, "triple-quoted-string": { pattern: /(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i, greedy: !0, alias: "string" }, string: { pattern: /(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i, greedy: !0 }, function: { pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g, lookbehind: !0 }, "class-name": { pattern: /(\bclass\s+)\w+/i, lookbehind: !0 }, decorator: { pattern: /(^[\t ]*)@\w+(?:\.\w+)*/m, lookbehind: !0, alias: ["annotation", "punctuation"], inside: { punctuation: /\./ } }, keyword: /\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/, builtin: /\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/, boolean: /\b(?:False|None|True)\b/, number: /\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i, operator: /[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/, punctuation: /[{}[\];(),.:]/ }, Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest = Prism.languages.python, Prism.languages.py = Prism.languages.python, Prism.languages.r = { comment: /#.*/, string: { pattern: /(['"])(?:\\.|(?!\1)[^\\\r\n])*\1/, greedy: !0 }, "percent-operator": { pattern: /%[^%\s]*%/, alias: "operator" }, boolean: /\b(?:FALSE|TRUE)\b/, ellipsis: /\.\.(?:\.|\d+)/, number: [/\b(?:Inf|NaN)\b/, /(?:\b0x[\dA-Fa-f]+(?:\.\d*)?|\b\d+(?:\.\d*)?|\B\.\d+)(?:[EePp][+-]?\d+)?[iL]?/], keyword: /\b(?:NA|NA_character_|NA_complex_|NA_integer_|NA_real_|NULL|break|else|for|function|if|in|next|repeat|while)\b/, operator: /->?>?|<(?:=|-)?|[>=!]=?|::?|&&?|\|\|?|[+*\/^$@~]/, punctuation: /[(){}\[\],;]/ }, function(r) {
+ for (var i = /\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|)*\*\//.source, o = 0; o < 2; o++)
+ i = i.replace(//g, function() {
+ return i;
+ });
+ i = i.replace(//g, function() {
+ return /[^\s\S]/.source;
+ }), r.languages.rust = { comment: [{ pattern: RegExp(/(^|[^\\])/.source + i), lookbehind: !0, greedy: !0 }, { pattern: /(^|[^\\:])\/\/.*/, lookbehind: !0, greedy: !0 }], string: { pattern: /b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/, greedy: !0 }, char: { pattern: /b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/, greedy: !0 }, attribute: { pattern: /#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/, greedy: !0, alias: "attr-name", inside: { string: null } }, "closure-params": { pattern: /([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/, lookbehind: !0, greedy: !0, inside: { "closure-punctuation": { pattern: /^\||\|$/, alias: "punctuation" }, rest: null } }, "lifetime-annotation": { pattern: /'\w+/, alias: "symbol" }, "fragment-specifier": { pattern: /(\$\w+:)[a-z]+/, lookbehind: !0, alias: "punctuation" }, variable: /\$\w+/, "function-definition": { pattern: /(\bfn\s+)\w+/, lookbehind: !0, alias: "function" }, "type-definition": { pattern: /(\b(?:enum|struct|trait|type|union)\s+)\w+/, lookbehind: !0, alias: "class-name" }, "module-declaration": [{ pattern: /(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/, lookbehind: !0, alias: "namespace" }, { pattern: /(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/, lookbehind: !0, alias: "namespace", inside: { punctuation: /::/ } }], keyword: [/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/, /\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/], function: /\b[a-z_]\w*(?=\s*(?:::\s*<|\())/, macro: { pattern: /\b\w+!/, alias: "property" }, constant: /\b[A-Z_][A-Z_\d]+\b/, "class-name": /\b[A-Z]\w*\b/, namespace: { pattern: /(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/, inside: { punctuation: /::/ } }, number: /\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/, boolean: /\b(?:false|true)\b/, punctuation: /->|\.\.=|\.{1,3}|::|[{}[\];(),:]/, operator: /[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<=?|>>?=?|[@?]/ }, r.languages.rust["closure-params"].inside.rest = r.languages.rust, r.languages.rust.attribute.inside.string = r.languages.rust.string;
+}(Prism), Prism.languages.sql = { comment: { pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/, lookbehind: !0 }, variable: [{ pattern: /@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/, greedy: !0 }, /@[\w.$]+/], string: { pattern: /(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/, greedy: !0, lookbehind: !0 }, identifier: { pattern: /(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/, greedy: !0, lookbehind: !0, inside: { punctuation: /^`|`$/ } }, function: /\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i, keyword: /\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i, boolean: /\b(?:FALSE|NULL|TRUE)\b/i, number: /\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i, operator: /[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i, punctuation: /[;[\]()`,.]/ }, function(r) {
+ r.languages.typescript = r.languages.extend("javascript", { "class-name": { pattern: /(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/, lookbehind: !0, greedy: !0, inside: null }, builtin: /\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/ }), r.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/, /\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/, /\btype\b(?=\s*(?:[\{*]|$))/), delete r.languages.typescript.parameter, delete r.languages.typescript["literal-property"];
+ var i = r.languages.extend("typescript", {});
+ delete i["class-name"], r.languages.typescript["class-name"].inside = i, r.languages.insertBefore("typescript", "function", { decorator: { pattern: /@[$\w\xA0-\uFFFF]+/, inside: { at: { pattern: /^@/, alias: "operator" }, function: /^[\s\S]+/ } }, "generic-function": { pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/, greedy: !0, inside: { function: /^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/, generic: { pattern: /<[\s\S]+/, alias: "class-name", inside: i } } } }), r.languages.ts = r.languages.typescript;
+}(Prism), function(r) {
+ var i = r.util.clone(r.languages.javascript), o = /(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source, l = /(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source, f = /(?:\{*\.{3}(?:[^{}]|)*\})/.source;
+ function g(v, k) {
+ return v = v.replace(//g, function() {
+ return o;
+ }).replace(//g, function() {
+ return l;
+ }).replace(//g, function() {
+ return f;
+ }), RegExp(v, k);
+ }
+ f = g(f).source, r.languages.jsx = r.languages.extend("markup", i), r.languages.jsx.tag.pattern = g(/<\/?(?:[\w.:-]+(?:+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|))?|))**\/?)?>/.source), r.languages.jsx.tag.inside.tag.pattern = /^<\/?[^\s>\/]*/, r.languages.jsx.tag.inside["attr-value"].pattern = /=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/, r.languages.jsx.tag.inside.tag.inside["class-name"] = /^[A-Z]\w*(?:\.[A-Z]\w*)*$/, r.languages.jsx.tag.inside.comment = i.comment, r.languages.insertBefore("inside", "attr-name", { spread: { pattern: g(//.source), inside: r.languages.jsx } }, r.languages.jsx.tag), r.languages.insertBefore("inside", "special-attr", { script: { pattern: g(/=/.source), alias: "language-javascript", inside: { "script-punctuation": { pattern: /^=(?=\{)/, alias: "punctuation" }, rest: r.languages.jsx } } }, r.languages.jsx.tag);
+ var A = function(v) {
+ return v ? typeof v == "string" ? v : typeof v.content == "string" ? v.content : v.content.map(A).join("") : "";
+ }, b = function(v) {
+ for (var k = [], _ = 0; _ < v.length; _++) {
+ var T = v[_], L = !1;
+ if (typeof T != "string" && (T.type === "tag" && T.content[0] && T.content[0].type === "tag" ? T.content[0].content[0].content === "" ? k.length > 0 && k[k.length - 1].tagName === A(T.content[0].content[1]) && k.pop() : T.content[T.content.length - 1].content === "/>" || k.push({ tagName: A(T.content[0].content[1]), openedBraces: 0 }) : k.length > 0 && T.type === "punctuation" && T.content === "{" ? k[k.length - 1].openedBraces++ : k.length > 0 && k[k.length - 1].openedBraces > 0 && T.type === "punctuation" && T.content === "}" ? k[k.length - 1].openedBraces-- : L = !0), (L || typeof T == "string") && k.length > 0 && k[k.length - 1].openedBraces === 0) {
+ var F = A(T);
+ _ < v.length - 1 && (typeof v[_ + 1] == "string" || v[_ + 1].type === "plain-text") && (F += A(v[_ + 1]), v.splice(_ + 1, 1)), _ > 0 && (typeof v[_ - 1] == "string" || v[_ - 1].type === "plain-text") && (F = A(v[_ - 1]) + F, v.splice(_ - 1, 1), _--), v[_] = new r.Token("plain-text", F, null, F);
+ }
+ T.content && typeof T.content != "string" && b(T.content);
+ }
+ };
+ r.hooks.add("after-tokenize", function(v) {
+ v.language !== "jsx" && v.language !== "tsx" || b(v.tokens);
+ });
+}(Prism), function(r) {
+ var i = r.util.clone(r.languages.typescript);
+ r.languages.tsx = r.languages.extend("jsx", i), delete r.languages.tsx.parameter, delete r.languages.tsx["literal-property"];
+ var o = r.languages.tsx.tag;
+ o.pattern = RegExp(/(^|[^\w$]|(?=<\/))/.source + "(?:" + o.pattern.source + ")", o.pattern.flags), o.lookbehind = !0;
+}(Prism), function(r) {
+ r.languages.sass = r.languages.extend("css", { comment: { pattern: /^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m, lookbehind: !0, greedy: !0 } }), r.languages.insertBefore("sass", "atrule", { "atrule-line": { pattern: /^(?:[ \t]*)[@+=].+/m, greedy: !0, inside: { atrule: /(?:@[\w-]+|[+=])/ } } }), delete r.languages.sass.atrule;
+ var i = /\$[-\w]+|#\{\$[-\w]+\}/, o = [/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/, { pattern: /(\s)-(?=\s)/, lookbehind: !0 }];
+ r.languages.insertBefore("sass", "property", { "variable-line": { pattern: /^[ \t]*\$.+/m, greedy: !0, inside: { punctuation: /:/, variable: i, operator: o } }, "property-line": { pattern: /^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m, greedy: !0, inside: { property: [/[^:\s]+(?=\s*:)/, { pattern: /(:)[^:\s]+/, lookbehind: !0 }], punctuation: /:/, variable: i, operator: o, important: r.languages.sass.important } } }), delete r.languages.sass.property, delete r.languages.sass.important, r.languages.insertBefore("sass", "punctuation", { selector: { pattern: /^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m, lookbehind: !0, greedy: !0 } });
+}(Prism), function(r) {
+ var i = "\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b", o = { pattern: /(^(["']?)\w+\2)[ \t]+\S.*/, lookbehind: !0, alias: "punctuation", inside: null }, l = { bash: o, environment: { pattern: RegExp("\\$" + i), alias: "constant" }, variable: [{ pattern: /\$?\(\([\s\S]+?\)\)/, greedy: !0, inside: { variable: [{ pattern: /(^\$\(\([\s\S]+)\)\)/, lookbehind: !0 }, /^\$\(\(/], number: /\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/, operator: /--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/, punctuation: /\(\(?|\)\)?|,|;/ } }, { pattern: /\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/, greedy: !0, inside: { variable: /^\$\(|^`|\)$|`$/ } }, { pattern: /\$\{[^}]+\}/, greedy: !0, inside: { operator: /:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/, punctuation: /[\[\]]/, environment: { pattern: RegExp("(\\{)" + i), lookbehind: !0, alias: "constant" } } }, /\$(?:\w+|[#?*!@$])/], entity: /\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/ };
+ r.languages.bash = { shebang: { pattern: /^#!\s*\/.*/, alias: "important" }, comment: { pattern: /(^|[^"{\\$])#.*/, lookbehind: !0 }, "function-name": [{ pattern: /(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/, lookbehind: !0, alias: "function" }, { pattern: /\b[\w-]+(?=\s*\(\s*\)\s*\{)/, alias: "function" }], "for-or-select": { pattern: /(\b(?:for|select)\s+)\w+(?=\s+in\s)/, alias: "variable", lookbehind: !0 }, "assign-left": { pattern: /(^|[\s;|&]|[<>]\()\w+(?=\+?=)/, inside: { environment: { pattern: RegExp("(^|[\\s;|&]|[<>]\\()" + i), lookbehind: !0, alias: "constant" } }, alias: "variable", lookbehind: !0 }, string: [{ pattern: /((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/, lookbehind: !0, greedy: !0, inside: l }, { pattern: /((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/, lookbehind: !0, greedy: !0, inside: { bash: o } }, { pattern: /(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/, lookbehind: !0, greedy: !0, inside: l }, { pattern: /(^|[^$\\])'[^']*'/, lookbehind: !0, greedy: !0 }, { pattern: /\$'(?:[^'\\]|\\[\s\S])*'/, greedy: !0, inside: { entity: l.entity } }], environment: { pattern: RegExp("\\$?" + i), alias: "constant" }, variable: l.variable, function: { pattern: /(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/, lookbehind: !0 }, keyword: { pattern: /(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/, lookbehind: !0 }, builtin: { pattern: /(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/, lookbehind: !0, alias: "class-name" }, boolean: { pattern: /(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/, lookbehind: !0 }, "file-descriptor": { pattern: /\B&\d\b/, alias: "important" }, operator: { pattern: /\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/, inside: { "file-descriptor": { pattern: /^\d/, alias: "important" } } }, punctuation: /\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/, number: { pattern: /(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/, lookbehind: !0 } }, o.inside = r.languages.bash;
+ for (var f = ["comment", "function-name", "for-or-select", "assign-left", "string", "environment", "function", "keyword", "builtin", "boolean", "file-descriptor", "operator", "punctuation", "number"], g = l.variable[1].inside, A = 0; A < f.length; A++)
+ g[f[A]] = r.languages.bash[f[A]];
+ r.languages.shell = r.languages.bash;
+}(Prism), Prism.languages.swift = { comment: { pattern: /(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/, lookbehind: !0, greedy: !0 }, "string-literal": [{ pattern: RegExp(/(^|[^"#])/.source + "(?:" + /"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source + "|" + /"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source + ")" + /(?!["#])/.source), lookbehind: !0, greedy: !0, inside: { interpolation: { pattern: /(\\\()(?:[^()]|\([^()]*\))*(?=\))/, lookbehind: !0, inside: null }, "interpolation-punctuation": { pattern: /^\)|\\\($/, alias: "punctuation" }, punctuation: /\\(?=[\r\n])/, string: /[\s\S]+/ } }, { pattern: RegExp(/(^|[^"#])(#+)/.source + "(?:" + /"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source + "|" + /"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source + ")\\2"), lookbehind: !0, greedy: !0, inside: { interpolation: { pattern: /(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/, lookbehind: !0, inside: null }, "interpolation-punctuation": { pattern: /^\)|\\#+\($/, alias: "punctuation" }, string: /[\s\S]+/ } }], directive: { pattern: RegExp(/#/.source + "(?:" + /(?:elseif|if)\b/.source + "(?:[ ]*" + /(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source + ")+|" + /(?:else|endif)\b/.source + ")"), alias: "property", inside: { "directive-name": /^#\w+/, boolean: /\b(?:false|true)\b/, number: /\b\d+(?:\.\d+)*\b/, operator: /!|&&|\|\||[<>]=?/, punctuation: /[(),]/ } }, literal: { pattern: /#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/, alias: "constant" }, "other-directive": { pattern: /#\w+\b/, alias: "property" }, attribute: { pattern: /@\w+/, alias: "atrule" }, "function-definition": { pattern: /(\bfunc\s+)\w+/, lookbehind: !0, alias: "function" }, label: { pattern: /\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/, lookbehind: !0, alias: "important" }, keyword: /\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/, boolean: /\b(?:false|true)\b/, nil: { pattern: /\bnil\b/, alias: "constant" }, "short-argument": /\$\d+\b/, omit: { pattern: /\b_\b/, alias: "keyword" }, number: /\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i, "class-name": /\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/, function: /\b[a-z_]\w*(?=\s*\()/i, constant: /\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/, operator: /[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/, punctuation: /[{}[\]();,.:\\]/ }, Prism.languages.swift["string-literal"].forEach(function(r) {
+ r.inside.interpolation.inside = Prism.languages.swift;
+}), Prism.languages["visual-basic"] = { comment: { pattern: /(?:['‘’]|REM\b)(?:[^\r\n_]|_(?:\r\n?|\n)?)*/i, inside: { keyword: /^REM/i } }, directive: { pattern: /#(?:Const|Else|ElseIf|End|ExternalChecksum|ExternalSource|If|Region)(?:\b_[ \t]*(?:\r\n?|\n)|.)+/i, alias: "property", greedy: !0 }, string: { pattern: /\$?["“”](?:["“”]{2}|[^"“”])*["“”]C?/i, greedy: !0 }, date: { pattern: /#[ \t]*(?:\d+([/-])\d+\1\d+(?:[ \t]+(?:\d+[ \t]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[ \t]*(?:AM|PM))?))?|\d+[ \t]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[ \t]*(?:AM|PM))?)[ \t]*#/i, alias: "number" }, number: /(?:(?:\b\d+(?:\.\d+)?|\.\d+)(?:E[+-]?\d+)?|&[HO][\dA-F]+)(?:[FRD]|U?[ILS])?/i, boolean: /\b(?:False|Nothing|True)\b/i, keyword: /\b(?:AddHandler|AddressOf|Alias|And(?:Also)?|As|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|C(?:Bool|Byte|Char|Date|Dbl|Dec|Int|Lng|Obj|SByte|Short|Sng|Str|Type|UInt|ULng|UShort)|Char|Class|Const|Continue|Currency|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else(?:If)?|End(?:If)?|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get(?:Type|XMLNamespace)?|Global|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|IsNot|Let|Lib|Like|Long|Loop|Me|Mod|Module|Must(?:Inherit|Override)|My(?:Base|Class)|Namespace|Narrowing|New|Next|Not(?:Inheritable|Overridable)?|Object|Of|On|Operator|Option(?:al)?|Or(?:Else)?|Out|Overloads|Overridable|Overrides|ParamArray|Partial|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|SByte|Select|Set|Shadows|Shared|short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TryCast|Type|TypeOf|U(?:Integer|Long|Short)|Until|Using|Variant|Wend|When|While|Widening|With(?:Events)?|WriteOnly|Xor)\b/i, operator: /[+\-*/\\^<=>@$%!]|\b_(?=[ \t]*[\r\n])/, punctuation: /[{}().,:?]/ }, Prism.languages.vb = Prism.languages["visual-basic"], Prism.languages.vba = Prism.languages["visual-basic"], Prism.languages.wasm = { comment: [/\(;[\s\S]*?;\)/, { pattern: /;;.*/, greedy: !0 }], string: { pattern: /"(?:\\[\s\S]|[^"\\])*"/, greedy: !0 }, keyword: [{ pattern: /\b(?:align|offset)=/, inside: { operator: /=/ } }, { pattern: /\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|neg?|nearest|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|sqrt|store(?:8|16|32)?|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/, inside: { punctuation: /\./ } }, /\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/], variable: /\$[\w!#$%&'*+\-./:<=>?@\\^`|~]+/, number: /[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/, punctuation: /[()]/ }, Lpe.manual = !0;
+var xgn = { figure: "figure" }, vG = function(r) {
+ ja(o, r0);
+ var i = kgn(o);
+ function o(l) {
+ var f;
+ l.externals;
+ var g, A = l.config;
+ return vi(this, o), f = i.call(this, { needCache: !0 }), o.inlineCodeCache = {}, f.codeCache = {}, f.customLang = [], f.customParser = {}, f.wrap = A.wrap, f.lineNumber = A.lineNumber, f.copyCode = A.copyCode, f.editCode = A.editCode, f.changeLang = A.changeLang, f.mermaid = A.mermaid, f.indentedCodeBlock = A.indentedCodeBlock === void 0 || A.indentedCodeBlock, f.INLINE_CODE_REGEX = /(`+)(.+?(?:\n.+?)*?)\1/g, A && A.customRenderer && (f.customLang = Zs(g = yh(A.customRenderer)).call(g, function(b) {
+ return b.toLowerCase();
+ }), f.customParser = function(b) {
+ for (var v = 1; v < arguments.length; v++) {
+ var k, _, T = arguments[v] != null ? arguments[v] : {};
+ v % 2 ? no(k = e5t(Object(T), !0)).call(k, function(L) {
+ Ui(b, L, T[L]);
+ }) : i0 ? uC(b, i0(T)) : no(_ = e5t(Object(T))).call(_, function(L) {
+ C3(b, L, o0(T, L));
+ });
+ }
+ return b;
+ }({}, A.customRenderer)), f.customHighlighter = A.highlighter, f;
+ }
+ return yi(o, [{ key: "$codeCache", value: function(l, f) {
+ return l && f && (this.codeCache[l] = f), this.codeCache[l] ? this.codeCache[l] : (this.codeCache.length > 40 && (this.codeCache.length = 0), !1);
+ } }, { key: "parseCustomLanguage", value: function(l, f, g) {
+ var A, b, v, k, _, T = this.customParser[l];
+ if (!T || typeof T.render != "function")
+ return !1;
+ var L = T.render(f, g.sign, this.$engine, this.mermaid);
+ if (!L)
+ return !1;
+ var F = xgn[T.constructor.TYPE] || "div";
+ return At(A = At(b = At(v = At(k = At(_ = "<".concat(F, ' data-sign="')).call(_, g.sign, '" data-type="')).call(k, l, '" data-lines="')).call(v, g.lines, '">')).call(b, L, "")).call(A, F, ">");
+ } }, { key: "fillTag", value: function(l) {
+ var f = [];
+ return Zs(l).call(l, function(g) {
+ if (!g)
+ return "";
+ for (var A = g; f.length; ) {
+ var b, v = f.pop();
+ A = At(b = "".concat(v)).call(b, A);
+ }
+ var k = A.match(/|<\/span>/g), _ = 0;
+ if (!k)
+ return A;
+ for (; k.length; ) {
+ var T = k.pop();
+ /<\/span>/.test(T) ? _ += 1 : _ ? _ -= 1 : f.unshift(T.match(//)[0]);
+ }
+ for (var L = 0; L < f.length; L++)
+ A = "".concat(A, "");
+ return A;
+ });
+ } }, { key: "renderLineNumber", value: function(l) {
+ if (!this.lineNumber)
+ return l;
+ var f = l.split(`
+`);
+ return f.pop(), f = this.fillTag(f), ''.concat(f.join(`
+`), "");
+ } }, { key: "isInternalCustomLangCovered", value: function(l) {
+ var f;
+ return Lu(f = this.customLang).call(f, l) !== -1;
+ } }, { key: "computeLines", value: function(l, f, g) {
+ var A = f, b = this.getLineCount(l, A);
+ return { sign: this.$engine.md5(l.replace(/^\n+/, "") + b), lines: b };
+ } }, { key: "appendMermaid", value: function(l, f) {
+ var g = l, A = f;
+ if (/^flow([ ](TD|LR))?$/i.test(A) && !this.isInternalCustomLangCovered(A)) {
+ var b, v = A.match(/^flow(?:[ ](TD|LR))?$/i) || [];
+ g = At(b = "graph ".concat(v[1] || "TD", `
+`)).call(b, g), A = "mermaid";
+ }
+ return /^seq$/i.test(A) && !this.isInternalCustomLangCovered(A) && (g = `sequenceDiagram
+`.concat(g), A = "mermaid"), A === "mermaid" && (g = g.replace(/(^[\s]*)stateDiagram-v2\n/, `$1stateDiagram
+`)), [g, A];
+ } }, { key: "wrapCode", value: function(l, f) {
+ var g, A;
+ return At(g = At(A = '')).call(g, l, "
");
+ } }, { key: "renderCodeBlock", value: function(l, f, g, A) {
+ var b, v, k, _, T, L, F, U = l, q = f;
+ return this.customHighlighter ? U = this.customHighlighter(U, q) : (q && Lpe.languages[q] || (q = "javascript"), U = Lpe.highlight(U, Lpe.languages[q], q), U = this.renderLineNumber(U)), U = At(b = At(v = At(k = At(_ = At(T = At(L = At(F = `
+
')).call(b, this.wrapCode(U, q), `
+
`);
+ } }, { key: "$getIndentedCodeReg", value: function() {
+ return new RegExp("(?:^|\\n\\s*\\n)(?: {4}|\\t)([\\s\\S]+?)(?=$|\\n( {0,3}[^ \\t\\n]|\\n[^ \\t\\n]))", "g");
+ } }, { key: "$getIndentCodeBlock", value: function(l) {
+ var f = this;
+ return this.indentedCodeBlock ? this.$recoverCodeInIndent(l).replace(this.$getIndentedCodeReg(), function(g, A) {
+ var b, v, k = (g.match(/\n/g) || []).length, _ = f.$engine.md5(g), T = At(b = At(v = '')).call(b, $G(A.replace(/\n( {4}|\t)/g, `
+`)), "
");
+ return c$(g, f.pushCache(T, _, k));
+ }) : l;
+ } }, { key: "$replaceCodeInIndent", value: function(l) {
+ return this.indentedCodeBlock ? l.replace(this.$getIndentedCodeReg(), function(f) {
+ return f.replace(/`/g, "~~~IndentCode");
+ }) : l;
+ } }, { key: "$recoverCodeInIndent", value: function(l) {
+ return this.indentedCodeBlock ? l.replace(this.$getIndentedCodeReg(), function(f) {
+ return f.replace(/~~~IndentCode/g, "`");
+ }) : l;
+ } }, { key: "beforeMakeHtml", value: function(l, f, g) {
+ var A = this, b = l;
+ return b = (b = this.$replaceCodeInIndent(b)).replace(this.RULE.reg, function(v, k, _, T, L, F) {
+ var U, q, Z;
+ function R(te) {
+ if (_) {
+ var Me = new RegExp(`^
+*`, ""), ve = te.match(Me)[0];
+ te = ve + _ + te.replace(Me, function(ge) {
+ return "";
+ });
+ }
+ return te;
+ }
+ var J = F, he = A.computeLines(v, k, F), Y = he.sign, ue = he.lines, le = A.$codeCache(Y);
+ if (le && le !== "")
+ return R(A.getCacheWithSpace(A.pushCache(le, Y, ue), v));
+ J = (J = (J = A.$recoverCodeInIndent(J)).replace(/~D/g, "$")).replace(/~T/g, "~");
+ var be = (U = k == null || (q = k.match(/[ ]/g)) === null || q === void 0 ? void 0 : q.length) !== null && U !== void 0 ? U : 0;
+ if (be > 0) {
+ var ke = new RegExp("(^|\\n)[ ]{1,".concat(be, "}"), "g");
+ J = J.replace(ke, "$1");
+ }
+ if (_) {
+ var de = new RegExp("(^|\\n)".concat(_), "g");
+ J = J.replace(de, "$1");
+ }
+ var Te = Go(L).call(L);
+ if (/^(math|katex|latex)$/i.test(Te) && !A.isInternalCustomLangCovered(Te)) {
+ var xe, ie = v.match(/^\s*/g);
+ return At(xe = "".concat(ie, `~D~D
+`)).call(xe, J, "~D~D");
+ }
+ var Be = vh(A.appendMermaid(J, Te), 2);
+ return J = Be[0], Te = Be[1], Lu(Z = A.customLang).call(Z, Te.toLowerCase()) !== -1 && (le = A.parseCustomLanguage(Te, J, { lines: ue, sign: Y })) && le !== "" ? (A.$codeCache(Y, le), A.getCacheWithSpace(A.pushCache(le, Y, ue), v)) : (J = J.replace(/~X/g, "\\`"), le = (le = A.renderCodeBlock(J, Te, Y, ue)).replace(/\\/g, "\\\\"), le = A.$codeCache(Y, le), R(A.getCacheWithSpace(A.pushCache(le, Y, ue), v)));
+ }), b = b.replace(jbe(!0), function(v) {
+ var k;
+ return Zs(k = v.split("|")).call(k, function(_) {
+ return A.makeInlineCode(_);
+ }).join("|").replace(/`/g, "\\`");
+ }), b = this.makeInlineCode(b), b = this.$getIndentCodeBlock(b);
+ } }, { key: "makeInlineCode", value: function(l) {
+ var f = this, g = l;
+ return this.INLINE_CODE_REGEX.test(g) && (g = (g = g.replace(/\\`/g, "~~not~inlineCode")).replace(this.INLINE_CODE_REGEX, function(A, b, v) {
+ if (Go(v).call(v) === "`")
+ return A;
+ var k = v.replace(/~~not~inlineCode/g, "\\`");
+ k = (k = f.$replaceSpecialChar(k)).replace(/\\/g, "\\\\");
+ var _ = "".concat($G(k), "
"), T = f.$engine.md5(_);
+ return o.inlineCodeCache[T] = _, "~~CODE".concat(T, "$");
+ }), g = g.replace(/~~not~inlineCode/g, "\\`")), g;
+ } }, { key: "makeHtml", value: function(l) {
+ return l;
+ } }, { key: "$replaceSpecialChar", value: function(l) {
+ var f = l.replace(/~Q/g, "\\~");
+ return f = (f = (f = (f = f.replace(/~Y/g, "\\!")).replace(/~Z/g, "\\#")).replace(/~&/g, "\\&")).replace(/~K/g, "\\/");
+ } }, { key: "rule", value: function() {
+ return Kbe();
+ } }, { key: "mounted", value: function(l) {
+ } }]), o;
+}();
+function Cgn(r) {
+ var i = function() {
+ if (typeof Reflect > "u" || !yt || yt.sham)
+ return !1;
+ if (typeof Proxy == "function")
+ return !0;
+ try {
+ return Boolean.prototype.valueOf.call(yt(Boolean, [], function() {
+ })), !0;
+ } catch {
+ return !1;
+ }
+ }();
+ return function() {
+ var o, l = Rn(r);
+ if (i) {
+ var f = Rn(this).constructor;
+ o = yt(l, arguments, f);
+ } else
+ o = l.apply(this, arguments);
+ return Ea(this, o);
+ };
+}
+Ui(vG, "HOOK_NAME", "codeBlock"), Ui(vG, "inlineCodeCache", {});
+var j_t = function(r) {
+ ja(o, r0);
+ var i = Cgn(o);
+ function o() {
+ return vi(this, o), i.apply(this, arguments);
+ }
+ return yi(o, [{ key: "makeHtml", value: function(l) {
+ return l;
+ } }, { key: "afterMakeHtml", value: function(l) {
+ var f = l;
+ return yh(vG.inlineCodeCache).length > 0 && (f = f.replace(/~~CODE([0-9a-zA-Z]+)\$/g, function(g, A) {
+ return vG.inlineCodeCache[A];
+ }), vG.inlineCodeCache = {}), f;
+ } }, { key: "rule", value: function() {
+ var l = { begin: "(`+)[ ]*", end: "[ ]*\\1", content: "(.+?(?:\\n.+?)*?)" };
+ return l.reg = Tv(l, "g"), l;
+ } }]), o;
+}();
+Ui(j_t, "HOOK_NAME", "inlineCode");
+var _gn = su(function(r) {
+ (function() {
+ var i = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", o = { rotl: function(l, f) {
+ return l << f | l >>> 32 - f;
+ }, rotr: function(l, f) {
+ return l << 32 - f | l >>> f;
+ }, endian: function(l) {
+ if (l.constructor == Number)
+ return 16711935 & o.rotl(l, 8) | 4278255360 & o.rotl(l, 24);
+ for (var f = 0; f < l.length; f++)
+ l[f] = o.endian(l[f]);
+ return l;
+ }, randomBytes: function(l) {
+ for (var f = []; l > 0; l--)
+ f.push(Math.floor(256 * Math.random()));
+ return f;
+ }, bytesToWords: function(l) {
+ for (var f = [], g = 0, A = 0; g < l.length; g++, A += 8)
+ f[A >>> 5] |= l[g] << 24 - A % 32;
+ return f;
+ }, wordsToBytes: function(l) {
+ for (var f = [], g = 0; g < 32 * l.length; g += 8)
+ f.push(l[g >>> 5] >>> 24 - g % 32 & 255);
+ return f;
+ }, bytesToHex: function(l) {
+ for (var f = [], g = 0; g < l.length; g++)
+ f.push((l[g] >>> 4).toString(16)), f.push((15 & l[g]).toString(16));
+ return f.join("");
+ }, hexToBytes: function(l) {
+ for (var f = [], g = 0; g < l.length; g += 2)
+ f.push(parseInt(l.substr(g, 2), 16));
+ return f;
+ }, bytesToBase64: function(l) {
+ for (var f = [], g = 0; g < l.length; g += 3)
+ for (var A = l[g] << 16 | l[g + 1] << 8 | l[g + 2], b = 0; b < 4; b++)
+ 8 * g + 6 * b <= 8 * l.length ? f.push(i.charAt(A >>> 6 * (3 - b) & 63)) : f.push("=");
+ return f.join("");
+ }, base64ToBytes: function(l) {
+ l = l.replace(/[^A-Z0-9+\/]/gi, "");
+ for (var f = [], g = 0, A = 0; g < l.length; A = ++g % 4)
+ A != 0 && f.push((i.indexOf(l.charAt(g - 1)) & Math.pow(2, -2 * A + 8) - 1) << 2 * A | i.indexOf(l.charAt(g)) >>> 6 - 2 * A);
+ return f;
+ } };
+ r.exports = o;
+ })();
+}), ODe = { utf8: { stringToBytes: function(r) {
+ return ODe.bin.stringToBytes(unescape(encodeURIComponent(r)));
+}, bytesToString: function(r) {
+ return decodeURIComponent(escape(ODe.bin.bytesToString(r)));
+} }, bin: { stringToBytes: function(r) {
+ for (var i = [], o = 0; o < r.length; o++)
+ i.push(255 & r.charCodeAt(o));
+ return i;
+}, bytesToString: function(r) {
+ for (var i = [], o = 0; o < r.length; o++)
+ i.push(String.fromCharCode(r[o]));
+ return i.join("");
+} } }, t5t = ODe, Egn = function(r) {
+ return r != null && (n5t(r) || function(i) {
+ return typeof i.readFloatLE == "function" && typeof i.slice == "function" && n5t(i.slice(0, 0));
+ }(r) || !!r._isBuffer);
+};
+function n5t(r) {
+ return !!r.constructor && typeof r.constructor.isBuffer == "function" && r.constructor.isBuffer(r);
+}
+var eRe = su(function(r) {
+ (function() {
+ var i = _gn, o = t5t.utf8, l = Egn, f = t5t.bin, g = function(A, b) {
+ A.constructor == String ? A = b && b.encoding === "binary" ? f.stringToBytes(A) : o.stringToBytes(A) : l(A) ? A = Array.prototype.slice.call(A, 0) : Array.isArray(A) || A.constructor === Uint8Array || (A = A.toString());
+ for (var v = i.bytesToWords(A), k = 8 * A.length, _ = 1732584193, T = -271733879, L = -1732584194, F = 271733878, U = 0; U < v.length; U++)
+ v[U] = 16711935 & (v[U] << 8 | v[U] >>> 24) | 4278255360 & (v[U] << 24 | v[U] >>> 8);
+ v[k >>> 5] |= 128 << k % 32, v[14 + (k + 64 >>> 9 << 4)] = k;
+ var q = g._ff, Z = g._gg, R = g._hh, J = g._ii;
+ for (U = 0; U < v.length; U += 16) {
+ var he = _, Y = T, ue = L, le = F;
+ _ = q(_, T, L, F, v[U + 0], 7, -680876936), F = q(F, _, T, L, v[U + 1], 12, -389564586), L = q(L, F, _, T, v[U + 2], 17, 606105819), T = q(T, L, F, _, v[U + 3], 22, -1044525330), _ = q(_, T, L, F, v[U + 4], 7, -176418897), F = q(F, _, T, L, v[U + 5], 12, 1200080426), L = q(L, F, _, T, v[U + 6], 17, -1473231341), T = q(T, L, F, _, v[U + 7], 22, -45705983), _ = q(_, T, L, F, v[U + 8], 7, 1770035416), F = q(F, _, T, L, v[U + 9], 12, -1958414417), L = q(L, F, _, T, v[U + 10], 17, -42063), T = q(T, L, F, _, v[U + 11], 22, -1990404162), _ = q(_, T, L, F, v[U + 12], 7, 1804603682), F = q(F, _, T, L, v[U + 13], 12, -40341101), L = q(L, F, _, T, v[U + 14], 17, -1502002290), _ = Z(_, T = q(T, L, F, _, v[U + 15], 22, 1236535329), L, F, v[U + 1], 5, -165796510), F = Z(F, _, T, L, v[U + 6], 9, -1069501632), L = Z(L, F, _, T, v[U + 11], 14, 643717713), T = Z(T, L, F, _, v[U + 0], 20, -373897302), _ = Z(_, T, L, F, v[U + 5], 5, -701558691), F = Z(F, _, T, L, v[U + 10], 9, 38016083), L = Z(L, F, _, T, v[U + 15], 14, -660478335), T = Z(T, L, F, _, v[U + 4], 20, -405537848), _ = Z(_, T, L, F, v[U + 9], 5, 568446438), F = Z(F, _, T, L, v[U + 14], 9, -1019803690), L = Z(L, F, _, T, v[U + 3], 14, -187363961), T = Z(T, L, F, _, v[U + 8], 20, 1163531501), _ = Z(_, T, L, F, v[U + 13], 5, -1444681467), F = Z(F, _, T, L, v[U + 2], 9, -51403784), L = Z(L, F, _, T, v[U + 7], 14, 1735328473), _ = R(_, T = Z(T, L, F, _, v[U + 12], 20, -1926607734), L, F, v[U + 5], 4, -378558), F = R(F, _, T, L, v[U + 8], 11, -2022574463), L = R(L, F, _, T, v[U + 11], 16, 1839030562), T = R(T, L, F, _, v[U + 14], 23, -35309556), _ = R(_, T, L, F, v[U + 1], 4, -1530992060), F = R(F, _, T, L, v[U + 4], 11, 1272893353), L = R(L, F, _, T, v[U + 7], 16, -155497632), T = R(T, L, F, _, v[U + 10], 23, -1094730640), _ = R(_, T, L, F, v[U + 13], 4, 681279174), F = R(F, _, T, L, v[U + 0], 11, -358537222), L = R(L, F, _, T, v[U + 3], 16, -722521979), T = R(T, L, F, _, v[U + 6], 23, 76029189), _ = R(_, T, L, F, v[U + 9], 4, -640364487), F = R(F, _, T, L, v[U + 12], 11, -421815835), L = R(L, F, _, T, v[U + 15], 16, 530742520), _ = J(_, T = R(T, L, F, _, v[U + 2], 23, -995338651), L, F, v[U + 0], 6, -198630844), F = J(F, _, T, L, v[U + 7], 10, 1126891415), L = J(L, F, _, T, v[U + 14], 15, -1416354905), T = J(T, L, F, _, v[U + 5], 21, -57434055), _ = J(_, T, L, F, v[U + 12], 6, 1700485571), F = J(F, _, T, L, v[U + 3], 10, -1894986606), L = J(L, F, _, T, v[U + 10], 15, -1051523), T = J(T, L, F, _, v[U + 1], 21, -2054922799), _ = J(_, T, L, F, v[U + 8], 6, 1873313359), F = J(F, _, T, L, v[U + 15], 10, -30611744), L = J(L, F, _, T, v[U + 6], 15, -1560198380), T = J(T, L, F, _, v[U + 13], 21, 1309151649), _ = J(_, T, L, F, v[U + 4], 6, -145523070), F = J(F, _, T, L, v[U + 11], 10, -1120210379), L = J(L, F, _, T, v[U + 2], 15, 718787259), T = J(T, L, F, _, v[U + 9], 21, -343485551), _ = _ + he >>> 0, T = T + Y >>> 0, L = L + ue >>> 0, F = F + le >>> 0;
+ }
+ return i.endian([_, T, L, F]);
+ };
+ g._ff = function(A, b, v, k, _, T, L) {
+ var F = A + (b & v | ~b & k) + (_ >>> 0) + L;
+ return (F << T | F >>> 32 - T) + b;
+ }, g._gg = function(A, b, v, k, _, T, L) {
+ var F = A + (b & k | v & ~k) + (_ >>> 0) + L;
+ return (F << T | F >>> 32 - T) + b;
+ }, g._hh = function(A, b, v, k, _, T, L) {
+ var F = A + (b ^ v ^ k) + (_ >>> 0) + L;
+ return (F << T | F >>> 32 - T) + b;
+ }, g._ii = function(A, b, v, k, _, T, L) {
+ var F = A + (v ^ (b | ~k)) + (_ >>> 0) + L;
+ return (F << T | F >>> 32 - T) + b;
+ }, g._blocksize = 16, g._digestsize = 16, r.exports = function(A, b) {
+ if (A == null)
+ throw new Error("Illegal argument " + A);
+ var v = i.wordsToBytes(g(A, b));
+ return b && b.asBytes ? v : b && b.asString ? f.bytesToString(v) : i.bytesToHex(v);
+ };
+ })();
+}), Dge = {}, XMe = /^cherry-inner:\/\/([0-9a-f]+)$/i, mL = function() {
+ function r() {
+ vi(this, r);
+ }
+ return yi(r, null, [{ key: "isInnerLink", value: function(i) {
+ return XMe.test(i);
+ } }, { key: "set", value: function(i) {
+ var o = eRe(i);
+ return Dge[o] = i, "cherry-inner://".concat(o);
+ } }, { key: "get", value: function(i) {
+ var o, l = vh((o = i.match(XMe)) !== null && o !== void 0 ? o : [], 2)[1];
+ if (l)
+ return Dge[l];
+ } }, { key: "replace", value: function(i, o) {
+ var l, f = vh((l = i.match(XMe)) !== null && l !== void 0 ? l : [], 2)[1];
+ if (f)
+ return Dge[f] = o, i;
+ } }, { key: "restoreAll", value: function(i) {
+ var o = i.replace(/cherry-inner:\/\/([0-9a-f]+)/gi, function(l) {
+ return r.get(l) || l;
+ });
+ return o;
+ } }, { key: "clear", value: function() {
+ Dge = {};
+ } }]), r;
+}();
+function Tgn(r) {
+ var i = function() {
+ if (typeof Reflect > "u" || !yt || yt.sham)
+ return !1;
+ if (typeof Proxy == "function")
+ return !0;
+ try {
+ return Boolean.prototype.valueOf.call(yt(Boolean, [], function() {
+ })), !0;
+ } catch {
+ return !1;
+ }
+ }();
+ return function() {
+ var o, l = Rn(r);
+ if (i) {
+ var f = Rn(this).constructor;
+ o = yt(l, arguments, f);
+ } else
+ o = l.apply(this, arguments);
+ return Ea(this, o);
+ };
+}
+var K_t = function(r) {
+ ja(o, Sg);
+ var i = Tgn(o);
+ function o(l) {
+ var f, g = l.config, A = l.globalConfig;
+ return vi(this, o), (f = i.call(this, { config: g })).urlProcessor = A.urlProcessor, f.target = g.target ? 'target="'.concat(g.target, '"') : g.openNewPage ? 'target="_blank"' : "", f.rel = g.rel ? 'rel="'.concat(g.rel, '"') : "", f;
+ }
+ return yi(o, [{ key: "checkBrackets", value: function(l) {
+ for (var f = [], g = "[".concat(l, "]"), A = function(v) {
+ return 1 & Da(g).call(g, 0, v).match(/\\*$/)[0].length;
+ }, b = g.length - 1; g[b] && (b !== g.length - 1 || !A(b)); b--)
+ if (g[b] !== "]" || A(b) || f.push("]"), g[b] === "[" && !A(b) && (f.pop(), !f.length))
+ return { isValid: !0, coreText: Da(g).call(g, b + 1, g.length - 1), extraLeadingChar: Da(g).call(g, 0, b) };
+ return { isValid: !1, coreText: l, extraLeadingChar: "" };
+ } }, { key: "toHtml", value: function(l, f, g, A, b, v, k) {
+ var _ = A === void 0 ? "ref" : "url", T = "";
+ if (_ === "ref")
+ return l;
+ if (_ === "url") {
+ var L, F = this.checkBrackets(g), U = F.isValid, q = F.coreText, Z = F.extraLeadingChar;
+ if (!U)
+ return l;
+ T = b && Go(b).call(b) !== "" ? ' title="'.concat($G(b.replace(/["']/g, "")), '"') : "", k ? T += ' target="'.concat(k.replace(/{target\s*=\s*(.*?)}/, "$1"), '"') : this.target && (T += " ".concat(this.target));
+ var R, J, he, Y, ue = Go(A).call(A).replace(/~1D/g, "~D"), le = q.replace(/~1D/g, "~D");
+ return q0n(ue) ? (ue = vO(ue = this.urlProcessor(ue, "link")), At(R = At(J = At(he = At(Y = "".concat(f + Z, '")).call(R, le, "")) : At(L = "".concat(f + Z, "")).call(L, g, "");
+ }
+ return l;
+ } }, { key: "toStdMarkdown", value: function(l) {
+ return l;
+ } }, { key: "makeHtml", value: function(l) {
+ var f, g, A = l.replace(this.RULE.reg, function(b) {
+ return b.replace(/~D/g, "~1D");
+ });
+ return Bg() ? A = A.replace(this.RULE.reg, Bo(f = this.toHtml).call(f, this)) : A = G9(A, this.RULE.reg, Bo(g = this.toHtml).call(g, this), !0, 1), A = A.replace(this.RULE.reg, function(b) {
+ return b.replace(/~1D/g, "~D");
+ }), A;
+ } }, { key: "rule", value: function() {
+ var l = { begin: Bg() ? "((? "u" || !yt || yt.sham)
+ return !1;
+ if (typeof Proxy == "function")
+ return !0;
+ try {
+ return Boolean.prototype.valueOf.call(yt(Boolean, [], function() {
+ })), !0;
+ } catch {
+ return !1;
+ }
+ }();
+ return function() {
+ var o, l = Rn(r);
+ if (i) {
+ var f = Rn(this).constructor;
+ o = yt(l, arguments, f);
+ } else
+ o = l.apply(this, arguments);
+ return Ea(this, o);
+ };
+}
+Ui(K_t, "HOOK_NAME", "link");
+var z_t = function(r) {
+ ja(o, Sg);
+ var i = Bgn(o);
+ function o() {
+ var l, f = (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : { config: void 0 }).config;
+ return vi(this, o), l = i.call(this, { config: f }), f ? (l.allowWhitespace = !!f.allowWhitespace, l) : Ea(l);
+ }
+ return yi(o, [{ key: "makeHtml", value: function(l, f) {
+ var g = function(b, v, k, _) {
+ var T, L, F, U = k.length % 2 == 1 ? "em" : "strong", q = Math.floor(k.length / 2), Z = fd("").call("", q), R = fd("").call("", q);
+ return U === "em" && (Z += "", R = "".concat(R)), At(T = At(L = At(F = "".concat(v)).call(F, Z)).call(L, f(_).html.replace(/_/g, "~U"))).call(T, R);
+ }, A = l;
+ return A = (A = this.allowWhitespace ? (A = (A = A.replace(/(^|\n[\s]*)(\*)([^\s*](?:.*?)(?:(?:\n.*?)*?))\*/g, g)).replace(/(^|\n[\s]*)(\*{2,})((?:.*?)(?:(?:\n.*?)*?))\2/g, g)).replace(/([^\n*\\\s][ ]*)(\*+)((?:.*?)(?:(?:\n.*?)*?))\2/g, g) : A.replace(this.RULE.asterisk.reg, g)).replace(this.RULE.underscore.reg, function(b, v, k, _, T, L) {
+ var F, U, q;
+ if (Go(_).call(_) === "")
+ return b;
+ var Z = k.length % 2 == 1 ? "em" : "strong", R = Math.floor(k.length / 2), J = fd("").call("", R), he = fd("").call("", R), Y = f(_).html;
+ return Z === "em" && (J += "", he = "".concat(he)), At(F = At(U = At(q = "".concat(v)).call(q, J)).call(U, Y)).call(F, he);
+ }), A.replace(/~U/g, "_");
+ } }, { key: "test", value: function(l, f) {
+ return this.RULE[f].reg && this.RULE[f].reg.test(l);
+ } }, { key: "rule", value: function() {
+ var l = (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : { config: void 0 }).config, f = !!l && !!l.allowWhitespace, g = function(v, k) {
+ var _, T, L, F = "[^".concat(k, "\\s]");
+ return v ? "(?:.*?)(?:(?:\\n.*?)*?)" : At(_ = At(T = At(L = "(".concat(F, "|")).call(L, F, `(.*?(
+`)).call(T, F, ".*)*)")).call(_, F, ")");
+ }, A = { begin: "(^|[^\\\\])([*]+)", content: "(".concat(g(f, "*"), ")"), end: "\\2" }, b = { begin: "(^|".concat(C4t, ")(_+)"), content: "(".concat(g(f, "_"), ")"), end: "\\2(?=".concat(C4t, "|$)") };
+ return A.reg = Tv(A, "g"), b.reg = Tv(b, "g"), { asterisk: A, underscore: b };
+ } }]), o;
+}();
+function Sgn(r) {
+ var i = function() {
+ if (typeof Reflect > "u" || !yt || yt.sham)
+ return !1;
+ if (typeof Proxy == "function")
+ return !0;
+ try {
+ return Boolean.prototype.valueOf.call(yt(Boolean, [], function() {
+ })), !0;
+ } catch {
+ return !1;
+ }
+ }();
+ return function() {
+ var o, l = Rn(r);
+ if (i) {
+ var f = Rn(this).constructor;
+ o = yt(l, arguments, f);
+ } else
+ o = l.apply(this, arguments);
+ return Ea(this, o);
+ };
+}
+Ui(z_t, "HOOK_NAME", "fontEmphasis");
+var G_t = function(r) {
+ ja(o, r0);
+ var i = Sgn(o);
+ function o(l) {
+ var f;
+ return vi(this, o), (f = i.call(this)).initBrReg(l.globalConfig.classicBr), f;
+ }
+ return yi(o, [{ key: "makeHtml", value: function(l, f) {
+ var g = this;
+ return this.test(l) ? l.replace(this.RULE.reg, function(A, b, v) {
+ var k;
+ if (g.isContainsCache(A, !0))
+ return A;
+ var _, T = function(L) {
+ var F, U, q, Z, R, J;
+ if (Go(L).call(L) === "")
+ return "";
+ var he = f(L), Y = he.sign, ue = he.html, le = "p";
+ new RegExp("<(".concat(Die, ")[^>]*>"), "i").test(ue) && (le = "div");
+ var be = g.getLineCount(L, L);
+ return At(F = At(U = At(q = At(Z = At(R = At(J = "<".concat(le, ' data-sign="')).call(J, Y)).call(R, be, '" data-type="')).call(Z, le, '" data-lines="')).call(q, be, '">')).call(U, g.$cleanParagraph(ue), "")).call(F, le, ">");
+ };
+ return g.isContainsCache(v) ? g.makeExcludingCached(At(_ = "".concat(b)).call(_, v), T) : T(At(k = "".concat(b)).call(k, v));
+ }) : l;
+ } }, { key: "rule", value: function() {
+ var l = { begin: "(?:^|\\n)(\\n*)", end: "(?=\\s*$|\\n\\n)", content: "([\\s\\S]+?)" };
+ return l.reg = new RegExp(l.begin + l.content + l.end, "g"), l;
+ } }]), o;
+}();
+Ui(G_t, "HOOK_NAME", "normalParagraph");
+qa({ target: "Reflect", stat: !0 }, { get: function r(i, o) {
+ var l, f, g = arguments.length < 3 ? i : arguments[2];
+ return Oh(i) === g ? i[o] : (l = DT.f(i, o)) ? function(A) {
+ return A !== void 0 && (nl(A, "value") || nl(A, "writable"));
+ }(l) ? l.value : l.get === void 0 ? void 0 : rl(l.get, g) : Id(f = o$(i)) ? r(f, o, g) : void 0;
+} });
+var r5t = ql.Reflect.get, Lgn = C9t;
+function wT() {
+ return wT = typeof Reflect < "u" && r5t ? r5t : function(r, i, o) {
+ var l = function(g, A) {
+ for (; !Object.prototype.hasOwnProperty.call(g, A) && (g = Rn(g)) !== null; )
+ ;
+ return g;
+ }(r, i);
+ if (l) {
+ var f = Lgn(l, i);
+ return f.get ? f.get.call(arguments.length < 3 ? r : o) : f.value;
+ }
+ }, wT.apply(this, arguments);
+}
+function Ign(r) {
+ var i = function() {
+ if (typeof Reflect > "u" || !yt || yt.sham)
+ return !1;
+ if (typeof Proxy == "function")
+ return !0;
+ try {
+ return Boolean.prototype.valueOf.call(yt(Boolean, [], function() {
+ })), !0;
+ } catch {
+ return !1;
+ }
+ }();
+ return function() {
+ var o, l = Rn(r);
+ if (i) {
+ var f = Rn(this).constructor;
+ o = yt(l, arguments, f);
+ } else
+ o = l.apply(this, arguments);
+ return Ea(this, o);
+ };
+}
+var Nge = "atx", Pge = "setext", Mgn = /[\s\-_]/, Fgn = /[A-Za-z]/, Ogn = /[0-9]/, X_t = function(r) {
+ ja(o, r0);
+ var i = Ign(o);
+ function o() {
+ var l, f = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : { config: void 0, externals: void 0 };
+ f.externals;
+ var g = f.config;
+ return vi(this, o), (l = i.call(this, { needCache: !0 })).strict = !g || !!g.strict, l.RULE = l.rule(), l.headerIDCache = [], l.headerIDCounter = {}, l.config = g || {}, l;
+ }
+ return yi(o, [{ key: "$parseTitleText", value: function() {
+ var l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
+ return typeof l != "string" ? "" : l.replace(/<.*?>/g, "").replace(/</g, "<").replace(/>/g, ">");
+ } }, { key: "$generateId", value: function(l) {
+ for (var f = !(arguments.length > 1 && arguments[1] !== void 0) || arguments[1], g = l.length, A = "", b = 0; b < g; b++) {
+ var v = l.charAt(b);
+ if (Fgn.test(v))
+ A += f ? v.toLowerCase() : v;
+ else if (Ogn.test(v))
+ A += v;
+ else if (Mgn.test(v))
+ A += A.length < 1 || A.charAt(A.length - 1) !== "-" ? "-" : "";
+ else if (v.charCodeAt(0) > 255)
+ try {
+ A += encodeURIComponent(v);
+ } catch {
+ }
+ }
+ return A;
+ } }, { key: "generateIDNoDup", value: function(l) {
+ var f, g = l.replace(/</g, "<").replace(/>/g, ">"), A = this.$generateId(g, !0), b = Lu(f = this.headerIDCache).call(f, A);
+ if (b !== -1)
+ this.headerIDCounter[b] += 1, A += "-".concat(this.headerIDCounter[b] + 1);
+ else {
+ var v = this.headerIDCache.push(A);
+ this.headerIDCounter[v - 1] = 1;
+ }
+ return A;
+ } }, { key: "$wrapHeader", value: function(l, f, g, A) {
+ var b, v, k, _, T, L, F, U = A(Go(l).call(l)), q = U.html, Z = q.match(/\s+\{#([A-Za-z0-9-]+)\}$/);
+ Z !== null && (q = q.substring(0, Z.index), F = vh(Z, 2)[1]);
+ var R = this.$parseTitleText(q);
+ F || (F = this.generateIDNoDup(R.replace(/~fn#([0-9]+)#/g, "")));
+ var J = "safe_".concat(F), he = this.$engine.md5(At(b = At(v = At(k = "".concat(f, "-")).call(k, U.sign, "-")).call(v, F, "-")).call(b, g));
+ return { html: [At(_ = At(T = At(L = "'), this.$getAnchor(F), "".concat(q), "")].join(""), sign: "".concat(he) };
+ } }, { key: "$getAnchor", value: function(l) {
+ return (this.config.anchorStyle || "default") === "none" ? "" : '');
+ } }, { key: "beforeMakeHtml", value: function(l) {
+ var f = this, g = l;
+ return this.test(g, Nge) && (g = g.replace(this.RULE[Nge].reg, function(A, b, v, k) {
+ return Go(k).call(k) === "" ? A : f.getCacheWithSpace(f.pushCache(A), A, !0);
+ })), this.test(g, Pge) && (g = g.replace(this.RULE[Pge].reg, function(A, b, v) {
+ return Go(v).call(v) === "" || f.isContainsCache(v) ? A : f.getCacheWithSpace(f.pushCache(A), A, !0);
+ })), g;
+ } }, { key: "makeHtml", value: function(l, f) {
+ var g = this, A = this.restoreCache(l);
+ return this.test(A, Nge) && (A = A.replace(this.RULE[Nge].reg, function(b, v, k, _) {
+ var T = TDe(v, g.getLineCount(b.replace(/^\n+/, ""))), L = _.replace(/\s+#+\s*$/, ""), F = g.$wrapHeader(L, k.length, T, f), U = F.html, q = F.sign;
+ return g.getCacheWithSpace(g.pushCache(U, q, T), b, !0);
+ })), this.test(A, Pge) && (A = A.replace(this.RULE[Pge].reg, function(b, v, k, _) {
+ if (g.isContainsCache(k))
+ return b;
+ var T = TDe(v, g.getLineCount(b.replace(/^\n+/, ""))), L = _[0] === "-" ? 2 : 1, F = g.$wrapHeader(k, L, T, f), U = F.html, q = F.sign;
+ return g.getCacheWithSpace(g.pushCache(U, q, T), b, !0);
+ })), A;
+ } }, { key: "afterMakeHtml", value: function(l) {
+ var f = wT(Rn(o.prototype), "afterMakeHtml", this).call(this, l);
+ return this.headerIDCache = [], this.headerIDCounter = {}, f;
+ } }, { key: "test", value: function(l, f) {
+ return this.RULE[f].reg && this.RULE[f].reg.test(l);
+ } }, { key: "rule", value: function() {
+ var l = { begin: "(?:^|\\n)(\\n*)", content: ["(?:\\h*", "(.+)", ")\\n", "(?:\\h*", "([=]+|[-]+)", ")"].join(""), end: "(?=$|\\n)" };
+ l.reg = Tv(l, "g", !0);
+ var f = { begin: "(?:^|\\n)(\\n*)(?:\\h*(#{1,6}))", content: "(.+?)", end: "(?=$|\\n)" };
+ return this.strict && (f.begin += "(?=\\h+)"), f.reg = Tv(f, "g", !0), { setext: l, atx: f };
+ } }]), o;
+}();
+function Dgn(r) {
+ var i = function() {
+ if (typeof Reflect > "u" || !yt || yt.sham)
+ return !1;
+ if (typeof Proxy == "function")
+ return !0;
+ try {
+ return Boolean.prototype.valueOf.call(yt(Boolean, [], function() {
+ })), !0;
+ } catch {
+ return !1;
+ }
+ }();
+ return function() {
+ var o, l = Rn(r);
+ if (i) {
+ var f = Rn(this).constructor;
+ o = yt(l, arguments, f);
+ } else
+ o = l.apply(this, arguments);
+ return Ea(this, o);
+ };
+}
+Ui(X_t, "HOOK_NAME", "header");
+var W_t = function(r) {
+ ja(o, Sg);
+ var i = Dgn(o);
+ function o() {
+ return vi(this, o), i.apply(this, arguments);
+ }
+ return yi(o, [{ key: "rule", value: function() {
+ return { begin: "", content: "", end: "", reg: new RegExp("") };
+ } }, { key: "beforeMakeHtml", value: function(l) {
+ return l.replace(/\\\n/g, `\\
+`);
+ } }, { key: "afterMakeHtml", value: function(l) {
+ var f = l.replace(/~Q/g, "~");
+ return f = (f = (f = (f = (f = f.replace(/~X/g, "`")).replace(/~Y/g, "!")).replace(/~Z/g, "#")).replace(/~&/g, "&")).replace(/~K/g, "/");
+ } }]), o;
+}();
+Ui(W_t, "HOOK_NAME", "transfer");
+var Ngn = Qi.TypeError, i5t = function(r) {
+ return function(i, o, l, f) {
+ Fh(o);
+ var g = y5(i), A = Mbe(g), b = Ck(g), v = r ? b - 1 : 0, k = r ? -1 : 1;
+ if (l < 2)
+ for (; ; ) {
+ if (v in A) {
+ f = A[v], v += k;
+ break;
+ }
+ if (v += k, r ? v < 0 : b <= v)
+ throw Ngn("Reduce of empty array with no initial value");
+ }
+ for (; r ? v >= 0 : b > v; v += k)
+ v in A && (f = o(f, A[v], v, g));
+ return f;
+ };
+}, Pgn = { left: i5t(!1), right: i5t(!0) }, bL = BT(Qi.process) == "process", Rgn = Pgn.left, Qgn = uX("reduce");
+qa({ target: "Array", proto: !0, forced: !Qgn || !bL && MT > 79 && MT < 83 }, { reduce: function(r) {
+ var i = arguments.length;
+ return Rgn(this, r, i, i > 1 ? arguments[1] : void 0);
+} });
+var $gn = a0("Array").reduce, WMe = Array.prototype, _L = function(r) {
+ var i = r.reduce;
+ return r === WMe || E1(WMe, r) && i === WMe.reduce ? $gn : i;
+};
+function a5t(r, i) {
+ var o = yh(r);
+ if (rA) {
+ var l = rA(r);
+ i && (l = dd(l).call(l, function(f) {
+ return o0(r, f).enumerable;
+ })), o.push.apply(o, l);
+ }
+ return o;
+}
+function Rge(r) {
+ for (var i = 1; i < arguments.length; i++) {
+ var o, l, f = arguments[i] != null ? arguments[i] : {};
+ i % 2 ? no(o = a5t(Object(f), !0)).call(o, function(g) {
+ Ui(r, g, f[g]);
+ }) : i0 ? uC(r, i0(f)) : no(l = a5t(Object(f))).call(l, function(g) {
+ C3(r, g, o0(f, g));
+ });
+ }
+ return r;
+}
+function Ugn(r) {
+ var i = function() {
+ if (typeof Reflect > "u" || !yt || yt.sham)
+ return !1;
+ if (typeof Proxy == "function")
+ return !0;
+ try {
+ return Boolean.prototype.valueOf.call(yt(Boolean, [], function() {
+ })), !0;
+ } catch {
+ return !1;
+ }
+ }();
+ return function() {
+ var o, l = Rn(r);
+ if (i) {
+ var f = Rn(this).constructor;
+ o = yt(l, arguments, f);
+ } else
+ o = l.apply(this, arguments);
+ return Ea(this, o);
+ };
+}
+var o5t = "loose", s5t = "strict", V_t = function(r) {
+ ja(o, r0);
+ var i = Ugn(o);
+ function o(l) {
+ var f, g = l.externals, A = l.config;
+ vi(this, o), f = i.call(this, { needCache: !0 });
+ var b = A.enableChart, v = A.chartRenderEngine, k = A.externals, _ = A.chartEngineOptions, T = _ === void 0 ? {} : _;
+ if (f.chartRenderEngine = null, b === !0)
+ try {
+ f.chartRenderEngine = new v(Rge(Rge({}, g && k instanceof Array && _L(k).call(k, function(L, F) {
+ return delete T[F], Rge(Rge({}, L), {}, Ui({}, F, g[F]));
+ }, {})), {}, { renderer: "svg", width: 500, height: 300 }, T));
+ } catch (L) {
+ console.warn(L);
+ }
+ return f;
+ }
+ return yi(o, [{ key: "$extendColumns", value: function(l, f) {
+ var g = f - l.length;
+ return g < 1 ? l : At(l).call(l, fd(" |").call(" |", g).split("|", g));
+ } }, { key: "$parseChartOptions", value: function(l) {
+ if (!this.chartRenderEngine)
+ return null;
+ var f = /^[ ]*:(\w+):(?:[ ]*{(.*?)}[ ]*)?$/;
+ if (!f.test(l))
+ return null;
+ var g = vh(l.match(f), 3), A = g[1], b = g[2];
+ return { type: A, options: b ? b.split(/\s*,\s*/) : ["x", "y"] };
+ } }, { key: "$parseColumnAlignRules", value: function(l) {
+ var f = ["U", "L", "R", "C"];
+ return { textAlignRules: Zs(l).call(l, function(g) {
+ var A = Go(g).call(g), b = 0;
+ return /^:/.test(A) && (b += 1), /:$/.test(A) && (b += 2), f[b];
+ }), COLUMN_ALIGN_MAP: { L: "left", R: "right", C: "center" } };
+ } }, { key: "$parseTable", value: function(l, f, g) {
+ var A, b, v, k, _, T, L = this, F = 0, U = Zs(l).call(l, function(Te, xe) {
+ var ie = Te.replace(/\\\|/g, "~CS").split("|");
+ return ie[0] === "" && ie.shift(), ie[ie.length - 1] === "" && ie.pop(), xe !== 1 && (F = Math.max(F, ie.length)), ie;
+ }), q = this.$parseColumnAlignRules(U[1]), Z = q.textAlignRules, R = q.COLUMN_ALIGN_MAP, J = { header: [], rows: [], colLength: F, rowLength: U.length - 2 }, he = this.$parseChartOptions(U[0][0]), Y = this.$engine.md5(U[0][0]);
+ he && (U[0][0] = "");
+ var ue = Zs(A = this.$extendColumns(U[0], F)).call(A, function(Te, xe) {
+ var ie, Be;
+ J.header.push(Te.replace(/~CS/g, "\\|"));
+ var te = f(Go(ie = Te.replace(/~CS/g, "\\|")).call(ie)).html;
+ return At(Be = "~CTH".concat(Z[xe] || "U", " ")).call(Be, te, " ~CTH$");
+ }).join(""), le = _L(U).call(U, function(Te, xe, ie) {
+ var Be;
+ if (ie <= 1)
+ return Te;
+ var te = ie - 2;
+ J.rows[te] = [];
+ var Me = Zs(Be = L.$extendColumns(xe, F)).call(Be, function(ve, ge) {
+ var Je, ot;
+ J.rows[te].push(ve.replace(/~CS/g, "\\|"));
+ var bt = f(Go(Je = ve.replace(/~CS/g, "\\|")).call(Je)).html;
+ return At(ot = "~CTD".concat(Z[ge] || "U", " ")).call(ot, bt, " ~CTD$");
+ });
+ return Te.push("~CTR".concat(Me.join(""), "~CTR$")), Te;
+ }, []).join(""), be = this.$renderTable(R, ue, le, g);
+ if (!he)
+ return be;
+ var ke = this.chartRenderEngine.render(he.type, he.options, J), de = At(b = At(v = At(k = At(_ = '");
+ return { html: At(T = "".concat(de)).call(T, be.html), sign: Y + be.sign };
+ } }, { key: "$testHeadEmpty", value: function(l) {
+ var f = l.replace(/ /g, "").replace(/\s/g, "").replace(/(~CTH\$|~CTHU|~CTHL|~CTHR|~CTHC)/g, "");
+ return (f == null ? void 0 : f.length) > 0;
+ } }, { key: "$renderTable", value: function(l, f, g, A) {
+ var b, v, k, _, T = this.$testHeadEmpty(f) ? At(b = "~CTHD".concat(f, "~CTHD$~CTBD")).call(b, g, "~CTBD$") : "~CTBD".concat(g, "~CTBD$"), L = this.$engine.md5(T), F = T.replace(/~CTHD\$/g, "").replace(/~CTHD/g, "").replace(/~CTBD\$/g, "").replace(/~CTBD/g, "").replace(/~CTR\$/g, "").replace(/~CTR/g, "").replace(/[ ]?~CTH\$/g, "").replace(/[ ]?~CTD\$/g, "").replace(/~CT(D|H)(L|R|C|U)[ ]?/g, function(U, q, Z) {
+ var R = "" : ' align="'.concat(l[Z], '">');
+ }).replace(/\\\|/g, "|");
+ return { html: At(v = At(k = At(_ = '"), sign: L };
+ } }, { key: "makeHtml", value: function(l, f) {
+ var g = this, A = l;
+ return this.test(A, s5t) && (A = A.replace(this.RULE[s5t].reg, function(b, v) {
+ var k, _ = g.getLineCount(b, v), T = Zs(k = Go(b).call(b).split(/\n/)).call(k, function(q) {
+ var Z;
+ return Go(Z = String(q)).call(Z);
+ }), L = g.$parseTable(T, f, _), F = L.html, U = L.sign;
+ return g.getCacheWithSpace(g.pushCache(F, U, _), b);
+ })), this.test(A, o5t) && (A = A.replace(this.RULE[o5t].reg, function(b, v) {
+ var k, _ = g.getLineCount(b, v), T = Zs(k = Go(b).call(b).split(/\n/)).call(k, function(q) {
+ var Z;
+ return Go(Z = String(q)).call(Z);
+ }), L = g.$parseTable(T, f, _), F = L.html, U = L.sign;
+ return g.getCacheWithSpace(g.pushCache(F, U, _), b);
+ })), A;
+ } }, { key: "test", value: function(l, f) {
+ return this.RULE[f].reg && this.RULE[f].reg.test(l);
+ } }, { key: "rule", value: function() {
+ return jbe();
+ } }]), o;
+}();
+function vk() {
+ return (typeof window > "u" ? "undefined" : Yl(window)) === "object";
+}
+function Hgn(r) {
+ var i = function() {
+ if (typeof Reflect > "u" || !yt || yt.sham)
+ return !1;
+ if (typeof Proxy == "function")
+ return !0;
+ try {
+ return Boolean.prototype.valueOf.call(yt(Boolean, [], function() {
+ })), !0;
+ } catch {
+ return !1;
+ }
+ }();
+ return function() {
+ var o, l = Rn(r);
+ if (i) {
+ var f = Rn(this).constructor;
+ o = yt(l, arguments, f);
+ } else
+ o = l.apply(this, arguments);
+ return Ea(this, o);
+ };
+}
+Ui(V_t, "HOOK_NAME", "table");
+var q_t = function(r) {
+ ja(o, r0);
+ var i = Hgn(o);
+ function o(l) {
+ var f;
+ return vi(this, o), (f = i.call(this, { needCache: !0 })).classicBr = JPe("classicBr") ? Nme() : l.globalConfig.classicBr, f;
+ }
+ return yi(o, [{ key: "beforeMakeHtml", value: function(l) {
+ var f = this;
+ return this.test(l) ? l.replace(this.RULE.reg, function(g, A, b) {
+ var v, k;
+ if (b === 0)
+ return g;
+ var _, T, L = (v = (k = A.match(/\n/g)) === null || k === void 0 ? void 0 : k.length) !== null && v !== void 0 ? v : 0, F = "br".concat(L), U = "";
+ vk() ? U = f.classicBr ? At(_ = '') : At(T = '
') : U = f.classicBr ? "" : "
";
+ var q = f.pushCache(U, F, L);
+ return `
+
+`.concat(q, `
+`);
+ }) : l;
+ } }, { key: "makeHtml", value: function(l, f) {
+ return l;
+ } }, { key: "rule", value: function() {
+ var l = { begin: "(?:\\n)", end: "", content: "((?:\\h*\\n){2,})" };
+ return l.reg = Tv(l, "g", !0), l;
+ } }]), o;
+}();
+function jgn(r) {
+ var i = function() {
+ if (typeof Reflect > "u" || !yt || yt.sham)
+ return !1;
+ if (typeof Proxy == "function")
+ return !0;
+ try {
+ return Boolean.prototype.valueOf.call(yt(Boolean, [], function() {
+ })), !0;
+ } catch {
+ return !1;
+ }
+ }();
+ return function() {
+ var o, l = Rn(r);
+ if (i) {
+ var f = Rn(this).constructor;
+ o = yt(l, arguments, f);
+ } else
+ o = l.apply(this, arguments);
+ return Ea(this, o);
+ };
+}
+Ui(q_t, "HOOK_NAME", "br");
+var Y_t = function(r) {
+ ja(o, r0);
+ var i = jgn(o);
+ function o() {
+ return vi(this, o), i.call(this, { needCache: !0 });
+ }
+ return yi(o, [{ key: "beforeMakeHtml", value: function(l) {
+ var f = this;
+ return l.replace(this.RULE.reg, function(g, A) {
+ var b, v = (A.match(/\n/g) || []).length + 1, k = "hr".concat(v);
+ return c$(g, f.pushCache(At(b = '
'), k));
+ });
+ } }, { key: "makeHtml", value: function(l, f) {
+ return l;
+ } }, { key: "rule", value: function() {
+ var l = { begin: "(?:^|\\n)(\\n*)[ ]*", end: "(?=$|\\n)", content: "((?:-[ \\t]*){3,}|(?:\\*[ \\t]*){3,}|(?:_[ \\t]*){3,})" };
+ return l.reg = new RegExp(l.begin + l.content + l.end, "g"), l;
+ } }]), o;
+}();
+Ui(Y_t, "HOOK_NAME", "hr");
+var Kgn = { processExtendAttributesInAlt: function(r) {
+ var i = r.match(/#([0-9]+(px|em|pt|pc|in|mm|cm|ex|%)|auto)/g);
+ if (!i)
+ return "";
+ var o = "", l = vh(i, 2), f = l[0], g = l[1];
+ return f && (o = ' width="'.concat(f.replace(/[ #]*/g, ""), '"')), g && (o += ' height="'.concat(g.replace(/[ #]*/g, ""), '"')), o;
+}, processExtendStyleInAlt: function(r) {
+ var i = this.$getAlignment(r), o = "", l = r.match(/#(border|shadow|radius|B|S|R)/g);
+ if (l)
+ for (var f = 0; f < l.length; f++)
+ switch (l[f]) {
+ case "#border":
+ case "#B":
+ i += "border:1px solid #888888;padding: 2px;box-sizing: border-box;", o += " cherry-img-border";
+ break;
+ case "#shadow":
+ case "#S":
+ i += "box-shadow:0 2px 15px -5px rgb(0 0 0 / 50%);", o += " cherry-img-shadow";
+ break;
+ case "#radius":
+ case "#R":
+ i += "border-radius: 15px;", o += " cherry-img-radius";
+ }
+ return { extendStyles: i, extendClasses: o };
+}, $getAlignment: function(r) {
+ var i = r.match(/#(center|right|left|float-right|float-left)/i);
+ if (!i)
+ return "";
+ switch (vh(i, 2)[1]) {
+ case "center":
+ return "transform:translateX(-50%);margin-left:50%;display:block;";
+ case "right":
+ return "transform:translateX(-100%);margin-left:100%;margin-right:-100%;display:block;";
+ case "left":
+ return "transform:translateX(0);margin-left:0;display:block;";
+ case "float-right":
+ return "float:right;transform:translateX(0);margin-left:0;display:block;";
+ case "float-left":
+ return "float:left;transform:translateX(0);margin-left:0;display:block;";
+ }
+} }, Rme = Kgn;
+function c5t(r, i) {
+ var o = yh(r);
+ if (rA) {
+ var l = rA(r);
+ i && (l = dd(l).call(l, function(f) {
+ return o0(r, f).enumerable;
+ })), o.push.apply(o, l);
+ }
+ return o;
+}
+function zgn(r) {
+ var i = function() {
+ if (typeof Reflect > "u" || !yt || yt.sham)
+ return !1;
+ if (typeof Proxy == "function")
+ return !0;
+ try {
+ return Boolean.prototype.valueOf.call(yt(Boolean, [], function() {
+ })), !0;
+ } catch {
+ return !1;
+ }
+ }();
+ return function() {
+ var o, l = Rn(r);
+ if (i) {
+ var f = Rn(this).constructor;
+ o = yt(l, arguments, f);
+ } else
+ o = l.apply(this, arguments);
+ return Ea(this, o);
+ };
+}
+var l5t = function(r, i, o, l, f, g, A, b, v) {
+ var k = f === void 0 ? "ref" : "url", _ = "";
+ if (k === "ref")
+ return i;
+ if (k === "url") {
+ var T, L, F, U, q, Z, R, J, he = Rme.processExtendAttributesInAlt(l), Y = Rme.processExtendStyleInAlt(l), ue = Y.extendStyles, le = Y.extendClasses;
+ ue && (ue = ' style="'.concat(ue, '" ')), le && (le = ' class="'.concat(le, '" ')), _ = g && Go(g).call(g) !== "" ? ' title="'.concat(p5(g), '"') : "", A && (_ += ' poster="'.concat(vO(A), '"'));
+ var be = v.urlProcessor(f, r), ke = At(T = At(L = At(F = At(U = At(q = At(Z = At(R = "<".concat(r, ' src="')).call(R, mL.set(vO(be)), '"')).call(Z, _, " ")).call(q, he, " ")).call(U, ue, " ")).call(F, le, ' controls="controls">')).call(L, p5(l || ""), "")).call(T, r, ">");
+ return At(J = "".concat(o)).call(J, b.videoWrapper ? b.videoWrapper(f) : ke);
+ }
+ return i;
+}, J_t = function(r) {
+ ja(o, Sg);
+ var i = zgn(o);
+ function o(l) {
+ var f, g = l.config, A = l.globalConfig;
+ return vi(this, o), (f = i.call(this, null)).urlProcessor = A.urlProcessor, f.extendMedia = { tag: ["video", "audio"], replacer: { video: function(b, v, k, _, T, L) {
+ return l5t("video", b, v, k, _, T, L, g, A);
+ }, audio: function(b, v, k, _, T, L) {
+ return l5t("audio", b, v, k, _, T, L, g, A);
+ } } }, f.RULE = f.rule(f.extendMedia), f;
+ }
+ return yi(o, [{ key: "toHtml", value: function(l, f, g, A, b, v, k) {
+ var _ = A === void 0 ? "ref" : "url", T = "";
+ if (_ === "ref")
+ return l;
+ if (_ === "url") {
+ var L, F, U, q, Z, R, J, he, Y = Rme.processExtendAttributesInAlt(g), ue = Rme.processExtendStyleInAlt(g), le = ue.extendStyles, be = ue.extendClasses;
+ le && (le = ' style="'.concat(le, '" ')), be && (be = ' class="'.concat(be, '" ')), T = b && Go(b).call(b) !== "" ? ' title="'.concat(p5(b.replace(/["']/g, "")), '"') : "";
+ var ke, de = "src", Te = this.$engine.$cherry.options;
+ if (Te.callback && Te.callback.beforeImageMounted) {
+ var xe = Te.callback.beforeImageMounted(de, A);
+ de = xe.srcProp || de, ke = xe.src || A;
+ }
+ var ie = k ? k.replace(/[{}]/g, "").replace(/([^=\s]+)=([^\s]+)/g, '$1="$2"').replace(/&/g, "&") : "";
+ return At(L = At(F = At(U = At(q = At(Z = At(R = At(J = At(he = "".concat(f, "");
+ }
+ return l;
+ } }, { key: "toMediaHtml", value: function(l, f, g, A, b, v, k, _, T) {
+ var L, F;
+ if (!this.extendMedia.replacer[g])
+ return l;
+ for (var U = arguments.length, q = new Array(U > 9 ? U - 9 : 0), Z = 9; Z < U; Z++)
+ q[Z - 9] = arguments[Z];
+ return (L = this.extendMedia.replacer[g]).call.apply(L, At(F = [this, l, f, A, b, v, T]).call(F, q));
+ } }, { key: "makeHtml", value: function(l) {
+ var f, g, A, b, v = l;
+ return this.test(v) && (v = Bg() ? v.replace(this.RULE.reg, Bo(f = this.toHtml).call(f, this)) : G9(v, this.RULE.reg, Bo(g = this.toHtml).call(g, this), !0, 1)), this.testMedia(v) && (v = Bg() ? v.replace(this.RULE.regExtend, Bo(A = this.toMediaHtml).call(A, this)) : G9(v, this.RULE.regExtend, Bo(b = this.toMediaHtml).call(b, this), !0, 1)), v;
+ } }, { key: "testMedia", value: function(l) {
+ return this.RULE.regExtend && this.RULE.regExtend.test(l);
+ } }, { key: "rule", value: function(l) {
+ var f = { begin: Bg() ? "((? "u" || !yt || yt.sham)
+ return !1;
+ if (typeof Proxy == "function")
+ return !0;
+ try {
+ return Boolean.prototype.valueOf.call(yt(Boolean, [], function() {
+ })), !0;
+ } catch {
+ return !1;
+ }
+ }();
+ return function() {
+ var o, l = Rn(r);
+ if (i) {
+ var f = Rn(this).constructor;
+ o = yt(l, arguments, f);
+ } else
+ o = l.apply(this, arguments);
+ return Ea(this, o);
+ };
+}
+Ui(J_t, "HOOK_NAME", "image");
+function f5t(r) {
+ var i;
+ if (Yl(r) !== "object" && yh(r).length < 1)
+ return "";
+ var o = [""];
+ return no(i = yh(r)).call(i, function(l) {
+ var f;
+ o.push(At(f = "".concat(l, '="')).call(f, r[l], '"'));
+ }), o.join(" ");
+}
+function Xgn(r, i) {
+ for (var o = /^(\t|[ ])/, l = r; o.test(l); )
+ i.space += l[0] === " " ? 4 : 1, l = l.replace(o, "");
+ return l;
+}
+function Wgn(r, i) {
+ var o = /^((([*+-]|\d+[.]|[a-z]\.|[I一二三四五六七八九十]+\.)[ \t]+)([^\r]*?)($|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.]|[a-z]\.|[I一二三四五六七八九十]+\.)[ \t]+)))/;
+ return o.test(r) ? r.replace(o, function(l, f, g, A, b) {
+ return i.type = g.search(/[*+-]/g) > -1 ? "ul" : "ol", i.listStyle = function(v) {
+ return /^[a-z]/.test(v) ? "lower-greek" : /^[一二三四五六七八九十]/.test(v) ? "cjk-ideographic" : /^I/.test(v) ? "upper-roman" : /^\+/.test(v) ? "circle" : /^\*/.test(v) ? "square" : "default";
+ }(g), i.start = Number(g.replace(".", "")) ? Number(g.replace(".", "")) : 1, b;
+ }) : (i.type = "blank", r);
+}
+var Vgn = yi(function r() {
+ vi(this, r), this.index = 0, this.space = 0, this.type = "", this.start = 1, this.listStyle = "", this.strs = [], this.children = [], this.lines = 0;
+}), Z_t = function(r) {
+ ja(o, r0);
+ var i = Ggn(o);
+ function o(l) {
+ var f, g = l.config;
+ return vi(this, o), (f = i.call(this, { needCache: !0 })).config = g || {}, f.tree = [], f.emptyLines = 0, f.indentSpace = Math.max(f.config.indentSpace, 2), f;
+ }
+ return yi(o, [{ key: "addNode", value: function(l, f, g, A) {
+ l.type === "blank" ? this.tree[A].strs.push(l.strs[0]) : (this.tree[g].children.push(f), this.tree[f] = h5t(h5t({}, l), {}, { parent: g }));
+ } }, { key: "buildTree", value: function(l, f) {
+ var g = l.split(`
+`);
+ this.tree = [], g.unshift("");
+ for (var A = l.match(/\n*$/g)[0].length, b = 0; b < g.length - A; b++) {
+ var v = new Vgn();
+ if (g[b] = Xgn(g[b], v), g[b] = Wgn(g[b], v), v.strs.push(f(g[b]).html), v.index = b, b !== 0) {
+ for (var k = b - 1; !this.tree[k]; )
+ k -= 1;
+ if (v.type === "blank")
+ this.addNode(v, b, this.tree[k].parent, k);
+ else {
+ for (; !this.tree[k] || this.tree[k].space > v.space; )
+ k -= 1;
+ var _ = v.space, T = this.tree[k].space;
+ _ < T + this.indentSpace ? this.config.listNested && this.tree[k].type !== v.type ? this.addNode(v, b, k) : this.addNode(v, b, this.tree[k].parent) : _ < T + this.indentSpace + 4 ? this.addNode(v, b, k) : (v.type = "blank", this.addNode(v, b, this.tree[k].parent, k));
+ }
+ } else
+ v.space = -2, this.tree.push(v);
+ }
+ } }, { key: "renderSubTree", value: function(l, f, g) {
+ var A, b, v, k = this, _ = 0, T = {}, L = _L(f).call(f, function(F, U) {
+ var q, Z, R, J = k.tree[U], he = { class: "cherry-list-item" }, Y = "".concat(J.strs.join("
"), "
");
+ J.lines += k.getLineCount(J.strs.join(`
+`));
+ var ue = J.children.length ? k.renderTree(U) : "";
+ return l.lines += J.lines, _ += J.lines, /<\/span>/.test(Y) && (he.class += " check-list-item"), At(q = At(Z = At(R = "".concat(F, "")).call(Z, Y)).call(q, ue, "");
+ }, "");
+ return l.parent === void 0 && (T["data-lines"] = l.index === 0 ? _ + this.emptyLines : _, T["data-sign"] = this.sign), f[0] && g === "ol" && (T.start = this.tree[f[0]].start), T.class = "cherry-list__".concat(this.tree[f[0]].listStyle), At(A = At(b = At(v = "<".concat(g)).call(v, f5t(T), ">")).call(b, L, "")).call(A, g, ">");
+ } }, { key: "renderTree", value: function(l) {
+ var f = this, g = 0, A = this.tree[l], b = A.children;
+ return _L(b).call(b, function(v, k, _) {
+ if (_ === 0 || f.tree[b[_]].type === f.tree[b[_ - 1]].type)
+ return v;
+ var T = f.renderSubTree(A, Da(b).call(b, g, _), f.tree[b[_ - 1]].type);
+ return g = _, v + T;
+ }, "") + (b.length ? this.renderSubTree(A, Da(b).call(b, g, b.length), this.tree[b[b.length - 1]].type) : "");
+ } }, { key: "toHtml", value: function(l, f) {
+ var g, A;
+ this.emptyLines = (g = (A = l.match(/^\n\n/)) === null || A === void 0 ? void 0 : A.length) !== null && g !== void 0 ? g : 0;
+ var b = l.replace(/~0$/g, "").replace(/^\n+/, "");
+ this.buildTree(function(k) {
+ return k.replace(/^((?:|[\t ]+)[*+-]\s+)\[(\s|x)\]/gm, function(_, T, L) {
+ var F, U = /\s/.test(L) ? '' : '';
+ return At(F = "".concat(T)).call(F, U);
+ });
+ }(b), f);
+ var v = this.renderTree(0);
+ return this.pushCache(v, this.sign, this.$getLineNum(l));
+ } }, { key: "$getLineNum", value: function(l) {
+ var f, g, A, b, v = (f = (g = l.match(/^\n\n/)) === null || g === void 0 ? void 0 : g.length) !== null && f !== void 0 ? f : 0;
+ return (A = (b = l.replace(/^\n+/, "").replace(/\n+$/, `
+`).match(/\n/g)) === null || b === void 0 ? void 0 : b.length) !== null && A !== void 0 ? A : 0 + v;
+ } }, { key: "makeHtml", value: function(l, f) {
+ var g = this, A = "".concat(l, "~0");
+ return this.test(A) && (A = A.replace(this.RULE.reg, function(b) {
+ return g.getCacheWithSpace(g.checkCache(b, f, g.$getLineNum(b)), b);
+ })), A = A.replace(/~0$/g, "");
+ } }, { key: "rule", value: function() {
+ var l = { begin: `(?:^|
+)(
+*)(([ ]{0,3}([*+-]|\\d+[.]|[a-z]\\.|[I一二三四五六七八九十]+\\.)[ \\t]+)`, content: "([^\\r]+?)", end: "(~0|\\n{2,}(?=\\S)(?![ \\t]*(?:[*+-]|\\d+[.]|[a-z]\\.|[I一二三四五六七八九十]+\\.)[ \\t]+)))" };
+ return l.reg = new RegExp(l.begin + l.content + l.end, "gm"), l;
+ } }]), o;
+}();
+function qgn(r) {
+ var i = function() {
+ if (typeof Reflect > "u" || !yt || yt.sham)
+ return !1;
+ if (typeof Proxy == "function")
+ return !0;
+ try {
+ return Boolean.prototype.valueOf.call(yt(Boolean, [], function() {
+ })), !0;
+ } catch {
+ return !1;
+ }
+ }();
+ return function() {
+ var o, l = Rn(r);
+ if (i) {
+ var f = Rn(this).constructor;
+ o = yt(l, arguments, f);
+ } else
+ o = l.apply(this, arguments);
+ return Ea(this, o);
+ };
+}
+function d5t(r) {
+ for (var i = /^(\t|[ ]{1,4})/, o = r, l = 0; i.test(o); )
+ o = o.replace(/^(\t|[ ]{1,4})/g, ""), l += 1;
+ return l;
+}
+Ui(Z_t, "HOOK_NAME", "list");
+var eEt = function(r) {
+ ja(o, r0);
+ var i = qgn(o);
+ function o() {
+ return vi(this, o), i.call(this, { needCache: !0 });
+ }
+ return yi(o, [{ key: "handleMatch", value: function(l, f) {
+ var g = this;
+ return l.replace(this.RULE.reg, function(A, b, v) {
+ for (var k, _, T = f(v), L = T.sign, F = T.html, U = g.signWithCache(F) || L, q = g.getLineCount(A, b), Z = /^(([ \t]{0,3}([*+-]|\d+[.]|[a-z]\.|[I一二三四五六七八九十]+\.)[ \t]+)([^\r]+?)($|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.]|[a-z]\.|[I一二三四五六七八九十]+\.)[ \t]+)))/, R = d5t(b), J = F.split(`
+`), he = /^[>\s]+/, Y = />/g, ue = 1, le = 0, be = At(k = At(_ = ''), ke = 0; J[ke]; ke++) {
+ if (ke !== 0) {
+ var de = d5t(J[ke]);
+ if (de <= R && Z.test(J[ke]))
+ break;
+ R = de;
+ }
+ var Te = J[ke].replace(he, function(xe) {
+ var ie = xe.match(Y);
+ return le = ie && ie.length > ue ? ie.length : ue, "";
+ });
+ ue === le && ke !== 0 && (be += "
"), ue < le && (be += fd("").call("", le - ue), ue = le), be += Te;
+ }
+ return be += fd("
").call("
", ue), g.getCacheWithSpace(g.pushCache(be, U, q), A);
+ });
+ } }, { key: "makeHtml", value: function(l, f) {
+ return this.test(l) ? this.handleMatch(l, f) : l;
+ } }, { key: "rule", value: function() {
+ var l = { begin: "(?:^|\\n)(\\s*)", content: ["(", ">(?:.+?\\n(?![*+-]|\\d+[.]|[a-z]\\.))(?:>*.+?\\n(?![*+-]|\\d+[.]|[a-z]\\.))*(?:>*.+?)", "|", ">(?:.+?)", ")"].join(""), end: "(?=(\\n)|$)" };
+ return l.reg = Tv(l, "g"), l;
+ } }]), o;
+}();
+function Ygn(r) {
+ var i = function() {
+ if (typeof Reflect > "u" || !yt || yt.sham)
+ return !1;
+ if (typeof Proxy == "function")
+ return !0;
+ try {
+ return Boolean.prototype.valueOf.call(yt(Boolean, [], function() {
+ })), !0;
+ } catch {
+ return !1;
+ }
+ }();
+ return function() {
+ var o, l = Rn(r);
+ if (i) {
+ var f = Rn(this).constructor;
+ o = yt(l, arguments, f);
+ } else
+ o = l.apply(this, arguments);
+ return Ea(this, o);
+ };
+}
+Ui(eEt, "HOOK_NAME", "blockquote");
+var tEt = function(r) {
+ ja(o, Sg);
+ var i = Ygn(o);
+ function o(l) {
+ var f, g = l.config, A = l.globalConfig;
+ return vi(this, o), (f = i.call(this, { config: g })).urlProcessor = A.urlProcessor, f.enableShortLink = !!g.enableShortLink, f.shortLinkLength = g.shortLinkLength, f.target = g.target ? 'target="'.concat(g.target, '"') : g.openNewPage ? 'target="_blank"' : "", f.rel = g.rel ? 'rel="'.concat(g.rel, '"') : "", f;
+ }
+ return yi(o, [{ key: "isLinkInHtmlAttribute", value: function(l, f, g) {
+ for (var A, b = new RegExp(["<", "([a-zA-Z][a-zA-Z0-9-]*)", "(", ["\\s+[a-zA-Z_:][a-zA-Z0-9_.:-]*", "(", ["\\s*=\\s*", "(", ["([^\\s\"'=<>`]+)", "('[^']*')", '("[^"]*")'].join("|"), ")"].join(""), ")?"].join(""), ")*", "\\s*[/]?>"].join(""), "g"); (A = b.exec(l)) !== null && !(A.index > f + g); )
+ if (A.index < f && A.index + A[0].length >= f + g)
+ return !0;
+ return !1;
+ } }, { key: "isLinkInATag", value: function(l, f, g) {
+ for (var A, b = /[^<]*<\/a>/g; (A = b.exec(l)) !== null && !(A.index > f + g); )
+ if (A.index < f && A.index + A[0].length >= f + g)
+ return !0;
+ return !1;
+ } }, { key: "makeHtml", value: function(l, f) {
+ var g = this;
+ return this.test(l) && (EDe.test(l) || qPe.test(l)) ? l.replace(this.RULE.reg, function(A, b, v, k, _, T, L) {
+ var F, U, q;
+ if (g.isLinkInHtmlAttribute(L, T, v.length + k.length) || g.isLinkInATag(L, T, v.length + k.length))
+ return A;
+ var Z = v.toLowerCase(), R = "", J = "", he = !0;
+ if ((b !== "<" && b !== "<" || _ !== ">" && _ !== ">") && (R = b, J = _, he = !1), Go(k).call(k) === "" || !he && Z === "" && !/www\./.test(k))
+ return A;
+ switch (Z) {
+ case "javascript:":
+ return A;
+ case "mailto:":
+ var Y, ue, le, be, ke, de;
+ return $Me.test(k) ? At(Y = At(ue = At(le = At(be = At(ke = "".concat(R, '")).call(ue, p5(k), "")).call(Y, J) : A;
+ case "":
+ var Te, xe, ie, Be, te, Me, ve, ge, Je, ot;
+ if (R === J || !he)
+ return $Me.test(k) ? At(Te = At(xe = At(ie = At(Be = At(te = "".concat(R, '")).call(xe, p5(k), "")).call(Te, J) : _4t.test(k) ? At(Me = At(ve = "".concat(R)).call(ve, g.renderLink("//".concat(k), k))).call(Me, J) : A;
+ if (he)
+ return $Me.test(k) ? At(ge = At(Je = At(ot = '")).call(ge, p5(k), "") : E4t.test(k) || _4t.test(k) ? g.renderLink(k) : A;
+ default:
+ return E4t.test(k) ? At(F = At(U = "".concat(R)).call(U, g.renderLink(At(q = "".concat(Z)).call(q, k)))).call(F, J) : A;
+ }
+ return A;
+ }) : l;
+ } }, { key: "rule", value: function() {
+ var l, f = { begin: "()", content: ["((?:[a-z][a-z0-9+.-]{1,31}:)?)", At(l = "((?:".concat(E_t.source, ")|(?:")).call(l, EDe.source, "))")].join(""), end: "(>?)" };
+ return f.reg = Tv(f, "ig"), f;
+ } }, { key: "renderLink", value: function(l, f) {
+ var g, A, b, v, k = f;
+ if (typeof k != "string")
+ if (this.enableShortLink) {
+ var _, T = l.replace(/^https?:\/\//i, "");
+ k = At(_ = "".concat(T.substring(0, this.shortLinkLength))).call(_, T.length > this.shortLinkLength ? "..." : "");
+ } else
+ k = l;
+ var L = this.urlProcessor(l, "autolink");
+ return At(g = At(A = At(b = At(v = "')).call(g, p5(k).replace(/_/g, "\\_"), "");
+ } }]), o;
+}();
+function Qme() {
+ var r, i, o, l;
+ vk() && (this.katex = (r = (i = this.externals) === null || i === void 0 ? void 0 : i.katex) !== null && r !== void 0 ? r : window.katex, this.MathJax = (o = (l = this.externals) === null || l === void 0 ? void 0 : l.MathJax) !== null && o !== void 0 ? o : window.MathJax);
+}
+Ui(tEt, "HOOK_NAME", "autoLink");
+var A5t = ["&", "<", ">", '"', "'"], nEt = function(r) {
+ var i = r.replace(new RegExp(__t, "g"), function(o) {
+ return Lu(A5t).call(A5t, o) !== -1 ? $G(o) : "\\".concat(o);
+ });
+ return i;
+}, Jgn = su(function(r, i) {
+ r.exports = function() {
+ const { entries: o, setPrototypeOf: l, isFrozen: f, getPrototypeOf: g, getOwnPropertyDescriptor: A } = Object;
+ let { freeze: b, seal: v, create: k } = Object, { apply: _, construct: T } = typeof Reflect < "u" && Reflect;
+ b || (b = function(br) {
+ return br;
+ }), v || (v = function(br) {
+ return br;
+ }), _ || (_ = function(br, zt, Wr) {
+ return br.apply(zt, Wr);
+ }), T || (T = function(br, zt) {
+ return new br(...zt);
+ });
+ const L = be(Array.prototype.forEach), F = be(Array.prototype.pop), U = be(Array.prototype.push), q = be(String.prototype.toLowerCase), Z = be(String.prototype.toString), R = be(String.prototype.match), J = be(String.prototype.replace), he = be(String.prototype.indexOf), Y = be(String.prototype.trim), ue = be(RegExp.prototype.test), le = ke(TypeError);
+ function be(br) {
+ return function(zt) {
+ for (var Wr = arguments.length, zr = new Array(Wr > 1 ? Wr - 1 : 0), Si = 1; Si < Wr; Si++)
+ zr[Si - 1] = arguments[Si];
+ return _(br, zt, zr);
+ };
+ }
+ function ke(br) {
+ return function() {
+ for (var zt = arguments.length, Wr = new Array(zt), zr = 0; zr < zt; zr++)
+ Wr[zr] = arguments[zr];
+ return T(br, Wr);
+ };
+ }
+ function de(br, zt) {
+ let Wr = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : q;
+ l && l(br, null);
+ let zr = zt.length;
+ for (; zr--; ) {
+ let Si = zt[zr];
+ if (typeof Si == "string") {
+ const vr = Wr(Si);
+ vr !== Si && (f(zt) || (zt[zr] = vr), Si = vr);
+ }
+ br[Si] = !0;
+ }
+ return br;
+ }
+ function Te(br) {
+ for (let zt = 0; zt < br.length; zt++)
+ A(br, zt) === void 0 && (br[zt] = null);
+ return br;
+ }
+ function xe(br) {
+ const zt = k(null);
+ for (const [Wr, zr] of o(br))
+ A(br, Wr) !== void 0 && (Array.isArray(zr) ? zt[Wr] = Te(zr) : zr && typeof zr == "object" && zr.constructor === Object ? zt[Wr] = xe(zr) : zt[Wr] = zr);
+ return zt;
+ }
+ function ie(br, zt) {
+ for (; br !== null; ) {
+ const zr = A(br, zt);
+ if (zr) {
+ if (zr.get)
+ return be(zr.get);
+ if (typeof zr.value == "function")
+ return be(zr.value);
+ }
+ br = g(br);
+ }
+ function Wr(zr) {
+ return console.warn("fallback value for", zr), null;
+ }
+ return Wr;
+ }
+ const Be = b(["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"]), te = b(["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"]), Me = b(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), ve = b(["animate", "color-profile", "cursor", "discard", "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"]), ge = b(["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", "mprescripts"]), Je = b(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), ot = b(["#text"]), bt = b(["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"]), gt = b(["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"]), je = b(["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"]), Qe = b(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), kt = v(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Wt = v(/<%[\w\W]*|[\w\W]*%>/gm), jt = v(/\${[\w\W]*}/gm), Zn = v(/^data-[\-\w.\u00B7-\uFFFF]/), Ft = v(/^aria-[\-\w]+$/), wn = v(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), un = v(/^(?:\w+script|data):/i), ln = v(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), an = v(/^html$/i);
+ var Ot = Object.freeze({ __proto__: null, MUSTACHE_EXPR: kt, ERB_EXPR: Wt, TMPLIT_EXPR: jt, DATA_ATTR: Zn, ARIA_ATTR: Ft, IS_ALLOWED_URI: wn, IS_SCRIPT_OR_DATA: un, ATTR_WHITESPACE: ln, DOCTYPE_NAME: an });
+ const $n = function() {
+ return typeof window > "u" ? null : window;
+ }, pt = function(br, zt) {
+ if (typeof br != "object" || typeof br.createPolicy != "function")
+ return null;
+ let Wr = null;
+ const zr = "data-tt-policy-suffix";
+ zt && zt.hasAttribute(zr) && (Wr = zt.getAttribute(zr));
+ const Si = "dompurify" + (Wr ? "#" + Wr : "");
+ try {
+ return br.createPolicy(Si, { createHTML: (vr) => vr, createScriptURL: (vr) => vr });
+ } catch {
+ return console.warn("TrustedTypes policy " + Si + " could not be created."), null;
+ }
+ };
+ function Ci() {
+ let br = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : $n();
+ const zt = (mn) => Ci(mn);
+ if (zt.version = "3.0.8", zt.removed = [], !br || !br.document || br.document.nodeType !== 9)
+ return zt.isSupported = !1, zt;
+ let { document: Wr } = br;
+ const zr = Wr, Si = zr.currentScript, { DocumentFragment: vr, HTMLTemplateElement: Qr, Node: or, Element: Gr, NodeFilter: An, NamedNodeMap: _i = br.NamedNodeMap || br.MozNamedAttrMap, HTMLFormElement: Cr, DOMParser: la, trustedTypes: Ra } = br, Jo = Gr.prototype, Cc = ie(Jo, "cloneNode"), ji = ie(Jo, "nextSibling"), Ya = ie(Jo, "childNodes"), Hr = ie(Jo, "parentNode");
+ if (typeof Qr == "function") {
+ const mn = Wr.createElement("template");
+ mn.content && mn.content.ownerDocument && (Wr = mn.content.ownerDocument);
+ }
+ let Yr, ni = "";
+ const { implementation: Vr, createNodeIterator: Na, createDocumentFragment: er, getElementsByTagName: as } = Wr, { importNode: xr } = zr;
+ let So = {};
+ zt.isSupported = typeof o == "function" && typeof Hr == "function" && Vr && Vr.createHTMLDocument !== void 0;
+ const { MUSTACHE_EXPR: cs, ERB_EXPR: xa, TMPLIT_EXPR: ro, DATA_ATTR: Lo, ARIA_ATTR: Xo, IS_SCRIPT_OR_DATA: Zo, ATTR_WHITESPACE: Fs } = Ot;
+ let { IS_ALLOWED_URI: Hs } = Ot, Qa = null;
+ const Ff = de({}, [...Be, ...te, ...Me, ...ge, ...ot]);
+ let Oc = null;
+ const Iu = de({}, [...bt, ...gt, ...je, ...Qe]);
+ let da = Object.seal(k(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 } })), _c = null, qf = null, wu = !0, jo = !0, yf = !1, bl = !0, cu = !1, qc = !1, Jl = !1, js = !1, Dc = !1, gs = !1, rc = !1, Ki = !0, Ta = !1;
+ const Bl = "user-content-";
+ let sf = !0, mc = !1, wh = {}, ra = null;
+ const Ls = de({}, ["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"]);
+ let pr = null;
+ const Pr = de({}, ["audio", "video", "img", "source", "image", "track"]);
+ let Wo = null;
+ const hn = de({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), wf = "http://www.w3.org/1998/Math/MathML", Sn = "http://www.w3.org/2000/svg", Nc = "http://www.w3.org/1999/xhtml";
+ let Ro = Nc, T1 = !1, tr = null;
+ const ei = de({}, [wf, Sn, Nc], Z);
+ let fi = null;
+ const ri = ["application/xhtml+xml", "text/html"], Aa = "text/html";
+ let ya = null, fo = null;
+ const bs = Wr.createElement("form"), xo = function(mn) {
+ return mn instanceof RegExp || mn instanceof Function;
+ }, sl = function() {
+ let mn = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
+ if (!fo || fo !== mn) {
+ if (mn && typeof mn == "object" || (mn = {}), mn = xe(mn), fi = ri.indexOf(mn.PARSER_MEDIA_TYPE) === -1 ? Aa : mn.PARSER_MEDIA_TYPE, ya = fi === "application/xhtml+xml" ? Z : q, Qa = "ALLOWED_TAGS" in mn ? de({}, mn.ALLOWED_TAGS, ya) : Ff, Oc = "ALLOWED_ATTR" in mn ? de({}, mn.ALLOWED_ATTR, ya) : Iu, tr = "ALLOWED_NAMESPACES" in mn ? de({}, mn.ALLOWED_NAMESPACES, Z) : ei, Wo = "ADD_URI_SAFE_ATTR" in mn ? de(xe(hn), mn.ADD_URI_SAFE_ATTR, ya) : hn, pr = "ADD_DATA_URI_TAGS" in mn ? de(xe(Pr), mn.ADD_DATA_URI_TAGS, ya) : Pr, ra = "FORBID_CONTENTS" in mn ? de({}, mn.FORBID_CONTENTS, ya) : Ls, _c = "FORBID_TAGS" in mn ? de({}, mn.FORBID_TAGS, ya) : {}, qf = "FORBID_ATTR" in mn ? de({}, mn.FORBID_ATTR, ya) : {}, wh = "USE_PROFILES" in mn && mn.USE_PROFILES, wu = mn.ALLOW_ARIA_ATTR !== !1, jo = mn.ALLOW_DATA_ATTR !== !1, yf = mn.ALLOW_UNKNOWN_PROTOCOLS || !1, bl = mn.ALLOW_SELF_CLOSE_IN_ATTR !== !1, cu = mn.SAFE_FOR_TEMPLATES || !1, qc = mn.WHOLE_DOCUMENT || !1, Dc = mn.RETURN_DOM || !1, gs = mn.RETURN_DOM_FRAGMENT || !1, rc = mn.RETURN_TRUSTED_TYPE || !1, js = mn.FORCE_BODY || !1, Ki = mn.SANITIZE_DOM !== !1, Ta = mn.SANITIZE_NAMED_PROPS || !1, sf = mn.KEEP_CONTENT !== !1, mc = mn.IN_PLACE || !1, Hs = mn.ALLOWED_URI_REGEXP || wn, Ro = mn.NAMESPACE || Nc, da = mn.CUSTOM_ELEMENT_HANDLING || {}, mn.CUSTOM_ELEMENT_HANDLING && xo(mn.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (da.tagNameCheck = mn.CUSTOM_ELEMENT_HANDLING.tagNameCheck), mn.CUSTOM_ELEMENT_HANDLING && xo(mn.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (da.attributeNameCheck = mn.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), mn.CUSTOM_ELEMENT_HANDLING && typeof mn.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (da.allowCustomizedBuiltInElements = mn.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), cu && (jo = !1), gs && (Dc = !0), wh && (Qa = de({}, ot), Oc = [], wh.html === !0 && (de(Qa, Be), de(Oc, bt)), wh.svg === !0 && (de(Qa, te), de(Oc, gt), de(Oc, Qe)), wh.svgFilters === !0 && (de(Qa, Me), de(Oc, gt), de(Oc, Qe)), wh.mathMl === !0 && (de(Qa, ge), de(Oc, je), de(Oc, Qe))), mn.ADD_TAGS && (Qa === Ff && (Qa = xe(Qa)), de(Qa, mn.ADD_TAGS, ya)), mn.ADD_ATTR && (Oc === Iu && (Oc = xe(Oc)), de(Oc, mn.ADD_ATTR, ya)), mn.ADD_URI_SAFE_ATTR && de(Wo, mn.ADD_URI_SAFE_ATTR, ya), mn.FORBID_CONTENTS && (ra === Ls && (ra = xe(ra)), de(ra, mn.FORBID_CONTENTS, ya)), sf && (Qa["#text"] = !0), qc && de(Qa, ["html", "head", "body"]), Qa.table && (de(Qa, ["tbody"]), delete _c.tbody), mn.TRUSTED_TYPES_POLICY) {
+ if (typeof mn.TRUSTED_TYPES_POLICY.createHTML != "function")
+ throw le('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
+ if (typeof mn.TRUSTED_TYPES_POLICY.createScriptURL != "function")
+ throw le('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
+ Yr = mn.TRUSTED_TYPES_POLICY, ni = Yr.createHTML("");
+ } else
+ Yr === void 0 && (Yr = pt(Ra, Si)), Yr !== null && typeof ni == "string" && (ni = Yr.createHTML(""));
+ b && b(mn), fo = mn;
+ }
+ }, Mu = de({}, ["mi", "mo", "mn", "ms", "mtext"]), Zl = de({}, ["foreignobject", "desc", "title", "annotation-xml"]), V1 = de({}, ["title", "style", "font", "a", "script"]), il = de({}, [...te, ...Me, ...ve]), kf = de({}, [...ge, ...Je]), eu = function(mn) {
+ let io = Hr(mn);
+ io && io.tagName || (io = { namespaceURI: Ro, tagName: "template" });
+ const Ba = q(mn.tagName), bc = q(io.tagName);
+ return !!tr[mn.namespaceURI] && (mn.namespaceURI === Sn ? io.namespaceURI === Nc ? Ba === "svg" : io.namespaceURI === wf ? Ba === "svg" && (bc === "annotation-xml" || Mu[bc]) : !!il[Ba] : mn.namespaceURI === wf ? io.namespaceURI === Nc ? Ba === "math" : io.namespaceURI === Sn ? Ba === "math" && Zl[bc] : !!kf[Ba] : mn.namespaceURI === Nc ? !(io.namespaceURI === Sn && !Zl[bc]) && !(io.namespaceURI === wf && !Mu[bc]) && !kf[Ba] && (V1[Ba] || !il[Ba]) : !(fi !== "application/xhtml+xml" || !tr[mn.namespaceURI]));
+ }, cl = function(mn) {
+ U(zt.removed, { element: mn });
+ try {
+ mn.parentNode.removeChild(mn);
+ } catch {
+ mn.remove();
+ }
+ }, Ps = function(mn, io) {
+ try {
+ U(zt.removed, { attribute: io.getAttributeNode(mn), from: io });
+ } catch {
+ U(zt.removed, { attribute: null, from: io });
+ }
+ if (io.removeAttribute(mn), mn === "is" && !Oc[mn])
+ if (Dc || gs)
+ try {
+ cl(io);
+ } catch {
+ }
+ else
+ try {
+ io.setAttribute(mn, "");
+ } catch {
+ }
+ }, hb = function(mn) {
+ let io = null, Ba = null;
+ if (js)
+ mn = "" + mn;
+ else {
+ const ll = R(mn, /^[\r\n\t ]+/);
+ Ba = ll && ll[0];
+ }
+ fi === "application/xhtml+xml" && Ro === Nc && (mn = '' + mn + "");
+ const bc = Yr ? Yr.createHTML(mn) : mn;
+ if (Ro === Nc)
+ try {
+ io = new la().parseFromString(bc, fi);
+ } catch {
+ }
+ if (!io || !io.documentElement) {
+ io = Vr.createDocument(Ro, "template", null);
+ try {
+ io.documentElement.innerHTML = T1 ? ni : bc;
+ } catch {
+ }
+ }
+ const jc = io.body || io.documentElement;
+ return mn && Ba && jc.insertBefore(Wr.createTextNode(Ba), jc.childNodes[0] || null), Ro === Nc ? as.call(io, qc ? "html" : "body")[0] : qc ? io.documentElement : jc;
+ }, Of = function(mn) {
+ return Na.call(mn.ownerDocument || mn, mn, An.SHOW_ELEMENT | An.SHOW_COMMENT | An.SHOW_TEXT, null);
+ }, Sl = function(mn) {
+ return mn instanceof Cr && (typeof mn.nodeName != "string" || typeof mn.textContent != "string" || typeof mn.removeChild != "function" || !(mn.attributes instanceof _i) || typeof mn.removeAttribute != "function" || typeof mn.setAttribute != "function" || typeof mn.namespaceURI != "string" || typeof mn.insertBefore != "function" || typeof mn.hasChildNodes != "function");
+ }, U0 = function(mn) {
+ return typeof or == "function" && mn instanceof or;
+ }, Yf = function(mn, io, Ba) {
+ So[mn] && L(So[mn], (bc) => {
+ bc.call(zt, io, Ba, fo);
+ });
+ }, H0 = function(mn) {
+ let io = null;
+ if (Yf("beforeSanitizeElements", mn, null), Sl(mn))
+ return cl(mn), !0;
+ const Ba = ya(mn.nodeName);
+ if (Yf("uponSanitizeElement", mn, { tagName: Ba, allowedTags: Qa }), mn.hasChildNodes() && !U0(mn.firstElementChild) && ue(/<[/\w]/g, mn.innerHTML) && ue(/<[/\w]/g, mn.textContent))
+ return cl(mn), !0;
+ if (!Qa[Ba] || _c[Ba]) {
+ if (!_c[Ba] && Ad(Ba) && (da.tagNameCheck instanceof RegExp && ue(da.tagNameCheck, Ba) || da.tagNameCheck instanceof Function && da.tagNameCheck(Ba)))
+ return !1;
+ if (sf && !ra[Ba]) {
+ const bc = Hr(mn) || mn.parentNode, jc = Ya(mn) || mn.childNodes;
+ if (jc && bc)
+ for (let ll = jc.length - 1; ll >= 0; --ll)
+ bc.insertBefore(Cc(jc[ll], !0), ji(mn));
+ }
+ return cl(mn), !0;
+ }
+ return mn instanceof Gr && !eu(mn) ? (cl(mn), !0) : Ba !== "noscript" && Ba !== "noembed" && Ba !== "noframes" || !ue(/<\/no(script|embed|frames)/i, mn.innerHTML) ? (cu && mn.nodeType === 3 && (io = mn.textContent, L([cs, xa, ro], (bc) => {
+ io = J(io, bc, " ");
+ }), mn.textContent !== io && (U(zt.removed, { element: mn.cloneNode() }), mn.textContent = io)), Yf("afterSanitizeElements", mn, null), !1) : (cl(mn), !0);
+ }, cf = function(mn, io, Ba) {
+ if (Ki && (io === "id" || io === "name") && (Ba in Wr || Ba in bs))
+ return !1;
+ if (!(jo && !qf[io] && ue(Lo, io))) {
+ if (!(wu && ue(Xo, io))) {
+ if (!Oc[io] || qf[io]) {
+ if (!(Ad(mn) && (da.tagNameCheck instanceof RegExp && ue(da.tagNameCheck, mn) || da.tagNameCheck instanceof Function && da.tagNameCheck(mn)) && (da.attributeNameCheck instanceof RegExp && ue(da.attributeNameCheck, io) || da.attributeNameCheck instanceof Function && da.attributeNameCheck(io)) || io === "is" && da.allowCustomizedBuiltInElements && (da.tagNameCheck instanceof RegExp && ue(da.tagNameCheck, Ba) || da.tagNameCheck instanceof Function && da.tagNameCheck(Ba))))
+ return !1;
+ } else if (!Wo[io]) {
+ if (!ue(Hs, J(Ba, Fs, ""))) {
+ if ((io !== "src" && io !== "xlink:href" && io !== "href" || mn === "script" || he(Ba, "data:") !== 0 || !pr[mn]) && !(yf && !ue(Zo, J(Ba, Fs, "")))) {
+ if (Ba)
+ return !1;
+ }
+ }
+ }
+ }
+ }
+ return !0;
+ }, Ad = function(mn) {
+ return mn.indexOf("-") > 0;
+ }, Ep = function(mn) {
+ Yf("beforeSanitizeAttributes", mn, null);
+ const { attributes: io } = mn;
+ if (!io)
+ return;
+ const Ba = { attrName: "", attrValue: "", keepAttr: !0, allowedAttributes: Oc };
+ let bc = io.length;
+ for (; bc--; ) {
+ const jc = io[bc], { name: ll, namespaceURI: Df, value: Jf } = jc, Fd = ya(ll);
+ let Gh = ll === "value" ? Jf : Y(Jf);
+ if (Ba.attrName = Fd, Ba.attrValue = Gh, Ba.keepAttr = !0, Ba.forceKeepAttr = void 0, Yf("uponSanitizeAttribute", mn, Ba), Gh = Ba.attrValue, Ba.forceKeepAttr || (Ps(ll, mn), !Ba.keepAttr))
+ continue;
+ if (!bl && ue(/\/>/i, Gh)) {
+ Ps(ll, mn);
+ continue;
+ }
+ cu && L([cs, xa, ro], (bn) => {
+ Gh = J(Gh, bn, " ");
+ });
+ const iA = ya(mn.nodeName);
+ if (cf(iA, Fd, Gh)) {
+ if (!Ta || Fd !== "id" && Fd !== "name" || (Ps(ll, mn), Gh = Bl + Gh), Yr && typeof Ra == "object" && typeof Ra.getAttributeType == "function" && !Df)
+ switch (Ra.getAttributeType(iA, Fd)) {
+ case "TrustedHTML":
+ Gh = Yr.createHTML(Gh);
+ break;
+ case "TrustedScriptURL":
+ Gh = Yr.createScriptURL(Gh);
+ }
+ try {
+ Df ? mn.setAttributeNS(Df, ll, Gh) : mn.setAttribute(ll, Gh), F(zt.removed);
+ } catch {
+ }
+ }
+ }
+ Yf("afterSanitizeAttributes", mn, null);
+ }, Md = function mn(io) {
+ let Ba = null;
+ const bc = Of(io);
+ for (Yf("beforeSanitizeShadowDOM", io, null); Ba = bc.nextNode(); )
+ Yf("uponSanitizeShadowNode", Ba, null), H0(Ba) || (Ba.content instanceof vr && mn(Ba.content), Ep(Ba));
+ Yf("afterSanitizeShadowDOM", io, null);
+ };
+ return zt.sanitize = function(mn) {
+ let io = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, Ba = null, bc = null, jc = null, ll = null;
+ if (T1 = !mn, T1 && (mn = ""), typeof mn != "string" && !U0(mn)) {
+ if (typeof mn.toString != "function")
+ throw le("toString is not a function");
+ if (typeof (mn = mn.toString()) != "string")
+ throw le("dirty is not a string, aborting");
+ }
+ if (!zt.isSupported)
+ return mn;
+ if (Jl || sl(io), zt.removed = [], typeof mn == "string" && (mc = !1), mc) {
+ if (mn.nodeName) {
+ const Fd = ya(mn.nodeName);
+ if (!Qa[Fd] || _c[Fd])
+ throw le("root node is forbidden and cannot be sanitized in-place");
+ }
+ } else if (mn instanceof or)
+ Ba = hb(""), bc = Ba.ownerDocument.importNode(mn, !0), bc.nodeType === 1 && bc.nodeName === "BODY" || bc.nodeName === "HTML" ? Ba = bc : Ba.appendChild(bc);
+ else {
+ if (!Dc && !cu && !qc && mn.indexOf("<") === -1)
+ return Yr && rc ? Yr.createHTML(mn) : mn;
+ if (Ba = hb(mn), !Ba)
+ return Dc ? null : rc ? ni : "";
+ }
+ Ba && js && cl(Ba.firstChild);
+ const Df = Of(mc ? mn : Ba);
+ for (; jc = Df.nextNode(); )
+ H0(jc) || (jc.content instanceof vr && Md(jc.content), Ep(jc));
+ if (mc)
+ return mn;
+ if (Dc) {
+ if (gs)
+ for (ll = er.call(Ba.ownerDocument); Ba.firstChild; )
+ ll.appendChild(Ba.firstChild);
+ else
+ ll = Ba;
+ return (Oc.shadowroot || Oc.shadowrootmode) && (ll = xr.call(zr, ll, !0)), ll;
+ }
+ let Jf = qc ? Ba.outerHTML : Ba.innerHTML;
+ return qc && Qa["!doctype"] && Ba.ownerDocument && Ba.ownerDocument.doctype && Ba.ownerDocument.doctype.name && ue(an, Ba.ownerDocument.doctype.name) && (Jf = "
+` + Jf), cu && L([cs, xa, ro], (Fd) => {
+ Jf = J(Jf, Fd, " ");
+ }), Yr && rc ? Yr.createHTML(Jf) : Jf;
+ }, zt.setConfig = function() {
+ sl(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}), Jl = !0;
+ }, zt.clearConfig = function() {
+ fo = null, Jl = !1;
+ }, zt.isValidAttribute = function(mn, io, Ba) {
+ fo || sl({});
+ const bc = ya(mn), jc = ya(io);
+ return cf(bc, jc, Ba);
+ }, zt.addHook = function(mn, io) {
+ typeof io == "function" && (So[mn] = So[mn] || [], U(So[mn], io));
+ }, zt.removeHook = function(mn) {
+ if (So[mn])
+ return F(So[mn]);
+ }, zt.removeHooks = function(mn) {
+ So[mn] && (So[mn] = []);
+ }, zt.removeAllHooks = function() {
+ So = {};
+ }, zt;
+ }
+ var ut = Ci();
+ return ut;
+ }();
+}), Gbe = Jgn(window);
+function Zgn(r) {
+ var i = function() {
+ if (typeof Reflect > "u" || !yt || yt.sham)
+ return !1;
+ if (typeof Proxy == "function")
+ return !0;
+ try {
+ return Boolean.prototype.valueOf.call(yt(Boolean, [], function() {
+ })), !0;
+ } catch {
+ return !1;
+ }
+ }();
+ return function() {
+ var o, l = Rn(r);
+ if (i) {
+ var f = Rn(this).constructor;
+ o = yt(l, arguments, f);
+ } else
+ o = l.apply(this, arguments);
+ return Ea(this, o);
+ };
+}
+var tRe = function(r) {
+ ja(o, r0);
+ var i = Zgn(o);
+ function o(l) {
+ var f, g, A = l.config;
+ return vi(this, o), Ui(Xs(g = i.call(this, { needCache: !0 })), "engine", "MathJax"), Ui(Xs(g), "katex", void 0), Ui(Xs(g), "MathJax", void 0), g.engine = vk() ? (f = A.engine) !== null && f !== void 0 ? f : "MathJax" : "node", g;
+ }
+ return yi(o, [{ key: "toHtml", value: function(l, f, g, A) {
+ var b, v, k;
+ Bo(Qme).call(Qme, this)("engine");
+ var _ = l.replace(/^[ \f\r\t\v]*/, "").replace(/\s*$/, ""), T = f.replace(/^[ \f\r\t\v]*\n/, ""), L = this.$engine.md5(l), F = this.getLineCount(_, T);
+ /\n/.test(f) || (F -= 1), /\n\s*$/.test(l) || (F -= 1), F = F > 0 ? F : 0;
+ var U = At(b = At(v = '$$')).call(b, nEt(A), "$$
");
+ if (this.engine === "katex") {
+ var q, Z, R = this.katex.renderToString(A, { throwOnError: !1, displayMode: !0 });
+ U = At(q = At(Z = '')).call(q, R, "
");
+ }
+ if ((k = this.MathJax) !== null && k !== void 0 && k.tex2svg) {
+ var J, he, Y = x_t(this.MathJax.tex2svg(A), !0);
+ U = At(J = At(he = '')).call(J, Y, "
");
+ }
+ return U = Gbe.sanitize(U), g + this.getCacheWithSpace(this.pushCache(U, L, F), l);
+ } }, { key: "beforeMakeHtml", value: function(l) {
+ var f, g;
+ return Bg() ? l.replace(this.RULE.reg, Bo(g = this.toHtml).call(g, this)) : G9(l, this.RULE.reg, Bo(f = this.toHtml).call(f, this), !0, 1);
+ } }, { key: "makeHtml", value: function(l) {
+ return l;
+ } }, { key: "rule", value: function() {
+ var l = { begin: Bg() ? "(\\s*)((? "u" || !yt || yt.sham)
+ return !1;
+ if (typeof Proxy == "function")
+ return !0;
+ try {
+ return Boolean.prototype.valueOf.call(yt(Boolean, [], function() {
+ })), !0;
+ } catch {
+ return !1;
+ }
+ }();
+ return function() {
+ var o, l = Rn(r);
+ if (i) {
+ var f = Rn(this).constructor;
+ o = yt(l, arguments, f);
+ } else
+ o = l.apply(this, arguments);
+ return Ea(this, o);
+ };
+}
+Ui(tRe, "HOOK_NAME", "mathBlock");
+var rEt = function(r) {
+ ja(o, r0);
+ var i = epn(o);
+ function o(l) {
+ var f, g, A = l.config;
+ return vi(this, o), Ui(Xs(g = i.call(this, { needCache: !0 })), "engine", "MathJax"), Ui(Xs(g), "katex", void 0), Ui(Xs(g), "MathJax", void 0), g.engine = vk() ? (f = A.engine) !== null && f !== void 0 ? f : "MathJax" : "node", g;
+ }
+ return yi(o, [{ key: "toHtml", value: function(l, f, g) {
+ var A, b, v, k;
+ if (!g)
+ return l;
+ Bo(Qme).call(Qme, this)("engine");
+ var _ = g.match(/\n/g), T = _ ? _.length + 2 : 2, L = this.$engine.md5(l), F = At(A = At(b = "".concat(f, `$')).call(A, nEt(g), "$");
+ if (this.engine === "katex" && (v = this.katex) !== null && v !== void 0 && v.renderToString) {
+ var U, q, Z = this.katex.renderToString(g, { throwOnError: !1 });
+ F = At(U = At(q = "".concat(f, '')).call(U, Z, "");
+ }
+ if ((k = this.MathJax) !== null && k !== void 0 && k.tex2svg) {
+ var R, J, he = x_t(this.MathJax.tex2svg(g, { em: 12, ex: 6, display: !1 }), !0);
+ F = At(R = At(J = "".concat(f, '')).call(R, he, "");
+ }
+ return F = Gbe.sanitize(F), this.pushCache(F, r0.IN_PARAGRAPH_CACHE_KEY_PREFIX + L);
+ } }, { key: "beforeMakeHtml", value: function(l) {
+ var f = this, g = l;
+ return g = g.replace(jbe(!0), function(A) {
+ var b;
+ return Zs(b = A.split("|")).call(b, function(v) {
+ return f.makeInlineMath(v);
+ }).join("|").replace(/\\~D/g, "~D").replace(/~D/g, "\\~D");
+ }), this.makeInlineMath(g);
+ } }, { key: "makeInlineMath", value: function(l) {
+ var f, g;
+ return this.test(l) ? Bg() ? l.replace(this.RULE.reg, Bo(g = this.toHtml).call(g, this)) : G9(l, this.RULE.reg, Bo(f = this.toHtml).call(f, this), !0, 1) : l;
+ } }, { key: "makeHtml", value: function(l) {
+ return l;
+ } }, { key: "rule", value: function() {
+ var l = { begin: Bg() ? "((? 1 ? arguments[1] : void 0, o), g = l > 2 ? arguments[2] : void 0, A = g === void 0 ? o : yL(g, o); A > f; )
+ i[f++] = r;
+ return i;
+} });
+var tpn = a0("Array").fill, VMe = Array.prototype, UG = function(r) {
+ var i = r.fill;
+ return r === VMe || E1(VMe, r) && i === VMe.fill ? tpn : i;
+};
+function npn(r) {
+ var i = function() {
+ if (typeof Reflect > "u" || !yt || yt.sham)
+ return !1;
+ if (typeof Proxy == "function")
+ return !0;
+ try {
+ return Boolean.prototype.valueOf.call(yt(Boolean, [], function() {
+ })), !0;
+ } catch {
+ return !1;
+ }
+ }();
+ return function() {
+ var o, l = Rn(r);
+ if (i) {
+ var f = Rn(this).constructor;
+ o = yt(l, arguments, f);
+ } else
+ o = l.apply(this, arguments);
+ return Ea(this, o);
+ };
+}
+function iEt(r) {
+ return r;
+}
+var g5t = { tocStyle: "plain", tocNodeClass: "toc-li", tocContainerClass: "toc", tocTitleClass: "toc-title", linkProcessor: iEt }, p5t = '
', aEt = function(r) {
+ ja(o, r0);
+ var i = npn(o);
+ function o(l) {
+ var f, g;
+ l.externals;
+ var A = l.config;
+ return vi(this, o), Ui(Xs(g = i.call(this, { needCache: !0 })), "tocStyle", "nested"), Ui(Xs(g), "tocNodeClass", "toc-li"), Ui(Xs(g), "tocContainerClass", "toc"), Ui(Xs(g), "tocTitleClass", "toc-title"), Ui(Xs(g), "linkProcessor", iEt), Ui(Xs(g), "baseLevel", 1), Ui(Xs(g), "isFirstTocToken", !0), Ui(Xs(g), "allowMultiToc", !1), no(f = yh(g5t)).call(f, function(b) {
+ g[b] = A[b] || g5t[b];
+ }), g;
+ }
+ return yi(o, [{ key: "beforeMakeHtml", value: function(l) {
+ var f = this, g = l;
+ return this.test(g, "extend") && (g = g.replace(this.RULE.extend.reg, function(A, b, v) {
+ var k;
+ if (!f.allowMultiToc && !f.isFirstTocToken)
+ return At(k = `
+`.concat(b)).call(k, p5t);
+ var _ = f.pushCache(A);
+ return f.isFirstTocToken = !1, c$(A, _);
+ })), this.test(g, "standard") && (g = g.replace(this.RULE.standard.reg, function(A, b, v) {
+ var k;
+ return f.allowMultiToc || f.isFirstTocToken ? (f.isFirstTocToken = !1, c$(A, f.pushCache(A))) : At(k = `
+`.concat(b)).call(k, p5t);
+ })), g;
+ } }, { key: "makeHtml", value: function(l) {
+ return l;
+ } }, { key: "$makeLevel", value: function(l) {
+ for (var f = "", g = this.baseLevel; g < l; g++)
+ f += " ";
+ return f;
+ } }, { key: "$makeTocItem", value: function(l, f) {
+ var g, A, b, v, k, _ = !(arguments.length > 2 && arguments[2] !== void 0) || arguments[2], T = "";
+ f && (T = this.$makeLevel(l.level));
+ var L = this.linkProcessor("#".concat(l.id).replace(/safe_/g, ""));
+ return At(g = At(A = At(b = At(v = At(k = '')).call(k, T, '')).call(A, l.text, "")).call(g, _ ? "" : "");
+ } }, { key: "$makePlainToc", value: function(l) {
+ var f = this, g = Zs(l).call(l, function(A) {
+ return f.$makeTocItem(A, !0);
+ });
+ return g.join("");
+ } }, { key: "$makeNestedToc", value: function(l) {
+ var f, g, A = this, b = 0, v = UG(f = new Array(7)).call(f, !1), k = UG(g = new Array(7)).call(g, !1), _ = "";
+ no(l).call(l, function(L) {
+ var F = L.level;
+ if (b === 0) {
+ for (var U = F; U >= A.baseLevel; U--)
+ _ += "", k[U] = !0;
+ return _ += A.$makeTocItem(L, !1, !1), v[F] = !0, void (b = F);
+ }
+ if (F < b) {
+ for (var q = b; q >= F; q--)
+ v[q] && (_ += "", v[q] = !1), k[q] && q > F && (_ += "
", k[q] = !1);
+ v[F] = !0, _ += A.$makeTocItem(L, !1, !1), b = F;
+ } else if (F === b)
+ v[b] && (_ += ""), _ += A.$makeTocItem(L, !1, !1), v[F] = !0, k[F] = !0;
+ else {
+ for (var Z = b + 1; Z <= F; Z++)
+ _ += "", k[Z] = !0;
+ v[F] = !0, _ += A.$makeTocItem(L, !1, !1), b = F;
+ }
+ });
+ for (var T = b; T >= this.baseLevel; T--)
+ v[T] && (_ += "", v[T] = !1), k[T] && (_ += "
", k[T] = !1);
+ return _;
+ } }, { key: "$makeToc", value: function(l, f, g) {
+ var A, b, v, k = TDe(g, 1), _ = At(A = At(b = At(v = '');
+ return _ += '目录
'), l.length <= 0 ? "" : (this.baseLevel = Math.min.apply(Math, BO(Zs(l).call(l, function(T) {
+ return T.level;
+ }))), this.tocStyle === "nested" ? _ += this.$makeNestedToc(l) : _ += this.$makePlainToc(l), _ += "");
+ } }, { key: "afterMakeHtml", value: function(l) {
+ var f = this, g = wT(Rn(o.prototype), "afterMakeHtml", this).call(this, l), A = [], b = "";
+ return g.replace(/]*? id="([^"]+?)"[^>]*?>(?:|)(.+?)<\/h\1>/g, function(v, k, _, T) {
+ var L, F = T.replace(/~fn#[0-9]+#/g, "");
+ A.push({ level: +k, id: _, text: F }), b += At(L = "".concat(k)).call(L, _);
+ }), b = this.$engine.md5(b), g = g.replace(/(?:^|\n)(\[\[|\[|【【)(toc|TOC)(\]\]|\]|】】)([<~])/, function(v) {
+ return v.replace(/(\]\]|\]|】】)([<~])/, `$1
+$2`);
+ }), g = (g = g.replace(this.RULE.extend.reg, function(v, k) {
+ return f.$makeToc(A, b, k);
+ })).replace(this.RULE.standard.reg, function(v, k) {
+ return f.$makeToc(A, b, k);
+ }), this.isFirstTocToken = !0, g;
+ } }, { key: "test", value: function(l, f) {
+ return !!this.RULE[f].reg && this.RULE[f].reg.test(l);
+ } }, { key: "rule", value: function() {
+ var l = { begin: "(?:^|\\n)(\\n*)", end: "(?=$|\\n)", content: "[ ]*((?:【【|\\[\\[)(?:toc|TOC)(?:\\]\\]|】】))[ ]*" };
+ l.reg = new RegExp(l.begin + l.content + l.end, "g");
+ var f = { begin: "(?:^|\\n)(\\n*)", end: "(?=$|\\n)", content: "[ ]*(\\[(?:toc|TOC)\\])[ ]*" };
+ return f.reg = new RegExp(f.begin + f.content + f.end, "g"), { extend: l, standard: f };
+ } }]), o;
+}();
+function rpn(r) {
+ var i = function() {
+ if (typeof Reflect > "u" || !yt || yt.sham)
+ return !1;
+ if (typeof Proxy == "function")
+ return !0;
+ try {
+ return Boolean.prototype.valueOf.call(yt(Boolean, [], function() {
+ })), !0;
+ } catch {
+ return !1;
+ }
+ }();
+ return function() {
+ var o, l = Rn(r);
+ if (i) {
+ var f = Rn(this).constructor;
+ o = yt(l, arguments, f);
+ } else
+ o = l.apply(this, arguments);
+ return Ea(this, o);
+ };
+}
+Ui(aEt, "HOOK_NAME", "toc");
+var oEt = function(r) {
+ ja(o, r0);
+ var i = rpn(o);
+ function o(l) {
+ var f;
+ return l.externals, l.config, vi(this, o), (f = i.call(this)).footnoteCache = {}, f.footnoteMap = {}, f.footnote = [], f;
+ }
+ return yi(o, [{ key: "$cleanCache", value: function() {
+ this.footnoteCache = {}, this.footnoteMap = {}, this.footnote = [];
+ } }, { key: "pushFootnoteCache", value: function(l, f) {
+ this.footnoteCache[l] = f;
+ } }, { key: "getFootnoteCache", value: function(l) {
+ return this.footnoteCache[l] || null;
+ } }, { key: "pushFootNote", value: function(l, f) {
+ var g, A, b, v, k, _;
+ if (this.footnoteMap[l])
+ return this.footnoteMap[l];
+ var T = this.footnote.length + 1, L = {};
+ L.fn = At(g = At(A = At(b = '"), L.fnref = At(v = At(k = At(_ = '"), L.num = T, L.note = Go(f).call(f), this.footnote.push(L);
+ var F = "\0~fn#".concat(T - 1, "#\0");
+ return this.footnoteMap[l] = F, F;
+ } }, { key: "getFootNote", value: function() {
+ return this.footnote;
+ } }, { key: "formatFootNote", value: function() {
+ var l, f = this.getFootNote();
+ if (f.length <= 0)
+ return "";
+ var g = Zs(f).call(f, function(b) {
+ var v;
+ return At(v = ``);
+ }).join(""), A = this.$engine.md5(g);
+ return g = At(l = '");
+ } }, { key: "beforeMakeHtml", value: function(l) {
+ var f = this, g = l;
+ return this.test(g) && (g = g.replace(this.RULE.reg, function(A, b, v, k) {
+ return f.pushFootnoteCache(v, k), (A.match(/\n/g) || []).join("");
+ }), g = g.replace(/\[\^([^\]]+?)\](?!:)/g, function(A, b) {
+ var v = f.getFootnoteCache(b);
+ return v ? f.pushFootNote(b, v) : A;
+ }), g += this.formatFootNote()), g;
+ } }, { key: "makeHtml", value: function(l, f) {
+ return l;
+ } }, { key: "afterMakeHtml", value: function(l) {
+ var f = this.getFootNote(), g = l.replace(/\0~fn#([0-9]+)#\0/g, function(A, b) {
+ return f[b].fn;
+ });
+ return this.$cleanCache(), g;
+ } }, { key: "rule", value: function() {
+ var l = { begin: "(^|\\n)[ ]*", content: ["\\[\\^([^\\]]+?)\\]:\\h*", "([\\s\\S]+?)"].join(""), end: "(?=\\s*$|\\n\\n)" };
+ return l.reg = Tv(l, "g", !0), l;
+ } }]), o;
+}();
+function ipn(r) {
+ var i = function() {
+ if (typeof Reflect > "u" || !yt || yt.sham)
+ return !1;
+ if (typeof Proxy == "function")
+ return !0;
+ try {
+ return Boolean.prototype.valueOf.call(yt(Boolean, [], function() {
+ })), !0;
+ } catch {
+ return !1;
+ }
+ }();
+ return function() {
+ var o, l = Rn(r);
+ if (i) {
+ var f = Rn(this).constructor;
+ o = yt(l, arguments, f);
+ } else
+ o = l.apply(this, arguments);
+ return Ea(this, o);
+ };
+}
+Ui(oEt, "HOOK_NAME", "footnote");
+var sEt = function(r) {
+ ja(o, r0);
+ var i = ipn(o);
+ function o(l) {
+ var f;
+ return l.externals, l.config, vi(this, o), (f = i.call(this)).commentCache = {}, f;
+ }
+ return yi(o, [{ key: "$cleanCache", value: function() {
+ this.commentCache = {};
+ } }, { key: "pushCommentReferenceCache", value: function(l, f) {
+ var g, A = N_t(f.split(/[ ]+/g)), b = A[0], v = Da(A).call(A, 1), k = mL.set(b);
+ this.commentCache["".concat(l).toLowerCase()] = At(g = [k]).call(g, BO(v)).join(" ");
+ } }, { key: "getCommentReferenceCache", value: function(l) {
+ return this.commentCache["".concat(l).toLowerCase()] || null;
+ } }, { key: "beforeMakeHtml", value: function(l) {
+ var f = this, g = l;
+ return this.test(g) && (g = g.replace(this.RULE.reg, function(A, b, v, k) {
+ var _;
+ return f.pushCommentReferenceCache(v, k), ((_ = A.match(/\n/g)) !== null && _ !== void 0 ? _ : []).join("");
+ }), g = g.replace(/(\[[^\]\n]+?\])?(?:\[([^\]\n]+?)\])/g, function(A, b, v) {
+ var k, _, T = f.getCommentReferenceCache(v);
+ return T ? b ? At(_ = "".concat(b, "(")).call(_, T, ")") : At(k = "[".concat(v, "](")).call(k, T, ")") : A;
+ }), this.$cleanCache()), g;
+ } }, { key: "makeHtml", value: function(l, f) {
+ return l;
+ } }, { key: "afterMakeHtml", value: function(l) {
+ return mL.restoreAll(l);
+ } }, { key: "rule", value: function() {
+ var l = { begin: "(^|\\n)[ ]*", content: ["\\[([^^][^\\]]*?)\\]:\\h*", "([^\\n]+?)"].join(""), end: "(?=$|\\n)" };
+ return l.reg = Tv(l, "g", !0), l;
+ } }]), o;
+}();
+Ui(sEt, "HOOK_NAME", "commentReference");
+var apn = LL.some, opn = uX("some");
+qa({ target: "Array", proto: !0, forced: !opn }, { some: function(r) {
+ return apn(this, r, arguments.length > 1 ? arguments[1] : void 0);
+} });
+var spn = a0("Array").some, qMe = Array.prototype, cpn = function(r) {
+ var i = r.some;
+ return r === qMe || E1(qMe, r) && i === qMe.some ? spn : i;
+};
+function lpn(r) {
+ var i = function() {
+ if (typeof Reflect > "u" || !yt || yt.sham)
+ return !1;
+ if (typeof Proxy == "function")
+ return !0;
+ try {
+ return Boolean.prototype.valueOf.call(yt(Boolean, [], function() {
+ })), !0;
+ } catch {
+ return !1;
+ }
+ }();
+ return function() {
+ var o, l = Rn(r);
+ if (i) {
+ var f = Rn(this).constructor;
+ o = yt(l, arguments, f);
+ } else
+ o = l.apply(this, arguments);
+ return Ea(this, o);
+ };
+}
+var m5t = ["href", "src"];
+Gbe.addHook("afterSanitizeAttributes", function(r) {
+ no(m5t).call(m5t, function(i) {
+ if (r.hasAttribute(i)) {
+ var o = r.getAttribute(i);
+ r.setAttribute(i, o.replace(/\\/g, "%5c"));
+ }
+ });
+});
+var cEt = function(r) {
+ ja(o, r0);
+ var i = lpn(o);
+ function o() {
+ return vi(this, o), i.call(this, { needCache: !0 });
+ }
+ return yi(o, [{ key: "isAutoLinkTag", value: function(l) {
+ var f = [/^<([a-z][a-z0-9+.-]{1,31}:\/\/[^<> `]+)>$/i, /^<(mailto:[^<> `]+)>$/i, /^<([^()<>[\]:'@\\,"\s`]+@[^()<>[\]:'@\\,"\s`.]+\.[^()<>[\]:'@\\,"\s`]+)>$/i];
+ return cpn(f).call(f, function(g) {
+ return g.test(l);
+ });
+ } }, { key: "isHtmlComment", value: function(l) {
+ return /^$/.test(l);
+ } }, { key: "beforeMakeHtml", value: function(l, f) {
+ var g = this;
+ this.$engine.htmlWhiteListAppend ? (this.htmlWhiteListAppend = new RegExp("^(".concat(this.$engine.htmlWhiteListAppend, ")( |$|/)"), "i"), this.htmlWhiteList = this.$engine.htmlWhiteListAppend.split("|")) : (this.htmlWhiteListAppend = !1, this.htmlWhiteList = []);
+ var A = l;
+ return A = function(b) {
+ if (typeof b != "string")
+ return "";
+ var v = b.replace(/&(\w+);?/g, function(k, _) {
+ return Lu(k).call(k, ";") === -1 || Lu(R4t).call(R4t, _.toLowerCase()) === -1 ? k.replace(/&/g, "&") : k;
+ });
+ return v = v.replace(/(?!x)(\d*);?/gi, function(k, _) {
+ return LDe(_) || Lu(k).call(k, ";") === -1 || _.lenth > 7 || !Q4t(_) ? k.replace(/&/g, "&") : k;
+ }), v = v.replace(/([0-9a-f]*);?/gi, function(k, _) {
+ if (LDe(_))
+ return k.replace(/&/g, "&");
+ var T = "0x".concat(_), L = Ky(T, 16);
+ return isNaN(L) || Lu(k).call(k, ";") === -1 || _.lenth > 6 || !Q4t(T) ? k.replace(/&/g, "&") : k;
+ }), v;
+ }(A = L_t(A)), A = (A = (A = A.replace(/<[/]?(.*?)>/g, function(b, v) {
+ return V0n.test(v) || g.isAutoLinkTag(b) || g.isHtmlComment(b) || g.htmlWhiteListAppend !== !1 && g.htmlWhiteListAppend.test(v) ? b.replace(//g, "$#62;") : b.replace(//g, ">");
+ })).replace(/<(?=\/?(\w|\n|$))/g, "<")).replace(/\$#60;/g, "<").replace(/\$#62;/g, ">");
+ } }, { key: "makeHtml", value: function(l, f) {
+ return l;
+ } }, { key: "afterMakeHtml", value: function(l) {
+ var f = l, g = { ALLOW_UNKNOWN_PROTOCOLS: !0, ADD_ATTR: ["target"] };
+ if (this.htmlWhiteListAppend !== !1) {
+ var A;
+ if (g.ADD_TAGS = this.htmlWhiteList, (this.htmlWhiteListAppend.test("style") || this.htmlWhiteListAppend.test("ALL")) && (f = f.replace(/");
+ } }, { key: "computeStyle", value: function() {
+ return { mathStyle: this.getStyleFromSheets("mjx-container"), echartStyle: "", cherryStyle: this.getStyleFromSheets("cherry") };
+ } }, { key: "toggleLoading", value: function() {
+ this.isLoading ? document.querySelector(".icon-loading").outerHTML = '') : document.querySelector(".ch-icon-copy").outerHTML = '', this.isLoading = !this.isLoading;
+ } }, { key: "onClick", value: function(f) {
+ var g = this;
+ this.toggleLoading();
+ var A = document.querySelector(".cherry").getAttribute("data-inline-code-theme"), b = document.querySelector(".cherry").getAttribute("data-code-block-theme"), v = this.computeStyle(), k = v.mathStyle, _ = v.echartStyle, T = v.cherryStyle, L = this.previewer.isPreviewerHidden() ? this.previewer.options.previewerCache.html : this.previewer.getValue();
+ this.adaptWechat(L).then(function(F) {
+ var U, q, Z;
+ lTt(At(U = At(q = At(Z = "".concat(k + _ + T, `
+ `)), g.toggleLoading();
+ });
+ } }]), l;
+}();
+function xyn(r, i, o) {
+ return new lRe(function(l) {
+ var f = document.createElement("CANVAS"), g = f.getContext("2d"), A = new Image();
+ A.crossOrigin = "Anonymous", A.onload = function() {
+ f.height = A.height, f.width = A.width, g.drawImage(A, 0, 0);
+ var b = f.toDataURL(o || "image/png");
+ l(b), f = null;
+ }, A.src = r;
+ });
+}
+function Cyn(r) {
+ var i = function() {
+ if (typeof Reflect > "u" || !yt || yt.sham)
+ return !1;
+ if (typeof Proxy == "function")
+ return !0;
+ try {
+ return Boolean.prototype.valueOf.call(yt(Boolean, [], function() {
+ })), !0;
+ } catch {
+ return !1;
+ }
+ }();
+ return function() {
+ var o, l = Rn(r);
+ if (i) {
+ var f = Rn(this).constructor;
+ o = yt(l, arguments, f);
+ } else
+ o = l.apply(this, arguments);
+ return Ea(this, o);
+ };
+}
+var ATt = function(r) {
+ ja(o, xc);
+ var i = Cyn(o);
+ function o(l) {
+ var f, g, A, b, v, k;
+ return vi(this, o), (k = i.call(this, l)).setName("panel", "tips"), k.panelRule = YPe().reg, k.subMenuConfig = [{ iconName: "tips", name: "tips", onclick: Bo(f = k.bindSubClick).call(f, Xs(k), "primary") }, { iconName: "info", name: "info", onclick: Bo(g = k.bindSubClick).call(g, Xs(k), "info") }, { iconName: "warning", name: "warning", onclick: Bo(A = k.bindSubClick).call(A, Xs(k), "warning") }, { iconName: "danger", name: "danger", onclick: Bo(b = k.bindSubClick).call(b, Xs(k), "danger") }, { iconName: "success", name: "success", onclick: Bo(v = k.bindSubClick).call(v, Xs(k), "success") }], k;
+ }
+ return yi(o, [{ key: "$getNameFromStr", value: function(l) {
+ var f = !1;
+ return this.panelRule.lastIndex = 0, l.replace(this.panelRule, function(g, A, b, v) {
+ var k = /\s/.test(Go(b).call(b)) ? Go(b).call(b).replace(/\s.*$/, "") : b;
+ return f = k ? Go(k).call(k).toLowerCase() : "", g;
+ }), f;
+ } }, { key: "$getTitle", value: function(l) {
+ return this.panelRule.lastIndex = 0, l.replace(this.panelRule, function(f, g, A, b) {
+ var v = Go(A).call(A);
+ return /\s/.test(v) ? v.replace(/[^\s]+\s/, "") : "";
+ }), "";
+ } }, { key: "onClick", value: function(l) {
+ var f, g, A = this, b = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "", v = v2(this.editor.editor, l, "line", !0) || "内容", k = this.$getNameFromStr(v), _ = this.$getTitle(v);
+ return k === !1 && this.getMoreSelection("::: ", `
+`, function() {
+ var T = A.editor.editor.getSelection(), L = A.$getNameFromStr(T);
+ return L !== !1 && (v = T, k = L, _ = A.$getTitle(T)), L !== !1;
+ }), k !== !1 ? k === b ? (this.panelRule.lastIndex = 0, v.replace(this.panelRule, function(T, L, F, U) {
+ var q, Z = Go(F).call(F), R = /\s/.test(Z) ? Z.replace(/[^\s]+\s/, "") : "";
+ return At(q = "".concat(R, `
+`)).call(q, U);
+ })) : (this.registerAfterClickCb(function() {
+ A.setLessSelection("::: ", `
+`);
+ }), this.panelRule.lastIndex = 0, v.replace(this.panelRule, function(T, L, F, U) {
+ var q, Z, R = Go(F).call(F), J = /\s/.test(R) ? R.replace(/[^\s]+\s/, "") : "";
+ return At(q = At(Z = "::: ".concat(b, " ")).call(Z, J, `
+`)).call(q, U.replace(/\n+$/, ""), `
+:::`);
+ })) : (this.registerAfterClickCb(function() {
+ A.setLessSelection("::: ", `
+`);
+ }), v = v.replace(/^\n+/, ""), /\n/.test(v) ? _ || (_ = v.replace(/\n[\w\W]+$/, ""), v = v.replace(/^[^\n]+\n/, "")) : _ = _ || "标题", At(f = At(g = "::: ".concat(b, " ")).call(g, _, `
+`)).call(f, v, `
+:::`).replace(/\n{2,}:::/g, `
+:::`));
+ } }]), o;
+}();
+function _yn(r) {
+ var i = function() {
+ if (typeof Reflect > "u" || !yt || yt.sham)
+ return !1;
+ if (typeof Proxy == "function")
+ return !0;
+ try {
+ return Boolean.prototype.valueOf.call(yt(Boolean, [], function() {
+ })), !0;
+ } catch {
+ return !1;
+ }
+ }();
+ return function() {
+ var o, l = Rn(r);
+ if (i) {
+ var f = Rn(this).constructor;
+ o = yt(l, arguments, f);
+ } else
+ o = l.apply(this, arguments);
+ return Ea(this, o);
+ };
+}
+var Eyn = function(r) {
+ ja(o, ATt);
+ var i = _yn(o);
+ function o(l) {
+ var f, g, A, b, v, k, _;
+ vi(this, o), (_ = i.call(this, l)).setName("justify", "justify"), _.panelRule = YPe().reg;
+ var T = _.$cherry.locale;
+ return _.subMenuConfig = [{ iconName: "justifyLeft", name: (f = T == null ? void 0 : T.justifyLeft) !== null && f !== void 0 ? f : "左对齐", onclick: Bo(g = _.bindSubClick).call(g, Xs(_), "left") }, { iconName: "justifyCenter", name: (A = T == null ? void 0 : T.justifyCenter) !== null && A !== void 0 ? A : "居中", onclick: Bo(b = _.bindSubClick).call(b, Xs(_), "center") }, { iconName: "justifyRight", name: (v = T == null ? void 0 : T.justifyRight) !== null && v !== void 0 ? v : "右对齐", onclick: Bo(k = _.bindSubClick).call(k, Xs(_), "right") }], _;
+ }
+ return yi(o, [{ key: "$getTitle", value: function() {
+ return " ";
+ } }]), o;
+}();
+function Tyn(r) {
+ var i = function() {
+ if (typeof Reflect > "u" || !yt || yt.sham)
+ return !1;
+ if (typeof Proxy == "function")
+ return !0;
+ try {
+ return Boolean.prototype.valueOf.call(yt(Boolean, [], function() {
+ })), !0;
+ } catch {
+ return !1;
+ }
+ }();
+ return function() {
+ var o, l = Rn(r);
+ if (i) {
+ var f = Rn(this).constructor;
+ o = yt(l, arguments, f);
+ } else
+ o = l.apply(this, arguments);
+ return Ea(this, o);
+ };
+}
+var Byn = function(r) {
+ ja(o, xc);
+ var i = Tyn(o);
+ function o(l) {
+ var f;
+ return vi(this, o), (f = i.call(this, l)).setName("detail", "insertFlow"), f.detailRule = B_t().reg, f;
+ }
+ return yi(o, [{ key: "onClick", value: function(l) {
+ var f, g = this, A = v2(this.editor.editor, l, "line", !0) || `点击展开更多
+内容
+++- 默认展开
+内容
+++ 默认收起
+内容`;
+ return this.detailRule.lastIndex = 0, this.detailRule.test(A) || this.getMoreSelection("+++ ", `
+`, function() {
+ var b = g.editor.editor.getSelection();
+ g.detailRule.lastIndex = 0;
+ var v = g.detailRule.test(b);
+ return v !== !1 && (A = b), v !== !1;
+ }), this.detailRule.lastIndex = 0, this.detailRule.test(A) ? (this.detailRule.lastIndex = 0, A.replace(this.detailRule, function(b, v, k, _, T) {
+ var L;
+ return At(L = "".concat(_, `
+`)).call(L, T);
+ })) : (A = A.replace(/^\s+/, ""), /\n/.test(A) || (A = At(f = "".concat(A, `
+`)).call(f, A)), this.registerAfterClickCb(function() {
+ g.setLessSelection("+++ ", `
+`);
+ }), "+++ ".concat(A, `
++++`).replace(/\n{2,}\+\+\+/g, `
++++`));
+ } }]), o;
+}();
+function Syn(r) {
+ var i = function() {
+ if (typeof Reflect > "u" || !yt || yt.sham)
+ return !1;
+ if (typeof Proxy == "function")
+ return !0;
+ try {
+ return Boolean.prototype.valueOf.call(yt(Boolean, [], function() {
+ })), !0;
+ } catch {
+ return !1;
+ }
+ }();
+ return function() {
+ var o, l = Rn(r);
+ if (i) {
+ var f = Rn(this).constructor;
+ o = yt(l, arguments, f);
+ } else
+ o = l.apply(this, arguments);
+ return Ea(this, o);
+ };
+}
+var Lyn = function(r) {
+ ja(o, xc);
+ var i = Syn(o);
+ function o(l) {
+ var f;
+ return vi(this, o), (f = i.call(this, l)).setName("draw.io", "draw.io"), f.noIcon = !0, f.drawioIframeUrl = l.options.drawioIframeUrl, f;
+ }
+ return yi(o, [{ key: "onClick", value: function(l) {
+ var f = this;
+ if (!this.drawioIframeUrl)
+ return l;
+ if (this.hasCacheOnce()) {
+ var g, A = this.getAndCleanCacheOnce(), b = A.xmlData, v = A.base64, k = At(g = "](".concat(v, "){data-type=drawio data-xml=")).call(g, encodeURI(b), "}");
+ return this.registerAfterClickCb(function() {
+ f.setLessSelection("![", k);
+ }), "".concat("![", "在预览区点击图片重新编辑draw.io").concat(k);
+ }
+ return uTt(this.drawioIframeUrl, "", function(_) {
+ f.setCacheOnce(_), f.fire(null);
+ }), this.updateMarkdown = !1, l;
+ } }]), o;
+}(), U6t = { bold: S2n, italic: I2n, "|": F2n, strikethrough: D2n, sub: P2n, sup: Q2n, header: K2n, insert: X2n, list: V2n, ol: Y2n, ul: Z2n, checklist: tvn, graph: avn, size: svn, h1: lvn, h2: hvn, h3: dvn, color: U2n, quote: gvn, quickTable: mvn, togglePreview: vvn, code: Tvn, codeTheme: Svn, export: Ivn, settings: Fvn, fullScreen: wvn, mobilePreview: yyn, copy: kyn, undo: xvn, redo: _vn, underline: Dvn, switchModel: Pvn, image: Qvn, audio: Uvn, video: jvn, br: zvn, hr: Xvn, formula: qvn, link: Jvn, table: eyn, toc: nyn, lineTable: iyn, barTable: oyn, pdf: cyn, word: fyn, ruby: Ayn, theme: pyn, file: uyn, panel: ATt, justify: Eyn, detail: Byn, drawIo: Lyn, wordCount: byn }, Iyn = function() {
+ function r(i) {
+ vi(this, r), this.toolbar = i, this.hooks = {}, this.allMenusName = [], this.level1MenusName = [], this.level2MenusName = {}, this.init();
+ }
+ return yi(r, [{ key: "$newMenu", value: function(i) {
+ if (!this.hooks[i]) {
+ var o = this.toolbar.options, l = o.$cherry, f = o.customMenu;
+ U6t[i] ? (this.allMenusName.push(i), this.hooks[i] = new U6t[i](l)) : f != null && f[i] && (this.allMenusName.push(i), this.hooks[i] = new f[i](l));
+ }
+ } }, { key: "init", value: function() {
+ var i = this, o = this.toolbar.options.buttonConfig;
+ no(o).call(o, function(l) {
+ if (typeof l == "string")
+ i.level1MenusName.push(l), i.$newMenu(l);
+ else if (Yl(l) === "object") {
+ var f = yh(l);
+ if (f.length === 1) {
+ var g, A = vh(f, 1)[0];
+ i.level1MenusName.push(A), i.$newMenu(A), i.level2MenusName[A] = l[A], no(g = l[A]).call(g, function(b) {
+ i.$newMenu(b);
+ });
+ }
+ }
+ });
+ } }]), r;
+}(), Pie = function() {
+ function r(i) {
+ vi(this, r), Ui(this, "toolbarHandlers", {}), this.menus = {}, this.shortcutKeyMap = {}, this.subMenus = {}, this.options = { dom: document.createElement("div"), buttonConfig: ["bold"], customMenu: [] }, lL(this.options, i), this.$cherry = this.options.$cherry, this.instanceId = this.$cherry.instanceId, this.menus = new Iyn(this), this.drawMenus(), this.collectShortcutKey(), this.collectToolbarHandler(), this.init();
+ }
+ return yi(r, [{ key: "init", value: function() {
+ var i = this;
+ kc.on(this.instanceId, kc.Events.cleanAllSubMenus, function() {
+ return i.hideAllSubMenu();
+ });
+ } }, { key: "previewOnly", value: function() {
+ this.options.dom.classList.add("preview-only"), this.$cherry.wrapperDom.classList.add("cherry--no-toolbar"), kc.emit(this.instanceId, kc.Events.toolbarHide);
+ } }, { key: "showToolbar", value: function() {
+ this.options.dom.classList.remove("preview-only"), this.$cherry.wrapperDom.classList.remove("cherry--no-toolbar"), kc.emit(this.instanceId, kc.Events.toolbarShow);
+ } }, { key: "isHasLevel2Menu", value: function(i) {
+ return this.menus.level2MenusName[i];
+ } }, { key: "isHasConfigMenu", value: function(i) {
+ return this.menus.hooks[i].subMenuConfig || [];
+ } }, { key: "isHasSubMenu", value: function(i) {
+ return !!(this.isHasLevel2Menu(i) || this.isHasConfigMenu(i).length > 0);
+ } }, { key: "drawMenus", value: function() {
+ var i, o = this, l = document.createDocumentFragment();
+ no(i = this.menus.level1MenusName).call(i, function(f) {
+ var g = o.menus.hooks[f].createBtn();
+ (typeof window > "u" ? "undefined" : Yl(window)) === "object" && "onpointerup" in window ? (g.addEventListener("pointerdown", function() {
+ o.isPointerDown = !0;
+ }, !1), g.addEventListener("pointerup", function(A) {
+ o.isPointerDown && o.onClick(A, f), o.isPointerDown = !1;
+ }, !1)) : g.addEventListener("click", function(A) {
+ o.onClick(A, f);
+ }, !1), o.isHasSubMenu(f) && g.classList.add("cherry-toolbar-dropdown"), l.appendChild(g);
+ }), this.appendMenusToDom(l);
+ } }, { key: "appendMenusToDom", value: function(i) {
+ var o = ih("div", "toolbar-left");
+ o.appendChild(i), this.options.dom.appendChild(o);
+ } }, { key: "setSubMenuPosition", value: function(i, o) {
+ var l = i.getMenuPosition();
+ o.style.left = "".concat(l.left + l.width / 2, "px"), o.style.top = "".concat(l.top + l.height, "px"), o.style.position = i.positionModel;
+ } }, { key: "drawSubMenus", value: function(i) {
+ var o = this;
+ this.subMenus[i] = ih("div", "cherry-dropdown", { name: i }), this.setSubMenuPosition(this.menus.hooks[i], this.subMenus[i]);
+ var l = this.isHasLevel2Menu(i);
+ l && no(l).call(l, function(g) {
+ var A = o.menus.hooks[g];
+ if (A !== void 0 && typeof A.createBtn == "function") {
+ var b = A.createBtn(!0);
+ A.dom = A.dom ? A.dom : o.menus.hooks[i].dom, b.addEventListener("click", function(v) {
+ return o.onClick(v, g, !0);
+ }, !1), o.subMenus[i].appendChild(b);
+ }
+ });
+ var f = this.isHasConfigMenu(i);
+ f.length > 0 && no(f).call(f, function(g) {
+ var A = o.menus.hooks[i].createSubBtnByConfig(g);
+ A.addEventListener("click", function() {
+ return o.hideAllSubMenu();
+ }, !1), o.subMenus[i].appendChild(A);
+ }), this.$cherry.wrapperDom.appendChild(this.subMenus[i]);
+ } }, { key: "onClick", value: function(i, o) {
+ var l = arguments.length > 2 && arguments[2] !== void 0 && arguments[2], f = this.menus.hooks[o];
+ f && (this.isHasSubMenu(o) && !l ? this.toggleSubMenu(o) : (this.hideAllSubMenu(), f.fire(i, o)));
+ } }, { key: "toggleSubMenu", value: function(i) {
+ if (!this.subMenus[i])
+ return this.hideAllSubMenu(), this.drawSubMenus(i), void (this.subMenus[i].style.display = "block");
+ this.subMenus[i].style.display === "none" ? (this.hideAllSubMenu(), this.subMenus[i].style.display = "block", this.setSubMenuPosition(this.menus.hooks[i], this.subMenus[i])) : this.subMenus[i].style.display = "none";
+ } }, { key: "hideAllSubMenu", value: function() {
+ var i;
+ no(i = this.$cherry.wrapperDom.querySelectorAll(".cherry-dropdown")).call(i, function(o) {
+ o.style.display = "none";
+ });
+ } }, { key: "collectMenuInfo", value: function(i) {
+ this.toolbarHandlers = lL({}, this.toolbarHandlers, i.toolbarHandlers), this.menus.hooks = lL({}, i.menus.hooks, this.menus.hooks), (!this.options.shortcutKey || yh(this.options.shortcutKey).length <= 0) && (this.shortcutKeyMap = lL({}, this.shortcutKeyMap, i.shortcutKeyMap));
+ } }, { key: "collectShortcutKey", value: function() {
+ var i, o = this;
+ this.options.shortcutKey && yh(this.options.shortcutKey).length > 0 ? this.shortcutKeyMap = this.options.shortcutKey : no(i = this.menus.allMenusName).call(i, function(l) {
+ var f;
+ (f = o.menus.hooks[l].shortcutKeys) === null || f === void 0 || no(f).call(f, function(g) {
+ o.shortcutKeyMap[g] = l;
+ });
+ });
+ } }, { key: "collectToolbarHandler", value: function() {
+ var i, o = this;
+ this.toolbarHandlers = _L(i = this.menus.allMenusName).call(i, function(l, f) {
+ var g = o.menus.hooks[f];
+ return g && (l[f] = function(A, b) {
+ typeof b == "function" && k3.warn("MenuBase#onClick param callback is no longer supported. Please register the callback via MenuBase#registerAfterClickCb instead."), g.fire.call(g, void 0, A);
+ }), l;
+ }, {});
+ } }, { key: "matchShortcutKey", value: function(i) {
+ return !!this.shortcutKeyMap[this.getCurrentKey(i)];
+ } }, { key: "fireShortcutKey", value: function(i) {
+ var o, l = this.getCurrentKey(i);
+ (o = this.menus.hooks[this.shortcutKeyMap[l]]) === null || o === void 0 || o.fire(i, l);
+ } }, { key: "getCurrentKey", value: function(i) {
+ var o = "";
+ return i.ctrlKey && (o += "Ctrl-"), i.altKey && (o += "Alt-"), i.metaKey && E2n && (o += "Ctrl-"), i.shiftKey && (o += "Shift-"), i.key && i.key.toLowerCase() !== "shift" && (o += i.key.toLowerCase()), o;
+ } }]), r;
+}();
+function Myn(r) {
+ var i = function() {
+ if (typeof Reflect > "u" || !yt || yt.sham)
+ return !1;
+ if (typeof Proxy == "function")
+ return !0;
+ try {
+ return Boolean.prototype.valueOf.call(yt(Boolean, [], function() {
+ })), !0;
+ } catch {
+ return !1;
+ }
+ }();
+ return function() {
+ var o, l = Rn(r);
+ if (i) {
+ var f = Rn(this).constructor;
+ o = yt(l, arguments, f);
+ } else
+ o = l.apply(this, arguments);
+ return Ea(this, o);
+ };
+}
+var gTt = function(r) {
+ ja(o, Pie);
+ var i = Myn(o);
+ function o() {
+ return vi(this, o), i.apply(this, arguments);
+ }
+ return yi(o, [{ key: "visible", get: function() {
+ var l = window.getComputedStyle(this.bubbleDom);
+ return l.display !== "none" && l.visibility !== "hidden";
+ }, set: function(l) {
+ var f = window.getComputedStyle(this.bubbleDom);
+ l ? f.display === "none" && (this.bubbleDom.style.display = o.displayType) : f.display !== "none" && (this.bubbleDom.style.display = "none");
+ } }, { key: "init", value: function() {
+ this.options.editor = this.$cherry.editor, this.addSelectionChangeListener(), this.bubbleDom = this.options.dom, this.editorDom = this.options.editor.getEditorDom(), this.initBubbleDom(), this.editorDom.querySelector(".CodeMirror").appendChild(this.bubbleDom);
+ } }, { key: "appendMenusToDom", value: function(l) {
+ this.options.dom.appendChild(l);
+ } }, { key: "getScrollTop", value: function() {
+ return this.options.editor.editor.getScrollInfo().top;
+ } }, { key: "updatePositionWhenScroll", value: function() {
+ this.bubbleDom.style.display === o.displayType && (this.bubbleDom.style.marginTop = "".concat(g2(this.bubbleDom.dataset.scrollTop) - this.getScrollTop(), "px"));
+ } }, { key: "showBubble", value: function(l, f) {
+ this.visible || (this.visible = !0, this.bubbleDom.style.marginTop = "0", this.bubbleDom.dataset.scrollTop = String(this.getScrollTop()));
+ var g = this.editorDom.querySelector(".CodeMirror-lines").firstChild.getBoundingClientRect(), A = this.editorDom.getBoundingClientRect(), b = g.left - A.left, v = g.width + b, k = l;
+ k < 2 * this.bubbleDom.offsetHeight ? (k += this.bubbleDom.offsetHeight - this.bubbleTop.getBoundingClientRect().height, this.bubbleTop.style.display = "block", this.bubbleBottom.style.display = "none") : (k -= this.bubbleDom.offsetHeight + 2 * this.bubbleBottom.getBoundingClientRect().height, this.bubbleTop.style.display = "none", this.bubbleBottom.style.display = "block"), this.bubbleDom.style.top = "".concat(k, "px");
+ var _ = f - this.bubbleDom.offsetWidth / 2;
+ _ < b ? (_ = b, this.$setBubbleCursorPosition("".concat(f - b, "px"))) : _ + this.bubbleDom.offsetWidth > v ? (_ = v - this.bubbleDom.offsetWidth, this.$setBubbleCursorPosition("".concat(f - _, "px"))) : this.$setBubbleCursorPosition("50%"), this.bubbleDom.style.left = "".concat(Math.max(20, _), "px");
+ } }, { key: "hideBubble", value: function() {
+ this.visible = !1;
+ } }, { key: "$setBubbleCursorPosition", value: function() {
+ var l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "50%";
+ if (l === "50%")
+ this.bubbleTop.style.left = "50%", this.bubbleBottom.style.left = "50%";
+ else {
+ var f = g2(l) < 10 ? "10px" : l;
+ this.bubbleTop.style.left = f, this.bubbleBottom.style.left = f;
+ }
+ } }, { key: "initBubbleDom", value: function() {
+ var l = document.createElement("div");
+ l.className = "cherry-bubble-top";
+ var f = document.createElement("div");
+ f.className = "cherry-bubble-bottom", this.bubbleTop = l, this.bubbleBottom = f, this.bubbleDom.appendChild(l), this.bubbleDom.appendChild(f), this.visible = !1;
+ } }, { key: "getBubbleDom", value: function() {
+ return this.bubbleDom;
+ } }, { key: "addSelectionChangeListener", value: function() {
+ var l = this;
+ this.options.editor.addListener("change", function(f) {
+ l.hideBubble();
+ }), this.options.editor.addListener("refresh", function(f) {
+ l.hideBubble();
+ }), this.options.editor.addListener("scroll", function(f) {
+ l.updatePositionWhenScroll();
+ }), this.options.editor.addListener("beforeSelectionChange", function(f, g) {
+ if (g.origin !== "*mouse" && (g.origin !== null || g.origin === void 0) || !g.ranges[0])
+ return !0;
+ var A = 1e6 * g.ranges[0].anchor.line + g.ranges[0].anchor.ch, b = 1e6 * g.ranges[0].head.line + g.ranges[0].head.ch, v = "asc";
+ A > b && (v = "desc"), lm(function() {
+ if (f.getSelections().join("").length <= 0)
+ l.hideBubble();
+ else {
+ var k = f.getWrapperElement().getElementsByClassName("CodeMirror-selected"), _ = l.editorDom.getBoundingClientRect(), T = 0, L = 0;
+ if (Yl(k) !== "object" || k.length <= 0)
+ l.hideBubble();
+ else {
+ for (var F = 0; F < k.length; F++) {
+ var U = k[F].getBoundingClientRect(), q = U.top - _.top;
+ v === "asc" ? q >= L && (L = q, T = U.left - _.left + U.width / 2) : (q <= L || L <= 0) && (L = q, T = U.left - _.left + U.width / 2);
+ }
+ l.showBubble(L, T);
+ }
+ }
+ }, 10);
+ });
+ } }]), o;
+}();
+function Fyn(r) {
+ var i = function() {
+ if (typeof Reflect > "u" || !yt || yt.sham)
+ return !1;
+ if (typeof Proxy == "function")
+ return !0;
+ try {
+ return Boolean.prototype.valueOf.call(yt(Boolean, [], function() {
+ })), !0;
+ } catch {
+ return !1;
+ }
+ }();
+ return function() {
+ var o, l = Rn(r);
+ if (i) {
+ var f = Rn(this).constructor;
+ o = yt(l, arguments, f);
+ } else
+ o = l.apply(this, arguments);
+ return Ea(this, o);
+ };
+}
+Ui(gTt, "displayType", "flex");
+var Oyn = function(r) {
+ ja(o, Pie);
+ var i = Fyn(o);
+ function o() {
+ return vi(this, o), i.apply(this, arguments);
+ }
+ return yi(o, [{ key: "init", value: function() {
+ this.editor = this.$cherry.editor, this.editorDom = this.editor.getEditorDom(), this.editorDom.querySelector(".CodeMirror-scroll").appendChild(this.options.dom), this.initAction();
+ } }, { key: "appendMenusToDom", value: function(l) {
+ this.options.dom.appendChild(l);
+ } }, { key: "initAction", value: function() {
+ var l = this;
+ this.editor.addListener("cursorActivity", function(f, g) {
+ l.cursorActivity(g, f);
+ }), this.editor.addListener("update", function(f, g) {
+ l.cursorActivity(g, f);
+ }), this.editor.addListener("refresh", function(f, g) {
+ lm(function() {
+ l.cursorActivity(g, f);
+ }, 0);
+ });
+ } }, { key: "update", value: function(l, f) {
+ var g = f.getCursor();
+ if (this.isHidden(g.line, f))
+ return this.options.dom.style.display = "none", !1;
+ this.options.dom.style.display = "inline-block";
+ } }, { key: "cursorActivity", value: function(l, f) {
+ var g = f.getCursor(), A = document.querySelector(".cherry-editor .CodeMirror-lines");
+ if (!A)
+ return !1;
+ var b = getComputedStyle(A), v = g2(b.paddingLeft), k = g2(b.paddingTop);
+ if (this.isHidden(g.line, f))
+ return this.options.dom.style.display = "none", !1;
+ this.options.dom.style.display = "inline-block", this.options.dom.style.left = "".concat(v, "px"), this.options.dom.style.top = "".concat(this.getLineHeight(g.line, f) + k, "px");
+ } }, { key: "isHidden", value: function(l, f) {
+ return f.getSelections().length > 1 || f.getSelection().length > 0 || !!f.getLine(l);
+ } }, { key: "getLineHeight", value: function(l, f) {
+ var g = 0;
+ return f.getDoc().eachLine(0, l, function(A) {
+ g += A.height;
+ }), g;
+ } }]), o;
+}();
+function Dyn(r) {
+ var i = function() {
+ if (typeof Reflect > "u" || !yt || yt.sham)
+ return !1;
+ if (typeof Proxy == "function")
+ return !0;
+ try {
+ return Boolean.prototype.valueOf.call(yt(Boolean, [], function() {
+ })), !0;
+ } catch {
+ return !1;
+ }
+ }();
+ return function() {
+ var o, l = Rn(r);
+ if (i) {
+ var f = Rn(this).constructor;
+ o = yt(l, arguments, f);
+ } else
+ o = l.apply(this, arguments);
+ return Ea(this, o);
+ };
+}
+var Nyn = function(r) {
+ ja(o, Pie);
+ var i = Dyn(o);
+ function o() {
+ return vi(this, o), i.apply(this, arguments);
+ }
+ return yi(o, [{ key: "appendMenusToDom", value: function(l) {
+ var f = ih("div", "toolbar-right");
+ f.appendChild(l), this.options.dom.appendChild(f);
+ } }]), o;
+}(), Pyn = function() {
+ function r(i) {
+ var o, l;
+ vi(this, r), this.$cherry = i.$cherry, this.editor = i.$cherry.editor.editor, this.tocStr = "", this.updateLocationHash = (o = i.updateLocationHash) === null || o === void 0 || o, this.defaultModel = (l = i.defaultModel) !== null && l !== void 0 ? l : "full", this.init();
+ }
+ return yi(r, [{ key: "init", value: function() {
+ var i = this;
+ this.drawDom(), this.timer = lm(function() {
+ i.updateTocList();
+ }, 300), this.editor.on("change", function(o, l) {
+ clearTimeout(i.timer), i.timer = lm(function() {
+ i.updateTocList(), i.$switchModel(i.model);
+ }, 300);
+ }), this.$switchModel(this.getModelFromLocalStorage());
+ } }, { key: "getModelFromLocalStorage", value: function() {
+ return typeof localStorage > "u" ? this.defaultModel : localStorage.getItem("cherry-toc-model") || this.defaultModel;
+ } }, { key: "setModelToLocalStorage", value: function(i) {
+ typeof localStorage < "u" && localStorage.setItem("cherry-toc-model", i);
+ } }, { key: "drawDom", value: function() {
+ var i = ih("div", "cherry-flex-toc cherry-flex-toc__pure"), o = ih("div", "cherry-toc-head"), l = ih("span", "cherry-toc-title");
+ l.append(this.$cherry.locale.toc);
+ var f = ih("i", "ch-icon ch-icon-chevronsRight"), g = ih("i", "ch-icon ch-icon-chevronsLeft");
+ this.tocClose = f, this.tocOpen = g, o.appendChild(l), o.appendChild(f), o.appendChild(g), i.appendChild(o);
+ var A = ih("div", "cherry-toc-list");
+ this.tocListDom = A, i.appendChild(A), this.tocDom = i, this.$cherry.wrapperDom.appendChild(i), this.bindClickEvent();
+ } }, { key: "bindClickEvent", value: function() {
+ var i = this;
+ this.tocDom.addEventListener("click", function(o) {
+ var l = i.$getClosestNode(o.target, "A");
+ if (l !== !1 && /cherry-toc-one-a/.test(l.className)) {
+ var f = l.dataset, g = f.id, A = f.index;
+ if (i.$cherry.status.previewer === "hide") {
+ for (var b = i.$cherry.editor.editor.getSearchCursor(/(?:^|\n)\n*((?:[ \t\u00a0]*#{1,6}).+?|(?:[ \t\u00a0]*.+)\n(?:[ \t\u00a0]*[=]+|[-]+))(?=$|\n)/g), v = 0; v <= A; v++)
+ b.findNext();
+ var k = b.from();
+ i.$cherry.editor.scrollToLineNum(k.line, k.line + 1, 0);
+ } else {
+ var _, T = i.$cherry.previewer.getDomContainer(), L = (_ = T.querySelectorAll("h1,h2,h3,h4,h5,h6,h7,h8")[A]) !== null && _ !== void 0 && _;
+ if (L !== !1) {
+ var F = T.scrollTop + L.getBoundingClientRect().y - T.getBoundingClientRect().y - 20;
+ T.scrollTo({ top: F, left: 0, behavior: "smooth" });
+ }
+ }
+ i.updateLocationHash && (location.href = g);
+ }
+ }), this.tocClose.addEventListener("click", function(o) {
+ i.$switchModel("pure"), i.setModelToLocalStorage("pure");
+ }), this.tocOpen.addEventListener("click", function(o) {
+ i.$switchModel("full"), i.setModelToLocalStorage("full");
+ }), window && window.addEventListener("resize", function() {
+ i.$switchModel(i.model);
+ }), this.editor.on("scroll", function(o, l) {
+ i.updateTocList(!0);
+ }), this.$cherry.previewer.getDomContainer().addEventListener("scroll", function() {
+ i.updateTocList(!0);
+ });
+ } }, { key: "$switchModel", value: function() {
+ var i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "pure";
+ this.model = i;
+ var o = "cherry-flex-toc__".concat(i);
+ this.tocDom.classList.contains(o) || (this.tocDom.classList.remove("cherry-flex-toc__pure"), this.tocDom.classList.remove("cherry-flex-toc__full"), this.tocDom.classList.add(o));
+ var l = this.tocListDom.querySelectorAll(".cherry-toc-one-a");
+ if (l.length > 0) {
+ var f = 28;
+ if (i === "pure") {
+ var g = this.tocListDom.getBoundingClientRect().height, A = Math.floor((g - 3 * l.length) / l.length);
+ f = A < 3 ? 3 : A > 10 ? 10 : A;
+ }
+ for (var b = 0; b < l.length; b++)
+ l[b].style.height !== "".concat(f, "px") && (l[b].style.height = "".concat(f, "px"));
+ }
+ } }, { key: "$getClosestNode", value: function(i, o) {
+ return i.tagName === o ? i : i.parentNode.tagName !== "BODY" && this.$getClosestNode(i.parentNode, o);
+ } }, { key: "updateTocList", value: function() {
+ if ((arguments.length > 0 && arguments[0] !== void 0 && arguments[0]) !== !0) {
+ var i = this.$cherry.getToc(), o = "";
+ if (Zs(i).call(i, function(k) {
+ return o += k.text, k;
+ }), o = eRe(o), this.tocStr !== o) {
+ this.tocStr = o;
+ var l = "", f = 0;
+ Zs(i).call(i, function(k) {
+ var _, T, L, F, U = k.text.replace(//g, ""), q = U.replace(/<[^>]+?>/g, "");
+ return l += At(_ = At(T = At(L = At(F = '`)).call(_, U, ""), f += 1, k;
+ }), this.tocListDom.innerHTML = l;
+ }
+ }
+ if (this.$cherry.status.previewer !== "hide") {
+ for (var g, A = this.$cherry.previewer.getDomContainer().getBoundingClientRect().y, b = this.$cherry.previewer.getDomContainer().querySelectorAll("h1,h2,h3,h4,h5,h6,h7,h8"), v = 0; v < b.length && !(b[v].getBoundingClientRect().y > A + 20); v++)
+ ;
+ v = v > 0 ? v - 1 : v, no(g = this.tocListDom.querySelectorAll(".cherry-toc-one-a")).call(g, function(k, _) {
+ _ === v ? k.classList.add("current") : k.classList.remove("current");
+ });
+ }
+ } }]), r;
+}();
+function Ryn(r) {
+ var i = function() {
+ if (typeof Reflect > "u" || !yt || yt.sham)
+ return !1;
+ if (typeof Proxy == "function")
+ return !0;
+ try {
+ return Boolean.prototype.valueOf.call(yt(Boolean, [], function() {
+ })), !0;
+ } catch {
+ return !1;
+ }
+ }();
+ return function() {
+ var o, l = Rn(r);
+ if (i) {
+ var f = Rn(this).constructor;
+ o = yt(l, arguments, f);
+ } else
+ o = l.apply(this, arguments);
+ return Ea(this, o);
+ };
+}
+var Qyn = function(r) {
+ ja(o, Pie);
+ var i = Ryn(o);
+ function o() {
+ return vi(this, o), i.apply(this, arguments);
+ }
+ return yi(o, [{ key: "appendMenusToDom", value: function(l) {
+ this.options.dom.appendChild(l);
+ } }]), o;
+}(), CT = -1, D9 = 1, d5 = 0;
+function iie(r, i, o, l) {
+ if (r === i)
+ return r ? [[d5, r]] : [];
+ if (o != null) {
+ var f = function(k, _, T) {
+ var L = typeof T == "number" ? { index: T, length: 0 } : T.oldRange, F = typeof T == "number" ? null : T.newRange, U = k.length, q = _.length;
+ if (L.length === 0 && (F === null || F.length === 0)) {
+ var Z = L.index, R = k.slice(0, Z), J = k.slice(Z), he = F ? F.index : null, Y = Z + q - U;
+ if ((he === null || he === Y) && !(Y < 0 || Y > q)) {
+ var ue = _.slice(0, Y);
+ if ((ke = _.slice(Y)) === J) {
+ var le = Math.min(Z, Y);
+ if ((Te = R.slice(0, le)) === (ie = ue.slice(0, le)))
+ return PFe(Te, R.slice(le), ue.slice(le), J);
+ }
+ }
+ if (he === null || he === Z) {
+ var be = Z, ke = (ue = _.slice(0, be), _.slice(be));
+ if (ue === R) {
+ var de = Math.min(U - be, q - be);
+ if ((xe = J.slice(J.length - de)) === (Be = ke.slice(ke.length - de)))
+ return PFe(R, J.slice(0, J.length - de), ke.slice(0, ke.length - de), xe);
+ }
+ }
+ }
+ if (L.length > 0 && F && F.length === 0) {
+ var Te = k.slice(0, L.index), xe = k.slice(L.index + L.length);
+ if (!(q < (le = Te.length) + (de = xe.length))) {
+ var ie = _.slice(0, le), Be = _.slice(q - de);
+ if (Te === ie && xe === Be)
+ return PFe(Te, k.slice(le, U - de), _.slice(le, q - de), xe);
+ }
+ }
+ return null;
+ }(r, i, o);
+ if (f)
+ return f;
+ }
+ var g = qDe(r, i), A = r.substring(0, g);
+ g = YDe(r = r.substring(g), i = i.substring(g));
+ var b = r.substring(r.length - g), v = function(k, _) {
+ var T;
+ if (!k)
+ return [[D9, _]];
+ if (!_)
+ return [[CT, k]];
+ var L = k.length > _.length ? k : _, F = k.length > _.length ? _ : k, U = L.indexOf(F);
+ if (U !== -1)
+ return T = [[D9, L.substring(0, U)], [d5, F], [D9, L.substring(U + F.length)]], k.length > _.length && (T[0][0] = T[2][0] = CT), T;
+ if (F.length === 1)
+ return [[CT, k], [D9, _]];
+ var q = function(be, ke) {
+ var de = be.length > ke.length ? be : ke, Te = be.length > ke.length ? ke : be;
+ if (de.length < 4 || 2 * Te.length < de.length)
+ return null;
+ function xe(bt, gt, je) {
+ for (var Qe, kt, Wt, jt, Zn = bt.substring(je, je + Math.floor(bt.length / 4)), Ft = -1, wn = ""; (Ft = gt.indexOf(Zn, Ft + 1)) !== -1; ) {
+ var un = qDe(bt.substring(je), gt.substring(Ft)), ln = YDe(bt.substring(0, je), gt.substring(0, Ft));
+ wn.length < ln + un && (wn = gt.substring(Ft - ln, Ft) + gt.substring(Ft, Ft + un), Qe = bt.substring(0, je - ln), kt = bt.substring(je + un), Wt = gt.substring(0, Ft - ln), jt = gt.substring(Ft + un));
+ }
+ return 2 * wn.length >= bt.length ? [Qe, kt, Wt, jt, wn] : null;
+ }
+ var ie, Be, te, Me, ve, ge = xe(de, Te, Math.ceil(de.length / 4)), Je = xe(de, Te, Math.ceil(de.length / 2));
+ if (!ge && !Je)
+ return null;
+ ie = Je ? ge && ge[4].length > Je[4].length ? ge : Je : ge, be.length > ke.length ? (Be = ie[0], te = ie[1], Me = ie[2], ve = ie[3]) : (Me = ie[0], ve = ie[1], Be = ie[2], te = ie[3]);
+ var ot = ie[4];
+ return [Be, te, Me, ve, ot];
+ }(k, _);
+ if (q) {
+ var Z = q[0], R = q[1], J = q[2], he = q[3], Y = q[4], ue = iie(Z, J), le = iie(R, he);
+ return ue.concat([[d5, Y]], le);
+ }
+ return function(be, ke) {
+ for (var de = be.length, Te = ke.length, xe = Math.ceil((de + Te) / 2), ie = xe, Be = 2 * xe, te = new Array(Be), Me = new Array(Be), ve = 0; ve < Be; ve++)
+ te[ve] = -1, Me[ve] = -1;
+ te[ie + 1] = 0, Me[ie + 1] = 0;
+ for (var ge = de - Te, Je = ge % 2 != 0, ot = 0, bt = 0, gt = 0, je = 0, Qe = 0; Qe < xe; Qe++) {
+ for (var kt = -Qe + ot; kt <= Qe - bt; kt += 2) {
+ for (var Wt = ie + kt, jt = (ln = kt === -Qe || kt !== Qe && te[Wt - 1] < te[Wt + 1] ? te[Wt + 1] : te[Wt - 1] + 1) - kt; ln < de && jt < Te && be.charAt(ln) === ke.charAt(jt); )
+ ln++, jt++;
+ if (te[Wt] = ln, ln > de)
+ bt += 2;
+ else if (jt > Te)
+ ot += 2;
+ else if (Je && (wn = ie + ge - kt) >= 0 && wn < Be && Me[wn] !== -1 && ln >= (Ft = de - Me[wn]))
+ return H6t(be, ke, ln, jt);
+ }
+ for (var Zn = -Qe + gt; Zn <= Qe - je; Zn += 2) {
+ for (var Ft, wn = ie + Zn, un = (Ft = Zn === -Qe || Zn !== Qe && Me[wn - 1] < Me[wn + 1] ? Me[wn + 1] : Me[wn - 1] + 1) - Zn; Ft < de && un < Te && be.charAt(de - Ft - 1) === ke.charAt(Te - un - 1); )
+ Ft++, un++;
+ if (Me[wn] = Ft, Ft > de)
+ je += 2;
+ else if (un > Te)
+ gt += 2;
+ else if (!Je && (Wt = ie + ge - Zn) >= 0 && Wt < Be && te[Wt] !== -1) {
+ var ln;
+ if (jt = ie + (ln = te[Wt]) - Wt, ln >= (Ft = de - Ft))
+ return H6t(be, ke, ln, jt);
+ }
+ }
+ }
+ return [[CT, be], [D9, ke]];
+ }(k, _);
+ }(r = r.substring(0, r.length - g), i = i.substring(0, i.length - g));
+ return A && v.unshift([d5, A]), b && v.push([d5, b]), pTt(v, l), v;
+}
+function H6t(r, i, o, l) {
+ var f = r.substring(0, o), g = i.substring(0, l), A = r.substring(o), b = i.substring(l), v = iie(f, g), k = iie(A, b);
+ return v.concat(k);
+}
+function qDe(r, i) {
+ if (!r || !i || r.charAt(0) !== i.charAt(0))
+ return 0;
+ for (var o = 0, l = Math.min(r.length, i.length), f = l, g = 0; o < f; )
+ r.substring(g, f) == i.substring(g, f) ? g = o = f : l = f, f = Math.floor((l - o) / 2 + o);
+ return mTt(r.charCodeAt(f - 1)) && f--, f;
+}
+function YDe(r, i) {
+ if (!r || !i || r.slice(-1) !== i.slice(-1))
+ return 0;
+ for (var o = 0, l = Math.min(r.length, i.length), f = l, g = 0; o < f; )
+ r.substring(r.length - f, r.length - g) == i.substring(i.length - f, i.length - g) ? g = o = f : l = f, f = Math.floor((l - o) / 2 + o);
+ return bTt(r.charCodeAt(r.length - f)) && f--, f;
+}
+function pTt(r, i) {
+ r.push([d5, ""]);
+ for (var o, l = 0, f = 0, g = 0, A = "", b = ""; l < r.length; )
+ if (l < r.length - 1 && !r[l][1])
+ r.splice(l, 1);
+ else
+ switch (r[l][0]) {
+ case D9:
+ g++, b += r[l][1], l++;
+ break;
+ case CT:
+ f++, A += r[l][1], l++;
+ break;
+ case d5:
+ var v = l - g - f - 1;
+ if (i) {
+ if (v >= 0 && yTt(r[v][1])) {
+ var k = r[v][1].slice(-1);
+ if (r[v][1] = r[v][1].slice(0, -1), A = k + A, b = k + b, !r[v][1]) {
+ r.splice(v, 1), l--;
+ var _ = v - 1;
+ r[_] && r[_][0] === D9 && (g++, b = r[_][1] + b, _--), r[_] && r[_][0] === CT && (f++, A = r[_][1] + A, _--), v = _;
+ }
+ }
+ vTt(r[l][1]) && (k = r[l][1].charAt(0), r[l][1] = r[l][1].slice(1), A += k, b += k);
+ }
+ if (l < r.length - 1 && !r[l][1]) {
+ r.splice(l, 1);
+ break;
+ }
+ if (A.length > 0 || b.length > 0) {
+ A.length > 0 && b.length > 0 && ((o = qDe(b, A)) !== 0 && (v >= 0 ? r[v][1] += b.substring(0, o) : (r.splice(0, 0, [d5, b.substring(0, o)]), l++), b = b.substring(o), A = A.substring(o)), (o = YDe(b, A)) !== 0 && (r[l][1] = b.substring(b.length - o) + r[l][1], b = b.substring(0, b.length - o), A = A.substring(0, A.length - o)));
+ var T = g + f;
+ A.length === 0 && b.length === 0 ? (r.splice(l - T, T), l -= T) : A.length === 0 ? (r.splice(l - T, T, [D9, b]), l = l - T + 1) : b.length === 0 ? (r.splice(l - T, T, [CT, A]), l = l - T + 1) : (r.splice(l - T, T, [CT, A], [D9, b]), l = l - T + 2);
+ }
+ l !== 0 && r[l - 1][0] === d5 ? (r[l - 1][1] += r[l][1], r.splice(l, 1)) : l++, g = 0, f = 0, A = "", b = "";
+ }
+ r[r.length - 1][1] === "" && r.pop();
+ var L = !1;
+ for (l = 1; l < r.length - 1; )
+ r[l - 1][0] === d5 && r[l + 1][0] === d5 && (r[l][1].substring(r[l][1].length - r[l - 1][1].length) === r[l - 1][1] ? (r[l][1] = r[l - 1][1] + r[l][1].substring(0, r[l][1].length - r[l - 1][1].length), r[l + 1][1] = r[l - 1][1] + r[l + 1][1], r.splice(l - 1, 1), L = !0) : r[l][1].substring(0, r[l + 1][1].length) == r[l + 1][1] && (r[l - 1][1] += r[l + 1][1], r[l][1] = r[l][1].substring(r[l + 1][1].length) + r[l + 1][1], r.splice(l + 1, 1), L = !0)), l++;
+ L && pTt(r, i);
+}
+function mTt(r) {
+ return r >= 55296 && r <= 56319;
+}
+function bTt(r) {
+ return r >= 56320 && r <= 57343;
+}
+function vTt(r) {
+ return bTt(r.charCodeAt(0));
+}
+function yTt(r) {
+ return mTt(r.charCodeAt(r.length - 1));
+}
+function PFe(r, i, o, l) {
+ return yTt(r) || vTt(l) ? null : function(f) {
+ for (var g = [], A = 0; A < f.length; A++)
+ f[A][1].length > 0 && g.push(f[A]);
+ return g;
+ }([[d5, r], [CT, i], [D9, o], [d5, l]]);
+}
+function Dpe(r, i, o) {
+ return iie(r, i, o, !0);
+}
+Dpe.INSERT = D9, Dpe.DELETE = CT, Dpe.EQUAL = d5;
+var zge = Dpe, $yn = function(r, i) {
+ for (var o = -1, l = r == null ? 0 : r.length; ++o < l && i(r[o], o, r) !== !1; )
+ ;
+ return r;
+}, Uyn = Y9t(Object.keys, Object), Hyn = Object.prototype.hasOwnProperty, jyn = function(r) {
+ if (!UPe(r))
+ return Uyn(r);
+ var i = [];
+ for (var o in Object(r))
+ Hyn.call(r, o) && o != "constructor" && i.push(o);
+ return i;
+}, uRe = function(r) {
+ return Ube(r) ? a_t(r) : jyn(r);
+}, Kyn = function(r, i) {
+ return r && Mie(i, uRe(i), r);
+}, zyn = function(r, i) {
+ return r && Mie(i, Fie(i), r);
+}, Gyn = function(r, i) {
+ for (var o = -1, l = r == null ? 0 : r.length, f = 0, g = []; ++o < l; ) {
+ var A = r[o];
+ i(A, o, r) && (g[f++] = A);
+ }
+ return g;
+}, wTt = function() {
+ return [];
+}, Xyn = Object.prototype.propertyIsEnumerable, j6t = Object.getOwnPropertySymbols, Wyn = j6t ? function(r) {
+ return r == null ? [] : (r = Object(r), Gyn(j6t(r), function(i) {
+ return Xyn.call(r, i);
+ }));
+} : wTt, hRe = Wyn, Vyn = function(r, i) {
+ return Mie(r, hRe(r), i);
+}, kTt = function(r, i) {
+ for (var o = -1, l = i.length, f = r.length; ++o < l; )
+ r[f + o] = i[o];
+ return r;
+}, qyn = Object.getOwnPropertySymbols ? function(r) {
+ for (var i = []; r; )
+ kTt(i, hRe(r)), r = $Pe(r);
+ return i;
+} : wTt, xTt = qyn, Yyn = function(r, i) {
+ return Mie(r, xTt(r), i);
+}, CTt = function(r, i, o) {
+ var l = i(r);
+ return DG(r) ? l : kTt(l, o(r));
+}, Jyn = function(r) {
+ return CTt(r, uRe, hRe);
+}, Zyn = function(r) {
+ return CTt(r, Fie, xTt);
+}, JDe = k$(X9, "DataView"), ZDe = k$(X9, "Promise"), eNe = k$(X9, "Set"), tNe = k$(X9, "WeakMap"), K6t = "[object Map]", z6t = "[object Promise]", G6t = "[object Set]", X6t = "[object WeakMap]", W6t = "[object DataView]", ewn = w$(JDe), twn = w$(zre), nwn = w$(ZDe), rwn = w$(eNe), iwn = w$(tNe), PQ = y$;
+(JDe && PQ(new JDe(new ArrayBuffer(1))) != W6t || zre && PQ(new zre()) != K6t || ZDe && PQ(ZDe.resolve()) != z6t || eNe && PQ(new eNe()) != G6t || tNe && PQ(new tNe()) != X6t) && (PQ = function(r) {
+ var i = y$(r), o = i == "[object Object]" ? r.constructor : void 0, l = o ? w$(o) : "";
+ if (l)
+ switch (l) {
+ case ewn:
+ return W6t;
+ case twn:
+ return K6t;
+ case nwn:
+ return z6t;
+ case rwn:
+ return G6t;
+ case iwn:
+ return X6t;
+ }
+ return i;
+});
+var fRe = PQ, awn = Object.prototype.hasOwnProperty, own = function(r) {
+ var i = r.length, o = new r.constructor(i);
+ return i && typeof r[0] == "string" && awn.call(r, "index") && (o.index = r.index, o.input = r.input), o;
+}, swn = function(r, i) {
+ var o = i ? QPe(r.buffer) : r.buffer;
+ return new r.constructor(o, r.byteOffset, r.byteLength);
+}, cwn = /\w*$/, lwn = function(r) {
+ var i = new r.constructor(r.source, cwn.exec(r));
+ return i.lastIndex = r.lastIndex, i;
+}, V6t = TO ? TO.prototype : void 0, q6t = V6t ? V6t.valueOf : void 0, uwn = function(r) {
+ return q6t ? Object(q6t.call(r)) : {};
+}, hwn = function(r, i, o) {
+ var l = r.constructor;
+ switch (i) {
+ case "[object ArrayBuffer]":
+ return QPe(r);
+ case "[object Boolean]":
+ case "[object Date]":
+ return new l(+r);
+ case "[object DataView]":
+ return swn(r, o);
+ case "[object Float32Array]":
+ case "[object Float64Array]":
+ case "[object Int8Array]":
+ case "[object Int16Array]":
+ case "[object Int32Array]":
+ case "[object Uint8Array]":
+ case "[object Uint8ClampedArray]":
+ case "[object Uint16Array]":
+ case "[object Uint32Array]":
+ return V9t(r, o);
+ case "[object Map]":
+ case "[object Set]":
+ return new l();
+ case "[object Number]":
+ case "[object String]":
+ return new l(r);
+ case "[object RegExp]":
+ return lwn(r);
+ case "[object Symbol]":
+ return uwn(r);
+ }
+}, fwn = function(r) {
+ return RO(r) && fRe(r) == "[object Map]";
+}, Y6t = NG && NG.isMap, dwn = Y6t ? jPe(Y6t) : fwn, Awn = function(r) {
+ return RO(r) && fRe(r) == "[object Set]";
+}, J6t = NG && NG.isSet, gwn = J6t ? jPe(J6t) : Awn, _Tt = "[object Arguments]", ETt = "[object Function]", TTt = "[object Object]", tA = {};
+tA[_Tt] = tA["[object Array]"] = tA["[object ArrayBuffer]"] = tA["[object DataView]"] = tA["[object Boolean]"] = tA["[object Date]"] = tA["[object Float32Array]"] = tA["[object Float64Array]"] = tA["[object Int8Array]"] = tA["[object Int16Array]"] = tA["[object Int32Array]"] = tA["[object Map]"] = tA["[object Number]"] = tA[TTt] = tA["[object RegExp]"] = tA["[object Set]"] = tA["[object String]"] = tA["[object Symbol]"] = tA["[object Uint8Array]"] = tA["[object Uint8ClampedArray]"] = tA["[object Uint16Array]"] = tA["[object Uint32Array]"] = !0, tA["[object Error]"] = tA[ETt] = tA["[object WeakMap]"] = !1;
+var pwn = function r(i, o, l, f, g, A) {
+ var b, v = 1 & o, k = 2 & o, _ = 4 & o;
+ if (l && (b = g ? l(i, f, g, A) : l(i)), b !== void 0)
+ return b;
+ if (!z9(i))
+ return i;
+ var T = DG(i);
+ if (T) {
+ if (b = own(i), !v)
+ return q9t(i, b);
+ } else {
+ var L = fRe(i), F = L == ETt || L == "[object GeneratorFunction]";
+ if (HPe(i))
+ return W9t(i, v);
+ if (L == TTt || L == _Tt || F && !g) {
+ if (b = k || F ? {} : J9t(i), !v)
+ return k ? Yyn(i, zyn(b, i)) : Vyn(i, Kyn(b, i));
+ } else {
+ if (!tA[L])
+ return g ? i : {};
+ b = hwn(i, L, v);
+ }
+ }
+ A || (A = new X9t());
+ var U = A.get(i);
+ if (U)
+ return U;
+ A.set(i, b), gwn(i) ? i.forEach(function(Z) {
+ b.add(r(Z, o, l, Z, i, A));
+ }) : dwn(i) && i.forEach(function(Z, R) {
+ b.set(R, r(Z, o, l, R, i, A));
+ });
+ var q = T ? void 0 : (_ ? k ? Zyn : Jyn : k ? Fie : uRe)(i);
+ return $yn(q || i, function(Z, R) {
+ q && (Z = i[R = Z]), r_t(b, R, r(Z, o, l, R, i, A));
+ }), b;
+}, BTt = function(r) {
+ return pwn(r, 5);
+}, iO = { urlProcessor: function(r, i) {
+ return r;
+}, fileUpload: function(r, i) {
+ if (/video/i.test(r.type))
+ i("images/demo-dog.png", { name: "".concat(r.name.replace(/\.[^.]+$/, "")), poster: "images/demo-dog.png?poster=true", isBorder: !0, isShadow: !0, isRadius: !0 });
+ else if (/image/i.test(r.type)) {
+ var o = new FileReader();
+ o.onload = function(l) {
+ var f = l.target.result;
+ i(f, { name: "".concat(r.name.replace(/\.[^.]+$/, "")), isShadow: !0, width: "60%", height: "auto" });
+ }, o.readAsDataURL(r);
+ } else
+ i("images/demo-dog.png");
+}, afterChange: function(r, i) {
+}, afterInit: function(r, i) {
+}, beforeImageMounted: function(r, i) {
+ return { srcProp: r, src: i };
+}, onClickPreview: function(r) {
+}, onCopyCode: function(r, i) {
+ return i;
+}, changeString2Pinyin: function(r) {
+ return r;
+} }, mwn = BTt({ externals: {}, openai: { apiKey: "", ignoreError: !1 }, engine: { global: { classicBr: !1, urlProcessor: iO.urlProcessor, htmlWhiteList: "" }, syntax: { link: { target: "", rel: "" }, autoLink: { target: "", rel: "", enableShortLink: !0, shortLinkLength: 20 }, list: { listNested: !1, indentSpace: 2 }, table: { enableChart: !1 }, inlineCode: { theme: "red" }, codeBlock: { theme: "dark", wrap: !0, lineNumber: !0, copyCode: !0, editCode: !0, changeLang: !0, customRenderer: {}, mermaid: { svg2img: !1 }, indentedCodeBlock: !0 }, emoji: { useUnicode: !0 }, fontEmphasis: { allowWhitespace: !1 }, strikethrough: { needWhitespace: !1 }, mathBlock: { engine: "MathJax", src: "", plugins: !0 }, inlineMath: { engine: "MathJax", src: "" }, toc: { allowMultiToc: !1 }, header: { anchorStyle: "default" } } }, editor: { id: "code", name: "code", autoSave2Textarea: !1, theme: "default", height: "100%", defaultModel: "edit&preview", convertWhenPaste: !0, codemirror: { autofocus: !0 }, writingStyle: "normal", keepDocumentScrollAfterInit: !1 }, toolbars: { theme: "dark", showToolbar: !0, toolbar: ["bold", "italic", "strikethrough", "|", "color", "header", "ruby", "|", "list", "panel", "detail", { insert: ["image", "audio", "video", "link", "hr", "br", "code", "formula", "toc", "table", "line-table", "bar-table", "pdf", "word"] }, "graph", "settings"], toolbarRight: [], sidebar: [], bubble: ["bold", "italic", "underline", "strikethrough", "sub", "sup", "quote", "|", "size", "color"], float: ["h1", "h2", "h3", "|", "checklist", "quote", "table", "code"], toc: !1, shortcutKey: {}, config: { formula: { showLatexLive: !0, templateConfig: !1 } } }, drawioIframeUrl: "", fileUpload: iO.fileUpload, fileTypeLimitMap: { video: "video/*", audio: "audio/*", image: "image/*", word: ".doc,.docx", pdf: ".pdf", file: "*" }, callback: { afterChange: iO.afterChange, afterInit: iO.afterInit, beforeImageMounted: iO.beforeImageMounted, onClickPreview: iO.onClickPreview, onCopyCode: iO.onCopyCode, changeString2Pinyin: iO.changeString2Pinyin }, previewer: { dom: !1, className: "cherry-markdown", enablePreviewerBubble: !0, lazyLoadImg: { loadingImgPath: "", maxNumPerTime: 2, noLoadImgNum: 5, autoLoadImgNum: 5, maxTryTimesPerSrc: 2, beforeLoadOneImgCallback: function(r) {
+ return !0;
+}, failLoadOneImgCallback: function(r) {
+}, afterLoadOneImgCallback: function(r) {
+}, afterLoadAllImgCallback: function() {
+} } }, theme: [{ className: "default", label: "默认" }, { className: "dark", label: "暗黑" }, { className: "light", label: "明亮" }, { className: "green", label: "清新" }, { className: "red", label: "热情" }, { className: "violet", label: "淡雅" }, { className: "blue", label: "清幽" }], isPreviewOnly: !1, autoScrollByCursor: !0, forceAppend: !0, locale: "zh_CN", autoScrollByHashAfterInit: !1 }), bwn = { zh_CN: { bold: "加粗", code: "代码", graph: "画图", h1: "一级标题", h2: "二级标题", h3: "三级标题", h4: "四级标题", h5: "五级标题", header: "标题", insert: "插入", italic: "斜体", list: "列表", quickTable: "表格", quote: "引用", size: "大小", color: "文字颜色&背景", strikethrough: "删除线", sub: "下标", sup: "上标", togglePreview: "预览", fullScreen: "全屏", image: "图片", audio: "音频", video: "视频", link: "超链接", hr: "分隔线", br: "换行", toc: "目录", pdf: "pdf", word: "word", table: "表格", "line-table": "折线表格", "bar-table": "柱状表格", formula: "公式", insertFormula: "公式", insertFlow: "流程图", insertSeq: "时序图", insertState: "状态图", insertClass: "类图", insertPie: "饼图", insertGantt: "甘特图", checklist: "清单", ol: "有序列表", ul: "无序列表", undo: "撤销", redo: "恢复", previewClose: "关闭预览", codeTheme: "代码主题", switchModel: "模式切换", switchPreview: "预览", switchEdit: "返回编辑", classicBr: "经典换行", normalBr: "常规换行", settings: "设置", mobilePreview: "移动端预览", copy: "复制内容", export: "导出", underline: "下划线", pinyin: "拼音", file: "文件", pastePlain: "粘贴为纯文本格式", pasteMarkdown: "粘贴为markdown格式", hide: "隐藏(ctrl+0)", exportToPdf: "导出PDF", exportScreenshot: "导出长图", exportMarkdownFile: "导出markdown", exportHTMLFile: "导出html", theme: "主题", panel: "面板", detail: "手风琴", "H1 Heading": "H1 一级标题", "H2 Heading": "H2 二级标题", "H3 Heading": "H3 三级标题", complement: "续写", summary: "总结", justify: "对齐方式", justifyLeft: "左对齐", justifyCenter: "居中", justifyRight: "右对齐", wordCount: "字数" }, en_US: { bold: "Bold", code: "Code", graph: "Graph", h1: "Heading 1", h2: "Heading 2", h3: "Heading 3", h4: "Heading 4", h5: "Heading 5", header: "Header", insert: "Insert", italic: "Italic", list: "List", quickTable: "Quick Table", quote: "Quote", size: "Size", color: "Text Color & Background", strikethrough: "Strikethrough", sub: "Sub", sup: "Sup", togglePreview: "Toggle Preview", fullScreen: "Full Screen", image: "Image", audio: "Audio", video: "Video", link: "Link", hr: "Horizontal Rule", br: "New Line", toc: "Table Of Content", pdf: "PDF", word: "Word", table: "Table", "line-table": "Line Table", "bar-table": "Bar Table", formula: "Formula", insertFormula: "Insert Formula", insertFlow: "Insert Flow", insertSeq: "Insert Seq", insertState: "Insert State", insertClass: "Insert Class", insertPie: "Insert Pie", insertGantt: "Insert Gantt", checklist: "Checklist", ol: "Ordered List", ul: "Unordered List", undo: "Undo", redo: "Redo", previewClose: "Preview Close", codeTheme: "Code Theme", switchModel: "Switch Model", switchPreview: "Switch Preview", switchEdit: "Switch Edit", classicBr: "Classic New Line", normalBr: "Normal New Line", settings: "Settings", mobilePreview: "Mobile Preview", copy: "Copy", export: "Export", underline: "Underline", pinyin: "Pinyin", pastePlain: "Paste as Plain Text", pasteMarkdown: "Paste as Markdown", hide: "Hide (ctrl+0)", exportToPdf: "Export to PDF", exportScreenshot: "Screenshot", exportMarkdownFile: "Export Markdown File", exportHTMLFile: "Export preview HTML File", "H1 Heading": "H1 Heading", "H2 Heading": "H1 Heading", "H3 Heading": "H1 Heading", complement: "Complement", summary: "Summary", justify: "justify", justifyLeft: "Left", justifyCenter: "Center", justifyRight: "Right", wordCount: "Word Count" } };
+function Z6t(r) {
+ var i = function() {
+ if (typeof Reflect > "u" || !yt || yt.sham)
+ return !1;
+ if (typeof Proxy == "function")
+ return !0;
+ try {
+ return Boolean.prototype.valueOf.call(yt(Boolean, [], function() {
+ })), !0;
+ } catch {
+ return !1;
+ }
+ }();
+ return function() {
+ var o, l = Rn(r);
+ if (i) {
+ var f = Rn(this).constructor;
+ o = yt(l, arguments, f);
+ } else
+ o = l.apply(this, arguments);
+ return Ea(this, o);
+ };
+}
+function ekt(r, i, o) {
+ var l, f = {};
+ return no(l = yh(r)).call(l, function(g) {
+ Lu(i).call(i, g) !== -1 && (Yl(o) === "object" ? typeof o[g] == "string" ? Yl(r[g]) === o[g] && (f[g] = r[g]) : r[g] instanceof o[g] && (f[g] = r[g]) : typeof o == "string" && Yl(r[g]) === o && (f[g] = r[g]));
+ }), f;
+}
+var vwn = { HOOKS_TYPE_LIST: QG }, tkt = [];
+vk() || no(tkt).call(tkt, function(r) {
+});
+var nre = function() {
+ function r() {
+ vi(this, r);
+ }
+ return yi(r, null, [{ key: "usePlugin", value: function(i) {
+ var o;
+ if (this === r)
+ throw new Error("`usePlugin` is not allowed to called through CherryStatic class.");
+ if (this.initialized)
+ throw new Error("The function `usePlugin` should be called before Cherry is instantiated.");
+ if (i.$cherry$mounted !== !0) {
+ for (var l = arguments.length, f = new Array(l > 1 ? l - 1 : 0), g = 1; g < l; g++)
+ f[g - 1] = arguments[g];
+ i.install.apply(i, At(o = [this.config.defaults]).call(o, f)), i.$cherry$mounted = !0;
+ }
+ } }]), r;
+}();
+function nkt(r, i) {
+ var o = yh(r);
+ if (rA) {
+ var l = rA(r);
+ i && (l = dd(l).call(l, function(f) {
+ return o0(r, f).enumerable;
+ })), o.push.apply(o, l);
+ }
+ return o;
+}
+function ywn(r) {
+ var i = function() {
+ if (typeof Reflect > "u" || !yt || yt.sham)
+ return !1;
+ if (typeof Proxy == "function")
+ return !0;
+ try {
+ return Boolean.prototype.valueOf.call(yt(Boolean, [], function() {
+ })), !0;
+ } catch {
+ return !1;
+ }
+ }();
+ return function() {
+ var o, l = Rn(r);
+ if (i) {
+ var f = Rn(this).constructor;
+ o = yt(l, arguments, f);
+ } else
+ o = l.apply(this, arguments);
+ return Ea(this, o);
+ };
+}
+Ui(nre, "createSyntaxHook", function(r, i, o) {
+ var l, f = i === QG.PAR ? r0 : Sg, g = ekt(o, ["beforeMakeHtml", "makeHtml", "afterMakeHtml", "rule", "test"], "function"), A = { needCache: o.needCache, defaultCache: o.defaultCache };
+ return l = function(b) {
+ ja(k, b);
+ var v = Z6t(k);
+ function k() {
+ var _, T = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
+ return vi(this, k), (_ = i === QG.PAR ? v.call(this, { needCache: !!A.needCache, defaultCache: A.defaultCache }) : v.call(this)).config = T.config, Ea(_);
+ }
+ return yi(k, [{ key: "beforeMakeHtml", value: function() {
+ for (var _, T, L = arguments.length, F = new Array(L), U = 0; U < L; U++)
+ F[U] = arguments[U];
+ return g.beforeMakeHtml ? g.beforeMakeHtml.apply(this, F) : (_ = wT(Rn(k.prototype), "beforeMakeHtml", this)).call.apply(_, At(T = [this]).call(T, F));
+ } }, { key: "makeHtml", value: function() {
+ for (var _, T, L = arguments.length, F = new Array(L), U = 0; U < L; U++)
+ F[U] = arguments[U];
+ return g.makeHtml ? g.makeHtml.apply(this, F) : (_ = wT(Rn(k.prototype), "makeHtml", this)).call.apply(_, At(T = [this]).call(T, F));
+ } }, { key: "afterMakeHtml", value: function() {
+ for (var _, T, L = arguments.length, F = new Array(L), U = 0; U < L; U++)
+ F[U] = arguments[U];
+ return g.afterMakeHtml ? g.afterMakeHtml.apply(this, F) : (_ = wT(Rn(k.prototype), "afterMakeHtml", this)).call.apply(_, At(T = [this]).call(T, F));
+ } }, { key: "test", value: function() {
+ for (var _, T, L = arguments.length, F = new Array(L), U = 0; U < L; U++)
+ F[U] = arguments[U];
+ return g.test ? g.test.apply(this, F) : (_ = wT(Rn(k.prototype), "test", this)).call.apply(_, At(T = [this]).call(T, F));
+ } }, { key: "rule", value: function() {
+ for (var _, T, L = arguments.length, F = new Array(L), U = 0; U < L; U++)
+ F[U] = arguments[U];
+ return g.rule ? g.rule.apply(this, F) : (_ = wT(Rn(k.prototype), "rule", this)).call.apply(_, At(T = [this]).call(T, F));
+ } }]), k;
+ }(f), Ui(l, "HOOK_NAME", r), l;
+}), Ui(nre, "createMenuHook", function(r, i) {
+ var o = ekt(i, ["subMenuConfig", "onClick", "shortcutKeys", "iconName"], { subMenuConfig: Array, onClick: "function", shortcutKeys: Array, iconName: "string" });
+ return function(l) {
+ ja(g, xc);
+ var f = Z6t(g);
+ function g(A) {
+ var b;
+ return vi(this, g), b = f.call(this, A), o.iconName || (b.noIcon = !0), b.setName(r, o.iconName), b.subMenuConfig = o.subMenuConfig || [], b;
+ }
+ return yi(g, [{ key: "onClick", value: function() {
+ for (var A, b, v = arguments.length, k = new Array(v), _ = 0; _ < v; _++)
+ k[_] = arguments[_];
+ return o.onClick ? o.onClick.apply(this, k) : (A = wT(Rn(g.prototype), "onClick", this)).call.apply(A, At(b = [this]).call(b, k));
+ } }, { key: "shortcutKeys", get: function() {
+ return o.shortcutKeys ? o.shortcutKeys : [];
+ } }]), g;
+ }();
+}), Ui(nre, "constants", vwn), Ui(nre, "VERSION", "0.8.34");
+var Npe = function(r) {
+ ja(o, nre);
+ var i = ywn(o);
+ function o(l) {
+ var f, g;
+ vi(this, o), g = i.call(this), o.initialized = !0;
+ var A, b = BTt(o.config.defaults);
+ return g.defaultToolbar = b.toolbars.toolbar, KQ(l, Object), g.options = KPe({}, b, l, j0n), g.locale = bwn[g.options.locale], typeof g.options.engine.global.urlProcessor == "function" && (g.options.engine.global.urlProcessor = (A = g.options.engine.global.urlProcessor, function(v, k) {
+ if (mL.isInnerLink(v)) {
+ var _ = A(mL.get(v), k);
+ return mL.replace(v, _);
+ }
+ return A(v, k);
+ })), g.status = { toolbar: "show", previewer: "show", editor: "show" }, (g.options.isPreviewOnly || g.options.editor.defaultModel === "previewOnly") && (g.options.toolbars.showToolbar = !1, g.options.editor.defaultModel = "previewOnly", g.status.editor = "hide", g.status.toolbar = "hide"), g.instanceId = At(f = "cherry-".concat((/* @__PURE__ */ new Date()).getTime())).call(f, Math.random()), g.options.instanceId = g.instanceId, g.engine = new Ppn(g.options, Xs(g)), g.init(), g;
+ }
+ return yi(o, [{ key: "init", value: function() {
+ var l, f = this, g = this.options.id ? document.getElementById(this.options.id) : this.options.el;
+ if (!g) {
+ if (!this.options.forceAppend)
+ return !1;
+ (g = document.createElement("div")).id = this.options.id || "cherry-markdown", document.body.appendChild(g);
+ }
+ g.style.height || (g.style.height = this.options.editor.height), this.cherryDom = g;
+ var A = this.createWrapper(), b = this.createEditor(), v = this.createPreviewer();
+ this.options.toolbars.showToolbar !== !1 && this.options.toolbars.toolbar !== !1 || (A.classList.add("cherry--no-toolbar"), this.options.toolbars.toolbar = this.defaultToolbar), KQ(this.options.toolbars.toolbar, Array), this.createToolbar(), this.createToolbarRight();
+ var k, _ = document.createDocumentFragment();
+ _.appendChild(this.toolbar.options.dom), _.appendChild(b.options.editorDom), this.createSidebar(_), this.options.previewer.dom || _.appendChild(v.options.previewerDom), _.appendChild(v.options.virtualDragLineDom), _.appendChild(v.options.editorMaskDom), _.appendChild(v.options.previewerMaskDom), A.appendChild(_), g.appendChild(A), b.init(v), this.createBubble(), this.createFloatMenu(), v.init(b), v.registerAfterUpdate(Bo(l = this.engine.mounted).call(l, this.engine)), this.initText(b.editor), kc.on(this.instanceId, kc.Events.toolbarHide, function() {
+ f.status.toolbar = "hide";
+ }), kc.on(this.instanceId, kc.Events.toolbarShow, function() {
+ f.status.toolbar = "show";
+ }), kc.on(this.instanceId, kc.Events.previewerClose, function() {
+ f.status.previewer = "hide";
+ }), kc.on(this.instanceId, kc.Events.previewerOpen, function() {
+ f.status.previewer = "show";
+ }), kc.on(this.instanceId, kc.Events.editorClose, function() {
+ f.status.editor = "hide", f.previewer.highlightLine(0);
+ }), kc.on(this.instanceId, kc.Events.editorOpen, function() {
+ f.status.editor = "show";
+ }), this.switchModel(this.options.editor.defaultModel), this.options.autoScrollByHashAfterInit && lm(Bo(k = this.scrollByHash).call(k, this)), this.editText(null, this.editor.editor), this.options.toolbars.toc !== !1 && this.createToc();
+ } }, { key: "createToc", value: function() {
+ var l, f;
+ this.toc = new Pyn({ $cherry: this, updateLocationHash: (l = this.options.toolbars.toc.updateLocationHash) === null || l === void 0 || l, defaultModel: (f = this.options.toolbars.toc.defaultModel) !== null && f !== void 0 ? f : "pure" });
+ } }, { key: "scrollByHash", value: function() {
+ if (location.hash)
+ try {
+ var l = location.hash, f = document.getElementById(l.replace("#", ""));
+ f && this.previewer.getDomContainer().contains(f) && (location.hash = "", location.hash = l);
+ } catch {
+ }
+ } }, { key: "switchModel", value: function() {
+ switch (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "edit&preview") {
+ case "edit&preview":
+ this.previewer && (this.previewer.editOnly(!0), this.previewer.recoverPreviewer()), this.toolbar && this.toolbar.showToolbar(), this.wrapperDom.classList.remove("cherry--no-toolbar");
+ break;
+ case "editOnly":
+ this.previewer.isPreviewerHidden() || this.previewer.editOnly(!0), this.toolbar && this.toolbar.showToolbar(), this.wrapperDom.classList.remove("cherry--no-toolbar");
+ break;
+ case "previewOnly":
+ this.previewer.previewOnly(), this.toolbar && this.toolbar.previewOnly(), this.wrapperDom.classList.add("cherry--no-toolbar");
+ }
+ } }, { key: "getInstanceId", value: function() {
+ return this.instanceId;
+ } }, { key: "getStatus", value: function() {
+ return this.status;
+ } }, { key: "getValue", value: function() {
+ return this.editor.editor.getValue();
+ } }, { key: "getMarkdown", value: function() {
+ return this.getValue();
+ } }, { key: "getCodeMirror", value: function() {
+ return this.editor.editor;
+ } }, { key: "getHtml", value: function() {
+ var l = !(arguments.length > 0 && arguments[0] !== void 0) || arguments[0];
+ return this.previewer.getValue(l);
+ } }, { key: "getPreviewer", value: function() {
+ return this.previewer;
+ } }, { key: "getToc", value: function() {
+ var l = this.getHtml(), f = [];
+ return l.replace(/(.+?)<\/h[0-6]>/g, function(g, A, b, v) {
+ return f.push({ level: +A, id: b, text: v.replace(//, "") }), g;
+ }), f;
+ } }, { key: "setValue", value: function(l) {
+ var f = arguments.length > 1 && arguments[1] !== void 0 && arguments[1];
+ if (this.editor.storeDocumentScroll(), f === !1)
+ return this.editor.editor.setValue(l);
+ var g = this.editor.editor, A = this.getValue(), b = function(k, _, T) {
+ for (var L = zge(_, T), F = k, U = k, q = 0; q < L.length; q++) {
+ var Z = L[q];
+ if (U <= 0)
+ return F;
+ var R = Z[0], J = Z[1].length;
+ switch (R) {
+ case zge.EQUAL:
+ if (U <= J)
+ return F;
+ U -= J;
+ break;
+ case zge.DELETE:
+ if (U <= J)
+ return F - J + U;
+ U -= J, F -= J;
+ break;
+ case zge.INSERT:
+ F += J;
+ }
+ }
+ return F;
+ }(g.getDoc().indexFromPos(g.getCursor()), A, l);
+ g.setValue(l);
+ var v = g.getDoc().posFromIndex(b);
+ g.setCursor(v);
+ } }, { key: "insert", value: function(l) {
+ var f = arguments.length > 1 && arguments[1] !== void 0 && arguments[1], g = arguments.length > 2 && arguments[2] !== void 0 && arguments[2], A = !(arguments.length > 3 && arguments[3] !== void 0) || arguments[3];
+ g && this.editor.editor.setSelection({ line: g[0], ch: g[1] }, { line: g[0], ch: g[1] }), this.editor.editor.replaceSelection(l, f ? "around" : "end"), A && this.editor.editor.focus();
+ } }, { key: "insertValue", value: function(l) {
+ var f = arguments.length > 1 && arguments[1] !== void 0 && arguments[1], g = arguments.length > 2 && arguments[2] !== void 0 && arguments[2], A = !(arguments.length > 3 && arguments[3] !== void 0) || arguments[3];
+ return this.insert(l, f, g, A);
+ } }, { key: "refreshPreviewer", value: function() {
+ try {
+ var l = this.getValue(), f = this.engine.makeHtml(l);
+ this.previewer.refresh(f);
+ } catch (g) {
+ throw new Bpe(g);
+ }
+ } }, { key: "setMarkdown", value: function(l) {
+ var f = arguments.length > 1 && arguments[1] !== void 0 && arguments[1];
+ return this.setValue(l, f);
+ } }, { key: "createWrapper", value: function() {
+ var l = this.options.toolbars.theme === "dark" ? "dark" : "", f = this.options.engine.syntax.inlineCode.theme, g = this.options.engine.syntax.codeBlock.theme;
+ g === "dark" ? g = "tomorrow-night" : g === "light" && (g = "solarized-light");
+ var A = ih("div", ["cherry", "clearfix", BDe(!0)].join(" "), { "data-toolbarTheme": l, "data-inlineCodeTheme": f, "data-codeBlockTheme": g });
+ return this.wrapperDom = A, A;
+ } }, { key: "createToolbar", value: function() {
+ var l = ih("div", "cherry-toolbar");
+ return this.toolbarContainer = l, this.toolbar = new Pie({ dom: l, $cherry: this, buttonConfig: this.options.toolbars.toolbar, customMenu: this.options.toolbars.customMenu, shortcutKey: this.options.toolbars.shortcutKey }), this.toolbar;
+ } }, { key: "createToolbarRight", value: function() {
+ return this.toolbarRight = new Nyn({ dom: this.toolbarContainer, $cherry: this, buttonConfig: this.options.toolbars.toolbarRight, customMenu: this.options.toolbars.customMenu }), this.toolbar.collectMenuInfo(this.toolbarRight), this.toolbarRight;
+ } }, { key: "createSidebar", value: function(l) {
+ if (this.options.toolbars.sidebar) {
+ KQ(this.options.toolbars.sidebar, Array);
+ var f = this.options.toolbars.theme === "dark" ? "dark" : "", g = ih("div", "cherry-sidebar ".concat(f));
+ this.sidebar = new Qyn({ dom: g, $cherry: this, buttonConfig: this.options.toolbars.sidebar, customMenu: this.options.toolbars.customMenu }), this.toolbar.collectMenuInfo(this.sidebar), l.appendChild(this.sidebar.options.dom);
+ }
+ } }, { key: "createFloatMenu", value: function() {
+ if (this.options.toolbars.float) {
+ var l = ih("div", "cherry-floatmenu");
+ KQ(this.options.toolbars.float, Array), this.floatMenu = new Oyn({ dom: l, $cherry: this, buttonConfig: this.options.toolbars.float, customMenu: this.options.toolbars.customMenu }), this.toolbar.collectMenuInfo(this.floatMenu);
+ }
+ } }, { key: "createBubble", value: function() {
+ if (this.options.toolbars.bubble) {
+ var l = ih("div", "cherry-bubble");
+ KQ(this.options.toolbars.bubble, Array), this.bubble = new gTt({ dom: l, $cherry: this, buttonConfig: this.options.toolbars.bubble, customMenu: this.options.toolbars.customMenu, engine: this.engine }), this.toolbar.collectMenuInfo(this.bubble);
+ }
+ } }, { key: "createEditor", value: function() {
+ var l, f, g, A, b = ih("textarea", "", { id: (l = this.options.editor.id) !== null && l !== void 0 ? l : "code", name: (f = this.options.editor.name) !== null && f !== void 0 ? f : "code" });
+ b.textContent = this.options.value;
+ var v = ih("div", "cherry-editor");
+ return v.appendChild(b), this.editor = new M0n(function(k) {
+ for (var _ = 1; _ < arguments.length; _++) {
+ var T, L, F = arguments[_] != null ? arguments[_] : {};
+ _ % 2 ? no(T = nkt(Object(F), !0)).call(T, function(U) {
+ Ui(k, U, F[U]);
+ }) : i0 ? uC(k, i0(F)) : no(L = nkt(Object(F))).call(L, function(U) {
+ C3(k, U, o0(F, U));
+ });
+ }
+ return k;
+ }({ $cherry: this, editorDom: v, wrapperDom: this.wrapperDom, value: this.options.value, onKeydown: Bo(g = this.fireShortcutKey).call(g, this), onChange: Bo(A = this.editText).call(A, this), toolbars: this.options.toolbars, fileUpload: this.options.fileUpload, autoScrollByCursor: this.options.autoScrollByCursor }, this.options.editor)), this.editor;
+ } }, { key: "createPreviewer", value: function() {
+ var l, f = (this.options.engine.syntax.header && this.options.engine.syntax.header.anchorStyle || "default") === "autonumber" ? " head-num" : "", g = this.options.previewer, A = g.className, b = g.dom, v = g.enablePreviewerBubble, k = ["cherry-previewer cherry-markdown", A || "", f, BDe(!0)].join(" ");
+ b ? (l = b).className += " ".concat(k) : l = ih("div", k);
+ var _ = ih("div", "cherry-drag"), T = ih("div", "cherry-editor-mask"), L = ih("div", "cherry-previewer-mask");
+ return this.previewer = new x2n({ $cherry: this, virtualDragLineDom: _, editorMaskDom: T, previewerMaskDom: L, previewerDom: l, value: this.options.value, isPreviewOnly: this.options.isPreviewOnly, enablePreviewerBubble: v, lazyLoadImg: this.options.previewer.lazyLoadImg }), this.previewer;
+ } }, { key: "initText", value: function(l) {
+ try {
+ var f = l.getValue(), g = this.engine.makeHtml(f);
+ this.previewer.update(g), this.options.callback.afterInit && this.options.callback.afterInit(f, g);
+ } catch (A) {
+ throw new Bpe(A);
+ }
+ } }, { key: "editText", value: function(l, f) {
+ var g = this;
+ try {
+ this.timer && (clearTimeout(this.timer), this.timer = null), this.timer = lm(function() {
+ var A = f.getValue(), b = g.engine.makeHtml(A);
+ g.previewer.update(b), g.options.callback.afterChange && g.options.callback.afterChange(A, b), f.scrollIntoView(null), g.editor.restoreDocumentScroll();
+ }, 50);
+ } catch (A) {
+ throw new Bpe(A);
+ }
+ } }, { key: "onChange", value: function(l) {
+ this.editor.editor.on("change", function(f) {
+ l({ markdown: f.getValue() });
+ });
+ } }, { key: "fireShortcutKey", value: function(l) {
+ var f = this.editor.editor.getCursor(), g = this.editor.editor.getLine(f.line);
+ if (!l.shiftKey && l.key === "Tab" && T_t.test(g) && (f.ch === 0 || f.ch === g.length || f.ch === g.length + 1)) {
+ l.preventDefault(), this.editor.editor.setSelection({ line: f.line, ch: 0 }, { line: f.line, ch: g.length }), this.editor.editor.replaceSelection(" ".concat(g), "around");
+ var A = this.editor.editor.getCursor();
+ this.editor.editor.setSelection(A, A);
+ }
+ this.toolbar.matchShortcutKey(l) && (l.preventDefault(), this.toolbar.fireShortcutKey(l));
+ } }, { key: "export", value: function() {
+ var l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "pdf", f = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
+ this.previewer.export(l, f);
+ } }, { key: "setTheme", value: function() {
+ S_t(this, arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "default");
+ } }, { key: "setWritingStyle", value: function(l) {
+ this.editor.setWritingStyle(l);
+ } }]), o;
+}();
+Ui(Npe, "initialized", !1), Ui(Npe, "config", { defaults: mwn }), window && (window.Cherry = Npe);
+var AO = Npe;
+function rkt(r, i) {
+ var o = yh(r);
+ if (rA) {
+ var l = rA(r);
+ i && (l = dd(l).call(l, function(f) {
+ return o0(r, f).enumerable;
+ })), o.push.apply(o, l);
+ }
+ return o;
+}
+function ikt(r) {
+ for (var i = 1; i < arguments.length; i++) {
+ var o, l, f = arguments[i] != null ? arguments[i] : {};
+ i % 2 ? no(o = rkt(Object(f), !0)).call(o, function(g) {
+ Ui(r, g, f[g]);
+ }) : i0 ? uC(r, i0(f)) : no(l = rkt(Object(f))).call(l, function(g) {
+ C3(r, g, o0(f, g));
+ });
+ }
+ return r;
+}
+var akt = { theme: "default", altFontFamily: "sans-serif", fontFamily: "sans-serif", themeCSS: ".label foreignObject { font-size: 90%; overflow: visible; } .label { font-family: sans-serif; }", flowchart: { useMaxWidth: !1 }, sequence: { useMaxWidth: !1 }, startOnLoad: !1, logLevel: 5 }, STt = function() {
+ function r() {
+ var i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
+ vi(this, r), Ui(this, "mermaidAPIRefs", null), Ui(this, "options", akt), Ui(this, "dom", null), Ui(this, "mermaidCanvas", null);
+ var o = i.mermaid, l = i.mermaidAPI;
+ if (!(l || window.mermaidAPI || o && o.mermaidAPI || window.mermaid && window.mermaid.mermaidAPI))
+ throw new Error("code-block-mermaid-plugin[init]: Package mermaid or mermaidAPI not found.");
+ this.options = ikt(ikt({}, akt), i || {}), this.mermaidAPIRefs = l || window.mermaidAPI || o.mermaidAPI || window.mermaid.mermaidAPI, delete this.options.mermaid, delete this.options.mermaidAPI, this.mermaidAPIRefs.initialize(this.options);
+ }
+ return yi(r, [{ key: "mountMermaidCanvas", value: function(i) {
+ this.mermaidCanvas && document.body.contains(this.mermaidCanvas) || (this.mermaidCanvas = document.createElement("div"), this.mermaidCanvas.style = "width:1024px;opacity:0;position:fixed;top:100%;", (i.$cherry.wrapperDom || document.body).appendChild(this.mermaidCanvas));
+ } }, { key: "convertMermaidSvgToImg", value: function(i, o) {
+ var l, f = new DOMParser(), g = function(L) {
+ return L.replace("');
+ }
+ } else
+ l = g(i);
+ } catch {
+ l = g(i);
+ }
+ return l;
+ } }, { key: "render", value: function(i, o, l) {
+ var f, g, A, b = this, v = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, k = o;
+ k || (k = Math.round(1e8 * Math.random())), this.mountMermaidCanvas(l);
+ var _ = At(f = "mermaid-".concat(k, "-")).call(f, (/* @__PURE__ */ new Date()).getTime());
+ this.svg2img = (g = v == null ? void 0 : v.svg2img) !== null && g !== void 0 && g;
+ try {
+ this.mermaidAPIRefs.render(_, i, function(T) {
+ var L = T.replace(/\s*markerUnits="0"/g, "").replace(/\s*x="NaN"/g, "").replace(/
/g, "
");
+ A = b.convertMermaidSvgToImg(L, _);
+ }, this.mermaidCanvas);
+ } catch (T) {
+ return T == null ? void 0 : T.str;
+ }
+ return A;
+ } }], [{ key: "install", value: function(i) {
+ for (var o = arguments.length, l = new Array(o > 1 ? o - 1 : 0), f = 1; f < o; f++)
+ l[f - 1] = arguments[f];
+ KPe(i, { engine: { syntax: { codeBlock: { customRenderer: { mermaid: Pme(r, l) } } } } });
+ } }]), r;
+}();
+Ui(STt, "TYPE", "figure");
+var wwn = function() {
+ var r, i, o, l, f, g, A, b, v, k, _, T, L, F, U, q, Z, R, J, he, Y, ue, le, be, ke, de, Te, xe, ie, Be, te, Me, ve, ge, Je, ot, bt, gt, je, Qe, kt, Wt, jt, Zn, Ft, wn, un, ln, an, Ot, $n, pt, Ci, ut, br, zt = 32768, Wr = 0, zr = 1, Si = 2, vr = 8192, Qr = 2 * zt, or = 3, Gr = 258, An = 8192, _i = An, Cr = 8192, la = Cr - 1, Ra = zt - 1, Jo = 0, Cc = 4096, ji = Gr + or + 1, Ya = zt - ji, Hr = 1, Yr = 15, ni = 7, Vr = 29, Na = 256, er = 256, as = Na + 1 + Vr, xr = 30, So = 19, cs = 16, xa = 17, ro = 18, Lo = 2 * as + 1, Xo = Ky((13 + or - 1) / or), Zo = null;
+ function Fs() {
+ this.fc = 0, this.dl = 0;
+ }
+ function Hs() {
+ this.dyn_tree = null, this.static_tree = null, this.extra_bits = null, this.extra_base = 0, this.elems = 0, this.max_length = 0, this.max_code = 0;
+ }
+ function Qa(tr, ei, fi, ri) {
+ this.good_length = tr, this.max_lazy = ei, this.nice_length = fi, this.max_chain = ri;
+ }
+ function Ff() {
+ this.next = null, this.len = 0, this.ptr = new Array(vr), this.off = 0;
+ }
+ var Oc = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0], Iu = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13], da = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7], _c = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], qf = [new Qa(0, 0, 0, 0), new Qa(4, 4, 8, 4), new Qa(4, 5, 16, 8), new Qa(4, 6, 32, 32), new Qa(4, 4, 16, 16), new Qa(8, 16, 32, 32), new Qa(8, 16, 128, 128), new Qa(8, 32, 128, 256), new Qa(32, 128, 258, 1024), new Qa(32, 258, 258, 4096)];
+ function wu(tr) {
+ tr.next = r, r = tr;
+ }
+ function jo(tr) {
+ return _[zt + tr];
+ }
+ function yf(tr, ei) {
+ return _[zt + tr] = ei;
+ }
+ function bl(tr) {
+ Zo[g + f++] = tr, g + f == vr && function() {
+ if (f != 0) {
+ var ei, fi;
+ for (r != null ? (ri = r, r = r.next) : ri = new Ff(), ri.next = null, ri.len = ri.off = 0, ei = ri, i == null ? i = o = ei : o = o.next = ei, ei.len = f - g, fi = 0; fi < ei.len; fi++)
+ ei.ptr[fi] = Zo[g + fi];
+ f = g = 0;
+ }
+ var ri;
+ }();
+ }
+ function cu(tr) {
+ tr &= 65535, g + f < vr - 2 ? (Zo[g + f++] = 255 & tr, Zo[g + f++] = tr >>> 8) : (bl(255 & tr), bl(tr >>> 8));
+ }
+ function qc() {
+ U = (U << Xo ^ 255 & b[Y + or - 1]) & la, q = jo(U), _[Y & Ra] = q, yf(U, Y);
+ }
+ function Jl(tr, ei) {
+ Nc(ei[tr].fc, ei[tr].dl);
+ }
+ function js(tr) {
+ return 255 & (tr < 256 ? jt[tr] : jt[256 + (tr >> 7)]);
+ }
+ function Dc(tr, ei, fi) {
+ return tr[ei].fc < tr[fi].fc || tr[ei].fc == tr[fi].fc && kt[ei] <= kt[fi];
+ }
+ function gs(tr, ei, fi) {
+ var ri;
+ for (ri = 0; ri < fi && br < ut.length; ri++)
+ tr[ei + ri] = 255 & ut.charCodeAt(br++);
+ return ri;
+ }
+ function rc(tr) {
+ var ei, fi, ri = ke, Aa = Y, ya = he, fo = Y > Ya ? Y - Ya : Jo, bs = Y + Gr, xo = b[Aa + ya - 1], sl = b[Aa + ya];
+ he >= xe && (ri >>= 2);
+ do
+ if (b[(ei = tr) + ya] == sl && b[ei + ya - 1] == xo && b[ei] == b[Aa] && b[++ei] == b[Aa + 1]) {
+ Aa += 2, ei++;
+ do
+ ;
+ while (b[++Aa] == b[++ei] && b[++Aa] == b[++ei] && b[++Aa] == b[++ei] && b[++Aa] == b[++ei] && b[++Aa] == b[++ei] && b[++Aa] == b[++ei] && b[++Aa] == b[++ei] && b[++Aa] == b[++ei] && Aa < bs);
+ if (fi = Gr - (bs - Aa), Aa = bs - Gr, fi > ya) {
+ if (ue = tr, ya = fi, fi >= Gr)
+ break;
+ xo = b[Aa + ya - 1], sl = b[Aa + ya];
+ }
+ }
+ while ((tr = _[tr & Ra]) > fo && --ri != 0);
+ return ya;
+ }
+ function Ki() {
+ var tr, ei, fi = Qr - be - Y;
+ if (fi == -1)
+ fi--;
+ else if (Y >= zt + Ya) {
+ for (tr = 0; tr < zt; tr++)
+ b[tr] = b[tr + zt];
+ for (ue -= zt, Y -= zt, F -= zt, tr = 0; tr < Cr; tr++)
+ yf(tr, (ei = jo(tr)) >= zt ? ei - zt : Jo);
+ for (tr = 0; tr < zt; tr++)
+ ei = _[tr], _[tr] = ei >= zt ? ei - zt : Jo;
+ fi += zt;
+ }
+ le || ((tr = gs(b, Y + be, fi)) <= 0 ? le = !0 : be += tr);
+ }
+ function Ta() {
+ le || (T = 0, L = 0, function() {
+ var tr, ei, fi, ri, Aa;
+ if (Me[0].dl == 0) {
+ for (ge.dyn_tree = ie, ge.static_tree = te, ge.extra_bits = Oc, ge.extra_base = Na + 1, ge.elems = as, ge.max_length = Yr, ge.max_code = 0, Je.dyn_tree = Be, Je.static_tree = Me, Je.extra_bits = Iu, Je.extra_base = 0, Je.elems = xr, Je.max_length = Yr, Je.max_code = 0, ot.dyn_tree = ve, ot.static_tree = null, ot.extra_bits = da, ot.extra_base = 0, ot.elems = So, ot.max_length = ni, ot.max_code = 0, fi = 0, ri = 0; ri < Vr - 1; ri++)
+ for (Zn[ri] = fi, tr = 0; tr < 1 << Oc[ri]; tr++)
+ Wt[fi++] = ri;
+ for (Wt[fi - 1] = ri, Aa = 0, ri = 0; ri < 16; ri++)
+ for (Ft[ri] = Aa, tr = 0; tr < 1 << Iu[ri]; tr++)
+ jt[Aa++] = ri;
+ for (Aa >>= 7; ri < xr; ri++)
+ for (Ft[ri] = Aa << 7, tr = 0; tr < 1 << Iu[ri] - 7; tr++)
+ jt[256 + Aa++] = ri;
+ for (ei = 0; ei <= Yr; ei++)
+ bt[ei] = 0;
+ for (tr = 0; tr <= 143; )
+ te[tr++].dl = 8, bt[8]++;
+ for (; tr <= 255; )
+ te[tr++].dl = 9, bt[9]++;
+ for (; tr <= 279; )
+ te[tr++].dl = 7, bt[7]++;
+ for (; tr <= 287; )
+ te[tr++].dl = 8, bt[8]++;
+ for (ra(te, as + 1), tr = 0; tr < xr; tr++)
+ Me[tr].dl = 5, Me[tr].fc = Ro(tr, 5);
+ mc();
+ }
+ }(), function() {
+ var tr;
+ for (tr = 0; tr < Cr; tr++)
+ _[zt + tr] = 0;
+ if (de = qf[Te].max_lazy, xe = qf[Te].good_length, ke = qf[Te].max_chain, Y = 0, F = 0, (be = gs(b, 0, 2 * zt)) <= 0)
+ return le = !0, void (be = 0);
+ for (le = !1; be < ji && !le; )
+ Ki();
+ for (U = 0, tr = 0; tr < or - 1; tr++)
+ U = (U << Xo ^ 255 & b[tr]) & la;
+ }(), i = null, f = 0, g = 0, Te <= 3 ? (he = or - 1, J = 0) : (J = or - 1, R = 0), A = !1);
+ }
+ function Bl(tr, ei, fi) {
+ var ri;
+ return l || (Ta(), l = !0, be != 0) ? (ri = sf(tr, ei, fi)) == fi ? fi : A ? ri : (Te <= 3 ? function() {
+ for (; be != 0 && i == null; ) {
+ var Aa;
+ if (qc(), q != Jo && Y - q <= Ya && (J = rc(q)) > be && (J = be), J >= or)
+ if (Aa = hn(Y - ue, J - or), be -= J, J <= de) {
+ J--;
+ do
+ Y++, qc();
+ while (--J != 0);
+ Y++;
+ } else
+ Y += J, J = 0, U = ((U = 255 & b[Y]) << Xo ^ 255 & b[Y + 1]) & la;
+ else
+ Aa = hn(0, 255 & b[Y]), be--, Y++;
+ for (Aa && (Wo(0), F = Y); be < ji && !le; )
+ Ki();
+ }
+ }() : function() {
+ for (; be != 0 && i == null; ) {
+ if (qc(), he = J, Z = ue, J = or - 1, q != Jo && he < de && Y - q <= Ya && ((J = rc(q)) > be && (J = be), J == or && Y - ue > Cc && J--), he >= or && J <= he) {
+ var Aa;
+ Aa = hn(Y - 1 - Z, he - or), be -= he - 1, he -= 2;
+ do
+ Y++, qc();
+ while (--he != 0);
+ R = 0, J = or - 1, Y++, Aa && (Wo(0), F = Y);
+ } else
+ R != 0 ? (hn(0, 255 & b[Y - 1]) && (Wo(0), F = Y), Y++, be--) : (R = 1, Y++, be--);
+ for (; be < ji && !le; )
+ Ki();
+ }
+ }(), be == 0 && (R != 0 && hn(0, 255 & b[Y - 1]), Wo(1), A = !0), ri + sf(tr, ri + ei, fi - ri)) : (A = !0, 0);
+ }
+ function sf(tr, ei, fi) {
+ var ri, Aa, ya;
+ for (ri = 0; i != null && ri < fi; ) {
+ for ((Aa = fi - ri) > i.len && (Aa = i.len), ya = 0; ya < Aa; ya++)
+ tr[ei + ri + ya] = i.ptr[i.off + ya];
+ var fo;
+ i.off += Aa, i.len -= Aa, ri += Aa, i.len == 0 && (fo = i, i = i.next, wu(fo));
+ }
+ if (ri == fi)
+ return ri;
+ if (g < f) {
+ for ((Aa = fi - ri) > f - g && (Aa = f - g), ya = 0; ya < Aa; ya++)
+ tr[ei + ri + ya] = Zo[g + ya];
+ ri += Aa, f == (g += Aa) && (f = g = 0);
+ }
+ return ri;
+ }
+ function mc() {
+ var tr;
+ for (tr = 0; tr < as; tr++)
+ ie[tr].fc = 0;
+ for (tr = 0; tr < xr; tr++)
+ Be[tr].fc = 0;
+ for (tr = 0; tr < So; tr++)
+ ve[tr].fc = 0;
+ ie[er].fc = 1, pt = Ci = 0, un = ln = an = 0, Ot = 0, $n = 1;
+ }
+ function wh(tr, ei) {
+ for (var fi = gt[ei], ri = ei << 1; ri <= je && (ri < je && Dc(tr, gt[ri + 1], gt[ri]) && ri++, !Dc(tr, fi, gt[ri])); )
+ gt[ei] = gt[ri], ei = ri, ri <<= 1;
+ gt[ei] = fi;
+ }
+ function ra(tr, ei) {
+ var fi, ri, Aa = new Array(Yr + 1), ya = 0;
+ for (fi = 1; fi <= Yr; fi++)
+ ya = ya + bt[fi - 1] << 1, Aa[fi] = ya;
+ for (ri = 0; ri <= ei; ri++) {
+ var fo = tr[ri].dl;
+ fo != 0 && (tr[ri].fc = Ro(Aa[fo]++, fo));
+ }
+ }
+ function Ls(tr) {
+ var ei, fi, ri = tr.dyn_tree, Aa = tr.static_tree, ya = tr.elems, fo = -1, bs = ya;
+ for (je = 0, Qe = Lo, ei = 0; ei < ya; ei++)
+ ri[ei].fc != 0 ? (gt[++je] = fo = ei, kt[ei] = 0) : ri[ei].dl = 0;
+ for (; je < 2; ) {
+ var xo = gt[++je] = fo < 2 ? ++fo : 0;
+ ri[xo].fc = 1, kt[xo] = 0, pt--, Aa != null && (Ci -= Aa[xo].dl);
+ }
+ for (tr.max_code = fo, ei = je >> 1; ei >= 1; ei--)
+ wh(ri, ei);
+ do
+ ei = gt[Hr], gt[Hr] = gt[je--], wh(ri, Hr), fi = gt[Hr], gt[--Qe] = ei, gt[--Qe] = fi, ri[bs].fc = ri[ei].fc + ri[fi].fc, kt[ei] > kt[fi] + 1 ? kt[bs] = kt[ei] : kt[bs] = kt[fi] + 1, ri[ei].dl = ri[fi].dl = bs, gt[Hr] = bs++, wh(ri, Hr);
+ while (je >= 2);
+ gt[--Qe] = gt[Hr], function(sl) {
+ var Mu, Zl, V1, il, kf, eu, cl = sl.dyn_tree, Ps = sl.extra_bits, hb = sl.extra_base, Of = sl.max_code, Sl = sl.max_length, U0 = sl.static_tree, Yf = 0;
+ for (il = 0; il <= Yr; il++)
+ bt[il] = 0;
+ for (cl[gt[Qe]].dl = 0, Mu = Qe + 1; Mu < Lo; Mu++)
+ (il = cl[cl[Zl = gt[Mu]].dl].dl + 1) > Sl && (il = Sl, Yf++), cl[Zl].dl = il, Zl > Of || (bt[il]++, kf = 0, Zl >= hb && (kf = Ps[Zl - hb]), eu = cl[Zl].fc, pt += eu * (il + kf), U0 != null && (Ci += eu * (U0[Zl].dl + kf)));
+ if (Yf != 0) {
+ do {
+ for (il = Sl - 1; bt[il] == 0; )
+ il--;
+ bt[il]--, bt[il + 1] += 2, bt[Sl]--, Yf -= 2;
+ } while (Yf > 0);
+ for (il = Sl; il != 0; il--)
+ for (Zl = bt[il]; Zl != 0; )
+ (V1 = gt[--Mu]) > Of || (cl[V1].dl != il && (pt += (il - cl[V1].dl) * cl[V1].fc, cl[V1].fc = il), Zl--);
+ }
+ }(tr), ra(ri, fo);
+ }
+ function pr(tr, ei) {
+ var fi, ri, Aa = -1, ya = tr[0].dl, fo = 0, bs = 7, xo = 4;
+ for (ya == 0 && (bs = 138, xo = 3), tr[ei + 1].dl = 65535, fi = 0; fi <= ei; fi++)
+ ri = ya, ya = tr[fi + 1].dl, ++fo < bs && ri == ya || (fo < xo ? ve[ri].fc += fo : ri != 0 ? (ri != Aa && ve[ri].fc++, ve[cs].fc++) : fo <= 10 ? ve[xa].fc++ : ve[ro].fc++, fo = 0, Aa = ri, ya == 0 ? (bs = 138, xo = 3) : ri == ya ? (bs = 6, xo = 3) : (bs = 7, xo = 4));
+ }
+ function Pr(tr, ei) {
+ var fi, ri, Aa = -1, ya = tr[0].dl, fo = 0, bs = 7, xo = 4;
+ for (ya == 0 && (bs = 138, xo = 3), fi = 0; fi <= ei; fi++)
+ if (ri = ya, ya = tr[fi + 1].dl, !(++fo < bs && ri == ya)) {
+ if (fo < xo)
+ do
+ Jl(ri, ve);
+ while (--fo != 0);
+ else
+ ri != 0 ? (ri != Aa && (Jl(ri, ve), fo--), Jl(cs, ve), Nc(fo - 3, 2)) : fo <= 10 ? (Jl(xa, ve), Nc(fo - 3, 3)) : (Jl(ro, ve), Nc(fo - 11, 7));
+ fo = 0, Aa = ri, ya == 0 ? (bs = 138, xo = 3) : ri == ya ? (bs = 6, xo = 3) : (bs = 7, xo = 4);
+ }
+ }
+ function Wo(tr) {
+ var ei, fi, ri, Aa, ya;
+ if (Aa = Y - F, wn[an] = Ot, Ls(ge), Ls(Je), ri = function() {
+ var fo;
+ for (pr(ie, ge.max_code), pr(Be, Je.max_code), Ls(ot), fo = So - 1; fo >= 3 && ve[_c[fo]].dl == 0; fo--)
+ ;
+ return pt += 3 * (fo + 1) + 5 + 5 + 4, fo;
+ }(), (fi = Ci + 3 + 7 >> 3) <= (ei = pt + 3 + 7 >> 3) && (ei = fi), Aa + 4 <= ei && F >= 0)
+ for (Nc((Wr << 1) + tr, 3), T1(), cu(Aa), cu(~Aa), ya = 0; ya < Aa; ya++)
+ bl(b[F + ya]);
+ else
+ fi == ei ? (Nc((zr << 1) + tr, 3), wf(te, Me)) : (Nc((Si << 1) + tr, 3), function(fo, bs, xo) {
+ var sl;
+ for (Nc(fo - 257, 5), Nc(bs - 1, 5), Nc(xo - 4, 4), sl = 0; sl < xo; sl++)
+ Nc(ve[_c[sl]].dl, 3);
+ Pr(ie, fo - 1), Pr(Be, bs - 1);
+ }(ge.max_code + 1, Je.max_code + 1, ri + 1), wf(ie, Be));
+ mc(), tr != 0 && T1();
+ }
+ function hn(tr, ei) {
+ if (k[un++] = ei, tr == 0 ? ie[ei].fc++ : (tr--, ie[Wt[ei] + Na + 1].fc++, Be[js(tr)].fc++, v[ln++] = tr, Ot |= $n), $n <<= 1, !(7 & un) && (wn[an++] = Ot, Ot = 0, $n = 1), Te > 2 && (4095 & un) == 0) {
+ var fi, ri = 8 * un, Aa = Y - F;
+ for (fi = 0; fi < xr; fi++)
+ ri += Be[fi].fc * (5 + Iu[fi]);
+ if (ri >>= 3, ln < Ky(un / 2) && ri < Ky(Aa / 2))
+ return !0;
+ }
+ return un == An - 1 || ln == _i;
+ }
+ function wf(tr, ei) {
+ var fi, ri, Aa, ya, fo = 0, bs = 0, xo = 0, sl = 0;
+ if (un != 0)
+ do
+ !(7 & fo) && (sl = wn[xo++]), ri = 255 & k[fo++], 1 & sl ? (Jl((Aa = Wt[ri]) + Na + 1, tr), (ya = Oc[Aa]) != 0 && Nc(ri -= Zn[Aa], ya), Jl(Aa = js(fi = v[bs++]), ei), (ya = Iu[Aa]) != 0 && Nc(fi -= Ft[Aa], ya)) : Jl(ri, tr), sl >>= 1;
+ while (fo < un);
+ Jl(er, tr);
+ }
+ var Sn = 16;
+ function Nc(tr, ei) {
+ L > Sn - ei ? (cu(T |= tr << L), T = tr >> Sn - L, L += ei - Sn) : (T |= tr << L, L += ei);
+ }
+ function Ro(tr, ei) {
+ var fi = 0;
+ do
+ fi |= 1 & tr, tr >>= 1, fi <<= 1;
+ while (--ei > 0);
+ return fi >> 1;
+ }
+ function T1() {
+ L > 8 ? cu(T) : L > 0 && bl(T), T = 0, L = 0;
+ }
+ return function(tr, ei) {
+ var fi, ri;
+ ut = tr, br = 0, ei === void 0 && (ei = 6), function(bs) {
+ var xo;
+ if (bs ? bs < 1 ? bs = 1 : bs > 9 && (bs = 9) : bs = 6, Te = bs, l = !1, le = !1, Zo == null) {
+ for (r = i = o = null, Zo = new Array(vr), b = new Array(Qr), v = new Array(_i), k = new Array(32832), _ = new Array(65536), ie = new Array(Lo), xo = 0; xo < Lo; xo++)
+ ie[xo] = new Fs();
+ for (Be = new Array(2 * xr + 1), xo = 0; xo < 2 * xr + 1; xo++)
+ Be[xo] = new Fs();
+ for (te = new Array(as + 2), xo = 0; xo < as + 2; xo++)
+ te[xo] = new Fs();
+ for (Me = new Array(xr), xo = 0; xo < xr; xo++)
+ Me[xo] = new Fs();
+ for (ve = new Array(2 * So + 1), xo = 0; xo < 2 * So + 1; xo++)
+ ve[xo] = new Fs();
+ ge = new Hs(), Je = new Hs(), ot = new Hs(), bt = new Array(Yr + 1), gt = new Array(2 * as + 1), kt = new Array(2 * as + 1), Wt = new Array(Gr - or + 1), jt = new Array(512), Zn = new Array(Vr), Ft = new Array(xr), wn = new Array(Ky(An / 8));
+ }
+ }(ei);
+ for (var Aa = new Array(1024), ya = []; (fi = Bl(Aa, 0, Aa.length)) > 0; ) {
+ var fo = new Array(fi);
+ for (ri = 0; ri < fi; ri++)
+ fo[ri] = String.fromCharCode(Aa[ri]);
+ ya[ya.length] = fo.join("");
+ }
+ return ut = null, ya.join("");
+ };
+}(), kwn = wwn;
+function okt(r, i) {
+ var o = yh(r);
+ if (rA) {
+ var l = rA(r);
+ i && (l = dd(l).call(l, function(f) {
+ return o0(r, f).enumerable;
+ })), o.push.apply(o, l);
+ }
+ return o;
+}
+function skt(r) {
+ for (var i = 1; i < arguments.length; i++) {
+ var o, l, f = arguments[i] != null ? arguments[i] : {};
+ i % 2 ? no(o = okt(Object(f), !0)).call(o, function(g) {
+ Ui(r, g, f[g]);
+ }) : i0 ? uC(r, i0(f)) : no(l = okt(Object(f))).call(l, function(g) {
+ C3(r, g, o0(f, g));
+ });
+ }
+ return r;
+}
+function RFe(r, i, o) {
+ var l = (3 & r) << 4 | i >> 4, f = (15 & i) << 2 | o >> 6, g = 63 & o, A = "";
+ return A += Gge(63 & r >> 2), A += Gge(63 & l), A += Gge(63 & f), A += Gge(63 & g);
+}
+function Gge(r) {
+ var i = r;
+ return i < 10 ? String.fromCharCode(48 + i) : (i -= 10) < 26 ? String.fromCharCode(65 + i) : (i -= 26) < 26 ? String.fromCharCode(97 + i) : (i -= 26) === 0 ? "-" : i === 1 ? "_" : "?";
+}
+function xwn(r, i) {
+ var o, l = unescape(encodeURIComponent(r));
+ return At(o = "".concat(i, "/svg/")).call(o, function(f) {
+ for (var g = "", A = 0; A < f.length; A += 3)
+ A + 2 === f.length ? g += RFe(f.charCodeAt(A), f.charCodeAt(A + 1), 0) : A + 1 === f.length ? g += RFe(f.charCodeAt(A), 0, 0) : g += RFe(f.charCodeAt(A), f.charCodeAt(A + 1), f.charCodeAt(A + 2));
+ return g;
+ }(kwn(l, 9)));
+}
+var Cwn = function() {
+ function r() {
+ var i, o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
+ vi(this, r), this.baseUrl = (i = o.baseUrl) !== null && i !== void 0 ? i : "http://www.plantuml.com/plantuml";
+ }
+ return yi(r, [{ key: "render", value: function(i, o) {
+ var l, f, g = o;
+ g || (g = Math.round(1e8 * Math.random()));
+ var A = At(l = "plantuml-".concat(g, "-")).call(l, (/* @__PURE__ */ new Date()).getTime());
+ return At(f = '');
+ } }], [{ key: "install", value: function(i, o) {
+ var l;
+ KPe(i, { engine: { syntax: { codeBlock: { customRenderer: { plantuml: new r(skt(skt({}, o), (l = i.engine.syntax.plantuml) !== null && l !== void 0 ? l : {})) } } } } });
+ } }]), r;
+}();
+function LTt(r) {
+ for (var i = [], o = 1; o < arguments.length; o++)
+ i[o - 1] = arguments[o];
+ var l = Array.from(typeof r == "string" ? [r] : r);
+ l[l.length - 1] = l[l.length - 1].replace(/\r?\n([\t ]*)$/, "");
+ var f = l.reduce(function(b, v) {
+ var k = v.match(/\n([\t ]+|(?!\s).)/g);
+ return k ? b.concat(k.map(function(_) {
+ var T, L;
+ return (L = (T = _.match(/[\t ]/g)) === null || T === void 0 ? void 0 : T.length) !== null && L !== void 0 ? L : 0;
+ })) : b;
+ }, []);
+ if (f.length) {
+ var g = new RegExp(`
+[ ]{` + Math.min.apply(Math, f) + "}", "g");
+ l = l.map(function(b) {
+ return b.replace(g, `
+`);
+ });
+ }
+ l[0] = l[0].replace(/^\r?\n/, "");
+ var A = l[0];
+ return i.forEach(function(b, v) {
+ var k = A.match(/(?:^|\n)( *)$/), _ = k ? k[1] : "", T = b;
+ typeof b == "string" && b.includes(`
+`) && (T = String(b).split(`
+`).map(function(L, F) {
+ return F === 0 ? L : "" + _ + L;
+ }).join(`
+`)), A += T + l[v + 1];
+ }), A;
+}
+var b5 = su(function(r, i) {
+ r.exports = function() {
+ var o = 1e3, l = 6e4, f = 36e5, g = "millisecond", A = "second", b = "minute", v = "hour", k = "day", _ = "week", T = "month", L = "quarter", F = "year", U = "date", q = "Invalid Date", Z = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, R = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, J = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(Be) {
+ var te = ["th", "st", "nd", "rd"], Me = Be % 100;
+ return "[" + Be + (te[(Me - 20) % 10] || te[Me] || te[0]) + "]";
+ } }, he = function(Be, te, Me) {
+ var ve = String(Be);
+ return !ve || ve.length >= te ? Be : "" + Array(te + 1 - ve.length).join(Me) + Be;
+ }, Y = { s: he, z: function(Be) {
+ var te = -Be.utcOffset(), Me = Math.abs(te), ve = Math.floor(Me / 60), ge = Me % 60;
+ return (te <= 0 ? "+" : "-") + he(ve, 2, "0") + ":" + he(ge, 2, "0");
+ }, m: function Be(te, Me) {
+ if (te.date() < Me.date())
+ return -Be(Me, te);
+ var ve = 12 * (Me.year() - te.year()) + (Me.month() - te.month()), ge = te.clone().add(ve, T), Je = Me - ge < 0, ot = te.clone().add(ve + (Je ? -1 : 1), T);
+ return +(-(ve + (Me - ge) / (Je ? ge - ot : ot - ge)) || 0);
+ }, a: function(Be) {
+ return Be < 0 ? Math.ceil(Be) || 0 : Math.floor(Be);
+ }, p: function(Be) {
+ return { M: T, y: F, w: _, d: k, D: U, h: v, m: b, s: A, ms: g, Q: L }[Be] || String(Be || "").toLowerCase().replace(/s$/, "");
+ }, u: function(Be) {
+ return Be === void 0;
+ } }, ue = "en", le = {};
+ le[ue] = J;
+ var be = function(Be) {
+ return Be instanceof xe;
+ }, ke = function Be(te, Me, ve) {
+ var ge;
+ if (!te)
+ return ue;
+ if (typeof te == "string") {
+ var Je = te.toLowerCase();
+ le[Je] && (ge = Je), Me && (le[Je] = Me, ge = Je);
+ var ot = te.split("-");
+ if (!ge && ot.length > 1)
+ return Be(ot[0]);
+ } else {
+ var bt = te.name;
+ le[bt] = te, ge = bt;
+ }
+ return !ve && ge && (ue = ge), ge || !ve && ue;
+ }, de = function(Be, te) {
+ if (be(Be))
+ return Be.clone();
+ var Me = typeof te == "object" ? te : {};
+ return Me.date = Be, Me.args = arguments, new xe(Me);
+ }, Te = Y;
+ Te.l = ke, Te.i = be, Te.w = function(Be, te) {
+ return de(Be, { locale: te.$L, utc: te.$u, x: te.$x, $offset: te.$offset });
+ };
+ var xe = function() {
+ function Be(Me) {
+ this.$L = ke(Me.locale, null, !0), this.parse(Me);
+ }
+ var te = Be.prototype;
+ return te.parse = function(Me) {
+ this.$d = function(ve) {
+ var ge = ve.date, Je = ve.utc;
+ if (ge === null)
+ return /* @__PURE__ */ new Date(NaN);
+ if (Te.u(ge))
+ return /* @__PURE__ */ new Date();
+ if (ge instanceof Date)
+ return new Date(ge);
+ if (typeof ge == "string" && !/Z$/i.test(ge)) {
+ var ot = ge.match(Z);
+ if (ot) {
+ var bt = ot[2] - 1 || 0, gt = (ot[7] || "0").substring(0, 3);
+ return Je ? new Date(Date.UTC(ot[1], bt, ot[3] || 1, ot[4] || 0, ot[5] || 0, ot[6] || 0, gt)) : new Date(ot[1], bt, ot[3] || 1, ot[4] || 0, ot[5] || 0, ot[6] || 0, gt);
+ }
+ }
+ return new Date(ge);
+ }(Me), this.$x = Me.x || {}, this.init();
+ }, te.init = function() {
+ var Me = this.$d;
+ this.$y = Me.getFullYear(), this.$M = Me.getMonth(), this.$D = Me.getDate(), this.$W = Me.getDay(), this.$H = Me.getHours(), this.$m = Me.getMinutes(), this.$s = Me.getSeconds(), this.$ms = Me.getMilliseconds();
+ }, te.$utils = function() {
+ return Te;
+ }, te.isValid = function() {
+ return this.$d.toString() !== q;
+ }, te.isSame = function(Me, ve) {
+ var ge = de(Me);
+ return this.startOf(ve) <= ge && ge <= this.endOf(ve);
+ }, te.isAfter = function(Me, ve) {
+ return de(Me) < this.startOf(ve);
+ }, te.isBefore = function(Me, ve) {
+ return this.endOf(ve) < de(Me);
+ }, te.$g = function(Me, ve, ge) {
+ return Te.u(Me) ? this[ve] : this.set(ge, Me);
+ }, te.unix = function() {
+ return Math.floor(this.valueOf() / 1e3);
+ }, te.valueOf = function() {
+ return this.$d.getTime();
+ }, te.startOf = function(Me, ve) {
+ var ge = this, Je = !!Te.u(ve) || ve, ot = Te.p(Me), bt = function(Ft, wn) {
+ var un = Te.w(ge.$u ? Date.UTC(ge.$y, wn, Ft) : new Date(ge.$y, wn, Ft), ge);
+ return Je ? un : un.endOf(k);
+ }, gt = function(Ft, wn) {
+ return Te.w(ge.toDate()[Ft].apply(ge.toDate("s"), (Je ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(wn)), ge);
+ }, je = this.$W, Qe = this.$M, kt = this.$D, Wt = "set" + (this.$u ? "UTC" : "");
+ switch (ot) {
+ case F:
+ return Je ? bt(1, 0) : bt(31, 11);
+ case T:
+ return Je ? bt(1, Qe) : bt(0, Qe + 1);
+ case _:
+ var jt = this.$locale().weekStart || 0, Zn = (je < jt ? je + 7 : je) - jt;
+ return bt(Je ? kt - Zn : kt + (6 - Zn), Qe);
+ case k:
+ case U:
+ return gt(Wt + "Hours", 0);
+ case v:
+ return gt(Wt + "Minutes", 1);
+ case b:
+ return gt(Wt + "Seconds", 2);
+ case A:
+ return gt(Wt + "Milliseconds", 3);
+ default:
+ return this.clone();
+ }
+ }, te.endOf = function(Me) {
+ return this.startOf(Me, !1);
+ }, te.$set = function(Me, ve) {
+ var ge, Je = Te.p(Me), ot = "set" + (this.$u ? "UTC" : ""), bt = (ge = {}, ge[k] = ot + "Date", ge[U] = ot + "Date", ge[T] = ot + "Month", ge[F] = ot + "FullYear", ge[v] = ot + "Hours", ge[b] = ot + "Minutes", ge[A] = ot + "Seconds", ge[g] = ot + "Milliseconds", ge)[Je], gt = Je === k ? this.$D + (ve - this.$W) : ve;
+ if (Je === T || Je === F) {
+ var je = this.clone().set(U, 1);
+ je.$d[bt](gt), je.init(), this.$d = je.set(U, Math.min(this.$D, je.daysInMonth())).$d;
+ } else
+ bt && this.$d[bt](gt);
+ return this.init(), this;
+ }, te.set = function(Me, ve) {
+ return this.clone().$set(Me, ve);
+ }, te.get = function(Me) {
+ return this[Te.p(Me)]();
+ }, te.add = function(Me, ve) {
+ var ge, Je = this;
+ Me = Number(Me);
+ var ot = Te.p(ve), bt = function(Qe) {
+ var kt = de(Je);
+ return Te.w(kt.date(kt.date() + Math.round(Qe * Me)), Je);
+ };
+ if (ot === T)
+ return this.set(T, this.$M + Me);
+ if (ot === F)
+ return this.set(F, this.$y + Me);
+ if (ot === k)
+ return bt(1);
+ if (ot === _)
+ return bt(7);
+ var gt = (ge = {}, ge[b] = l, ge[v] = f, ge[A] = o, ge)[ot] || 1, je = this.$d.getTime() + Me * gt;
+ return Te.w(je, this);
+ }, te.subtract = function(Me, ve) {
+ return this.add(-1 * Me, ve);
+ }, te.format = function(Me) {
+ var ve = this, ge = this.$locale();
+ if (!this.isValid())
+ return ge.invalidDate || q;
+ var Je = Me || "YYYY-MM-DDTHH:mm:ssZ", ot = Te.z(this), bt = this.$H, gt = this.$m, je = this.$M, Qe = ge.weekdays, kt = ge.months, Wt = ge.meridiem, jt = function(wn, un, ln, an) {
+ return wn && (wn[un] || wn(ve, Je)) || ln[un].slice(0, an);
+ }, Zn = function(wn) {
+ return Te.s(bt % 12 || 12, wn, "0");
+ }, Ft = Wt || function(wn, un, ln) {
+ var an = wn < 12 ? "AM" : "PM";
+ return ln ? an.toLowerCase() : an;
+ };
+ return Je.replace(R, function(wn, un) {
+ return un || function(ln) {
+ switch (ln) {
+ case "YY":
+ return String(ve.$y).slice(-2);
+ case "YYYY":
+ return Te.s(ve.$y, 4, "0");
+ case "M":
+ return je + 1;
+ case "MM":
+ return Te.s(je + 1, 2, "0");
+ case "MMM":
+ return jt(ge.monthsShort, je, kt, 3);
+ case "MMMM":
+ return jt(kt, je);
+ case "D":
+ return ve.$D;
+ case "DD":
+ return Te.s(ve.$D, 2, "0");
+ case "d":
+ return String(ve.$W);
+ case "dd":
+ return jt(ge.weekdaysMin, ve.$W, Qe, 2);
+ case "ddd":
+ return jt(ge.weekdaysShort, ve.$W, Qe, 3);
+ case "dddd":
+ return Qe[ve.$W];
+ case "H":
+ return String(bt);
+ case "HH":
+ return Te.s(bt, 2, "0");
+ case "h":
+ return Zn(1);
+ case "hh":
+ return Zn(2);
+ case "a":
+ return Ft(bt, gt, !0);
+ case "A":
+ return Ft(bt, gt, !1);
+ case "m":
+ return String(gt);
+ case "mm":
+ return Te.s(gt, 2, "0");
+ case "s":
+ return String(ve.$s);
+ case "ss":
+ return Te.s(ve.$s, 2, "0");
+ case "SSS":
+ return Te.s(ve.$ms, 3, "0");
+ case "Z":
+ return ot;
+ }
+ return null;
+ }(wn) || ot.replace(":", "");
+ });
+ }, te.utcOffset = function() {
+ return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
+ }, te.diff = function(Me, ve, ge) {
+ var Je, ot = this, bt = Te.p(ve), gt = de(Me), je = (gt.utcOffset() - this.utcOffset()) * l, Qe = this - gt, kt = function() {
+ return Te.m(ot, gt);
+ };
+ switch (bt) {
+ case F:
+ Je = kt() / 12;
+ break;
+ case T:
+ Je = kt();
+ break;
+ case L:
+ Je = kt() / 3;
+ break;
+ case _:
+ Je = (Qe - je) / 6048e5;
+ break;
+ case k:
+ Je = (Qe - je) / 864e5;
+ break;
+ case v:
+ Je = Qe / f;
+ break;
+ case b:
+ Je = Qe / l;
+ break;
+ case A:
+ Je = Qe / o;
+ break;
+ default:
+ Je = Qe;
+ }
+ return ge ? Je : Te.a(Je);
+ }, te.daysInMonth = function() {
+ return this.endOf(T).$D;
+ }, te.$locale = function() {
+ return le[this.$L];
+ }, te.locale = function(Me, ve) {
+ if (!Me)
+ return this.$L;
+ var ge = this.clone(), Je = ke(Me, ve, !0);
+ return Je && (ge.$L = Je), ge;
+ }, te.clone = function() {
+ return Te.w(this.$d, this);
+ }, te.toDate = function() {
+ return new Date(this.valueOf());
+ }, te.toJSON = function() {
+ return this.isValid() ? this.toISOString() : null;
+ }, te.toISOString = function() {
+ return this.$d.toISOString();
+ }, te.toString = function() {
+ return this.$d.toUTCString();
+ }, Be;
+ }(), ie = xe.prototype;
+ return de.prototype = ie, [["$ms", g], ["$s", A], ["$m", b], ["$H", v], ["$W", k], ["$M", T], ["$y", F], ["$D", U]].forEach(function(Be) {
+ ie[Be[1]] = function(te) {
+ return this.$g(te, Be[0], Be[1]);
+ };
+ }), de.extend = function(Be, te) {
+ return Be.$i || (Be(te, xe, de), Be.$i = !0), de;
+ }, de.locale = ke, de.isDayjs = be, de.unix = function(Be) {
+ return de(1e3 * Be);
+ }, de.en = le[ue], de.Ls = le, de.p = {}, de;
+ }();
+}), ITt = su(function(r, i) {
+ Object.defineProperty(i, "__esModule", { value: !0 }), i.sanitizeUrl = void 0;
+ var o = /^([^\w]*)(javascript|data|vbscript)/im, l = /(\w+)(^\w|;)?/g, f = /[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim, g = /^([^:]+):/gm, A = [".", "/"];
+ i.sanitizeUrl = function(b) {
+ var v = function(T) {
+ return T.replace(l, function(L, F) {
+ return String.fromCharCode(F);
+ });
+ }(b || "").replace(f, "").trim();
+ if (!v)
+ return "about:blank";
+ if (function(T) {
+ return A.indexOf(T[0]) > -1;
+ }(v))
+ return v;
+ var k = v.match(g);
+ if (!k)
+ return v;
+ var _ = k[0];
+ return o.test(_) ? "about:blank" : v;
+ };
+});
+v$(ITt);
+var u$ = ITt.sanitizeUrl;
+function Ppe(r, i) {
+ return r == null || i == null ? NaN : r < i ? -1 : r > i ? 1 : r >= i ? 0 : NaN;
+}
+function _wn(r, i) {
+ return r == null || i == null ? NaN : i < r ? -1 : i > r ? 1 : i >= r ? 0 : NaN;
+}
+function dRe(r) {
+ var i, o, l;
+ function f(g, A) {
+ var b = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0, v = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : g.length;
+ if (b < v) {
+ if (i(A, A) !== 0)
+ return v;
+ do {
+ var k = b + v >>> 1;
+ o(g[k], A) < 0 ? b = k + 1 : v = k;
+ } while (b < v);
+ }
+ return b;
+ }
+ return r.length !== 2 ? (i = Ppe, o = function(g, A) {
+ return Ppe(r(g), A);
+ }, l = function(g, A) {
+ return r(g) - A;
+ }) : (i = r === Ppe || r === _wn ? r : Ewn, o = r, l = r), { left: f, center: function(g, A) {
+ var b = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0, v = f(g, A, b, (arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : g.length) - 1);
+ return v > b && l(g[v - 1], A) > -l(g[v], A) ? v - 1 : v;
+ }, right: function(g, A) {
+ var b = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0, v = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : g.length;
+ if (b < v) {
+ if (i(A, A) !== 0)
+ return v;
+ do {
+ var k = b + v >>> 1;
+ o(g[k], A) <= 0 ? b = k + 1 : v = k;
+ } while (b < v);
+ }
+ return b;
+ } };
+}
+function Ewn() {
+ return 0;
+}
+var Twn = dRe(Ppe).right;
+dRe(function(r) {
+ return r === null ? NaN : +r;
+}).center;
+var Bwn = Twn;
+class ckt extends Map {
+ constructor(i, o = Swn) {
+ if (super(), Object.defineProperties(this, { _intern: { value: /* @__PURE__ */ new Map() }, _key: { value: o } }), i != null)
+ for (const [l, f] of i)
+ this.set(l, f);
+ }
+ get(i) {
+ return super.get(lkt(this, i));
+ }
+ has(i) {
+ return super.has(lkt(this, i));
+ }
+ set(i, o) {
+ return super.set(function({ _intern: l, _key: f }, g) {
+ const A = f(g);
+ return l.has(A) ? l.get(A) : (l.set(A, g), g);
+ }(this, i), o);
+ }
+ delete(i) {
+ return super.delete(function({ _intern: o, _key: l }, f) {
+ const g = l(f);
+ return o.has(g) && (f = o.get(g), o.delete(g)), f;
+ }(this, i));
+ }
+}
+function lkt({ _intern: r, _key: i }, o) {
+ const l = i(o);
+ return r.has(l) ? r.get(l) : o;
+}
+function Swn(r) {
+ return r !== null && typeof r == "object" ? r.valueOf() : r;
+}
+var ukt = ST.match(/firefox\/(\d+)/i), hkt = !!ukt && +ukt[1], Lwn = /MSIE|Trident/.test(ST), fkt = ST.match(/AppleWebKit\/(\d+)\./), dkt = !!fkt && +fkt[1], yO = [], Akt = Do(yO.sort), Iwn = Do(yO.push), Mwn = oh(function() {
+ yO.sort(void 0);
+}), Fwn = oh(function() {
+ yO.sort(null);
+}), Own = uX("sort"), gkt = !oh(function() {
+ if (MT)
+ return MT < 70;
+ if (!(hkt && hkt > 3)) {
+ if (Lwn)
+ return !0;
+ if (dkt)
+ return dkt < 603;
+ var r, i, o, l, f = "";
+ for (r = 65; r < 76; r++) {
+ switch (i = String.fromCharCode(r), r) {
+ case 66:
+ case 69:
+ case 70:
+ case 72:
+ o = 3;
+ break;
+ case 68:
+ case 71:
+ o = 4;
+ break;
+ default:
+ o = 2;
+ }
+ for (l = 0; l < 47; l++)
+ yO.push({ k: i + l, v: o });
+ }
+ for (yO.sort(function(g, A) {
+ return A.v - g.v;
+ }), l = 0; l < yO.length; l++)
+ i = yO[l].k.charAt(0), f.charAt(f.length - 1) !== i && (f += i);
+ return f !== "DGBEFHACIJK";
+ }
+});
+qa({ target: "Array", proto: !0, forced: Mwn || !Fwn || !Own || !gkt }, { sort: function(r) {
+ r !== void 0 && Fh(r);
+ var i = y5(this);
+ if (gkt)
+ return r === void 0 ? Akt(i) : Akt(i, r);
+ var o, l, f = [], g = Ck(i);
+ for (l = 0; l < g; l++)
+ l in i && Iwn(f, i[l]);
+ for (LEt(f, /* @__PURE__ */ function(A) {
+ return function(b, v) {
+ return v === void 0 ? -1 : b === void 0 ? 1 : A !== void 0 ? +A(b, v) || 0 : ah(b) > ah(v) ? 1 : -1;
+ };
+ }(r)), o = f.length, l = 0; l < o; )
+ i[l] = f[l++];
+ for (; l < g; )
+ delete i[l++];
+ return i;
+} });
+var Dwn = a0("Array").sort, QFe = Array.prototype, aie = function(r) {
+ var i = r.sort;
+ return r === QFe || E1(QFe, r) && i === QFe.sort ? Dwn : i;
+}, Nwn = Math.log, Pwn = Math.LOG10E, Rwn = Math.log10 || function(r) {
+ return Nwn(r) * Pwn;
+};
+qa({ target: "Math", stat: !0 }, { log10: Rwn });
+var Qwn = ql.Math.log10, $wn = Math.sqrt(50), Uwn = Math.sqrt(10), Hwn = Math.sqrt(2);
+function Gme(r, i, o) {
+ var l, f, g, A = (i - r) / Math.max(0, o), b = Math.floor(Qwn(A)), v = A / Math.pow(10, b), k = v >= $wn ? 10 : v >= Uwn ? 5 : v >= Hwn ? 2 : 1;
+ return b < 0 ? (g = Math.pow(10, -b) / k, (l = Math.round(r * g)) / g < r && ++l, (f = Math.round(i * g)) / g > i && --f, g = -g) : (g = Math.pow(10, b) * k, (l = Math.round(r / g)) * g < r && ++l, (f = Math.round(i / g)) * g > i && --f), f < l && 0.5 <= o && o < 2 ? Gme(r, i, 2 * o) : [l, f, g];
+}
+function nNe(r, i, o) {
+ return Gme(r = +r, i = +i, o = +o)[2];
+}
+function rNe(r, i, o) {
+ o = +o;
+ var l = (i = +i) < (r = +r), f = l ? nNe(i, r, o) : nNe(r, i, o);
+ return (l ? -1 : 1) * (f < 0 ? 1 / -f : f);
+}
+function pkt(r, i) {
+ var o = dX !== void 0 && QO(r) || r["@@iterator"];
+ if (!o) {
+ if (kk(r) || (o = function(v, k) {
+ var _;
+ if (v) {
+ if (typeof v == "string")
+ return mkt(v, k);
+ var T = Da(_ = Object.prototype.toString.call(v)).call(_, 8, -1);
+ if (T === "Object" && v.constructor && (T = v.constructor.name), T === "Map" || T === "Set")
+ return Su(v);
+ if (T === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(T))
+ return mkt(v, k);
+ }
+ }(r)) || i && r && typeof r.length == "number") {
+ o && (r = o);
+ var l = 0, f = function() {
+ };
+ return { s: f, n: function() {
+ return l >= r.length ? { done: !0 } : { done: !1, value: r[l++] };
+ }, e: function(v) {
+ throw v;
+ }, f };
+ }
+ throw new TypeError(`Invalid attempt to iterate non-iterable instance.
+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
+ }
+ var g, A = !0, b = !1;
+ return { s: function() {
+ o = o.call(r);
+ }, n: function() {
+ var v = o.next();
+ return A = v.done, v;
+ }, e: function(v) {
+ b = !0, g = v;
+ }, f: function() {
+ try {
+ A || o.return == null || o.return();
+ } finally {
+ if (b)
+ throw g;
+ }
+ } };
+}
+function mkt(r, i) {
+ (i == null || i > r.length) && (i = r.length);
+ for (var o = 0, l = new Array(i); o < i; o++)
+ l[o] = r[o];
+ return l;
+}
+function jwn(r, i) {
+ var o;
+ if (i === void 0) {
+ var l, f = pkt(r);
+ try {
+ for (f.s(); !(l = f.n()).done; ) {
+ var g = l.value;
+ g != null && (o < g || o === void 0 && g >= g) && (o = g);
+ }
+ } catch (_) {
+ f.e(_);
+ } finally {
+ f.f();
+ }
+ } else {
+ var A, b = -1, v = pkt(r);
+ try {
+ for (v.s(); !(A = v.n()).done; ) {
+ var k = A.value;
+ (k = i(k, ++b, r)) != null && (o < k || o === void 0 && k >= k) && (o = k);
+ }
+ } catch (_) {
+ v.e(_);
+ } finally {
+ v.f();
+ }
+ }
+ return o;
+}
+function bkt(r, i) {
+ var o = dX !== void 0 && QO(r) || r["@@iterator"];
+ if (!o) {
+ if (kk(r) || (o = function(v, k) {
+ var _;
+ if (v) {
+ if (typeof v == "string")
+ return vkt(v, k);
+ var T = Da(_ = Object.prototype.toString.call(v)).call(_, 8, -1);
+ if (T === "Object" && v.constructor && (T = v.constructor.name), T === "Map" || T === "Set")
+ return Su(v);
+ if (T === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(T))
+ return vkt(v, k);
+ }
+ }(r)) || i && r && typeof r.length == "number") {
+ o && (r = o);
+ var l = 0, f = function() {
+ };
+ return { s: f, n: function() {
+ return l >= r.length ? { done: !0 } : { done: !1, value: r[l++] };
+ }, e: function(v) {
+ throw v;
+ }, f };
+ }
+ throw new TypeError(`Invalid attempt to iterate non-iterable instance.
+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
+ }
+ var g, A = !0, b = !1;
+ return { s: function() {
+ o = o.call(r);
+ }, n: function() {
+ var v = o.next();
+ return A = v.done, v;
+ }, e: function(v) {
+ b = !0, g = v;
+ }, f: function() {
+ try {
+ A || o.return == null || o.return();
+ } finally {
+ if (b)
+ throw g;
+ }
+ } };
+}
+function vkt(r, i) {
+ (i == null || i > r.length) && (i = r.length);
+ for (var o = 0, l = new Array(i); o < i; o++)
+ l[o] = r[o];
+ return l;
+}
+function Kwn(r, i) {
+ var o;
+ if (i === void 0) {
+ var l, f = bkt(r);
+ try {
+ for (f.s(); !(l = f.n()).done; ) {
+ var g = l.value;
+ g != null && (o > g || o === void 0 && g >= g) && (o = g);
+ }
+ } catch (_) {
+ f.e(_);
+ } finally {
+ f.f();
+ }
+ } else {
+ var A, b = -1, v = bkt(r);
+ try {
+ for (v.s(); !(A = v.n()).done; ) {
+ var k = A.value;
+ (k = i(k, ++b, r)) != null && (o > k || o === void 0 && k >= k) && (o = k);
+ }
+ } catch (_) {
+ v.e(_);
+ } finally {
+ v.f();
+ }
+ }
+ return o;
+}
+var TL = sTt;
+function zwn(r) {
+ return r;
+}
+var Rpe = 1, $Fe = 2, iNe = 3, Xge = 4, ykt = 1e-6;
+function Gwn(r) {
+ return "translate(" + r + ",0)";
+}
+function Xwn(r) {
+ return "translate(0," + r + ")";
+}
+function Wwn(r) {
+ return function(i) {
+ return +r(i);
+ };
+}
+function Vwn(r, i) {
+ return i = Math.max(0, r.bandwidth() - 2 * i) / 2, r.round() && (i = Math.round(i)), function(o) {
+ return +r(o) + i;
+ };
+}
+function qwn() {
+ return !this.__axis;
+}
+function wkt(r, i) {
+ var o = [], l = null, f = null, g = 6, A = 6, b = 3, v = typeof window < "u" && window.devicePixelRatio > 1 ? 0 : 0.5, k = r === Rpe || r === Xge ? -1 : 1, _ = r === Xge || r === $Fe ? "x" : "y", T = r === Rpe || r === iNe ? Gwn : Xwn;
+ function L(F) {
+ var U = l ?? (i.ticks ? i.ticks.apply(i, o) : i.domain()), q = f ?? (i.tickFormat ? i.tickFormat.apply(i, o) : zwn), Z = Math.max(g, 0) + b, R = i.range(), J = +R[0] + v, he = +R[R.length - 1] + v, Y = (i.bandwidth ? Vwn : Wwn)(i.copy(), v), ue = F.selection ? F.selection() : F, le = ue.selectAll(".domain").data([null]), be = ue.selectAll(".tick").data(U, i).order(), ke = be.exit(), de = be.enter().append("g").attr("class", "tick"), Te = be.select("line"), xe = be.select("text");
+ le = le.merge(le.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor")), be = be.merge(de), Te = Te.merge(de.append("line").attr("stroke", "currentColor").attr(_ + "2", k * g)), xe = xe.merge(de.append("text").attr("fill", "currentColor").attr(_, k * Z).attr("dy", r === Rpe ? "0em" : r === iNe ? "0.71em" : "0.32em")), F !== ue && (le = le.transition(F), be = be.transition(F), Te = Te.transition(F), xe = xe.transition(F), ke = ke.transition(F).attr("opacity", ykt).attr("transform", function(ie) {
+ return isFinite(ie = Y(ie)) ? T(ie + v) : this.getAttribute("transform");
+ }), de.attr("opacity", ykt).attr("transform", function(ie) {
+ var Be = this.parentNode.__axis;
+ return T((Be && isFinite(Be = Be(ie)) ? Be : Y(ie)) + v);
+ })), ke.remove(), le.attr("d", r === Xge || r === $Fe ? A ? "M" + k * A + "," + J + "H" + v + "V" + he + "H" + k * A : "M" + v + "," + J + "V" + he : A ? "M" + J + "," + k * A + "V" + v + "H" + he + "V" + k * A : "M" + J + "," + v + "H" + he), be.attr("opacity", 1).attr("transform", function(ie) {
+ return T(Y(ie) + v);
+ }), Te.attr(_ + "2", k * g), xe.attr(_, k * Z).text(q), dd(ue).call(ue, qwn).attr("fill", "none").attr("font-size", 10).attr("font-family", "sans-serif").attr("text-anchor", r === $Fe ? "start" : r === Xge ? "end" : "middle"), ue.each(function() {
+ this.__axis = Y;
+ });
+ }
+ return L.scale = function(F) {
+ return arguments.length ? (i = F, L) : i;
+ }, L.ticks = function() {
+ return o = Su(arguments), L;
+ }, L.tickArguments = function(F) {
+ return arguments.length ? (o = F == null ? [] : Su(F), L) : Da(o).call(o);
+ }, L.tickValues = function(F) {
+ return arguments.length ? (l = F == null ? null : Su(F), L) : l && Da(l).call(l);
+ }, L.tickFormat = function(F) {
+ return arguments.length ? (f = F, L) : f;
+ }, L.tickSize = function(F) {
+ return arguments.length ? (g = A = +F, L) : g;
+ }, L.tickSizeInner = function(F) {
+ return arguments.length ? (g = +F, L) : g;
+ }, L.tickSizeOuter = function(F) {
+ return arguments.length ? (A = +F, L) : A;
+ }, L.tickPadding = function(F) {
+ return arguments.length ? (b = +F, L) : b;
+ }, L.offset = function(F) {
+ return arguments.length ? (v = +F, L) : v;
+ }, L;
+}
+var Ywn = { value: function() {
+} };
+function MTt() {
+ for (var r, i = 0, o = arguments.length, l = {}; i < o; ++i) {
+ if (!(r = arguments[i] + "") || r in l || /[\s.]/.test(r))
+ throw new Error("illegal type: " + r);
+ l[r] = [];
+ }
+ return new Qpe(l);
+}
+function Qpe(r) {
+ this._ = r;
+}
+function Jwn(r, i) {
+ for (var o, l = 0, f = r.length; l < f; ++l)
+ if ((o = r[l]).name === i)
+ return o.value;
+}
+function kkt(r, i, o) {
+ for (var l = 0, f = r.length; l < f; ++l)
+ if (r[l].name === i) {
+ var g;
+ r[l] = Ywn, r = At(g = Da(r).call(r, 0, l)).call(g, Da(r).call(r, l + 1));
+ break;
+ }
+ return o != null && r.push({ name: i, value: o }), r;
+}
+Qpe.prototype = MTt.prototype = { constructor: Qpe, on: function(r, i) {
+ var o, l = this._, f = function(b, v) {
+ var k;
+ return Zs(k = Go(b).call(b).split(/^|\s+/)).call(k, function(_) {
+ var T = "", L = Lu(_).call(_, ".");
+ if (L >= 0 && (T = Da(_).call(_, L + 1), _ = Da(_).call(_, 0, L)), _ && !v.hasOwnProperty(_))
+ throw new Error("unknown type: " + _);
+ return { type: _, name: T };
+ });
+ }(r + "", l), g = -1, A = f.length;
+ if (!(arguments.length < 2)) {
+ if (i != null && typeof i != "function")
+ throw new Error("invalid callback: " + i);
+ for (; ++g < A; )
+ if (o = (r = f[g]).type)
+ l[o] = kkt(l[o], r.name, i);
+ else if (i == null)
+ for (o in l)
+ l[o] = kkt(l[o], r.name, null);
+ return this;
+ }
+ for (; ++g < A; )
+ if ((o = (r = f[g]).type) && (o = Jwn(l[o], r.name)))
+ return o;
+}, copy: function() {
+ var r = {}, i = this._;
+ for (var o in i) {
+ var l;
+ r[o] = Da(l = i[o]).call(l);
+ }
+ return new Qpe(r);
+}, call: function(r, i) {
+ if ((o = arguments.length - 2) > 0)
+ for (var o, l, f = new Array(o), g = 0; g < o; ++g)
+ f[g] = arguments[g + 2];
+ if (!this._.hasOwnProperty(r))
+ throw new Error("unknown type: " + r);
+ for (g = 0, o = (l = this._[r]).length; g < o; ++g)
+ l[g].value.apply(i, f);
+}, apply: function(r, i, o) {
+ if (!this._.hasOwnProperty(r))
+ throw new Error("unknown type: " + r);
+ for (var l = this._[r], f = 0, g = l.length; f < g; ++f)
+ l[f].value.apply(i, o);
+} };
+var aNe = "http://www.w3.org/1999/xhtml", xkt = { svg: "http://www.w3.org/2000/svg", xhtml: aNe, xlink: "http://www.w3.org/1999/xlink", xml: "http://www.w3.org/XML/1998/namespace", xmlns: "http://www.w3.org/2000/xmlns/" };
+function Xme(r) {
+ var i = r += "", o = Lu(i).call(i, ":");
+ return o >= 0 && (i = Da(r).call(r, 0, o)) !== "xmlns" && (r = Da(r).call(r, o + 1)), xkt.hasOwnProperty(i) ? { space: xkt[i], local: r } : r;
+}
+function Zwn(r) {
+ return function() {
+ var i = this.ownerDocument, o = this.namespaceURI;
+ return o === aNe && i.documentElement.namespaceURI === aNe ? i.createElement(r) : i.createElementNS(o, r);
+ };
+}
+function e3n(r) {
+ return function() {
+ return this.ownerDocument.createElementNS(r.space, r.local);
+ };
+}
+function Ckt(r) {
+ var i = Xme(r);
+ return (i.local ? e3n : Zwn)(i);
+}
+var FTt = $9t;
+function t3n() {
+}
+function oNe(r) {
+ return r == null ? t3n : function() {
+ return this.querySelector(r);
+ };
+}
+function OTt(r) {
+ return r == null ? [] : kk(r) ? r : Su(r);
+}
+function n3n() {
+ return [];
+}
+function DTt(r) {
+ return r == null ? n3n : function() {
+ return this.querySelectorAll(r);
+ };
+}
+function NTt(r) {
+ return function() {
+ return this.matches(r);
+ };
+}
+function _kt(r) {
+ return function(i) {
+ return i.matches(r);
+ };
+}
+var r3n = Wre(Array.prototype);
+function i3n() {
+ return this.firstElementChild;
+}
+var a3n = dd(Array.prototype);
+function o3n() {
+ return Su(this.children);
+}
+var PTt = F_t;
+function Ekt(r) {
+ return new Array(r.length);
+}
+function Wme(r, i) {
+ this.ownerDocument = r.ownerDocument, this.namespaceURI = r.namespaceURI, this._next = null, this._parent = r, this.__data__ = i;
+}
+function s3n(r, i, o, l, f, g) {
+ for (var A, b = 0, v = i.length, k = g.length; b < k; ++b)
+ (A = i[b]) ? (A.__data__ = g[b], l[b] = A) : o[b] = new Wme(r, g[b]);
+ for (; b < v; ++b)
+ (A = i[b]) && (f[b] = A);
+}
+function c3n(r, i, o, l, f, g, A) {
+ var b, v, k, _ = new PTt(), T = i.length, L = g.length, F = new Array(T);
+ for (b = 0; b < T; ++b)
+ (v = i[b]) && (F[b] = k = A.call(v, v.__data__, b, i) + "", _.has(k) ? f[b] = v : _.set(k, v));
+ for (b = 0; b < L; ++b)
+ k = A.call(r, g[b], b, g) + "", (v = _.get(k)) ? (l[b] = v, v.__data__ = g[b], _.delete(k)) : o[b] = new Wme(r, g[b]);
+ for (b = 0; b < T; ++b)
+ (v = i[b]) && _.get(F[b]) === v && (f[b] = v);
+}
+function l3n(r) {
+ return r.__data__;
+}
+function u3n(r) {
+ return Yl(r) === "object" && "length" in r ? r : Su(r);
+}
+function h3n(r, i) {
+ return r < i ? -1 : r > i ? 1 : r >= i ? 0 : NaN;
+}
+function f3n(r, i) {
+ var o = dX !== void 0 && QO(r) || r["@@iterator"];
+ if (!o) {
+ if (kk(r) || (o = function(v, k) {
+ var _;
+ if (v) {
+ if (typeof v == "string")
+ return Tkt(v, k);
+ var T = Da(_ = Object.prototype.toString.call(v)).call(_, 8, -1);
+ if (T === "Object" && v.constructor && (T = v.constructor.name), T === "Map" || T === "Set")
+ return Su(v);
+ if (T === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(T))
+ return Tkt(v, k);
+ }
+ }(r)) || i && r && typeof r.length == "number") {
+ o && (r = o);
+ var l = 0, f = function() {
+ };
+ return { s: f, n: function() {
+ return l >= r.length ? { done: !0 } : { done: !1, value: r[l++] };
+ }, e: function(v) {
+ throw v;
+ }, f };
+ }
+ throw new TypeError(`Invalid attempt to iterate non-iterable instance.
+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
+ }
+ var g, A = !0, b = !1;
+ return { s: function() {
+ o = o.call(r);
+ }, n: function() {
+ var v = o.next();
+ return A = v.done, v;
+ }, e: function(v) {
+ b = !0, g = v;
+ }, f: function() {
+ try {
+ A || o.return == null || o.return();
+ } finally {
+ if (b)
+ throw g;
+ }
+ } };
+}
+function Tkt(r, i) {
+ (i == null || i > r.length) && (i = r.length);
+ for (var o = 0, l = new Array(i); o < i; o++)
+ l[o] = r[o];
+ return l;
+}
+function d3n(r) {
+ return function() {
+ this.removeAttribute(r);
+ };
+}
+function A3n(r) {
+ return function() {
+ this.removeAttributeNS(r.space, r.local);
+ };
+}
+function g3n(r, i) {
+ return function() {
+ this.setAttribute(r, i);
+ };
+}
+function p3n(r, i) {
+ return function() {
+ this.setAttributeNS(r.space, r.local, i);
+ };
+}
+function m3n(r, i) {
+ return function() {
+ var o = i.apply(this, arguments);
+ o == null ? this.removeAttribute(r) : this.setAttribute(r, o);
+ };
+}
+function b3n(r, i) {
+ return function() {
+ var o = i.apply(this, arguments);
+ o == null ? this.removeAttributeNS(r.space, r.local) : this.setAttributeNS(r.space, r.local, o);
+ };
+}
+function RTt(r) {
+ return r.ownerDocument && r.ownerDocument.defaultView || r.document && r || r.defaultView;
+}
+function v3n(r) {
+ return function() {
+ this.style.removeProperty(r);
+ };
+}
+function y3n(r, i, o) {
+ return function() {
+ this.style.setProperty(r, i, o);
+ };
+}
+function w3n(r, i, o) {
+ return function() {
+ var l = i.apply(this, arguments);
+ l == null ? this.style.removeProperty(r) : this.style.setProperty(r, l, o);
+ };
+}
+function rG(r, i) {
+ return r.style.getPropertyValue(i) || RTt(r).getComputedStyle(r, null).getPropertyValue(i);
+}
+function k3n(r) {
+ return function() {
+ delete this[r];
+ };
+}
+function x3n(r, i) {
+ return function() {
+ this[r] = i;
+ };
+}
+function C3n(r, i) {
+ return function() {
+ var o = i.apply(this, arguments);
+ o == null ? delete this[r] : this[r] = o;
+ };
+}
+function QTt(r) {
+ return Go(r).call(r).split(/^|\s+/);
+}
+function ARe(r) {
+ return r.classList || new $Tt(r);
+}
+function $Tt(r) {
+ this._node = r, this._names = QTt(r.getAttribute("class") || "");
+}
+function UTt(r, i) {
+ for (var o = ARe(r), l = -1, f = i.length; ++l < f; )
+ o.add(i[l]);
+}
+function HTt(r, i) {
+ for (var o = ARe(r), l = -1, f = i.length; ++l < f; )
+ o.remove(i[l]);
+}
+function _3n(r) {
+ return function() {
+ UTt(this, r);
+ };
+}
+function E3n(r) {
+ return function() {
+ HTt(this, r);
+ };
+}
+function T3n(r, i) {
+ return function() {
+ (i.apply(this, arguments) ? UTt : HTt)(this, r);
+ };
+}
+function B3n() {
+ this.textContent = "";
+}
+function S3n(r) {
+ return function() {
+ this.textContent = r;
+ };
+}
+function L3n(r) {
+ return function() {
+ var i = r.apply(this, arguments);
+ this.textContent = i ?? "";
+ };
+}
+function I3n() {
+ this.innerHTML = "";
+}
+function M3n(r) {
+ return function() {
+ this.innerHTML = r;
+ };
+}
+function F3n(r) {
+ return function() {
+ var i = r.apply(this, arguments);
+ this.innerHTML = i ?? "";
+ };
+}
+function O3n() {
+ this.nextSibling && this.parentNode.appendChild(this);
+}
+function D3n() {
+ this.previousSibling && this.parentNode.insertBefore(this, this.parentNode.firstChild);
+}
+function N3n() {
+ return null;
+}
+function P3n() {
+ var r = this.parentNode;
+ r && r.removeChild(this);
+}
+function R3n() {
+ var r = this.cloneNode(!1), i = this.parentNode;
+ return i ? i.insertBefore(r, this.nextSibling) : r;
+}
+function Q3n() {
+ var r = this.cloneNode(!0), i = this.parentNode;
+ return i ? i.insertBefore(r, this.nextSibling) : r;
+}
+function $3n(r) {
+ return function() {
+ var i = this.__on;
+ if (i) {
+ for (var o, l = 0, f = -1, g = i.length; l < g; ++l)
+ o = i[l], r.type && o.type !== r.type || o.name !== r.name ? i[++f] = o : this.removeEventListener(o.type, o.listener, o.options);
+ ++f ? i.length = f : delete this.__on;
+ }
+ };
+}
+function U3n(r, i, o) {
+ return function() {
+ var l, f = this.__on, g = /* @__PURE__ */ function(v) {
+ return function(k) {
+ v.call(this, k, this.__data__);
+ };
+ }(i);
+ if (f) {
+ for (var A = 0, b = f.length; A < b; ++A)
+ if ((l = f[A]).type === r.type && l.name === r.name)
+ return this.removeEventListener(l.type, l.listener, l.options), this.addEventListener(l.type, l.listener = g, l.options = o), void (l.value = i);
+ }
+ this.addEventListener(r.type, g, o), l = { type: r.type, name: r.name, value: i, listener: g, options: o }, f ? f.push(l) : this.__on = [l];
+ };
+}
+function jTt(r, i, o) {
+ var l = RTt(r), f = l.CustomEvent;
+ typeof f == "function" ? f = new f(i, o) : (f = l.document.createEvent("Event"), o ? (f.initEvent(i, o.bubbles, o.cancelable), f.detail = o.detail) : f.initEvent(i, !1, !1)), r.dispatchEvent(f);
+}
+function H3n(r, i) {
+ return function() {
+ return jTt(this, r, i);
+ };
+}
+function j3n(r, i) {
+ return function() {
+ return jTt(this, r, i.apply(this, arguments));
+ };
+}
+Wme.prototype = { constructor: Wme, appendChild: function(r) {
+ return this._parent.insertBefore(r, this._next);
+}, insertBefore: function(r, i) {
+ return this._parent.insertBefore(r, i);
+}, querySelector: function(r) {
+ return this._parent.querySelector(r);
+}, querySelectorAll: function(r) {
+ return this._parent.querySelectorAll(r);
+} }, $Tt.prototype = { add: function(r) {
+ var i;
+ Lu(i = this._names).call(i, r) < 0 && (this._names.push(r), this._node.setAttribute("class", this._names.join(" ")));
+}, remove: function(r) {
+ var i, o, l = Lu(i = this._names).call(i, r);
+ l >= 0 && (gk(o = this._names).call(o, l, 1), this._node.setAttribute("class", this._names.join(" ")));
+}, contains: function(r) {
+ var i;
+ return Lu(i = this._names).call(i, r) >= 0;
+} };
+var K3n = KG.mark(KTt);
+function KTt() {
+ var r, i, o, l, f, g, A;
+ return KG.wrap(function(b) {
+ for (; ; )
+ switch (b.prev = b.next) {
+ case 0:
+ r = this._groups, i = 0, o = r.length;
+ case 1:
+ if (!(i < o)) {
+ b.next = 13;
+ break;
+ }
+ l = r[i], f = 0, g = l.length;
+ case 3:
+ if (!(f < g)) {
+ b.next = 10;
+ break;
+ }
+ if (!(A = l[f])) {
+ b.next = 7;
+ break;
+ }
+ return b.next = 7, A;
+ case 7:
+ ++f, b.next = 3;
+ break;
+ case 10:
+ ++i, b.next = 1;
+ break;
+ case 13:
+ case "end":
+ return b.stop();
+ }
+ }, K3n, this);
+}
+var Bkt, Skt, Lkt, Ikt, Mkt, Fkt, Okt, Dkt, Nkt, gRe = [null];
+function y3(r, i) {
+ this._groups = r, this._parents = i;
+}
+function oie() {
+ return new y3([[document.documentElement]], gRe);
+}
+function co(r) {
+ return typeof r == "string" ? new y3([[document.querySelector(r)]], [document.documentElement]) : new y3([[r]], gRe);
+}
+function zTt(r) {
+ return typeof r == "string" ? new y3([document.querySelectorAll(r)], [document.documentElement]) : new y3([OTt(r)], gRe);
+}
+function Cre(r, i, o) {
+ r.prototype = i.prototype = o, o.constructor = r;
+}
+function Vme(r, i) {
+ var o = Vre(r.prototype);
+ for (var l in i)
+ o[l] = i[l];
+ return o;
+}
+function t$() {
+}
+y3.prototype = oie.prototype = Ui({ constructor: y3, select: function(r) {
+ typeof r != "function" && (r = oNe(r));
+ for (var i = this._groups, o = i.length, l = new Array(o), f = 0; f < o; ++f)
+ for (var g, A, b = i[f], v = b.length, k = l[f] = new Array(v), _ = 0; _ < v; ++_)
+ (g = b[_]) && (A = r.call(g, g.__data__, _, b)) && ("__data__" in g && (A.__data__ = g.__data__), k[_] = A);
+ return new y3(l, this._parents);
+}, selectAll: function(r) {
+ r = typeof r == "function" ? /* @__PURE__ */ function(_) {
+ return function() {
+ return OTt(_.apply(this, arguments));
+ };
+ }(r) : DTt(r);
+ for (var i = this._groups, o = i.length, l = [], f = [], g = 0; g < o; ++g)
+ for (var A, b = i[g], v = b.length, k = 0; k < v; ++k)
+ (A = b[k]) && (l.push(r.call(A, A.__data__, k, b)), f.push(A));
+ return new y3(l, f);
+}, selectChild: function(r) {
+ return this.select(r == null ? i3n : /* @__PURE__ */ function(i) {
+ return function() {
+ return r3n.call(this.children, i);
+ };
+ }(typeof r == "function" ? r : _kt(r)));
+}, selectChildren: function(r) {
+ return this.selectAll(r == null ? o3n : /* @__PURE__ */ function(i) {
+ return function() {
+ return a3n.call(this.children, i);
+ };
+ }(typeof r == "function" ? r : _kt(r)));
+}, filter: function(r) {
+ typeof r != "function" && (r = NTt(r));
+ for (var i = this._groups, o = i.length, l = new Array(o), f = 0; f < o; ++f)
+ for (var g, A = i[f], b = A.length, v = l[f] = [], k = 0; k < b; ++k)
+ (g = A[k]) && r.call(g, g.__data__, k, A) && v.push(g);
+ return new y3(l, this._parents);
+}, data: function(r, i) {
+ if (!arguments.length)
+ return Su(this, l3n);
+ var o = i ? c3n : s3n, l = this._parents, f = this._groups;
+ typeof r != "function" && (r = /* @__PURE__ */ function(ue) {
+ return function() {
+ return ue;
+ };
+ }(r));
+ for (var g = f.length, A = new Array(g), b = new Array(g), v = new Array(g), k = 0; k < g; ++k) {
+ var _ = l[k], T = f[k], L = T.length, F = u3n(r.call(_, _ && _.__data__, k, l)), U = F.length, q = b[k] = new Array(U), Z = A[k] = new Array(U);
+ o(_, T, q, Z, v[k] = new Array(L), F, i);
+ for (var R, J, he = 0, Y = 0; he < U; ++he)
+ if (R = q[he]) {
+ for (he >= Y && (Y = he + 1); !(J = Z[Y]) && ++Y < U; )
+ ;
+ R._next = J || null;
+ }
+ }
+ return (A = new y3(A, l))._enter = b, A._exit = v, A;
+}, enter: function() {
+ var r;
+ return new y3(this._enter || Zs(r = this._groups).call(r, Ekt), this._parents);
+}, exit: function() {
+ var r;
+ return new y3(this._exit || Zs(r = this._groups).call(r, Ekt), this._parents);
+}, join: function(r, i, o) {
+ var l = this.enter(), f = this, g = this.exit();
+ return typeof r == "function" ? (l = r(l)) && (l = l.selection()) : l = l.append(r + ""), i != null && (f = i(f)) && (f = f.selection()), o == null ? g.remove() : o(g), l && f ? l.merge(f).order() : f;
+}, merge: function(r) {
+ for (var i = r.selection ? r.selection() : r, o = this._groups, l = i._groups, f = o.length, g = l.length, A = Math.min(f, g), b = new Array(f), v = 0; v < A; ++v)
+ for (var k, _ = o[v], T = l[v], L = _.length, F = b[v] = new Array(L), U = 0; U < L; ++U)
+ (k = _[U] || T[U]) && (F[U] = k);
+ for (; v < f; ++v)
+ b[v] = o[v];
+ return new y3(b, this._parents);
+}, selection: function() {
+ return this;
+}, order: function() {
+ for (var r = this._groups, i = -1, o = r.length; ++i < o; )
+ for (var l, f = r[i], g = f.length - 1, A = f[g]; --g >= 0; )
+ (l = f[g]) && (A && 4 ^ l.compareDocumentPosition(A) && A.parentNode.insertBefore(l, A), A = l);
+ return this;
+}, sort: function(r) {
+ function i(T, L) {
+ return T && L ? r(T.__data__, L.__data__) : !T - !L;
+ }
+ r || (r = h3n);
+ for (var o = this._groups, l = o.length, f = new Array(l), g = 0; g < l; ++g) {
+ for (var A, b = o[g], v = b.length, k = f[g] = new Array(v), _ = 0; _ < v; ++_)
+ (A = b[_]) && (k[_] = A);
+ aie(k).call(k, i);
+ }
+ return new y3(f, this._parents).order();
+}, call: function() {
+ var r = arguments[0];
+ return arguments[0] = this, r.apply(null, arguments), this;
+}, nodes: function() {
+ return Su(this);
+}, node: function() {
+ for (var r = this._groups, i = 0, o = r.length; i < o; ++i)
+ for (var l = r[i], f = 0, g = l.length; f < g; ++f) {
+ var A = l[f];
+ if (A)
+ return A;
+ }
+ return null;
+}, size: function() {
+ var r, i = 0, o = f3n(this);
+ try {
+ for (o.s(); !(r = o.n()).done; )
+ r.value, ++i;
+ } catch (l) {
+ o.e(l);
+ } finally {
+ o.f();
+ }
+ return i;
+}, empty: function() {
+ return !this.node();
+}, each: function(r) {
+ for (var i = this._groups, o = 0, l = i.length; o < l; ++o)
+ for (var f, g = i[o], A = 0, b = g.length; A < b; ++A)
+ (f = g[A]) && r.call(f, f.__data__, A, g);
+ return this;
+}, attr: function(r, i) {
+ var o = Xme(r);
+ if (arguments.length < 2) {
+ var l = this.node();
+ return o.local ? l.getAttributeNS(o.space, o.local) : l.getAttribute(o);
+ }
+ return this.each((i == null ? o.local ? A3n : d3n : typeof i == "function" ? o.local ? b3n : m3n : o.local ? p3n : g3n)(o, i));
+}, style: function(r, i, o) {
+ return arguments.length > 1 ? this.each((i == null ? v3n : typeof i == "function" ? w3n : y3n)(r, i, o ?? "")) : rG(this.node(), r);
+}, property: function(r, i) {
+ return arguments.length > 1 ? this.each((i == null ? k3n : typeof i == "function" ? C3n : x3n)(r, i)) : this.node()[r];
+}, classed: function(r, i) {
+ var o = QTt(r + "");
+ if (arguments.length < 2) {
+ for (var l = ARe(this.node()), f = -1, g = o.length; ++f < g; )
+ if (!l.contains(o[f]))
+ return !1;
+ return !0;
+ }
+ return this.each((typeof i == "function" ? T3n : i ? _3n : E3n)(o, i));
+}, text: function(r) {
+ return arguments.length ? this.each(r == null ? B3n : (typeof r == "function" ? L3n : S3n)(r)) : this.node().textContent;
+}, html: function(r) {
+ return arguments.length ? this.each(r == null ? I3n : (typeof r == "function" ? F3n : M3n)(r)) : this.node().innerHTML;
+}, raise: function() {
+ return this.each(O3n);
+}, lower: function() {
+ return this.each(D3n);
+}, append: function(r) {
+ var i = typeof r == "function" ? r : Ckt(r);
+ return this.select(function() {
+ return this.appendChild(i.apply(this, arguments));
+ });
+}, insert: function(r, i) {
+ var o = typeof r == "function" ? r : Ckt(r), l = i == null ? N3n : typeof i == "function" ? i : oNe(i);
+ return this.select(function() {
+ return this.insertBefore(o.apply(this, arguments), l.apply(this, arguments) || null);
+ });
+}, remove: function() {
+ return this.each(P3n);
+}, clone: function(r) {
+ return this.select(r ? Q3n : R3n);
+}, datum: function(r) {
+ return arguments.length ? this.property("__data__", r) : this.node().__data__;
+}, on: function(r, i, o) {
+ var l, f, g = function(T) {
+ var L;
+ return Zs(L = Go(T).call(T).split(/^|\s+/)).call(L, function(F) {
+ var U = "", q = Lu(F).call(F, ".");
+ return q >= 0 && (U = Da(F).call(F, q + 1), F = Da(F).call(F, 0, q)), { type: F, name: U };
+ });
+ }(r + ""), A = g.length;
+ if (!(arguments.length < 2)) {
+ for (b = i ? U3n : $3n, l = 0; l < A; ++l)
+ this.each(b(g[l], i, o));
+ return this;
+ }
+ var b = this.node().__on;
+ if (b) {
+ for (var v, k = 0, _ = b.length; k < _; ++k)
+ for (l = 0, v = b[k]; l < A; ++l)
+ if ((f = g[l]).type === v.type && f.name === v.name)
+ return v.value;
+ }
+}, dispatch: function(r, i) {
+ return this.each((typeof i == "function" ? j3n : H3n)(r, i));
+} }, FTt, KTt);
+var rre = 0.7, Wge = 1 / rre, kG = "\\s*([+-]?\\d+)\\s*", sie = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", LT = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", z3n = /^#([0-9a-f]{3,8})$/, G3n = new RegExp(At(Bkt = "^rgb\\(".concat(kG, ",").concat(kG, ",")).call(Bkt, kG, "\\)$")), X3n = new RegExp(At(Skt = "^rgb\\(".concat(LT, ",").concat(LT, ",")).call(Skt, LT, "\\)$")), W3n = new RegExp(At(Lkt = At(Ikt = "^rgba\\(".concat(kG, ",").concat(kG, ",")).call(Ikt, kG, ",")).call(Lkt, sie, "\\)$")), V3n = new RegExp(At(Mkt = At(Fkt = "^rgba\\(".concat(LT, ",").concat(LT, ",")).call(Fkt, LT, ",")).call(Mkt, sie, "\\)$")), q3n = new RegExp(At(Okt = "^hsl\\(".concat(sie, ",").concat(LT, ",")).call(Okt, LT, "\\)$")), Y3n = new RegExp(At(Dkt = At(Nkt = "^hsla\\(".concat(sie, ",").concat(LT, ",")).call(Nkt, LT, ",")).call(Dkt, sie, "\\)$")), Pkt = { 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 };
+function Rkt() {
+ return this.rgb().formatHex();
+}
+function Qkt() {
+ return this.rgb().formatRgb();
+}
+function h$(r) {
+ var i, o, l;
+ return r = Go(i = r + "").call(i).toLowerCase(), (o = z3n.exec(r)) ? (l = o[1].length, o = Ky(o[1], 16), l === 6 ? $kt(o) : l === 3 ? new Hy(o >> 8 & 15 | o >> 4 & 240, o >> 4 & 15 | 240 & o, (15 & o) << 4 | 15 & o, 1) : l === 8 ? Vge(o >> 24 & 255, o >> 16 & 255, o >> 8 & 255, (255 & o) / 255) : l === 4 ? Vge(o >> 12 & 15 | o >> 8 & 240, o >> 8 & 15 | o >> 4 & 240, o >> 4 & 15 | 240 & o, ((15 & o) << 4 | 15 & o) / 255) : null) : (o = G3n.exec(r)) ? new Hy(o[1], o[2], o[3], 1) : (o = X3n.exec(r)) ? new Hy(255 * o[1] / 100, 255 * o[2] / 100, 255 * o[3] / 100, 1) : (o = W3n.exec(r)) ? Vge(o[1], o[2], o[3], o[4]) : (o = V3n.exec(r)) ? Vge(255 * o[1] / 100, 255 * o[2] / 100, 255 * o[3] / 100, o[4]) : (o = q3n.exec(r)) ? jkt(o[1], o[2] / 100, o[3] / 100, 1) : (o = Y3n.exec(r)) ? jkt(o[1], o[2] / 100, o[3] / 100, o[4]) : Pkt.hasOwnProperty(r) ? $kt(Pkt[r]) : r === "transparent" ? new Hy(NaN, NaN, NaN, 0) : null;
+}
+function $kt(r) {
+ return new Hy(r >> 16 & 255, r >> 8 & 255, 255 & r, 1);
+}
+function Vge(r, i, o, l) {
+ return l <= 0 && (r = i = o = NaN), new Hy(r, i, o, l);
+}
+function GTt(r) {
+ return r instanceof t$ || (r = h$(r)), r ? new Hy((r = r.rgb()).r, r.g, r.b, r.opacity) : new Hy();
+}
+function sNe(r, i, o, l) {
+ return arguments.length === 1 ? GTt(r) : new Hy(r, i, o, l ?? 1);
+}
+function Hy(r, i, o, l) {
+ this.r = +r, this.g = +i, this.b = +o, this.opacity = +l;
+}
+function Ukt() {
+ var r, i;
+ return At(r = At(i = "#".concat(YQ(this.r))).call(i, YQ(this.g))).call(r, YQ(this.b));
+}
+function Hkt() {
+ var r, i, o, l, f = $pe(this.opacity);
+ return At(r = At(i = At(o = At(l = "".concat(f === 1 ? "rgb(" : "rgba(")).call(l, n$(this.r), ", ")).call(o, n$(this.g), ", ")).call(i, n$(this.b))).call(r, f === 1 ? ")" : ", ".concat(f, ")"));
+}
+function $pe(r) {
+ return isNaN(r) ? 1 : Math.max(0, Math.min(1, r));
+}
+function n$(r) {
+ return Math.max(0, Math.min(255, Math.round(r) || 0));
+}
+function YQ(r) {
+ return ((r = n$(r)) < 16 ? "0" : "") + r.toString(16);
+}
+function jkt(r, i, o, l) {
+ return l <= 0 ? r = i = o = NaN : o <= 0 || o >= 1 ? r = i = NaN : i <= 0 && (r = NaN), new N9(r, i, o, l);
+}
+function Kkt(r) {
+ if (r instanceof N9)
+ return new N9(r.h, r.s, r.l, r.opacity);
+ if (r instanceof t$ || (r = h$(r)), !r)
+ return new N9();
+ if (r instanceof N9)
+ return r;
+ var i = (r = r.rgb()).r / 255, o = r.g / 255, l = r.b / 255, f = Math.min(i, o, l), g = Math.max(i, o, l), A = NaN, b = g - f, v = (g + f) / 2;
+ return b ? (A = i === g ? (o - l) / b + 6 * (o < l) : o === g ? (l - i) / b + 2 : (i - o) / b + 4, b /= v < 0.5 ? g + f : 2 - g - f, A *= 60) : b = v > 0 && v < 1 ? 0 : A, new N9(A, b, v, r.opacity);
+}
+function N9(r, i, o, l) {
+ this.h = +r, this.s = +i, this.l = +o, this.opacity = +l;
+}
+function zkt(r) {
+ return (r = (r || 0) % 360) < 0 ? r + 360 : r;
+}
+function qge(r) {
+ return Math.max(0, Math.min(1, r || 0));
+}
+function UFe(r, i, o) {
+ return 255 * (r < 60 ? i + (o - i) * r / 60 : r < 180 ? o : r < 240 ? i + (o - i) * (240 - r) / 60 : i);
+}
+Cre(t$, h$, { copy: function(r) {
+ return lL(new this.constructor(), this, r);
+}, displayable: function() {
+ return this.rgb().displayable();
+}, hex: Rkt, formatHex: Rkt, formatHex8: function() {
+ return this.rgb().formatHex8();
+}, formatHsl: function() {
+ return Kkt(this).formatHsl();
+}, formatRgb: Qkt, toString: Qkt }), Cre(Hy, sNe, Vme(t$, { brighter: function(r) {
+ return r = r == null ? Wge : Math.pow(Wge, r), new Hy(this.r * r, this.g * r, this.b * r, this.opacity);
+}, darker: function(r) {
+ return r = r == null ? rre : Math.pow(rre, r), new Hy(this.r * r, this.g * r, this.b * r, this.opacity);
+}, rgb: function() {
+ return this;
+}, clamp: function() {
+ return new Hy(n$(this.r), n$(this.g), n$(this.b), $pe(this.opacity));
+}, displayable: function() {
+ 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: Ukt, formatHex: Ukt, formatHex8: function() {
+ var r, i, o;
+ return At(r = At(i = At(o = "#".concat(YQ(this.r))).call(o, YQ(this.g))).call(i, YQ(this.b))).call(r, YQ(255 * (isNaN(this.opacity) ? 1 : this.opacity)));
+}, formatRgb: Hkt, toString: Hkt })), Cre(N9, function(r, i, o, l) {
+ return arguments.length === 1 ? Kkt(r) : new N9(r, i, o, l ?? 1);
+}, Vme(t$, { brighter: function(r) {
+ return r = r == null ? Wge : Math.pow(Wge, r), new N9(this.h, this.s, this.l * r, this.opacity);
+}, darker: function(r) {
+ return r = r == null ? rre : Math.pow(rre, r), new N9(this.h, this.s, this.l * r, this.opacity);
+}, rgb: function() {
+ var r = this.h % 360 + 360 * (this.h < 0), i = isNaN(r) || isNaN(this.s) ? 0 : this.s, o = this.l, l = o + (o < 0.5 ? o : 1 - o) * i, f = 2 * o - l;
+ return new Hy(UFe(r >= 240 ? r - 240 : r + 120, f, l), UFe(r, f, l), UFe(r < 120 ? r + 240 : r - 120, f, l), this.opacity);
+}, clamp: function() {
+ return new N9(zkt(this.h), qge(this.s), qge(this.l), $pe(this.opacity));
+}, displayable: function() {
+ return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
+}, formatHsl: function() {
+ var r, i, o, l, f = $pe(this.opacity);
+ return At(r = At(i = At(o = At(l = "".concat(f === 1 ? "hsl(" : "hsla(")).call(l, zkt(this.h), ", ")).call(o, 100 * qge(this.s), "%, ")).call(i, 100 * qge(this.l), "%")).call(r, f === 1 ? ")" : ", ".concat(f, ")"));
+} }));
+var J3n = Math.PI / 180, Z3n = 180 / Math.PI, XTt = 0.96422, WTt = 1, VTt = 0.82521, qTt = 4 / 29, xG = 6 / 29, YTt = 3 * xG * xG, e4n = xG * xG * xG;
+function JTt(r) {
+ if (r instanceof _T)
+ return new _T(r.l, r.a, r.b, r.opacity);
+ if (r instanceof rL)
+ return ZTt(r);
+ r instanceof Hy || (r = GTt(r));
+ var i, o, l = zFe(r.r), f = zFe(r.g), g = zFe(r.b), A = HFe((0.2225045 * l + 0.7168786 * f + 0.0606169 * g) / WTt);
+ return l === f && f === g ? i = o = A : (i = HFe((0.4360747 * l + 0.3850649 * f + 0.1430804 * g) / XTt), o = HFe((0.0139322 * l + 0.0971045 * f + 0.7141733 * g) / VTt)), new _T(116 * A - 16, 500 * (i - A), 200 * (A - o), r.opacity);
+}
+function _T(r, i, o, l) {
+ this.l = +r, this.a = +i, this.b = +o, this.opacity = +l;
+}
+function HFe(r) {
+ return r > e4n ? Math.pow(r, 1 / 3) : r / YTt + qTt;
+}
+function jFe(r) {
+ return r > xG ? r * r * r : YTt * (r - qTt);
+}
+function KFe(r) {
+ return 255 * (r <= 31308e-7 ? 12.92 * r : 1.055 * Math.pow(r, 1 / 2.4) - 0.055);
+}
+function zFe(r) {
+ return (r /= 255) <= 0.04045 ? r / 12.92 : Math.pow((r + 0.055) / 1.055, 2.4);
+}
+function cNe(r, i, o, l) {
+ return arguments.length === 1 ? function(f) {
+ if (f instanceof rL)
+ return new rL(f.h, f.c, f.l, f.opacity);
+ if (f instanceof _T || (f = JTt(f)), f.a === 0 && f.b === 0)
+ return new rL(NaN, 0 < f.l && f.l < 100 ? 0 : NaN, f.l, f.opacity);
+ var g = Math.atan2(f.b, f.a) * Z3n;
+ return new rL(g < 0 ? g + 360 : g, Math.sqrt(f.a * f.a + f.b * f.b), f.l, f.opacity);
+ }(r) : new rL(r, i, o, l ?? 1);
+}
+function rL(r, i, o, l) {
+ this.h = +r, this.c = +i, this.l = +o, this.opacity = +l;
+}
+function ZTt(r) {
+ if (isNaN(r.h))
+ return new _T(r.l, 0, 0, r.opacity);
+ var i = r.h * J3n;
+ return new _T(r.l, Math.cos(i) * r.c, Math.sin(i) * r.c, r.opacity);
+}
+Cre(_T, function(r, i, o, l) {
+ return arguments.length === 1 ? JTt(r) : new _T(r, i, o, l ?? 1);
+}, Vme(t$, { brighter: function(r) {
+ return new _T(this.l + 18 * (r ?? 1), this.a, this.b, this.opacity);
+}, darker: function(r) {
+ return new _T(this.l - 18 * (r ?? 1), this.a, this.b, this.opacity);
+}, rgb: function() {
+ var r = (this.l + 16) / 116, i = isNaN(this.a) ? r : r + this.a / 500, o = isNaN(this.b) ? r : r - this.b / 200;
+ return new Hy(KFe(3.1338561 * (i = XTt * jFe(i)) - 1.6168667 * (r = WTt * jFe(r)) - 0.4906146 * (o = VTt * jFe(o))), KFe(-0.9787684 * i + 1.9161415 * r + 0.033454 * o), KFe(0.0719453 * i - 0.2289914 * r + 1.4052427 * o), this.opacity);
+} })), Cre(rL, cNe, Vme(t$, { brighter: function(r) {
+ return new rL(this.h, this.c, this.l + 18 * (r ?? 1), this.opacity);
+}, darker: function(r) {
+ return new rL(this.h, this.c, this.l - 18 * (r ?? 1), this.opacity);
+}, rgb: function() {
+ return ZTt(this).rgb();
+} }));
+var Wbe = function(r) {
+ return function() {
+ return r;
+ };
+};
+function eBt(r, i) {
+ return function(o) {
+ return r + o * i;
+ };
+}
+function t4n(r) {
+ return (r = +r) == 1 ? _re : function(i, o) {
+ return o - i ? function(l, f, g) {
+ return l = Math.pow(l, g), f = Math.pow(f, g) - l, g = 1 / g, function(A) {
+ return Math.pow(l + A * f, g);
+ };
+ }(i, o, r) : Wbe(isNaN(i) ? o : i);
+ };
+}
+function _re(r, i) {
+ var o = i - r;
+ return o ? eBt(r, o) : Wbe(isNaN(r) ? i : r);
+}
+var qme = function r(i) {
+ var o = t4n(i);
+ function l(f, g) {
+ var A = o((f = sNe(f)).r, (g = sNe(g)).r), b = o(f.g, g.g), v = o(f.b, g.b), k = _re(f.opacity, g.opacity);
+ return function(_) {
+ return f.r = A(_), f.g = b(_), f.b = v(_), f.opacity = k(_), f + "";
+ };
+ }
+ return l.gamma = r, l;
+}(1);
+function n4n(r, i) {
+ i || (i = []);
+ var o, l = r ? Math.min(i.length, r.length) : 0, f = Da(i).call(i);
+ return function(g) {
+ for (o = 0; o < l; ++o)
+ f[o] = r[o] * (1 - g) + i[o] * g;
+ return f;
+ };
+}
+function r4n(r, i) {
+ var o, l = i ? i.length : 0, f = r ? Math.min(l, r.length) : 0, g = new Array(f), A = new Array(l);
+ for (o = 0; o < f; ++o)
+ g[o] = pRe(r[o], i[o]);
+ for (; o < l; ++o)
+ A[o] = i[o];
+ return function(b) {
+ for (o = 0; o < f; ++o)
+ A[o] = g[o](b);
+ return A;
+ };
+}
+function i4n(r, i) {
+ var o = /* @__PURE__ */ new Date();
+ return r = +r, i = +i, function(l) {
+ return o.setTime(r * (1 - l) + i * l), o;
+ };
+}
+function F9(r, i) {
+ return r = +r, i = +i, function(o) {
+ return r * (1 - o) + i * o;
+ };
+}
+function a4n(r, i) {
+ var o, l = {}, f = {};
+ for (o in r !== null && Yl(r) === "object" || (r = {}), i !== null && Yl(i) === "object" || (i = {}), i)
+ o in r ? l[o] = pRe(r[o], i[o]) : f[o] = i[o];
+ return function(g) {
+ for (o in l)
+ f[o] = l[o](g);
+ return f;
+ };
+}
+var lNe = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, GFe = new RegExp(lNe.source, "g");
+function tBt(r, i) {
+ var o, l, f, g = lNe.lastIndex = GFe.lastIndex = 0, A = -1, b = [], v = [];
+ for (r += "", i += ""; (o = lNe.exec(r)) && (l = GFe.exec(i)); )
+ (f = l.index) > g && (f = Da(i).call(i, g, f), b[A] ? b[A] += f : b[++A] = f), (o = o[0]) === (l = l[0]) ? b[A] ? b[A] += l : b[++A] = l : (b[++A] = null, v.push({ i: A, x: F9(o, l) })), g = GFe.lastIndex;
+ return g < i.length && (f = Da(i).call(i, g), b[A] ? b[A] += f : b[++A] = f), b.length < 2 ? v[0] ? /* @__PURE__ */ function(k) {
+ return function(_) {
+ return k(_) + "";
+ };
+ }(v[0].x) : /* @__PURE__ */ function(k) {
+ return function() {
+ return k;
+ };
+ }(i) : (i = v.length, function(k) {
+ for (var _, T = 0; T < i; ++T)
+ b[(_ = v[T]).i] = _.x(k);
+ return b.join("");
+ });
+}
+function pRe(r, i) {
+ var o, l = Yl(i);
+ return i == null || l === "boolean" ? Wbe(i) : (l === "number" ? F9 : l === "string" ? (o = h$(i)) ? (i = o, qme) : tBt : i instanceof h$ ? qme : i instanceof Date ? i4n : function(f) {
+ return ArrayBuffer.isView(f) && !(f instanceof DataView);
+ }(i) ? n4n : kk(i) ? r4n : typeof i.valueOf != "function" && typeof i.toString != "function" || isNaN(i) ? a4n : F9)(r, i);
+}
+function o4n(r, i) {
+ return r = +r, i = +i, function(o) {
+ return Math.round(r * (1 - o) + i * o);
+ };
+}
+var Yge, Gkt = 180 / Math.PI, uNe = { translateX: 0, translateY: 0, rotate: 0, skewX: 0, scaleX: 1, scaleY: 1 };
+function nBt(r, i, o, l, f, g) {
+ var A, b, v;
+ return (A = Math.sqrt(r * r + i * i)) && (r /= A, i /= A), (v = r * o + i * l) && (o -= r * v, l -= i * v), (b = Math.sqrt(o * o + l * l)) && (o /= b, l /= b, v /= b), r * l < i * o && (r = -r, i = -i, v = -v, A = -A), { translateX: f, translateY: g, rotate: Math.atan2(i, r) * Gkt, skewX: Math.atan(v) * Gkt, scaleX: A, scaleY: b };
+}
+function rBt(r, i, o, l) {
+ function f(g) {
+ return g.length ? g.pop() + " " : "";
+ }
+ return function(g, A) {
+ var b = [], v = [];
+ return g = r(g), A = r(A), function(k, _, T, L, F, U) {
+ if (k !== T || _ !== L) {
+ var q = F.push("translate(", null, i, null, o);
+ U.push({ i: q - 4, x: F9(k, T) }, { i: q - 2, x: F9(_, L) });
+ } else
+ (T || L) && F.push("translate(" + T + i + L + o);
+ }(g.translateX, g.translateY, A.translateX, A.translateY, b, v), function(k, _, T, L) {
+ k !== _ ? (k - _ > 180 ? _ += 360 : _ - k > 180 && (k += 360), L.push({ i: T.push(f(T) + "rotate(", null, l) - 2, x: F9(k, _) })) : _ && T.push(f(T) + "rotate(" + _ + l);
+ }(g.rotate, A.rotate, b, v), function(k, _, T, L) {
+ k !== _ ? L.push({ i: T.push(f(T) + "skewX(", null, l) - 2, x: F9(k, _) }) : _ && T.push(f(T) + "skewX(" + _ + l);
+ }(g.skewX, A.skewX, b, v), function(k, _, T, L, F, U) {
+ if (k !== T || _ !== L) {
+ var q = F.push(f(F) + "scale(", null, ",", null, ")");
+ U.push({ i: q - 4, x: F9(k, T) }, { i: q - 2, x: F9(_, L) });
+ } else
+ T === 1 && L === 1 || F.push(f(F) + "scale(" + T + "," + L + ")");
+ }(g.scaleX, g.scaleY, A.scaleX, A.scaleY, b, v), g = A = null, function(k) {
+ for (var _, T = -1, L = v.length; ++T < L; )
+ b[(_ = v[T]).i] = _.x(k);
+ return b.join("");
+ };
+ };
+}
+var s4n = rBt(function(r) {
+ var i = new (typeof DOMMatrix == "function" ? DOMMatrix : WebKitCSSMatrix)(r + "");
+ return i.isIdentity ? uNe : nBt(i.a, i.b, i.c, i.d, i.e, i.f);
+}, "px, ", "px)", "deg)"), c4n = rBt(function(r) {
+ return r == null ? uNe : (Yge || (Yge = document.createElementNS("http://www.w3.org/2000/svg", "g")), Yge.setAttribute("transform", r), (r = Yge.transform.baseVal.consolidate()) ? nBt((r = r.matrix).a, r.b, r.c, r.d, r.e, r.f) : uNe);
+}, ", ", ")", ")"), Xkt, Upe, ire, l4n = /* @__PURE__ */ function(r) {
+ return function(i, o) {
+ var l = r((i = cNe(i)).h, (o = cNe(o)).h), f = _re(i.c, o.c), g = _re(i.l, o.l), A = _re(i.opacity, o.opacity);
+ return function(b) {
+ return i.h = l(b), i.c = f(b), i.l = g(b), i.opacity = A(b), i + "";
+ };
+ };
+}(function(r, i) {
+ var o = i - r;
+ return o ? eBt(r, o > 180 || o < -180 ? o - 360 * Math.round(o / 360) : o) : Wbe(isNaN(r) ? i : r);
+}), uG = 0, are = 0, Lne = 0, iBt = 1e3, Yme = 0, r$ = 0, Vbe = 0, cie = (typeof performance > "u" ? "undefined" : Yl(performance)) === "object" && performance.now ? performance : Date, aBt = (typeof window > "u" ? "undefined" : Yl(window)) === "object" && window.requestAnimationFrame ? Bo(Xkt = window.requestAnimationFrame).call(Xkt, window) : function(r) {
+ lm(r, 17);
+};
+function mRe() {
+ return r$ || (aBt(u4n), r$ = cie.now() + Vbe);
+}
+function u4n() {
+ r$ = 0;
+}
+function Jme() {
+ this._call = this._time = this._next = null;
+}
+function oBt(r, i, o) {
+ var l = new Jme();
+ return l.restart(r, i, o), l;
+}
+function Wkt() {
+ r$ = (Yme = cie.now()) + Vbe, uG = are = 0;
+ try {
+ (function() {
+ mRe(), ++uG;
+ for (var r, i = Upe; i; )
+ (r = r$ - i._time) >= 0 && i._call.call(void 0, r), i = i._next;
+ --uG;
+ })();
+ } finally {
+ uG = 0, function() {
+ for (var r, i, o = Upe, l = 1 / 0; o; )
+ o._call ? (l > o._time && (l = o._time), r = o, o = o._next) : (i = o._next, o._next = null, o = r ? r._next = i : Upe = i);
+ ire = r, hNe(l);
+ }(), r$ = 0;
+ }
+}
+function h4n() {
+ var r = cie.now(), i = r - Yme;
+ i > iBt && (Vbe -= i, Yme = r);
+}
+function hNe(r) {
+ uG || (are && (are = clearTimeout(are)), r - r$ > 24 ? (r < 1 / 0 && (are = lm(Wkt, r - cie.now() - Vbe)), Lne && (Lne = clearInterval(Lne))) : (Lne || (Yme = cie.now(), Lne = hTt(h4n, iBt)), uG = 1, aBt(Wkt)));
+}
+function Vkt(r, i, o) {
+ var l = new Jme();
+ return i = i == null ? 0 : +i, l.restart(function(f) {
+ l.stop(), r(f + i);
+ }, i, o), l;
+}
+Jme.prototype = oBt.prototype = { constructor: Jme, restart: function(r, i, o) {
+ if (typeof r != "function")
+ throw new TypeError("callback is not a function");
+ o = (o == null ? mRe() : +o) + (i == null ? 0 : +i), this._next || ire === this || (ire ? ire._next = this : Upe = this, ire = this), this._call = r, this._time = o, hNe();
+}, stop: function() {
+ this._call && (this._call = null, this._time = 1 / 0, hNe());
+} };
+var f4n = MTt("start", "end", "cancel", "interrupt"), d4n = [], sBt = 0, qkt = 1, fNe = 2, Hpe = 3, Ykt = 4, dNe = 5, jpe = 6;
+function Kpe(r, i, o, l, f, g) {
+ var A = r.__transition;
+ if (A) {
+ if (o in A)
+ return;
+ } else
+ r.__transition = {};
+ (function(b, v, k) {
+ var _, T = b.__transition;
+ function L(Z) {
+ k.state = qkt, k.timer.restart(F, k.delay, k.time), k.delay <= Z && F(Z - k.delay);
+ }
+ function F(Z) {
+ var R, J, he, Y;
+ if (k.state !== qkt)
+ return q();
+ for (R in T)
+ if ((Y = T[R]).name === k.name) {
+ if (Y.state === Hpe)
+ return Vkt(F);
+ Y.state === Ykt ? (Y.state = jpe, Y.timer.stop(), Y.on.call("interrupt", b, b.__data__, Y.index, Y.group), delete T[R]) : +R < v && (Y.state = jpe, Y.timer.stop(), Y.on.call("cancel", b, b.__data__, Y.index, Y.group), delete T[R]);
+ }
+ if (Vkt(function() {
+ k.state === Hpe && (k.state = Ykt, k.timer.restart(U, k.delay, k.time), U(Z));
+ }), k.state = fNe, k.on.call("start", b, b.__data__, k.index, k.group), k.state === fNe) {
+ for (k.state = Hpe, _ = new Array(he = k.tween.length), R = 0, J = -1; R < he; ++R)
+ (Y = k.tween[R].value.call(b, b.__data__, k.index, k.group)) && (_[++J] = Y);
+ _.length = J + 1;
+ }
+ }
+ function U(Z) {
+ for (var R = Z < k.duration ? k.ease.call(null, Z / k.duration) : (k.timer.restart(q), k.state = dNe, 1), J = -1, he = _.length; ++J < he; )
+ _[J].call(b, R);
+ k.state === dNe && (k.on.call("end", b, b.__data__, k.index, k.group), q());
+ }
+ function q() {
+ for (var Z in k.state = jpe, k.timer.stop(), delete T[v], T)
+ return;
+ delete b.__transition;
+ }
+ T[v] = k, k.timer = oBt(L, 0, k.time);
+ })(r, o, { name: i, index: l, group: f, on: f4n, tween: d4n, time: g.time, delay: g.delay, duration: g.duration, ease: g.ease, timer: null, state: sBt });
+}
+function bRe(r, i) {
+ var o = M9(r, i);
+ if (o.state > sBt)
+ throw new Error("too late; already scheduled");
+ return o;
+}
+function ET(r, i) {
+ var o = M9(r, i);
+ if (o.state > Hpe)
+ throw new Error("too late; already running");
+ return o;
+}
+function M9(r, i) {
+ var o = r.__transition;
+ if (!o || !(o = o[i]))
+ throw new Error("transition not found");
+ return o;
+}
+function A4n(r, i) {
+ var o, l;
+ return function() {
+ var f = ET(this, r), g = f.tween;
+ if (g !== o) {
+ for (var A = 0, b = (l = o = g).length; A < b; ++A)
+ if (l[A].name === i) {
+ l = Da(l).call(l), gk(l).call(l, A, 1);
+ break;
+ }
+ }
+ f.tween = l;
+ };
+}
+function g4n(r, i, o) {
+ var l, f;
+ if (typeof o != "function")
+ throw new Error();
+ return function() {
+ var g = ET(this, r), A = g.tween;
+ if (A !== l) {
+ var b;
+ f = Da(b = l = A).call(b);
+ for (var v = { name: i, value: o }, k = 0, _ = f.length; k < _; ++k)
+ if (f[k].name === i) {
+ f[k] = v;
+ break;
+ }
+ k === _ && f.push(v);
+ }
+ g.tween = f;
+ };
+}
+function XFe(r, i, o) {
+ var l = r._id;
+ return r.each(function() {
+ var f = ET(this, l);
+ (f.value || (f.value = {}))[i] = o.apply(this, arguments);
+ }), function(f) {
+ return M9(f, l).value[i];
+ };
+}
+function Jkt(r, i) {
+ var o;
+ return (typeof i == "number" ? F9 : i instanceof h$ ? qme : (o = h$(i)) ? (i = o, qme) : tBt)(r, i);
+}
+function p4n(r) {
+ return function() {
+ this.removeAttribute(r);
+ };
+}
+function m4n(r) {
+ return function() {
+ this.removeAttributeNS(r.space, r.local);
+ };
+}
+function b4n(r, i, o) {
+ var l, f, g = o + "";
+ return function() {
+ var A = this.getAttribute(r);
+ return A === g ? null : A === l ? f : f = i(l = A, o);
+ };
+}
+function v4n(r, i, o) {
+ var l, f, g = o + "";
+ return function() {
+ var A = this.getAttributeNS(r.space, r.local);
+ return A === g ? null : A === l ? f : f = i(l = A, o);
+ };
+}
+function y4n(r, i, o) {
+ var l, f, g;
+ return function() {
+ var A, b, v = o(this);
+ if (v != null)
+ return (A = this.getAttribute(r)) === (b = v + "") ? null : A === l && b === f ? g : (f = b, g = i(l = A, v));
+ this.removeAttribute(r);
+ };
+}
+function w4n(r, i, o) {
+ var l, f, g;
+ return function() {
+ var A, b, v = o(this);
+ if (v != null)
+ return (A = this.getAttributeNS(r.space, r.local)) === (b = v + "") ? null : A === l && b === f ? g : (f = b, g = i(l = A, v));
+ this.removeAttributeNS(r.space, r.local);
+ };
+}
+function k4n(r, i) {
+ var o, l;
+ function f() {
+ var g = i.apply(this, arguments);
+ return g !== l && (o = (l = g) && /* @__PURE__ */ function(A, b) {
+ return function(v) {
+ this.setAttributeNS(A.space, A.local, b.call(this, v));
+ };
+ }(r, g)), o;
+ }
+ return f._value = i, f;
+}
+function x4n(r, i) {
+ var o, l;
+ function f() {
+ var g = i.apply(this, arguments);
+ return g !== l && (o = (l = g) && /* @__PURE__ */ function(A, b) {
+ return function(v) {
+ this.setAttribute(A, b.call(this, v));
+ };
+ }(r, g)), o;
+ }
+ return f._value = i, f;
+}
+function C4n(r, i) {
+ return function() {
+ bRe(this, r).delay = +i.apply(this, arguments);
+ };
+}
+function _4n(r, i) {
+ return i = +i, function() {
+ bRe(this, r).delay = i;
+ };
+}
+function E4n(r, i) {
+ return function() {
+ ET(this, r).duration = +i.apply(this, arguments);
+ };
+}
+function T4n(r, i) {
+ return i = +i, function() {
+ ET(this, r).duration = i;
+ };
+}
+function B4n(r, i, o) {
+ var l, f, g = function(A) {
+ var b, v;
+ return yG(b = Go(v = A + "").call(v).split(/^|\s+/)).call(b, function(k) {
+ var _ = Lu(k).call(k, ".");
+ return _ >= 0 && (k = Da(k).call(k, 0, _)), !k || k === "start";
+ });
+ }(i) ? bRe : ET;
+ return function() {
+ var A = g(this, r), b = A.on;
+ b !== l && (f = (l = b).copy()).on(i, o), A.on = f;
+ };
+}
+var S4n = oie.prototype.constructor;
+function Zkt(r) {
+ return function() {
+ this.style.removeProperty(r);
+ };
+}
+var L4n = 0;
+function JS(r, i, o, l) {
+ this._groups = r, this._parents = i, this._name = o, this._id = l;
+}
+function cBt() {
+ return ++L4n;
+}
+var zS = oie.prototype;
+JS.prototype = Ui({ constructor: JS, select: function(r) {
+ var i = this._name, o = this._id;
+ typeof r != "function" && (r = oNe(r));
+ for (var l = this._groups, f = l.length, g = new Array(f), A = 0; A < f; ++A)
+ for (var b, v, k = l[A], _ = k.length, T = g[A] = new Array(_), L = 0; L < _; ++L)
+ (b = k[L]) && (v = r.call(b, b.__data__, L, k)) && ("__data__" in b && (v.__data__ = b.__data__), T[L] = v, Kpe(T[L], i, o, L, T, M9(b, o)));
+ return new JS(g, this._parents, i, o);
+}, selectAll: function(r) {
+ var i = this._name, o = this._id;
+ typeof r != "function" && (r = DTt(r));
+ for (var l = this._groups, f = l.length, g = [], A = [], b = 0; b < f; ++b)
+ for (var v, k = l[b], _ = k.length, T = 0; T < _; ++T)
+ if (v = k[T]) {
+ for (var L, F = r.call(v, v.__data__, T, k), U = M9(v, o), q = 0, Z = F.length; q < Z; ++q)
+ (L = F[q]) && Kpe(L, i, o, q, F, U);
+ g.push(F), A.push(v);
+ }
+ return new JS(g, A, i, o);
+}, selectChild: zS.selectChild, selectChildren: zS.selectChildren, filter: function(r) {
+ typeof r != "function" && (r = NTt(r));
+ for (var i = this._groups, o = i.length, l = new Array(o), f = 0; f < o; ++f)
+ for (var g, A = i[f], b = A.length, v = l[f] = [], k = 0; k < b; ++k)
+ (g = A[k]) && r.call(g, g.__data__, k, A) && v.push(g);
+ return new JS(l, this._parents, this._name, this._id);
+}, merge: function(r) {
+ if (r._id !== this._id)
+ throw new Error();
+ for (var i = this._groups, o = r._groups, l = i.length, f = o.length, g = Math.min(l, f), A = new Array(l), b = 0; b < g; ++b)
+ for (var v, k = i[b], _ = o[b], T = k.length, L = A[b] = new Array(T), F = 0; F < T; ++F)
+ (v = k[F] || _[F]) && (L[F] = v);
+ for (; b < l; ++b)
+ A[b] = i[b];
+ return new JS(A, this._parents, this._name, this._id);
+}, selection: function() {
+ return new S4n(this._groups, this._parents);
+}, transition: function() {
+ for (var r = this._name, i = this._id, o = cBt(), l = this._groups, f = l.length, g = 0; g < f; ++g)
+ for (var A, b = l[g], v = b.length, k = 0; k < v; ++k)
+ if (A = b[k]) {
+ var _ = M9(A, i);
+ Kpe(A, r, o, k, b, { time: _.time + _.delay + _.duration, delay: 0, duration: _.duration, ease: _.ease });
+ }
+ return new JS(l, this._parents, r, o);
+}, call: zS.call, nodes: zS.nodes, node: zS.node, size: zS.size, empty: zS.empty, each: zS.each, on: function(r, i) {
+ var o = this._id;
+ return arguments.length < 2 ? M9(this.node(), o).on.on(r) : this.each(B4n(o, r, i));
+}, attr: function(r, i) {
+ var o = Xme(r), l = o === "transform" ? c4n : Jkt;
+ return this.attrTween(r, typeof i == "function" ? (o.local ? w4n : y4n)(o, l, XFe(this, "attr." + r, i)) : i == null ? (o.local ? m4n : p4n)(o) : (o.local ? v4n : b4n)(o, l, i));
+}, attrTween: function(r, i) {
+ var o = "attr." + r;
+ if (arguments.length < 2)
+ return (o = this.tween(o)) && o._value;
+ if (i == null)
+ return this.tween(o, null);
+ if (typeof i != "function")
+ throw new Error();
+ var l = Xme(r);
+ return this.tween(o, (l.local ? k4n : x4n)(l, i));
+}, style: function(r, i, o) {
+ var l = (r += "") == "transform" ? s4n : Jkt;
+ return i == null ? this.styleTween(r, /* @__PURE__ */ function(f, g) {
+ var A, b, v;
+ return function() {
+ var k = rG(this, f), _ = (this.style.removeProperty(f), rG(this, f));
+ return k === _ ? null : k === A && _ === b ? v : v = g(A = k, b = _);
+ };
+ }(r, l)).on("end.style." + r, Zkt(r)) : typeof i == "function" ? this.styleTween(r, /* @__PURE__ */ function(f, g, A) {
+ var b, v, k;
+ return function() {
+ var _ = rG(this, f), T = A(this), L = T + "";
+ return T == null && (this.style.removeProperty(f), L = T = rG(this, f)), _ === L ? null : _ === b && L === v ? k : (v = L, k = g(b = _, T));
+ };
+ }(r, l, XFe(this, "style." + r, i))).each(function(f, g) {
+ var A, b, v, k, _ = "style." + g, T = "end." + _;
+ return function() {
+ var L = ET(this, f), F = L.on, U = L.value[_] == null ? k || (k = Zkt(g)) : void 0;
+ F === A && v === U || (b = (A = F).copy()).on(T, v = U), L.on = b;
+ };
+ }(this._id, r)) : this.styleTween(r, function(f, g, A) {
+ var b, v, k = A + "";
+ return function() {
+ var _ = rG(this, f);
+ return _ === k ? null : _ === b ? v : v = g(b = _, A);
+ };
+ }(r, l, i), o).on("end.style." + r, null);
+}, styleTween: function(r, i, o) {
+ var l = "style." + (r += "");
+ if (arguments.length < 2)
+ return (l = this.tween(l)) && l._value;
+ if (i == null)
+ return this.tween(l, null);
+ if (typeof i != "function")
+ throw new Error();
+ return this.tween(l, function(f, g, A) {
+ var b, v;
+ function k() {
+ var _ = g.apply(this, arguments);
+ return _ !== v && (b = (v = _) && /* @__PURE__ */ function(T, L, F) {
+ return function(U) {
+ this.style.setProperty(T, L.call(this, U), F);
+ };
+ }(f, _, A)), b;
+ }
+ return k._value = g, k;
+ }(r, i, o ?? ""));
+}, text: function(r) {
+ return this.tween("text", typeof r == "function" ? /* @__PURE__ */ function(i) {
+ return function() {
+ var o = i(this);
+ this.textContent = o ?? "";
+ };
+ }(XFe(this, "text", r)) : /* @__PURE__ */ function(i) {
+ return function() {
+ this.textContent = i;
+ };
+ }(r == null ? "" : r + ""));
+}, textTween: function(r) {
+ var i = "text";
+ if (arguments.length < 1)
+ return (i = this.tween(i)) && i._value;
+ if (r == null)
+ return this.tween(i, null);
+ if (typeof r != "function")
+ throw new Error();
+ return this.tween(i, function(o) {
+ var l, f;
+ function g() {
+ var A = o.apply(this, arguments);
+ return A !== f && (l = (f = A) && /* @__PURE__ */ function(b) {
+ return function(v) {
+ this.textContent = b.call(this, v);
+ };
+ }(A)), l;
+ }
+ return g._value = o, g;
+ }(r));
+}, remove: function() {
+ return this.on("end.remove", /* @__PURE__ */ function(r) {
+ return function() {
+ var i = this.parentNode;
+ for (var o in this.__transition)
+ if (+o !== r)
+ return;
+ i && i.removeChild(this);
+ };
+ }(this._id));
+}, tween: function(r, i) {
+ var o = this._id;
+ if (r += "", arguments.length < 2) {
+ for (var l, f = M9(this.node(), o).tween, g = 0, A = f.length; g < A; ++g)
+ if ((l = f[g]).name === r)
+ return l.value;
+ return null;
+ }
+ return this.each((i == null ? A4n : g4n)(o, r, i));
+}, delay: function(r) {
+ var i = this._id;
+ return arguments.length ? this.each((typeof r == "function" ? C4n : _4n)(i, r)) : M9(this.node(), i).delay;
+}, duration: function(r) {
+ var i = this._id;
+ return arguments.length ? this.each((typeof r == "function" ? E4n : T4n)(i, r)) : M9(this.node(), i).duration;
+}, ease: function(r) {
+ var i = this._id;
+ return arguments.length ? this.each(function(o, l) {
+ if (typeof l != "function")
+ throw new Error();
+ return function() {
+ ET(this, o).ease = l;
+ };
+ }(i, r)) : M9(this.node(), i).ease;
+}, easeVarying: function(r) {
+ if (typeof r != "function")
+ throw new Error();
+ return this.each(/* @__PURE__ */ function(i, o) {
+ return function() {
+ var l = o.apply(this, arguments);
+ if (typeof l != "function")
+ throw new Error();
+ ET(this, i).ease = l;
+ };
+ }(this._id, r));
+}, end: function() {
+ var r, i, o = this, l = o._id, f = o.size();
+ return new lRe(function(g, A) {
+ var b = { value: A }, v = { value: function() {
+ --f == 0 && g();
+ } };
+ o.each(function() {
+ var k = ET(this, l), _ = k.on;
+ _ !== r && ((i = (r = _).copy())._.cancel.push(b), i._.interrupt.push(b), i._.end.push(v)), k.on = i;
+ }), f === 0 && g();
+ });
+} }, FTt, QO(zS));
+var ext, txt, nxt, I4n = { time: null, delay: 0, duration: 250, ease: function(r) {
+ return ((r *= 2) <= 1 ? r * r * r : (r -= 2) * r * r + 2) / 2;
+} };
+function M4n(r, i) {
+ for (var o; !(o = r.__transition) || !(o = o[i]); )
+ if (!(r = r.parentNode))
+ throw new Error("transition ".concat(i, " not found"));
+ return o;
+}
+function WFe(r) {
+ return { type: r };
+}
+oie.prototype.interrupt = function(r) {
+ return this.each(function() {
+ (function(i, o) {
+ var l, f, g, A = i.__transition, b = !0;
+ if (A) {
+ for (g in o = o == null ? null : o + "", A)
+ (l = A[g]).name === o ? (f = l.state > fNe && l.state < dNe, l.state = jpe, l.timer.stop(), l.on.call(f ? "interrupt" : "cancel", i, i.__data__, l.index, l.group), delete A[g]) : b = !1;
+ b && delete i.__transition;
+ }
+ })(this, r);
+ });
+}, oie.prototype.transition = function(r) {
+ var i, o;
+ r instanceof JS ? (i = r._id, r = r._name) : (i = cBt(), (o = I4n).time = mRe(), r = r == null ? null : r + "");
+ for (var l = this._groups, f = l.length, g = 0; g < f; ++g)
+ for (var A, b = l[g], v = b.length, k = 0; k < v; ++k)
+ (A = b[k]) && Kpe(A, r, i, k, b, o || M4n(A, i));
+ return new JS(l, this._parents, r, i);
+}, Zs(ext = ["w", "e"]).call(ext, WFe), Zs(txt = ["n", "s"]).call(txt, WFe), Zs(nxt = ["n", "w", "e", "s", "nw", "ne", "sw", "se"]).call(nxt, WFe);
+var ANe = Math.PI, gNe = 2 * ANe, RQ = 1e-6, F4n = gNe - RQ;
+function pNe() {
+ this._x0 = this._y0 = this._x1 = this._y1 = null, this._ = "";
+}
+function vRe() {
+ return new pNe();
+}
+pNe.prototype = vRe.prototype = { constructor: pNe, moveTo: function(r, i) {
+ this._ += "M" + (this._x0 = this._x1 = +r) + "," + (this._y0 = this._y1 = +i);
+}, closePath: function() {
+ this._x1 !== null && (this._x1 = this._x0, this._y1 = this._y0, this._ += "Z");
+}, lineTo: function(r, i) {
+ this._ += "L" + (this._x1 = +r) + "," + (this._y1 = +i);
+}, quadraticCurveTo: function(r, i, o, l) {
+ this._ += "Q" + +r + "," + +i + "," + (this._x1 = +o) + "," + (this._y1 = +l);
+}, bezierCurveTo: function(r, i, o, l, f, g) {
+ this._ += "C" + +r + "," + +i + "," + +o + "," + +l + "," + (this._x1 = +f) + "," + (this._y1 = +g);
+}, arcTo: function(r, i, o, l, f) {
+ r = +r, i = +i, o = +o, l = +l, f = +f;
+ var g = this._x1, A = this._y1, b = o - r, v = l - i, k = g - r, _ = A - i, T = k * k + _ * _;
+ if (f < 0)
+ throw new Error("negative radius: " + f);
+ if (this._x1 === null)
+ this._ += "M" + (this._x1 = r) + "," + (this._y1 = i);
+ else if (T > RQ)
+ if (Math.abs(_ * b - v * k) > RQ && f) {
+ var L = o - g, F = l - A, U = b * b + v * v, q = L * L + F * F, Z = Math.sqrt(U), R = Math.sqrt(T), J = f * Math.tan((ANe - Math.acos((U + T - q) / (2 * Z * R))) / 2), he = J / R, Y = J / Z;
+ Math.abs(he - 1) > RQ && (this._ += "L" + (r + he * k) + "," + (i + he * _)), this._ += "A" + f + "," + f + ",0,0," + +(_ * L > k * F) + "," + (this._x1 = r + Y * b) + "," + (this._y1 = i + Y * v);
+ } else
+ this._ += "L" + (this._x1 = r) + "," + (this._y1 = i);
+}, arc: function(r, i, o, l, f, g) {
+ r = +r, i = +i, g = !!g;
+ var A = (o = +o) * Math.cos(l), b = o * Math.sin(l), v = r + A, k = i + b, _ = 1 ^ g, T = g ? l - f : f - l;
+ if (o < 0)
+ throw new Error("negative radius: " + o);
+ this._x1 === null ? this._ += "M" + v + "," + k : (Math.abs(this._x1 - v) > RQ || Math.abs(this._y1 - k) > RQ) && (this._ += "L" + v + "," + k), o && (T < 0 && (T = T % gNe + gNe), T > F4n ? this._ += "A" + o + "," + o + ",0,1," + _ + "," + (r - A) + "," + (i - b) + "A" + o + "," + o + ",0,1," + _ + "," + (this._x1 = v) + "," + (this._y1 = k) : T > RQ && (this._ += "A" + o + "," + o + ",0," + +(T >= ANe) + "," + _ + "," + (this._x1 = r + o * Math.cos(f)) + "," + (this._y1 = i + o * Math.sin(f))));
+}, rect: function(r, i, o, l) {
+ this._ += "M" + (this._x0 = this._x1 = +r) + "," + (this._y0 = this._y1 = +i) + "h" + +o + "v" + +l + "h" + -o + "Z";
+}, toString: function() {
+ return this._;
+} };
+var rxt = Math.hypot, O4n = Math.abs, D4n = Math.sqrt, N4n = !!rxt && rxt(1 / 0, NaN) !== 1 / 0;
+qa({ target: "Math", stat: !0, arity: 2, forced: N4n }, { hypot: function(r, i) {
+ for (var o, l, f = 0, g = 0, A = arguments.length, b = 0; g < A; )
+ b < (o = O4n(arguments[g++])) ? (f = f * (l = b / o) * l + 1, b = o) : f += o > 0 ? (l = o / b) * l : o;
+ return b === 1 / 0 ? 1 / 0 : b * D4n(f);
+} }), ql.Math.hypot;
+function Zme(r, i) {
+ var o;
+ if ((l = Lu(o = r = i ? r.toExponential(i - 1) : r.toExponential()).call(o, "e")) < 0)
+ return null;
+ var l, f = Da(r).call(r, 0, l);
+ return [f.length > 1 ? f[0] + Da(f).call(f, 2) : f, +Da(r).call(r, l + 1)];
+}
+function iG(r) {
+ return (r = Zme(Math.abs(r))) ? r[1] : NaN;
+}
+var lBt, P4n = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
+function ebe(r) {
+ var i, o;
+ if (!(o = P4n.exec(r)))
+ throw new Error("invalid format: " + r);
+ return new mNe({ fill: o[1], align: o[2], sign: o[3], symbol: o[4], zero: o[5], width: o[6], comma: o[7], precision: o[8] && Da(i = o[8]).call(i, 1), trim: o[9], type: o[10] });
+}
+function mNe(r) {
+ this.fill = UG(r) === void 0 ? " " : UG(r) + "", this.align = r.align === void 0 ? ">" : r.align + "", this.sign = r.sign === void 0 ? "-" : r.sign + "", this.symbol = r.symbol === void 0 ? "" : r.symbol + "", this.zero = !!r.zero, this.width = r.width === void 0 ? void 0 : +r.width, this.comma = !!r.comma, this.precision = r.precision === void 0 ? void 0 : +r.precision, this.trim = !!Go(r), this.type = r.type === void 0 ? "" : r.type + "";
+}
+function ixt(r, i) {
+ var o = Zme(r, i);
+ if (!o)
+ return r + "";
+ var l = o[0], f = o[1];
+ return f < 0 ? "0." + new Array(-f).join("0") + l : l.length > f + 1 ? Da(l).call(l, 0, f + 1) + "." + Da(l).call(l, f + 1) : l + new Array(f - l.length + 2).join("0");
+}
+ebe.prototype = mNe.prototype, mNe.prototype.toString = function() {
+ return UG(this) + this.align + this.sign + this.symbol + (this.zero ? "0" : "") + (this.width === void 0 ? "" : Math.max(1, 0 | this.width)) + (this.comma ? "," : "") + (this.precision === void 0 ? "" : "." + Math.max(0, 0 | this.precision)) + (Go(this) ? "~" : "") + this.type;
+};
+var axt = { "%": function(r, i) {
+ return (100 * r).toFixed(i);
+}, b: function(r) {
+ return Math.round(r).toString(2);
+}, c: function(r) {
+ return r + "";
+}, d: function(r) {
+ return Math.abs(r = Math.round(r)) >= 1e21 ? r.toLocaleString("en").replace(/,/g, "") : r.toString(10);
+}, e: function(r, i) {
+ return r.toExponential(i);
+}, f: function(r, i) {
+ return r.toFixed(i);
+}, g: function(r, i) {
+ return r.toPrecision(i);
+}, o: function(r) {
+ return Math.round(r).toString(8);
+}, p: function(r, i) {
+ return ixt(100 * r, i);
+}, r: ixt, s: function(r, i) {
+ var o = Zme(r, i);
+ if (!o)
+ return r + "";
+ var l = o[0], f = o[1], g = f - (lBt = 3 * Math.max(-8, Math.min(8, Math.floor(f / 3)))) + 1, A = l.length;
+ return g === A ? l : g > A ? l + new Array(g - A + 1).join("0") : g > 0 ? Da(l).call(l, 0, g) + "." + Da(l).call(l, g) : "0." + new Array(1 - g).join("0") + Zme(r, Math.max(0, i + g - 1))[0];
+}, X: function(r) {
+ return Math.round(r).toString(16).toUpperCase();
+}, x: function(r) {
+ return Math.round(r).toString(16);
+} };
+function oxt(r) {
+ return r;
+}
+var VFe, uBt, hBt, sxt = Zs(Array.prototype), cxt = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
+function R4n(r) {
+ var i, o, l = r.grouping === void 0 || r.thousands === void 0 ? oxt : (i = sxt.call(r.grouping, Number), o = r.thousands + "", function(L, F) {
+ for (var U = L.length, q = [], Z = 0, R = i[0], J = 0; U > 0 && R > 0 && (J + R + 1 > F && (R = Math.max(1, F - J)), q.push(L.substring(U -= R, U + R)), !((J += R + 1) > F)); )
+ R = i[Z = (Z + 1) % i.length];
+ return TL(q).call(q).join(o);
+ }), f = r.currency === void 0 ? "" : r.currency[0] + "", g = r.currency === void 0 ? "" : r.currency[1] + "", A = r.decimal === void 0 ? "." : r.decimal + "", b = r.numerals === void 0 ? oxt : /* @__PURE__ */ function(L) {
+ return function(F) {
+ return F.replace(/[0-9]/g, function(U) {
+ return L[+U];
+ });
+ };
+ }(sxt.call(r.numerals, String)), v = r.percent === void 0 ? "%" : r.percent + "", k = r.minus === void 0 ? "−" : r.minus + "", _ = r.nan === void 0 ? "NaN" : r.nan + "";
+ function T(L) {
+ L = ebe(L);
+ var F = UG(L), U = L.align, q = L.sign, Z = L.symbol, R = L.zero, J = L.width, he = L.comma, Y = L.precision, ue = Go(L), le = L.type;
+ le === "n" ? (he = !0, le = "g") : axt[le] || (Y === void 0 && (Y = 12), ue = !0, le = "g"), (R || F === "0" && U === "=") && (R = !0, F = "0", U = "=");
+ var be = Z === "$" ? f : Z === "#" && /[boxX]/.test(le) ? "0" + le.toLowerCase() : "", ke = Z === "$" ? g : /[%p]/.test(le) ? v : "", de = axt[le], Te = /[defgprs%]/.test(le);
+ function xe(ie) {
+ var Be, te, Me, ve = be, ge = ke;
+ if (le === "c")
+ ge = de(ie) + ge, ie = "";
+ else {
+ var Je = (ie = +ie) < 0 || 1 / ie < 0;
+ if (ie = isNaN(ie) ? _ : de(Math.abs(ie), Y), ue && (ie = function(gt) {
+ e:
+ for (var je, Qe = gt.length, kt = 1, Wt = -1; kt < Qe; ++kt)
+ switch (gt[kt]) {
+ case ".":
+ Wt = je = kt;
+ break;
+ case "0":
+ Wt === 0 && (Wt = kt), je = kt;
+ break;
+ default:
+ if (!+gt[kt])
+ break e;
+ Wt > 0 && (Wt = 0);
+ }
+ return Wt > 0 ? Da(gt).call(gt, 0, Wt) + Da(gt).call(gt, je + 1) : gt;
+ }(ie)), Je && +ie == 0 && q !== "+" && (Je = !1), ve = (Je ? q === "(" ? q : k : q === "-" || q === "(" ? "" : q) + ve, ge = (le === "s" ? cxt[8 + lBt / 3] : "") + ge + (Je && q === "(" ? ")" : ""), Te) {
+ for (Be = -1, te = ie.length; ++Be < te; )
+ if (48 > (Me = ie.charCodeAt(Be)) || Me > 57) {
+ ge = (Me === 46 ? A + Da(ie).call(ie, Be + 1) : Da(ie).call(ie, Be)) + ge, ie = Da(ie).call(ie, 0, Be);
+ break;
+ }
+ }
+ }
+ he && !R && (ie = l(ie, 1 / 0));
+ var ot = ve.length + ie.length + ge.length, bt = ot < J ? new Array(J - ot + 1).join(F) : "";
+ switch (he && R && (ie = l(bt + ie, bt.length ? J - ge.length : 1 / 0), bt = ""), U) {
+ case "<":
+ ie = ve + ie + ge + bt;
+ break;
+ case "=":
+ ie = ve + bt + ie + ge;
+ break;
+ case "^":
+ ie = Da(bt).call(bt, 0, ot = bt.length >> 1) + ve + ie + ge + Da(bt).call(bt, ot);
+ break;
+ default:
+ ie = bt + ve + ie + ge;
+ }
+ return b(ie);
+ }
+ return Y = Y === void 0 ? 6 : /[gprs]/.test(le) ? Math.max(1, Math.min(21, Y)) : Math.max(0, Math.min(20, Y)), xe.toString = function() {
+ return L + "";
+ }, xe;
+ }
+ return { format: T, formatPrefix: function(L, F) {
+ var U = T(((L = ebe(L)).type = "f", L)), q = 3 * Math.max(-8, Math.min(8, Math.floor(iG(F) / 3))), Z = Math.pow(10, -q), R = cxt[8 + q / 3];
+ return function(J) {
+ return U(Z * J) + R;
+ };
+ } };
+}
+function yRe(r, i) {
+ switch (arguments.length) {
+ case 0:
+ break;
+ case 1:
+ this.range(r);
+ break;
+ default:
+ this.range(i).domain(r);
+ }
+ return this;
+}
+function Q4n(r, i) {
+ var o = dX !== void 0 && QO(r) || r["@@iterator"];
+ if (!o) {
+ if (kk(r) || (o = function(v, k) {
+ var _;
+ if (v) {
+ if (typeof v == "string")
+ return lxt(v, k);
+ var T = Da(_ = Object.prototype.toString.call(v)).call(_, 8, -1);
+ if (T === "Object" && v.constructor && (T = v.constructor.name), T === "Map" || T === "Set")
+ return Su(v);
+ if (T === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(T))
+ return lxt(v, k);
+ }
+ }(r)) || i && r && typeof r.length == "number") {
+ o && (r = o);
+ var l = 0, f = function() {
+ };
+ return { s: f, n: function() {
+ return l >= r.length ? { done: !0 } : { done: !1, value: r[l++] };
+ }, e: function(v) {
+ throw v;
+ }, f };
+ }
+ throw new TypeError(`Invalid attempt to iterate non-iterable instance.
+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
+ }
+ var g, A = !0, b = !1;
+ return { s: function() {
+ o = o.call(r);
+ }, n: function() {
+ var v = o.next();
+ return A = v.done, v;
+ }, e: function(v) {
+ b = !0, g = v;
+ }, f: function() {
+ try {
+ A || o.return == null || o.return();
+ } finally {
+ if (b)
+ throw g;
+ }
+ } };
+}
+function lxt(r, i) {
+ (i == null || i > r.length) && (i = r.length);
+ for (var o = 0, l = new Array(i); o < i; o++)
+ l[o] = r[o];
+ return l;
+}
+VFe = R4n({ thousands: ",", grouping: [3], currency: ["$", ""] }), uBt = VFe.format, hBt = VFe.formatPrefix;
+var uxt = dX("implicit");
+function fBt() {
+ var r = new ckt(), i = [], o = [], l = uxt;
+ function f(g) {
+ var A = r.get(g);
+ if (A === void 0) {
+ if (l !== uxt)
+ return l;
+ r.set(g, A = i.push(g) - 1);
+ }
+ return o[A % o.length];
+ }
+ return f.domain = function(g) {
+ if (!arguments.length)
+ return Da(i).call(i);
+ i = [], r = new ckt();
+ var A, b = Q4n(g);
+ try {
+ for (b.s(); !(A = b.n()).done; ) {
+ var v = A.value;
+ r.has(v) || r.set(v, i.push(v) - 1);
+ }
+ } catch (k) {
+ b.e(k);
+ } finally {
+ b.f();
+ }
+ return f;
+ }, f.range = function(g) {
+ return arguments.length ? (o = Su(g), f) : Da(o).call(o);
+ }, f.unknown = function(g) {
+ return arguments.length ? (l = g, f) : l;
+ }, f.copy = function() {
+ return fBt(i, o).unknown(l);
+ }, yRe.apply(f, arguments), f;
+}
+function $4n(r) {
+ return +r;
+}
+var hxt = [0, 1];
+function hG(r) {
+ return r;
+}
+function bNe(r, i) {
+ return (i -= r = +r) ? function(o) {
+ return (o - r) / i;
+ } : /* @__PURE__ */ function(o) {
+ return function() {
+ return o;
+ };
+ }(isNaN(i) ? NaN : 0.5);
+}
+function U4n(r, i, o) {
+ var l = r[0], f = r[1], g = i[0], A = i[1];
+ return f < l ? (l = bNe(f, l), g = o(A, g)) : (l = bNe(l, f), g = o(g, A)), function(b) {
+ return g(l(b));
+ };
+}
+function H4n(r, i, o) {
+ var l, f, g = Math.min(r.length, i.length) - 1, A = new Array(g), b = new Array(g), v = -1;
+ for (r[g] < r[0] && (r = TL(l = Da(r).call(r)).call(l), i = TL(f = Da(i).call(i)).call(f)); ++v < g; )
+ A[v] = bNe(r[v], r[v + 1]), b[v] = o(i[v], i[v + 1]);
+ return function(k) {
+ var _ = Bwn(r, k, 1, g) - 1;
+ return b[_](A[_](k));
+ };
+}
+function dBt(r, i) {
+ return i.domain(r.domain()).range(r.range()).interpolate(r.interpolate()).clamp(r.clamp()).unknown(r.unknown());
+}
+function j4n() {
+ var r, i, o, l, f, g, A = hxt, b = hxt, v = pRe, k = hG;
+ function _() {
+ var L, F, U, q = Math.min(A.length, b.length);
+ return k !== hG && (L = A[0], F = A[q - 1], L > F && (U = L, L = F, F = U), k = function(Z) {
+ return Math.max(L, Math.min(F, Z));
+ }), l = q > 2 ? H4n : U4n, f = g = null, T;
+ }
+ function T(L) {
+ return L == null || isNaN(L = +L) ? o : (f || (f = l(Zs(A).call(A, r), b, v)))(r(k(L)));
+ }
+ return T.invert = function(L) {
+ return k(i((g || (g = l(b, Zs(A).call(A, r), F9)))(L)));
+ }, T.domain = function(L) {
+ return arguments.length ? (A = Su(L, $4n), _()) : Da(A).call(A);
+ }, T.range = function(L) {
+ return arguments.length ? (b = Su(L), _()) : Da(b).call(b);
+ }, T.rangeRound = function(L) {
+ return b = Su(L), v = o4n, _();
+ }, T.clamp = function(L) {
+ return arguments.length ? (k = !!L || hG, _()) : k !== hG;
+ }, T.interpolate = function(L) {
+ return arguments.length ? (v = L, _()) : v;
+ }, T.unknown = function(L) {
+ return arguments.length ? (o = L, T) : o;
+ }, function(L, F) {
+ return r = L, i = F, _();
+ };
+}
+function ABt() {
+ return j4n()(hG, hG);
+}
+function K4n(r, i, o, l) {
+ var f, g = rNe(r, i, o);
+ switch ((l = ebe(l ?? ",f")).type) {
+ case "s":
+ var A = Math.max(Math.abs(r), Math.abs(i));
+ return l.precision != null || isNaN(f = function(b, v) {
+ return Math.max(0, 3 * Math.max(-8, Math.min(8, Math.floor(iG(v) / 3))) - iG(Math.abs(b)));
+ }(g, A)) || (l.precision = f), hBt(l, A);
+ case "":
+ case "e":
+ case "g":
+ case "p":
+ case "r":
+ l.precision != null || isNaN(f = function(b, v) {
+ return b = Math.abs(b), v = Math.abs(v) - b, Math.max(0, iG(v) - iG(b)) + 1;
+ }(g, Math.max(Math.abs(r), Math.abs(i)))) || (l.precision = f - (l.type === "e"));
+ break;
+ case "f":
+ case "%":
+ l.precision != null || isNaN(f = function(b) {
+ return Math.max(0, -iG(Math.abs(b)));
+ }(g)) || (l.precision = f - 2 * (l.type === "%"));
+ }
+ return uBt(l);
+}
+function z4n(r) {
+ var i = r.domain;
+ return r.ticks = function(o) {
+ var l = i();
+ return function(f, g, A) {
+ if (!((A = +A) > 0))
+ return [];
+ if ((f = +f) == (g = +g))
+ return [f];
+ var b = g < f, v = vh(b ? Gme(g, f, A) : Gme(f, g, A), 3), k = v[0], _ = v[1], T = v[2];
+ if (!(_ >= k))
+ return [];
+ var L = _ - k + 1, F = new Array(L);
+ if (b)
+ if (T < 0)
+ for (var U = 0; U < L; ++U)
+ F[U] = (_ - U) / -T;
+ else
+ for (var q = 0; q < L; ++q)
+ F[q] = (_ - q) * T;
+ else if (T < 0)
+ for (var Z = 0; Z < L; ++Z)
+ F[Z] = (k + Z) / -T;
+ else
+ for (var R = 0; R < L; ++R)
+ F[R] = (k + R) * T;
+ return F;
+ }(l[0], l[l.length - 1], o ?? 10);
+ }, r.tickFormat = function(o, l) {
+ var f = i();
+ return K4n(f[0], f[f.length - 1], o ?? 10, l);
+ }, r.nice = function(o) {
+ o == null && (o = 10);
+ var l, f, g = i(), A = 0, b = g.length - 1, v = g[A], k = g[b], _ = 10;
+ for (k < v && (f = v, v = k, k = f, f = A, A = b, b = f); _-- > 0; ) {
+ if ((f = nNe(v, k, o)) === l)
+ return g[A] = v, g[b] = k, i(g);
+ if (f > 0)
+ v = Math.floor(v / f) * f, k = Math.ceil(k / f) * f;
+ else {
+ if (!(f < 0))
+ break;
+ v = Math.ceil(v * f) / f, k = Math.floor(k * f) / f;
+ }
+ l = f;
+ }
+ return r;
+ }, r;
+}
+function gBt() {
+ var r = ABt();
+ return r.copy = function() {
+ return dBt(r, gBt());
+ }, yRe.apply(r, arguments), z4n(r);
+}
+var qFe = /* @__PURE__ */ new Date(), YFe = /* @__PURE__ */ new Date();
+function y2(r, i, o, l) {
+ function f(g) {
+ return r(g = arguments.length === 0 ? /* @__PURE__ */ new Date() : /* @__PURE__ */ new Date(+g)), g;
+ }
+ return f.floor = function(g) {
+ return r(g = /* @__PURE__ */ new Date(+g)), g;
+ }, f.ceil = function(g) {
+ return r(g = new Date(g - 1)), i(g, 1), r(g), g;
+ }, f.round = function(g) {
+ var A = f(g), b = f.ceil(g);
+ return g - A < b - g ? A : b;
+ }, f.offset = function(g, A) {
+ return i(g = /* @__PURE__ */ new Date(+g), A == null ? 1 : Math.floor(A)), g;
+ }, f.range = function(g, A, b) {
+ var v, k = [];
+ if (g = f.ceil(g), b = b == null ? 1 : Math.floor(b), !(g < A && b > 0))
+ return k;
+ do
+ k.push(v = /* @__PURE__ */ new Date(+g)), i(g, b), r(g);
+ while (v < g && g < A);
+ return k;
+ }, f.filter = function(g) {
+ return y2(function(A) {
+ if (A >= A)
+ for (; r(A), !g(A); )
+ A.setTime(A - 1);
+ }, function(A, b) {
+ if (A >= A)
+ if (b < 0)
+ for (; ++b <= 0; )
+ for (; i(A, -1), !g(A); )
+ ;
+ else
+ for (; --b >= 0; )
+ for (; i(A, 1), !g(A); )
+ ;
+ });
+ }, o && (f.count = function(g, A) {
+ return qFe.setTime(+g), YFe.setTime(+A), r(qFe), r(YFe), Math.floor(o(qFe, YFe));
+ }, f.every = function(g) {
+ return g = Math.floor(g), isFinite(g) && g > 0 ? g > 1 ? dd(f).call(f, l ? function(A) {
+ return l(A) % g == 0;
+ } : function(A) {
+ return f.count(0, A) % g == 0;
+ }) : f : null;
+ }), f;
+}
+var tbe = y2(function() {
+}, function(r, i) {
+ r.setTime(+r + i);
+}, function(r, i) {
+ return i - r;
+});
+tbe.every = function(r) {
+ return r = Math.floor(r), isFinite(r) && r > 0 ? r > 1 ? y2(function(i) {
+ i.setTime(Math.floor(i / r) * r);
+ }, function(i, o) {
+ i.setTime(+i + o * r);
+ }, function(i, o) {
+ return (o - i) / r;
+ }) : tbe : null;
+};
+var fxt = tbe;
+tbe.range;
+var lie = 1e3, LO = 6e4, uie = 36e5, wRe = 864e5, kRe = 6048e5, G4n = 2592e6, JFe = 31536e6, pBt = y2(function(r) {
+ r.setTime(r - r.getMilliseconds());
+}, function(r, i) {
+ r.setTime(+r + i * lie);
+}, function(r, i) {
+ return (i - r) / lie;
+}, function(r) {
+ return r.getUTCSeconds();
+}), ore = pBt;
+pBt.range;
+var mBt = y2(function(r) {
+ r.setTime(r - r.getMilliseconds() - r.getSeconds() * lie);
+}, function(r, i) {
+ r.setTime(+r + i * LO);
+}, function(r, i) {
+ return (i - r) / LO;
+}, function(r) {
+ return r.getMinutes();
+}), zpe = mBt;
+mBt.range;
+var bBt = y2(function(r) {
+ r.setTime(r - r.getMilliseconds() - r.getSeconds() * lie - r.getMinutes() * LO);
+}, function(r, i) {
+ r.setTime(+r + i * uie);
+}, function(r, i) {
+ return (i - r) / uie;
+}, function(r) {
+ return r.getHours();
+}), Gpe = bBt;
+bBt.range;
+var vBt = y2(function(r) {
+ return r.setHours(0, 0, 0, 0);
+}, function(r, i) {
+ return r.setDate(r.getDate() + i);
+}, function(r, i) {
+ return (i - r - (i.getTimezoneOffset() - r.getTimezoneOffset()) * LO) / wRe;
+}, function(r) {
+ return r.getDate() - 1;
+}), CG = vBt;
+function x$(r) {
+ return y2(function(i) {
+ i.setDate(i.getDate() - (i.getDay() + 7 - r) % 7), i.setHours(0, 0, 0, 0);
+ }, function(i, o) {
+ i.setDate(i.getDate() + 7 * o);
+ }, function(i, o) {
+ return (o - i - (o.getTimezoneOffset() - i.getTimezoneOffset()) * LO) / kRe;
+ });
+}
+vBt.range;
+var _G = x$(0), nbe = x$(1), X4n = x$(2), W4n = x$(3), zG = x$(4), V4n = x$(5), q4n = x$(6);
+_G.range, nbe.range, X4n.range, W4n.range, zG.range, V4n.range, q4n.range;
+var yBt = y2(function(r) {
+ r.setDate(1), r.setHours(0, 0, 0, 0);
+}, function(r, i) {
+ r.setMonth(r.getMonth() + i);
+}, function(r, i) {
+ return i.getMonth() - r.getMonth() + 12 * (i.getFullYear() - r.getFullYear());
+}, function(r) {
+ return r.getMonth();
+}), Xpe = yBt;
+yBt.range;
+var xRe = y2(function(r) {
+ r.setMonth(0, 1), r.setHours(0, 0, 0, 0);
+}, function(r, i) {
+ r.setFullYear(r.getFullYear() + i);
+}, function(r, i) {
+ return i.getFullYear() - r.getFullYear();
+}, function(r) {
+ return r.getFullYear();
+});
+xRe.every = function(r) {
+ return isFinite(r = Math.floor(r)) && r > 0 ? y2(function(i) {
+ i.setFullYear(Math.floor(i.getFullYear() / r) * r), i.setMonth(0, 1), i.setHours(0, 0, 0, 0);
+ }, function(i, o) {
+ i.setFullYear(i.getFullYear() + o * r);
+ }) : null;
+};
+var f$ = xRe;
+xRe.range;
+var wBt = y2(function(r) {
+ r.setUTCSeconds(0, 0);
+}, function(r, i) {
+ r.setTime(+r + i * LO);
+}, function(r, i) {
+ return (i - r) / LO;
+}, function(r) {
+ return r.getUTCMinutes();
+}), Y4n = wBt;
+wBt.range;
+var kBt = y2(function(r) {
+ r.setUTCMinutes(0, 0, 0);
+}, function(r, i) {
+ r.setTime(+r + i * uie);
+}, function(r, i) {
+ return (i - r) / uie;
+}, function(r) {
+ return r.getUTCHours();
+}), J4n = kBt;
+kBt.range;
+var xBt = y2(function(r) {
+ r.setUTCHours(0, 0, 0, 0);
+}, function(r, i) {
+ r.setUTCDate(r.getUTCDate() + i);
+}, function(r, i) {
+ return (i - r) / wRe;
+}, function(r) {
+ return r.getUTCDate() - 1;
+}), CRe = xBt;
+function C$(r) {
+ return y2(function(i) {
+ i.setUTCDate(i.getUTCDate() - (i.getUTCDay() + 7 - r) % 7), i.setUTCHours(0, 0, 0, 0);
+ }, function(i, o) {
+ i.setUTCDate(i.getUTCDate() + 7 * o);
+ }, function(i, o) {
+ return (o - i) / kRe;
+ });
+}
+xBt.range;
+var _Re = C$(0), rbe = C$(1), Z4n = C$(2), e5n = C$(3), GG = C$(4), t5n = C$(5), n5n = C$(6);
+_Re.range, rbe.range, Z4n.range, e5n.range, GG.range, t5n.range, n5n.range;
+var CBt = y2(function(r) {
+ r.setUTCDate(1), r.setUTCHours(0, 0, 0, 0);
+}, function(r, i) {
+ r.setUTCMonth(r.getUTCMonth() + i);
+}, function(r, i) {
+ return i.getUTCMonth() - r.getUTCMonth() + 12 * (i.getUTCFullYear() - r.getUTCFullYear());
+}, function(r) {
+ return r.getUTCMonth();
+}), r5n = CBt;
+CBt.range;
+var ERe = y2(function(r) {
+ r.setUTCMonth(0, 1), r.setUTCHours(0, 0, 0, 0);
+}, function(r, i) {
+ r.setUTCFullYear(r.getUTCFullYear() + i);
+}, function(r, i) {
+ return i.getUTCFullYear() - r.getUTCFullYear();
+}, function(r) {
+ return r.getUTCFullYear();
+});
+ERe.every = function(r) {
+ return isFinite(r = Math.floor(r)) && r > 0 ? y2(function(i) {
+ i.setUTCFullYear(Math.floor(i.getUTCFullYear() / r) * r), i.setUTCMonth(0, 1), i.setUTCHours(0, 0, 0, 0);
+ }, function(i, o) {
+ i.setUTCFullYear(i.getUTCFullYear() + o * r);
+ }) : null;
+};
+var XG = ERe;
+function _Bt(r, i, o, l, f, g) {
+ var A = [[ore, 1, lie], [ore, 5, 5e3], [ore, 15, 15e3], [ore, 30, 3e4], [g, 1, LO], [g, 5, 3e5], [g, 15, 9e5], [g, 30, 18e5], [f, 1, uie], [f, 3, 108e5], [f, 6, 216e5], [f, 12, 432e5], [l, 1, wRe], [l, 2, 1728e5], [o, 1, kRe], [i, 1, G4n], [i, 3, 7776e6], [r, 1, JFe]];
+ function b(v, k, _) {
+ var T = Math.abs(k - v) / _, L = dRe(function(Z) {
+ return vh(Z, 3)[2];
+ }).right(A, T);
+ if (L === A.length)
+ return yG(r).call(r, rNe(v / JFe, k / JFe, _));
+ if (L === 0)
+ return yG(fxt).call(fxt, Math.max(rNe(v, k, _), 1));
+ var F = vh(A[T / A[L - 1][2] < A[L][2] / T ? L - 1 : L], 2), U = F[0], q = F[1];
+ return yG(U).call(U, q);
+ }
+ return [function(v, k, _) {
+ var T = k < v;
+ if (T) {
+ var L = [k, v];
+ v = L[0], k = L[1];
+ }
+ var F = _ && typeof _.range == "function" ? _ : b(v, k, _), U = F ? F.range(v, +k + 1) : [];
+ return T ? TL(U).call(U) : U;
+ }, b];
+}
+ERe.range;
+var dxt = vh(_Bt(XG, r5n, _Re, CRe, J4n, Y4n), 2);
+dxt[0], dxt[1];
+var EBt = vh(_Bt(f$, Xpe, _G, CG, Gpe, zpe), 2), i5n = EBt[0], a5n = EBt[1];
+function ZFe(r) {
+ if (0 <= r.y && r.y < 100) {
+ var i = new Date(-1, r.m, r.d, r.H, r.M, r.S, r.L);
+ return i.setFullYear(r.y), i;
+ }
+ return new Date(r.y, r.m, r.d, r.H, r.M, r.S, r.L);
+}
+function eOe(r) {
+ if (0 <= r.y && r.y < 100) {
+ var i = new Date(Date.UTC(-1, r.m, r.d, r.H, r.M, r.S, r.L));
+ return i.setUTCFullYear(r.y), i;
+ }
+ return new Date(Date.UTC(r.y, r.m, r.d, r.H, r.M, r.S, r.L));
+}
+function Ine(r, i, o) {
+ return { y: r, m: i, d: o, H: 0, M: 0, S: 0, L: 0 };
+}
+var Mne, Wpe, Axt = { "-": "", _: " ", 0: "0" }, w2 = /^\s*\d+/, o5n = /^%/, s5n = /[\\^$*+?|[\]().{}]/g;
+function Vf(r, i, o) {
+ var l = r < 0 ? "-" : "", f = (l ? -r : r) + "", g = f.length;
+ return l + (g < o ? new Array(o - g + 1).join(i) + f : f);
+}
+function c5n(r) {
+ return r.replace(s5n, "\\$&");
+}
+function Fne(r) {
+ return new RegExp("^(?:" + Zs(r).call(r, c5n).join("|") + ")", "i");
+}
+function One(r) {
+ return new PTt(Zs(r).call(r, function(i, o) {
+ return [i.toLowerCase(), o];
+ }));
+}
+function l5n(r, i, o) {
+ var l = w2.exec(Da(i).call(i, o, o + 1));
+ return l ? (r.w = +l[0], o + l[0].length) : -1;
+}
+function u5n(r, i, o) {
+ var l = w2.exec(Da(i).call(i, o, o + 1));
+ return l ? (r.u = +l[0], o + l[0].length) : -1;
+}
+function h5n(r, i, o) {
+ var l = w2.exec(Da(i).call(i, o, o + 2));
+ return l ? (r.U = +l[0], o + l[0].length) : -1;
+}
+function f5n(r, i, o) {
+ var l = w2.exec(Da(i).call(i, o, o + 2));
+ return l ? (r.V = +l[0], o + l[0].length) : -1;
+}
+function d5n(r, i, o) {
+ var l = w2.exec(Da(i).call(i, o, o + 2));
+ return l ? (r.W = +l[0], o + l[0].length) : -1;
+}
+function gxt(r, i, o) {
+ var l = w2.exec(Da(i).call(i, o, o + 4));
+ return l ? (r.y = +l[0], o + l[0].length) : -1;
+}
+function pxt(r, i, o) {
+ var l = w2.exec(Da(i).call(i, o, o + 2));
+ return l ? (r.y = +l[0] + (+l[0] > 68 ? 1900 : 2e3), o + l[0].length) : -1;
+}
+function A5n(r, i, o) {
+ var l = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(Da(i).call(i, o, o + 6));
+ return l ? (r.Z = l[1] ? 0 : -(l[2] + (l[3] || "00")), o + l[0].length) : -1;
+}
+function g5n(r, i, o) {
+ var l = w2.exec(Da(i).call(i, o, o + 1));
+ return l ? (r.q = 3 * l[0] - 3, o + l[0].length) : -1;
+}
+function p5n(r, i, o) {
+ var l = w2.exec(Da(i).call(i, o, o + 2));
+ return l ? (r.m = l[0] - 1, o + l[0].length) : -1;
+}
+function mxt(r, i, o) {
+ var l = w2.exec(Da(i).call(i, o, o + 2));
+ return l ? (r.d = +l[0], o + l[0].length) : -1;
+}
+function m5n(r, i, o) {
+ var l = w2.exec(Da(i).call(i, o, o + 3));
+ return l ? (r.m = 0, r.d = +l[0], o + l[0].length) : -1;
+}
+function bxt(r, i, o) {
+ var l = w2.exec(Da(i).call(i, o, o + 2));
+ return l ? (r.H = +l[0], o + l[0].length) : -1;
+}
+function b5n(r, i, o) {
+ var l = w2.exec(Da(i).call(i, o, o + 2));
+ return l ? (r.M = +l[0], o + l[0].length) : -1;
+}
+function v5n(r, i, o) {
+ var l = w2.exec(Da(i).call(i, o, o + 2));
+ return l ? (r.S = +l[0], o + l[0].length) : -1;
+}
+function y5n(r, i, o) {
+ var l = w2.exec(Da(i).call(i, o, o + 3));
+ return l ? (r.L = +l[0], o + l[0].length) : -1;
+}
+function w5n(r, i, o) {
+ var l = w2.exec(Da(i).call(i, o, o + 6));
+ return l ? (r.L = Math.floor(l[0] / 1e3), o + l[0].length) : -1;
+}
+function k5n(r, i, o) {
+ var l = o5n.exec(Da(i).call(i, o, o + 1));
+ return l ? o + l[0].length : -1;
+}
+function x5n(r, i, o) {
+ var l = w2.exec(Da(i).call(i, o));
+ return l ? (r.Q = +l[0], o + l[0].length) : -1;
+}
+function C5n(r, i, o) {
+ var l = w2.exec(Da(i).call(i, o));
+ return l ? (r.s = +l[0], o + l[0].length) : -1;
+}
+function vxt(r, i) {
+ return Vf(r.getDate(), i, 2);
+}
+function _5n(r, i) {
+ return Vf(r.getHours(), i, 2);
+}
+function E5n(r, i) {
+ return Vf(r.getHours() % 12 || 12, i, 2);
+}
+function T5n(r, i) {
+ return Vf(1 + CG.count(f$(r), r), i, 3);
+}
+function TBt(r, i) {
+ return Vf(r.getMilliseconds(), i, 3);
+}
+function B5n(r, i) {
+ return TBt(r, i) + "000";
+}
+function S5n(r, i) {
+ return Vf(r.getMonth() + 1, i, 2);
+}
+function L5n(r, i) {
+ return Vf(r.getMinutes(), i, 2);
+}
+function I5n(r, i) {
+ return Vf(r.getSeconds(), i, 2);
+}
+function M5n(r) {
+ var i = r.getDay();
+ return i === 0 ? 7 : i;
+}
+function F5n(r, i) {
+ return Vf(_G.count(f$(r) - 1, r), i, 2);
+}
+function BBt(r) {
+ var i = r.getDay();
+ return i >= 4 || i === 0 ? zG(r) : zG.ceil(r);
+}
+function O5n(r, i) {
+ return r = BBt(r), Vf(zG.count(f$(r), r) + (f$(r).getDay() === 4), i, 2);
+}
+function D5n(r) {
+ return r.getDay();
+}
+function N5n(r, i) {
+ return Vf(nbe.count(f$(r) - 1, r), i, 2);
+}
+function P5n(r, i) {
+ return Vf(r.getFullYear() % 100, i, 2);
+}
+function R5n(r, i) {
+ return Vf((r = BBt(r)).getFullYear() % 100, i, 2);
+}
+function Q5n(r, i) {
+ return Vf(r.getFullYear() % 1e4, i, 4);
+}
+function $5n(r, i) {
+ var o = r.getDay();
+ return Vf((r = o >= 4 || o === 0 ? zG(r) : zG.ceil(r)).getFullYear() % 1e4, i, 4);
+}
+function U5n(r) {
+ var i = r.getTimezoneOffset();
+ return (i > 0 ? "-" : (i *= -1, "+")) + Vf(i / 60 | 0, "0", 2) + Vf(i % 60, "0", 2);
+}
+function yxt(r, i) {
+ return Vf(r.getUTCDate(), i, 2);
+}
+function H5n(r, i) {
+ return Vf(r.getUTCHours(), i, 2);
+}
+function j5n(r, i) {
+ return Vf(r.getUTCHours() % 12 || 12, i, 2);
+}
+function K5n(r, i) {
+ return Vf(1 + CRe.count(XG(r), r), i, 3);
+}
+function SBt(r, i) {
+ return Vf(r.getUTCMilliseconds(), i, 3);
+}
+function z5n(r, i) {
+ return SBt(r, i) + "000";
+}
+function G5n(r, i) {
+ return Vf(r.getUTCMonth() + 1, i, 2);
+}
+function X5n(r, i) {
+ return Vf(r.getUTCMinutes(), i, 2);
+}
+function W5n(r, i) {
+ return Vf(r.getUTCSeconds(), i, 2);
+}
+function V5n(r) {
+ var i = r.getUTCDay();
+ return i === 0 ? 7 : i;
+}
+function q5n(r, i) {
+ return Vf(_Re.count(XG(r) - 1, r), i, 2);
+}
+function LBt(r) {
+ var i = r.getUTCDay();
+ return i >= 4 || i === 0 ? GG(r) : GG.ceil(r);
+}
+function Y5n(r, i) {
+ return r = LBt(r), Vf(GG.count(XG(r), r) + (XG(r).getUTCDay() === 4), i, 2);
+}
+function J5n(r) {
+ return r.getUTCDay();
+}
+function Z5n(r, i) {
+ return Vf(rbe.count(XG(r) - 1, r), i, 2);
+}
+function e6n(r, i) {
+ return Vf(r.getUTCFullYear() % 100, i, 2);
+}
+function t6n(r, i) {
+ return Vf((r = LBt(r)).getUTCFullYear() % 100, i, 2);
+}
+function n6n(r, i) {
+ return Vf(r.getUTCFullYear() % 1e4, i, 4);
+}
+function r6n(r, i) {
+ var o = r.getUTCDay();
+ return Vf((r = o >= 4 || o === 0 ? GG(r) : GG.ceil(r)).getUTCFullYear() % 1e4, i, 4);
+}
+function i6n() {
+ return "+0000";
+}
+function wxt() {
+ return "%";
+}
+function kxt(r) {
+ return +r;
+}
+function xxt(r) {
+ return Math.floor(+r / 1e3);
+}
+function a6n(r) {
+ return new Date(r);
+}
+function o6n(r) {
+ return r instanceof Date ? +r : +/* @__PURE__ */ new Date(+r);
+}
+function IBt(r, i, o, l, f, g, A, b, v, k) {
+ var _ = ABt(), T = _.invert, L = _.domain, F = k(".%L"), U = k(":%S"), q = k("%I:%M"), Z = k("%I %p"), R = k("%a %d"), J = k("%b %d"), he = k("%B"), Y = k("%Y");
+ function ue(le) {
+ return (v(le) < le ? F : b(le) < le ? U : A(le) < le ? q : g(le) < le ? Z : l(le) < le ? f(le) < le ? R : J : o(le) < le ? he : Y)(le);
+ }
+ return _.invert = function(le) {
+ return new Date(T(le));
+ }, _.domain = function(le) {
+ var be;
+ return arguments.length ? L(Su(le, o6n)) : Zs(be = L()).call(be, a6n);
+ }, _.ticks = function(le) {
+ var be = L();
+ return r(be[0], be[be.length - 1], le ?? 10);
+ }, _.tickFormat = function(le, be) {
+ return be == null ? ue : k(be);
+ }, _.nice = function(le) {
+ var be = L();
+ return le && typeof le.range == "function" || (le = i(be[0], be[be.length - 1], le ?? 10)), le ? L(function(ke, de) {
+ var Te, xe = 0, ie = (ke = Da(ke).call(ke)).length - 1, Be = ke[xe], te = ke[ie];
+ return te < Be && (Te = xe, xe = ie, ie = Te, Te = Be, Be = te, te = Te), ke[xe] = de.floor(Be), ke[ie] = de.ceil(te), ke;
+ }(be, le)) : _;
+ }, _.copy = function() {
+ return dBt(_, IBt(r, i, o, l, f, g, A, b, v, k));
+ }, _;
+}
+function xp(r) {
+ return function() {
+ return r;
+ };
+}
+(function(r) {
+ Mne = function(i) {
+ var o = i.dateTime, l = i.date, f = i.time, g = i.periods, A = i.days, b = i.shortDays, v = i.months, k = i.shortMonths, _ = Fne(g), T = One(g), L = Fne(A), F = One(A), U = Fne(b), q = One(b), Z = Fne(v), R = One(v), J = Fne(k), he = One(k), Y = { a: function(Te) {
+ return b[Te.getDay()];
+ }, A: function(Te) {
+ return A[Te.getDay()];
+ }, b: function(Te) {
+ return k[Te.getMonth()];
+ }, B: function(Te) {
+ return v[Te.getMonth()];
+ }, c: null, d: vxt, e: vxt, f: B5n, g: R5n, G: $5n, H: _5n, I: E5n, j: T5n, L: TBt, m: S5n, M: L5n, p: function(Te) {
+ return g[+(Te.getHours() >= 12)];
+ }, q: function(Te) {
+ return 1 + ~~(Te.getMonth() / 3);
+ }, Q: kxt, s: xxt, S: I5n, u: M5n, U: F5n, V: O5n, w: D5n, W: N5n, x: null, X: null, y: P5n, Y: Q5n, Z: U5n, "%": wxt }, ue = { a: function(Te) {
+ return b[Te.getUTCDay()];
+ }, A: function(Te) {
+ return A[Te.getUTCDay()];
+ }, b: function(Te) {
+ return k[Te.getUTCMonth()];
+ }, B: function(Te) {
+ return v[Te.getUTCMonth()];
+ }, c: null, d: yxt, e: yxt, f: z5n, g: t6n, G: r6n, H: H5n, I: j5n, j: K5n, L: SBt, m: G5n, M: X5n, p: function(Te) {
+ return g[+(Te.getUTCHours() >= 12)];
+ }, q: function(Te) {
+ return 1 + ~~(Te.getUTCMonth() / 3);
+ }, Q: kxt, s: xxt, S: W5n, u: V5n, U: q5n, V: Y5n, w: J5n, W: Z5n, x: null, X: null, y: e6n, Y: n6n, Z: i6n, "%": wxt }, le = { a: function(Te, xe, ie) {
+ var Be = U.exec(Da(xe).call(xe, ie));
+ return Be ? (Te.w = q.get(Be[0].toLowerCase()), ie + Be[0].length) : -1;
+ }, A: function(Te, xe, ie) {
+ var Be = L.exec(Da(xe).call(xe, ie));
+ return Be ? (Te.w = F.get(Be[0].toLowerCase()), ie + Be[0].length) : -1;
+ }, b: function(Te, xe, ie) {
+ var Be = J.exec(Da(xe).call(xe, ie));
+ return Be ? (Te.m = he.get(Be[0].toLowerCase()), ie + Be[0].length) : -1;
+ }, B: function(Te, xe, ie) {
+ var Be = Z.exec(Da(xe).call(xe, ie));
+ return Be ? (Te.m = R.get(Be[0].toLowerCase()), ie + Be[0].length) : -1;
+ }, c: function(Te, xe, ie) {
+ return de(Te, o, xe, ie);
+ }, d: mxt, e: mxt, f: w5n, g: pxt, G: gxt, H: bxt, I: bxt, j: m5n, L: y5n, m: p5n, M: b5n, p: function(Te, xe, ie) {
+ var Be = _.exec(Da(xe).call(xe, ie));
+ return Be ? (Te.p = T.get(Be[0].toLowerCase()), ie + Be[0].length) : -1;
+ }, q: g5n, Q: x5n, s: C5n, S: v5n, u: u5n, U: h5n, V: f5n, w: l5n, W: d5n, x: function(Te, xe, ie) {
+ return de(Te, l, xe, ie);
+ }, X: function(Te, xe, ie) {
+ return de(Te, f, xe, ie);
+ }, y: pxt, Y: gxt, Z: A5n, "%": k5n };
+ function be(Te, xe) {
+ return function(ie) {
+ var Be, te, Me, ve = [], ge = -1, Je = 0, ot = Te.length;
+ for (ie instanceof Date || (ie = /* @__PURE__ */ new Date(+ie)); ++ge < ot; )
+ Te.charCodeAt(ge) === 37 && (ve.push(Da(Te).call(Te, Je, ge)), (te = Axt[Be = Te.charAt(++ge)]) != null ? Be = Te.charAt(++ge) : te = Be === "e" ? " " : "0", (Me = xe[Be]) && (Be = Me(ie, te)), ve.push(Be), Je = ge + 1);
+ return ve.push(Da(Te).call(Te, Je, ge)), ve.join("");
+ };
+ }
+ function ke(Te, xe) {
+ return function(ie) {
+ var Be, te, Me = Ine(1900, void 0, 1);
+ if (de(Me, Te, ie += "", 0) != ie.length)
+ return null;
+ if ("Q" in Me)
+ return new Date(Me.Q);
+ if ("s" in Me)
+ return new Date(1e3 * Me.s + ("L" in Me ? Me.L : 0));
+ if (xe && !("Z" in Me) && (Me.Z = 0), "p" in Me && (Me.H = Me.H % 12 + 12 * Me.p), Me.m === void 0 && (Me.m = "q" in Me ? Me.q : 0), "V" in Me) {
+ if (Me.V < 1 || Me.V > 53)
+ return null;
+ "w" in Me || (Me.w = 1), "Z" in Me ? (te = (Be = eOe(Ine(Me.y, 0, 1))).getUTCDay(), Be = te > 4 || te === 0 ? rbe.ceil(Be) : rbe(Be), Be = CRe.offset(Be, 7 * (Me.V - 1)), Me.y = Be.getUTCFullYear(), Me.m = Be.getUTCMonth(), Me.d = Be.getUTCDate() + (Me.w + 6) % 7) : (te = (Be = ZFe(Ine(Me.y, 0, 1))).getDay(), Be = te > 4 || te === 0 ? nbe.ceil(Be) : nbe(Be), Be = CG.offset(Be, 7 * (Me.V - 1)), Me.y = Be.getFullYear(), Me.m = Be.getMonth(), Me.d = Be.getDate() + (Me.w + 6) % 7);
+ } else
+ ("W" in Me || "U" in Me) && ("w" in Me || (Me.w = "u" in Me ? Me.u % 7 : "W" in Me ? 1 : 0), te = "Z" in Me ? eOe(Ine(Me.y, 0, 1)).getUTCDay() : ZFe(Ine(Me.y, 0, 1)).getDay(), Me.m = 0, Me.d = "W" in Me ? (Me.w + 6) % 7 + 7 * Me.W - (te + 5) % 7 : Me.w + 7 * Me.U - (te + 6) % 7);
+ return "Z" in Me ? (Me.H += Me.Z / 100 | 0, Me.M += Me.Z % 100, eOe(Me)) : ZFe(Me);
+ };
+ }
+ function de(Te, xe, ie, Be) {
+ for (var te, Me, ve = 0, ge = xe.length, Je = ie.length; ve < ge; ) {
+ if (Be >= Je)
+ return -1;
+ if ((te = xe.charCodeAt(ve++)) === 37) {
+ if (te = xe.charAt(ve++), !(Me = le[te in Axt ? xe.charAt(ve++) : te]) || (Be = Me(Te, ie, Be)) < 0)
+ return -1;
+ } else if (te != ie.charCodeAt(Be++))
+ return -1;
+ }
+ return Be;
+ }
+ return Y.x = be(l, Y), Y.X = be(f, Y), Y.c = be(o, Y), ue.x = be(l, ue), ue.X = be(f, ue), ue.c = be(o, ue), { format: function(Te) {
+ var xe = be(Te += "", Y);
+ return xe.toString = function() {
+ return Te;
+ }, xe;
+ }, parse: function(Te) {
+ var xe = ke(Te += "", !1);
+ return xe.toString = function() {
+ return Te;
+ }, xe;
+ }, utcFormat: function(Te) {
+ var xe = be(Te += "", ue);
+ return xe.toString = function() {
+ return Te;
+ }, xe;
+ }, utcParse: function(Te) {
+ var xe = ke(Te += "", !0);
+ return xe.toString = function() {
+ return Te;
+ }, xe;
+ } };
+ }(r), Wpe = Mne.format, Mne.parse, Mne.utcFormat, Mne.utcParse;
+})({ 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"] });
+var Cxt = Math.abs, Py = Math.atan2, MQ = Math.cos, s6n = Math.max, tOe = Math.min, gT = Math.sin, fG = Math.sqrt, Ry = 1e-12, Ere = Math.PI, ibe = Ere / 2, Vpe = 2 * Ere;
+function _xt(r) {
+ return r >= 1 ? ibe : r <= -1 ? -ibe : Math.asin(r);
+}
+function c6n(r) {
+ return r.innerRadius;
+}
+function l6n(r) {
+ return r.outerRadius;
+}
+function u6n(r) {
+ return r.startAngle;
+}
+function h6n(r) {
+ return r.endAngle;
+}
+function f6n(r) {
+ return r && r.padAngle;
+}
+function Jge(r, i, o, l, f, g, A) {
+ var b = r - o, v = i - l, k = (A ? g : -g) / fG(b * b + v * v), _ = k * v, T = -k * b, L = r + _, F = i + T, U = o + _, q = l + T, Z = (L + U) / 2, R = (F + q) / 2, J = U - L, he = q - F, Y = J * J + he * he, ue = f - g, le = L * q - U * F, be = (he < 0 ? -1 : 1) * fG(s6n(0, ue * ue * Y - le * le)), ke = (le * he - J * be) / Y, de = (-le * J - he * be) / Y, Te = (le * he + J * be) / Y, xe = (-le * J + he * be) / Y, ie = ke - Z, Be = de - R, te = Te - Z, Me = xe - R;
+ return ie * ie + Be * Be > te * te + Me * Me && (ke = Te, de = xe), { cx: ke, cy: de, x01: -_, y01: -T, x11: ke * (f / ue - 1), y11: de * (f / ue - 1) };
+}
+function vNe() {
+ var r = c6n, i = l6n, o = xp(0), l = null, f = u6n, g = h6n, A = f6n, b = null;
+ function v() {
+ var k, _, T = +r.apply(this, arguments), L = +i.apply(this, arguments), F = f.apply(this, arguments) - ibe, U = g.apply(this, arguments) - ibe, q = Cxt(U - F), Z = U > F;
+ if (b || (b = k = vRe()), L < T && (_ = L, L = T, T = _), L > Ry)
+ if (q > Vpe - Ry)
+ b.moveTo(L * MQ(F), L * gT(F)), b.arc(0, 0, L, F, U, !Z), T > Ry && (b.moveTo(T * MQ(U), T * gT(U)), b.arc(0, 0, T, U, F, Z));
+ else {
+ var R, J, he = F, Y = U, ue = F, le = U, be = q, ke = q, de = A.apply(this, arguments) / 2, Te = de > Ry && (l ? +l.apply(this, arguments) : fG(T * T + L * L)), xe = tOe(Cxt(L - T) / 2, +o.apply(this, arguments)), ie = xe, Be = xe;
+ if (Te > Ry) {
+ var te = _xt(Te / T * gT(de)), Me = _xt(Te / L * gT(de));
+ (be -= 2 * te) > Ry ? (ue += te *= Z ? 1 : -1, le -= te) : (be = 0, ue = le = (F + U) / 2), (ke -= 2 * Me) > Ry ? (he += Me *= Z ? 1 : -1, Y -= Me) : (ke = 0, he = Y = (F + U) / 2);
+ }
+ var ve = L * MQ(he), ge = L * gT(he), Je = T * MQ(le), ot = T * gT(le);
+ if (xe > Ry) {
+ var bt, gt = L * MQ(Y), je = L * gT(Y), Qe = T * MQ(ue), kt = T * gT(ue);
+ if (q < Ere && (bt = function(ln, an, Ot, $n, pt, Ci, ut, br) {
+ var zt = Ot - ln, Wr = $n - an, zr = ut - pt, Si = br - Ci, vr = Si * zt - zr * Wr;
+ if (!(vr * vr < Ry))
+ return [ln + (vr = (zr * (an - Ci) - Si * (ln - pt)) / vr) * zt, an + vr * Wr];
+ }(ve, ge, Qe, kt, gt, je, Je, ot))) {
+ var Wt = ve - bt[0], jt = ge - bt[1], Zn = gt - bt[0], Ft = je - bt[1], wn = 1 / gT(function(ln) {
+ return ln > 1 ? 0 : ln < -1 ? Ere : Math.acos(ln);
+ }((Wt * Zn + jt * Ft) / (fG(Wt * Wt + jt * jt) * fG(Zn * Zn + Ft * Ft))) / 2), un = fG(bt[0] * bt[0] + bt[1] * bt[1]);
+ ie = tOe(xe, (T - un) / (wn - 1)), Be = tOe(xe, (L - un) / (wn + 1));
+ }
+ }
+ ke > Ry ? Be > Ry ? (R = Jge(Qe, kt, ve, ge, L, Be, Z), J = Jge(gt, je, Je, ot, L, Be, Z), b.moveTo(R.cx + R.x01, R.cy + R.y01), Be < xe ? b.arc(R.cx, R.cy, Be, Py(R.y01, R.x01), Py(J.y01, J.x01), !Z) : (b.arc(R.cx, R.cy, Be, Py(R.y01, R.x01), Py(R.y11, R.x11), !Z), b.arc(0, 0, L, Py(R.cy + R.y11, R.cx + R.x11), Py(J.cy + J.y11, J.cx + J.x11), !Z), b.arc(J.cx, J.cy, Be, Py(J.y11, J.x11), Py(J.y01, J.x01), !Z))) : (b.moveTo(ve, ge), b.arc(0, 0, L, he, Y, !Z)) : b.moveTo(ve, ge), T > Ry && be > Ry ? ie > Ry ? (R = Jge(Je, ot, gt, je, T, -ie, Z), J = Jge(ve, ge, Qe, kt, T, -ie, Z), b.lineTo(R.cx + R.x01, R.cy + R.y01), ie < xe ? b.arc(R.cx, R.cy, ie, Py(R.y01, R.x01), Py(J.y01, J.x01), !Z) : (b.arc(R.cx, R.cy, ie, Py(R.y01, R.x01), Py(R.y11, R.x11), !Z), b.arc(0, 0, T, Py(R.cy + R.y11, R.cx + R.x11), Py(J.cy + J.y11, J.cx + J.x11), Z), b.arc(J.cx, J.cy, ie, Py(J.y11, J.x11), Py(J.y01, J.x01), !Z))) : b.arc(0, 0, T, le, ue, Z) : b.lineTo(Je, ot);
+ }
+ else
+ b.moveTo(0, 0);
+ if (b.closePath(), k)
+ return b = null, k + "" || null;
+ }
+ return v.centroid = function() {
+ var k = (+r.apply(this, arguments) + +i.apply(this, arguments)) / 2, _ = (+f.apply(this, arguments) + +g.apply(this, arguments)) / 2 - Ere / 2;
+ return [MQ(_) * k, gT(_) * k];
+ }, v.innerRadius = function(k) {
+ return arguments.length ? (r = typeof k == "function" ? k : xp(+k), v) : r;
+ }, v.outerRadius = function(k) {
+ return arguments.length ? (i = typeof k == "function" ? k : xp(+k), v) : i;
+ }, v.cornerRadius = function(k) {
+ return arguments.length ? (o = typeof k == "function" ? k : xp(+k), v) : o;
+ }, v.padRadius = function(k) {
+ return arguments.length ? (l = k == null ? null : typeof k == "function" ? k : xp(+k), v) : l;
+ }, v.startAngle = function(k) {
+ return arguments.length ? (f = typeof k == "function" ? k : xp(+k), v) : f;
+ }, v.endAngle = function(k) {
+ return arguments.length ? (g = typeof k == "function" ? k : xp(+k), v) : g;
+ }, v.padAngle = function(k) {
+ return arguments.length ? (A = typeof k == "function" ? k : xp(+k), v) : A;
+ }, v.context = function(k) {
+ return arguments.length ? (b = k ?? null, v) : b;
+ }, v;
+}
+function MBt(r) {
+ return Yl(r) === "object" && "length" in r ? r : Su(r);
+}
+function FBt(r) {
+ this._context = r;
+}
+function mk(r) {
+ return new FBt(r);
+}
+function d6n(r) {
+ return r[0];
+}
+function A6n(r) {
+ return r[1];
+}
+function pX(r, i) {
+ var o = xp(!0), l = null, f = mk, g = null;
+ function A(b) {
+ var v, k, _, T = (b = MBt(b)).length, L = !1;
+ for (l == null && (g = f(_ = vRe())), v = 0; v <= T; ++v)
+ !(v < T && o(k = b[v], v, b)) === L && ((L = !L) ? g.lineStart() : g.lineEnd()), L && g.point(+r(k, v, b), +i(k, v, b));
+ if (_)
+ return g = null, _ + "" || null;
+ }
+ return r = typeof r == "function" ? r : r === void 0 ? d6n : xp(r), i = typeof i == "function" ? i : i === void 0 ? A6n : xp(i), A.x = function(b) {
+ return arguments.length ? (r = typeof b == "function" ? b : xp(+b), A) : r;
+ }, A.y = function(b) {
+ return arguments.length ? (i = typeof b == "function" ? b : xp(+b), A) : i;
+ }, A.defined = function(b) {
+ return arguments.length ? (o = typeof b == "function" ? b : xp(!!b), A) : o;
+ }, A.curve = function(b) {
+ return arguments.length ? (f = b, l != null && (g = f(l)), A) : f;
+ }, A.context = function(b) {
+ return arguments.length ? (b == null ? l = g = null : g = f(l = b), A) : l;
+ }, A;
+}
+function g6n(r, i) {
+ return i < r ? -1 : i > r ? 1 : i >= r ? 0 : NaN;
+}
+function p6n(r) {
+ return r;
+}
+Da(Array.prototype), FBt.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(r, i) {
+ switch (r = +r, i = +i, this._point) {
+ case 0:
+ this._point = 1, this._line ? this._context.lineTo(r, i) : this._context.moveTo(r, i);
+ break;
+ case 1:
+ this._point = 2;
+ default:
+ this._context.lineTo(r, i);
+ }
+} };
+var Ext = function() {
+ function r(i, o) {
+ vi(this, r), this._context = i, this._x = o;
+ }
+ return yi(r, [{ key: "areaStart", value: function() {
+ this._line = 0;
+ } }, { key: "areaEnd", value: function() {
+ this._line = NaN;
+ } }, { key: "lineStart", value: function() {
+ this._point = 0;
+ } }, { key: "lineEnd", value: function() {
+ (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
+ } }, { key: "point", value: function(i, o) {
+ switch (i = +i, o = +o, this._point) {
+ case 0:
+ this._point = 1, this._line ? this._context.lineTo(i, o) : this._context.moveTo(i, o);
+ break;
+ case 1:
+ this._point = 2;
+ default:
+ this._x ? this._context.bezierCurveTo(this._x0 = (this._x0 + i) / 2, this._y0, this._x0, o, i, o) : this._context.bezierCurveTo(this._x0, this._y0 = (this._y0 + o) / 2, i, this._y0, i, o);
+ }
+ this._x0 = i, this._y0 = o;
+ } }]), r;
+}();
+function IO() {
+}
+function Zge(r, i, o) {
+ r._context.bezierCurveTo((2 * r._x0 + r._x1) / 3, (2 * r._y0 + r._y1) / 3, (r._x0 + 2 * r._x1) / 3, (r._y0 + 2 * r._y1) / 3, (r._x0 + 4 * r._x1 + i) / 6, (r._y0 + 4 * r._y1 + o) / 6);
+}
+function qbe(r) {
+ this._context = r;
+}
+function Rie(r) {
+ return new qbe(r);
+}
+function OBt(r) {
+ this._context = r;
+}
+function DBt(r) {
+ this._context = r;
+}
+function NBt(r, i) {
+ this._basis = new qbe(r), this._beta = i;
+}
+qbe.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:
+ Zge(this, this._x1, this._y1);
+ case 2:
+ this._context.lineTo(this._x1, this._y1);
+ }
+ (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
+}, point: function(r, i) {
+ switch (r = +r, i = +i, this._point) {
+ case 0:
+ this._point = 1, this._line ? this._context.lineTo(r, i) : this._context.moveTo(r, i);
+ 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:
+ Zge(this, r, i);
+ }
+ this._x0 = this._x1, this._x1 = r, this._y0 = this._y1, this._y1 = i;
+} }, OBt.prototype = { areaStart: IO, areaEnd: IO, 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);
+ }
+}, point: function(r, i) {
+ switch (r = +r, i = +i, this._point) {
+ case 0:
+ this._point = 1, this._x2 = r, this._y2 = i;
+ break;
+ case 1:
+ this._point = 2, this._x3 = r, this._y3 = i;
+ break;
+ case 2:
+ this._point = 3, this._x4 = r, this._y4 = i, this._context.moveTo((this._x0 + 4 * this._x1 + r) / 6, (this._y0 + 4 * this._y1 + i) / 6);
+ break;
+ default:
+ Zge(this, r, i);
+ }
+ this._x0 = this._x1, this._x1 = r, this._y0 = this._y1, this._y1 = i;
+} }, DBt.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(r, i) {
+ switch (r = +r, i = +i, this._point) {
+ case 0:
+ this._point = 1;
+ break;
+ case 1:
+ this._point = 2;
+ break;
+ case 2:
+ this._point = 3;
+ var o = (this._x0 + 4 * this._x1 + r) / 6, l = (this._y0 + 4 * this._y1 + i) / 6;
+ this._line ? this._context.lineTo(o, l) : this._context.moveTo(o, l);
+ break;
+ case 3:
+ this._point = 4;
+ default:
+ Zge(this, r, i);
+ }
+ this._x0 = this._x1, this._x1 = r, this._y0 = this._y1, this._y1 = i;
+} }, NBt.prototype = { lineStart: function() {
+ this._x = [], this._y = [], this._basis.lineStart();
+}, lineEnd: function() {
+ var r = this._x, i = this._y, o = r.length - 1;
+ if (o > 0)
+ for (var l, f = r[0], g = i[0], A = r[o] - f, b = i[o] - g, v = -1; ++v <= o; )
+ l = v / o, this._basis.point(this._beta * r[v] + (1 - this._beta) * (f + l * A), this._beta * i[v] + (1 - this._beta) * (g + l * b));
+ this._x = this._y = null, this._basis.lineEnd();
+}, point: function(r, i) {
+ this._x.push(+r), this._y.push(+i);
+} };
+var m6n = function r(i) {
+ function o(l) {
+ return i === 1 ? new qbe(l) : new NBt(l, i);
+ }
+ return o.beta = function(l) {
+ return r(+l);
+ }, o;
+}(0.85);
+function abe(r, i, o) {
+ r._context.bezierCurveTo(r._x1 + r._k * (r._x2 - r._x0), r._y1 + r._k * (r._y2 - r._y0), r._x2 + r._k * (r._x1 - i), r._y2 + r._k * (r._y1 - o), r._x2, r._y2);
+}
+function TRe(r, i) {
+ this._context = r, this._k = (1 - i) / 6;
+}
+TRe.prototype = { areaStart: function() {
+ this._line = 0;
+}, areaEnd: function() {
+ this._line = NaN;
+}, lineStart: function() {
+ this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._point = 0;
+}, lineEnd: function() {
+ switch (this._point) {
+ case 2:
+ this._context.lineTo(this._x2, this._y2);
+ break;
+ case 3:
+ abe(this, this._x1, this._y1);
+ }
+ (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
+}, point: function(r, i) {
+ switch (r = +r, i = +i, this._point) {
+ case 0:
+ this._point = 1, this._line ? this._context.lineTo(r, i) : this._context.moveTo(r, i);
+ break;
+ case 1:
+ this._point = 2, this._x1 = r, this._y1 = i;
+ break;
+ case 2:
+ this._point = 3;
+ default:
+ abe(this, r, i);
+ }
+ this._x0 = this._x1, this._x1 = this._x2, this._x2 = r, this._y0 = this._y1, this._y1 = this._y2, this._y2 = i;
+} };
+var b6n = function r(i) {
+ function o(l) {
+ return new TRe(l, i);
+ }
+ return o.tension = function(l) {
+ return r(+l);
+ }, o;
+}(0);
+function BRe(r, i) {
+ this._context = r, this._k = (1 - i) / 6;
+}
+BRe.prototype = { areaStart: IO, areaEnd: IO, lineStart: function() {
+ this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN, this._point = 0;
+}, lineEnd: function() {
+ switch (this._point) {
+ case 1:
+ this._context.moveTo(this._x3, this._y3), this._context.closePath();
+ break;
+ case 2:
+ this._context.lineTo(this._x3, this._y3), this._context.closePath();
+ break;
+ case 3:
+ this.point(this._x3, this._y3), this.point(this._x4, this._y4), this.point(this._x5, this._y5);
+ }
+}, point: function(r, i) {
+ switch (r = +r, i = +i, this._point) {
+ case 0:
+ this._point = 1, this._x3 = r, this._y3 = i;
+ break;
+ case 1:
+ this._point = 2, this._context.moveTo(this._x4 = r, this._y4 = i);
+ break;
+ case 2:
+ this._point = 3, this._x5 = r, this._y5 = i;
+ break;
+ default:
+ abe(this, r, i);
+ }
+ this._x0 = this._x1, this._x1 = this._x2, this._x2 = r, this._y0 = this._y1, this._y1 = this._y2, this._y2 = i;
+} };
+var v6n = function r(i) {
+ function o(l) {
+ return new BRe(l, i);
+ }
+ return o.tension = function(l) {
+ return r(+l);
+ }, o;
+}(0);
+function SRe(r, i) {
+ this._context = r, this._k = (1 - i) / 6;
+}
+SRe.prototype = { areaStart: function() {
+ this._line = 0;
+}, areaEnd: function() {
+ this._line = NaN;
+}, lineStart: function() {
+ this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._point = 0;
+}, lineEnd: function() {
+ (this._line || this._line !== 0 && this._point === 3) && this._context.closePath(), this._line = 1 - this._line;
+}, point: function(r, i) {
+ switch (r = +r, i = +i, this._point) {
+ case 0:
+ this._point = 1;
+ break;
+ case 1:
+ this._point = 2;
+ break;
+ case 2:
+ this._point = 3, this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2);
+ break;
+ case 3:
+ this._point = 4;
+ default:
+ abe(this, r, i);
+ }
+ this._x0 = this._x1, this._x1 = this._x2, this._x2 = r, this._y0 = this._y1, this._y1 = this._y2, this._y2 = i;
+} };
+var y6n = function r(i) {
+ function o(l) {
+ return new SRe(l, i);
+ }
+ return o.tension = function(l) {
+ return r(+l);
+ }, o;
+}(0);
+function LRe(r, i, o) {
+ var l = r._x1, f = r._y1, g = r._x2, A = r._y2;
+ if (r._l01_a > Ry) {
+ var b = 2 * r._l01_2a + 3 * r._l01_a * r._l12_a + r._l12_2a, v = 3 * r._l01_a * (r._l01_a + r._l12_a);
+ l = (l * b - r._x0 * r._l12_2a + r._x2 * r._l01_2a) / v, f = (f * b - r._y0 * r._l12_2a + r._y2 * r._l01_2a) / v;
+ }
+ if (r._l23_a > Ry) {
+ var k = 2 * r._l23_2a + 3 * r._l23_a * r._l12_a + r._l12_2a, _ = 3 * r._l23_a * (r._l23_a + r._l12_a);
+ g = (g * k + r._x1 * r._l23_2a - i * r._l12_2a) / _, A = (A * k + r._y1 * r._l23_2a - o * r._l12_2a) / _;
+ }
+ r._context.bezierCurveTo(l, f, g, A, r._x2, r._y2);
+}
+function PBt(r, i) {
+ this._context = r, this._alpha = i;
+}
+PBt.prototype = { areaStart: function() {
+ this._line = 0;
+}, areaEnd: function() {
+ this._line = NaN;
+}, lineStart: function() {
+ this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
+}, lineEnd: function() {
+ switch (this._point) {
+ case 2:
+ this._context.lineTo(this._x2, this._y2);
+ break;
+ case 3:
+ this.point(this._x2, this._y2);
+ }
+ (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
+}, point: function(r, i) {
+ if (r = +r, i = +i, this._point) {
+ var o = this._x2 - r, l = this._y2 - i;
+ this._l23_a = Math.sqrt(this._l23_2a = Math.pow(o * o + l * l, this._alpha));
+ }
+ switch (this._point) {
+ case 0:
+ this._point = 1, this._line ? this._context.lineTo(r, i) : this._context.moveTo(r, i);
+ break;
+ case 1:
+ this._point = 2;
+ break;
+ case 2:
+ this._point = 3;
+ default:
+ LRe(this, r, i);
+ }
+ this._l01_a = this._l12_a, this._l12_a = this._l23_a, this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a, this._x0 = this._x1, this._x1 = this._x2, this._x2 = r, this._y0 = this._y1, this._y1 = this._y2, this._y2 = i;
+} };
+var w6n = function r(i) {
+ function o(l) {
+ return i ? new PBt(l, i) : new TRe(l, 0);
+ }
+ return o.alpha = function(l) {
+ return r(+l);
+ }, o;
+}(0.5);
+function RBt(r, i) {
+ this._context = r, this._alpha = i;
+}
+RBt.prototype = { areaStart: IO, areaEnd: IO, lineStart: function() {
+ this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN, this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
+}, lineEnd: function() {
+ switch (this._point) {
+ case 1:
+ this._context.moveTo(this._x3, this._y3), this._context.closePath();
+ break;
+ case 2:
+ this._context.lineTo(this._x3, this._y3), this._context.closePath();
+ break;
+ case 3:
+ this.point(this._x3, this._y3), this.point(this._x4, this._y4), this.point(this._x5, this._y5);
+ }
+}, point: function(r, i) {
+ if (r = +r, i = +i, this._point) {
+ var o = this._x2 - r, l = this._y2 - i;
+ this._l23_a = Math.sqrt(this._l23_2a = Math.pow(o * o + l * l, this._alpha));
+ }
+ switch (this._point) {
+ case 0:
+ this._point = 1, this._x3 = r, this._y3 = i;
+ break;
+ case 1:
+ this._point = 2, this._context.moveTo(this._x4 = r, this._y4 = i);
+ break;
+ case 2:
+ this._point = 3, this._x5 = r, this._y5 = i;
+ break;
+ default:
+ LRe(this, r, i);
+ }
+ this._l01_a = this._l12_a, this._l12_a = this._l23_a, this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a, this._x0 = this._x1, this._x1 = this._x2, this._x2 = r, this._y0 = this._y1, this._y1 = this._y2, this._y2 = i;
+} };
+var k6n = function r(i) {
+ function o(l) {
+ return i ? new RBt(l, i) : new BRe(l, 0);
+ }
+ return o.alpha = function(l) {
+ return r(+l);
+ }, o;
+}(0.5);
+function QBt(r, i) {
+ this._context = r, this._alpha = i;
+}
+QBt.prototype = { areaStart: function() {
+ this._line = 0;
+}, areaEnd: function() {
+ this._line = NaN;
+}, lineStart: function() {
+ this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
+}, lineEnd: function() {
+ (this._line || this._line !== 0 && this._point === 3) && this._context.closePath(), this._line = 1 - this._line;
+}, point: function(r, i) {
+ if (r = +r, i = +i, this._point) {
+ var o = this._x2 - r, l = this._y2 - i;
+ this._l23_a = Math.sqrt(this._l23_2a = Math.pow(o * o + l * l, this._alpha));
+ }
+ switch (this._point) {
+ case 0:
+ this._point = 1;
+ break;
+ case 1:
+ this._point = 2;
+ break;
+ case 2:
+ this._point = 3, this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2);
+ break;
+ case 3:
+ this._point = 4;
+ default:
+ LRe(this, r, i);
+ }
+ this._l01_a = this._l12_a, this._l12_a = this._l23_a, this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a, this._x0 = this._x1, this._x1 = this._x2, this._x2 = r, this._y0 = this._y1, this._y1 = this._y2, this._y2 = i;
+} };
+var x6n = function r(i) {
+ function o(l) {
+ return i ? new QBt(l, i) : new SRe(l, 0);
+ }
+ return o.alpha = function(l) {
+ return r(+l);
+ }, o;
+}(0.5);
+function $Bt(r) {
+ this._context = r;
+}
+function Txt(r) {
+ return r < 0 ? -1 : 1;
+}
+function Bxt(r, i, o) {
+ var l = r._x1 - r._x0, f = i - r._x1, g = (r._y1 - r._y0) / (l || f < 0 && -0), A = (o - r._y1) / (f || l < 0 && -0), b = (g * f + A * l) / (l + f);
+ return (Txt(g) + Txt(A)) * Math.min(Math.abs(g), Math.abs(A), 0.5 * Math.abs(b)) || 0;
+}
+function Sxt(r, i) {
+ var o = r._x1 - r._x0;
+ return o ? (3 * (r._y1 - r._y0) / o - i) / 2 : i;
+}
+function nOe(r, i, o) {
+ var l = r._x0, f = r._y0, g = r._x1, A = r._y1, b = (g - l) / 3;
+ r._context.bezierCurveTo(l + b, f + b * i, g - b, A - b * o, g, A);
+}
+function qpe(r) {
+ this._context = r;
+}
+function UBt(r) {
+ this._context = new HBt(r);
+}
+function HBt(r) {
+ this._context = r;
+}
+function jBt(r) {
+ this._context = r;
+}
+function Lxt(r) {
+ var i, o, l = r.length - 1, f = new Array(l), g = new Array(l), A = new Array(l);
+ for (f[0] = 0, g[0] = 2, A[0] = r[0] + 2 * r[1], i = 1; i < l - 1; ++i)
+ f[i] = 1, g[i] = 4, A[i] = 4 * r[i] + 2 * r[i + 1];
+ for (f[l - 1] = 2, g[l - 1] = 7, A[l - 1] = 8 * r[l - 1] + r[l], i = 1; i < l; ++i)
+ o = f[i] / g[i - 1], g[i] -= o, A[i] -= o * A[i - 1];
+ for (f[l - 1] = A[l - 1] / g[l - 1], i = l - 2; i >= 0; --i)
+ f[i] = (A[i] - f[i + 1]) / g[i];
+ for (g[l - 1] = (r[l] + f[l - 1]) / 2, i = 0; i < l - 1; ++i)
+ g[i] = 2 * r[i + 1] - f[i + 1];
+ return [f, g];
+}
+function Ype(r, i) {
+ this._context = r, this._t = i;
+}
+function Dne(r, i, o) {
+ this.k = r, this.x = i, this.y = o;
+}
+$Bt.prototype = { areaStart: IO, areaEnd: IO, lineStart: function() {
+ this._point = 0;
+}, lineEnd: function() {
+ this._point && this._context.closePath();
+}, point: function(r, i) {
+ r = +r, i = +i, this._point ? this._context.lineTo(r, i) : (this._point = 1, this._context.moveTo(r, i));
+} }, qpe.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:
+ nOe(this, this._t0, Sxt(this, this._t0));
+ }
+ (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
+}, point: function(r, i) {
+ var o = NaN;
+ if (i = +i, (r = +r) !== this._x1 || i !== this._y1) {
+ switch (this._point) {
+ case 0:
+ this._point = 1, this._line ? this._context.lineTo(r, i) : this._context.moveTo(r, i);
+ break;
+ case 1:
+ this._point = 2;
+ break;
+ case 2:
+ this._point = 3, nOe(this, Sxt(this, o = Bxt(this, r, i)), o);
+ break;
+ default:
+ nOe(this, this._t0, o = Bxt(this, r, i));
+ }
+ this._x0 = this._x1, this._x1 = r, this._y0 = this._y1, this._y1 = i, this._t0 = o;
+ }
+} }, (UBt.prototype = Vre(qpe.prototype)).point = function(r, i) {
+ qpe.prototype.point.call(this, i, r);
+}, HBt.prototype = { moveTo: function(r, i) {
+ this._context.moveTo(i, r);
+}, closePath: function() {
+ this._context.closePath();
+}, lineTo: function(r, i) {
+ this._context.lineTo(i, r);
+}, bezierCurveTo: function(r, i, o, l, f, g) {
+ this._context.bezierCurveTo(i, r, l, o, g, f);
+} }, jBt.prototype = { areaStart: function() {
+ this._line = 0;
+}, areaEnd: function() {
+ this._line = NaN;
+}, lineStart: function() {
+ this._x = [], this._y = [];
+}, lineEnd: function() {
+ var r = this._x, i = this._y, o = r.length;
+ if (o)
+ if (this._line ? this._context.lineTo(r[0], i[0]) : this._context.moveTo(r[0], i[0]), o === 2)
+ this._context.lineTo(r[1], i[1]);
+ else
+ for (var l = Lxt(r), f = Lxt(i), g = 0, A = 1; A < o; ++g, ++A)
+ this._context.bezierCurveTo(l[0][g], f[0][g], l[1][g], f[1][g], r[A], i[A]);
+ (this._line || this._line !== 0 && o === 1) && this._context.closePath(), this._line = 1 - this._line, this._x = this._y = null;
+}, point: function(r, i) {
+ this._x.push(+r), this._y.push(+i);
+} }, Ype.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(r, i) {
+ switch (r = +r, i = +i, this._point) {
+ case 0:
+ this._point = 1, this._line ? this._context.lineTo(r, i) : this._context.moveTo(r, i);
+ break;
+ case 1:
+ this._point = 2;
+ default:
+ if (this._t <= 0)
+ this._context.lineTo(this._x, i), this._context.lineTo(r, i);
+ else {
+ var o = this._x * (1 - this._t) + r * this._t;
+ this._context.lineTo(o, this._y), this._context.lineTo(o, i);
+ }
+ }
+ this._x = r, this._y = i;
+} }, Dne.prototype = { constructor: Dne, scale: function(r) {
+ return r === 1 ? this : new Dne(this.k * r, this.x, this.y);
+}, translate: function(r, i) {
+ return r === 0 & i === 0 ? this : new Dne(this.k, this.x + this.k * r, this.y + this.k * i);
+}, apply: function(r) {
+ return [r[0] * this.k + this.x, r[1] * this.k + this.y];
+}, applyX: function(r) {
+ return r * this.k + this.x;
+}, applyY: function(r) {
+ return r * this.k + this.y;
+}, invert: function(r) {
+ return [(r[0] - this.x) / this.k, (r[1] - this.y) / this.k];
+}, invertX: function(r) {
+ return (r - this.x) / this.k;
+}, invertY: function(r) {
+ return (r - this.y) / this.k;
+}, rescaleX: function(r) {
+ var i, o;
+ return r.copy().domain(Zs(i = Zs(o = r.range()).call(o, this.invertX, this)).call(i, r.invert, r));
+}, rescaleY: function(r) {
+ var i, o;
+ return r.copy().domain(Zs(i = Zs(o = r.range()).call(o, this.invertY, this)).call(i, r.invert, r));
+}, toString: function() {
+ return "translate(" + this.x + "," + this.y + ") scale(" + this.k + ")";
+} }, Dne.prototype;
+var hie = su(function(r, i) {
+ r.exports = function() {
+ function o(An) {
+ return o = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(_i) {
+ return typeof _i;
+ } : function(_i) {
+ return _i && typeof Symbol == "function" && _i.constructor === Symbol && _i !== Symbol.prototype ? "symbol" : typeof _i;
+ }, o(An);
+ }
+ function l(An, _i) {
+ return l = Object.setPrototypeOf || function(Cr, la) {
+ return Cr.__proto__ = la, Cr;
+ }, l(An, _i);
+ }
+ function f() {
+ 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 g(An, _i, Cr) {
+ return g = f() ? Reflect.construct : function(la, Ra, Jo) {
+ var Cc = [null];
+ Cc.push.apply(Cc, Ra);
+ var ji = new (Function.bind.apply(la, Cc))();
+ return Jo && l(ji, Jo.prototype), ji;
+ }, g.apply(null, arguments);
+ }
+ function A(An) {
+ return b(An) || v(An) || k(An) || T();
+ }
+ function b(An) {
+ if (Array.isArray(An))
+ return _(An);
+ }
+ function v(An) {
+ if (typeof Symbol < "u" && An[Symbol.iterator] != null || An["@@iterator"] != null)
+ return Array.from(An);
+ }
+ function k(An, _i) {
+ if (An) {
+ if (typeof An == "string")
+ return _(An, _i);
+ var Cr = Object.prototype.toString.call(An).slice(8, -1);
+ return Cr === "Object" && An.constructor && (Cr = An.constructor.name), Cr === "Map" || Cr === "Set" ? Array.from(An) : Cr === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Cr) ? _(An, _i) : void 0;
+ }
+ }
+ function _(An, _i) {
+ (_i == null || _i > An.length) && (_i = An.length);
+ for (var Cr = 0, la = new Array(_i); Cr < _i; Cr++)
+ la[Cr] = An[Cr];
+ return la;
+ }
+ function T() {
+ 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 L = Object.hasOwnProperty, F = Object.setPrototypeOf, U = Object.isFrozen, q = Object.getPrototypeOf, Z = Object.getOwnPropertyDescriptor, R = Object.freeze, J = Object.seal, he = Object.create, Y = typeof Reflect < "u" && Reflect, ue = Y.apply, le = Y.construct;
+ ue || (ue = function(An, _i, Cr) {
+ return An.apply(_i, Cr);
+ }), R || (R = function(An) {
+ return An;
+ }), J || (J = function(An) {
+ return An;
+ }), le || (le = function(An, _i) {
+ return g(An, A(_i));
+ });
+ var be = Je(Array.prototype.forEach), ke = Je(Array.prototype.pop), de = Je(Array.prototype.push), Te = Je(String.prototype.toLowerCase), xe = Je(String.prototype.toString), ie = Je(String.prototype.match), Be = Je(String.prototype.replace), te = Je(String.prototype.indexOf), Me = Je(String.prototype.trim), ve = Je(RegExp.prototype.test), ge = ot(TypeError);
+ function Je(An) {
+ return function(_i) {
+ for (var Cr = arguments.length, la = new Array(Cr > 1 ? Cr - 1 : 0), Ra = 1; Ra < Cr; Ra++)
+ la[Ra - 1] = arguments[Ra];
+ return ue(An, _i, la);
+ };
+ }
+ function ot(An) {
+ return function() {
+ for (var _i = arguments.length, Cr = new Array(_i), la = 0; la < _i; la++)
+ Cr[la] = arguments[la];
+ return le(An, Cr);
+ };
+ }
+ function bt(An, _i, Cr) {
+ Cr = Cr || Te, F && F(An, null);
+ for (var la = _i.length; la--; ) {
+ var Ra = _i[la];
+ if (typeof Ra == "string") {
+ var Jo = Cr(Ra);
+ Jo !== Ra && (U(_i) || (_i[la] = Jo), Ra = Jo);
+ }
+ An[Ra] = !0;
+ }
+ return An;
+ }
+ function gt(An) {
+ var _i, Cr = he(null);
+ for (_i in An)
+ ue(L, An, [_i]) === !0 && (Cr[_i] = An[_i]);
+ return Cr;
+ }
+ function je(An, _i) {
+ for (; An !== null; ) {
+ var Cr = Z(An, _i);
+ if (Cr) {
+ if (Cr.get)
+ return Je(Cr.get);
+ if (typeof Cr.value == "function")
+ return Je(Cr.value);
+ }
+ An = q(An);
+ }
+ function la(Ra) {
+ return console.warn("fallback value for", Ra), null;
+ }
+ return la;
+ }
+ var Qe = R(["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"]), kt = R(["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"]), Wt = R(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), jt = R(["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"]), Zn = R(["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"]), Ft = R(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), wn = R(["#text"]), un = R(["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"]), ln = R(["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"]), an = R(["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"]), Ot = R(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), $n = J(/\{\{[\w\W]*|[\w\W]*\}\}/gm), pt = J(/<%[\w\W]*|[\w\W]*%>/gm), Ci = J(/\${[\w\W]*}/gm), ut = J(/^data-[\-\w.\u00B7-\uFFFF]/), br = J(/^aria-[\-\w]+$/), zt = J(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Wr = J(/^(?:\w+script|data):/i), zr = J(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Si = J(/^html$/i), vr = function() {
+ return typeof window > "u" ? null : window;
+ }, Qr = function(An, _i) {
+ if (o(An) !== "object" || typeof An.createPolicy != "function")
+ return null;
+ var Cr = null, la = "data-tt-policy-suffix";
+ _i.currentScript && _i.currentScript.hasAttribute(la) && (Cr = _i.currentScript.getAttribute(la));
+ var Ra = "dompurify" + (Cr ? "#" + Cr : "");
+ try {
+ return An.createPolicy(Ra, { createHTML: function(Jo) {
+ return Jo;
+ }, createScriptURL: function(Jo) {
+ return Jo;
+ } });
+ } catch {
+ return console.warn("TrustedTypes policy " + Ra + " could not be created."), null;
+ }
+ };
+ function or() {
+ var An = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : vr(), _i = function(bn) {
+ return or(bn);
+ };
+ if (_i.version = "2.4.3", _i.removed = [], !An || !An.document || An.document.nodeType !== 9)
+ return _i.isSupported = !1, _i;
+ var Cr = An.document, la = An.document, Ra = An.DocumentFragment, Jo = An.HTMLTemplateElement, Cc = An.Node, ji = An.Element, Ya = An.NodeFilter, Hr = An.NamedNodeMap, Yr = Hr === void 0 ? An.NamedNodeMap || An.MozNamedAttrMap : Hr, ni = An.HTMLFormElement, Vr = An.DOMParser, Na = An.trustedTypes, er = ji.prototype, as = je(er, "cloneNode"), xr = je(er, "nextSibling"), So = je(er, "childNodes"), cs = je(er, "parentNode");
+ if (typeof Jo == "function") {
+ var xa = la.createElement("template");
+ xa.content && xa.content.ownerDocument && (la = xa.content.ownerDocument);
+ }
+ var ro = Qr(Na, Cr), Lo = ro ? ro.createHTML("") : "", Xo = la, Zo = Xo.implementation, Fs = Xo.createNodeIterator, Hs = Xo.createDocumentFragment, Qa = Xo.getElementsByTagName, Ff = Cr.importNode, Oc = {};
+ try {
+ Oc = gt(la).documentMode ? la.documentMode : {};
+ } catch {
+ }
+ var Iu = {};
+ _i.isSupported = typeof cs == "function" && Zo && Zo.createHTMLDocument !== void 0 && Oc !== 9;
+ var da, _c, qf = $n, wu = pt, jo = Ci, yf = ut, bl = br, cu = Wr, qc = zr, Jl = zt, js = null, Dc = bt({}, [].concat(A(Qe), A(kt), A(Wt), A(Zn), A(wn))), gs = null, rc = bt({}, [].concat(A(un), A(ln), A(an), A(Ot))), Ki = 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 } })), Ta = null, Bl = null, sf = !0, mc = !0, wh = !1, ra = !1, Ls = !1, pr = !1, Pr = !1, Wo = !1, hn = !1, wf = !1, Sn = !0, Nc = !1, Ro = "user-content-", T1 = !0, tr = !1, ei = {}, fi = null, ri = bt({}, ["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"]), Aa = null, ya = bt({}, ["audio", "video", "img", "source", "image", "track"]), fo = null, bs = bt({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), xo = "http://www.w3.org/1998/Math/MathML", sl = "http://www.w3.org/2000/svg", Mu = "http://www.w3.org/1999/xhtml", Zl = Mu, V1 = !1, il = null, kf = bt({}, [xo, sl, Mu], xe), eu = ["application/xhtml+xml", "text/html"], cl = "text/html", Ps = null, hb = la.createElement("form"), Of = function(bn) {
+ return bn instanceof RegExp || bn instanceof Function;
+ }, Sl = function(bn) {
+ Ps && Ps === bn || (bn && o(bn) === "object" || (bn = {}), bn = gt(bn), da = da = eu.indexOf(bn.PARSER_MEDIA_TYPE) === -1 ? cl : bn.PARSER_MEDIA_TYPE, _c = da === "application/xhtml+xml" ? xe : Te, js = "ALLOWED_TAGS" in bn ? bt({}, bn.ALLOWED_TAGS, _c) : Dc, gs = "ALLOWED_ATTR" in bn ? bt({}, bn.ALLOWED_ATTR, _c) : rc, il = "ALLOWED_NAMESPACES" in bn ? bt({}, bn.ALLOWED_NAMESPACES, xe) : kf, fo = "ADD_URI_SAFE_ATTR" in bn ? bt(gt(bs), bn.ADD_URI_SAFE_ATTR, _c) : bs, Aa = "ADD_DATA_URI_TAGS" in bn ? bt(gt(ya), bn.ADD_DATA_URI_TAGS, _c) : ya, fi = "FORBID_CONTENTS" in bn ? bt({}, bn.FORBID_CONTENTS, _c) : ri, Ta = "FORBID_TAGS" in bn ? bt({}, bn.FORBID_TAGS, _c) : {}, Bl = "FORBID_ATTR" in bn ? bt({}, bn.FORBID_ATTR, _c) : {}, ei = "USE_PROFILES" in bn && bn.USE_PROFILES, sf = bn.ALLOW_ARIA_ATTR !== !1, mc = bn.ALLOW_DATA_ATTR !== !1, wh = bn.ALLOW_UNKNOWN_PROTOCOLS || !1, ra = bn.SAFE_FOR_TEMPLATES || !1, Ls = bn.WHOLE_DOCUMENT || !1, Wo = bn.RETURN_DOM || !1, hn = bn.RETURN_DOM_FRAGMENT || !1, wf = bn.RETURN_TRUSTED_TYPE || !1, Pr = bn.FORCE_BODY || !1, Sn = bn.SANITIZE_DOM !== !1, Nc = bn.SANITIZE_NAMED_PROPS || !1, T1 = bn.KEEP_CONTENT !== !1, tr = bn.IN_PLACE || !1, Jl = bn.ALLOWED_URI_REGEXP || Jl, Zl = bn.NAMESPACE || Mu, bn.CUSTOM_ELEMENT_HANDLING && Of(bn.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (Ki.tagNameCheck = bn.CUSTOM_ELEMENT_HANDLING.tagNameCheck), bn.CUSTOM_ELEMENT_HANDLING && Of(bn.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (Ki.attributeNameCheck = bn.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), bn.CUSTOM_ELEMENT_HANDLING && typeof bn.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (Ki.allowCustomizedBuiltInElements = bn.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), ra && (mc = !1), hn && (Wo = !0), ei && (js = bt({}, A(wn)), gs = [], ei.html === !0 && (bt(js, Qe), bt(gs, un)), ei.svg === !0 && (bt(js, kt), bt(gs, ln), bt(gs, Ot)), ei.svgFilters === !0 && (bt(js, Wt), bt(gs, ln), bt(gs, Ot)), ei.mathMl === !0 && (bt(js, Zn), bt(gs, an), bt(gs, Ot))), bn.ADD_TAGS && (js === Dc && (js = gt(js)), bt(js, bn.ADD_TAGS, _c)), bn.ADD_ATTR && (gs === rc && (gs = gt(gs)), bt(gs, bn.ADD_ATTR, _c)), bn.ADD_URI_SAFE_ATTR && bt(fo, bn.ADD_URI_SAFE_ATTR, _c), bn.FORBID_CONTENTS && (fi === ri && (fi = gt(fi)), bt(fi, bn.FORBID_CONTENTS, _c)), T1 && (js["#text"] = !0), Ls && bt(js, ["html", "head", "body"]), js.table && (bt(js, ["tbody"]), delete Ta.tbody), R && R(bn), Ps = bn);
+ }, U0 = bt({}, ["mi", "mo", "mn", "ms", "mtext"]), Yf = bt({}, ["foreignobject", "desc", "title", "annotation-xml"]), H0 = bt({}, ["title", "style", "font", "a", "script"]), cf = bt({}, kt);
+ bt(cf, Wt), bt(cf, jt);
+ var Ad = bt({}, Zn);
+ bt(Ad, Ft);
+ var Ep = function(bn) {
+ var ia = cs(bn);
+ ia && ia.tagName || (ia = { namespaceURI: Zl, tagName: "template" });
+ var Ca = Te(bn.tagName), vl = Te(ia.tagName);
+ return !!il[bn.namespaceURI] && (bn.namespaceURI === sl ? ia.namespaceURI === Mu ? Ca === "svg" : ia.namespaceURI === xo ? Ca === "svg" && (vl === "annotation-xml" || U0[vl]) : !!cf[Ca] : bn.namespaceURI === xo ? ia.namespaceURI === Mu ? Ca === "math" : ia.namespaceURI === sl ? Ca === "math" && Yf[vl] : !!Ad[Ca] : bn.namespaceURI === Mu ? !(ia.namespaceURI === sl && !Yf[vl]) && !(ia.namespaceURI === xo && !U0[vl]) && !Ad[Ca] && (H0[Ca] || !cf[Ca]) : !(da !== "application/xhtml+xml" || !il[bn.namespaceURI]));
+ }, Md = function(bn) {
+ de(_i.removed, { element: bn });
+ try {
+ bn.parentNode.removeChild(bn);
+ } catch {
+ try {
+ bn.outerHTML = Lo;
+ } catch {
+ bn.remove();
+ }
+ }
+ }, mn = function(bn, ia) {
+ try {
+ de(_i.removed, { attribute: ia.getAttributeNode(bn), from: ia });
+ } catch {
+ de(_i.removed, { attribute: null, from: ia });
+ }
+ if (ia.removeAttribute(bn), bn === "is" && !gs[bn])
+ if (Wo || hn)
+ try {
+ Md(ia);
+ } catch {
+ }
+ else
+ try {
+ ia.setAttribute(bn, "");
+ } catch {
+ }
+ }, io = function(bn) {
+ var ia, Ca;
+ if (Pr)
+ bn = "" + bn;
+ else {
+ var vl = ie(bn, /^[\r\n\t ]+/);
+ Ca = vl && vl[0];
+ }
+ da === "application/xhtml+xml" && Zl === Mu && (bn = '' + bn + "");
+ var ku = ro ? ro.createHTML(bn) : bn;
+ if (Zl === Mu)
+ try {
+ ia = new Vr().parseFromString(ku, da);
+ } catch {
+ }
+ if (!ia || !ia.documentElement) {
+ ia = Zo.createDocument(Zl, "template", null);
+ try {
+ ia.documentElement.innerHTML = V1 ? Lo : ku;
+ } catch {
+ }
+ }
+ var lf = ia.body || ia.documentElement;
+ return bn && Ca && lf.insertBefore(la.createTextNode(Ca), lf.childNodes[0] || null), Zl === Mu ? Qa.call(ia, Ls ? "html" : "body")[0] : Ls ? ia.documentElement : lf;
+ }, Ba = function(bn) {
+ return Fs.call(bn.ownerDocument || bn, bn, Ya.SHOW_ELEMENT | Ya.SHOW_COMMENT | Ya.SHOW_TEXT, null, !1);
+ }, bc = function(bn) {
+ return bn instanceof ni && (typeof bn.nodeName != "string" || typeof bn.textContent != "string" || typeof bn.removeChild != "function" || !(bn.attributes instanceof Yr) || typeof bn.removeAttribute != "function" || typeof bn.setAttribute != "function" || typeof bn.namespaceURI != "string" || typeof bn.insertBefore != "function" || typeof bn.hasChildNodes != "function");
+ }, jc = function(bn) {
+ return o(Cc) === "object" ? bn instanceof Cc : bn && o(bn) === "object" && typeof bn.nodeType == "number" && typeof bn.nodeName == "string";
+ }, ll = function(bn, ia, Ca) {
+ Iu[bn] && be(Iu[bn], function(vl) {
+ vl.call(_i, ia, Ca, Ps);
+ });
+ }, Df = function(bn) {
+ var ia;
+ if (ll("beforeSanitizeElements", bn, null), bc(bn) || ve(/[\u0080-\uFFFF]/, bn.nodeName))
+ return Md(bn), !0;
+ var Ca = _c(bn.nodeName);
+ if (ll("uponSanitizeElement", bn, { tagName: Ca, allowedTags: js }), bn.hasChildNodes() && !jc(bn.firstElementChild) && (!jc(bn.content) || !jc(bn.content.firstElementChild)) && ve(/<[/\w]/g, bn.innerHTML) && ve(/<[/\w]/g, bn.textContent) || Ca === "select" && ve(/= 0; --lf)
+ vl.insertBefore(as(ku[lf], !0), xr(bn));
+ }
+ return Md(bn), !0;
+ }
+ return bn instanceof ji && !Ep(bn) ? (Md(bn), !0) : Ca !== "noscript" && Ca !== "noembed" || !ve(/<\/no(script|embed)/i, bn.innerHTML) ? (ra && bn.nodeType === 3 && (ia = bn.textContent, ia = Be(ia, qf, " "), ia = Be(ia, wu, " "), ia = Be(ia, jo, " "), bn.textContent !== ia && (de(_i.removed, { element: bn.cloneNode() }), bn.textContent = ia)), ll("afterSanitizeElements", bn, null), !1) : (Md(bn), !0);
+ }, Jf = function(bn, ia, Ca) {
+ if (Sn && (ia === "id" || ia === "name") && (Ca in la || Ca in hb))
+ return !1;
+ if (!(mc && !Bl[ia] && ve(yf, ia))) {
+ if (!(sf && ve(bl, ia))) {
+ if (!gs[ia] || Bl[ia]) {
+ if (!(Fd(bn) && (Ki.tagNameCheck instanceof RegExp && ve(Ki.tagNameCheck, bn) || Ki.tagNameCheck instanceof Function && Ki.tagNameCheck(bn)) && (Ki.attributeNameCheck instanceof RegExp && ve(Ki.attributeNameCheck, ia) || Ki.attributeNameCheck instanceof Function && Ki.attributeNameCheck(ia)) || ia === "is" && Ki.allowCustomizedBuiltInElements && (Ki.tagNameCheck instanceof RegExp && ve(Ki.tagNameCheck, Ca) || Ki.tagNameCheck instanceof Function && Ki.tagNameCheck(Ca))))
+ return !1;
+ } else if (!fo[ia]) {
+ if (!ve(Jl, Be(Ca, qc, ""))) {
+ if ((ia !== "src" && ia !== "xlink:href" && ia !== "href" || bn === "script" || te(Ca, "data:") !== 0 || !Aa[bn]) && !(wh && !ve(cu, Be(Ca, qc, "")))) {
+ if (Ca)
+ return !1;
+ }
+ }
+ }
+ }
+ }
+ return !0;
+ }, Fd = function(bn) {
+ return bn.indexOf("-") > 0;
+ }, Gh = function(bn) {
+ var ia, Ca, vl, ku;
+ ll("beforeSanitizeAttributes", bn, null);
+ var lf = bn.attributes;
+ if (lf) {
+ var uf = { attrName: "", attrValue: "", keepAttr: !0, allowedAttributes: gs };
+ for (ku = lf.length; ku--; ) {
+ var Tp = ia = lf[ku], s0 = Tp.name, Zf = Tp.namespaceURI;
+ if (Ca = s0 === "value" ? ia.value : Me(ia.value), vl = _c(s0), uf.attrName = vl, uf.attrValue = Ca, uf.keepAttr = !0, uf.forceKeepAttr = void 0, ll("uponSanitizeAttribute", bn, uf), Ca = uf.attrValue, !uf.forceKeepAttr && (mn(s0, bn), uf.keepAttr))
+ if (ve(/\/>/i, Ca))
+ mn(s0, bn);
+ else {
+ ra && (Ca = Be(Ca, qf, " "), Ca = Be(Ca, wu, " "), Ca = Be(Ca, jo, " "));
+ var Br = _c(bn.nodeName);
+ if (Jf(Br, vl, Ca)) {
+ if (!Nc || vl !== "id" && vl !== "name" || (mn(s0, bn), Ca = Ro + Ca), ro && o(Na) === "object" && typeof Na.getAttributeType == "function" && !Zf)
+ switch (Na.getAttributeType(Br, vl)) {
+ case "TrustedHTML":
+ Ca = ro.createHTML(Ca);
+ break;
+ case "TrustedScriptURL":
+ Ca = ro.createScriptURL(Ca);
+ }
+ try {
+ Zf ? bn.setAttributeNS(Zf, s0, Ca) : bn.setAttribute(s0, Ca), ke(_i.removed);
+ } catch {
+ }
+ }
+ }
+ }
+ ll("afterSanitizeAttributes", bn, null);
+ }
+ }, iA = function bn(ia) {
+ var Ca, vl = Ba(ia);
+ for (ll("beforeSanitizeShadowDOM", ia, null); Ca = vl.nextNode(); )
+ ll("uponSanitizeShadowNode", Ca, null), Df(Ca) || (Ca.content instanceof Ra && bn(Ca.content), Gh(Ca));
+ ll("afterSanitizeShadowDOM", ia, null);
+ };
+ return _i.sanitize = function(bn) {
+ var ia, Ca, vl, ku, lf, uf = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
+ if ((V1 = !bn) && (bn = ""), typeof bn != "string" && !jc(bn)) {
+ if (typeof bn.toString != "function")
+ throw ge("toString is not a function");
+ if (typeof (bn = bn.toString()) != "string")
+ throw ge("dirty is not a string, aborting");
+ }
+ if (!_i.isSupported) {
+ if (o(An.toStaticHTML) === "object" || typeof An.toStaticHTML == "function") {
+ if (typeof bn == "string")
+ return An.toStaticHTML(bn);
+ if (jc(bn))
+ return An.toStaticHTML(bn.outerHTML);
+ }
+ return bn;
+ }
+ if (pr || Sl(uf), _i.removed = [], typeof bn == "string" && (tr = !1), tr) {
+ if (bn.nodeName) {
+ var Tp = _c(bn.nodeName);
+ if (!js[Tp] || Ta[Tp])
+ throw ge("root node is forbidden and cannot be sanitized in-place");
+ }
+ } else if (bn instanceof Cc)
+ (Ca = (ia = io("")).ownerDocument.importNode(bn, !0)).nodeType === 1 && Ca.nodeName === "BODY" || Ca.nodeName === "HTML" ? ia = Ca : ia.appendChild(Ca);
+ else {
+ if (!Wo && !ra && !Ls && bn.indexOf("<") === -1)
+ return ro && wf ? ro.createHTML(bn) : bn;
+ if (!(ia = io(bn)))
+ return Wo ? null : wf ? Lo : "";
+ }
+ ia && Pr && Md(ia.firstChild);
+ for (var s0 = Ba(tr ? bn : ia); vl = s0.nextNode(); )
+ vl.nodeType === 3 && vl === ku || Df(vl) || (vl.content instanceof Ra && iA(vl.content), Gh(vl), ku = vl);
+ if (ku = null, tr)
+ return bn;
+ if (Wo) {
+ if (hn)
+ for (lf = Hs.call(ia.ownerDocument); ia.firstChild; )
+ lf.appendChild(ia.firstChild);
+ else
+ lf = ia;
+ return gs.shadowroot && (lf = Ff.call(Cr, lf, !0)), lf;
+ }
+ var Zf = Ls ? ia.outerHTML : ia.innerHTML;
+ return Ls && js["!doctype"] && ia.ownerDocument && ia.ownerDocument.doctype && ia.ownerDocument.doctype.name && ve(Si, ia.ownerDocument.doctype.name) && (Zf = "
+` + Zf), ra && (Zf = Be(Zf, qf, " "), Zf = Be(Zf, wu, " "), Zf = Be(Zf, jo, " ")), ro && wf ? ro.createHTML(Zf) : Zf;
+ }, _i.setConfig = function(bn) {
+ Sl(bn), pr = !0;
+ }, _i.clearConfig = function() {
+ Ps = null, pr = !1;
+ }, _i.isValidAttribute = function(bn, ia, Ca) {
+ Ps || Sl({});
+ var vl = _c(bn), ku = _c(ia);
+ return Jf(vl, ku, Ca);
+ }, _i.addHook = function(bn, ia) {
+ typeof ia == "function" && (Iu[bn] = Iu[bn] || [], de(Iu[bn], ia));
+ }, _i.removeHook = function(bn) {
+ if (Iu[bn])
+ return ke(Iu[bn]);
+ }, _i.removeHooks = function(bn) {
+ Iu[bn] && (Iu[bn] = []);
+ }, _i.removeAllHooks = function() {
+ Iu = {};
+ }, _i;
+ }
+ var Gr = or();
+ return Gr;
+ }();
+});
+const Jpe = { 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: (r) => r >= 255 ? 255 : r < 0 ? 0 : r, g: (r) => r >= 255 ? 255 : r < 0 ? 0 : r, b: (r) => r >= 255 ? 255 : r < 0 ? 0 : r, h: (r) => r % 360, s: (r) => r >= 100 ? 100 : r < 0 ? 0 : r, l: (r) => r >= 100 ? 100 : r < 0 ? 0 : r, a: (r) => r >= 1 ? 1 : r < 0 ? 0 : r }, toLinear: (r) => {
+ const i = r / 255;
+ return r > 0.03928 ? Math.pow((i + 0.055) / 1.055, 2.4) : i / 12.92;
+}, hue2rgb: (r, i, o) => (o < 0 && (o += 1), o > 1 && (o -= 1), o < 1 / 6 ? r + 6 * (i - r) * o : o < 0.5 ? i : o < 2 / 3 ? r + (i - r) * (2 / 3 - o) * 6 : r), hsl2rgb: ({ h: r, s: i, l: o }, l) => {
+ if (!i)
+ return 2.55 * o;
+ r /= 360, i /= 100;
+ const f = (o /= 100) < 0.5 ? o * (1 + i) : o + i - o * i, g = 2 * o - f;
+ switch (l) {
+ case "r":
+ return 255 * Jpe.hue2rgb(g, f, r + 1 / 3);
+ case "g":
+ return 255 * Jpe.hue2rgb(g, f, r);
+ case "b":
+ return 255 * Jpe.hue2rgb(g, f, r - 1 / 3);
+ }
+}, rgb2hsl: ({ r, g: i, b: o }, l) => {
+ r /= 255, i /= 255, o /= 255;
+ const f = Math.max(r, i, o), g = Math.min(r, i, o), A = (f + g) / 2;
+ if (l === "l")
+ return 100 * A;
+ if (f === g)
+ return 0;
+ const b = f - g;
+ if (l === "s")
+ return 100 * (A > 0.5 ? b / (2 - f - g) : b / (f + g));
+ switch (f) {
+ case r:
+ return 60 * ((i - o) / b + (i < o ? 6 : 0));
+ case i:
+ return 60 * ((o - r) / b + 2);
+ case o:
+ return 60 * ((r - i) / b + 4);
+ default:
+ return -1;
+ }
+} }, C6n = { clamp: (r, i, o) => i > o ? Math.min(i, Math.max(o, r)) : Math.min(o, Math.max(i, r)), round: (r) => Math.round(1e10 * r) / 1e10 }, _6n = { dec2hex: (r) => {
+ const i = Math.round(r).toString(16);
+ return i.length > 1 ? i : `0${i}`;
+} };
+var _l = { channel: Jpe, lang: C6n, unit: _6n };
+const dO = {};
+for (let r = 0; r <= 255; r++)
+ dO[r] = _l.unit.dec2hex(r);
+const yNe = 0, Gz = 1, QQ = 2;
+var E6n = class {
+ constructor() {
+ this.type = yNe;
+ }
+ get() {
+ return this.type;
+ }
+ set(r) {
+ if (this.type && this.type !== r)
+ throw new Error("Cannot change both RGB and HSL channels at the same time");
+ this.type = r;
+ }
+ reset() {
+ this.type = yNe;
+ }
+ is(r) {
+ return this.type === r;
+ }
+}, T6n = class {
+ constructor(r, i) {
+ this.color = i, this.changed = !1, this.data = r, this.type = new E6n();
+ }
+ set(r, i) {
+ return this.color = i, this.changed = !1, this.data = r, this.type.type = yNe, this;
+ }
+ _ensureHSL() {
+ const r = this.data, { h: i, s: o, l } = r;
+ i === void 0 && (r.h = _l.channel.rgb2hsl(r, "h")), o === void 0 && (r.s = _l.channel.rgb2hsl(r, "s")), l === void 0 && (r.l = _l.channel.rgb2hsl(r, "l"));
+ }
+ _ensureRGB() {
+ const r = this.data, { r: i, g: o, b: l } = r;
+ i === void 0 && (r.r = _l.channel.hsl2rgb(r, "r")), o === void 0 && (r.g = _l.channel.hsl2rgb(r, "g")), l === void 0 && (r.b = _l.channel.hsl2rgb(r, "b"));
+ }
+ get r() {
+ const r = this.data, i = r.r;
+ return this.type.is(QQ) || i === void 0 ? (this._ensureHSL(), _l.channel.hsl2rgb(r, "r")) : i;
+ }
+ get g() {
+ const r = this.data, i = r.g;
+ return this.type.is(QQ) || i === void 0 ? (this._ensureHSL(), _l.channel.hsl2rgb(r, "g")) : i;
+ }
+ get b() {
+ const r = this.data, i = r.b;
+ return this.type.is(QQ) || i === void 0 ? (this._ensureHSL(), _l.channel.hsl2rgb(r, "b")) : i;
+ }
+ get h() {
+ const r = this.data, i = r.h;
+ return this.type.is(Gz) || i === void 0 ? (this._ensureRGB(), _l.channel.rgb2hsl(r, "h")) : i;
+ }
+ get s() {
+ const r = this.data, i = r.s;
+ return this.type.is(Gz) || i === void 0 ? (this._ensureRGB(), _l.channel.rgb2hsl(r, "s")) : i;
+ }
+ get l() {
+ const r = this.data, i = r.l;
+ return this.type.is(Gz) || i === void 0 ? (this._ensureRGB(), _l.channel.rgb2hsl(r, "l")) : i;
+ }
+ get a() {
+ return this.data.a;
+ }
+ set r(r) {
+ this.type.set(Gz), this.changed = !0, this.data.r = r;
+ }
+ set g(r) {
+ this.type.set(Gz), this.changed = !0, this.data.g = r;
+ }
+ set b(r) {
+ this.type.set(Gz), this.changed = !0, this.data.b = r;
+ }
+ set h(r) {
+ this.type.set(QQ), this.changed = !0, this.data.h = r;
+ }
+ set s(r) {
+ this.type.set(QQ), this.changed = !0, this.data.s = r;
+ }
+ set l(r) {
+ this.type.set(QQ), this.changed = !0, this.data.l = r;
+ }
+ set a(r) {
+ this.changed = !0, this.data.a = r;
+ }
+}, Ybe = new T6n({ r: 0, g: 0, b: 0, a: 0 }, "transparent");
+const KBt = { re: /^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i, parse: (r) => {
+ if (r.charCodeAt(0) !== 35)
+ return;
+ const i = r.match(KBt.re);
+ if (!i)
+ return;
+ const o = i[1], l = parseInt(o, 16), f = o.length, g = f % 4 == 0, A = f > 4, b = A ? 1 : 17, v = A ? 8 : 4, k = g ? 0 : -1, _ = A ? 255 : 15;
+ return Ybe.set({ r: (l >> v * (k + 3) & _) * b, g: (l >> v * (k + 2) & _) * b, b: (l >> v * (k + 1) & _) * b, a: g ? (l & _) * b / 255 : 1 }, r);
+}, stringify: (r) => {
+ const { r: i, g: o, b: l, a: f } = r;
+ return f < 1 ? `#${dO[Math.round(i)]}${dO[Math.round(o)]}${dO[Math.round(l)]}${dO[Math.round(255 * f)]}` : `#${dO[Math.round(i)]}${dO[Math.round(o)]}${dO[Math.round(l)]}`;
+} };
+var Tre = KBt;
+const Zpe = { 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: (r) => {
+ const i = r.match(Zpe.hueRe);
+ if (i) {
+ const [, o, l] = i;
+ switch (l) {
+ case "grad":
+ return _l.channel.clamp.h(0.9 * parseFloat(o));
+ case "rad":
+ return _l.channel.clamp.h(180 * parseFloat(o) / Math.PI);
+ case "turn":
+ return _l.channel.clamp.h(360 * parseFloat(o));
+ }
+ }
+ return _l.channel.clamp.h(parseFloat(r));
+}, parse: (r) => {
+ const i = r.charCodeAt(0);
+ if (i !== 104 && i !== 72)
+ return;
+ const o = r.match(Zpe.re);
+ if (!o)
+ return;
+ const [, l, f, g, A, b] = o;
+ return Ybe.set({ h: Zpe._hue2deg(l), s: _l.channel.clamp.s(parseFloat(f)), l: _l.channel.clamp.l(parseFloat(g)), a: A ? _l.channel.clamp.a(b ? parseFloat(A) / 100 : parseFloat(A)) : 1 }, r);
+}, stringify: (r) => {
+ const { h: i, s: o, l, a: f } = r;
+ return f < 1 ? `hsla(${_l.lang.round(i)}, ${_l.lang.round(o)}%, ${_l.lang.round(l)}%, ${f})` : `hsl(${_l.lang.round(i)}, ${_l.lang.round(o)}%, ${_l.lang.round(l)}%)`;
+} };
+var epe = Zpe;
+const eme = { 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: (r) => {
+ r = r.toLowerCase();
+ const i = eme.colors[r];
+ if (i)
+ return Tre.parse(i);
+}, stringify: (r) => {
+ const i = Tre.stringify(r);
+ for (const o in eme.colors)
+ if (eme.colors[o] === i)
+ return o;
+} };
+var Ixt = eme;
+const zBt = { 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: (r) => {
+ const i = r.charCodeAt(0);
+ if (i !== 114 && i !== 82)
+ return;
+ const o = r.match(zBt.re);
+ if (!o)
+ return;
+ const [, l, f, g, A, b, v, k, _] = o;
+ return Ybe.set({ r: _l.channel.clamp.r(f ? 2.55 * parseFloat(l) : parseFloat(l)), g: _l.channel.clamp.g(A ? 2.55 * parseFloat(g) : parseFloat(g)), b: _l.channel.clamp.b(v ? 2.55 * parseFloat(b) : parseFloat(b)), a: k ? _l.channel.clamp.a(_ ? parseFloat(k) / 100 : parseFloat(k)) : 1 }, r);
+}, stringify: (r) => {
+ const { r: i, g: o, b: l, a: f } = r;
+ return f < 1 ? `rgba(${_l.lang.round(i)}, ${_l.lang.round(o)}, ${_l.lang.round(l)}, ${_l.lang.round(f)})` : `rgb(${_l.lang.round(i)}, ${_l.lang.round(o)}, ${_l.lang.round(l)})`;
+} };
+var tpe = zBt;
+const B6n = { format: { keyword: Ixt, hex: Tre, rgb: tpe, rgba: tpe, hsl: epe, hsla: epe }, parse: (r) => {
+ if (typeof r != "string")
+ return r;
+ const i = Tre.parse(r) || tpe.parse(r) || epe.parse(r) || Ixt.parse(r);
+ if (i)
+ return i;
+ throw new Error(`Unsupported color format: "${r}"`);
+}, stringify: (r) => !r.changed && r.color ? r.color : r.type.is(QQ) || r.data.r === void 0 ? epe.stringify(r) : r.a < 1 || !Number.isInteger(r.r) || !Number.isInteger(r.g) || !Number.isInteger(r.b) ? tpe.stringify(r) : Tre.stringify(r) };
+var FT = B6n, GBt = (r, i) => {
+ const o = FT.parse(r);
+ for (const l in i)
+ o[l] = _l.channel.clamp[l](i[l]);
+ return FT.stringify(o);
+}, sre = (r, i, o = 0, l = 1) => {
+ if (typeof r != "number")
+ return GBt(r, { a: i });
+ const f = Ybe.set({ r: _l.channel.clamp.r(r), g: _l.channel.clamp.g(i), b: _l.channel.clamp.b(o), a: _l.channel.clamp.a(l) });
+ return FT.stringify(f);
+}, S6n = (r) => {
+ const { r: i, g: o, b: l } = FT.parse(r), f = 0.2126 * _l.channel.toLinear(i) + 0.7152 * _l.channel.toLinear(o) + 0.0722 * _l.channel.toLinear(l);
+ return _l.lang.round(f);
+}, L6n = (r) => S6n(r) >= 0.5, XBt = (r) => !L6n(r), WBt = (r, i, o) => {
+ const l = FT.parse(r), f = l[i], g = _l.channel.clamp[i](f + o);
+ return f !== g && (l[i] = g), FT.stringify(l);
+}, Fc = (r, i) => WBt(r, "l", i), ml = (r, i) => WBt(r, "l", -i), oi = (r, i) => {
+ const o = FT.parse(r), l = {};
+ for (const f in i)
+ i[f] && (l[f] = o[f] + i[f]);
+ return GBt(r, l);
+}, I6n = (r, i, o = 50) => {
+ const { r: l, g: f, b: g, a: A } = FT.parse(r), { r: b, g: v, b: k, a: _ } = FT.parse(i), T = o / 100, L = 2 * T - 1, F = A - _, U = ((L * F == -1 ? L : (L + F) / (1 + L * F)) + 1) / 2, q = 1 - U;
+ return sre(l * U + b * q, f * U + v * q, g * U + k * q, A * T + _ * (1 - T));
+}, zo = (r, i = 100) => {
+ const o = FT.parse(r);
+ return o.r = 255 - o.r, o.g = 255 - o.g, o.b = 255 - o.b, I6n(o, r, i);
+}, VBt = (typeof global > "u" ? "undefined" : Yl(global)) == "object" && global && global.Object === Object && global, M6n = (typeof self > "u" ? "undefined" : Yl(self)) == "object" && self && self.Object === Object && self, W9 = VBt || M6n || Function("return this")(), cC = W9.Symbol, qBt = Object.prototype, F6n = qBt.hasOwnProperty, O6n = qBt.toString, Nne = cC ? cC.toStringTag : void 0, D6n = Object.prototype.toString, N6n = "[object Null]", P6n = "[object Undefined]", Mxt = cC ? cC.toStringTag : void 0;
+function _$(r) {
+ return r == null ? r === void 0 ? P6n : N6n : Mxt && Mxt in Object(r) ? function(i) {
+ var o = F6n.call(i, Nne), l = i[Nne];
+ try {
+ i[Nne] = void 0;
+ var f = !0;
+ } catch {
+ }
+ var g = O6n.call(i);
+ return f && (o ? i[Nne] = l : delete i[Nne]), g;
+ }(r) : function(i) {
+ return D6n.call(i);
+ }(r);
+}
+function xk(r) {
+ var i = Yl(r);
+ return r != null && (i == "object" || i == "function");
+}
+var R6n = "[object AsyncFunction]", Q6n = "[object Function]", $6n = "[object GeneratorFunction]", U6n = "[object Proxy]";
+function fie(r) {
+ if (!xk(r))
+ return !1;
+ var i = _$(r);
+ return i == Q6n || i == $6n || i == R6n || i == U6n;
+}
+var H6n = a0("Array").keys, rOe = Array.prototype, j6n = { DOMTokenList: !0, NodeList: !0 }, Fxt = function(r) {
+ var i = r.keys;
+ return r === rOe || E1(rOe, r) && i === rOe.keys || nl(j6n, PO(r)) ? H6n : i;
+}, iOe = W9["__core-js_shared__"], Oxt = function() {
+ var r = /[^.]+$/.exec(iOe && Fxt(iOe) && Fxt(iOe).IE_PROTO || "");
+ return r ? "Symbol(src)_1." + r : "";
+}(), K6n = Function.prototype.toString;
+function E$(r) {
+ if (r != null) {
+ try {
+ return K6n.call(r);
+ } catch {
+ }
+ try {
+ return r + "";
+ } catch {
+ }
+ }
+ return "";
+}
+var z6n = /^\[object .+?Constructor\]$/, G6n = Function.prototype, X6n = Object.prototype, W6n = G6n.toString, V6n = X6n.hasOwnProperty, q6n = RegExp("^" + W6n.call(V6n).replace(/[\\^$.*+?()[\]{}|]/g, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
+function Y6n(r) {
+ return !(!xk(r) || (i = r, Oxt && Oxt in i)) && (fie(r) ? q6n : z6n).test(E$(r));
+ var i;
+}
+function T$(r, i) {
+ var o = function(l, f) {
+ return l == null ? void 0 : l[f];
+ }(r, i);
+ return Y6n(o) ? o : void 0;
+}
+var Pne = T$(Object, "create"), J6n = Object.prototype.hasOwnProperty, Z6n = Object.prototype.hasOwnProperty;
+function GQ(r) {
+ var i = -1, o = r == null ? 0 : r.length;
+ for (this.clear(); ++i < o; ) {
+ var l = r[i];
+ this.set(l[0], l[1]);
+ }
+}
+function mX(r, i) {
+ return r === i || r != r && i != i;
+}
+function npe(r, i) {
+ for (var o = r.length; o--; )
+ if (mX(r[o][0], i))
+ return o;
+ return -1;
+}
+GQ.prototype.clear = function() {
+ this.__data__ = Pne ? Pne(null) : {}, this.size = 0;
+}, GQ.prototype.delete = function(r) {
+ var i = this.has(r) && delete this.__data__[r];
+ return this.size -= i ? 1 : 0, i;
+}, GQ.prototype.get = function(r) {
+ var i = this.__data__;
+ if (Pne) {
+ var o = i[r];
+ return o === "__lodash_hash_undefined__" ? void 0 : o;
+ }
+ return J6n.call(i, r) ? i[r] : void 0;
+}, GQ.prototype.has = function(r) {
+ var i = this.__data__;
+ return Pne ? i[r] !== void 0 : Z6n.call(i, r);
+}, GQ.prototype.set = function(r, i) {
+ var o = this.__data__;
+ return this.size += this.has(r) ? 0 : 1, o[r] = Pne && i === void 0 ? "__lodash_hash_undefined__" : i, this;
+};
+var ekn = Array.prototype, tkn = gk(ekn);
+function iL(r) {
+ var i = -1, o = r == null ? 0 : r.length;
+ for (this.clear(); ++i < o; ) {
+ var l = r[i];
+ this.set(l[0], l[1]);
+ }
+}
+iL.prototype.clear = function() {
+ this.__data__ = [], this.size = 0;
+}, iL.prototype.delete = function(r) {
+ var i = this.__data__, o = npe(i, r);
+ return !(o < 0) && (o == i.length - 1 ? i.pop() : tkn.call(i, o, 1), --this.size, !0);
+}, iL.prototype.get = function(r) {
+ var i = this.__data__, o = npe(i, r);
+ return o < 0 ? void 0 : i[o][1];
+}, iL.prototype.has = function(r) {
+ return npe(this.__data__, r) > -1;
+}, iL.prototype.set = function(r, i) {
+ var o = this.__data__, l = npe(o, r);
+ return l < 0 ? (++this.size, o.push([r, i])) : o[l][1] = i, this;
+};
+var die = T$(W9, "Map");
+function rpe(r, i) {
+ var o = r.__data__;
+ return function(l) {
+ var f = Yl(l);
+ return f == "string" || f == "number" || f == "symbol" || f == "boolean" ? l !== "__proto__" : l === null;
+ }(i) ? o[typeof i == "string" ? "string" : "hash"] : Zs(o);
+}
+function aL(r) {
+ var i = -1, o = r == null ? 0 : r.length;
+ for (this.clear(); ++i < o; ) {
+ var l = r[i];
+ this.set(l[0], l[1]);
+ }
+}
+aL.prototype.clear = function() {
+ this.size = 0, this.__data__ = { hash: new GQ(), map: new (die || iL)(), string: new GQ() };
+}, aL.prototype.delete = function(r) {
+ var i = rpe(this, r).delete(r);
+ return this.size -= i ? 1 : 0, i;
+}, aL.prototype.get = function(r) {
+ return rpe(this, r).get(r);
+}, aL.prototype.has = function(r) {
+ return rpe(this, r).has(r);
+}, aL.prototype.set = function(r, i) {
+ var o = rpe(this, r), l = o.size;
+ return o.set(r, i), this.size += o.size == l ? 0 : 1, this;
+};
+var nkn = "Expected a function";
+function bX(r, i) {
+ if (typeof r != "function" || i != null && typeof i != "function")
+ throw new TypeError(nkn);
+ var o = function l() {
+ var f = arguments, g = i ? i.apply(this, f) : f[0], A = l.cache;
+ if (A.has(g))
+ return A.get(g);
+ var b = r.apply(this, f);
+ return l.cache = A.set(g, b) || A, b;
+ };
+ return o.cache = new (bX.Cache || aL)(), o;
+}
+bX.Cache = aL;
+var YBt = "comm", JBt = "rule", ZBt = "decl", rkn = Math.abs, IRe = String.fromCharCode;
+function eSt(r) {
+ return r.trim();
+}
+function tme(r, i, o) {
+ return r.replace(i, o);
+}
+function ikn(r, i) {
+ return r.indexOf(i);
+}
+function Aie(r, i) {
+ return 0 | r.charCodeAt(i);
+}
+function gie(r, i, o) {
+ return r.slice(i, o);
+}
+function nL(r) {
+ return r.length;
+}
+function ipe(r, i) {
+ return i.push(r), r;
+}
+var Jbe = 1, WG = 1, tSt = 0, lC = 0, cm = 0, VG = "";
+function MRe(r, i, o, l, f, g, A, b) {
+ return { value: r, root: i, parent: o, type: l, props: f, children: g, line: Jbe, column: WG, length: A, return: "", siblings: b };
+}
+function akn() {
+ return cm = lC > 0 ? Aie(VG, --lC) : 0, WG--, cm === 10 && (WG = 1, Jbe--), cm;
+}
+function K9() {
+ return cm = lC < tSt ? Aie(VG, lC++) : 0, WG++, cm === 10 && (WG = 1, Jbe++), cm;
+}
+function i$() {
+ return Aie(VG, lC);
+}
+function nme() {
+ return lC;
+}
+function Zbe(r, i) {
+ return gie(VG, r, i);
+}
+function wNe(r) {
+ switch (r) {
+ 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 aOe(r) {
+ return eSt(Zbe(lC - 1, kNe(r === 91 ? r + 2 : r === 40 ? r + 1 : r)));
+}
+function okn(r) {
+ for (; (cm = i$()) && cm < 33; )
+ K9();
+ return wNe(r) > 2 || wNe(cm) > 3 ? "" : " ";
+}
+function skn(r, i) {
+ for (; --i && K9() && !(cm < 48 || cm > 102 || cm > 57 && cm < 65 || cm > 70 && cm < 97); )
+ ;
+ return Zbe(r, nme() + (i < 6 && i$() == 32 && K9() == 32));
+}
+function kNe(r) {
+ for (; K9(); )
+ switch (cm) {
+ case r:
+ return lC;
+ case 34:
+ case 39:
+ r !== 34 && r !== 39 && kNe(cm);
+ break;
+ case 40:
+ r === 41 && kNe(r);
+ break;
+ case 92:
+ K9();
+ }
+ return lC;
+}
+function ckn(r, i) {
+ for (; K9() && r + cm !== 57 && (r + cm !== 84 || i$() !== 47); )
+ ;
+ return "/*" + Zbe(i, lC - 1) + "*" + IRe(r === 47 ? r : K9());
+}
+function lkn(r) {
+ for (; !wNe(i$()); )
+ K9();
+ return Zbe(r, lC);
+}
+function ukn(r) {
+ return function(i) {
+ return VG = "", i;
+ }(rme("", null, null, null, [""], r = function(i) {
+ return Jbe = WG = 1, tSt = nL(VG = i), lC = 0, [];
+ }(r), 0, [0], r));
+}
+function rme(r, i, o, l, f, g, A, b, v) {
+ for (var k = 0, _ = 0, T = A, L = 0, F = 0, U = 0, q = 1, Z = 1, R = 1, J = 0, he = "", Y = f, ue = g, le = l, be = he; Z; )
+ switch (U = J, J = K9()) {
+ case 40:
+ if (U != 108 && Aie(be, T - 1) == 58) {
+ ikn(be += tme(aOe(J), "&", "&\f"), "&\f") != -1 && (R = -1);
+ break;
+ }
+ case 34:
+ case 39:
+ case 91:
+ be += aOe(J);
+ break;
+ case 9:
+ case 10:
+ case 13:
+ case 32:
+ be += okn(U);
+ break;
+ case 92:
+ be += skn(nme() - 1, 7);
+ continue;
+ case 47:
+ switch (i$()) {
+ case 42:
+ case 47:
+ ipe(hkn(ckn(K9(), nme()), i, o, v), v);
+ break;
+ default:
+ be += "/";
+ }
+ break;
+ case 123 * q:
+ b[k++] = nL(be) * R;
+ case 125 * q:
+ case 59:
+ case 0:
+ switch (J) {
+ case 0:
+ case 125:
+ Z = 0;
+ case 59 + _:
+ R == -1 && (be = tme(be, /\f/g, "")), F > 0 && nL(be) - T && ipe(F > 32 ? Nxt(be + ";", l, o, T - 1, v) : Nxt(tme(be, " ", "") + ";", l, o, T - 2, v), v);
+ break;
+ case 59:
+ be += ";";
+ default:
+ if (ipe(le = Dxt(be, i, o, k, _, f, b, he, Y = [], ue = [], T, g), g), J === 123)
+ if (_ === 0)
+ rme(be, i, le, le, Y, g, T, b, ue);
+ else
+ switch (L === 99 && Aie(be, 3) === 110 ? 100 : L) {
+ case 100:
+ case 108:
+ case 109:
+ case 115:
+ rme(r, le, le, l && ipe(Dxt(r, le, le, 0, 0, f, b, he, f, Y = [], T, ue), ue), f, ue, T, b, l ? Y : ue);
+ break;
+ default:
+ rme(be, le, le, le, [""], ue, 0, b, ue);
+ }
+ }
+ k = _ = F = 0, q = R = 1, he = be = "", T = A;
+ break;
+ case 58:
+ T = 1 + nL(be), F = U;
+ default:
+ if (q < 1) {
+ if (J == 123)
+ --q;
+ else if (J == 125 && q++ == 0 && akn() == 125)
+ continue;
+ }
+ switch (be += IRe(J), J * q) {
+ case 38:
+ R = _ > 0 ? 1 : (be += "\f", -1);
+ break;
+ case 44:
+ b[k++] = (nL(be) - 1) * R, R = 1;
+ break;
+ case 64:
+ i$() === 45 && (be += aOe(K9())), L = i$(), _ = T = nL(he = be += lkn(nme())), J++;
+ break;
+ case 45:
+ U === 45 && nL(be) == 2 && (q = 0);
+ }
+ }
+ return g;
+}
+function Dxt(r, i, o, l, f, g, A, b, v, k, _, T) {
+ for (var L = f - 1, F = f === 0 ? g : [""], U = function(ue) {
+ return ue.length;
+ }(F), q = 0, Z = 0, R = 0; q < l; ++q)
+ for (var J = 0, he = gie(r, L + 1, L = rkn(Z = A[q])), Y = r; J < U; ++J)
+ (Y = eSt(Z > 0 ? F[J] + " " + he : tme(he, /&\f/g, F[J]))) && (v[R++] = Y);
+ return MRe(r, i, o, f === 0 ? JBt : b, v, k, _, T);
+}
+function hkn(r, i, o, l) {
+ return MRe(r, i, o, YBt, IRe(cm), gie(r, 2, -2), 0, l);
+}
+function Nxt(r, i, o, l, f) {
+ return MRe(r, i, o, ZBt, gie(r, 0, l), gie(r, l + 1, -1), l, f);
+}
+function xNe(r, i) {
+ for (var o = "", l = 0; l < r.length; l++)
+ o += i(r[l], l, r, i) || "";
+ return o;
+}
+function fkn(r, i, o, l) {
+ switch (r.type) {
+ case "@layer":
+ if (r.children.length)
+ break;
+ case "@import":
+ case ZBt:
+ return r.return = r.return || r.value;
+ case YBt:
+ return "";
+ case "@keyframes":
+ return r.return = r.value + "{" + xNe(r.children, l) + "}";
+ case JBt:
+ if (!nL(r.value = r.props.join(",")))
+ return "";
+ }
+ return nL(o = xNe(r.children, l)) ? r.return = r.value + "{" + o + "}" : "";
+}
+function OT(r) {
+ return r != null && Yl(r) == "object";
+}
+var dkn = "[object Symbol]";
+function d$(r) {
+ return Yl(r) == "symbol" || OT(r) && _$(r) == dkn;
+}
+function EG(r, i) {
+ for (var o = -1, l = r == null ? 0 : r.length, f = Array(l); ++o < l; )
+ f[o] = i(r[o], o, r);
+ return f;
+}
+var fm = kk, Akn = 1 / 0, Pxt = cC ? cC.prototype : void 0, Rxt = Pxt ? Pxt.toString : void 0;
+function nSt(r) {
+ if (typeof r == "string")
+ return r;
+ if (fm(r))
+ return EG(r, nSt) + "";
+ if (d$(r))
+ return Rxt ? Rxt.call(r) : "";
+ var i = r + "";
+ return i == "0" && 1 / r == -Akn ? "-0" : i;
+}
+var gkn = /\s/, pkn = /^\s+/;
+function mkn(r) {
+ return r && Da(r).call(r, 0, function(i) {
+ for (var o = i.length; o-- && gkn.test(i.charAt(o)); )
+ ;
+ return o;
+ }(r) + 1).replace(pkn, "");
+}
+var Qxt = NaN, bkn = /^[-+]0x[0-9a-f]+$/i, vkn = /^0b[01]+$/i, ykn = /^0o[0-7]+$/i, wkn = Ky, $xt = 1 / 0, kkn = 17976931348623157e292;
+function ime(r) {
+ return r ? (r = function(i) {
+ if (typeof i == "number")
+ return i;
+ if (d$(i))
+ return Qxt;
+ if (xk(i)) {
+ var o = typeof i.valueOf == "function" ? i.valueOf() : i;
+ i = xk(o) ? o + "" : o;
+ }
+ if (typeof i != "string")
+ return i === 0 ? i : +i;
+ i = mkn(i);
+ var l = vkn.test(i);
+ return l || ykn.test(i) ? wkn(Da(i).call(i, 2), l ? 2 : 8) : bkn.test(i) ? Qxt : +i;
+ }(r), r === $xt || r === -$xt ? (r < 0 ? -1 : 1) * kkn : r == r ? r : 0) : r === 0 ? r : 0;
+}
+function B$(r) {
+ return r;
+}
+var CNe = T$(W9, "WeakMap"), Uxt = Vre, xkn = /* @__PURE__ */ function() {
+ function r() {
+ }
+ return function(i) {
+ if (!xk(i))
+ return {};
+ if (Uxt)
+ return Uxt(i);
+ r.prototype = i;
+ var o = new r();
+ return r.prototype = void 0, o;
+ };
+}(), Ckn = xkn;
+function rSt(r, i) {
+ var o = -1, l = r.length;
+ for (i || (i = Array(l)); ++o < l; )
+ i[o] = r[o];
+ return i;
+}
+var iSt = Qi.Date, _kn = Do(iSt.prototype.getTime);
+qa({ target: "Date", stat: !0 }, { now: function() {
+ return _kn(new iSt());
+} });
+var Ekn = ql.Date.now, Tkn = Ekn;
+function dG(r) {
+ return function() {
+ return r;
+ };
+}
+var Hxt, oOe, sOe, Bkn = function() {
+ try {
+ var r = T$(Object, "defineProperty");
+ return r({}, "", {}), r;
+ } catch {
+ }
+}(), obe = Bkn, Skn = obe ? function(r, i) {
+ return obe(r, "toString", { configurable: !0, enumerable: !1, value: dG(i), writable: !0 });
+} : B$, aSt = (Hxt = Skn, oOe = 0, sOe = 0, function() {
+ var r = Tkn(), i = 16 - (r - sOe);
+ if (sOe = r, i > 0) {
+ if (++oOe >= 800)
+ return arguments[0];
+ } else
+ oOe = 0;
+ return Hxt.apply(void 0, arguments);
+});
+function oSt(r, i) {
+ for (var o = -1, l = r == null ? 0 : r.length; ++o < l && i(r[o], o, r) !== !1; )
+ ;
+ return r;
+}
+function sSt(r, i, o, l) {
+ for (var f = r.length, g = o + (l ? 1 : -1); l ? g-- : ++g < f; )
+ if (i(r[g], g, r))
+ return g;
+ return -1;
+}
+function Lkn(r) {
+ return r != r;
+}
+function Ikn(r, i) {
+ return !!(r != null && r.length) && function(o, l, f) {
+ return l == l ? function(g, A, b) {
+ for (var v = b - 1, k = g.length; ++v < k; )
+ if (g[v] === A)
+ return v;
+ return -1;
+ }(o, l, f) : sSt(o, Lkn, f);
+ }(r, i, 0) > -1;
+}
+var Mkn = 9007199254740991, Fkn = /^(?:0|[1-9]\d*)$/;
+function e2e(r, i) {
+ var o = Yl(r);
+ return !!(i = i ?? Mkn) && (o == "number" || o != "symbol" && Fkn.test(r)) && r > -1 && r % 1 == 0 && r < i;
+}
+function t2e(r, i, o) {
+ i == "__proto__" && obe ? obe(r, i, { configurable: !0, enumerable: !0, value: o, writable: !0 }) : r[i] = o;
+}
+var Okn = Object.prototype.hasOwnProperty;
+function n2e(r, i, o) {
+ var l = r[i];
+ Okn.call(r, i) && mX(l, o) && (o !== void 0 || i in r) || t2e(r, i, o);
+}
+function cre(r, i, o, l) {
+ var f = !o;
+ o || (o = {});
+ for (var g = -1, A = i.length; ++g < A; ) {
+ var b = i[g], v = l ? l(o[b], r[b], b, o, r) : void 0;
+ v === void 0 && (v = r[b]), f ? t2e(o, b, v) : n2e(o, b, v);
+ }
+ return o;
+}
+var jxt = Math.max;
+function cSt(r, i, o) {
+ return i = jxt(i === void 0 ? r.length - 1 : i, 0), function() {
+ for (var l = arguments, f = -1, g = jxt(l.length - i, 0), A = Array(g); ++f < g; )
+ A[f] = l[i + f];
+ f = -1;
+ for (var b = Array(i + 1); ++f < i; )
+ b[f] = l[f];
+ return b[i] = o(A), function(v, k, _) {
+ switch (_.length) {
+ case 0:
+ return v.call(k);
+ case 1:
+ return v.call(k, _[0]);
+ case 2:
+ return v.call(k, _[0], _[1]);
+ case 3:
+ return v.call(k, _[0], _[1], _[2]);
+ }
+ return v.apply(k, _);
+ }(r, this, b);
+ };
+}
+function r2e(r, i) {
+ return aSt(cSt(r, i, B$), r + "");
+}
+var Dkn = 9007199254740991;
+function FRe(r) {
+ return typeof r == "number" && r > -1 && r % 1 == 0 && r <= Dkn;
+}
+function $O(r) {
+ return r != null && FRe(r.length) && !fie(r);
+}
+function pie(r, i, o) {
+ if (!xk(o))
+ return !1;
+ var l = Yl(i);
+ return !!(l == "number" ? $O(o) && e2e(i, o.length) : l == "string" && i in o) && mX(o[i], r);
+}
+var Nkn = Object.prototype;
+function i2e(r) {
+ var i = r && r.constructor;
+ return r === (typeof i == "function" && i.prototype || Nkn);
+}
+function Kxt(r) {
+ return OT(r) && _$(r) == "[object Arguments]";
+}
+var lSt = Object.prototype, Pkn = lSt.hasOwnProperty, Rkn = lSt.propertyIsEnumerable, qG = Kxt(/* @__PURE__ */ function() {
+ return arguments;
+}()) ? Kxt : function(r) {
+ return OT(r) && Pkn.call(r, "callee") && !Rkn.call(r, "callee");
+}, uSt = (typeof exports > "u" ? "undefined" : Yl(exports)) == "object" && exports && !exports.nodeType && exports, zxt = uSt && (typeof module > "u" ? "undefined" : Yl(module)) == "object" && module && !module.nodeType && module, Gxt = zxt && zxt.exports === uSt ? W9.Buffer : void 0, YG = (Gxt ? Gxt.isBuffer : void 0) || function() {
+ return !1;
+}, _A = {};
+function a2e(r) {
+ return function(i) {
+ return r(i);
+ };
+}
+_A["[object Float32Array]"] = _A["[object Float64Array]"] = _A["[object Int8Array]"] = _A["[object Int16Array]"] = _A["[object Int32Array]"] = _A["[object Uint8Array]"] = _A["[object Uint8ClampedArray]"] = _A["[object Uint16Array]"] = _A["[object Uint32Array]"] = !0, _A["[object Arguments]"] = _A["[object Array]"] = _A["[object ArrayBuffer]"] = _A["[object Boolean]"] = _A["[object DataView]"] = _A["[object Date]"] = _A["[object Error]"] = _A["[object Function]"] = _A["[object Map]"] = _A["[object Number]"] = _A["[object Object]"] = _A["[object RegExp]"] = _A["[object Set]"] = _A["[object String]"] = _A["[object WeakMap]"] = !1;
+var hSt = (typeof exports > "u" ? "undefined" : Yl(exports)) == "object" && exports && !exports.nodeType && exports, Bre = hSt && (typeof module > "u" ? "undefined" : Yl(module)) == "object" && module && !module.nodeType && module, cOe = Bre && Bre.exports === hSt && VBt.process, JG = function() {
+ try {
+ var r = Bre && Bre.require && Bre.require("util").types;
+ return r || cOe && cOe.binding && cOe.binding("util");
+ } catch {
+ }
+}(), Xxt = JG && JG.isTypedArray, o2e = Xxt ? a2e(Xxt) : function(r) {
+ return OT(r) && FRe(r.length) && !!_A[_$(r)];
+}, Qkn = Object.prototype.hasOwnProperty;
+function fSt(r, i) {
+ var o = fm(r), l = !o && qG(r), f = !o && !l && YG(r), g = !o && !l && !f && o2e(r), A = o || l || f || g, b = A ? function(_, T) {
+ for (var L = -1, F = Array(_); ++L < _; )
+ F[L] = T(L);
+ return F;
+ }(r.length, String) : [], v = b.length;
+ for (var k in r)
+ !i && !Qkn.call(r, k) || A && (k == "length" || f && (k == "offset" || k == "parent") || g && (k == "buffer" || k == "byteLength" || k == "byteOffset") || e2e(k, v)) || b.push(k);
+ return b;
+}
+function dSt(r, i) {
+ return function(o) {
+ return r(i(o));
+ };
+}
+var $kn = dSt(yh, Object), Ukn = Object.prototype.hasOwnProperty;
+function ASt(r) {
+ if (!i2e(r))
+ return $kn(r);
+ var i = [];
+ for (var o in Object(r))
+ Ukn.call(r, o) && o != "constructor" && i.push(o);
+ return i;
+}
+function pk(r) {
+ return $O(r) ? fSt(r) : ASt(r);
+}
+var Hkn = Object.prototype.hasOwnProperty;
+function jkn(r) {
+ if (!xk(r))
+ return function(f) {
+ var g = [];
+ if (f != null)
+ for (var A in Object(f))
+ g.push(A);
+ return g;
+ }(r);
+ var i = i2e(r), o = [];
+ for (var l in r)
+ (l != "constructor" || !i && Hkn.call(r, l)) && o.push(l);
+ return o;
+}
+function A$(r) {
+ return $O(r) ? fSt(r, !0) : jkn(r);
+}
+var Kkn = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, zkn = /^\w*$/;
+function ORe(r, i) {
+ if (fm(r))
+ return !1;
+ var o = Yl(r);
+ return !(o != "number" && o != "symbol" && o != "boolean" && r != null && !d$(r)) || zkn.test(r) || !Kkn.test(r) || i != null && r in Object(i);
+}
+var Gkn = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, Xkn = /\\(\\)?/g, Wkn = function(r) {
+ var i = bX(r, function(l) {
+ return o.size === 500 && o.clear(), l;
+ }), o = i.cache;
+ return i;
+}(function(r) {
+ var i = [];
+ return r.charCodeAt(0) === 46 && i.push(""), r.replace(Gkn, function(o, l, f, g) {
+ i.push(f ? g.replace(Xkn, "$1") : l || o);
+ }), i;
+}), Vkn = Wkn;
+function gSt(r) {
+ return r == null ? "" : nSt(r);
+}
+function s2e(r, i) {
+ return fm(r) ? r : ORe(r, i) ? [r] : Vkn(gSt(r));
+}
+var qkn = 1 / 0;
+function Qie(r) {
+ if (typeof r == "string" || d$(r))
+ return r;
+ var i = r + "";
+ return i == "0" && 1 / r == -qkn ? "-0" : i;
+}
+function c2e(r, i) {
+ for (var o = 0, l = (i = s2e(i, r)).length; r != null && o < l; )
+ r = r[Qie(i[o++])];
+ return o && o == l ? r : void 0;
+}
+function DRe(r, i) {
+ for (var o = -1, l = i.length, f = r.length; ++o < l; )
+ r[f + o] = i[o];
+ return r;
+}
+var Wxt = cC ? cC.isConcatSpreadable : void 0;
+function Ykn(r) {
+ return fm(r) || qG(r) || !!(Wxt && r && r[Wxt]);
+}
+function l2e(r, i, o, l, f) {
+ var g = -1, A = r.length;
+ for (o || (o = Ykn), f || (f = []); ++g < A; ) {
+ var b = r[g];
+ i > 0 && o(b) ? i > 1 ? l2e(b, i - 1, o, l, f) : DRe(f, b) : l || (f[f.length] = b);
+ }
+ return f;
+}
+function ZG(r) {
+ return r != null && r.length ? l2e(r, 1) : [];
+}
+var NRe = dSt(H9t, Object), Jkn = "[object Object]", Zkn = Function.prototype, exn = Object.prototype, pSt = Zkn.toString, txn = exn.hasOwnProperty, nxn = pSt.call(Object);
+function rxn(r) {
+ if (!OT(r) || _$(r) != Jkn)
+ return !1;
+ var i = NRe(r);
+ if (i === null)
+ return !0;
+ var o = txn.call(i, "constructor") && i.constructor;
+ return typeof o == "function" && o instanceof o && pSt.call(o) == nxn;
+}
+function ixn(r, i, o, l) {
+ var f = -1, g = r == null ? 0 : r.length;
+ for (l && g && (o = r[++f]); ++f < g; )
+ o = i(o, r[f], f, r);
+ return o;
+}
+function P9(r) {
+ var i = this.__data__ = new iL(r);
+ this.size = i.size;
+}
+P9.prototype.clear = function() {
+ this.__data__ = new iL(), this.size = 0;
+}, P9.prototype.delete = function(r) {
+ var i = this.__data__, o = i.delete(r);
+ return this.size = i.size, o;
+}, P9.prototype.get = function(r) {
+ return this.__data__.get(r);
+}, P9.prototype.has = function(r) {
+ return this.__data__.has(r);
+}, P9.prototype.set = function(r, i) {
+ var o = this.__data__;
+ if (o instanceof iL) {
+ var l = o.__data__;
+ if (!die || l.length < 199)
+ return l.push([r, i]), this.size = ++o.size, this;
+ o = this.__data__ = new aL(l);
+ }
+ return o.set(r, i), this.size = o.size, this;
+};
+var mSt = (typeof exports > "u" ? "undefined" : Yl(exports)) == "object" && exports && !exports.nodeType && exports, Vxt = mSt && (typeof module > "u" ? "undefined" : Yl(module)) == "object" && module && !module.nodeType && module, qxt = Vxt && Vxt.exports === mSt ? W9.Buffer : void 0, Yxt = qxt ? qxt.allocUnsafe : void 0;
+function bSt(r, i) {
+ if (i)
+ return Da(r).call(r);
+ var o = r.length, l = Yxt ? Yxt(o) : new r.constructor(o);
+ return r.copy(l), l;
+}
+function vSt(r, i) {
+ for (var o = -1, l = r == null ? 0 : r.length, f = 0, g = []; ++o < l; ) {
+ var A = r[o];
+ i(A, o, r) && (g[f++] = A);
+ }
+ return g;
+}
+function ySt() {
+ return [];
+}
+var axn = Object.prototype.propertyIsEnumerable, Jxt = rA, oxn = Jxt ? function(r) {
+ return r == null ? [] : (r = Object(r), vSt(Jxt(r), function(i) {
+ return axn.call(r, i);
+ }));
+} : ySt, PRe = oxn, sxn = rA ? function(r) {
+ for (var i = []; r; )
+ DRe(i, PRe(r)), r = NRe(r);
+ return i;
+} : ySt, wSt = sxn;
+function kSt(r, i, o) {
+ var l = i(r);
+ return fm(r) ? l : DRe(l, o(r));
+}
+function _Ne(r) {
+ return kSt(r, pk, PRe);
+}
+function cxn(r) {
+ return kSt(r, A$, wSt);
+}
+var ENe = T$(W9, "DataView"), TNe = T$(W9, "Promise"), TG = T$(W9, "Set"), Zxt = "[object Map]", e8t = "[object Promise]", t8t = "[object Set]", n8t = "[object WeakMap]", r8t = "[object DataView]", lxn = E$(ENe), uxn = E$(die), hxn = E$(TNe), fxn = E$(TG), dxn = E$(CNe), $Q = _$;
+(ENe && $Q(new ENe(new ArrayBuffer(1))) != r8t || die && $Q(new die()) != Zxt || TNe && $Q(TNe.resolve()) != e8t || TG && $Q(new TG()) != t8t || CNe && $Q(new CNe()) != n8t) && ($Q = function(r) {
+ var i = _$(r), o = i == "[object Object]" ? r.constructor : void 0, l = o ? E$(o) : "";
+ if (l)
+ switch (l) {
+ case lxn:
+ return r8t;
+ case uxn:
+ return Zxt;
+ case hxn:
+ return e8t;
+ case fxn:
+ return t8t;
+ case dxn:
+ return n8t;
+ }
+ return i;
+});
+var eX = $Q, Axn = Object.prototype.hasOwnProperty, sbe = W9.Uint8Array;
+function BNe(r) {
+ var i = new r.constructor(r.byteLength);
+ return new sbe(i).set(new sbe(r)), i;
+}
+var gxn = /\w*$/, i8t = cC ? cC.prototype : void 0, a8t = i8t ? i8t.valueOf : void 0;
+function xSt(r, i) {
+ var o = i ? BNe(r.buffer) : r.buffer;
+ return new r.constructor(o, r.byteOffset, r.length);
+}
+var pxn = "[object Boolean]", mxn = "[object Date]", bxn = "[object Map]", vxn = "[object Number]", yxn = "[object RegExp]", wxn = "[object Set]", kxn = "[object String]", xxn = "[object Symbol]", Cxn = "[object ArrayBuffer]", _xn = "[object DataView]", Exn = "[object Float32Array]", Txn = "[object Float64Array]", Bxn = "[object Int8Array]", Sxn = "[object Int16Array]", Lxn = "[object Int32Array]", Ixn = "[object Uint8Array]", Mxn = "[object Uint8ClampedArray]", Fxn = "[object Uint16Array]", Oxn = "[object Uint32Array]";
+function Dxn(r, i, o) {
+ var l, f, g = r.constructor;
+ switch (i) {
+ case Cxn:
+ return BNe(r);
+ case pxn:
+ case mxn:
+ return new g(+r);
+ case _xn:
+ return function(A, b) {
+ var v = b ? BNe(A.buffer) : A.buffer;
+ return new A.constructor(v, A.byteOffset, A.byteLength);
+ }(r, o);
+ case Exn:
+ case Txn:
+ case Bxn:
+ case Sxn:
+ case Lxn:
+ case Ixn:
+ case Mxn:
+ case Fxn:
+ case Oxn:
+ return xSt(r, o);
+ case bxn:
+ return new g();
+ case vxn:
+ case kxn:
+ return new g(r);
+ case yxn:
+ return (f = new (l = r).constructor(l.source, gxn.exec(l))).lastIndex = l.lastIndex, f;
+ case wxn:
+ return new g();
+ case xxn:
+ return function(A) {
+ return a8t ? Object(a8t.call(A)) : {};
+ }(r);
+ }
+}
+function CSt(r) {
+ return typeof r.constructor != "function" || i2e(r) ? {} : Ckn(NRe(r));
+}
+var o8t = JG && JG.isMap, Nxn = o8t ? a2e(o8t) : function(r) {
+ return OT(r) && eX(r) == "[object Map]";
+}, s8t = JG && JG.isSet, Pxn = s8t ? a2e(s8t) : function(r) {
+ return OT(r) && eX(r) == "[object Set]";
+}, Rxn = 1, Qxn = 2, $xn = 4, _St = "[object Arguments]", ESt = "[object Function]", Uxn = "[object GeneratorFunction]", TSt = "[object Object]", nA = {};
+function Sre(r, i, o, l, f, g) {
+ var A, b = i & Rxn, v = i & Qxn, k = i & $xn;
+ if (o && (A = f ? o(r, l, f, g) : o(r)), A !== void 0)
+ return A;
+ if (!xk(r))
+ return r;
+ var _ = fm(r);
+ if (_) {
+ if (A = function(q) {
+ var Z = q.length, R = new q.constructor(Z);
+ return Z && typeof q[0] == "string" && Axn.call(q, "index") && (R.index = q.index, R.input = q.input), R;
+ }(r), !b)
+ return rSt(r, A);
+ } else {
+ var T = eX(r), L = T == ESt || T == Uxn;
+ if (YG(r))
+ return bSt(r, b);
+ if (T == TSt || T == _St || L && !f) {
+ if (A = v || L ? {} : CSt(r), !b)
+ return v ? function(q, Z) {
+ return cre(q, wSt(q), Z);
+ }(r, function(q, Z) {
+ return q && cre(Z, A$(Z), q);
+ }(A, r)) : function(q, Z) {
+ return cre(q, PRe(q), Z);
+ }(r, function(q, Z) {
+ return q && cre(Z, pk(Z), q);
+ }(A, r));
+ } else {
+ if (!nA[T])
+ return f ? r : {};
+ A = Dxn(r, T, b);
+ }
+ }
+ g || (g = new P9());
+ var F = g.get(r);
+ if (F)
+ return F;
+ g.set(r, A), Pxn(r) ? no(r).call(r, function(q) {
+ A.add(Sre(q, i, o, q, r, g));
+ }) : Nxn(r) && no(r).call(r, function(q, Z) {
+ A.set(Z, Sre(q, i, o, Z, r, g));
+ });
+ var U = _ ? void 0 : (k ? v ? cxn : _Ne : v ? A$ : pk)(r);
+ return oSt(U || r, function(q, Z) {
+ U && (q = r[Z = q]), n2e(A, Z, Sre(q, i, o, Z, r, g));
+ }), A;
+}
+nA[_St] = nA["[object Array]"] = nA["[object ArrayBuffer]"] = nA["[object DataView]"] = nA["[object Boolean]"] = nA["[object Date]"] = nA["[object Float32Array]"] = nA["[object Float64Array]"] = nA["[object Int8Array]"] = nA["[object Int16Array]"] = nA["[object Int32Array]"] = nA["[object Map]"] = nA["[object Number]"] = nA[TSt] = nA["[object RegExp]"] = nA["[object Set]"] = nA["[object String]"] = nA["[object Symbol]"] = nA["[object Uint8Array]"] = nA["[object Uint8ClampedArray]"] = nA["[object Uint16Array]"] = nA["[object Uint32Array]"] = !0, nA["[object Error]"] = nA[ESt] = nA["[object WeakMap]"] = !1;
+var Hxn = 4, jxn = 1, Kxn = 4;
+function Lre(r) {
+ var i = -1, o = r == null ? 0 : r.length;
+ for (this.__data__ = new aL(); ++i < o; )
+ this.add(r[i]);
+}
+function zxn(r, i) {
+ for (var o = -1, l = r == null ? 0 : r.length; ++o < l; )
+ if (i(r[o], o, r))
+ return !0;
+ return !1;
+}
+function BSt(r, i) {
+ return r.has(i);
+}
+Lre.prototype.add = Lre.prototype.push = function(r) {
+ return this.__data__.set(r, "__lodash_hash_undefined__"), this;
+}, Lre.prototype.has = function(r) {
+ return this.__data__.has(r);
+};
+var Gxn = 1, Xxn = 2;
+function c8t(r, i, o, l, f, g) {
+ var A = o & Gxn, b = r.length, v = i.length;
+ if (b != v && !(A && v > b))
+ return !1;
+ var k = g.get(r), _ = g.get(i);
+ if (k && _)
+ return k == i && _ == r;
+ var T = -1, L = !0, F = o & Xxn ? new Lre() : void 0;
+ for (g.set(r, i), g.set(i, r); ++T < b; ) {
+ var U = r[T], q = i[T];
+ if (l)
+ var Z = A ? l(q, U, T, i, r, g) : l(U, q, T, r, i, g);
+ if (Z !== void 0) {
+ if (Z)
+ continue;
+ L = !1;
+ break;
+ }
+ if (F) {
+ if (!zxn(i, function(R, J) {
+ if (!BSt(F, J) && (U === R || f(U, R, o, l, g)))
+ return F.push(J);
+ })) {
+ L = !1;
+ break;
+ }
+ } else if (U !== q && !f(U, q, o, l, g)) {
+ L = !1;
+ break;
+ }
+ }
+ return g.delete(r), g.delete(i), L;
+}
+function Wxn(r) {
+ var i = -1, o = Array(r.size);
+ return no(r).call(r, function(l, f) {
+ o[++i] = [f, l];
+ }), o;
+}
+function RRe(r) {
+ var i = -1, o = Array(r.size);
+ return no(r).call(r, function(l) {
+ o[++i] = l;
+ }), o;
+}
+var Vxn = 1, qxn = 2, Yxn = "[object Boolean]", Jxn = "[object Date]", Zxn = "[object Error]", e8n = "[object Map]", t8n = "[object Number]", n8n = "[object RegExp]", r8n = "[object Set]", i8n = "[object String]", a8n = "[object Symbol]", o8n = "[object ArrayBuffer]", s8n = "[object DataView]", l8t = cC ? cC.prototype : void 0, lOe = l8t ? l8t.valueOf : void 0, c8n = 1, l8n = Object.prototype.hasOwnProperty, u8n = 1, u8t = "[object Arguments]", h8t = "[object Array]", ape = "[object Object]", f8t = Object.prototype.hasOwnProperty;
+function h8n(r, i, o, l, f, g) {
+ var A = fm(r), b = fm(i), v = A ? h8t : eX(r), k = b ? h8t : eX(i), _ = (v = v == u8t ? ape : v) == ape, T = (k = k == u8t ? ape : k) == ape, L = v == k;
+ if (L && YG(r)) {
+ if (!YG(i))
+ return !1;
+ A = !0, _ = !1;
+ }
+ if (L && !_)
+ return g || (g = new P9()), A || o2e(r) ? c8t(r, i, o, l, f, g) : function(R, J, he, Y, ue, le, be) {
+ switch (he) {
+ case s8n:
+ if (R.byteLength != J.byteLength || R.byteOffset != J.byteOffset)
+ return !1;
+ R = R.buffer, J = J.buffer;
+ case o8n:
+ return !(R.byteLength != J.byteLength || !le(new sbe(R), new sbe(J)));
+ case Yxn:
+ case Jxn:
+ case t8n:
+ return mX(+R, +J);
+ case Zxn:
+ return R.name == J.name && R.message == J.message;
+ case n8n:
+ case i8n:
+ return R == J + "";
+ case e8n:
+ var ke = Wxn;
+ case r8n:
+ var de = Y & Vxn;
+ if (ke || (ke = RRe), R.size != J.size && !de)
+ return !1;
+ var Te = be.get(R);
+ if (Te)
+ return Te == J;
+ Y |= qxn, be.set(R, J);
+ var xe = c8t(ke(R), ke(J), Y, ue, le, be);
+ return be.delete(R), xe;
+ case a8n:
+ if (lOe)
+ return lOe.call(R) == lOe.call(J);
+ }
+ return !1;
+ }(r, i, v, o, l, f, g);
+ if (!(o & u8n)) {
+ var F = _ && f8t.call(r, "__wrapped__"), U = T && f8t.call(i, "__wrapped__");
+ if (F || U) {
+ var q = F ? r.value() : r, Z = U ? i.value() : i;
+ return g || (g = new P9()), f(q, Z, o, l, g);
+ }
+ }
+ return !!L && (g || (g = new P9()), function(R, J, he, Y, ue, le) {
+ var be = he & c8n, ke = _Ne(R), de = ke.length;
+ if (de != _Ne(J).length && !be)
+ return !1;
+ for (var Te = de; Te--; ) {
+ var xe = ke[Te];
+ if (!(be ? xe in J : l8n.call(J, xe)))
+ return !1;
+ }
+ var ie = le.get(R), Be = le.get(J);
+ if (ie && Be)
+ return ie == J && Be == R;
+ var te = !0;
+ le.set(R, J), le.set(J, R);
+ for (var Me = be; ++Te < de; ) {
+ var ve = R[xe = ke[Te]], ge = J[xe];
+ if (Y)
+ var Je = be ? Y(ge, ve, xe, J, R, le) : Y(ve, ge, xe, R, J, le);
+ if (!(Je === void 0 ? ve === ge || ue(ve, ge, he, Y, le) : Je)) {
+ te = !1;
+ break;
+ }
+ Me || (Me = xe == "constructor");
+ }
+ if (te && !Me) {
+ var ot = R.constructor, bt = J.constructor;
+ ot == bt || !("constructor" in R) || !("constructor" in J) || typeof ot == "function" && ot instanceof ot && typeof bt == "function" && bt instanceof bt || (te = !1);
+ }
+ return le.delete(R), le.delete(J), te;
+ }(r, i, o, l, f, g));
+}
+function QRe(r, i, o, l, f) {
+ return r === i || (r == null || i == null || !OT(r) && !OT(i) ? r != r && i != i : h8n(r, i, o, l, QRe, f));
+}
+var f8n = 1, d8n = 2;
+function SSt(r) {
+ return r == r && !xk(r);
+}
+function LSt(r, i) {
+ return function(o) {
+ return o != null && o[r] === i && (i !== void 0 || r in Object(o));
+ };
+}
+function A8n(r) {
+ var i = function(o) {
+ for (var l = pk(o), f = l.length; f--; ) {
+ var g = l[f], A = o[g];
+ l[f] = [g, A, SSt(A)];
+ }
+ return l;
+ }(r);
+ return i.length == 1 && i[0][2] ? LSt(i[0][0], i[0][1]) : function(o) {
+ return o === r || function(l, f, g, A) {
+ var b = g.length, v = b, k = !A;
+ if (l == null)
+ return !v;
+ for (l = Object(l); b--; ) {
+ var _ = g[b];
+ if (k && _[2] ? _[1] !== l[_[0]] : !(_[0] in l))
+ return !1;
+ }
+ for (; ++b < v; ) {
+ var T = (_ = g[b])[0], L = l[T], F = _[1];
+ if (k && _[2]) {
+ if (L === void 0 && !(T in l))
+ return !1;
+ } else {
+ var U = new P9();
+ if (A)
+ var q = A(L, F, T, l, f, U);
+ if (!(q === void 0 ? QRe(F, L, f8n | d8n, A, U) : q))
+ return !1;
+ }
+ }
+ return !0;
+ }(o, r, i);
+ };
+}
+function g8n(r, i) {
+ return r != null && i in Object(r);
+}
+function ISt(r, i, o) {
+ for (var l = -1, f = (i = s2e(i, r)).length, g = !1; ++l < f; ) {
+ var A = Qie(i[l]);
+ if (!(g = r != null && o(r, A)))
+ break;
+ r = r[A];
+ }
+ return g || ++l != f ? g : !!(f = r == null ? 0 : r.length) && FRe(f) && e2e(A, f) && (fm(r) || qG(r));
+}
+function MSt(r, i) {
+ return r != null && ISt(r, i, g8n);
+}
+var p8n = 1, m8n = 2;
+function b8n(r, i) {
+ return ORe(r) && SSt(i) ? LSt(Qie(r), i) : function(o) {
+ var l = function(f, g, A) {
+ var b = f == null ? void 0 : c2e(f, g);
+ return b === void 0 ? A : b;
+ }(o, r);
+ return l === void 0 && l === i ? MSt(o, r) : QRe(i, l, p8n | m8n);
+ };
+}
+function v8n(r) {
+ return ORe(r) ? (i = Qie(r), function(o) {
+ return o == null ? void 0 : o[i];
+ }) : /* @__PURE__ */ function(o) {
+ return function(l) {
+ return c2e(l, o);
+ };
+ }(r);
+ var i;
+}
+function MO(r) {
+ return typeof r == "function" ? r : r == null ? B$ : Yl(r) == "object" ? fm(r) ? b8n(r[0], r[1]) : A8n(r) : v8n(r);
+}
+var y8n = function(r, i, o) {
+ for (var l = -1, f = Object(r), g = o(r), A = g.length; A--; ) {
+ var b = g[++l];
+ if (i(f[b], b, f) === !1)
+ break;
+ }
+ return r;
+}, $Re = y8n;
+function FSt(r, i) {
+ return r && $Re(r, i, pk);
+}
+var w8n = /* @__PURE__ */ function(r, i) {
+ return function(o, l) {
+ if (o == null)
+ return o;
+ if (!$O(o))
+ return r(o, l);
+ for (var f = o.length, g = i ? f : -1, A = Object(o); (i ? g-- : ++g < f) && l(A[g], g, A) !== !1; )
+ ;
+ return o;
+ };
+}(FSt), u2e = w8n, d8t = function() {
+ return W9.Date.now();
+}, OSt = Object.prototype, k8n = OSt.hasOwnProperty, x8n = r2e(function(r, i) {
+ r = Object(r);
+ var o = -1, l = i.length, f = l > 2 ? i[2] : void 0;
+ for (f && pie(i[0], i[1], f) && (l = 1); ++o < l; )
+ for (var g = i[o], A = A$(g), b = -1, v = A.length; ++b < v; ) {
+ var k = A[b], _ = r[k];
+ (_ === void 0 || mX(_, OSt[k]) && !k8n.call(r, k)) && (r[k] = g[k]);
+ }
+ return r;
+}), C8n = x8n;
+function SNe(r, i, o) {
+ (o !== void 0 && !mX(r[i], o) || o === void 0 && !(i in r)) && t2e(r, i, o);
+}
+function DSt(r) {
+ return OT(r) && $O(r);
+}
+function LNe(r, i) {
+ if ((i !== "constructor" || typeof r[i] != "function") && i != "__proto__")
+ return r[i];
+}
+function _8n(r, i, o, l, f, g, A) {
+ var b = LNe(r, o), v = LNe(i, o), k = A.get(v);
+ if (k)
+ SNe(r, o, k);
+ else {
+ var _, T = g ? g(b, v, o + "", r, i, A) : void 0, L = T === void 0;
+ if (L) {
+ var F = fm(v), U = !F && YG(v), q = !F && !U && o2e(v);
+ T = v, F || U || q ? fm(b) ? T = b : DSt(b) ? T = rSt(b) : U ? (L = !1, T = bSt(v, !0)) : q ? (L = !1, T = xSt(v, !0)) : T = [] : rxn(v) || qG(v) ? (T = b, qG(b) ? T = cre(_ = b, A$(_)) : xk(b) && !fie(b) || (T = CSt(v))) : L = !1;
+ }
+ L && (A.set(v, T), f(T, v, l, g, A), A.delete(v)), SNe(r, o, T);
+ }
+}
+function NSt(r, i, o, l, f) {
+ r !== i && $Re(i, function(g, A) {
+ if (f || (f = new P9()), xk(g))
+ _8n(r, i, A, o, NSt, l, f);
+ else {
+ var b = l ? l(LNe(r, A), g, A + "", r, i, f) : void 0;
+ b === void 0 && (b = g), SNe(r, A, b);
+ }
+ }, A$);
+}
+function E8n(r, i, o) {
+ for (var l = -1, f = r == null ? 0 : r.length; ++l < f; )
+ if (o(i, r[l]))
+ return !0;
+ return !1;
+}
+function cbe(r) {
+ var i = r == null ? 0 : r.length;
+ return i ? r[i - 1] : void 0;
+}
+function PSt(r) {
+ return typeof r == "function" ? r : B$;
+}
+function Ii(r, i) {
+ return (fm(r) ? oSt : u2e)(r, PSt(i));
+}
+function T8n(r, i) {
+ var o = [];
+ return u2e(r, function(l, f, g) {
+ i(l, f, g) && o.push(l);
+ }), o;
+}
+function uL(r, i) {
+ return (fm(r) ? vSt : T8n)(r, MO(i));
+}
+var B8n = Math.max, A8t, S8n = (A8t = function(r, i, o) {
+ var l = r == null ? 0 : r.length;
+ if (!l)
+ return -1;
+ var f, g, A = o == null ? 0 : (f = ime(o), g = f % 1, f == f ? g ? f - g : f : 0);
+ return A < 0 && (A = B8n(l + A, 0)), sSt(r, MO(i), A);
+}, function(r, i, o) {
+ var l = Object(r);
+ if (!$O(r)) {
+ var f = MO(i);
+ r = pk(r), i = function(A) {
+ return f(l[A], A, l);
+ };
+ }
+ var g = A8t(r, i, o);
+ return g > -1 ? l[f ? r[g] : g] : void 0;
+}), URe = S8n;
+function RSt(r, i) {
+ var o = -1, l = $O(r) ? Array(r.length) : [];
+ return u2e(r, function(f, g, A) {
+ l[++o] = i(f, g, A);
+ }), l;
+}
+function um(r, i) {
+ return (fm(r) ? EG : RSt)(r, MO(i));
+}
+function L8n(r, i) {
+ return r > i;
+}
+var I8n = Object.prototype.hasOwnProperty;
+function M8n(r, i) {
+ return r != null && I8n.call(r, i);
+}
+function _1(r, i) {
+ return r != null && ISt(r, i, M8n);
+}
+function hL(r) {
+ return r == null ? [] : function(i, o) {
+ return EG(o, function(l) {
+ return i[l];
+ });
+ }(r, pk(r));
+}
+var F8n = "[object Map]", O8n = "[object Set]", D8n = Object.prototype.hasOwnProperty;
+function BG(r) {
+ if (r == null)
+ return !0;
+ if ($O(r) && (fm(r) || typeof r == "string" || typeof gk(r) == "function" || YG(r) || o2e(r) || qG(r)))
+ return !r.length;
+ var i = eX(r);
+ if (i == F8n || i == O8n)
+ return !r.size;
+ if (i2e(r))
+ return !ASt(r).length;
+ for (var o in r)
+ if (D8n.call(r, o))
+ return !1;
+ return !0;
+}
+function _p(r) {
+ return r === void 0;
+}
+function QSt(r, i) {
+ return r < i;
+}
+function ame(r, i) {
+ var o = {};
+ return i = MO(i), FSt(r, function(l, f, g) {
+ t2e(o, f, i(l, f, g));
+ }), o;
+}
+function HRe(r, i, o) {
+ for (var l = -1, f = r.length; ++l < f; ) {
+ var g = r[l], A = i(g);
+ if (A != null && (b === void 0 ? A == A && !d$(A) : o(A, b)))
+ var b = A, v = g;
+ }
+ return v;
+}
+function g$(r) {
+ return r && r.length ? HRe(r, B$, L8n) : void 0;
+}
+var uOe, N8n = (uOe = function(r, i, o) {
+ NSt(r, i, o);
+}, r2e(function(r, i) {
+ var o = -1, l = i.length, f = l > 1 ? i[l - 1] : void 0, g = l > 2 ? i[2] : void 0;
+ for (f = uOe.length > 3 && typeof f == "function" ? (l--, f) : void 0, g && pie(i[0], i[1], g) && (f = l < 3 ? void 0 : f, l = 1), r = Object(r); ++o < l; ) {
+ var A = i[o];
+ A && uOe(r, A, o, f);
+ }
+ return r;
+})), INe = N8n;
+function mie(r) {
+ return r && r.length ? HRe(r, B$, QSt) : void 0;
+}
+function jRe(r, i) {
+ return r && r.length ? HRe(r, MO(i), QSt) : void 0;
+}
+function P8n(r, i, o, l) {
+ if (!xk(r))
+ return r;
+ for (var f = -1, g = (i = s2e(i, r)).length, A = g - 1, b = r; b != null && ++f < g; ) {
+ var v = Qie(i[f]), k = o;
+ if (v === "__proto__" || v === "constructor" || v === "prototype")
+ return r;
+ if (f != A) {
+ var _ = b[v];
+ (k = l ? l(_, v, b) : void 0) === void 0 && (k = xk(_) ? _ : e2e(i[f + 1]) ? [] : {});
+ }
+ n2e(b, v, k), b = b[v];
+ }
+ return r;
+}
+function R8n(r, i) {
+ if (r !== i) {
+ var o = r !== void 0, l = r === null, f = r == r, g = d$(r), A = i !== void 0, b = i === null, v = i == i, k = d$(i);
+ if (!b && !k && !g && r > i || g && A && v && !b && !k || l && A && v || !o && v || !f)
+ return 1;
+ if (!l && !g && !k && r < i || k && o && f && !l && !g || b && o && f || !A && f || !v)
+ return -1;
+ }
+ return 0;
+}
+function Q8n(r, i, o) {
+ i = i.length ? EG(i, function(f) {
+ return fm(f) ? function(g) {
+ return c2e(g, f.length === 1 ? f[0] : f);
+ } : f;
+ }) : [B$];
+ var l = -1;
+ return i = EG(i, a2e(MO)), function(f, g) {
+ var A = f.length;
+ for (aie(f).call(f, g); A--; )
+ f[A] = f[A].value;
+ return f;
+ }(RSt(r, function(f, g, A) {
+ return { criteria: EG(i, function(b) {
+ return b(f);
+ }), index: ++l, value: f };
+ }), function(f, g) {
+ return function(A, b, v) {
+ for (var k = -1, _ = A.criteria, T = b.criteria, L = _.length, F = v.length; ++k < L; ) {
+ var U = R8n(_[k], T[k]);
+ if (U)
+ return k >= F ? U : U * (v[k] == "desc" ? -1 : 1);
+ }
+ return A.index - b.index;
+ }(f, g, o);
+ });
+}
+function $8n(r, i) {
+ return function(o, l, f) {
+ for (var g = -1, A = l.length, b = {}; ++g < A; ) {
+ var v = l[g], k = c2e(o, v);
+ f(k, v) && P8n(b, s2e(v, o), k);
+ }
+ return b;
+ }(r, i, function(o, l) {
+ return MSt(r, l);
+ });
+}
+var U8n = function(r) {
+ return aSt(cSt(r, void 0, ZG), r + "");
+}(function(r, i) {
+ return r == null ? {} : $8n(r, i);
+}), lbe = U8n, H8n = Math.ceil, j8n = Math.max, K8n = /* @__PURE__ */ function(r) {
+ return function(i, o, l) {
+ return l && typeof l != "number" && pie(i, o, l) && (o = l = void 0), i = ime(i), o === void 0 ? (o = i, i = 0) : o = ime(o), function(f, g, A, b) {
+ for (var v = -1, k = j8n(H8n((g - f) / (A || 1)), 0), _ = Array(k); k--; )
+ _[b ? k : ++v] = f, f += A;
+ return _;
+ }(i, o, l = l === void 0 ? i < o ? 1 : -1 : ime(l), r);
+ };
+}(), SG = K8n;
+function z8n(r, i, o, l, f) {
+ return f(r, function(g, A, b) {
+ o = l ? (l = !1, g) : i(o, g, A, b);
+ }), o;
+}
+function $ie(r, i, o) {
+ var l = fm(r) ? ixn : z8n, f = arguments.length < 3;
+ return l(r, MO(i), o, f, u2e);
+}
+var G8n = r2e(function(r, i) {
+ if (r == null)
+ return [];
+ var o = i.length;
+ return o > 1 && pie(r, i[0], i[1]) ? i = [] : o > 2 && pie(i[0], i[1], i[2]) && (i = [i[0]]), Q8n(r, l2e(i, 1), []);
+}), bie = G8n, X8n = TG && 1 / RRe(new TG([, -0]))[1] == 1 / 0 ? function(r) {
+ return new TG(r);
+} : function() {
+}, W8n = X8n, V8n = r2e(function(r) {
+ return function(i, o, l) {
+ var f = -1, g = Ikn, A = i.length, b = !0, v = [], k = v;
+ if (l)
+ b = !1, g = E8n;
+ else if (A >= 200) {
+ var _ = o ? null : W8n(i);
+ if (_)
+ return RRe(_);
+ b = !1, g = BSt, k = new Lre();
+ } else
+ k = o ? [] : v;
+ e:
+ for (; ++f < A; ) {
+ var T = i[f], L = o ? o(T) : T;
+ if (T = l || T !== 0 ? T : 0, b && L == L) {
+ for (var F = k.length; F--; )
+ if (k[F] === L)
+ continue e;
+ o && k.push(L), v.push(T);
+ } else
+ g(k, L, l) || (k !== v && k.push(L), v.push(T));
+ }
+ return v;
+ }(l2e(r, 1, DSt, !0));
+}), q8n = V8n, Y8n = 0;
+function KRe(r) {
+ var i = ++Y8n;
+ return gSt(r) + i;
+}
+var J8n = VQ.onFreeze, MNe = Object.freeze, Z8n = oh(function() {
+ MNe(1);
+});
+qa({ target: "Object", stat: !0, forced: Z8n, sham: !I_t }, { freeze: function(r) {
+ return MNe && Id(r) ? MNe(J8n(r)) : r;
+} });
+var eCn = ql.Object.freeze, tCn = "\0", FQ = "\0", g8t = "", ub = function() {
+ function r() {
+ var i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
+ vi(this, r), this._isDirected = !_1(i, "directed") || i.directed, this._isMultigraph = !!_1(i, "multigraph") && i.multigraph, this._isCompound = !!_1(i, "compound") && i.compound, this._label = void 0, this._defaultNodeLabelFn = dG(void 0), this._defaultEdgeLabelFn = dG(void 0), this._nodes = {}, this._isCompound && (this._parent = {}, this._children = {}, this._children[FQ] = {}), this._in = {}, this._preds = {}, this._out = {}, this._sucs = {}, this._edgeObjs = {}, this._edgeLabels = {};
+ }
+ return yi(r, [{ key: "isDirected", value: function() {
+ return this._isDirected;
+ } }, { key: "isMultigraph", value: function() {
+ return this._isMultigraph;
+ } }, { key: "isCompound", value: function() {
+ return this._isCompound;
+ } }, { key: "setGraph", value: function(i) {
+ return this._label = i, this;
+ } }, { key: "graph", value: function() {
+ return this._label;
+ } }, { key: "setDefaultNodeLabel", value: function(i) {
+ return fie(i) || (i = dG(i)), this._defaultNodeLabelFn = i, this;
+ } }, { key: "nodeCount", value: function() {
+ return this._nodeCount;
+ } }, { key: "nodes", value: function() {
+ return pk(this._nodes);
+ } }, { key: "sources", value: function() {
+ var i = this;
+ return uL(this.nodes(), function(o) {
+ return BG(i._in[o]);
+ });
+ } }, { key: "sinks", value: function() {
+ var i = this;
+ return uL(this.nodes(), function(o) {
+ return BG(i._out[o]);
+ });
+ } }, { key: "setNodes", value: function(i, o) {
+ var l = arguments, f = this;
+ return Ii(i, function(g) {
+ l.length > 1 ? f.setNode(g, o) : f.setNode(g);
+ }), this;
+ } }, { key: "setNode", value: function(i, o) {
+ return _1(this._nodes, i) ? (arguments.length > 1 && (this._nodes[i] = o), this) : (this._nodes[i] = arguments.length > 1 ? o : this._defaultNodeLabelFn(i), this._isCompound && (this._parent[i] = FQ, this._children[i] = {}, this._children[FQ][i] = !0), this._in[i] = {}, this._preds[i] = {}, this._out[i] = {}, this._sucs[i] = {}, ++this._nodeCount, this);
+ } }, { key: "node", value: function(i) {
+ return this._nodes[i];
+ } }, { key: "hasNode", value: function(i) {
+ return _1(this._nodes, i);
+ } }, { key: "removeNode", value: function(i) {
+ var o = this;
+ if (_1(this._nodes, i)) {
+ var l = function(f) {
+ o.removeEdge(o._edgeObjs[f]);
+ };
+ delete this._nodes[i], this._isCompound && (this._removeFromParentsChildList(i), delete this._parent[i], Ii(this.children(i), function(f) {
+ o.setParent(f);
+ }), delete this._children[i]), Ii(pk(this._in[i]), l), delete this._in[i], delete this._preds[i], Ii(pk(this._out[i]), l), delete this._out[i], delete this._sucs[i], --this._nodeCount;
+ }
+ return this;
+ } }, { key: "setParent", value: function(i, o) {
+ if (!this._isCompound)
+ throw new Error("Cannot set parent in a non-compound graph");
+ if (_p(o))
+ o = FQ;
+ else {
+ for (var l = o += ""; !_p(l); l = this.parent(l))
+ if (l === i)
+ throw new Error("Setting " + o + " as parent of " + i + " would create a cycle");
+ this.setNode(o);
+ }
+ return this.setNode(i), this._removeFromParentsChildList(i), this._parent[i] = o, this._children[o][i] = !0, this;
+ } }, { key: "_removeFromParentsChildList", value: function(i) {
+ delete this._children[this._parent[i]][i];
+ } }, { key: "parent", value: function(i) {
+ if (this._isCompound) {
+ var o = this._parent[i];
+ if (o !== FQ)
+ return o;
+ }
+ } }, { key: "children", value: function(i) {
+ if (_p(i) && (i = FQ), this._isCompound) {
+ var o = this._children[i];
+ if (o)
+ return pk(o);
+ } else {
+ if (i === FQ)
+ return this.nodes();
+ if (this.hasNode(i))
+ return [];
+ }
+ } }, { key: "predecessors", value: function(i) {
+ var o = this._preds[i];
+ if (o)
+ return pk(o);
+ } }, { key: "successors", value: function(i) {
+ var o = this._sucs[i];
+ if (o)
+ return pk(o);
+ } }, { key: "neighbors", value: function(i) {
+ var o = this.predecessors(i);
+ if (o)
+ return q8n(o, this.successors(i));
+ } }, { key: "isLeaf", value: function(i) {
+ return (this.isDirected() ? this.successors(i) : this.neighbors(i)).length === 0;
+ } }, { key: "filterNodes", value: function(i) {
+ var o = new this.constructor({ directed: this._isDirected, multigraph: this._isMultigraph, compound: this._isCompound });
+ o.setGraph(this.graph());
+ var l = this;
+ Ii(this._nodes, function(A, b) {
+ i(b) && o.setNode(b, A);
+ }), Ii(this._edgeObjs, function(A) {
+ o.hasNode(A.v) && o.hasNode(A.w) && o.setEdge(A, l.edge(A));
+ });
+ var f = {};
+ function g(A) {
+ var b = l.parent(A);
+ return b === void 0 || o.hasNode(b) ? (f[A] = b, b) : b in f ? f[b] : g(b);
+ }
+ return this._isCompound && Ii(o.nodes(), function(A) {
+ o.setParent(A, g(A));
+ }), o;
+ } }, { key: "setDefaultEdgeLabel", value: function(i) {
+ return fie(i) || (i = dG(i)), this._defaultEdgeLabelFn = i, this;
+ } }, { key: "edgeCount", value: function() {
+ return this._edgeCount;
+ } }, { key: "edges", value: function() {
+ return hL(this._edgeObjs);
+ } }, { key: "setPath", value: function(i, o) {
+ var l = this, f = arguments;
+ return $ie(i, function(g, A) {
+ return f.length > 1 ? l.setEdge(g, A, o) : l.setEdge(g, A), A;
+ }), this;
+ } }, { key: "setEdge", value: function() {
+ var i, o, l, f, g = !1, A = arguments[0];
+ Yl(A) === "object" && A !== null && "v" in A ? (i = A.v, o = A.w, l = A.name, arguments.length === 2 && (f = arguments[1], g = !0)) : (i = A, o = arguments[1], l = arguments[3], arguments.length > 2 && (f = arguments[2], g = !0)), i = "" + i, o = "" + o, _p(l) || (l = "" + l);
+ var b = lre(this._isDirected, i, o, l);
+ if (_1(this._edgeLabels, b))
+ return g && (this._edgeLabels[b] = f), this;
+ if (!_p(l) && !this._isMultigraph)
+ throw new Error("Cannot set a named edge when isMultigraph = false");
+ this.setNode(i), this.setNode(o), this._edgeLabels[b] = g ? f : this._defaultEdgeLabelFn(i, o, l);
+ var v = function(k, _, T, L) {
+ var F = "" + _, U = "" + T;
+ if (!k && F > U) {
+ var q = F;
+ F = U, U = q;
+ }
+ var Z = { v: F, w: U };
+ return L && (Z.name = L), Z;
+ }(this._isDirected, i, o, l);
+ return i = v.v, o = v.w, eCn(v), this._edgeObjs[b] = v, p8t(this._preds[o], i), p8t(this._sucs[i], o), this._in[o][b] = v, this._out[i][b] = v, this._edgeCount++, this;
+ } }, { key: "edge", value: function(i, o, l) {
+ var f = arguments.length === 1 ? hOe(this._isDirected, arguments[0]) : lre(this._isDirected, i, o, l);
+ return this._edgeLabels[f];
+ } }, { key: "hasEdge", value: function(i, o, l) {
+ var f = arguments.length === 1 ? hOe(this._isDirected, arguments[0]) : lre(this._isDirected, i, o, l);
+ return _1(this._edgeLabels, f);
+ } }, { key: "removeEdge", value: function(i, o, l) {
+ var f = arguments.length === 1 ? hOe(this._isDirected, arguments[0]) : lre(this._isDirected, i, o, l), g = this._edgeObjs[f];
+ return g && (i = g.v, o = g.w, delete this._edgeLabels[f], delete this._edgeObjs[f], m8t(this._preds[o], i), m8t(this._sucs[i], o), delete this._in[o][f], delete this._out[i][f], this._edgeCount--), this;
+ } }, { key: "inEdges", value: function(i, o) {
+ var l = this._in[i];
+ if (l) {
+ var f = hL(l);
+ return o ? uL(f, function(g) {
+ return g.v === o;
+ }) : f;
+ }
+ } }, { key: "outEdges", value: function(i, o) {
+ var l = this._out[i];
+ if (l) {
+ var f = hL(l);
+ return o ? uL(f, function(g) {
+ return g.w === o;
+ }) : f;
+ }
+ } }, { key: "nodeEdges", value: function(i, o) {
+ var l = this.inEdges(i, o);
+ if (l)
+ return At(l).call(l, this.outEdges(i, o));
+ } }]), r;
+}();
+function p8t(r, i) {
+ r[i] ? r[i]++ : r[i] = 1;
+}
+function m8t(r, i) {
+ --r[i] || delete r[i];
+}
+function lre(r, i, o, l) {
+ var f = "" + i, g = "" + o;
+ if (!r && f > g) {
+ var A = f;
+ f = g, g = A;
+ }
+ return f + g8t + g + g8t + (_p(l) ? tCn : l);
+}
+function hOe(r, i) {
+ return lre(r, i.v, i.w, i.name);
+}
+ub.prototype._nodeCount = 0, ub.prototype._edgeCount = 0;
+var nCn = function() {
+ function r() {
+ vi(this, r);
+ var i = {};
+ i._next = i._prev = i, this._sentinel = i;
+ }
+ return yi(r, [{ key: "dequeue", value: function() {
+ var i = this._sentinel, o = i._prev;
+ if (o !== i)
+ return b8t(o), o;
+ } }, { key: "enqueue", value: function(i) {
+ var o = this._sentinel;
+ i._prev && i._next && b8t(i), i._next = o._next, o._next._prev = i, o._next = i, i._prev = o;
+ } }, { key: "toString", value: function() {
+ for (var i = [], o = this._sentinel, l = o._prev; l !== o; )
+ i.push(zPe(l, rCn)), l = l._prev;
+ return "[" + i.join(", ") + "]";
+ } }]), r;
+}();
+function b8t(r) {
+ r._prev._next = r._next, r._next._prev = r._prev, delete r._next, delete r._prev;
+}
+function rCn(r, i) {
+ if (r !== "_next" && r !== "_prev")
+ return i;
+}
+var iCn = dG(1);
+function aCn(r, i) {
+ if (r.nodeCount() <= 1)
+ return [];
+ var o = function(f, g) {
+ var A, b = new ub(), v = 0, k = 0;
+ Ii(f.nodes(), function(L) {
+ b.setNode(L, { v: L, in: 0, out: 0 });
+ }), Ii(f.edges(), function(L) {
+ var F = b.edge(L.v, L.w) || 0, U = g(L), q = F + U;
+ b.setEdge(L.v, L.w, q), k = Math.max(k, b.node(L.v).out += U), v = Math.max(v, b.node(L.w).in += U);
+ });
+ var _ = Zs(A = SG(k + v + 3)).call(A, function() {
+ return new nCn();
+ }), T = v + 1;
+ return Ii(b.nodes(), function(L) {
+ FNe(_, T, b.node(L));
+ }), { graph: b, buckets: _, zeroIdx: T };
+ }(r, i || iCn), l = function(f, g, A) {
+ for (var b, v = [], k = g[g.length - 1], _ = g[0]; f.nodeCount(); ) {
+ for (; b = _.dequeue(); )
+ fOe(f, g, A, b);
+ for (; b = k.dequeue(); )
+ fOe(f, g, A, b);
+ if (f.nodeCount()) {
+ for (var T = g.length - 2; T > 0; --T)
+ if (b = g[T].dequeue()) {
+ v = At(v).call(v, fOe(f, g, A, b, !0));
+ break;
+ }
+ }
+ }
+ return v;
+ }(o.graph, o.buckets, o.zeroIdx);
+ return ZG(um(l, function(f) {
+ return r.outEdges(f.v, f.w);
+ }));
+}
+function fOe(r, i, o, l, f) {
+ var g = f ? [] : void 0;
+ return Ii(r.inEdges(l.v), function(A) {
+ var b = r.edge(A), v = r.node(A.v);
+ f && g.push({ v: A.v, w: A.w }), v.out -= b, FNe(i, o, v);
+ }), Ii(r.outEdges(l.v), function(A) {
+ var b = r.edge(A), v = A.w, k = r.node(v);
+ k.in -= b, FNe(i, o, k);
+ }), r.removeNode(l.v), g;
+}
+function FNe(r, i, o) {
+ o.out ? o.in ? r[o.out - o.in + i].enqueue(o) : r[r.length - 1].enqueue(o) : r[0].enqueue(o);
+}
+function oCn(r) {
+ var i = r.graph().acyclicer === "greedy" ? aCn(r, /* @__PURE__ */ function(o) {
+ return function(l) {
+ return o.edge(l).weight;
+ };
+ }(r)) : function(o) {
+ var l = [], f = {}, g = {};
+ function A(b) {
+ _1(g, b) || (g[b] = !0, f[b] = !0, Ii(o.outEdges(b), function(v) {
+ _1(f, v.w) ? l.push(v) : A(v.w);
+ }), delete f[b]);
+ }
+ return Ii(o.nodes(), A), l;
+ }(r);
+ Ii(i, function(o) {
+ var l = r.edge(o);
+ r.removeEdge(o), l.forwardName = o.name, l.reversed = !0, r.setEdge(o.w, o.v, l, KRe("rev"));
+ });
+}
+function tX(r, i, o, l) {
+ var f;
+ do
+ f = KRe(l);
+ while (r.hasNode(f));
+ return o.dummy = i, r.setNode(f, o), f;
+}
+function $St(r) {
+ var i = new ub({ multigraph: r.isMultigraph() }).setGraph(r.graph());
+ return Ii(r.nodes(), function(o) {
+ r.children(o).length || i.setNode(o, r.node(o));
+ }), Ii(r.edges(), function(o) {
+ i.setEdge(o, r.edge(o));
+ }), i;
+}
+function v8t(r, i) {
+ var o, l, f = r.x, g = r.y, A = i.x - f, b = i.y - g, v = r.width / 2, k = r.height / 2;
+ if (!A && !b)
+ throw new Error("Not possible to find intersection inside of the rectangle");
+ return Math.abs(b) * v > Math.abs(A) * k ? (b < 0 && (k = -k), o = k * A / b, l = k) : (A < 0 && (v = -v), o = v, l = v * b / A), { x: f + o, y: g + l };
+}
+function h2e(r) {
+ var i = um(SG(USt(r) + 1), function() {
+ return [];
+ });
+ return Ii(r.nodes(), function(o) {
+ var l = r.node(o), f = l.rank;
+ _p(f) || (i[f][l.order] = o);
+ }), i;
+}
+function y8t(r, i, o, l) {
+ var f = { width: 0, height: 0 };
+ return arguments.length >= 4 && (f.rank = o, f.order = l), tX(r, "border", f, i);
+}
+function USt(r) {
+ return g$(um(r.nodes(), function(i) {
+ var o = r.node(i).rank;
+ if (!_p(o))
+ return o;
+ }));
+}
+function sCn(r, i) {
+ d8t();
+ try {
+ return i();
+ } finally {
+ d8t();
+ }
+}
+function cCn(r, i) {
+ return i();
+}
+function w8t(r, i, o, l, f, g) {
+ var A = { width: 0, height: 0, rank: g, borderType: i }, b = f[i][g - 1], v = tX(r, "border", A, o);
+ f[i][g] = v, r.setParent(v, l), b && r.setEdge(b, v, { weight: 1 });
+}
+function lCn(r) {
+ var i = r.graph().rankdir.toLowerCase();
+ i !== "bt" && i !== "rl" || function(o) {
+ Ii(o.nodes(), function(l) {
+ dOe(o.node(l));
+ }), Ii(o.edges(), function(l) {
+ var f = o.edge(l);
+ Ii(f.points, dOe), _1(f, "y") && dOe(f);
+ });
+ }(r), i !== "lr" && i !== "rl" || (function(o) {
+ Ii(o.nodes(), function(l) {
+ AOe(o.node(l));
+ }), Ii(o.edges(), function(l) {
+ var f = o.edge(l);
+ Ii(f.points, AOe), _1(f, "x") && AOe(f);
+ });
+ }(r), HSt(r));
+}
+function HSt(r) {
+ Ii(r.nodes(), function(i) {
+ k8t(r.node(i));
+ }), Ii(r.edges(), function(i) {
+ k8t(r.edge(i));
+ });
+}
+function k8t(r) {
+ var i = r.width;
+ r.width = r.height, r.height = i;
+}
+function dOe(r) {
+ r.y = -r.y;
+}
+function AOe(r) {
+ var i = r.x;
+ r.x = r.y, r.y = i;
+}
+function uCn(r) {
+ r.graph().dummyChains = [], Ii(r.edges(), function(i) {
+ (function(o, l) {
+ var f, g, A, b = l.v, v = o.node(b).rank, k = l.w, _ = o.node(k).rank, T = l.name, L = o.edge(l), F = L.labelRank;
+ if (_ !== v + 1) {
+ for (o.removeEdge(l), A = 0, ++v; v < _; ++A, ++v)
+ L.points = [], f = tX(o, "edge", g = { width: 0, height: 0, edgeLabel: L, edgeObj: l, rank: v }, "_d"), v === F && (g.width = L.width, g.height = L.height, g.dummy = "edge-label", g.labelpos = L.labelpos), o.setEdge(b, f, { weight: L.weight }, T), A === 0 && o.graph().dummyChains.push(f), b = f;
+ o.setEdge(b, k, { weight: L.weight }, T);
+ }
+ })(r, i);
+ });
+}
+function zRe(r) {
+ var i = {};
+ Ii(r.sources(), function o(l) {
+ var f = r.node(l);
+ if (_1(i, l))
+ return f.rank;
+ i[l] = !0;
+ var g = mie(um(r.outEdges(l), function(A) {
+ return o(A.w) - r.edge(A).minlen;
+ }));
+ return g !== Number.POSITIVE_INFINITY && g != null || (g = 0), f.rank = g;
+ });
+}
+function vie(r, i) {
+ return r.node(i.w).rank - r.node(i.v).rank - r.edge(i).minlen;
+}
+function jSt(r) {
+ var i, o, l = new ub({ directed: !1 }), f = r.nodes()[0], g = r.nodeCount();
+ for (l.setNode(f, {}); hCn(l, r) < g; )
+ i = fCn(l, r), o = l.hasNode(i.v) ? vie(r, i) : -vie(r, i), dCn(l, r, o);
+ return l;
+}
+function hCn(r, i) {
+ return Ii(r.nodes(), function o(l) {
+ Ii(i.nodeEdges(l), function(f) {
+ var g = f.v, A = l === g ? f.w : g;
+ r.hasNode(A) || vie(i, f) || (r.setNode(A, {}), r.setEdge(l, A, {}), o(A));
+ });
+ }), r.nodeCount();
+}
+function fCn(r, i) {
+ return jRe(i.edges(), function(o) {
+ if (r.hasNode(o.v) !== r.hasNode(o.w))
+ return vie(i, o);
+ });
+}
+function dCn(r, i, o) {
+ Ii(r.nodes(), function(l) {
+ i.node(l).rank += o;
+ });
+}
+function KSt(r, i, o) {
+ var l;
+ fm(i) || (i = [i]);
+ var f = Bo(l = r.isDirected() ? r.successors : r.neighbors).call(l, r), g = [], A = {};
+ return Ii(i, function(b) {
+ if (!r.hasNode(b))
+ throw new Error("Graph does not have node: " + b);
+ zSt(r, b, o === "post", A, f, g);
+ }), g;
+}
+function zSt(r, i, o, l, f, g) {
+ _1(l, i) || (l[i] = !0, o || g.push(i), Ii(f(i), function(A) {
+ zSt(r, A, o, l, f, g);
+ }), o && g.push(i));
+}
+function UQ(r) {
+ r = function(l) {
+ var f = new ub().setGraph(l.graph());
+ return Ii(l.nodes(), function(g) {
+ f.setNode(g, l.node(g));
+ }), Ii(l.edges(), function(g) {
+ var A = f.edge(g.v, g.w) || { weight: 0, minlen: 1 }, b = l.edge(g);
+ f.setEdge(g.v, g.w, { weight: A.weight + b.weight, minlen: Math.max(A.minlen, b.minlen) });
+ }), f;
+ }(r), zRe(r);
+ var i, o = jSt(r);
+ for (XRe(o), GRe(o, r); i = WSt(o); )
+ qSt(o, r, i, VSt(o, r, i));
+}
+function GRe(r, i) {
+ var o = function(l, f) {
+ return KSt(l, f, "post");
+ }(r, r.nodes());
+ Ii(o = Da(o).call(o, 0, o.length - 1), function(l) {
+ (function(f, g, A) {
+ var b = f.node(A), v = b.parent;
+ f.edge(A, v).cutvalue = GSt(f, g, A);
+ })(r, i, l);
+ });
+}
+function GSt(r, i, o) {
+ var l = r.node(o).parent, f = !0, g = i.edge(o, l), A = 0;
+ return g || (f = !1, g = i.edge(l, o)), A = g.weight, Ii(i.nodeEdges(o), function(b) {
+ var v, k, _ = b.v === o, T = _ ? b.w : b.v;
+ if (T !== l) {
+ var L = _ === f, F = i.edge(b).weight;
+ if (A += L ? F : -F, v = o, k = T, r.hasEdge(v, k)) {
+ var U = r.edge(o, T).cutvalue;
+ A += L ? -U : U;
+ }
+ }
+ }), A;
+}
+function XRe(r, i) {
+ arguments.length < 2 && (i = r.nodes()[0]), XSt(r, {}, 1, i);
+}
+function XSt(r, i, o, l, f) {
+ var g = o, A = r.node(l);
+ return i[l] = !0, Ii(r.neighbors(l), function(b) {
+ _1(i, b) || (o = XSt(r, i, o, b, l));
+ }), A.low = g, A.lim = o++, f ? A.parent = f : delete A.parent, o;
+}
+function WSt(r) {
+ return URe(r.edges(), function(i) {
+ return r.edge(i).cutvalue < 0;
+ });
+}
+function VSt(r, i, o) {
+ var l = o.v, f = o.w;
+ i.hasEdge(l, f) || (l = o.w, f = o.v);
+ var g = r.node(l), A = r.node(f), b = g, v = !1;
+ g.lim > A.lim && (b = A, v = !0);
+ var k = uL(i.edges(), function(_) {
+ return v === x8t(r, r.node(_.v), b) && v !== x8t(r, r.node(_.w), b);
+ });
+ return jRe(k, function(_) {
+ return vie(i, _);
+ });
+}
+function qSt(r, i, o, l) {
+ var f = o.v, g = o.w;
+ r.removeEdge(f, g), r.setEdge(l.v, l.w, {}), XRe(r), GRe(r, i), function(A, b) {
+ var v = URe(A.nodes(), function(_) {
+ return !b.node(_).parent;
+ }), k = function(_, T) {
+ return KSt(_, T, "pre");
+ }(A, v);
+ Ii(k = Da(k).call(k, 1), function(_) {
+ var T = A.node(_).parent, L = b.edge(_, T), F = !1;
+ L || (L = b.edge(T, _), F = !0), b.node(_).rank = b.node(T).rank + (F ? L.minlen : -L.minlen);
+ });
+ }(r, i);
+}
+function x8t(r, i, o) {
+ return o.low <= i.lim && i.lim <= o.lim;
+}
+function ACn(r) {
+ switch (r.graph().ranker) {
+ case "network-simplex":
+ default:
+ pCn(r);
+ break;
+ case "tight-tree":
+ (function(i) {
+ zRe(i), jSt(i);
+ })(r);
+ break;
+ case "longest-path":
+ gCn(r);
+ }
+}
+UQ.initLowLimValues = XRe, UQ.initCutValues = GRe, UQ.calcCutValue = GSt, UQ.leaveEdge = WSt, UQ.enterEdge = VSt, UQ.exchangeEdges = qSt;
+var gCn = zRe;
+function pCn(r) {
+ UQ(r);
+}
+function mCn(r) {
+ var i = tX(r, "root", {}, "_root"), o = function(A) {
+ var b = {};
+ function v(k, _) {
+ var T = A.children(k);
+ T && T.length && Ii(T, function(L) {
+ v(L, _ + 1);
+ }), b[k] = _;
+ }
+ return Ii(A.children(), function(k) {
+ v(k, 1);
+ }), b;
+ }(r), l = g$(hL(o)) - 1, f = 2 * l + 1;
+ r.graph().nestingRoot = i, Ii(r.edges(), function(A) {
+ r.edge(A).minlen *= f;
+ });
+ var g = function(A) {
+ return $ie(A.edges(), function(b, v) {
+ return b + A.edge(v).weight;
+ }, 0);
+ }(r) + 1;
+ Ii(r.children(), function(A) {
+ YSt(r, i, f, g, l, o, A);
+ }), r.graph().nodeRankFactor = f;
+}
+function YSt(r, i, o, l, f, g, A) {
+ var b = r.children(A);
+ if (b.length) {
+ var v = y8t(r, "_bt"), k = y8t(r, "_bb"), _ = r.node(A);
+ r.setParent(v, A), _.borderTop = v, r.setParent(k, A), _.borderBottom = k, Ii(b, function(T) {
+ YSt(r, i, o, l, f, g, T);
+ var L = r.node(T), F = L.borderTop ? L.borderTop : T, U = L.borderBottom ? L.borderBottom : T, q = L.borderTop ? l : 2 * l, Z = F !== U ? 1 : f - g[A] + 1;
+ r.setEdge(v, F, { weight: q, minlen: Z, nestingEdge: !0 }), r.setEdge(U, k, { weight: q, minlen: Z, nestingEdge: !0 });
+ }), r.parent(A) || r.setEdge(i, v, { weight: 0, minlen: f + g[A] });
+ } else
+ A !== i && r.setEdge(i, A, { weight: 0, minlen: o });
+}
+function bCn(r, i, o) {
+ var l = function(g) {
+ for (var A; g.hasNode(A = KRe("_root")); )
+ ;
+ return A;
+ }(r), f = new ub({ compound: !0 }).setGraph({ root: l }).setDefaultNodeLabel(function(g) {
+ return r.node(g);
+ });
+ return Ii(r.nodes(), function(g) {
+ var A = r.node(g), b = r.parent(g);
+ (A.rank === i || A.minRank <= i && i <= A.maxRank) && (f.setNode(g), f.setParent(g, b || l), Ii(r[o](g), function(v) {
+ var k = v.v === g ? v.w : v.v, _ = f.edge(k, g), T = _p(_) ? 0 : _.weight;
+ f.setEdge(k, g, { weight: r.edge(v).weight + T });
+ }), _1(A, "minRank") && f.setNode(g, { borderLeft: A.borderLeft[i], borderRight: A.borderRight[i] }));
+ }), f;
+}
+function vCn(r, i) {
+ for (var o = 0, l = 1; l < i.length; ++l)
+ o += yCn(r, i[l - 1], i[l]);
+ return o;
+}
+function yCn(r, i, o) {
+ for (var l = function(k, _) {
+ return function(T, L, F) {
+ for (var U = -1, q = T.length, Z = L.length, R = {}; ++U < q; ) {
+ var J = U < Z ? L[U] : void 0;
+ F(R, T[U], J);
+ }
+ return R;
+ }(k || [], _ || [], n2e);
+ }(o, um(o, function(k, _) {
+ return _;
+ })), f = ZG(um(i, function(k) {
+ return bie(um(r.outEdges(k), function(_) {
+ return { pos: l[_.w], weight: r.edge(_).weight };
+ }), "pos");
+ })), g = 1; g < o.length; )
+ g <<= 1;
+ var A = 2 * g - 1;
+ g -= 1;
+ var b = um(new Array(A), function() {
+ return 0;
+ }), v = 0;
+ return Ii(no(f).call(f, function(k) {
+ var _ = k.pos + g;
+ b[_] += k.weight;
+ for (var T = 0; _ > 0; )
+ _ % 2 && (T += b[_ + 1]), b[_ = _ - 1 >> 1] += k.weight;
+ v += k.weight * T;
+ })), v;
+}
+function wCn(r, i) {
+ var o = {};
+ return Ii(r, function(l, f) {
+ var g = o[l.v] = { indegree: 0, in: [], out: [], vs: [l.v], i: f };
+ _p(l.barycenter) || (g.barycenter = l.barycenter, g.weight = l.weight);
+ }), Ii(i.edges(), function(l) {
+ var f = o[l.v], g = o[l.w];
+ _p(f) || _p(g) || (g.indegree++, f.out.push(o[l.w]));
+ }), function(l) {
+ var f = [];
+ function g(k) {
+ return function(_) {
+ _.merged || (_p(_.barycenter) || _p(k.barycenter) || _.barycenter >= k.barycenter) && function(T, L) {
+ var F, U = 0, q = 0;
+ T.weight && (U += T.barycenter * T.weight, q += T.weight), L.weight && (U += L.barycenter * L.weight, q += L.weight), T.vs = At(F = L.vs).call(F, T.vs), T.barycenter = U / q, T.weight = q, T.i = Math.min(L.i, T.i), L.merged = !0;
+ }(k, _);
+ };
+ }
+ function A(k) {
+ return function(_) {
+ _.in.push(k), --_.indegree == 0 && l.push(_);
+ };
+ }
+ for (; l.length; ) {
+ var b, v = l.pop();
+ f.push(v), Ii(TL(b = v.in).call(b), g(v)), Ii(v.out, A(v));
+ }
+ return um(uL(f, function(k) {
+ return !k.merged;
+ }), function(k) {
+ return lbe(k, ["vs", "i", "barycenter", "weight"]);
+ });
+ }(uL(o, function(l) {
+ return !l.indegree;
+ }));
+}
+function kCn(r, i) {
+ var o, l = function(T, L) {
+ var F = { lhs: [], rhs: [] };
+ return Ii(T, function(U) {
+ L(U) ? F.lhs.push(U) : F.rhs.push(U);
+ }), F;
+ }(r, function(T) {
+ return _1(T, "barycenter");
+ }), f = l.lhs, g = bie(l.rhs, function(T) {
+ return -T.i;
+ }), A = [], b = 0, v = 0, k = 0;
+ aie(f).call(f, (o = !!i, function(T, L) {
+ return T.barycenter < L.barycenter ? -1 : T.barycenter > L.barycenter ? 1 : o ? L.i - T.i : T.i - L.i;
+ })), k = C8t(A, g, k), Ii(f, function(T) {
+ k += T.vs.length, A.push(T.vs), b += T.barycenter * T.weight, v += T.weight, k = C8t(A, g, k);
+ });
+ var _ = { vs: ZG(A) };
+ return v && (_.barycenter = b / v, _.weight = v), _;
+}
+function C8t(r, i, o) {
+ for (var l; i.length && (l = cbe(i)).i <= o; )
+ i.pop(), r.push(l.vs), o++;
+ return o;
+}
+function JSt(r, i, o, l) {
+ var f = r.children(i), g = r.node(i), A = g ? g.borderLeft : void 0, b = g ? g.borderRight : void 0, v = {};
+ A && (f = uL(f, function(U) {
+ return U !== A && U !== b;
+ }));
+ var k = function(U, q) {
+ return um(q, function(Z) {
+ var R = U.inEdges(Z);
+ if (R.length) {
+ var J = $ie(R, function(he, Y) {
+ var ue = U.edge(Y), le = U.node(Y.v);
+ return { sum: he.sum + ue.weight * le.order, weight: he.weight + ue.weight };
+ }, { sum: 0, weight: 0 });
+ return { v: Z, barycenter: J.sum / J.weight, weight: J.weight };
+ }
+ return { v: Z };
+ });
+ }(r, f);
+ Ii(k, function(U) {
+ if (r.children(U.v).length) {
+ var q = JSt(r, U.v, o, l);
+ v[U.v] = q, _1(q, "barycenter") && (R = q, _p((Z = U).barycenter) ? (Z.barycenter = R.barycenter, Z.weight = R.weight) : (Z.barycenter = (Z.barycenter * Z.weight + R.barycenter * R.weight) / (Z.weight + R.weight), Z.weight += R.weight));
+ }
+ var Z, R;
+ });
+ var _ = wCn(k, o);
+ (function(U, q) {
+ Ii(U, function(Z) {
+ var R;
+ Z.vs = ZG(Zs(R = Z.vs).call(R, function(J) {
+ return q[J] ? q[J].vs : J;
+ }));
+ });
+ })(_, v);
+ var T = kCn(_, l);
+ if (A && (T.vs = ZG([A, T.vs, b]), r.predecessors(A).length)) {
+ var L = r.node(r.predecessors(A)[0]), F = r.node(r.predecessors(b)[0]);
+ _1(T, "barycenter") || (T.barycenter = 0, T.weight = 0), T.barycenter = (T.barycenter * T.weight + L.order + F.order) / (T.weight + 2), T.weight += 2;
+ }
+ return T;
+}
+function xCn(r) {
+ var i = USt(r), o = _8t(r, SG(1, i + 1), "inEdges"), l = _8t(r, SG(i - 1, -1, -1), "outEdges"), f = function(_) {
+ var T = {}, L = uL(_.nodes(), function(q) {
+ return !_.children(q).length;
+ }), F = g$(um(L, function(q) {
+ return _.node(q).rank;
+ })), U = um(SG(F + 1), function() {
+ return [];
+ });
+ return Ii(bie(L, function(q) {
+ return _.node(q).rank;
+ }), function q(Z) {
+ if (!_1(T, Z)) {
+ T[Z] = !0;
+ var R = _.node(Z);
+ U[R.rank].push(Z), Ii(_.successors(Z), q);
+ }
+ }), U;
+ }(r);
+ E8t(r, f);
+ for (var g, A = Number.POSITIVE_INFINITY, b = 0, v = 0; v < 4; ++b, ++v) {
+ CCn(b % 2 ? o : l, b % 4 >= 2);
+ var k = vCn(r, f = h2e(r));
+ k < A && (v = 0, g = Sre(f, jxn | Kxn), A = k);
+ }
+ E8t(r, g);
+}
+function _8t(r, i, o) {
+ return um(i, function(l) {
+ return bCn(r, l, o);
+ });
+}
+function CCn(r, i) {
+ var o = new ub();
+ Ii(r, function(l) {
+ var f = l.graph().root, g = JSt(l, f, o, i);
+ Ii(g.vs, function(A, b) {
+ l.node(A).order = b;
+ }), function(A, b, v) {
+ var k, _ = {};
+ Ii(v, function(T) {
+ for (var L, F, U = A.parent(T); U; ) {
+ if ((L = A.parent(U)) ? (F = _[L], _[L] = U) : (F = k, k = U), F && F !== U)
+ return void b.setEdge(F, U);
+ U = L;
+ }
+ });
+ }(l, o, g.vs);
+ });
+}
+function E8t(r, i) {
+ Ii(i, function(o) {
+ Ii(o, function(l, f) {
+ r.node(l).order = f;
+ });
+ });
+}
+function _Cn(r) {
+ var i = function(o) {
+ var l = {}, f = 0;
+ function g(A) {
+ var b = f;
+ Ii(o.children(A), g), l[A] = { low: b, lim: f++ };
+ }
+ return Ii(o.children(), g), l;
+ }(r);
+ Ii(r.graph().dummyChains, function(o) {
+ for (var l = r.node(o), f = l.edgeObj, g = function(T, L, F, U) {
+ var q, Z, R = [], J = [], he = Math.min(L[F].low, L[U].low), Y = Math.max(L[F].lim, L[U].lim);
+ q = F;
+ do
+ q = T.parent(q), R.push(q);
+ while (q && (L[q].low > he || Y > L[q].lim));
+ for (Z = q, q = U; (q = T.parent(q)) !== Z; )
+ J.push(q);
+ return { path: At(R).call(R, TL(J).call(J)), lca: Z };
+ }(r, i, f.v, f.w), A = g.path, b = g.lca, v = 0, k = A[v], _ = !0; o !== f.w; ) {
+ if (l = r.node(o), _) {
+ for (; (k = A[v]) !== b && r.node(k).maxRank < l.rank; )
+ v++;
+ k === b && (_ = !1);
+ }
+ if (!_) {
+ for (; v < A.length - 1 && r.node(k = A[v + 1]).minRank <= l.rank; )
+ v++;
+ k = A[v];
+ }
+ r.setParent(o, k), o = r.successors(o)[0];
+ }
+ });
+}
+function ECn(r, i) {
+ var o = {};
+ return $ie(i, function(l, f) {
+ var g = 0, A = 0, b = l.length, v = cbe(f);
+ return Ii(f, function(k, _) {
+ var T = function(F, U) {
+ if (F.node(U).dummy)
+ return URe(F.predecessors(U), function(q) {
+ return F.node(q).dummy;
+ });
+ }(r, k), L = T ? r.node(T).order : b;
+ (T || k === v) && (Ii(Da(f).call(f, A, _ + 1), function(F) {
+ Ii(r.predecessors(F), function(U) {
+ var q = r.node(U), Z = q.order;
+ !(Z < g || L < Z) || q.dummy && r.node(F).dummy || ZSt(o, U, F);
+ });
+ }), A = _ + 1, g = L);
+ }), f;
+ }), o;
+}
+function ZSt(r, i, o) {
+ if (i > o) {
+ var l = i;
+ i = o, o = l;
+ }
+ var f = r[i];
+ f || (r[i] = f = {}), f[o] = !0;
+}
+function TCn(r, i, o) {
+ if (i > o) {
+ var l = i;
+ i = o, o = l;
+ }
+ return _1(r[i], o);
+}
+function BCn(r, i, o, l, f) {
+ var g, A, b = {}, v = function(T, L, F, U) {
+ var q = new ub(), Z = T.graph(), R = /* @__PURE__ */ function(J, he, Y) {
+ return function(ue, le, be) {
+ var ke, de = ue.node(le), Te = ue.node(be), xe = 0;
+ if (xe += de.width / 2, _1(de, "labelpos"))
+ switch (de.labelpos.toLowerCase()) {
+ case "l":
+ ke = -de.width / 2;
+ break;
+ case "r":
+ ke = de.width / 2;
+ }
+ if (ke && (xe += Y ? ke : -ke), ke = 0, xe += (de.dummy ? he : J) / 2, xe += (Te.dummy ? he : J) / 2, xe += Te.width / 2, _1(Te, "labelpos"))
+ switch (Te.labelpos.toLowerCase()) {
+ case "l":
+ ke = Te.width / 2;
+ break;
+ case "r":
+ ke = -Te.width / 2;
+ }
+ return ke && (xe += Y ? ke : -ke), ke = 0, xe;
+ };
+ }(Z.nodesep, Z.edgesep, U);
+ return Ii(L, function(J) {
+ var he;
+ Ii(J, function(Y) {
+ var ue = F[Y];
+ if (q.setNode(ue), he) {
+ var le = F[he], be = q.edge(le, ue);
+ q.setEdge(le, ue, Math.max(R(T, Y, he), be || 0));
+ }
+ he = Y;
+ });
+ }), q;
+ }(r, i, o, f), k = f ? "borderLeft" : "borderRight";
+ function _(T, L) {
+ for (var F = v.nodes(), U = F.pop(), q = {}; U; )
+ q[U] ? T(U) : (q[U] = !0, F.push(U), F = At(F).call(F, L(U))), U = F.pop();
+ }
+ return _(function(T) {
+ var L;
+ b[T] = _L(L = v.inEdges(T)).call(L, function(F, U) {
+ return Math.max(F, b[U.v] + v.edge(U));
+ }, 0);
+ }, Bo(g = v.predecessors).call(g, v)), _(function(T) {
+ var L, F = _L(L = v.outEdges(T)).call(L, function(q, Z) {
+ return Math.min(q, b[Z.w] - v.edge(Z));
+ }, Number.POSITIVE_INFINITY), U = r.node(T);
+ F !== Number.POSITIVE_INFINITY && U.borderType !== k && (b[T] = Math.max(b[T], F));
+ }, Bo(A = v.successors).call(A, v)), Ii(l, function(T) {
+ b[T] = b[o[T]];
+ }), b;
+}
+function SCn(r, i) {
+ return jRe(hL(i), function(o) {
+ var l = Number.NEGATIVE_INFINITY, f = Number.POSITIVE_INFINITY;
+ return function(g, A) {
+ g == null || $Re(g, PSt(A), A$);
+ }(o, function(g, A) {
+ var b = function(v, k) {
+ return v.node(k).width;
+ }(r, A) / 2;
+ l = Math.max(g + b, l), f = Math.min(g - b, f);
+ }), l - f;
+ });
+}
+function LCn(r) {
+ var i, o = h2e(r), l = INe(ECn(r, o), function(A, b) {
+ var v = {};
+ function k(_, T, L, F, U) {
+ var q;
+ Ii(SG(T, L), function(Z) {
+ q = _[Z], A.node(q).dummy && Ii(A.predecessors(q), function(R) {
+ var J = A.node(R);
+ J.dummy && (J.order < F || J.order > U) && ZSt(v, R, q);
+ });
+ });
+ }
+ return $ie(b, function(_, T) {
+ var L, F = -1, U = 0;
+ return Ii(T, function(q, Z) {
+ if (A.node(q).dummy === "border") {
+ var R = A.predecessors(q);
+ R.length && (L = A.node(R[0]).order, k(T, U, Z, F, L), U = Z, F = L);
+ }
+ k(T, U, T.length, L, _.length);
+ }), T;
+ }), v;
+ }(r, o)), f = {};
+ Ii(["u", "d"], function(A) {
+ var b;
+ i = A === "u" ? o : TL(b = hL(o)).call(b), Ii(["l", "r"], function(v) {
+ var k;
+ v === "r" && (i = um(i, function(F) {
+ var U;
+ return TL(U = hL(F)).call(U);
+ }));
+ var _ = Bo(k = A === "u" ? r.predecessors : r.successors).call(k, r), T = function(F, U, q, Z) {
+ var R = {}, J = {}, he = {};
+ return Ii(U, function(Y) {
+ Ii(Y, function(ue, le) {
+ R[ue] = ue, J[ue] = ue, he[ue] = le;
+ });
+ }), Ii(U, function(Y) {
+ var ue = -1;
+ Ii(Y, function(le) {
+ var be = Z(le);
+ if (be.length) {
+ be = bie(be, function(ie) {
+ return he[ie];
+ });
+ for (var ke = (be.length - 1) / 2, de = Math.floor(ke), Te = Math.ceil(ke); de <= Te; ++de) {
+ var xe = be[de];
+ J[le] === le && ue < he[xe] && !TCn(q, le, xe) && (J[xe] = le, J[le] = R[le] = R[xe], ue = he[xe]);
+ }
+ }
+ });
+ }), { root: R, align: J };
+ }(0, i, l, _), L = BCn(r, i, T.root, T.align, v === "r");
+ v === "r" && (L = ame(L, function(F) {
+ return -F;
+ })), f[A + v] = L;
+ });
+ });
+ var g = SCn(r, f);
+ return function(A, b) {
+ var v = hL(b), k = mie(v), _ = g$(v);
+ Ii(["u", "d"], function(T) {
+ Ii(["l", "r"], function(L) {
+ var F, U = T + L, q = A[U];
+ if (q !== b) {
+ var Z = hL(q);
+ (F = L === "l" ? k - mie(Z) : _ - g$(Z)) && (A[U] = ame(q, function(R) {
+ return R + F;
+ }));
+ }
+ });
+ });
+ }(f, g), function(A, b) {
+ return ame(A.ul, function(v, k) {
+ if (b)
+ return A[b.toLowerCase()][k];
+ var _ = bie(um(A, k));
+ return (_[1] + _[2]) / 2;
+ });
+ }(f, r.graph().align);
+}
+function ICn(r) {
+ (function(i) {
+ var o = h2e(i), l = i.graph().ranksep, f = 0;
+ Ii(o, function(g) {
+ var A = g$(um(g, function(b) {
+ return i.node(b).height;
+ }));
+ Ii(g, function(b) {
+ i.node(b).y = f + A / 2;
+ }), f += A + l;
+ });
+ })(r = $St(r)), Ii(LCn(r), function(i, o) {
+ r.node(o).x = i;
+ });
+}
+function Uie(r, i) {
+ var o = i && i.debugTiming ? sCn : cCn;
+ o("layout", function() {
+ var l = o(" buildLayoutGraph", function() {
+ return function(f) {
+ var g = new ub({ multigraph: !0, compound: !0 }), A = pOe(f.graph());
+ return g.setGraph(INe({}, FCn, gOe(A, MCn), lbe(A, OCn))), Ii(f.nodes(), function(b) {
+ var v = pOe(f.node(b));
+ g.setNode(b, C8n(gOe(v, DCn), NCn)), g.setParent(b, f.parent(b));
+ }), Ii(f.edges(), function(b) {
+ var v = pOe(f.edge(b));
+ g.setEdge(b, INe({}, RCn, gOe(v, PCn), lbe(v, QCn)));
+ }), g;
+ }(r);
+ });
+ o(" runLayout", function() {
+ (function(f, g) {
+ g(" makeSpaceForEdgeLabels", function() {
+ (function(A) {
+ var b = A.graph();
+ b.ranksep /= 2, Ii(A.edges(), function(v) {
+ var k = A.edge(v);
+ k.minlen *= 2, k.labelpos.toLowerCase() !== "c" && (b.rankdir === "TB" || b.rankdir === "BT" ? k.width += k.labeloffset : k.height += k.labeloffset);
+ });
+ })(f);
+ }), g(" removeSelfEdges", function() {
+ (function(A) {
+ Ii(A.edges(), function(b) {
+ if (b.v === b.w) {
+ var v = A.node(b.v);
+ v.selfEdges || (v.selfEdges = []), v.selfEdges.push({ e: b, label: A.edge(b) }), A.removeEdge(b);
+ }
+ });
+ })(f);
+ }), g(" acyclic", function() {
+ oCn(f);
+ }), g(" nestingGraph.run", function() {
+ mCn(f);
+ }), g(" rank", function() {
+ ACn($St(f));
+ }), g(" injectEdgeLabelProxies", function() {
+ (function(A) {
+ Ii(A.edges(), function(b) {
+ var v = A.edge(b);
+ if (v.width && v.height) {
+ var k = A.node(b.v), _ = { rank: (A.node(b.w).rank - k.rank) / 2 + k.rank, e: b };
+ tX(A, "edge-proxy", _, "_ep");
+ }
+ });
+ })(f);
+ }), g(" removeEmptyRanks", function() {
+ (function(A) {
+ var b = mie(um(A.nodes(), function(T) {
+ return A.node(T).rank;
+ })), v = [];
+ Ii(A.nodes(), function(T) {
+ var L = A.node(T).rank - b;
+ v[L] || (v[L] = []), v[L].push(T);
+ });
+ var k = 0, _ = A.graph().nodeRankFactor;
+ Ii(v, function(T, L) {
+ _p(T) && L % _ != 0 ? --k : k && Ii(T, function(F) {
+ A.node(F).rank += k;
+ });
+ });
+ })(f);
+ }), g(" nestingGraph.cleanup", function() {
+ (function(A) {
+ var b = A.graph();
+ A.removeNode(b.nestingRoot), delete b.nestingRoot, Ii(A.edges(), function(v) {
+ A.edge(v).nestingEdge && A.removeEdge(v);
+ });
+ })(f);
+ }), g(" normalizeRanks", function() {
+ (function(A) {
+ var b = mie(um(A.nodes(), function(v) {
+ return A.node(v).rank;
+ }));
+ Ii(A.nodes(), function(v) {
+ var k = A.node(v);
+ _1(k, "rank") && (k.rank -= b);
+ });
+ })(f);
+ }), g(" assignRankMinMax", function() {
+ (function(A) {
+ var b = 0;
+ Ii(A.nodes(), function(v) {
+ var k = A.node(v);
+ k.borderTop && (k.minRank = A.node(k.borderTop).rank, k.maxRank = A.node(k.borderBottom).rank, b = g$(b, k.maxRank));
+ }), A.graph().maxRank = b;
+ })(f);
+ }), g(" removeEdgeLabelProxies", function() {
+ (function(A) {
+ Ii(A.nodes(), function(b) {
+ var v = A.node(b);
+ v.dummy === "edge-proxy" && (A.edge(v.e).labelRank = v.rank, A.removeNode(b));
+ });
+ })(f);
+ }), g(" normalize.run", function() {
+ uCn(f);
+ }), g(" parentDummyChains", function() {
+ _Cn(f);
+ }), g(" addBorderSegments", function() {
+ (function(A) {
+ Ii(A.children(), function b(v) {
+ var k = A.children(v), _ = A.node(v);
+ if (k.length && Ii(k, b), _1(_, "minRank")) {
+ _.borderLeft = [], _.borderRight = [];
+ for (var T = _.minRank, L = _.maxRank + 1; T < L; ++T)
+ w8t(A, "borderLeft", "_bl", v, _, T), w8t(A, "borderRight", "_br", v, _, T);
+ }
+ });
+ })(f);
+ }), g(" order", function() {
+ xCn(f);
+ }), g(" insertSelfEdges", function() {
+ (function(A) {
+ var b = h2e(A);
+ Ii(b, function(v) {
+ var k = 0;
+ Ii(v, function(_, T) {
+ var L = A.node(_);
+ L.order = T + k, Ii(L.selfEdges, function(F) {
+ tX(A, "selfedge", { width: F.label.width, height: F.label.height, rank: L.rank, order: T + ++k, e: F.e, label: F.label }, "_se");
+ }), delete L.selfEdges;
+ });
+ });
+ })(f);
+ }), g(" adjustCoordinateSystem", function() {
+ (function(A) {
+ var b = A.graph().rankdir.toLowerCase();
+ b !== "lr" && b !== "rl" || HSt(A);
+ })(f);
+ }), g(" position", function() {
+ ICn(f);
+ }), g(" positionSelfEdges", function() {
+ (function(A) {
+ Ii(A.nodes(), function(b) {
+ var v = A.node(b);
+ if (v.dummy === "selfedge") {
+ var k = A.node(v.e.v), _ = k.x + k.width / 2, T = k.y, L = v.x - _, F = k.height / 2;
+ A.setEdge(v.e, v.label), A.removeNode(b), v.label.points = [{ x: _ + 2 * L / 3, y: T - F }, { x: _ + 5 * L / 6, y: T - F }, { x: _ + L, y: T }, { x: _ + 5 * L / 6, y: T + F }, { x: _ + 2 * L / 3, y: T + F }], v.label.x = v.x, v.label.y = v.y;
+ }
+ });
+ })(f);
+ }), g(" removeBorderNodes", function() {
+ (function(A) {
+ Ii(A.nodes(), function(b) {
+ if (A.children(b).length) {
+ var v = A.node(b), k = A.node(v.borderTop), _ = A.node(v.borderBottom), T = A.node(cbe(v.borderLeft)), L = A.node(cbe(v.borderRight));
+ v.width = Math.abs(L.x - T.x), v.height = Math.abs(_.y - k.y), v.x = T.x + v.width / 2, v.y = k.y + v.height / 2;
+ }
+ }), Ii(A.nodes(), function(b) {
+ A.node(b).dummy === "border" && A.removeNode(b);
+ });
+ })(f);
+ }), g(" normalize.undo", function() {
+ (function(A) {
+ Ii(A.graph().dummyChains, function(b) {
+ var v, k = A.node(b), _ = k.edgeLabel;
+ for (A.setEdge(k.edgeObj, _); k.dummy; )
+ v = A.successors(b)[0], A.removeNode(b), _.points.push({ x: k.x, y: k.y }), k.dummy === "edge-label" && (_.x = k.x, _.y = k.y, _.width = k.width, _.height = k.height), b = v, k = A.node(b);
+ });
+ })(f);
+ }), g(" fixupEdgeLabelCoords", function() {
+ (function(A) {
+ Ii(A.edges(), function(b) {
+ var v = A.edge(b);
+ if (_1(v, "x"))
+ switch (v.labelpos !== "l" && v.labelpos !== "r" || (v.width -= v.labeloffset), v.labelpos) {
+ case "l":
+ v.x -= v.width / 2 + v.labeloffset;
+ break;
+ case "r":
+ v.x += v.width / 2 + v.labeloffset;
+ }
+ });
+ })(f);
+ }), g(" undoCoordinateSystem", function() {
+ lCn(f);
+ }), g(" translateGraph", function() {
+ (function(A) {
+ var b = Number.POSITIVE_INFINITY, v = 0, k = Number.POSITIVE_INFINITY, _ = 0, T = A.graph(), L = T.marginx || 0, F = T.marginy || 0;
+ function U(q) {
+ var Z = q.x, R = q.y, J = q.width, he = q.height;
+ b = Math.min(b, Z - J / 2), v = Math.max(v, Z + J / 2), k = Math.min(k, R - he / 2), _ = Math.max(_, R + he / 2);
+ }
+ Ii(A.nodes(), function(q) {
+ U(A.node(q));
+ }), Ii(A.edges(), function(q) {
+ var Z = A.edge(q);
+ _1(Z, "x") && U(Z);
+ }), b -= L, k -= F, Ii(A.nodes(), function(q) {
+ var Z = A.node(q);
+ Z.x -= b, Z.y -= k;
+ }), Ii(A.edges(), function(q) {
+ var Z = A.edge(q);
+ Ii(Z.points, function(R) {
+ R.x -= b, R.y -= k;
+ }), _1(Z, "x") && (Z.x -= b), _1(Z, "y") && (Z.y -= k);
+ }), T.width = v - b + L, T.height = _ - k + F;
+ })(f);
+ }), g(" assignNodeIntersects", function() {
+ (function(A) {
+ Ii(A.edges(), function(b) {
+ var v, k, _ = A.edge(b), T = A.node(b.v), L = A.node(b.w);
+ _.points ? (v = _.points[0], k = _.points[_.points.length - 1]) : (_.points = [], v = L, k = T), _.points.unshift(v8t(T, v)), _.points.push(v8t(L, k));
+ });
+ })(f);
+ }), g(" reversePoints", function() {
+ (function(A) {
+ Ii(A.edges(), function(b) {
+ var v, k = A.edge(b);
+ k.reversed && TL(v = k.points).call(v);
+ });
+ })(f);
+ }), g(" acyclic.undo", function() {
+ (function(A) {
+ Ii(A.edges(), function(b) {
+ var v = A.edge(b);
+ if (v.reversed) {
+ A.removeEdge(b);
+ var k = v.forwardName;
+ delete v.reversed, delete v.forwardName, A.setEdge(b.w, b.v, v, k);
+ }
+ });
+ })(f);
+ });
+ })(l, o);
+ }), o(" updateInputGraph", function() {
+ (function(f, g) {
+ Ii(f.nodes(), function(A) {
+ var b = f.node(A), v = g.node(A);
+ b && (b.x = v.x, b.y = v.y, g.children(A).length && (b.width = v.width, b.height = v.height));
+ }), Ii(f.edges(), function(A) {
+ var b = f.edge(A), v = g.edge(A);
+ b.points = v.points, _1(v, "x") && (b.x = v.x, b.y = v.y);
+ }), f.graph().width = g.graph().width, f.graph().height = g.graph().height;
+ })(r, l);
+ });
+ });
+}
+var MCn = ["nodesep", "edgesep", "ranksep", "marginx", "marginy"], FCn = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: "tb" }, OCn = ["acyclicer", "ranker", "rankdir", "align"], DCn = ["width", "height"], NCn = { width: 0, height: 0 }, PCn = ["minlen", "weight", "width", "height", "labeloffset"], RCn = { minlen: 1, weight: 1, width: 0, height: 0, labeloffset: 10, labelpos: "r" }, QCn = ["labelpos"];
+function gOe(r, i) {
+ return ame(lbe(r, i), Number);
+}
+function pOe(r) {
+ var i = {};
+ return Ii(r, function(o, l) {
+ i[l.toLowerCase()] = o;
+ }), i;
+}
+function fL(r) {
+ var i = { options: { directed: r.isDirected(), multigraph: r.isMultigraph(), compound: r.isCompound() }, nodes: $Cn(r), edges: UCn(r) };
+ return _p(r.graph()) || (i.value = Sre(r.graph(), Hxn)), i;
+}
+function $Cn(r) {
+ return um(r.nodes(), function(i) {
+ var o = r.node(i), l = r.parent(i), f = { v: i };
+ return _p(o) || (f.value = o), _p(l) || (f.parent = l), f;
+ });
+}
+function UCn(r) {
+ return um(r.edges(), function(i) {
+ var o = r.edge(i), l = { v: i.v, w: i.w };
+ return _p(i.name) || (l.name = i.name), _p(o) || (l.value = o), l;
+ });
+}
+var HCn = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
+const Cv = [];
+for (let r = 0; r < 256; ++r)
+ Cv.push((r + 256).toString(16).slice(1));
+function jCn(r) {
+ if (!function(l) {
+ return typeof l == "string" && HCn.test(l);
+ }(r))
+ throw TypeError("Invalid UUID");
+ let i;
+ const o = new Uint8Array(16);
+ return o[0] = (i = parseInt(r.slice(0, 8), 16)) >>> 24, o[1] = i >>> 16 & 255, o[2] = i >>> 8 & 255, o[3] = 255 & i, o[4] = (i = parseInt(r.slice(9, 13), 16)) >>> 8, o[5] = 255 & i, o[6] = (i = parseInt(r.slice(14, 18), 16)) >>> 8, o[7] = 255 & i, o[8] = (i = parseInt(r.slice(19, 23), 16)) >>> 8, o[9] = 255 & i, o[10] = (i = parseInt(r.slice(24, 36), 16)) / 1099511627776 & 255, o[11] = i / 4294967296 & 255, o[12] = i >>> 24 & 255, o[13] = i >>> 16 & 255, o[14] = i >>> 8 & 255, o[15] = 255 & i, o;
+}
+function KCn(r, i, o, l) {
+ switch (r) {
+ case 0:
+ return i & o ^ ~i & l;
+ case 1:
+ case 3:
+ return i ^ o ^ l;
+ case 2:
+ return i & o ^ i & l ^ o & l;
+ }
+}
+function mOe(r, i) {
+ return r << i | r >>> 32 - i;
+}
+const zCn = function(r, i, o) {
+ function l(f, g, A, b) {
+ var v;
+ if (typeof f == "string" && (f = function(_) {
+ _ = unescape(encodeURIComponent(_));
+ const T = [];
+ for (let L = 0; L < _.length; ++L)
+ T.push(_.charCodeAt(L));
+ return T;
+ }(f)), typeof g == "string" && (g = jCn(g)), ((v = g) === null || v === void 0 ? void 0 : v.length) !== 16)
+ throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");
+ let k = new Uint8Array(16 + f.length);
+ if (k.set(g), k.set(f, g.length), k = o(k), k[6] = 15 & k[6] | i, k[8] = 63 & k[8] | 128, A) {
+ b = b || 0;
+ for (let _ = 0; _ < 16; ++_)
+ A[b + _] = k[_];
+ return A;
+ }
+ return function(_, T = 0) {
+ return (Cv[_[T + 0]] + Cv[_[T + 1]] + Cv[_[T + 2]] + Cv[_[T + 3]] + "-" + Cv[_[T + 4]] + Cv[_[T + 5]] + "-" + Cv[_[T + 6]] + Cv[_[T + 7]] + "-" + Cv[_[T + 8]] + Cv[_[T + 9]] + "-" + Cv[_[T + 10]] + Cv[_[T + 11]] + Cv[_[T + 12]] + Cv[_[T + 13]] + Cv[_[T + 14]] + Cv[_[T + 15]]).toLowerCase();
+ }(k);
+ }
+ try {
+ l.name = r;
+ } catch {
+ }
+ return l.DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8", l.URL = "6ba7b811-9dad-11d1-80b4-00c04fd430c8", l;
+}("v5", 80, function(r) {
+ const i = [1518500249, 1859775393, 2400959708, 3395469782], o = [1732584193, 4023233417, 2562383102, 271733878, 3285377520];
+ if (typeof r == "string") {
+ const A = unescape(encodeURIComponent(r));
+ r = [];
+ for (let b = 0; b < A.length; ++b)
+ r.push(A.charCodeAt(b));
+ } else
+ Array.isArray(r) || (r = Array.prototype.slice.call(r));
+ r.push(128);
+ const l = r.length / 4 + 2, f = Math.ceil(l / 16), g = new Array(f);
+ for (let A = 0; A < f; ++A) {
+ const b = new Uint32Array(16);
+ for (let v = 0; v < 16; ++v)
+ b[v] = r[64 * A + 4 * v] << 24 | r[64 * A + 4 * v + 1] << 16 | r[64 * A + 4 * v + 2] << 8 | r[64 * A + 4 * v + 3];
+ g[A] = b;
+ }
+ g[f - 1][14] = 8 * (r.length - 1) / Math.pow(2, 32), g[f - 1][14] = Math.floor(g[f - 1][14]), g[f - 1][15] = 8 * (r.length - 1) & 4294967295;
+ for (let A = 0; A < f; ++A) {
+ const b = new Uint32Array(80);
+ for (let F = 0; F < 16; ++F)
+ b[F] = g[A][F];
+ for (let F = 16; F < 80; ++F)
+ b[F] = mOe(b[F - 3] ^ b[F - 8] ^ b[F - 14] ^ b[F - 16], 1);
+ let v = o[0], k = o[1], _ = o[2], T = o[3], L = o[4];
+ for (let F = 0; F < 80; ++F) {
+ const U = Math.floor(F / 20), q = mOe(v, 5) + KCn(U, k, _, T) + L + i[U] + b[F] >>> 0;
+ L = T, T = _, _ = mOe(k, 30) >>> 0, k = v, v = q;
+ }
+ o[0] = o[0] + v >>> 0, o[1] = o[1] + k >>> 0, o[2] = o[2] + _ >>> 0, o[3] = o[3] + T >>> 0, o[4] = o[4] + L >>> 0;
+ }
+ return [o[0] >> 24 & 255, o[0] >> 16 & 255, o[0] >> 8 & 255, 255 & o[0], o[1] >> 24 & 255, o[1] >> 16 & 255, o[1] >> 8 & 255, 255 & o[1], o[2] >> 24 & 255, o[2] >> 16 & 255, o[2] >> 8 & 255, 255 & o[2], o[3] >> 24 & 255, o[3] >> 16 & 255, o[3] >> 8 & 255, 255 & o[3], o[4] >> 24 & 255, o[4] >> 16 & 255, o[4] >> 8 & 255, 255 & o[4]];
+});
+var GCn = zCn;
+function XCn(r, i) {
+ i && r.attr("style", i);
+}
+function eLt(r, i) {
+ var o = r.append("foreignObject").attr("width", "100000"), l = o.append("xhtml:div");
+ l.attr("xmlns", "http://www.w3.org/1999/xhtml");
+ var f = i.label;
+ switch (Yl(f)) {
+ case "function":
+ l.insert(f);
+ break;
+ case "object":
+ l.insert(function() {
+ return f;
+ });
+ break;
+ default:
+ l.html(f);
+ }
+ XCn(l, i.labelStyle), l.style("display", "inline-block"), l.style("white-space", "nowrap");
+ var g = l.node().getBoundingClientRect();
+ return o.attr("width", g.width).attr("height", g.height), o;
+}
+var WCn = su(function(r, i) {
+ var o;
+ r.exports = (o = "day", function(l, f, g) {
+ var A = function(k) {
+ return k.add(4 - k.isoWeekday(), o);
+ }, b = f.prototype;
+ b.isoWeekYear = function() {
+ return A(this).year();
+ }, b.isoWeek = function(k) {
+ if (!this.$utils().u(k))
+ return this.add(7 * (k - this.isoWeek()), o);
+ var _, T, L, F = A(this), U = (_ = this.isoWeekYear(), L = 4 - (T = (this.$u ? g.utc : g)().year(_).startOf("year")).isoWeekday(), T.isoWeekday() > 4 && (L += 7), T.add(L, o));
+ return F.diff(U, "week") + 1;
+ }, b.isoWeekday = function(k) {
+ return this.$utils().u(k) ? this.day() || 7 : this.day(this.day() % 7 ? k : k - 7);
+ };
+ var v = b.startOf;
+ b.startOf = function(k, _) {
+ var T = this.$utils(), L = !!T.u(_) || _;
+ return T.p(k) === "isoweek" ? L ? this.date(this.date() - (this.isoWeekday() - 1)).startOf("day") : this.date(this.date() - 1 - (this.isoWeekday() - 1) + 7).endOf("day") : v.bind(this)(k, _);
+ };
+ });
+}), VCn = su(function(r, i) {
+ r.exports = function() {
+ var o = { 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" }, l = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, f = /\d\d/, g = /\d\d?/, A = /\d*[^-_:/,()\s\d]+/, b = {}, v = function(q) {
+ return (q = +q) + (q > 68 ? 1900 : 2e3);
+ }, k = function(q) {
+ return function(Z) {
+ this[q] = +Z;
+ };
+ }, _ = [/[+-]\d\d:?(\d\d)?|Z/, function(q) {
+ (this.zone || (this.zone = {})).offset = function(Z) {
+ if (!Z || Z === "Z")
+ return 0;
+ var R = Z.match(/([+-]|\d\d)/g), J = 60 * R[1] + (+R[2] || 0);
+ return J === 0 ? 0 : R[0] === "+" ? -J : J;
+ }(q);
+ }], T = function(q) {
+ var Z = b[q];
+ return Z && (Z.indexOf ? Z : Z.s.concat(Z.f));
+ }, L = function(q, Z) {
+ var R, J = b.meridiem;
+ if (J) {
+ for (var he = 1; he <= 24; he += 1)
+ if (q.indexOf(J(he, 0, Z)) > -1) {
+ R = he > 12;
+ break;
+ }
+ } else
+ R = q === (Z ? "pm" : "PM");
+ return R;
+ }, F = { A: [A, function(q) {
+ this.afternoon = L(q, !1);
+ }], a: [A, function(q) {
+ this.afternoon = L(q, !0);
+ }], S: [/\d/, function(q) {
+ this.milliseconds = 100 * +q;
+ }], SS: [f, function(q) {
+ this.milliseconds = 10 * +q;
+ }], SSS: [/\d{3}/, function(q) {
+ this.milliseconds = +q;
+ }], s: [g, k("seconds")], ss: [g, k("seconds")], m: [g, k("minutes")], mm: [g, k("minutes")], H: [g, k("hours")], h: [g, k("hours")], HH: [g, k("hours")], hh: [g, k("hours")], D: [g, k("day")], DD: [f, k("day")], Do: [A, function(q) {
+ var Z = b.ordinal, R = q.match(/\d+/);
+ if (this.day = R[0], Z)
+ for (var J = 1; J <= 31; J += 1)
+ Z(J).replace(/\[|\]/g, "") === q && (this.day = J);
+ }], M: [g, k("month")], MM: [f, k("month")], MMM: [A, function(q) {
+ var Z = T("months"), R = (T("monthsShort") || Z.map(function(J) {
+ return J.slice(0, 3);
+ })).indexOf(q) + 1;
+ if (R < 1)
+ throw new Error();
+ this.month = R % 12 || R;
+ }], MMMM: [A, function(q) {
+ var Z = T("months").indexOf(q) + 1;
+ if (Z < 1)
+ throw new Error();
+ this.month = Z % 12 || Z;
+ }], Y: [/[+-]?\d+/, k("year")], YY: [f, function(q) {
+ this.year = v(q);
+ }], YYYY: [/\d{4}/, k("year")], Z: _, ZZ: _ };
+ function U(q) {
+ var Z, R;
+ Z = q, R = b && b.formats;
+ for (var J = (q = Z.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(de, Te, xe) {
+ var ie = xe && xe.toUpperCase();
+ return Te || R[xe] || o[xe] || R[ie].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(Be, te, Me) {
+ return te || Me.slice(1);
+ });
+ })).match(l), he = J.length, Y = 0; Y < he; Y += 1) {
+ var ue = J[Y], le = F[ue], be = le && le[0], ke = le && le[1];
+ J[Y] = ke ? { regex: be, parser: ke } : ue.replace(/^\[|\]$/g, "");
+ }
+ return function(de) {
+ for (var Te = {}, xe = 0, ie = 0; xe < he; xe += 1) {
+ var Be = J[xe];
+ if (typeof Be == "string")
+ ie += Be.length;
+ else {
+ var te = Be.regex, Me = Be.parser, ve = de.slice(ie), ge = te.exec(ve)[0];
+ Me.call(Te, ge), de = de.replace(ge, "");
+ }
+ }
+ return function(Je) {
+ var ot = Je.afternoon;
+ if (ot !== void 0) {
+ var bt = Je.hours;
+ ot ? bt < 12 && (Je.hours += 12) : bt === 12 && (Je.hours = 0), delete Je.afternoon;
+ }
+ }(Te), Te;
+ };
+ }
+ return function(q, Z, R) {
+ R.p.customParseFormat = !0, q && q.parseTwoDigitYear && (v = q.parseTwoDigitYear);
+ var J = Z.prototype, he = J.parse;
+ J.parse = function(Y) {
+ var ue = Y.date, le = Y.utc, be = Y.args;
+ this.$u = le;
+ var ke = be[1];
+ if (typeof ke == "string") {
+ var de = be[2] === !0, Te = be[3] === !0, xe = de || Te, ie = be[2];
+ Te && (ie = be[2]), b = this.$locale(), !de && ie && (b = R.Ls[ie]), this.$d = function(ve, ge, Je) {
+ try {
+ if (["x", "X"].indexOf(ge) > -1)
+ return new Date((ge === "X" ? 1e3 : 1) * ve);
+ var ot = U(ge)(ve), bt = ot.year, gt = ot.month, je = ot.day, Qe = ot.hours, kt = ot.minutes, Wt = ot.seconds, jt = ot.milliseconds, Zn = ot.zone, Ft = /* @__PURE__ */ new Date(), wn = je || (bt || gt ? 1 : Ft.getDate()), un = bt || Ft.getFullYear(), ln = 0;
+ bt && !gt || (ln = gt > 0 ? gt - 1 : Ft.getMonth());
+ var an = Qe || 0, Ot = kt || 0, $n = Wt || 0, pt = jt || 0;
+ return Zn ? new Date(Date.UTC(un, ln, wn, an, Ot, $n, pt + 60 * Zn.offset * 1e3)) : Je ? new Date(Date.UTC(un, ln, wn, an, Ot, $n, pt)) : new Date(un, ln, wn, an, Ot, $n, pt);
+ } catch {
+ return /* @__PURE__ */ new Date("");
+ }
+ }(ue, ke, le), this.init(), ie && ie !== !0 && (this.$L = this.locale(ie).$L), xe && ue != this.format(ke) && (this.$d = /* @__PURE__ */ new Date("")), b = {};
+ } else if (ke instanceof Array)
+ for (var Be = ke.length, te = 1; te <= Be; te += 1) {
+ be[1] = ke[te - 1];
+ var Me = R.apply(this, be);
+ if (Me.isValid()) {
+ this.$d = Me.$d, this.$L = Me.$L, this.init();
+ break;
+ }
+ te === Be && (this.$d = /* @__PURE__ */ new Date(""));
+ }
+ else
+ he.call(this, Y);
+ };
+ };
+ }();
+}), qCn = su(function(r, i) {
+ r.exports = function(o, l) {
+ var f = l.prototype, g = f.format;
+ f.format = function(A) {
+ var b = this, v = this.$locale();
+ if (!this.isValid())
+ return g.bind(this)(A);
+ var k = this.$utils(), _ = (A || "YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g, function(T) {
+ switch (T) {
+ case "Q":
+ return Math.ceil((b.$M + 1) / 3);
+ case "Do":
+ return v.ordinal(b.$D);
+ case "gggg":
+ return b.weekYear();
+ case "GGGG":
+ return b.isoWeekYear();
+ case "wo":
+ return v.ordinal(b.week(), "W");
+ case "w":
+ case "ww":
+ return k.s(b.week(), T === "w" ? 1 : 2, "0");
+ case "W":
+ case "WW":
+ return k.s(b.isoWeek(), T === "W" ? 1 : 2, "0");
+ case "k":
+ case "kk":
+ return k.s(String(b.$H === 0 ? 24 : b.$H), T === "k" ? 1 : 2, "0");
+ case "X":
+ return Math.floor(b.$d.getTime() / 1e3);
+ case "x":
+ return b.$d.getTime();
+ case "z":
+ return "[" + b.offsetName() + "]";
+ case "zzz":
+ return "[" + b.offsetName("long") + "]";
+ default:
+ return T;
+ }
+ });
+ return g.bind(this)(_);
+ };
+ };
+});
+const GS = { trace: 0, debug: 1, info: 2, warn: 3, error: 4, fatal: 5 }, _t = { trace: (...r) => {
+}, debug: (...r) => {
+}, info: (...r) => {
+}, warn: (...r) => {
+}, error: (...r) => {
+}, fatal: (...r) => {
+} }, WRe = function(r = "fatal") {
+ let i = GS.fatal;
+ typeof r == "string" ? (r = r.toLowerCase()) in GS && (i = GS[r]) : typeof r == "number" && (i = r), _t.trace = () => {
+ }, _t.debug = () => {
+ }, _t.info = () => {
+ }, _t.warn = () => {
+ }, _t.error = () => {
+ }, _t.fatal = () => {
+ }, i <= GS.fatal && (_t.fatal = console.error ? console.error.bind(console, Y8("FATAL"), "color: orange") : console.log.bind(console, "\x1B[35m", Y8("FATAL"))), i <= GS.error && (_t.error = console.error ? console.error.bind(console, Y8("ERROR"), "color: orange") : console.log.bind(console, "\x1B[31m", Y8("ERROR"))), i <= GS.warn && (_t.warn = console.warn ? console.warn.bind(console, Y8("WARN"), "color: orange") : console.log.bind(console, "\x1B[33m", Y8("WARN"))), i <= GS.info && (_t.info = console.info ? console.info.bind(console, Y8("INFO"), "color: lightblue") : console.log.bind(console, "\x1B[34m", Y8("INFO"))), i <= GS.debug && (_t.debug = console.debug ? console.debug.bind(console, Y8("DEBUG"), "color: lightgreen") : console.log.bind(console, "\x1B[32m", Y8("DEBUG"))), i <= GS.trace && (_t.trace = console.debug ? console.debug.bind(console, Y8("TRACE"), "color: lightgreen") : console.log.bind(console, "\x1B[32m", Y8("TRACE")));
+}, Y8 = (r) => `%c${b5().format("ss.SSS")} : ${r} : `, tLt = (r) => hie.sanitize(r), T8t = (r, i) => {
+ var o;
+ if (((o = i.flowchart) == null ? void 0 : o.htmlLabels) !== !1) {
+ const l = i.securityLevel;
+ l === "antiscript" || l === "strict" ? r = tLt(r) : l !== "loose" && (r = (r = (r = nLt(r)).replace(//g, ">")).replace(/=/g, "="), r = YCn(r));
+ }
+ return r;
+}, yk = (r, i) => r && (r = i.dompurifyConfig ? hie.sanitize(T8t(r, i), i.dompurifyConfig).toString() : hie.sanitize(T8t(r, i), { FORBID_TAGS: ["style"] }).toString()), ome = /
/gi, YCn = (r) => r.replace(/#br#/g, "
"), nLt = (r) => r.replace(ome, "#br#"), Ev = (r) => r !== !1 && !["false", "null", "0"].includes(String(r).trim().toLowerCase()), CO = function(r) {
+ let i = r;
+ if (r.split("~").length - 1 >= 2) {
+ let o = i;
+ do
+ i = o, o = i.replace(/~([^\s,:;]+)~/, "<$1>");
+ while (o != i);
+ return CO(o);
+ }
+ return i;
+}, El = { getRows: (r) => r ? nLt(r).replace(/\\n/g, "#br#").split("#br#") : [""], sanitizeText: yk, sanitizeTextOrArray: (r, i) => typeof r == "string" ? yk(r, i) : r.flat().map((o) => yk(o, i)), hasBreaks: (r) => ome.test(r), splitBreaks: (r) => r.split(ome), lineBreakRegex: ome, removeScript: tLt, getUrl: (r) => {
+ let i = "";
+ return r && (i = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, i = i.replaceAll(/\(/g, "\\("), i = i.replaceAll(/\)/g, "\\)")), i;
+}, evaluate: Ev }, v3 = (r, i) => oi(r, i ? { s: -40, l: 10 } : { s: -40, l: -10 }), sme = "#ffffff", cme = "#f2f2f2";
+class JCn {
+ constructor() {
+ this.primaryColor = "#eee", this.contrast = "#707070", this.secondaryColor = Fc(this.contrast, 55), this.background = "#ffffff", this.tertiaryColor = oi(this.primaryColor, { h: -160 }), this.primaryBorderColor = v3(this.primaryColor, this.darkMode), this.secondaryBorderColor = v3(this.secondaryColor, this.darkMode), this.tertiaryBorderColor = v3(this.tertiaryColor, this.darkMode), this.primaryTextColor = zo(this.primaryColor), this.secondaryTextColor = zo(this.secondaryColor), this.tertiaryTextColor = zo(this.tertiaryColor), this.lineColor = zo(this.background), this.textColor = zo(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 = Fc(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 i = 0; i < this.THEME_COLOR_LIMIT; i++)
+ this["cScaleInv" + i] = this["cScaleInv" + i] || zo(this["cScale" + i]);
+ for (let i = 0; i < this.THEME_COLOR_LIMIT; i++)
+ this.darkMode ? this["cScalePeer" + i] = this["cScalePeer" + i] || Fc(this["cScale" + i], 10) : this["cScalePeer" + i] = this["cScalePeer" + i] || ml(this["cScale" + i], 10);
+ this.scaleLabelColor = this.scaleLabelColor || (this.darkMode ? "black" : this.labelTextColor), this.cScaleLabel0 = this.cScaleLabel0 || this.cScale1, this.cScaleLabel2 = this.cScaleLabel2 || this.cScale1;
+ for (let i = 0; i < this.THEME_COLOR_LIMIT; i++)
+ this["cScaleLabel" + i] = this["cScaleLabel" + i] || this.scaleLabelColor;
+ for (let i = 0; i < 5; i++)
+ this["surface" + i] = this["surface" + i] || oi(this.mainBkg, { l: -(5 + 5 * i) }), this["surfacePeer" + i] = this["surfacePeer" + i] || oi(this.mainBkg, { l: -(8 + 5 * i) });
+ 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 = Fc(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 = Fc(this.contrast, 30), this.sectionBkgColor2 = Fc(this.contrast, 30), this.taskBorderColor = ml(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 = Fc(this.border1, 30), this.doneTaskBkgColor = this.done, this.doneTaskBorderColor = this.lineColor, this.critBkgColor = this.critical, this.critBorderColor = ml(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 = oi(this.primaryColor, { h: 64 }), this.fillType3 = oi(this.secondaryColor, { h: 64 }), this.fillType4 = oi(this.primaryColor, { h: -64 }), this.fillType5 = oi(this.secondaryColor, { h: -64 }), this.fillType6 = oi(this.primaryColor, { h: 128 }), this.fillType7 = oi(this.secondaryColor, { h: 128 });
+ for (let i = 0; i < this.THEME_COLOR_LIMIT; i++)
+ this["pie" + i] = this["cScale" + i];
+ 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 = ml(this.pie1, 25) || this.primaryColor, this.git1 = this.pie2 || this.secondaryColor, this.git2 = this.pie3 || this.tertiaryColor, this.git3 = this.pie4 || oi(this.primaryColor, { h: -30 }), this.git4 = this.pie5 || oi(this.primaryColor, { h: -60 }), this.git5 = this.pie6 || oi(this.primaryColor, { h: -90 }), this.git6 = this.pie7 || oi(this.primaryColor, { h: 60 }), this.git7 = this.pie8 || oi(this.primaryColor, { h: 120 }), this.gitInv0 = this.gitInv0 || zo(this.git0), this.gitInv1 = this.gitInv1 || zo(this.git1), this.gitInv2 = this.gitInv2 || zo(this.git2), this.gitInv3 = this.gitInv3 || zo(this.git3), this.gitInv4 = this.gitInv4 || zo(this.git4), this.gitInv5 = this.gitInv5 || zo(this.git5), this.gitInv6 = this.gitInv6 || zo(this.git6), this.gitInv7 = this.gitInv7 || zo(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 || sme, this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || cme;
+ }
+ calculate(i) {
+ if (typeof i != "object")
+ return void this.updateColors();
+ const o = Object.keys(i);
+ o.forEach((l) => {
+ this[l] = i[l];
+ }), this.updateColors(), o.forEach((l) => {
+ this[l] = i[l];
+ });
+ }
+}
+const oL = { base: { getThemeVariables: (r) => {
+ const i = new class {
+ constructor() {
+ this.background = "#f4f4f4", 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 || oi(this.primaryColor, { h: -120 }), this.tertiaryColor = this.tertiaryColor || oi(this.primaryColor, { h: 180, l: 5 }), this.primaryBorderColor = this.primaryBorderColor || v3(this.primaryColor, this.darkMode), this.secondaryBorderColor = this.secondaryBorderColor || v3(this.secondaryColor, this.darkMode), this.tertiaryBorderColor = this.tertiaryBorderColor || v3(this.tertiaryColor, this.darkMode), this.noteBorderColor = this.noteBorderColor || v3(this.noteBkgColor, this.darkMode), this.noteBkgColor = this.noteBkgColor || "#fff5ad", this.noteTextColor = this.noteTextColor || "#333", this.secondaryTextColor = this.secondaryTextColor || zo(this.secondaryColor), this.tertiaryTextColor = this.tertiaryTextColor || zo(this.tertiaryColor), this.lineColor = this.lineColor || zo(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 ? ml(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 || ml(this.secondaryColor, 10), this.activationBkgColor = this.activationBkgColor || this.secondaryColor, this.sequenceNumberColor = this.sequenceNumberColor || zo(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 || Fc(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 || oi(this.primaryColor, { h: 30 }), this.cScale4 = this.cScale4 || oi(this.primaryColor, { h: 60 }), this.cScale5 = this.cScale5 || oi(this.primaryColor, { h: 90 }), this.cScale6 = this.cScale6 || oi(this.primaryColor, { h: 120 }), this.cScale7 = this.cScale7 || oi(this.primaryColor, { h: 150 }), this.cScale8 = this.cScale8 || oi(this.primaryColor, { h: 210, l: 150 }), this.cScale9 = this.cScale9 || oi(this.primaryColor, { h: 270 }), this.cScale10 = this.cScale10 || oi(this.primaryColor, { h: 300 }), this.cScale11 = this.cScale11 || oi(this.primaryColor, { h: 330 }), this.darkMode)
+ for (let l = 0; l < this.THEME_COLOR_LIMIT; l++)
+ this["cScale" + l] = ml(this["cScale" + l], 75);
+ else
+ for (let l = 0; l < this.THEME_COLOR_LIMIT; l++)
+ this["cScale" + l] = ml(this["cScale" + l], 25);
+ for (let l = 0; l < this.THEME_COLOR_LIMIT; l++)
+ this["cScaleInv" + l] = this["cScaleInv" + l] || zo(this["cScale" + l]);
+ for (let l = 0; l < this.THEME_COLOR_LIMIT; l++)
+ this.darkMode ? this["cScalePeer" + l] = this["cScalePeer" + l] || Fc(this["cScale" + l], 10) : this["cScalePeer" + l] = this["cScalePeer" + l] || ml(this["cScale" + l], 10);
+ this.scaleLabelColor = this.scaleLabelColor || this.labelTextColor;
+ for (let l = 0; l < this.THEME_COLOR_LIMIT; l++)
+ this["cScaleLabel" + l] = this["cScaleLabel" + l] || this.scaleLabelColor;
+ const o = this.darkMode ? -4 : -1;
+ for (let l = 0; l < 5; l++)
+ this["surface" + l] = this["surface" + l] || oi(this.mainBkg, { h: 180, s: -15, l: o * (5 + 3 * l) }), this["surfacePeer" + l] = this["surfacePeer" + l] || oi(this.mainBkg, { h: 180, s: -15, l: o * (8 + 3 * l) });
+ this.classText = this.classText || this.textColor, this.fillType0 = this.fillType0 || this.primaryColor, this.fillType1 = this.fillType1 || this.secondaryColor, this.fillType2 = this.fillType2 || oi(this.primaryColor, { h: 64 }), this.fillType3 = this.fillType3 || oi(this.secondaryColor, { h: 64 }), this.fillType4 = this.fillType4 || oi(this.primaryColor, { h: -64 }), this.fillType5 = this.fillType5 || oi(this.secondaryColor, { h: -64 }), this.fillType6 = this.fillType6 || oi(this.primaryColor, { h: 128 }), this.fillType7 = this.fillType7 || oi(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 || oi(this.primaryColor, { l: -10 }), this.pie5 = this.pie5 || oi(this.secondaryColor, { l: -10 }), this.pie6 = this.pie6 || oi(this.tertiaryColor, { l: -10 }), this.pie7 = this.pie7 || oi(this.primaryColor, { h: 60, l: -10 }), this.pie8 = this.pie8 || oi(this.primaryColor, { h: -60, l: -10 }), this.pie9 = this.pie9 || oi(this.primaryColor, { h: 120, l: 0 }), this.pie10 = this.pie10 || oi(this.primaryColor, { h: 60, l: -20 }), this.pie11 = this.pie11 || oi(this.primaryColor, { h: -60, l: -20 }), this.pie12 = this.pie12 || oi(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 ? ml(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 || oi(this.primaryColor, { h: -30 }), this.git4 = this.git4 || oi(this.primaryColor, { h: -60 }), this.git5 = this.git5 || oi(this.primaryColor, { h: -90 }), this.git6 = this.git6 || oi(this.primaryColor, { h: 60 }), this.git7 = this.git7 || oi(this.primaryColor, { h: 120 }), this.darkMode ? (this.git0 = Fc(this.git0, 25), this.git1 = Fc(this.git1, 25), this.git2 = Fc(this.git2, 25), this.git3 = Fc(this.git3, 25), this.git4 = Fc(this.git4, 25), this.git5 = Fc(this.git5, 25), this.git6 = Fc(this.git6, 25), this.git7 = Fc(this.git7, 25)) : (this.git0 = ml(this.git0, 25), this.git1 = ml(this.git1, 25), this.git2 = ml(this.git2, 25), this.git3 = ml(this.git3, 25), this.git4 = ml(this.git4, 25), this.git5 = ml(this.git5, 25), this.git6 = ml(this.git6, 25), this.git7 = ml(this.git7, 25)), this.gitInv0 = this.gitInv0 || zo(this.git0), this.gitInv1 = this.gitInv1 || zo(this.git1), this.gitInv2 = this.gitInv2 || zo(this.git2), this.gitInv3 = this.gitInv3 || zo(this.git3), this.gitInv4 = this.gitInv4 || zo(this.git4), this.gitInv5 = this.gitInv5 || zo(this.git5), this.gitInv6 = this.gitInv6 || zo(this.git6), this.gitInv7 = this.gitInv7 || zo(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 || sme, this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || cme;
+ }
+ calculate(o) {
+ if (typeof o != "object")
+ return void this.updateColors();
+ const l = Object.keys(o);
+ l.forEach((f) => {
+ this[f] = o[f];
+ }), this.updateColors(), l.forEach((f) => {
+ this[f] = o[f];
+ });
+ }
+ }();
+ return i.calculate(r), i;
+} }, dark: { getThemeVariables: (r) => {
+ const i = new class {
+ constructor() {
+ this.background = "#333", this.primaryColor = "#1f2020", this.secondaryColor = Fc(this.primaryColor, 16), this.tertiaryColor = oi(this.primaryColor, { h: -160 }), this.primaryBorderColor = zo(this.background), this.secondaryBorderColor = v3(this.secondaryColor, this.darkMode), this.tertiaryBorderColor = v3(this.tertiaryColor, this.darkMode), this.primaryTextColor = zo(this.primaryColor), this.secondaryTextColor = zo(this.secondaryColor), this.tertiaryTextColor = zo(this.tertiaryColor), this.lineColor = zo(this.background), this.textColor = zo(this.background), this.mainBkg = "#1f2020", this.secondBkg = "calculated", this.mainContrastColor = "lightgrey", this.darkTextColor = Fc(zo("#323D47"), 10), this.lineColor = "calculated", this.border1 = "#81B1DB", this.border2 = sre(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 = ml("#EAE8D9", 30), this.altSectionBkgColor = "calculated", this.sectionBkgColor2 = "#EAE8D9", this.taskBorderColor = sre(255, 255, 255, 70), this.taskBkgColor = "calculated", this.taskTextColor = "calculated", this.taskTextLightColor = "calculated", this.taskTextOutsideColor = "calculated", this.taskTextClickableColor = "#003163", this.activeTaskBorderColor = sre(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 = Fc(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 = Fc(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 = Fc(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 = oi(this.primaryColor, { h: 64 }), this.fillType3 = oi(this.secondaryColor, { h: 64 }), this.fillType4 = oi(this.primaryColor, { h: -64 }), this.fillType5 = oi(this.secondaryColor, { h: -64 }), this.fillType6 = oi(this.primaryColor, { h: 128 }), this.fillType7 = oi(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 || oi(this.primaryColor, { h: 30 }), this.cScale4 = this.cScale4 || oi(this.primaryColor, { h: 60 }), this.cScale5 = this.cScale5 || oi(this.primaryColor, { h: 90 }), this.cScale6 = this.cScale6 || oi(this.primaryColor, { h: 120 }), this.cScale7 = this.cScale7 || oi(this.primaryColor, { h: 150 }), this.cScale8 = this.cScale8 || oi(this.primaryColor, { h: 210 }), this.cScale9 = this.cScale9 || oi(this.primaryColor, { h: 270 }), this.cScale10 = this.cScale10 || oi(this.primaryColor, { h: 300 }), this.cScale11 = this.cScale11 || oi(this.primaryColor, { h: 330 });
+ for (let o = 0; o < this.THEME_COLOR_LIMIT; o++)
+ this["cScaleInv" + o] = this["cScaleInv" + o] || zo(this["cScale" + o]);
+ for (let o = 0; o < this.THEME_COLOR_LIMIT; o++)
+ this["cScalePeer" + o] = this["cScalePeer" + o] || Fc(this["cScale" + o], 10);
+ for (let o = 0; o < 5; o++)
+ this["surface" + o] = this["surface" + o] || oi(this.mainBkg, { h: 30, s: -30, l: -(4 * o - 10) }), this["surfacePeer" + o] = this["surfacePeer" + o] || oi(this.mainBkg, { h: 30, s: -30, l: -(4 * o - 7) });
+ this.scaleLabelColor = this.scaleLabelColor || (this.darkMode ? "black" : this.labelTextColor);
+ for (let o = 0; o < this.THEME_COLOR_LIMIT; o++)
+ this["cScaleLabel" + o] = this["cScaleLabel" + o] || this.scaleLabelColor;
+ for (let o = 0; o < this.THEME_COLOR_LIMIT; o++)
+ this["pie" + o] = this["cScale" + o];
+ 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 ? ml(this.secondaryColor, 30) : this.secondaryColor), this.relationLabelColor = this.relationLabelColor || this.actorTextColor, this.git0 = Fc(this.secondaryColor, 20), this.git1 = Fc(this.pie2 || this.secondaryColor, 20), this.git2 = Fc(this.pie3 || this.tertiaryColor, 20), this.git3 = Fc(this.pie4 || oi(this.primaryColor, { h: -30 }), 20), this.git4 = Fc(this.pie5 || oi(this.primaryColor, { h: -60 }), 20), this.git5 = Fc(this.pie6 || oi(this.primaryColor, { h: -90 }), 10), this.git6 = Fc(this.pie7 || oi(this.primaryColor, { h: 60 }), 10), this.git7 = Fc(this.pie8 || oi(this.primaryColor, { h: 120 }), 20), this.gitInv0 = this.gitInv0 || zo(this.git0), this.gitInv1 = this.gitInv1 || zo(this.git1), this.gitInv2 = this.gitInv2 || zo(this.git2), this.gitInv3 = this.gitInv3 || zo(this.git3), this.gitInv4 = this.gitInv4 || zo(this.git4), this.gitInv5 = this.gitInv5 || zo(this.git5), this.gitInv6 = this.gitInv6 || zo(this.git6), this.gitInv7 = this.gitInv7 || zo(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 || Fc(this.background, 12), this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || Fc(this.background, 2);
+ }
+ calculate(o) {
+ if (typeof o != "object")
+ return void this.updateColors();
+ const l = Object.keys(o);
+ l.forEach((f) => {
+ this[f] = o[f];
+ }), this.updateColors(), l.forEach((f) => {
+ this[f] = o[f];
+ });
+ }
+ }();
+ return i.calculate(r), i;
+} }, default: { getThemeVariables: (r) => {
+ const i = new class {
+ constructor() {
+ this.background = "#f4f4f4", this.primaryColor = "#ECECFF", this.secondaryColor = oi(this.primaryColor, { h: 120 }), this.secondaryColor = "#ffffde", this.tertiaryColor = oi(this.primaryColor, { h: -160 }), this.primaryBorderColor = v3(this.primaryColor, this.darkMode), this.secondaryBorderColor = v3(this.secondaryColor, this.darkMode), this.tertiaryBorderColor = v3(this.tertiaryColor, this.darkMode), this.primaryTextColor = zo(this.primaryColor), this.secondaryTextColor = zo(this.secondaryColor), this.tertiaryTextColor = zo(this.tertiaryColor), this.lineColor = zo(this.background), this.textColor = zo(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 = sre(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 || oi(this.primaryColor, { h: 30 }), this.cScale4 = this.cScale4 || oi(this.primaryColor, { h: 60 }), this.cScale5 = this.cScale5 || oi(this.primaryColor, { h: 90 }), this.cScale6 = this.cScale6 || oi(this.primaryColor, { h: 120 }), this.cScale7 = this.cScale7 || oi(this.primaryColor, { h: 150 }), this.cScale8 = this.cScale8 || oi(this.primaryColor, { h: 210 }), this.cScale9 = this.cScale9 || oi(this.primaryColor, { h: 270 }), this.cScale10 = this.cScale10 || oi(this.primaryColor, { h: 300 }), this.cScale11 = this.cScale11 || oi(this.primaryColor, { h: 330 }), this.cScalePeer1 = this.cScalePeer1 || ml(this.secondaryColor, 45), this.cScalePeer2 = this.cScalePeer2 || ml(this.tertiaryColor, 40);
+ for (let o = 0; o < this.THEME_COLOR_LIMIT; o++)
+ this["cScale" + o] = ml(this["cScale" + o], 10), this["cScalePeer" + o] = this["cScalePeer" + o] || ml(this["cScale" + o], 25);
+ for (let o = 0; o < this.THEME_COLOR_LIMIT; o++)
+ this["cScaleInv" + o] = this["cScaleInv" + o] || oi(this["cScale" + o], { h: 180 });
+ for (let o = 0; o < 5; o++)
+ this["surface" + o] = this["surface" + o] || oi(this.mainBkg, { h: 30, l: -(5 + 5 * o) }), this["surfacePeer" + o] = this["surfacePeer" + o] || oi(this.mainBkg, { h: 30, l: -(7 + 5 * o) });
+ if (this.scaleLabelColor = this.scaleLabelColor !== "calculated" && this.scaleLabelColor ? this.scaleLabelColor : this.labelTextColor, this.labelTextColor !== "calculated") {
+ this.cScaleLabel0 = this.cScaleLabel0 || zo(this.labelTextColor), this.cScaleLabel3 = this.cScaleLabel3 || zo(this.labelTextColor);
+ for (let o = 0; o < this.THEME_COLOR_LIMIT; o++)
+ this["cScaleLabel" + o] = this["cScaleLabel" + o] || 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 = Fc(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 = oi(this.primaryColor, { h: 64 }), this.fillType3 = oi(this.secondaryColor, { h: 64 }), this.fillType4 = oi(this.primaryColor, { h: -64 }), this.fillType5 = oi(this.secondaryColor, { h: -64 }), this.fillType6 = oi(this.primaryColor, { h: 128 }), this.fillType7 = oi(this.secondaryColor, { h: 128 }), this.pie1 = this.pie1 || this.primaryColor, this.pie2 = this.pie2 || this.secondaryColor, this.pie3 = this.pie3 || oi(this.tertiaryColor, { l: -40 }), this.pie4 = this.pie4 || oi(this.primaryColor, { l: -10 }), this.pie5 = this.pie5 || oi(this.secondaryColor, { l: -30 }), this.pie6 = this.pie6 || oi(this.tertiaryColor, { l: -20 }), this.pie7 = this.pie7 || oi(this.primaryColor, { h: 60, l: -20 }), this.pie8 = this.pie8 || oi(this.primaryColor, { h: -60, l: -40 }), this.pie9 = this.pie9 || oi(this.primaryColor, { h: 120, l: -40 }), this.pie10 = this.pie10 || oi(this.primaryColor, { h: 60, l: -40 }), this.pie11 = this.pie11 || oi(this.primaryColor, { h: -90, l: -40 }), this.pie12 = this.pie12 || oi(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 || oi(this.primaryColor, { h: -30 }), this.git4 = this.git4 || oi(this.primaryColor, { h: -60 }), this.git5 = this.git5 || oi(this.primaryColor, { h: -90 }), this.git6 = this.git6 || oi(this.primaryColor, { h: 60 }), this.git7 = this.git7 || oi(this.primaryColor, { h: 120 }), this.darkMode ? (this.git0 = Fc(this.git0, 25), this.git1 = Fc(this.git1, 25), this.git2 = Fc(this.git2, 25), this.git3 = Fc(this.git3, 25), this.git4 = Fc(this.git4, 25), this.git5 = Fc(this.git5, 25), this.git6 = Fc(this.git6, 25), this.git7 = Fc(this.git7, 25)) : (this.git0 = ml(this.git0, 25), this.git1 = ml(this.git1, 25), this.git2 = ml(this.git2, 25), this.git3 = ml(this.git3, 25), this.git4 = ml(this.git4, 25), this.git5 = ml(this.git5, 25), this.git6 = ml(this.git6, 25), this.git7 = ml(this.git7, 25)), this.gitInv0 = this.gitInv0 || ml(zo(this.git0), 25), this.gitInv1 = this.gitInv1 || zo(this.git1), this.gitInv2 = this.gitInv2 || zo(this.git2), this.gitInv3 = this.gitInv3 || zo(this.git3), this.gitInv4 = this.gitInv4 || zo(this.git4), this.gitInv5 = this.gitInv5 || zo(this.git5), this.gitInv6 = this.gitInv6 || zo(this.git6), this.gitInv7 = this.gitInv7 || zo(this.git7), this.gitBranchLabel0 = this.gitBranchLabel0 || zo(this.labelTextColor), this.gitBranchLabel1 = this.gitBranchLabel1 || this.labelTextColor, this.gitBranchLabel2 = this.gitBranchLabel2 || this.labelTextColor, this.gitBranchLabel3 = this.gitBranchLabel3 || zo(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 || sme, this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || cme;
+ }
+ calculate(o) {
+ if (typeof o != "object")
+ return void this.updateColors();
+ const l = Object.keys(o);
+ l.forEach((f) => {
+ this[f] = o[f];
+ }), this.updateColors(), l.forEach((f) => {
+ this[f] = o[f];
+ });
+ }
+ }();
+ return i.calculate(r), i;
+} }, forest: { getThemeVariables: (r) => {
+ const i = new class {
+ 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 = Fc("#cde498", 10), this.primaryBorderColor = v3(this.primaryColor, this.darkMode), this.secondaryBorderColor = v3(this.secondaryColor, this.darkMode), this.tertiaryBorderColor = v3(this.tertiaryColor, this.darkMode), this.primaryTextColor = zo(this.primaryColor), this.secondaryTextColor = zo(this.secondaryColor), this.tertiaryTextColor = zo(this.primaryColor), this.lineColor = zo(this.background), this.textColor = zo(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 || oi(this.primaryColor, { h: 30 }), this.cScale4 = this.cScale4 || oi(this.primaryColor, { h: 60 }), this.cScale5 = this.cScale5 || oi(this.primaryColor, { h: 90 }), this.cScale6 = this.cScale6 || oi(this.primaryColor, { h: 120 }), this.cScale7 = this.cScale7 || oi(this.primaryColor, { h: 150 }), this.cScale8 = this.cScale8 || oi(this.primaryColor, { h: 210 }), this.cScale9 = this.cScale9 || oi(this.primaryColor, { h: 270 }), this.cScale10 = this.cScale10 || oi(this.primaryColor, { h: 300 }), this.cScale11 = this.cScale11 || oi(this.primaryColor, { h: 330 }), this.cScalePeer1 = this.cScalePeer1 || ml(this.secondaryColor, 45), this.cScalePeer2 = this.cScalePeer2 || ml(this.tertiaryColor, 40);
+ for (let o = 0; o < this.THEME_COLOR_LIMIT; o++)
+ this["cScale" + o] = ml(this["cScale" + o], 10), this["cScalePeer" + o] = this["cScalePeer" + o] || ml(this["cScale" + o], 25);
+ for (let o = 0; o < this.THEME_COLOR_LIMIT; o++)
+ this["cScaleInv" + o] = this["cScaleInv" + o] || oi(this["cScale" + o], { h: 180 });
+ this.scaleLabelColor = this.scaleLabelColor !== "calculated" && this.scaleLabelColor ? this.scaleLabelColor : this.labelTextColor;
+ for (let o = 0; o < this.THEME_COLOR_LIMIT; o++)
+ this["cScaleLabel" + o] = this["cScaleLabel" + o] || this.scaleLabelColor;
+ for (let o = 0; o < 5; o++)
+ this["surface" + o] = this["surface" + o] || oi(this.mainBkg, { h: 30, s: -30, l: -(5 + 5 * o) }), this["surfacePeer" + o] = this["surfacePeer" + o] || oi(this.mainBkg, { h: 30, s: -30, l: -(8 + 5 * o) });
+ this.nodeBkg = this.mainBkg, this.nodeBorder = this.border1, this.clusterBkg = this.secondBkg, this.clusterBorder = this.border2, this.defaultLinkColor = this.lineColor, this.actorBorder = ml(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 = oi(this.primaryColor, { h: 64 }), this.fillType3 = oi(this.secondaryColor, { h: 64 }), this.fillType4 = oi(this.primaryColor, { h: -64 }), this.fillType5 = oi(this.secondaryColor, { h: -64 }), this.fillType6 = oi(this.primaryColor, { h: 128 }), this.fillType7 = oi(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 || oi(this.primaryColor, { l: -30 }), this.pie5 = this.pie5 || oi(this.secondaryColor, { l: -30 }), this.pie6 = this.pie6 || oi(this.tertiaryColor, { h: 40, l: -40 }), this.pie7 = this.pie7 || oi(this.primaryColor, { h: 60, l: -10 }), this.pie8 = this.pie8 || oi(this.primaryColor, { h: -60, l: -10 }), this.pie9 = this.pie9 || oi(this.primaryColor, { h: 120, l: 0 }), this.pie10 = this.pie10 || oi(this.primaryColor, { h: 60, l: -50 }), this.pie11 = this.pie11 || oi(this.primaryColor, { h: -60, l: -50 }), this.pie12 = this.pie12 || oi(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 || oi(this.primaryColor, { h: -30 }), this.git4 = this.git4 || oi(this.primaryColor, { h: -60 }), this.git5 = this.git5 || oi(this.primaryColor, { h: -90 }), this.git6 = this.git6 || oi(this.primaryColor, { h: 60 }), this.git7 = this.git7 || oi(this.primaryColor, { h: 120 }), this.darkMode ? (this.git0 = Fc(this.git0, 25), this.git1 = Fc(this.git1, 25), this.git2 = Fc(this.git2, 25), this.git3 = Fc(this.git3, 25), this.git4 = Fc(this.git4, 25), this.git5 = Fc(this.git5, 25), this.git6 = Fc(this.git6, 25), this.git7 = Fc(this.git7, 25)) : (this.git0 = ml(this.git0, 25), this.git1 = ml(this.git1, 25), this.git2 = ml(this.git2, 25), this.git3 = ml(this.git3, 25), this.git4 = ml(this.git4, 25), this.git5 = ml(this.git5, 25), this.git6 = ml(this.git6, 25), this.git7 = ml(this.git7, 25)), this.gitInv0 = this.gitInv0 || zo(this.git0), this.gitInv1 = this.gitInv1 || zo(this.git1), this.gitInv2 = this.gitInv2 || zo(this.git2), this.gitInv3 = this.gitInv3 || zo(this.git3), this.gitInv4 = this.gitInv4 || zo(this.git4), this.gitInv5 = this.gitInv5 || zo(this.git5), this.gitInv6 = this.gitInv6 || zo(this.git6), this.gitInv7 = this.gitInv7 || zo(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 || sme, this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || cme;
+ }
+ calculate(o) {
+ if (typeof o != "object")
+ return void this.updateColors();
+ const l = Object.keys(o);
+ l.forEach((f) => {
+ this[f] = o[f];
+ }), this.updateColors(), l.forEach((f) => {
+ this[f] = o[f];
+ });
+ }
+ }();
+ return i.calculate(r), i;
+} }, neutral: { getThemeVariables: (r) => {
+ const i = new JCn();
+ return i.calculate(r), i;
+} } }, gO = { theme: "default", themeVariables: oL.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"] }, timeline: { 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"], disableMulticolor: !1 }, 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 };
+gO.class && (gO.class.arrowMarkerAbsolute = gO.arrowMarkerAbsolute), gO.gitGraph && (gO.gitGraph.arrowMarkerAbsolute = gO.arrowMarkerAbsolute);
+const rLt = (r, i = "") => Object.keys(r).reduce((o, l) => Array.isArray(r[l]) ? o : typeof r[l] == "object" && r[l] !== null ? [...o, i + l, ...rLt(r[l], "")] : [...o, i + l], []), ZCn = rLt(gO, ""), e7n = gO;
+function B8t(r) {
+ return r == null;
+}
+var t7n = function(r, i) {
+ var o, l = "";
+ for (o = 0; o < i; o += 1)
+ l += r;
+ return l;
+}, n7n = function(r) {
+ return r === 0 && Number.NEGATIVE_INFINITY === 1 / r;
+}, r7n = function(r, i) {
+ var o, l, f, g;
+ if (i)
+ for (o = 0, l = (g = Object.keys(i)).length; o < l; o += 1)
+ r[f = g[o]] = i[f];
+ return r;
+}, w3 = { isNothing: B8t, isObject: function(r) {
+ return typeof r == "object" && r !== null;
+}, toArray: function(r) {
+ return Array.isArray(r) ? r : B8t(r) ? [] : [r];
+}, repeat: t7n, isNegativeZero: n7n, extend: r7n };
+function iLt(r, i) {
+ var o = "", l = r.reason || "(unknown reason)";
+ return r.mark ? (r.mark.name && (o += 'in "' + r.mark.name + '" '), o += "(" + (r.mark.line + 1) + ":" + (r.mark.column + 1) + ")", !i && r.mark.snippet && (o += `
+
+` + r.mark.snippet), l + " " + o) : l;
+}
+function ure(r, i) {
+ Error.call(this), this.name = "YAMLException", this.reason = r, this.mark = i, this.message = iLt(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || "";
+}
+ure.prototype = Object.create(Error.prototype), ure.prototype.constructor = ure, ure.prototype.toString = function(r) {
+ return this.name + ": " + iLt(this, r);
+};
+var sL = ure;
+function bOe(r, i, o, l, f) {
+ var g = "", A = "", b = Math.floor(f / 2) - 1;
+ return l - i > b && (i = l - b + (g = " ... ").length), o - l > b && (o = l + b - (A = " ...").length), { str: g + r.slice(i, o).replace(/\t/g, "→") + A, pos: l - i + g.length };
+}
+function vOe(r, i) {
+ return w3.repeat(" ", i - r.length) + r;
+}
+var i7n = function(r, i) {
+ if (i = Object.create(i || null), !r.buffer)
+ return null;
+ i.maxLength || (i.maxLength = 79), typeof i.indent != "number" && (i.indent = 1), typeof i.linesBefore != "number" && (i.linesBefore = 3), typeof i.linesAfter != "number" && (i.linesAfter = 2);
+ for (var o, l = /\r?\n|\r|\0/g, f = [0], g = [], A = -1; o = l.exec(r.buffer); )
+ g.push(o.index), f.push(o.index + o[0].length), r.position <= o.index && A < 0 && (A = f.length - 2);
+ A < 0 && (A = f.length - 1);
+ var b, v, k = "", _ = Math.min(r.line + i.linesAfter, g.length).toString().length, T = i.maxLength - (i.indent + _ + 3);
+ for (b = 1; b <= i.linesBefore && !(A - b < 0); b++)
+ v = bOe(r.buffer, f[A - b], g[A - b], r.position - (f[A] - f[A - b]), T), k = w3.repeat(" ", i.indent) + vOe((r.line - b + 1).toString(), _) + " | " + v.str + `
+` + k;
+ for (v = bOe(r.buffer, f[A], g[A], r.position, T), k += w3.repeat(" ", i.indent) + vOe((r.line + 1).toString(), _) + " | " + v.str + `
+`, k += w3.repeat("-", i.indent + _ + 3 + v.pos) + `^
+`, b = 1; b <= i.linesAfter && !(A + b >= g.length); b++)
+ v = bOe(r.buffer, f[A + b], g[A + b], r.position - (f[A] - f[A + b]), T), k += w3.repeat(" ", i.indent) + vOe((r.line + b + 1).toString(), _) + " | " + v.str + `
+`;
+ return k.replace(/\n$/, "");
+}, a7n = ["kind", "multi", "resolve", "construct", "instanceOf", "predicate", "represent", "representName", "defaultStyle", "styleAliases"], o7n = ["scalar", "sequence", "mapping"], zy = function(r, i) {
+ var o, l;
+ if (i = i || {}, Object.keys(i).forEach(function(f) {
+ if (a7n.indexOf(f) === -1)
+ throw new sL('Unknown option "' + f + '" is met in definition of "' + r + '" YAML type.');
+ }), this.options = i, this.tag = r, this.kind = i.kind || null, this.resolve = i.resolve || function() {
+ return !0;
+ }, this.construct = i.construct || function(f) {
+ return f;
+ }, this.instanceOf = i.instanceOf || null, this.predicate = i.predicate || null, this.represent = i.represent || null, this.representName = i.representName || null, this.defaultStyle = i.defaultStyle || null, this.multi = i.multi || !1, this.styleAliases = (o = i.styleAliases || null, l = {}, o !== null && Object.keys(o).forEach(function(f) {
+ o[f].forEach(function(g) {
+ l[String(g)] = f;
+ });
+ }), l), o7n.indexOf(this.kind) === -1)
+ throw new sL('Unknown kind "' + this.kind + '" is specified for "' + r + '" YAML type.');
+};
+function S8t(r, i) {
+ var o = [];
+ return r[i].forEach(function(l) {
+ var f = o.length;
+ o.forEach(function(g, A) {
+ g.tag === l.tag && g.kind === l.kind && g.multi === l.multi && (f = A);
+ }), o[f] = l;
+ }), o;
+}
+function ONe(r) {
+ return this.extend(r);
+}
+ONe.prototype.extend = function(r) {
+ var i = [], o = [];
+ if (r instanceof zy)
+ o.push(r);
+ else if (Array.isArray(r))
+ o = o.concat(r);
+ else {
+ if (!r || !Array.isArray(r.implicit) && !Array.isArray(r.explicit))
+ throw new sL("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
+ r.implicit && (i = i.concat(r.implicit)), r.explicit && (o = o.concat(r.explicit));
+ }
+ i.forEach(function(f) {
+ if (!(f instanceof zy))
+ throw new sL("Specified list of YAML types (or a single Type object) contains a non-Type object.");
+ if (f.loadKind && f.loadKind !== "scalar")
+ throw new sL("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
+ if (f.multi)
+ throw new sL("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
+ }), o.forEach(function(f) {
+ if (!(f instanceof zy))
+ throw new sL("Specified list of YAML types (or a single Type object) contains a non-Type object.");
+ });
+ var l = Object.create(ONe.prototype);
+ return l.implicit = (this.implicit || []).concat(i), l.explicit = (this.explicit || []).concat(o), l.compiledImplicit = S8t(l, "implicit"), l.compiledExplicit = S8t(l, "explicit"), l.compiledTypeMap = function() {
+ var f, g, A = { scalar: {}, sequence: {}, mapping: {}, fallback: {}, multi: { scalar: [], sequence: [], mapping: [], fallback: [] } };
+ function b(v) {
+ v.multi ? (A.multi[v.kind].push(v), A.multi.fallback.push(v)) : A[v.kind][v.tag] = A.fallback[v.tag] = v;
+ }
+ for (f = 0, g = arguments.length; f < g; f += 1)
+ arguments[f].forEach(b);
+ return A;
+ }(l.compiledImplicit, l.compiledExplicit), l;
+};
+var s7n = ONe, c7n = new zy("tag:yaml.org,2002:str", { kind: "scalar", construct: function(r) {
+ return r !== null ? r : "";
+} }), l7n = new zy("tag:yaml.org,2002:seq", { kind: "sequence", construct: function(r) {
+ return r !== null ? r : [];
+} }), u7n = new zy("tag:yaml.org,2002:map", { kind: "mapping", construct: function(r) {
+ return r !== null ? r : {};
+} }), aLt = new s7n({ explicit: [c7n, l7n, u7n] }), h7n = new zy("tag:yaml.org,2002:null", { kind: "scalar", resolve: function(r) {
+ if (r === null)
+ return !0;
+ var i = r.length;
+ return i === 1 && r === "~" || i === 4 && (r === "null" || r === "Null" || r === "NULL");
+}, construct: function() {
+ return null;
+}, predicate: function(r) {
+ return r === null;
+}, represent: { canonical: function() {
+ return "~";
+}, lowercase: function() {
+ return "null";
+}, uppercase: function() {
+ return "NULL";
+}, camelcase: function() {
+ return "Null";
+}, empty: function() {
+ return "";
+} }, defaultStyle: "lowercase" }), f7n = new zy("tag:yaml.org,2002:bool", { kind: "scalar", resolve: function(r) {
+ if (r === null)
+ return !1;
+ var i = r.length;
+ return i === 4 && (r === "true" || r === "True" || r === "TRUE") || i === 5 && (r === "false" || r === "False" || r === "FALSE");
+}, construct: function(r) {
+ return r === "true" || r === "True" || r === "TRUE";
+}, predicate: function(r) {
+ return Object.prototype.toString.call(r) === "[object Boolean]";
+}, represent: { lowercase: function(r) {
+ return r ? "true" : "false";
+}, uppercase: function(r) {
+ return r ? "TRUE" : "FALSE";
+}, camelcase: function(r) {
+ return r ? "True" : "False";
+} }, defaultStyle: "lowercase" });
+function d7n(r) {
+ return 48 <= r && r <= 55;
+}
+function A7n(r) {
+ return 48 <= r && r <= 57;
+}
+var g7n = new zy("tag:yaml.org,2002:int", { kind: "scalar", resolve: function(r) {
+ if (r === null)
+ return !1;
+ var i, o, l = r.length, f = 0, g = !1;
+ if (!l)
+ return !1;
+ if ((i = r[f]) !== "-" && i !== "+" || (i = r[++f]), i === "0") {
+ if (f + 1 === l)
+ return !0;
+ if ((i = r[++f]) === "b") {
+ for (f++; f < l; f++)
+ if ((i = r[f]) !== "_") {
+ if (i !== "0" && i !== "1")
+ return !1;
+ g = !0;
+ }
+ return g && i !== "_";
+ }
+ if (i === "x") {
+ for (f++; f < l; f++)
+ if ((i = r[f]) !== "_") {
+ if (!(48 <= (o = r.charCodeAt(f)) && o <= 57 || 65 <= o && o <= 70 || 97 <= o && o <= 102))
+ return !1;
+ g = !0;
+ }
+ return g && i !== "_";
+ }
+ if (i === "o") {
+ for (f++; f < l; f++)
+ if ((i = r[f]) !== "_") {
+ if (!d7n(r.charCodeAt(f)))
+ return !1;
+ g = !0;
+ }
+ return g && i !== "_";
+ }
+ }
+ if (i === "_")
+ return !1;
+ for (; f < l; f++)
+ if ((i = r[f]) !== "_") {
+ if (!A7n(r.charCodeAt(f)))
+ return !1;
+ g = !0;
+ }
+ return !(!g || i === "_");
+}, construct: function(r) {
+ var i, o = r, l = 1;
+ if (o.indexOf("_") !== -1 && (o = o.replace(/_/g, "")), (i = o[0]) !== "-" && i !== "+" || (i === "-" && (l = -1), i = (o = o.slice(1))[0]), o === "0")
+ return 0;
+ if (i === "0") {
+ if (o[1] === "b")
+ return l * parseInt(o.slice(2), 2);
+ if (o[1] === "x")
+ return l * parseInt(o.slice(2), 16);
+ if (o[1] === "o")
+ return l * parseInt(o.slice(2), 8);
+ }
+ return l * parseInt(o, 10);
+}, predicate: function(r) {
+ return Object.prototype.toString.call(r) === "[object Number]" && r % 1 == 0 && !w3.isNegativeZero(r);
+}, represent: { binary: function(r) {
+ return r >= 0 ? "0b" + r.toString(2) : "-0b" + r.toString(2).slice(1);
+}, octal: function(r) {
+ return r >= 0 ? "0o" + r.toString(8) : "-0o" + r.toString(8).slice(1);
+}, decimal: function(r) {
+ return r.toString(10);
+}, hexadecimal: function(r) {
+ return r >= 0 ? "0x" + r.toString(16).toUpperCase() : "-0x" + r.toString(16).toUpperCase().slice(1);
+} }, defaultStyle: "decimal", styleAliases: { binary: [2, "bin"], octal: [8, "oct"], decimal: [10, "dec"], hexadecimal: [16, "hex"] } }), p7n = new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"), m7n = /^[-+]?[0-9]+e/, b7n = new zy("tag:yaml.org,2002:float", { kind: "scalar", resolve: function(r) {
+ return r !== null && !(!p7n.test(r) || r[r.length - 1] === "_");
+}, construct: function(r) {
+ var i, o;
+ return o = (i = r.replace(/_/g, "").toLowerCase())[0] === "-" ? -1 : 1, "+-".indexOf(i[0]) >= 0 && (i = i.slice(1)), i === ".inf" ? o === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY : i === ".nan" ? NaN : o * parseFloat(i, 10);
+}, predicate: function(r) {
+ return Object.prototype.toString.call(r) === "[object Number]" && (r % 1 != 0 || w3.isNegativeZero(r));
+}, represent: function(r, i) {
+ var o;
+ if (isNaN(r))
+ switch (i) {
+ case "lowercase":
+ return ".nan";
+ case "uppercase":
+ return ".NAN";
+ case "camelcase":
+ return ".NaN";
+ }
+ else if (Number.POSITIVE_INFINITY === r)
+ switch (i) {
+ case "lowercase":
+ return ".inf";
+ case "uppercase":
+ return ".INF";
+ case "camelcase":
+ return ".Inf";
+ }
+ else if (Number.NEGATIVE_INFINITY === r)
+ switch (i) {
+ case "lowercase":
+ return "-.inf";
+ case "uppercase":
+ return "-.INF";
+ case "camelcase":
+ return "-.Inf";
+ }
+ else if (w3.isNegativeZero(r))
+ return "-0.0";
+ return o = r.toString(10), m7n.test(o) ? o.replace("e", ".e") : o;
+}, defaultStyle: "lowercase" }), v7n = aLt.extend({ implicit: [h7n, f7n, g7n, b7n] }), L8t = new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"), I8t = 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]))?))?$"), y7n = new zy("tag:yaml.org,2002:timestamp", { kind: "scalar", resolve: function(r) {
+ return r !== null && (L8t.exec(r) !== null || I8t.exec(r) !== null);
+}, construct: function(r) {
+ var i, o, l, f, g, A, b, v, k = 0, _ = null;
+ if ((i = L8t.exec(r)) === null && (i = I8t.exec(r)), i === null)
+ throw new Error("Date resolve error");
+ if (o = +i[1], l = +i[2] - 1, f = +i[3], !i[4])
+ return new Date(Date.UTC(o, l, f));
+ if (g = +i[4], A = +i[5], b = +i[6], i[7]) {
+ for (k = i[7].slice(0, 3); k.length < 3; )
+ k += "0";
+ k = +k;
+ }
+ return i[9] && (_ = 6e4 * (60 * +i[10] + +(i[11] || 0)), i[9] === "-" && (_ = -_)), v = new Date(Date.UTC(o, l, f, g, A, b, k)), _ && v.setTime(v.getTime() - _), v;
+}, instanceOf: Date, represent: function(r) {
+ return r.toISOString();
+} }), w7n = new zy("tag:yaml.org,2002:merge", { kind: "scalar", resolve: function(r) {
+ return r === "<<" || r === null;
+} }), yOe = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
+\r`, k7n = new zy("tag:yaml.org,2002:binary", { kind: "scalar", resolve: function(r) {
+ if (r === null)
+ return !1;
+ var i, o, l = 0, f = r.length, g = yOe;
+ for (o = 0; o < f; o++)
+ if (!((i = g.indexOf(r.charAt(o))) > 64)) {
+ if (i < 0)
+ return !1;
+ l += 6;
+ }
+ return l % 8 == 0;
+}, construct: function(r) {
+ var i, o, l = r.replace(/[\r\n=]/g, ""), f = l.length, g = yOe, A = 0, b = [];
+ for (i = 0; i < f; i++)
+ i % 4 == 0 && i && (b.push(A >> 16 & 255), b.push(A >> 8 & 255), b.push(255 & A)), A = A << 6 | g.indexOf(l.charAt(i));
+ return (o = f % 4 * 6) === 0 ? (b.push(A >> 16 & 255), b.push(A >> 8 & 255), b.push(255 & A)) : o === 18 ? (b.push(A >> 10 & 255), b.push(A >> 2 & 255)) : o === 12 && b.push(A >> 4 & 255), new Uint8Array(b);
+}, predicate: function(r) {
+ return Object.prototype.toString.call(r) === "[object Uint8Array]";
+}, represent: function(r) {
+ var i, o, l = "", f = 0, g = r.length, A = yOe;
+ for (i = 0; i < g; i++)
+ i % 3 == 0 && i && (l += A[f >> 18 & 63], l += A[f >> 12 & 63], l += A[f >> 6 & 63], l += A[63 & f]), f = (f << 8) + r[i];
+ return (o = g % 3) === 0 ? (l += A[f >> 18 & 63], l += A[f >> 12 & 63], l += A[f >> 6 & 63], l += A[63 & f]) : o === 2 ? (l += A[f >> 10 & 63], l += A[f >> 4 & 63], l += A[f << 2 & 63], l += A[64]) : o === 1 && (l += A[f >> 2 & 63], l += A[f << 4 & 63], l += A[64], l += A[64]), l;
+} }), x7n = Object.prototype.hasOwnProperty, C7n = Object.prototype.toString, _7n = new zy("tag:yaml.org,2002:omap", { kind: "sequence", resolve: function(r) {
+ if (r === null)
+ return !0;
+ var i, o, l, f, g, A = [], b = r;
+ for (i = 0, o = b.length; i < o; i += 1) {
+ if (l = b[i], g = !1, C7n.call(l) !== "[object Object]")
+ return !1;
+ for (f in l)
+ if (x7n.call(l, f)) {
+ if (g)
+ return !1;
+ g = !0;
+ }
+ if (!g || A.indexOf(f) !== -1)
+ return !1;
+ A.push(f);
+ }
+ return !0;
+}, construct: function(r) {
+ return r !== null ? r : [];
+} }), E7n = Object.prototype.toString, T7n = new zy("tag:yaml.org,2002:pairs", { kind: "sequence", resolve: function(r) {
+ if (r === null)
+ return !0;
+ var i, o, l, f, g, A = r;
+ for (g = new Array(A.length), i = 0, o = A.length; i < o; i += 1) {
+ if (l = A[i], E7n.call(l) !== "[object Object]" || (f = Object.keys(l)).length !== 1)
+ return !1;
+ g[i] = [f[0], l[f[0]]];
+ }
+ return !0;
+}, construct: function(r) {
+ if (r === null)
+ return [];
+ var i, o, l, f, g, A = r;
+ for (g = new Array(A.length), i = 0, o = A.length; i < o; i += 1)
+ l = A[i], f = Object.keys(l), g[i] = [f[0], l[f[0]]];
+ return g;
+} }), B7n = Object.prototype.hasOwnProperty, S7n = new zy("tag:yaml.org,2002:set", { kind: "mapping", resolve: function(r) {
+ if (r === null)
+ return !0;
+ var i, o = r;
+ for (i in o)
+ if (B7n.call(o, i) && o[i] !== null)
+ return !1;
+ return !0;
+}, construct: function(r) {
+ return r !== null ? r : {};
+} }), L7n = v7n.extend({ implicit: [y7n, w7n], explicit: [k7n, _7n, T7n, S7n] }), FO = Object.prototype.hasOwnProperty, ope = 1, M8t = 2, oLt = 3, lme = 4, wOe = 1, I7n = 2, F8t = 3, M7n = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, F7n = /[\x85\u2028\u2029]/, O7n = /[,\[\]\{\}]/, sLt = /^(?:!|!!|![a-z\-]+!)$/i, cLt = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
+function O8t(r) {
+ return Object.prototype.toString.call(r);
+}
+function vT(r) {
+ return r === 10 || r === 13;
+}
+function XQ(r) {
+ return r === 9 || r === 32;
+}
+function u5(r) {
+ return r === 9 || r === 32 || r === 10 || r === 13;
+}
+function aG(r) {
+ return r === 44 || r === 91 || r === 93 || r === 123 || r === 125;
+}
+function D7n(r) {
+ var i;
+ return 48 <= r && r <= 57 ? r - 48 : 97 <= (i = 32 | r) && i <= 102 ? i - 97 + 10 : -1;
+}
+function D8t(r) {
+ return r === 48 ? "\0" : r === 97 ? "\x07" : r === 98 ? "\b" : r === 116 || r === 9 ? " " : r === 110 ? `
+` : r === 118 ? "\v" : r === 102 ? "\f" : r === 114 ? "\r" : r === 101 ? "\x1B" : r === 32 ? " " : r === 34 ? '"' : r === 47 ? "/" : r === 92 ? "\\" : r === 78 ? "
" : r === 95 ? " " : r === 76 ? "\u2028" : r === 80 ? "\u2029" : "";
+}
+function N7n(r) {
+ return r <= 65535 ? String.fromCharCode(r) : String.fromCharCode(55296 + (r - 65536 >> 10), 56320 + (r - 65536 & 1023));
+}
+for (var lLt = new Array(256), uLt = new Array(256), Xz = 0; Xz < 256; Xz++)
+ lLt[Xz] = D8t(Xz) ? 1 : 0, uLt[Xz] = D8t(Xz);
+function P7n(r, i) {
+ this.input = r, this.filename = i.filename || null, this.schema = i.schema || L7n, this.onWarning = i.onWarning || null, this.legacy = i.legacy || !1, this.json = i.json || !1, this.listener = i.listener || null, this.implicitTypes = this.schema.compiledImplicit, this.typeMap = this.schema.compiledTypeMap, this.length = r.length, this.position = 0, this.line = 0, this.lineStart = 0, this.lineIndent = 0, this.firstTabInLine = -1, this.documents = [];
+}
+function hLt(r, i) {
+ var o = { name: r.filename, buffer: r.input.slice(0, -1), position: r.position, line: r.line, column: r.position - r.lineStart };
+ return o.snippet = i7n(o), new sL(i, o);
+}
+function fc(r, i) {
+ throw hLt(r, i);
+}
+function ube(r, i) {
+ r.onWarning && r.onWarning.call(null, hLt(r, i));
+}
+var N8t = { YAML: function(r, i, o) {
+ var l, f, g;
+ r.version !== null && fc(r, "duplication of %YAML directive"), o.length !== 1 && fc(r, "YAML directive accepts exactly one argument"), (l = /^([0-9]+)\.([0-9]+)$/.exec(o[0])) === null && fc(r, "ill-formed argument of the YAML directive"), f = parseInt(l[1], 10), g = parseInt(l[2], 10), f !== 1 && fc(r, "unacceptable YAML version of the document"), r.version = o[0], r.checkLineBreaks = g < 2, g !== 1 && g !== 2 && ube(r, "unsupported YAML version of the document");
+}, TAG: function(r, i, o) {
+ var l, f;
+ o.length !== 2 && fc(r, "TAG directive accepts exactly two arguments"), l = o[0], f = o[1], sLt.test(l) || fc(r, "ill-formed tag handle (first argument) of the TAG directive"), FO.call(r.tagMap, l) && fc(r, 'there is a previously declared suffix for "' + l + '" tag handle'), cLt.test(f) || fc(r, "ill-formed tag prefix (second argument) of the TAG directive");
+ try {
+ f = decodeURIComponent(f);
+ } catch {
+ fc(r, "tag prefix is malformed: " + f);
+ }
+ r.tagMap[l] = f;
+} };
+function aO(r, i, o, l) {
+ var f, g, A, b;
+ if (i < o) {
+ if (b = r.input.slice(i, o), l)
+ for (f = 0, g = b.length; f < g; f += 1)
+ (A = b.charCodeAt(f)) === 9 || 32 <= A && A <= 1114111 || fc(r, "expected valid JSON character");
+ else
+ M7n.test(b) && fc(r, "the stream contains non-printable characters");
+ r.result += b;
+ }
+}
+function P8t(r, i, o, l) {
+ var f, g, A, b;
+ for (w3.isObject(o) || fc(r, "cannot merge mappings; the provided source object is unacceptable"), A = 0, b = (f = Object.keys(o)).length; A < b; A += 1)
+ g = f[A], FO.call(i, g) || (i[g] = o[g], l[g] = !0);
+}
+function Wz(r, i, o, l, f, g, A, b, v) {
+ var k, _;
+ if (Array.isArray(f))
+ for (k = 0, _ = (f = Array.prototype.slice.call(f)).length; k < _; k += 1)
+ Array.isArray(f[k]) && fc(r, "nested arrays are not supported inside keys"), typeof f == "object" && O8t(f[k]) === "[object Object]" && (f[k] = "[object Object]");
+ if (typeof f == "object" && O8t(f) === "[object Object]" && (f = "[object Object]"), f = String(f), i === null && (i = {}), l === "tag:yaml.org,2002:merge")
+ if (Array.isArray(g))
+ for (k = 0, _ = g.length; k < _; k += 1)
+ P8t(r, i, g[k], o);
+ else
+ P8t(r, i, g, o);
+ else
+ r.json || FO.call(o, f) || !FO.call(i, f) || (r.line = A || r.line, r.lineStart = b || r.lineStart, r.position = v || r.position, fc(r, "duplicated mapping key")), f === "__proto__" ? Object.defineProperty(i, f, { configurable: !0, enumerable: !0, writable: !0, value: g }) : i[f] = g, delete o[f];
+ return i;
+}
+function VRe(r) {
+ var i;
+ (i = r.input.charCodeAt(r.position)) === 10 ? r.position++ : i === 13 ? (r.position++, r.input.charCodeAt(r.position) === 10 && r.position++) : fc(r, "a line break is expected"), r.line += 1, r.lineStart = r.position, r.firstTabInLine = -1;
+}
+function om(r, i, o) {
+ for (var l = 0, f = r.input.charCodeAt(r.position); f !== 0; ) {
+ for (; XQ(f); )
+ f === 9 && r.firstTabInLine === -1 && (r.firstTabInLine = r.position), f = r.input.charCodeAt(++r.position);
+ if (i && f === 35)
+ do
+ f = r.input.charCodeAt(++r.position);
+ while (f !== 10 && f !== 13 && f !== 0);
+ if (!vT(f))
+ break;
+ for (VRe(r), f = r.input.charCodeAt(r.position), l++, r.lineIndent = 0; f === 32; )
+ r.lineIndent++, f = r.input.charCodeAt(++r.position);
+ }
+ return o !== -1 && l !== 0 && r.lineIndent < o && ube(r, "deficient indentation"), l;
+}
+function ume(r) {
+ var i, o = r.position;
+ return !((i = r.input.charCodeAt(o)) !== 45 && i !== 46 || i !== r.input.charCodeAt(o + 1) || i !== r.input.charCodeAt(o + 2) || (o += 3, (i = r.input.charCodeAt(o)) !== 0 && !u5(i)));
+}
+function kOe(r, i) {
+ i === 1 ? r.result += " " : i > 1 && (r.result += w3.repeat(`
+`, i - 1));
+}
+function R8t(r, i) {
+ var o, l, f = r.tag, g = r.anchor, A = [], b = !1;
+ if (r.firstTabInLine !== -1)
+ return !1;
+ for (r.anchor !== null && (r.anchorMap[r.anchor] = A), l = r.input.charCodeAt(r.position); l !== 0 && (r.firstTabInLine !== -1 && (r.position = r.firstTabInLine, fc(r, "tab characters must not be used in indentation")), l === 45) && u5(r.input.charCodeAt(r.position + 1)); )
+ if (b = !0, r.position++, om(r, !0, -1) && r.lineIndent <= i)
+ A.push(null), l = r.input.charCodeAt(r.position);
+ else if (o = r.line, AG(r, i, oLt, !1, !0), A.push(r.result), om(r, !0, -1), l = r.input.charCodeAt(r.position), (r.line === o || r.lineIndent > i) && l !== 0)
+ fc(r, "bad indentation of a sequence entry");
+ else if (r.lineIndent < i)
+ break;
+ return !!b && (r.tag = f, r.anchor = g, r.kind = "sequence", r.result = A, !0);
+}
+function R7n(r) {
+ var i, o, l, f, g = !1, A = !1;
+ if ((f = r.input.charCodeAt(r.position)) !== 33)
+ return !1;
+ if (r.tag !== null && fc(r, "duplication of a tag property"), (f = r.input.charCodeAt(++r.position)) === 60 ? (g = !0, f = r.input.charCodeAt(++r.position)) : f === 33 ? (A = !0, o = "!!", f = r.input.charCodeAt(++r.position)) : o = "!", i = r.position, g) {
+ do
+ f = r.input.charCodeAt(++r.position);
+ while (f !== 0 && f !== 62);
+ r.position < r.length ? (l = r.input.slice(i, r.position), f = r.input.charCodeAt(++r.position)) : fc(r, "unexpected end of the stream within a verbatim tag");
+ } else {
+ for (; f !== 0 && !u5(f); )
+ f === 33 && (A ? fc(r, "tag suffix cannot contain exclamation marks") : (o = r.input.slice(i - 1, r.position + 1), sLt.test(o) || fc(r, "named tag handle cannot contain such characters"), A = !0, i = r.position + 1)), f = r.input.charCodeAt(++r.position);
+ l = r.input.slice(i, r.position), O7n.test(l) && fc(r, "tag suffix cannot contain flow indicator characters");
+ }
+ l && !cLt.test(l) && fc(r, "tag name cannot contain such characters: " + l);
+ try {
+ l = decodeURIComponent(l);
+ } catch {
+ fc(r, "tag name is malformed: " + l);
+ }
+ return g ? r.tag = l : FO.call(r.tagMap, o) ? r.tag = r.tagMap[o] + l : o === "!" ? r.tag = "!" + l : o === "!!" ? r.tag = "tag:yaml.org,2002:" + l : fc(r, 'undeclared tag handle "' + o + '"'), !0;
+}
+function Q7n(r) {
+ var i, o;
+ if ((o = r.input.charCodeAt(r.position)) !== 38)
+ return !1;
+ for (r.anchor !== null && fc(r, "duplication of an anchor property"), o = r.input.charCodeAt(++r.position), i = r.position; o !== 0 && !u5(o) && !aG(o); )
+ o = r.input.charCodeAt(++r.position);
+ return r.position === i && fc(r, "name of an anchor node must contain at least one character"), r.anchor = r.input.slice(i, r.position), !0;
+}
+function AG(r, i, o, l, f) {
+ var g, A, b, v, k, _, T, L, F, U = 1, q = !1, Z = !1;
+ if (r.listener !== null && r.listener("open", r), r.tag = null, r.anchor = null, r.kind = null, r.result = null, g = A = b = lme === o || oLt === o, l && om(r, !0, -1) && (q = !0, r.lineIndent > i ? U = 1 : r.lineIndent === i ? U = 0 : r.lineIndent < i && (U = -1)), U === 1)
+ for (; R7n(r) || Q7n(r); )
+ om(r, !0, -1) ? (q = !0, b = g, r.lineIndent > i ? U = 1 : r.lineIndent === i ? U = 0 : r.lineIndent < i && (U = -1)) : b = !1;
+ if (b && (b = q || f), U !== 1 && lme !== o || (L = ope === o || M8t === o ? i : i + 1, F = r.position - r.lineStart, U === 1 ? b && (R8t(r, F) || function(R, J, he) {
+ var Y, ue, le, be, ke, de, Te, xe = R.tag, ie = R.anchor, Be = {}, te = /* @__PURE__ */ Object.create(null), Me = null, ve = null, ge = null, Je = !1, ot = !1;
+ if (R.firstTabInLine !== -1)
+ return !1;
+ for (R.anchor !== null && (R.anchorMap[R.anchor] = Be), Te = R.input.charCodeAt(R.position); Te !== 0; ) {
+ if (Je || R.firstTabInLine === -1 || (R.position = R.firstTabInLine, fc(R, "tab characters must not be used in indentation")), Y = R.input.charCodeAt(R.position + 1), le = R.line, Te !== 63 && Te !== 58 || !u5(Y)) {
+ if (be = R.line, ke = R.lineStart, de = R.position, !AG(R, he, M8t, !1, !0))
+ break;
+ if (R.line === le) {
+ for (Te = R.input.charCodeAt(R.position); XQ(Te); )
+ Te = R.input.charCodeAt(++R.position);
+ if (Te === 58)
+ u5(Te = R.input.charCodeAt(++R.position)) || fc(R, "a whitespace character is expected after the key-value separator within a block mapping"), Je && (Wz(R, Be, te, Me, ve, null, be, ke, de), Me = ve = ge = null), ot = !0, Je = !1, ue = !1, Me = R.tag, ve = R.result;
+ else {
+ if (!ot)
+ return R.tag = xe, R.anchor = ie, !0;
+ fc(R, "can not read an implicit mapping pair; a colon is missed");
+ }
+ } else {
+ if (!ot)
+ return R.tag = xe, R.anchor = ie, !0;
+ fc(R, "can not read a block mapping entry; a multiline key may not be an implicit key");
+ }
+ } else
+ Te === 63 ? (Je && (Wz(R, Be, te, Me, ve, null, be, ke, de), Me = ve = ge = null), ot = !0, Je = !0, ue = !0) : Je ? (Je = !1, ue = !0) : fc(R, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), R.position += 1, Te = Y;
+ if ((R.line === le || R.lineIndent > J) && (Je && (be = R.line, ke = R.lineStart, de = R.position), AG(R, J, lme, !0, ue) && (Je ? ve = R.result : ge = R.result), Je || (Wz(R, Be, te, Me, ve, ge, be, ke, de), Me = ve = ge = null), om(R, !0, -1), Te = R.input.charCodeAt(R.position)), (R.line === le || R.lineIndent > J) && Te !== 0)
+ fc(R, "bad indentation of a mapping entry");
+ else if (R.lineIndent < J)
+ break;
+ }
+ return Je && Wz(R, Be, te, Me, ve, null, be, ke, de), ot && (R.tag = xe, R.anchor = ie, R.kind = "mapping", R.result = Be), ot;
+ }(r, F, L)) || function(R, J) {
+ var he, Y, ue, le, be, ke, de, Te, xe, ie, Be, te, Me = !0, ve = R.tag, ge = R.anchor, Je = /* @__PURE__ */ Object.create(null);
+ if ((te = R.input.charCodeAt(R.position)) === 91)
+ be = 93, Te = !1, le = [];
+ else {
+ if (te !== 123)
+ return !1;
+ be = 125, Te = !0, le = {};
+ }
+ for (R.anchor !== null && (R.anchorMap[R.anchor] = le), te = R.input.charCodeAt(++R.position); te !== 0; ) {
+ if (om(R, !0, J), (te = R.input.charCodeAt(R.position)) === be)
+ return R.position++, R.tag = ve, R.anchor = ge, R.kind = Te ? "mapping" : "sequence", R.result = le, !0;
+ Me ? te === 44 && fc(R, "expected the node content, but found ','") : fc(R, "missed comma between flow collection entries"), Be = null, ke = de = !1, te === 63 && u5(R.input.charCodeAt(R.position + 1)) && (ke = de = !0, R.position++, om(R, !0, J)), he = R.line, Y = R.lineStart, ue = R.position, AG(R, J, ope, !1, !0), ie = R.tag, xe = R.result, om(R, !0, J), te = R.input.charCodeAt(R.position), !de && R.line !== he || te !== 58 || (ke = !0, te = R.input.charCodeAt(++R.position), om(R, !0, J), AG(R, J, ope, !1, !0), Be = R.result), Te ? Wz(R, le, Je, ie, xe, Be, he, Y, ue) : ke ? le.push(Wz(R, null, Je, ie, xe, Be, he, Y, ue)) : le.push(xe), om(R, !0, J), (te = R.input.charCodeAt(R.position)) === 44 ? (Me = !0, te = R.input.charCodeAt(++R.position)) : Me = !1;
+ }
+ fc(R, "unexpected end of the stream within a flow collection");
+ }(r, L) ? Z = !0 : (A && function(R, J) {
+ var he, Y, ue, le, be, ke = wOe, de = !1, Te = !1, xe = J, ie = 0, Be = !1;
+ if ((le = R.input.charCodeAt(R.position)) === 124)
+ Y = !1;
+ else {
+ if (le !== 62)
+ return !1;
+ Y = !0;
+ }
+ for (R.kind = "scalar", R.result = ""; le !== 0; )
+ if ((le = R.input.charCodeAt(++R.position)) === 43 || le === 45)
+ wOe === ke ? ke = le === 43 ? F8t : I7n : fc(R, "repeat of a chomping mode identifier");
+ else {
+ if (!((ue = 48 <= (be = le) && be <= 57 ? be - 48 : -1) >= 0))
+ break;
+ ue === 0 ? fc(R, "bad explicit indentation width of a block scalar; it cannot be less than one") : Te ? fc(R, "repeat of an indentation width identifier") : (xe = J + ue - 1, Te = !0);
+ }
+ if (XQ(le)) {
+ do
+ le = R.input.charCodeAt(++R.position);
+ while (XQ(le));
+ if (le === 35)
+ do
+ le = R.input.charCodeAt(++R.position);
+ while (!vT(le) && le !== 0);
+ }
+ for (; le !== 0; ) {
+ for (VRe(R), R.lineIndent = 0, le = R.input.charCodeAt(R.position); (!Te || R.lineIndent < xe) && le === 32; )
+ R.lineIndent++, le = R.input.charCodeAt(++R.position);
+ if (!Te && R.lineIndent > xe && (xe = R.lineIndent), vT(le))
+ ie++;
+ else {
+ if (R.lineIndent < xe) {
+ ke === F8t ? R.result += w3.repeat(`
+`, de ? 1 + ie : ie) : ke === wOe && de && (R.result += `
+`);
+ break;
+ }
+ for (Y ? XQ(le) ? (Be = !0, R.result += w3.repeat(`
+`, de ? 1 + ie : ie)) : Be ? (Be = !1, R.result += w3.repeat(`
+`, ie + 1)) : ie === 0 ? de && (R.result += " ") : R.result += w3.repeat(`
+`, ie) : R.result += w3.repeat(`
+`, de ? 1 + ie : ie), de = !0, Te = !0, ie = 0, he = R.position; !vT(le) && le !== 0; )
+ le = R.input.charCodeAt(++R.position);
+ aO(R, he, R.position, !1);
+ }
+ }
+ return !0;
+ }(r, L) || function(R, J) {
+ var he, Y, ue;
+ if ((he = R.input.charCodeAt(R.position)) !== 39)
+ return !1;
+ for (R.kind = "scalar", R.result = "", R.position++, Y = ue = R.position; (he = R.input.charCodeAt(R.position)) !== 0; )
+ if (he === 39) {
+ if (aO(R, Y, R.position, !0), (he = R.input.charCodeAt(++R.position)) !== 39)
+ return !0;
+ Y = R.position, R.position++, ue = R.position;
+ } else
+ vT(he) ? (aO(R, Y, ue, !0), kOe(R, om(R, !1, J)), Y = ue = R.position) : R.position === R.lineStart && ume(R) ? fc(R, "unexpected end of the document within a single quoted scalar") : (R.position++, ue = R.position);
+ fc(R, "unexpected end of the stream within a single quoted scalar");
+ }(r, L) || function(R, J) {
+ var he, Y, ue, le, be, ke, de;
+ if ((ke = R.input.charCodeAt(R.position)) !== 34)
+ return !1;
+ for (R.kind = "scalar", R.result = "", R.position++, he = Y = R.position; (ke = R.input.charCodeAt(R.position)) !== 0; ) {
+ if (ke === 34)
+ return aO(R, he, R.position, !0), R.position++, !0;
+ if (ke === 92) {
+ if (aO(R, he, R.position, !0), vT(ke = R.input.charCodeAt(++R.position)))
+ om(R, !1, J);
+ else if (ke < 256 && lLt[ke])
+ R.result += uLt[ke], R.position++;
+ else if ((be = (de = ke) === 120 ? 2 : de === 117 ? 4 : de === 85 ? 8 : 0) > 0) {
+ for (ue = be, le = 0; ue > 0; ue--)
+ (be = D7n(ke = R.input.charCodeAt(++R.position))) >= 0 ? le = (le << 4) + be : fc(R, "expected hexadecimal character");
+ R.result += N7n(le), R.position++;
+ } else
+ fc(R, "unknown escape sequence");
+ he = Y = R.position;
+ } else
+ vT(ke) ? (aO(R, he, Y, !0), kOe(R, om(R, !1, J)), he = Y = R.position) : R.position === R.lineStart && ume(R) ? fc(R, "unexpected end of the document within a double quoted scalar") : (R.position++, Y = R.position);
+ }
+ fc(R, "unexpected end of the stream within a double quoted scalar");
+ }(r, L) ? Z = !0 : function(R) {
+ var J, he, Y;
+ if ((Y = R.input.charCodeAt(R.position)) !== 42)
+ return !1;
+ for (Y = R.input.charCodeAt(++R.position), J = R.position; Y !== 0 && !u5(Y) && !aG(Y); )
+ Y = R.input.charCodeAt(++R.position);
+ return R.position === J && fc(R, "name of an alias node must contain at least one character"), he = R.input.slice(J, R.position), FO.call(R.anchorMap, he) || fc(R, 'unidentified alias "' + he + '"'), R.result = R.anchorMap[he], om(R, !0, -1), !0;
+ }(r) ? (Z = !0, r.tag === null && r.anchor === null || fc(r, "alias node should not have any properties")) : function(R, J, he) {
+ var Y, ue, le, be, ke, de, Te, xe, ie = R.kind, Be = R.result;
+ if (u5(xe = R.input.charCodeAt(R.position)) || aG(xe) || xe === 35 || xe === 38 || xe === 42 || xe === 33 || xe === 124 || xe === 62 || xe === 39 || xe === 34 || xe === 37 || xe === 64 || xe === 96 || (xe === 63 || xe === 45) && (u5(Y = R.input.charCodeAt(R.position + 1)) || he && aG(Y)))
+ return !1;
+ for (R.kind = "scalar", R.result = "", ue = le = R.position, be = !1; xe !== 0; ) {
+ if (xe === 58) {
+ if (u5(Y = R.input.charCodeAt(R.position + 1)) || he && aG(Y))
+ break;
+ } else if (xe === 35) {
+ if (u5(R.input.charCodeAt(R.position - 1)))
+ break;
+ } else {
+ if (R.position === R.lineStart && ume(R) || he && aG(xe))
+ break;
+ if (vT(xe)) {
+ if (ke = R.line, de = R.lineStart, Te = R.lineIndent, om(R, !1, -1), R.lineIndent >= J) {
+ be = !0, xe = R.input.charCodeAt(R.position);
+ continue;
+ }
+ R.position = le, R.line = ke, R.lineStart = de, R.lineIndent = Te;
+ break;
+ }
+ }
+ be && (aO(R, ue, le, !1), kOe(R, R.line - ke), ue = le = R.position, be = !1), XQ(xe) || (le = R.position + 1), xe = R.input.charCodeAt(++R.position);
+ }
+ return aO(R, ue, le, !1), !!R.result || (R.kind = ie, R.result = Be, !1);
+ }(r, L, ope === o) && (Z = !0, r.tag === null && (r.tag = "?")), r.anchor !== null && (r.anchorMap[r.anchor] = r.result)) : U === 0 && (Z = b && R8t(r, F))), r.tag === null)
+ r.anchor !== null && (r.anchorMap[r.anchor] = r.result);
+ else if (r.tag === "?") {
+ for (r.result !== null && r.kind !== "scalar" && fc(r, 'unacceptable node kind for !> tag; it should be "scalar", not "' + r.kind + '"'), v = 0, k = r.implicitTypes.length; v < k; v += 1)
+ if ((T = r.implicitTypes[v]).resolve(r.result)) {
+ r.result = T.construct(r.result), r.tag = T.tag, r.anchor !== null && (r.anchorMap[r.anchor] = r.result);
+ break;
+ }
+ } else if (r.tag !== "!") {
+ if (FO.call(r.typeMap[r.kind || "fallback"], r.tag))
+ T = r.typeMap[r.kind || "fallback"][r.tag];
+ else
+ for (T = null, v = 0, k = (_ = r.typeMap.multi[r.kind || "fallback"]).length; v < k; v += 1)
+ if (r.tag.slice(0, _[v].tag.length) === _[v].tag) {
+ T = _[v];
+ break;
+ }
+ T || fc(r, "unknown tag !<" + r.tag + ">"), r.result !== null && T.kind !== r.kind && fc(r, "unacceptable node kind for !<" + r.tag + '> tag; it should be "' + T.kind + '", not "' + r.kind + '"'), T.resolve(r.result, r.tag) ? (r.result = T.construct(r.result, r.tag), r.anchor !== null && (r.anchorMap[r.anchor] = r.result)) : fc(r, "cannot resolve a node with !<" + r.tag + "> explicit tag");
+ }
+ return r.listener !== null && r.listener("close", r), r.tag !== null || r.anchor !== null || Z;
+}
+function $7n(r) {
+ var i, o, l, f, g = r.position, A = !1;
+ for (r.version = null, r.checkLineBreaks = r.legacy, r.tagMap = /* @__PURE__ */ Object.create(null), r.anchorMap = /* @__PURE__ */ Object.create(null); (f = r.input.charCodeAt(r.position)) !== 0 && (om(r, !0, -1), f = r.input.charCodeAt(r.position), !(r.lineIndent > 0 || f !== 37)); ) {
+ for (A = !0, f = r.input.charCodeAt(++r.position), i = r.position; f !== 0 && !u5(f); )
+ f = r.input.charCodeAt(++r.position);
+ for (l = [], (o = r.input.slice(i, r.position)).length < 1 && fc(r, "directive name must not be less than one character in length"); f !== 0; ) {
+ for (; XQ(f); )
+ f = r.input.charCodeAt(++r.position);
+ if (f === 35) {
+ do
+ f = r.input.charCodeAt(++r.position);
+ while (f !== 0 && !vT(f));
+ break;
+ }
+ if (vT(f))
+ break;
+ for (i = r.position; f !== 0 && !u5(f); )
+ f = r.input.charCodeAt(++r.position);
+ l.push(r.input.slice(i, r.position));
+ }
+ f !== 0 && VRe(r), FO.call(N8t, o) ? N8t[o](r, o, l) : ube(r, 'unknown document directive "' + o + '"');
+ }
+ om(r, !0, -1), r.lineIndent === 0 && r.input.charCodeAt(r.position) === 45 && r.input.charCodeAt(r.position + 1) === 45 && r.input.charCodeAt(r.position + 2) === 45 ? (r.position += 3, om(r, !0, -1)) : A && fc(r, "directives end mark is expected"), AG(r, r.lineIndent - 1, lme, !1, !0), om(r, !0, -1), r.checkLineBreaks && F7n.test(r.input.slice(g, r.position)) && ube(r, "non-ASCII line breaks are interpreted as content"), r.documents.push(r.result), r.position === r.lineStart && ume(r) ? r.input.charCodeAt(r.position) === 46 && (r.position += 3, om(r, !0, -1)) : r.position < r.length - 1 && fc(r, "end of the stream or a document separator is expected");
+}
+function fLt(r, i) {
+ i = i || {}, (r = String(r)).length !== 0 && (r.charCodeAt(r.length - 1) !== 10 && r.charCodeAt(r.length - 1) !== 13 && (r += `
+`), r.charCodeAt(0) === 65279 && (r = r.slice(1)));
+ var o = new P7n(r, i), l = r.indexOf("\0");
+ for (l !== -1 && (o.position = l, fc(o, "null byte is not allowed in input")), o.input += "\0"; o.input.charCodeAt(o.position) === 32; )
+ o.lineIndent += 1, o.position += 1;
+ for (; o.position < o.length - 1; )
+ $7n(o);
+ return o.documents;
+}
+var U7n = function(r, i, o) {
+ i !== null && typeof i == "object" && o === void 0 && (o = i, i = null);
+ var l = fLt(r, o);
+ if (typeof i != "function")
+ return l;
+ for (var f = 0, g = l.length; f < g; f += 1)
+ i(l[f]);
+}, H7n = aLt, j7n = function(r, i) {
+ var o = fLt(r, i);
+ if (o.length !== 0) {
+ if (o.length === 1)
+ return o[0];
+ throw new sL("expected a single document in the stream, but found more");
+ }
+};
+const dLt = /^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s, K7n = /%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi, z7n = /\s*%%.*\n/gm, hbe = {}, qRe = function(r, i) {
+ r = r.replace(dLt, "").replace(K7n, "").replace(z7n, `
+`);
+ for (const [o, { detector: l }] of Object.entries(hbe))
+ if (l(r, i))
+ return o;
+ throw new Error(`No diagram type detected for text: ${r}`);
+}, ALt = (...r) => {
+ for (const { id: i, detector: o, loader: l } of r)
+ gLt(i, o, l);
+}, gLt = (r, i, o) => {
+ hbe[r] ? _t.error(`Detector with key ${r} already exists`) : hbe[r] = { detector: i, loader: o }, _t.debug(`Detector with key ${r} added${o ? " with loader" : ""}`);
+}, DNe = function(r, i, o) {
+ const { depth: l, clobber: f } = Object.assign({ depth: 2, clobber: !1 }, o);
+ return Array.isArray(i) && !Array.isArray(r) ? (i.forEach((g) => DNe(r, g, o)), r) : Array.isArray(i) && Array.isArray(r) ? (i.forEach((g) => {
+ r.includes(g) || r.push(g);
+ }), r) : r === void 0 || l <= 0 ? r != null && typeof r == "object" && typeof i == "object" ? Object.assign(r, i) : i : (i !== void 0 && typeof r == "object" && typeof i == "object" && Object.keys(i).forEach((g) => {
+ typeof i[g] != "object" || r[g] !== void 0 && typeof r[g] != "object" ? (f || typeof r[g] != "object" && typeof i[g] != "object") && (r[g] = i[g]) : (r[g] === void 0 && (r[g] = Array.isArray(i[g]) ? [] : {}), r[g] = DNe(r[g], i[g], { depth: l - 1, clobber: f }));
+ }), r);
+}, p2 = DNe, G7n = { curveBasis: Rie, curveBasisClosed: function(r) {
+ return new OBt(r);
+}, curveBasisOpen: function(r) {
+ return new DBt(r);
+}, curveBumpX: function(r) {
+ return new Ext(r, !0);
+}, curveBumpY: function(r) {
+ return new Ext(r, !1);
+}, curveBundle: m6n, curveCardinalClosed: v6n, curveCardinalOpen: y6n, curveCardinal: b6n, curveCatmullRomClosed: k6n, curveCatmullRomOpen: x6n, curveCatmullRom: w6n, curveLinear: mk, curveLinearClosed: function(r) {
+ return new $Bt(r);
+}, curveMonotoneX: function(r) {
+ return new qpe(r);
+}, curveMonotoneY: function(r) {
+ return new UBt(r);
+}, curveNatural: function(r) {
+ return new jBt(r);
+}, curveStep: function(r) {
+ return new Ype(r, 0.5);
+}, curveStepAfter: function(r) {
+ return new Ype(r, 1);
+}, curveStepBefore: function(r) {
+ return new Ype(r, 0);
+} }, xOe = /%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi, X7n = /\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi, Q8t = function(r, i = null) {
+ try {
+ const o = new RegExp(`[%]{2}(?![{]${X7n.source})(?=[}][%]{2}).*
+`, "ig");
+ let l;
+ r = r.trim().replace(o, "").replace(/'/gm, '"'), _t.debug(`Detecting diagram directive${i !== null ? " type:" + i : ""} based on the text:${r}`);
+ const f = [];
+ for (; (l = xOe.exec(r)) !== null; )
+ if (l.index === xOe.lastIndex && xOe.lastIndex++, l && !i || i && l[1] && l[1].match(i) || i && l[2] && l[2].match(i)) {
+ const g = l[1] ? l[1] : l[2], A = l[3] ? l[3].trim() : l[4] ? JSON.parse(l[4].trim()) : null;
+ f.push({ type: g, args: A });
+ }
+ return f.length === 0 && f.push({ type: r, args: null }), f.length === 1 ? f[0] : f;
+ } catch (o) {
+ return _t.error(`ERROR: ${o.message} - Unable to parse directive
+ ${i !== null ? " type:" + i : ""} based on the text:${r}`), { type: null, args: null };
+ }
+};
+function $9(r, i) {
+ if (!r)
+ return i;
+ const o = `curve${r.charAt(0).toUpperCase() + r.slice(1)}`;
+ return G7n[o] || i;
+}
+function spe(r, i) {
+ return r && i ? Math.sqrt(Math.pow(i.x - r.x, 2) + Math.pow(i.y - r.y, 2)) : 0;
+}
+function OO(r) {
+ let i = "", o = "";
+ for (const l of r)
+ l !== void 0 && (l.startsWith("color:") || l.startsWith("text-align:") ? o = o + l + ";" : i = i + l + ";");
+ return { style: i, labelStyle: o };
+}
+let $8t = 0;
+const pLt = () => ($8t++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + $8t), mLt = (r) => function(i) {
+ let o = "";
+ const l = "0123456789abcdef";
+ for (let f = 0; f < i; f++)
+ o += l.charAt(Math.floor(16 * Math.random()));
+ return o;
+}(r.length), W7n = function(r, i) {
+ const o = i.text.replace(El.lineBreakRegex, " "), [, l] = Hie(i.fontSize), f = r.append("text");
+ f.attr("x", i.x), f.attr("y", i.y), f.style("text-anchor", i.anchor), f.style("font-family", i.fontFamily), f.style("font-size", l), f.style("font-weight", i.fontWeight), f.attr("fill", i.fill), i.class !== void 0 && f.attr("class", i.class);
+ const g = f.append("tspan");
+ return g.attr("x", i.x + 2 * i.textMargin), g.attr("fill", i.fill), g.text(o), f;
+}, bLt = bX((r, i, o) => {
+ if (!r || (o = Object.assign({ fontSize: 12, fontWeight: 400, fontFamily: "Arial", joinWith: "
" }, o), El.lineBreakRegex.test(r)))
+ return r;
+ const l = r.split(" "), f = [];
+ let g = "";
+ return l.forEach((A, b) => {
+ const v = IT(`${A} `, o), k = IT(g, o);
+ if (v > i) {
+ const { hyphenatedStrings: _, remainingWord: T } = V7n(A, i, "-", o);
+ f.push(g, ..._), g = T;
+ } else
+ k + v >= i ? (f.push(g), g = A) : g = [g, A].filter(Boolean).join(" ");
+ b + 1 === l.length && f.push(g);
+ }), f.filter((A) => A !== "").join(o.joinWith);
+}, (r, i, o) => `${r}${i}${o.fontSize}${o.fontWeight}${o.fontFamily}${o.joinWith}`), V7n = bX((r, i, o = "-", l) => {
+ l = Object.assign({ fontSize: 12, fontWeight: 400, fontFamily: "Arial", margin: 0 }, l);
+ const f = [...r], g = [];
+ let A = "";
+ return f.forEach((b, v) => {
+ const k = `${A}${b}`;
+ if (IT(k, l) >= i) {
+ const _ = v + 1, T = f.length === _, L = `${k}${o}`;
+ g.push(T ? k : L), A = "";
+ } else
+ A = k;
+ }), { hyphenatedStrings: g, remainingWord: A };
+}, (r, i, o = "-", l) => `${r}${i}${o}${l.fontSize}${l.fontWeight}${l.fontFamily}`);
+function NNe(r, i) {
+ return i = Object.assign({ fontSize: 12, fontWeight: 400, fontFamily: "Arial", margin: 15 }, i), YRe(r, i).height;
+}
+function IT(r, i) {
+ return i = Object.assign({ fontSize: 12, fontWeight: 400, fontFamily: "Arial" }, i), YRe(r, i).width;
+}
+const YRe = bX((r, i) => {
+ i = Object.assign({ fontSize: 12, fontWeight: 400, fontFamily: "Arial" }, i);
+ const { fontSize: o, fontFamily: l, fontWeight: f } = i;
+ if (!r)
+ return { width: 0, height: 0 };
+ const [, g] = Hie(o), A = ["sans-serif", l], b = r.split(El.lineBreakRegex), v = [], k = co("body");
+ if (!k.remove)
+ return { width: 0, height: 0, lineHeight: 0 };
+ const _ = k.append("svg");
+ for (const T of A) {
+ let L = 0;
+ const F = { width: 0, height: 0, lineHeight: 0 };
+ for (const U of b) {
+ const q = { x: 0, y: 0, fill: void 0, anchor: "start", style: "#666", width: 100, height: 100, textMargin: 0, rx: 0, ry: 0, valign: void 0 };
+ q.text = U;
+ const Z = W7n(_, q).style("font-size", g).style("font-weight", f).style("font-family", T), R = (Z._groups || Z)[0][0].getBBox();
+ F.width = Math.round(Math.max(F.width, R.width)), L = Math.round(R.height), F.height += L, F.lineHeight = Math.round(Math.max(F.lineHeight, L));
+ }
+ v.push(F);
+ }
+ return _.remove(), v[isNaN(v[1].height) || isNaN(v[1].width) || isNaN(v[1].lineHeight) || v[0].height > v[1].height && v[0].width > v[1].width && v[0].lineHeight > v[1].lineHeight ? 0 : 1];
+}, (r, i) => `${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);
+let cpe;
+const p$ = (r) => {
+ if (_t.debug("directiveSanitizer called with", r), typeof r == "object" && (r.length ? r.forEach((i) => p$(i)) : Object.keys(r).forEach((i) => {
+ _t.debug("Checking key", i), i.startsWith("__") && (_t.debug("sanitize deleting __ option", i), delete r[i]), i.includes("proto") && (_t.debug("sanitize deleting proto option", i), delete r[i]), i.includes("constr") && (_t.debug("sanitize deleting constr option", i), delete r[i]), i.includes("themeCSS") && (_t.debug("sanitizing themeCss option"), r[i] = hme(r[i])), i.includes("fontFamily") && (_t.debug("sanitizing fontFamily option"), r[i] = hme(r[i])), i.includes("altFontFamily") && (_t.debug("sanitizing altFontFamily option"), r[i] = hme(r[i])), ZCn.includes(i) ? typeof r[i] == "object" && (_t.debug("sanitize deleting object", i), p$(r[i])) : (_t.debug("sanitize deleting option", i), delete r[i]);
+ })), r.themeVariables) {
+ const i = Object.keys(r.themeVariables);
+ for (const o of i) {
+ const l = r.themeVariables[o];
+ l && l.match && !l.match(/^[\d "#%(),.;A-Za-z]+$/) && (r.themeVariables[o] = "");
+ }
+ }
+ _t.debug("After sanitization", r);
+}, hme = (r) => {
+ let i = 0, o = 0;
+ for (const l of r) {
+ if (i < o)
+ return "{ /* ERROR: Unbalanced CSS */ }";
+ l === "{" ? i++ : l === "}" && o++;
+ }
+ return i !== o ? "{ /* ERROR: Unbalanced CSS */ }" : r;
+};
+function JRe(r) {
+ return "str" in r;
+}
+const Hie = (r) => {
+ if (typeof r == "number")
+ return [r, r + "px"];
+ const i = parseInt(r, 10);
+ return Number.isNaN(i) ? [void 0, void 0] : r === String(i) ? [i, r + "px"] : [i, r];
+}, Tl = { assignWithDepth: p2, wrapLabel: bLt, calculateTextHeight: NNe, calculateTextWidth: IT, calculateTextDimensions: YRe, detectInit: function(r, i) {
+ const o = Q8t(r, /(?:init\b)|(?:initialize\b)/);
+ let l = {};
+ if (Array.isArray(o)) {
+ const f = o.map((g) => g.args);
+ p$(f), l = p2(l, [...f]);
+ } else
+ l = o.args;
+ if (l) {
+ let f = qRe(r, i);
+ ["config"].forEach((g) => {
+ l[g] !== void 0 && (f === "flowchart-v2" && (f = "flowchart"), l[f] = l[g], delete l[g]);
+ });
+ }
+ return l;
+}, detectDirective: Q8t, isSubstringInArray: function(r, i) {
+ for (const [o, l] of i.entries())
+ if (l.match(r))
+ return o;
+ return -1;
+}, interpolateToCurve: $9, calcLabelPosition: function(r) {
+ return r.length === 1 ? r[0] : function(i) {
+ let o, l = 0;
+ i.forEach((A) => {
+ l += spe(A, o), o = A;
+ });
+ let f, g = l / 2;
+ return o = void 0, i.forEach((A) => {
+ if (o && !f) {
+ const b = spe(A, o);
+ if (b < g)
+ g -= b;
+ else {
+ const v = g / b;
+ v <= 0 && (f = o), v >= 1 && (f = { x: A.x, y: A.y }), v > 0 && v < 1 && (f = { x: (1 - v) * o.x + v * A.x, y: (1 - v) * o.y + v * A.y });
+ }
+ }
+ o = A;
+ }), f;
+ }(r);
+}, calcCardinalityPosition: (r, i, o) => {
+ let l;
+ _t.info(`our points ${JSON.stringify(i)}`), i[0] !== o && (i = i.reverse());
+ let f, g = 25;
+ l = void 0, i.forEach((k) => {
+ if (l && !f) {
+ const _ = spe(k, l);
+ if (_ < g)
+ g -= _;
+ else {
+ const T = g / _;
+ T <= 0 && (f = l), T >= 1 && (f = { x: k.x, y: k.y }), T > 0 && T < 1 && (f = { x: (1 - T) * l.x + T * k.x, y: (1 - T) * l.y + T * k.y });
+ }
+ }
+ l = k;
+ });
+ const A = r ? 10 : 5, b = Math.atan2(i[0].y - f.y, i[0].x - f.x), v = { x: 0, y: 0 };
+ return v.x = Math.sin(b) * A + (i[0].x + f.x) / 2, v.y = -Math.cos(b) * A + (i[0].y + f.y) / 2, v;
+}, calcTerminalLabelPosition: function(r, i, o) {
+ let l, f = JSON.parse(JSON.stringify(o));
+ _t.info("our points", f), i !== "start_left" && i !== "start_right" && (f = f.reverse()), f.forEach((_) => {
+ l = _;
+ });
+ let g, A = 25 + r;
+ l = void 0, f.forEach((_) => {
+ if (l && !g) {
+ const T = spe(_, l);
+ if (T < A)
+ A -= T;
+ else {
+ const L = A / T;
+ L <= 0 && (g = l), L >= 1 && (g = { x: _.x, y: _.y }), L > 0 && L < 1 && (g = { x: (1 - L) * l.x + L * _.x, y: (1 - L) * l.y + L * _.y });
+ }
+ }
+ l = _;
+ });
+ const b = 10 + 0.5 * r, v = Math.atan2(f[0].y - g.y, f[0].x - g.x), k = { x: 0, y: 0 };
+ return k.x = Math.sin(v) * b + (f[0].x + g.x) / 2, k.y = -Math.cos(v) * b + (f[0].y + g.y) / 2, i === "start_left" && (k.x = Math.sin(v + Math.PI) * b + (f[0].x + g.x) / 2, k.y = -Math.cos(v + Math.PI) * b + (f[0].y + g.y) / 2), i === "end_right" && (k.x = Math.sin(v - Math.PI) * b + (f[0].x + g.x) / 2 - 5, k.y = -Math.cos(v - Math.PI) * b + (f[0].y + g.y) / 2 - 5), i === "end_left" && (k.x = Math.sin(v) * b + (f[0].x + g.x) / 2 - 5, k.y = -Math.cos(v) * b + (f[0].y + g.y) / 2 - 5), k;
+}, formatUrl: function(r, i) {
+ const o = r.trim();
+ if (o)
+ return i.securityLevel !== "loose" ? u$(o) : o;
+}, getStylesFromArray: OO, generateId: pLt, random: mLt, runFunc: (r, ...i) => {
+ const o = r.split("."), l = o.length - 1, f = o[l];
+ let g = window;
+ for (let A = 0; A < l; A++)
+ if (g = g[o[A]], !g)
+ return;
+ g[f](...i);
+}, entityDecode: function(r) {
+ return cpe = cpe || document.createElement("div"), r = escape(r).replace(/%26/g, "&").replace(/%23/g, "#").replace(/%3B/g, ";"), cpe.innerHTML = r, unescape(cpe.textContent);
+}, initIdGenerator: class {
+ constructor(r, i) {
+ this.deterministic = r, this.seed = i, this.count = i ? i.length : 0;
+ }
+ next() {
+ return this.deterministic ? this.count++ : Date.now();
+ }
+}, directiveSanitizer: p$, sanitizeCss: hme, insertTitle: (r, i, o, l) => {
+ if (!l)
+ return;
+ const f = r.node().getBBox();
+ r.append("text").text(l).attr("x", f.x + f.width / 2).attr("y", -o).attr("class", i);
+}, parseFontSize: Hie }, lpe = "9.4.3", LG = Object.freeze(e7n);
+let vLt, l5 = p2({}, LG), nX = [], Ire = p2({}, LG);
+const fbe = (r, i) => {
+ let o = p2({}, r), l = {};
+ for (const f of i)
+ wLt(f), l = p2(l, f);
+ if (o = p2(o, l), l.theme && l.theme in oL) {
+ const f = p2({}, vLt), g = p2(f.themeVariables || {}, l.themeVariables);
+ o.theme && o.theme in oL && (o.themeVariables = oL[o.theme].getThemeVariables(g));
+ }
+ return Ire = o, xLt(Ire), Ire;
+}, U8t = () => p2({}, l5), yLt = (r) => (xLt(r), p2(Ire, r), Bn()), Bn = () => p2({}, Ire), wLt = (r) => {
+ ["secure", ...l5.secure ?? []].forEach((i) => {
+ r[i] !== void 0 && (_t.debug(`Denied attempt to modify a secure key ${i}`, r[i]), delete r[i]);
+ }), Object.keys(r).forEach((i) => {
+ i.indexOf("__") === 0 && delete r[i];
+ }), Object.keys(r).forEach((i) => {
+ typeof r[i] == "string" && (r[i].includes("<") || r[i].includes(">") || r[i].includes("url(data:")) && delete r[i], typeof r[i] == "object" && wLt(r[i]);
+ });
+}, PNe = (r) => {
+ r.fontFamily && (r.themeVariables && r.themeVariables.fontFamily || (r.themeVariables = { fontFamily: r.fontFamily })), nX.push(r), fbe(l5, nX);
+}, hre = (r = l5) => {
+ nX = [], fbe(r, nX);
+};
+var kLt = ((r) => (r.LAZY_LOAD_DEPRECATED = "The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.", r))(kLt || {});
+const H8t = {}, xLt = (r) => {
+ var i;
+ r && (r.lazyLoadedDiagrams || r.loadExternalDiagramsAtStartup) && (H8t[i = "LAZY_LOAD_DEPRECATED"] || (_t.warn(kLt[i]), H8t[i] = !0));
+}, V9 = function(r, i, o, l) {
+ const f = function(g, A, b) {
+ let v = /* @__PURE__ */ new Map();
+ return b ? (v.set("width", "100%"), v.set("style", `max-width: ${A}px;`)) : (v.set("height", g), v.set("width", A)), v;
+ }(i, o, l);
+ (function(g, A) {
+ for (let b of A)
+ g.attr(b[0], b[1]);
+ })(r, f);
+}, vX = function(r, i, o, l) {
+ const f = i.node().getBBox(), g = f.width, A = f.height;
+ _t.info(`SVG bounds: ${g}x${A}`, f);
+ let b = 0, v = 0;
+ _t.info(`Graph bounds: ${b}x${v}`, r), b = g + 2 * o, v = A + 2 * o, _t.info(`Calculated bounds: ${b}x${v}`), V9(i, v, b, l);
+ const k = `${f.x - o} ${f.y - o} ${f.width + 2 * o} ${f.height + 2 * o}`;
+ i.attr("viewBox", k);
+}, Mre = (r) => `g.classGroup text {
+ fill: ${r.nodeBorder};
+ fill: ${r.classText};
+ stroke: none;
+ font-family: ${r.fontFamily};
+ font-size: 10px;
+
+ .title {
+ font-weight: bolder;
+ }
+
+}
+
+.nodeLabel, .edgeLabel {
+ color: ${r.classText};
+}
+.edgeLabel .label rect {
+ fill: ${r.mainBkg};
+}
+.label text {
+ fill: ${r.classText};
+}
+.edgeLabel .label span {
+ background: ${r.mainBkg};
+}
+
+.classTitle {
+ font-weight: bolder;
+}
+.node rect,
+ .node circle,
+ .node ellipse,
+ .node polygon,
+ .node path {
+ fill: ${r.mainBkg};
+ stroke: ${r.nodeBorder};
+ stroke-width: 1px;
+ }
+
+
+.divider {
+ stroke: ${r.nodeBorder};
+ stroke: 1;
+}
+
+g.clickable {
+ cursor: pointer;
+}
+
+g.classGroup rect {
+ fill: ${r.mainBkg};
+ stroke: ${r.nodeBorder};
+}
+
+g.classGroup line {
+ stroke: ${r.nodeBorder};
+ stroke-width: 1;
+}
+
+.classLabel .box {
+ stroke: none;
+ stroke-width: 0;
+ fill: ${r.mainBkg};
+ opacity: 0.5;
+}
+
+.classLabel .label {
+ fill: ${r.nodeBorder};
+ font-size: 10px;
+}
+
+.relation {
+ stroke: ${r.lineColor};
+ stroke-width: 1;
+ fill: none;
+}
+
+.dashed-line{
+ stroke-dasharray: 3;
+}
+
+.dotted-line{
+ stroke-dasharray: 1 2;
+}
+
+#compositionStart, .composition {
+ fill: ${r.lineColor} !important;
+ stroke: ${r.lineColor} !important;
+ stroke-width: 1;
+}
+
+#compositionEnd, .composition {
+ fill: ${r.lineColor} !important;
+ stroke: ${r.lineColor} !important;
+ stroke-width: 1;
+}
+
+#dependencyStart, .dependency {
+ fill: ${r.lineColor} !important;
+ stroke: ${r.lineColor} !important;
+ stroke-width: 1;
+}
+
+#dependencyStart, .dependency {
+ fill: ${r.lineColor} !important;
+ stroke: ${r.lineColor} !important;
+ stroke-width: 1;
+}
+
+#extensionStart, .extension {
+ fill: ${r.mainBkg} !important;
+ stroke: ${r.lineColor} !important;
+ stroke-width: 1;
+}
+
+#extensionEnd, .extension {
+ fill: ${r.mainBkg} !important;
+ stroke: ${r.lineColor} !important;
+ stroke-width: 1;
+}
+
+#aggregationStart, .aggregation {
+ fill: ${r.mainBkg} !important;
+ stroke: ${r.lineColor} !important;
+ stroke-width: 1;
+}
+
+#aggregationEnd, .aggregation {
+ fill: ${r.mainBkg} !important;
+ stroke: ${r.lineColor} !important;
+ stroke-width: 1;
+}
+
+#lollipopStart, .lollipop {
+ fill: ${r.mainBkg} !important;
+ stroke: ${r.lineColor} !important;
+ stroke-width: 1;
+}
+
+#lollipopEnd, .lollipop {
+ fill: ${r.mainBkg} !important;
+ stroke: ${r.lineColor} !important;
+ stroke-width: 1;
+}
+
+.edgeTerminals {
+ font-size: 11px;
+}
+
+.classTitleText {
+ text-anchor: middle;
+ font-size: 18px;
+ fill: ${r.textColor};
+}
+`, CLt = (r) => `
+ .entityBox {
+ fill: ${r.mainBkg};
+ stroke: ${r.nodeBorder};
+ }
+
+ .attributeBoxOdd {
+ fill: ${r.attributeBackgroundColorOdd};
+ stroke: ${r.nodeBorder};
+ }
+
+ .attributeBoxEven {
+ fill: ${r.attributeBackgroundColorEven};
+ stroke: ${r.nodeBorder};
+ }
+
+ .relationshipLabelBox {
+ fill: ${r.tertiaryColor};
+ opacity: 0.7;
+ background-color: ${r.tertiaryColor};
+ rect {
+ opacity: 0.5;
+ }
+ }
+
+ .relationshipLine {
+ stroke: ${r.lineColor};
+ }
+
+ .entityTitleText {
+ text-anchor: middle;
+ font-size: 18px;
+ fill: ${r.textColor};
+ }
+`, RNe = () => "", dbe = (r) => `.label {
+ font-family: ${r.fontFamily};
+ color: ${r.nodeTextColor || r.textColor};
+ }
+ .cluster-label text {
+ fill: ${r.titleColor};
+ }
+ .cluster-label span {
+ color: ${r.titleColor};
+ }
+
+ .label text,span {
+ fill: ${r.nodeTextColor || r.textColor};
+ color: ${r.nodeTextColor || r.textColor};
+ }
+
+ .node rect,
+ .node circle,
+ .node ellipse,
+ .node polygon,
+ .node path {
+ fill: ${r.mainBkg};
+ stroke: ${r.nodeBorder};
+ stroke-width: 1px;
+ }
+
+ .node .label {
+ text-align: center;
+ }
+ .node.clickable {
+ cursor: pointer;
+ }
+
+ .arrowheadPath {
+ fill: ${r.arrowheadColor};
+ }
+
+ .edgePath .path {
+ stroke: ${r.lineColor};
+ stroke-width: 2.0px;
+ }
+
+ .flowchart-link {
+ stroke: ${r.lineColor};
+ fill: none;
+ }
+
+ .edgeLabel {
+ background-color: ${r.edgeLabelBackground};
+ rect {
+ opacity: 0.5;
+ background-color: ${r.edgeLabelBackground};
+ fill: ${r.edgeLabelBackground};
+ }
+ text-align: center;
+ }
+
+ .cluster rect {
+ fill: ${r.clusterBkg};
+ stroke: ${r.clusterBorder};
+ stroke-width: 1px;
+ }
+
+ .cluster text {
+ fill: ${r.titleColor};
+ }
+
+ .cluster span {
+ color: ${r.titleColor};
+ }
+ /* .cluster div {
+ color: ${r.titleColor};
+ } */
+
+ div.mermaidTooltip {
+ position: absolute;
+ text-align: center;
+ max-width: 200px;
+ padding: 2px;
+ font-family: ${r.fontFamily};
+ font-size: 12px;
+ background: ${r.tertiaryColor};
+ border: 1px solid ${r.border2};
+ border-radius: 2px;
+ pointer-events: none;
+ z-index: 100;
+ }
+
+ .flowchartTitleText {
+ text-anchor: middle;
+ font-size: 18px;
+ fill: ${r.textColor};
+ }
+`, _Lt = (r) => `
+ .mermaid-main-font {
+ font-family: "trebuchet ms", verdana, arial, sans-serif;
+ font-family: var(--mermaid-font-family);
+ }
+ .exclude-range {
+ fill: ${r.excludeBkgColor};
+ }
+
+ .section {
+ stroke: none;
+ opacity: 0.2;
+ }
+
+ .section0 {
+ fill: ${r.sectionBkgColor};
+ }
+
+ .section2 {
+ fill: ${r.sectionBkgColor2};
+ }
+
+ .section1,
+ .section3 {
+ fill: ${r.altSectionBkgColor};
+ opacity: 0.2;
+ }
+
+ .sectionTitle0 {
+ fill: ${r.titleColor};
+ }
+
+ .sectionTitle1 {
+ fill: ${r.titleColor};
+ }
+
+ .sectionTitle2 {
+ fill: ${r.titleColor};
+ }
+
+ .sectionTitle3 {
+ fill: ${r.titleColor};
+ }
+
+ .sectionTitle {
+ text-anchor: start;
+ // font-size: ${r.ganttFontSize};
+ // text-height: 14px;
+ font-family: 'trebuchet ms', verdana, arial, sans-serif;
+ font-family: var(--mermaid-font-family);
+
+ }
+
+
+ /* Grid and axis */
+
+ .grid .tick {
+ stroke: ${r.gridColor};
+ opacity: 0.8;
+ shape-rendering: crispEdges;
+ text {
+ font-family: ${r.fontFamily};
+ fill: ${r.textColor};
+ }
+ }
+
+ .grid path {
+ stroke-width: 0;
+ }
+
+
+ /* Today line */
+
+ .today {
+ fill: none;
+ stroke: ${r.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: ${r.ganttFontSize};
+ // }
+
+ .taskTextOutsideRight {
+ fill: ${r.taskTextDarkColor};
+ text-anchor: start;
+ // font-size: ${r.ganttFontSize};
+ font-family: 'trebuchet ms', verdana, arial, sans-serif;
+ font-family: var(--mermaid-font-family);
+
+ }
+
+ .taskTextOutsideLeft {
+ fill: ${r.taskTextDarkColor};
+ text-anchor: end;
+ // font-size: ${r.ganttFontSize};
+ }
+
+ /* Special case clickable */
+ .task.clickable {
+ cursor: pointer;
+ }
+ .taskText.clickable {
+ cursor: pointer;
+ fill: ${r.taskTextClickableColor} !important;
+ font-weight: bold;
+ }
+
+ .taskTextOutsideLeft.clickable {
+ cursor: pointer;
+ fill: ${r.taskTextClickableColor} !important;
+ font-weight: bold;
+ }
+
+ .taskTextOutsideRight.clickable {
+ cursor: pointer;
+ fill: ${r.taskTextClickableColor} !important;
+ font-weight: bold;
+ }
+
+ /* Specific task settings for the sections*/
+
+ .taskText0,
+ .taskText1,
+ .taskText2,
+ .taskText3 {
+ fill: ${r.taskTextColor};
+ }
+
+ .task0,
+ .task1,
+ .task2,
+ .task3 {
+ fill: ${r.taskBkgColor};
+ stroke: ${r.taskBorderColor};
+ }
+
+ .taskTextOutside0,
+ .taskTextOutside2
+ {
+ fill: ${r.taskTextOutsideColor};
+ }
+
+ .taskTextOutside1,
+ .taskTextOutside3 {
+ fill: ${r.taskTextOutsideColor};
+ }
+
+
+ /* Active task */
+
+ .active0,
+ .active1,
+ .active2,
+ .active3 {
+ fill: ${r.activeTaskBkgColor};
+ stroke: ${r.activeTaskBorderColor};
+ }
+
+ .activeText0,
+ .activeText1,
+ .activeText2,
+ .activeText3 {
+ fill: ${r.taskTextDarkColor} !important;
+ }
+
+
+ /* Completed task */
+
+ .done0,
+ .done1,
+ .done2,
+ .done3 {
+ stroke: ${r.doneTaskBorderColor};
+ fill: ${r.doneTaskBkgColor};
+ stroke-width: 2;
+ }
+
+ .doneText0,
+ .doneText1,
+ .doneText2,
+ .doneText3 {
+ fill: ${r.taskTextDarkColor} !important;
+ }
+
+
+ /* Tasks on the critical line */
+
+ .crit0,
+ .crit1,
+ .crit2,
+ .crit3 {
+ stroke: ${r.critBorderColor};
+ fill: ${r.critBkgColor};
+ stroke-width: 2;
+ }
+
+ .activeCrit0,
+ .activeCrit1,
+ .activeCrit2,
+ .activeCrit3 {
+ stroke: ${r.critBorderColor};
+ fill: ${r.activeTaskBkgColor};
+ stroke-width: 2;
+ }
+
+ .doneCrit0,
+ .doneCrit1,
+ .doneCrit2,
+ .doneCrit3 {
+ stroke: ${r.critBorderColor};
+ fill: ${r.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: ${r.taskTextDarkColor} !important;
+ }
+
+ .activeCritText0,
+ .activeCritText1,
+ .activeCritText2,
+ .activeCritText3 {
+ fill: ${r.taskTextDarkColor} !important;
+ }
+
+ .titleText {
+ text-anchor: middle;
+ font-size: 18px;
+ fill: ${r.textColor} ;
+ font-family: 'trebuchet ms', verdana, arial, sans-serif;
+ font-family: var(--mermaid-font-family);
+ }
+`, ELt = () => "", TLt = (r) => `
+ .pieCircle{
+ stroke: ${r.pieStrokeColor};
+ stroke-width : ${r.pieStrokeWidth};
+ opacity : ${r.pieOpacity};
+ }
+ .pieTitleText {
+ text-anchor: middle;
+ font-size: ${r.pieTitleTextSize};
+ fill: ${r.pieTitleTextColor};
+ font-family: ${r.fontFamily};
+ }
+ .slice {
+ font-family: ${r.fontFamily};
+ fill: ${r.pieSectionTextColor};
+ font-size:${r.pieSectionTextSize};
+ // fill: white;
+ }
+ .legend text {
+ fill: ${r.pieLegendTextColor};
+ font-family: ${r.fontFamily};
+ font-size: ${r.pieLegendTextSize};
+ }
+`, BLt = (r) => `
+
+ marker {
+ fill: ${r.relationColor};
+ stroke: ${r.relationColor};
+ }
+
+ marker.cross {
+ stroke: ${r.lineColor};
+ }
+
+ svg {
+ font-family: ${r.fontFamily};
+ font-size: ${r.fontSize};
+ }
+
+ .reqBox {
+ fill: ${r.requirementBackground};
+ fill-opacity: 100%;
+ stroke: ${r.requirementBorderColor};
+ stroke-width: ${r.requirementBorderSize};
+ }
+
+ .reqTitle, .reqLabel{
+ fill: ${r.requirementTextColor};
+ }
+ .reqLabelBox {
+ fill: ${r.relationLabelBackground};
+ fill-opacity: 100%;
+ }
+
+ .req-title-line {
+ stroke: ${r.requirementBorderColor};
+ stroke-width: ${r.requirementBorderSize};
+ }
+ .relationshipLine {
+ stroke: ${r.relationColor};
+ stroke-width: 1;
+ }
+ .relationshipLabel {
+ fill: ${r.relationLabelColor};
+ }
+
+`, SLt = (r) => `.actor {
+ stroke: ${r.actorBorder};
+ fill: ${r.actorBkg};
+ }
+
+ text.actor > tspan {
+ fill: ${r.actorTextColor};
+ stroke: none;
+ }
+
+ .actor-line {
+ stroke: ${r.actorLineColor};
+ }
+
+ .messageLine0 {
+ stroke-width: 1.5;
+ stroke-dasharray: none;
+ stroke: ${r.signalColor};
+ }
+
+ .messageLine1 {
+ stroke-width: 1.5;
+ stroke-dasharray: 2, 2;
+ stroke: ${r.signalColor};
+ }
+
+ #arrowhead path {
+ fill: ${r.signalColor};
+ stroke: ${r.signalColor};
+ }
+
+ .sequenceNumber {
+ fill: ${r.sequenceNumberColor};
+ }
+
+ #sequencenumber {
+ fill: ${r.signalColor};
+ }
+
+ #crosshead path {
+ fill: ${r.signalColor};
+ stroke: ${r.signalColor};
+ }
+
+ .messageText {
+ fill: ${r.signalTextColor};
+ stroke: none;
+ }
+
+ .labelBox {
+ stroke: ${r.labelBoxBorderColor};
+ fill: ${r.labelBoxBkgColor};
+ }
+
+ .labelText, .labelText > tspan {
+ fill: ${r.labelTextColor};
+ stroke: none;
+ }
+
+ .loopText, .loopText > tspan {
+ fill: ${r.loopTextColor};
+ stroke: none;
+ }
+
+ .loopLine {
+ stroke-width: 2px;
+ stroke-dasharray: 2, 2;
+ stroke: ${r.labelBoxBorderColor};
+ fill: ${r.labelBoxBorderColor};
+ }
+
+ .note {
+ //stroke: #decc93;
+ stroke: ${r.noteBorderColor};
+ fill: ${r.noteBkgColor};
+ }
+
+ .noteText, .noteText > tspan {
+ fill: ${r.noteTextColor};
+ stroke: none;
+ }
+
+ .activation0 {
+ fill: ${r.activationBkgColor};
+ stroke: ${r.activationBorderColor};
+ }
+
+ .activation1 {
+ fill: ${r.activationBkgColor};
+ stroke: ${r.activationBorderColor};
+ }
+
+ .activation2 {
+ fill: ${r.activationBkgColor};
+ stroke: ${r.activationBorderColor};
+ }
+
+ .actorPopupMenu {
+ position: absolute;
+ }
+
+ .actorPopupMenuPanel {
+ position: absolute;
+ fill: ${r.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: ${r.actorBorder};
+ fill: ${r.actorBkg};
+ }
+ .actor-man circle, line {
+ stroke: ${r.actorBorder};
+ fill: ${r.actorBkg};
+ stroke-width: 2px;
+ }
+`, Abe = (r) => `
+defs #statediagram-barbEnd {
+ fill: ${r.transitionColor};
+ stroke: ${r.transitionColor};
+ }
+g.stateGroup text {
+ fill: ${r.nodeBorder};
+ stroke: none;
+ font-size: 10px;
+}
+g.stateGroup text {
+ fill: ${r.textColor};
+ stroke: none;
+ font-size: 10px;
+
+}
+g.stateGroup .state-title {
+ font-weight: bolder;
+ fill: ${r.stateLabelColor};
+}
+
+g.stateGroup rect {
+ fill: ${r.mainBkg};
+ stroke: ${r.nodeBorder};
+}
+
+g.stateGroup line {
+ stroke: ${r.lineColor};
+ stroke-width: 1;
+}
+
+.transition {
+ stroke: ${r.transitionColor};
+ stroke-width: 1;
+ fill: none;
+}
+
+.stateGroup .composit {
+ fill: ${r.background};
+ border-bottom: 1px
+}
+
+.stateGroup .alt-composit {
+ fill: #e0e0e0;
+ border-bottom: 1px
+}
+
+.state-note {
+ stroke: ${r.noteBorderColor};
+ fill: ${r.noteBkgColor};
+
+ text {
+ fill: ${r.noteTextColor};
+ stroke: none;
+ font-size: 10px;
+ }
+}
+
+.stateLabel .box {
+ stroke: none;
+ stroke-width: 0;
+ fill: ${r.mainBkg};
+ opacity: 0.5;
+}
+
+.edgeLabel .label rect {
+ fill: ${r.labelBackgroundColor};
+ opacity: 0.5;
+}
+.edgeLabel .label text {
+ fill: ${r.transitionLabelColor || r.tertiaryTextColor};
+}
+.label div .edgeLabel {
+ color: ${r.transitionLabelColor || r.tertiaryTextColor};
+}
+
+.stateLabel text {
+ fill: ${r.stateLabelColor};
+ font-size: 10px;
+ font-weight: bold;
+}
+
+.node circle.state-start {
+ fill: ${r.specialStateColor};
+ stroke: ${r.specialStateColor};
+}
+
+.node .fork-join {
+ fill: ${r.specialStateColor};
+ stroke: ${r.specialStateColor};
+}
+
+.node circle.state-end {
+ fill: ${r.innerEndBackground};
+ stroke: ${r.background};
+ stroke-width: 1.5
+}
+.end-state-inner {
+ fill: ${r.compositeBackground || r.background};
+ // stroke: ${r.background};
+ stroke-width: 1.5
+}
+
+.node rect {
+ fill: ${r.stateBkg || r.mainBkg};
+ stroke: ${r.stateBorder || r.nodeBorder};
+ stroke-width: 1px;
+}
+.node polygon {
+ fill: ${r.mainBkg};
+ stroke: ${r.stateBorder || r.nodeBorder};;
+ stroke-width: 1px;
+}
+#statediagram-barbEnd {
+ fill: ${r.lineColor};
+}
+
+.statediagram-cluster rect {
+ fill: ${r.compositeTitleBackground};
+ stroke: ${r.stateBorder || r.nodeBorder};
+ stroke-width: 1px;
+}
+
+.cluster-label, .nodeLabel {
+ color: ${r.stateLabelColor};
+}
+
+.statediagram-cluster rect.outer {
+ rx: 5px;
+ ry: 5px;
+}
+.statediagram-state .divider {
+ stroke: ${r.stateBorder || r.nodeBorder};
+}
+
+.statediagram-state .title-state {
+ rx: 5px;
+ ry: 5px;
+}
+.statediagram-cluster.statediagram-cluster .inner {
+ fill: ${r.compositeBackground || r.background};
+}
+.statediagram-cluster.statediagram-cluster-alt .inner {
+ fill: ${r.altBackground ? r.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: ${r.altBackground ? r.altBackground : "#efefef"};
+}
+
+.note-edge {
+ stroke-dasharray: 5;
+}
+
+.statediagram-note rect {
+ fill: ${r.noteBkgColor};
+ stroke: ${r.noteBorderColor};
+ stroke-width: 1px;
+ rx: 0;
+ ry: 0;
+}
+.statediagram-note rect {
+ fill: ${r.noteBkgColor};
+ stroke: ${r.noteBorderColor};
+ stroke-width: 1px;
+ rx: 0;
+ ry: 0;
+}
+
+.statediagram-note text {
+ fill: ${r.noteTextColor};
+}
+
+.statediagram-note .nodeLabel {
+ color: ${r.noteTextColor};
+}
+.statediagram .edgeLabel {
+ color: red; // ${r.noteTextColor};
+}
+
+#dependencyStart, #dependencyEnd {
+ fill: ${r.lineColor};
+ stroke: ${r.lineColor};
+ stroke-width: 1;
+}
+
+.statediagramTitleText {
+ text-anchor: middle;
+ font-size: 18px;
+ fill: ${r.textColor};
+}
+`, LLt = (r) => `.label {
+ font-family: 'trebuchet ms', verdana, arial, sans-serif;
+ font-family: var(--mermaid-font-family);
+ color: ${r.textColor};
+ }
+ .mouth {
+ stroke: #666;
+ }
+
+ line {
+ stroke: ${r.textColor}
+ }
+
+ .legend {
+ fill: ${r.textColor};
+ }
+
+ .label text {
+ fill: #333;
+ }
+ .label {
+ color: ${r.textColor}
+ }
+
+ .face {
+ ${r.faceColor ? `fill: ${r.faceColor}` : "fill: #FFF8DC"};
+ stroke: #999;
+ }
+
+ .node rect,
+ .node circle,
+ .node ellipse,
+ .node polygon,
+ .node path {
+ fill: ${r.mainBkg};
+ stroke: ${r.nodeBorder};
+ stroke-width: 1px;
+ }
+
+ .node .label {
+ text-align: center;
+ }
+ .node.clickable {
+ cursor: pointer;
+ }
+
+ .arrowheadPath {
+ fill: ${r.arrowheadColor};
+ }
+
+ .edgePath .path {
+ stroke: ${r.lineColor};
+ stroke-width: 1.5px;
+ }
+
+ .flowchart-link {
+ stroke: ${r.lineColor};
+ fill: none;
+ }
+
+ .edgeLabel {
+ background-color: ${r.edgeLabelBackground};
+ rect {
+ opacity: 0.5;
+ }
+ text-align: center;
+ }
+
+ .cluster rect {
+ }
+
+ .cluster text {
+ fill: ${r.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: ${r.tertiaryColor};
+ border: 1px solid ${r.border2};
+ border-radius: 2px;
+ pointer-events: none;
+ z-index: 100;
+ }
+
+ .task-type-0, .section-type-0 {
+ ${r.fillType0 ? `fill: ${r.fillType0}` : ""};
+ }
+ .task-type-1, .section-type-1 {
+ ${r.fillType0 ? `fill: ${r.fillType1}` : ""};
+ }
+ .task-type-2, .section-type-2 {
+ ${r.fillType0 ? `fill: ${r.fillType2}` : ""};
+ }
+ .task-type-3, .section-type-3 {
+ ${r.fillType0 ? `fill: ${r.fillType3}` : ""};
+ }
+ .task-type-4, .section-type-4 {
+ ${r.fillType0 ? `fill: ${r.fillType4}` : ""};
+ }
+ .task-type-5, .section-type-5 {
+ ${r.fillType0 ? `fill: ${r.fillType5}` : ""};
+ }
+ .task-type-6, .section-type-6 {
+ ${r.fillType0 ? `fill: ${r.fillType6}` : ""};
+ }
+ .task-type-7, .section-type-7 {
+ ${r.fillType0 ? `fill: ${r.fillType7}` : ""};
+ }
+
+ .actor-0 {
+ ${r.actor0 ? `fill: ${r.actor0}` : ""};
+ }
+ .actor-1 {
+ ${r.actor1 ? `fill: ${r.actor1}` : ""};
+ }
+ .actor-2 {
+ ${r.actor2 ? `fill: ${r.actor2}` : ""};
+ }
+ .actor-3 {
+ ${r.actor3 ? `fill: ${r.actor3}` : ""};
+ }
+ .actor-4 {
+ ${r.actor4 ? `fill: ${r.actor4}` : ""};
+ }
+ .actor-5 {
+ ${r.actor5 ? `fill: ${r.actor5}` : ""};
+ }
+`, ILt = (r) => `.person {
+ stroke: ${r.personBorder};
+ fill: ${r.personBkg};
+ }
+`, fme = { flowchart: dbe, "flowchart-v2": dbe, sequence: SLt, gantt: _Lt, classDiagram: Mre, "classDiagram-v2": Mre, class: Mre, stateDiagram: Abe, state: Abe, info: ELt, pie: TLt, er: CLt, error: RNe, journey: LLt, requirement: BLt, c4: ILt }, q7n = (r, i, o) => {
+ let l = "";
+ return r in fme && fme[r] ? l = fme[r](o) : _t.warn(`No theme found for ${r}`), ` & {
+ font-family: ${o.fontFamily};
+ font-size: ${o.fontSize};
+ fill: ${o.textColor}
+ }
+
+ /* Classes common for multiple diagrams */
+
+ & .error-icon {
+ fill: ${o.errorBkgColor};
+ }
+ & .error-text {
+ fill: ${o.errorTextColor};
+ stroke: ${o.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: ${o.lineColor};
+ stroke: ${o.lineColor};
+ }
+ & .marker.cross {
+ stroke: ${o.lineColor};
+ }
+
+ & svg {
+ font-family: ${o.fontFamily};
+ font-size: ${o.fontSize};
+ }
+
+ ${l}
+
+ ${i}
+`;
+};
+let ZRe = "", f2e = "", eQe = "";
+const tQe = (r) => yk(r, Bn()), w5 = function() {
+ ZRe = "", eQe = "", f2e = "";
+}, k5 = function(r) {
+ ZRe = tQe(r).replace(/^\s+/g, "");
+}, _k = function() {
+ return ZRe || f2e;
+}, Ek = function(r) {
+ eQe = tQe(r).replace(/\n\s+/g, `
+`);
+}, Tk = function() {
+ return eQe;
+}, q9 = function(r) {
+ f2e = tQe(r);
+}, Y9 = function() {
+ return f2e;
+}, Y7n = { setAccTitle: k5, getAccTitle: _k, setDiagramTitle: q9, getDiagramTitle: Y9, getAccDescription: Tk, setAccDescription: Ek, clear: w5 }, MLt = Object.freeze(Object.defineProperty({ __proto__: null, clear: w5, default: Y7n, getAccDescription: Tk, getAccTitle: _k, getDiagramTitle: Y9, setAccDescription: Ek, setAccTitle: k5, setDiagramTitle: q9 }, Symbol.toStringTag, { value: "Module" }));
+let OQ = {};
+const nQe = function(r, i, o, l) {
+ _t.debug("parseDirective is being called", i, o, l);
+ try {
+ if (i !== void 0)
+ switch (i = i.trim(), o) {
+ case "open_directive":
+ OQ = {};
+ break;
+ case "type_directive":
+ if (!OQ)
+ throw new Error("currentDirective is undefined");
+ OQ.type = i.toLowerCase();
+ break;
+ case "arg_directive":
+ if (!OQ)
+ throw new Error("currentDirective is undefined");
+ OQ.args = JSON.parse(i);
+ break;
+ case "close_directive":
+ J7n(r, OQ, l), OQ = void 0;
+ }
+ } catch (f) {
+ _t.error(`Error while rendering sequenceDiagram directive: ${i} jison context: ${o}`), _t.error(f.message);
+ }
+}, J7n = function(r, i, o) {
+ switch (_t.info(`Directive type=${i.type} with args:`, i.args), i.type) {
+ case "init":
+ case "initialize":
+ ["config"].forEach((l) => {
+ i.args[l] !== void 0 && (o === "flowchart-v2" && (o = "flowchart"), i.args[o] = i.args[l], delete i.args[l]);
+ }), _t.info("sanitize in handleDirective", i.args), p$(i.args), _t.info("sanitize in handleDirective (done)", i.args), PNe(i.args);
+ break;
+ case "wrap":
+ case "nowrap":
+ r && r.setWrap && r.setWrap(i.type === "wrap");
+ break;
+ case "themeCss":
+ _t.warn("themeCss encountered");
+ break;
+ default:
+ _t.warn(`Unhandled directive: source: '%%{${i.type}: ${JSON.stringify(i.args ? i.args : {})}}%%`, i);
+ }
+}, Z7n = _t, e9n = WRe, jie = Bn, t9n = (r) => yk(r, jie()), FLt = vX, n9n = (r, i, o, l) => nQe(r, i, o, l), gbe = {}, ob = (r, i, o) => {
+ if (gbe[r])
+ throw new Error(`Diagram ${r} already registered.`);
+ var l, f;
+ gbe[r] = i, o && gLt(r, o), l = r, f = i.styles, fme[l] = f, i.injectUtils && i.injectUtils(Z7n, e9n, jie, t9n, FLt, MLt, n9n);
+}, OLt = (r) => {
+ if (r in gbe)
+ return gbe[r];
+ throw new Error(`Diagram ${r} not found.`);
+};
+var QNe = function() {
+ var r, i = function(de, Te, xe, ie) {
+ for (xe = xe || {}, ie = de.length; ie--; xe[de[ie]] = Te)
+ ;
+ return xe;
+ }, o = [1, 4], l = [1, 7], f = [1, 5], g = [1, 9], A = [1, 6], b = [2, 6], v = [1, 16], k = [6, 8, 14, 20, 22, 24, 25, 27, 29, 32, 37, 40, 50, 55], _ = [8, 14, 20, 22, 24, 25, 27, 29, 32, 37, 40], T = [8, 13, 14, 20, 22, 24, 25, 27, 29, 32, 37, 40], L = [1, 26], F = [6, 8, 14, 50, 55], U = [8, 14, 55], q = [1, 53], Z = [1, 52], R = [8, 14, 30, 33, 35, 38, 55], J = [1, 67], he = [1, 68], Y = [1, 69], ue = [8, 14, 33, 35, 42, 55], le = { 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(de, Te, xe, ie, Be, te, Me) {
+ var ve = te.length - 1;
+ switch (Be) {
+ case 3:
+ return te[ve];
+ case 4:
+ return te[ve - 1];
+ case 5:
+ return ie.setDirection(te[ve - 3]), te[ve - 1];
+ case 7:
+ ie.setOptions(te[ve - 1]), this.$ = te[ve];
+ break;
+ case 8:
+ te[ve - 1] += te[ve], this.$ = te[ve - 1];
+ break;
+ case 10:
+ this.$ = [];
+ break;
+ case 11:
+ te[ve - 1].push(te[ve]), this.$ = te[ve - 1];
+ break;
+ case 12:
+ this.$ = te[ve - 1];
+ break;
+ case 17:
+ this.$ = te[ve].trim(), ie.setAccTitle(this.$);
+ break;
+ case 18:
+ case 19:
+ this.$ = te[ve].trim(), ie.setAccDescription(this.$);
+ break;
+ case 20:
+ ie.addSection(te[ve].substr(8)), this.$ = te[ve].substr(8);
+ break;
+ case 22:
+ ie.checkout(te[ve]);
+ break;
+ case 23:
+ ie.branch(te[ve]);
+ break;
+ case 24:
+ ie.branch(te[ve - 2], te[ve]);
+ break;
+ case 25:
+ ie.cherryPick(te[ve], "", void 0);
+ break;
+ case 26:
+ ie.cherryPick(te[ve - 2], "", te[ve]);
+ break;
+ case 27:
+ case 29:
+ ie.cherryPick(te[ve - 2], "", "");
+ break;
+ case 28:
+ ie.cherryPick(te[ve], "", te[ve - 2]);
+ break;
+ case 30:
+ ie.merge(te[ve], "", "", "");
+ break;
+ case 31:
+ ie.merge(te[ve - 2], te[ve], "", "");
+ break;
+ case 32:
+ ie.merge(te[ve - 2], "", te[ve], "");
+ break;
+ case 33:
+ ie.merge(te[ve - 2], "", "", te[ve]);
+ break;
+ case 34:
+ ie.merge(te[ve - 4], te[ve], "", te[ve - 2]);
+ break;
+ case 35:
+ ie.merge(te[ve - 4], "", te[ve], te[ve - 2]);
+ break;
+ case 36:
+ ie.merge(te[ve - 4], "", te[ve - 2], te[ve]);
+ break;
+ case 37:
+ ie.merge(te[ve - 4], te[ve - 2], te[ve], "");
+ break;
+ case 38:
+ ie.merge(te[ve - 4], te[ve - 2], "", te[ve]);
+ break;
+ case 39:
+ ie.merge(te[ve - 4], te[ve], te[ve - 2], "");
+ break;
+ case 40:
+ ie.merge(te[ve - 6], te[ve - 4], te[ve - 2], te[ve]);
+ break;
+ case 41:
+ ie.merge(te[ve - 6], te[ve], te[ve - 4], te[ve - 2]);
+ break;
+ case 42:
+ ie.merge(te[ve - 6], te[ve - 4], te[ve], te[ve - 2]);
+ break;
+ case 43:
+ ie.merge(te[ve - 6], te[ve - 2], te[ve - 4], te[ve]);
+ break;
+ case 44:
+ ie.merge(te[ve - 6], te[ve], te[ve - 2], te[ve - 4]);
+ break;
+ case 45:
+ ie.merge(te[ve - 6], te[ve - 2], te[ve], te[ve - 4]);
+ break;
+ case 46:
+ ie.commit(te[ve]);
+ break;
+ case 47:
+ ie.commit("", "", ie.commitType.NORMAL, te[ve]);
+ break;
+ case 48:
+ ie.commit("", "", te[ve], "");
+ break;
+ case 49:
+ ie.commit("", "", te[ve], te[ve - 2]);
+ break;
+ case 50:
+ ie.commit("", "", te[ve - 2], te[ve]);
+ break;
+ case 51:
+ ie.commit("", te[ve], ie.commitType.NORMAL, "");
+ break;
+ case 52:
+ ie.commit("", te[ve - 2], ie.commitType.NORMAL, te[ve]);
+ break;
+ case 53:
+ ie.commit("", te[ve], ie.commitType.NORMAL, te[ve - 2]);
+ break;
+ case 54:
+ ie.commit("", te[ve - 2], te[ve], "");
+ break;
+ case 55:
+ ie.commit("", te[ve], te[ve - 2], "");
+ break;
+ case 56:
+ ie.commit("", te[ve - 4], te[ve - 2], te[ve]);
+ break;
+ case 57:
+ ie.commit("", te[ve - 4], te[ve], te[ve - 2]);
+ break;
+ case 58:
+ ie.commit("", te[ve - 2], te[ve - 4], te[ve]);
+ break;
+ case 59:
+ ie.commit("", te[ve], te[ve - 4], te[ve - 2]);
+ break;
+ case 60:
+ ie.commit("", te[ve], te[ve - 2], te[ve - 4]);
+ break;
+ case 61:
+ ie.commit("", te[ve - 2], te[ve], te[ve - 4]);
+ break;
+ case 62:
+ ie.commit(te[ve], "", ie.commitType.NORMAL, "");
+ break;
+ case 63:
+ ie.commit(te[ve], "", ie.commitType.NORMAL, te[ve - 2]);
+ break;
+ case 64:
+ ie.commit(te[ve - 2], "", ie.commitType.NORMAL, te[ve]);
+ break;
+ case 65:
+ ie.commit(te[ve - 2], "", te[ve], "");
+ break;
+ case 66:
+ ie.commit(te[ve], "", te[ve - 2], "");
+ break;
+ case 67:
+ ie.commit(te[ve], te[ve - 2], ie.commitType.NORMAL, "");
+ break;
+ case 68:
+ ie.commit(te[ve - 2], te[ve], ie.commitType.NORMAL, "");
+ break;
+ case 69:
+ ie.commit(te[ve - 4], "", te[ve - 2], te[ve]);
+ break;
+ case 70:
+ ie.commit(te[ve - 4], "", te[ve], te[ve - 2]);
+ break;
+ case 71:
+ ie.commit(te[ve - 2], "", te[ve - 4], te[ve]);
+ break;
+ case 72:
+ ie.commit(te[ve], "", te[ve - 4], te[ve - 2]);
+ break;
+ case 73:
+ ie.commit(te[ve], "", te[ve - 2], te[ve - 4]);
+ break;
+ case 74:
+ ie.commit(te[ve - 2], "", te[ve], te[ve - 4]);
+ break;
+ case 75:
+ ie.commit(te[ve - 4], te[ve], te[ve - 2], "");
+ break;
+ case 76:
+ ie.commit(te[ve - 4], te[ve - 2], te[ve], "");
+ break;
+ case 77:
+ ie.commit(te[ve - 2], te[ve], te[ve - 4], "");
+ break;
+ case 78:
+ ie.commit(te[ve], te[ve - 2], te[ve - 4], "");
+ break;
+ case 79:
+ ie.commit(te[ve], te[ve - 4], te[ve - 2], "");
+ break;
+ case 80:
+ ie.commit(te[ve - 2], te[ve - 4], te[ve], "");
+ break;
+ case 81:
+ ie.commit(te[ve - 4], te[ve], ie.commitType.NORMAL, te[ve - 2]);
+ break;
+ case 82:
+ ie.commit(te[ve - 4], te[ve - 2], ie.commitType.NORMAL, te[ve]);
+ break;
+ case 83:
+ ie.commit(te[ve - 2], te[ve], ie.commitType.NORMAL, te[ve - 4]);
+ break;
+ case 84:
+ ie.commit(te[ve], te[ve - 2], ie.commitType.NORMAL, te[ve - 4]);
+ break;
+ case 85:
+ ie.commit(te[ve], te[ve - 4], ie.commitType.NORMAL, te[ve - 2]);
+ break;
+ case 86:
+ ie.commit(te[ve - 2], te[ve - 4], ie.commitType.NORMAL, te[ve]);
+ break;
+ case 87:
+ ie.commit(te[ve - 6], te[ve - 4], te[ve - 2], te[ve]);
+ break;
+ case 88:
+ ie.commit(te[ve - 6], te[ve - 4], te[ve], te[ve - 2]);
+ break;
+ case 89:
+ ie.commit(te[ve - 6], te[ve - 2], te[ve - 4], te[ve]);
+ break;
+ case 90:
+ ie.commit(te[ve - 6], te[ve], te[ve - 4], te[ve - 2]);
+ break;
+ case 91:
+ ie.commit(te[ve - 6], te[ve - 2], te[ve], te[ve - 4]);
+ break;
+ case 92:
+ ie.commit(te[ve - 6], te[ve], te[ve - 2], te[ve - 4]);
+ break;
+ case 93:
+ ie.commit(te[ve - 4], te[ve - 6], te[ve - 2], te[ve]);
+ break;
+ case 94:
+ ie.commit(te[ve - 4], te[ve - 6], te[ve], te[ve - 2]);
+ break;
+ case 95:
+ ie.commit(te[ve - 2], te[ve - 6], te[ve - 4], te[ve]);
+ break;
+ case 96:
+ ie.commit(te[ve], te[ve - 6], te[ve - 4], te[ve - 2]);
+ break;
+ case 97:
+ ie.commit(te[ve - 2], te[ve - 6], te[ve], te[ve - 4]);
+ break;
+ case 98:
+ ie.commit(te[ve], te[ve - 6], te[ve - 2], te[ve - 4]);
+ break;
+ case 99:
+ ie.commit(te[ve], te[ve - 4], te[ve - 2], te[ve - 6]);
+ break;
+ case 100:
+ ie.commit(te[ve - 2], te[ve - 4], te[ve], te[ve - 6]);
+ break;
+ case 101:
+ ie.commit(te[ve], te[ve - 2], te[ve - 4], te[ve - 6]);
+ break;
+ case 102:
+ ie.commit(te[ve - 2], te[ve], te[ve - 4], te[ve - 6]);
+ break;
+ case 103:
+ ie.commit(te[ve - 4], te[ve - 2], te[ve], te[ve - 6]);
+ break;
+ case 104:
+ ie.commit(te[ve - 4], te[ve], te[ve - 2], te[ve - 6]);
+ break;
+ case 105:
+ ie.commit(te[ve - 2], te[ve - 4], te[ve - 6], te[ve]);
+ break;
+ case 106:
+ ie.commit(te[ve], te[ve - 4], te[ve - 6], te[ve - 2]);
+ break;
+ case 107:
+ ie.commit(te[ve - 2], te[ve], te[ve - 6], te[ve - 4]);
+ break;
+ case 108:
+ ie.commit(te[ve], te[ve - 2], te[ve - 6], te[ve - 4]);
+ break;
+ case 109:
+ ie.commit(te[ve - 4], te[ve - 2], te[ve - 6], te[ve]);
+ break;
+ case 110:
+ ie.commit(te[ve - 4], te[ve], te[ve - 6], te[ve - 2]);
+ break;
+ case 111:
+ this.$ = "";
+ break;
+ case 112:
+ this.$ = te[ve];
+ break;
+ case 113:
+ this.$ = ie.commitType.NORMAL;
+ break;
+ case 114:
+ this.$ = ie.commitType.REVERSE;
+ break;
+ case 115:
+ this.$ = ie.commitType.HIGHLIGHT;
+ break;
+ case 118:
+ ie.parseDirective("%%{", "open_directive");
+ break;
+ case 119:
+ ie.parseDirective(te[ve], "type_directive");
+ break;
+ case 120:
+ te[ve] = te[ve].trim().replace(/'/g, '"'), ie.parseDirective(te[ve], "arg_directive");
+ break;
+ case 121:
+ ie.parseDirective("}%%", "close_directive", "gitGraph");
+ }
+ }, table: [{ 3: 1, 4: 2, 5: 3, 6: o, 8: l, 14: f, 46: 8, 50: g, 55: A }, { 1: [3] }, { 3: 10, 4: 2, 5: 3, 6: o, 8: l, 14: f, 46: 8, 50: g, 55: A }, { 3: 11, 4: 2, 5: 3, 6: o, 8: l, 14: f, 46: 8, 50: g, 55: A }, { 7: 12, 8: b, 9: [1, 13], 10: [1, 14], 11: 15, 14: v }, i(k, [2, 124]), i(k, [2, 125]), i(k, [2, 126]), { 47: 17, 51: [1, 18] }, { 51: [2, 118] }, { 1: [2, 1] }, { 1: [2, 2] }, { 8: [1, 19] }, { 7: 20, 8: b, 11: 15, 14: v }, { 9: [1, 21] }, i(_, [2, 10], { 12: 22, 13: [1, 23] }), i(T, [2, 9]), { 9: [1, 25], 48: 24, 53: L }, i([9, 53], [2, 119]), { 1: [2, 3] }, { 8: [1, 27] }, { 7: 28, 8: b, 11: 15, 14: v }, { 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] }, i(T, [2, 8]), i(F, [2, 116]), { 49: 45, 52: [1, 46] }, i(F, [2, 121]), { 1: [2, 4] }, { 8: [1, 47] }, i(_, [2, 11]), { 4: 48, 8: l, 14: f, 55: A }, i(_, [2, 13]), i(U, [2, 14]), i(U, [2, 15]), i(U, [2, 16]), { 21: [1, 49] }, { 23: [1, 50] }, i(U, [2, 19]), i(U, [2, 20]), i(U, [2, 21]), { 28: 51, 34: q, 54: Z }, i(U, [2, 111], { 41: 54, 33: [1, 57], 34: [1, 59], 35: [1, 55], 38: [1, 56], 42: [1, 58] }), { 28: 60, 34: q, 54: Z }, { 33: [1, 61], 35: [1, 62] }, { 28: 63, 34: q, 54: Z }, { 48: 64, 53: L }, { 53: [2, 120] }, { 1: [2, 5] }, i(_, [2, 12]), i(U, [2, 17]), i(U, [2, 18]), i(U, [2, 22]), i(R, [2, 122]), i(R, [2, 123]), i(U, [2, 46]), { 34: [1, 65] }, { 39: 66, 43: J, 44: he, 45: Y }, { 34: [1, 70] }, { 34: [1, 71] }, i(U, [2, 112]), i(U, [2, 30], { 33: [1, 72], 35: [1, 74], 38: [1, 73] }), { 34: [1, 75] }, { 34: [1, 76], 36: [1, 77] }, i(U, [2, 23], { 30: [1, 78] }), i(F, [2, 117]), i(U, [2, 47], { 33: [1, 80], 38: [1, 79], 42: [1, 81] }), i(U, [2, 48], { 33: [1, 83], 35: [1, 82], 42: [1, 84] }), i(ue, [2, 113]), i(ue, [2, 114]), i(ue, [2, 115]), i(U, [2, 51], { 35: [1, 85], 38: [1, 86], 42: [1, 87] }), i(U, [2, 62], { 33: [1, 90], 35: [1, 88], 38: [1, 89] }), { 34: [1, 91] }, { 39: 92, 43: J, 44: he, 45: Y }, { 34: [1, 93] }, i(U, [2, 25], { 35: [1, 94] }), { 33: [1, 95] }, { 33: [1, 96] }, { 31: [1, 97] }, { 39: 98, 43: J, 44: he, 45: Y }, { 34: [1, 99] }, { 34: [1, 100] }, { 34: [1, 101] }, { 34: [1, 102] }, { 34: [1, 103] }, { 34: [1, 104] }, { 39: 105, 43: J, 44: he, 45: Y }, { 34: [1, 106] }, { 34: [1, 107] }, { 39: 108, 43: J, 44: he, 45: Y }, { 34: [1, 109] }, i(U, [2, 31], { 35: [1, 111], 38: [1, 110] }), i(U, [2, 32], { 33: [1, 113], 35: [1, 112] }), i(U, [2, 33], { 33: [1, 114], 38: [1, 115] }), { 34: [1, 116], 36: [1, 117] }, { 34: [1, 118] }, { 34: [1, 119] }, i(U, [2, 24]), i(U, [2, 49], { 33: [1, 120], 42: [1, 121] }), i(U, [2, 53], { 38: [1, 122], 42: [1, 123] }), i(U, [2, 63], { 33: [1, 125], 38: [1, 124] }), i(U, [2, 50], { 33: [1, 126], 42: [1, 127] }), i(U, [2, 55], { 35: [1, 128], 42: [1, 129] }), i(U, [2, 66], { 33: [1, 131], 35: [1, 130] }), i(U, [2, 52], { 38: [1, 132], 42: [1, 133] }), i(U, [2, 54], { 35: [1, 134], 42: [1, 135] }), i(U, [2, 67], { 35: [1, 137], 38: [1, 136] }), i(U, [2, 64], { 33: [1, 139], 38: [1, 138] }), i(U, [2, 65], { 33: [1, 141], 35: [1, 140] }), i(U, [2, 68], { 35: [1, 143], 38: [1, 142] }), { 39: 144, 43: J, 44: he, 45: Y }, { 34: [1, 145] }, { 34: [1, 146] }, { 34: [1, 147] }, { 34: [1, 148] }, { 39: 149, 43: J, 44: he, 45: Y }, i(U, [2, 26]), i(U, [2, 27]), i(U, [2, 28]), i(U, [2, 29]), { 34: [1, 150] }, { 34: [1, 151] }, { 39: 152, 43: J, 44: he, 45: Y }, { 34: [1, 153] }, { 39: 154, 43: J, 44: he, 45: Y }, { 34: [1, 155] }, { 34: [1, 156] }, { 34: [1, 157] }, { 34: [1, 158] }, { 34: [1, 159] }, { 34: [1, 160] }, { 34: [1, 161] }, { 39: 162, 43: J, 44: he, 45: Y }, { 34: [1, 163] }, { 34: [1, 164] }, { 34: [1, 165] }, { 39: 166, 43: J, 44: he, 45: Y }, { 34: [1, 167] }, { 39: 168, 43: J, 44: he, 45: Y }, { 34: [1, 169] }, { 34: [1, 170] }, { 34: [1, 171] }, { 39: 172, 43: J, 44: he, 45: Y }, { 34: [1, 173] }, i(U, [2, 37], { 35: [1, 174] }), i(U, [2, 38], { 38: [1, 175] }), i(U, [2, 36], { 33: [1, 176] }), i(U, [2, 39], { 35: [1, 177] }), i(U, [2, 34], { 38: [1, 178] }), i(U, [2, 35], { 33: [1, 179] }), i(U, [2, 60], { 42: [1, 180] }), i(U, [2, 73], { 33: [1, 181] }), i(U, [2, 61], { 42: [1, 182] }), i(U, [2, 84], { 38: [1, 183] }), i(U, [2, 74], { 33: [1, 184] }), i(U, [2, 83], { 38: [1, 185] }), i(U, [2, 59], { 42: [1, 186] }), i(U, [2, 72], { 33: [1, 187] }), i(U, [2, 58], { 42: [1, 188] }), i(U, [2, 78], { 35: [1, 189] }), i(U, [2, 71], { 33: [1, 190] }), i(U, [2, 77], { 35: [1, 191] }), i(U, [2, 57], { 42: [1, 192] }), i(U, [2, 85], { 38: [1, 193] }), i(U, [2, 56], { 42: [1, 194] }), i(U, [2, 79], { 35: [1, 195] }), i(U, [2, 80], { 35: [1, 196] }), i(U, [2, 86], { 38: [1, 197] }), i(U, [2, 70], { 33: [1, 198] }), i(U, [2, 81], { 38: [1, 199] }), i(U, [2, 69], { 33: [1, 200] }), i(U, [2, 75], { 35: [1, 201] }), i(U, [2, 76], { 35: [1, 202] }), i(U, [2, 82], { 38: [1, 203] }), { 34: [1, 204] }, { 39: 205, 43: J, 44: he, 45: Y }, { 34: [1, 206] }, { 34: [1, 207] }, { 39: 208, 43: J, 44: he, 45: Y }, { 34: [1, 209] }, { 34: [1, 210] }, { 34: [1, 211] }, { 34: [1, 212] }, { 39: 213, 43: J, 44: he, 45: Y }, { 34: [1, 214] }, { 39: 215, 43: J, 44: he, 45: Y }, { 34: [1, 216] }, { 34: [1, 217] }, { 34: [1, 218] }, { 34: [1, 219] }, { 34: [1, 220] }, { 34: [1, 221] }, { 34: [1, 222] }, { 39: 223, 43: J, 44: he, 45: Y }, { 34: [1, 224] }, { 34: [1, 225] }, { 34: [1, 226] }, { 39: 227, 43: J, 44: he, 45: Y }, { 34: [1, 228] }, { 39: 229, 43: J, 44: he, 45: Y }, { 34: [1, 230] }, { 34: [1, 231] }, { 34: [1, 232] }, { 39: 233, 43: J, 44: he, 45: Y }, i(U, [2, 40]), i(U, [2, 42]), i(U, [2, 41]), i(U, [2, 43]), i(U, [2, 45]), i(U, [2, 44]), i(U, [2, 101]), i(U, [2, 102]), i(U, [2, 99]), i(U, [2, 100]), i(U, [2, 104]), i(U, [2, 103]), i(U, [2, 108]), i(U, [2, 107]), i(U, [2, 106]), i(U, [2, 105]), i(U, [2, 110]), i(U, [2, 109]), i(U, [2, 98]), i(U, [2, 97]), i(U, [2, 96]), i(U, [2, 95]), i(U, [2, 93]), i(U, [2, 94]), i(U, [2, 92]), i(U, [2, 91]), i(U, [2, 90]), i(U, [2, 89]), i(U, [2, 87]), i(U, [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(de, Te) {
+ if (!Te.recoverable) {
+ var xe = new Error(de);
+ throw xe.hash = Te, xe;
+ }
+ this.trace(de);
+ }, parse: function(de) {
+ var Te = this, xe = [0], ie = [], Be = [null], te = [], Me = this.table, ve = "", ge = 0, Je = 0, ot = te.slice.call(arguments, 1), bt = Object.create(this.lexer), gt = { yy: {} };
+ for (var je in this.yy)
+ Object.prototype.hasOwnProperty.call(this.yy, je) && (gt.yy[je] = this.yy[je]);
+ bt.setInput(de, gt.yy), gt.yy.lexer = bt, gt.yy.parser = this, bt.yylloc === void 0 && (bt.yylloc = {});
+ var Qe = bt.yylloc;
+ te.push(Qe);
+ var kt = bt.options && bt.options.ranges;
+ function Wt() {
+ var Ci;
+ return typeof (Ci = ie.pop() || bt.lex() || 1) != "number" && (Ci instanceof Array && (Ci = (ie = Ci).pop()), Ci = Te.symbols_[Ci] || Ci), Ci;
+ }
+ typeof gt.yy.parseError == "function" ? this.parseError = gt.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
+ for (var jt, Zn, Ft, wn, un, ln, an, Ot, $n = {}; ; ) {
+ if (Zn = xe[xe.length - 1], this.defaultActions[Zn] ? Ft = this.defaultActions[Zn] : (jt == null && (jt = Wt()), Ft = Me[Zn] && Me[Zn][jt]), Ft === void 0 || !Ft.length || !Ft[0]) {
+ var pt = "";
+ for (un in Ot = [], Me[Zn])
+ this.terminals_[un] && un > 2 && Ot.push("'" + this.terminals_[un] + "'");
+ pt = bt.showPosition ? "Parse error on line " + (ge + 1) + `:
+` + bt.showPosition() + `
+Expecting ` + Ot.join(", ") + ", got '" + (this.terminals_[jt] || jt) + "'" : "Parse error on line " + (ge + 1) + ": Unexpected " + (jt == 1 ? "end of input" : "'" + (this.terminals_[jt] || jt) + "'"), this.parseError(pt, { text: bt.match, token: this.terminals_[jt] || jt, line: bt.yylineno, loc: Qe, expected: Ot });
+ }
+ if (Ft[0] instanceof Array && Ft.length > 1)
+ throw new Error("Parse Error: multiple actions possible at state: " + Zn + ", token: " + jt);
+ switch (Ft[0]) {
+ case 1:
+ xe.push(jt), Be.push(bt.yytext), te.push(bt.yylloc), xe.push(Ft[1]), jt = null, Je = bt.yyleng, ve = bt.yytext, ge = bt.yylineno, Qe = bt.yylloc;
+ break;
+ case 2:
+ if (ln = this.productions_[Ft[1]][1], $n.$ = Be[Be.length - ln], $n._$ = { first_line: te[te.length - (ln || 1)].first_line, last_line: te[te.length - 1].last_line, first_column: te[te.length - (ln || 1)].first_column, last_column: te[te.length - 1].last_column }, kt && ($n._$.range = [te[te.length - (ln || 1)].range[0], te[te.length - 1].range[1]]), (wn = this.performAction.apply($n, [ve, Je, ge, gt.yy, Ft[1], Be, te].concat(ot))) !== void 0)
+ return wn;
+ ln && (xe = xe.slice(0, -1 * ln * 2), Be = Be.slice(0, -1 * ln), te = te.slice(0, -1 * ln)), xe.push(this.productions_[Ft[1]][0]), Be.push($n.$), te.push($n._$), an = Me[xe[xe.length - 2]][xe[xe.length - 1]], xe.push(an);
+ break;
+ case 3:
+ return !0;
+ }
+ }
+ return !0;
+ } }, be = (r = { EOF: 1, parseError: function(de, Te) {
+ if (!this.yy.parser)
+ throw new Error(de);
+ this.yy.parser.parseError(de, Te);
+ }, setInput: function(de, Te) {
+ return this.yy = Te || this.yy || {}, this._input = de, 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 de = this._input[0];
+ return this.yytext += de, this.yyleng++, this.offset++, this.match += de, this.matched += de, de.match(/(?:\r\n?|\n).*/g) ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), de;
+ }, unput: function(de) {
+ var Te = de.length, xe = de.split(/(?:\r\n?|\n)/g);
+ this._input = de + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - Te), this.offset -= Te;
+ var ie = 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), xe.length - 1 && (this.yylineno -= xe.length - 1);
+ var Be = 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: xe ? (xe.length === ie.length ? this.yylloc.first_column : 0) + ie[ie.length - xe.length].length - xe[0].length : this.yylloc.first_column - Te }, this.options.ranges && (this.yylloc.range = [Be[0], Be[0] + this.yyleng - Te]), this.yyleng = this.yytext.length, this;
+ }, more: function() {
+ return this._more = !0, this;
+ }, reject: function() {
+ return this.options.backtrack_lexer ? (this._backtrack = !0, this) : 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 });
+ }, less: function(de) {
+ this.unput(this.match.slice(de));
+ }, pastInput: function() {
+ var de = this.matched.substr(0, this.matched.length - this.match.length);
+ return (de.length > 20 ? "..." : "") + de.substr(-20).replace(/\n/g, "");
+ }, upcomingInput: function() {
+ var de = this.match;
+ return de.length < 20 && (de += this._input.substr(0, 20 - de.length)), (de.substr(0, 20) + (de.length > 20 ? "..." : "")).replace(/\n/g, "");
+ }, showPosition: function() {
+ var de = this.pastInput(), Te = new Array(de.length + 1).join("-");
+ return de + this.upcomingInput() + `
+` + Te + "^";
+ }, test_match: function(de, Te) {
+ var xe, ie, Be;
+ if (this.options.backtrack_lexer && (Be = { 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 && (Be.yylloc.range = this.yylloc.range.slice(0))), (ie = de[0].match(/(?:\r\n?|\n).*/g)) && (this.yylineno += ie.length), this.yylloc = { first_line: this.yylloc.last_line, last_line: this.yylineno + 1, first_column: this.yylloc.last_column, last_column: ie ? ie[ie.length - 1].length - ie[ie.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + de[0].length }, this.yytext += de[0], this.match += de[0], this.matches = de, 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(de[0].length), this.matched += de[0], xe = this.performAction.call(this, this.yy, this, Te, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), xe)
+ return xe;
+ if (this._backtrack) {
+ for (var te in Be)
+ this[te] = Be[te];
+ return !1;
+ }
+ return !1;
+ }, next: function() {
+ if (this.done)
+ return this.EOF;
+ var de, Te, xe, ie;
+ this._input || (this.done = !0), this._more || (this.yytext = "", this.match = "");
+ for (var Be = this._currentRules(), te = 0; te < Be.length; te++)
+ if ((xe = this._input.match(this.rules[Be[te]])) && (!Te || xe[0].length > Te[0].length)) {
+ if (Te = xe, ie = te, this.options.backtrack_lexer) {
+ if ((de = this.test_match(xe, Be[te])) !== !1)
+ return de;
+ if (this._backtrack) {
+ Te = !1;
+ continue;
+ }
+ return !1;
+ }
+ if (!this.options.flex)
+ break;
+ }
+ return Te ? (de = this.test_match(Te, Be[ie])) !== !1 && de : 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 de = this.next();
+ return de || this.lex();
+ }, begin: function(de) {
+ this.conditionStack.push(de);
+ }, popState: function() {
+ return this.conditionStack.length - 1 > 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(de) {
+ return (de = this.conditionStack.length - 1 - Math.abs(de || 0)) >= 0 ? this.conditionStack[de] : "INITIAL";
+ }, pushState: function(de) {
+ this.begin(de);
+ }, stateStackSize: function() {
+ return this.conditionStack.length;
+ }, options: { "case-insensitive": !0 }, performAction: function(de, Te, xe, ie) {
+ switch (xe) {
+ 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:
+ case 34:
+ case 38:
+ this.popState();
+ break;
+ case 11:
+ return "acc_descr_multiline_value";
+ case 12:
+ return 14;
+ case 13:
+ 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:
+ case 30:
+ return 10;
+ case 31:
+ return 9;
+ case 32:
+ return "CARET";
+ case 33:
+ this.begin("options");
+ break;
+ case 35:
+ return 13;
+ case 36:
+ return 36;
+ case 37:
+ this.begin("string");
+ 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 } } }, r);
+ function ke() {
+ this.yy = {};
+ }
+ return le.lexer = be, ke.prototype = le, le.Parser = ke, new ke();
+}();
+QNe.parser = QNe;
+const r9n = QNe, i9n = (r) => r.match(/^\s*gitGraph/) !== null;
+let pbe = Bn().gitGraph.mainBranchName, a9n = Bn().gitGraph.mainBranchOrder, cb = {}, b3 = null, fre = {};
+fre[pbe] = { name: pbe, order: a9n };
+let am = {};
+am[pbe] = b3;
+let A2 = pbe, j8t = "LR", DQ = 0;
+function COe() {
+ return mLt({ length: 7 });
+}
+let K8t = {};
+const z8t = function(r) {
+ if (r = El.sanitizeText(r, Bn()), am[r] === void 0) {
+ let i = new Error('Trying to checkout branch which is not yet created. (Help try using "branch ' + r + '")');
+ throw i.hash = { text: "checkout " + r, token: "checkout " + r, line: "1", loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, expected: ['"branch ' + r + '"'] }, i;
+ }
+ {
+ A2 = r;
+ const i = am[A2];
+ b3 = cb[i];
+ }
+};
+function G8t(r, i, o) {
+ const l = r.indexOf(i);
+ l === -1 ? r.push(o) : r.splice(l, 1, o);
+}
+function DLt(r) {
+ const i = r.reduce((f, g) => f.seq > g.seq ? f : g, r[0]);
+ let o = "";
+ r.forEach(function(f) {
+ o += f === i ? " *" : " |";
+ });
+ const l = [o, i.id, i.seq];
+ for (let f in am)
+ am[f] === i.id && l.push(f);
+ if (_t.debug(l.join(" ")), i.parents && i.parents.length == 2) {
+ const f = cb[i.parents[0]];
+ G8t(r, i, f), r.push(cb[i.parents[1]]);
+ } else {
+ if (i.parents.length == 0)
+ return;
+ {
+ const f = cb[i.parents];
+ G8t(r, i, f);
+ }
+ }
+ DLt(r = function(f, g) {
+ const A = /* @__PURE__ */ Object.create(null);
+ return f.reduce((b, v) => {
+ const k = g(v);
+ return A[k] || (A[k] = !0, b.push(v)), b;
+ }, []);
+ }(r, (f) => f.id));
+}
+const X8t = function() {
+ const r = Object.keys(cb).map(function(i) {
+ return cb[i];
+ });
+ return r.forEach(function(i) {
+ _t.debug(i.id);
+ }), r.sort((i, o) => i.seq - o.seq), r;
+}, Rne = { NORMAL: 0, REVERSE: 1, HIGHLIGHT: 2, MERGE: 3, CHERRY_PICK: 4 }, o9n = { parseDirective: function(r, i, o) {
+ n0.parseDirective(this, r, i, o);
+}, getConfig: () => Bn().gitGraph, setDirection: function(r) {
+ j8t = r;
+}, setOptions: function(r) {
+ _t.debug("options str", r), r = (r = r && r.trim()) || "{}";
+ try {
+ K8t = JSON.parse(r);
+ } catch (i) {
+ _t.error("error while parsing gitGraph options", i.message);
+ }
+}, getOptions: function() {
+ return K8t;
+}, commit: function(r, i, o, l) {
+ _t.debug("Entering commit:", r, i, o, l), i = El.sanitizeText(i, Bn()), r = El.sanitizeText(r, Bn()), l = El.sanitizeText(l, Bn());
+ const f = { id: i || DQ + "-" + COe(), message: r, seq: DQ++, type: o || Rne.NORMAL, tag: l || "", parents: b3 == null ? [] : [b3.id], branch: A2 };
+ b3 = f, cb[f.id] = f, am[A2] = f.id, _t.debug("in pushCommit " + f.id);
+}, branch: function(r, i) {
+ if (r = El.sanitizeText(r, Bn()), am[r] !== void 0) {
+ let o = 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 ' + r + '")');
+ throw o.hash = { text: "branch " + r, token: "branch " + r, line: "1", loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, expected: ['"checkout ' + r + '"'] }, o;
+ }
+ am[r] = b3 != null ? b3.id : null, fre[r] = { name: r, order: i ? parseInt(i, 10) : null }, z8t(r), _t.debug("in createBranch");
+}, merge: function(r, i, o, l) {
+ r = El.sanitizeText(r, Bn()), i = El.sanitizeText(i, Bn());
+ const f = cb[am[A2]], g = cb[am[r]];
+ if (A2 === r) {
+ let b = new Error('Incorrect usage of "merge". Cannot merge a branch to itself');
+ throw b.hash = { text: "merge " + r, token: "merge " + r, line: "1", loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, expected: ["branch abc"] }, b;
+ }
+ if (f === void 0 || !f) {
+ let b = new Error('Incorrect usage of "merge". Current branch (' + A2 + ")has no commits");
+ throw b.hash = { text: "merge " + r, token: "merge " + r, line: "1", loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, expected: ["commit"] }, b;
+ }
+ if (am[r] === void 0) {
+ let b = new Error('Incorrect usage of "merge". Branch to be merged (' + r + ") does not exist");
+ throw b.hash = { text: "merge " + r, token: "merge " + r, line: "1", loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, expected: ["branch " + r] }, b;
+ }
+ if (g === void 0 || !g) {
+ let b = new Error('Incorrect usage of "merge". Branch to be merged (' + r + ") has no commits");
+ throw b.hash = { text: "merge " + r, token: "merge " + r, line: "1", loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, expected: ['"commit"'] }, b;
+ }
+ if (f === g) {
+ let b = new Error('Incorrect usage of "merge". Both branches have same head');
+ throw b.hash = { text: "merge " + r, token: "merge " + r, line: "1", loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, expected: ["branch abc"] }, b;
+ }
+ if (i && cb[i] !== void 0) {
+ let b = new Error('Incorrect usage of "merge". Commit with id:' + i + " already exists, use different custom Id");
+ throw b.hash = { text: "merge " + r + i + o + l, token: "merge " + r + i + o + l, line: "1", loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, expected: ["merge " + r + " " + i + "_UNIQUE " + o + " " + l] }, b;
+ }
+ const A = { id: i || DQ + "-" + COe(), message: "merged branch " + r + " into " + A2, seq: DQ++, parents: [b3 == null ? null : b3.id, am[r]], branch: A2, type: Rne.MERGE, customType: o, customId: !!i, tag: l || "" };
+ b3 = A, cb[A.id] = A, am[A2] = A.id, _t.debug(am), _t.debug("in mergeBranch");
+}, cherryPick: function(r, i, o) {
+ if (_t.debug("Entering cherryPick:", r, i, o), r = El.sanitizeText(r, Bn()), i = El.sanitizeText(i, Bn()), o = El.sanitizeText(o, Bn()), !r || cb[r] === void 0) {
+ let g = new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');
+ throw g.hash = { text: "cherryPick " + r + " " + i, token: "cherryPick " + r + " " + i, line: "1", loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, expected: ["cherry-pick abc"] }, g;
+ }
+ let l = cb[r], f = l.branch;
+ if (l.type === Rne.MERGE) {
+ let g = new Error('Incorrect usage of "cherryPick". Source commit should not be a merge commit');
+ throw g.hash = { text: "cherryPick " + r + " " + i, token: "cherryPick " + r + " " + i, line: "1", loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, expected: ["cherry-pick abc"] }, g;
+ }
+ if (!i || cb[i] === void 0) {
+ if (f === A2) {
+ let b = new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');
+ throw b.hash = { text: "cherryPick " + r + " " + i, token: "cherryPick " + r + " " + i, line: "1", loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, expected: ["cherry-pick abc"] }, b;
+ }
+ const g = cb[am[A2]];
+ if (g === void 0 || !g) {
+ let b = new Error('Incorrect usage of "cherry-pick". Current branch (' + A2 + ")has no commits");
+ throw b.hash = { text: "cherryPick " + r + " " + i, token: "cherryPick " + r + " " + i, line: "1", loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, expected: ["cherry-pick abc"] }, b;
+ }
+ const A = { id: DQ + "-" + COe(), message: "cherry-picked " + l + " into " + A2, seq: DQ++, parents: [b3 == null ? null : b3.id, l.id], branch: A2, type: Rne.CHERRY_PICK, tag: o ?? "cherry-pick:" + l.id };
+ b3 = A, cb[A.id] = A, am[A2] = A.id, _t.debug(am), _t.debug("in cherryPick");
+ }
+}, checkout: z8t, prettyPrint: function() {
+ _t.debug(cb), DLt([X8t()[0]]);
+}, clear: function() {
+ cb = {}, b3 = null;
+ let r = Bn().gitGraph.mainBranchName, i = Bn().gitGraph.mainBranchOrder;
+ am = {}, am[r] = null, fre = {}, fre[r] = { name: r, order: i }, A2 = r, DQ = 0, w5();
+}, getBranchesAsObjArray: function() {
+ return Object.values(fre).map((i, o) => i.order !== null ? i : { ...i, order: parseFloat(`0.${o}`, 10) }).sort((i, o) => i.order - o.order).map(({ name: i }) => ({ name: i }));
+}, getBranches: function() {
+ return am;
+}, getCommits: function() {
+ return cb;
+}, getCommitsArray: X8t, getCurrentBranch: function() {
+ return A2;
+}, getDirection: function() {
+ return j8t;
+}, getHead: function() {
+ return b3;
+}, setAccTitle: k5, getAccTitle: _k, getAccDescription: Tk, setAccDescription: Ek, setDiagramTitle: q9, getDiagramTitle: Y9, commitType: Rne };
+let Qne = {};
+const s9n = 0, W8t = 1, V8t = 2, $ne = 3, _Oe = 4;
+let A5 = {}, mbe = {}, bbe = [], vbe = 0;
+const q8t = (r, i, o) => {
+ const l = jie().gitGraph, f = r.append("g").attr("class", "commit-bullets"), g = r.append("g").attr("class", "commit-labels");
+ let A = 0;
+ Object.keys(i).sort((b, v) => i[b].seq - i[v].seq).forEach((b) => {
+ const v = i[b], k = A5[v.branch].pos, _ = A + 10;
+ if (o) {
+ let T, L = v.customType !== void 0 && v.customType !== "" ? v.customType : v.type;
+ switch (L) {
+ case s9n:
+ T = "commit-normal";
+ break;
+ case W8t:
+ T = "commit-reverse";
+ break;
+ case V8t:
+ T = "commit-highlight";
+ break;
+ case $ne:
+ T = "commit-merge";
+ break;
+ case _Oe:
+ T = "commit-cherry-pick";
+ break;
+ default:
+ T = "commit-normal";
+ }
+ if (L === V8t) {
+ const F = f.append("rect");
+ F.attr("x", _ - 10), F.attr("y", k - 10), F.attr("height", 20), F.attr("width", 20), F.attr("class", `commit ${v.id} commit-highlight${A5[v.branch].index % 8} ${T}-outer`), f.append("rect").attr("x", _ - 6).attr("y", k - 6).attr("height", 12).attr("width", 12).attr("class", `commit ${v.id} commit${A5[v.branch].index % 8} ${T}-inner`);
+ } else if (L === _Oe)
+ f.append("circle").attr("cx", _).attr("cy", k).attr("r", 10).attr("class", `commit ${v.id} ${T}`), f.append("circle").attr("cx", _ - 3).attr("cy", k + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${v.id} ${T}`), f.append("circle").attr("cx", _ + 3).attr("cy", k + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${v.id} ${T}`), f.append("line").attr("x1", _ + 3).attr("y1", k + 1).attr("x2", _).attr("y2", k - 5).attr("stroke", "#fff").attr("class", `commit ${v.id} ${T}`), f.append("line").attr("x1", _ - 3).attr("y1", k + 1).attr("x2", _).attr("y2", k - 5).attr("stroke", "#fff").attr("class", `commit ${v.id} ${T}`);
+ else {
+ const F = f.append("circle");
+ if (F.attr("cx", _), F.attr("cy", k), F.attr("r", v.type === $ne ? 9 : 10), F.attr("class", `commit ${v.id} commit${A5[v.branch].index % 8}`), L === $ne) {
+ const U = f.append("circle");
+ U.attr("cx", _), U.attr("cy", k), U.attr("r", 6), U.attr("class", `commit ${T} ${v.id} commit${A5[v.branch].index % 8}`);
+ }
+ L === W8t && f.append("path").attr("d", `M ${_ - 5},${k - 5}L${_ + 5},${k + 5}M${_ - 5},${k + 5}L${_ + 5},${k - 5}`).attr("class", `commit ${T} ${v.id} commit${A5[v.branch].index % 8}`);
+ }
+ }
+ if (mbe[v.id] = { x: A + 10, y: k }, o) {
+ if (v.type !== _Oe && (v.customId && v.type === $ne || v.type !== $ne) && l.showCommitLabel) {
+ const F = g.append("g"), U = F.insert("rect").attr("class", "commit-label-bkg"), q = F.append("text").attr("x", A).attr("y", k + 25).attr("class", "commit-label").text(v.id);
+ let Z = q.node().getBBox();
+ if (U.attr("x", A + 10 - Z.width / 2 - 2).attr("y", k + 13.5).attr("width", Z.width + 2 * 2).attr("height", Z.height + 2 * 2), q.attr("x", A + 10 - Z.width / 2), l.rotateCommitLabel) {
+ let R = -7.5 - (Z.width + 10) / 25 * 9.5, J = 10 + Z.width / 25 * 8.5;
+ F.attr("transform", "translate(" + R + ", " + J + ") rotate(-45, " + A + ", " + k + ")");
+ }
+ }
+ if (v.tag) {
+ const F = g.insert("polygon"), U = g.append("circle"), q = g.append("text").attr("y", k - 16).attr("class", "tag-label").text(v.tag);
+ let Z = q.node().getBBox();
+ q.attr("x", A + 10 - Z.width / 2);
+ const R = Z.height / 2, J = k - 19.2;
+ F.attr("class", "tag-label-bkg").attr("points", `
+ ${A - Z.width / 2 - 4 / 2},${J + 2}
+ ${A - Z.width / 2 - 4 / 2},${J - 2}
+ ${A + 10 - Z.width / 2 - 4},${J - R - 2}
+ ${A + 10 + Z.width / 2 + 4},${J - R - 2}
+ ${A + 10 + Z.width / 2 + 4},${J + R + 2}
+ ${A + 10 - Z.width / 2 - 4},${J + R + 2}`), U.attr("cx", A - Z.width / 2 + 4 / 2).attr("cy", J).attr("r", 1.5).attr("class", "tag-hole");
+ }
+ }
+ A += 50, A > vbe && (vbe = A);
+ });
+}, $Ne = (r, i, o = 0) => {
+ const l = r + Math.abs(r - i) / 2;
+ if (o > 5)
+ return l;
+ if (bbe.every((g) => Math.abs(g - l) >= 10))
+ return bbe.push(l), l;
+ const f = Math.abs(r - i);
+ return $Ne(r, i - f / 5, o + 1);
+}, c9n = (r, i, o, l) => {
+ const f = mbe[i.id], g = mbe[o.id], A = ((F, U, q) => Object.keys(q).filter((Z) => q[Z].branch === U.branch && q[Z].seq > F.seq && q[Z].seq < U.seq).length > 0)(i, o, l);
+ let b, v = "", k = "", _ = 0, T = 0, L = A5[o.branch].index;
+ if (A) {
+ v = "A 10 10, 0, 0, 0,", k = "A 10 10, 0, 0, 1,", _ = 10, T = 10, L = A5[o.branch].index;
+ const F = f.y < g.y ? $Ne(f.y, g.y) : $Ne(g.y, f.y);
+ b = f.y < g.y ? `M ${f.x} ${f.y} L ${f.x} ${F - _} ${v} ${f.x + T} ${F} L ${g.x - _} ${F} ${k} ${g.x} ${F + T} L ${g.x} ${g.y}` : `M ${f.x} ${f.y} L ${f.x} ${F + _} ${k} ${f.x + T} ${F} L ${g.x - _} ${F} ${v} ${g.x} ${F - T} L ${g.x} ${g.y}`;
+ } else
+ f.y < g.y && (v = "A 20 20, 0, 0, 0,", _ = 20, T = 20, L = A5[o.branch].index, b = `M ${f.x} ${f.y} L ${f.x} ${g.y - _} ${v} ${f.x + T} ${g.y} L ${g.x} ${g.y}`), f.y > g.y && (v = "A 20 20, 0, 0, 0,", _ = 20, T = 20, L = A5[i.branch].index, b = `M ${f.x} ${f.y} L ${g.x - _} ${f.y} ${v} ${g.x} ${f.y - T} L ${g.x} ${g.y}`), f.y === g.y && (L = A5[i.branch].index, b = `M ${f.x} ${f.y} L ${f.x} ${g.y - _} ${v} ${f.x + T} ${g.y} L ${g.x} ${g.y}`);
+ r.append("path").attr("d", b).attr("class", "arrow arrow" + L % 8);
+}, l9n = (r, i) => {
+ const o = jie().gitGraph, l = r.append("g");
+ i.forEach((f, g) => {
+ const A = g % 8, b = A5[f.name].pos, v = l.append("line");
+ v.attr("x1", 0), v.attr("y1", b), v.attr("x2", vbe), v.attr("y2", b), v.attr("class", "branch branch" + A), bbe.push(b);
+ const k = ((F) => {
+ const U = document.createElementNS("http://www.w3.org/2000/svg", "text");
+ let q = [];
+ q = typeof F == "string" ? F.split(/\\n|\n|
/gi) : Array.isArray(F) ? F : [];
+ for (const Z of q) {
+ const R = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
+ R.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), R.setAttribute("dy", "1em"), R.setAttribute("x", "0"), R.setAttribute("class", "row"), R.textContent = Z.trim(), U.appendChild(R);
+ }
+ return U;
+ })(f.name), _ = l.insert("rect"), T = l.insert("g").attr("class", "branchLabel").insert("g").attr("class", "label branch-label" + A);
+ T.node().appendChild(k);
+ let L = k.getBBox();
+ _.attr("class", "branchLabelBkg label" + A).attr("rx", 4).attr("ry", 4).attr("x", -L.width - 4 - (o.rotateCommitLabel === !0 ? 30 : 0)).attr("y", -L.height / 2 + 8).attr("width", L.width + 18).attr("height", L.height + 4), T.attr("transform", "translate(" + (-L.width - 14 - (o.rotateCommitLabel === !0 ? 30 : 0)) + ", " + (b - L.height / 2 - 1) + ")"), _.attr("transform", "translate(-19, " + (b - L.height / 2) + ")");
+ });
+}, u9n = { draw: function(r, i, o, l) {
+ A5 = {}, mbe = {}, Qne = {}, vbe = 0, bbe = [];
+ const f = jie(), g = f.gitGraph;
+ _t.debug("in gitgraph renderer", r + `
+`, "id:", i, o), Qne = l.db.getCommits();
+ const A = l.db.getBranchesAsObjArray();
+ let b = 0;
+ A.forEach((k, _) => {
+ A5[k.name] = { pos: b, index: _ }, b += 50 + (g.rotateCommitLabel ? 40 : 0);
+ });
+ const v = co(`[id="${i}"]`);
+ q8t(v, Qne, !1), g.showBranches && l9n(v, A), ((k, _) => {
+ const T = k.append("g").attr("class", "commit-arrows");
+ Object.keys(_).forEach((L) => {
+ const F = _[L];
+ F.parents && F.parents.length > 0 && F.parents.forEach((U) => {
+ c9n(T, _[U], F, _);
+ });
+ });
+ })(v, Qne), q8t(v, Qne, !0), Tl.insertTitle(v, "gitTitleText", g.titleTopMargin, l.db.getDiagramTitle()), FLt(void 0, v, g.diagramPadding, g.useMaxWidth ?? f.useMaxWidth);
+} }, h9n = (r) => `
+ .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((i) => `
+ .branch-label${i} { fill: ${r["gitBranchLabel" + i]}; }
+ .commit${i} { stroke: ${r["git" + i]}; fill: ${r["git" + i]}; }
+ .commit-highlight${i} { stroke: ${r["gitInv" + i]}; fill: ${r["gitInv" + i]}; }
+ .label${i} { fill: ${r["git" + i]}; }
+ .arrow${i} { stroke: ${r["git" + i]}; }
+ `).join(`
+`)}
+
+ .branch {
+ stroke-width: 1;
+ stroke: ${r.lineColor};
+ stroke-dasharray: 2;
+ }
+ .commit-label { font-size: ${r.commitLabelFontSize}; fill: ${r.commitLabelColor};}
+ .commit-label-bkg { font-size: ${r.commitLabelFontSize}; fill: ${r.commitLabelBackground}; opacity: 0.5; }
+ .tag-label { font-size: ${r.tagLabelFontSize}; fill: ${r.tagLabelColor};}
+ .tag-label-bkg { fill: ${r.tagLabelBackground}; stroke: ${r.tagLabelBorder}; }
+ .tag-hole { fill: ${r.textColor}; }
+
+ .commit-merge {
+ stroke: ${r.primaryColor};
+ fill: ${r.primaryColor};
+ }
+ .commit-reverse {
+ stroke: ${r.primaryColor};
+ fill: ${r.primaryColor};
+ stroke-width: 3;
+ }
+ .commit-highlight-outer {
+ }
+ .commit-highlight-inner {
+ stroke: ${r.primaryColor};
+ fill: ${r.primaryColor};
+ }
+
+ .arrow { stroke-width: 8; stroke-linecap: round; fill: none}
+ .gitTitleText {
+ text-anchor: middle;
+ font-size: 18px;
+ fill: ${r.textColor};
+ }
+ }
+`;
+var ybe = function() {
+ var r, i = function(Hr, Yr, ni, Vr) {
+ for (ni = ni || {}, Vr = Hr.length; Vr--; ni[Hr[Vr]] = Yr)
+ ;
+ return ni;
+ }, o = [1, 6], l = [1, 7], f = [1, 8], g = [1, 9], A = [1, 16], b = [1, 11], v = [1, 12], k = [1, 13], _ = [1, 14], T = [1, 15], L = [1, 27], F = [1, 33], U = [1, 34], q = [1, 35], Z = [1, 36], R = [1, 37], J = [1, 72], he = [1, 73], Y = [1, 74], ue = [1, 75], le = [1, 76], be = [1, 77], ke = [1, 78], de = [1, 38], Te = [1, 39], xe = [1, 40], ie = [1, 41], Be = [1, 42], te = [1, 43], Me = [1, 44], ve = [1, 45], ge = [1, 46], Je = [1, 47], ot = [1, 48], bt = [1, 49], gt = [1, 50], je = [1, 51], Qe = [1, 52], kt = [1, 53], Wt = [1, 54], jt = [1, 55], Zn = [1, 56], Ft = [1, 57], wn = [1, 59], un = [1, 60], ln = [1, 61], an = [1, 62], Ot = [1, 63], $n = [1, 64], pt = [1, 65], Ci = [1, 66], ut = [1, 67], br = [1, 68], zt = [1, 69], Wr = [24, 52], zr = [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], Si = [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], vr = [1, 94], Qr = [1, 95], or = [1, 96], Gr = [1, 97], An = [15, 24, 52], _i = [7, 8, 9, 10, 18, 22, 25, 26, 27, 28], Cr = [15, 24, 43, 52], la = [15, 24, 43, 52, 86, 87, 89, 90], Ra = [15, 43], Jo = [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], Cc = { 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(Hr, Yr, ni, Vr, Na, er, as) {
+ var xr = er.length - 1;
+ switch (Na) {
+ case 4:
+ Vr.setDirection("TB");
+ break;
+ case 5:
+ Vr.setDirection("BT");
+ break;
+ case 6:
+ Vr.setDirection("RL");
+ break;
+ case 7:
+ Vr.setDirection("LR");
+ break;
+ case 11:
+ Vr.parseDirective("%%{", "open_directive");
+ break;
+ case 12:
+ break;
+ case 13:
+ er[xr] = er[xr].trim().replace(/'/g, '"'), Vr.parseDirective(er[xr], "arg_directive");
+ break;
+ case 14:
+ Vr.parseDirective("}%%", "close_directive", "c4Context");
+ break;
+ case 15:
+ case 16:
+ case 17:
+ case 18:
+ case 19:
+ Vr.setC4Type(er[xr - 3]);
+ break;
+ case 26:
+ Vr.setTitle(er[xr].substring(6)), this.$ = er[xr].substring(6);
+ break;
+ case 27:
+ Vr.setAccDescription(er[xr].substring(15)), this.$ = er[xr].substring(15);
+ break;
+ case 28:
+ this.$ = er[xr].trim(), Vr.setTitle(this.$);
+ break;
+ case 29:
+ case 30:
+ this.$ = er[xr].trim(), Vr.setAccDescription(this.$);
+ break;
+ case 35:
+ case 36:
+ er[xr].splice(2, 0, "ENTERPRISE"), Vr.addPersonOrSystemBoundary(...er[xr]), this.$ = er[xr];
+ break;
+ case 37:
+ Vr.addPersonOrSystemBoundary(...er[xr]), this.$ = er[xr];
+ break;
+ case 38:
+ er[xr].splice(2, 0, "CONTAINER"), Vr.addContainerBoundary(...er[xr]), this.$ = er[xr];
+ break;
+ case 39:
+ Vr.addDeploymentNode("node", ...er[xr]), this.$ = er[xr];
+ break;
+ case 40:
+ Vr.addDeploymentNode("nodeL", ...er[xr]), this.$ = er[xr];
+ break;
+ case 41:
+ Vr.addDeploymentNode("nodeR", ...er[xr]), this.$ = er[xr];
+ break;
+ case 42:
+ Vr.popBoundaryParseStack();
+ break;
+ case 46:
+ Vr.addPersonOrSystem("person", ...er[xr]), this.$ = er[xr];
+ break;
+ case 47:
+ Vr.addPersonOrSystem("external_person", ...er[xr]), this.$ = er[xr];
+ break;
+ case 48:
+ Vr.addPersonOrSystem("system", ...er[xr]), this.$ = er[xr];
+ break;
+ case 49:
+ Vr.addPersonOrSystem("system_db", ...er[xr]), this.$ = er[xr];
+ break;
+ case 50:
+ Vr.addPersonOrSystem("system_queue", ...er[xr]), this.$ = er[xr];
+ break;
+ case 51:
+ Vr.addPersonOrSystem("external_system", ...er[xr]), this.$ = er[xr];
+ break;
+ case 52:
+ Vr.addPersonOrSystem("external_system_db", ...er[xr]), this.$ = er[xr];
+ break;
+ case 53:
+ Vr.addPersonOrSystem("external_system_queue", ...er[xr]), this.$ = er[xr];
+ break;
+ case 54:
+ Vr.addContainer("container", ...er[xr]), this.$ = er[xr];
+ break;
+ case 55:
+ Vr.addContainer("container_db", ...er[xr]), this.$ = er[xr];
+ break;
+ case 56:
+ Vr.addContainer("container_queue", ...er[xr]), this.$ = er[xr];
+ break;
+ case 57:
+ Vr.addContainer("external_container", ...er[xr]), this.$ = er[xr];
+ break;
+ case 58:
+ Vr.addContainer("external_container_db", ...er[xr]), this.$ = er[xr];
+ break;
+ case 59:
+ Vr.addContainer("external_container_queue", ...er[xr]), this.$ = er[xr];
+ break;
+ case 60:
+ Vr.addComponent("component", ...er[xr]), this.$ = er[xr];
+ break;
+ case 61:
+ Vr.addComponent("component_db", ...er[xr]), this.$ = er[xr];
+ break;
+ case 62:
+ Vr.addComponent("component_queue", ...er[xr]), this.$ = er[xr];
+ break;
+ case 63:
+ Vr.addComponent("external_component", ...er[xr]), this.$ = er[xr];
+ break;
+ case 64:
+ Vr.addComponent("external_component_db", ...er[xr]), this.$ = er[xr];
+ break;
+ case 65:
+ Vr.addComponent("external_component_queue", ...er[xr]), this.$ = er[xr];
+ break;
+ case 67:
+ Vr.addRel("rel", ...er[xr]), this.$ = er[xr];
+ break;
+ case 68:
+ Vr.addRel("birel", ...er[xr]), this.$ = er[xr];
+ break;
+ case 69:
+ Vr.addRel("rel_u", ...er[xr]), this.$ = er[xr];
+ break;
+ case 70:
+ Vr.addRel("rel_d", ...er[xr]), this.$ = er[xr];
+ break;
+ case 71:
+ Vr.addRel("rel_l", ...er[xr]), this.$ = er[xr];
+ break;
+ case 72:
+ Vr.addRel("rel_r", ...er[xr]), this.$ = er[xr];
+ break;
+ case 73:
+ Vr.addRel("rel_b", ...er[xr]), this.$ = er[xr];
+ break;
+ case 74:
+ er[xr].splice(0, 1), Vr.addRel("rel", ...er[xr]), this.$ = er[xr];
+ break;
+ case 75:
+ Vr.updateElStyle("update_el_style", ...er[xr]), this.$ = er[xr];
+ break;
+ case 76:
+ Vr.updateRelStyle("update_rel_style", ...er[xr]), this.$ = er[xr];
+ break;
+ case 77:
+ Vr.updateLayoutConfig("update_layout_config", ...er[xr]), this.$ = er[xr];
+ break;
+ case 78:
+ this.$ = [er[xr]];
+ break;
+ case 79:
+ er[xr].unshift(er[xr - 1]), this.$ = er[xr];
+ break;
+ case 80:
+ case 82:
+ this.$ = er[xr].trim();
+ break;
+ case 81:
+ let So = {};
+ So[er[xr - 1].trim()] = er[xr].trim(), this.$ = So;
+ break;
+ case 83:
+ this.$ = "";
+ }
+ }, table: [{ 3: 1, 4: 2, 5: 3, 6: 4, 7: o, 8: l, 9: f, 10: g, 11: 5, 12: 10, 18: A, 22: b, 25: v, 26: k, 27: _, 28: T }, { 1: [3] }, { 1: [2, 1] }, { 1: [2, 2] }, { 3: 17, 4: 2, 5: 3, 6: 4, 7: o, 8: l, 9: f, 10: g, 11: 5, 12: 10, 18: A, 22: b, 25: v, 26: k, 27: _, 28: T }, { 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: L }, i([16, 21], [2, 12]), { 23: 28, 29: 29, 30: 30, 31: 31, 32: F, 33: U, 34: q, 36: Z, 38: R, 39: 58, 40: 70, 42: 71, 44: J, 46: he, 47: Y, 48: ue, 49: le, 50: be, 51: ke, 53: 32, 54: de, 55: Te, 56: xe, 57: ie, 58: Be, 59: te, 60: Me, 61: ve, 62: ge, 63: Je, 64: ot, 65: bt, 66: gt, 67: je, 68: Qe, 69: kt, 70: Wt, 71: jt, 72: Zn, 73: Ft, 74: wn, 75: un, 76: ln, 77: an, 78: Ot, 79: $n, 80: pt, 81: Ci, 82: ut, 83: br, 84: zt }, { 23: 79, 29: 29, 30: 30, 31: 31, 32: F, 33: U, 34: q, 36: Z, 38: R, 39: 58, 40: 70, 42: 71, 44: J, 46: he, 47: Y, 48: ue, 49: le, 50: be, 51: ke, 53: 32, 54: de, 55: Te, 56: xe, 57: ie, 58: Be, 59: te, 60: Me, 61: ve, 62: ge, 63: Je, 64: ot, 65: bt, 66: gt, 67: je, 68: Qe, 69: kt, 70: Wt, 71: jt, 72: Zn, 73: Ft, 74: wn, 75: un, 76: ln, 77: an, 78: Ot, 79: $n, 80: pt, 81: Ci, 82: ut, 83: br, 84: zt }, { 23: 80, 29: 29, 30: 30, 31: 31, 32: F, 33: U, 34: q, 36: Z, 38: R, 39: 58, 40: 70, 42: 71, 44: J, 46: he, 47: Y, 48: ue, 49: le, 50: be, 51: ke, 53: 32, 54: de, 55: Te, 56: xe, 57: ie, 58: Be, 59: te, 60: Me, 61: ve, 62: ge, 63: Je, 64: ot, 65: bt, 66: gt, 67: je, 68: Qe, 69: kt, 70: Wt, 71: jt, 72: Zn, 73: Ft, 74: wn, 75: un, 76: ln, 77: an, 78: Ot, 79: $n, 80: pt, 81: Ci, 82: ut, 83: br, 84: zt }, { 23: 81, 29: 29, 30: 30, 31: 31, 32: F, 33: U, 34: q, 36: Z, 38: R, 39: 58, 40: 70, 42: 71, 44: J, 46: he, 47: Y, 48: ue, 49: le, 50: be, 51: ke, 53: 32, 54: de, 55: Te, 56: xe, 57: ie, 58: Be, 59: te, 60: Me, 61: ve, 62: ge, 63: Je, 64: ot, 65: bt, 66: gt, 67: je, 68: Qe, 69: kt, 70: Wt, 71: jt, 72: Zn, 73: Ft, 74: wn, 75: un, 76: ln, 77: an, 78: Ot, 79: $n, 80: pt, 81: Ci, 82: ut, 83: br, 84: zt }, { 23: 82, 29: 29, 30: 30, 31: 31, 32: F, 33: U, 34: q, 36: Z, 38: R, 39: 58, 40: 70, 42: 71, 44: J, 46: he, 47: Y, 48: ue, 49: le, 50: be, 51: ke, 53: 32, 54: de, 55: Te, 56: xe, 57: ie, 58: Be, 59: te, 60: Me, 61: ve, 62: ge, 63: Je, 64: ot, 65: bt, 66: gt, 67: je, 68: Qe, 69: kt, 70: Wt, 71: jt, 72: Zn, 73: Ft, 74: wn, 75: un, 76: ln, 77: an, 78: Ot, 79: $n, 80: pt, 81: Ci, 82: ut, 83: br, 84: zt }, { 15: [1, 83] }, { 17: 84, 20: [1, 85] }, { 15: [2, 14] }, { 24: [1, 86] }, i(Wr, [2, 20], { 53: 32, 39: 58, 40: 70, 42: 71, 30: 87, 44: J, 46: he, 47: Y, 48: ue, 49: le, 50: be, 51: ke, 54: de, 55: Te, 56: xe, 57: ie, 58: Be, 59: te, 60: Me, 61: ve, 62: ge, 63: Je, 64: ot, 65: bt, 66: gt, 67: je, 68: Qe, 69: kt, 70: Wt, 71: jt, 72: Zn, 73: Ft, 74: wn, 75: un, 76: ln, 77: an, 78: Ot, 79: $n, 80: pt, 81: Ci, 82: ut, 83: br, 84: zt }), i(Wr, [2, 21]), i(zr, [2, 23], { 15: [1, 88] }), i(Wr, [2, 43], { 15: [1, 89] }), i(Si, [2, 26]), i(Si, [2, 27]), { 35: [1, 90] }, { 37: [1, 91] }, i(Si, [2, 30]), { 45: 92, 85: 93, 86: vr, 87: Qr, 89: or, 90: Gr }, { 45: 98, 85: 93, 86: vr, 87: Qr, 89: or, 90: Gr }, { 45: 99, 85: 93, 86: vr, 87: Qr, 89: or, 90: Gr }, { 45: 100, 85: 93, 86: vr, 87: Qr, 89: or, 90: Gr }, { 45: 101, 85: 93, 86: vr, 87: Qr, 89: or, 90: Gr }, { 45: 102, 85: 93, 86: vr, 87: Qr, 89: or, 90: Gr }, { 45: 103, 85: 93, 86: vr, 87: Qr, 89: or, 90: Gr }, { 45: 104, 85: 93, 86: vr, 87: Qr, 89: or, 90: Gr }, { 45: 105, 85: 93, 86: vr, 87: Qr, 89: or, 90: Gr }, { 45: 106, 85: 93, 86: vr, 87: Qr, 89: or, 90: Gr }, { 45: 107, 85: 93, 86: vr, 87: Qr, 89: or, 90: Gr }, { 45: 108, 85: 93, 86: vr, 87: Qr, 89: or, 90: Gr }, { 45: 109, 85: 93, 86: vr, 87: Qr, 89: or, 90: Gr }, { 45: 110, 85: 93, 86: vr, 87: Qr, 89: or, 90: Gr }, { 45: 111, 85: 93, 86: vr, 87: Qr, 89: or, 90: Gr }, { 45: 112, 85: 93, 86: vr, 87: Qr, 89: or, 90: Gr }, { 45: 113, 85: 93, 86: vr, 87: Qr, 89: or, 90: Gr }, { 45: 114, 85: 93, 86: vr, 87: Qr, 89: or, 90: Gr }, { 45: 115, 85: 93, 86: vr, 87: Qr, 89: or, 90: Gr }, { 45: 116, 85: 93, 86: vr, 87: Qr, 89: or, 90: Gr }, i(An, [2, 66]), { 45: 117, 85: 93, 86: vr, 87: Qr, 89: or, 90: Gr }, { 45: 118, 85: 93, 86: vr, 87: Qr, 89: or, 90: Gr }, { 45: 119, 85: 93, 86: vr, 87: Qr, 89: or, 90: Gr }, { 45: 120, 85: 93, 86: vr, 87: Qr, 89: or, 90: Gr }, { 45: 121, 85: 93, 86: vr, 87: Qr, 89: or, 90: Gr }, { 45: 122, 85: 93, 86: vr, 87: Qr, 89: or, 90: Gr }, { 45: 123, 85: 93, 86: vr, 87: Qr, 89: or, 90: Gr }, { 45: 124, 85: 93, 86: vr, 87: Qr, 89: or, 90: Gr }, { 45: 125, 85: 93, 86: vr, 87: Qr, 89: or, 90: Gr }, { 45: 126, 85: 93, 86: vr, 87: Qr, 89: or, 90: Gr }, { 45: 127, 85: 93, 86: vr, 87: Qr, 89: or, 90: Gr }, { 30: 128, 39: 58, 40: 70, 42: 71, 44: J, 46: he, 47: Y, 48: ue, 49: le, 50: be, 51: ke, 53: 32, 54: de, 55: Te, 56: xe, 57: ie, 58: Be, 59: te, 60: Me, 61: ve, 62: ge, 63: Je, 64: ot, 65: bt, 66: gt, 67: je, 68: Qe, 69: kt, 70: Wt, 71: jt, 72: Zn, 73: Ft, 74: wn, 75: un, 76: ln, 77: an, 78: Ot, 79: $n, 80: pt, 81: Ci, 82: ut, 83: br, 84: zt }, { 15: [1, 130], 43: [1, 129] }, { 45: 131, 85: 93, 86: vr, 87: Qr, 89: or, 90: Gr }, { 45: 132, 85: 93, 86: vr, 87: Qr, 89: or, 90: Gr }, { 45: 133, 85: 93, 86: vr, 87: Qr, 89: or, 90: Gr }, { 45: 134, 85: 93, 86: vr, 87: Qr, 89: or, 90: Gr }, { 45: 135, 85: 93, 86: vr, 87: Qr, 89: or, 90: Gr }, { 45: 136, 85: 93, 86: vr, 87: Qr, 89: or, 90: Gr }, { 45: 137, 85: 93, 86: vr, 87: Qr, 89: or, 90: Gr }, { 24: [1, 138] }, { 24: [1, 139] }, { 24: [1, 140] }, { 24: [1, 141] }, i(_i, [2, 9]), { 14: 142, 21: L }, { 21: [2, 13] }, { 1: [2, 15] }, i(Wr, [2, 22]), i(zr, [2, 24], { 31: 31, 29: 143, 32: F, 33: U, 34: q, 36: Z, 38: R }), i(Wr, [2, 44], { 29: 29, 30: 30, 31: 31, 53: 32, 39: 58, 40: 70, 42: 71, 23: 144, 32: F, 33: U, 34: q, 36: Z, 38: R, 44: J, 46: he, 47: Y, 48: ue, 49: le, 50: be, 51: ke, 54: de, 55: Te, 56: xe, 57: ie, 58: Be, 59: te, 60: Me, 61: ve, 62: ge, 63: Je, 64: ot, 65: bt, 66: gt, 67: je, 68: Qe, 69: kt, 70: Wt, 71: jt, 72: Zn, 73: Ft, 74: wn, 75: un, 76: ln, 77: an, 78: Ot, 79: $n, 80: pt, 81: Ci, 82: ut, 83: br, 84: zt }), i(Si, [2, 28]), i(Si, [2, 29]), i(An, [2, 46]), i(Cr, [2, 78], { 85: 93, 45: 145, 86: vr, 87: Qr, 89: or, 90: Gr }), i(la, [2, 80]), { 88: [1, 146] }, i(la, [2, 82]), i(la, [2, 83]), i(An, [2, 47]), i(An, [2, 48]), i(An, [2, 49]), i(An, [2, 50]), i(An, [2, 51]), i(An, [2, 52]), i(An, [2, 53]), i(An, [2, 54]), i(An, [2, 55]), i(An, [2, 56]), i(An, [2, 57]), i(An, [2, 58]), i(An, [2, 59]), i(An, [2, 60]), i(An, [2, 61]), i(An, [2, 62]), i(An, [2, 63]), i(An, [2, 64]), i(An, [2, 65]), i(An, [2, 67]), i(An, [2, 68]), i(An, [2, 69]), i(An, [2, 70]), i(An, [2, 71]), i(An, [2, 72]), i(An, [2, 73]), i(An, [2, 74]), i(An, [2, 75]), i(An, [2, 76]), i(An, [2, 77]), { 41: 147, 52: [1, 148] }, { 15: [1, 149] }, { 43: [1, 150] }, i(Ra, [2, 35]), i(Ra, [2, 36]), i(Ra, [2, 37]), i(Ra, [2, 38]), i(Ra, [2, 39]), i(Ra, [2, 40]), i(Ra, [2, 41]), { 1: [2, 16] }, { 1: [2, 17] }, { 1: [2, 18] }, { 1: [2, 19] }, { 15: [1, 151] }, i(zr, [2, 25]), i(Wr, [2, 45]), i(Cr, [2, 79]), i(la, [2, 81]), i(An, [2, 31]), i(An, [2, 42]), i(Jo, [2, 32]), i(Jo, [2, 33], { 15: [1, 152] }), i(_i, [2, 10]), i(Jo, [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(Hr, Yr) {
+ if (!Yr.recoverable) {
+ var ni = new Error(Hr);
+ throw ni.hash = Yr, ni;
+ }
+ this.trace(Hr);
+ }, parse: function(Hr) {
+ var Yr = this, ni = [0], Vr = [], Na = [null], er = [], as = this.table, xr = "", So = 0, cs = 0, xa = er.slice.call(arguments, 1), ro = Object.create(this.lexer), Lo = { yy: {} };
+ for (var Xo in this.yy)
+ Object.prototype.hasOwnProperty.call(this.yy, Xo) && (Lo.yy[Xo] = this.yy[Xo]);
+ ro.setInput(Hr, Lo.yy), Lo.yy.lexer = ro, Lo.yy.parser = this, ro.yylloc === void 0 && (ro.yylloc = {});
+ var Zo = ro.yylloc;
+ er.push(Zo);
+ var Fs = ro.options && ro.options.ranges;
+ function Hs() {
+ var bl;
+ return typeof (bl = Vr.pop() || ro.lex() || 1) != "number" && (bl instanceof Array && (bl = (Vr = bl).pop()), bl = Yr.symbols_[bl] || bl), bl;
+ }
+ typeof Lo.yy.parseError == "function" ? this.parseError = Lo.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
+ for (var Qa, Ff, Oc, Iu, da, _c, qf, wu, jo = {}; ; ) {
+ if (Ff = ni[ni.length - 1], this.defaultActions[Ff] ? Oc = this.defaultActions[Ff] : (Qa == null && (Qa = Hs()), Oc = as[Ff] && as[Ff][Qa]), Oc === void 0 || !Oc.length || !Oc[0]) {
+ var yf = "";
+ for (da in wu = [], as[Ff])
+ this.terminals_[da] && da > 2 && wu.push("'" + this.terminals_[da] + "'");
+ yf = ro.showPosition ? "Parse error on line " + (So + 1) + `:
+` + ro.showPosition() + `
+Expecting ` + wu.join(", ") + ", got '" + (this.terminals_[Qa] || Qa) + "'" : "Parse error on line " + (So + 1) + ": Unexpected " + (Qa == 1 ? "end of input" : "'" + (this.terminals_[Qa] || Qa) + "'"), this.parseError(yf, { text: ro.match, token: this.terminals_[Qa] || Qa, line: ro.yylineno, loc: Zo, expected: wu });
+ }
+ if (Oc[0] instanceof Array && Oc.length > 1)
+ throw new Error("Parse Error: multiple actions possible at state: " + Ff + ", token: " + Qa);
+ switch (Oc[0]) {
+ case 1:
+ ni.push(Qa), Na.push(ro.yytext), er.push(ro.yylloc), ni.push(Oc[1]), Qa = null, cs = ro.yyleng, xr = ro.yytext, So = ro.yylineno, Zo = ro.yylloc;
+ break;
+ case 2:
+ if (_c = this.productions_[Oc[1]][1], jo.$ = Na[Na.length - _c], jo._$ = { first_line: er[er.length - (_c || 1)].first_line, last_line: er[er.length - 1].last_line, first_column: er[er.length - (_c || 1)].first_column, last_column: er[er.length - 1].last_column }, Fs && (jo._$.range = [er[er.length - (_c || 1)].range[0], er[er.length - 1].range[1]]), (Iu = this.performAction.apply(jo, [xr, cs, So, Lo.yy, Oc[1], Na, er].concat(xa))) !== void 0)
+ return Iu;
+ _c && (ni = ni.slice(0, -1 * _c * 2), Na = Na.slice(0, -1 * _c), er = er.slice(0, -1 * _c)), ni.push(this.productions_[Oc[1]][0]), Na.push(jo.$), er.push(jo._$), qf = as[ni[ni.length - 2]][ni[ni.length - 1]], ni.push(qf);
+ break;
+ case 3:
+ return !0;
+ }
+ }
+ return !0;
+ } }, ji = (r = { EOF: 1, parseError: function(Hr, Yr) {
+ if (!this.yy.parser)
+ throw new Error(Hr);
+ this.yy.parser.parseError(Hr, Yr);
+ }, setInput: function(Hr, Yr) {
+ return this.yy = Yr || this.yy || {}, this._input = Hr, 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 Hr = this._input[0];
+ return this.yytext += Hr, this.yyleng++, this.offset++, this.match += Hr, this.matched += Hr, Hr.match(/(?:\r\n?|\n).*/g) ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), Hr;
+ }, unput: function(Hr) {
+ var Yr = Hr.length, ni = Hr.split(/(?:\r\n?|\n)/g);
+ this._input = Hr + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - Yr), this.offset -= Yr;
+ var Vr = 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), ni.length - 1 && (this.yylineno -= ni.length - 1);
+ var Na = 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: ni ? (ni.length === Vr.length ? this.yylloc.first_column : 0) + Vr[Vr.length - ni.length].length - ni[0].length : this.yylloc.first_column - Yr }, this.options.ranges && (this.yylloc.range = [Na[0], Na[0] + this.yyleng - Yr]), this.yyleng = this.yytext.length, this;
+ }, more: function() {
+ return this._more = !0, this;
+ }, reject: function() {
+ return this.options.backtrack_lexer ? (this._backtrack = !0, this) : 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 });
+ }, less: function(Hr) {
+ this.unput(this.match.slice(Hr));
+ }, pastInput: function() {
+ var Hr = this.matched.substr(0, this.matched.length - this.match.length);
+ return (Hr.length > 20 ? "..." : "") + Hr.substr(-20).replace(/\n/g, "");
+ }, upcomingInput: function() {
+ var Hr = this.match;
+ return Hr.length < 20 && (Hr += this._input.substr(0, 20 - Hr.length)), (Hr.substr(0, 20) + (Hr.length > 20 ? "..." : "")).replace(/\n/g, "");
+ }, showPosition: function() {
+ var Hr = this.pastInput(), Yr = new Array(Hr.length + 1).join("-");
+ return Hr + this.upcomingInput() + `
+` + Yr + "^";
+ }, test_match: function(Hr, Yr) {
+ var ni, Vr, Na;
+ if (this.options.backtrack_lexer && (Na = { 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 && (Na.yylloc.range = this.yylloc.range.slice(0))), (Vr = Hr[0].match(/(?:\r\n?|\n).*/g)) && (this.yylineno += Vr.length), this.yylloc = { first_line: this.yylloc.last_line, last_line: this.yylineno + 1, first_column: this.yylloc.last_column, last_column: Vr ? Vr[Vr.length - 1].length - Vr[Vr.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + Hr[0].length }, this.yytext += Hr[0], this.match += Hr[0], this.matches = Hr, 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(Hr[0].length), this.matched += Hr[0], ni = this.performAction.call(this, this.yy, this, Yr, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), ni)
+ return ni;
+ if (this._backtrack) {
+ for (var er in Na)
+ this[er] = Na[er];
+ return !1;
+ }
+ return !1;
+ }, next: function() {
+ if (this.done)
+ return this.EOF;
+ var Hr, Yr, ni, Vr;
+ this._input || (this.done = !0), this._more || (this.yytext = "", this.match = "");
+ for (var Na = this._currentRules(), er = 0; er < Na.length; er++)
+ if ((ni = this._input.match(this.rules[Na[er]])) && (!Yr || ni[0].length > Yr[0].length)) {
+ if (Yr = ni, Vr = er, this.options.backtrack_lexer) {
+ if ((Hr = this.test_match(ni, Na[er])) !== !1)
+ return Hr;
+ if (this._backtrack) {
+ Yr = !1;
+ continue;
+ }
+ return !1;
+ }
+ if (!this.options.flex)
+ break;
+ }
+ return Yr ? (Hr = this.test_match(Yr, Na[Vr])) !== !1 && Hr : 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 Hr = this.next();
+ return Hr || this.lex();
+ }, begin: function(Hr) {
+ this.conditionStack.push(Hr);
+ }, popState: function() {
+ return this.conditionStack.length - 1 > 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(Hr) {
+ return (Hr = this.conditionStack.length - 1 - Math.abs(Hr || 0)) >= 0 ? this.conditionStack[Hr] : "INITIAL";
+ }, pushState: function(Hr) {
+ this.begin(Hr);
+ }, stateStackSize: function() {
+ return this.conditionStack.length;
+ }, options: {}, performAction: function(Hr, Yr, ni, Vr) {
+ switch (ni) {
+ 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:
+ case 78:
+ this.popState();
+ break;
+ case 17:
+ return "acc_descr_multiline_value";
+ case 18:
+ case 21:
+ case 75:
+ break;
+ case 19:
+ c;
+ break;
+ case 20:
+ return 15;
+ 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:
+ 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:
+ case 58:
+ return this.begin("rel_u"), 76;
+ case 59:
+ case 60:
+ return this.begin("rel_d"), 77;
+ case 61:
+ case 62:
+ return this.begin("rel_l"), 78;
+ case 63:
+ 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:
+ case 84:
+ this.popState(), this.popState();
+ break;
+ case 74:
+ case 76:
+ return 90;
+ case 77:
+ this.begin("string");
+ break;
+ case 79:
+ case 85:
+ 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 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 } } }, r);
+ function Ya() {
+ this.yy = {};
+ }
+ return Cc.lexer = ji, Ya.prototype = Cc, Cc.Parser = Ya, new Ya();
+}();
+ybe.parser = ybe;
+const f9n = ybe, d9n = (r) => r.match(/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/) !== null;
+let I9 = [], oO = [""], p3 = "global", E9 = "", pT = [{ alias: "global", label: { text: "global" }, type: { text: "global" }, tags: null, link: null, parentBoundary: "" }], Une = [], EOe = "", UNe = !1, upe = 4, hpe = 2;
+var Y8t;
+const J8t = function(r) {
+ return r == null ? I9 : I9.filter((i) => i.parentBoundary === r);
+}, sO = function() {
+ return UNe;
+}, NLt = { addPersonOrSystem: function(r, i, o, l, f, g, A) {
+ if (i === null || o === null)
+ return;
+ let b = {};
+ const v = I9.find((k) => k.alias === i);
+ if (v && i === v.alias ? b = v : (b.alias = i, I9.push(b)), b.label = o == null ? { text: "" } : { text: o }, l == null)
+ b.descr = { text: "" };
+ else if (typeof l == "object") {
+ let [k, _] = Object.entries(l)[0];
+ b[k] = { text: _ };
+ } else
+ b.descr = { text: l };
+ if (typeof f == "object") {
+ let [k, _] = Object.entries(f)[0];
+ b[k] = _;
+ } else
+ b.sprite = f;
+ if (typeof g == "object") {
+ let [k, _] = Object.entries(g)[0];
+ b[k] = _;
+ } else
+ b.tags = g;
+ if (typeof A == "object") {
+ let [k, _] = Object.entries(A)[0];
+ b[k] = _;
+ } else
+ b.link = A;
+ b.typeC4Shape = { text: r }, b.parentBoundary = p3, b.wrap = sO();
+}, addPersonOrSystemBoundary: function(r, i, o, l, f) {
+ if (r === null || i === null)
+ return;
+ let g = {};
+ const A = pT.find((b) => b.alias === r);
+ if (A && r === A.alias ? g = A : (g.alias = r, pT.push(g)), g.label = i == null ? { text: "" } : { text: i }, o == null)
+ g.type = { text: "system" };
+ else if (typeof o == "object") {
+ let [b, v] = Object.entries(o)[0];
+ g[b] = { text: v };
+ } else
+ g.type = { text: o };
+ if (typeof l == "object") {
+ let [b, v] = Object.entries(l)[0];
+ g[b] = v;
+ } else
+ g.tags = l;
+ if (typeof f == "object") {
+ let [b, v] = Object.entries(f)[0];
+ g[b] = v;
+ } else
+ g.link = f;
+ g.parentBoundary = p3, g.wrap = sO(), E9 = p3, p3 = r, oO.push(E9);
+}, addContainer: function(r, i, o, l, f, g, A, b) {
+ if (i === null || o === null)
+ return;
+ let v = {};
+ const k = I9.find((_) => _.alias === i);
+ if (k && i === k.alias ? v = k : (v.alias = i, I9.push(v)), v.label = o == null ? { text: "" } : { text: o }, l == null)
+ v.techn = { text: "" };
+ else if (typeof l == "object") {
+ let [_, T] = Object.entries(l)[0];
+ v[_] = { text: T };
+ } else
+ v.techn = { text: l };
+ if (f == null)
+ v.descr = { text: "" };
+ else if (typeof f == "object") {
+ let [_, T] = Object.entries(f)[0];
+ v[_] = { text: T };
+ } else
+ v.descr = { text: f };
+ if (typeof g == "object") {
+ let [_, T] = Object.entries(g)[0];
+ v[_] = T;
+ } else
+ v.sprite = g;
+ if (typeof A == "object") {
+ let [_, T] = Object.entries(A)[0];
+ v[_] = T;
+ } else
+ v.tags = A;
+ if (typeof b == "object") {
+ let [_, T] = Object.entries(b)[0];
+ v[_] = T;
+ } else
+ v.link = b;
+ v.wrap = sO(), v.typeC4Shape = { text: r }, v.parentBoundary = p3;
+}, addContainerBoundary: function(r, i, o, l, f) {
+ if (r === null || i === null)
+ return;
+ let g = {};
+ const A = pT.find((b) => b.alias === r);
+ if (A && r === A.alias ? g = A : (g.alias = r, pT.push(g)), g.label = i == null ? { text: "" } : { text: i }, o == null)
+ g.type = { text: "container" };
+ else if (typeof o == "object") {
+ let [b, v] = Object.entries(o)[0];
+ g[b] = { text: v };
+ } else
+ g.type = { text: o };
+ if (typeof l == "object") {
+ let [b, v] = Object.entries(l)[0];
+ g[b] = v;
+ } else
+ g.tags = l;
+ if (typeof f == "object") {
+ let [b, v] = Object.entries(f)[0];
+ g[b] = v;
+ } else
+ g.link = f;
+ g.parentBoundary = p3, g.wrap = sO(), E9 = p3, p3 = r, oO.push(E9);
+}, addComponent: function(r, i, o, l, f, g, A, b) {
+ if (i === null || o === null)
+ return;
+ let v = {};
+ const k = I9.find((_) => _.alias === i);
+ if (k && i === k.alias ? v = k : (v.alias = i, I9.push(v)), v.label = o == null ? { text: "" } : { text: o }, l == null)
+ v.techn = { text: "" };
+ else if (typeof l == "object") {
+ let [_, T] = Object.entries(l)[0];
+ v[_] = { text: T };
+ } else
+ v.techn = { text: l };
+ if (f == null)
+ v.descr = { text: "" };
+ else if (typeof f == "object") {
+ let [_, T] = Object.entries(f)[0];
+ v[_] = { text: T };
+ } else
+ v.descr = { text: f };
+ if (typeof g == "object") {
+ let [_, T] = Object.entries(g)[0];
+ v[_] = T;
+ } else
+ v.sprite = g;
+ if (typeof A == "object") {
+ let [_, T] = Object.entries(A)[0];
+ v[_] = T;
+ } else
+ v.tags = A;
+ if (typeof b == "object") {
+ let [_, T] = Object.entries(b)[0];
+ v[_] = T;
+ } else
+ v.link = b;
+ v.wrap = sO(), v.typeC4Shape = { text: r }, v.parentBoundary = p3;
+}, addDeploymentNode: function(r, i, o, l, f, g, A, b) {
+ if (i === null || o === null)
+ return;
+ let v = {};
+ const k = pT.find((_) => _.alias === i);
+ if (k && i === k.alias ? v = k : (v.alias = i, pT.push(v)), v.label = o == null ? { text: "" } : { text: o }, l == null)
+ v.type = { text: "node" };
+ else if (typeof l == "object") {
+ let [_, T] = Object.entries(l)[0];
+ v[_] = { text: T };
+ } else
+ v.type = { text: l };
+ if (f == null)
+ v.descr = { text: "" };
+ else if (typeof f == "object") {
+ let [_, T] = Object.entries(f)[0];
+ v[_] = { text: T };
+ } else
+ v.descr = { text: f };
+ if (typeof A == "object") {
+ let [_, T] = Object.entries(A)[0];
+ v[_] = T;
+ } else
+ v.tags = A;
+ if (typeof b == "object") {
+ let [_, T] = Object.entries(b)[0];
+ v[_] = T;
+ } else
+ v.link = b;
+ v.nodeType = r, v.parentBoundary = p3, v.wrap = sO(), E9 = p3, p3 = i, oO.push(E9);
+}, popBoundaryParseStack: function() {
+ p3 = E9, oO.pop(), E9 = oO.pop(), oO.push(E9);
+}, addRel: function(r, i, o, l, f, g, A, b, v) {
+ if (r == null || i == null || o == null || l == null)
+ return;
+ let k = {};
+ const _ = Une.find((T) => T.from === i && T.to === o);
+ if (_ ? k = _ : Une.push(k), k.type = r, k.from = i, k.to = o, k.label = { text: l }, f == null)
+ k.techn = { text: "" };
+ else if (typeof f == "object") {
+ let [T, L] = Object.entries(f)[0];
+ k[T] = { text: L };
+ } else
+ k.techn = { text: f };
+ if (g == null)
+ k.descr = { text: "" };
+ else if (typeof g == "object") {
+ let [T, L] = Object.entries(g)[0];
+ k[T] = { text: L };
+ } else
+ k.descr = { text: g };
+ if (typeof A == "object") {
+ let [T, L] = Object.entries(A)[0];
+ k[T] = L;
+ } else
+ k.sprite = A;
+ if (typeof b == "object") {
+ let [T, L] = Object.entries(b)[0];
+ k[T] = L;
+ } else
+ k.tags = b;
+ if (typeof v == "object") {
+ let [T, L] = Object.entries(v)[0];
+ k[T] = L;
+ } else
+ k.link = v;
+ k.wrap = sO();
+}, updateElStyle: function(r, i, o, l, f, g, A, b, v, k, _) {
+ let T = I9.find((L) => L.alias === i);
+ if (T !== void 0 || (T = pT.find((L) => L.alias === i), T !== void 0)) {
+ if (o != null)
+ if (typeof o == "object") {
+ let [L, F] = Object.entries(o)[0];
+ T[L] = F;
+ } else
+ T.bgColor = o;
+ if (l != null)
+ if (typeof l == "object") {
+ let [L, F] = Object.entries(l)[0];
+ T[L] = F;
+ } else
+ T.fontColor = l;
+ if (f != null)
+ if (typeof f == "object") {
+ let [L, F] = Object.entries(f)[0];
+ T[L] = F;
+ } else
+ T.borderColor = f;
+ if (g != null)
+ if (typeof g == "object") {
+ let [L, F] = Object.entries(g)[0];
+ T[L] = F;
+ } else
+ T.shadowing = g;
+ if (A != null)
+ if (typeof A == "object") {
+ let [L, F] = Object.entries(A)[0];
+ T[L] = F;
+ } else
+ T.shape = A;
+ if (b != null)
+ if (typeof b == "object") {
+ let [L, F] = Object.entries(b)[0];
+ T[L] = F;
+ } else
+ T.sprite = b;
+ if (v != null)
+ if (typeof v == "object") {
+ let [L, F] = Object.entries(v)[0];
+ T[L] = F;
+ } else
+ T.techn = v;
+ if (k != null)
+ if (typeof k == "object") {
+ let [L, F] = Object.entries(k)[0];
+ T[L] = F;
+ } else
+ T.legendText = k;
+ if (_ != null)
+ if (typeof _ == "object") {
+ let [L, F] = Object.entries(_)[0];
+ T[L] = F;
+ } else
+ T.legendSprite = _;
+ }
+}, updateRelStyle: function(r, i, o, l, f, g, A) {
+ const b = Une.find((v) => v.from === i && v.to === o);
+ if (b !== void 0) {
+ if (l != null)
+ if (typeof l == "object") {
+ let [v, k] = Object.entries(l)[0];
+ b[v] = k;
+ } else
+ b.textColor = l;
+ if (f != null)
+ if (typeof f == "object") {
+ let [v, k] = Object.entries(f)[0];
+ b[v] = k;
+ } else
+ b.lineColor = f;
+ if (g != null)
+ if (typeof g == "object") {
+ let [v, k] = Object.entries(g)[0];
+ b[v] = parseInt(k);
+ } else
+ b.offsetX = parseInt(g);
+ if (A != null)
+ if (typeof A == "object") {
+ let [v, k] = Object.entries(A)[0];
+ b[v] = parseInt(k);
+ } else
+ b.offsetY = parseInt(A);
+ }
+}, updateLayoutConfig: function(r, i, o) {
+ let l = upe, f = hpe;
+ if (typeof i == "object") {
+ const g = Object.values(i)[0];
+ l = parseInt(g);
+ } else
+ l = parseInt(i);
+ if (typeof o == "object") {
+ const g = Object.values(o)[0];
+ f = parseInt(g);
+ } else
+ f = parseInt(o);
+ l >= 1 && (upe = l), f >= 1 && (hpe = f);
+}, autoWrap: sO, setWrap: function(r) {
+ UNe = r;
+}, getC4ShapeArray: J8t, getC4Shape: function(r) {
+ return I9.find((i) => i.alias === r);
+}, getC4ShapeKeys: function(r) {
+ return Object.keys(J8t(r));
+}, getBoundarys: function(r) {
+ return r == null ? pT : pT.filter((i) => i.parentBoundary === r);
+}, getCurrentBoundaryParse: function() {
+ return p3;
+}, getParentBoundaryParse: function() {
+ return E9;
+}, getRels: function() {
+ return Une;
+}, getTitle: function() {
+ return EOe;
+}, getC4Type: function() {
+ return Y8t;
+}, getC4ShapeInRow: function() {
+ return upe;
+}, getC4BoundaryInRow: function() {
+ return hpe;
+}, setAccTitle: k5, getAccTitle: _k, getAccDescription: Tk, setAccDescription: Ek, parseDirective: function(r, i, o) {
+ n0.parseDirective(this, r, i, o);
+}, getConfig: () => Bn().c4, clear: function() {
+ I9 = [], pT = [{ alias: "global", label: { text: "global" }, type: { text: "global" }, tags: null, link: null, parentBoundary: "" }], E9 = "", p3 = "global", oO = [""], Une = [], oO = [""], EOe = "", UNe = !1, upe = 4, hpe = 2;
+}, LINETYPE: { 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 }, ARROWTYPE: { FILLED: 0, OPEN: 1 }, PLACEMENT: { LEFTOF: 0, RIGHTOF: 1, OVER: 2 }, setTitle: function(r) {
+ EOe = yk(r, Bn());
+}, setC4Type: function(r) {
+ Y8t = yk(r, Bn());
+} }, PLt = function(r, i) {
+ const o = r.append("rect");
+ if (o.attr("x", i.x), o.attr("y", i.y), o.attr("fill", i.fill), o.attr("stroke", i.stroke), o.attr("width", i.width), o.attr("height", i.height), o.attr("rx", i.rx), o.attr("ry", i.ry), i.attrs !== "undefined" && i.attrs !== null)
+ for (let l in i.attrs)
+ o.attr(l, i.attrs[l]);
+ return i.class !== "undefined" && o.attr("class", i.class), o;
+}, A9n = function(r, i, o, l, f, g) {
+ const A = r.append("image");
+ A.attr("width", i), A.attr("height", o), A.attr("x", l), A.attr("y", f);
+ let b = g.startsWith("data:image/png;base64") ? g : u$(g);
+ A.attr("xlink:href", b);
+}, g9n = function() {
+ return { x: 0, y: 0, fill: "#EDF2AE", stroke: "#666", width: 100, anchor: "start", height: 100, rx: 0, ry: 0 };
+}, p9n = (r, i) => ({ fontFamily: r[i + "FontFamily"], fontSize: r[i + "FontSize"], fontWeight: r[i + "FontWeight"] }), dL = /* @__PURE__ */ function() {
+ function r(f, g, A, b, v, k, _) {
+ l(g.append("text").attr("x", A + v / 2).attr("y", b + k / 2 + 5).style("text-anchor", "middle").text(f), _);
+ }
+ function i(f, g, A, b, v, k, _, T) {
+ const { fontSize: L, fontFamily: F, fontWeight: U } = T, q = f.split(El.lineBreakRegex);
+ for (let Z = 0; Z < q.length; Z++) {
+ const R = Z * L - L * (q.length - 1) / 2, J = g.append("text").attr("x", A + v / 2).attr("y", b).style("text-anchor", "middle").attr("dominant-baseline", "middle").style("font-size", L).style("font-weight", U).style("font-family", F);
+ J.append("tspan").attr("dy", R).text(q[Z]).attr("alignment-baseline", "mathematical"), l(J, _);
+ }
+ }
+ function o(f, g, A, b, v, k, _, T) {
+ const L = g.append("switch"), F = L.append("foreignObject").attr("x", A).attr("y", b).attr("width", v).attr("height", k).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
+ F.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(f), i(f, L, A, b, v, 0, _, T), l(F, _);
+ }
+ function l(f, g) {
+ for (const A in g)
+ g.hasOwnProperty(A) && f.attr(A, g[A]);
+ }
+ return function(f) {
+ return f.textPlacement === "fo" ? o : f.textPlacement === "old" ? r : i;
+ };
+}(), m9n = function(r, i, o) {
+ const l = r.append("g");
+ let f = i.bgColor ? i.bgColor : "none", g = i.borderColor ? i.borderColor : "#444444", A = i.fontColor ? i.fontColor : "black", b = { "stroke-width": 1, "stroke-dasharray": "7.0,7.0" };
+ i.nodeType && (b = { "stroke-width": 1 });
+ let v = { x: i.x, y: i.y, fill: f, stroke: g, width: i.width, height: i.height, rx: 2.5, ry: 2.5, attrs: b };
+ PLt(l, v);
+ let k = o.boundaryFont();
+ k.fontWeight = "bold", k.fontSize = k.fontSize + 2, k.fontColor = A, dL(o)(i.label.text, l, i.x, i.y + i.label.Y, i.width, i.height, { fill: "#444444" }, k), i.type && i.type.text !== "" && (k = o.boundaryFont(), k.fontColor = A, dL(o)(i.type.text, l, i.x, i.y + i.type.Y, i.width, i.height, { fill: "#444444" }, k)), i.descr && i.descr.text !== "" && (k = o.boundaryFont(), k.fontSize = k.fontSize - 2, k.fontColor = A, dL(o)(i.descr.text, l, i.x, i.y + i.descr.Y, i.width, i.height, { fill: "#444444" }, k));
+}, b9n = function(r, i, o) {
+ var l;
+ let f = i.bgColor ? i.bgColor : o[i.typeC4Shape.text + "_bg_color"], g = i.borderColor ? i.borderColor : o[i.typeC4Shape.text + "_border_color"], A = i.fontColor ? i.fontColor : "#FFFFFF", b = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";
+ switch (i.typeC4Shape.text) {
+ case "person":
+ b = "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":
+ b = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";
+ }
+ const v = r.append("g");
+ v.attr("class", "person-man");
+ const k = g9n();
+ switch (i.typeC4Shape.text) {
+ case "person":
+ case "external_person":
+ case "system":
+ case "external_system":
+ case "container":
+ case "external_container":
+ case "component":
+ case "external_component":
+ k.x = i.x, k.y = i.y, k.fill = f, k.width = i.width, k.height = i.height, k.stroke = g, k.rx = 2.5, k.ry = 2.5, k.attrs = { "stroke-width": 0.5 }, PLt(v, k);
+ break;
+ case "system_db":
+ case "external_system_db":
+ case "container_db":
+ case "external_container_db":
+ case "component_db":
+ case "external_component_db":
+ v.append("path").attr("fill", f).attr("stroke-width", "0.5").attr("stroke", g).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", i.x).replaceAll("starty", i.y).replaceAll("half", i.width / 2).replaceAll("height", i.height)), v.append("path").attr("fill", "none").attr("stroke-width", "0.5").attr("stroke", g).attr("d", "Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx", i.x).replaceAll("starty", i.y).replaceAll("half", i.width / 2));
+ break;
+ case "system_queue":
+ case "external_system_queue":
+ case "container_queue":
+ case "external_container_queue":
+ case "component_queue":
+ case "external_component_queue":
+ v.append("path").attr("fill", f).attr("stroke-width", "0.5").attr("stroke", g).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", i.x).replaceAll("starty", i.y).replaceAll("width", i.width).replaceAll("half", i.height / 2)), v.append("path").attr("fill", "none").attr("stroke-width", "0.5").attr("stroke", g).attr("d", "Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx", i.x + i.width).replaceAll("starty", i.y).replaceAll("half", i.height / 2));
+ }
+ let _ = p9n(o, i.typeC4Shape.text);
+ switch (v.append("text").attr("fill", A).attr("font-family", _.fontFamily).attr("font-size", _.fontSize - 2).attr("font-style", "italic").attr("lengthAdjust", "spacing").attr("textLength", i.typeC4Shape.width).attr("x", i.x + i.width / 2 - i.typeC4Shape.width / 2).attr("y", i.y + i.typeC4Shape.Y).text("<<" + i.typeC4Shape.text + ">>"), i.typeC4Shape.text) {
+ case "person":
+ case "external_person":
+ A9n(v, 48, 48, i.x + i.width / 2 - 24, i.y + i.image.Y, b);
+ }
+ let T = o[i.typeC4Shape.text + "Font"]();
+ return T.fontWeight = "bold", T.fontSize = T.fontSize + 2, T.fontColor = A, dL(o)(i.label.text, v, i.x, i.y + i.label.Y, i.width, i.height, { fill: A }, T), T = o[i.typeC4Shape.text + "Font"](), T.fontColor = A, i.techn && ((l = i.techn) == null ? void 0 : l.text) !== "" ? dL(o)(i.techn.text, v, i.x, i.y + i.techn.Y, i.width, i.height, { fill: A, "font-style": "italic" }, T) : i.type && i.type.text !== "" && dL(o)(i.type.text, v, i.x, i.y + i.type.Y, i.width, i.height, { fill: A, "font-style": "italic" }, T), i.descr && i.descr.text !== "" && (T = o.personFont(), T.fontColor = A, dL(o)(i.descr.text, v, i.x, i.y + i.descr.Y, i.width, i.height, { fill: A }, T)), i.height;
+}, v9n = (r, i, o) => {
+ const l = r.append("g");
+ let f = 0;
+ for (let g of i) {
+ let A = g.textColor ? g.textColor : "#444444", b = g.lineColor ? g.lineColor : "#444444", v = g.offsetX ? parseInt(g.offsetX) : 0, k = g.offsetY ? parseInt(g.offsetY) : 0, _ = "";
+ if (f === 0) {
+ let L = l.append("line");
+ L.attr("x1", g.startPoint.x), L.attr("y1", g.startPoint.y), L.attr("x2", g.endPoint.x), L.attr("y2", g.endPoint.y), L.attr("stroke-width", "1"), L.attr("stroke", b), L.style("fill", "none"), g.type !== "rel_b" && L.attr("marker-end", "url(" + _ + "#arrowhead)"), g.type !== "birel" && g.type !== "rel_b" || L.attr("marker-start", "url(" + _ + "#arrowend)"), f = -1;
+ } else {
+ let L = l.append("path");
+ L.attr("fill", "none").attr("stroke-width", "1").attr("stroke", b).attr("d", "Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx", g.startPoint.x).replaceAll("starty", g.startPoint.y).replaceAll("controlx", g.startPoint.x + (g.endPoint.x - g.startPoint.x) / 2 - (g.endPoint.x - g.startPoint.x) / 4).replaceAll("controly", g.startPoint.y + (g.endPoint.y - g.startPoint.y) / 2).replaceAll("stopx", g.endPoint.x).replaceAll("stopy", g.endPoint.y)), g.type !== "rel_b" && L.attr("marker-end", "url(" + _ + "#arrowhead)"), g.type !== "birel" && g.type !== "rel_b" || L.attr("marker-start", "url(" + _ + "#arrowend)");
+ }
+ let T = o.messageFont();
+ dL(o)(g.label.text, l, Math.min(g.startPoint.x, g.endPoint.x) + Math.abs(g.endPoint.x - g.startPoint.x) / 2 + v, Math.min(g.startPoint.y, g.endPoint.y) + Math.abs(g.endPoint.y - g.startPoint.y) / 2 + k, g.label.width, g.label.height, { fill: A }, T), g.techn && g.techn.text !== "" && (T = o.messageFont(), dL(o)("[" + g.techn.text + "]", l, Math.min(g.startPoint.x, g.endPoint.x) + Math.abs(g.endPoint.x - g.startPoint.x) / 2 + v, Math.min(g.startPoint.y, g.endPoint.y) + Math.abs(g.endPoint.y - g.startPoint.y) / 2 + o.messageFontSize + 5 + k, Math.max(g.label.width, g.techn.width), g.techn.height, { fill: A, "font-style": "italic" }, T));
+ }
+}, y9n = function(r) {
+ r.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");
+}, w9n = function(r) {
+ r.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");
+}, k9n = function(r) {
+ r.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");
+}, x9n = function(r) {
+ const i = r.append("defs").append("marker").attr("id", "crosshead").attr("markerWidth", 15).attr("markerHeight", 8).attr("orient", "auto").attr("refX", 16).attr("refY", 4);
+ i.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"), i.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");
+}, C9n = function(r) {
+ r.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");
+}, _9n = function(r) {
+ r.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");
+}, E9n = function(r) {
+ r.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");
+};
+let wbe = 0, kbe = 0, RLt = 4, HNe = 2;
+ybe.yy = NLt;
+let Us = {};
+class QLt {
+ constructor(i) {
+ 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, jNe(i.db.getConfig());
+ }
+ setData(i, o, l, f) {
+ this.nextData.startx = this.data.startx = i, this.nextData.stopx = this.data.stopx = o, this.nextData.starty = this.data.starty = l, this.nextData.stopy = this.data.stopy = f;
+ }
+ updateVal(i, o, l, f) {
+ i[o] === void 0 ? i[o] = l : i[o] = f(l, i[o]);
+ }
+ insert(i) {
+ this.nextData.cnt = this.nextData.cnt + 1;
+ let o = this.nextData.startx === this.nextData.stopx ? this.nextData.stopx + i.margin : this.nextData.stopx + 2 * i.margin, l = o + i.width, f = this.nextData.starty + 2 * i.margin, g = f + i.height;
+ (o >= this.data.widthLimit || l >= this.data.widthLimit || this.nextData.cnt > RLt) && (o = this.nextData.startx + i.margin + Us.nextLinePaddingX, f = this.nextData.stopy + 2 * i.margin, this.nextData.stopx = l = o + i.width, this.nextData.starty = this.nextData.stopy, this.nextData.stopy = g = f + i.height, this.nextData.cnt = 1), i.x = o, i.y = f, this.updateVal(this.data, "startx", o, Math.min), this.updateVal(this.data, "starty", f, Math.min), this.updateVal(this.data, "stopx", l, Math.max), this.updateVal(this.data, "stopy", g, Math.max), this.updateVal(this.nextData, "startx", o, Math.min), this.updateVal(this.nextData, "starty", f, Math.min), this.updateVal(this.nextData, "stopx", l, Math.max), this.updateVal(this.nextData, "stopy", g, Math.max);
+ }
+ init(i) {
+ 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 }, jNe(i.db.getConfig());
+ }
+ bumpLastMargin(i) {
+ this.data.stopx += i, this.data.stopy += i;
+ }
+}
+const jNe = function(r) {
+ p2(Us, r), r.fontFamily && (Us.personFontFamily = Us.systemFontFamily = Us.messageFontFamily = r.fontFamily), r.fontSize && (Us.personFontSize = Us.systemFontSize = Us.messageFontSize = r.fontSize), r.fontWeight && (Us.personFontWeight = Us.systemFontWeight = Us.messageFontWeight = r.fontWeight);
+}, Hne = (r, i) => ({ fontFamily: r[i + "FontFamily"], fontSize: r[i + "FontSize"], fontWeight: r[i + "FontWeight"] }), dme = (r) => ({ fontFamily: r.boundaryFontFamily, fontSize: r.boundaryFontSize, fontWeight: r.boundaryFontWeight });
+function U9(r, i, o, l, f) {
+ if (!i[r].width)
+ if (o)
+ i[r].text = bLt(i[r].text, f, l), i[r].textLines = i[r].text.split(El.lineBreakRegex).length, i[r].width = f, i[r].height = NNe(i[r].text, l);
+ else {
+ let g = i[r].text.split(El.lineBreakRegex);
+ i[r].textLines = g.length;
+ let A = 0;
+ i[r].height = 0, i[r].width = 0;
+ for (const b of g)
+ i[r].width = Math.max(IT(b, l), i[r].width), A = NNe(b, l), i[r].height = i[r].height + A;
+ }
+}
+const $Lt = function(r, i, o) {
+ i.x = o.data.startx, i.y = o.data.starty, i.width = o.data.stopx - o.data.startx, i.height = o.data.stopy - o.data.starty, i.label.y = Us.c4ShapeMargin - 35;
+ let l = i.wrap && Us.wrap, f = dme(Us);
+ f.fontSize = f.fontSize + 2, f.fontWeight = "bold", U9("label", i, l, f, IT(i.label.text, f)), m9n(r, i, Us);
+}, ULt = function(r, i, o, l) {
+ let f = 0;
+ for (const g of l) {
+ f = 0;
+ const A = o[g];
+ let b = Hne(Us, A.typeC4Shape.text);
+ switch (b.fontSize = b.fontSize - 2, A.typeC4Shape.width = IT("<<" + A.typeC4Shape.text + ">>", b), A.typeC4Shape.height = b.fontSize + 2, A.typeC4Shape.Y = Us.c4ShapePadding, f = 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 = f, f = A.image.Y + A.image.height;
+ }
+ A.sprite && (A.image.width = 48, A.image.height = 48, A.image.Y = f, f = A.image.Y + A.image.height);
+ let v = A.wrap && Us.wrap, k = Us.width - 2 * Us.c4ShapePadding, _ = Hne(Us, A.typeC4Shape.text);
+ _.fontSize = _.fontSize + 2, _.fontWeight = "bold", U9("label", A, v, _, k), A.label.Y = f + 8, f = A.label.Y + A.label.height, A.type && A.type.text !== "" ? (A.type.text = "[" + A.type.text + "]", U9("type", A, v, Hne(Us, A.typeC4Shape.text), k), A.type.Y = f + 5, f = A.type.Y + A.type.height) : A.techn && A.techn.text !== "" && (A.techn.text = "[" + A.techn.text + "]", U9("techn", A, v, Hne(Us, A.techn.text), k), A.techn.Y = f + 5, f = A.techn.Y + A.techn.height);
+ let T = f, L = A.label.width;
+ A.descr && A.descr.text !== "" && (U9("descr", A, v, Hne(Us, A.typeC4Shape.text), k), A.descr.Y = f + 20, f = A.descr.Y + A.descr.height, L = Math.max(A.label.width, A.descr.width), T = f - 5 * A.descr.textLines), L += Us.c4ShapePadding, A.width = Math.max(A.width || Us.width, L, Us.width), A.height = Math.max(A.height || Us.height, T, Us.height), A.margin = A.margin || Us.c4ShapeMargin, r.insert(A), b9n(i, A, Us);
+ }
+ r.bumpLastMargin(Us.c4ShapeMargin);
+};
+class J8 {
+ constructor(i, o) {
+ this.x = i, this.y = o;
+ }
+}
+let Z8t = function(r, i) {
+ let o = r.x, l = r.y, f = i.x, g = i.y, A = o + r.width / 2, b = l + r.height / 2, v = Math.abs(o - f), k = Math.abs(l - g), _ = k / v, T = r.height / r.width, L = null;
+ return l == g && o < f ? L = new J8(o + r.width, b) : l == g && o > f ? L = new J8(o, b) : o == f && l < g ? L = new J8(A, l + r.height) : o == f && l > g && (L = new J8(A, l)), o > f && l < g ? L = T >= _ ? new J8(o, b + _ * r.width / 2) : new J8(A - v / k * r.height / 2, l + r.height) : o < f && l < g ? L = T >= _ ? new J8(o + r.width, b + _ * r.width / 2) : new J8(A + v / k * r.height / 2, l + r.height) : o < f && l > g ? L = T >= _ ? new J8(o + r.width, b - _ * r.width / 2) : new J8(A + r.height / 2 * v / k, l) : o > f && l > g && (L = T >= _ ? new J8(o, b - r.width / 2 * _) : new J8(A - r.height / 2 * v / k, l)), L;
+}, T9n = function(r, i) {
+ let o = { x: 0, y: 0 };
+ o.x = i.x + i.width / 2, o.y = i.y + i.height / 2;
+ let l = Z8t(r, o);
+ return o.x = r.x + r.width / 2, o.y = r.y + r.height / 2, { startPoint: l, endPoint: Z8t(i, o) };
+};
+function HLt(r, i, o, l, f) {
+ let g = new QLt(f);
+ g.data.widthLimit = o.data.widthLimit / Math.min(HNe, l.length);
+ for (let [A, b] of l.entries()) {
+ let v = 0;
+ b.image = { width: 0, height: 0, Y: 0 }, b.sprite && (b.image.width = 48, b.image.height = 48, b.image.Y = v, v = b.image.Y + b.image.height);
+ let k = b.wrap && Us.wrap, _ = dme(Us);
+ if (_.fontSize = _.fontSize + 2, _.fontWeight = "bold", U9("label", b, k, _, g.data.widthLimit), b.label.Y = v + 8, v = b.label.Y + b.label.height, b.type && b.type.text !== "" && (b.type.text = "[" + b.type.text + "]", U9("type", b, k, dme(Us), g.data.widthLimit), b.type.Y = v + 5, v = b.type.Y + b.type.height), b.descr && b.descr.text !== "") {
+ let U = dme(Us);
+ U.fontSize = U.fontSize - 2, U9("descr", b, k, U, g.data.widthLimit), b.descr.Y = v + 20, v = b.descr.Y + b.descr.height;
+ }
+ if (A == 0 || A % HNe == 0) {
+ let U = o.data.startx + Us.diagramMarginX, q = o.data.stopy + Us.diagramMarginY + v;
+ g.setData(U, U, q, q);
+ } else {
+ let U = g.data.stopx !== g.data.startx ? g.data.stopx + Us.diagramMarginX : g.data.startx, q = g.data.starty;
+ g.setData(U, U, q, q);
+ }
+ g.name = b.alias;
+ let T = f.db.getC4ShapeArray(b.alias), L = f.db.getC4ShapeKeys(b.alias);
+ L.length > 0 && ULt(g, r, T, L), i = b.alias;
+ let F = f.db.getBoundarys(i);
+ F.length > 0 && HLt(r, i, g, F, f), b.alias !== "global" && $Lt(r, b, g), o.data.stopy = Math.max(g.data.stopy + Us.c4ShapeMargin, o.data.stopy), o.data.stopx = Math.max(g.data.stopx + Us.c4ShapeMargin, o.data.stopx), wbe = Math.max(wbe, o.data.stopx), kbe = Math.max(kbe, o.data.stopy);
+ }
+}
+const eCt = { drawPersonOrSystemArray: ULt, drawBoundary: $Lt, setConf: jNe, draw: function(r, i, o, l) {
+ Us = Bn().c4;
+ const f = Bn().securityLevel;
+ let g;
+ f === "sandbox" && (g = co("#i" + i));
+ const A = co(f === "sandbox" ? g.nodes()[0].contentDocument.body : "body");
+ let b = l.db;
+ l.db.setWrap(Us.wrap), RLt = b.getC4ShapeInRow(), HNe = b.getC4BoundaryInRow(), _t.debug(`C:${JSON.stringify(Us, null, 2)}`);
+ const v = f === "sandbox" ? A.select(`[id="${i}"]`) : co(`[id="${i}"]`);
+ _9n(v), C9n(v), E9n(v);
+ let k = new QLt(l);
+ k.setData(Us.diagramMarginX, Us.diagramMarginX, Us.diagramMarginY, Us.diagramMarginY), k.data.widthLimit = screen.availWidth, wbe = Us.diagramMarginX, kbe = Us.diagramMarginY;
+ const _ = l.db.getTitle();
+ HLt(v, "", k, l.db.getBoundarys(""), l), y9n(v), w9n(v), x9n(v), k9n(v), function(q, Z, R, J) {
+ let he = 0;
+ for (let ue of Z) {
+ he += 1;
+ let le = ue.wrap && Us.wrap, be = { fontFamily: (Y = Us).messageFontFamily, fontSize: Y.messageFontSize, fontWeight: Y.messageFontWeight };
+ J.db.getC4Type() === "C4Dynamic" && (ue.label.text = he + ": " + ue.label.text);
+ let ke = IT(ue.label.text, be);
+ U9("label", ue, le, be, ke), ue.techn && ue.techn.text !== "" && (ke = IT(ue.techn.text, be), U9("techn", ue, le, be, ke)), ue.descr && ue.descr.text !== "" && (ke = IT(ue.descr.text, be), U9("descr", ue, le, be, ke));
+ let de = R(ue.from), Te = R(ue.to), xe = T9n(de, Te);
+ ue.startPoint = xe.startPoint, ue.endPoint = xe.endPoint;
+ }
+ var Y;
+ v9n(q, Z, Us);
+ }(v, l.db.getRels(), l.db.getC4Shape, l), k.data.stopx = wbe, k.data.stopy = kbe;
+ const T = k.data;
+ let L = T.stopy - T.starty + 2 * Us.diagramMarginY;
+ const F = T.stopx - T.startx + 2 * Us.diagramMarginX;
+ _ && v.append("text").text(_).attr("x", (T.stopx - T.startx) / 2 - 4 * Us.diagramMarginX).attr("y", T.starty + Us.diagramMarginY), V9(v, L, F, Us.useMaxWidth);
+ const U = _ ? 60 : 0;
+ v.attr("viewBox", T.startx - Us.diagramMarginX + " -" + (Us.diagramMarginY + U) + " " + F + " " + (L + U)), _t.debug("models:", T);
+} };
+var KNe = function() {
+ var r, i = function(an, Ot, $n, pt) {
+ for ($n = $n || {}, pt = an.length; pt--; $n[an[pt]] = Ot)
+ ;
+ return $n;
+ }, o = [1, 3], l = [1, 7], f = [1, 8], g = [1, 9], A = [1, 10], b = [1, 13], v = [1, 12], k = [1, 16, 25], _ = [1, 20], T = [1, 32], L = [1, 33], F = [1, 34], U = [1, 36], q = [1, 39], Z = [1, 37], R = [1, 38], J = [1, 44], he = [1, 45], Y = [1, 40], ue = [1, 41], le = [1, 42], be = [1, 43], ke = [1, 48], de = [1, 49], Te = [1, 50], xe = [1, 51], ie = [16, 25], Be = [1, 65], te = [1, 66], Me = [1, 67], ve = [1, 68], ge = [1, 69], Je = [1, 70], ot = [1, 71], bt = [1, 80], gt = [16, 25, 32, 45, 46, 54, 60, 61, 62, 63, 64, 65, 66, 71, 73], je = [16, 25, 30, 32, 45, 46, 50, 54, 60, 61, 62, 63, 64, 65, 66, 71, 73, 88, 89, 90, 91], Qe = [5, 8, 9, 10, 11, 16, 19, 23, 25], kt = [54, 88, 89, 90, 91], Wt = [54, 65, 66, 88, 89, 90, 91], jt = [54, 60, 61, 62, 63, 64, 88, 89, 90, 91], Zn = [16, 25, 32], Ft = [1, 107], wn = { 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(an, Ot, $n, pt, Ci, ut, br) {
+ var zt = ut.length - 1;
+ switch (Ci) {
+ case 5:
+ pt.setDirection("TB");
+ break;
+ case 6:
+ pt.setDirection("BT");
+ break;
+ case 7:
+ pt.setDirection("RL");
+ break;
+ case 8:
+ pt.setDirection("LR");
+ break;
+ case 12:
+ pt.parseDirective("%%{", "open_directive");
+ break;
+ case 13:
+ pt.parseDirective(ut[zt], "type_directive");
+ break;
+ case 14:
+ ut[zt] = ut[zt].trim().replace(/'/g, '"'), pt.parseDirective(ut[zt], "arg_directive");
+ break;
+ case 15:
+ pt.parseDirective("}%%", "close_directive", "class");
+ break;
+ case 20:
+ case 21:
+ this.$ = ut[zt];
+ break;
+ case 22:
+ this.$ = ut[zt - 1] + ut[zt];
+ break;
+ case 23:
+ case 24:
+ this.$ = ut[zt - 1] + "~" + ut[zt];
+ break;
+ case 25:
+ pt.addRelation(ut[zt]);
+ break;
+ case 26:
+ ut[zt - 1].title = pt.cleanupLabel(ut[zt]), pt.addRelation(ut[zt - 1]);
+ break;
+ case 35:
+ this.$ = ut[zt].trim(), pt.setAccTitle(this.$);
+ break;
+ case 36:
+ case 37:
+ this.$ = ut[zt].trim(), pt.setAccDescription(this.$);
+ break;
+ case 38:
+ pt.addClass(ut[zt]);
+ break;
+ case 39:
+ pt.addClass(ut[zt - 2]), pt.setCssClass(ut[zt - 2], ut[zt]);
+ break;
+ case 40:
+ pt.addClass(ut[zt - 3]), pt.addMembers(ut[zt - 3], ut[zt - 1]);
+ break;
+ case 41:
+ pt.addClass(ut[zt - 5]), pt.setCssClass(ut[zt - 5], ut[zt - 3]), pt.addMembers(ut[zt - 5], ut[zt - 1]);
+ break;
+ case 42:
+ pt.addAnnotation(ut[zt], ut[zt - 2]);
+ break;
+ case 43:
+ this.$ = [ut[zt]];
+ break;
+ case 44:
+ ut[zt].push(ut[zt - 1]), this.$ = ut[zt];
+ break;
+ case 45:
+ case 47:
+ case 48:
+ break;
+ case 46:
+ pt.addMember(ut[zt - 1], pt.cleanupLabel(ut[zt]));
+ break;
+ case 49:
+ this.$ = { id1: ut[zt - 2], id2: ut[zt], relation: ut[zt - 1], relationTitle1: "none", relationTitle2: "none" };
+ break;
+ case 50:
+ this.$ = { id1: ut[zt - 3], id2: ut[zt], relation: ut[zt - 1], relationTitle1: ut[zt - 2], relationTitle2: "none" };
+ break;
+ case 51:
+ this.$ = { id1: ut[zt - 3], id2: ut[zt], relation: ut[zt - 2], relationTitle1: "none", relationTitle2: ut[zt - 1] };
+ break;
+ case 52:
+ this.$ = { id1: ut[zt - 4], id2: ut[zt], relation: ut[zt - 2], relationTitle1: ut[zt - 3], relationTitle2: ut[zt - 1] };
+ break;
+ case 53:
+ pt.addNote(ut[zt], ut[zt - 1]);
+ break;
+ case 54:
+ pt.addNote(ut[zt]);
+ break;
+ case 55:
+ this.$ = { type1: ut[zt - 2], type2: ut[zt], lineType: ut[zt - 1] };
+ break;
+ case 56:
+ this.$ = { type1: "none", type2: ut[zt], lineType: ut[zt - 1] };
+ break;
+ case 57:
+ this.$ = { type1: ut[zt - 1], type2: "none", lineType: ut[zt] };
+ break;
+ case 58:
+ this.$ = { type1: "none", type2: "none", lineType: ut[zt] };
+ break;
+ case 59:
+ this.$ = pt.relationType.AGGREGATION;
+ break;
+ case 60:
+ this.$ = pt.relationType.EXTENSION;
+ break;
+ case 61:
+ this.$ = pt.relationType.COMPOSITION;
+ break;
+ case 62:
+ this.$ = pt.relationType.DEPENDENCY;
+ break;
+ case 63:
+ this.$ = pt.relationType.LOLLIPOP;
+ break;
+ case 64:
+ this.$ = pt.lineType.LINE;
+ break;
+ case 65:
+ this.$ = pt.lineType.DOTTED_LINE;
+ break;
+ case 66:
+ case 72:
+ this.$ = ut[zt - 2], pt.setClickEvent(ut[zt - 1], ut[zt]);
+ break;
+ case 67:
+ case 73:
+ this.$ = ut[zt - 3], pt.setClickEvent(ut[zt - 2], ut[zt - 1]), pt.setTooltip(ut[zt - 2], ut[zt]);
+ break;
+ case 68:
+ case 76:
+ this.$ = ut[zt - 2], pt.setLink(ut[zt - 1], ut[zt]);
+ break;
+ case 69:
+ case 77:
+ this.$ = ut[zt - 3], pt.setLink(ut[zt - 2], ut[zt - 1], ut[zt]);
+ break;
+ case 70:
+ case 78:
+ this.$ = ut[zt - 3], pt.setLink(ut[zt - 2], ut[zt - 1]), pt.setTooltip(ut[zt - 2], ut[zt]);
+ break;
+ case 71:
+ case 79:
+ this.$ = ut[zt - 4], pt.setLink(ut[zt - 3], ut[zt - 2], ut[zt]), pt.setTooltip(ut[zt - 3], ut[zt - 1]);
+ break;
+ case 74:
+ this.$ = ut[zt - 3], pt.setClickEvent(ut[zt - 2], ut[zt - 1], ut[zt]);
+ break;
+ case 75:
+ this.$ = ut[zt - 4], pt.setClickEvent(ut[zt - 3], ut[zt - 2], ut[zt - 1]), pt.setTooltip(ut[zt - 3], ut[zt]);
+ break;
+ case 80:
+ pt.setCssClass(ut[zt - 1], ut[zt]);
+ }
+ }, table: [{ 3: 1, 4: 2, 5: o, 6: 4, 7: 5, 8: l, 9: f, 10: g, 11: A, 12: 6, 13: 11, 19: b, 23: v }, { 1: [3] }, { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3] }, { 3: 14, 4: 2, 5: o, 6: 4, 7: 5, 8: l, 9: f, 10: g, 11: A, 12: 6, 13: 11, 19: b, 23: v }, { 1: [2, 9] }, i(k, [2, 5]), i(k, [2, 6]), i(k, [2, 7]), i(k, [2, 8]), { 14: 15, 20: [1, 16] }, { 16: [1, 17] }, { 20: [2, 12] }, { 1: [2, 4] }, { 15: 18, 17: [1, 19], 22: _ }, i([17, 22], [2, 13]), { 6: 31, 7: 30, 8: l, 9: f, 10: g, 11: A, 13: 11, 19: b, 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: T, 41: L, 43: F, 44: U, 49: q, 51: Z, 52: R, 55: J, 57: he, 67: Y, 68: ue, 70: le, 74: be, 88: ke, 89: de, 90: Te, 91: xe }, { 16: [1, 52] }, { 18: 53, 21: [1, 54] }, { 16: [2, 15] }, { 25: [1, 55] }, { 16: [1, 56], 25: [2, 17] }, i(ie, [2, 25], { 32: [1, 57] }), i(ie, [2, 27]), i(ie, [2, 28]), i(ie, [2, 29]), i(ie, [2, 30]), i(ie, [2, 31]), i(ie, [2, 32]), i(ie, [2, 33]), i(ie, [2, 34]), { 40: [1, 58] }, { 42: [1, 59] }, i(ie, [2, 37]), i(ie, [2, 45], { 53: 60, 58: 63, 59: 64, 32: [1, 62], 54: [1, 61], 60: Be, 61: te, 62: Me, 63: ve, 64: ge, 65: Je, 66: ot }), { 27: 72, 28: 46, 29: 47, 88: ke, 89: de, 90: Te, 91: xe }, i(ie, [2, 47]), i(ie, [2, 48]), { 28: 73, 88: ke, 89: de, 90: Te }, { 27: 74, 28: 46, 29: 47, 88: ke, 89: de, 90: Te, 91: xe }, { 27: 75, 28: 46, 29: 47, 88: ke, 89: de, 90: Te, 91: xe }, { 27: 76, 28: 46, 29: 47, 88: ke, 89: de, 90: Te, 91: xe }, { 54: [1, 77] }, { 27: 78, 28: 46, 29: 47, 88: ke, 89: de, 90: Te, 91: xe }, { 54: bt, 56: 79 }, i(gt, [2, 20], { 28: 46, 29: 47, 27: 81, 30: [1, 82], 88: ke, 89: de, 90: Te, 91: xe }), i(gt, [2, 21], { 30: [1, 83] }), i(je, [2, 94]), i(je, [2, 95]), i(je, [2, 96]), i([16, 25, 30, 32, 45, 46, 54, 60, 61, 62, 63, 64, 65, 66, 71, 73], [2, 97]), i(Qe, [2, 10]), { 15: 84, 22: _ }, { 22: [2, 14] }, { 1: [2, 16] }, { 6: 31, 7: 30, 8: l, 9: f, 10: g, 11: A, 13: 11, 19: b, 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: T, 41: L, 43: F, 44: U, 49: q, 51: Z, 52: R, 55: J, 57: he, 67: Y, 68: ue, 70: le, 74: be, 88: ke, 89: de, 90: Te, 91: xe }, i(ie, [2, 26]), i(ie, [2, 35]), i(ie, [2, 36]), { 27: 86, 28: 46, 29: 47, 54: [1, 87], 88: ke, 89: de, 90: Te, 91: xe }, { 53: 88, 58: 63, 59: 64, 60: Be, 61: te, 62: Me, 63: ve, 64: ge, 65: Je, 66: ot }, i(ie, [2, 46]), { 59: 89, 65: Je, 66: ot }, i(kt, [2, 58], { 58: 90, 60: Be, 61: te, 62: Me, 63: ve, 64: ge }), i(Wt, [2, 59]), i(Wt, [2, 60]), i(Wt, [2, 61]), i(Wt, [2, 62]), i(Wt, [2, 63]), i(jt, [2, 64]), i(jt, [2, 65]), i(ie, [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: ke, 89: de, 90: Te }, { 54: bt, 56: 99 }, i(ie, [2, 54]), i(ie, [2, 98]), i(gt, [2, 22]), i(gt, [2, 23]), i(gt, [2, 24]), { 16: [1, 100] }, { 25: [2, 19] }, i(Zn, [2, 49]), { 27: 101, 28: 46, 29: 47, 88: ke, 89: de, 90: Te, 91: xe }, { 27: 102, 28: 46, 29: 47, 54: [1, 103], 88: ke, 89: de, 90: Te, 91: xe }, i(kt, [2, 57], { 58: 104, 60: Be, 61: te, 62: Me, 63: ve, 64: ge }), i(kt, [2, 56]), { 28: 105, 88: ke, 89: de, 90: Te }, { 47: 106, 51: Ft }, { 27: 108, 28: 46, 29: 47, 88: ke, 89: de, 90: Te, 91: xe }, i(ie, [2, 66], { 54: [1, 109] }), i(ie, [2, 68], { 54: [1, 111], 69: [1, 110] }), i(ie, [2, 72], { 54: [1, 112], 72: [1, 113] }), i(ie, [2, 76], { 54: [1, 115], 69: [1, 114] }), i(ie, [2, 80]), i(ie, [2, 53]), i(Qe, [2, 11]), i(Zn, [2, 51]), i(Zn, [2, 50]), { 27: 116, 28: 46, 29: 47, 88: ke, 89: de, 90: Te, 91: xe }, i(kt, [2, 55]), i(ie, [2, 39], { 46: [1, 117] }), { 48: [1, 118] }, { 47: 119, 48: [2, 43], 51: Ft }, i(ie, [2, 42]), i(ie, [2, 67]), i(ie, [2, 69]), i(ie, [2, 70], { 69: [1, 120] }), i(ie, [2, 73]), i(ie, [2, 74], { 54: [1, 121] }), i(ie, [2, 77]), i(ie, [2, 78], { 69: [1, 122] }), i(Zn, [2, 52]), { 47: 123, 51: Ft }, i(ie, [2, 40]), { 48: [2, 44] }, i(ie, [2, 71]), i(ie, [2, 75]), i(ie, [2, 79]), { 48: [1, 124] }, i(ie, [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(an, Ot) {
+ if (!Ot.recoverable) {
+ var $n = new Error(an);
+ throw $n.hash = Ot, $n;
+ }
+ this.trace(an);
+ }, parse: function(an) {
+ var Ot = this, $n = [0], pt = [], Ci = [null], ut = [], br = this.table, zt = "", Wr = 0, zr = 0, Si = ut.slice.call(arguments, 1), vr = Object.create(this.lexer), Qr = { yy: {} };
+ for (var or in this.yy)
+ Object.prototype.hasOwnProperty.call(this.yy, or) && (Qr.yy[or] = this.yy[or]);
+ vr.setInput(an, Qr.yy), Qr.yy.lexer = vr, Qr.yy.parser = this, vr.yylloc === void 0 && (vr.yylloc = {});
+ var Gr = vr.yylloc;
+ ut.push(Gr);
+ var An = vr.options && vr.options.ranges;
+ function _i() {
+ var Vr;
+ return typeof (Vr = pt.pop() || vr.lex() || 1) != "number" && (Vr instanceof Array && (Vr = (pt = Vr).pop()), Vr = Ot.symbols_[Vr] || Vr), Vr;
+ }
+ typeof Qr.yy.parseError == "function" ? this.parseError = Qr.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
+ for (var Cr, la, Ra, Jo, Cc, ji, Ya, Hr, Yr = {}; ; ) {
+ if (la = $n[$n.length - 1], this.defaultActions[la] ? Ra = this.defaultActions[la] : (Cr == null && (Cr = _i()), Ra = br[la] && br[la][Cr]), Ra === void 0 || !Ra.length || !Ra[0]) {
+ var ni = "";
+ for (Cc in Hr = [], br[la])
+ this.terminals_[Cc] && Cc > 2 && Hr.push("'" + this.terminals_[Cc] + "'");
+ ni = vr.showPosition ? "Parse error on line " + (Wr + 1) + `:
+` + vr.showPosition() + `
+Expecting ` + Hr.join(", ") + ", got '" + (this.terminals_[Cr] || Cr) + "'" : "Parse error on line " + (Wr + 1) + ": Unexpected " + (Cr == 1 ? "end of input" : "'" + (this.terminals_[Cr] || Cr) + "'"), this.parseError(ni, { text: vr.match, token: this.terminals_[Cr] || Cr, line: vr.yylineno, loc: Gr, expected: Hr });
+ }
+ if (Ra[0] instanceof Array && Ra.length > 1)
+ throw new Error("Parse Error: multiple actions possible at state: " + la + ", token: " + Cr);
+ switch (Ra[0]) {
+ case 1:
+ $n.push(Cr), Ci.push(vr.yytext), ut.push(vr.yylloc), $n.push(Ra[1]), Cr = null, zr = vr.yyleng, zt = vr.yytext, Wr = vr.yylineno, Gr = vr.yylloc;
+ break;
+ case 2:
+ if (ji = this.productions_[Ra[1]][1], Yr.$ = Ci[Ci.length - ji], Yr._$ = { first_line: ut[ut.length - (ji || 1)].first_line, last_line: ut[ut.length - 1].last_line, first_column: ut[ut.length - (ji || 1)].first_column, last_column: ut[ut.length - 1].last_column }, An && (Yr._$.range = [ut[ut.length - (ji || 1)].range[0], ut[ut.length - 1].range[1]]), (Jo = this.performAction.apply(Yr, [zt, zr, Wr, Qr.yy, Ra[1], Ci, ut].concat(Si))) !== void 0)
+ return Jo;
+ ji && ($n = $n.slice(0, -1 * ji * 2), Ci = Ci.slice(0, -1 * ji), ut = ut.slice(0, -1 * ji)), $n.push(this.productions_[Ra[1]][0]), Ci.push(Yr.$), ut.push(Yr._$), Ya = br[$n[$n.length - 2]][$n[$n.length - 1]], $n.push(Ya);
+ break;
+ case 3:
+ return !0;
+ }
+ }
+ return !0;
+ } }, un = (r = { EOF: 1, parseError: function(an, Ot) {
+ if (!this.yy.parser)
+ throw new Error(an);
+ this.yy.parser.parseError(an, Ot);
+ }, setInput: function(an, Ot) {
+ return this.yy = Ot || this.yy || {}, this._input = an, 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 an = this._input[0];
+ return this.yytext += an, this.yyleng++, this.offset++, this.match += an, this.matched += an, an.match(/(?:\r\n?|\n).*/g) ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), an;
+ }, unput: function(an) {
+ var Ot = an.length, $n = an.split(/(?:\r\n?|\n)/g);
+ this._input = an + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - Ot), this.offset -= Ot;
+ var pt = this.match.split(/(?:\r\n?|\n)/g);
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), $n.length - 1 && (this.yylineno -= $n.length - 1);
+ var Ci = 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 === pt.length ? this.yylloc.first_column : 0) + pt[pt.length - $n.length].length - $n[0].length : this.yylloc.first_column - Ot }, this.options.ranges && (this.yylloc.range = [Ci[0], Ci[0] + this.yyleng - Ot]), this.yyleng = this.yytext.length, this;
+ }, more: function() {
+ return this._more = !0, this;
+ }, reject: function() {
+ return this.options.backtrack_lexer ? (this._backtrack = !0, this) : 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 });
+ }, less: function(an) {
+ this.unput(this.match.slice(an));
+ }, pastInput: function() {
+ var an = this.matched.substr(0, this.matched.length - this.match.length);
+ return (an.length > 20 ? "..." : "") + an.substr(-20).replace(/\n/g, "");
+ }, upcomingInput: function() {
+ var an = this.match;
+ return an.length < 20 && (an += this._input.substr(0, 20 - an.length)), (an.substr(0, 20) + (an.length > 20 ? "..." : "")).replace(/\n/g, "");
+ }, showPosition: function() {
+ var an = this.pastInput(), Ot = new Array(an.length + 1).join("-");
+ return an + this.upcomingInput() + `
+` + Ot + "^";
+ }, test_match: function(an, Ot) {
+ var $n, pt, Ci;
+ if (this.options.backtrack_lexer && (Ci = { 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 && (Ci.yylloc.range = this.yylloc.range.slice(0))), (pt = an[0].match(/(?:\r\n?|\n).*/g)) && (this.yylineno += pt.length), this.yylloc = { first_line: this.yylloc.last_line, last_line: this.yylineno + 1, first_column: this.yylloc.last_column, last_column: pt ? pt[pt.length - 1].length - pt[pt.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + an[0].length }, this.yytext += an[0], this.match += an[0], this.matches = an, 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(an[0].length), this.matched += an[0], $n = this.performAction.call(this, this.yy, this, Ot, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), $n)
+ return $n;
+ if (this._backtrack) {
+ for (var ut in Ci)
+ this[ut] = Ci[ut];
+ return !1;
+ }
+ return !1;
+ }, next: function() {
+ if (this.done)
+ return this.EOF;
+ var an, Ot, $n, pt;
+ this._input || (this.done = !0), this._more || (this.yytext = "", this.match = "");
+ for (var Ci = this._currentRules(), ut = 0; ut < Ci.length; ut++)
+ if (($n = this._input.match(this.rules[Ci[ut]])) && (!Ot || $n[0].length > Ot[0].length)) {
+ if (Ot = $n, pt = ut, this.options.backtrack_lexer) {
+ if ((an = this.test_match($n, Ci[ut])) !== !1)
+ return an;
+ if (this._backtrack) {
+ Ot = !1;
+ continue;
+ }
+ return !1;
+ }
+ if (!this.options.flex)
+ break;
+ }
+ return Ot ? (an = this.test_match(Ot, Ci[pt])) !== !1 && an : 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 an = this.next();
+ return an || this.lex();
+ }, begin: function(an) {
+ this.conditionStack.push(an);
+ }, popState: function() {
+ return this.conditionStack.length - 1 > 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(an) {
+ return (an = this.conditionStack.length - 1 - Math.abs(an || 0)) >= 0 ? this.conditionStack[an] : "INITIAL";
+ }, pushState: function(an) {
+ this.begin(an);
+ }, stateStackSize: function() {
+ return this.conditionStack.length;
+ }, options: {}, performAction: function(an, Ot, $n, pt) {
+ switch ($n) {
+ 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:
+ case 10:
+ case 19:
+ case 27:
+ 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:
+ case 39:
+ case 42:
+ case 45:
+ case 48:
+ case 51:
+ case 54:
+ this.popState();
+ break;
+ case 17:
+ return "acc_descr_multiline_value";
+ case 18:
+ return 16;
+ case 20:
+ 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 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 40:
+ return "GENERICTYPE";
+ case 41:
+ this.begin("string");
+ break;
+ case 43:
+ return "STR";
+ case 44:
+ this.begin("bqstring");
+ break;
+ case 46:
+ return "BQUOTE_STR";
+ case 47:
+ this.begin("href");
+ break;
+ case 49:
+ return 73;
+ case 50:
+ this.begin("callback_name");
+ break;
+ case 52:
+ this.popState(), this.begin("callback_args");
+ break;
+ case 53:
+ return 71;
+ case 55:
+ return 72;
+ case 56:
+ case 57:
+ case 58:
+ case 59:
+ return 69;
+ case 60:
+ case 61:
+ return 61;
+ case 62:
+ 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:
+ 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 } } }, r);
+ function ln() {
+ this.yy = {};
+ }
+ return wn.lexer = un, ln.prototype = wn, wn.Parser = ln, new ln();
+}();
+KNe.parser = KNe;
+const tCt = KNe, B9n = (r, i) => {
+ var o;
+ return ((o = i == null ? void 0 : i.class) == null ? void 0 : o.defaultRenderer) !== "dagre-wrapper" && r.match(/^\s*classDiagram/) !== null;
+}, S9n = (r, i) => {
+ var o;
+ return r.match(/^\s*classDiagram/) !== null && ((o = i == null ? void 0 : i.class) == null ? void 0 : o.defaultRenderer) === "dagre-wrapper" || r.match(/^\s*classDiagram-v2/) !== null;
+}, rQe = "classid-";
+let TOe = [], sm = {}, fpe = [], nCt = 0, Fre = [];
+const Ore = (r) => El.sanitizeText(r, Bn()), Dre = function(r) {
+ let i = "", o = r;
+ if (r.indexOf("~") > 0) {
+ let l = r.split("~");
+ o = l[0], i = El.sanitizeText(l[1], Bn());
+ }
+ return { className: o, type: i };
+}, BOe = function(r) {
+ let i = Dre(r);
+ sm[i.className] === void 0 && (sm[i.className] = { id: i.className, type: i.type, cssClasses: [], methods: [], members: [], annotations: [], domId: rQe + i.className + "-" + nCt }, nCt++);
+}, jLt = function(r) {
+ const i = Object.keys(sm);
+ for (const o of i)
+ if (sm[o].id === r)
+ return sm[o].domId;
+}, rCt = function(r, i) {
+ const o = Dre(r).className, l = sm[o];
+ if (typeof i == "string") {
+ const f = i.trim();
+ f.startsWith("<<") && f.endsWith(">>") ? l.annotations.push(Ore(f.substring(2, f.length - 2))) : f.indexOf(")") > 0 ? l.methods.push(Ore(f)) : f && l.members.push(Ore(f));
+ }
+}, SOe = function(r, i) {
+ r.split(",").forEach(function(o) {
+ let l = o;
+ o[0].match(/\d/) && (l = rQe + l), sm[l] !== void 0 && sm[l].cssClasses.push(i);
+ });
+}, L9n = function(r, i, o) {
+ const l = Bn();
+ let f = r, g = jLt(f);
+ if (l.securityLevel === "loose" && i !== void 0 && sm[f] !== void 0) {
+ let A = [];
+ if (typeof o == "string") {
+ A = o.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
+ for (let b = 0; b < A.length; b++) {
+ let v = A[b].trim();
+ v.charAt(0) === '"' && v.charAt(v.length - 1) === '"' && (v = v.substr(1, v.length - 2)), A[b] = v;
+ }
+ }
+ A.length === 0 && A.push(g), Fre.push(function() {
+ const b = document.querySelector(`[id="${g}"]`);
+ b !== null && b.addEventListener("click", function() {
+ Tl.runFunc(i, ...A);
+ }, !1);
+ });
+ }
+}, KLt = function(r) {
+ let i = co(".mermaidTooltip");
+ (i._groups || i)[0][0] === null && (i = co("body").append("div").attr("class", "mermaidTooltip").style("opacity", 0)), co(r).select("svg").selectAll("g.node").on("mouseover", function() {
+ const o = co(this);
+ if (o.attr("title") === null)
+ return;
+ const l = this.getBoundingClientRect();
+ i.transition().duration(200).style("opacity", ".9"), i.text(o.attr("title")).style("left", window.scrollX + l.left + (l.right - l.left) / 2 + "px").style("top", window.scrollY + l.top - 14 + document.body.scrollTop + "px"), i.html(i.html().replace(/<br\/>/g, "
")), o.classed("hover", !0);
+ }).on("mouseout", function() {
+ i.transition().duration(500).style("opacity", 0), co(this).classed("hover", !1);
+ });
+};
+Fre.push(KLt);
+let iCt = "TB";
+const gG = { parseDirective: function(r, i, o) {
+ n0.parseDirective(this, r, i, o);
+}, setAccTitle: k5, getAccTitle: _k, getAccDescription: Tk, setAccDescription: Ek, getConfig: () => Bn().class, addClass: BOe, bindFunctions: function(r) {
+ Fre.forEach(function(i) {
+ i(r);
+ });
+}, clear: function() {
+ TOe = [], sm = {}, fpe = [], Fre = [], Fre.push(KLt), w5();
+}, getClass: function(r) {
+ return sm[r];
+}, getClasses: function() {
+ return sm;
+}, getNotes: function() {
+ return fpe;
+}, addAnnotation: function(r, i) {
+ const o = Dre(r).className;
+ sm[o].annotations.push(i);
+}, addNote: function(r, i) {
+ const o = { id: `note${fpe.length}`, class: i, text: r };
+ fpe.push(o);
+}, getRelations: function() {
+ return TOe;
+}, addRelation: function(r) {
+ _t.debug("Adding relation: " + JSON.stringify(r)), BOe(r.id1), BOe(r.id2), r.id1 = Dre(r.id1).className, r.id2 = Dre(r.id2).className, r.relationTitle1 = El.sanitizeText(r.relationTitle1.trim(), Bn()), r.relationTitle2 = El.sanitizeText(r.relationTitle2.trim(), Bn()), TOe.push(r);
+}, getDirection: () => iCt, setDirection: (r) => {
+ iCt = r;
+}, addMember: rCt, addMembers: function(r, i) {
+ Array.isArray(i) && (i.reverse(), i.forEach((o) => rCt(r, o)));
+}, cleanupLabel: function(r) {
+ return r.substring(0, 1) === ":" ? El.sanitizeText(r.substr(1).trim(), Bn()) : Ore(r.trim());
+}, lineType: { LINE: 0, DOTTED_LINE: 1 }, relationType: { AGGREGATION: 0, EXTENSION: 1, COMPOSITION: 2, DEPENDENCY: 3, LOLLIPOP: 4 }, setClickEvent: function(r, i, o) {
+ r.split(",").forEach(function(l) {
+ L9n(l, i, o), sm[l].haveCallback = !0;
+ }), SOe(r, "clickable");
+}, setCssClass: SOe, setLink: function(r, i, o) {
+ const l = Bn();
+ r.split(",").forEach(function(f) {
+ let g = f;
+ f[0].match(/\d/) && (g = rQe + g), sm[g] !== void 0 && (sm[g].link = Tl.formatUrl(i, l), l.securityLevel === "sandbox" ? sm[g].linkTarget = "_top" : sm[g].linkTarget = typeof o == "string" ? Ore(o) : "_blank");
+ }), SOe(r, "clickable");
+}, getTooltip: function(r) {
+ return sm[r].tooltip;
+}, setTooltip: function(r, i) {
+ const o = Bn();
+ r.split(",").forEach(function(l) {
+ i !== void 0 && (sm[l].tooltip = El.sanitizeText(i, o));
+ });
+}, lookUpDomId: jLt, setDiagramTitle: q9, getDiagramTitle: Y9 };
+let aCt = 0;
+const zNe = function(r) {
+ let i = r.match(/^([#+~-])?(\w+)(~\w+~|\[])?\s+(\w+) *([$*])?$/), o = r.match(/^([#+|~-])?(\w+) *\( *(.*)\) *([$*])? *(\w*[[\]|~]*\s*\w*~?)$/);
+ return i && !o ? I9n(i) : o ? M9n(o) : F9n(r);
+}, I9n = function(r) {
+ let i = "", o = "";
+ try {
+ let l = r[1] ? r[1].trim() : "", f = r[2] ? r[2].trim() : "", g = r[3] ? CO(r[3].trim()) : "", A = r[4] ? r[4].trim() : "", b = r[5] ? r[5].trim() : "";
+ o = l + f + g + " " + A, i = iQe(b);
+ } catch {
+ o = r;
+ }
+ return { displayText: o, cssStyle: i };
+}, M9n = function(r) {
+ let i = "", o = "";
+ try {
+ let l = r[1] ? r[1].trim() : "", f = r[2] ? r[2].trim() : "", g = r[3] ? CO(r[3].trim()) : "", A = r[4] ? r[4].trim() : "";
+ o = l + f + "(" + g + ")" + (r[5] ? " : " + CO(r[5]).trim() : ""), i = iQe(A);
+ } catch {
+ o = r;
+ }
+ return { displayText: o, cssStyle: i };
+}, F9n = function(r) {
+ let i = "", o = "", l = "", f = r.indexOf("("), g = r.indexOf(")");
+ if (f > 1 && g > f && g <= r.length) {
+ let A = "", b = "", v = r.substring(0, 1);
+ v.match(/\w/) ? b = r.substring(0, f).trim() : (v.match(/[#+~-]/) && (A = v), b = r.substring(1, f).trim());
+ const k = r.substring(f + 1, g);
+ r.substring(g + 1, 1), o = iQe(r.substring(g + 1, g + 2)), i = A + b + "(" + CO(k.trim()) + ")", g < r.length && (l = r.substring(g + 2).trim(), l !== "" && (l = " : " + CO(l), i += l));
+ } else
+ i = CO(r);
+ return { displayText: i, cssStyle: o };
+}, oCt = function(r, i, o, l) {
+ let f = zNe(i);
+ const g = r.append("tspan").attr("x", l.padding).text(f.displayText);
+ f.cssStyle !== "" && g.attr("style", f.cssStyle), o || g.attr("dy", l.textHeight);
+}, iQe = function(r) {
+ switch (r) {
+ case "*":
+ return "font-style:italic;";
+ case "$":
+ return "text-decoration:underline;";
+ default:
+ return "";
+ }
+}, O9n = function(r, i, o, l) {
+ _t.debug("Rendering class ", i, o);
+ const f = i.id, g = { id: f, label: i.id, width: 0, height: 0 }, A = r.append("g").attr("id", l.db.lookUpDomId(f)).attr("class", "classGroup");
+ let b;
+ b = i.link ? A.append("svg:a").attr("xlink:href", i.link).attr("target", i.linkTarget).append("text").attr("y", o.textHeight + o.padding).attr("x", 0) : A.append("text").attr("y", o.textHeight + o.padding).attr("x", 0);
+ let v = !0;
+ i.annotations.forEach(function(Y) {
+ const ue = b.append("tspan").text("«" + Y + "»");
+ v || ue.attr("dy", o.textHeight), v = !1;
+ });
+ let k = i.id;
+ i.type !== void 0 && i.type !== "" && (k += "<" + i.type + ">");
+ const _ = b.append("tspan").text(k).attr("class", "title");
+ v || _.attr("dy", o.textHeight);
+ const T = b.node().getBBox().height, L = A.append("line").attr("x1", 0).attr("y1", o.padding + T + o.dividerMargin / 2).attr("y2", o.padding + T + o.dividerMargin / 2), F = A.append("text").attr("x", o.padding).attr("y", T + o.dividerMargin + o.textHeight).attr("fill", "white").attr("class", "classText");
+ v = !0, i.members.forEach(function(Y) {
+ oCt(F, Y, v, o), v = !1;
+ });
+ const U = F.node().getBBox(), q = A.append("line").attr("x1", 0).attr("y1", o.padding + T + o.dividerMargin + U.height).attr("y2", o.padding + T + o.dividerMargin + U.height), Z = A.append("text").attr("x", o.padding).attr("y", T + 2 * o.dividerMargin + U.height + o.textHeight).attr("fill", "white").attr("class", "classText");
+ v = !0, i.methods.forEach(function(Y) {
+ oCt(Z, Y, v, o), v = !1;
+ });
+ const R = A.node().getBBox();
+ var J = " ";
+ i.cssClasses.length > 0 && (J += i.cssClasses.join(" "));
+ const he = A.insert("rect", ":first-child").attr("x", 0).attr("y", 0).attr("width", R.width + 2 * o.padding).attr("height", R.height + o.padding + 0.5 * o.dividerMargin).attr("class", J).node().getBBox().width;
+ return b.node().childNodes.forEach(function(Y) {
+ Y.setAttribute("x", (he - Y.getBBox().width) / 2);
+ }), i.tooltip && b.insert("title").text(i.tooltip), L.attr("x2", he), q.attr("x2", he), g.width = he, g.height = R.height + o.padding + 0.5 * o.dividerMargin, g;
+}, D9n = function(r, i, o, l, f) {
+ const g = function(J) {
+ switch (J) {
+ case f.db.relationType.AGGREGATION:
+ return "aggregation";
+ case f.db.relationType.EXTENSION:
+ return "extension";
+ case f.db.relationType.COMPOSITION:
+ return "composition";
+ case f.db.relationType.DEPENDENCY:
+ return "dependency";
+ case f.db.relationType.LOLLIPOP:
+ return "lollipop";
+ }
+ };
+ i.points = i.points.filter((J) => !Number.isNaN(J.y));
+ const A = i.points, b = pX().x(function(J) {
+ return J.x;
+ }).y(function(J) {
+ return J.y;
+ }).curve(Rie), v = r.append("path").attr("d", b(A)).attr("id", "edge" + aCt).attr("class", "relation");
+ let k, _, T = "";
+ l.arrowMarkerAbsolute && (T = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, T = T.replace(/\(/g, "\\("), T = T.replace(/\)/g, "\\)")), o.relation.lineType == 1 && v.attr("class", "relation dashed-line"), o.relation.lineType == 10 && v.attr("class", "relation dotted-line"), o.relation.type1 !== "none" && v.attr("marker-start", "url(" + T + "#" + g(o.relation.type1) + "Start)"), o.relation.type2 !== "none" && v.attr("marker-end", "url(" + T + "#" + g(o.relation.type2) + "End)");
+ const L = i.points.length;
+ let F, U, q, Z, R = Tl.calcLabelPosition(i.points);
+ if (k = R.x, _ = R.y, L % 2 != 0 && L > 1) {
+ let J = Tl.calcCardinalityPosition(o.relation.type1 !== "none", i.points, i.points[0]), he = Tl.calcCardinalityPosition(o.relation.type2 !== "none", i.points, i.points[L - 1]);
+ _t.debug("cardinality_1_point " + JSON.stringify(J)), _t.debug("cardinality_2_point " + JSON.stringify(he)), F = J.x, U = J.y, q = he.x, Z = he.y;
+ }
+ if (o.title !== void 0) {
+ const J = r.append("g").attr("class", "classLabel"), he = J.append("text").attr("class", "label").attr("x", k).attr("y", _).attr("fill", "red").attr("text-anchor", "middle").text(o.title);
+ window.label = he;
+ const Y = he.node().getBBox();
+ J.insert("rect", ":first-child").attr("class", "box").attr("x", Y.x - l.padding / 2).attr("y", Y.y - l.padding / 2).attr("width", Y.width + l.padding).attr("height", Y.height + l.padding);
+ }
+ _t.info("Rendering relation " + JSON.stringify(o)), o.relationTitle1 !== void 0 && o.relationTitle1 !== "none" && r.append("g").attr("class", "cardinality").append("text").attr("class", "type1").attr("x", F).attr("y", U).attr("fill", "black").attr("font-size", "6").text(o.relationTitle1), o.relationTitle2 !== void 0 && o.relationTitle2 !== "none" && r.append("g").attr("class", "cardinality").append("text").attr("class", "type2").attr("x", q).attr("y", Z).attr("fill", "black").attr("font-size", "6").text(o.relationTitle2), aCt++;
+}, N9n = function(r, i, o, l) {
+ _t.debug("Rendering note ", i, o);
+ const f = i.id, g = { id: f, text: i.text, width: 0, height: 0 }, A = r.append("g").attr("id", f).attr("class", "classGroup");
+ let b = A.append("text").attr("y", o.textHeight + o.padding).attr("x", 0);
+ const v = JSON.parse(`"${i.text}"`).split(`
+`);
+ v.forEach(function(T) {
+ _t.debug(`Adding line: ${T}`), b.append("tspan").text(T).attr("class", "title").attr("dy", o.textHeight);
+ });
+ const k = A.node().getBBox(), _ = A.insert("rect", ":first-child").attr("x", 0).attr("y", 0).attr("width", k.width + 2 * o.padding).attr("height", k.height + v.length * o.textHeight + o.padding + 0.5 * o.dividerMargin).node().getBBox().width;
+ return b.node().childNodes.forEach(function(T) {
+ T.setAttribute("x", (_ - T.getBBox().width) / 2);
+ }), g.width = _, g.height = k.height + v.length * o.textHeight + o.padding + 0.5 * o.dividerMargin, g;
+};
+let Ame = {};
+const jne = function(r) {
+ const i = Object.entries(Ame).find((o) => o[1].label === r);
+ if (i)
+ return i[0];
+}, P9n = { draw: function(r, i, o, l) {
+ const f = Bn().class;
+ Ame = {}, _t.info("Rendering diagram " + r);
+ const g = Bn().securityLevel;
+ let A;
+ g === "sandbox" && (A = co("#i" + i));
+ const b = co(g === "sandbox" ? A.nodes()[0].contentDocument.body : "body"), v = b.select(`[id='${i}']`);
+ var k;
+ (k = v).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"), k.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"), k.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"), k.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"), k.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"), k.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"), k.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"), k.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");
+ const _ = new ub({ multigraph: !0 });
+ _.setGraph({ isMultiGraph: !0 }), _.setDefaultEdgeLabel(function() {
+ return {};
+ });
+ const T = l.db.getClasses(), L = Object.keys(T);
+ for (const R of L) {
+ const J = T[R], he = O9n(v, J, f, l);
+ Ame[he.id] = he, _.setNode(he.id, he), _t.info("Org height: " + he.height);
+ }
+ l.db.getRelations().forEach(function(R) {
+ _t.info("tjoho" + jne(R.id1) + jne(R.id2) + JSON.stringify(R)), _.setEdge(jne(R.id1), jne(R.id2), { relation: R }, R.title || "DEFAULT");
+ }), l.db.getNotes().forEach(function(R) {
+ _t.debug(`Adding note: ${JSON.stringify(R)}`);
+ const J = N9n(v, R, f);
+ Ame[J.id] = J, _.setNode(J.id, J), R.class && R.class in T && _.setEdge(R.id, jne(R.class), { relation: { id1: R.id, id2: R.class, relation: { type1: "none", type2: "none", lineType: 10 } } }, "DEFAULT");
+ }), Uie(_), _.nodes().forEach(function(R) {
+ R !== void 0 && _.node(R) !== void 0 && (_t.debug("Node " + R + ": " + JSON.stringify(_.node(R))), b.select("#" + (l.db.lookUpDomId(R) || R)).attr("transform", "translate(" + (_.node(R).x - _.node(R).width / 2) + "," + (_.node(R).y - _.node(R).height / 2) + " )"));
+ }), _.edges().forEach(function(R) {
+ R !== void 0 && _.edge(R) !== void 0 && (_t.debug("Edge " + R.v + " -> " + R.w + ": " + JSON.stringify(_.edge(R))), D9n(v, _.edge(R), _.edge(R).relation, f, l));
+ });
+ const F = v.node().getBBox(), U = F.width + 40, q = F.height + 40;
+ V9(v, q, U, f.useMaxWidth);
+ const Z = `${F.x - 20} ${F.y - 20} ${U} ${q}`;
+ _t.debug(`viewBox ${Z}`), v.attr("viewBox", Z);
+} }, R9n = { extension: (r, i, o) => {
+ _t.trace("Making markers for ", o), r.append("defs").append("marker").attr("id", i + "-extensionStart").attr("class", "marker extension " + i).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"), r.append("defs").append("marker").attr("id", i + "-extensionEnd").attr("class", "marker extension " + i).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");
+}, composition: (r, i) => {
+ r.append("defs").append("marker").attr("id", i + "-compositionStart").attr("class", "marker composition " + i).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"), r.append("defs").append("marker").attr("id", i + "-compositionEnd").attr("class", "marker composition " + i).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");
+}, aggregation: (r, i) => {
+ r.append("defs").append("marker").attr("id", i + "-aggregationStart").attr("class", "marker aggregation " + i).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"), r.append("defs").append("marker").attr("id", i + "-aggregationEnd").attr("class", "marker aggregation " + i).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");
+}, dependency: (r, i) => {
+ r.append("defs").append("marker").attr("id", i + "-dependencyStart").attr("class", "marker dependency " + i).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"), r.append("defs").append("marker").attr("id", i + "-dependencyEnd").attr("class", "marker dependency " + i).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");
+}, lollipop: (r, i) => {
+ r.append("defs").append("marker").attr("id", i + "-lollipopStart").attr("class", "marker lollipop " + i).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);
+}, point: (r, i) => {
+ r.append("marker").attr("id", i + "-pointEnd").attr("class", "marker " + i).attr("viewBox", "0 0 12 20").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"), r.append("marker").attr("id", i + "-pointStart").attr("class", "marker " + i).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");
+}, circle: (r, i) => {
+ r.append("marker").attr("id", i + "-circleEnd").attr("class", "marker " + i).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"), r.append("marker").attr("id", i + "-circleStart").attr("class", "marker " + i).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");
+}, cross: (r, i) => {
+ r.append("marker").attr("id", i + "-crossEnd").attr("class", "marker cross " + i).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"), r.append("marker").attr("id", i + "-crossStart").attr("class", "marker cross " + i).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");
+}, barb: (r, i) => {
+ r.append("defs").append("marker").attr("id", i + "-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");
+} }, zLt = (r, i, o, l) => {
+ i.forEach((f) => {
+ R9n[f](r, o, l);
+ });
+}, g5 = (r, i, o, l) => {
+ let f = r || "";
+ if (typeof f == "object" && (f = f[0]), Ev(Bn().flowchart.htmlLabels))
+ return f = f.replace(/\\n|\n/g, "
"), _t.info("vertexText" + f), function(A) {
+ const b = co(document.createElementNS("http://www.w3.org/2000/svg", "foreignObject")), v = b.append("xhtml:div"), k = A.label, _ = A.isNode ? "nodeLabel" : "edgeLabel";
+ var T, L;
+ return v.html('" + k + ""), T = v, (L = A.labelStyle) && T.attr("style", L), v.style("display", "inline-block"), v.style("white-space", "nowrap"), v.attr("xmlns", "http://www.w3.org/1999/xhtml"), b.node();
+ }({ isNode: l, label: fQe(f).replace(/fa[blrs]?:fa-[\w-]+/g, (A) => ``), labelStyle: i.replace("fill:", "color:") });
+ {
+ const g = document.createElementNS("http://www.w3.org/2000/svg", "text");
+ g.setAttribute("style", i.replace("color:", "fill:"));
+ let A = [];
+ A = typeof f == "string" ? f.split(/\\n|\n|
/gi) : Array.isArray(f) ? f : [];
+ for (const b of A) {
+ const v = document.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", "0"), o ? v.setAttribute("class", "title-row") : v.setAttribute("class", "row"), v.textContent = b.trim(), g.appendChild(v);
+ }
+ return g;
+ }
+}, Qy = (r, i, o, l) => {
+ let f;
+ f = o || "node default";
+ const g = r.insert("g").attr("class", f).attr("id", i.domId || i.id), A = g.insert("g").attr("class", "label").attr("style", i.labelStyle);
+ let b;
+ b = i.labelText === void 0 ? "" : typeof i.labelText == "string" ? i.labelText : i.labelText[0];
+ const v = A.node().appendChild(g5(yk(fQe(b), Bn()), i.labelStyle, !1, l));
+ let k = v.getBBox();
+ if (Ev(Bn().flowchart.htmlLabels)) {
+ const T = v.children[0], L = co(v);
+ k = T.getBoundingClientRect(), L.attr("width", k.width), L.attr("height", k.height);
+ }
+ const _ = i.padding / 2;
+ return A.attr("transform", "translate(" + -k.width / 2 + ", " + -k.height / 2 + ")"), { shapeSvg: g, bbox: k, halfPadding: _, label: A };
+}, wp = (r, i) => {
+ const o = i.node().getBBox();
+ r.width = o.width, r.height = o.height;
+};
+function qS(r, i, o, l) {
+ return r.insert("polygon", ":first-child").attr("points", l.map(function(f) {
+ return f.x + "," + f.y;
+ }).join(" ")).attr("class", "label-container").attr("transform", "translate(" + -i / 2 + "," + o / 2 + ")");
+}
+let Mh = {}, R9 = {}, GLt = {};
+const xbe = (r, i) => (_t.trace("In isDecendant", i, " ", r, " = ", R9[i].includes(r)), !!R9[i].includes(r)), XLt = (r, i, o, l) => {
+ _t.warn("Copying children of ", r, "root", l, "data", i.node(r), l);
+ const f = i.children(r) || [];
+ r !== l && f.push(r), _t.warn("Copying (nodes) clusterId", r, "nodes", f), f.forEach((g) => {
+ if (i.children(g).length > 0)
+ XLt(g, i, o, l);
+ else {
+ const A = i.node(g);
+ _t.info("cp ", g, " to ", l, " with parent ", r), o.setNode(g, A), l !== i.parent(g) && (_t.warn("Setting parent", g, i.parent(g)), o.setParent(g, i.parent(g))), r !== l && g !== r ? (_t.debug("Setting parent", g, r), o.setParent(g, r)) : (_t.info("In copy ", r, "root", l, "data", i.node(r), l), _t.debug("Not Setting parent for node=", g, "cluster!==rootId", r !== l, "node!==clusterId", g !== r));
+ const b = i.edges(g);
+ _t.debug("Copying Edges", b), b.forEach((v) => {
+ _t.info("Edge", v);
+ const k = i.edge(v.v, v.w, v.name);
+ _t.info("Edge data", k, l);
+ try {
+ ((_, T) => (_t.info("Decendants of ", T, " is ", R9[T]), _t.info("Edge is ", _), _.v !== T && _.w !== T && (R9[T] ? R9[T].includes(_.v) || xbe(_.v, T) || xbe(_.w, T) || R9[T].includes(_.w) : (_t.debug("Tilt, ", T, ",not in decendants"), !1))))(v, l) ? (_t.info("Copying as ", v.v, v.w, k, v.name), o.setEdge(v.v, v.w, k, v.name), _t.info("newGraph edges ", o.edges(), o.edge(o.edges()[0]))) : _t.info("Skipping copy of edge ", v.v, "-->", v.w, " rootId: ", l, " clusterId:", r);
+ } catch (_) {
+ _t.error(_);
+ }
+ });
+ }
+ _t.debug("Removing node", g), i.removeNode(g);
+ });
+}, WLt = (r, i) => {
+ const o = i.children(r);
+ let l = [...o];
+ for (const f of o)
+ GLt[f] = r, l = [...l, ...WLt(f, i)];
+ return l;
+}, yie = (r, i) => {
+ _t.trace("Searching", r);
+ const o = i.children(r);
+ if (_t.trace("Searching children of id ", r, o), o.length < 1)
+ return _t.trace("This is a valid node", r), r;
+ for (const l of o) {
+ const f = yie(l, i);
+ if (f)
+ return _t.trace("Found replacement for", r, " => ", f), f;
+ }
+}, dpe = (r) => Mh[r] && Mh[r].externalConnections && Mh[r] ? Mh[r].id : r, VLt = (r, i) => {
+ if (_t.warn("extractor - ", i, fL(r), r.children("D")), i > 10)
+ return void _t.error("Bailing out");
+ let o = r.nodes(), l = !1;
+ for (const f of o) {
+ const g = r.children(f);
+ l = l || g.length > 0;
+ }
+ if (l) {
+ _t.debug("Nodes = ", o, i);
+ for (const f of o)
+ if (_t.debug("Extracting node", f, Mh, Mh[f] && !Mh[f].externalConnections, !r.parent(f), r.node(f), r.children("D"), " Depth ", i), Mh[f])
+ if (!Mh[f].externalConnections && r.children(f) && r.children(f).length > 0) {
+ _t.warn("Cluster without external connections, without a parent and with children", f, i);
+ let g = r.graph().rankdir === "TB" ? "LR" : "TB";
+ Mh[f] && Mh[f].clusterData && Mh[f].clusterData.dir && (g = Mh[f].clusterData.dir, _t.warn("Fixing dir", Mh[f].clusterData.dir, g));
+ const A = new ub({ multigraph: !0, compound: !0 }).setGraph({ rankdir: g, nodesep: 50, ranksep: 50, marginx: 8, marginy: 8 }).setDefaultEdgeLabel(function() {
+ return {};
+ });
+ _t.warn("Old graph before copy", fL(r)), XLt(f, r, A, f), r.setNode(f, { clusterNode: !0, id: f, clusterData: Mh[f].clusterData, labelText: Mh[f].labelText, graph: A }), _t.warn("New graph after copy node: (", f, ")", fL(A)), _t.debug("Old graph after copy", fL(r));
+ } else
+ _t.warn("Cluster ** ", f, " **not meeting the criteria !externalConnections:", !Mh[f].externalConnections, " no parent: ", !r.parent(f), " children ", r.children(f) && r.children(f).length > 0, r.children("D"), i), _t.debug(Mh);
+ else
+ _t.debug("Not a cluster", f, i);
+ o = r.nodes(), _t.warn("New list of nodes", o);
+ for (const f of o) {
+ const g = r.node(f);
+ _t.warn(" Now next level", f, g), g.clusterNode && VLt(g.graph, i + 1);
+ }
+ } else
+ _t.debug("Done, no node has children", r.nodes());
+}, qLt = (r, i) => {
+ if (i.length === 0)
+ return [];
+ let o = Object.assign(i);
+ return i.forEach((l) => {
+ const f = r.children(l), g = qLt(r, f);
+ o = [...o, ...g];
+ }), o;
+};
+function sCt(r, i, o, l) {
+ var f = r.x, g = r.y, A = f - l.x, b = g - l.y, v = Math.sqrt(i * i * b * b + o * o * A * A), k = Math.abs(i * o * A / v);
+ l.x < f && (k = -k);
+ var _ = Math.abs(i * o * b / v);
+ return l.y < g && (_ = -_), { x: f + k, y: g + _ };
+}
+function Q9n(r, i, o, l) {
+ var f, g, A, b, v, k, _, T, L, F, U, q, Z;
+ if (f = i.y - r.y, A = r.x - i.x, v = i.x * r.y - r.x * i.y, L = f * o.x + A * o.y + v, F = f * l.x + A * l.y + v, !(L !== 0 && F !== 0 && cCt(L, F) || (g = l.y - o.y, b = o.x - l.x, k = l.x * o.y - o.x * l.y, _ = g * r.x + b * r.y + k, T = g * i.x + b * i.y + k, _ !== 0 && T !== 0 && cCt(_, T) || (U = f * b - g * A) == 0)))
+ return q = Math.abs(U / 2), { x: (Z = A * k - b * v) < 0 ? (Z - q) / U : (Z + q) / U, y: (Z = g * v - f * k) < 0 ? (Z - q) / U : (Z + q) / U };
+}
+function cCt(r, i) {
+ return r * i > 0;
+}
+const dre = (r, i) => {
+ var o, l, f = r.x, g = r.y, A = i.x - f, b = i.y - g, v = r.width / 2, k = r.height / 2;
+ return Math.abs(b) * v > Math.abs(A) * k ? (b < 0 && (k = -k), o = b === 0 ? 0 : k * A / b, l = k) : (A < 0 && (v = -v), o = v, l = A === 0 ? 0 : v * b / A), { x: f + o, y: g + l };
+}, Eg = { node: function(r, i) {
+ return r.intersect(i);
+}, circle: function(r, i, o) {
+ return sCt(r, i, i, o);
+}, ellipse: sCt, polygon: function(r, i, o) {
+ var l = r.x, f = r.y, g = [], A = Number.POSITIVE_INFINITY, b = Number.POSITIVE_INFINITY;
+ typeof i.forEach == "function" ? i.forEach(function(U) {
+ A = Math.min(A, U.x), b = Math.min(b, U.y);
+ }) : (A = Math.min(A, i.x), b = Math.min(b, i.y));
+ for (var v = l - r.width / 2 - A, k = f - r.height / 2 - b, _ = 0; _ < i.length; _++) {
+ var T = i[_], L = i[_ < i.length - 1 ? _ + 1 : 0], F = Q9n(r, o, { x: v + T.x, y: k + T.y }, { x: v + L.x, y: k + L.y });
+ F && g.push(F);
+ }
+ return g.length ? (g.length > 1 && g.sort(function(U, q) {
+ var Z = U.x - o.x, R = U.y - o.y, J = Math.sqrt(Z * Z + R * R), he = q.x - o.x, Y = q.y - o.y, ue = Math.sqrt(he * he + Y * Y);
+ return J < ue ? -1 : J === ue ? 0 : 1;
+ }), g[0]) : r;
+}, rect: dre }, $9n = (r, i) => {
+ const { shapeSvg: o, bbox: l, halfPadding: f } = Qy(r, i, "node " + i.classes, !0);
+ _t.info("Classes = ", i.classes);
+ const g = o.insert("rect", ":first-child");
+ return g.attr("rx", i.rx).attr("ry", i.ry).attr("x", -l.width / 2 - f).attr("y", -l.height / 2 - f).attr("width", l.width + i.padding).attr("height", l.height + i.padding), wp(i, g), i.intersect = function(A) {
+ return Eg.rect(i, A);
+ }, o;
+}, lCt = (r, i) => {
+ const { shapeSvg: o, bbox: l } = Qy(r, i, void 0, !0), f = l.width + i.padding + (l.height + i.padding), g = [{ x: f / 2, y: 0 }, { x: f, y: -f / 2 }, { x: f / 2, y: -f }, { x: 0, y: -f / 2 }];
+ _t.info("Question main (Circle)");
+ const A = qS(o, f, f, g);
+ return A.attr("style", i.style), wp(i, A), i.intersect = function(b) {
+ return _t.warn("Intersect called"), Eg.polygon(i, g, b);
+ }, o;
+};
+function uCt(r, i, o, l) {
+ const f = [], g = (b) => {
+ f.push(b, 0);
+ }, A = (b) => {
+ f.push(0, b);
+ };
+ i.includes("t") ? (_t.debug("add top border"), g(o)) : A(o), i.includes("r") ? (_t.debug("add right border"), g(l)) : A(l), i.includes("b") ? (_t.debug("add bottom border"), g(o)) : A(o), i.includes("l") ? (_t.debug("add left border"), g(l)) : A(l), r.attr("stroke-dasharray", f.join(" "));
+}
+const hCt = (r, i, o) => {
+ const l = r.insert("g").attr("class", "node default").attr("id", i.domId || i.id);
+ let f = 70, g = 10;
+ o === "LR" && (f = 10, g = 70);
+ const A = l.append("rect").attr("x", -1 * f / 2).attr("y", -1 * g / 2).attr("width", f).attr("height", g).attr("class", "fork-join");
+ return wp(i, A), i.height = i.height + i.padding / 2, i.width = i.width + i.padding / 2, i.intersect = function(b) {
+ return Eg.rect(i, b);
+ }, l;
+}, fCt = { rhombus: lCt, question: lCt, rect: (r, i) => {
+ const { shapeSvg: o, bbox: l, halfPadding: f } = Qy(r, i, "node " + i.classes, !0);
+ _t.trace("Classes = ", i.classes);
+ const g = o.insert("rect", ":first-child"), A = l.width + i.padding, b = l.height + i.padding;
+ if (g.attr("class", "basic label-container").attr("style", i.style).attr("rx", i.rx).attr("ry", i.ry).attr("x", -l.width / 2 - f).attr("y", -l.height / 2 - f).attr("width", A).attr("height", b), i.props) {
+ const v = new Set(Object.keys(i.props));
+ i.props.borders && (uCt(g, i.props.borders, A, b), v.delete("borders")), v.forEach((k) => {
+ _t.warn(`Unknown node property ${k}`);
+ });
+ }
+ return wp(i, g), i.intersect = function(v) {
+ return Eg.rect(i, v);
+ }, o;
+}, labelRect: (r, i) => {
+ const { shapeSvg: o } = Qy(r, i, "label", !0);
+ _t.trace("Classes = ", i.classes);
+ const l = o.insert("rect", ":first-child");
+ if (l.attr("width", 0).attr("height", 0), o.attr("class", "label edgeLabel"), i.props) {
+ const f = new Set(Object.keys(i.props));
+ i.props.borders && (uCt(l, i.props.borders, 0, 0), f.delete("borders")), f.forEach((g) => {
+ _t.warn(`Unknown node property ${g}`);
+ });
+ }
+ return wp(i, l), i.intersect = function(f) {
+ return Eg.rect(i, f);
+ }, o;
+}, rectWithTitle: (r, i) => {
+ let o;
+ o = i.classes ? "node " + i.classes : "node default";
+ const l = r.insert("g").attr("class", o).attr("id", i.domId || i.id), f = l.insert("rect", ":first-child"), g = l.insert("line"), A = l.insert("g").attr("class", "label"), b = i.labelText.flat ? i.labelText.flat() : i.labelText;
+ let v = "";
+ v = typeof b == "object" ? b[0] : b, _t.info("Label text abc79", v, b, typeof b == "object");
+ const k = A.node().appendChild(g5(v, i.labelStyle, !0, !0));
+ let _ = { width: 0, height: 0 };
+ if (Ev(Bn().flowchart.htmlLabels)) {
+ const q = k.children[0], Z = co(k);
+ _ = q.getBoundingClientRect(), Z.attr("width", _.width), Z.attr("height", _.height);
+ }
+ _t.info("Text 2", b);
+ const T = b.slice(1, b.length);
+ let L = k.getBBox();
+ const F = A.node().appendChild(g5(T.join ? T.join("
") : T, i.labelStyle, !0, !0));
+ if (Ev(Bn().flowchart.htmlLabels)) {
+ const q = F.children[0], Z = co(F);
+ _ = q.getBoundingClientRect(), Z.attr("width", _.width), Z.attr("height", _.height);
+ }
+ const U = i.padding / 2;
+ return co(F).attr("transform", "translate( " + (_.width > L.width ? 0 : (L.width - _.width) / 2) + ", " + (L.height + U + 5) + ")"), co(k).attr("transform", "translate( " + (_.width < L.width ? 0 : -(L.width - _.width) / 2) + ", 0)"), _ = A.node().getBBox(), A.attr("transform", "translate(" + -_.width / 2 + ", " + (-_.height / 2 - U + 3) + ")"), f.attr("class", "outer title-state").attr("x", -_.width / 2 - U).attr("y", -_.height / 2 - U).attr("width", _.width + i.padding).attr("height", _.height + i.padding), g.attr("class", "divider").attr("x1", -_.width / 2 - U).attr("x2", _.width / 2 + U).attr("y1", -_.height / 2 - U + L.height + U).attr("y2", -_.height / 2 - U + L.height + U), wp(i, f), i.intersect = function(q) {
+ return Eg.rect(i, q);
+ }, l;
+}, choice: (r, i) => {
+ const o = r.insert("g").attr("class", "node default").attr("id", i.domId || i.id), l = [{ x: 0, y: 14 }, { x: 14, y: 0 }, { x: 0, y: -14 }, { x: -14, y: 0 }];
+ return o.insert("polygon", ":first-child").attr("points", l.map(function(f) {
+ return f.x + "," + f.y;
+ }).join(" ")).attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28), i.width = 28, i.height = 28, i.intersect = function(f) {
+ return Eg.circle(i, 14, f);
+ }, o;
+}, circle: (r, i) => {
+ const { shapeSvg: o, bbox: l, halfPadding: f } = Qy(r, i, void 0, !0), g = o.insert("circle", ":first-child");
+ return g.attr("style", i.style).attr("rx", i.rx).attr("ry", i.ry).attr("r", l.width / 2 + f).attr("width", l.width + i.padding).attr("height", l.height + i.padding), _t.info("Circle main"), wp(i, g), i.intersect = function(A) {
+ return _t.info("Circle intersect", i, l.width / 2 + f, A), Eg.circle(i, l.width / 2 + f, A);
+ }, o;
+}, doublecircle: (r, i) => {
+ const { shapeSvg: o, bbox: l, halfPadding: f } = Qy(r, i, void 0, !0), g = o.insert("g", ":first-child"), A = g.insert("circle"), b = g.insert("circle");
+ return A.attr("style", i.style).attr("rx", i.rx).attr("ry", i.ry).attr("r", l.width / 2 + f + 5).attr("width", l.width + i.padding + 10).attr("height", l.height + i.padding + 10), b.attr("style", i.style).attr("rx", i.rx).attr("ry", i.ry).attr("r", l.width / 2 + f).attr("width", l.width + i.padding).attr("height", l.height + i.padding), _t.info("DoubleCircle main"), wp(i, A), i.intersect = function(v) {
+ return _t.info("DoubleCircle intersect", i, l.width / 2 + f + 5, v), Eg.circle(i, l.width / 2 + f + 5, v);
+ }, o;
+}, stadium: (r, i) => {
+ const { shapeSvg: o, bbox: l } = Qy(r, i, void 0, !0), f = l.height + i.padding, g = l.width + f / 4 + i.padding, A = o.insert("rect", ":first-child").attr("style", i.style).attr("rx", f / 2).attr("ry", f / 2).attr("x", -g / 2).attr("y", -f / 2).attr("width", g).attr("height", f);
+ return wp(i, A), i.intersect = function(b) {
+ return Eg.rect(i, b);
+ }, o;
+}, hexagon: (r, i) => {
+ const { shapeSvg: o, bbox: l } = Qy(r, i, void 0, !0), f = l.height + i.padding, g = f / 4, A = l.width + 2 * g + i.padding, b = [{ x: g, y: 0 }, { x: A - g, y: 0 }, { x: A, y: -f / 2 }, { x: A - g, y: -f }, { x: g, y: -f }, { x: 0, y: -f / 2 }], v = qS(o, A, f, b);
+ return v.attr("style", i.style), wp(i, v), i.intersect = function(k) {
+ return Eg.polygon(i, b, k);
+ }, o;
+}, rect_left_inv_arrow: (r, i) => {
+ const { shapeSvg: o, bbox: l } = Qy(r, i, void 0, !0), f = l.width + i.padding, g = l.height + i.padding, A = [{ x: -g / 2, y: 0 }, { x: f, y: 0 }, { x: f, y: -g }, { x: -g / 2, y: -g }, { x: 0, y: -g / 2 }];
+ return qS(o, f, g, A).attr("style", i.style), i.width = f + g, i.height = g, i.intersect = function(b) {
+ return Eg.polygon(i, A, b);
+ }, o;
+}, lean_right: (r, i) => {
+ const { shapeSvg: o, bbox: l } = Qy(r, i, void 0, !0), f = l.width + i.padding, g = l.height + i.padding, A = [{ x: -2 * g / 6, y: 0 }, { x: f - g / 6, y: 0 }, { x: f + 2 * g / 6, y: -g }, { x: g / 6, y: -g }], b = qS(o, f, g, A);
+ return b.attr("style", i.style), wp(i, b), i.intersect = function(v) {
+ return Eg.polygon(i, A, v);
+ }, o;
+}, lean_left: (r, i) => {
+ const { shapeSvg: o, bbox: l } = Qy(r, i, void 0, !0), f = l.width + i.padding, g = l.height + i.padding, A = [{ x: 2 * g / 6, y: 0 }, { x: f + g / 6, y: 0 }, { x: f - 2 * g / 6, y: -g }, { x: -g / 6, y: -g }], b = qS(o, f, g, A);
+ return b.attr("style", i.style), wp(i, b), i.intersect = function(v) {
+ return Eg.polygon(i, A, v);
+ }, o;
+}, trapezoid: (r, i) => {
+ const { shapeSvg: o, bbox: l } = Qy(r, i, void 0, !0), f = l.width + i.padding, g = l.height + i.padding, A = [{ x: -2 * g / 6, y: 0 }, { x: f + 2 * g / 6, y: 0 }, { x: f - g / 6, y: -g }, { x: g / 6, y: -g }], b = qS(o, f, g, A);
+ return b.attr("style", i.style), wp(i, b), i.intersect = function(v) {
+ return Eg.polygon(i, A, v);
+ }, o;
+}, inv_trapezoid: (r, i) => {
+ const { shapeSvg: o, bbox: l } = Qy(r, i, void 0, !0), f = l.width + i.padding, g = l.height + i.padding, A = [{ x: g / 6, y: 0 }, { x: f - g / 6, y: 0 }, { x: f + 2 * g / 6, y: -g }, { x: -2 * g / 6, y: -g }], b = qS(o, f, g, A);
+ return b.attr("style", i.style), wp(i, b), i.intersect = function(v) {
+ return Eg.polygon(i, A, v);
+ }, o;
+}, rect_right_inv_arrow: (r, i) => {
+ const { shapeSvg: o, bbox: l } = Qy(r, i, void 0, !0), f = l.width + i.padding, g = l.height + i.padding, A = [{ x: 0, y: 0 }, { x: f + g / 2, y: 0 }, { x: f, y: -g / 2 }, { x: f + g / 2, y: -g }, { x: 0, y: -g }], b = qS(o, f, g, A);
+ return b.attr("style", i.style), wp(i, b), i.intersect = function(v) {
+ return Eg.polygon(i, A, v);
+ }, o;
+}, cylinder: (r, i) => {
+ const { shapeSvg: o, bbox: l } = Qy(r, i, void 0, !0), f = l.width + i.padding, g = f / 2, A = g / (2.5 + f / 50), b = l.height + A + i.padding, v = "M 0," + A + " a " + g + "," + A + " 0,0,0 " + f + " 0 a " + g + "," + A + " 0,0,0 " + -f + " 0 l 0," + b + " a " + g + "," + A + " 0,0,0 " + f + " 0 l 0," + -b, k = o.attr("label-offset-y", A).insert("path", ":first-child").attr("style", i.style).attr("d", v).attr("transform", "translate(" + -f / 2 + "," + -(b / 2 + A) + ")");
+ return wp(i, k), i.intersect = function(_) {
+ const T = Eg.rect(i, _), L = T.x - i.x;
+ if (g != 0 && (Math.abs(L) < i.width / 2 || Math.abs(L) == i.width / 2 && Math.abs(T.y - i.y) > i.height / 2 - A)) {
+ let F = A * A * (1 - L * L / (g * g));
+ F != 0 && (F = Math.sqrt(F)), F = A - F, _.y - i.y > 0 && (F = -F), T.y += F;
+ }
+ return T;
+ }, o;
+}, start: (r, i) => {
+ const o = r.insert("g").attr("class", "node default").attr("id", i.domId || i.id), l = o.insert("circle", ":first-child");
+ return l.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), wp(i, l), i.intersect = function(f) {
+ return Eg.circle(i, 7, f);
+ }, o;
+}, end: (r, i) => {
+ const o = r.insert("g").attr("class", "node default").attr("id", i.domId || i.id), l = o.insert("circle", ":first-child"), f = o.insert("circle", ":first-child");
+ return f.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), l.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10), wp(i, f), i.intersect = function(g) {
+ return Eg.circle(i, 7, g);
+ }, o;
+}, note: $9n, subroutine: (r, i) => {
+ const { shapeSvg: o, bbox: l } = Qy(r, i, void 0, !0), f = l.width + i.padding, g = l.height + i.padding, A = [{ x: 0, y: 0 }, { x: f, y: 0 }, { x: f, y: -g }, { x: 0, y: -g }, { x: 0, y: 0 }, { x: -8, y: 0 }, { x: f + 8, y: 0 }, { x: f + 8, y: -g }, { x: -8, y: -g }, { x: -8, y: 0 }], b = qS(o, f, g, A);
+ return b.attr("style", i.style), wp(i, b), i.intersect = function(v) {
+ return Eg.polygon(i, A, v);
+ }, o;
+}, fork: hCt, join: hCt, class_box: (r, i) => {
+ const o = i.padding / 2;
+ let l;
+ l = i.classes ? "node " + i.classes : "node default";
+ const f = r.insert("g").attr("class", l).attr("id", i.domId || i.id), g = f.insert("rect", ":first-child"), A = f.insert("line"), b = f.insert("line");
+ let v = 0, k = 4;
+ const _ = f.insert("g").attr("class", "label");
+ let T = 0;
+ const L = i.classData.annotations && i.classData.annotations[0], F = i.classData.annotations[0] ? "«" + i.classData.annotations[0] + "»" : "", U = _.node().appendChild(g5(F, i.labelStyle, !0, !0));
+ let q = U.getBBox();
+ if (Ev(Bn().flowchart.htmlLabels)) {
+ const le = U.children[0], be = co(U);
+ q = le.getBoundingClientRect(), be.attr("width", q.width), be.attr("height", q.height);
+ }
+ i.classData.annotations[0] && (k += q.height + 4, v += q.width);
+ let Z = i.classData.id;
+ i.classData.type !== void 0 && i.classData.type !== "" && (Bn().flowchart.htmlLabels ? Z += "<" + i.classData.type + ">" : Z += "<" + i.classData.type + ">");
+ const R = _.node().appendChild(g5(Z, i.labelStyle, !0, !0));
+ co(R).attr("class", "classTitle");
+ let J = R.getBBox();
+ if (Ev(Bn().flowchart.htmlLabels)) {
+ const le = R.children[0], be = co(R);
+ J = le.getBoundingClientRect(), be.attr("width", J.width), be.attr("height", J.height);
+ }
+ k += J.height + 4, J.width > v && (v = J.width);
+ const he = [];
+ i.classData.members.forEach((le) => {
+ const be = zNe(le);
+ let ke = be.displayText;
+ Bn().flowchart.htmlLabels && (ke = ke.replace(//g, ">"));
+ const de = _.node().appendChild(g5(ke, be.cssStyle ? be.cssStyle : i.labelStyle, !0, !0));
+ let Te = de.getBBox();
+ if (Ev(Bn().flowchart.htmlLabels)) {
+ const xe = de.children[0], ie = co(de);
+ Te = xe.getBoundingClientRect(), ie.attr("width", Te.width), ie.attr("height", Te.height);
+ }
+ Te.width > v && (v = Te.width), k += Te.height + 4, he.push(de);
+ }), k += 8;
+ const Y = [];
+ if (i.classData.methods.forEach((le) => {
+ const be = zNe(le);
+ let ke = be.displayText;
+ Bn().flowchart.htmlLabels && (ke = ke.replace(//g, ">"));
+ const de = _.node().appendChild(g5(ke, be.cssStyle ? be.cssStyle : i.labelStyle, !0, !0));
+ let Te = de.getBBox();
+ if (Ev(Bn().flowchart.htmlLabels)) {
+ const xe = de.children[0], ie = co(de);
+ Te = xe.getBoundingClientRect(), ie.attr("width", Te.width), ie.attr("height", Te.height);
+ }
+ Te.width > v && (v = Te.width), k += Te.height + 4, Y.push(de);
+ }), k += 8, L) {
+ let le = (v - q.width) / 2;
+ co(U).attr("transform", "translate( " + (-1 * v / 2 + le) + ", " + -1 * k / 2 + ")"), T = q.height + 4;
+ }
+ let ue = (v - J.width) / 2;
+ return co(R).attr("transform", "translate( " + (-1 * v / 2 + ue) + ", " + (-1 * k / 2 + T) + ")"), T += J.height + 4, A.attr("class", "divider").attr("x1", -v / 2 - o).attr("x2", v / 2 + o).attr("y1", -k / 2 - o + 8 + T).attr("y2", -k / 2 - o + 8 + T), T += 8, he.forEach((le) => {
+ co(le).attr("transform", "translate( " + -v / 2 + ", " + (-1 * k / 2 + T + 4) + ")"), T += J.height + 4;
+ }), T += 8, b.attr("class", "divider").attr("x1", -v / 2 - o).attr("x2", v / 2 + o).attr("y1", -k / 2 - o + 8 + T).attr("y2", -k / 2 - o + 8 + T), T += 8, Y.forEach((le) => {
+ co(le).attr("transform", "translate( " + -v / 2 + ", " + (-1 * k / 2 + T) + ")"), T += J.height + 4;
+ }), g.attr("class", "outer title-state").attr("x", -v / 2 - o).attr("y", -k / 2 - o).attr("width", v + i.padding).attr("height", k + i.padding), wp(i, g), i.intersect = function(le) {
+ return Eg.rect(i, le);
+ }, f;
+} };
+let IG = {};
+const YLt = (r, i, o) => {
+ let l, f;
+ if (i.link) {
+ let g;
+ Bn().securityLevel === "sandbox" ? g = "_top" : i.linkTarget && (g = i.linkTarget || "_blank"), l = r.insert("svg:a").attr("xlink:href", i.link).attr("target", g), f = fCt[i.shape](l, i, o);
+ } else
+ f = fCt[i.shape](r, i, o), l = f;
+ return i.tooltip && f.attr("title", i.tooltip), i.class && f.attr("class", "node default " + i.class), IG[i.id] = l, i.haveCallback && IG[i.id].attr("class", IG[i.id].attr("class") + " clickable"), l;
+}, dCt = (r) => {
+ const i = IG[r.id];
+ _t.trace("Transforming node", r.diff, r, "translate(" + (r.x - r.width / 2 - 5) + ", " + r.width / 2 + ")");
+ const o = r.diff || 0;
+ return r.clusterNode ? i.attr("transform", "translate(" + (r.x + o - r.width / 2) + ", " + (r.y - r.height / 2 - 8) + ")") : i.attr("transform", "translate(" + r.x + ", " + r.y + ")"), o;
+}, U9n = { rect: (r, i) => {
+ _t.trace("Creating subgraph rect for ", i.id, i);
+ const o = r.insert("g").attr("class", "cluster" + (i.class ? " " + i.class : "")).attr("id", i.id), l = o.insert("rect", ":first-child"), f = o.insert("g").attr("class", "cluster-label"), g = f.node().appendChild(g5(i.labelText, i.labelStyle, void 0, !0));
+ let A = g.getBBox();
+ if (Ev(Bn().flowchart.htmlLabels)) {
+ const T = g.children[0], L = co(g);
+ A = T.getBoundingClientRect(), L.attr("width", A.width), L.attr("height", A.height);
+ }
+ const b = 0 * i.padding, v = b / 2, k = i.width <= A.width + b ? A.width + b : i.width;
+ i.width <= A.width + b ? i.diff = (A.width - i.width) / 2 - i.padding / 2 : i.diff = -i.padding / 2, _t.trace("Data ", i, JSON.stringify(i)), l.attr("style", i.style).attr("rx", i.rx).attr("ry", i.ry).attr("x", i.x - k / 2).attr("y", i.y - i.height / 2 - v).attr("width", k).attr("height", i.height + b), f.attr("transform", "translate(" + (i.x - A.width / 2) + ", " + (i.y - i.height / 2) + ")");
+ const _ = l.node().getBBox();
+ return i.width = _.width, i.height = _.height, i.intersect = function(T) {
+ return dre(i, T);
+ }, o;
+}, roundedWithTitle: (r, i) => {
+ const o = r.insert("g").attr("class", i.classes).attr("id", i.id), l = o.insert("rect", ":first-child"), f = o.insert("g").attr("class", "cluster-label"), g = o.append("rect"), A = f.node().appendChild(g5(i.labelText, i.labelStyle, void 0, !0));
+ let b = A.getBBox();
+ if (Ev(Bn().flowchart.htmlLabels)) {
+ const L = A.children[0], F = co(A);
+ b = L.getBoundingClientRect(), F.attr("width", b.width), F.attr("height", b.height);
+ }
+ b = A.getBBox();
+ const v = 0 * i.padding, k = v / 2, _ = i.width <= b.width + i.padding ? b.width + i.padding : i.width;
+ i.width <= b.width + i.padding ? i.diff = (b.width + 0 * i.padding - i.width) / 2 : i.diff = -i.padding / 2, l.attr("class", "outer").attr("x", i.x - _ / 2 - k).attr("y", i.y - i.height / 2 - k).attr("width", _ + v).attr("height", i.height + v), g.attr("class", "inner").attr("x", i.x - _ / 2 - k).attr("y", i.y - i.height / 2 - k + b.height - 1).attr("width", _ + v).attr("height", i.height + v - b.height - 3), f.attr("transform", "translate(" + (i.x - b.width / 2) + ", " + (i.y - i.height / 2 - i.padding / 3 + (Ev(Bn().flowchart.htmlLabels) ? 5 : 3)) + ")");
+ const T = l.node().getBBox();
+ return i.height = T.height, i.intersect = function(L) {
+ return dre(i, L);
+ }, o;
+}, noteGroup: (r, i) => {
+ const o = r.insert("g").attr("class", "note-cluster").attr("id", i.id), l = o.insert("rect", ":first-child"), f = 0 * i.padding, g = f / 2;
+ l.attr("rx", i.rx).attr("ry", i.ry).attr("x", i.x - i.width / 2 - g).attr("y", i.y - i.height / 2 - g).attr("width", i.width + f).attr("height", i.height + f).attr("fill", "none");
+ const A = l.node().getBBox();
+ return i.width = A.width, i.height = A.height, i.intersect = function(b) {
+ return dre(i, b);
+ }, o;
+}, divider: (r, i) => {
+ const o = r.insert("g").attr("class", i.classes).attr("id", i.id), l = o.insert("rect", ":first-child"), f = 0 * i.padding, g = f / 2;
+ l.attr("class", "divider").attr("x", i.x - i.width / 2 - g).attr("y", i.y - i.height / 2).attr("width", i.width + f).attr("height", i.height + f);
+ const A = l.node().getBBox();
+ return i.width = A.width, i.height = A.height, i.diff = -i.padding / 2, i.intersect = function(b) {
+ return dre(i, b);
+ }, o;
+} };
+let JLt = {}, Cbe = {}, _v = {};
+const ZLt = (r, i) => {
+ const o = g5(i.label, i.labelStyle), l = r.insert("g").attr("class", "edgeLabel"), f = l.insert("g").attr("class", "label");
+ f.node().appendChild(o);
+ let g, A = o.getBBox();
+ if (Ev(Bn().flowchart.htmlLabels)) {
+ const b = o.children[0], v = co(o);
+ A = b.getBoundingClientRect(), v.attr("width", A.width), v.attr("height", A.height);
+ }
+ if (f.attr("transform", "translate(" + -A.width / 2 + ", " + -A.height / 2 + ")"), Cbe[i.id] = l, i.width = A.width, i.height = A.height, i.startLabelLeft) {
+ const b = g5(i.startLabelLeft, i.labelStyle), v = r.insert("g").attr("class", "edgeTerminals"), k = v.insert("g").attr("class", "inner");
+ g = k.node().appendChild(b);
+ const _ = b.getBBox();
+ k.attr("transform", "translate(" + -_.width / 2 + ", " + -_.height / 2 + ")"), _v[i.id] || (_v[i.id] = {}), _v[i.id].startLeft = v, Ape(g, i.startLabelLeft);
+ }
+ if (i.startLabelRight) {
+ const b = g5(i.startLabelRight, i.labelStyle), v = r.insert("g").attr("class", "edgeTerminals"), k = v.insert("g").attr("class", "inner");
+ g = v.node().appendChild(b), k.node().appendChild(b);
+ const _ = b.getBBox();
+ k.attr("transform", "translate(" + -_.width / 2 + ", " + -_.height / 2 + ")"), _v[i.id] || (_v[i.id] = {}), _v[i.id].startRight = v, Ape(g, i.startLabelRight);
+ }
+ if (i.endLabelLeft) {
+ const b = g5(i.endLabelLeft, i.labelStyle), v = r.insert("g").attr("class", "edgeTerminals"), k = v.insert("g").attr("class", "inner");
+ g = k.node().appendChild(b);
+ const _ = b.getBBox();
+ k.attr("transform", "translate(" + -_.width / 2 + ", " + -_.height / 2 + ")"), v.node().appendChild(b), _v[i.id] || (_v[i.id] = {}), _v[i.id].endLeft = v, Ape(g, i.endLabelLeft);
+ }
+ if (i.endLabelRight) {
+ const b = g5(i.endLabelRight, i.labelStyle), v = r.insert("g").attr("class", "edgeTerminals"), k = v.insert("g").attr("class", "inner");
+ g = k.node().appendChild(b);
+ const _ = b.getBBox();
+ k.attr("transform", "translate(" + -_.width / 2 + ", " + -_.height / 2 + ")"), v.node().appendChild(b), _v[i.id] || (_v[i.id] = {}), _v[i.id].endRight = v, Ape(g, i.endLabelRight);
+ }
+ return o;
+};
+function Ape(r, i) {
+ Bn().flowchart.htmlLabels && r && (r.style.width = 9 * i.length + "px", r.style.height = "12px");
+}
+const ACt = (r, i) => {
+ _t.warn("abc88 cutPathAtIntersect", r, i);
+ let o = [], l = r[0], f = !1;
+ return r.forEach((g) => {
+ if (_t.info("abc88 checking point", g, i), ((A, b) => {
+ const v = A.x, k = A.y, _ = Math.abs(b.x - v), T = Math.abs(b.y - k), L = A.width / 2, F = A.height / 2;
+ return _ >= L || T >= F;
+ })(i, g) || f)
+ _t.warn("abc88 outside", g, l), l = g, f || o.push(g);
+ else {
+ const A = ((v, k, _) => {
+ _t.warn(`intersection calc abc89:
+ outsidePoint: ${JSON.stringify(k)}
+ insidePoint : ${JSON.stringify(_)}
+ node : x:${v.x} y:${v.y} w:${v.width} h:${v.height}`);
+ const T = v.x, L = v.y, F = Math.abs(T - _.x), U = v.width / 2;
+ let q = _.x < k.x ? U - F : U + F;
+ const Z = v.height / 2, R = Math.abs(k.y - _.y), J = Math.abs(k.x - _.x);
+ if (Math.abs(L - k.y) * U > Math.abs(T - k.x) * Z) {
+ let he = _.y < k.y ? k.y - Z - L : L - Z - k.y;
+ q = J * he / R;
+ const Y = { x: _.x < k.x ? _.x + q : _.x - J + q, y: _.y < k.y ? _.y + R - he : _.y - R + he };
+ return q === 0 && (Y.x = k.x, Y.y = k.y), J === 0 && (Y.x = k.x), R === 0 && (Y.y = k.y), _t.warn(`abc89 topp/bott calc, Q ${R}, q ${he}, R ${J}, r ${q}`, Y), Y;
+ }
+ {
+ q = _.x < k.x ? k.x - U - T : T - U - k.x;
+ let he = R * q / J, Y = _.x < k.x ? _.x + J - q : _.x - J + q, ue = _.y < k.y ? _.y + he : _.y - he;
+ return _t.warn(`sides calc abc89, Q ${R}, q ${he}, R ${J}, r ${q}`, { _x: Y, _y: ue }), q === 0 && (Y = k.x, ue = k.y), J === 0 && (Y = k.x), R === 0 && (ue = k.y), { x: Y, y: ue };
+ }
+ })(i, l, g);
+ _t.warn("abc88 inside", g, l, A), _t.warn("abc88 intersection", A);
+ let b = !1;
+ o.forEach((v) => {
+ b = b || v.x === A.x && v.y === A.y;
+ }), o.some((v) => v.x === A.x && v.y === A.y) ? _t.warn("abc88 no intersect", A, o) : o.push(A), f = !0;
+ }
+ }), _t.warn("abc88 returning points", o), o;
+}, eIt = (r, i, o, l) => {
+ _t.info("Graph in recursive render: XXX", fL(i), l);
+ const f = i.graph().rankdir;
+ _t.trace("Dir in recursive render - dir:", f);
+ const g = r.insert("g").attr("class", "root");
+ i.nodes() ? _t.info("Recursive render XXX", i.nodes()) : _t.info("No nodes found for", i), i.edges().length > 0 && _t.trace("Recursive edges", i.edge(i.edges()[0]));
+ const A = g.insert("g").attr("class", "clusters"), b = g.insert("g").attr("class", "edgePaths"), v = g.insert("g").attr("class", "edgeLabels"), k = g.insert("g").attr("class", "nodes");
+ i.nodes().forEach(function(T) {
+ const L = i.node(T);
+ if (l !== void 0) {
+ const F = JSON.parse(JSON.stringify(l.clusterData));
+ _t.info("Setting data for cluster XXX (", T, ") ", F, l), i.setNode(l.id, F), i.parent(T) || (_t.trace("Setting parent", T, l.id), i.setParent(T, l.id, F));
+ }
+ if (_t.info("(Insert) Node XXX" + T + ": " + JSON.stringify(i.node(T))), L && L.clusterNode) {
+ _t.info("Cluster identified", T, L.width, i.node(T));
+ const F = eIt(k, L.graph, o, i.node(T)), U = F.elem;
+ wp(L, U), L.diff = F.diff || 0, _t.info("Node bounds (abc123)", T, L, L.width, L.x, L.y), ((q, Z) => {
+ IG[Z.id] = q;
+ })(U, L), _t.warn("Recursive render complete ", U, L);
+ } else
+ i.children(T).length > 0 ? (_t.info("Cluster - the non recursive path XXX", T, L.id, L, i), _t.info(yie(L.id, i)), Mh[L.id] = { id: yie(L.id, i), node: L }) : (_t.info("Node - the non recursive path", T, L.id, L), YLt(k, i.node(T), f));
+ }), i.edges().forEach(function(T) {
+ const L = i.edge(T.v, T.w, T.name);
+ _t.info("Edge " + T.v + " -> " + T.w + ": " + JSON.stringify(T)), _t.info("Edge " + T.v + " -> " + T.w + ": ", T, " ", JSON.stringify(i.edge(T))), _t.info("Fix", Mh, "ids:", T.v, T.w, "Translateing: ", Mh[T.v], Mh[T.w]), ZLt(v, L);
+ }), i.edges().forEach(function(T) {
+ _t.info("Edge " + T.v + " -> " + T.w + ": " + JSON.stringify(T));
+ }), _t.info("#############################################"), _t.info("### Layout ###"), _t.info("#############################################"), _t.info(i), Uie(i), _t.info("Graph after layout:", fL(i));
+ let _ = 0;
+ return ((T) => qLt(T, T.children()))(i).forEach(function(T) {
+ const L = i.node(T);
+ _t.info("Position " + T + ": " + JSON.stringify(i.node(T))), _t.info("Position " + T + ": (" + L.x, "," + L.y, ") width: ", L.width, " height: ", L.height), L && L.clusterNode ? dCt(L) : i.children(T).length > 0 ? (((F, U) => {
+ _t.trace("Inserting cluster");
+ const q = U.shape || "rect";
+ JLt[U.id] = U9n[q](F, U);
+ })(A, L), Mh[L.id].node = L) : dCt(L);
+ }), i.edges().forEach(function(T) {
+ const L = i.edge(T);
+ _t.info("Edge " + T.v + " -> " + T.w + ": " + JSON.stringify(L), L);
+ const F = function(U, q, Z, R, J, he) {
+ let Y = Z.points, ue = !1;
+ const le = he.node(q.v);
+ var be = he.node(q.w);
+ _t.info("abc88 InsertEdge: ", Z), be.intersect && le.intersect && (Y = Y.slice(1, Z.points.length - 1), Y.unshift(le.intersect(Y[0])), _t.info("Last point", Y[Y.length - 1], be, be.intersect(Y[Y.length - 1])), Y.push(be.intersect(Y[Y.length - 1]))), Z.toCluster && (_t.info("to cluster abc88", R[Z.toCluster]), Y = ACt(Z.points, R[Z.toCluster].node), ue = !0), Z.fromCluster && (_t.info("from cluster abc88", R[Z.fromCluster]), Y = ACt(Y.reverse(), R[Z.fromCluster].node).reverse(), ue = !0);
+ const ke = Y.filter((Me) => !Number.isNaN(Me.y));
+ let de;
+ de = (J === "graph" || J === "flowchart") && Z.curve || Rie;
+ const Te = pX().x(function(Me) {
+ return Me.x;
+ }).y(function(Me) {
+ return Me.y;
+ }).curve(de);
+ let xe;
+ switch (Z.thickness) {
+ case "normal":
+ xe = "edge-thickness-normal";
+ break;
+ case "thick":
+ xe = "edge-thickness-thick";
+ break;
+ default:
+ xe = "";
+ }
+ switch (Z.pattern) {
+ case "solid":
+ xe += " edge-pattern-solid";
+ break;
+ case "dotted":
+ xe += " edge-pattern-dotted";
+ break;
+ case "dashed":
+ xe += " edge-pattern-dashed";
+ }
+ const ie = U.append("path").attr("d", Te(ke)).attr("id", Z.id).attr("class", " " + xe + (Z.classes ? " " + Z.classes : "")).attr("style", Z.style);
+ let Be = "";
+ switch ((Bn().flowchart.arrowMarkerAbsolute || Bn().state.arrowMarkerAbsolute) && (Be = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, Be = Be.replace(/\(/g, "\\("), Be = Be.replace(/\)/g, "\\)")), _t.info("arrowTypeStart", Z.arrowTypeStart), _t.info("arrowTypeEnd", Z.arrowTypeEnd), Z.arrowTypeStart) {
+ case "arrow_cross":
+ ie.attr("marker-start", "url(" + Be + "#" + J + "-crossStart)");
+ break;
+ case "arrow_point":
+ ie.attr("marker-start", "url(" + Be + "#" + J + "-pointStart)");
+ break;
+ case "arrow_barb":
+ ie.attr("marker-start", "url(" + Be + "#" + J + "-barbStart)");
+ break;
+ case "arrow_circle":
+ ie.attr("marker-start", "url(" + Be + "#" + J + "-circleStart)");
+ break;
+ case "aggregation":
+ ie.attr("marker-start", "url(" + Be + "#" + J + "-aggregationStart)");
+ break;
+ case "extension":
+ ie.attr("marker-start", "url(" + Be + "#" + J + "-extensionStart)");
+ break;
+ case "composition":
+ ie.attr("marker-start", "url(" + Be + "#" + J + "-compositionStart)");
+ break;
+ case "dependency":
+ ie.attr("marker-start", "url(" + Be + "#" + J + "-dependencyStart)");
+ break;
+ case "lollipop":
+ ie.attr("marker-start", "url(" + Be + "#" + J + "-lollipopStart)");
+ }
+ switch (Z.arrowTypeEnd) {
+ case "arrow_cross":
+ ie.attr("marker-end", "url(" + Be + "#" + J + "-crossEnd)");
+ break;
+ case "arrow_point":
+ ie.attr("marker-end", "url(" + Be + "#" + J + "-pointEnd)");
+ break;
+ case "arrow_barb":
+ ie.attr("marker-end", "url(" + Be + "#" + J + "-barbEnd)");
+ break;
+ case "arrow_circle":
+ ie.attr("marker-end", "url(" + Be + "#" + J + "-circleEnd)");
+ break;
+ case "aggregation":
+ ie.attr("marker-end", "url(" + Be + "#" + J + "-aggregationEnd)");
+ break;
+ case "extension":
+ ie.attr("marker-end", "url(" + Be + "#" + J + "-extensionEnd)");
+ break;
+ case "composition":
+ ie.attr("marker-end", "url(" + Be + "#" + J + "-compositionEnd)");
+ break;
+ case "dependency":
+ ie.attr("marker-end", "url(" + Be + "#" + J + "-dependencyEnd)");
+ break;
+ case "lollipop":
+ ie.attr("marker-end", "url(" + Be + "#" + J + "-lollipopEnd)");
+ }
+ let te = {};
+ return ue && (te.updatedPath = Y), te.originalPath = Z.points, te;
+ }(b, T, L, Mh, o, i);
+ ((U, q) => {
+ _t.info("Moving label abc78 ", U.id, U.label, Cbe[U.id]);
+ let Z = q.updatedPath ? q.updatedPath : q.originalPath;
+ if (U.label) {
+ const R = Cbe[U.id];
+ let J = U.x, he = U.y;
+ if (Z) {
+ const Y = Tl.calcLabelPosition(Z);
+ _t.info("Moving label " + U.label + " from (", J, ",", he, ") to (", Y.x, ",", Y.y, ") abc78"), q.updatedPath && (J = Y.x, he = Y.y);
+ }
+ R.attr("transform", "translate(" + J + ", " + he + ")");
+ }
+ if (U.startLabelLeft) {
+ const R = _v[U.id].startLeft;
+ let J = U.x, he = U.y;
+ if (Z) {
+ const Y = Tl.calcTerminalLabelPosition(U.arrowTypeStart ? 10 : 0, "start_left", Z);
+ J = Y.x, he = Y.y;
+ }
+ R.attr("transform", "translate(" + J + ", " + he + ")");
+ }
+ if (U.startLabelRight) {
+ const R = _v[U.id].startRight;
+ let J = U.x, he = U.y;
+ if (Z) {
+ const Y = Tl.calcTerminalLabelPosition(U.arrowTypeStart ? 10 : 0, "start_right", Z);
+ J = Y.x, he = Y.y;
+ }
+ R.attr("transform", "translate(" + J + ", " + he + ")");
+ }
+ if (U.endLabelLeft) {
+ const R = _v[U.id].endLeft;
+ let J = U.x, he = U.y;
+ if (Z) {
+ const Y = Tl.calcTerminalLabelPosition(U.arrowTypeEnd ? 10 : 0, "end_left", Z);
+ J = Y.x, he = Y.y;
+ }
+ R.attr("transform", "translate(" + J + ", " + he + ")");
+ }
+ if (U.endLabelRight) {
+ const R = _v[U.id].endRight;
+ let J = U.x, he = U.y;
+ if (Z) {
+ const Y = Tl.calcTerminalLabelPosition(U.arrowTypeEnd ? 10 : 0, "end_right", Z);
+ J = Y.x, he = Y.y;
+ }
+ R.attr("transform", "translate(" + J + ", " + he + ")");
+ }
+ })(L, F);
+ }), i.nodes().forEach(function(T) {
+ const L = i.node(T);
+ _t.info(T, L.type, L.diff), L.type === "group" && (_ = L.diff);
+ }), { elem: g, diff: _ };
+}, aQe = (r, i, o, l, f) => {
+ zLt(r, o, l, f), IG = {}, Cbe = {}, _v = {}, JLt = {}, R9 = {}, GLt = {}, Mh = {}, _t.warn("Graph at first:", fL(i)), ((g, A) => {
+ !g || A > 10 ? _t.debug("Opting out, no graph ") : (_t.debug("Opting in, graph "), g.nodes().forEach(function(b) {
+ g.children(b).length > 0 && (_t.warn("Cluster identified", b, " Replacement id in edges: ", yie(b, g)), R9[b] = WLt(b, g), Mh[b] = { id: yie(b, g), clusterData: g.node(b) });
+ }), g.nodes().forEach(function(b) {
+ const v = g.children(b), k = g.edges();
+ v.length > 0 ? (_t.debug("Cluster identified", b, R9), k.forEach((_) => {
+ _.v !== b && _.w !== b && xbe(_.v, b) ^ xbe(_.w, b) && (_t.warn("Edge: ", _, " leaves cluster ", b), _t.warn("Decendants of XXX ", b, ": ", R9[b]), Mh[b].externalConnections = !0);
+ })) : _t.debug("Not a cluster ", b, R9);
+ }), g.edges().forEach(function(b) {
+ const v = g.edge(b);
+ _t.warn("Edge " + b.v + " -> " + b.w + ": " + JSON.stringify(b)), _t.warn("Edge " + b.v + " -> " + b.w + ": " + JSON.stringify(g.edge(b)));
+ let k = b.v, _ = b.w;
+ if (_t.warn("Fix XXX", Mh, "ids:", b.v, b.w, "Translating: ", Mh[b.v], " --- ", Mh[b.w]), Mh[b.v] && Mh[b.w] && Mh[b.v] === Mh[b.w]) {
+ _t.warn("Fixing and trixing link to self - removing XXX", b.v, b.w, b.name), _t.warn("Fixing and trixing - removing XXX", b.v, b.w, b.name), k = dpe(b.v), _ = dpe(b.w), g.removeEdge(b.v, b.w, b.name);
+ const T = b.w + "---" + b.v;
+ g.setNode(T, { domId: T, id: T, labelStyle: "", labelText: v.label, padding: 0, shape: "labelRect", style: "" });
+ const L = JSON.parse(JSON.stringify(v)), F = JSON.parse(JSON.stringify(v));
+ L.label = "", L.arrowTypeEnd = "none", F.label = "", L.fromCluster = b.v, F.toCluster = b.v, g.setEdge(k, T, L, b.name + "-cyclic-special"), g.setEdge(T, _, F, b.name + "-cyclic-special");
+ } else
+ (Mh[b.v] || Mh[b.w]) && (_t.warn("Fixing and trixing - removing XXX", b.v, b.w, b.name), k = dpe(b.v), _ = dpe(b.w), g.removeEdge(b.v, b.w, b.name), k !== b.v && (v.fromCluster = b.v), _ !== b.w && (v.toCluster = b.w), _t.warn("Fix Replacing with XXX", k, _, b.name), g.setEdge(k, _, v, b.name));
+ }), _t.warn("Adjusted Graph", fL(g)), VLt(g, 0), _t.trace(Mh));
+ })(i), _t.warn("Graph after:", fL(i)), eIt(r, i, l);
+}, gCt = (r) => El.sanitizeText(r, Bn());
+let pCt = { dividerMargin: 10, padding: 5, textHeight: 10 };
+function mCt(r) {
+ let i;
+ switch (r) {
+ case 0:
+ i = "aggregation";
+ break;
+ case 1:
+ i = "extension";
+ break;
+ case 2:
+ i = "composition";
+ break;
+ case 3:
+ i = "dependency";
+ break;
+ case 4:
+ i = "lollipop";
+ break;
+ default:
+ i = "none";
+ }
+ return i;
+}
+const H9n = { setConf: function(r) {
+ Object.keys(r).forEach(function(i) {
+ pCt[i] = r[i];
+ });
+}, draw: function(r, i, o, l) {
+ _t.info("Drawing class - ", i);
+ const f = Bn().flowchart, g = Bn().securityLevel;
+ _t.info("config:", f);
+ const A = f.nodeSpacing || 50, b = f.rankSpacing || 50, v = new ub({ multigraph: !0, compound: !0 }).setGraph({ rankdir: l.db.getDirection(), nodesep: A, ranksep: b, marginx: 8, marginy: 8 }).setDefaultEdgeLabel(function() {
+ return {};
+ }), k = l.db.getClasses(), _ = l.db.getRelations(), T = l.db.getNotes();
+ let L;
+ _t.info(_), function(Z, R, J, he) {
+ const Y = Object.keys(Z);
+ _t.info("keys:", Y), _t.info(Z), Y.forEach(function(ue) {
+ const le = Z[ue];
+ let be = "";
+ le.cssClasses.length > 0 && (be = be + " " + le.cssClasses.join(" "));
+ const ke = { labelStyle: "" };
+ let de = le.text !== void 0 ? le.text : le.id, Te = "";
+ le.type, Te = "class_box", R.setNode(le.id, { labelStyle: ke.labelStyle, shape: Te, labelText: gCt(de), classData: le, rx: 0, ry: 0, class: be, style: ke.style, id: le.id, domId: le.domId, tooltip: he.db.getTooltip(le.id) || "", haveCallback: le.haveCallback, link: le.link, width: le.type === "group" ? 500 : void 0, type: le.type, padding: Bn().flowchart.padding }), _t.info("setNode", { labelStyle: ke.labelStyle, shape: Te, labelText: de, rx: 0, ry: 0, class: be, style: ke.style, id: le.id, width: le.type === "group" ? 500 : void 0, type: le.type, padding: Bn().flowchart.padding });
+ });
+ }(k, v, 0, l), function(Z, R) {
+ const J = Bn().flowchart;
+ let he = 0;
+ Z.forEach(function(Y) {
+ he++;
+ const ue = { classes: "relation" };
+ ue.pattern = Y.relation.lineType == 1 ? "dashed" : "solid", ue.id = "id" + he, Y.type === "arrow_open" ? ue.arrowhead = "none" : ue.arrowhead = "normal", _t.info(ue, Y), ue.startLabelRight = Y.relationTitle1 === "none" ? "" : Y.relationTitle1, ue.endLabelLeft = Y.relationTitle2 === "none" ? "" : Y.relationTitle2, ue.arrowTypeStart = mCt(Y.relation.type1), ue.arrowTypeEnd = mCt(Y.relation.type2);
+ let le = "", be = "";
+ if (Y.style !== void 0) {
+ const ke = OO(Y.style);
+ le = ke.style, be = ke.labelStyle;
+ } else
+ le = "fill:none";
+ ue.style = le, ue.labelStyle = be, Y.interpolate !== void 0 ? ue.curve = $9(Y.interpolate, mk) : Z.defaultInterpolate !== void 0 ? ue.curve = $9(Z.defaultInterpolate, mk) : ue.curve = $9(J.curve, mk), Y.text = Y.title, Y.text === void 0 ? Y.style !== void 0 && (ue.arrowheadStyle = "fill: #333") : (ue.arrowheadStyle = "fill: #333", ue.labelpos = "c", Bn().flowchart.htmlLabels ? (ue.labelType = "html", ue.label = '' + Y.text + "") : (ue.labelType = "text", ue.label = Y.text.replace(El.lineBreakRegex, `
+`), Y.style === void 0 && (ue.style = ue.style || "stroke: #333; stroke-width: 1.5px;fill:none"), ue.labelStyle = ue.labelStyle.replace("color:", "fill:"))), R.setEdge(Y.id1, Y.id2, ue, he);
+ });
+ }(_, v), function(Z, R, J, he) {
+ _t.info(Z), Z.forEach(function(Y, ue) {
+ const le = Y, be = "", ke = "";
+ let de = le.text, Te = "note";
+ if (R.setNode(le.id, { labelStyle: be, shape: Te, labelText: gCt(de), noteData: le, rx: 0, ry: 0, class: "", style: ke, id: le.id, domId: le.id, tooltip: "", type: "note", padding: Bn().flowchart.padding }), _t.info("setNode", { labelStyle: be, shape: Te, labelText: de, rx: 0, ry: 0, style: ke, id: le.id, type: "note", padding: Bn().flowchart.padding }), !le.class || !(le.class in he))
+ return;
+ const xe = J + ue, ie = { classes: "relation", pattern: "dotted" };
+ ie.id = `edgeNote${xe}`, ie.arrowhead = "none", _t.info(`Note edge: ${JSON.stringify(ie)}, ${JSON.stringify(le)}`), ie.startLabelRight = "", ie.endLabelLeft = "", ie.arrowTypeStart = "none", ie.arrowTypeEnd = "none", ie.style = "fill:none", ie.labelStyle = "", ie.curve = $9(pCt.curve, mk), R.setEdge(le.id, le.class, ie, xe);
+ });
+ }(T, v, _.length + 1, k), g === "sandbox" && (L = co("#i" + i));
+ const F = co(g === "sandbox" ? L.nodes()[0].contentDocument.body : "body"), U = F.select(`[id="${i}"]`), q = F.select("#" + i + " g");
+ if (aQe(q, v, ["aggregation", "extension", "composition", "dependency", "lollipop"], "classDiagram", i), Tl.insertTitle(U, "classTitleText", f.titleTopMargin, l.db.getDiagramTitle()), vX(v, U, f.diagramPadding, f.useMaxWidth), !f.htmlLabels) {
+ const Z = g === "sandbox" ? L.nodes()[0].contentDocument : document, R = Z.querySelectorAll('[id="' + i + '"] .edgeLabel .label');
+ for (const J of R) {
+ const he = J.getBBox(), Y = Z.createElementNS("http://www.w3.org/2000/svg", "rect");
+ Y.setAttribute("rx", 0), Y.setAttribute("ry", 0), Y.setAttribute("width", he.width), Y.setAttribute("height", he.height), J.insertBefore(Y, J.firstChild);
+ }
+ }
+} };
+var GNe = function() {
+ var r, i = function(ie, Be, te, Me) {
+ for (te = te || {}, Me = ie.length; Me--; te[ie[Me]] = Be)
+ ;
+ return te;
+ }, o = [1, 2], l = [1, 5], f = [6, 9, 11, 23, 25, 27, 29, 30, 31, 51], g = [1, 17], A = [1, 18], b = [1, 19], v = [1, 20], k = [1, 21], _ = [1, 22], T = [1, 25], L = [1, 30], F = [1, 31], U = [1, 32], q = [1, 33], Z = [6, 9, 11, 15, 20, 23, 25, 27, 29, 30, 31, 44, 45, 46, 47, 51], R = [1, 45], J = [30, 31, 48, 49], he = [4, 6, 9, 11, 23, 25, 27, 29, 30, 31, 51], Y = [44, 45, 46, 47], ue = [22, 37], le = [1, 65], be = [1, 64], ke = [22, 37, 39, 41], de = { 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, attributeKeyTypeList: 35, attributeComment: 36, ATTRIBUTE_WORD: 37, attributeKeyType: 38, COMMA: 39, ATTRIBUTE_KEY: 40, COMMENT: 41, cardinality: 42, relType: 43, ZERO_OR_ONE: 44, ZERO_OR_MORE: 45, ONE_OR_MORE: 46, ONLY_ONE: 47, NON_IDENTIFYING: 48, IDENTIFYING: 49, WORD: 50, open_directive: 51, type_directive: 52, arg_directive: 53, close_directive: 54, $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", 39: "COMMA", 40: "ATTRIBUTE_KEY", 41: "COMMENT", 44: "ZERO_OR_ONE", 45: "ZERO_OR_MORE", 46: "ONE_OR_MORE", 47: "ONLY_ONE", 48: "NON_IDENTIFYING", 49: "IDENTIFYING", 50: "WORD", 51: "open_directive", 52: "type_directive", 53: "arg_directive", 54: "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], [35, 3], [38, 1], [36, 1], [18, 3], [42, 1], [42, 1], [42, 1], [42, 1], [43, 1], [43, 1], [19, 1], [19, 1], [19, 1], [12, 1], [13, 1], [16, 1], [14, 1]], performAction: function(ie, Be, te, Me, ve, ge, Je) {
+ var ot = ge.length - 1;
+ switch (ve) {
+ case 1:
+ break;
+ case 3:
+ case 7:
+ case 8:
+ this.$ = [];
+ break;
+ case 4:
+ ge[ot - 1].push(ge[ot]), this.$ = ge[ot - 1];
+ break;
+ case 5:
+ case 6:
+ case 20:
+ case 43:
+ case 28:
+ case 29:
+ case 32:
+ this.$ = ge[ot];
+ break;
+ case 12:
+ Me.addEntity(ge[ot - 4]), Me.addEntity(ge[ot - 2]), Me.addRelationship(ge[ot - 4], ge[ot], ge[ot - 2], ge[ot - 3]);
+ break;
+ case 13:
+ Me.addEntity(ge[ot - 3]), Me.addAttributes(ge[ot - 3], ge[ot - 1]);
+ break;
+ case 14:
+ Me.addEntity(ge[ot - 2]);
+ break;
+ case 15:
+ Me.addEntity(ge[ot]);
+ break;
+ case 16:
+ case 17:
+ this.$ = ge[ot].trim(), Me.setAccTitle(this.$);
+ break;
+ case 18:
+ case 19:
+ this.$ = ge[ot].trim(), Me.setAccDescription(this.$);
+ break;
+ case 21:
+ case 41:
+ case 42:
+ case 33:
+ this.$ = ge[ot].replace(/"/g, "");
+ break;
+ case 22:
+ case 30:
+ this.$ = [ge[ot]];
+ break;
+ case 23:
+ ge[ot].push(ge[ot - 1]), this.$ = ge[ot];
+ break;
+ case 24:
+ this.$ = { attributeType: ge[ot - 1], attributeName: ge[ot] };
+ break;
+ case 25:
+ this.$ = { attributeType: ge[ot - 2], attributeName: ge[ot - 1], attributeKeyTypeList: ge[ot] };
+ break;
+ case 26:
+ this.$ = { attributeType: ge[ot - 2], attributeName: ge[ot - 1], attributeComment: ge[ot] };
+ break;
+ case 27:
+ this.$ = { attributeType: ge[ot - 3], attributeName: ge[ot - 2], attributeKeyTypeList: ge[ot - 1], attributeComment: ge[ot] };
+ break;
+ case 31:
+ ge[ot - 2].push(ge[ot]), this.$ = ge[ot - 2];
+ break;
+ case 34:
+ this.$ = { cardA: ge[ot], relType: ge[ot - 1], cardB: ge[ot - 2] };
+ break;
+ case 35:
+ this.$ = Me.Cardinality.ZERO_OR_ONE;
+ break;
+ case 36:
+ this.$ = Me.Cardinality.ZERO_OR_MORE;
+ break;
+ case 37:
+ this.$ = Me.Cardinality.ONE_OR_MORE;
+ break;
+ case 38:
+ this.$ = Me.Cardinality.ONLY_ONE;
+ break;
+ case 39:
+ this.$ = Me.Identification.NON_IDENTIFYING;
+ break;
+ case 40:
+ this.$ = Me.Identification.IDENTIFYING;
+ break;
+ case 44:
+ Me.parseDirective("%%{", "open_directive");
+ break;
+ case 45:
+ Me.parseDirective(ge[ot], "type_directive");
+ break;
+ case 46:
+ ge[ot] = ge[ot].trim().replace(/'/g, '"'), Me.parseDirective(ge[ot], "arg_directive");
+ break;
+ case 47:
+ Me.parseDirective("}%%", "close_directive", "er");
+ }
+ }, table: [{ 3: 1, 4: o, 7: 3, 12: 4, 51: l }, { 1: [3] }, i(f, [2, 3], { 5: 6 }), { 3: 7, 4: o, 7: 3, 12: 4, 51: l }, { 13: 8, 52: [1, 9] }, { 52: [2, 44] }, { 6: [1, 10], 7: 15, 8: 11, 9: [1, 12], 10: 13, 11: [1, 14], 12: 4, 17: 16, 23: g, 25: A, 27: b, 29: v, 30: k, 31: _, 51: l }, { 1: [2, 2] }, { 14: 23, 15: [1, 24], 54: T }, i([15, 54], [2, 45]), i(f, [2, 8], { 1: [2, 1] }), i(f, [2, 4]), { 7: 15, 10: 26, 12: 4, 17: 16, 23: g, 25: A, 27: b, 29: v, 30: k, 31: _, 51: l }, i(f, [2, 6]), i(f, [2, 7]), i(f, [2, 11]), i(f, [2, 15], { 18: 27, 42: 29, 20: [1, 28], 44: L, 45: F, 46: U, 47: q }), { 24: [1, 34] }, { 26: [1, 35] }, { 28: [1, 36] }, i(f, [2, 19]), i(Z, [2, 20]), i(Z, [2, 21]), { 11: [1, 37] }, { 16: 38, 53: [1, 39] }, { 11: [2, 47] }, i(f, [2, 5]), { 17: 40, 30: k, 31: _ }, { 21: 41, 22: [1, 42], 32: 43, 33: 44, 37: R }, { 43: 46, 48: [1, 47], 49: [1, 48] }, i(J, [2, 35]), i(J, [2, 36]), i(J, [2, 37]), i(J, [2, 38]), i(f, [2, 16]), i(f, [2, 17]), i(f, [2, 18]), i(he, [2, 9]), { 14: 49, 54: T }, { 54: [2, 46] }, { 15: [1, 50] }, { 22: [1, 51] }, i(f, [2, 14]), { 21: 52, 22: [2, 22], 32: 43, 33: 44, 37: R }, { 34: 53, 37: [1, 54] }, { 37: [2, 28] }, { 42: 55, 44: L, 45: F, 46: U, 47: q }, i(Y, [2, 39]), i(Y, [2, 40]), { 11: [1, 56] }, { 19: 57, 30: [1, 60], 31: [1, 59], 50: [1, 58] }, i(f, [2, 13]), { 22: [2, 23] }, i(ue, [2, 24], { 35: 61, 36: 62, 38: 63, 40: le, 41: be }), i([22, 37, 40, 41], [2, 29]), i([30, 31], [2, 34]), i(he, [2, 10]), i(f, [2, 12]), i(f, [2, 41]), i(f, [2, 42]), i(f, [2, 43]), i(ue, [2, 25], { 36: 66, 39: [1, 67], 41: be }), i(ue, [2, 26]), i(ke, [2, 30]), i(ue, [2, 33]), i(ke, [2, 32]), i(ue, [2, 27]), { 38: 68, 40: le }, i(ke, [2, 31])], defaultActions: { 5: [2, 44], 7: [2, 2], 25: [2, 47], 39: [2, 46], 45: [2, 28], 52: [2, 23] }, parseError: function(ie, Be) {
+ if (!Be.recoverable) {
+ var te = new Error(ie);
+ throw te.hash = Be, te;
+ }
+ this.trace(ie);
+ }, parse: function(ie) {
+ var Be = this, te = [0], Me = [], ve = [null], ge = [], Je = this.table, ot = "", bt = 0, gt = 0, je = ge.slice.call(arguments, 1), Qe = Object.create(this.lexer), kt = { yy: {} };
+ for (var Wt in this.yy)
+ Object.prototype.hasOwnProperty.call(this.yy, Wt) && (kt.yy[Wt] = this.yy[Wt]);
+ Qe.setInput(ie, kt.yy), kt.yy.lexer = Qe, kt.yy.parser = this, Qe.yylloc === void 0 && (Qe.yylloc = {});
+ var jt = Qe.yylloc;
+ ge.push(jt);
+ var Zn = Qe.options && Qe.options.ranges;
+ function Ft() {
+ var zt;
+ return typeof (zt = Me.pop() || Qe.lex() || 1) != "number" && (zt instanceof Array && (zt = (Me = zt).pop()), zt = Be.symbols_[zt] || zt), zt;
+ }
+ typeof kt.yy.parseError == "function" ? this.parseError = kt.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
+ for (var wn, un, ln, an, Ot, $n, pt, Ci, ut = {}; ; ) {
+ if (un = te[te.length - 1], this.defaultActions[un] ? ln = this.defaultActions[un] : (wn == null && (wn = Ft()), ln = Je[un] && Je[un][wn]), ln === void 0 || !ln.length || !ln[0]) {
+ var br = "";
+ for (Ot in Ci = [], Je[un])
+ this.terminals_[Ot] && Ot > 2 && Ci.push("'" + this.terminals_[Ot] + "'");
+ br = Qe.showPosition ? "Parse error on line " + (bt + 1) + `:
+` + Qe.showPosition() + `
+Expecting ` + Ci.join(", ") + ", got '" + (this.terminals_[wn] || wn) + "'" : "Parse error on line " + (bt + 1) + ": Unexpected " + (wn == 1 ? "end of input" : "'" + (this.terminals_[wn] || wn) + "'"), this.parseError(br, { text: Qe.match, token: this.terminals_[wn] || wn, line: Qe.yylineno, loc: jt, expected: Ci });
+ }
+ if (ln[0] instanceof Array && ln.length > 1)
+ throw new Error("Parse Error: multiple actions possible at state: " + un + ", token: " + wn);
+ switch (ln[0]) {
+ case 1:
+ te.push(wn), ve.push(Qe.yytext), ge.push(Qe.yylloc), te.push(ln[1]), wn = null, gt = Qe.yyleng, ot = Qe.yytext, bt = Qe.yylineno, jt = Qe.yylloc;
+ break;
+ case 2:
+ if ($n = this.productions_[ln[1]][1], ut.$ = ve[ve.length - $n], ut._$ = { first_line: ge[ge.length - ($n || 1)].first_line, last_line: ge[ge.length - 1].last_line, first_column: ge[ge.length - ($n || 1)].first_column, last_column: ge[ge.length - 1].last_column }, Zn && (ut._$.range = [ge[ge.length - ($n || 1)].range[0], ge[ge.length - 1].range[1]]), (an = this.performAction.apply(ut, [ot, gt, bt, kt.yy, ln[1], ve, ge].concat(je))) !== void 0)
+ return an;
+ $n && (te = te.slice(0, -1 * $n * 2), ve = ve.slice(0, -1 * $n), ge = ge.slice(0, -1 * $n)), te.push(this.productions_[ln[1]][0]), ve.push(ut.$), ge.push(ut._$), pt = Je[te[te.length - 2]][te[te.length - 1]], te.push(pt);
+ break;
+ case 3:
+ return !0;
+ }
+ }
+ return !0;
+ } }, Te = (r = { EOF: 1, parseError: function(ie, Be) {
+ if (!this.yy.parser)
+ throw new Error(ie);
+ this.yy.parser.parseError(ie, Be);
+ }, setInput: function(ie, Be) {
+ return this.yy = Be || this.yy || {}, this._input = ie, 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 ie = this._input[0];
+ return this.yytext += ie, this.yyleng++, this.offset++, this.match += ie, this.matched += ie, ie.match(/(?:\r\n?|\n).*/g) ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), ie;
+ }, unput: function(ie) {
+ var Be = ie.length, te = ie.split(/(?:\r\n?|\n)/g);
+ this._input = ie + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - Be), this.offset -= Be;
+ var Me = 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), te.length - 1 && (this.yylineno -= te.length - 1);
+ var ve = 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: te ? (te.length === Me.length ? this.yylloc.first_column : 0) + Me[Me.length - te.length].length - te[0].length : this.yylloc.first_column - Be }, this.options.ranges && (this.yylloc.range = [ve[0], ve[0] + this.yyleng - Be]), this.yyleng = this.yytext.length, this;
+ }, more: function() {
+ return this._more = !0, this;
+ }, reject: function() {
+ return this.options.backtrack_lexer ? (this._backtrack = !0, this) : 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 });
+ }, less: function(ie) {
+ this.unput(this.match.slice(ie));
+ }, pastInput: function() {
+ var ie = this.matched.substr(0, this.matched.length - this.match.length);
+ return (ie.length > 20 ? "..." : "") + ie.substr(-20).replace(/\n/g, "");
+ }, upcomingInput: function() {
+ var ie = this.match;
+ return ie.length < 20 && (ie += this._input.substr(0, 20 - ie.length)), (ie.substr(0, 20) + (ie.length > 20 ? "..." : "")).replace(/\n/g, "");
+ }, showPosition: function() {
+ var ie = this.pastInput(), Be = new Array(ie.length + 1).join("-");
+ return ie + this.upcomingInput() + `
+` + Be + "^";
+ }, test_match: function(ie, Be) {
+ var te, Me, ve;
+ if (this.options.backtrack_lexer && (ve = { 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 && (ve.yylloc.range = this.yylloc.range.slice(0))), (Me = ie[0].match(/(?:\r\n?|\n).*/g)) && (this.yylineno += Me.length), this.yylloc = { first_line: this.yylloc.last_line, last_line: this.yylineno + 1, first_column: this.yylloc.last_column, last_column: Me ? Me[Me.length - 1].length - Me[Me.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + ie[0].length }, this.yytext += ie[0], this.match += ie[0], this.matches = ie, 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(ie[0].length), this.matched += ie[0], te = this.performAction.call(this, this.yy, this, Be, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), te)
+ return te;
+ if (this._backtrack) {
+ for (var ge in ve)
+ this[ge] = ve[ge];
+ return !1;
+ }
+ return !1;
+ }, next: function() {
+ if (this.done)
+ return this.EOF;
+ var ie, Be, te, Me;
+ this._input || (this.done = !0), this._more || (this.yytext = "", this.match = "");
+ for (var ve = this._currentRules(), ge = 0; ge < ve.length; ge++)
+ if ((te = this._input.match(this.rules[ve[ge]])) && (!Be || te[0].length > Be[0].length)) {
+ if (Be = te, Me = ge, this.options.backtrack_lexer) {
+ if ((ie = this.test_match(te, ve[ge])) !== !1)
+ return ie;
+ if (this._backtrack) {
+ Be = !1;
+ continue;
+ }
+ return !1;
+ }
+ if (!this.options.flex)
+ break;
+ }
+ return Be ? (ie = this.test_match(Be, ve[Me])) !== !1 && ie : 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 ie = this.next();
+ return ie || this.lex();
+ }, begin: function(ie) {
+ this.conditionStack.push(ie);
+ }, popState: function() {
+ return this.conditionStack.length - 1 > 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(ie) {
+ return (ie = this.conditionStack.length - 1 - Math.abs(ie || 0)) >= 0 ? this.conditionStack[ie] : "INITIAL";
+ }, pushState: function(ie) {
+ this.begin(ie);
+ }, stateStackSize: function() {
+ return this.conditionStack.length;
+ }, options: { "case-insensitive": !0 }, performAction: function(ie, Be, te, Me) {
+ switch (te) {
+ 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"), 51;
+ case 8:
+ return this.begin("type_directive"), 52;
+ case 9:
+ return this.popState(), this.begin("arg_directive"), 15;
+ case 10:
+ return this.popState(), this.popState(), 54;
+ case 11:
+ return 53;
+ case 12:
+ case 13:
+ case 15:
+ case 22:
+ case 27:
+ break;
+ case 14:
+ return 11;
+ case 16:
+ return 9;
+ case 17:
+ return 31;
+ case 18:
+ return 50;
+ case 19:
+ return 4;
+ case 20:
+ return this.begin("block"), 20;
+ case 21:
+ return 39;
+ case 23:
+ return 40;
+ case 24:
+ case 25:
+ return 37;
+ case 26:
+ return 41;
+ case 28:
+ return this.popState(), 22;
+ case 29:
+ case 58:
+ return Be.yytext[0];
+ case 30:
+ case 34:
+ case 35:
+ case 48:
+ return 44;
+ case 31:
+ case 32:
+ case 33:
+ case 41:
+ case 43:
+ case 50:
+ return 46;
+ case 36:
+ case 37:
+ case 38:
+ case 39:
+ case 40:
+ case 42:
+ case 49:
+ return 45;
+ case 44:
+ case 45:
+ case 46:
+ case 47:
+ return 47;
+ case 51:
+ case 54:
+ case 55:
+ case 56:
+ return 48;
+ case 52:
+ case 53:
+ return 49;
+ case 57:
+ return 30;
+ case 59:
+ 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, /^(?:,)/i, /^(?:\s+)/i, /^(?:\b((?:PK)|(?:FK)|(?:UK))\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, 29], inclusive: !1 }, INITIAL: { rules: [0, 2, 4, 7, 12, 13, 14, 15, 16, 17, 18, 19, 20, 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], inclusive: !0 } } }, r);
+ function xe() {
+ this.yy = {};
+ }
+ return de.lexer = Te, xe.prototype = de, de.Parser = xe, new xe();
+}();
+GNe.parser = GNe;
+const j9n = GNe, K9n = (r) => r.match(/^\s*erDiagram/) !== null;
+let Nre = {}, LOe = [];
+const bCt = function(r) {
+ return Nre[r] === void 0 && (Nre[r] = { attributes: [] }, _t.info("Added new entity :", r)), Nre[r];
+}, z9n = { Cardinality: { ZERO_OR_ONE: "ZERO_OR_ONE", ZERO_OR_MORE: "ZERO_OR_MORE", ONE_OR_MORE: "ONE_OR_MORE", ONLY_ONE: "ONLY_ONE" }, Identification: { NON_IDENTIFYING: "NON_IDENTIFYING", IDENTIFYING: "IDENTIFYING" }, parseDirective: function(r, i, o) {
+ n0.parseDirective(this, r, i, o);
+}, getConfig: () => Bn().er, addEntity: bCt, addAttributes: function(r, i) {
+ let o, l = bCt(r);
+ for (o = i.length - 1; o >= 0; o--)
+ l.attributes.push(i[o]), _t.debug("Added attribute ", i[o].attributeName);
+}, getEntities: () => Nre, addRelationship: function(r, i, o, l) {
+ let f = { entityA: r, roleA: i, entityB: o, relSpec: l };
+ LOe.push(f), _t.debug("Added new relationship :", f);
+}, getRelationships: () => LOe, clear: function() {
+ Nre = {}, LOe = [], w5();
+}, setAccTitle: k5, getAccTitle: _k, setAccDescription: Ek, getAccDescription: Tk, setDiagramTitle: q9, getDiagramTitle: Y9 }, YS = { 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" }, cO = YS, G9n = function(r, i) {
+ let o;
+ r.append("defs").append("marker").attr("id", YS.ONLY_ONE_START).attr("refX", 0).attr("refY", 9).attr("markerWidth", 18).attr("markerHeight", 18).attr("orient", "auto").append("path").attr("stroke", i.stroke).attr("fill", "none").attr("d", "M9,0 L9,18 M15,0 L15,18"), r.append("defs").append("marker").attr("id", YS.ONLY_ONE_END).attr("refX", 18).attr("refY", 9).attr("markerWidth", 18).attr("markerHeight", 18).attr("orient", "auto").append("path").attr("stroke", i.stroke).attr("fill", "none").attr("d", "M3,0 L3,18 M9,0 L9,18"), o = r.append("defs").append("marker").attr("id", YS.ZERO_OR_ONE_START).attr("refX", 0).attr("refY", 9).attr("markerWidth", 30).attr("markerHeight", 18).attr("orient", "auto"), o.append("circle").attr("stroke", i.stroke).attr("fill", "white").attr("cx", 21).attr("cy", 9).attr("r", 6), o.append("path").attr("stroke", i.stroke).attr("fill", "none").attr("d", "M9,0 L9,18"), o = r.append("defs").append("marker").attr("id", YS.ZERO_OR_ONE_END).attr("refX", 30).attr("refY", 9).attr("markerWidth", 30).attr("markerHeight", 18).attr("orient", "auto"), o.append("circle").attr("stroke", i.stroke).attr("fill", "white").attr("cx", 9).attr("cy", 9).attr("r", 6), o.append("path").attr("stroke", i.stroke).attr("fill", "none").attr("d", "M21,0 L21,18"), r.append("defs").append("marker").attr("id", YS.ONE_OR_MORE_START).attr("refX", 18).attr("refY", 18).attr("markerWidth", 45).attr("markerHeight", 36).attr("orient", "auto").append("path").attr("stroke", i.stroke).attr("fill", "none").attr("d", "M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"), r.append("defs").append("marker").attr("id", YS.ONE_OR_MORE_END).attr("refX", 27).attr("refY", 18).attr("markerWidth", 45).attr("markerHeight", 36).attr("orient", "auto").append("path").attr("stroke", i.stroke).attr("fill", "none").attr("d", "M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"), o = r.append("defs").append("marker").attr("id", YS.ZERO_OR_MORE_START).attr("refX", 18).attr("refY", 18).attr("markerWidth", 57).attr("markerHeight", 36).attr("orient", "auto"), o.append("circle").attr("stroke", i.stroke).attr("fill", "white").attr("cx", 48).attr("cy", 18).attr("r", 6), o.append("path").attr("stroke", i.stroke).attr("fill", "none").attr("d", "M0,18 Q18,0 36,18 Q18,36 0,18"), o = r.append("defs").append("marker").attr("id", YS.ZERO_OR_MORE_END).attr("refX", 39).attr("refY", 18).attr("markerWidth", 57).attr("markerHeight", 36).attr("orient", "auto"), o.append("circle").attr("stroke", i.stroke).attr("fill", "white").attr("cx", 9).attr("cy", 18).attr("r", 6), o.append("path").attr("stroke", i.stroke).attr("fill", "none").attr("d", "M21,18 Q39,0 57,18 Q39,36 21,18");
+}, X9n = /[^\dA-Za-z](\W)*/g;
+let lb = {}, Are = /* @__PURE__ */ new Map();
+const W9n = function(r, i, o) {
+ let l;
+ return Object.keys(i).forEach(function(f) {
+ const g = function(L = "", F = "") {
+ const U = L.replace(X9n, "");
+ return `${wCt(F)}${wCt(U)}${GCn(L, V9n)}`;
+ }(f, "entity");
+ Are.set(f, g);
+ const A = r.append("g").attr("id", g);
+ l = l === void 0 ? g : l;
+ const b = "text-" + g, v = A.append("text").classed("er entityLabel", !0).attr("id", b).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "middle").style("font-family", Bn().fontFamily).style("font-size", lb.fontSize + "px").text(f), { width: k, height: _ } = ((L, F, U) => {
+ const q = lb.entityPadding / 3, Z = lb.entityPadding / 3, R = 0.85 * lb.fontSize, J = F.node().getBBox(), he = [];
+ let Y = !1, ue = !1, le = 0, be = 0, ke = 0, de = 0, Te = J.height + 2 * q, xe = 1;
+ U.forEach((Me) => {
+ Me.attributeKeyTypeList !== void 0 && Me.attributeKeyTypeList.length > 0 && (Y = !0), Me.attributeComment !== void 0 && (ue = !0);
+ }), U.forEach((Me) => {
+ const ve = `${F.node().id}-attr-${xe}`;
+ let ge = 0;
+ const Je = CO(Me.attributeType), ot = L.append("text").classed("er entityLabel", !0).attr("id", `${ve}-type`).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "left").style("font-family", Bn().fontFamily).style("font-size", R + "px").text(Je), bt = L.append("text").classed("er entityLabel", !0).attr("id", `${ve}-name`).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "left").style("font-family", Bn().fontFamily).style("font-size", R + "px").text(Me.attributeName), gt = {};
+ gt.tn = ot, gt.nn = bt;
+ const je = ot.node().getBBox(), Qe = bt.node().getBBox();
+ if (le = Math.max(le, je.width), be = Math.max(be, Qe.width), ge = Math.max(je.height, Qe.height), Y) {
+ const kt = Me.attributeKeyTypeList !== void 0 ? Me.attributeKeyTypeList.join(",") : "", Wt = L.append("text").classed("er entityLabel", !0).attr("id", `${ve}-key`).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "left").style("font-family", Bn().fontFamily).style("font-size", R + "px").text(kt);
+ gt.kn = Wt;
+ const jt = Wt.node().getBBox();
+ ke = Math.max(ke, jt.width), ge = Math.max(ge, jt.height);
+ }
+ if (ue) {
+ const kt = L.append("text").classed("er entityLabel", !0).attr("id", `${ve}-comment`).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "left").style("font-family", Bn().fontFamily).style("font-size", R + "px").text(Me.attributeComment || "");
+ gt.cn = kt;
+ const Wt = kt.node().getBBox();
+ de = Math.max(de, Wt.width), ge = Math.max(ge, Wt.height);
+ }
+ gt.height = ge, he.push(gt), Te += ge + 2 * q, xe += 1;
+ });
+ let ie = 4;
+ Y && (ie += 2), ue && (ie += 2);
+ const Be = le + be + ke + de, te = { width: Math.max(lb.minEntityWidth, Math.max(J.width + 2 * lb.entityPadding, Be + Z * ie)), height: U.length > 0 ? Te : Math.max(lb.minEntityHeight, J.height + 2 * lb.entityPadding) };
+ if (U.length > 0) {
+ const Me = Math.max(0, (te.width - Be - Z * ie) / (ie / 2));
+ F.attr("transform", "translate(" + te.width / 2 + "," + (q + J.height / 2) + ")");
+ let ve = J.height + 2 * q, ge = "attributeBoxOdd";
+ he.forEach((Je) => {
+ const ot = ve + q + Je.height / 2;
+ Je.tn.attr("transform", "translate(" + Z + "," + ot + ")");
+ const bt = L.insert("rect", "#" + Je.tn.node().id).classed(`er ${ge}`, !0).attr("x", 0).attr("y", ve).attr("width", le + 2 * Z + Me).attr("height", Je.height + 2 * q), gt = parseFloat(bt.attr("x")) + parseFloat(bt.attr("width"));
+ Je.nn.attr("transform", "translate(" + (gt + Z) + "," + ot + ")");
+ const je = L.insert("rect", "#" + Je.nn.node().id).classed(`er ${ge}`, !0).attr("x", gt).attr("y", ve).attr("width", be + 2 * Z + Me).attr("height", Je.height + 2 * q);
+ let Qe = parseFloat(je.attr("x")) + parseFloat(je.attr("width"));
+ if (Y) {
+ Je.kn.attr("transform", "translate(" + (Qe + Z) + "," + ot + ")");
+ const kt = L.insert("rect", "#" + Je.kn.node().id).classed(`er ${ge}`, !0).attr("x", Qe).attr("y", ve).attr("width", ke + 2 * Z + Me).attr("height", Je.height + 2 * q);
+ Qe = parseFloat(kt.attr("x")) + parseFloat(kt.attr("width"));
+ }
+ ue && (Je.cn.attr("transform", "translate(" + (Qe + Z) + "," + ot + ")"), L.insert("rect", "#" + Je.cn.node().id).classed(`er ${ge}`, "true").attr("x", Qe).attr("y", ve).attr("width", de + 2 * Z + Me).attr("height", Je.height + 2 * q)), ve += Je.height + 2 * q, ge = ge === "attributeBoxOdd" ? "attributeBoxEven" : "attributeBoxOdd";
+ });
+ } else
+ te.height = Math.max(lb.minEntityHeight, Te), F.attr("transform", "translate(" + te.width / 2 + "," + te.height / 2 + ")");
+ return te;
+ })(A, v, i[f].attributes), T = A.insert("rect", "#" + b).classed("er entityBox", !0).attr("x", 0).attr("y", 0).attr("width", k).attr("height", _).node().getBBox();
+ o.setNode(g, { width: T.width, height: T.height, shape: "rect", id: g });
+ }), l;
+}, vCt = function(r) {
+ return (r.entityA + r.roleA + r.entityB).replace(/\s/g, "");
+};
+let yCt = 0;
+const V9n = "28e9f9db-3c8d-5aa5-9faf-44286ae5937c";
+function wCt(r = "") {
+ return r.length > 0 ? `${r}-` : "";
+}
+const q9n = { setConf: function(r) {
+ const i = Object.keys(r);
+ for (const o of i)
+ lb[o] = r[o];
+}, draw: function(r, i, o, l) {
+ lb = Bn().er, _t.info("Drawing ER diagram");
+ const f = Bn().securityLevel;
+ let g;
+ f === "sandbox" && (g = co("#i" + i));
+ const A = co(f === "sandbox" ? g.nodes()[0].contentDocument.body : "body").select(`[id='${i}']`);
+ let b;
+ G9n(A, lb), b = new ub({ multigraph: !0, directed: !0, compound: !1 }).setGraph({ rankdir: lb.layoutDirection, marginx: 20, marginy: 20, nodesep: 100, edgesep: 100, ranksep: 100 }).setDefaultEdgeLabel(function() {
+ return {};
+ });
+ const v = W9n(A, l.db.getEntities(), b), k = function(U, q) {
+ return U.forEach(function(Z) {
+ q.setEdge(Are.get(Z.entityA), Are.get(Z.entityB), { relationship: Z }, vCt(Z));
+ }), U;
+ }(l.db.getRelationships(), b);
+ Uie(b), function(U, q) {
+ q.nodes().forEach(function(Z) {
+ Z !== void 0 && q.node(Z) !== void 0 && U.select("#" + Z).attr("transform", "translate(" + (q.node(Z).x - q.node(Z).width / 2) + "," + (q.node(Z).y - q.node(Z).height / 2) + " )");
+ });
+ }(A, b), k.forEach(function(U) {
+ (function(q, Z, R, J, he) {
+ yCt++;
+ const Y = R.edge(Are.get(Z.entityA), Are.get(Z.entityB), vCt(Z)), ue = pX().x(function(ie) {
+ return ie.x;
+ }).y(function(ie) {
+ return ie.y;
+ }).curve(Rie), le = q.insert("path", "#" + J).classed("er relationshipLine", !0).attr("d", ue(Y.points)).style("stroke", lb.stroke).style("fill", "none");
+ Z.relSpec.relType === he.db.Identification.NON_IDENTIFYING && le.attr("stroke-dasharray", "8,8");
+ let be = "";
+ switch (lb.arrowMarkerAbsolute && (be = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, be = be.replace(/\(/g, "\\("), be = be.replace(/\)/g, "\\)")), Z.relSpec.cardA) {
+ case he.db.Cardinality.ZERO_OR_ONE:
+ le.attr("marker-end", "url(" + be + "#" + cO.ZERO_OR_ONE_END + ")");
+ break;
+ case he.db.Cardinality.ZERO_OR_MORE:
+ le.attr("marker-end", "url(" + be + "#" + cO.ZERO_OR_MORE_END + ")");
+ break;
+ case he.db.Cardinality.ONE_OR_MORE:
+ le.attr("marker-end", "url(" + be + "#" + cO.ONE_OR_MORE_END + ")");
+ break;
+ case he.db.Cardinality.ONLY_ONE:
+ le.attr("marker-end", "url(" + be + "#" + cO.ONLY_ONE_END + ")");
+ }
+ switch (Z.relSpec.cardB) {
+ case he.db.Cardinality.ZERO_OR_ONE:
+ le.attr("marker-start", "url(" + be + "#" + cO.ZERO_OR_ONE_START + ")");
+ break;
+ case he.db.Cardinality.ZERO_OR_MORE:
+ le.attr("marker-start", "url(" + be + "#" + cO.ZERO_OR_MORE_START + ")");
+ break;
+ case he.db.Cardinality.ONE_OR_MORE:
+ le.attr("marker-start", "url(" + be + "#" + cO.ONE_OR_MORE_START + ")");
+ break;
+ case he.db.Cardinality.ONLY_ONE:
+ le.attr("marker-start", "url(" + be + "#" + cO.ONLY_ONE_START + ")");
+ }
+ const ke = le.node().getTotalLength(), de = le.node().getPointAtLength(0.5 * ke), Te = "rel" + yCt, xe = q.append("text").classed("er relationshipLabel", !0).attr("id", Te).attr("x", de.x).attr("y", de.y).style("text-anchor", "middle").style("dominant-baseline", "middle").style("font-family", Bn().fontFamily).style("font-size", lb.fontSize + "px").text(Z.roleA).node().getBBox();
+ q.insert("rect", "#" + Te).classed("er relationshipLabelBox", !0).attr("x", de.x - xe.width / 2).attr("y", de.y - xe.height / 2).attr("width", xe.width).attr("height", xe.height);
+ })(A, U, b, v, l);
+ });
+ const _ = lb.diagramPadding;
+ Tl.insertTitle(A, "entityTitleText", lb.titleTopMargin, l.db.getDiagramTitle());
+ const T = A.node().getBBox(), L = T.width + 2 * _, F = T.height + 2 * _;
+ V9(A, F, L, lb.useMaxWidth), A.attr("viewBox", `${T.x - _} ${T.y - _} ${L} ${F}`);
+} };
+var XNe = function() {
+ var r, i = function(ra, Ls, pr, Pr) {
+ for (pr = pr || {}, Pr = ra.length; Pr--; pr[ra[Pr]] = Ls)
+ ;
+ return pr;
+ }, o = [1, 9], l = [1, 7], f = [1, 6], g = [1, 8], A = [1, 20, 21, 22, 23, 38, 44, 46, 48, 52, 66, 67, 86, 87, 88, 89, 90, 91, 95, 105, 106, 109, 111, 112, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127], b = [2, 10], v = [1, 20], k = [1, 21], _ = [1, 22], T = [1, 23], L = [1, 30], F = [1, 32], U = [1, 33], q = [1, 34], Z = [1, 62], R = [1, 48], J = [1, 52], he = [1, 36], Y = [1, 37], ue = [1, 38], le = [1, 39], be = [1, 40], ke = [1, 56], de = [1, 63], Te = [1, 51], xe = [1, 53], ie = [1, 55], Be = [1, 59], te = [1, 60], Me = [1, 41], ve = [1, 42], ge = [1, 43], Je = [1, 44], ot = [1, 61], bt = [1, 50], gt = [1, 54], je = [1, 57], Qe = [1, 58], kt = [1, 49], Wt = [1, 66], jt = [1, 71], Zn = [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], Ft = [1, 75], wn = [1, 74], un = [1, 76], ln = [20, 21, 23, 81, 82], an = [1, 99], Ot = [1, 104], $n = [1, 107], pt = [1, 108], Ci = [1, 101], ut = [1, 106], br = [1, 109], zt = [1, 102], Wr = [1, 114], zr = [1, 113], Si = [1, 103], vr = [1, 105], Qr = [1, 110], or = [1, 111], Gr = [1, 112], An = [1, 115], _i = [20, 21, 22, 23, 81, 82], Cr = [20, 21, 22, 23, 53, 81, 82], la = [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], Ra = [20, 21, 23], Jo = [20, 21, 23, 52, 66, 67, 81, 82, 91, 95, 105, 106, 109, 111, 112, 122, 123, 124, 125, 126, 127], Cc = [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], ji = [52, 66, 67, 91, 95, 105, 106, 109, 111, 112, 122, 123, 124, 125, 126, 127], Ya = [1, 149], Hr = [1, 157], Yr = [1, 158], ni = [1, 159], Vr = [1, 160], Na = [1, 144], er = [1, 145], as = [1, 141], xr = [1, 152], So = [1, 153], cs = [1, 154], xa = [1, 155], ro = [1, 156], Lo = [1, 161], Xo = [1, 162], Zo = [1, 147], Fs = [1, 150], Hs = [1, 146], Qa = [1, 143], Ff = [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], Oc = [1, 165], Iu = [20, 21, 22, 23, 26, 52, 66, 67, 91, 105, 106, 109, 111, 112, 122, 123, 124, 125, 126, 127], da = [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], _c = [12, 21, 22, 24], qf = [22, 106], wu = [1, 250], jo = [1, 245], yf = [1, 246], bl = [1, 254], cu = [1, 251], qc = [1, 248], Jl = [1, 247], js = [1, 249], Dc = [1, 252], gs = [1, 253], rc = [1, 255], Ki = [1, 273], Ta = [20, 21, 23, 106], Bl = [20, 21, 22, 23, 66, 67, 86, 102, 105, 106, 109, 110, 111, 112, 113], sf = { 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(ra, Ls, pr, Pr, Wo, hn, wf) {
+ var Sn = hn.length - 1;
+ switch (Wo) {
+ case 5:
+ Pr.parseDirective("%%{", "open_directive");
+ break;
+ case 6:
+ Pr.parseDirective(hn[Sn], "type_directive");
+ break;
+ case 7:
+ hn[Sn] = hn[Sn].trim().replace(/'/g, '"'), Pr.parseDirective(hn[Sn], "arg_directive");
+ break;
+ case 8:
+ Pr.parseDirective("}%%", "close_directive", "flowchart");
+ break;
+ case 10:
+ case 36:
+ case 37:
+ case 38:
+ case 39:
+ case 40:
+ this.$ = [];
+ break;
+ case 11:
+ (!Array.isArray(hn[Sn]) || hn[Sn].length > 0) && hn[Sn - 1].push(hn[Sn]), this.$ = hn[Sn - 1];
+ break;
+ case 12:
+ case 82:
+ case 84:
+ case 96:
+ case 152:
+ case 154:
+ case 155:
+ case 78:
+ case 150:
+ this.$ = hn[Sn];
+ break;
+ case 19:
+ Pr.setDirection("TB"), this.$ = "TB";
+ break;
+ case 20:
+ Pr.setDirection(hn[Sn - 1]), this.$ = hn[Sn - 1];
+ break;
+ case 35:
+ this.$ = hn[Sn - 1].nodes;
+ break;
+ case 41:
+ this.$ = Pr.addSubGraph(hn[Sn - 6], hn[Sn - 1], hn[Sn - 4]);
+ break;
+ case 42:
+ this.$ = Pr.addSubGraph(hn[Sn - 3], hn[Sn - 1], hn[Sn - 3]);
+ break;
+ case 43:
+ this.$ = Pr.addSubGraph(void 0, hn[Sn - 1], void 0);
+ break;
+ case 45:
+ this.$ = hn[Sn].trim(), Pr.setAccTitle(this.$);
+ break;
+ case 46:
+ case 47:
+ this.$ = hn[Sn].trim(), Pr.setAccDescription(this.$);
+ break;
+ case 51:
+ Pr.addLink(hn[Sn - 2].stmt, hn[Sn], hn[Sn - 1]), this.$ = { stmt: hn[Sn], nodes: hn[Sn].concat(hn[Sn - 2].nodes) };
+ break;
+ case 52:
+ Pr.addLink(hn[Sn - 3].stmt, hn[Sn - 1], hn[Sn - 2]), this.$ = { stmt: hn[Sn - 1], nodes: hn[Sn - 1].concat(hn[Sn - 3].nodes) };
+ break;
+ case 53:
+ this.$ = { stmt: hn[Sn - 1], nodes: hn[Sn - 1] };
+ break;
+ case 54:
+ this.$ = { stmt: hn[Sn], nodes: hn[Sn] };
+ break;
+ case 55:
+ case 123:
+ case 125:
+ this.$ = [hn[Sn]];
+ break;
+ case 56:
+ this.$ = hn[Sn - 4].concat(hn[Sn]);
+ break;
+ case 57:
+ this.$ = [hn[Sn - 2]], Pr.setClass(hn[Sn - 2], hn[Sn]);
+ break;
+ case 58:
+ this.$ = hn[Sn - 3], Pr.addVertex(hn[Sn - 3], hn[Sn - 1], "square");
+ break;
+ case 59:
+ this.$ = hn[Sn - 3], Pr.addVertex(hn[Sn - 3], hn[Sn - 1], "doublecircle");
+ break;
+ case 60:
+ this.$ = hn[Sn - 5], Pr.addVertex(hn[Sn - 5], hn[Sn - 2], "circle");
+ break;
+ case 61:
+ this.$ = hn[Sn - 3], Pr.addVertex(hn[Sn - 3], hn[Sn - 1], "ellipse");
+ break;
+ case 62:
+ this.$ = hn[Sn - 3], Pr.addVertex(hn[Sn - 3], hn[Sn - 1], "stadium");
+ break;
+ case 63:
+ this.$ = hn[Sn - 3], Pr.addVertex(hn[Sn - 3], hn[Sn - 1], "subroutine");
+ break;
+ case 64:
+ this.$ = hn[Sn - 7], Pr.addVertex(hn[Sn - 7], hn[Sn - 1], "rect", void 0, void 0, void 0, Object.fromEntries([[hn[Sn - 5], hn[Sn - 3]]]));
+ break;
+ case 65:
+ this.$ = hn[Sn - 3], Pr.addVertex(hn[Sn - 3], hn[Sn - 1], "cylinder");
+ break;
+ case 66:
+ this.$ = hn[Sn - 3], Pr.addVertex(hn[Sn - 3], hn[Sn - 1], "round");
+ break;
+ case 67:
+ this.$ = hn[Sn - 3], Pr.addVertex(hn[Sn - 3], hn[Sn - 1], "diamond");
+ break;
+ case 68:
+ this.$ = hn[Sn - 5], Pr.addVertex(hn[Sn - 5], hn[Sn - 2], "hexagon");
+ break;
+ case 69:
+ this.$ = hn[Sn - 3], Pr.addVertex(hn[Sn - 3], hn[Sn - 1], "odd");
+ break;
+ case 70:
+ this.$ = hn[Sn - 3], Pr.addVertex(hn[Sn - 3], hn[Sn - 1], "trapezoid");
+ break;
+ case 71:
+ this.$ = hn[Sn - 3], Pr.addVertex(hn[Sn - 3], hn[Sn - 1], "inv_trapezoid");
+ break;
+ case 72:
+ this.$ = hn[Sn - 3], Pr.addVertex(hn[Sn - 3], hn[Sn - 1], "lean_right");
+ break;
+ case 73:
+ this.$ = hn[Sn - 3], Pr.addVertex(hn[Sn - 3], hn[Sn - 1], "lean_left");
+ break;
+ case 74:
+ this.$ = hn[Sn], Pr.addVertex(hn[Sn]);
+ break;
+ case 75:
+ hn[Sn - 1].text = hn[Sn], this.$ = hn[Sn - 1];
+ break;
+ case 76:
+ case 77:
+ hn[Sn - 2].text = hn[Sn - 1], this.$ = hn[Sn - 2];
+ break;
+ case 79:
+ var Nc = Pr.destructLink(hn[Sn], hn[Sn - 2]);
+ this.$ = { type: Nc.type, stroke: Nc.stroke, length: Nc.length, text: hn[Sn - 1] };
+ break;
+ case 80:
+ Nc = Pr.destructLink(hn[Sn]), this.$ = { type: Nc.type, stroke: Nc.stroke, length: Nc.length };
+ break;
+ case 81:
+ this.$ = hn[Sn - 1];
+ break;
+ case 83:
+ case 97:
+ case 153:
+ case 151:
+ this.$ = hn[Sn - 1] + "" + hn[Sn];
+ break;
+ case 98:
+ case 99:
+ this.$ = hn[Sn - 4], Pr.addClass(hn[Sn - 2], hn[Sn]);
+ break;
+ case 100:
+ this.$ = hn[Sn - 4], Pr.setClass(hn[Sn - 2], hn[Sn]);
+ break;
+ case 101:
+ case 109:
+ this.$ = hn[Sn - 1], Pr.setClickEvent(hn[Sn - 1], hn[Sn]);
+ break;
+ case 102:
+ case 110:
+ this.$ = hn[Sn - 3], Pr.setClickEvent(hn[Sn - 3], hn[Sn - 2]), Pr.setTooltip(hn[Sn - 3], hn[Sn]);
+ break;
+ case 103:
+ this.$ = hn[Sn - 2], Pr.setClickEvent(hn[Sn - 2], hn[Sn - 1], hn[Sn]);
+ break;
+ case 104:
+ this.$ = hn[Sn - 4], Pr.setClickEvent(hn[Sn - 4], hn[Sn - 3], hn[Sn - 2]), Pr.setTooltip(hn[Sn - 4], hn[Sn]);
+ break;
+ case 105:
+ case 111:
+ this.$ = hn[Sn - 1], Pr.setLink(hn[Sn - 1], hn[Sn]);
+ break;
+ case 106:
+ case 112:
+ this.$ = hn[Sn - 3], Pr.setLink(hn[Sn - 3], hn[Sn - 2]), Pr.setTooltip(hn[Sn - 3], hn[Sn]);
+ break;
+ case 107:
+ case 113:
+ this.$ = hn[Sn - 3], Pr.setLink(hn[Sn - 3], hn[Sn - 2], hn[Sn]);
+ break;
+ case 108:
+ case 114:
+ this.$ = hn[Sn - 5], Pr.setLink(hn[Sn - 5], hn[Sn - 4], hn[Sn]), Pr.setTooltip(hn[Sn - 5], hn[Sn - 2]);
+ break;
+ case 115:
+ this.$ = hn[Sn - 4], Pr.addVertex(hn[Sn - 2], void 0, void 0, hn[Sn]);
+ break;
+ case 116:
+ case 118:
+ this.$ = hn[Sn - 4], Pr.updateLink(hn[Sn - 2], hn[Sn]);
+ break;
+ case 117:
+ this.$ = hn[Sn - 4], Pr.updateLink([hn[Sn - 2]], hn[Sn]);
+ break;
+ case 119:
+ this.$ = hn[Sn - 8], Pr.updateLinkInterpolate([hn[Sn - 6]], hn[Sn - 2]), Pr.updateLink([hn[Sn - 6]], hn[Sn]);
+ break;
+ case 120:
+ this.$ = hn[Sn - 8], Pr.updateLinkInterpolate(hn[Sn - 6], hn[Sn - 2]), Pr.updateLink(hn[Sn - 6], hn[Sn]);
+ break;
+ case 121:
+ this.$ = hn[Sn - 6], Pr.updateLinkInterpolate([hn[Sn - 4]], hn[Sn]);
+ break;
+ case 122:
+ this.$ = hn[Sn - 6], Pr.updateLinkInterpolate(hn[Sn - 4], hn[Sn]);
+ break;
+ case 124:
+ case 126:
+ hn[Sn - 2].push(hn[Sn]), this.$ = hn[Sn - 2];
+ break;
+ case 128:
+ this.$ = hn[Sn - 1] + hn[Sn];
+ 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" };
+ }
+ }, table: [{ 3: 1, 4: 2, 5: 3, 6: 5, 12: o, 16: 4, 21: l, 22: f, 24: g }, { 1: [3] }, { 1: [2, 1] }, { 3: 10, 4: 2, 5: 3, 6: 5, 12: o, 16: 4, 21: l, 22: f, 24: g }, i(A, b, { 17: 11 }), { 7: 12, 13: [1, 13] }, { 16: 14, 21: l, 22: f, 24: g }, { 16: 15, 21: l, 22: f, 24: g }, { 25: [1, 16], 26: [1, 17] }, { 13: [2, 5] }, { 1: [2, 2] }, { 1: [2, 9], 18: 18, 19: 19, 20: v, 21: k, 22: _, 23: T, 32: 24, 33: 25, 34: 26, 35: 27, 36: 28, 37: 29, 38: L, 43: 31, 44: F, 46: U, 48: q, 50: 35, 51: 45, 52: Z, 54: 46, 66: R, 67: J, 86: he, 87: Y, 88: ue, 89: le, 90: be, 91: ke, 95: de, 105: Te, 106: xe, 109: ie, 111: Be, 112: te, 116: 47, 118: Me, 119: ve, 120: ge, 121: Je, 122: ot, 123: bt, 124: gt, 125: je, 126: Qe, 127: kt }, { 8: 64, 10: [1, 65], 15: Wt }, i([10, 15], [2, 6]), i(A, [2, 17]), i(A, [2, 18]), i(A, [2, 19]), { 20: [1, 68], 21: [1, 69], 22: jt, 27: 67, 30: 70 }, i(Zn, [2, 11]), i(Zn, [2, 12]), i(Zn, [2, 13]), i(Zn, [2, 14]), i(Zn, [2, 15]), i(Zn, [2, 16]), { 9: 72, 20: Ft, 21: wn, 23: un, 49: 73, 78: 77, 81: [1, 78], 82: [1, 79] }, { 9: 80, 20: Ft, 21: wn, 23: un }, { 9: 81, 20: Ft, 21: wn, 23: un }, { 9: 82, 20: Ft, 21: wn, 23: un }, { 9: 83, 20: Ft, 21: wn, 23: un }, { 9: 84, 20: Ft, 21: wn, 23: un }, { 9: 86, 20: Ft, 21: wn, 22: [1, 85], 23: un }, i(Zn, [2, 44]), { 45: [1, 87] }, { 47: [1, 88] }, i(Zn, [2, 47]), i(ln, [2, 54], { 30: 89, 22: jt }), { 22: [1, 90] }, { 22: [1, 91] }, { 22: [1, 92] }, { 22: [1, 93] }, { 26: an, 52: Ot, 66: $n, 67: pt, 84: [1, 97], 91: Ci, 97: 96, 98: [1, 94], 100: [1, 95], 105: ut, 106: br, 109: zt, 111: Wr, 112: zr, 115: 100, 117: 98, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }, i(Zn, [2, 158]), i(Zn, [2, 159]), i(Zn, [2, 160]), i(Zn, [2, 161]), i(_i, [2, 55], { 53: [1, 116] }), i(Cr, [2, 74], { 116: 129, 40: [1, 117], 52: Z, 55: [1, 118], 57: [1, 119], 59: [1, 120], 61: [1, 121], 63: [1, 122], 65: [1, 123], 66: R, 67: J, 69: [1, 124], 71: [1, 125], 73: [1, 126], 74: [1, 127], 76: [1, 128], 91: ke, 95: de, 105: Te, 106: xe, 109: ie, 111: Be, 112: te, 122: ot, 123: bt, 124: gt, 125: je, 126: Qe, 127: kt }), i(la, [2, 150]), i(la, [2, 175]), i(la, [2, 176]), i(la, [2, 177]), i(la, [2, 178]), i(la, [2, 179]), i(la, [2, 180]), i(la, [2, 181]), i(la, [2, 182]), i(la, [2, 183]), i(la, [2, 184]), i(la, [2, 185]), i(la, [2, 186]), i(la, [2, 187]), i(la, [2, 188]), i(la, [2, 189]), i(la, [2, 190]), { 9: 130, 20: Ft, 21: wn, 23: un }, { 11: 131, 14: [1, 132] }, i(Ra, [2, 8]), i(A, [2, 20]), i(A, [2, 26]), i(A, [2, 27]), { 21: [1, 133] }, i(Jo, [2, 34], { 30: 134, 22: jt }), i(Zn, [2, 35]), { 50: 135, 51: 45, 52: Z, 54: 46, 66: R, 67: J, 91: ke, 95: de, 105: Te, 106: xe, 109: ie, 111: Be, 112: te, 116: 47, 122: ot, 123: bt, 124: gt, 125: je, 126: Qe, 127: kt }, i(Cc, [2, 48]), i(Cc, [2, 49]), i(Cc, [2, 50]), i(ji, [2, 78], { 79: 136, 68: [1, 138], 80: [1, 137] }), { 22: Ya, 24: Hr, 26: Yr, 38: ni, 39: 139, 42: Vr, 52: Ot, 66: $n, 67: pt, 73: Na, 81: er, 83: 140, 84: as, 85: 151, 86: xr, 87: So, 88: cs, 89: xa, 90: ro, 91: Lo, 92: Xo, 94: 142, 95: Zo, 105: ut, 106: br, 109: Fs, 111: Wr, 112: zr, 113: Hs, 114: Qa, 115: 148, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }, i([52, 66, 67, 68, 80, 91, 95, 105, 106, 109, 111, 112, 122, 123, 124, 125, 126, 127], [2, 80]), i(Zn, [2, 36]), i(Zn, [2, 37]), i(Zn, [2, 38]), i(Zn, [2, 39]), i(Zn, [2, 40]), { 22: Ya, 24: Hr, 26: Yr, 38: ni, 39: 163, 42: Vr, 52: Ot, 66: $n, 67: pt, 73: Na, 81: er, 83: 140, 84: as, 85: 151, 86: xr, 87: So, 88: cs, 89: xa, 90: ro, 91: Lo, 92: Xo, 94: 142, 95: Zo, 105: ut, 106: br, 109: Fs, 111: Wr, 112: zr, 113: Hs, 114: Qa, 115: 148, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }, i(Ff, b, { 17: 164 }), i(Zn, [2, 45]), i(Zn, [2, 46]), i(ln, [2, 53], { 52: Oc }), { 26: an, 52: Ot, 66: $n, 67: pt, 91: Ci, 97: 166, 102: [1, 167], 105: ut, 106: br, 109: zt, 111: Wr, 112: zr, 115: 100, 117: 98, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }, { 95: [1, 168], 103: 169, 105: [1, 170] }, { 26: an, 52: Ot, 66: $n, 67: pt, 91: Ci, 95: [1, 171], 97: 172, 105: ut, 106: br, 109: zt, 111: Wr, 112: zr, 115: 100, 117: 98, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }, { 26: an, 52: Ot, 66: $n, 67: pt, 91: Ci, 97: 173, 105: ut, 106: br, 109: zt, 111: Wr, 112: zr, 115: 100, 117: 98, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }, i(Ra, [2, 101], { 22: [1, 174], 99: [1, 175] }), i(Ra, [2, 105], { 22: [1, 176] }), i(Ra, [2, 109], { 115: 100, 117: 178, 22: [1, 177], 26: an, 52: Ot, 66: $n, 67: pt, 91: Ci, 105: ut, 106: br, 109: zt, 111: Wr, 112: zr, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }), i(Ra, [2, 111], { 22: [1, 179] }), i(Iu, [2, 152]), i(Iu, [2, 154]), i(Iu, [2, 155]), i(Iu, [2, 156]), i(Iu, [2, 157]), i(da, [2, 162]), i(da, [2, 163]), i(da, [2, 164]), i(da, [2, 165]), i(da, [2, 166]), i(da, [2, 167]), i(da, [2, 168]), i(da, [2, 169]), i(da, [2, 170]), i(da, [2, 171]), i(da, [2, 172]), i(da, [2, 173]), i(da, [2, 174]), { 52: Z, 54: 180, 66: R, 67: J, 91: ke, 95: de, 105: Te, 106: xe, 109: ie, 111: Be, 112: te, 116: 47, 122: ot, 123: bt, 124: gt, 125: je, 126: Qe, 127: kt }, { 22: Ya, 24: Hr, 26: Yr, 38: ni, 39: 181, 42: Vr, 52: Ot, 66: $n, 67: pt, 73: Na, 81: er, 83: 140, 84: as, 85: 151, 86: xr, 87: So, 88: cs, 89: xa, 90: ro, 91: Lo, 92: Xo, 94: 142, 95: Zo, 105: ut, 106: br, 109: Fs, 111: Wr, 112: zr, 113: Hs, 114: Qa, 115: 148, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }, { 22: Ya, 24: Hr, 26: Yr, 38: ni, 39: 182, 42: Vr, 52: Ot, 66: $n, 67: pt, 73: Na, 81: er, 83: 140, 84: as, 85: 151, 86: xr, 87: So, 88: cs, 89: xa, 90: ro, 91: Lo, 92: Xo, 94: 142, 95: Zo, 105: ut, 106: br, 109: Fs, 111: Wr, 112: zr, 113: Hs, 114: Qa, 115: 148, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }, { 22: Ya, 24: Hr, 26: Yr, 38: ni, 39: 184, 42: Vr, 52: Ot, 57: [1, 183], 66: $n, 67: pt, 73: Na, 81: er, 83: 140, 84: as, 85: 151, 86: xr, 87: So, 88: cs, 89: xa, 90: ro, 91: Lo, 92: Xo, 94: 142, 95: Zo, 105: ut, 106: br, 109: Fs, 111: Wr, 112: zr, 113: Hs, 114: Qa, 115: 148, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }, { 22: Ya, 24: Hr, 26: Yr, 38: ni, 39: 185, 42: Vr, 52: Ot, 66: $n, 67: pt, 73: Na, 81: er, 83: 140, 84: as, 85: 151, 86: xr, 87: So, 88: cs, 89: xa, 90: ro, 91: Lo, 92: Xo, 94: 142, 95: Zo, 105: ut, 106: br, 109: Fs, 111: Wr, 112: zr, 113: Hs, 114: Qa, 115: 148, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }, { 22: Ya, 24: Hr, 26: Yr, 38: ni, 39: 186, 42: Vr, 52: Ot, 66: $n, 67: pt, 73: Na, 81: er, 83: 140, 84: as, 85: 151, 86: xr, 87: So, 88: cs, 89: xa, 90: ro, 91: Lo, 92: Xo, 94: 142, 95: Zo, 105: ut, 106: br, 109: Fs, 111: Wr, 112: zr, 113: Hs, 114: Qa, 115: 148, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }, { 22: Ya, 24: Hr, 26: Yr, 38: ni, 39: 187, 42: Vr, 52: Ot, 66: $n, 67: pt, 73: Na, 81: er, 83: 140, 84: as, 85: 151, 86: xr, 87: So, 88: cs, 89: xa, 90: ro, 91: Lo, 92: Xo, 94: 142, 95: Zo, 105: ut, 106: br, 109: Fs, 111: Wr, 112: zr, 113: Hs, 114: Qa, 115: 148, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }, { 66: [1, 188] }, { 22: Ya, 24: Hr, 26: Yr, 38: ni, 39: 189, 42: Vr, 52: Ot, 66: $n, 67: pt, 73: Na, 81: er, 83: 140, 84: as, 85: 151, 86: xr, 87: So, 88: cs, 89: xa, 90: ro, 91: Lo, 92: Xo, 94: 142, 95: Zo, 105: ut, 106: br, 109: Fs, 111: Wr, 112: zr, 113: Hs, 114: Qa, 115: 148, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }, { 22: Ya, 24: Hr, 26: Yr, 38: ni, 39: 190, 42: Vr, 52: Ot, 66: $n, 67: pt, 71: [1, 191], 73: Na, 81: er, 83: 140, 84: as, 85: 151, 86: xr, 87: So, 88: cs, 89: xa, 90: ro, 91: Lo, 92: Xo, 94: 142, 95: Zo, 105: ut, 106: br, 109: Fs, 111: Wr, 112: zr, 113: Hs, 114: Qa, 115: 148, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }, { 22: Ya, 24: Hr, 26: Yr, 38: ni, 39: 192, 42: Vr, 52: Ot, 66: $n, 67: pt, 73: Na, 81: er, 83: 140, 84: as, 85: 151, 86: xr, 87: So, 88: cs, 89: xa, 90: ro, 91: Lo, 92: Xo, 94: 142, 95: Zo, 105: ut, 106: br, 109: Fs, 111: Wr, 112: zr, 113: Hs, 114: Qa, 115: 148, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }, { 22: Ya, 24: Hr, 26: Yr, 38: ni, 39: 193, 42: Vr, 52: Ot, 66: $n, 67: pt, 73: Na, 81: er, 83: 140, 84: as, 85: 151, 86: xr, 87: So, 88: cs, 89: xa, 90: ro, 91: Lo, 92: Xo, 94: 142, 95: Zo, 105: ut, 106: br, 109: Fs, 111: Wr, 112: zr, 113: Hs, 114: Qa, 115: 148, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }, { 22: Ya, 24: Hr, 26: Yr, 38: ni, 39: 194, 42: Vr, 52: Ot, 66: $n, 67: pt, 73: Na, 81: er, 83: 140, 84: as, 85: 151, 86: xr, 87: So, 88: cs, 89: xa, 90: ro, 91: Lo, 92: Xo, 94: 142, 95: Zo, 105: ut, 106: br, 109: Fs, 111: Wr, 112: zr, 113: Hs, 114: Qa, 115: 148, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }, i(la, [2, 151]), i(_c, [2, 3]), { 8: 195, 15: Wt }, { 15: [2, 7] }, i(A, [2, 28]), i(Jo, [2, 33]), i(ln, [2, 51], { 30: 196, 22: jt }), i(ji, [2, 75], { 22: [1, 197] }), { 22: [1, 198] }, { 22: Ya, 24: Hr, 26: Yr, 38: ni, 39: 199, 42: Vr, 52: Ot, 66: $n, 67: pt, 73: Na, 81: er, 83: 140, 84: as, 85: 151, 86: xr, 87: So, 88: cs, 89: xa, 90: ro, 91: Lo, 92: Xo, 94: 142, 95: Zo, 105: ut, 106: br, 109: Fs, 111: Wr, 112: zr, 113: Hs, 114: Qa, 115: 148, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }, { 22: Ya, 24: Hr, 26: Yr, 38: ni, 42: Vr, 52: Ot, 66: $n, 67: pt, 73: Na, 81: er, 82: [1, 200], 83: 201, 85: 151, 86: xr, 87: So, 88: cs, 89: xa, 90: ro, 91: Lo, 92: Xo, 94: 142, 95: Zo, 105: ut, 106: br, 109: Fs, 111: Wr, 112: zr, 113: Hs, 114: Qa, 115: 148, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }, i(da, [2, 82]), i(da, [2, 84]), i(da, [2, 140]), i(da, [2, 141]), i(da, [2, 142]), i(da, [2, 143]), i(da, [2, 144]), i(da, [2, 145]), i(da, [2, 146]), i(da, [2, 147]), i(da, [2, 148]), i(da, [2, 149]), i(da, [2, 85]), i(da, [2, 86]), i(da, [2, 87]), i(da, [2, 88]), i(da, [2, 89]), i(da, [2, 90]), i(da, [2, 91]), i(da, [2, 92]), i(da, [2, 93]), i(da, [2, 94]), i(da, [2, 95]), { 9: 203, 20: Ft, 21: wn, 22: Ya, 23: un, 24: Hr, 26: Yr, 38: ni, 40: [1, 202], 42: Vr, 52: Ot, 66: $n, 67: pt, 73: Na, 81: er, 83: 201, 85: 151, 86: xr, 87: So, 88: cs, 89: xa, 90: ro, 91: Lo, 92: Xo, 94: 142, 95: Zo, 105: ut, 106: br, 109: Fs, 111: Wr, 112: zr, 113: Hs, 114: Qa, 115: 148, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }, { 18: 18, 19: 19, 20: v, 21: k, 22: _, 23: T, 32: 24, 33: 25, 34: 26, 35: 27, 36: 28, 37: 29, 38: L, 42: [1, 204], 43: 31, 44: F, 46: U, 48: q, 50: 35, 51: 45, 52: Z, 54: 46, 66: R, 67: J, 86: he, 87: Y, 88: ue, 89: le, 90: be, 91: ke, 95: de, 105: Te, 106: xe, 109: ie, 111: Be, 112: te, 116: 47, 118: Me, 119: ve, 120: ge, 121: Je, 122: ot, 123: bt, 124: gt, 125: je, 126: Qe, 127: kt }, { 22: jt, 30: 205 }, { 22: [1, 206], 26: an, 52: Ot, 66: $n, 67: pt, 91: Ci, 105: ut, 106: br, 109: zt, 111: Wr, 112: zr, 115: 100, 117: 178, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }, { 22: [1, 207] }, { 22: [1, 208] }, { 22: [1, 209], 106: [1, 210] }, i(qf, [2, 123]), { 22: [1, 211] }, { 22: [1, 212], 26: an, 52: Ot, 66: $n, 67: pt, 91: Ci, 105: ut, 106: br, 109: zt, 111: Wr, 112: zr, 115: 100, 117: 178, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }, { 22: [1, 213], 26: an, 52: Ot, 66: $n, 67: pt, 91: Ci, 105: ut, 106: br, 109: zt, 111: Wr, 112: zr, 115: 100, 117: 178, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }, { 84: [1, 214] }, i(Ra, [2, 103], { 22: [1, 215] }), { 84: [1, 216], 101: [1, 217] }, { 84: [1, 218] }, i(Iu, [2, 153]), { 84: [1, 219], 101: [1, 220] }, i(_i, [2, 57], { 116: 129, 52: Z, 66: R, 67: J, 91: ke, 95: de, 105: Te, 106: xe, 109: ie, 111: Be, 112: te, 122: ot, 123: bt, 124: gt, 125: je, 126: Qe, 127: kt }), { 22: Ya, 24: Hr, 26: Yr, 38: ni, 41: [1, 221], 42: Vr, 52: Ot, 66: $n, 67: pt, 73: Na, 81: er, 83: 201, 85: 151, 86: xr, 87: So, 88: cs, 89: xa, 90: ro, 91: Lo, 92: Xo, 94: 142, 95: Zo, 105: ut, 106: br, 109: Fs, 111: Wr, 112: zr, 113: Hs, 114: Qa, 115: 148, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }, { 22: Ya, 24: Hr, 26: Yr, 38: ni, 42: Vr, 52: Ot, 56: [1, 222], 66: $n, 67: pt, 73: Na, 81: er, 83: 201, 85: 151, 86: xr, 87: So, 88: cs, 89: xa, 90: ro, 91: Lo, 92: Xo, 94: 142, 95: Zo, 105: ut, 106: br, 109: Fs, 111: Wr, 112: zr, 113: Hs, 114: Qa, 115: 148, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }, { 22: Ya, 24: Hr, 26: Yr, 38: ni, 39: 223, 42: Vr, 52: Ot, 66: $n, 67: pt, 73: Na, 81: er, 83: 140, 84: as, 85: 151, 86: xr, 87: So, 88: cs, 89: xa, 90: ro, 91: Lo, 92: Xo, 94: 142, 95: Zo, 105: ut, 106: br, 109: Fs, 111: Wr, 112: zr, 113: Hs, 114: Qa, 115: 148, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }, { 22: Ya, 24: Hr, 26: Yr, 38: ni, 42: Vr, 52: Ot, 58: [1, 224], 66: $n, 67: pt, 73: Na, 81: er, 83: 201, 85: 151, 86: xr, 87: So, 88: cs, 89: xa, 90: ro, 91: Lo, 92: Xo, 94: 142, 95: Zo, 105: ut, 106: br, 109: Fs, 111: Wr, 112: zr, 113: Hs, 114: Qa, 115: 148, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }, { 22: Ya, 24: Hr, 26: Yr, 38: ni, 42: Vr, 52: Ot, 60: [1, 225], 66: $n, 67: pt, 73: Na, 81: er, 83: 201, 85: 151, 86: xr, 87: So, 88: cs, 89: xa, 90: ro, 91: Lo, 92: Xo, 94: 142, 95: Zo, 105: ut, 106: br, 109: Fs, 111: Wr, 112: zr, 113: Hs, 114: Qa, 115: 148, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }, { 22: Ya, 24: Hr, 26: Yr, 38: ni, 42: Vr, 52: Ot, 62: [1, 226], 66: $n, 67: pt, 73: Na, 81: er, 83: 201, 85: 151, 86: xr, 87: So, 88: cs, 89: xa, 90: ro, 91: Lo, 92: Xo, 94: 142, 95: Zo, 105: ut, 106: br, 109: Fs, 111: Wr, 112: zr, 113: Hs, 114: Qa, 115: 148, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }, { 22: Ya, 24: Hr, 26: Yr, 38: ni, 42: Vr, 52: Ot, 64: [1, 227], 66: $n, 67: pt, 73: Na, 81: er, 83: 201, 85: 151, 86: xr, 87: So, 88: cs, 89: xa, 90: ro, 91: Lo, 92: Xo, 94: 142, 95: Zo, 105: ut, 106: br, 109: Fs, 111: Wr, 112: zr, 113: Hs, 114: Qa, 115: 148, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }, { 67: [1, 228] }, { 22: Ya, 24: Hr, 26: Yr, 38: ni, 42: Vr, 52: Ot, 66: $n, 67: pt, 70: [1, 229], 73: Na, 81: er, 83: 201, 85: 151, 86: xr, 87: So, 88: cs, 89: xa, 90: ro, 91: Lo, 92: Xo, 94: 142, 95: Zo, 105: ut, 106: br, 109: Fs, 111: Wr, 112: zr, 113: Hs, 114: Qa, 115: 148, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }, { 22: Ya, 24: Hr, 26: Yr, 38: ni, 42: Vr, 52: Ot, 66: $n, 67: pt, 72: [1, 230], 73: Na, 81: er, 83: 201, 85: 151, 86: xr, 87: So, 88: cs, 89: xa, 90: ro, 91: Lo, 92: Xo, 94: 142, 95: Zo, 105: ut, 106: br, 109: Fs, 111: Wr, 112: zr, 113: Hs, 114: Qa, 115: 148, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }, { 22: Ya, 24: Hr, 26: Yr, 38: ni, 39: 231, 42: Vr, 52: Ot, 66: $n, 67: pt, 73: Na, 81: er, 83: 140, 84: as, 85: 151, 86: xr, 87: So, 88: cs, 89: xa, 90: ro, 91: Lo, 92: Xo, 94: 142, 95: Zo, 105: ut, 106: br, 109: Fs, 111: Wr, 112: zr, 113: Hs, 114: Qa, 115: 148, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }, { 22: Ya, 24: Hr, 26: Yr, 38: ni, 41: [1, 232], 42: Vr, 52: Ot, 66: $n, 67: pt, 73: Na, 81: er, 83: 201, 85: 151, 86: xr, 87: So, 88: cs, 89: xa, 90: ro, 91: Lo, 92: Xo, 94: 142, 95: Zo, 105: ut, 106: br, 109: Fs, 111: Wr, 112: zr, 113: Hs, 114: Qa, 115: 148, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }, { 22: Ya, 24: Hr, 26: Yr, 38: ni, 42: Vr, 52: Ot, 66: $n, 67: pt, 73: Na, 75: [1, 233], 77: [1, 234], 81: er, 83: 201, 85: 151, 86: xr, 87: So, 88: cs, 89: xa, 90: ro, 91: Lo, 92: Xo, 94: 142, 95: Zo, 105: ut, 106: br, 109: Fs, 111: Wr, 112: zr, 113: Hs, 114: Qa, 115: 148, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }, { 22: Ya, 24: Hr, 26: Yr, 38: ni, 42: Vr, 52: Ot, 66: $n, 67: pt, 73: Na, 75: [1, 236], 77: [1, 235], 81: er, 83: 201, 85: 151, 86: xr, 87: So, 88: cs, 89: xa, 90: ro, 91: Lo, 92: Xo, 94: 142, 95: Zo, 105: ut, 106: br, 109: Fs, 111: Wr, 112: zr, 113: Hs, 114: Qa, 115: 148, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }, { 9: 237, 20: Ft, 21: wn, 23: un }, i(ln, [2, 52], { 52: Oc }), i(ji, [2, 77]), i(ji, [2, 76]), { 22: Ya, 24: Hr, 26: Yr, 38: ni, 42: Vr, 52: Ot, 66: $n, 67: pt, 68: [1, 238], 73: Na, 81: er, 83: 201, 85: 151, 86: xr, 87: So, 88: cs, 89: xa, 90: ro, 91: Lo, 92: Xo, 94: 142, 95: Zo, 105: ut, 106: br, 109: Fs, 111: Wr, 112: zr, 113: Hs, 114: Qa, 115: 148, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }, i(ji, [2, 79]), i(da, [2, 83]), { 22: Ya, 24: Hr, 26: Yr, 38: ni, 39: 239, 42: Vr, 52: Ot, 66: $n, 67: pt, 73: Na, 81: er, 83: 140, 84: as, 85: 151, 86: xr, 87: So, 88: cs, 89: xa, 90: ro, 91: Lo, 92: Xo, 94: 142, 95: Zo, 105: ut, 106: br, 109: Fs, 111: Wr, 112: zr, 113: Hs, 114: Qa, 115: 148, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }, i(Ff, b, { 17: 240 }), i(Zn, [2, 43]), { 51: 241, 52: Z, 54: 46, 66: R, 67: J, 91: ke, 95: de, 105: Te, 106: xe, 109: ie, 111: Be, 112: te, 116: 47, 122: ot, 123: bt, 124: gt, 125: je, 126: Qe, 127: kt }, { 22: wu, 66: jo, 67: yf, 86: bl, 96: 242, 102: cu, 105: qc, 107: 243, 108: 244, 109: Jl, 110: js, 111: Dc, 112: gs, 113: rc }, { 22: wu, 66: jo, 67: yf, 86: bl, 96: 256, 102: cu, 105: qc, 107: 243, 108: 244, 109: Jl, 110: js, 111: Dc, 112: gs, 113: rc }, { 22: wu, 66: jo, 67: yf, 86: bl, 96: 257, 102: cu, 104: [1, 258], 105: qc, 107: 243, 108: 244, 109: Jl, 110: js, 111: Dc, 112: gs, 113: rc }, { 22: wu, 66: jo, 67: yf, 86: bl, 96: 259, 102: cu, 104: [1, 260], 105: qc, 107: 243, 108: 244, 109: Jl, 110: js, 111: Dc, 112: gs, 113: rc }, { 105: [1, 261] }, { 22: wu, 66: jo, 67: yf, 86: bl, 96: 262, 102: cu, 105: qc, 107: 243, 108: 244, 109: Jl, 110: js, 111: Dc, 112: gs, 113: rc }, { 22: wu, 66: jo, 67: yf, 86: bl, 96: 263, 102: cu, 105: qc, 107: 243, 108: 244, 109: Jl, 110: js, 111: Dc, 112: gs, 113: rc }, { 26: an, 52: Ot, 66: $n, 67: pt, 91: Ci, 97: 264, 105: ut, 106: br, 109: zt, 111: Wr, 112: zr, 115: 100, 117: 98, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }, i(Ra, [2, 102]), { 84: [1, 265] }, i(Ra, [2, 106], { 22: [1, 266] }), i(Ra, [2, 107]), i(Ra, [2, 110]), i(Ra, [2, 112], { 22: [1, 267] }), i(Ra, [2, 113]), i(Cr, [2, 58]), i(Cr, [2, 59]), { 22: Ya, 24: Hr, 26: Yr, 38: ni, 42: Vr, 52: Ot, 58: [1, 268], 66: $n, 67: pt, 73: Na, 81: er, 83: 201, 85: 151, 86: xr, 87: So, 88: cs, 89: xa, 90: ro, 91: Lo, 92: Xo, 94: 142, 95: Zo, 105: ut, 106: br, 109: Fs, 111: Wr, 112: zr, 113: Hs, 114: Qa, 115: 148, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }, i(Cr, [2, 66]), i(Cr, [2, 61]), i(Cr, [2, 62]), i(Cr, [2, 63]), { 66: [1, 269] }, i(Cr, [2, 65]), i(Cr, [2, 67]), { 22: Ya, 24: Hr, 26: Yr, 38: ni, 42: Vr, 52: Ot, 66: $n, 67: pt, 72: [1, 270], 73: Na, 81: er, 83: 201, 85: 151, 86: xr, 87: So, 88: cs, 89: xa, 90: ro, 91: Lo, 92: Xo, 94: 142, 95: Zo, 105: ut, 106: br, 109: Fs, 111: Wr, 112: zr, 113: Hs, 114: Qa, 115: 148, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }, i(Cr, [2, 69]), i(Cr, [2, 70]), i(Cr, [2, 72]), i(Cr, [2, 71]), i(Cr, [2, 73]), i(_c, [2, 4]), i([22, 52, 66, 67, 91, 95, 105, 106, 109, 111, 112, 122, 123, 124, 125, 126, 127], [2, 81]), { 22: Ya, 24: Hr, 26: Yr, 38: ni, 41: [1, 271], 42: Vr, 52: Ot, 66: $n, 67: pt, 73: Na, 81: er, 83: 201, 85: 151, 86: xr, 87: So, 88: cs, 89: xa, 90: ro, 91: Lo, 92: Xo, 94: 142, 95: Zo, 105: ut, 106: br, 109: Fs, 111: Wr, 112: zr, 113: Hs, 114: Qa, 115: 148, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }, { 18: 18, 19: 19, 20: v, 21: k, 22: _, 23: T, 32: 24, 33: 25, 34: 26, 35: 27, 36: 28, 37: 29, 38: L, 42: [1, 272], 43: 31, 44: F, 46: U, 48: q, 50: 35, 51: 45, 52: Z, 54: 46, 66: R, 67: J, 86: he, 87: Y, 88: ue, 89: le, 90: be, 91: ke, 95: de, 105: Te, 106: xe, 109: ie, 111: Be, 112: te, 116: 47, 118: Me, 119: ve, 120: ge, 121: Je, 122: ot, 123: bt, 124: gt, 125: je, 126: Qe, 127: kt }, i(_i, [2, 56]), i(Ra, [2, 115], { 106: Ki }), i(Ta, [2, 125], { 108: 274, 22: wu, 66: jo, 67: yf, 86: bl, 102: cu, 105: qc, 109: Jl, 110: js, 111: Dc, 112: gs, 113: rc }), i(Bl, [2, 127]), i(Bl, [2, 129]), i(Bl, [2, 130]), i(Bl, [2, 131]), i(Bl, [2, 132]), i(Bl, [2, 133]), i(Bl, [2, 134]), i(Bl, [2, 135]), i(Bl, [2, 136]), i(Bl, [2, 137]), i(Bl, [2, 138]), i(Bl, [2, 139]), i(Ra, [2, 116], { 106: Ki }), i(Ra, [2, 117], { 106: Ki }), { 22: [1, 275] }, i(Ra, [2, 118], { 106: Ki }), { 22: [1, 276] }, i(qf, [2, 124]), i(Ra, [2, 98], { 106: Ki }), i(Ra, [2, 99], { 106: Ki }), i(Ra, [2, 100], { 115: 100, 117: 178, 26: an, 52: Ot, 66: $n, 67: pt, 91: Ci, 105: ut, 106: br, 109: zt, 111: Wr, 112: zr, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }), i(Ra, [2, 104]), { 101: [1, 277] }, { 101: [1, 278] }, { 58: [1, 279] }, { 68: [1, 280] }, { 72: [1, 281] }, { 9: 282, 20: Ft, 21: wn, 23: un }, i(Zn, [2, 42]), { 22: wu, 66: jo, 67: yf, 86: bl, 102: cu, 105: qc, 107: 283, 108: 244, 109: Jl, 110: js, 111: Dc, 112: gs, 113: rc }, i(Bl, [2, 128]), { 26: an, 52: Ot, 66: $n, 67: pt, 91: Ci, 97: 284, 105: ut, 106: br, 109: zt, 111: Wr, 112: zr, 115: 100, 117: 98, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }, { 26: an, 52: Ot, 66: $n, 67: pt, 91: Ci, 97: 285, 105: ut, 106: br, 109: zt, 111: Wr, 112: zr, 115: 100, 117: 98, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }, i(Ra, [2, 108]), i(Ra, [2, 114]), i(Cr, [2, 60]), { 22: Ya, 24: Hr, 26: Yr, 38: ni, 39: 286, 42: Vr, 52: Ot, 66: $n, 67: pt, 73: Na, 81: er, 83: 140, 84: as, 85: 151, 86: xr, 87: So, 88: cs, 89: xa, 90: ro, 91: Lo, 92: Xo, 94: 142, 95: Zo, 105: ut, 106: br, 109: Fs, 111: Wr, 112: zr, 113: Hs, 114: Qa, 115: 148, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }, i(Cr, [2, 68]), i(Ff, b, { 17: 287 }), i(Ta, [2, 126], { 108: 274, 22: wu, 66: jo, 67: yf, 86: bl, 102: cu, 105: qc, 109: Jl, 110: js, 111: Dc, 112: gs, 113: rc }), i(Ra, [2, 121], { 115: 100, 117: 178, 22: [1, 288], 26: an, 52: Ot, 66: $n, 67: pt, 91: Ci, 105: ut, 106: br, 109: zt, 111: Wr, 112: zr, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }), i(Ra, [2, 122], { 115: 100, 117: 178, 22: [1, 289], 26: an, 52: Ot, 66: $n, 67: pt, 91: Ci, 105: ut, 106: br, 109: zt, 111: Wr, 112: zr, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }), { 22: Ya, 24: Hr, 26: Yr, 38: ni, 41: [1, 290], 42: Vr, 52: Ot, 66: $n, 67: pt, 73: Na, 81: er, 83: 201, 85: 151, 86: xr, 87: So, 88: cs, 89: xa, 90: ro, 91: Lo, 92: Xo, 94: 142, 95: Zo, 105: ut, 106: br, 109: Fs, 111: Wr, 112: zr, 113: Hs, 114: Qa, 115: 148, 122: Si, 123: vr, 124: Qr, 125: or, 126: Gr, 127: An }, { 18: 18, 19: 19, 20: v, 21: k, 22: _, 23: T, 32: 24, 33: 25, 34: 26, 35: 27, 36: 28, 37: 29, 38: L, 42: [1, 291], 43: 31, 44: F, 46: U, 48: q, 50: 35, 51: 45, 52: Z, 54: 46, 66: R, 67: J, 86: he, 87: Y, 88: ue, 89: le, 90: be, 91: ke, 95: de, 105: Te, 106: xe, 109: ie, 111: Be, 112: te, 116: 47, 118: Me, 119: ve, 120: ge, 121: Je, 122: ot, 123: bt, 124: gt, 125: je, 126: Qe, 127: kt }, { 22: wu, 66: jo, 67: yf, 86: bl, 96: 292, 102: cu, 105: qc, 107: 243, 108: 244, 109: Jl, 110: js, 111: Dc, 112: gs, 113: rc }, { 22: wu, 66: jo, 67: yf, 86: bl, 96: 293, 102: cu, 105: qc, 107: 243, 108: 244, 109: Jl, 110: js, 111: Dc, 112: gs, 113: rc }, i(Cr, [2, 64]), i(Zn, [2, 41]), i(Ra, [2, 119], { 106: Ki }), i(Ra, [2, 120], { 106: Ki })], defaultActions: { 2: [2, 1], 9: [2, 5], 10: [2, 2], 132: [2, 7] }, parseError: function(ra, Ls) {
+ if (!Ls.recoverable) {
+ var pr = new Error(ra);
+ throw pr.hash = Ls, pr;
+ }
+ this.trace(ra);
+ }, parse: function(ra) {
+ var Ls = this, pr = [0], Pr = [], Wo = [null], hn = [], wf = this.table, Sn = "", Nc = 0, Ro = 0, T1 = hn.slice.call(arguments, 1), tr = Object.create(this.lexer), ei = { yy: {} };
+ for (var fi in this.yy)
+ Object.prototype.hasOwnProperty.call(this.yy, fi) && (ei.yy[fi] = this.yy[fi]);
+ tr.setInput(ra, ei.yy), ei.yy.lexer = tr, ei.yy.parser = this, tr.yylloc === void 0 && (tr.yylloc = {});
+ var ri = tr.yylloc;
+ hn.push(ri);
+ var Aa = tr.options && tr.options.ranges;
+ function ya() {
+ var cl;
+ return typeof (cl = Pr.pop() || tr.lex() || 1) != "number" && (cl instanceof Array && (cl = (Pr = cl).pop()), cl = Ls.symbols_[cl] || cl), cl;
+ }
+ typeof ei.yy.parseError == "function" ? this.parseError = ei.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
+ for (var fo, bs, xo, sl, Mu, Zl, V1, il, kf = {}; ; ) {
+ if (bs = pr[pr.length - 1], this.defaultActions[bs] ? xo = this.defaultActions[bs] : (fo == null && (fo = ya()), xo = wf[bs] && wf[bs][fo]), xo === void 0 || !xo.length || !xo[0]) {
+ var eu = "";
+ for (Mu in il = [], wf[bs])
+ this.terminals_[Mu] && Mu > 2 && il.push("'" + this.terminals_[Mu] + "'");
+ eu = tr.showPosition ? "Parse error on line " + (Nc + 1) + `:
+` + tr.showPosition() + `
+Expecting ` + il.join(", ") + ", got '" + (this.terminals_[fo] || fo) + "'" : "Parse error on line " + (Nc + 1) + ": Unexpected " + (fo == 1 ? "end of input" : "'" + (this.terminals_[fo] || fo) + "'"), this.parseError(eu, { text: tr.match, token: this.terminals_[fo] || fo, line: tr.yylineno, loc: ri, expected: il });
+ }
+ if (xo[0] instanceof Array && xo.length > 1)
+ throw new Error("Parse Error: multiple actions possible at state: " + bs + ", token: " + fo);
+ switch (xo[0]) {
+ case 1:
+ pr.push(fo), Wo.push(tr.yytext), hn.push(tr.yylloc), pr.push(xo[1]), fo = null, Ro = tr.yyleng, Sn = tr.yytext, Nc = tr.yylineno, ri = tr.yylloc;
+ break;
+ case 2:
+ if (Zl = this.productions_[xo[1]][1], kf.$ = Wo[Wo.length - Zl], kf._$ = { first_line: hn[hn.length - (Zl || 1)].first_line, last_line: hn[hn.length - 1].last_line, first_column: hn[hn.length - (Zl || 1)].first_column, last_column: hn[hn.length - 1].last_column }, Aa && (kf._$.range = [hn[hn.length - (Zl || 1)].range[0], hn[hn.length - 1].range[1]]), (sl = this.performAction.apply(kf, [Sn, Ro, Nc, ei.yy, xo[1], Wo, hn].concat(T1))) !== void 0)
+ return sl;
+ Zl && (pr = pr.slice(0, -1 * Zl * 2), Wo = Wo.slice(0, -1 * Zl), hn = hn.slice(0, -1 * Zl)), pr.push(this.productions_[xo[1]][0]), Wo.push(kf.$), hn.push(kf._$), V1 = wf[pr[pr.length - 2]][pr[pr.length - 1]], pr.push(V1);
+ break;
+ case 3:
+ return !0;
+ }
+ }
+ return !0;
+ } }, mc = (r = { EOF: 1, parseError: function(ra, Ls) {
+ if (!this.yy.parser)
+ throw new Error(ra);
+ this.yy.parser.parseError(ra, Ls);
+ }, setInput: function(ra, Ls) {
+ return this.yy = Ls || this.yy || {}, this._input = ra, 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 ra = this._input[0];
+ return this.yytext += ra, this.yyleng++, this.offset++, this.match += ra, this.matched += ra, ra.match(/(?:\r\n?|\n).*/g) ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), ra;
+ }, unput: function(ra) {
+ var Ls = ra.length, pr = ra.split(/(?:\r\n?|\n)/g);
+ this._input = ra + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - Ls), this.offset -= Ls;
+ var Pr = 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), pr.length - 1 && (this.yylineno -= pr.length - 1);
+ var Wo = 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: pr ? (pr.length === Pr.length ? this.yylloc.first_column : 0) + Pr[Pr.length - pr.length].length - pr[0].length : this.yylloc.first_column - Ls }, this.options.ranges && (this.yylloc.range = [Wo[0], Wo[0] + this.yyleng - Ls]), this.yyleng = this.yytext.length, this;
+ }, more: function() {
+ return this._more = !0, this;
+ }, reject: function() {
+ return this.options.backtrack_lexer ? (this._backtrack = !0, this) : 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 });
+ }, less: function(ra) {
+ this.unput(this.match.slice(ra));
+ }, pastInput: function() {
+ var ra = this.matched.substr(0, this.matched.length - this.match.length);
+ return (ra.length > 20 ? "..." : "") + ra.substr(-20).replace(/\n/g, "");
+ }, upcomingInput: function() {
+ var ra = this.match;
+ return ra.length < 20 && (ra += this._input.substr(0, 20 - ra.length)), (ra.substr(0, 20) + (ra.length > 20 ? "..." : "")).replace(/\n/g, "");
+ }, showPosition: function() {
+ var ra = this.pastInput(), Ls = new Array(ra.length + 1).join("-");
+ return ra + this.upcomingInput() + `
+` + Ls + "^";
+ }, test_match: function(ra, Ls) {
+ var pr, Pr, Wo;
+ if (this.options.backtrack_lexer && (Wo = { 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 && (Wo.yylloc.range = this.yylloc.range.slice(0))), (Pr = ra[0].match(/(?:\r\n?|\n).*/g)) && (this.yylineno += Pr.length), this.yylloc = { first_line: this.yylloc.last_line, last_line: this.yylineno + 1, first_column: this.yylloc.last_column, last_column: Pr ? Pr[Pr.length - 1].length - Pr[Pr.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + ra[0].length }, this.yytext += ra[0], this.match += ra[0], this.matches = ra, 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(ra[0].length), this.matched += ra[0], pr = this.performAction.call(this, this.yy, this, Ls, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), pr)
+ return pr;
+ if (this._backtrack) {
+ for (var hn in Wo)
+ this[hn] = Wo[hn];
+ return !1;
+ }
+ return !1;
+ }, next: function() {
+ if (this.done)
+ return this.EOF;
+ var ra, Ls, pr, Pr;
+ this._input || (this.done = !0), this._more || (this.yytext = "", this.match = "");
+ for (var Wo = this._currentRules(), hn = 0; hn < Wo.length; hn++)
+ if ((pr = this._input.match(this.rules[Wo[hn]])) && (!Ls || pr[0].length > Ls[0].length)) {
+ if (Ls = pr, Pr = hn, this.options.backtrack_lexer) {
+ if ((ra = this.test_match(pr, Wo[hn])) !== !1)
+ return ra;
+ if (this._backtrack) {
+ Ls = !1;
+ continue;
+ }
+ return !1;
+ }
+ if (!this.options.flex)
+ break;
+ }
+ return Ls ? (ra = this.test_match(Ls, Wo[Pr])) !== !1 && ra : 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 ra = this.next();
+ return ra || this.lex();
+ }, begin: function(ra) {
+ this.conditionStack.push(ra);
+ }, popState: function() {
+ return this.conditionStack.length - 1 > 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(ra) {
+ return (ra = this.conditionStack.length - 1 - Math.abs(ra || 0)) >= 0 ? this.conditionStack[ra] : "INITIAL";
+ }, pushState: function(ra) {
+ this.begin(ra);
+ }, stateStackSize: function() {
+ return this.conditionStack.length;
+ }, options: {}, performAction: function(ra, Ls, pr, Pr) {
+ switch (pr) {
+ 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:
+ 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:
+ case 15:
+ case 24:
+ case 27:
+ case 30:
+ case 33:
+ this.popState();
+ break;
+ case 13:
+ return "acc_descr_multiline_value";
+ case 14:
+ this.begin("string");
+ 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 25:
+ return 100;
+ case 26:
+ this.begin("callbackname");
+ break;
+ case 28:
+ this.popState(), this.begin("callbackargs");
+ break;
+ case 29:
+ return 98;
+ case 31:
+ return 99;
+ case 32:
+ this.begin("click");
+ break;
+ case 34:
+ return 90;
+ case 35:
+ case 36:
+ case 37:
+ return ra.lex.firstGraph() && this.begin("dir"), 24;
+ case 38:
+ return 38;
+ case 39:
+ return 42;
+ case 40:
+ case 41:
+ case 42:
+ case 43:
+ return 101;
+ case 44:
+ return this.popState(), 25;
+ case 45:
+ case 46:
+ case 47:
+ case 48:
+ case 49:
+ case 50:
+ case 51:
+ case 52:
+ case 53:
+ case 54:
+ return this.popState(), 26;
+ case 55:
+ return 118;
+ case 56:
+ return 119;
+ case 57:
+ return 120;
+ case 58:
+ return 121;
+ case 59:
+ return 105;
+ case 60:
+ return 111;
+ case 61:
+ return 53;
+ case 62:
+ return 67;
+ case 63:
+ return 52;
+ case 64:
+ return 20;
+ case 65:
+ return 106;
+ case 66:
+ return 126;
+ case 67:
+ case 68:
+ case 69:
+ return 82;
+ case 70:
+ case 71:
+ case 72:
+ return 81;
+ case 73:
+ return 59;
+ case 74:
+ return 60;
+ case 75:
+ return 61;
+ case 76:
+ return 62;
+ case 77:
+ return 63;
+ case 78:
+ return 64;
+ case 79:
+ return 65;
+ case 80:
+ return 69;
+ case 81:
+ return 70;
+ case 82:
+ return 55;
+ case 83:
+ return 56;
+ case 84:
+ return 109;
+ case 85:
+ return 112;
+ case 86:
+ return 127;
+ case 87:
+ return 124;
+ case 88:
+ return 113;
+ case 89:
+ case 90:
+ return 125;
+ case 91:
+ return 114;
+ case 92:
+ return 73;
+ case 93:
+ return 92;
+ case 94:
+ return "SEP";
+ case 95:
+ return 91;
+ case 96:
+ return 66;
+ case 97:
+ return 75;
+ case 98:
+ return 74;
+ case 99:
+ return 77;
+ case 100:
+ return 76;
+ case 101:
+ return 122;
+ case 102:
+ return 123;
+ case 103:
+ return 68;
+ case 104:
+ return 57;
+ case 105:
+ return 58;
+ case 106:
+ return 40;
+ case 107:
+ return 41;
+ case 108:
+ return 71;
+ case 109:
+ return 72;
+ case 110:
+ return 133;
+ case 111:
+ return 21;
+ case 112:
+ return 22;
+ case 113:
+ return 23;
+ }
+ }, rules: [/^(?:%%\{)/, /^(?:((?:(?!\}%%)[^:.])*))/, /^(?::)/, /^(?:\}%%)/, /^(?:((?:(?!\}%%).|\n)*))/, /^(?:%%(?!\{)[^\n]*)/, /^(?:[^\}]%%[^\n]*)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:["])/, /^(?:["])/, /^(?:[^"]*)/, /^(?:style\b)/, /^(?:default\b)/, /^(?:linkStyle\b)/, /^(?:interpolate\b)/, /^(?:classDef\b)/, /^(?:class\b)/, /^(?:href[\s]+["])/, /^(?:["])/, /^(?:[^"]*)/, /^(?:call[\s]+)/, /^(?:\([\s]*\))/, /^(?:\()/, /^(?:[^(]*)/, /^(?:\))/, /^(?:[^)]*)/, /^(?:click[\s]+)/, /^(?:[\s\n])/, /^(?:[^\s\n]*)/, /^(?:flowchart-elk\b)/, /^(?: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: [44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54], 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, 43, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113], inclusive: !0 } } }, r);
+ function wh() {
+ this.yy = {};
+ }
+ return sf.lexer = mc, wh.prototype = sf, sf.Parser = wh, new wh();
+}();
+XNe.parser = XNe;
+const WNe = XNe, Y9n = (r, i) => {
+ var o, l;
+ return ((o = i == null ? void 0 : i.flowchart) == null ? void 0 : o.defaultRenderer) !== "dagre-wrapper" && ((l = i == null ? void 0 : i.flowchart) == null ? void 0 : l.defaultRenderer) !== "elk" && r.match(/^\s*graph/) !== null;
+}, J9n = (r, i) => {
+ var o, l;
+ return ((o = i == null ? void 0 : i.flowchart) == null ? void 0 : o.defaultRenderer) !== "dagre-d3" && ((l = i == null ? void 0 : i.flowchart) == null ? void 0 : l.defaultRenderer) !== "elk" && (r.match(/^\s*graph/) !== null || r.match(/^\s*flowchart/) !== null);
+};
+let eC, d2e, kCt = 0, oQe = Bn(), t0 = {}, m$ = [], pG = {}, BL = [], _be = {}, sQe = {}, VNe = 0, qNe = !0, A2e = [];
+const g2e = (r) => El.sanitizeText(r, oQe), tIt = function(r, i, o) {
+ n0.parseDirective(this, r, i, o);
+}, wie = function(r) {
+ const i = Object.keys(t0);
+ for (const o of i)
+ if (t0[o].id === r)
+ return t0[o].domId;
+ return r;
+}, nIt = function(r, i, o, l, f, g, A = {}) {
+ let b, v = r;
+ v !== void 0 && v.trim().length !== 0 && (t0[v] === void 0 && (t0[v] = { id: v, domId: "flowchart-" + v + "-" + kCt, styles: [], classes: [] }), kCt++, i !== void 0 ? (oQe = Bn(), b = g2e(i.trim()), b[0] === '"' && b[b.length - 1] === '"' && (b = b.substring(1, b.length - 1)), t0[v].text = b) : t0[v].text === void 0 && (t0[v].text = r), o !== void 0 && (t0[v].type = o), l != null && l.forEach(function(k) {
+ t0[v].styles.push(k);
+ }), f != null && f.forEach(function(k) {
+ t0[v].classes.push(k);
+ }), g !== void 0 && (t0[v].dir = g), t0[v].props === void 0 ? t0[v].props = A : A !== void 0 && Object.assign(t0[v].props, A));
+}, rIt = function(r, i, o, l) {
+ const f = { start: r, end: i, type: void 0, text: "" };
+ (l = o.text) !== void 0 && (f.text = g2e(l.trim()), f.text[0] === '"' && f.text[f.text.length - 1] === '"' && (f.text = f.text.substring(1, f.text.length - 1))), o !== void 0 && (f.type = o.type, f.stroke = o.stroke, f.length = o.length), m$.push(f);
+}, iIt = function(r, i, o, l) {
+ let f, g;
+ for (f = 0; f < r.length; f++)
+ for (g = 0; g < i.length; g++)
+ rIt(r[f], i[g], o, l);
+}, aIt = function(r, i) {
+ r.forEach(function(o) {
+ o === "default" ? m$.defaultInterpolate = i : m$[o].interpolate = i;
+ });
+}, oIt = function(r, i) {
+ r.forEach(function(o) {
+ o === "default" ? m$.defaultStyle = i : (Tl.isSubstringInArray("fill", i) === -1 && i.push("fill:none"), m$[o].style = i);
+ });
+}, sIt = function(r, i) {
+ pG[r] === void 0 && (pG[r] = { id: r, styles: [], textStyles: [] }), i != null && i.forEach(function(o) {
+ if (o.match("color")) {
+ const l = o.replace("fill", "bgFill").replace("color", "fill");
+ pG[r].textStyles.push(l);
+ }
+ pG[r].styles.push(o);
+ });
+}, cIt = function(r) {
+ eC = r, eC.match(/.*) && (eC = "RL"), eC.match(/.*\^/) && (eC = "BT"), eC.match(/.*>/) && (eC = "LR"), eC.match(/.*v/) && (eC = "TB"), eC === "TD" && (eC = "TB");
+}, p2e = function(r, i) {
+ r.split(",").forEach(function(o) {
+ let l = o;
+ t0[l] !== void 0 && t0[l].classes.push(i), _be[l] !== void 0 && _be[l].classes.push(i);
+ });
+}, lIt = function(r, i, o) {
+ r.split(",").forEach(function(l) {
+ t0[l] !== void 0 && (t0[l].link = Tl.formatUrl(i, oQe), t0[l].linkTarget = o);
+ }), p2e(r, "clickable");
+}, uIt = function(r) {
+ return sQe[r];
+}, hIt = function(r, i, o) {
+ r.split(",").forEach(function(l) {
+ (function(f, g, A) {
+ let b = wie(f);
+ if (Bn().securityLevel !== "loose" || g === void 0)
+ return;
+ let v = [];
+ if (typeof A == "string") {
+ v = A.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
+ for (let k = 0; k < v.length; k++) {
+ let _ = v[k].trim();
+ _.charAt(0) === '"' && _.charAt(_.length - 1) === '"' && (_ = _.substr(1, _.length - 2)), v[k] = _;
+ }
+ }
+ v.length === 0 && v.push(f), t0[f] !== void 0 && (t0[f].haveCallback = !0, A2e.push(function() {
+ const k = document.querySelector(`[id="${b}"]`);
+ k !== null && k.addEventListener("click", function() {
+ Tl.runFunc(g, ...v);
+ }, !1);
+ }));
+ })(l, i, o);
+ }), p2e(r, "clickable");
+}, fIt = function(r) {
+ A2e.forEach(function(i) {
+ i(r);
+ });
+}, dIt = function() {
+ return eC.trim();
+}, AIt = function() {
+ return t0;
+}, gIt = function() {
+ return m$;
+}, pIt = function() {
+ return pG;
+}, mIt = function(r) {
+ let i = co(".mermaidTooltip");
+ (i._groups || i)[0][0] === null && (i = co("body").append("div").attr("class", "mermaidTooltip").style("opacity", 0)), co(r).select("svg").selectAll("g.node").on("mouseover", function() {
+ const o = co(this);
+ if (o.attr("title") === null)
+ return;
+ const l = this.getBoundingClientRect();
+ i.transition().duration(200).style("opacity", ".9"), i.text(o.attr("title")).style("left", window.scrollX + l.left + (l.right - l.left) / 2 + "px").style("top", window.scrollY + l.top - 14 + document.body.scrollTop + "px"), i.html(i.html().replace(/<br\/>/g, "
")), o.classed("hover", !0);
+ }).on("mouseout", function() {
+ i.transition().duration(500).style("opacity", 0), co(this).classed("hover", !1);
+ });
+};
+A2e.push(mIt);
+const bIt = function(r = "gen-1") {
+ t0 = {}, pG = {}, m$ = [], A2e = [mIt], BL = [], _be = {}, VNe = 0, sQe = [], qNe = !0, d2e = r, w5();
+}, vIt = (r) => {
+ d2e = r || "gen-2";
+}, yIt = function() {
+ return "fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;";
+}, wIt = function(r, i, o) {
+ let l = r.trim(), f = o;
+ r === o && o.match(/\s/) && (l = void 0);
+ let g = [];
+ const { nodeList: A, dir: b } = function(k) {
+ const _ = { boolean: {}, number: {}, string: {} }, T = [];
+ let L;
+ return { nodeList: k.filter(function(F) {
+ const U = typeof F;
+ return F.stmt && F.stmt === "dir" ? (L = F.value, !1) : F.trim() !== "" && (U in _ ? !_[U].hasOwnProperty(F) && (_[U][F] = !0) : !T.includes(F) && T.push(F));
+ }), dir: L };
+ }(g.concat.apply(g, i));
+ if (g = A, d2e === "gen-1")
+ for (let k = 0; k < g.length; k++)
+ g[k] = wie(g[k]);
+ l = l || "subGraph" + VNe, f = f || "", f = g2e(f), VNe += 1;
+ const v = { id: l, nodes: g, title: f.trim(), classes: [], dir: b };
+ return _t.info("Adding", v.id, v.nodes, v.dir), v.nodes = LIt(v, BL).nodes, BL.push(v), _be[l] = v, l;
+}, Z9n = function(r) {
+ for (const [i, o] of BL.entries())
+ if (o.id === r)
+ return i;
+ return -1;
+};
+let gme = -1;
+const kIt = [], xIt = function(r, i) {
+ const o = BL[i].nodes;
+ if (gme += 1, gme > 2e3)
+ return;
+ if (kIt[gme] = i, BL[i].id === r)
+ return { result: !0, count: 0 };
+ let l = 0, f = 1;
+ for (; l < o.length; ) {
+ const g = Z9n(o[l]);
+ if (g >= 0) {
+ const A = xIt(r, g);
+ if (A.result)
+ return { result: !0, count: f + A.count };
+ f += A.count;
+ }
+ l += 1;
+ }
+ return { result: !1, count: f };
+}, CIt = function(r) {
+ return kIt[r];
+}, _It = function() {
+ gme = -1, BL.length > 0 && xIt("none", BL.length - 1);
+}, EIt = function() {
+ return BL;
+}, TIt = () => !!qNe && (qNe = !1, !0), BIt = (r, i) => {
+ const o = ((f) => {
+ const g = f.trim();
+ let A = g.slice(0, -1), b = "arrow_open";
+ switch (g.slice(-1)) {
+ case "x":
+ b = "arrow_cross", g[0] === "x" && (b = "double_" + b, A = A.slice(1));
+ break;
+ case ">":
+ b = "arrow_point", g[0] === "<" && (b = "double_" + b, A = A.slice(1));
+ break;
+ case "o":
+ b = "arrow_circle", g[0] === "o" && (b = "double_" + b, A = A.slice(1));
+ }
+ let v = "normal", k = A.length - 1;
+ A[0] === "=" && (v = "thick");
+ let _ = ((T, L) => {
+ const F = L.length;
+ let U = 0;
+ for (let q = 0; q < F; ++q)
+ L[q] === T && ++U;
+ return U;
+ })(".", A);
+ return _ && (v = "dotted", k = _), { type: b, stroke: v, length: k };
+ })(r);
+ let l;
+ if (i) {
+ if (l = ((f) => {
+ let g = f.trim(), A = "arrow_open";
+ switch (g[0]) {
+ case "<":
+ A = "arrow_point", g = g.slice(1);
+ break;
+ case "x":
+ A = "arrow_cross", g = g.slice(1);
+ break;
+ case "o":
+ A = "arrow_circle", g = g.slice(1);
+ }
+ let b = "normal";
+ return g.includes("=") && (b = "thick"), g.includes(".") && (b = "dotted"), { type: A, stroke: b };
+ })(i), l.stroke !== o.stroke)
+ return { type: "INVALID", stroke: "INVALID" };
+ if (l.type === "arrow_open")
+ l.type = o.type;
+ else {
+ if (l.type !== o.type)
+ return { type: "INVALID", stroke: "INVALID" };
+ l.type = "double_" + l.type;
+ }
+ return l.type === "double_arrow" && (l.type = "double_arrow_point"), l.length = o.length, l;
+ }
+ return o;
+}, SIt = (r, i) => {
+ let o = !1;
+ return r.forEach((l) => {
+ l.nodes.indexOf(i) >= 0 && (o = !0);
+ }), o;
+}, LIt = (r, i) => {
+ const o = [];
+ return r.nodes.forEach((l, f) => {
+ SIt(i, l) || o.push(r.nodes[f]);
+ }), { nodes: o };
+}, IIt = { firstGraph: TIt }, kT = { parseDirective: tIt, defaultConfig: () => LG.flowchart, setAccTitle: k5, getAccTitle: _k, getAccDescription: Tk, setAccDescription: Ek, addVertex: nIt, lookUpDomId: wie, addLink: iIt, updateLinkInterpolate: aIt, updateLink: oIt, addClass: sIt, setDirection: cIt, setClass: p2e, setTooltip: function(r, i) {
+ r.split(",").forEach(function(o) {
+ i !== void 0 && (sQe[d2e === "gen-1" ? wie(o) : o] = g2e(i));
+ });
+}, getTooltip: uIt, setClickEvent: hIt, setLink: lIt, bindFunctions: fIt, getDirection: dIt, getVertices: AIt, getEdges: gIt, getClasses: pIt, clear: bIt, setGen: vIt, defaultStyle: yIt, addSubGraph: wIt, getDepthFirstPos: CIt, indexNodes: _It, getSubGraphs: EIt, destructLink: BIt, lex: IIt, exists: SIt, makeUniq: LIt, setDiagramTitle: q9, getDiagramTitle: Y9 }, e_n = Object.freeze(Object.defineProperty({ __proto__: null, addClass: sIt, addLink: iIt, addSingleLink: rIt, addSubGraph: wIt, addVertex: nIt, bindFunctions: fIt, clear: bIt, default: kT, defaultStyle: yIt, destructLink: BIt, firstGraph: TIt, getClasses: pIt, getDepthFirstPos: CIt, getDirection: dIt, getEdges: gIt, getSubGraphs: EIt, getTooltip: uIt, getVertices: AIt, indexNodes: _It, lex: IIt, lookUpDomId: wie, parseDirective: tIt, setClass: p2e, setClickEvent: hIt, setDirection: cIt, setGen: vIt, setLink: lIt, updateLink: oIt, updateLinkInterpolate: aIt }, Symbol.toStringTag, { value: "Module" })), t_n = function(r) {
+ const i = Object.keys(r);
+ for (const o of i)
+ r[o];
+}, MIt = {}, xCt = function(r, i, o, l, f, g) {
+ const A = l.select(`[id="${o}"]`);
+ Object.keys(r).forEach(function(b) {
+ const v = r[b];
+ let k = "default";
+ v.classes.length > 0 && (k = v.classes.join(" "));
+ const _ = OO(v.styles);
+ let T, L = v.text !== void 0 ? v.text : v.id;
+ if (Ev(Bn().flowchart.htmlLabels)) {
+ const q = { label: L.replace(/fa[blrs]?:fa-[\w-]+/g, (Z) => ``) };
+ T = eLt(A, q).node(), T.parentNode.removeChild(T);
+ } else {
+ const q = f.createElementNS("http://www.w3.org/2000/svg", "text");
+ q.setAttribute("style", _.labelStyle.replace("color:", "fill:"));
+ const Z = L.split(El.lineBreakRegex);
+ for (const R of Z) {
+ const J = f.createElementNS("http://www.w3.org/2000/svg", "tspan");
+ J.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), J.setAttribute("dy", "1em"), J.setAttribute("x", "1"), J.textContent = R, q.appendChild(J);
+ }
+ T = q;
+ }
+ let F = 0, U = "";
+ switch (v.type) {
+ case "round":
+ F = 5, U = "rect";
+ break;
+ case "square":
+ case "group":
+ default:
+ U = "rect";
+ break;
+ case "diamond":
+ U = "question";
+ break;
+ case "hexagon":
+ U = "hexagon";
+ break;
+ case "odd":
+ case "odd_right":
+ U = "rect_left_inv_arrow";
+ break;
+ case "lean_right":
+ U = "lean_right";
+ break;
+ case "lean_left":
+ U = "lean_left";
+ break;
+ case "trapezoid":
+ U = "trapezoid";
+ break;
+ case "inv_trapezoid":
+ U = "inv_trapezoid";
+ break;
+ case "circle":
+ U = "circle";
+ break;
+ case "ellipse":
+ U = "ellipse";
+ break;
+ case "stadium":
+ U = "stadium";
+ break;
+ case "subroutine":
+ U = "subroutine";
+ break;
+ case "cylinder":
+ U = "cylinder";
+ break;
+ case "doublecircle":
+ U = "doublecircle";
+ }
+ i.setNode(v.id, { labelStyle: _.labelStyle, shape: U, labelText: L, rx: F, ry: F, class: k, style: _.style, id: v.id, link: v.link, linkTarget: v.linkTarget, tooltip: g.db.getTooltip(v.id) || "", domId: g.db.lookUpDomId(v.id), haveCallback: v.haveCallback, width: v.type === "group" ? 500 : void 0, dir: v.dir, type: v.type, props: v.props, padding: Bn().flowchart.padding }), _t.info("setNode", { labelStyle: _.labelStyle, shape: U, labelText: L, rx: F, ry: F, class: k, style: _.style, id: v.id, domId: g.db.lookUpDomId(v.id), width: v.type === "group" ? 500 : void 0, type: v.type, dir: v.dir, props: v.props, padding: Bn().flowchart.padding });
+ });
+}, CCt = function(r, i, o) {
+ _t.info("abc78 edges = ", r);
+ let l, f, g = 0, A = {};
+ if (r.defaultStyle !== void 0) {
+ const b = OO(r.defaultStyle);
+ l = b.style, f = b.labelStyle;
+ }
+ r.forEach(function(b) {
+ g++;
+ var v = "L-" + b.start + "-" + b.end;
+ A[v] === void 0 ? (A[v] = 0, _t.info("abc78 new entry", v, A[v])) : (A[v]++, _t.info("abc78 new entry", v, A[v]));
+ let k = v + "-" + A[v];
+ _t.info("abc78 new link id to be used is", v, k, A[v]);
+ var _ = "LS-" + b.start, T = "LE-" + b.end;
+ const L = { style: "", labelStyle: "" };
+ switch (L.minlen = b.length || 1, b.type === "arrow_open" ? L.arrowhead = "none" : L.arrowhead = "normal", L.arrowTypeStart = "arrow_open", L.arrowTypeEnd = "arrow_open", b.type) {
+ case "double_arrow_cross":
+ L.arrowTypeStart = "arrow_cross";
+ case "arrow_cross":
+ L.arrowTypeEnd = "arrow_cross";
+ break;
+ case "double_arrow_point":
+ L.arrowTypeStart = "arrow_point";
+ case "arrow_point":
+ L.arrowTypeEnd = "arrow_point";
+ break;
+ case "double_arrow_circle":
+ L.arrowTypeStart = "arrow_circle";
+ case "arrow_circle":
+ L.arrowTypeEnd = "arrow_circle";
+ }
+ let F = "", U = "";
+ switch (b.stroke) {
+ case "normal":
+ F = "fill:none;", l !== void 0 && (F = l), f !== void 0 && (U = f), L.thickness = "normal", L.pattern = "solid";
+ break;
+ case "dotted":
+ L.thickness = "normal", L.pattern = "dotted", L.style = "fill:none;stroke-width:2px;stroke-dasharray:3;";
+ break;
+ case "thick":
+ L.thickness = "thick", L.pattern = "solid", L.style = "stroke-width: 3.5px;fill:none;";
+ }
+ if (b.style !== void 0) {
+ const q = OO(b.style);
+ F = q.style, U = q.labelStyle;
+ }
+ L.style = L.style += F, L.labelStyle = L.labelStyle += U, b.interpolate !== void 0 ? L.curve = $9(b.interpolate, mk) : r.defaultInterpolate !== void 0 ? L.curve = $9(r.defaultInterpolate, mk) : L.curve = $9(MIt.curve, mk), b.text === void 0 ? b.style !== void 0 && (L.arrowheadStyle = "fill: #333") : (L.arrowheadStyle = "fill: #333", L.labelpos = "c"), L.labelType = "text", L.label = b.text.replace(El.lineBreakRegex, `
+`), b.style === void 0 && (L.style = L.style || "stroke: #333; stroke-width: 1.5px;fill:none;"), L.labelStyle = L.labelStyle.replace("color:", "fill:"), L.id = k, L.classes = "flowchart-link " + _ + " " + T, i.setEdge(b.start, b.end, L, g);
+ });
+}, IOe = { setConf: function(r) {
+ const i = Object.keys(r);
+ for (const o of i)
+ MIt[o] = r[o];
+}, addVertices: xCt, addEdges: CCt, getClasses: function(r, i) {
+ _t.info("Extracting classes"), i.db.clear();
+ try {
+ return i.parse(r), i.db.getClasses();
+ } catch {
+ return;
+ }
+}, draw: function(r, i, o, l) {
+ _t.info("Drawing flowchart"), l.db.clear(), kT.setGen("gen-2"), l.parser.parse(r);
+ let f = l.db.getDirection();
+ f === void 0 && (f = "TD");
+ const { securityLevel: g, flowchart: A } = Bn(), b = A.nodeSpacing || 50, v = A.rankSpacing || 50;
+ let k;
+ g === "sandbox" && (k = co("#i" + i));
+ const _ = co(g === "sandbox" ? k.nodes()[0].contentDocument.body : "body"), T = g === "sandbox" ? k.nodes()[0].contentDocument : document, L = new ub({ multigraph: !0, compound: !0 }).setGraph({ rankdir: f, nodesep: b, ranksep: v, marginx: 0, marginy: 0 }).setDefaultEdgeLabel(function() {
+ return {};
+ });
+ let F;
+ const U = l.db.getSubGraphs();
+ _t.info("Subgraphs - ", U);
+ for (let Y = U.length - 1; Y >= 0; Y--)
+ F = U[Y], _t.info("Subgraph - ", F), l.db.addVertex(F.id, F.title, "group", void 0, F.classes, F.dir);
+ const q = l.db.getVertices(), Z = l.db.getEdges();
+ _t.info("Edges", Z);
+ let R = 0;
+ for (R = U.length - 1; R >= 0; R--) {
+ F = U[R], zTt("cluster").append("text");
+ for (let Y = 0; Y < F.nodes.length; Y++)
+ _t.info("Setting up subgraphs", F.nodes[Y], F.id), L.setParent(F.nodes[Y], F.id);
+ }
+ xCt(q, L, i, _, T, l), CCt(Z, L);
+ const J = _.select(`[id="${i}"]`), he = _.select("#" + i + " g");
+ if (aQe(he, L, ["point", "circle", "cross"], "flowchart", i), Tl.insertTitle(J, "flowchartTitleText", A.titleTopMargin, l.db.getDiagramTitle()), vX(L, J, A.diagramPadding, A.useMaxWidth), l.db.indexNodes("subGraph" + R), !A.htmlLabels) {
+ const Y = T.querySelectorAll('[id="' + i + '"] .edgeLabel .label');
+ for (const ue of Y) {
+ const le = ue.getBBox(), be = T.createElementNS("http://www.w3.org/2000/svg", "rect");
+ be.setAttribute("rx", 0), be.setAttribute("ry", 0), be.setAttribute("width", le.width), be.setAttribute("height", le.height), ue.insertBefore(be, ue.firstChild);
+ }
+ }
+ Object.keys(q).forEach(function(Y) {
+ const ue = q[Y];
+ if (ue.link) {
+ const le = co("#" + i + ' [id="' + Y + '"]');
+ if (le) {
+ const be = T.createElementNS("http://www.w3.org/2000/svg", "a");
+ be.setAttributeNS("http://www.w3.org/2000/svg", "class", ue.classes.join(" ")), be.setAttributeNS("http://www.w3.org/2000/svg", "href", ue.link), be.setAttributeNS("http://www.w3.org/2000/svg", "rel", "noopener"), g === "sandbox" ? be.setAttributeNS("http://www.w3.org/2000/svg", "target", "_top") : ue.linkTarget && be.setAttributeNS("http://www.w3.org/2000/svg", "target", ue.linkTarget);
+ const ke = le.insert(function() {
+ return be;
+ }, ":first-child"), de = le.select(".label-container");
+ de && ke.append(function() {
+ return de.node();
+ });
+ const Te = le.select(".label");
+ Te && ke.append(function() {
+ return Te.node();
+ });
+ }
+ }
+ });
+} };
+var YNe = function() {
+ var r, i = function(de, Te, xe, ie) {
+ for (xe = xe || {}, ie = de.length; ie--; xe[de[ie]] = Te)
+ ;
+ return xe;
+ }, o = [1, 3], l = [1, 5], f = [7, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 25, 26, 28, 35, 40], g = [1, 15], A = [1, 16], b = [1, 17], v = [1, 18], k = [1, 19], _ = [1, 20], T = [1, 21], L = [1, 22], F = [1, 23], U = [1, 24], q = [1, 25], Z = [1, 26], R = [1, 27], J = [1, 29], he = [1, 31], Y = [1, 34], ue = [5, 7, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 25, 26, 28, 35, 40], le = { 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(de, Te, xe, ie, Be, te, Me) {
+ var ve = te.length - 1;
+ switch (Be) {
+ case 2:
+ return te[ve - 1];
+ case 3:
+ case 7:
+ case 8:
+ this.$ = [];
+ break;
+ case 4:
+ te[ve - 1].push(te[ve]), this.$ = te[ve - 1];
+ break;
+ case 5:
+ case 6:
+ this.$ = te[ve];
+ break;
+ case 9:
+ ie.setDateFormat(te[ve].substr(11)), this.$ = te[ve].substr(11);
+ break;
+ case 10:
+ ie.enableInclusiveEndDates(), this.$ = te[ve].substr(18);
+ break;
+ case 11:
+ ie.TopAxis(), this.$ = te[ve].substr(8);
+ break;
+ case 12:
+ ie.setAxisFormat(te[ve].substr(11)), this.$ = te[ve].substr(11);
+ break;
+ case 13:
+ ie.setTickInterval(te[ve].substr(13)), this.$ = te[ve].substr(13);
+ break;
+ case 14:
+ ie.setExcludes(te[ve].substr(9)), this.$ = te[ve].substr(9);
+ break;
+ case 15:
+ ie.setIncludes(te[ve].substr(9)), this.$ = te[ve].substr(9);
+ break;
+ case 16:
+ ie.setTodayMarker(te[ve].substr(12)), this.$ = te[ve].substr(12);
+ break;
+ case 17:
+ ie.setDiagramTitle(te[ve].substr(6)), this.$ = te[ve].substr(6);
+ break;
+ case 18:
+ this.$ = te[ve].trim(), ie.setAccTitle(this.$);
+ break;
+ case 19:
+ case 20:
+ this.$ = te[ve].trim(), ie.setAccDescription(this.$);
+ break;
+ case 21:
+ ie.addSection(te[ve].substr(8)), this.$ = te[ve].substr(8);
+ break;
+ case 23:
+ ie.addTask(te[ve - 1], te[ve]), this.$ = "task";
+ break;
+ case 27:
+ this.$ = te[ve - 1], ie.setClickEvent(te[ve - 1], te[ve], null);
+ break;
+ case 28:
+ this.$ = te[ve - 2], ie.setClickEvent(te[ve - 2], te[ve - 1], te[ve]);
+ break;
+ case 29:
+ this.$ = te[ve - 2], ie.setClickEvent(te[ve - 2], te[ve - 1], null), ie.setLink(te[ve - 2], te[ve]);
+ break;
+ case 30:
+ this.$ = te[ve - 3], ie.setClickEvent(te[ve - 3], te[ve - 2], te[ve - 1]), ie.setLink(te[ve - 3], te[ve]);
+ break;
+ case 31:
+ this.$ = te[ve - 2], ie.setClickEvent(te[ve - 2], te[ve], null), ie.setLink(te[ve - 2], te[ve - 1]);
+ break;
+ case 32:
+ this.$ = te[ve - 3], ie.setClickEvent(te[ve - 3], te[ve - 1], te[ve]), ie.setLink(te[ve - 3], te[ve - 2]);
+ break;
+ case 33:
+ this.$ = te[ve - 1], ie.setLink(te[ve - 1], te[ve]);
+ break;
+ case 34:
+ case 40:
+ this.$ = te[ve - 1] + " " + te[ve];
+ break;
+ case 35:
+ case 36:
+ case 38:
+ this.$ = te[ve - 2] + " " + te[ve - 1] + " " + te[ve];
+ break;
+ case 37:
+ case 39:
+ this.$ = te[ve - 3] + " " + te[ve - 2] + " " + te[ve - 1] + " " + te[ve];
+ break;
+ case 41:
+ ie.parseDirective("%%{", "open_directive");
+ break;
+ case 42:
+ ie.parseDirective(te[ve], "type_directive");
+ break;
+ case 43:
+ te[ve] = te[ve].trim().replace(/'/g, '"'), ie.parseDirective(te[ve], "arg_directive");
+ break;
+ case 44:
+ ie.parseDirective("}%%", "close_directive", "gantt");
+ }
+ }, table: [{ 3: 1, 4: 2, 5: o, 30: 4, 40: l }, { 1: [3] }, { 3: 6, 4: 2, 5: o, 30: 4, 40: l }, i(f, [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: g, 13: A, 14: b, 15: v, 16: k, 17: _, 18: T, 19: L, 20: F, 21: U, 23: q, 25: Z, 26: R, 27: 28, 28: J, 30: 4, 35: he, 40: l }, { 32: 32, 33: [1, 33], 43: Y }, i([33, 43], [2, 42]), i(f, [2, 8], { 1: [2, 2] }), i(f, [2, 4]), { 4: 30, 10: 35, 12: g, 13: A, 14: b, 15: v, 16: k, 17: _, 18: T, 19: L, 20: F, 21: U, 23: q, 25: Z, 26: R, 27: 28, 28: J, 30: 4, 35: he, 40: l }, i(f, [2, 6]), i(f, [2, 7]), i(f, [2, 9]), i(f, [2, 10]), i(f, [2, 11]), i(f, [2, 12]), i(f, [2, 13]), i(f, [2, 14]), i(f, [2, 15]), i(f, [2, 16]), i(f, [2, 17]), { 22: [1, 36] }, { 24: [1, 37] }, i(f, [2, 20]), i(f, [2, 21]), i(f, [2, 22]), { 29: [1, 38] }, i(f, [2, 24]), { 36: [1, 39], 38: [1, 40] }, { 11: [1, 41] }, { 34: 42, 42: [1, 43] }, { 11: [2, 44] }, i(f, [2, 5]), i(f, [2, 18]), i(f, [2, 19]), i(f, [2, 23]), i(f, [2, 27], { 37: [1, 44], 38: [1, 45] }), i(f, [2, 33], { 36: [1, 46] }), i(ue, [2, 25]), { 32: 47, 43: Y }, { 43: [2, 43] }, i(f, [2, 28], { 38: [1, 48] }), i(f, [2, 29]), i(f, [2, 31], { 37: [1, 49] }), { 11: [1, 50] }, i(f, [2, 30]), i(f, [2, 32]), i(ue, [2, 26])], defaultActions: { 5: [2, 41], 6: [2, 1], 34: [2, 44], 43: [2, 43] }, parseError: function(de, Te) {
+ if (!Te.recoverable) {
+ var xe = new Error(de);
+ throw xe.hash = Te, xe;
+ }
+ this.trace(de);
+ }, parse: function(de) {
+ var Te = this, xe = [0], ie = [], Be = [null], te = [], Me = this.table, ve = "", ge = 0, Je = 0, ot = te.slice.call(arguments, 1), bt = Object.create(this.lexer), gt = { yy: {} };
+ for (var je in this.yy)
+ Object.prototype.hasOwnProperty.call(this.yy, je) && (gt.yy[je] = this.yy[je]);
+ bt.setInput(de, gt.yy), gt.yy.lexer = bt, gt.yy.parser = this, bt.yylloc === void 0 && (bt.yylloc = {});
+ var Qe = bt.yylloc;
+ te.push(Qe);
+ var kt = bt.options && bt.options.ranges;
+ function Wt() {
+ var Ci;
+ return typeof (Ci = ie.pop() || bt.lex() || 1) != "number" && (Ci instanceof Array && (Ci = (ie = Ci).pop()), Ci = Te.symbols_[Ci] || Ci), Ci;
+ }
+ typeof gt.yy.parseError == "function" ? this.parseError = gt.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
+ for (var jt, Zn, Ft, wn, un, ln, an, Ot, $n = {}; ; ) {
+ if (Zn = xe[xe.length - 1], this.defaultActions[Zn] ? Ft = this.defaultActions[Zn] : (jt == null && (jt = Wt()), Ft = Me[Zn] && Me[Zn][jt]), Ft === void 0 || !Ft.length || !Ft[0]) {
+ var pt = "";
+ for (un in Ot = [], Me[Zn])
+ this.terminals_[un] && un > 2 && Ot.push("'" + this.terminals_[un] + "'");
+ pt = bt.showPosition ? "Parse error on line " + (ge + 1) + `:
+` + bt.showPosition() + `
+Expecting ` + Ot.join(", ") + ", got '" + (this.terminals_[jt] || jt) + "'" : "Parse error on line " + (ge + 1) + ": Unexpected " + (jt == 1 ? "end of input" : "'" + (this.terminals_[jt] || jt) + "'"), this.parseError(pt, { text: bt.match, token: this.terminals_[jt] || jt, line: bt.yylineno, loc: Qe, expected: Ot });
+ }
+ if (Ft[0] instanceof Array && Ft.length > 1)
+ throw new Error("Parse Error: multiple actions possible at state: " + Zn + ", token: " + jt);
+ switch (Ft[0]) {
+ case 1:
+ xe.push(jt), Be.push(bt.yytext), te.push(bt.yylloc), xe.push(Ft[1]), jt = null, Je = bt.yyleng, ve = bt.yytext, ge = bt.yylineno, Qe = bt.yylloc;
+ break;
+ case 2:
+ if (ln = this.productions_[Ft[1]][1], $n.$ = Be[Be.length - ln], $n._$ = { first_line: te[te.length - (ln || 1)].first_line, last_line: te[te.length - 1].last_line, first_column: te[te.length - (ln || 1)].first_column, last_column: te[te.length - 1].last_column }, kt && ($n._$.range = [te[te.length - (ln || 1)].range[0], te[te.length - 1].range[1]]), (wn = this.performAction.apply($n, [ve, Je, ge, gt.yy, Ft[1], Be, te].concat(ot))) !== void 0)
+ return wn;
+ ln && (xe = xe.slice(0, -1 * ln * 2), Be = Be.slice(0, -1 * ln), te = te.slice(0, -1 * ln)), xe.push(this.productions_[Ft[1]][0]), Be.push($n.$), te.push($n._$), an = Me[xe[xe.length - 2]][xe[xe.length - 1]], xe.push(an);
+ break;
+ case 3:
+ return !0;
+ }
+ }
+ return !0;
+ } }, be = (r = { EOF: 1, parseError: function(de, Te) {
+ if (!this.yy.parser)
+ throw new Error(de);
+ this.yy.parser.parseError(de, Te);
+ }, setInput: function(de, Te) {
+ return this.yy = Te || this.yy || {}, this._input = de, 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 de = this._input[0];
+ return this.yytext += de, this.yyleng++, this.offset++, this.match += de, this.matched += de, de.match(/(?:\r\n?|\n).*/g) ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), de;
+ }, unput: function(de) {
+ var Te = de.length, xe = de.split(/(?:\r\n?|\n)/g);
+ this._input = de + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - Te), this.offset -= Te;
+ var ie = 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), xe.length - 1 && (this.yylineno -= xe.length - 1);
+ var Be = 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: xe ? (xe.length === ie.length ? this.yylloc.first_column : 0) + ie[ie.length - xe.length].length - xe[0].length : this.yylloc.first_column - Te }, this.options.ranges && (this.yylloc.range = [Be[0], Be[0] + this.yyleng - Te]), this.yyleng = this.yytext.length, this;
+ }, more: function() {
+ return this._more = !0, this;
+ }, reject: function() {
+ return this.options.backtrack_lexer ? (this._backtrack = !0, this) : 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 });
+ }, less: function(de) {
+ this.unput(this.match.slice(de));
+ }, pastInput: function() {
+ var de = this.matched.substr(0, this.matched.length - this.match.length);
+ return (de.length > 20 ? "..." : "") + de.substr(-20).replace(/\n/g, "");
+ }, upcomingInput: function() {
+ var de = this.match;
+ return de.length < 20 && (de += this._input.substr(0, 20 - de.length)), (de.substr(0, 20) + (de.length > 20 ? "..." : "")).replace(/\n/g, "");
+ }, showPosition: function() {
+ var de = this.pastInput(), Te = new Array(de.length + 1).join("-");
+ return de + this.upcomingInput() + `
+` + Te + "^";
+ }, test_match: function(de, Te) {
+ var xe, ie, Be;
+ if (this.options.backtrack_lexer && (Be = { 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 && (Be.yylloc.range = this.yylloc.range.slice(0))), (ie = de[0].match(/(?:\r\n?|\n).*/g)) && (this.yylineno += ie.length), this.yylloc = { first_line: this.yylloc.last_line, last_line: this.yylineno + 1, first_column: this.yylloc.last_column, last_column: ie ? ie[ie.length - 1].length - ie[ie.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + de[0].length }, this.yytext += de[0], this.match += de[0], this.matches = de, 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(de[0].length), this.matched += de[0], xe = this.performAction.call(this, this.yy, this, Te, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), xe)
+ return xe;
+ if (this._backtrack) {
+ for (var te in Be)
+ this[te] = Be[te];
+ return !1;
+ }
+ return !1;
+ }, next: function() {
+ if (this.done)
+ return this.EOF;
+ var de, Te, xe, ie;
+ this._input || (this.done = !0), this._more || (this.yytext = "", this.match = "");
+ for (var Be = this._currentRules(), te = 0; te < Be.length; te++)
+ if ((xe = this._input.match(this.rules[Be[te]])) && (!Te || xe[0].length > Te[0].length)) {
+ if (Te = xe, ie = te, this.options.backtrack_lexer) {
+ if ((de = this.test_match(xe, Be[te])) !== !1)
+ return de;
+ if (this._backtrack) {
+ Te = !1;
+ continue;
+ }
+ return !1;
+ }
+ if (!this.options.flex)
+ break;
+ }
+ return Te ? (de = this.test_match(Te, Be[ie])) !== !1 && de : 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 de = this.next();
+ return de || this.lex();
+ }, begin: function(de) {
+ this.conditionStack.push(de);
+ }, popState: function() {
+ return this.conditionStack.length - 1 > 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(de) {
+ return (de = this.conditionStack.length - 1 - Math.abs(de || 0)) >= 0 ? this.conditionStack[de] : "INITIAL";
+ }, pushState: function(de) {
+ this.begin(de);
+ }, stateStackSize: function() {
+ return this.conditionStack.length;
+ }, options: { "case-insensitive": !0 }, performAction: function(de, Te, xe, ie) {
+ switch (xe) {
+ 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:
+ case 20:
+ case 23:
+ case 26:
+ case 29:
+ this.popState();
+ break;
+ case 11:
+ return "acc_descr_multiline_value";
+ case 12:
+ case 13:
+ case 14:
+ case 16:
+ case 17:
+ case 18:
+ break;
+ case 15:
+ return 11;
+ case 19:
+ this.begin("href");
+ break;
+ case 21:
+ return 38;
+ case 22:
+ this.begin("callbackname");
+ break;
+ case 24:
+ this.popState(), this.begin("callbackargs");
+ break;
+ case 25:
+ return 36;
+ case 27:
+ return 37;
+ case 28:
+ this.begin("click");
+ 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 } } }, r);
+ function ke() {
+ this.yy = {};
+ }
+ return le.lexer = be, ke.prototype = le, le.Parser = ke, new ke();
+}();
+YNe.parser = YNe;
+const n_n = YNe, r_n = (r) => r.match(/^\s*gantt/) !== null;
+b5.extend(WCn), b5.extend(VCn), b5.extend(qCn);
+let MOe, yT = "", FOe = "", OOe = "", gre = [], pre = [], DOe = {}, NOe = [], gpe = [], Vz = "";
+const _Ct = ["active", "done", "crit", "milestone"];
+let JNe = [], mre = !1, POe = !1, ROe = 0;
+const FIt = function(r, i, o, l) {
+ return !l.includes(r.format(i.trim())) && (!!(r.isoWeekday() >= 6 && o.includes("weekends")) || !!o.includes(r.format("dddd").toLowerCase()) || o.includes(r.format(i.trim())));
+}, OIt = function(r, i, o, l) {
+ if (!o.length || r.manualEndTime)
+ return;
+ let f, g;
+ f = r.startTime instanceof Date ? b5(r.startTime) : b5(r.startTime, i, !0), f = f.add(1, "d"), g = r.endTime instanceof Date ? b5(r.endTime) : b5(r.endTime, i, !0);
+ const [A, b] = i_n(f, g, i, o, l);
+ r.endTime = A.toDate(), r.renderEndTime = b;
+}, i_n = function(r, i, o, l, f) {
+ let g = !1, A = null;
+ for (; r <= i; )
+ g || (A = i.toDate()), g = FIt(r, o, l, f), g && (i = i.add(1, "d")), r = r.add(1, "d");
+ return [i, A];
+}, ZNe = function(r, i, o) {
+ o = o.trim();
+ const l = /^after\s+([\d\w- ]+)/.exec(o.trim());
+ if (l !== null) {
+ let g = null;
+ if (l[1].split(" ").forEach(function(A) {
+ let b = MG(A);
+ b !== void 0 && (g ? b.endTime > g.endTime && (g = b) : g = b);
+ }), g)
+ return g.endTime;
+ {
+ const A = /* @__PURE__ */ new Date();
+ return A.setHours(0, 0, 0, 0), A;
+ }
+ }
+ let f = b5(o, i.trim(), !0);
+ if (f.isValid())
+ return f.toDate();
+ {
+ _t.debug("Invalid date:" + o), _t.debug("With date format:" + i.trim());
+ const g = new Date(o);
+ if (g === void 0 || isNaN(g.getTime()))
+ throw new Error("Invalid date:" + o);
+ return g;
+ }
+}, DIt = function(r) {
+ const i = /^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(r.trim());
+ return i !== null ? [Number.parseFloat(i[1]), i[2]] : [NaN, "ms"];
+}, NIt = function(r, i, o, l = !1) {
+ o = o.trim();
+ let f = b5(o, i.trim(), !0);
+ if (f.isValid())
+ return l && (f = f.add(1, "d")), f.toDate();
+ let g = b5(r);
+ const [A, b] = DIt(o);
+ if (!Number.isNaN(A)) {
+ const v = g.add(A, b);
+ v.isValid() && (g = v);
+ }
+ return g.toDate();
+};
+let ePe = 0;
+const qz = function(r) {
+ return r === void 0 ? (ePe += 1, "task" + ePe) : r;
+};
+let QOe, ppe, sb = [];
+const PIt = {}, MG = function(r) {
+ const i = PIt[r];
+ return sb[i];
+}, ECt = function() {
+ const r = function(o) {
+ const l = sb[o];
+ let f = "";
+ switch (sb[o].raw.startTime.type) {
+ case "prevTaskEnd": {
+ const g = MG(l.prevTaskId);
+ l.startTime = g.endTime;
+ break;
+ }
+ case "getStartDate":
+ f = ZNe(0, yT, sb[o].raw.startTime.startData), f && (sb[o].startTime = f);
+ }
+ return sb[o].startTime && (sb[o].endTime = NIt(sb[o].startTime, yT, sb[o].raw.endTime.data, mre), sb[o].endTime && (sb[o].processed = !0, sb[o].manualEndTime = b5(sb[o].raw.endTime.data, "YYYY-MM-DD", !0).isValid(), OIt(sb[o], yT, pre, gre))), sb[o].processed;
+ };
+ let i = !0;
+ for (const [o, l] of sb.entries())
+ r(o), i = i && l.processed;
+ return i;
+}, TCt = function(r, i) {
+ r.split(",").forEach(function(o) {
+ let l = MG(o);
+ l !== void 0 && l.classes.push(i);
+ });
+}, BCt = function(r, i) {
+ JNe.push(function() {
+ const o = document.querySelector(`[id="${r}"]`);
+ o !== null && o.addEventListener("click", function() {
+ i();
+ });
+ }, function() {
+ const o = document.querySelector(`[id="${r}-text"]`);
+ o !== null && o.addEventListener("click", function() {
+ i();
+ });
+ });
+}, tPe = { parseDirective: function(r, i, o) {
+ n0.parseDirective(this, r, i, o);
+}, getConfig: () => Bn().gantt, clear: function() {
+ NOe = [], gpe = [], Vz = "", JNe = [], ePe = 0, QOe = void 0, ppe = void 0, sb = [], yT = "", FOe = "", MOe = void 0, OOe = "", gre = [], pre = [], mre = !1, POe = !1, ROe = 0, DOe = {}, w5();
+}, setDateFormat: function(r) {
+ yT = r;
+}, getDateFormat: function() {
+ return yT;
+}, enableInclusiveEndDates: function() {
+ mre = !0;
+}, endDatesAreInclusive: function() {
+ return mre;
+}, enableTopAxis: function() {
+ POe = !0;
+}, topAxisEnabled: function() {
+ return POe;
+}, setAxisFormat: function(r) {
+ FOe = r;
+}, getAxisFormat: function() {
+ return FOe;
+}, setTickInterval: function(r) {
+ MOe = r;
+}, getTickInterval: function() {
+ return MOe;
+}, setTodayMarker: function(r) {
+ OOe = r;
+}, getTodayMarker: function() {
+ return OOe;
+}, setAccTitle: k5, getAccTitle: _k, setDiagramTitle: q9, getDiagramTitle: Y9, setAccDescription: Ek, getAccDescription: Tk, addSection: function(r) {
+ Vz = r, NOe.push(r);
+}, getSections: function() {
+ return NOe;
+}, getTasks: function() {
+ let r = ECt(), i = 0;
+ for (; !r && i < 10; )
+ r = ECt(), i++;
+ return gpe = sb, gpe;
+}, addTask: function(r, i) {
+ const o = { section: Vz, type: Vz, processed: !1, manualEndTime: !1, renderEndTime: null, raw: { data: i }, task: r, classes: [] }, l = function(g, A) {
+ let b;
+ b = A.substr(0, 1) === ":" ? A.substr(1, A.length) : A;
+ const v = b.split(","), k = {};
+ SCt(v, k, _Ct);
+ for (let _ = 0; _ < v.length; _++)
+ v[_] = v[_].trim();
+ switch (v.length) {
+ case 1:
+ k.id = qz(), k.startTime = { type: "prevTaskEnd", id: g }, k.endTime = { data: v[0] };
+ break;
+ case 2:
+ k.id = qz(), k.startTime = { type: "getStartDate", startData: v[0] }, k.endTime = { data: v[1] };
+ break;
+ case 3:
+ k.id = qz(v[0]), k.startTime = { type: "getStartDate", startData: v[1] }, k.endTime = { data: v[2] };
+ }
+ return k;
+ }(ppe, i);
+ o.raw.startTime = l.startTime, o.raw.endTime = l.endTime, o.id = l.id, o.prevTaskId = ppe, o.active = l.active, o.done = l.done, o.crit = l.crit, o.milestone = l.milestone, o.order = ROe, ROe++;
+ const f = sb.push(o);
+ ppe = o.id, PIt[o.id] = f - 1;
+}, findTaskById: MG, addTaskOrg: function(r, i) {
+ const o = { section: Vz, type: Vz, description: r, task: r, classes: [] }, l = function(f, g) {
+ let A;
+ A = g.substr(0, 1) === ":" ? g.substr(1, g.length) : g;
+ const b = A.split(","), v = {};
+ SCt(b, v, _Ct);
+ for (let _ = 0; _ < b.length; _++)
+ b[_] = b[_].trim();
+ let k = "";
+ switch (b.length) {
+ case 1:
+ v.id = qz(), v.startTime = f.endTime, k = b[0];
+ break;
+ case 2:
+ v.id = qz(), v.startTime = ZNe(0, yT, b[0]), k = b[1];
+ break;
+ case 3:
+ v.id = qz(b[0]), v.startTime = ZNe(0, yT, b[1]), k = b[2];
+ }
+ return k && (v.endTime = NIt(v.startTime, yT, k, mre), v.manualEndTime = b5(k, "YYYY-MM-DD", !0).isValid(), OIt(v, yT, pre, gre)), v;
+ }(QOe, i);
+ o.startTime = l.startTime, o.endTime = l.endTime, o.id = l.id, o.active = l.active, o.done = l.done, o.crit = l.crit, o.milestone = l.milestone, QOe = o, gpe.push(o);
+}, setIncludes: function(r) {
+ gre = r.toLowerCase().split(/[\s,]+/);
+}, getIncludes: function() {
+ return gre;
+}, setExcludes: function(r) {
+ pre = r.toLowerCase().split(/[\s,]+/);
+}, getExcludes: function() {
+ return pre;
+}, setClickEvent: function(r, i, o) {
+ r.split(",").forEach(function(l) {
+ (function(f, g, A) {
+ if (Bn().securityLevel !== "loose" || g === void 0)
+ return;
+ let b = [];
+ if (typeof A == "string") {
+ b = A.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
+ for (let v = 0; v < b.length; v++) {
+ let k = b[v].trim();
+ k.charAt(0) === '"' && k.charAt(k.length - 1) === '"' && (k = k.substr(1, k.length - 2)), b[v] = k;
+ }
+ }
+ b.length === 0 && b.push(f), MG(f) !== void 0 && BCt(f, () => {
+ Tl.runFunc(g, ...b);
+ });
+ })(l, i, o);
+ }), TCt(r, "clickable");
+}, setLink: function(r, i) {
+ let o = i;
+ Bn().securityLevel !== "loose" && (o = u$(i)), r.split(",").forEach(function(l) {
+ MG(l) !== void 0 && (BCt(l, () => {
+ window.open(o, "_self");
+ }), DOe[l] = o);
+ }), TCt(r, "clickable");
+}, getLinks: function() {
+ return DOe;
+}, bindFunctions: function(r) {
+ JNe.forEach(function(i) {
+ i(r);
+ });
+}, parseDuration: DIt, isInvalidDate: FIt };
+function SCt(r, i, o) {
+ let l = !0;
+ for (; l; )
+ l = !1, o.forEach(function(f) {
+ const g = new RegExp("^\\s*" + f + "\\s*$");
+ r[0].match(g) && (i[f] = !0, r.shift(1), l = !0);
+ });
+}
+let XS;
+const a_n = { setConf: function() {
+ _t.debug("Something is calling, setConf, remove the call");
+}, draw: function(r, i, o, l) {
+ const f = Bn().gantt, g = Bn().securityLevel;
+ let A;
+ g === "sandbox" && (A = co("#i" + i));
+ const b = co(g === "sandbox" ? A.nodes()[0].contentDocument.body : "body"), v = g === "sandbox" ? A.nodes()[0].contentDocument : document, k = v.getElementById(i);
+ XS = k.parentElement.offsetWidth, XS === void 0 && (XS = 1200), f.useWidth !== void 0 && (XS = f.useWidth);
+ const _ = l.db.getTasks(), T = _.length * (f.barHeight + f.barGap) + 2 * f.topPadding;
+ k.setAttribute("viewBox", "0 0 " + XS + " " + T);
+ const L = b.select(`[id="${i}"]`), F = function() {
+ return yRe.apply(IBt(i5n, a5n, f$, Xpe, _G, CG, Gpe, zpe, ore, Wpe).domain([new Date(2e3, 0, 1), new Date(2e3, 0, 2)]), arguments);
+ }().domain([Kwn(_, function(R) {
+ return R.startTime;
+ }), jwn(_, function(R) {
+ return R.endTime;
+ })]).rangeRound([0, XS - f.leftPadding - f.rightPadding]);
+ let U = [];
+ for (const R of _)
+ U.push(R.type);
+ const q = U;
+ function Z(R, J) {
+ return function(he) {
+ let Y = he.length;
+ const ue = {};
+ for (; Y; )
+ ue[he[--Y]] = (ue[he[Y]] || 0) + 1;
+ return ue;
+ }(J)[R] || 0;
+ }
+ U = function(R) {
+ const J = {}, he = [];
+ for (let Y = 0, ue = R.length; Y < ue; ++Y)
+ Object.prototype.hasOwnProperty.call(J, R[Y]) || (J[R[Y]] = !0, he.push(R[Y]));
+ return he;
+ }(U), _.sort(function(R, J) {
+ const he = R.startTime, Y = J.startTime;
+ let ue = 0;
+ return he > Y ? ue = 1 : he < Y && (ue = -1), ue;
+ }), function(R, J, he) {
+ const Y = f.barHeight, ue = Y + f.barGap, le = f.topPadding, be = f.leftPadding;
+ gBt().domain([0, U.length]).range(["#00B9FA", "#F95002"]).interpolate(l4n), function(ke, de, Te, xe, ie, Be, te, Me) {
+ const ve = Be.reduce((je, { startTime: Qe }) => je ? Math.min(je, Qe) : Qe, 0), ge = Be.reduce((je, { endTime: Qe }) => je ? Math.max(je, Qe) : Qe, 0), Je = l.db.getDateFormat();
+ if (!ve || !ge)
+ return;
+ const ot = [];
+ let bt = null, gt = b5(ve);
+ for (; gt.valueOf() <= ge; )
+ l.db.isInvalidDate(gt, Je, te, Me) ? bt ? bt.end = gt : bt = { start: gt, end: gt } : bt && (ot.push(bt), bt = null), gt = gt.add(1, "d");
+ L.append("g").selectAll("rect").data(ot).enter().append("rect").attr("id", function(je) {
+ return "exclude-" + je.start.format("YYYY-MM-DD");
+ }).attr("x", function(je) {
+ return F(je.start) + Te;
+ }).attr("y", f.gridLineStartPadding).attr("width", function(je) {
+ const Qe = je.end.add(1, "day");
+ return F(Qe) - F(je.start);
+ }).attr("height", ie - de - f.gridLineStartPadding).attr("transform-origin", function(je, Qe) {
+ return (F(je.start) + Te + 0.5 * (F(je.end) - F(je.start))).toString() + "px " + (Qe * ke + 0.5 * ie).toString() + "px";
+ }).attr("class", "exclude-range");
+ }(ue, le, be, 0, he, R, l.db.getExcludes(), l.db.getIncludes()), function(ke, de, Te, xe) {
+ let ie = (Be = F, wkt(iNe, Be)).tickSize(-xe + de + f.gridLineStartPadding).tickFormat(Wpe(l.db.getAxisFormat() || f.axisFormat || "%Y-%m-%d"));
+ var Be;
+ const te = /^([1-9]\d*)(minute|hour|day|week|month)$/.exec(l.db.getTickInterval() || f.tickInterval);
+ if (te !== null) {
+ const Me = te[1];
+ switch (te[2]) {
+ case "minute":
+ ie.ticks(zpe.every(Me));
+ break;
+ case "hour":
+ ie.ticks(Gpe.every(Me));
+ break;
+ case "day":
+ ie.ticks(CG.every(Me));
+ break;
+ case "week":
+ ie.ticks(_G.every(Me));
+ break;
+ case "month":
+ ie.ticks(Xpe.every(Me));
+ }
+ }
+ if (L.append("g").attr("class", "grid").attr("transform", "translate(" + ke + ", " + (xe - 50) + ")").call(ie).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10).attr("dy", "1em"), l.db.topAxisEnabled() || f.topAxis) {
+ let Me = function(ve) {
+ return wkt(Rpe, ve);
+ }(F).tickSize(-xe + de + f.gridLineStartPadding).tickFormat(Wpe(l.db.getAxisFormat() || f.axisFormat || "%Y-%m-%d"));
+ if (te !== null) {
+ const ve = te[1];
+ switch (te[2]) {
+ case "minute":
+ Me.ticks(zpe.every(ve));
+ break;
+ case "hour":
+ Me.ticks(Gpe.every(ve));
+ break;
+ case "day":
+ Me.ticks(CG.every(ve));
+ break;
+ case "week":
+ Me.ticks(_G.every(ve));
+ break;
+ case "month":
+ Me.ticks(Xpe.every(ve));
+ }
+ }
+ L.append("g").attr("class", "grid").attr("transform", "translate(" + ke + ", " + de + ")").call(Me).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10);
+ }
+ }(be, le, 0, he), function(ke, de, Te, xe, ie, Be, te) {
+ L.append("g").selectAll("rect").data(ke).enter().append("rect").attr("x", 0).attr("y", function(ge, Je) {
+ return ge.order * de + Te - 2;
+ }).attr("width", function() {
+ return te - f.rightPadding / 2;
+ }).attr("height", de).attr("class", function(ge) {
+ for (const [Je, ot] of U.entries())
+ if (ge.type === ot)
+ return "section section" + Je % f.numberSectionStyles;
+ return "section section0";
+ });
+ const Me = L.append("g").selectAll("rect").data(ke).enter(), ve = l.db.getLinks();
+ if (Me.append("rect").attr("id", function(ge) {
+ return ge.id;
+ }).attr("rx", 3).attr("ry", 3).attr("x", function(ge) {
+ return ge.milestone ? F(ge.startTime) + xe + 0.5 * (F(ge.endTime) - F(ge.startTime)) - 0.5 * ie : F(ge.startTime) + xe;
+ }).attr("y", function(ge, Je) {
+ return ge.order * de + Te;
+ }).attr("width", function(ge) {
+ return ge.milestone ? ie : F(ge.renderEndTime || ge.endTime) - F(ge.startTime);
+ }).attr("height", ie).attr("transform-origin", function(ge, Je) {
+ return Je = ge.order, (F(ge.startTime) + xe + 0.5 * (F(ge.endTime) - F(ge.startTime))).toString() + "px " + (Je * de + Te + 0.5 * ie).toString() + "px";
+ }).attr("class", function(ge) {
+ const Je = "task";
+ let ot = "";
+ ge.classes.length > 0 && (ot = ge.classes.join(" "));
+ let bt = 0;
+ for (const [je, Qe] of U.entries())
+ ge.type === Qe && (bt = je % f.numberSectionStyles);
+ let gt = "";
+ return ge.active ? ge.crit ? gt += " activeCrit" : gt = " active" : ge.done ? gt = ge.crit ? " doneCrit" : " done" : ge.crit && (gt += " crit"), gt.length === 0 && (gt = " task"), ge.milestone && (gt = " milestone " + gt), gt += bt, gt += " " + ot, Je + gt;
+ }), Me.append("text").attr("id", function(ge) {
+ return ge.id + "-text";
+ }).text(function(ge) {
+ return ge.task;
+ }).attr("font-size", f.fontSize).attr("x", function(ge) {
+ let Je = F(ge.startTime), ot = F(ge.renderEndTime || ge.endTime);
+ ge.milestone && (Je += 0.5 * (F(ge.endTime) - F(ge.startTime)) - 0.5 * ie), ge.milestone && (ot = Je + ie);
+ const bt = this.getBBox().width;
+ return bt > ot - Je ? ot + bt + 1.5 * f.leftPadding > te ? Je + xe - 5 : ot + xe + 5 : (ot - Je) / 2 + Je + xe;
+ }).attr("y", function(ge, Je) {
+ return ge.order * de + f.barHeight / 2 + (f.fontSize / 2 - 2) + Te;
+ }).attr("text-height", ie).attr("class", function(ge) {
+ const Je = F(ge.startTime);
+ let ot = F(ge.endTime);
+ ge.milestone && (ot = Je + ie);
+ const bt = this.getBBox().width;
+ let gt = "";
+ ge.classes.length > 0 && (gt = ge.classes.join(" "));
+ let je = 0;
+ for (const [kt, Wt] of U.entries())
+ ge.type === Wt && (je = kt % f.numberSectionStyles);
+ let Qe = "";
+ return ge.active && (Qe = ge.crit ? "activeCritText" + je : "activeText" + je), ge.done ? Qe = ge.crit ? Qe + " doneCritText" + je : Qe + " doneText" + je : ge.crit && (Qe = Qe + " critText" + je), ge.milestone && (Qe += " milestoneText"), bt > ot - Je ? ot + bt + 1.5 * f.leftPadding > te ? gt + " taskTextOutsideLeft taskTextOutside" + je + " " + Qe : gt + " taskTextOutsideRight taskTextOutside" + je + " " + Qe + " width-" + bt : gt + " taskText taskText" + je + " " + Qe + " width-" + bt;
+ }), Bn().securityLevel === "sandbox") {
+ let ge;
+ ge = co("#i" + i);
+ const Je = ge.nodes()[0].contentDocument;
+ Me.filter(function(ot) {
+ return ve[ot.id] !== void 0;
+ }).each(function(ot) {
+ var bt = Je.querySelector("#" + ot.id), gt = Je.querySelector("#" + ot.id + "-text");
+ const je = bt.parentNode;
+ var Qe = Je.createElement("a");
+ Qe.setAttribute("xlink:href", ve[ot.id]), Qe.setAttribute("target", "_top"), je.appendChild(Qe), Qe.appendChild(bt), Qe.appendChild(gt);
+ });
+ }
+ }(R, ue, le, be, Y, 0, J), function(ke, de) {
+ const Te = [];
+ let xe = 0;
+ for (const [ie, Be] of U.entries())
+ Te[ie] = [Be, Z(Be, q)];
+ L.append("g").selectAll("text").data(Te).enter().append(function(ie) {
+ const Be = ie[0].split(El.lineBreakRegex), te = -(Be.length - 1) / 2, Me = v.createElementNS("http://www.w3.org/2000/svg", "text");
+ Me.setAttribute("dy", te + "em");
+ for (const [ve, ge] of Be.entries()) {
+ const Je = v.createElementNS("http://www.w3.org/2000/svg", "tspan");
+ Je.setAttribute("alignment-baseline", "central"), Je.setAttribute("x", "10"), ve > 0 && Je.setAttribute("dy", "1em"), Je.textContent = ge, Me.appendChild(Je);
+ }
+ return Me;
+ }).attr("x", 10).attr("y", function(ie, Be) {
+ if (!(Be > 0))
+ return ie[1] * ke / 2 + de;
+ for (let te = 0; te < Be; te++)
+ return xe += Te[Be - 1][1], ie[1] * ke / 2 + xe * ke + de;
+ }).attr("font-size", f.sectionFontSize).attr("font-size", f.sectionFontSize).attr("class", function(ie) {
+ for (const [Be, te] of U.entries())
+ if (ie[0] === te)
+ return "sectionTitle sectionTitle" + Be % f.numberSectionStyles;
+ return "sectionTitle";
+ });
+ }(ue, le), function(ke, de, Te, xe) {
+ const ie = l.db.getTodayMarker();
+ if (ie === "off")
+ return;
+ const Be = L.append("g").attr("class", "today"), te = /* @__PURE__ */ new Date(), Me = Be.append("line");
+ Me.attr("x1", F(te) + ke).attr("x2", F(te) + ke).attr("y1", f.titleTopMargin).attr("y2", xe - f.titleTopMargin).attr("class", "today"), ie !== "" && Me.attr("style", ie.replace(/,/g, ";"));
+ }(be, 0, 0, he);
+ }(_, XS, T), V9(L, T, XS, f.useMaxWidth), L.append("text").text(l.db.getDiagramTitle()).attr("x", XS / 2).attr("y", f.titleTopMargin).attr("class", "titleText");
+} };
+var nPe = function() {
+ var r, i = function(A, b, v, k) {
+ for (v = v || {}, k = A.length; k--; v[A[k]] = b)
+ ;
+ return v;
+ }, o = [6, 9, 10], l = { 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, b, v, k, _, T, L) {
+ switch (T.length, _) {
+ case 1:
+ return k;
+ case 4:
+ break;
+ case 6:
+ k.setInfo(!0);
+ }
+ }, table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, i(o, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: 6, 9: [1, 7], 10: [1, 8] }, { 1: [2, 1] }, i(o, [2, 3]), i(o, [2, 4]), i(o, [2, 5]), i(o, [2, 6])], defaultActions: { 4: [2, 1] }, parseError: function(A, b) {
+ if (!b.recoverable) {
+ var v = new Error(A);
+ throw v.hash = b, v;
+ }
+ this.trace(A);
+ }, parse: function(A) {
+ var b = this, v = [0], k = [], _ = [null], T = [], L = this.table, F = "", U = 0, q = 0, Z = T.slice.call(arguments, 1), R = Object.create(this.lexer), J = { yy: {} };
+ for (var he in this.yy)
+ Object.prototype.hasOwnProperty.call(this.yy, he) && (J.yy[he] = this.yy[he]);
+ R.setInput(A, J.yy), J.yy.lexer = R, J.yy.parser = this, R.yylloc === void 0 && (R.yylloc = {});
+ var Y = R.yylloc;
+ T.push(Y);
+ var ue = R.options && R.options.ranges;
+ function le() {
+ var ge;
+ return typeof (ge = k.pop() || R.lex() || 1) != "number" && (ge instanceof Array && (ge = (k = ge).pop()), ge = b.symbols_[ge] || ge), ge;
+ }
+ typeof J.yy.parseError == "function" ? this.parseError = J.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
+ for (var be, ke, de, Te, xe, ie, Be, te, Me = {}; ; ) {
+ if (ke = v[v.length - 1], this.defaultActions[ke] ? de = this.defaultActions[ke] : (be == null && (be = le()), de = L[ke] && L[ke][be]), de === void 0 || !de.length || !de[0]) {
+ var ve = "";
+ for (xe in te = [], L[ke])
+ this.terminals_[xe] && xe > 2 && te.push("'" + this.terminals_[xe] + "'");
+ ve = R.showPosition ? "Parse error on line " + (U + 1) + `:
+` + R.showPosition() + `
+Expecting ` + te.join(", ") + ", got '" + (this.terminals_[be] || be) + "'" : "Parse error on line " + (U + 1) + ": Unexpected " + (be == 1 ? "end of input" : "'" + (this.terminals_[be] || be) + "'"), this.parseError(ve, { text: R.match, token: this.terminals_[be] || be, line: R.yylineno, loc: Y, expected: te });
+ }
+ if (de[0] instanceof Array && de.length > 1)
+ throw new Error("Parse Error: multiple actions possible at state: " + ke + ", token: " + be);
+ switch (de[0]) {
+ case 1:
+ v.push(be), _.push(R.yytext), T.push(R.yylloc), v.push(de[1]), be = null, q = R.yyleng, F = R.yytext, U = R.yylineno, Y = R.yylloc;
+ break;
+ case 2:
+ if (ie = this.productions_[de[1]][1], Me.$ = _[_.length - ie], Me._$ = { first_line: T[T.length - (ie || 1)].first_line, last_line: T[T.length - 1].last_line, first_column: T[T.length - (ie || 1)].first_column, last_column: T[T.length - 1].last_column }, ue && (Me._$.range = [T[T.length - (ie || 1)].range[0], T[T.length - 1].range[1]]), (Te = this.performAction.apply(Me, [F, q, U, J.yy, de[1], _, T].concat(Z))) !== void 0)
+ return Te;
+ ie && (v = v.slice(0, -1 * ie * 2), _ = _.slice(0, -1 * ie), T = T.slice(0, -1 * ie)), v.push(this.productions_[de[1]][0]), _.push(Me.$), T.push(Me._$), Be = L[v[v.length - 2]][v[v.length - 1]], v.push(Be);
+ break;
+ case 3:
+ return !0;
+ }
+ }
+ return !0;
+ } }, f = (r = { EOF: 1, parseError: function(A, b) {
+ if (!this.yy.parser)
+ throw new Error(A);
+ this.yy.parser.parseError(A, b);
+ }, setInput: function(A, b) {
+ return this.yy = b || 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];
+ return this.yytext += A, this.yyleng++, this.offset++, this.match += A, this.matched += A, A.match(/(?:\r\n?|\n).*/g) ? (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 b = A.length, v = A.split(/(?:\r\n?|\n)/g);
+ this._input = A + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - b), this.offset -= b;
+ var k = this.match.split(/(?:\r\n?|\n)/g);
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), v.length - 1 && (this.yylineno -= v.length - 1);
+ var _ = 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 === k.length ? this.yylloc.first_column : 0) + k[k.length - v.length].length - v[0].length : this.yylloc.first_column - b }, this.options.ranges && (this.yylloc.range = [_[0], _[0] + this.yyleng - b]), this.yyleng = this.yytext.length, this;
+ }, more: function() {
+ return this._more = !0, this;
+ }, reject: function() {
+ return this.options.backtrack_lexer ? (this._backtrack = !0, this) : 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 });
+ }, 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(), b = new Array(A.length + 1).join("-");
+ return A + this.upcomingInput() + `
+` + b + "^";
+ }, test_match: function(A, b) {
+ var v, k, _;
+ if (this.options.backtrack_lexer && (_ = { 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 && (_.yylloc.range = this.yylloc.range.slice(0))), (k = A[0].match(/(?:\r\n?|\n).*/g)) && (this.yylineno += k.length), this.yylloc = { first_line: this.yylloc.last_line, last_line: this.yylineno + 1, first_column: this.yylloc.last_column, last_column: k ? k[k.length - 1].length - k[k.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + 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], v = this.performAction.call(this, this.yy, this, b, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), v)
+ return v;
+ if (this._backtrack) {
+ for (var T in _)
+ this[T] = _[T];
+ return !1;
+ }
+ return !1;
+ }, next: function() {
+ if (this.done)
+ return this.EOF;
+ var A, b, v, k;
+ this._input || (this.done = !0), this._more || (this.yytext = "", this.match = "");
+ for (var _ = this._currentRules(), T = 0; T < _.length; T++)
+ if ((v = this._input.match(this.rules[_[T]])) && (!b || v[0].length > b[0].length)) {
+ if (b = v, k = T, this.options.backtrack_lexer) {
+ if ((A = this.test_match(v, _[T])) !== !1)
+ return A;
+ if (this._backtrack) {
+ b = !1;
+ continue;
+ }
+ return !1;
+ }
+ if (!this.options.flex)
+ break;
+ }
+ return b ? (A = this.test_match(b, _[k])) !== !1 && A : 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() {
+ return this.conditionStack.length - 1 > 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)) >= 0 ? this.conditionStack[A] : "INITIAL";
+ }, pushState: function(A) {
+ this.begin(A);
+ }, stateStackSize: function() {
+ return this.conditionStack.length;
+ }, options: { "case-insensitive": !0 }, performAction: function(A, b, v, k) {
+ switch (v) {
+ 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 } } }, r);
+ function g() {
+ this.yy = {};
+ }
+ return l.lexer = f, g.prototype = l, l.Parser = g, new g();
+}();
+nPe.parser = nPe;
+const o_n = nPe;
+var LCt = "", ICt = !1;
+const s_n = { setMessage: (r) => {
+ _t.debug("Setting message to: " + r), LCt = r;
+}, getMessage: () => LCt, setInfo: (r) => {
+ ICt = r;
+}, getInfo: () => ICt, clear: w5 }, c_n = { draw: (r, i, o) => {
+ try {
+ _t.debug(`Rendering info diagram
+` + r);
+ const l = Bn().securityLevel;
+ let f;
+ l === "sandbox" && (f = co("#i" + i));
+ const g = co(l === "sandbox" ? f.nodes()[0].contentDocument.body : "body").select("#" + i);
+ g.append("g").append("text").attr("x", 100).attr("y", 40).attr("class", "version").attr("font-size", "32px").style("text-anchor", "middle").text("v " + o), g.attr("height", 100), g.attr("width", 400);
+ } catch (l) {
+ _t.error("Error while rendering info diagram"), _t.error(l.message);
+ }
+} }, l_n = (r) => r.match(/^\s*info/) !== null;
+var rPe = function() {
+ var r, i = function(be, ke, de, Te) {
+ for (de = de || {}, Te = be.length; Te--; de[be[Te]] = ke)
+ ;
+ return de;
+ }, o = [1, 4], l = [1, 5], f = [1, 6], g = [1, 7], A = [1, 9], b = [1, 11, 13, 15, 17, 19, 20, 26, 27, 28, 29], v = [2, 5], k = [1, 6, 11, 13, 15, 17, 19, 20, 26, 27, 28, 29], _ = [26, 27, 28], T = [2, 8], L = [1, 18], F = [1, 19], U = [1, 20], q = [1, 21], Z = [1, 22], R = [1, 23], J = [1, 28], he = [6, 26, 27, 28, 29], Y = { 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(be, ke, de, Te, xe, ie, Be) {
+ var te = ie.length - 1;
+ switch (xe) {
+ case 4:
+ Te.setShowData(!0);
+ break;
+ case 7:
+ this.$ = ie[te - 1];
+ break;
+ case 9:
+ Te.addSection(ie[te - 1], Te.cleanupValue(ie[te]));
+ break;
+ case 10:
+ this.$ = ie[te].trim(), Te.setDiagramTitle(this.$);
+ break;
+ case 11:
+ this.$ = ie[te].trim(), Te.setAccTitle(this.$);
+ break;
+ case 12:
+ case 13:
+ this.$ = ie[te].trim(), Te.setAccDescription(this.$);
+ break;
+ case 14:
+ Te.addSection(ie[te].substr(8)), this.$ = ie[te].substr(8);
+ break;
+ case 21:
+ Te.parseDirective("%%{", "open_directive");
+ break;
+ case 22:
+ Te.parseDirective(ie[te], "type_directive");
+ break;
+ case 23:
+ ie[te] = ie[te].trim().replace(/'/g, '"'), Te.parseDirective(ie[te], "arg_directive");
+ break;
+ case 24:
+ Te.parseDirective("}%%", "close_directive", "pie");
+ }
+ }, table: [{ 3: 1, 4: 2, 5: 3, 6: o, 21: 8, 26: l, 27: f, 28: g, 29: A }, { 1: [3] }, { 3: 10, 4: 2, 5: 3, 6: o, 21: 8, 26: l, 27: f, 28: g, 29: A }, { 3: 11, 4: 2, 5: 3, 6: o, 21: 8, 26: l, 27: f, 28: g, 29: A }, i(b, v, { 7: 12, 8: [1, 13] }), i(k, [2, 18]), i(k, [2, 19]), i(k, [2, 20]), { 22: 14, 30: [1, 15] }, { 30: [2, 21] }, { 1: [2, 1] }, { 1: [2, 2] }, i(_, T, { 21: 8, 9: 16, 10: 17, 5: 24, 1: [2, 3], 11: L, 13: F, 15: U, 17: q, 19: Z, 20: R, 29: A }), i(b, v, { 7: 25 }), { 23: 26, 24: [1, 27], 32: J }, i([24, 32], [2, 22]), i(b, [2, 6]), { 4: 29, 26: l, 27: f, 28: g }, { 12: [1, 30] }, { 14: [1, 31] }, { 16: [1, 32] }, { 18: [1, 33] }, i(_, [2, 13]), i(_, [2, 14]), i(_, [2, 15]), i(_, T, { 21: 8, 9: 16, 10: 17, 5: 24, 1: [2, 4], 11: L, 13: F, 15: U, 17: q, 19: Z, 20: R, 29: A }), i(he, [2, 16]), { 25: 34, 31: [1, 35] }, i(he, [2, 24]), i(b, [2, 7]), i(_, [2, 9]), i(_, [2, 10]), i(_, [2, 11]), i(_, [2, 12]), { 23: 36, 32: J }, { 32: [2, 23] }, i(he, [2, 17])], defaultActions: { 9: [2, 21], 10: [2, 1], 11: [2, 2], 35: [2, 23] }, parseError: function(be, ke) {
+ if (!ke.recoverable) {
+ var de = new Error(be);
+ throw de.hash = ke, de;
+ }
+ this.trace(be);
+ }, parse: function(be) {
+ var ke = this, de = [0], Te = [], xe = [null], ie = [], Be = this.table, te = "", Me = 0, ve = 0, ge = ie.slice.call(arguments, 1), Je = Object.create(this.lexer), ot = { yy: {} };
+ for (var bt in this.yy)
+ Object.prototype.hasOwnProperty.call(this.yy, bt) && (ot.yy[bt] = this.yy[bt]);
+ Je.setInput(be, ot.yy), ot.yy.lexer = Je, ot.yy.parser = this, Je.yylloc === void 0 && (Je.yylloc = {});
+ var gt = Je.yylloc;
+ ie.push(gt);
+ var je = Je.options && Je.options.ranges;
+ function Qe() {
+ var $n;
+ return typeof ($n = Te.pop() || Je.lex() || 1) != "number" && ($n instanceof Array && ($n = (Te = $n).pop()), $n = ke.symbols_[$n] || $n), $n;
+ }
+ typeof ot.yy.parseError == "function" ? this.parseError = ot.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
+ for (var kt, Wt, jt, Zn, Ft, wn, un, ln, an = {}; ; ) {
+ if (Wt = de[de.length - 1], this.defaultActions[Wt] ? jt = this.defaultActions[Wt] : (kt == null && (kt = Qe()), jt = Be[Wt] && Be[Wt][kt]), jt === void 0 || !jt.length || !jt[0]) {
+ var Ot = "";
+ for (Ft in ln = [], Be[Wt])
+ this.terminals_[Ft] && Ft > 2 && ln.push("'" + this.terminals_[Ft] + "'");
+ Ot = Je.showPosition ? "Parse error on line " + (Me + 1) + `:
+` + Je.showPosition() + `
+Expecting ` + ln.join(", ") + ", got '" + (this.terminals_[kt] || kt) + "'" : "Parse error on line " + (Me + 1) + ": Unexpected " + (kt == 1 ? "end of input" : "'" + (this.terminals_[kt] || kt) + "'"), this.parseError(Ot, { text: Je.match, token: this.terminals_[kt] || kt, line: Je.yylineno, loc: gt, expected: ln });
+ }
+ if (jt[0] instanceof Array && jt.length > 1)
+ throw new Error("Parse Error: multiple actions possible at state: " + Wt + ", token: " + kt);
+ switch (jt[0]) {
+ case 1:
+ de.push(kt), xe.push(Je.yytext), ie.push(Je.yylloc), de.push(jt[1]), kt = null, ve = Je.yyleng, te = Je.yytext, Me = Je.yylineno, gt = Je.yylloc;
+ break;
+ case 2:
+ if (wn = this.productions_[jt[1]][1], an.$ = xe[xe.length - wn], an._$ = { first_line: ie[ie.length - (wn || 1)].first_line, last_line: ie[ie.length - 1].last_line, first_column: ie[ie.length - (wn || 1)].first_column, last_column: ie[ie.length - 1].last_column }, je && (an._$.range = [ie[ie.length - (wn || 1)].range[0], ie[ie.length - 1].range[1]]), (Zn = this.performAction.apply(an, [te, ve, Me, ot.yy, jt[1], xe, ie].concat(ge))) !== void 0)
+ return Zn;
+ wn && (de = de.slice(0, -1 * wn * 2), xe = xe.slice(0, -1 * wn), ie = ie.slice(0, -1 * wn)), de.push(this.productions_[jt[1]][0]), xe.push(an.$), ie.push(an._$), un = Be[de[de.length - 2]][de[de.length - 1]], de.push(un);
+ break;
+ case 3:
+ return !0;
+ }
+ }
+ return !0;
+ } }, ue = (r = { EOF: 1, parseError: function(be, ke) {
+ if (!this.yy.parser)
+ throw new Error(be);
+ this.yy.parser.parseError(be, ke);
+ }, setInput: function(be, ke) {
+ return this.yy = ke || this.yy || {}, this._input = be, 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 be = this._input[0];
+ return this.yytext += be, this.yyleng++, this.offset++, this.match += be, this.matched += be, be.match(/(?:\r\n?|\n).*/g) ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), be;
+ }, unput: function(be) {
+ var ke = be.length, de = be.split(/(?:\r\n?|\n)/g);
+ this._input = be + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - ke), this.offset -= ke;
+ var Te = 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), de.length - 1 && (this.yylineno -= de.length - 1);
+ var xe = 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: de ? (de.length === Te.length ? this.yylloc.first_column : 0) + Te[Te.length - de.length].length - de[0].length : this.yylloc.first_column - ke }, this.options.ranges && (this.yylloc.range = [xe[0], xe[0] + this.yyleng - ke]), this.yyleng = this.yytext.length, this;
+ }, more: function() {
+ return this._more = !0, this;
+ }, reject: function() {
+ return this.options.backtrack_lexer ? (this._backtrack = !0, this) : 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 });
+ }, less: function(be) {
+ this.unput(this.match.slice(be));
+ }, pastInput: function() {
+ var be = this.matched.substr(0, this.matched.length - this.match.length);
+ return (be.length > 20 ? "..." : "") + be.substr(-20).replace(/\n/g, "");
+ }, upcomingInput: function() {
+ var be = this.match;
+ return be.length < 20 && (be += this._input.substr(0, 20 - be.length)), (be.substr(0, 20) + (be.length > 20 ? "..." : "")).replace(/\n/g, "");
+ }, showPosition: function() {
+ var be = this.pastInput(), ke = new Array(be.length + 1).join("-");
+ return be + this.upcomingInput() + `
+` + ke + "^";
+ }, test_match: function(be, ke) {
+ var de, Te, xe;
+ if (this.options.backtrack_lexer && (xe = { 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 && (xe.yylloc.range = this.yylloc.range.slice(0))), (Te = be[0].match(/(?:\r\n?|\n).*/g)) && (this.yylineno += Te.length), this.yylloc = { first_line: this.yylloc.last_line, last_line: this.yylineno + 1, first_column: this.yylloc.last_column, last_column: Te ? Te[Te.length - 1].length - Te[Te.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + be[0].length }, this.yytext += be[0], this.match += be[0], this.matches = be, 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(be[0].length), this.matched += be[0], de = this.performAction.call(this, this.yy, this, ke, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), de)
+ return de;
+ if (this._backtrack) {
+ for (var ie in xe)
+ this[ie] = xe[ie];
+ return !1;
+ }
+ return !1;
+ }, next: function() {
+ if (this.done)
+ return this.EOF;
+ var be, ke, de, Te;
+ this._input || (this.done = !0), this._more || (this.yytext = "", this.match = "");
+ for (var xe = this._currentRules(), ie = 0; ie < xe.length; ie++)
+ if ((de = this._input.match(this.rules[xe[ie]])) && (!ke || de[0].length > ke[0].length)) {
+ if (ke = de, Te = ie, this.options.backtrack_lexer) {
+ if ((be = this.test_match(de, xe[ie])) !== !1)
+ return be;
+ if (this._backtrack) {
+ ke = !1;
+ continue;
+ }
+ return !1;
+ }
+ if (!this.options.flex)
+ break;
+ }
+ return ke ? (be = this.test_match(ke, xe[Te])) !== !1 && be : 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 be = this.next();
+ return be || this.lex();
+ }, begin: function(be) {
+ this.conditionStack.push(be);
+ }, popState: function() {
+ return this.conditionStack.length - 1 > 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(be) {
+ return (be = this.conditionStack.length - 1 - Math.abs(be || 0)) >= 0 ? this.conditionStack[be] : "INITIAL";
+ }, pushState: function(be) {
+ this.begin(be);
+ }, stateStackSize: function() {
+ return this.conditionStack.length;
+ }, options: { "case-insensitive": !0 }, performAction: function(be, ke, de, Te) {
+ switch (de) {
+ 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:
+ case 6:
+ case 8:
+ case 9:
+ break;
+ case 7:
+ return 26;
+ 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:
+ case 20:
+ this.popState();
+ break;
+ case 18:
+ return "acc_descr_multiline_value";
+ case 19:
+ this.begin("string");
+ 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 } } }, r);
+ function le() {
+ this.yy = {};
+ }
+ return Y.lexer = ue, le.prototype = Y, Y.Parser = le, new le();
+}();
+rPe.parser = rPe;
+const u_n = rPe, h_n = (r) => r.match(/^\s*pie/) !== null || r.match(/^\s*bar/) !== null;
+let mpe = {}, $Oe = !1;
+const f_n = { parseDirective: function(r, i, o) {
+ n0.parseDirective(this, r, i, o);
+}, getConfig: () => Bn().pie, addSection: function(r, i) {
+ r = El.sanitizeText(r, Bn()), mpe[r] === void 0 && (mpe[r] = i, _t.debug("Added new section :", r));
+}, getSections: () => mpe, cleanupValue: function(r) {
+ return r.substring(0, 1) === ":" && (r = r.substring(1).trim()), Number(r.trim());
+}, clear: function() {
+ mpe = {}, $Oe = !1, w5();
+}, setAccTitle: k5, getAccTitle: _k, setDiagramTitle: q9, getDiagramTitle: Y9, setShowData: function(r) {
+ $Oe = r;
+}, getShowData: function() {
+ return $Oe;
+}, getAccDescription: Tk, setAccDescription: Ek };
+let WS, VS = Bn();
+const UOe = 450, d_n = { draw: (r, i, o, l) => {
+ try {
+ VS = Bn(), _t.debug(`Rendering info diagram
+` + r);
+ const Z = Bn().securityLevel;
+ let R;
+ Z === "sandbox" && (R = co("#i" + i));
+ const J = co(Z === "sandbox" ? R.nodes()[0].contentDocument.body : "body"), he = Z === "sandbox" ? R.nodes()[0].contentDocument : document;
+ l.db.clear(), l.parser.parse(r), _t.debug("Parsed info diagram");
+ const Y = he.getElementById(i);
+ WS = Y.parentElement.offsetWidth, WS === void 0 && (WS = 1200), VS.useWidth !== void 0 && (WS = VS.useWidth), VS.pie.useWidth !== void 0 && (WS = VS.pie.useWidth);
+ const ue = J.select("#" + i);
+ V9(ue, UOe, WS, VS.pie.useMaxWidth), Y.setAttribute("viewBox", "0 0 " + WS + " " + UOe);
+ var f = 18, g = Math.min(WS, UOe) / 2 - 40, A = ue.append("g").attr("transform", "translate(" + WS / 2 + ",225)"), b = l.db.getSections(), v = 0;
+ Object.keys(b).forEach(function(be) {
+ v += b[be];
+ });
+ const le = VS.themeVariables;
+ var k = [le.pie1, le.pie2, le.pie3, le.pie4, le.pie5, le.pie6, le.pie7, le.pie8, le.pie9, le.pie10, le.pie11, le.pie12], _ = fBt().range(k), T = Object.entries(b).map(function(be, ke) {
+ return { order: ke, name: be[0], value: be[1] };
+ }), L = function() {
+ var be = p6n, ke = g6n, de = null, Te = xp(0), xe = xp(Vpe), ie = xp(0);
+ function Be(te) {
+ var Me, ve, ge, Je, ot, bt = (te = MBt(te)).length, gt = 0, je = new Array(bt), Qe = new Array(bt), kt = +Te.apply(this, arguments), Wt = Math.min(Vpe, Math.max(-Vpe, xe.apply(this, arguments) - kt)), jt = Math.min(Math.abs(Wt) / bt, ie.apply(this, arguments)), Zn = jt * (Wt < 0 ? -1 : 1);
+ for (Me = 0; Me < bt; ++Me)
+ (ot = Qe[je[Me] = Me] = +be(te[Me], Me, te)) > 0 && (gt += ot);
+ for (ke != null ? aie(je).call(je, function(Ft, wn) {
+ return ke(Qe[Ft], Qe[wn]);
+ }) : de != null && aie(je).call(je, function(Ft, wn) {
+ return de(te[Ft], te[wn]);
+ }), Me = 0, ge = gt ? (Wt - bt * Zn) / gt : 0; Me < bt; ++Me, kt = Je)
+ ve = je[Me], Je = kt + ((ot = Qe[ve]) > 0 ? ot * ge : 0) + Zn, Qe[ve] = { data: te[ve], index: Me, value: ot, startAngle: kt, endAngle: Je, padAngle: jt };
+ return Qe;
+ }
+ return Be.value = function(te) {
+ return arguments.length ? (be = typeof te == "function" ? te : xp(+te), Be) : be;
+ }, Be.sortValues = function(te) {
+ return arguments.length ? (ke = te, de = null, Be) : ke;
+ }, Be.sort = function(te) {
+ return arguments.length ? (de = te, ke = null, Be) : de;
+ }, Be.startAngle = function(te) {
+ return arguments.length ? (Te = typeof te == "function" ? te : xp(+te), Be) : Te;
+ }, Be.endAngle = function(te) {
+ return arguments.length ? (xe = typeof te == "function" ? te : xp(+te), Be) : xe;
+ }, Be.padAngle = function(te) {
+ return arguments.length ? (ie = typeof te == "function" ? te : xp(+te), Be) : ie;
+ }, Be;
+ }().value(function(be) {
+ return be.value;
+ }).sort(function(be, ke) {
+ return be.order - ke.order;
+ }), F = L(T), U = vNe().innerRadius(0).outerRadius(g);
+ A.selectAll("mySlices").data(F).enter().append("path").attr("d", U).attr("fill", function(be) {
+ return _(be.data.name);
+ }).attr("class", "pieCircle"), A.selectAll("mySlices").data(F).enter().append("text").text(function(be) {
+ return (be.data.value / v * 100).toFixed(0) + "%";
+ }).attr("transform", function(be) {
+ return "translate(" + U.centroid(be) + ")";
+ }).style("text-anchor", "middle").attr("class", "slice"), A.append("text").text(l.db.getDiagramTitle()).attr("x", 0).attr("y", -200).attr("class", "pieTitleText");
+ var q = A.selectAll(".legend").data(_.domain()).enter().append("g").attr("class", "legend").attr("transform", function(be, ke) {
+ return "translate(216," + (22 * ke - 22 * _.domain().length / 2) + ")";
+ });
+ q.append("rect").attr("width", f).attr("height", f).style("fill", _).style("stroke", _), q.data(F).append("text").attr("x", 22).attr("y", 14).text(function(be) {
+ return l.db.getShowData() || VS.showData || VS.pie.showData ? be.data.name + " [" + be.data.value + "]" : be.data.name;
+ });
+ } catch (Z) {
+ _t.error("Error while rendering info diagram"), _t.error(Z);
+ }
+} };
+var iPe = function() {
+ var r, i = function(Ft, wn, un, ln) {
+ for (un = un || {}, ln = Ft.length; ln--; un[Ft[ln]] = wn)
+ ;
+ return un;
+ }, o = [1, 3], l = [1, 5], f = [1, 6], g = [1, 7], A = [1, 8], b = [5, 6, 8, 14, 16, 18, 19, 40, 41, 42, 43, 44, 45, 53, 71, 72], v = [1, 22], k = [2, 13], _ = [1, 26], T = [1, 27], L = [1, 28], F = [1, 29], U = [1, 30], q = [1, 31], Z = [1, 24], R = [1, 32], J = [1, 33], he = [1, 36], Y = [71, 72], ue = [5, 8, 14, 16, 18, 19, 40, 41, 42, 43, 44, 45, 53, 60, 62, 71, 72], le = [1, 56], be = [1, 57], ke = [1, 58], de = [1, 59], Te = [1, 60], xe = [1, 61], ie = [1, 62], Be = [62, 63], te = [1, 74], Me = [1, 70], ve = [1, 71], ge = [1, 72], Je = [1, 73], ot = [1, 75], bt = [1, 79], gt = [1, 80], je = [1, 77], Qe = [1, 78], kt = [5, 8, 14, 16, 18, 19, 40, 41, 42, 43, 44, 45, 53, 71, 72], Wt = { 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(Ft, wn, un, ln, an, Ot, $n) {
+ var pt = Ot.length - 1;
+ switch (an) {
+ case 6:
+ this.$ = Ot[pt].trim(), ln.setAccTitle(this.$);
+ break;
+ case 7:
+ case 8:
+ this.$ = Ot[pt].trim(), ln.setAccDescription(this.$);
+ break;
+ case 9:
+ ln.parseDirective("%%{", "open_directive");
+ break;
+ case 10:
+ ln.parseDirective(Ot[pt], "type_directive");
+ break;
+ case 11:
+ Ot[pt] = Ot[pt].trim().replace(/'/g, '"'), ln.parseDirective(Ot[pt], "arg_directive");
+ break;
+ case 12:
+ ln.parseDirective("}%%", "close_directive", "pie");
+ break;
+ case 13:
+ this.$ = [];
+ break;
+ case 19:
+ ln.addRequirement(Ot[pt - 3], Ot[pt - 4]);
+ break;
+ case 20:
+ ln.setNewReqId(Ot[pt - 2]);
+ break;
+ case 21:
+ ln.setNewReqText(Ot[pt - 2]);
+ break;
+ case 22:
+ ln.setNewReqRisk(Ot[pt - 2]);
+ break;
+ case 23:
+ ln.setNewReqVerifyMethod(Ot[pt - 2]);
+ break;
+ case 26:
+ this.$ = ln.RequirementType.REQUIREMENT;
+ break;
+ case 27:
+ this.$ = ln.RequirementType.FUNCTIONAL_REQUIREMENT;
+ break;
+ case 28:
+ this.$ = ln.RequirementType.INTERFACE_REQUIREMENT;
+ break;
+ case 29:
+ this.$ = ln.RequirementType.PERFORMANCE_REQUIREMENT;
+ break;
+ case 30:
+ this.$ = ln.RequirementType.PHYSICAL_REQUIREMENT;
+ break;
+ case 31:
+ this.$ = ln.RequirementType.DESIGN_CONSTRAINT;
+ break;
+ case 32:
+ this.$ = ln.RiskLevel.LOW_RISK;
+ break;
+ case 33:
+ this.$ = ln.RiskLevel.MED_RISK;
+ break;
+ case 34:
+ this.$ = ln.RiskLevel.HIGH_RISK;
+ break;
+ case 35:
+ this.$ = ln.VerifyType.VERIFY_ANALYSIS;
+ break;
+ case 36:
+ this.$ = ln.VerifyType.VERIFY_DEMONSTRATION;
+ break;
+ case 37:
+ this.$ = ln.VerifyType.VERIFY_INSPECTION;
+ break;
+ case 38:
+ this.$ = ln.VerifyType.VERIFY_TEST;
+ break;
+ case 39:
+ ln.addElement(Ot[pt - 3]);
+ break;
+ case 40:
+ ln.setNewElementType(Ot[pt - 2]);
+ break;
+ case 41:
+ ln.setNewElementDocRef(Ot[pt - 2]);
+ break;
+ case 44:
+ ln.addRelationship(Ot[pt - 2], Ot[pt], Ot[pt - 4]);
+ break;
+ case 45:
+ ln.addRelationship(Ot[pt - 2], Ot[pt - 4], Ot[pt]);
+ break;
+ case 46:
+ this.$ = ln.Relationships.CONTAINS;
+ break;
+ case 47:
+ this.$ = ln.Relationships.COPIES;
+ break;
+ case 48:
+ this.$ = ln.Relationships.DERIVES;
+ break;
+ case 49:
+ this.$ = ln.Relationships.SATISFIES;
+ break;
+ case 50:
+ this.$ = ln.Relationships.VERIFIES;
+ break;
+ case 51:
+ this.$ = ln.Relationships.REFINES;
+ break;
+ case 52:
+ this.$ = ln.Relationships.TRACES;
+ }
+ }, table: [{ 3: 1, 4: 2, 6: o, 9: 4, 14: l, 16: f, 18: g, 19: A }, { 1: [3] }, { 3: 10, 4: 2, 5: [1, 9], 6: o, 9: 4, 14: l, 16: f, 18: g, 19: A }, { 5: [1, 11] }, { 10: 12, 20: [1, 13] }, { 15: [1, 14] }, { 17: [1, 15] }, i(b, [2, 8]), { 20: [2, 9] }, { 3: 16, 4: 2, 6: o, 9: 4, 14: l, 16: f, 18: g, 19: A }, { 1: [2, 2] }, { 4: 21, 5: v, 7: 17, 8: k, 9: 4, 14: l, 16: f, 18: g, 19: A, 23: 18, 24: 19, 25: 20, 26: 23, 32: 25, 40: _, 41: T, 42: L, 43: F, 44: U, 45: q, 53: Z, 71: R, 72: J }, { 11: 34, 12: [1, 35], 22: he }, i([12, 22], [2, 10]), i(b, [2, 6]), i(b, [2, 7]), { 1: [2, 1] }, { 8: [1, 37] }, { 4: 21, 5: v, 7: 38, 8: k, 9: 4, 14: l, 16: f, 18: g, 19: A, 23: 18, 24: 19, 25: 20, 26: 23, 32: 25, 40: _, 41: T, 42: L, 43: F, 44: U, 45: q, 53: Z, 71: R, 72: J }, { 4: 21, 5: v, 7: 39, 8: k, 9: 4, 14: l, 16: f, 18: g, 19: A, 23: 18, 24: 19, 25: 20, 26: 23, 32: 25, 40: _, 41: T, 42: L, 43: F, 44: U, 45: q, 53: Z, 71: R, 72: J }, { 4: 21, 5: v, 7: 40, 8: k, 9: 4, 14: l, 16: f, 18: g, 19: A, 23: 18, 24: 19, 25: 20, 26: 23, 32: 25, 40: _, 41: T, 42: L, 43: F, 44: U, 45: q, 53: Z, 71: R, 72: J }, { 4: 21, 5: v, 7: 41, 8: k, 9: 4, 14: l, 16: f, 18: g, 19: A, 23: 18, 24: 19, 25: 20, 26: 23, 32: 25, 40: _, 41: T, 42: L, 43: F, 44: U, 45: q, 53: Z, 71: R, 72: J }, { 4: 21, 5: v, 7: 42, 8: k, 9: 4, 14: l, 16: f, 18: g, 19: A, 23: 18, 24: 19, 25: 20, 26: 23, 32: 25, 40: _, 41: T, 42: L, 43: F, 44: U, 45: q, 53: Z, 71: R, 72: J }, { 27: 43, 71: [1, 44], 72: [1, 45] }, { 54: 46, 71: [1, 47], 72: [1, 48] }, { 60: [1, 49], 62: [1, 50] }, i(Y, [2, 26]), i(Y, [2, 27]), i(Y, [2, 28]), i(Y, [2, 29]), i(Y, [2, 30]), i(Y, [2, 31]), i(ue, [2, 55]), i(ue, [2, 56]), i(b, [2, 4]), { 13: 51, 21: [1, 52] }, i(b, [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: le, 65: be, 66: ke, 67: de, 68: Te, 69: xe, 70: ie }, { 61: 63, 64: le, 65: be, 66: ke, 67: de, 68: Te, 69: xe, 70: ie }, { 11: 64, 22: he }, { 22: [2, 11] }, { 5: [1, 65] }, { 5: [1, 66] }, { 62: [1, 67] }, i(Be, [2, 46]), i(Be, [2, 47]), i(Be, [2, 48]), i(Be, [2, 49]), i(Be, [2, 50]), i(Be, [2, 51]), i(Be, [2, 52]), { 63: [1, 68] }, i(b, [2, 5]), { 5: te, 29: 69, 30: Me, 33: ve, 35: ge, 37: Je, 39: ot }, { 5: bt, 39: gt, 55: 76, 56: je, 58: Qe }, { 32: 81, 71: R, 72: J }, { 32: 82, 71: R, 72: J }, i(kt, [2, 19]), { 31: [1, 83] }, { 31: [1, 84] }, { 31: [1, 85] }, { 31: [1, 86] }, { 5: te, 29: 87, 30: Me, 33: ve, 35: ge, 37: Je, 39: ot }, i(kt, [2, 25]), i(kt, [2, 39]), { 31: [1, 88] }, { 31: [1, 89] }, { 5: bt, 39: gt, 55: 90, 56: je, 58: Qe }, i(kt, [2, 43]), i(kt, [2, 44]), i(kt, [2, 45]), { 32: 91, 71: R, 72: J }, { 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] }, i(kt, [2, 24]), { 57: 104, 71: [1, 105], 72: [1, 106] }, { 59: 107, 71: [1, 108], 72: [1, 109] }, i(kt, [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: te, 29: 116, 30: Me, 33: ve, 35: ge, 37: Je, 39: ot }, { 5: te, 29: 117, 30: Me, 33: ve, 35: ge, 37: Je, 39: ot }, { 5: te, 29: 118, 30: Me, 33: ve, 35: ge, 37: Je, 39: ot }, { 5: te, 29: 119, 30: Me, 33: ve, 35: ge, 37: Je, 39: ot }, { 5: bt, 39: gt, 55: 120, 56: je, 58: Qe }, { 5: bt, 39: gt, 55: 121, 56: je, 58: Qe }, i(kt, [2, 20]), i(kt, [2, 21]), i(kt, [2, 22]), i(kt, [2, 23]), i(kt, [2, 40]), i(kt, [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(Ft, wn) {
+ if (!wn.recoverable) {
+ var un = new Error(Ft);
+ throw un.hash = wn, un;
+ }
+ this.trace(Ft);
+ }, parse: function(Ft) {
+ var wn = this, un = [0], ln = [], an = [null], Ot = [], $n = this.table, pt = "", Ci = 0, ut = 0, br = Ot.slice.call(arguments, 1), zt = Object.create(this.lexer), Wr = { yy: {} };
+ for (var zr in this.yy)
+ Object.prototype.hasOwnProperty.call(this.yy, zr) && (Wr.yy[zr] = this.yy[zr]);
+ zt.setInput(Ft, Wr.yy), Wr.yy.lexer = zt, Wr.yy.parser = this, zt.yylloc === void 0 && (zt.yylloc = {});
+ var Si = zt.yylloc;
+ Ot.push(Si);
+ var vr = zt.options && zt.options.ranges;
+ function Qr() {
+ var Ya;
+ return typeof (Ya = ln.pop() || zt.lex() || 1) != "number" && (Ya instanceof Array && (Ya = (ln = Ya).pop()), Ya = wn.symbols_[Ya] || Ya), Ya;
+ }
+ typeof Wr.yy.parseError == "function" ? this.parseError = Wr.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
+ for (var or, Gr, An, _i, Cr, la, Ra, Jo, Cc = {}; ; ) {
+ if (Gr = un[un.length - 1], this.defaultActions[Gr] ? An = this.defaultActions[Gr] : (or == null && (or = Qr()), An = $n[Gr] && $n[Gr][or]), An === void 0 || !An.length || !An[0]) {
+ var ji = "";
+ for (Cr in Jo = [], $n[Gr])
+ this.terminals_[Cr] && Cr > 2 && Jo.push("'" + this.terminals_[Cr] + "'");
+ ji = zt.showPosition ? "Parse error on line " + (Ci + 1) + `:
+` + zt.showPosition() + `
+Expecting ` + Jo.join(", ") + ", got '" + (this.terminals_[or] || or) + "'" : "Parse error on line " + (Ci + 1) + ": Unexpected " + (or == 1 ? "end of input" : "'" + (this.terminals_[or] || or) + "'"), this.parseError(ji, { text: zt.match, token: this.terminals_[or] || or, line: zt.yylineno, loc: Si, expected: Jo });
+ }
+ if (An[0] instanceof Array && An.length > 1)
+ throw new Error("Parse Error: multiple actions possible at state: " + Gr + ", token: " + or);
+ switch (An[0]) {
+ case 1:
+ un.push(or), an.push(zt.yytext), Ot.push(zt.yylloc), un.push(An[1]), or = null, ut = zt.yyleng, pt = zt.yytext, Ci = zt.yylineno, Si = zt.yylloc;
+ break;
+ case 2:
+ if (la = this.productions_[An[1]][1], Cc.$ = an[an.length - la], Cc._$ = { first_line: Ot[Ot.length - (la || 1)].first_line, last_line: Ot[Ot.length - 1].last_line, first_column: Ot[Ot.length - (la || 1)].first_column, last_column: Ot[Ot.length - 1].last_column }, vr && (Cc._$.range = [Ot[Ot.length - (la || 1)].range[0], Ot[Ot.length - 1].range[1]]), (_i = this.performAction.apply(Cc, [pt, ut, Ci, Wr.yy, An[1], an, Ot].concat(br))) !== void 0)
+ return _i;
+ la && (un = un.slice(0, -1 * la * 2), an = an.slice(0, -1 * la), Ot = Ot.slice(0, -1 * la)), un.push(this.productions_[An[1]][0]), an.push(Cc.$), Ot.push(Cc._$), Ra = $n[un[un.length - 2]][un[un.length - 1]], un.push(Ra);
+ break;
+ case 3:
+ return !0;
+ }
+ }
+ return !0;
+ } }, jt = (r = { EOF: 1, parseError: function(Ft, wn) {
+ if (!this.yy.parser)
+ throw new Error(Ft);
+ this.yy.parser.parseError(Ft, wn);
+ }, setInput: function(Ft, wn) {
+ return this.yy = wn || this.yy || {}, this._input = Ft, 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 Ft = this._input[0];
+ return this.yytext += Ft, this.yyleng++, this.offset++, this.match += Ft, this.matched += Ft, Ft.match(/(?:\r\n?|\n).*/g) ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), Ft;
+ }, unput: function(Ft) {
+ var wn = Ft.length, un = Ft.split(/(?:\r\n?|\n)/g);
+ this._input = Ft + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - wn), this.offset -= wn;
+ var ln = 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), un.length - 1 && (this.yylineno -= un.length - 1);
+ var an = 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: un ? (un.length === ln.length ? this.yylloc.first_column : 0) + ln[ln.length - un.length].length - un[0].length : this.yylloc.first_column - wn }, this.options.ranges && (this.yylloc.range = [an[0], an[0] + this.yyleng - wn]), this.yyleng = this.yytext.length, this;
+ }, more: function() {
+ return this._more = !0, this;
+ }, reject: function() {
+ return this.options.backtrack_lexer ? (this._backtrack = !0, this) : 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 });
+ }, less: function(Ft) {
+ this.unput(this.match.slice(Ft));
+ }, pastInput: function() {
+ var Ft = this.matched.substr(0, this.matched.length - this.match.length);
+ return (Ft.length > 20 ? "..." : "") + Ft.substr(-20).replace(/\n/g, "");
+ }, upcomingInput: function() {
+ var Ft = this.match;
+ return Ft.length < 20 && (Ft += this._input.substr(0, 20 - Ft.length)), (Ft.substr(0, 20) + (Ft.length > 20 ? "..." : "")).replace(/\n/g, "");
+ }, showPosition: function() {
+ var Ft = this.pastInput(), wn = new Array(Ft.length + 1).join("-");
+ return Ft + this.upcomingInput() + `
+` + wn + "^";
+ }, test_match: function(Ft, wn) {
+ var un, ln, an;
+ if (this.options.backtrack_lexer && (an = { 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 && (an.yylloc.range = this.yylloc.range.slice(0))), (ln = Ft[0].match(/(?:\r\n?|\n).*/g)) && (this.yylineno += ln.length), this.yylloc = { first_line: this.yylloc.last_line, last_line: this.yylineno + 1, first_column: this.yylloc.last_column, last_column: ln ? ln[ln.length - 1].length - ln[ln.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + Ft[0].length }, this.yytext += Ft[0], this.match += Ft[0], this.matches = Ft, 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(Ft[0].length), this.matched += Ft[0], un = this.performAction.call(this, this.yy, this, wn, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), un)
+ return un;
+ if (this._backtrack) {
+ for (var Ot in an)
+ this[Ot] = an[Ot];
+ return !1;
+ }
+ return !1;
+ }, next: function() {
+ if (this.done)
+ return this.EOF;
+ var Ft, wn, un, ln;
+ this._input || (this.done = !0), this._more || (this.yytext = "", this.match = "");
+ for (var an = this._currentRules(), Ot = 0; Ot < an.length; Ot++)
+ if ((un = this._input.match(this.rules[an[Ot]])) && (!wn || un[0].length > wn[0].length)) {
+ if (wn = un, ln = Ot, this.options.backtrack_lexer) {
+ if ((Ft = this.test_match(un, an[Ot])) !== !1)
+ return Ft;
+ if (this._backtrack) {
+ wn = !1;
+ continue;
+ }
+ return !1;
+ }
+ if (!this.options.flex)
+ break;
+ }
+ return wn ? (Ft = this.test_match(wn, an[ln])) !== !1 && Ft : 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() {
+ return this.conditionStack.length - 1 > 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)) >= 0 ? this.conditionStack[Ft] : "INITIAL";
+ }, pushState: function(Ft) {
+ this.begin(Ft);
+ }, stateStackSize: function() {
+ return this.conditionStack.length;
+ }, options: { "case-insensitive": !0 }, performAction: function(Ft, wn, un, ln) {
+ switch (un) {
+ 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:
+ case 53:
+ this.popState();
+ break;
+ case 12:
+ return "acc_descr_multiline_value";
+ case 13:
+ return 5;
+ case 14:
+ case 15:
+ 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 54:
+ return "qString";
+ case 55:
+ return wn.yytext = wn.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 } } }, r);
+ function Zn() {
+ this.yy = {};
+ }
+ return Wt.lexer = jt, Zn.prototype = Wt, Wt.Parser = Zn, new Zn();
+}();
+iPe.parser = iPe;
+const A_n = iPe, g_n = (r) => r.match(/^\s*requirement(Diagram)?/) !== null;
+let HOe = [], s5 = {}, Kne = {}, lO = {}, zne = {};
+const p_n = { RequirementType: { REQUIREMENT: "Requirement", FUNCTIONAL_REQUIREMENT: "Functional Requirement", INTERFACE_REQUIREMENT: "Interface Requirement", PERFORMANCE_REQUIREMENT: "Performance Requirement", PHYSICAL_REQUIREMENT: "Physical Requirement", DESIGN_CONSTRAINT: "Design Constraint" }, RiskLevel: { LOW_RISK: "Low", MED_RISK: "Medium", HIGH_RISK: "High" }, VerifyType: { VERIFY_ANALYSIS: "Analysis", VERIFY_DEMONSTRATION: "Demonstration", VERIFY_INSPECTION: "Inspection", VERIFY_TEST: "Test" }, Relationships: { CONTAINS: "contains", COPIES: "copies", DERIVES: "derives", SATISFIES: "satisfies", VERIFIES: "verifies", REFINES: "refines", TRACES: "traces" }, parseDirective: function(r, i, o) {
+ n0.parseDirective(this, r, i, o);
+}, getConfig: () => Bn().req, addRequirement: (r, i) => (Kne[r] === void 0 && (Kne[r] = { name: r, type: i, id: s5.id, text: s5.text, risk: s5.risk, verifyMethod: s5.verifyMethod }), s5 = {}, Kne[r]), getRequirements: () => Kne, setNewReqId: (r) => {
+ s5 !== void 0 && (s5.id = r);
+}, setNewReqText: (r) => {
+ s5 !== void 0 && (s5.text = r);
+}, setNewReqRisk: (r) => {
+ s5 !== void 0 && (s5.risk = r);
+}, setNewReqVerifyMethod: (r) => {
+ s5 !== void 0 && (s5.verifyMethod = r);
+}, setAccTitle: k5, getAccTitle: _k, setAccDescription: Ek, getAccDescription: Tk, addElement: (r) => (zne[r] === void 0 && (zne[r] = { name: r, type: lO.type, docRef: lO.docRef }, _t.info("Added new requirement: ", r)), lO = {}, zne[r]), getElements: () => zne, setNewElementType: (r) => {
+ lO !== void 0 && (lO.type = r);
+}, setNewElementDocRef: (r) => {
+ lO !== void 0 && (lO.docRef = r);
+}, addRelationship: (r, i, o) => {
+ HOe.push({ type: r, src: i, dst: o });
+}, getRelationships: () => HOe, clear: () => {
+ HOe = [], s5 = {}, Kne = {}, lO = {}, zne = {}, w5();
+} }, aPe = { CONTAINS: "contains", ARROW: "arrow" }, m_n = aPe, b_n = (r, i) => {
+ let o = r.append("defs").append("marker").attr("id", aPe.CONTAINS + "_line_ending").attr("refX", 0).attr("refY", i.line_height / 2).attr("markerWidth", i.line_height).attr("markerHeight", i.line_height).attr("orient", "auto").append("g");
+ o.append("circle").attr("cx", i.line_height / 2).attr("cy", i.line_height / 2).attr("r", i.line_height / 2).attr("fill", "none"), o.append("line").attr("x1", 0).attr("x2", i.line_height).attr("y1", i.line_height / 2).attr("y2", i.line_height / 2).attr("stroke-width", 1), o.append("line").attr("y1", 0).attr("y2", i.line_height).attr("x1", i.line_height / 2).attr("x2", i.line_height / 2).attr("stroke-width", 1), r.append("defs").append("marker").attr("id", aPe.ARROW + "_line_ending").attr("refX", i.line_height).attr("refY", 0.5 * i.line_height).attr("markerWidth", i.line_height).attr("markerHeight", i.line_height).attr("orient", "auto").append("path").attr("d", `M0,0
+ L${i.line_height},${i.line_height / 2}
+ M${i.line_height},${i.line_height / 2}
+ L0,${i.line_height}`).attr("stroke-width", 1);
+};
+let Cp = {}, MCt = 0;
+const FCt = (r, i) => r.insert("rect", "#" + i).attr("class", "req reqBox").attr("x", 0).attr("y", 0).attr("width", Cp.rect_min_width + "px").attr("height", Cp.rect_min_height + "px"), OCt = (r, i, o) => {
+ let l = Cp.rect_min_width / 2, f = r.append("text").attr("class", "req reqLabel reqTitle").attr("id", i).attr("x", l).attr("y", Cp.rect_padding).attr("dominant-baseline", "hanging"), g = 0;
+ o.forEach((b) => {
+ g == 0 ? f.append("tspan").attr("text-anchor", "middle").attr("x", Cp.rect_min_width / 2).attr("dy", 0).text(b) : f.append("tspan").attr("text-anchor", "middle").attr("x", Cp.rect_min_width / 2).attr("dy", 0.75 * Cp.line_height).text(b), g++;
+ });
+ let A = 1.5 * Cp.rect_padding + g * Cp.line_height * 0.75;
+ return r.append("line").attr("class", "req-title-line").attr("x1", "0").attr("x2", Cp.rect_min_width).attr("y1", A).attr("y2", A), { titleNode: f, y: A };
+}, DCt = (r, i, o, l) => {
+ let f = r.append("text").attr("class", "req reqLabel").attr("id", i).attr("x", Cp.rect_padding).attr("y", l).attr("dominant-baseline", "hanging"), g = 0, A = [];
+ return o.forEach((b) => {
+ let v = b.length;
+ for (; v > 30 && g < 3; ) {
+ let k = b.substring(0, 30);
+ v = (b = b.substring(30, b.length)).length, A[A.length] = k, g++;
+ }
+ if (g == 3) {
+ let k = A[A.length - 1];
+ A[A.length - 1] = k.substring(0, k.length - 4) + "...";
+ } else
+ A[A.length] = b;
+ g = 0;
+ }), A.forEach((b) => {
+ f.append("tspan").attr("x", Cp.rect_padding).attr("dy", Cp.line_height).text(b);
+ }), f;
+}, v_n = function(r, i, o, l, f) {
+ const g = o.edge(mG(i.src), mG(i.dst)), A = pX().x(function(v) {
+ return v.x;
+ }).y(function(v) {
+ return v.y;
+ }), b = r.insert("path", "#" + l).attr("class", "er relationshipLine").attr("d", A(g.points)).attr("fill", "none");
+ i.type == f.db.Relationships.CONTAINS ? b.attr("marker-start", "url(" + El.getUrl(Cp.arrowMarkerAbsolute) + "#" + i.type + "_line_ending)") : (b.attr("stroke-dasharray", "10,7"), b.attr("marker-end", "url(" + El.getUrl(Cp.arrowMarkerAbsolute) + "#" + m_n.ARROW + "_line_ending)")), ((v, k, _, T) => {
+ const L = k.node().getTotalLength(), F = k.node().getPointAtLength(0.5 * L), U = "rel" + MCt;
+ MCt++;
+ const q = v.append("text").attr("class", "req relationshipLabel").attr("id", U).attr("x", F.x).attr("y", F.y).attr("text-anchor", "middle").attr("dominant-baseline", "middle").text(T).node().getBBox();
+ v.insert("rect", "#" + U).attr("class", "req reqLabelBox").attr("x", F.x - q.width / 2).attr("y", F.y - q.height / 2).attr("width", q.width).attr("height", q.height).attr("fill", "white").attr("fill-opacity", "85%");
+ })(r, b, 0, `<<${i.type}>>`);
+}, mG = (r) => r.replace(/\s/g, "").replace(/\./g, "_"), y_n = { draw: (r, i, o, l) => {
+ Cp = Bn().requirement, l.db.clear(), l.parser.parse(r);
+ const f = Cp.securityLevel;
+ let g;
+ f === "sandbox" && (g = co("#i" + i));
+ const A = co(f === "sandbox" ? g.nodes()[0].contentDocument.body : "body").select(`[id='${i}']`);
+ b_n(A, Cp);
+ const b = new ub({ multigraph: !1, compound: !1, directed: !0 }).setGraph({ rankdir: Cp.layoutDirection, marginx: 20, marginy: 20, nodesep: 100, edgesep: 100, ranksep: 100 }).setDefaultEdgeLabel(function() {
+ return {};
+ });
+ let v = l.db.getRequirements(), k = l.db.getElements(), _ = l.db.getRelationships();
+ ((q, Z, R) => {
+ Object.keys(q).forEach((J) => {
+ let he = q[J];
+ J = mG(J), _t.info("Added new requirement: ", J);
+ const Y = R.append("g").attr("id", J), ue = FCt(Y, "req-" + J);
+ let le = OCt(Y, J + "_title", [`<<${he.type}>>`, `${he.name}`]);
+ DCt(Y, J + "_body", [`Id: ${he.id}`, `Text: ${he.text}`, `Risk: ${he.risk}`, `Verification: ${he.verifyMethod}`], le.y);
+ const be = ue.node().getBBox();
+ Z.setNode(J, { width: be.width, height: be.height, shape: "rect", id: J });
+ });
+ })(v, b, A), ((q, Z, R) => {
+ Object.keys(q).forEach((J) => {
+ let he = q[J];
+ const Y = mG(J), ue = R.append("g").attr("id", Y), le = "element-" + Y, be = FCt(ue, le);
+ let ke = OCt(ue, le + "_title", ["<>", `${J}`]);
+ DCt(ue, le + "_body", [`Type: ${he.type || "Not Specified"}`, `Doc Ref: ${he.docRef || "None"}`], ke.y);
+ const de = be.node().getBBox();
+ Z.setNode(Y, { width: de.width, height: de.height, shape: "rect", id: Y });
+ });
+ })(k, b, A), ((q, Z) => {
+ q.forEach(function(R) {
+ let J = mG(R.src), he = mG(R.dst);
+ Z.setEdge(J, he, { relationship: R });
+ });
+ })(_, b), Uie(b), function(q, Z) {
+ Z.nodes().forEach(function(R) {
+ R !== void 0 && Z.node(R) !== void 0 && (q.select("#" + R), q.select("#" + R).attr("transform", "translate(" + (Z.node(R).x - Z.node(R).width / 2) + "," + (Z.node(R).y - Z.node(R).height / 2) + " )"));
+ });
+ }(A, b), _.forEach(function(q) {
+ v_n(A, q, b, i, l);
+ });
+ const T = Cp.rect_padding, L = A.node().getBBox(), F = L.width + 2 * T, U = L.height + 2 * T;
+ V9(A, U, F, Cp.useMaxWidth), A.attr("viewBox", `${L.x - T} ${L.y - T} ${F} ${U}`);
+} };
+var oPe = function() {
+ var r, i = function(un, ln, an, Ot) {
+ for (an = an || {}, Ot = un.length; Ot--; an[un[Ot]] = ln)
+ ;
+ return an;
+ }, o = [1, 2], l = [1, 3], f = [1, 5], g = [1, 7], A = [2, 5], b = [1, 15], v = [1, 17], k = [1, 19], _ = [1, 21], T = [1, 22], L = [1, 23], F = [1, 29], U = [1, 30], q = [1, 31], Z = [1, 32], R = [1, 33], J = [1, 34], he = [1, 35], Y = [1, 36], ue = [1, 37], le = [1, 38], be = [1, 39], ke = [1, 40], de = [1, 42], Te = [1, 43], xe = [1, 45], ie = [1, 46], Be = [1, 47], te = [1, 48], Me = [1, 49], ve = [1, 50], ge = [1, 53], Je = [1, 4, 5, 19, 21, 23, 26, 28, 34, 35, 36, 38, 40, 41, 42, 43, 44, 46, 48, 50, 51, 52, 53, 54, 56, 57, 62, 63, 64, 65, 73, 83], ot = [4, 5, 21, 54, 56], bt = [4, 5, 19, 21, 23, 26, 28, 34, 35, 36, 38, 40, 41, 42, 43, 44, 46, 48, 50, 54, 56, 57, 62, 63, 64, 65, 73, 83], gt = [4, 5, 19, 21, 23, 26, 28, 34, 35, 36, 38, 40, 41, 42, 43, 44, 46, 48, 50, 53, 54, 56, 57, 62, 63, 64, 65, 73, 83], je = [4, 5, 19, 21, 23, 26, 28, 34, 35, 36, 38, 40, 41, 42, 43, 44, 46, 48, 50, 52, 54, 56, 57, 62, 63, 64, 65, 73, 83], Qe = [4, 5, 19, 21, 23, 26, 28, 34, 35, 36, 38, 40, 41, 42, 43, 44, 46, 48, 50, 51, 54, 56, 57, 62, 63, 64, 65, 73, 83], kt = [71, 72, 73], Wt = [1, 125], jt = [1, 4, 5, 7, 19, 21, 23, 26, 28, 34, 35, 36, 38, 40, 41, 42, 43, 44, 46, 48, 50, 51, 52, 53, 54, 56, 57, 62, 63, 64, 65, 73, 83], Zn = { trace: function() {
+ }, yy: {}, symbols_: { error: 2, start: 3, SPACE: 4, NEWLINE: 5, directive: 6, SD: 7, document: 8, line: 9, statement: 10, box_section: 11, box_line: 12, participant_statement: 13, openDirective: 14, typeDirective: 15, closeDirective: 16, ":": 17, argDirective: 18, box: 19, restOfLine: 20, end: 21, signal: 22, autonumber: 23, NUM: 24, off: 25, activate: 26, actor: 27, deactivate: 28, note_statement: 29, links_statement: 30, link_statement: 31, properties_statement: 32, details_statement: 33, title: 34, legacy_title: 35, acc_title: 36, acc_title_value: 37, acc_descr: 38, acc_descr_value: 39, acc_descr_multiline_value: 40, loop: 41, rect: 42, opt: 43, alt: 44, else_sections: 45, par: 46, par_sections: 47, critical: 48, option_sections: 49, break: 50, option: 51, and: 52, else: 53, participant: 54, AS: 55, participant_actor: 56, note: 57, placement: 58, text2: 59, over: 60, actor_pair: 61, links: 62, link: 63, properties: 64, details: 65, spaceList: 66, ",": 67, left_of: 68, right_of: 69, signaltype: 70, "+": 71, "-": 72, ACTOR: 73, SOLID_OPEN_ARROW: 74, DOTTED_OPEN_ARROW: 75, SOLID_ARROW: 76, DOTTED_ARROW: 77, SOLID_CROSS: 78, DOTTED_CROSS: 79, SOLID_POINT: 80, DOTTED_POINT: 81, TXT: 82, open_directive: 83, type_directive: 84, arg_directive: 85, close_directive: 86, $accept: 0, $end: 1 }, terminals_: { 2: "error", 4: "SPACE", 5: "NEWLINE", 7: "SD", 17: ":", 19: "box", 20: "restOfLine", 21: "end", 23: "autonumber", 24: "NUM", 25: "off", 26: "activate", 28: "deactivate", 34: "title", 35: "legacy_title", 36: "acc_title", 37: "acc_title_value", 38: "acc_descr", 39: "acc_descr_value", 40: "acc_descr_multiline_value", 41: "loop", 42: "rect", 43: "opt", 44: "alt", 46: "par", 48: "critical", 50: "break", 51: "option", 52: "and", 53: "else", 54: "participant", 55: "AS", 56: "participant_actor", 57: "note", 60: "over", 62: "links", 63: "link", 64: "properties", 65: "details", 67: ",", 68: "left_of", 69: "right_of", 71: "+", 72: "-", 73: "ACTOR", 74: "SOLID_OPEN_ARROW", 75: "DOTTED_OPEN_ARROW", 76: "SOLID_ARROW", 77: "DOTTED_ARROW", 78: "SOLID_CROSS", 79: "DOTTED_CROSS", 80: "SOLID_POINT", 81: "DOTTED_POINT", 82: "TXT", 83: "open_directive", 84: "type_directive", 85: "arg_directive", 86: "close_directive" }, productions_: [0, [3, 2], [3, 2], [3, 2], [3, 2], [8, 0], [8, 2], [9, 2], [9, 1], [9, 1], [11, 0], [11, 2], [12, 2], [12, 1], [12, 1], [6, 4], [6, 6], [10, 1], [10, 4], [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], [49, 1], [49, 4], [47, 1], [47, 4], [45, 1], [45, 4], [13, 5], [13, 3], [13, 5], [13, 3], [29, 4], [29, 4], [30, 3], [31, 3], [32, 3], [33, 3], [66, 2], [66, 1], [61, 3], [61, 1], [58, 1], [58, 1], [22, 5], [22, 5], [22, 4], [27, 1], [70, 1], [70, 1], [70, 1], [70, 1], [70, 1], [70, 1], [70, 1], [70, 1], [59, 1], [14, 1], [15, 1], [18, 1], [16, 1]], performAction: function(un, ln, an, Ot, $n, pt, Ci) {
+ var ut = pt.length - 1;
+ switch ($n) {
+ case 4:
+ return Ot.apply(pt[ut]), pt[ut];
+ case 5:
+ case 10:
+ case 9:
+ case 14:
+ this.$ = [];
+ break;
+ case 6:
+ case 11:
+ pt[ut - 1].push(pt[ut]), this.$ = pt[ut - 1];
+ break;
+ case 7:
+ case 8:
+ case 12:
+ case 13:
+ case 63:
+ this.$ = pt[ut];
+ break;
+ case 18:
+ pt[ut - 1].unshift({ type: "boxStart", boxData: Ot.parseBoxData(pt[ut - 2]) }), pt[ut - 1].push({ type: "boxEnd", boxText: pt[ut - 2] }), this.$ = pt[ut - 1];
+ break;
+ case 20:
+ this.$ = { type: "sequenceIndex", sequenceIndex: Number(pt[ut - 2]), sequenceIndexStep: Number(pt[ut - 1]), sequenceVisible: !0, signalType: Ot.LINETYPE.AUTONUMBER };
+ break;
+ case 21:
+ this.$ = { type: "sequenceIndex", sequenceIndex: Number(pt[ut - 1]), sequenceIndexStep: 1, sequenceVisible: !0, signalType: Ot.LINETYPE.AUTONUMBER };
+ break;
+ case 22:
+ this.$ = { type: "sequenceIndex", sequenceVisible: !1, signalType: Ot.LINETYPE.AUTONUMBER };
+ break;
+ case 23:
+ this.$ = { type: "sequenceIndex", sequenceVisible: !0, signalType: Ot.LINETYPE.AUTONUMBER };
+ break;
+ case 24:
+ this.$ = { type: "activeStart", signalType: Ot.LINETYPE.ACTIVE_START, actor: pt[ut - 1] };
+ break;
+ case 25:
+ this.$ = { type: "activeEnd", signalType: Ot.LINETYPE.ACTIVE_END, actor: pt[ut - 1] };
+ break;
+ case 31:
+ Ot.setDiagramTitle(pt[ut].substring(6)), this.$ = pt[ut].substring(6);
+ break;
+ case 32:
+ Ot.setDiagramTitle(pt[ut].substring(7)), this.$ = pt[ut].substring(7);
+ break;
+ case 33:
+ this.$ = pt[ut].trim(), Ot.setAccTitle(this.$);
+ break;
+ case 34:
+ case 35:
+ this.$ = pt[ut].trim(), Ot.setAccDescription(this.$);
+ break;
+ case 36:
+ pt[ut - 1].unshift({ type: "loopStart", loopText: Ot.parseMessage(pt[ut - 2]), signalType: Ot.LINETYPE.LOOP_START }), pt[ut - 1].push({ type: "loopEnd", loopText: pt[ut - 2], signalType: Ot.LINETYPE.LOOP_END }), this.$ = pt[ut - 1];
+ break;
+ case 37:
+ pt[ut - 1].unshift({ type: "rectStart", color: Ot.parseMessage(pt[ut - 2]), signalType: Ot.LINETYPE.RECT_START }), pt[ut - 1].push({ type: "rectEnd", color: Ot.parseMessage(pt[ut - 2]), signalType: Ot.LINETYPE.RECT_END }), this.$ = pt[ut - 1];
+ break;
+ case 38:
+ pt[ut - 1].unshift({ type: "optStart", optText: Ot.parseMessage(pt[ut - 2]), signalType: Ot.LINETYPE.OPT_START }), pt[ut - 1].push({ type: "optEnd", optText: Ot.parseMessage(pt[ut - 2]), signalType: Ot.LINETYPE.OPT_END }), this.$ = pt[ut - 1];
+ break;
+ case 39:
+ pt[ut - 1].unshift({ type: "altStart", altText: Ot.parseMessage(pt[ut - 2]), signalType: Ot.LINETYPE.ALT_START }), pt[ut - 1].push({ type: "altEnd", signalType: Ot.LINETYPE.ALT_END }), this.$ = pt[ut - 1];
+ break;
+ case 40:
+ pt[ut - 1].unshift({ type: "parStart", parText: Ot.parseMessage(pt[ut - 2]), signalType: Ot.LINETYPE.PAR_START }), pt[ut - 1].push({ type: "parEnd", signalType: Ot.LINETYPE.PAR_END }), this.$ = pt[ut - 1];
+ break;
+ case 41:
+ pt[ut - 1].unshift({ type: "criticalStart", criticalText: Ot.parseMessage(pt[ut - 2]), signalType: Ot.LINETYPE.CRITICAL_START }), pt[ut - 1].push({ type: "criticalEnd", signalType: Ot.LINETYPE.CRITICAL_END }), this.$ = pt[ut - 1];
+ break;
+ case 42:
+ pt[ut - 1].unshift({ type: "breakStart", breakText: Ot.parseMessage(pt[ut - 2]), signalType: Ot.LINETYPE.BREAK_START }), pt[ut - 1].push({ type: "breakEnd", optText: Ot.parseMessage(pt[ut - 2]), signalType: Ot.LINETYPE.BREAK_END }), this.$ = pt[ut - 1];
+ break;
+ case 45:
+ this.$ = pt[ut - 3].concat([{ type: "option", optionText: Ot.parseMessage(pt[ut - 1]), signalType: Ot.LINETYPE.CRITICAL_OPTION }, pt[ut]]);
+ break;
+ case 47:
+ this.$ = pt[ut - 3].concat([{ type: "and", parText: Ot.parseMessage(pt[ut - 1]), signalType: Ot.LINETYPE.PAR_AND }, pt[ut]]);
+ break;
+ case 49:
+ this.$ = pt[ut - 3].concat([{ type: "else", altText: Ot.parseMessage(pt[ut - 1]), signalType: Ot.LINETYPE.ALT_ELSE }, pt[ut]]);
+ break;
+ case 50:
+ pt[ut - 3].type = "addParticipant", pt[ut - 3].description = Ot.parseMessage(pt[ut - 1]), this.$ = pt[ut - 3];
+ break;
+ case 51:
+ pt[ut - 1].type = "addParticipant", this.$ = pt[ut - 1];
+ break;
+ case 52:
+ pt[ut - 3].type = "addActor", pt[ut - 3].description = Ot.parseMessage(pt[ut - 1]), this.$ = pt[ut - 3];
+ break;
+ case 53:
+ pt[ut - 1].type = "addActor", this.$ = pt[ut - 1];
+ break;
+ case 54:
+ this.$ = [pt[ut - 1], { type: "addNote", placement: pt[ut - 2], actor: pt[ut - 1].actor, text: pt[ut] }];
+ break;
+ case 55:
+ pt[ut - 2] = [].concat(pt[ut - 1], pt[ut - 1]).slice(0, 2), pt[ut - 2][0] = pt[ut - 2][0].actor, pt[ut - 2][1] = pt[ut - 2][1].actor, this.$ = [pt[ut - 1], { type: "addNote", placement: Ot.PLACEMENT.OVER, actor: pt[ut - 2].slice(0, 2), text: pt[ut] }];
+ break;
+ case 56:
+ this.$ = [pt[ut - 1], { type: "addLinks", actor: pt[ut - 1].actor, text: pt[ut] }];
+ break;
+ case 57:
+ this.$ = [pt[ut - 1], { type: "addALink", actor: pt[ut - 1].actor, text: pt[ut] }];
+ break;
+ case 58:
+ this.$ = [pt[ut - 1], { type: "addProperties", actor: pt[ut - 1].actor, text: pt[ut] }];
+ break;
+ case 59:
+ this.$ = [pt[ut - 1], { type: "addDetails", actor: pt[ut - 1].actor, text: pt[ut] }];
+ break;
+ case 62:
+ this.$ = [pt[ut - 2], pt[ut]];
+ break;
+ case 64:
+ this.$ = Ot.PLACEMENT.LEFTOF;
+ break;
+ case 65:
+ this.$ = Ot.PLACEMENT.RIGHTOF;
+ break;
+ case 66:
+ this.$ = [pt[ut - 4], pt[ut - 1], { type: "addMessage", from: pt[ut - 4].actor, to: pt[ut - 1].actor, signalType: pt[ut - 3], msg: pt[ut] }, { type: "activeStart", signalType: Ot.LINETYPE.ACTIVE_START, actor: pt[ut - 1] }];
+ break;
+ case 67:
+ this.$ = [pt[ut - 4], pt[ut - 1], { type: "addMessage", from: pt[ut - 4].actor, to: pt[ut - 1].actor, signalType: pt[ut - 3], msg: pt[ut] }, { type: "activeEnd", signalType: Ot.LINETYPE.ACTIVE_END, actor: pt[ut - 4] }];
+ break;
+ case 68:
+ this.$ = [pt[ut - 3], pt[ut - 1], { type: "addMessage", from: pt[ut - 3].actor, to: pt[ut - 1].actor, signalType: pt[ut - 2], msg: pt[ut] }];
+ break;
+ case 69:
+ this.$ = { type: "addParticipant", actor: pt[ut] };
+ break;
+ case 70:
+ this.$ = Ot.LINETYPE.SOLID_OPEN;
+ break;
+ case 71:
+ this.$ = Ot.LINETYPE.DOTTED_OPEN;
+ break;
+ case 72:
+ this.$ = Ot.LINETYPE.SOLID;
+ break;
+ case 73:
+ this.$ = Ot.LINETYPE.DOTTED;
+ break;
+ case 74:
+ this.$ = Ot.LINETYPE.SOLID_CROSS;
+ break;
+ case 75:
+ this.$ = Ot.LINETYPE.DOTTED_CROSS;
+ break;
+ case 76:
+ this.$ = Ot.LINETYPE.SOLID_POINT;
+ break;
+ case 77:
+ this.$ = Ot.LINETYPE.DOTTED_POINT;
+ break;
+ case 78:
+ this.$ = Ot.parseMessage(pt[ut].trim().substring(1));
+ break;
+ case 79:
+ Ot.parseDirective("%%{", "open_directive");
+ break;
+ case 80:
+ Ot.parseDirective(pt[ut], "type_directive");
+ break;
+ case 81:
+ pt[ut] = pt[ut].trim().replace(/'/g, '"'), Ot.parseDirective(pt[ut], "arg_directive");
+ break;
+ case 82:
+ Ot.parseDirective("}%%", "close_directive", "sequence");
+ }
+ }, table: [{ 3: 1, 4: o, 5: l, 6: 4, 7: f, 14: 6, 83: g }, { 1: [3] }, { 3: 8, 4: o, 5: l, 6: 4, 7: f, 14: 6, 83: g }, { 3: 9, 4: o, 5: l, 6: 4, 7: f, 14: 6, 83: g }, { 3: 10, 4: o, 5: l, 6: 4, 7: f, 14: 6, 83: g }, i([1, 4, 5, 19, 23, 26, 28, 34, 35, 36, 38, 40, 41, 42, 43, 44, 46, 48, 50, 54, 56, 57, 62, 63, 64, 65, 73, 83], A, { 8: 11 }), { 15: 12, 84: [1, 13] }, { 84: [2, 79] }, { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3] }, { 1: [2, 4], 4: b, 5: v, 6: 41, 9: 14, 10: 16, 13: 18, 14: 6, 19: k, 22: 20, 23: _, 26: T, 27: 44, 28: L, 29: 24, 30: 25, 31: 26, 32: 27, 33: 28, 34: F, 35: U, 36: q, 38: Z, 40: R, 41: J, 42: he, 43: Y, 44: ue, 46: le, 48: be, 50: ke, 54: de, 56: Te, 57: xe, 62: ie, 63: Be, 64: te, 65: Me, 73: ve, 83: g }, { 16: 51, 17: [1, 52], 86: ge }, i([17, 86], [2, 80]), i(Je, [2, 6]), { 6: 41, 10: 54, 13: 18, 14: 6, 19: k, 22: 20, 23: _, 26: T, 27: 44, 28: L, 29: 24, 30: 25, 31: 26, 32: 27, 33: 28, 34: F, 35: U, 36: q, 38: Z, 40: R, 41: J, 42: he, 43: Y, 44: ue, 46: le, 48: be, 50: ke, 54: de, 56: Te, 57: xe, 62: ie, 63: Be, 64: te, 65: Me, 73: ve, 83: g }, i(Je, [2, 8]), i(Je, [2, 9]), i(Je, [2, 17]), { 20: [1, 55] }, { 5: [1, 56] }, { 5: [1, 59], 24: [1, 57], 25: [1, 58] }, { 27: 60, 73: ve }, { 27: 61, 73: ve }, { 5: [1, 62] }, { 5: [1, 63] }, { 5: [1, 64] }, { 5: [1, 65] }, { 5: [1, 66] }, i(Je, [2, 31]), i(Je, [2, 32]), { 37: [1, 67] }, { 39: [1, 68] }, i(Je, [2, 35]), { 20: [1, 69] }, { 20: [1, 70] }, { 20: [1, 71] }, { 20: [1, 72] }, { 20: [1, 73] }, { 20: [1, 74] }, { 20: [1, 75] }, i(Je, [2, 43]), { 27: 76, 73: ve }, { 27: 77, 73: ve }, { 70: 78, 74: [1, 79], 75: [1, 80], 76: [1, 81], 77: [1, 82], 78: [1, 83], 79: [1, 84], 80: [1, 85], 81: [1, 86] }, { 58: 87, 60: [1, 88], 68: [1, 89], 69: [1, 90] }, { 27: 91, 73: ve }, { 27: 92, 73: ve }, { 27: 93, 73: ve }, { 27: 94, 73: ve }, i([5, 55, 67, 74, 75, 76, 77, 78, 79, 80, 81, 82], [2, 69]), { 5: [1, 95] }, { 18: 96, 85: [1, 97] }, { 5: [2, 82] }, i(Je, [2, 7]), i(ot, [2, 10], { 11: 98 }), i(Je, [2, 19]), { 5: [1, 100], 24: [1, 99] }, { 5: [1, 101] }, i(Je, [2, 23]), { 5: [1, 102] }, { 5: [1, 103] }, i(Je, [2, 26]), i(Je, [2, 27]), i(Je, [2, 28]), i(Je, [2, 29]), i(Je, [2, 30]), i(Je, [2, 33]), i(Je, [2, 34]), i(bt, A, { 8: 104 }), i(bt, A, { 8: 105 }), i(bt, A, { 8: 106 }), i(gt, A, { 45: 107, 8: 108 }), i(je, A, { 47: 109, 8: 110 }), i(Qe, A, { 49: 111, 8: 112 }), i(bt, A, { 8: 113 }), { 5: [1, 115], 55: [1, 114] }, { 5: [1, 117], 55: [1, 116] }, { 27: 120, 71: [1, 118], 72: [1, 119], 73: ve }, i(kt, [2, 70]), i(kt, [2, 71]), i(kt, [2, 72]), i(kt, [2, 73]), i(kt, [2, 74]), i(kt, [2, 75]), i(kt, [2, 76]), i(kt, [2, 77]), { 27: 121, 73: ve }, { 27: 123, 61: 122, 73: ve }, { 73: [2, 64] }, { 73: [2, 65] }, { 59: 124, 82: Wt }, { 59: 126, 82: Wt }, { 59: 127, 82: Wt }, { 59: 128, 82: Wt }, i(jt, [2, 15]), { 16: 129, 86: ge }, { 86: [2, 81] }, { 4: [1, 132], 5: [1, 134], 12: 131, 13: 133, 21: [1, 130], 54: de, 56: Te }, { 5: [1, 135] }, i(Je, [2, 21]), i(Je, [2, 22]), i(Je, [2, 24]), i(Je, [2, 25]), { 4: b, 5: v, 6: 41, 9: 14, 10: 16, 13: 18, 14: 6, 19: k, 21: [1, 136], 22: 20, 23: _, 26: T, 27: 44, 28: L, 29: 24, 30: 25, 31: 26, 32: 27, 33: 28, 34: F, 35: U, 36: q, 38: Z, 40: R, 41: J, 42: he, 43: Y, 44: ue, 46: le, 48: be, 50: ke, 54: de, 56: Te, 57: xe, 62: ie, 63: Be, 64: te, 65: Me, 73: ve, 83: g }, { 4: b, 5: v, 6: 41, 9: 14, 10: 16, 13: 18, 14: 6, 19: k, 21: [1, 137], 22: 20, 23: _, 26: T, 27: 44, 28: L, 29: 24, 30: 25, 31: 26, 32: 27, 33: 28, 34: F, 35: U, 36: q, 38: Z, 40: R, 41: J, 42: he, 43: Y, 44: ue, 46: le, 48: be, 50: ke, 54: de, 56: Te, 57: xe, 62: ie, 63: Be, 64: te, 65: Me, 73: ve, 83: g }, { 4: b, 5: v, 6: 41, 9: 14, 10: 16, 13: 18, 14: 6, 19: k, 21: [1, 138], 22: 20, 23: _, 26: T, 27: 44, 28: L, 29: 24, 30: 25, 31: 26, 32: 27, 33: 28, 34: F, 35: U, 36: q, 38: Z, 40: R, 41: J, 42: he, 43: Y, 44: ue, 46: le, 48: be, 50: ke, 54: de, 56: Te, 57: xe, 62: ie, 63: Be, 64: te, 65: Me, 73: ve, 83: g }, { 21: [1, 139] }, { 4: b, 5: v, 6: 41, 9: 14, 10: 16, 13: 18, 14: 6, 19: k, 21: [2, 48], 22: 20, 23: _, 26: T, 27: 44, 28: L, 29: 24, 30: 25, 31: 26, 32: 27, 33: 28, 34: F, 35: U, 36: q, 38: Z, 40: R, 41: J, 42: he, 43: Y, 44: ue, 46: le, 48: be, 50: ke, 53: [1, 140], 54: de, 56: Te, 57: xe, 62: ie, 63: Be, 64: te, 65: Me, 73: ve, 83: g }, { 21: [1, 141] }, { 4: b, 5: v, 6: 41, 9: 14, 10: 16, 13: 18, 14: 6, 19: k, 21: [2, 46], 22: 20, 23: _, 26: T, 27: 44, 28: L, 29: 24, 30: 25, 31: 26, 32: 27, 33: 28, 34: F, 35: U, 36: q, 38: Z, 40: R, 41: J, 42: he, 43: Y, 44: ue, 46: le, 48: be, 50: ke, 52: [1, 142], 54: de, 56: Te, 57: xe, 62: ie, 63: Be, 64: te, 65: Me, 73: ve, 83: g }, { 21: [1, 143] }, { 4: b, 5: v, 6: 41, 9: 14, 10: 16, 13: 18, 14: 6, 19: k, 21: [2, 44], 22: 20, 23: _, 26: T, 27: 44, 28: L, 29: 24, 30: 25, 31: 26, 32: 27, 33: 28, 34: F, 35: U, 36: q, 38: Z, 40: R, 41: J, 42: he, 43: Y, 44: ue, 46: le, 48: be, 50: ke, 51: [1, 144], 54: de, 56: Te, 57: xe, 62: ie, 63: Be, 64: te, 65: Me, 73: ve, 83: g }, { 4: b, 5: v, 6: 41, 9: 14, 10: 16, 13: 18, 14: 6, 19: k, 21: [1, 145], 22: 20, 23: _, 26: T, 27: 44, 28: L, 29: 24, 30: 25, 31: 26, 32: 27, 33: 28, 34: F, 35: U, 36: q, 38: Z, 40: R, 41: J, 42: he, 43: Y, 44: ue, 46: le, 48: be, 50: ke, 54: de, 56: Te, 57: xe, 62: ie, 63: Be, 64: te, 65: Me, 73: ve, 83: g }, { 20: [1, 146] }, i(Je, [2, 51]), { 20: [1, 147] }, i(Je, [2, 53]), { 27: 148, 73: ve }, { 27: 149, 73: ve }, { 59: 150, 82: Wt }, { 59: 151, 82: Wt }, { 59: 152, 82: Wt }, { 67: [1, 153], 82: [2, 63] }, { 5: [2, 56] }, { 5: [2, 78] }, { 5: [2, 57] }, { 5: [2, 58] }, { 5: [2, 59] }, { 5: [1, 154] }, i(Je, [2, 18]), i(ot, [2, 11]), { 13: 155, 54: de, 56: Te }, i(ot, [2, 13]), i(ot, [2, 14]), i(Je, [2, 20]), i(Je, [2, 36]), i(Je, [2, 37]), i(Je, [2, 38]), i(Je, [2, 39]), { 20: [1, 156] }, i(Je, [2, 40]), { 20: [1, 157] }, i(Je, [2, 41]), { 20: [1, 158] }, i(Je, [2, 42]), { 5: [1, 159] }, { 5: [1, 160] }, { 59: 161, 82: Wt }, { 59: 162, 82: Wt }, { 5: [2, 68] }, { 5: [2, 54] }, { 5: [2, 55] }, { 27: 163, 73: ve }, i(jt, [2, 16]), i(ot, [2, 12]), i(gt, A, { 8: 108, 45: 164 }), i(je, A, { 8: 110, 47: 165 }), i(Qe, A, { 8: 112, 49: 166 }), i(Je, [2, 50]), i(Je, [2, 52]), { 5: [2, 66] }, { 5: [2, 67] }, { 82: [2, 62] }, { 21: [2, 49] }, { 21: [2, 47] }, { 21: [2, 45] }], defaultActions: { 7: [2, 79], 8: [2, 1], 9: [2, 2], 10: [2, 3], 53: [2, 82], 89: [2, 64], 90: [2, 65], 97: [2, 81], 124: [2, 56], 125: [2, 78], 126: [2, 57], 127: [2, 58], 128: [2, 59], 150: [2, 68], 151: [2, 54], 152: [2, 55], 161: [2, 66], 162: [2, 67], 163: [2, 62], 164: [2, 49], 165: [2, 47], 166: [2, 45] }, parseError: function(un, ln) {
+ if (!ln.recoverable) {
+ var an = new Error(un);
+ throw an.hash = ln, an;
+ }
+ this.trace(un);
+ }, parse: function(un) {
+ var ln = this, an = [0], Ot = [], $n = [null], pt = [], Ci = this.table, ut = "", br = 0, zt = 0, Wr = pt.slice.call(arguments, 1), zr = Object.create(this.lexer), Si = { yy: {} };
+ for (var vr in this.yy)
+ Object.prototype.hasOwnProperty.call(this.yy, vr) && (Si.yy[vr] = this.yy[vr]);
+ zr.setInput(un, Si.yy), Si.yy.lexer = zr, Si.yy.parser = this, zr.yylloc === void 0 && (zr.yylloc = {});
+ var Qr = zr.yylloc;
+ pt.push(Qr);
+ var or = zr.options && zr.options.ranges;
+ function Gr() {
+ var Yr;
+ return typeof (Yr = Ot.pop() || zr.lex() || 1) != "number" && (Yr instanceof Array && (Yr = (Ot = Yr).pop()), Yr = ln.symbols_[Yr] || Yr), Yr;
+ }
+ typeof Si.yy.parseError == "function" ? this.parseError = Si.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
+ for (var An, _i, Cr, la, Ra, Jo, Cc, ji, Ya = {}; ; ) {
+ if (_i = an[an.length - 1], this.defaultActions[_i] ? Cr = this.defaultActions[_i] : (An == null && (An = Gr()), Cr = Ci[_i] && Ci[_i][An]), Cr === void 0 || !Cr.length || !Cr[0]) {
+ var Hr = "";
+ for (Ra in ji = [], Ci[_i])
+ this.terminals_[Ra] && Ra > 2 && ji.push("'" + this.terminals_[Ra] + "'");
+ Hr = zr.showPosition ? "Parse error on line " + (br + 1) + `:
+` + zr.showPosition() + `
+Expecting ` + ji.join(", ") + ", got '" + (this.terminals_[An] || An) + "'" : "Parse error on line " + (br + 1) + ": Unexpected " + (An == 1 ? "end of input" : "'" + (this.terminals_[An] || An) + "'"), this.parseError(Hr, { text: zr.match, token: this.terminals_[An] || An, line: zr.yylineno, loc: Qr, expected: ji });
+ }
+ if (Cr[0] instanceof Array && Cr.length > 1)
+ throw new Error("Parse Error: multiple actions possible at state: " + _i + ", token: " + An);
+ switch (Cr[0]) {
+ case 1:
+ an.push(An), $n.push(zr.yytext), pt.push(zr.yylloc), an.push(Cr[1]), An = null, zt = zr.yyleng, ut = zr.yytext, br = zr.yylineno, Qr = zr.yylloc;
+ break;
+ case 2:
+ if (Jo = this.productions_[Cr[1]][1], Ya.$ = $n[$n.length - Jo], Ya._$ = { first_line: pt[pt.length - (Jo || 1)].first_line, last_line: pt[pt.length - 1].last_line, first_column: pt[pt.length - (Jo || 1)].first_column, last_column: pt[pt.length - 1].last_column }, or && (Ya._$.range = [pt[pt.length - (Jo || 1)].range[0], pt[pt.length - 1].range[1]]), (la = this.performAction.apply(Ya, [ut, zt, br, Si.yy, Cr[1], $n, pt].concat(Wr))) !== void 0)
+ return la;
+ Jo && (an = an.slice(0, -1 * Jo * 2), $n = $n.slice(0, -1 * Jo), pt = pt.slice(0, -1 * Jo)), an.push(this.productions_[Cr[1]][0]), $n.push(Ya.$), pt.push(Ya._$), Cc = Ci[an[an.length - 2]][an[an.length - 1]], an.push(Cc);
+ break;
+ case 3:
+ return !0;
+ }
+ }
+ return !0;
+ } }, Ft = (r = { EOF: 1, parseError: function(un, ln) {
+ if (!this.yy.parser)
+ throw new Error(un);
+ this.yy.parser.parseError(un, ln);
+ }, setInput: function(un, ln) {
+ return this.yy = ln || this.yy || {}, this._input = un, 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 un = this._input[0];
+ return this.yytext += un, this.yyleng++, this.offset++, this.match += un, this.matched += un, un.match(/(?:\r\n?|\n).*/g) ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), un;
+ }, unput: function(un) {
+ var ln = un.length, an = un.split(/(?:\r\n?|\n)/g);
+ this._input = un + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - ln), this.offset -= ln;
+ var Ot = 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), an.length - 1 && (this.yylineno -= an.length - 1);
+ var $n = 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: an ? (an.length === Ot.length ? this.yylloc.first_column : 0) + Ot[Ot.length - an.length].length - an[0].length : this.yylloc.first_column - ln }, this.options.ranges && (this.yylloc.range = [$n[0], $n[0] + this.yyleng - ln]), this.yyleng = this.yytext.length, this;
+ }, more: function() {
+ return this._more = !0, this;
+ }, reject: function() {
+ return this.options.backtrack_lexer ? (this._backtrack = !0, this) : 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 });
+ }, less: function(un) {
+ this.unput(this.match.slice(un));
+ }, pastInput: function() {
+ var un = this.matched.substr(0, this.matched.length - this.match.length);
+ return (un.length > 20 ? "..." : "") + un.substr(-20).replace(/\n/g, "");
+ }, upcomingInput: function() {
+ var un = this.match;
+ return un.length < 20 && (un += this._input.substr(0, 20 - un.length)), (un.substr(0, 20) + (un.length > 20 ? "..." : "")).replace(/\n/g, "");
+ }, showPosition: function() {
+ var un = this.pastInput(), ln = new Array(un.length + 1).join("-");
+ return un + this.upcomingInput() + `
+` + ln + "^";
+ }, test_match: function(un, ln) {
+ var an, Ot, $n;
+ if (this.options.backtrack_lexer && ($n = { 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 && ($n.yylloc.range = this.yylloc.range.slice(0))), (Ot = un[0].match(/(?:\r\n?|\n).*/g)) && (this.yylineno += Ot.length), this.yylloc = { first_line: this.yylloc.last_line, last_line: this.yylineno + 1, first_column: this.yylloc.last_column, last_column: Ot ? Ot[Ot.length - 1].length - Ot[Ot.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + un[0].length }, this.yytext += un[0], this.match += un[0], this.matches = un, 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(un[0].length), this.matched += un[0], an = this.performAction.call(this, this.yy, this, ln, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), an)
+ return an;
+ if (this._backtrack) {
+ for (var pt in $n)
+ this[pt] = $n[pt];
+ return !1;
+ }
+ return !1;
+ }, next: function() {
+ if (this.done)
+ return this.EOF;
+ var un, ln, an, Ot;
+ this._input || (this.done = !0), this._more || (this.yytext = "", this.match = "");
+ for (var $n = this._currentRules(), pt = 0; pt < $n.length; pt++)
+ if ((an = this._input.match(this.rules[$n[pt]])) && (!ln || an[0].length > ln[0].length)) {
+ if (ln = an, Ot = pt, this.options.backtrack_lexer) {
+ if ((un = this.test_match(an, $n[pt])) !== !1)
+ return un;
+ if (this._backtrack) {
+ ln = !1;
+ continue;
+ }
+ return !1;
+ }
+ if (!this.options.flex)
+ break;
+ }
+ return ln ? (un = this.test_match(ln, $n[Ot])) !== !1 && un : 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 un = this.next();
+ return un || this.lex();
+ }, begin: function(un) {
+ this.conditionStack.push(un);
+ }, popState: function() {
+ return this.conditionStack.length - 1 > 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(un) {
+ return (un = this.conditionStack.length - 1 - Math.abs(un || 0)) >= 0 ? this.conditionStack[un] : "INITIAL";
+ }, pushState: function(un) {
+ this.begin(un);
+ }, stateStackSize: function() {
+ return this.conditionStack.length;
+ }, options: { "case-insensitive": !0 }, performAction: function(un, ln, an, Ot) {
+ switch (an) {
+ case 0:
+ return this.begin("open_directive"), 83;
+ case 1:
+ return this.begin("type_directive"), 84;
+ case 2:
+ return this.popState(), this.begin("arg_directive"), 17;
+ case 3:
+ return this.popState(), this.popState(), 86;
+ case 4:
+ return 85;
+ case 5:
+ case 53:
+ case 66:
+ return 5;
+ case 6:
+ case 7:
+ case 8:
+ case 9:
+ case 10:
+ break;
+ case 11:
+ return 24;
+ case 12:
+ return this.begin("LINE"), 19;
+ case 13:
+ return this.begin("ID"), 54;
+ case 14:
+ return this.begin("ID"), 56;
+ case 15:
+ return ln.yytext = ln.yytext.trim(), this.begin("ALIAS"), 73;
+ case 16:
+ return this.popState(), this.popState(), this.begin("LINE"), 55;
+ case 17:
+ return this.popState(), this.popState(), 5;
+ 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"), 44;
+ case 22:
+ return this.begin("LINE"), 53;
+ case 23:
+ return this.begin("LINE"), 46;
+ case 24:
+ return this.begin("LINE"), 52;
+ case 25:
+ return this.begin("LINE"), 48;
+ case 26:
+ return this.begin("LINE"), 51;
+ case 27:
+ return this.begin("LINE"), 50;
+ case 28:
+ return this.popState(), 20;
+ case 29:
+ return 21;
+ case 30:
+ return 68;
+ case 31:
+ return 69;
+ case 32:
+ return 62;
+ case 33:
+ return 63;
+ case 34:
+ return 64;
+ case 35:
+ return 65;
+ case 36:
+ return 60;
+ case 37:
+ return 57;
+ case 38:
+ return this.begin("ID"), 26;
+ case 39:
+ return this.begin("ID"), 28;
+ case 40:
+ return 34;
+ case 41:
+ return 35;
+ case 42:
+ return this.begin("acc_title"), 36;
+ case 43:
+ return this.popState(), "acc_title_value";
+ case 44:
+ return this.begin("acc_descr"), 38;
+ case 45:
+ return this.popState(), "acc_descr_value";
+ case 46:
+ this.begin("acc_descr_multiline");
+ break;
+ case 47:
+ this.popState();
+ break;
+ case 48:
+ return "acc_descr_multiline_value";
+ case 49:
+ return 7;
+ case 50:
+ return 23;
+ case 51:
+ return 25;
+ case 52:
+ return 67;
+ case 54:
+ return ln.yytext = ln.yytext.trim(), 73;
+ case 55:
+ return 76;
+ case 56:
+ return 77;
+ case 57:
+ return 74;
+ case 58:
+ return 75;
+ case 59:
+ return 78;
+ case 60:
+ return 79;
+ case 61:
+ return 80;
+ case 62:
+ return 81;
+ case 63:
+ return 82;
+ case 64:
+ return 71;
+ case 65:
+ return 72;
+ case 67:
+ 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, /^(?:box\b)/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: [47, 48], inclusive: !1 }, acc_descr: { rules: [45], inclusive: !1 }, acc_title: { rules: [43], 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, 15], inclusive: !1 }, ALIAS: { rules: [7, 8, 16, 17], inclusive: !1 }, LINE: { rules: [7, 8, 28], inclusive: !1 }, INITIAL: { rules: [0, 5, 6, 8, 9, 10, 11, 12, 13, 14, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 44, 46, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67], inclusive: !0 } } }, r);
+ function wn() {
+ this.yy = {};
+ }
+ return Zn.lexer = Ft, wn.prototype = Zn, Zn.Parser = wn, new wn();
+}();
+oPe.parser = oPe;
+const w_n = oPe, k_n = (r) => r.match(/^\s*sequenceDiagram/) !== null;
+let Gne, sPe, ZS, wO = {}, bG = [], O9 = [], bpe = !1;
+const cPe = function(r, i, o, l) {
+ let f = ZS;
+ const g = wO[r];
+ if (g) {
+ if (ZS && g.box && ZS !== g.box)
+ throw new Error("A same participant should only be defined in one Box: " + g.name + " can't be in '" + g.box.name + "' and in '" + ZS.name + "' at the same time.");
+ if (f = g.box ? g.box : ZS, g.box = f, g && i === g.name && o == null)
+ return;
+ }
+ o != null && o.text != null || (o = { text: i, wrap: null, type: l }), l != null && o.text != null || (o = { text: i, wrap: null, type: l }), wO[r] = { box: f, name: i, description: o.text, wrap: o.wrap === void 0 && b$() || !!o.wrap, prevActor: Gne, links: {}, properties: {}, actorCnt: null, rectData: null, type: l || "participant" }, Gne && wO[Gne] && (wO[Gne].nextActor = r), ZS && ZS.actorKeys.push(r), Gne = r;
+}, tC = function(r, i, o = { text: void 0, wrap: void 0 }, l) {
+ if (l === Pre.ACTIVE_END && ((g) => {
+ let A, b = 0;
+ for (A = 0; A < O9.length; A++)
+ O9[A].type === Pre.ACTIVE_START && O9[A].from.actor === g && b++, O9[A].type === Pre.ACTIVE_END && O9[A].from.actor === g && b--;
+ return b;
+ })(r.actor) < 1) {
+ let g = new Error("Trying to inactivate an inactive participant (" + r.actor + ")");
+ throw g.hash = { text: "->>-", token: "->>-", line: "1", loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, expected: ["'ACTIVE_PARTICIPANT'"] }, g;
+ }
+ return O9.push({ from: r, to: i, message: o.text, wrap: o.wrap === void 0 && b$() || !!o.wrap, type: l }), !0;
+}, Kie = function(r) {
+ return wO[r];
+}, b$ = () => sPe !== void 0 ? sPe : Bn().sequence.wrap, Pre = { 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 }, RIt = function(r, i, o) {
+ o.text, o.wrap === void 0 && b$() || o.wrap;
+ const l = [].concat(r, r);
+ O9.push({ from: l[0], to: l[1], message: o.text, wrap: o.wrap === void 0 && b$() || !!o.wrap, type: Pre.NOTE, placement: i });
+}, QIt = function(r, i) {
+ const o = Kie(r);
+ try {
+ let l = yk(i.text, Bn());
+ l = l.replace(/&/g, "&"), l = l.replace(/=/g, "="), cQe(o, JSON.parse(l));
+ } catch (l) {
+ _t.error("error while parsing actor link text", l);
+ }
+};
+function cQe(r, i) {
+ if (r.links == null)
+ r.links = i;
+ else
+ for (let o in i)
+ r.links[o] = i[o];
+}
+const $It = function(r, i) {
+ const o = Kie(r);
+ try {
+ let l = yk(i.text, Bn());
+ UIt(o, JSON.parse(l));
+ } catch (l) {
+ _t.error("error while parsing actor properties text", l);
+ }
+};
+function UIt(r, i) {
+ if (r.properties == null)
+ r.properties = i;
+ else
+ for (let o in i)
+ r.properties[o] = i[o];
+}
+const HIt = function(r, i) {
+ const o = Kie(r), l = document.getElementById(i.text);
+ try {
+ const f = l.innerHTML, g = JSON.parse(f);
+ g.properties && UIt(o, g.properties), g.links && cQe(o, g.links);
+ } catch (f) {
+ _t.error("error while parsing actor details text", f);
+ }
+}, jIt = function(r) {
+ if (Array.isArray(r))
+ r.forEach(function(i) {
+ jIt(i);
+ });
+ else
+ switch (r.type) {
+ case "sequenceIndex":
+ O9.push({ from: void 0, to: void 0, message: { start: r.sequenceIndex, step: r.sequenceIndexStep, visible: r.sequenceVisible }, wrap: !1, type: r.signalType });
+ break;
+ case "addParticipant":
+ cPe(r.actor, r.actor, r.description, "participant");
+ break;
+ case "addActor":
+ cPe(r.actor, r.actor, r.description, "actor");
+ break;
+ case "activeStart":
+ case "activeEnd":
+ tC(r.actor, void 0, void 0, r.signalType);
+ break;
+ case "addNote":
+ RIt(r.actor, r.placement, r.text);
+ break;
+ case "addLinks":
+ QIt(r.actor, r.text);
+ break;
+ case "addALink":
+ (function(i, o) {
+ const l = Kie(i);
+ try {
+ const b = {};
+ let v = yk(o.text, Bn());
+ var f = v.indexOf("@");
+ v = v.replace(/&/g, "&"), v = v.replace(/=/g, "=");
+ var g = v.slice(0, f - 1).trim(), A = v.slice(f + 1).trim();
+ b[g] = A, cQe(l, b);
+ } catch (b) {
+ _t.error("error while parsing actor link text", b);
+ }
+ })(r.actor, r.text);
+ break;
+ case "addProperties":
+ $It(r.actor, r.text);
+ break;
+ case "addDetails":
+ HIt(r.actor, r.text);
+ break;
+ case "addMessage":
+ tC(r.from, r.to, r.msg, r.signalType);
+ break;
+ case "boxStart":
+ (function(i) {
+ bG.push({ name: i.text, wrap: i.wrap === void 0 && b$() || !!i.wrap, fill: i.color, actorKeys: [] }), ZS = bG.slice(-1)[0];
+ })(r.boxData);
+ break;
+ case "boxEnd":
+ ZS = void 0;
+ break;
+ case "loopStart":
+ tC(void 0, void 0, r.loopText, r.signalType);
+ break;
+ case "loopEnd":
+ case "rectEnd":
+ case "optEnd":
+ case "altEnd":
+ case "parEnd":
+ case "criticalEnd":
+ case "breakEnd":
+ tC(void 0, void 0, void 0, r.signalType);
+ break;
+ case "rectStart":
+ tC(void 0, void 0, r.color, r.signalType);
+ break;
+ case "optStart":
+ tC(void 0, void 0, r.optText, r.signalType);
+ break;
+ case "altStart":
+ case "else":
+ tC(void 0, void 0, r.altText, r.signalType);
+ break;
+ case "setAccTitle":
+ k5(r.text);
+ break;
+ case "parStart":
+ case "and":
+ tC(void 0, void 0, r.parText, r.signalType);
+ break;
+ case "criticalStart":
+ tC(void 0, void 0, r.criticalText, r.signalType);
+ break;
+ case "option":
+ tC(void 0, void 0, r.optionText, r.signalType);
+ break;
+ case "breakStart":
+ tC(void 0, void 0, r.breakText, r.signalType);
+ }
+}, NCt = { addActor: cPe, addMessage: function(r, i, o, l) {
+ O9.push({ from: r, to: i, message: o.text, wrap: o.wrap === void 0 && b$() || !!o.wrap, answer: l });
+}, addSignal: tC, addLinks: QIt, addDetails: HIt, addProperties: $It, autoWrap: b$, setWrap: function(r) {
+ sPe = r;
+}, enableSequenceNumbers: function() {
+ bpe = !0;
+}, disableSequenceNumbers: function() {
+ bpe = !1;
+}, showSequenceNumbers: () => bpe, getMessages: function() {
+ return O9;
+}, getActors: function() {
+ return wO;
+}, getActor: Kie, getActorKeys: function() {
+ return Object.keys(wO);
+}, getActorProperty: function(r, i) {
+ if (r !== void 0 && r.properties !== void 0)
+ return r.properties[i];
+}, getAccTitle: _k, getBoxes: function() {
+ return bG;
+}, getDiagramTitle: Y9, setDiagramTitle: q9, parseDirective: function(r, i, o) {
+ n0.parseDirective(this, r, i, o);
+}, getConfig: () => Bn().sequence, clear: function() {
+ wO = {}, bG = [], O9 = [], bpe = !1, w5();
+}, parseMessage: function(r) {
+ const i = r.trim(), o = { text: i.replace(/^:?(?:no)?wrap:/, "").trim(), wrap: i.match(/^:?wrap:/) !== null || i.match(/^:?nowrap:/) === null && void 0 };
+ return _t.debug("parseMessage:", o), o;
+}, parseBoxData: function(r) {
+ const i = r.match(/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/);
+ let o = i != null && i[1] ? i[1].trim() : "transparent", l = i != null && i[2] ? i[2].trim() : void 0;
+ if (window && window.CSS)
+ window.CSS.supports("color", o) || (o = "transparent", l = r.trim());
+ else {
+ const f = new Option().style;
+ f.color = o, f.color !== o && (o = "transparent", l = r.trim());
+ }
+ return { color: o, text: l !== void 0 ? yk(l.replace(/^:?(?:no)?wrap:/, ""), Bn()) : void 0, wrap: l !== void 0 ? l.match(/^:?wrap:/) !== null || l.match(/^:?nowrap:/) === null && void 0 : void 0 };
+}, LINETYPE: Pre, ARROWTYPE: { FILLED: 0, OPEN: 1 }, PLACEMENT: { LEFTOF: 0, RIGHTOF: 1, OVER: 2 }, addNote: RIt, setAccTitle: k5, apply: jIt, setAccDescription: Ek, getAccDescription: Tk, hasAtLeastOneBox: function() {
+ return bG.length > 0;
+}, hasAtLeastOneBoxWithTitle: function() {
+ return bG.some((r) => r.name);
+} };
+let lPe = [];
+const PCt = () => {
+ lPe.forEach((r) => {
+ r();
+ }), lPe = [];
+}, pme = function(r, i) {
+ const o = r.append("rect");
+ return o.attr("x", i.x), o.attr("y", i.y), o.attr("fill", i.fill), o.attr("stroke", i.stroke), o.attr("width", i.width), o.attr("height", i.height), o.attr("rx", i.rx), o.attr("ry", i.ry), i.class !== void 0 && o.attr("class", i.class), o;
+}, RCt = (r, i) => {
+ ((o) => {
+ lPe.push(o);
+ })(() => {
+ const o = document.querySelectorAll(r);
+ o.length !== 0 && (o[0].addEventListener("mouseover", function() {
+ x_n("actor" + i + "_popup");
+ }), o[0].addEventListener("mouseout", function() {
+ C_n("actor" + i + "_popup");
+ }));
+ });
+}, QCt = function(r, i, o, l) {
+ const f = r.append("image");
+ f.attr("x", i), f.attr("y", o);
+ var g = u$(l);
+ f.attr("xlink:href", g);
+}, $Ct = function(r, i, o, l) {
+ const f = r.append("use");
+ f.attr("x", i), f.attr("y", o);
+ var g = u$(l);
+ f.attr("xlink:href", "#" + g);
+}, x_n = function(r) {
+ var i = document.getElementById(r);
+ i != null && (i.style.display = "block");
+}, C_n = function(r) {
+ var i = document.getElementById(r);
+ i != null && (i.style.display = "none");
+}, FG = function(r, i) {
+ let o = 0, l = 0;
+ const f = i.text.split(El.lineBreakRegex), [g, A] = Hie(i.fontSize);
+ let b = [], v = 0, k = () => i.y;
+ if (i.valign !== void 0 && i.textMargin !== void 0 && i.textMargin > 0)
+ switch (i.valign) {
+ case "top":
+ case "start":
+ k = () => Math.round(i.y + i.textMargin);
+ break;
+ case "middle":
+ case "center":
+ k = () => Math.round(i.y + (o + l + i.textMargin) / 2);
+ break;
+ case "bottom":
+ case "end":
+ k = () => Math.round(i.y + (o + l + 2 * i.textMargin) - i.textMargin);
+ }
+ if (i.anchor !== void 0 && i.textMargin !== void 0 && i.width !== void 0)
+ switch (i.anchor) {
+ case "left":
+ case "start":
+ i.x = Math.round(i.x + i.textMargin), i.anchor = "start", i.dominantBaseline = "middle", i.alignmentBaseline = "middle";
+ break;
+ case "middle":
+ case "center":
+ i.x = Math.round(i.x + i.width / 2), i.anchor = "middle", i.dominantBaseline = "middle", i.alignmentBaseline = "middle";
+ break;
+ case "right":
+ case "end":
+ i.x = Math.round(i.x + i.width - i.textMargin), i.anchor = "end", i.dominantBaseline = "middle", i.alignmentBaseline = "middle";
+ }
+ for (let [_, T] of f.entries()) {
+ i.textMargin !== void 0 && i.textMargin === 0 && g !== void 0 && (v = _ * g);
+ const L = r.append("text");
+ if (L.attr("x", i.x), L.attr("y", k()), i.anchor !== void 0 && L.attr("text-anchor", i.anchor).attr("dominant-baseline", i.dominantBaseline).attr("alignment-baseline", i.alignmentBaseline), i.fontFamily !== void 0 && L.style("font-family", i.fontFamily), A !== void 0 && L.style("font-size", A), i.fontWeight !== void 0 && L.style("font-weight", i.fontWeight), i.fill !== void 0 && L.attr("fill", i.fill), i.class !== void 0 && L.attr("class", i.class), i.dy !== void 0 ? L.attr("dy", i.dy) : v !== 0 && L.attr("dy", v), i.tspan) {
+ const F = L.append("tspan");
+ F.attr("x", i.x), i.fill !== void 0 && F.attr("fill", i.fill), F.text(T);
+ } else
+ L.text(T);
+ i.valign !== void 0 && i.textMargin !== void 0 && i.textMargin > 0 && (l += (L._groups || L)[0][0].getBBox().height, o = l), b.push(L);
+ }
+ return b;
+}, UCt = function(r, i) {
+ const o = r.append("polygon");
+ return o.attr("points", function(l, f, g, A, b) {
+ return l + "," + f + " " + (l + g) + "," + f + " " + (l + g) + "," + (f + A - b) + " " + (l + g - 1.2 * b) + "," + (f + A) + " " + l + "," + (f + A);
+ }(i.x, i.y, i.width, i.height, 7)), o.attr("class", "labelBox"), i.y = i.y + i.height / 2, FG(r, i), o;
+};
+let mT = -1;
+const KIt = (r, i) => {
+ r.selectAll && r.selectAll(".actor-line").attr("class", "200").attr("y2", i - 55);
+}, HCt = function(r, i) {
+ pme(r, { x: i.startx, y: i.starty, width: i.stopx - i.startx, height: i.stopy - i.starty, fill: i.fill, stroke: i.stroke, class: "rect" }).lower();
+}, jOe = 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 };
+}, vpe = function() {
+ return { x: 0, y: 0, fill: "#EDF2AE", stroke: "#666", width: 100, anchor: "start", height: 100, rx: 0, ry: 0 };
+}, KOe = /* @__PURE__ */ function() {
+ function r(f, g, A, b, v, k, _) {
+ l(g.append("text").attr("x", A + v / 2).attr("y", b + k / 2 + 5).style("text-anchor", "middle").text(f), _);
+ }
+ function i(f, g, A, b, v, k, _, T) {
+ const { actorFontSize: L, actorFontFamily: F, actorFontWeight: U } = T, [q, Z] = Hie(L), R = f.split(El.lineBreakRegex);
+ for (let J = 0; J < R.length; J++) {
+ const he = J * q - q * (R.length - 1) / 2, Y = g.append("text").attr("x", A + v / 2).attr("y", b).style("text-anchor", "middle").style("font-size", Z).style("font-weight", U).style("font-family", F);
+ Y.append("tspan").attr("x", A + v / 2).attr("dy", he).text(R[J]), Y.attr("y", b + k / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), l(Y, _);
+ }
+ }
+ function o(f, g, A, b, v, k, _, T) {
+ const L = g.append("switch"), F = L.append("foreignObject").attr("x", A).attr("y", b).attr("width", v).attr("height", k).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
+ F.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(f), i(f, L, A, b, v, k, _, T), l(F, _);
+ }
+ function l(f, g) {
+ for (const A in g)
+ g.hasOwnProperty(A) && f.attr(A, g[A]);
+ }
+ return function(f) {
+ return f.textPlacement === "fo" ? o : f.textPlacement === "old" ? r : i;
+ };
+}(), __n = /* @__PURE__ */ function() {
+ function r(f, g, A, b, v, k, _) {
+ l(g.append("text").attr("x", A).attr("y", b).style("text-anchor", "start").text(f), _);
+ }
+ function i(f, g, A, b, v, k, _, T) {
+ const { actorFontSize: L, actorFontFamily: F, actorFontWeight: U } = T, q = f.split(El.lineBreakRegex);
+ for (let Z = 0; Z < q.length; Z++) {
+ const R = Z * L - L * (q.length - 1) / 2, J = g.append("text").attr("x", A).attr("y", b).style("text-anchor", "start").style("font-size", L).style("font-weight", U).style("font-family", F);
+ J.append("tspan").attr("x", A).attr("dy", R).text(q[Z]), J.attr("y", b + k / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), l(J, _);
+ }
+ }
+ function o(f, g, A, b, v, k, _, T) {
+ const L = g.append("switch"), F = L.append("foreignObject").attr("x", A).attr("y", b).attr("width", v).attr("height", k).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
+ F.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(f), i(f, L, A, b, 0, k, _, T), l(F, _);
+ }
+ function l(f, g) {
+ for (const A in g)
+ g.hasOwnProperty(A) && f.attr(A, g[A]);
+ }
+ return function(f) {
+ return f.textPlacement === "fo" ? o : f.textPlacement === "old" ? r : i;
+ };
+}(), $0 = { drawRect: pme, drawText: FG, drawLabel: UCt, drawActor: function(r, i, o, l) {
+ switch (i.type) {
+ case "actor":
+ return function(f, g, A, b) {
+ const v = g.x + g.width / 2, k = g.y + 80;
+ b || (mT++, f.append("line").attr("id", "actor" + mT).attr("x1", v).attr("y1", k).attr("x2", v).attr("y2", 2e3).attr("class", "actor-line").attr("stroke-width", "0.5px").attr("stroke", "#999"));
+ const _ = f.append("g");
+ _.attr("class", "actor-man");
+ const T = vpe();
+ T.x = g.x, T.y = g.y, T.fill = "#eaeaea", T.width = g.width, T.height = g.height, T.class = "actor", T.rx = 3, T.ry = 3, _.append("line").attr("id", "actor-man-torso" + mT).attr("x1", v).attr("y1", g.y + 25).attr("x2", v).attr("y2", g.y + 45), _.append("line").attr("id", "actor-man-arms" + mT).attr("x1", v - 18).attr("y1", g.y + 33).attr("x2", v + 18).attr("y2", g.y + 33), _.append("line").attr("x1", v - 18).attr("y1", g.y + 60).attr("x2", v).attr("y2", g.y + 45), _.append("line").attr("x1", v).attr("y1", g.y + 45).attr("x2", v + 16).attr("y2", g.y + 60);
+ const L = _.append("circle");
+ L.attr("cx", g.x + g.width / 2), L.attr("cy", g.y + 10), L.attr("r", 15), L.attr("width", g.width), L.attr("height", g.height);
+ const F = _.node().getBBox();
+ return g.height = F.height, KOe(A)(g.description, _, T.x, T.y + 35, T.width, T.height, { class: "actor" }, A), g.height;
+ }(r, i, o, l);
+ case "participant":
+ return function(f, g, A, b) {
+ const v = g.x + g.width / 2, k = g.y + 5, _ = f.append("g");
+ var T = _;
+ b || (mT++, T.append("line").attr("id", "actor" + mT).attr("x1", v).attr("y1", k).attr("x2", v).attr("y2", 2e3).attr("class", "actor-line").attr("stroke-width", "0.5px").attr("stroke", "#999"), T = _.append("g"), g.actorCnt = mT, g.links != null && (T.attr("id", "root-" + mT), RCt("#root-" + mT, mT)));
+ const L = vpe();
+ var F = "actor";
+ g.properties != null && g.properties.class ? F = g.properties.class : L.fill = "#eaeaea", L.x = g.x, L.y = g.y, L.width = g.width, L.height = g.height, L.class = F, L.rx = 3, L.ry = 3;
+ const U = pme(T, L);
+ if (g.rectData = L, g.properties != null && g.properties.icon) {
+ const Z = g.properties.icon.trim();
+ Z.charAt(0) === "@" ? $Ct(T, L.x + L.width - 20, L.y + 10, Z.substr(1)) : QCt(T, L.x + L.width - 20, L.y + 10, Z);
+ }
+ KOe(A)(g.description, T, L.x, L.y, L.width, L.height, { class: "actor" }, A);
+ let q = g.height;
+ if (U.node) {
+ const Z = U.node().getBBox();
+ g.height = Z.height, q = Z.height;
+ }
+ return q;
+ }(r, i, o, l);
+ }
+}, drawBox: function(r, i, o) {
+ const l = r.append("g");
+ HCt(l, i), i.name && KOe(o)(i.name, l, i.x, i.y + (i.textMaxHeight || 0) / 2, i.width, 0, { class: "text" }, o), l.lower();
+}, drawPopup: function(r, i, o, l, f) {
+ if (i.links === void 0 || i.links === null || Object.keys(i.links).length === 0)
+ return { height: 0, width: 0 };
+ const g = i.links, A = i.actorCnt, b = i.rectData;
+ var v = "none";
+ f && (v = "block !important");
+ const k = r.append("g");
+ k.attr("id", "actor" + A + "_popup"), k.attr("class", "actorPopupMenu"), k.attr("display", v), RCt("#actor" + A + "_popup", A);
+ var _ = "";
+ b.class !== void 0 && (_ = " " + b.class);
+ let T = b.width > o ? b.width : o;
+ const L = k.append("rect");
+ if (L.attr("class", "actorPopupMenuPanel" + _), L.attr("x", b.x), L.attr("y", b.height), L.attr("fill", b.fill), L.attr("stroke", b.stroke), L.attr("width", T), L.attr("height", b.height), L.attr("rx", b.rx), L.attr("ry", b.ry), g != null) {
+ var F = 20;
+ for (let Z in g) {
+ var U = k.append("a"), q = u$(g[Z]);
+ U.attr("xlink:href", q), U.attr("target", "_blank"), __n(l)(Z, U, b.x + 10, b.height + F, T, 20, { class: "actor" }, l), F += 30;
+ }
+ }
+ return L.attr("height", F), { height: b.height + F, width: T };
+}, drawImage: QCt, drawEmbeddedImage: $Ct, anchorElement: function(r) {
+ return r.append("g");
+}, drawActivation: function(r, i, o, l, f) {
+ const g = vpe(), A = i.anchored;
+ g.x = i.startx, g.y = i.starty, g.class = "activation" + f % 3, g.width = i.stopx - i.startx, g.height = o - i.starty, pme(A, g);
+}, drawLoop: function(r, i, o, l) {
+ const { boxMargin: f, boxTextMargin: g, labelBoxHeight: A, labelBoxWidth: b, messageFontFamily: v, messageFontSize: k, messageFontWeight: _ } = l, T = r.append("g"), L = function(q, Z, R, J) {
+ return T.append("line").attr("x1", q).attr("y1", Z).attr("x2", R).attr("y2", J).attr("class", "loopLine");
+ };
+ L(i.startx, i.starty, i.stopx, i.starty), L(i.stopx, i.starty, i.stopx, i.stopy), L(i.startx, i.stopy, i.stopx, i.stopy), L(i.startx, i.starty, i.startx, i.stopy), i.sections !== void 0 && i.sections.forEach(function(q) {
+ L(i.startx, q.y, i.stopx, q.y).style("stroke-dasharray", "3, 3");
+ });
+ let F = jOe();
+ F.text = o, F.x = i.startx, F.y = i.starty, F.fontFamily = v, F.fontSize = k, F.fontWeight = _, F.anchor = "middle", F.valign = "middle", F.tspan = !1, F.width = b || 50, F.height = A || 20, F.textMargin = g, F.class = "labelText", UCt(T, F), F = jOe(), F.text = i.title, F.x = i.startx + b / 2 + (i.stopx - i.startx) / 2, F.y = i.starty + f + g, F.anchor = "middle", F.valign = "middle", F.textMargin = g, F.class = "loopText", F.fontFamily = v, F.fontSize = k, F.fontWeight = _, F.wrap = !0;
+ let U = FG(T, F);
+ return i.sectionTitles !== void 0 && i.sectionTitles.forEach(function(q, Z) {
+ if (q.message) {
+ F.text = q.message, F.x = i.startx + (i.stopx - i.startx) / 2, F.y = i.sections[Z].y + f + g, F.class = "loopText", F.anchor = "middle", F.valign = "middle", F.tspan = !1, F.fontFamily = v, F.fontSize = k, F.fontWeight = _, F.wrap = i.wrap, U = FG(T, F);
+ let R = Math.round(U.map((J) => (J._groups || J)[0][0].getBBox().height).reduce((J, he) => J + he));
+ i.sections[Z].height += R - (f + g);
+ }
+ }), i.height = Math.round(i.stopy - i.starty), T;
+}, drawBackgroundRect: HCt, insertArrowHead: function(r) {
+ r.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");
+}, insertArrowFilledHead: function(r) {
+ r.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");
+}, insertSequenceNumber: function(r) {
+ r.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);
+}, insertArrowCrossHead: function(r) {
+ r.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");
+}, insertDatabaseIcon: function(r) {
+ r.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");
+}, insertComputerIcon: function(r) {
+ r.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");
+}, insertClockIcon: function(r) {
+ r.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");
+}, getTextObj: jOe, getNoteRect: vpe, popupMenu: function(r) {
+ return "var pu = document.getElementById('" + r + "'); if (pu != null) { pu.style.display = 'block'; }";
+}, popdownMenu: function(r) {
+ return "var pu = document.getElementById('" + r + "'); if (pu != null) { pu.style.display = 'none'; }";
+}, fixLifeLineHeights: KIt, sanitizeUrl: u$ };
+let cr = {};
+const Pa = { 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((r) => r.height || 0)) + (this.loops.length === 0 ? 0 : this.loops.map((r) => r.height || 0).reduce((r, i) => r + i)) + (this.messages.length === 0 ? 0 : this.messages.map((r) => r.height || 0).reduce((r, i) => r + i)) + (this.notes.length === 0 ? 0 : this.notes.map((r) => r.height || 0).reduce((r, i) => r + i));
+}, clear: function() {
+ this.actors = [], this.boxes = [], this.loops = [], this.messages = [], this.notes = [];
+}, addBox: function(r) {
+ this.boxes.push(r);
+}, addActor: function(r) {
+ this.actors.push(r);
+}, addLoop: function(r) {
+ this.loops.push(r);
+}, addMessage: function(r) {
+ this.messages.push(r);
+}, addNote: function(r) {
+ this.notes.push(r);
+}, 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: [], boxes: [], 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, zIt(Bn());
+}, updateVal: function(r, i, o, l) {
+ r[i] === void 0 ? r[i] = o : r[i] = l(o, r[i]);
+}, updateBounds: function(r, i, o, l) {
+ const f = this;
+ let g = 0;
+ function A(b) {
+ return function(v) {
+ g++;
+ const k = f.sequenceItems.length - g + 1;
+ f.updateVal(v, "starty", i - k * cr.boxMargin, Math.min), f.updateVal(v, "stopy", l + k * cr.boxMargin, Math.max), f.updateVal(Pa.data, "startx", r - k * cr.boxMargin, Math.min), f.updateVal(Pa.data, "stopx", o + k * cr.boxMargin, Math.max), b !== "activation" && (f.updateVal(v, "startx", r - k * cr.boxMargin, Math.min), f.updateVal(v, "stopx", o + k * cr.boxMargin, Math.max), f.updateVal(Pa.data, "starty", i - k * cr.boxMargin, Math.min), f.updateVal(Pa.data, "stopy", l + k * cr.boxMargin, Math.max));
+ };
+ }
+ this.sequenceItems.forEach(A()), this.activations.forEach(A("activation"));
+}, insert: function(r, i, o, l) {
+ const f = Math.min(r, o), g = Math.max(r, o), A = Math.min(i, l), b = Math.max(i, l);
+ this.updateVal(Pa.data, "startx", f, Math.min), this.updateVal(Pa.data, "starty", A, Math.min), this.updateVal(Pa.data, "stopx", g, Math.max), this.updateVal(Pa.data, "stopy", b, Math.max), this.updateBounds(f, A, g, b);
+}, newActivation: function(r, i, o) {
+ const l = o[r.from.actor], f = m2e(r.from.actor).length || 0, g = l.x + l.width / 2 + (f - 1) * cr.activationWidth / 2;
+ this.activations.push({ startx: g, starty: this.verticalPos + 2, stopx: g + cr.activationWidth, stopy: void 0, actor: r.from.actor, anchored: $0.anchorElement(i) });
+}, endActivation: function(r) {
+ const i = this.activations.map(function(o) {
+ return o.actor;
+ }).lastIndexOf(r.from.actor);
+ return this.activations.splice(i, 1)[0];
+}, createLoop: function(r = { message: void 0, wrap: !1, width: void 0 }, i) {
+ return { startx: void 0, starty: this.verticalPos, stopx: void 0, stopy: void 0, title: r.message, wrap: r.wrap, width: r.width, height: 0, fill: i };
+}, newLoop: function(r = { message: void 0, wrap: !1, width: void 0 }, i) {
+ this.sequenceItems.push(this.createLoop(r, i));
+}, endLoop: function() {
+ return this.sequenceItems.pop();
+}, addSectionToLoop: function(r) {
+ const i = this.sequenceItems.pop();
+ i.sections = i.sections || [], i.sectionTitles = i.sectionTitles || [], i.sections.push({ y: Pa.getVerticalPos(), height: 0 }), i.sectionTitles.push(r), this.sequenceItems.push(i);
+}, bumpVerticalPos: function(r) {
+ this.verticalPos = this.verticalPos + r, this.data.stopy = this.verticalPos;
+}, getVerticalPos: function() {
+ return this.verticalPos;
+}, getBounds: function() {
+ return { bounds: this.data, models: this.models };
+} }, JQ = (r) => ({ fontFamily: r.messageFontFamily, fontSize: r.messageFontSize, fontWeight: r.messageFontWeight }), oG = (r) => ({ fontFamily: r.noteFontFamily, fontSize: r.noteFontSize, fontWeight: r.noteFontWeight }), uPe = (r) => ({ fontFamily: r.actorFontFamily, fontSize: r.actorFontSize, fontWeight: r.actorFontWeight }), zOe = function(r, i, o, l, f, g, A) {
+ if (f.hideUnusedParticipants === !0) {
+ const T = /* @__PURE__ */ new Set();
+ g.forEach((L) => {
+ T.add(L.from), T.add(L.to);
+ }), o = o.filter((L) => T.has(L));
+ }
+ let b, v = 0, k = 0, _ = 0;
+ for (const T of o) {
+ const L = i[T], F = L.box;
+ b && b != F && (A || Pa.models.addBox(b), k += cr.boxMargin + b.margin), F && F != b && (A || (F.x = v + k, F.y = l), k += F.margin), L.width = L.width || cr.width, L.height = Math.max(L.height || cr.height, cr.height), L.margin = L.margin || cr.actorMargin, L.x = v + k, L.y = Pa.getVerticalPos();
+ const U = $0.drawActor(r, L, cr, A);
+ _ = Math.max(_, U), Pa.insert(L.x, l, L.x + L.width, L.height), v += L.width + k, L.box && (L.box.width = v + F.margin - L.box.x), k = L.margin, b = L.box, Pa.models.addActor(L);
+ }
+ b && !A && Pa.models.addBox(b), Pa.bumpVerticalPos(_);
+}, jCt = function(r, i, o, l) {
+ let f = 0, g = 0;
+ for (const A of o) {
+ const b = i[A], v = E_n(b), k = $0.drawPopup(r, b, v, cr, cr.forceMenus, l);
+ k.height > f && (f = k.height), k.width + b.x > g && (g = k.width + b.x);
+ }
+ return { maxHeight: f, maxWidth: g };
+}, zIt = function(r) {
+ p2(cr, r), r.fontFamily && (cr.actorFontFamily = cr.noteFontFamily = cr.messageFontFamily = r.fontFamily), r.fontSize && (cr.actorFontSize = cr.noteFontSize = cr.messageFontSize = r.fontSize), r.fontWeight && (cr.actorFontWeight = cr.noteFontWeight = cr.messageFontWeight = r.fontWeight);
+}, m2e = function(r) {
+ return Pa.activations.filter(function(i) {
+ return i.actor === r;
+ });
+}, KCt = function(r, i) {
+ const o = i[r], l = m2e(r);
+ return [l.reduce(function(f, g) {
+ return Math.min(f, g.startx);
+ }, o.x + o.width / 2), l.reduce(function(f, g) {
+ return Math.max(f, g.stopx);
+ }, o.x + o.width / 2)];
+};
+function bT(r, i, o, l, f) {
+ Pa.bumpVerticalPos(o);
+ let g = l;
+ if (i.id && i.message && r[i.id]) {
+ const A = r[i.id].width, b = JQ(cr);
+ i.message = Tl.wrapLabel(`[${i.message}]`, A - 2 * cr.wrapPadding, b), i.width = A, i.wrap = !0;
+ const v = Tl.calculateTextDimensions(i.message, b), k = Math.max(v.height, cr.labelBoxHeight);
+ g = l + k, _t.debug(`${k} - ${i.message}`);
+ }
+ f(i), Pa.bumpVerticalPos(g);
+}
+const E_n = function(r) {
+ let i = 0;
+ const o = uPe(cr);
+ for (const l in r.links) {
+ const f = Tl.calculateTextDimensions(l, o).width + 2 * cr.wrapPadding + 2 * cr.boxMargin;
+ i < f && (i = f);
+ }
+ return i;
+}, T_n = function(r, i, o, l) {
+ const f = {}, g = [];
+ let A, b, v;
+ return r.forEach(function(k) {
+ switch (k.id = Tl.random({ length: 10 }), k.type) {
+ case l.db.LINETYPE.LOOP_START:
+ case l.db.LINETYPE.ALT_START:
+ case l.db.LINETYPE.OPT_START:
+ case l.db.LINETYPE.PAR_START:
+ case l.db.LINETYPE.CRITICAL_START:
+ case l.db.LINETYPE.BREAK_START:
+ g.push({ id: k.id, msg: k.message, from: Number.MAX_SAFE_INTEGER, to: Number.MIN_SAFE_INTEGER, width: 0 });
+ break;
+ case l.db.LINETYPE.ALT_ELSE:
+ case l.db.LINETYPE.PAR_AND:
+ case l.db.LINETYPE.CRITICAL_OPTION:
+ k.message && (A = g.pop(), f[A.id] = A, f[k.id] = A, g.push(A));
+ break;
+ case l.db.LINETYPE.LOOP_END:
+ case l.db.LINETYPE.ALT_END:
+ case l.db.LINETYPE.OPT_END:
+ case l.db.LINETYPE.PAR_END:
+ case l.db.LINETYPE.CRITICAL_END:
+ case l.db.LINETYPE.BREAK_END:
+ A = g.pop(), f[A.id] = A;
+ break;
+ case l.db.LINETYPE.ACTIVE_START:
+ {
+ const _ = i[k.from ? k.from.actor : k.to.actor], T = m2e(k.from ? k.from.actor : k.to.actor).length, L = _.x + _.width / 2 + (T - 1) * cr.activationWidth / 2, F = { startx: L, stopx: L + cr.activationWidth, actor: k.from.actor, enabled: !0 };
+ Pa.activations.push(F);
+ }
+ break;
+ case l.db.LINETYPE.ACTIVE_END: {
+ const _ = Pa.activations.map((T) => T.actor).lastIndexOf(k.from.actor);
+ delete Pa.activations.splice(_, 1)[0];
+ }
+ }
+ k.placement !== void 0 ? (b = function(_, T, L) {
+ const F = T[_.from].x, U = T[_.to].x, q = _.wrap && _.message;
+ let Z = Tl.calculateTextDimensions(q ? Tl.wrapLabel(_.message, cr.width, oG(cr)) : _.message, oG(cr));
+ const R = { width: q ? cr.width : Math.max(cr.width, Z.width + 2 * cr.noteMargin), height: 0, startx: T[_.from].x, stopx: 0, starty: 0, stopy: 0, message: _.message };
+ return _.placement === L.db.PLACEMENT.RIGHTOF ? (R.width = q ? Math.max(cr.width, Z.width) : Math.max(T[_.from].width / 2 + T[_.to].width / 2, Z.width + 2 * cr.noteMargin), R.startx = F + (T[_.from].width + cr.actorMargin) / 2) : _.placement === L.db.PLACEMENT.LEFTOF ? (R.width = Math.max(q ? cr.width : T[_.from].width / 2 + T[_.to].width / 2, Z.width + 2 * cr.noteMargin), R.startx = F - R.width + (T[_.from].width - cr.actorMargin) / 2) : _.to === _.from ? (Z = Tl.calculateTextDimensions(q ? Tl.wrapLabel(_.message, Math.max(cr.width, T[_.from].width), oG(cr)) : _.message, oG(cr)), R.width = q ? Math.max(cr.width, T[_.from].width) : Math.max(T[_.from].width, cr.width, Z.width + 2 * cr.noteMargin), R.startx = F + (T[_.from].width - R.width) / 2) : (R.width = Math.abs(F + T[_.from].width / 2 - (U + T[_.to].width / 2)) + cr.actorMargin, R.startx = F < U ? F + T[_.from].width / 2 - cr.actorMargin / 2 : U + T[_.to].width / 2 - cr.actorMargin / 2), q && (R.message = Tl.wrapLabel(_.message, R.width - 2 * cr.wrapPadding, oG(cr))), _t.debug(`NM:[${R.startx},${R.stopx},${R.starty},${R.stopy}:${R.width},${R.height}=${_.message}]`), R;
+ }(k, i, l), k.noteModel = b, g.forEach((_) => {
+ A = _, A.from = Math.min(A.from, b.startx), A.to = Math.max(A.to, b.startx + b.width), A.width = Math.max(A.width, Math.abs(A.from - A.to)) - cr.labelBoxWidth;
+ })) : (v = function(_, T, L) {
+ let F = !1;
+ if ([L.db.LINETYPE.SOLID_OPEN, L.db.LINETYPE.DOTTED_OPEN, L.db.LINETYPE.SOLID, L.db.LINETYPE.DOTTED, L.db.LINETYPE.SOLID_CROSS, L.db.LINETYPE.DOTTED_CROSS, L.db.LINETYPE.SOLID_POINT, L.db.LINETYPE.DOTTED_POINT].includes(_.type) && (F = !0), !F)
+ return {};
+ const U = KCt(_.from, T), q = KCt(_.to, T), Z = U[0] <= q[0] ? 1 : 0, R = U[0] < q[0] ? 0 : 1, J = [...U, ...q], he = Math.abs(q[R] - U[Z]);
+ _.wrap && _.message && (_.message = Tl.wrapLabel(_.message, Math.max(he + 2 * cr.wrapPadding, cr.width), JQ(cr)));
+ const Y = Tl.calculateTextDimensions(_.message, JQ(cr));
+ return { width: Math.max(_.wrap ? 0 : Y.width + 2 * cr.wrapPadding, he + 2 * cr.wrapPadding, cr.width), height: 0, startx: U[Z], stopx: q[R], starty: 0, stopy: 0, message: _.message, type: _.type, wrap: _.wrap, fromBounds: Math.min.apply(null, J), toBounds: Math.max.apply(null, J) };
+ }(k, i, l), k.msgModel = v, v.startx && v.stopx && g.length > 0 && g.forEach((_) => {
+ if (A = _, v.startx === v.stopx) {
+ const T = i[k.from], L = i[k.to];
+ A.from = Math.min(T.x - v.width / 2, T.x - T.width / 2, A.from), A.to = Math.max(L.x + v.width / 2, L.x + T.width / 2, A.to), A.width = Math.max(A.width, Math.abs(A.to - A.from)) - cr.labelBoxWidth;
+ } else
+ A.from = Math.min(v.startx, A.from), A.to = Math.max(v.stopx, A.to), A.width = Math.max(A.width, v.width) - cr.labelBoxWidth;
+ }));
+ }), Pa.activations = [], _t.debug("Loop type widths:", f), f;
+}, zCt = { bounds: Pa, drawActors: zOe, drawActorsPopup: jCt, setConf: zIt, draw: function(r, i, o, l) {
+ const { securityLevel: f, sequence: g } = Bn();
+ let A;
+ cr = g, l.db.clear(), l.parser.parse(r), f === "sandbox" && (A = co("#i" + i));
+ const b = co(f === "sandbox" ? A.nodes()[0].contentDocument.body : "body"), v = f === "sandbox" ? A.nodes()[0].contentDocument : document;
+ Pa.init(), _t.debug(l.db);
+ const k = f === "sandbox" ? b.select(`[id="${i}"]`) : co(`[id="${i}"]`), _ = l.db.getActors(), T = l.db.getBoxes(), L = l.db.getActorKeys(), F = l.db.getMessages(), U = l.db.getDiagramTitle(), q = l.db.hasAtLeastOneBox(), Z = l.db.hasAtLeastOneBoxWithTitle(), R = function(Be, te, Me) {
+ const ve = {};
+ return te.forEach(function(ge) {
+ if (Be[ge.to] && Be[ge.from]) {
+ const Je = Be[ge.to];
+ if (ge.placement === Me.db.PLACEMENT.LEFTOF && !Je.prevActor || ge.placement === Me.db.PLACEMENT.RIGHTOF && !Je.nextActor)
+ return;
+ const ot = ge.placement !== void 0, bt = !ot, gt = ot ? oG(cr) : JQ(cr), je = ge.wrap ? Tl.wrapLabel(ge.message, cr.width - 2 * cr.wrapPadding, gt) : ge.message, Qe = Tl.calculateTextDimensions(je, gt).width + 2 * cr.wrapPadding;
+ bt && ge.from === Je.nextActor ? ve[ge.to] = Math.max(ve[ge.to] || 0, Qe) : bt && ge.from === Je.prevActor ? ve[ge.from] = Math.max(ve[ge.from] || 0, Qe) : bt && ge.from === ge.to ? (ve[ge.from] = Math.max(ve[ge.from] || 0, Qe / 2), ve[ge.to] = Math.max(ve[ge.to] || 0, Qe / 2)) : ge.placement === Me.db.PLACEMENT.RIGHTOF ? ve[ge.from] = Math.max(ve[ge.from] || 0, Qe) : ge.placement === Me.db.PLACEMENT.LEFTOF ? ve[Je.prevActor] = Math.max(ve[Je.prevActor] || 0, Qe) : ge.placement === Me.db.PLACEMENT.OVER && (Je.prevActor && (ve[Je.prevActor] = Math.max(ve[Je.prevActor] || 0, Qe / 2)), Je.nextActor && (ve[ge.from] = Math.max(ve[ge.from] || 0, Qe / 2)));
+ }
+ }), _t.debug("maxMessageWidthPerActor:", ve), ve;
+ }(_, F, l);
+ cr.height = function(Be, te, Me) {
+ let ve = 0;
+ Object.keys(Be).forEach((Je) => {
+ const ot = Be[Je];
+ ot.wrap && (ot.description = Tl.wrapLabel(ot.description, cr.width - 2 * cr.wrapPadding, uPe(cr)));
+ const bt = Tl.calculateTextDimensions(ot.description, uPe(cr));
+ ot.width = ot.wrap ? cr.width : Math.max(cr.width, bt.width + 2 * cr.wrapPadding), ot.height = ot.wrap ? Math.max(bt.height, cr.height) : cr.height, ve = Math.max(ve, ot.height);
+ });
+ for (const Je in te) {
+ const ot = Be[Je];
+ if (!ot)
+ continue;
+ const bt = Be[ot.nextActor];
+ if (!bt) {
+ const je = te[Je] + cr.actorMargin - ot.width / 2;
+ ot.margin = Math.max(je, cr.actorMargin);
+ continue;
+ }
+ const gt = te[Je] + cr.actorMargin - ot.width / 2 - bt.width / 2;
+ ot.margin = Math.max(gt, cr.actorMargin);
+ }
+ let ge = 0;
+ return Me.forEach((Je) => {
+ const ot = JQ(cr);
+ let bt = Je.actorKeys.reduce((Qe, kt) => Qe + (Be[kt].width + (Be[kt].margin || 0)), 0);
+ bt -= 2 * cr.boxTextMargin, Je.wrap && (Je.name = Tl.wrapLabel(Je.name, bt - 2 * cr.wrapPadding, ot));
+ const gt = Tl.calculateTextDimensions(Je.name, ot);
+ ge = Math.max(gt.height, ge);
+ const je = Math.max(bt, gt.width + 2 * cr.wrapPadding);
+ if (Je.margin = cr.boxTextMargin, bt < je) {
+ const Qe = (je - bt) / 2;
+ Je.margin += Qe;
+ }
+ }), Me.forEach((Je) => Je.textMaxHeight = ge), Math.max(ve, cr.height);
+ }(_, R, T), $0.insertComputerIcon(k), $0.insertDatabaseIcon(k), $0.insertClockIcon(k), q && (Pa.bumpVerticalPos(cr.boxMargin), Z && Pa.bumpVerticalPos(T[0].textMaxHeight)), zOe(k, _, L, 0, cr, F, !1);
+ const J = T_n(F, _, R, l);
+ $0.insertArrowHead(k), $0.insertArrowCrossHead(k), $0.insertArrowFilledHead(k), $0.insertSequenceNumber(k);
+ let he = 1, Y = 1;
+ const ue = [];
+ F.forEach(function(Be) {
+ let te, Me, ve;
+ switch (Be.type) {
+ case l.db.LINETYPE.NOTE:
+ Me = Be.noteModel, function(ge, Je) {
+ Pa.bumpVerticalPos(cr.boxMargin), Je.height = cr.boxMargin, Je.starty = Pa.getVerticalPos();
+ const ot = $0.getNoteRect();
+ ot.x = Je.startx, ot.y = Je.starty, ot.width = Je.width || cr.width, ot.class = "note";
+ const bt = ge.append("g"), gt = $0.drawRect(bt, ot), je = $0.getTextObj();
+ je.x = Je.startx, je.y = Je.starty, je.width = ot.width, je.dy = "1em", je.text = Je.message, je.class = "noteText", je.fontFamily = cr.noteFontFamily, je.fontSize = cr.noteFontSize, je.fontWeight = cr.noteFontWeight, je.anchor = cr.noteAlign, je.textMargin = cr.noteMargin, je.valign = "center";
+ const Qe = FG(bt, je), kt = Math.round(Qe.map((Wt) => (Wt._groups || Wt)[0][0].getBBox().height).reduce((Wt, jt) => Wt + jt));
+ gt.attr("height", kt + 2 * cr.noteMargin), Je.height += kt + 2 * cr.noteMargin, Pa.bumpVerticalPos(kt + 2 * cr.noteMargin), Je.stopy = Je.starty + kt + 2 * cr.noteMargin, Je.stopx = Je.startx + ot.width, Pa.insert(Je.startx, Je.starty, Je.stopx, Je.stopy), Pa.models.addNote(Je);
+ }(k, Me);
+ break;
+ case l.db.LINETYPE.ACTIVE_START:
+ Pa.newActivation(Be, k, _);
+ break;
+ case l.db.LINETYPE.ACTIVE_END:
+ (function(ge, Je) {
+ const ot = Pa.endActivation(ge);
+ ot.starty + 18 > Je && (ot.starty = Je - 6, Je += 12), $0.drawActivation(k, ot, Je, cr, m2e(ge.from.actor).length), Pa.insert(ot.startx, Je - 10, ot.stopx, Je);
+ })(Be, Pa.getVerticalPos());
+ break;
+ case l.db.LINETYPE.LOOP_START:
+ bT(J, Be, cr.boxMargin, cr.boxMargin + cr.boxTextMargin, (ge) => Pa.newLoop(ge));
+ break;
+ case l.db.LINETYPE.LOOP_END:
+ te = Pa.endLoop(), $0.drawLoop(k, te, "loop", cr), Pa.bumpVerticalPos(te.stopy - Pa.getVerticalPos()), Pa.models.addLoop(te);
+ break;
+ case l.db.LINETYPE.RECT_START:
+ bT(J, Be, cr.boxMargin, cr.boxMargin, (ge) => Pa.newLoop(void 0, ge.message));
+ break;
+ case l.db.LINETYPE.RECT_END:
+ te = Pa.endLoop(), $0.drawBackgroundRect(k, te), Pa.models.addLoop(te), Pa.bumpVerticalPos(te.stopy - Pa.getVerticalPos());
+ break;
+ case l.db.LINETYPE.OPT_START:
+ bT(J, Be, cr.boxMargin, cr.boxMargin + cr.boxTextMargin, (ge) => Pa.newLoop(ge));
+ break;
+ case l.db.LINETYPE.OPT_END:
+ te = Pa.endLoop(), $0.drawLoop(k, te, "opt", cr), Pa.bumpVerticalPos(te.stopy - Pa.getVerticalPos()), Pa.models.addLoop(te);
+ break;
+ case l.db.LINETYPE.ALT_START:
+ bT(J, Be, cr.boxMargin, cr.boxMargin + cr.boxTextMargin, (ge) => Pa.newLoop(ge));
+ break;
+ case l.db.LINETYPE.ALT_ELSE:
+ bT(J, Be, cr.boxMargin + cr.boxTextMargin, cr.boxMargin, (ge) => Pa.addSectionToLoop(ge));
+ break;
+ case l.db.LINETYPE.ALT_END:
+ te = Pa.endLoop(), $0.drawLoop(k, te, "alt", cr), Pa.bumpVerticalPos(te.stopy - Pa.getVerticalPos()), Pa.models.addLoop(te);
+ break;
+ case l.db.LINETYPE.PAR_START:
+ bT(J, Be, cr.boxMargin, cr.boxMargin + cr.boxTextMargin, (ge) => Pa.newLoop(ge));
+ break;
+ case l.db.LINETYPE.PAR_AND:
+ bT(J, Be, cr.boxMargin + cr.boxTextMargin, cr.boxMargin, (ge) => Pa.addSectionToLoop(ge));
+ break;
+ case l.db.LINETYPE.PAR_END:
+ te = Pa.endLoop(), $0.drawLoop(k, te, "par", cr), Pa.bumpVerticalPos(te.stopy - Pa.getVerticalPos()), Pa.models.addLoop(te);
+ break;
+ case l.db.LINETYPE.AUTONUMBER:
+ he = Be.message.start || he, Y = Be.message.step || Y, Be.message.visible ? l.db.enableSequenceNumbers() : l.db.disableSequenceNumbers();
+ break;
+ case l.db.LINETYPE.CRITICAL_START:
+ bT(J, Be, cr.boxMargin, cr.boxMargin + cr.boxTextMargin, (ge) => Pa.newLoop(ge));
+ break;
+ case l.db.LINETYPE.CRITICAL_OPTION:
+ bT(J, Be, cr.boxMargin + cr.boxTextMargin, cr.boxMargin, (ge) => Pa.addSectionToLoop(ge));
+ break;
+ case l.db.LINETYPE.CRITICAL_END:
+ te = Pa.endLoop(), $0.drawLoop(k, te, "critical", cr), Pa.bumpVerticalPos(te.stopy - Pa.getVerticalPos()), Pa.models.addLoop(te);
+ break;
+ case l.db.LINETYPE.BREAK_START:
+ bT(J, Be, cr.boxMargin, cr.boxMargin + cr.boxTextMargin, (ge) => Pa.newLoop(ge));
+ break;
+ case l.db.LINETYPE.BREAK_END:
+ te = Pa.endLoop(), $0.drawLoop(k, te, "break", cr), Pa.bumpVerticalPos(te.stopy - Pa.getVerticalPos()), Pa.models.addLoop(te);
+ break;
+ default:
+ try {
+ ve = Be.msgModel, ve.starty = Pa.getVerticalPos(), ve.sequenceIndex = he, ve.sequenceVisible = l.db.showSequenceNumbers();
+ const ge = function(Je, ot) {
+ Pa.bumpVerticalPos(10);
+ const { startx: bt, stopx: gt, message: je } = ot, Qe = El.splitBreaks(je).length, kt = Tl.calculateTextDimensions(je, JQ(cr)), Wt = kt.height / Qe;
+ let jt;
+ ot.height += Wt, Pa.bumpVerticalPos(Wt);
+ let Zn = kt.height - 10;
+ const Ft = kt.width;
+ if (bt === gt) {
+ jt = Pa.getVerticalPos() + Zn, cr.rightAngles || (Zn += cr.boxMargin, jt = Pa.getVerticalPos() + Zn), Zn += 30;
+ const wn = Math.max(Ft / 2, cr.width / 2);
+ Pa.insert(bt - wn, Pa.getVerticalPos() - 10 + Zn, gt + wn, Pa.getVerticalPos() + 30 + Zn);
+ } else
+ Zn += cr.boxMargin, jt = Pa.getVerticalPos() + Zn, Pa.insert(bt, jt - 10, gt, jt);
+ return Pa.bumpVerticalPos(Zn), ot.height += Zn, ot.stopy = ot.starty + ot.height, Pa.insert(ot.fromBounds, ot.starty, ot.toBounds, ot.stopy), jt;
+ }(0, ve);
+ ue.push({ messageModel: ve, lineStartY: ge }), Pa.models.addMessage(ve);
+ } catch (ge) {
+ _t.error("error while drawing message", ge);
+ }
+ }
+ [l.db.LINETYPE.SOLID_OPEN, l.db.LINETYPE.DOTTED_OPEN, l.db.LINETYPE.SOLID, l.db.LINETYPE.DOTTED, l.db.LINETYPE.SOLID_CROSS, l.db.LINETYPE.DOTTED_CROSS, l.db.LINETYPE.SOLID_POINT, l.db.LINETYPE.DOTTED_POINT].includes(Be.type) && (he += Y);
+ }), ue.forEach((Be) => function(te, Me, ve, ge) {
+ const { startx: Je, stopx: ot, starty: bt, message: gt, type: je, sequenceIndex: Qe, sequenceVisible: kt } = Me, Wt = Tl.calculateTextDimensions(gt, JQ(cr)), jt = $0.getTextObj();
+ jt.x = Je, jt.y = bt + 10, jt.width = ot - Je, jt.class = "messageText", jt.dy = "1em", jt.text = gt, jt.fontFamily = cr.messageFontFamily, jt.fontSize = cr.messageFontSize, jt.fontWeight = cr.messageFontWeight, jt.anchor = cr.messageAlign, jt.valign = "center", jt.textMargin = cr.wrapPadding, jt.tspan = !1, FG(te, jt);
+ const Zn = Wt.width;
+ let Ft;
+ Je === ot ? Ft = cr.rightAngles ? te.append("path").attr("d", `M ${Je},${ve} H ${Je + Math.max(cr.width / 2, Zn / 2)} V ${ve + 25} H ${Je}`) : te.append("path").attr("d", "M " + Je + "," + ve + " C " + (Je + 60) + "," + (ve - 10) + " " + (Je + 60) + "," + (ve + 30) + " " + Je + "," + (ve + 20)) : (Ft = te.append("line"), Ft.attr("x1", Je), Ft.attr("y1", ve), Ft.attr("x2", ot), Ft.attr("y2", ve)), je === ge.db.LINETYPE.DOTTED || je === ge.db.LINETYPE.DOTTED_CROSS || je === ge.db.LINETYPE.DOTTED_POINT || je === ge.db.LINETYPE.DOTTED_OPEN ? (Ft.style("stroke-dasharray", "3, 3"), Ft.attr("class", "messageLine1")) : Ft.attr("class", "messageLine0");
+ let wn = "";
+ cr.arrowMarkerAbsolute && (wn = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, wn = wn.replace(/\(/g, "\\("), wn = wn.replace(/\)/g, "\\)")), Ft.attr("stroke-width", 2), Ft.attr("stroke", "none"), Ft.style("fill", "none"), je !== ge.db.LINETYPE.SOLID && je !== ge.db.LINETYPE.DOTTED || Ft.attr("marker-end", "url(" + wn + "#arrowhead)"), je !== ge.db.LINETYPE.SOLID_POINT && je !== ge.db.LINETYPE.DOTTED_POINT || Ft.attr("marker-end", "url(" + wn + "#filled-head)"), je !== ge.db.LINETYPE.SOLID_CROSS && je !== ge.db.LINETYPE.DOTTED_CROSS || Ft.attr("marker-end", "url(" + wn + "#crosshead)"), (kt || cr.showSequenceNumbers) && (Ft.attr("marker-start", "url(" + wn + "#sequencenumber)"), te.append("text").attr("x", Je).attr("y", ve + 4).attr("font-family", "sans-serif").attr("font-size", "12px").attr("text-anchor", "middle").attr("class", "sequenceNumber").text(Qe));
+ }(k, Be.messageModel, Be.lineStartY, l)), cr.mirrorActors && (Pa.bumpVerticalPos(2 * cr.boxMargin), zOe(k, _, L, Pa.getVerticalPos(), cr, F, !0), Pa.bumpVerticalPos(cr.boxMargin), KIt(k, Pa.getVerticalPos())), Pa.models.boxes.forEach(function(Be) {
+ Be.height = Pa.getVerticalPos() - Be.y, Pa.insert(Be.x, Be.y, Be.x + Be.width, Be.height), Be.startx = Be.x, Be.starty = Be.y, Be.stopx = Be.startx + Be.width, Be.stopy = Be.starty + Be.height, Be.stroke = "rgb(0,0,0, 0.5)", $0.drawBox(k, Be, cr);
+ }), q && Pa.bumpVerticalPos(cr.boxMargin);
+ const le = jCt(k, _, L, v), { bounds: be } = Pa.getBounds();
+ _t.debug("For line height fix Querying: #" + i + " .actor-line"), zTt("#" + i + " .actor-line").attr("y2", be.stopy);
+ let ke = be.stopy - be.starty;
+ ke < le.maxHeight && (ke = le.maxHeight);
+ let de = ke + 2 * cr.diagramMarginY;
+ cr.mirrorActors && (de = de - cr.boxMargin + cr.bottomMarginAdj);
+ let Te = be.stopx - be.startx;
+ Te < le.maxWidth && (Te = le.maxWidth);
+ const xe = Te + 2 * cr.diagramMarginX;
+ U && k.append("text").text(U).attr("x", (be.stopx - be.startx) / 2 - 2 * cr.diagramMarginX).attr("y", -25), V9(k, de, xe, cr.useMaxWidth);
+ const ie = U ? 40 : 0;
+ k.attr("viewBox", be.startx - cr.diagramMarginX + " -" + (cr.diagramMarginY + ie) + " " + xe + " " + (de + ie)), _t.debug("models:", Pa.models);
+} };
+var hPe = function() {
+ var r, i = function(gt, je, Qe, kt) {
+ for (Qe = Qe || {}, kt = gt.length; kt--; Qe[gt[kt]] = je)
+ ;
+ return Qe;
+ }, o = [1, 2], l = [1, 3], f = [1, 5], g = [1, 7], A = [2, 5], b = [1, 15], v = [1, 17], k = [1, 21], _ = [1, 22], T = [1, 23], L = [1, 24], F = [1, 37], U = [1, 25], q = [1, 26], Z = [1, 27], R = [1, 28], J = [1, 29], he = [1, 32], Y = [1, 33], ue = [1, 34], le = [1, 35], be = [1, 36], ke = [1, 39], de = [1, 40], Te = [1, 41], xe = [1, 42], ie = [1, 38], Be = [1, 45], te = [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], Me = [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], ve = [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], ge = [4, 5, 16, 17, 19, 21, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 42, 50, 51, 52, 53, 56, 60], Je = { 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(gt, je, Qe, kt, Wt, jt, Zn) {
+ var Ft = jt.length - 1;
+ switch (Wt) {
+ case 4:
+ return kt.setRootDoc(jt[Ft]), jt[Ft];
+ case 5:
+ this.$ = [];
+ break;
+ case 6:
+ jt[Ft] != "nl" && (jt[Ft - 1].push(jt[Ft]), this.$ = jt[Ft - 1]);
+ break;
+ case 7:
+ case 8:
+ case 12:
+ this.$ = jt[Ft];
+ break;
+ case 9:
+ this.$ = "nl";
+ break;
+ case 13:
+ const an = jt[Ft - 1];
+ an.description = kt.trimColon(jt[Ft]), this.$ = an;
+ break;
+ case 14:
+ this.$ = { stmt: "relation", state1: jt[Ft - 2], state2: jt[Ft] };
+ break;
+ case 15:
+ const Ot = kt.trimColon(jt[Ft]);
+ this.$ = { stmt: "relation", state1: jt[Ft - 3], state2: jt[Ft - 1], description: Ot };
+ break;
+ case 19:
+ this.$ = { stmt: "state", id: jt[Ft - 3], type: "default", description: "", doc: jt[Ft - 1] };
+ break;
+ case 20:
+ var wn = jt[Ft], un = jt[Ft - 2].trim();
+ if (jt[Ft].match(":")) {
+ var ln = jt[Ft].split(":");
+ wn = ln[0], un = [un, ln[1]];
+ }
+ this.$ = { stmt: "state", id: wn, type: "default", description: un };
+ break;
+ case 21:
+ this.$ = { stmt: "state", id: jt[Ft - 3], type: "default", description: jt[Ft - 5], doc: jt[Ft - 1] };
+ break;
+ case 22:
+ this.$ = { stmt: "state", id: jt[Ft], type: "fork" };
+ break;
+ case 23:
+ this.$ = { stmt: "state", id: jt[Ft], type: "join" };
+ break;
+ case 24:
+ this.$ = { stmt: "state", id: jt[Ft], type: "choice" };
+ break;
+ case 25:
+ this.$ = { stmt: "state", id: kt.getDividerId(), type: "divider" };
+ break;
+ case 26:
+ this.$ = { stmt: "state", id: jt[Ft - 1].trim(), note: { position: jt[Ft - 2].trim(), text: jt[Ft].trim() } };
+ break;
+ case 30:
+ this.$ = jt[Ft].trim(), kt.setAccTitle(this.$);
+ break;
+ case 31:
+ case 32:
+ this.$ = jt[Ft].trim(), kt.setAccDescription(this.$);
+ break;
+ case 33:
+ case 34:
+ this.$ = { stmt: "classDef", id: jt[Ft - 1].trim(), classes: jt[Ft].trim() };
+ break;
+ case 35:
+ this.$ = { stmt: "applyClass", id: jt[Ft - 1].trim(), styleClass: jt[Ft].trim() };
+ break;
+ case 38:
+ kt.setDirection("TB"), this.$ = { stmt: "dir", value: "TB" };
+ break;
+ case 39:
+ kt.setDirection("BT"), this.$ = { stmt: "dir", value: "BT" };
+ break;
+ case 40:
+ kt.setDirection("RL"), this.$ = { stmt: "dir", value: "RL" };
+ break;
+ case 41:
+ kt.setDirection("LR"), this.$ = { stmt: "dir", value: "LR" };
+ break;
+ case 44:
+ case 45:
+ this.$ = { stmt: "state", id: jt[Ft].trim(), type: "default", description: "" };
+ break;
+ case 46:
+ case 47:
+ this.$ = { stmt: "state", id: jt[Ft - 2].trim(), classes: [jt[Ft].trim()], type: "default", description: "" };
+ break;
+ case 50:
+ kt.parseDirective("%%{", "open_directive");
+ break;
+ case 51:
+ kt.parseDirective(jt[Ft], "type_directive");
+ break;
+ case 52:
+ jt[Ft] = jt[Ft].trim().replace(/'/g, '"'), kt.parseDirective(jt[Ft], "arg_directive");
+ break;
+ case 53:
+ kt.parseDirective("}%%", "close_directive", "state");
+ }
+ }, table: [{ 3: 1, 4: o, 5: l, 6: 4, 7: f, 45: 6, 60: g }, { 1: [3] }, { 3: 8, 4: o, 5: l, 6: 4, 7: f, 45: 6, 60: g }, { 3: 9, 4: o, 5: l, 6: 4, 7: f, 45: 6, 60: g }, { 3: 10, 4: o, 5: l, 6: 4, 7: f, 45: 6, 60: g }, i([1, 4, 5, 16, 17, 19, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 42, 50, 51, 52, 53, 56, 60], A, { 8: 11 }), { 46: 12, 61: [1, 13] }, { 61: [2, 50] }, { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3] }, { 1: [2, 4], 4: b, 5: v, 6: 30, 9: 14, 10: 16, 11: 18, 12: 19, 13: 20, 16: k, 17: _, 19: T, 22: L, 24: F, 25: U, 26: q, 27: Z, 28: R, 29: J, 32: 31, 33: he, 35: Y, 37: ue, 38: le, 42: be, 45: 6, 50: ke, 51: de, 52: Te, 53: xe, 56: ie, 60: g }, { 47: 43, 48: [1, 44], 63: Be }, i([48, 63], [2, 51]), i(te, [2, 6]), { 6: 30, 10: 46, 11: 18, 12: 19, 13: 20, 16: k, 17: _, 19: T, 22: L, 24: F, 25: U, 26: q, 27: Z, 28: R, 29: J, 32: 31, 33: he, 35: Y, 37: ue, 38: le, 42: be, 45: 6, 50: ke, 51: de, 52: Te, 53: xe, 56: ie, 60: g }, i(te, [2, 8]), i(te, [2, 9]), i(te, [2, 10]), i(te, [2, 11]), i(te, [2, 12], { 14: [1, 47], 15: [1, 48] }), i(te, [2, 16]), { 18: [1, 49] }, i(te, [2, 18], { 20: [1, 50] }), { 23: [1, 51] }, i(te, [2, 22]), i(te, [2, 23]), i(te, [2, 24]), i(te, [2, 25]), { 30: 52, 31: [1, 53], 58: [1, 54], 59: [1, 55] }, i(te, [2, 28]), i(te, [2, 29]), { 34: [1, 56] }, { 36: [1, 57] }, i(te, [2, 32]), { 39: [1, 58], 41: [1, 59] }, { 43: [1, 60] }, i(Me, [2, 44], { 57: [1, 61] }), i(Me, [2, 45], { 57: [1, 62] }), i(te, [2, 38]), i(te, [2, 39]), i(te, [2, 40]), i(te, [2, 41]), i(ve, [2, 36]), { 49: 63, 62: [1, 64] }, i(ve, [2, 53]), i(te, [2, 7]), i(te, [2, 13]), { 13: 65, 24: F, 56: ie }, i(te, [2, 17]), i(ge, A, { 8: 66 }), { 24: [1, 67] }, { 24: [1, 68] }, { 23: [1, 69] }, { 24: [2, 48] }, { 24: [2, 49] }, i(te, [2, 30]), i(te, [2, 31]), { 40: [1, 70] }, { 40: [1, 71] }, { 44: [1, 72] }, { 24: [1, 73] }, { 24: [1, 74] }, { 47: 75, 63: Be }, { 63: [2, 52] }, i(te, [2, 14], { 14: [1, 76] }), { 4: b, 5: v, 6: 30, 9: 14, 10: 16, 11: 18, 12: 19, 13: 20, 16: k, 17: _, 19: T, 21: [1, 77], 22: L, 24: F, 25: U, 26: q, 27: Z, 28: R, 29: J, 32: 31, 33: he, 35: Y, 37: ue, 38: le, 42: be, 45: 6, 50: ke, 51: de, 52: Te, 53: xe, 56: ie, 60: g }, i(te, [2, 20], { 20: [1, 78] }), { 31: [1, 79] }, { 24: [1, 80] }, i(te, [2, 33]), i(te, [2, 34]), i(te, [2, 35]), i(Me, [2, 46]), i(Me, [2, 47]), i(ve, [2, 37]), i(te, [2, 15]), i(te, [2, 19]), i(ge, A, { 8: 81 }), i(te, [2, 26]), i(te, [2, 27]), { 4: b, 5: v, 6: 30, 9: 14, 10: 16, 11: 18, 12: 19, 13: 20, 16: k, 17: _, 19: T, 21: [1, 82], 22: L, 24: F, 25: U, 26: q, 27: Z, 28: R, 29: J, 32: 31, 33: he, 35: Y, 37: ue, 38: le, 42: be, 45: 6, 50: ke, 51: de, 52: Te, 53: xe, 56: ie, 60: g }, i(te, [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(gt, je) {
+ if (!je.recoverable) {
+ var Qe = new Error(gt);
+ throw Qe.hash = je, Qe;
+ }
+ this.trace(gt);
+ }, parse: function(gt) {
+ var je = this, Qe = [0], kt = [], Wt = [null], jt = [], Zn = this.table, Ft = "", wn = 0, un = 0, ln = jt.slice.call(arguments, 1), an = Object.create(this.lexer), Ot = { yy: {} };
+ for (var $n in this.yy)
+ Object.prototype.hasOwnProperty.call(this.yy, $n) && (Ot.yy[$n] = this.yy[$n]);
+ an.setInput(gt, Ot.yy), Ot.yy.lexer = an, Ot.yy.parser = this, an.yylloc === void 0 && (an.yylloc = {});
+ var pt = an.yylloc;
+ jt.push(pt);
+ var Ci = an.options && an.options.ranges;
+ function ut() {
+ var _i;
+ return typeof (_i = kt.pop() || an.lex() || 1) != "number" && (_i instanceof Array && (_i = (kt = _i).pop()), _i = je.symbols_[_i] || _i), _i;
+ }
+ typeof Ot.yy.parseError == "function" ? this.parseError = Ot.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
+ for (var br, zt, Wr, zr, Si, vr, Qr, or, Gr = {}; ; ) {
+ if (zt = Qe[Qe.length - 1], this.defaultActions[zt] ? Wr = this.defaultActions[zt] : (br == null && (br = ut()), Wr = Zn[zt] && Zn[zt][br]), Wr === void 0 || !Wr.length || !Wr[0]) {
+ var An = "";
+ for (Si in or = [], Zn[zt])
+ this.terminals_[Si] && Si > 2 && or.push("'" + this.terminals_[Si] + "'");
+ An = an.showPosition ? "Parse error on line " + (wn + 1) + `:
+` + an.showPosition() + `
+Expecting ` + or.join(", ") + ", got '" + (this.terminals_[br] || br) + "'" : "Parse error on line " + (wn + 1) + ": Unexpected " + (br == 1 ? "end of input" : "'" + (this.terminals_[br] || br) + "'"), this.parseError(An, { text: an.match, token: this.terminals_[br] || br, line: an.yylineno, loc: pt, expected: or });
+ }
+ if (Wr[0] instanceof Array && Wr.length > 1)
+ throw new Error("Parse Error: multiple actions possible at state: " + zt + ", token: " + br);
+ switch (Wr[0]) {
+ case 1:
+ Qe.push(br), Wt.push(an.yytext), jt.push(an.yylloc), Qe.push(Wr[1]), br = null, un = an.yyleng, Ft = an.yytext, wn = an.yylineno, pt = an.yylloc;
+ break;
+ case 2:
+ if (vr = this.productions_[Wr[1]][1], Gr.$ = Wt[Wt.length - vr], Gr._$ = { first_line: jt[jt.length - (vr || 1)].first_line, last_line: jt[jt.length - 1].last_line, first_column: jt[jt.length - (vr || 1)].first_column, last_column: jt[jt.length - 1].last_column }, Ci && (Gr._$.range = [jt[jt.length - (vr || 1)].range[0], jt[jt.length - 1].range[1]]), (zr = this.performAction.apply(Gr, [Ft, un, wn, Ot.yy, Wr[1], Wt, jt].concat(ln))) !== void 0)
+ return zr;
+ vr && (Qe = Qe.slice(0, -1 * vr * 2), Wt = Wt.slice(0, -1 * vr), jt = jt.slice(0, -1 * vr)), Qe.push(this.productions_[Wr[1]][0]), Wt.push(Gr.$), jt.push(Gr._$), Qr = Zn[Qe[Qe.length - 2]][Qe[Qe.length - 1]], Qe.push(Qr);
+ break;
+ case 3:
+ return !0;
+ }
+ }
+ return !0;
+ } }, ot = (r = { EOF: 1, parseError: function(gt, je) {
+ if (!this.yy.parser)
+ throw new Error(gt);
+ this.yy.parser.parseError(gt, je);
+ }, setInput: function(gt, je) {
+ return this.yy = je || this.yy || {}, this._input = gt, 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 gt = this._input[0];
+ return this.yytext += gt, this.yyleng++, this.offset++, this.match += gt, this.matched += gt, gt.match(/(?:\r\n?|\n).*/g) ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), gt;
+ }, unput: function(gt) {
+ var je = gt.length, Qe = gt.split(/(?:\r\n?|\n)/g);
+ this._input = gt + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - je), this.offset -= je;
+ var kt = this.match.split(/(?:\r\n?|\n)/g);
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), Qe.length - 1 && (this.yylineno -= Qe.length - 1);
+ var Wt = 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: Qe ? (Qe.length === kt.length ? this.yylloc.first_column : 0) + kt[kt.length - Qe.length].length - Qe[0].length : this.yylloc.first_column - je }, this.options.ranges && (this.yylloc.range = [Wt[0], Wt[0] + this.yyleng - je]), this.yyleng = this.yytext.length, this;
+ }, more: function() {
+ return this._more = !0, this;
+ }, reject: function() {
+ return this.options.backtrack_lexer ? (this._backtrack = !0, this) : 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 });
+ }, less: function(gt) {
+ this.unput(this.match.slice(gt));
+ }, pastInput: function() {
+ var gt = this.matched.substr(0, this.matched.length - this.match.length);
+ return (gt.length > 20 ? "..." : "") + gt.substr(-20).replace(/\n/g, "");
+ }, upcomingInput: function() {
+ var gt = this.match;
+ return gt.length < 20 && (gt += this._input.substr(0, 20 - gt.length)), (gt.substr(0, 20) + (gt.length > 20 ? "..." : "")).replace(/\n/g, "");
+ }, showPosition: function() {
+ var gt = this.pastInput(), je = new Array(gt.length + 1).join("-");
+ return gt + this.upcomingInput() + `
+` + je + "^";
+ }, test_match: function(gt, je) {
+ var Qe, kt, Wt;
+ if (this.options.backtrack_lexer && (Wt = { 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 && (Wt.yylloc.range = this.yylloc.range.slice(0))), (kt = gt[0].match(/(?:\r\n?|\n).*/g)) && (this.yylineno += kt.length), this.yylloc = { first_line: this.yylloc.last_line, last_line: this.yylineno + 1, first_column: this.yylloc.last_column, last_column: kt ? kt[kt.length - 1].length - kt[kt.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + gt[0].length }, this.yytext += gt[0], this.match += gt[0], this.matches = gt, 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(gt[0].length), this.matched += gt[0], Qe = this.performAction.call(this, this.yy, this, je, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), Qe)
+ return Qe;
+ if (this._backtrack) {
+ for (var jt in Wt)
+ this[jt] = Wt[jt];
+ return !1;
+ }
+ return !1;
+ }, next: function() {
+ if (this.done)
+ return this.EOF;
+ var gt, je, Qe, kt;
+ this._input || (this.done = !0), this._more || (this.yytext = "", this.match = "");
+ for (var Wt = this._currentRules(), jt = 0; jt < Wt.length; jt++)
+ if ((Qe = this._input.match(this.rules[Wt[jt]])) && (!je || Qe[0].length > je[0].length)) {
+ if (je = Qe, kt = jt, this.options.backtrack_lexer) {
+ if ((gt = this.test_match(Qe, Wt[jt])) !== !1)
+ return gt;
+ if (this._backtrack) {
+ je = !1;
+ continue;
+ }
+ return !1;
+ }
+ if (!this.options.flex)
+ break;
+ }
+ return je ? (gt = this.test_match(je, Wt[kt])) !== !1 && gt : 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 gt = this.next();
+ return gt || this.lex();
+ }, begin: function(gt) {
+ this.conditionStack.push(gt);
+ }, popState: function() {
+ return this.conditionStack.length - 1 > 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(gt) {
+ return (gt = this.conditionStack.length - 1 - Math.abs(gt || 0)) >= 0 ? this.conditionStack[gt] : "INITIAL";
+ }, pushState: function(gt) {
+ this.begin(gt);
+ }, stateStackSize: function() {
+ return this.conditionStack.length;
+ }, options: { "case-insensitive": !0 }, performAction: function(gt, je, Qe, kt) {
+ switch (Qe) {
+ case 0:
+ return 41;
+ case 1:
+ case 44:
+ return 50;
+ case 2:
+ case 45:
+ return 51;
+ case 3:
+ case 46:
+ return 52;
+ case 4:
+ case 47:
+ 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:
+ case 11:
+ case 13:
+ case 14:
+ case 15:
+ case 16:
+ case 56:
+ case 58:
+ case 64:
+ break;
+ case 12:
+ case 79:
+ return 5;
+ case 17:
+ case 34:
+ return this.pushState("SCALE"), 17;
+ case 18:
+ case 35:
+ return 18;
+ case 19:
+ case 25:
+ case 36:
+ case 51:
+ case 54:
+ 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 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 37:
+ this.pushState("STATE");
+ break;
+ case 38:
+ case 41:
+ return this.popState(), je.yytext = je.yytext.slice(0, -8).trim(), 25;
+ case 39:
+ case 42:
+ return this.popState(), je.yytext = je.yytext.slice(0, -8).trim(), 26;
+ case 40:
+ case 43:
+ return this.popState(), je.yytext = je.yytext.slice(0, -10).trim(), 27;
+ case 48:
+ this.pushState("STATE_STRING");
+ break;
+ case 49:
+ return this.pushState("STATE_ID"), "AS";
+ case 50:
+ case 66:
+ return this.popState(), "ID";
+ case 52:
+ return "STATE_DESCR";
+ case 53:
+ return 19;
+ case 55:
+ return this.popState(), this.pushState("struct"), 20;
+ case 57:
+ return this.popState(), 21;
+ 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 65:
+ return "NOTE_TEXT";
+ case 67:
+ return this.popState(), this.pushState("NOTE_TEXT"), 24;
+ case 68:
+ return this.popState(), je.yytext = je.yytext.substr(2).trim(), 31;
+ case 69:
+ return this.popState(), je.yytext = je.yytext.slice(0, -8).trim(), 31;
+ case 70:
+ case 71:
+ return 7;
+ case 72:
+ return 16;
+ case 73:
+ return 56;
+ case 74:
+ return 24;
+ case 75:
+ return je.yytext = je.yytext.trim(), 14;
+ case 76:
+ return 15;
+ case 77:
+ return 28;
+ case 78:
+ return 57;
+ 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, /^(?:.*<>)/i, /^(?:.*<>)/i, /^(?:.*<>)/i, /^(?:.*\[\[fork\]\])/i, /^(?:.*\[\[join\]\])/i, /^(?:.*\[\[choice\]\])/i, /^(?:.*direction\s+TB[^\n]*)/i, /^(?:.*direction\s+BT[^\n]*)/i, /^(?:.*direction\s+RL[^\n]*)/i, /^(?:.*direction\s+LR[^\n]*)/i, /^(?:["])/i, /^(?:\s*as\s+)/i, /^(?:[^\n\{]*)/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[^\n\s\{]+)/i, /^(?:\n)/i, /^(?:\{)/i, /^(?:%%(?!\{)[^\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 } } }, r);
+ function bt() {
+ this.yy = {};
+ }
+ return Je.lexer = ot, bt.prototype = Je, Je.Parser = bt, new bt();
+}();
+hPe.parser = hPe;
+const GCt = hPe, B_n = (r, i) => {
+ var o;
+ return ((o = i == null ? void 0 : i.state) == null ? void 0 : o.defaultRenderer) !== "dagre-wrapper" && r.match(/^\s*stateDiagram/) !== null;
+}, S_n = (r, i) => {
+ var o;
+ return r.match(/^\s*stateDiagram-v2/) !== null || !(!r.match(/^\s*stateDiagram/) || ((o = i == null ? void 0 : i.state) == null ? void 0 : o.defaultRenderer) !== "dagre-wrapper");
+}, Ebe = "state", lQe = "relation", zie = "default", GIt = "divider", uQe = "[*]", XIt = "start", XCt = uQe, WCt = "color", VCt = "fill";
+let qCt = "LR", ype = [], Rre = {}, Tbe = { root: { relations: [], states: {}, documents: {} } }, $y = Tbe.root, kie = 0, YCt = 0;
+const wpe = (r) => JSON.parse(JSON.stringify(r)), mme = (r, i, o) => {
+ if (i.stmt === lQe)
+ mme(r, i.state1, !0), mme(r, i.state2, !1);
+ else if (i.stmt === Ebe && (i.id === "[*]" ? (i.id = o ? r.id + "_start" : r.id + "_end", i.start = o) : i.id = i.id.trim()), i.doc) {
+ const l = [];
+ let f, g = [];
+ for (f = 0; f < i.doc.length; f++)
+ if (i.doc[f].type === GIt) {
+ const A = wpe(i.doc[f]);
+ A.doc = wpe(g), l.push(A), g = [];
+ } else
+ g.push(i.doc[f]);
+ if (l.length > 0 && g.length > 0) {
+ const A = { stmt: Ebe, id: pLt(), type: "divider", doc: wpe(g) };
+ l.push(wpe(A)), i.doc = l;
+ }
+ i.doc.forEach((A) => mme(i, A, !0));
+ }
+}, ZQ = function(r, i = zie, o = null, l = null, f = null, g = null, A = null, b = null) {
+ const v = r == null ? void 0 : r.trim();
+ $y.states[v] === void 0 ? (_t.info("Adding state ", v, l), $y.states[v] = { id: v, descriptions: [], type: i, doc: o, note: f, classes: [], styles: [], textStyles: [] }) : ($y.states[v].doc || ($y.states[v].doc = o), $y.states[v].type || ($y.states[v].type = i)), l && (_t.info("Setting state description", v, l), typeof l == "string" && fPe(v, l.trim()), typeof l == "object" && l.forEach((k) => fPe(v, k.trim()))), f && ($y.states[v].note = f, $y.states[v].note.text = El.sanitizeText($y.states[v].note.text, Bn())), g && (_t.info("Setting state classes", v, g), (typeof g == "string" ? [g] : g).forEach((k) => dPe(v, k.trim()))), A && (_t.info("Setting state styles", v, A), (typeof A == "string" ? [A] : A).forEach((k) => L_n(v, k.trim()))), b && (_t.info("Setting state styles", v, A), (typeof b == "string" ? [b] : b).forEach((k) => I_n(v, k.trim())));
+}, JCt = function(r) {
+ Tbe = { root: { relations: [], states: {}, documents: {} } }, $y = Tbe.root, kie = 0, Rre = {}, r || w5();
+}, xie = function(r) {
+ return $y.states[r];
+};
+function GOe(r = "") {
+ let i = r;
+ return r === uQe && (kie++, i = `${XIt}${kie}`), i;
+}
+function XOe(r = "", i = zie) {
+ return r === uQe ? XIt : i;
+}
+const ZCt = function(r, i, o) {
+ if (typeof r == "object")
+ (function(l, f, g) {
+ let A = GOe(l.id.trim()), b = XOe(l.id.trim(), l.type), v = GOe(f.id.trim()), k = XOe(f.id.trim(), f.type);
+ ZQ(A, b, l.doc, l.description, l.note, l.classes, l.styles, l.textStyles), ZQ(v, k, f.doc, f.description, f.note, f.classes, f.styles, f.textStyles), $y.relations.push({ id1: A, id2: v, relationTitle: El.sanitizeText(g, Bn()) });
+ })(r, i, o);
+ else {
+ const l = GOe(r.trim()), f = XOe(r), g = function(b = "") {
+ let v = b;
+ return b === XCt && (kie++, v = `end${kie}`), v;
+ }(i.trim()), A = /* @__PURE__ */ function(b = "", v = zie) {
+ return b === XCt ? "end" : v;
+ }(i);
+ ZQ(l, f), ZQ(g, A), $y.relations.push({ id1: l, id2: g, title: El.sanitizeText(o, Bn()) });
+ }
+}, fPe = function(r, i) {
+ const o = $y.states[r], l = i.startsWith(":") ? i.replace(":", "").trim() : i;
+ o.descriptions.push(El.sanitizeText(l, Bn()));
+}, e7t = function(r, i = "") {
+ Rre[r] === void 0 && (Rre[r] = { id: r, styles: [], textStyles: [] });
+ const o = Rre[r];
+ i != null && i.split(",").forEach((l) => {
+ const f = l.replace(/([^;]*);/, "$1").trim();
+ if (l.match(WCt)) {
+ const g = f.replace(VCt, "bgFill").replace(WCt, VCt);
+ o.textStyles.push(g);
+ }
+ o.styles.push(f);
+ });
+}, dPe = function(r, i) {
+ r.split(",").forEach(function(o) {
+ let l = xie(o);
+ if (l === void 0) {
+ const f = o.trim();
+ ZQ(f), l = xie(f);
+ }
+ l.classes.push(i);
+ });
+}, L_n = function(r, i) {
+ const o = xie(r);
+ o !== void 0 && o.textStyles.push(i);
+}, I_n = function(r, i) {
+ const o = xie(r);
+ o !== void 0 && o.textStyles.push(i);
+}, cL = { parseDirective: function(r, i, o) {
+ n0.parseDirective(this, r, i, o);
+}, getConfig: () => Bn().state, addState: ZQ, clear: JCt, getState: xie, getStates: function() {
+ return $y.states;
+}, getRelations: function() {
+ return $y.relations;
+}, getClasses: function() {
+ return Rre;
+}, getDirection: () => qCt, addRelation: ZCt, getDividerId: () => (YCt++, "divider-id-" + YCt), setDirection: (r) => {
+ qCt = r;
+}, cleanupLabel: function(r) {
+ return r.substring(0, 1) === ":" ? r.substr(2).trim() : r.trim();
+}, lineType: { LINE: 0, DOTTED_LINE: 1 }, relationType: { AGGREGATION: 0, EXTENSION: 1, COMPOSITION: 2, DEPENDENCY: 3 }, logDocuments: function() {
+ _t.info("Documents = ", Tbe);
+}, getRootDoc: () => ype, setRootDoc: (r) => {
+ _t.info("Setting root doc", r), ype = r;
+}, getRootDocV2: () => (mme({ id: "root" }, { id: "root", doc: ype }, !0), { id: "root", doc: ype }), extract: (r) => {
+ let i;
+ i = r.doc ? r.doc : r, _t.info(i), JCt(!0), _t.info("Extract", i), i.forEach((o) => {
+ switch (o.stmt) {
+ case Ebe:
+ ZQ(o.id.trim(), o.type, o.doc, o.description, o.note, o.classes, o.styles, o.textStyles);
+ break;
+ case lQe:
+ ZCt(o.state1, o.state2, o.description);
+ break;
+ case "classDef":
+ e7t(o.id.trim(), o.classes);
+ break;
+ case "applyClass":
+ dPe(o.id.trim(), o.styleClass);
+ }
+ });
+}, trimColon: (r) => r && r[0] === ":" ? r.substr(1).trim() : r.trim(), getAccTitle: _k, setAccTitle: k5, getAccDescription: Tk, setAccDescription: Ek, addStyleClass: e7t, setCssClass: dPe, addDescription: fPe, setDiagramTitle: q9, getDiagramTitle: Y9 }, M_n = (r, i) => {
+ const o = r.append("text").attr("x", 2 * Bn().state.padding).attr("y", Bn().state.textHeight + 1.3 * Bn().state.padding).attr("font-size", Bn().state.fontSize).attr("class", "state-title").text(i.descriptions[0]).node().getBBox(), l = o.height, f = r.append("text").attr("x", Bn().state.padding).attr("y", l + 0.4 * Bn().state.padding + Bn().state.dividerMargin + Bn().state.textHeight).attr("class", "state-description");
+ let g = !0, A = !0;
+ i.descriptions.forEach(function(_) {
+ g || (function(T, L, F) {
+ const U = T.append("tspan").attr("x", 2 * Bn().state.padding).text(L);
+ F || U.attr("dy", Bn().state.textHeight);
+ }(f, _, A), A = !1), g = !1;
+ });
+ const b = r.append("line").attr("x1", Bn().state.padding).attr("y1", Bn().state.padding + l + Bn().state.dividerMargin / 2).attr("y2", Bn().state.padding + l + Bn().state.dividerMargin / 2).attr("class", "descr-divider"), v = f.node().getBBox(), k = Math.max(v.width, o.width);
+ return b.attr("x2", k + 3 * Bn().state.padding), r.insert("rect", ":first-child").attr("x", Bn().state.padding).attr("y", Bn().state.padding).attr("width", k + 2 * Bn().state.padding).attr("height", v.height + l + 2 * Bn().state.padding).attr("rx", Bn().state.radius), r;
+}, F_n = (r, i, o) => {
+ const l = Bn().state.padding, f = 2 * Bn().state.padding, g = r.node().getBBox(), A = g.width, b = g.x, v = r.append("text").attr("x", 0).attr("y", Bn().state.titleShift).attr("font-size", Bn().state.fontSize).attr("class", "state-title").text(i.id), k = v.node().getBBox().width + f;
+ let _, T = Math.max(k, A);
+ T === A && (T += f);
+ const L = r.node().getBBox();
+ i.doc, _ = b - l, k > A && (_ = (A - T) / 2 + l), Math.abs(b - L.x) < l && k > A && (_ = b - (k - A) / 2);
+ const F = 1 - Bn().state.textHeight;
+ return r.insert("rect", ":first-child").attr("x", _).attr("y", F).attr("class", o ? "alt-composit" : "composit").attr("width", T).attr("height", L.height + Bn().state.textHeight + Bn().state.titleShift + 1).attr("rx", "0"), v.attr("x", _ + l), k <= A && v.attr("x", b + (T - f) / 2 - k / 2 + l), r.insert("rect", ":first-child").attr("x", _).attr("y", Bn().state.titleShift - Bn().state.textHeight - Bn().state.padding).attr("width", T).attr("height", 3 * Bn().state.textHeight).attr("rx", Bn().state.radius), r.insert("rect", ":first-child").attr("x", _).attr("y", Bn().state.titleShift - Bn().state.textHeight - Bn().state.padding).attr("width", T).attr("height", L.height + 3 + 2 * Bn().state.textHeight).attr("rx", Bn().state.radius), r;
+}, O_n = (r, i) => {
+ i.attr("class", "state-note");
+ const o = i.append("rect").attr("x", 0).attr("y", Bn().state.padding), l = i.append("g"), { textWidth: f, textHeight: g } = ((A, b, v, k) => {
+ let _ = 0;
+ const T = k.append("text");
+ T.style("text-anchor", "start"), T.attr("class", "noteText");
+ let L = A.replace(/\r\n/g, "
");
+ L = L.replace(/\n/g, "
");
+ const F = L.split(El.lineBreakRegex);
+ let U = 1.25 * Bn().state.noteMargin;
+ for (const q of F) {
+ const Z = q.trim();
+ if (Z.length > 0) {
+ const R = T.append("tspan");
+ R.text(Z), U === 0 && (U += R.node().getBBox().height), _ += U, R.attr("x", b + Bn().state.noteMargin), R.attr("y", v + _ + 1.25 * Bn().state.noteMargin);
+ }
+ }
+ return { textWidth: T.node().getBBox().width, textHeight: _ };
+ })(r, 0, 0, l);
+ return o.attr("height", g + 2 * Bn().state.noteMargin), o.attr("width", f + 2 * Bn().state.noteMargin), o;
+}, t7t = function(r, i) {
+ const o = i.id, l = { id: o, label: i.id, width: 0, height: 0 }, f = r.append("g").attr("id", o).attr("class", "stateGroup");
+ i.type === "start" && ((A) => {
+ A.append("circle").attr("class", "start-state").attr("r", Bn().state.sizeUnit).attr("cx", Bn().state.padding + Bn().state.sizeUnit).attr("cy", Bn().state.padding + Bn().state.sizeUnit);
+ })(f), i.type === "end" && ((A) => {
+ A.append("circle").attr("class", "end-state-outer").attr("r", Bn().state.sizeUnit + Bn().state.miniPadding).attr("cx", Bn().state.padding + Bn().state.sizeUnit + Bn().state.miniPadding).attr("cy", Bn().state.padding + Bn().state.sizeUnit + Bn().state.miniPadding), A.append("circle").attr("class", "end-state-inner").attr("r", Bn().state.sizeUnit).attr("cx", Bn().state.padding + Bn().state.sizeUnit + 2).attr("cy", Bn().state.padding + Bn().state.sizeUnit + 2);
+ })(f), i.type !== "fork" && i.type !== "join" || ((A, b) => {
+ let v = Bn().state.forkWidth, k = Bn().state.forkHeight;
+ if (b.parentId) {
+ let _ = v;
+ v = k, k = _;
+ }
+ A.append("rect").style("stroke", "black").style("fill", "black").attr("width", v).attr("height", k).attr("x", Bn().state.padding).attr("y", Bn().state.padding);
+ })(f, i), i.type === "note" && O_n(i.note.text, f), i.type === "divider" && ((A) => {
+ A.append("line").style("stroke", "grey").style("stroke-dasharray", "3").attr("x1", Bn().state.textHeight).attr("class", "divider").attr("x2", 2 * Bn().state.textHeight).attr("y1", 0).attr("y2", 0);
+ })(f), i.type === "default" && i.descriptions.length === 0 && ((A, b) => {
+ const v = A.append("text").attr("x", 2 * Bn().state.padding).attr("y", Bn().state.textHeight + 2 * Bn().state.padding).attr("font-size", Bn().state.fontSize).attr("class", "state-title").text(b.id), k = v.node().getBBox();
+ A.insert("rect", ":first-child").attr("x", Bn().state.padding).attr("y", Bn().state.padding).attr("width", k.width + 2 * Bn().state.padding).attr("height", k.height + 2 * Bn().state.padding).attr("rx", Bn().state.radius);
+ })(f, i), i.type === "default" && i.descriptions.length > 0 && M_n(f, i);
+ const g = f.node().getBBox();
+ return l.width = g.width + 2 * Bn().state.padding, l.height = g.height + 2 * Bn().state.padding, l;
+};
+let n7t = 0, dk;
+const WOe = {}, D_n = (r) => r ? r.length * dk.fontSizeFactor : 1, WIt = (r, i, o, l, f, g, A) => {
+ const b = new ub({ compound: !0, multigraph: !0 });
+ let v, k = !0;
+ for (v = 0; v < r.length; v++)
+ if (r[v].stmt === "relation") {
+ k = !1;
+ break;
+ }
+ o ? b.setGraph({ rankdir: "LR", multigraph: !0, compound: !0, ranker: "tight-tree", ranksep: k ? 1 : dk.edgeLengthFactor, nodeSep: k ? 1 : 50, isMultiGraph: !0 }) : b.setGraph({ rankdir: "TB", multigraph: !0, compound: !0, ranksep: k ? 1 : dk.edgeLengthFactor, nodeSep: k ? 1 : 50, ranker: "tight-tree", isMultiGraph: !0 }), b.setDefaultEdgeLabel(function() {
+ return {};
+ }), A.db.extract(r);
+ const _ = A.db.getStates(), T = A.db.getRelations(), L = Object.keys(_);
+ for (const R of L) {
+ const J = _[R];
+ let he;
+ if (o && (J.parentId = o), J.doc) {
+ let Y = i.append("g").attr("id", J.id).attr("class", "stateGroup");
+ he = WIt(J.doc, Y, J.id, !l, f, g, A);
+ {
+ Y = F_n(Y, J, l);
+ let ue = Y.node().getBBox();
+ he.width = ue.width, he.height = ue.height + dk.padding / 2, WOe[J.id] = { y: dk.compositTitleSize };
+ }
+ } else
+ he = t7t(i, J);
+ if (J.note) {
+ const Y = { descriptions: [], id: J.id + "-note", note: J.note, type: "note" }, ue = t7t(i, Y);
+ J.note.position === "left of" ? (b.setNode(he.id + "-note", ue), b.setNode(he.id, he)) : (b.setNode(he.id, he), b.setNode(he.id + "-note", ue)), b.setParent(he.id, he.id + "-group"), b.setParent(he.id + "-note", he.id + "-group");
+ } else
+ b.setNode(he.id, he);
+ }
+ _t.debug("Count=", b.nodeCount(), b);
+ let F = 0;
+ T.forEach(function(R) {
+ F++, _t.debug("Setting edge", R), b.setEdge(R.id1, R.id2, { relation: R, width: D_n(R.title), height: dk.labelHeight * El.getRows(R.title).length, labelpos: "c" }, "id" + F);
+ }), Uie(b), _t.debug("Graph after layout", b.nodes());
+ const U = i.node();
+ b.nodes().forEach(function(R) {
+ R !== void 0 && b.node(R) !== void 0 ? (_t.warn("Node " + R + ": " + JSON.stringify(b.node(R))), f.select("#" + U.id + " #" + R).attr("transform", "translate(" + (b.node(R).x - b.node(R).width / 2) + "," + (b.node(R).y + (WOe[R] ? WOe[R].y : 0) - b.node(R).height / 2) + " )"), f.select("#" + U.id + " #" + R).attr("data-x-shift", b.node(R).x - b.node(R).width / 2), g.querySelectorAll("#" + U.id + " #" + R + " .divider").forEach((J) => {
+ const he = J.parentElement;
+ let Y = 0, ue = 0;
+ he && (he.parentElement && (Y = he.parentElement.getBBox().width), ue = parseInt(he.getAttribute("data-x-shift"), 10), Number.isNaN(ue) && (ue = 0)), J.setAttribute("x1", 0 - ue + 8), J.setAttribute("x2", Y - ue - 8);
+ })) : _t.debug("No Node " + R + ": " + JSON.stringify(b.node(R)));
+ });
+ let q = U.getBBox();
+ b.edges().forEach(function(R) {
+ R !== void 0 && b.edge(R) !== void 0 && (_t.debug("Edge " + R.v + " -> " + R.w + ": " + JSON.stringify(b.edge(R))), function(J, he, Y) {
+ he.points = he.points.filter((de) => !Number.isNaN(de.y));
+ const ue = he.points, le = pX().x(function(de) {
+ return de.x;
+ }).y(function(de) {
+ return de.y;
+ }).curve(Rie), be = J.append("path").attr("d", le(ue)).attr("id", "edge" + n7t).attr("class", "transition");
+ let ke = "";
+ if (Bn().state.arrowMarkerAbsolute && (ke = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, ke = ke.replace(/\(/g, "\\("), ke = ke.replace(/\)/g, "\\)")), be.attr("marker-end", "url(" + ke + "#" + function(de) {
+ switch (cL.relationType.DEPENDENCY) {
+ case cL.relationType.AGGREGATION:
+ return "aggregation";
+ case cL.relationType.EXTENSION:
+ return "extension";
+ case cL.relationType.COMPOSITION:
+ return "composition";
+ case cL.relationType.DEPENDENCY:
+ return "dependency";
+ }
+ }() + "End)"), Y.title !== void 0) {
+ const de = J.append("g").attr("class", "stateLabel"), { x: Te, y: xe } = Tl.calcLabelPosition(he.points), ie = El.getRows(Y.title);
+ let Be = 0;
+ const te = [];
+ let Me = 0, ve = 0;
+ for (let ot = 0; ot <= ie.length; ot++) {
+ const bt = de.append("text").attr("text-anchor", "middle").text(ie[ot]).attr("x", Te).attr("y", xe + Be), gt = bt.node().getBBox();
+ Me = Math.max(Me, gt.width), ve = Math.min(ve, gt.x), _t.info(gt.x, Te, xe + Be), Be === 0 && (Be = bt.node().getBBox().height, _t.info("Title height", Be, xe)), te.push(bt);
+ }
+ let ge = Be * ie.length;
+ if (ie.length > 1) {
+ const ot = (ie.length - 1) * Be * 0.5;
+ te.forEach((bt, gt) => bt.attr("y", xe + gt * Be - ot)), ge = Be * ie.length;
+ }
+ const Je = de.node().getBBox();
+ de.insert("rect", ":first-child").attr("class", "box").attr("x", Te - Me / 2 - Bn().state.padding / 2).attr("y", xe - ge / 2 - Bn().state.padding / 2 - 3.5).attr("width", Me + Bn().state.padding).attr("height", ge + Bn().state.padding), _t.info(Je);
+ }
+ n7t++;
+ }(i, b.edge(R), b.edge(R).relation));
+ }), q = U.getBBox();
+ const Z = { id: o || "root", label: o || "root", width: 0, height: 0 };
+ return Z.width = q.width + 2 * dk.padding, Z.height = q.height + 2 * dk.padding, _t.debug("Doc rendered", Z, b), Z;
+}, N_n = { setConf: function() {
+}, draw: function(r, i, o, l) {
+ dk = Bn().state;
+ const f = Bn().securityLevel;
+ let g;
+ f === "sandbox" && (g = co("#i" + i));
+ const A = co(f === "sandbox" ? g.nodes()[0].contentDocument.body : "body"), b = f === "sandbox" ? g.nodes()[0].contentDocument : document;
+ _t.debug("Rendering diagram " + r);
+ const v = A.select(`[id='${i}']`);
+ v.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"), new ub({ multigraph: !0, compound: !0, rankdir: "RL" }).setDefaultEdgeLabel(function() {
+ return {};
+ });
+ const k = l.db.getRootDoc();
+ WIt(k, v, void 0, !1, A, b, l);
+ const _ = dk.padding, T = v.node().getBBox(), L = T.width + 2 * _, F = T.height + 2 * _;
+ V9(v, F, 1.75 * L, dk.useMaxWidth), v.attr("viewBox", `${T.x - dk.padding} ${T.y - dk.padding} ` + L + " " + F);
+} }, bme = "rect", VOe = "rectWithTitle", rX = "statediagram", P_n = `${rX}-state`, VIt = "transition", R_n = `${VIt} note-edge`, Q_n = `${rX}-note`, $_n = `${rX}-cluster`, U_n = `${rX}-cluster-alt`, qIt = "parent", YIt = "note", hQe = "----", H_n = `${hQe}${YIt}`, r7t = `${hQe}${qIt}`, JIt = "fill:none", ZIt = "fill: #333", eMt = "text", tMt = "normal";
+let vme = {}, mO = 0;
+function qOe(r = "", i = 0, o = "", l = hQe) {
+ return `state-${r}${o !== null && o.length > 0 ? `${l}${o}` : ""}-${i}`;
+}
+const yme = (r, i, o, l, f, g) => {
+ const A = o.id, b = (v = l[A]) == null ? "" : v.classes ? v.classes.join(" ") : "";
+ var v;
+ if (A !== "root") {
+ let k = bme;
+ o.start === !0 && (k = "start"), o.start === !1 && (k = "end"), o.type !== zie && (k = o.type), vme[A] || (vme[A] = { id: A, shape: k, description: El.sanitizeText(A, Bn()), classes: `${b} ${P_n}` });
+ const _ = vme[A];
+ o.description && (Array.isArray(_.description) ? (_.shape = VOe, _.description.push(o.description)) : _.description.length > 0 ? (_.shape = VOe, _.description === A ? _.description = [o.description] : _.description = [_.description, o.description]) : (_.shape = bme, _.description = o.description), _.description = El.sanitizeTextOrArray(_.description, Bn())), _.description.length === 1 && _.shape === VOe && (_.shape = bme), !_.type && o.doc && (_t.info("Setting cluster for ", A, APe(o)), _.type = "group", _.dir = APe(o), _.shape = o.type === GIt ? "divider" : "roundedWithTitle", _.classes = _.classes + " " + $_n + " " + (g ? U_n : ""));
+ const T = { labelStyle: "", shape: _.shape, labelText: _.description, classes: _.classes, style: "", id: A, dir: _.dir, domId: qOe(A, mO), type: _.type, padding: 15 };
+ if (o.note) {
+ const L = { labelStyle: "", shape: "note", labelText: o.note.text, classes: Q_n, style: "", id: A + H_n + "-" + mO, domId: qOe(A, mO, YIt), type: _.type, padding: 15 }, F = { labelStyle: "", shape: "noteGroup", labelText: o.note.text, classes: _.classes, style: "", id: A + r7t, domId: qOe(A, mO, qIt), type: "group", padding: 0 };
+ mO++;
+ const U = A + r7t;
+ r.setNode(U, F), r.setNode(L.id, L), r.setNode(A, T), r.setParent(A, U), r.setParent(L.id, U);
+ let q = A, Z = L.id;
+ o.note.position === "left of" && (q = L.id, Z = A), r.setEdge(q, Z, { arrowhead: "none", arrowType: "", style: JIt, labelStyle: "", classes: R_n, arrowheadStyle: ZIt, labelpos: "c", labelType: eMt, thickness: tMt });
+ } else
+ r.setNode(A, T);
+ }
+ i && i.id !== "root" && (_t.trace("Setting node ", A, " to be child of its parent ", i.id), r.setParent(A, i.id)), o.doc && (_t.trace("Adding nodes children "), j_n(r, o, o.doc, l, f, !g));
+}, j_n = (r, i, o, l, f, g) => {
+ _t.trace("items", o), o.forEach((A) => {
+ switch (A.stmt) {
+ case Ebe:
+ case zie:
+ yme(r, i, A, l, f, g);
+ break;
+ case lQe: {
+ yme(r, i, A.state1, l, f, g), yme(r, i, A.state2, l, f, g);
+ const b = { id: "edge" + mO, arrowhead: "normal", arrowTypeEnd: "arrow_barb", style: JIt, labelStyle: "", label: El.sanitizeText(A.description, Bn()), arrowheadStyle: ZIt, labelpos: "c", labelType: eMt, thickness: tMt, classes: VIt };
+ r.setEdge(A.state1.id, A.state2.id, b, mO), mO++;
+ }
+ }
+ });
+}, APe = (r, i = "TB") => {
+ let o = i;
+ if (r.doc)
+ for (let l = 0; l < r.doc.length; l++) {
+ const f = r.doc[l];
+ f.stmt === "dir" && (o = f.value);
+ }
+ return o;
+}, K_n = { setConf: function(r) {
+ const i = Object.keys(r);
+ for (const o of i)
+ r[o];
+}, getClasses: function(r, i) {
+ _t.trace("Extracting classes"), i.db.clear();
+ try {
+ return i.parser.parse(r), i.db.extract(i.db.getRootDocV2()), i.db.getClasses();
+ } catch (o) {
+ return o;
+ }
+}, draw: function(r, i, o, l) {
+ _t.info("Drawing state diagram (v2)", i), vme = {}, l.db.getDirection();
+ const { securityLevel: f, state: g } = Bn(), A = g.nodeSpacing || 50, b = g.rankSpacing || 50;
+ _t.info(l.db.getRootDocV2()), l.db.extract(l.db.getRootDocV2()), _t.info(l.db.getRootDocV2());
+ const v = l.db.getStates(), k = new ub({ multigraph: !0, compound: !0 }).setGraph({ rankdir: APe(l.db.getRootDocV2()), nodesep: A, ranksep: b, marginx: 8, marginy: 8 }).setDefaultEdgeLabel(function() {
+ return {};
+ });
+ let _;
+ yme(k, void 0, l.db.getRootDocV2(), v, l.db, !0), f === "sandbox" && (_ = co("#i" + i));
+ const T = co(f === "sandbox" ? _.nodes()[0].contentDocument.body : "body"), L = T.select(`[id="${i}"]`), F = T.select("#" + i + " g");
+ aQe(F, k, ["barb"], rX, i), Tl.insertTitle(L, "statediagramTitleText", g.titleTopMargin, l.db.getDiagramTitle());
+ const U = L.node().getBBox(), q = U.width + 16, Z = U.height + 16;
+ L.attr("class", rX);
+ const R = L.node().getBBox();
+ V9(L, Z, q, g.useMaxWidth);
+ const J = `${R.x - 8} ${R.y - 8} ${q} ${Z}`;
+ _t.debug(`viewBox ${J}`), L.attr("viewBox", J);
+ const he = document.querySelectorAll('[id="' + i + '"] .edgeLabel .label');
+ for (const Y of he) {
+ const ue = Y.getBBox(), le = document.createElementNS("http://www.w3.org/2000/svg", bme);
+ le.setAttribute("rx", 0), le.setAttribute("ry", 0), le.setAttribute("width", ue.width), le.setAttribute("height", ue.height), Y.insertBefore(le, Y.firstChild);
+ }
+} };
+var gPe = function() {
+ var r, i = function(Z, R, J, he) {
+ for (J = J || {}, he = Z.length; he--; J[Z[he]] = R)
+ ;
+ return J;
+ }, o = [1, 2], l = [1, 5], f = [6, 9, 11, 17, 18, 20, 22, 23, 24, 26], g = [1, 15], A = [1, 16], b = [1, 17], v = [1, 18], k = [1, 19], _ = [1, 20], T = [1, 24], L = [4, 6, 9, 11, 17, 18, 20, 22, 23, 24, 26], F = { trace: function() {
+ }, yy: {}, symbols_: { error: 2, start: 3, journey: 4, document: 5, EOF: 6, directive: 7, line: 8, SPACE: 9, statement: 10, NEWLINE: 11, openDirective: 12, typeDirective: 13, closeDirective: 14, ":": 15, argDirective: 16, title: 17, acc_title: 18, acc_title_value: 19, acc_descr: 20, acc_descr_value: 21, acc_descr_multiline_value: 22, section: 23, taskName: 24, taskData: 25, open_directive: 26, type_directive: 27, arg_directive: 28, close_directive: 29, $accept: 0, $end: 1 }, terminals_: { 2: "error", 4: "journey", 6: "EOF", 9: "SPACE", 11: "NEWLINE", 15: ":", 17: "title", 18: "acc_title", 19: "acc_title_value", 20: "acc_descr", 21: "acc_descr_value", 22: "acc_descr_multiline_value", 23: "section", 24: "taskName", 25: "taskData", 26: "open_directive", 27: "type_directive", 28: "arg_directive", 29: "close_directive" }, productions_: [0, [3, 3], [3, 2], [5, 0], [5, 2], [8, 2], [8, 1], [8, 1], [8, 1], [7, 4], [7, 6], [10, 1], [10, 2], [10, 2], [10, 1], [10, 1], [10, 2], [10, 1], [12, 1], [13, 1], [16, 1], [14, 1]], performAction: function(Z, R, J, he, Y, ue, le) {
+ var be = ue.length - 1;
+ switch (Y) {
+ case 1:
+ return ue[be - 1];
+ case 3:
+ case 7:
+ case 8:
+ this.$ = [];
+ break;
+ case 4:
+ ue[be - 1].push(ue[be]), this.$ = ue[be - 1];
+ break;
+ case 5:
+ case 6:
+ this.$ = ue[be];
+ break;
+ case 11:
+ he.setDiagramTitle(ue[be].substr(6)), this.$ = ue[be].substr(6);
+ break;
+ case 12:
+ this.$ = ue[be].trim(), he.setAccTitle(this.$);
+ break;
+ case 13:
+ case 14:
+ this.$ = ue[be].trim(), he.setAccDescription(this.$);
+ break;
+ case 15:
+ he.addSection(ue[be].substr(8)), this.$ = ue[be].substr(8);
+ break;
+ case 16:
+ he.addTask(ue[be - 1], ue[be]), this.$ = "task";
+ break;
+ case 18:
+ he.parseDirective("%%{", "open_directive");
+ break;
+ case 19:
+ he.parseDirective(ue[be], "type_directive");
+ break;
+ case 20:
+ ue[be] = ue[be].trim().replace(/'/g, '"'), he.parseDirective(ue[be], "arg_directive");
+ break;
+ case 21:
+ he.parseDirective("}%%", "close_directive", "journey");
+ }
+ }, table: [{ 3: 1, 4: o, 7: 3, 12: 4, 26: l }, { 1: [3] }, i(f, [2, 3], { 5: 6 }), { 3: 7, 4: o, 7: 3, 12: 4, 26: l }, { 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: g, 18: A, 20: b, 22: v, 23: k, 24: _, 26: l }, { 1: [2, 2] }, { 14: 22, 15: [1, 23], 29: T }, i([15, 29], [2, 19]), i(f, [2, 8], { 1: [2, 1] }), i(f, [2, 4]), { 7: 21, 10: 25, 12: 4, 17: g, 18: A, 20: b, 22: v, 23: k, 24: _, 26: l }, i(f, [2, 6]), i(f, [2, 7]), i(f, [2, 11]), { 19: [1, 26] }, { 21: [1, 27] }, i(f, [2, 14]), i(f, [2, 15]), { 25: [1, 28] }, i(f, [2, 17]), { 11: [1, 29] }, { 16: 30, 28: [1, 31] }, { 11: [2, 21] }, i(f, [2, 5]), i(f, [2, 12]), i(f, [2, 13]), i(f, [2, 16]), i(L, [2, 9]), { 14: 32, 29: T }, { 29: [2, 20] }, { 11: [1, 33] }, i(L, [2, 10])], defaultActions: { 5: [2, 18], 7: [2, 2], 24: [2, 21], 31: [2, 20] }, parseError: function(Z, R) {
+ if (!R.recoverable) {
+ var J = new Error(Z);
+ throw J.hash = R, J;
+ }
+ this.trace(Z);
+ }, parse: function(Z) {
+ var R = this, J = [0], he = [], Y = [null], ue = [], le = this.table, be = "", ke = 0, de = 0, Te = ue.slice.call(arguments, 1), xe = Object.create(this.lexer), ie = { yy: {} };
+ for (var Be in this.yy)
+ Object.prototype.hasOwnProperty.call(this.yy, Be) && (ie.yy[Be] = this.yy[Be]);
+ xe.setInput(Z, ie.yy), ie.yy.lexer = xe, ie.yy.parser = this, xe.yylloc === void 0 && (xe.yylloc = {});
+ var te = xe.yylloc;
+ ue.push(te);
+ var Me = xe.options && xe.options.ranges;
+ function ve() {
+ var Zn;
+ return typeof (Zn = he.pop() || xe.lex() || 1) != "number" && (Zn instanceof Array && (Zn = (he = Zn).pop()), Zn = R.symbols_[Zn] || Zn), Zn;
+ }
+ typeof ie.yy.parseError == "function" ? this.parseError = ie.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
+ for (var ge, Je, ot, bt, gt, je, Qe, kt, Wt = {}; ; ) {
+ if (Je = J[J.length - 1], this.defaultActions[Je] ? ot = this.defaultActions[Je] : (ge == null && (ge = ve()), ot = le[Je] && le[Je][ge]), ot === void 0 || !ot.length || !ot[0]) {
+ var jt = "";
+ for (gt in kt = [], le[Je])
+ this.terminals_[gt] && gt > 2 && kt.push("'" + this.terminals_[gt] + "'");
+ jt = xe.showPosition ? "Parse error on line " + (ke + 1) + `:
+` + xe.showPosition() + `
+Expecting ` + kt.join(", ") + ", got '" + (this.terminals_[ge] || ge) + "'" : "Parse error on line " + (ke + 1) + ": Unexpected " + (ge == 1 ? "end of input" : "'" + (this.terminals_[ge] || ge) + "'"), this.parseError(jt, { text: xe.match, token: this.terminals_[ge] || ge, line: xe.yylineno, loc: te, expected: kt });
+ }
+ if (ot[0] instanceof Array && ot.length > 1)
+ throw new Error("Parse Error: multiple actions possible at state: " + Je + ", token: " + ge);
+ switch (ot[0]) {
+ case 1:
+ J.push(ge), Y.push(xe.yytext), ue.push(xe.yylloc), J.push(ot[1]), ge = null, de = xe.yyleng, be = xe.yytext, ke = xe.yylineno, te = xe.yylloc;
+ break;
+ case 2:
+ if (je = this.productions_[ot[1]][1], Wt.$ = Y[Y.length - je], Wt._$ = { first_line: ue[ue.length - (je || 1)].first_line, last_line: ue[ue.length - 1].last_line, first_column: ue[ue.length - (je || 1)].first_column, last_column: ue[ue.length - 1].last_column }, Me && (Wt._$.range = [ue[ue.length - (je || 1)].range[0], ue[ue.length - 1].range[1]]), (bt = this.performAction.apply(Wt, [be, de, ke, ie.yy, ot[1], Y, ue].concat(Te))) !== void 0)
+ return bt;
+ je && (J = J.slice(0, -1 * je * 2), Y = Y.slice(0, -1 * je), ue = ue.slice(0, -1 * je)), J.push(this.productions_[ot[1]][0]), Y.push(Wt.$), ue.push(Wt._$), Qe = le[J[J.length - 2]][J[J.length - 1]], J.push(Qe);
+ break;
+ case 3:
+ return !0;
+ }
+ }
+ return !0;
+ } }, U = (r = { EOF: 1, parseError: function(Z, R) {
+ if (!this.yy.parser)
+ throw new Error(Z);
+ this.yy.parser.parseError(Z, R);
+ }, setInput: function(Z, R) {
+ return this.yy = R || this.yy || {}, this._input = Z, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = { first_line: 1, first_column: 0, last_line: 1, last_column: 0 }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
+ }, input: function() {
+ var Z = this._input[0];
+ return this.yytext += Z, this.yyleng++, this.offset++, this.match += Z, this.matched += Z, Z.match(/(?:\r\n?|\n).*/g) ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), Z;
+ }, unput: function(Z) {
+ var R = Z.length, J = Z.split(/(?:\r\n?|\n)/g);
+ this._input = Z + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - R), this.offset -= R;
+ var he = 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 Y = 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 === he.length ? this.yylloc.first_column : 0) + he[he.length - J.length].length - J[0].length : this.yylloc.first_column - R }, this.options.ranges && (this.yylloc.range = [Y[0], Y[0] + this.yyleng - R]), this.yyleng = this.yytext.length, this;
+ }, more: function() {
+ return this._more = !0, this;
+ }, reject: function() {
+ return this.options.backtrack_lexer ? (this._backtrack = !0, this) : 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 });
+ }, less: function(Z) {
+ this.unput(this.match.slice(Z));
+ }, pastInput: function() {
+ var Z = this.matched.substr(0, this.matched.length - this.match.length);
+ return (Z.length > 20 ? "..." : "") + Z.substr(-20).replace(/\n/g, "");
+ }, upcomingInput: function() {
+ var Z = this.match;
+ return Z.length < 20 && (Z += this._input.substr(0, 20 - Z.length)), (Z.substr(0, 20) + (Z.length > 20 ? "..." : "")).replace(/\n/g, "");
+ }, showPosition: function() {
+ var Z = this.pastInput(), R = new Array(Z.length + 1).join("-");
+ return Z + this.upcomingInput() + `
+` + R + "^";
+ }, test_match: function(Z, R) {
+ var J, he, Y;
+ if (this.options.backtrack_lexer && (Y = { 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 && (Y.yylloc.range = this.yylloc.range.slice(0))), (he = Z[0].match(/(?:\r\n?|\n).*/g)) && (this.yylineno += he.length), this.yylloc = { first_line: this.yylloc.last_line, last_line: this.yylineno + 1, first_column: this.yylloc.last_column, last_column: he ? he[he.length - 1].length - he[he.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + Z[0].length }, this.yytext += Z[0], this.match += Z[0], this.matches = Z, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(Z[0].length), this.matched += Z[0], J = this.performAction.call(this, this.yy, this, R, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), J)
+ return J;
+ if (this._backtrack) {
+ for (var ue in Y)
+ this[ue] = Y[ue];
+ return !1;
+ }
+ return !1;
+ }, next: function() {
+ if (this.done)
+ return this.EOF;
+ var Z, R, J, he;
+ this._input || (this.done = !0), this._more || (this.yytext = "", this.match = "");
+ for (var Y = this._currentRules(), ue = 0; ue < Y.length; ue++)
+ if ((J = this._input.match(this.rules[Y[ue]])) && (!R || J[0].length > R[0].length)) {
+ if (R = J, he = ue, this.options.backtrack_lexer) {
+ if ((Z = this.test_match(J, Y[ue])) !== !1)
+ return Z;
+ if (this._backtrack) {
+ R = !1;
+ continue;
+ }
+ return !1;
+ }
+ if (!this.options.flex)
+ break;
+ }
+ return R ? (Z = this.test_match(R, Y[he])) !== !1 && Z : 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() {
+ return this.conditionStack.length - 1 > 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)) >= 0 ? this.conditionStack[Z] : "INITIAL";
+ }, pushState: function(Z) {
+ this.begin(Z);
+ }, stateStackSize: function() {
+ return this.conditionStack.length;
+ }, options: { "case-insensitive": !0 }, performAction: function(Z, R, J, he) {
+ switch (J) {
+ 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:
+ case 6:
+ case 8:
+ case 9:
+ break;
+ case 7:
+ return 11;
+ 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 } } }, r);
+ function q() {
+ this.yy = {};
+ }
+ return F.lexer = U, q.prototype = F, F.Parser = q, new q();
+}();
+gPe.parser = gPe;
+const z_n = gPe, G_n = (r) => r.match(/^\s*journey/) !== null;
+let Yz = "";
+const YOe = [], Xne = [], Qre = [], i7t = function() {
+ let r = !0;
+ for (const [i, o] of Qre.entries())
+ Qre[i].processed, r = r && o.processed;
+ return r;
+}, a7t = { parseDirective: function(r, i, o) {
+ n0.parseDirective(this, r, i, o);
+}, getConfig: () => Bn().journey, clear: function() {
+ YOe.length = 0, Xne.length = 0, Yz = "", Qre.length = 0, w5();
+}, setDiagramTitle: q9, getDiagramTitle: Y9, setAccTitle: k5, getAccTitle: _k, setAccDescription: Ek, getAccDescription: Tk, addSection: function(r) {
+ Yz = r, YOe.push(r);
+}, getSections: function() {
+ return YOe;
+}, getTasks: function() {
+ let r = i7t(), i = 0;
+ for (; !r && i < 100; )
+ r = i7t(), i++;
+ return Xne.push(...Qre), Xne;
+}, addTask: function(r, i) {
+ const o = i.substr(1).split(":");
+ let l = 0, f = [];
+ o.length === 1 ? (l = Number(o[0]), f = []) : (l = Number(o[0]), f = o[1].split(","));
+ const g = f.map((b) => b.trim()), A = { section: Yz, type: Yz, people: g, task: r, score: l };
+ Qre.push(A);
+}, addTaskOrg: function(r) {
+ const i = { section: Yz, type: Yz, description: r, task: r, classes: [] };
+ Xne.push(i);
+}, getActors: function() {
+ return function() {
+ const r = [];
+ return Xne.forEach((i) => {
+ i.people && r.push(...i.people);
+ }), [...new Set(r)].sort();
+ }();
+} }, nMt = function(r, i) {
+ const o = r.append("rect");
+ return o.attr("x", i.x), o.attr("y", i.y), o.attr("fill", i.fill), o.attr("stroke", i.stroke), o.attr("width", i.width), o.attr("height", i.height), o.attr("rx", i.rx), o.attr("ry", i.ry), i.class !== void 0 && o.attr("class", i.class), o;
+}, rMt = function(r, i) {
+ const o = r.append("circle");
+ return o.attr("cx", i.cx), o.attr("cy", i.cy), o.attr("class", "actor-" + i.pos), o.attr("fill", i.fill), o.attr("stroke", i.stroke), o.attr("r", i.r), o.class !== void 0 && o.attr("class", o.class), i.title !== void 0 && o.append("title").text(i.title), o;
+}, X_n = function(r, i) {
+ const o = i.text.replace(/
/gi, " "), l = r.append("text");
+ l.attr("x", i.x), l.attr("y", i.y), l.attr("class", "legend"), l.style("text-anchor", i.anchor), i.class !== void 0 && l.attr("class", i.class);
+ const f = l.append("tspan");
+ return f.attr("x", i.x + 2 * i.textMargin), f.text(o), l;
+};
+let o7t = -1;
+const iMt = function() {
+ return { x: 0, y: 0, width: 100, anchor: "start", height: 100, rx: 0, ry: 0 };
+}, aMt = /* @__PURE__ */ function() {
+ function r(f, g, A, b, v, k, _, T) {
+ l(g.append("text").attr("x", A + v / 2).attr("y", b + k / 2 + 5).style("font-color", T).style("text-anchor", "middle").text(f), _);
+ }
+ function i(f, g, A, b, v, k, _, T, L) {
+ const { taskFontSize: F, taskFontFamily: U } = T, q = f.split(/
/gi);
+ for (let Z = 0; Z < q.length; Z++) {
+ const R = Z * F - F * (q.length - 1) / 2, J = g.append("text").attr("x", A + v / 2).attr("y", b).attr("fill", L).style("text-anchor", "middle").style("font-size", F).style("font-family", U);
+ J.append("tspan").attr("x", A + v / 2).attr("dy", R).text(q[Z]), J.attr("y", b + k / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), l(J, _);
+ }
+ }
+ function o(f, g, A, b, v, k, _, T) {
+ const L = g.append("switch"), F = L.append("foreignObject").attr("x", A).attr("y", b).attr("width", v).attr("height", k).attr("position", "fixed").append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
+ F.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(f), i(f, L, A, b, v, k, _, T), l(F, _);
+ }
+ function l(f, g) {
+ for (const A in g)
+ A in g && f.attr(A, g[A]);
+ }
+ return function(f) {
+ return f.textPlacement === "fo" ? o : f.textPlacement === "old" ? r : i;
+ };
+}(), W_n = rMt, V_n = function(r, i, o) {
+ const l = r.append("g"), f = iMt();
+ f.x = i.x, f.y = i.y, f.fill = i.fill, f.width = o.width, f.height = o.height, f.class = "journey-section section-type-" + i.num, f.rx = 3, f.ry = 3, nMt(l, f), aMt(o)(i.text, l, f.x, f.y, f.width, f.height, { class: "journey-section section-type-" + i.num }, o, i.colour);
+}, q_n = X_n, Y_n = function(r, i, o) {
+ const l = i.x + o.width / 2, f = r.append("g");
+ o7t++, f.append("line").attr("id", "task" + o7t).attr("x1", l).attr("y1", i.y).attr("x2", l).attr("y2", 450).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"), function(b, v) {
+ b.append("circle").attr("cx", v.cx).attr("cy", v.cy).attr("class", "face").attr("r", 15).attr("stroke-width", 2).attr("overflow", "visible");
+ const _ = b.append("g");
+ _.append("circle").attr("cx", v.cx - 5).attr("cy", v.cy - 5).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"), _.append("circle").attr("cx", v.cx + 5).attr("cy", v.cy - 5).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"), v.score > 3 ? function(T) {
+ const L = vNe().startAngle(Math.PI / 2).endAngle(Math.PI / 2 * 3).innerRadius(7.5).outerRadius(6.8181818181818175);
+ T.append("path").attr("class", "mouth").attr("d", L).attr("transform", "translate(" + v.cx + "," + (v.cy + 2) + ")");
+ }(_) : v.score < 3 ? function(T) {
+ const L = vNe().startAngle(3 * Math.PI / 2).endAngle(Math.PI / 2 * 5).innerRadius(7.5).outerRadius(6.8181818181818175);
+ T.append("path").attr("class", "mouth").attr("d", L).attr("transform", "translate(" + v.cx + "," + (v.cy + 7) + ")");
+ }(_) : _.append("line").attr("class", "mouth").attr("stroke", 2).attr("x1", v.cx - 5).attr("y1", v.cy + 7).attr("x2", v.cx + 5).attr("y2", v.cy + 7).attr("class", "mouth").attr("stroke-width", "1px").attr("stroke", "#666");
+ }(f, { cx: l, cy: 300 + 30 * (5 - i.score), score: i.score });
+ const g = iMt();
+ g.x = i.x, g.y = i.y, g.fill = i.fill, g.width = o.width, g.height = o.height, g.class = "task task-type-" + i.num, g.rx = 3, g.ry = 3, nMt(f, g);
+ let A = i.x + 14;
+ i.people.forEach((b) => {
+ const v = i.actors[b].color, k = { cx: A, cy: i.y, r: 7, fill: v, stroke: "#000", title: b, pos: i.actors[b].position };
+ rMt(f, k), A += 10;
+ }), aMt(o)(i.task, f, g.x, g.y, g.width, g.height, { class: "task" }, o, i.colour);
+}, J_n = function(r) {
+ r.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");
+}, eL = {}, b2e = Bn().journey, WQ = b2e.leftMargin, iC = { 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(r, i, o, l) {
+ r[i] === void 0 ? r[i] = o : r[i] = l(o, r[i]);
+}, updateBounds: function(r, i, o, l) {
+ const f = Bn().journey, g = this;
+ let A = 0;
+ this.sequenceItems.forEach(function(b) {
+ A++;
+ const v = g.sequenceItems.length - A + 1;
+ g.updateVal(b, "starty", i - v * f.boxMargin, Math.min), g.updateVal(b, "stopy", l + v * f.boxMargin, Math.max), g.updateVal(iC.data, "startx", r - v * f.boxMargin, Math.min), g.updateVal(iC.data, "stopx", o + v * f.boxMargin, Math.max), g.updateVal(b, "startx", r - v * f.boxMargin, Math.min), g.updateVal(b, "stopx", o + v * f.boxMargin, Math.max), g.updateVal(iC.data, "starty", i - v * f.boxMargin, Math.min), g.updateVal(iC.data, "stopy", l + v * f.boxMargin, Math.max);
+ });
+}, insert: function(r, i, o, l) {
+ const f = Math.min(r, o), g = Math.max(r, o), A = Math.min(i, l), b = Math.max(i, l);
+ this.updateVal(iC.data, "startx", f, Math.min), this.updateVal(iC.data, "starty", A, Math.min), this.updateVal(iC.data, "stopx", g, Math.max), this.updateVal(iC.data, "stopy", b, Math.max), this.updateBounds(f, A, g, b);
+}, bumpVerticalPos: function(r) {
+ this.verticalPos = this.verticalPos + r, this.data.stopy = this.verticalPos;
+}, getVerticalPos: function() {
+ return this.verticalPos;
+}, getBounds: function() {
+ return this.data;
+} }, JOe = b2e.sectionFills, s7t = b2e.sectionColours, Z_n = function(r, i, o) {
+ const l = Bn().journey;
+ let f = "";
+ const g = o + (2 * l.height + l.diagramMarginY);
+ let A = 0, b = "#CCC", v = "black", k = 0;
+ for (const [_, T] of i.entries()) {
+ if (f !== T.section) {
+ b = JOe[A % JOe.length], k = A % JOe.length, v = s7t[A % s7t.length];
+ const F = { x: _ * l.taskMargin + _ * l.width + WQ, y: 50, text: T.section, fill: b, num: k, colour: v };
+ V_n(r, F, l), f = T.section, A++;
+ }
+ const L = T.people.reduce((F, U) => (eL[U] && (F[U] = eL[U]), F), {});
+ T.x = _ * l.taskMargin + _ * l.width + WQ, T.y = g, T.width = l.diagramMarginX, T.height = l.diagramMarginY, T.colour = v, T.fill = b, T.num = k, T.actors = L, Y_n(r, T, l), iC.insert(T.x, T.y, T.x + T.width + l.taskMargin, 450);
+ }
+}, c7t = { setConf: function(r) {
+ Object.keys(r).forEach(function(i) {
+ b2e[i] = r[i];
+ });
+}, draw: function(r, i, o, l) {
+ const f = Bn().journey;
+ l.db.clear(), l.parser.parse(r + `
+`);
+ const g = Bn().securityLevel;
+ let A;
+ g === "sandbox" && (A = co("#i" + i));
+ const b = co(g === "sandbox" ? A.nodes()[0].contentDocument.body : "body");
+ iC.init();
+ const v = b.select("#" + i);
+ J_n(v);
+ const k = l.db.getTasks(), _ = l.db.getDiagramTitle(), T = l.db.getActors();
+ for (const R in eL)
+ delete eL[R];
+ let L = 0;
+ T.forEach((R) => {
+ eL[R] = { color: f.actorColours[L % f.actorColours.length], position: L }, L++;
+ }), function(R) {
+ const J = Bn().journey;
+ let he = 60;
+ Object.keys(eL).forEach((Y) => {
+ const ue = eL[Y].color, le = { cx: 20, cy: he, r: 7, fill: ue, stroke: "#000", pos: eL[Y].position };
+ W_n(R, le);
+ const be = { x: 40, y: he + 7, fill: "#666", text: Y, textMargin: 5 | J.boxTextMargin };
+ q_n(R, be), he += 20;
+ });
+ }(v), iC.insert(0, 0, WQ, 50 * Object.keys(eL).length), Z_n(v, k, 0);
+ const F = iC.getBounds();
+ _ && v.append("text").text(_).attr("x", WQ).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 25);
+ const U = F.stopy - F.starty + 2 * f.diagramMarginY, q = WQ + F.stopx + 2 * f.diagramMarginX;
+ V9(v, U, q, f.useMaxWidth), v.append("line").attr("x1", WQ).attr("y1", 4 * f.height).attr("x2", q - WQ - 4).attr("y2", 4 * f.height).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)");
+ const Z = _ ? 70 : 0;
+ v.attr("viewBox", `${F.startx} -25 ${q} ${U + Z}`), v.attr("preserveAspectRatio", "xMinYMin meet"), v.attr("height", U + Z + 25);
+} };
+let l7t = {};
+const Bbe = { setConf: function(r) {
+ l7t = { ...l7t, ...r };
+}, draw: (r, i, o) => {
+ try {
+ _t.debug(`Renering svg for syntax error
+`);
+ const f = co("#" + i), g = f.append("g");
+ g.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"), g.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"), g.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"), g.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"), g.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"), g.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"), g.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"), g.append("text").attr("class", "error-text").attr("x", 1250).attr("y", 400).attr("font-size", "100px").style("text-anchor", "middle").text("mermaid version " + o), f.attr("height", 100), f.attr("width", 500), f.attr("viewBox", "768 0 912 512");
+ } catch (f) {
+ _t.error("Error while rendering info diagram"), _t.error((l = f) instanceof Error ? l.message : String(l));
+ }
+ var l;
+} }, u7t = "flowchart-elk", eEn = { id: u7t, detector: (r, i) => {
+ var o;
+ return !!(r.match(/^\s*flowchart-elk/) || r.match(/^\s*flowchart|graph/) && ((o = i == null ? void 0 : i.flowchart) == null ? void 0 : o.defaultRenderer) === "elk");
+}, loader: async () => {
+ const { diagram: r } = await Promise.resolve().then(function() {
+ return mEn;
+ });
+ return { id: u7t, diagram: r };
+} }, tEn = eEn, h7t = "timeline", nEn = { id: h7t, detector: (r) => r.match(/^\s*timeline/) !== null, loader: async () => {
+ const { diagram: r } = await Promise.resolve().then(function() {
+ return TEn;
+ });
+ return { id: h7t, diagram: r };
+} }, rEn = nEn, f7t = "mindmap", iEn = { id: f7t, detector: (r) => r.match(/^\s*mindmap/) !== null, loader: async () => {
+ const { diagram: r } = await Promise.resolve().then(function() {
+ return QEn;
+ });
+ return { id: f7t, diagram: r };
+} }, aEn = iEn;
+let d7t = !1;
+const Wne = () => {
+ d7t || (d7t = !0, ALt(tEn, rEn, aEn), ob("error", { db: { clear: () => {
+ } }, styles: RNe, renderer: Bbe, parser: { parser: { yy: {} }, parse: () => {
+ } }, init: () => {
+ } }, (r) => r.toLowerCase().trim() === "error"), ob("---", { db: { clear: () => {
+ } }, styles: RNe, renderer: Bbe, parser: { parser: { yy: {} }, parse: () => {
+ throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with unindented `---` blocks");
+ } }, init: () => null }, (r) => r.toLowerCase().trimStart().startsWith("---")), ob("c4", { parser: f9n, db: NLt, renderer: eCt, styles: ILt, init: (r) => {
+ eCt.setConf(r.c4);
+ } }, d9n), ob("class", { parser: tCt, db: gG, renderer: P9n, styles: Mre, init: (r) => {
+ r.class || (r.class = {}), r.class.arrowMarkerAbsolute = r.arrowMarkerAbsolute, gG.clear();
+ } }, B9n), ob("classDiagram", { parser: tCt, db: gG, renderer: H9n, styles: Mre, init: (r) => {
+ r.class || (r.class = {}), r.class.arrowMarkerAbsolute = r.arrowMarkerAbsolute, gG.clear();
+ } }, S9n), ob("er", { parser: j9n, db: z9n, renderer: q9n, styles: CLt }, K9n), ob("gantt", { parser: n_n, db: tPe, renderer: a_n, styles: _Lt }, r_n), ob("info", { parser: o_n, db: s_n, renderer: c_n, styles: ELt }, l_n), ob("pie", { parser: u_n, db: f_n, renderer: d_n, styles: TLt }, h_n), ob("requirement", { parser: A_n, db: p_n, renderer: y_n, styles: BLt }, g_n), ob("sequence", { parser: w_n, db: NCt, renderer: zCt, styles: SLt, init: (r) => {
+ if (r.sequence || (r.sequence = {}), r.sequence.arrowMarkerAbsolute = r.arrowMarkerAbsolute, "sequenceDiagram" in r)
+ throw new Error("`mermaid config.sequenceDiagram` has been renamed to `config.sequence`. Please update your mermaid config.");
+ NCt.setWrap(r.wrap), zCt.setConf(r.sequence);
+ } }, k_n), ob("state", { parser: GCt, db: cL, renderer: N_n, styles: Abe, init: (r) => {
+ r.state || (r.state = {}), r.state.arrowMarkerAbsolute = r.arrowMarkerAbsolute, cL.clear();
+ } }, B_n), ob("stateDiagram", { parser: GCt, db: cL, renderer: K_n, styles: Abe, init: (r) => {
+ r.state || (r.state = {}), r.state.arrowMarkerAbsolute = r.arrowMarkerAbsolute, cL.clear();
+ } }, S_n), ob("journey", { parser: z_n, db: a7t, renderer: c7t, styles: LLt, init: (r) => {
+ c7t.setConf(r.journey), a7t.clear();
+ } }, G_n), ob("flowchart", { parser: WNe, db: kT, renderer: IOe, styles: dbe, init: (r) => {
+ r.flowchart || (r.flowchart = {}), r.flowchart.arrowMarkerAbsolute = r.arrowMarkerAbsolute, t_n(r.flowchart), kT.clear(), kT.setGen("gen-1");
+ } }, Y9n), ob("flowchart-v2", { parser: WNe, db: kT, renderer: IOe, styles: dbe, init: (r) => {
+ r.flowchart || (r.flowchart = {}), r.flowchart.arrowMarkerAbsolute = r.arrowMarkerAbsolute, yLt({ flowchart: { arrowMarkerAbsolute: r.arrowMarkerAbsolute } }), IOe.setConf(r.flowchart), kT.clear(), kT.setGen("gen-2");
+ } }, J9n), ob("gitGraph", { parser: r9n, db: o9n, renderer: u9n, styles: h9n }, i9n));
+};
+class pPe {
+ constructor(i, o) {
+ var l, f;
+ this.txt = i, this.type = "graph", this.detectTypeFailed = !1;
+ const g = Bn();
+ this.txt = i;
+ try {
+ this.type = qRe(i, g);
+ } catch (v) {
+ this.handleError(v, o), this.type = "error", this.detectTypeFailed = !0;
+ }
+ const A = OLt(this.type);
+ _t.debug("Type " + this.type), this.db = A.db, (f = (l = this.db).clear) == null || f.call(l), this.renderer = A.renderer, this.parser = A.parser;
+ const b = this.parser.parse.bind(this.parser);
+ this.parser.parse = (v) => b(function(k, _) {
+ var T;
+ const L = k.match(dLt);
+ if (L) {
+ const F = j7n(L[1], { schema: H7n });
+ return F != null && F.title && ((T = _.setDiagramTitle) == null || T.call(_, F.title)), k.slice(L[0].length);
+ }
+ return k;
+ }(v, this.db)), this.parser.parser.yy = this.db, A.init && (A.init(g), _t.info("Initialized diagram " + this.type, g)), this.txt += `
+`, this.parse(this.txt, o);
+ }
+ parse(i, o) {
+ var l, f;
+ if (this.detectTypeFailed)
+ return !1;
+ try {
+ return i += `
+`, (f = (l = this.db).clear) == null || f.call(l), this.parser.parse(i), !0;
+ } catch (g) {
+ this.handleError(g, o);
+ }
+ return !1;
+ }
+ handleError(i, o) {
+ if (o === void 0)
+ throw i;
+ JRe(i) ? o(i.str, i.hash) : o(i);
+ }
+ getParser() {
+ return this.parser;
+ }
+ getType() {
+ return this.type;
+ }
+}
+const ZOe = (r, i) => {
+ const o = qRe(r, Bn());
+ try {
+ OLt(o);
+ } catch {
+ const f = hbe[o].loader;
+ if (!f)
+ throw new Error(`Diagram ${o} not found.`);
+ return f().then(({ diagram: g }) => (ob(o, g, void 0), new pPe(r, i)));
+ }
+ return new pPe(r, i);
+}, eDe = pPe, oEn = "graphics-document document", mPe = ["graph", "flowchart", "flowchart-v2", "stateDiagram", "stateDiagram-v2"], A7t = "graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa", g7t = "sandbox", p7t = "loose", m7t = "http://www.w3.org/1999/xlink", b7t = "http://www.w3.org/1999/xhtml", v7t = ["foreignobject"], y7t = ["dominant-baseline"], w7t = function(r) {
+ let i = r;
+ return i = i.replace(/style.*:\S*#.*;/g, function(o) {
+ return o.substring(0, o.length - 1);
+ }), i = i.replace(/classDef.*:\S*#.*;/g, function(o) {
+ return o.substring(0, o.length - 1);
+ }), i = i.replace(/#\w+;/g, function(o) {
+ const l = o.substring(1, o.length - 1);
+ return /^\+?\d+$/.test(l) ? "fl°°" + l + "¶ß" : "fl°" + l + "¶ß";
+ }), i;
+}, fQe = function(r) {
+ let i = r;
+ return i = i.replace(/fl°°/g, ""), i = i.replace(/fl°/g, "&"), i = i.replace(/¶ß/g, ";"), i;
+}, k7t = (r, i, o = []) => `
+.${r} ${i} { ${o.join(" !important; ")} !important; }`, x7t = (r, i, o, l) => {
+ const f = ((g, A, b = {}) => {
+ var v;
+ let k = "";
+ if (g.themeCSS !== void 0 && (k += `
+${g.themeCSS}`), g.fontFamily !== void 0 && (k += `
+:root { --mermaid-font-family: ${g.fontFamily}}`), g.altFontFamily !== void 0 && (k += `
+:root { --mermaid-alt-font-family: ${g.altFontFamily}}`), !BG(b) && mPe.includes(A)) {
+ const _ = g.htmlLabels || (v = g.flowchart) != null && v.htmlLabels ? ["> *", "span"] : ["rect", "polygon", "ellipse", "circle", "path"];
+ for (const T in b) {
+ const L = b[T];
+ BG(L.styles) || _.forEach((F) => {
+ k += k7t(L.id, F, L.styles);
+ }), BG(L.textStyles) || (k += k7t(L.id, "tspan", L.textStyles));
+ }
+ }
+ return k;
+ })(r, i, o);
+ return xNe(ukn(`${l}{${q7n(i, f, r.themeVariables)}}`), fkn);
+}, C7t = (r = "", i, o) => {
+ let l = r;
+ return o || i || (l = l.replace(/marker-end="url\(.*?#/g, 'marker-end="url(#')), l = fQe(l), l = l.replace(/
/g, "
"), l;
+}, _7t = (r = "", i) => `