UNPKG

@deltares/fews-web-oc-charts

Version:
1,597 lines (1,596 loc) 518 kB
function jr(e, t) { return e == null || t == null ? NaN : e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN; } function Lh(e, t) { return e == null || t == null ? NaN : t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN; } function $e(e) { let t, n, r; e.length !== 2 ? (t = jr, n = (o, l) => jr(e(o), l), r = (o, l) => e(o) - l) : (t = e === jr || e === Lh ? e : Rh, n = e, r = e); function i(o, l, u = 0, c = o.length) { if (u < c) { if (t(l, l) !== 0) return c; do { const f = u + c >>> 1; n(o[f], l) < 0 ? u = f + 1 : c = f; } while (u < c); } return u; } function s(o, l, u = 0, c = o.length) { if (u < c) { if (t(l, l) !== 0) return c; do { const f = u + c >>> 1; n(o[f], l) <= 0 ? u = f + 1 : c = f; } while (u < c); } return u; } function a(o, l, u = 0, c = o.length) { const f = i(o, l, u, c - 1); return f > u && r(o[f - 1], l) > -r(o[f], l) ? f - 1 : f; } return { left: i, center: a, right: s }; } function Rh() { return 0; } function Vh(e) { return e === null ? NaN : +e; } const zh = $e(jr), pa = zh.right; $e(Vh).center; function Nt(e, t) { let n, r; if (t === void 0) for (const i of e) i != null && (n === void 0 ? i >= i && (n = r = i) : (n > i && (n = i), r < i && (r = i))); else { let i = -1; for (let s of e) (s = t(s, ++i, e)) != null && (n === void 0 ? s >= s && (n = r = s) : (n > s && (n = s), r < s && (r = s))); } return [n, r]; } class Ba extends Map { constructor(t, n = Hh) { if (super(), Object.defineProperties(this, { _intern: { value: /* @__PURE__ */ new Map() }, _key: { value: n } }), t != null) for (const [r, i] of t) this.set(r, i); } get(t) { return super.get(qa(this, t)); } has(t) { return super.has(qa(this, t)); } set(t, n) { return super.set(Uh(this, t), n); } delete(t) { return super.delete(Wh(this, t)); } } function qa({ _intern: e, _key: t }, n) { const r = t(n); return e.has(r) ? e.get(r) : n; } function Uh({ _intern: e, _key: t }, n) { const r = t(n); return e.has(r) ? e.get(r) : (e.set(r, n), n); } function Wh({ _intern: e, _key: t }, n) { const r = t(n); return e.has(r) && (n = e.get(r), e.delete(r)), n; } function Hh(e) { return e !== null && typeof e == "object" ? e.valueOf() : e; } const Zh = Math.sqrt(50), jh = Math.sqrt(10), Yh = Math.sqrt(2); function ni(e, t, n) { const r = (t - e) / Math.max(0, n), i = Math.floor(Math.log10(r)), s = r / Math.pow(10, i), a = s >= Zh ? 10 : s >= jh ? 5 : s >= Yh ? 2 : 1; let o, l, u; return i < 0 ? (u = Math.pow(10, -i) / a, o = Math.round(e * u), l = Math.round(t * u), o / u < e && ++o, l / u > t && --l, u = -u) : (u = Math.pow(10, i) * a, o = Math.round(e / u), l = Math.round(t / u), o * u < e && ++o, l * u > t && --l), l < o && 0.5 <= n && n < 2 ? ni(e, t, n * 2) : [o, l, u]; } function Kh(e, t, n) { if (t = +t, e = +e, n = +n, !(n > 0)) return []; if (e === t) return [e]; const r = t < e, [i, s, a] = r ? ni(t, e, n) : ni(e, t, n); if (!(s >= i)) return []; const o = s - i + 1, l = new Array(o); if (r) if (a < 0) for (let u = 0; u < o; ++u) l[u] = (s - u) / -a; else for (let u = 0; u < o; ++u) l[u] = (s - u) * a; else if (a < 0) for (let u = 0; u < o; ++u) l[u] = (i + u) / -a; else for (let u = 0; u < o; ++u) l[u] = (i + u) * a; return l; } function ar(e, t, n) { return t = +t, e = +e, n = +n, ni(e, t, n)[2]; } function Cs(e, t, n) { t = +t, e = +e, n = +n; const r = t < e, i = r ? ar(t, e, n) : ar(e, t, n); return (r ? -1 : 1) * (i < 0 ? 1 / -i : i); } function ri(e, t) { let n; if (t === void 0) for (const r of e) r != null && (n < r || n === void 0 && r >= r) && (n = r); else { let r = -1; for (let i of e) (i = t(i, ++r, e)) != null && (n < i || n === void 0 && i >= i) && (n = i); } return n; } function Xa(e, t) { let n; if (t === void 0) for (const r of e) r != null && (n > r || n === void 0 && r >= r) && (n = r); else { let r = -1; for (let i of e) (i = t(i, ++r, e)) != null && (n > i || n === void 0 && i >= i) && (n = i); } return n; } function ki(e, t) { let n = 0, r = 0; for (let i of e) i != null && (i = +i) >= i && (++n, r += i); if (n) return r / n; } function* Gh(e) { for (const t of e) yield* t; } function As(e) { return Array.from(Gh(e)); } function ma(e, t, n) { e = +e, t = +t, n = (i = arguments.length) < 2 ? (t = e, e = 0, 1) : i < 3 ? 1 : +n; for (var r = -1, i = Math.max(0, Math.ceil((t - e) / n)) | 0, s = new Array(i); ++r < i; ) s[r] = e + r * n; return s; } function Bh(e) { return e; } var Yr = 1, Kr = 2, Es = 3, Gn = 4, Ja = 1e-6; function qh(e) { return "translate(" + e + ",0)"; } function Xh(e) { return "translate(0," + e + ")"; } function Jh(e) { return (t) => +e(t); } function Qh(e, t) { return t = Math.max(0, e.bandwidth() - t * 2) / 2, e.round() && (t = Math.round(t)), (n) => +e(n) + t; } function tf() { return !this.__axis; } function Oi(e, t) { var n = [], r = null, i = null, s = 6, a = 6, o = 3, l = typeof window < "u" && window.devicePixelRatio > 1 ? 0 : 0.5, u = e === Yr || e === Gn ? -1 : 1, c = e === Gn || e === Kr ? "x" : "y", f = e === Yr || e === Es ? qh : Xh; function h(d) { var p = r ?? (t.ticks ? t.ticks.apply(t, n) : t.domain()), g = i ?? (t.tickFormat ? t.tickFormat.apply(t, n) : Bh), m = Math.max(s, 0) + o, y = t.range(), w = +y[0] + l, b = +y[y.length - 1] + l, v = (t.bandwidth ? Qh : Jh)(t.copy(), l), x = d.selection ? d.selection() : d, S = x.selectAll(".domain").data([null]), k = x.selectAll(".tick").data(p, t).order(), A = k.exit(), P = k.enter().append("g").attr("class", "tick"), E = k.select("line"), M = k.select("text"); S = S.merge(S.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor")), k = k.merge(P), E = E.merge(P.append("line").attr("stroke", "currentColor").attr(c + "2", u * s)), M = M.merge(P.append("text").attr("fill", "currentColor").attr(c, u * m).attr("dy", e === Yr ? "0em" : e === Es ? "0.71em" : "0.32em")), d !== x && (S = S.transition(d), k = k.transition(d), E = E.transition(d), M = M.transition(d), A = A.transition(d).attr("opacity", Ja).attr("transform", function(F) { return isFinite(F = v(F)) ? f(F + l) : this.getAttribute("transform"); }), P.attr("opacity", Ja).attr("transform", function(F) { var _ = this.parentNode.__axis; return f((_ && isFinite(_ = _(F)) ? _ : v(F)) + l); })), A.remove(), S.attr("d", e === Gn || e === Kr ? a ? "M" + u * a + "," + w + "H" + l + "V" + b + "H" + u * a : "M" + l + "," + w + "V" + b : a ? "M" + w + "," + u * a + "V" + l + "H" + b + "V" + u * a : "M" + w + "," + l + "H" + b), k.attr("opacity", 1).attr("transform", function(F) { return f(v(F) + l); }), E.attr(c + "2", u * s), M.attr(c, u * m).text(g), x.filter(tf).attr("fill", "none").attr("font-size", 10).attr("font-family", "sans-serif").attr("text-anchor", e === Kr ? "start" : e === Gn ? "end" : "middle"), x.each(function() { this.__axis = v; }); } return h.scale = function(d) { return arguments.length ? (t = d, h) : t; }, h.ticks = function() { return n = Array.from(arguments), h; }, h.tickArguments = function(d) { return arguments.length ? (n = d == null ? [] : Array.from(d), h) : n.slice(); }, h.tickValues = function(d) { return arguments.length ? (r = d == null ? null : Array.from(d), h) : r && r.slice(); }, h.tickFormat = function(d) { return arguments.length ? (i = d, h) : i; }, h.tickSize = function(d) { return arguments.length ? (s = a = +d, h) : s; }, h.tickSizeInner = function(d) { return arguments.length ? (s = +d, h) : s; }, h.tickSizeOuter = function(d) { return arguments.length ? (a = +d, h) : a; }, h.tickPadding = function(d) { return arguments.length ? (o = +d, h) : o; }, h.offset = function(d) { return arguments.length ? (l = +d, h) : l; }, h; } function ii(e) { return Oi(Yr, e); } function yr(e) { return Oi(Kr, e); } function Ci(e) { return Oi(Es, e); } function Is(e) { return Oi(Gn, e); } var ef = { value: () => { } }; function vr() { for (var e = 0, t = arguments.length, n = {}, r; e < t; ++e) { if (!(r = arguments[e] + "") || r in n || /[\s.]/.test(r)) throw new Error("illegal type: " + r); n[r] = []; } return new Gr(n); } function Gr(e) { this._ = e; } function nf(e, t) { return e.trim().split(/^|\s+/).map(function(n) { var r = "", i = n.indexOf("."); if (i >= 0 && (r = n.slice(i + 1), n = n.slice(0, i)), n && !t.hasOwnProperty(n)) throw new Error("unknown type: " + n); return { type: n, name: r }; }); } Gr.prototype = vr.prototype = { constructor: Gr, on: function(e, t) { var n = this._, r = nf(e + "", n), i, s = -1, a = r.length; if (arguments.length < 2) { for (; ++s < a; ) if ((i = (e = r[s]).type) && (i = rf(n[i], e.name))) return i; return; } if (t != null && typeof t != "function") throw new Error("invalid callback: " + t); for (; ++s < a; ) if (i = (e = r[s]).type) n[i] = Qa(n[i], e.name, t); else if (t == null) for (i in n) n[i] = Qa(n[i], e.name, null); return this; }, copy: function() { var e = {}, t = this._; for (var n in t) e[n] = t[n].slice(); return new Gr(e); }, call: function(e, t) { if ((i = arguments.length - 2) > 0) for (var n = new Array(i), r = 0, i, s; r < i; ++r) n[r] = arguments[r + 2]; if (!this._.hasOwnProperty(e)) throw new Error("unknown type: " + e); for (s = this._[e], r = 0, i = s.length; r < i; ++r) s[r].value.apply(t, n); }, apply: function(e, t, n) { if (!this._.hasOwnProperty(e)) throw new Error("unknown type: " + e); for (var r = this._[e], i = 0, s = r.length; i < s; ++i) r[i].value.apply(t, n); } }; function rf(e, t) { for (var n = 0, r = e.length, i; n < r; ++n) if ((i = e[n]).name === t) return i.value; } function Qa(e, t, n) { for (var r = 0, i = e.length; r < i; ++r) if (e[r].name === t) { e[r] = ef, e = e.slice(0, r).concat(e.slice(r + 1)); break; } return n != null && e.push({ name: t, value: n }), e; } var Ds = "http://www.w3.org/1999/xhtml"; const to = { svg: "http://www.w3.org/2000/svg", xhtml: Ds, xlink: "http://www.w3.org/1999/xlink", xml: "http://www.w3.org/XML/1998/namespace", xmlns: "http://www.w3.org/2000/xmlns/" }; function Ai(e) { var t = e += "", n = t.indexOf(":"); return n >= 0 && (t = e.slice(0, n)) !== "xmlns" && (e = e.slice(n + 1)), to.hasOwnProperty(t) ? { space: to[t], local: e } : e; } function sf(e) { return function() { var t = this.ownerDocument, n = this.namespaceURI; return n === Ds && t.documentElement.namespaceURI === Ds ? t.createElement(e) : t.createElementNS(n, e); }; } function af(e) { return function() { return this.ownerDocument.createElementNS(e.space, e.local); }; } function ga(e) { var t = Ai(e); return (t.local ? af : sf)(t); } function of() { } function ya(e) { return e == null ? of : function() { return this.querySelector(e); }; } function lf(e) { typeof e != "function" && (e = ya(e)); for (var t = this._groups, n = t.length, r = new Array(n), i = 0; i < n; ++i) for (var s = t[i], a = s.length, o = r[i] = new Array(a), l, u, c = 0; c < a; ++c) (l = s[c]) && (u = e.call(l, l.__data__, c, s)) && ("__data__" in l && (u.__data__ = l.__data__), o[c] = u); return new Ot(r, this._parents); } function Jl(e) { return e == null ? [] : Array.isArray(e) ? e : Array.from(e); } function uf() { return []; } function Ql(e) { return e == null ? uf : function() { return this.querySelectorAll(e); }; } function cf(e) { return function() { return Jl(e.apply(this, arguments)); }; } function hf(e) { typeof e == "function" ? e = cf(e) : e = Ql(e); for (var t = this._groups, n = t.length, r = [], i = [], s = 0; s < n; ++s) for (var a = t[s], o = a.length, l, u = 0; u < o; ++u) (l = a[u]) && (r.push(e.call(l, l.__data__, u, a)), i.push(l)); return new Ot(r, i); } function tu(e) { return function() { return this.matches(e); }; } function eu(e) { return function(t) { return t.matches(e); }; } var ff = Array.prototype.find; function df(e) { return function() { return ff.call(this.children, e); }; } function pf() { return this.firstElementChild; } function mf(e) { return this.select(e == null ? pf : df(typeof e == "function" ? e : eu(e))); } var gf = Array.prototype.filter; function yf() { return Array.from(this.children); } function vf(e) { return function() { return gf.call(this.children, e); }; } function bf(e) { return this.selectAll(e == null ? yf : vf(typeof e == "function" ? e : eu(e))); } function wf(e) { typeof e != "function" && (e = tu(e)); for (var t = this._groups, n = t.length, r = new Array(n), i = 0; i < n; ++i) for (var s = t[i], a = s.length, o = r[i] = [], l, u = 0; u < a; ++u) (l = s[u]) && e.call(l, l.__data__, u, s) && o.push(l); return new Ot(r, this._parents); } function nu(e) { return new Array(e.length); } function xf() { return new Ot(this._enter || this._groups.map(nu), this._parents); } function si(e, t) { this.ownerDocument = e.ownerDocument, this.namespaceURI = e.namespaceURI, this._next = null, this._parent = e, this.__data__ = t; } si.prototype = { constructor: si, appendChild: function(e) { return this._parent.insertBefore(e, this._next); }, insertBefore: function(e, t) { return this._parent.insertBefore(e, t); }, querySelector: function(e) { return this._parent.querySelector(e); }, querySelectorAll: function(e) { return this._parent.querySelectorAll(e); } }; function Sf(e) { return function() { return e; }; } function Tf(e, t, n, r, i, s) { for (var a = 0, o, l = t.length, u = s.length; a < u; ++a) (o = t[a]) ? (o.__data__ = s[a], r[a] = o) : n[a] = new si(e, s[a]); for (; a < l; ++a) (o = t[a]) && (i[a] = o); } function Mf(e, t, n, r, i, s, a) { var o, l, u = /* @__PURE__ */ new Map(), c = t.length, f = s.length, h = new Array(c), d; for (o = 0; o < c; ++o) (l = t[o]) && (h[o] = d = a.call(l, l.__data__, o, t) + "", u.has(d) ? i[o] = l : u.set(d, l)); for (o = 0; o < f; ++o) d = a.call(e, s[o], o, s) + "", (l = u.get(d)) ? (r[o] = l, l.__data__ = s[o], u.delete(d)) : n[o] = new si(e, s[o]); for (o = 0; o < c; ++o) (l = t[o]) && u.get(h[o]) === l && (i[o] = l); } function _f(e) { return e.__data__; } function kf(e, t) { if (!arguments.length) return Array.from(this, _f); var n = t ? Mf : Tf, r = this._parents, i = this._groups; typeof e != "function" && (e = Sf(e)); for (var s = i.length, a = new Array(s), o = new Array(s), l = new Array(s), u = 0; u < s; ++u) { var c = r[u], f = i[u], h = f.length, d = Of(e.call(c, c && c.__data__, u, r)), p = d.length, g = o[u] = new Array(p), m = a[u] = new Array(p), y = l[u] = new Array(h); n(c, f, g, m, y, d, t); for (var w = 0, b = 0, v, x; w < p; ++w) if (v = g[w]) { for (w >= b && (b = w + 1); !(x = m[b]) && ++b < p; ) ; v._next = x || null; } } return a = new Ot(a, r), a._enter = o, a._exit = l, a; } function Of(e) { return typeof e == "object" && "length" in e ? e : Array.from(e); } function Cf() { return new Ot(this._exit || this._groups.map(nu), this._parents); } function Af(e, t, n) { var r = this.enter(), i = this, s = this.exit(); return typeof e == "function" ? (r = e(r), r && (r = r.selection())) : r = r.append(e + ""), t != null && (i = t(i), i && (i = i.selection())), n == null ? s.remove() : n(s), r && i ? r.merge(i).order() : i; } function Ef(e) { for (var t = e.selection ? e.selection() : e, n = this._groups, r = t._groups, i = n.length, s = r.length, a = Math.min(i, s), o = new Array(i), l = 0; l < a; ++l) for (var u = n[l], c = r[l], f = u.length, h = o[l] = new Array(f), d, p = 0; p < f; ++p) (d = u[p] || c[p]) && (h[p] = d); for (; l < i; ++l) o[l] = n[l]; return new Ot(o, this._parents); } function If() { for (var e = this._groups, t = -1, n = e.length; ++t < n; ) for (var r = e[t], i = r.length - 1, s = r[i], a; --i >= 0; ) (a = r[i]) && (s && a.compareDocumentPosition(s) ^ 4 && s.parentNode.insertBefore(a, s), s = a); return this; } function Df(e) { e || (e = Nf); function t(f, h) { return f && h ? e(f.__data__, h.__data__) : !f - !h; } for (var n = this._groups, r = n.length, i = new Array(r), s = 0; s < r; ++s) { for (var a = n[s], o = a.length, l = i[s] = new Array(o), u, c = 0; c < o; ++c) (u = a[c]) && (l[c] = u); l.sort(t); } return new Ot(i, this._parents).order(); } function Nf(e, t) { return e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN; } function Pf() { var e = arguments[0]; return arguments[0] = this, e.apply(null, arguments), this; } function $f() { return Array.from(this); } function Ff() { for (var e = this._groups, t = 0, n = e.length; t < n; ++t) for (var r = e[t], i = 0, s = r.length; i < s; ++i) { var a = r[i]; if (a) return a; } return null; } function Lf() { let e = 0; for (const t of this) ++e; return e; } function Rf() { return !this.node(); } function Vf(e) { for (var t = this._groups, n = 0, r = t.length; n < r; ++n) for (var i = t[n], s = 0, a = i.length, o; s < a; ++s) (o = i[s]) && e.call(o, o.__data__, s, i); return this; } function zf(e) { return function() { this.removeAttribute(e); }; } function Uf(e) { return function() { this.removeAttributeNS(e.space, e.local); }; } function Wf(e, t) { return function() { this.setAttribute(e, t); }; } function Hf(e, t) { return function() { this.setAttributeNS(e.space, e.local, t); }; } function Zf(e, t) { return function() { var n = t.apply(this, arguments); n == null ? this.removeAttribute(e) : this.setAttribute(e, n); }; } function jf(e, t) { return function() { var n = t.apply(this, arguments); n == null ? this.removeAttributeNS(e.space, e.local) : this.setAttributeNS(e.space, e.local, n); }; } function Yf(e, t) { var n = Ai(e); if (arguments.length < 2) { var r = this.node(); return n.local ? r.getAttributeNS(n.space, n.local) : r.getAttribute(n); } return this.each((t == null ? n.local ? Uf : zf : typeof t == "function" ? n.local ? jf : Zf : n.local ? Hf : Wf)(n, t)); } function ru(e) { return e.ownerDocument && e.ownerDocument.defaultView || e.document && e || e.defaultView; } function Kf(e) { return function() { this.style.removeProperty(e); }; } function Gf(e, t, n) { return function() { this.style.setProperty(e, t, n); }; } function Bf(e, t, n) { return function() { var r = t.apply(this, arguments); r == null ? this.style.removeProperty(e) : this.style.setProperty(e, r, n); }; } function qf(e, t, n) { return arguments.length > 1 ? this.each((t == null ? Kf : typeof t == "function" ? Bf : Gf)(e, t, n ?? "")) : Sn(this.node(), e); } function Sn(e, t) { return e.style.getPropertyValue(t) || ru(e).getComputedStyle(e, null).getPropertyValue(t); } function Xf(e) { return function() { delete this[e]; }; } function Jf(e, t) { return function() { this[e] = t; }; } function Qf(e, t) { return function() { var n = t.apply(this, arguments); n == null ? delete this[e] : this[e] = n; }; } function td(e, t) { return arguments.length > 1 ? this.each((t == null ? Xf : typeof t == "function" ? Qf : Jf)(e, t)) : this.node()[e]; } function iu(e) { return e.trim().split(/^|\s+/); } function va(e) { return e.classList || new su(e); } function su(e) { this._node = e, this._names = iu(e.getAttribute("class") || ""); } su.prototype = { add: function(e) { var t = this._names.indexOf(e); t < 0 && (this._names.push(e), this._node.setAttribute("class", this._names.join(" "))); }, remove: function(e) { var t = this._names.indexOf(e); t >= 0 && (this._names.splice(t, 1), this._node.setAttribute("class", this._names.join(" "))); }, contains: function(e) { return this._names.indexOf(e) >= 0; } }; function au(e, t) { for (var n = va(e), r = -1, i = t.length; ++r < i; ) n.add(t[r]); } function ou(e, t) { for (var n = va(e), r = -1, i = t.length; ++r < i; ) n.remove(t[r]); } function ed(e) { return function() { au(this, e); }; } function nd(e) { return function() { ou(this, e); }; } function rd(e, t) { return function() { (t.apply(this, arguments) ? au : ou)(this, e); }; } function id(e, t) { var n = iu(e + ""); if (arguments.length < 2) { for (var r = va(this.node()), i = -1, s = n.length; ++i < s; ) if (!r.contains(n[i])) return !1; return !0; } return this.each((typeof t == "function" ? rd : t ? ed : nd)(n, t)); } function sd() { this.textContent = ""; } function ad(e) { return function() { this.textContent = e; }; } function od(e) { return function() { var t = e.apply(this, arguments); this.textContent = t ?? ""; }; } function ld(e) { return arguments.length ? this.each(e == null ? sd : (typeof e == "function" ? od : ad)(e)) : this.node().textContent; } function ud() { this.innerHTML = ""; } function cd(e) { return function() { this.innerHTML = e; }; } function hd(e) { return function() { var t = e.apply(this, arguments); this.innerHTML = t ?? ""; }; } function fd(e) { return arguments.length ? this.each(e == null ? ud : (typeof e == "function" ? hd : cd)(e)) : this.node().innerHTML; } function dd() { this.nextSibling && this.parentNode.appendChild(this); } function pd() { return this.each(dd); } function md() { this.previousSibling && this.parentNode.insertBefore(this, this.parentNode.firstChild); } function gd() { return this.each(md); } function yd(e) { var t = typeof e == "function" ? e : ga(e); return this.select(function() { return this.appendChild(t.apply(this, arguments)); }); } function vd() { return null; } function bd(e, t) { var n = typeof e == "function" ? e : ga(e), r = t == null ? vd : typeof t == "function" ? t : ya(t); return this.select(function() { return this.insertBefore(n.apply(this, arguments), r.apply(this, arguments) || null); }); } function wd() { var e = this.parentNode; e && e.removeChild(this); } function xd() { return this.each(wd); } function Sd() { var e = this.cloneNode(!1), t = this.parentNode; return t ? t.insertBefore(e, this.nextSibling) : e; } function Td() { var e = this.cloneNode(!0), t = this.parentNode; return t ? t.insertBefore(e, this.nextSibling) : e; } function Md(e) { return this.select(e ? Td : Sd); } function _d(e) { return arguments.length ? this.property("__data__", e) : this.node().__data__; } function kd(e) { return function(t) { e.call(this, t, this.__data__); }; } function Od(e) { return e.trim().split(/^|\s+/).map(function(t) { var n = "", r = t.indexOf("."); return r >= 0 && (n = t.slice(r + 1), t = t.slice(0, r)), { type: t, name: n }; }); } function Cd(e) { return function() { var t = this.__on; if (t) { for (var n = 0, r = -1, i = t.length, s; n < i; ++n) s = t[n], (!e.type || s.type === e.type) && s.name === e.name ? this.removeEventListener(s.type, s.listener, s.options) : t[++r] = s; ++r ? t.length = r : delete this.__on; } }; } function Ad(e, t, n) { return function() { var r = this.__on, i, s = kd(t); if (r) { for (var a = 0, o = r.length; a < o; ++a) if ((i = r[a]).type === e.type && i.name === e.name) { this.removeEventListener(i.type, i.listener, i.options), this.addEventListener(i.type, i.listener = s, i.options = n), i.value = t; return; } } this.addEventListener(e.type, s, n), i = { type: e.type, name: e.name, value: t, listener: s, options: n }, r ? r.push(i) : this.__on = [i]; }; } function Ed(e, t, n) { var r = Od(e + ""), i, s = r.length, a; if (arguments.length < 2) { var o = this.node().__on; if (o) { for (var l = 0, u = o.length, c; l < u; ++l) for (i = 0, c = o[l]; i < s; ++i) if ((a = r[i]).type === c.type && a.name === c.name) return c.value; } return; } for (o = t ? Ad : Cd, i = 0; i < s; ++i) this.each(o(r[i], t, n)); return this; } function lu(e, t, n) { var r = ru(e), i = r.CustomEvent; typeof i == "function" ? i = new i(t, n) : (i = r.document.createEvent("Event"), n ? (i.initEvent(t, n.bubbles, n.cancelable), i.detail = n.detail) : i.initEvent(t, !1, !1)), e.dispatchEvent(i); } function Id(e, t) { return function() { return lu(this, e, t); }; } function Dd(e, t) { return function() { return lu(this, e, t.apply(this, arguments)); }; } function Nd(e, t) { return this.each((typeof t == "function" ? Dd : Id)(e, t)); } function* Pd() { for (var e = this._groups, t = 0, n = e.length; t < n; ++t) for (var r = e[t], i = 0, s = r.length, a; i < s; ++i) (a = r[i]) && (yield a); } var ba = [null]; function Ot(e, t) { this._groups = e, this._parents = t; } function Nn() { return new Ot([[document.documentElement]], ba); } function $d() { return this; } Ot.prototype = Nn.prototype = { constructor: Ot, select: lf, selectAll: hf, selectChild: mf, selectChildren: bf, filter: wf, data: kf, enter: xf, exit: Cf, join: Af, merge: Ef, selection: $d, order: If, sort: Df, call: Pf, nodes: $f, node: Ff, size: Lf, empty: Rf, each: Vf, attr: Yf, style: qf, property: td, classed: id, text: ld, html: fd, raise: pd, lower: gd, append: yd, insert: bd, remove: xd, clone: Md, datum: _d, on: Ed, dispatch: Nd, [Symbol.iterator]: Pd }; function ut(e) { return typeof e == "string" ? new Ot([[document.querySelector(e)]], [document.documentElement]) : new Ot([[e]], ba); } function qt(e) { return ut(ga(e).call(document.documentElement)); } function Fd(e) { let t; for (; t = e.sourceEvent; ) e = t; return e; } function ot(e, t) { if (e = Fd(e), t === void 0 && (t = e.currentTarget), t) { var n = t.ownerSVGElement || t; if (n.createSVGPoint) { var r = n.createSVGPoint(); return r.x = e.clientX, r.y = e.clientY, r = r.matrixTransform(t.getScreenCTM().inverse()), [r.x, r.y]; } if (t.getBoundingClientRect) { var i = t.getBoundingClientRect(); return [e.clientX - i.left - t.clientLeft, e.clientY - i.top - t.clientTop]; } } return [e.pageX, e.pageY]; } function eo(e) { return typeof e == "string" ? new Ot([document.querySelectorAll(e)], [document.documentElement]) : new Ot([Jl(e)], ba); } const Ld = { passive: !1 }, or = { capture: !0, passive: !1 }; function Qi(e) { e.stopImmediatePropagation(); } function gn(e) { e.preventDefault(), e.stopImmediatePropagation(); } function uu(e) { var t = e.document.documentElement, n = ut(e).on("dragstart.drag", gn, or); "onselectstart" in t ? n.on("selectstart.drag", gn, or) : (t.__noselect = t.style.MozUserSelect, t.style.MozUserSelect = "none"); } function cu(e, t) { var n = e.document.documentElement, r = ut(e).on("dragstart.drag", null); t && (r.on("click.drag", gn, or), setTimeout(function() { r.on("click.drag", null); }, 0)), "onselectstart" in n ? r.on("selectstart.drag", null) : (n.style.MozUserSelect = n.__noselect, delete n.__noselect); } const Or = (e) => () => e; function Ns(e, { sourceEvent: t, subject: n, target: r, identifier: i, active: s, x: a, y: o, dx: l, dy: u, dispatch: c }) { Object.defineProperties(this, { type: { value: e, enumerable: !0, configurable: !0 }, sourceEvent: { value: t, enumerable: !0, configurable: !0 }, subject: { value: n, enumerable: !0, configurable: !0 }, target: { value: r, enumerable: !0, configurable: !0 }, identifier: { value: i, enumerable: !0, configurable: !0 }, active: { value: s, enumerable: !0, configurable: !0 }, x: { value: a, enumerable: !0, configurable: !0 }, y: { value: o, enumerable: !0, configurable: !0 }, dx: { value: l, enumerable: !0, configurable: !0 }, dy: { value: u, enumerable: !0, configurable: !0 }, _: { value: c } }); } Ns.prototype.on = function() { var e = this._.on.apply(this._, arguments); return e === this._ ? this : e; }; function Rd(e) { return !e.ctrlKey && !e.button; } function Vd() { return this.parentNode; } function zd(e, t) { return t ?? { x: e.x, y: e.y }; } function Ud() { return navigator.maxTouchPoints || "ontouchstart" in this; } function hu() { var e = Rd, t = Vd, n = zd, r = Ud, i = {}, s = vr("start", "drag", "end"), a = 0, o, l, u, c, f = 0; function h(v) { v.on("mousedown.drag", d).filter(r).on("touchstart.drag", m).on("touchmove.drag", y, Ld).on("touchend.drag touchcancel.drag", w).style("touch-action", "none").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)"); } function d(v, x) { if (!(c || !e.call(this, v, x))) { var S = b(this, t.call(this, v, x), v, x, "mouse"); S && (ut(v.view).on("mousemove.drag", p, or).on("mouseup.drag", g, or), uu(v.view), Qi(v), u = !1, o = v.clientX, l = v.clientY, S("start", v)); } } function p(v) { if (gn(v), !u) { var x = v.clientX - o, S = v.clientY - l; u = x * x + S * S > f; } i.mouse("drag", v); } function g(v) { ut(v.view).on("mousemove.drag mouseup.drag", null), cu(v.view, u), gn(v), i.mouse("end", v); } function m(v, x) { if (e.call(this, v, x)) { var S = v.changedTouches, k = t.call(this, v, x), A = S.length, P, E; for (P = 0; P < A; ++P) (E = b(this, k, v, x, S[P].identifier, S[P])) && (Qi(v), E("start", v, S[P])); } } function y(v) { var x = v.changedTouches, S = x.length, k, A; for (k = 0; k < S; ++k) (A = i[x[k].identifier]) && (gn(v), A("drag", v, x[k])); } function w(v) { var x = v.changedTouches, S = x.length, k, A; for (c && clearTimeout(c), c = setTimeout(function() { c = null; }, 500), k = 0; k < S; ++k) (A = i[x[k].identifier]) && (Qi(v), A("end", v, x[k])); } function b(v, x, S, k, A, P) { var E = s.copy(), M = ot(P || S, x), F, _, I; if ((I = n.call(v, new Ns("beforestart", { sourceEvent: S, target: h, identifier: A, active: a, x: M[0], y: M[1], dx: 0, dy: 0, dispatch: E }), k)) != null) return F = I.x - M[0] || 0, _ = I.y - M[1] || 0, function Q(W, U, z) { var R = M, Z; switch (W) { case "start": i[A] = Q, Z = a++; break; case "end": delete i[A], --a; // falls through case "drag": M = ot(z || U, x), Z = a; break; } E.call( W, v, new Ns(W, { sourceEvent: U, subject: I, target: h, identifier: A, active: Z, x: M[0] + F, y: M[1] + _, dx: M[0] - R[0], dy: M[1] - R[1], dispatch: E }), k ); }; } return h.filter = function(v) { return arguments.length ? (e = typeof v == "function" ? v : Or(!!v), h) : e; }, h.container = function(v) { return arguments.length ? (t = typeof v == "function" ? v : Or(v), h) : t; }, h.subject = function(v) { return arguments.length ? (n = typeof v == "function" ? v : Or(v), h) : n; }, h.touchable = function(v) { return arguments.length ? (r = typeof v == "function" ? v : Or(!!v), h) : r; }, h.on = function() { var v = s.on.apply(s, arguments); return v === s ? h : v; }, h.clickDistance = function(v) { return arguments.length ? (f = (v = +v) * v, h) : Math.sqrt(f); }, h; } function Ei(e, t, n) { e.prototype = t.prototype = n, n.constructor = e; } function wa(e, t) { var n = Object.create(e.prototype); for (var r in t) n[r] = t[r]; return n; } function Pn() { } var Be = 0.7, Tn = 1 / Be, yn = "\\s*([+-]?\\d+)\\s*", lr = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", oe = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", Wd = /^#([0-9a-f]{3,8})$/, Hd = new RegExp(`^rgb\\(${yn},${yn},${yn}\\)$`), Zd = new RegExp(`^rgb\\(${oe},${oe},${oe}\\)$`), jd = new RegExp(`^rgba\\(${yn},${yn},${yn},${lr}\\)$`), Yd = new RegExp(`^rgba\\(${oe},${oe},${oe},${lr}\\)$`), Kd = new RegExp(`^hsl\\(${lr},${oe},${oe}\\)$`), Gd = new RegExp(`^hsla\\(${lr},${oe},${oe},${lr}\\)$`), no = { 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 }; Ei(Pn, qe, { copy(e) { return Object.assign(new this.constructor(), this, e); }, displayable() { return this.rgb().displayable(); }, hex: ro, // Deprecated! Use color.formatHex. formatHex: ro, formatHex8: Bd, formatHsl: qd, formatRgb: io, toString: io }); function ro() { return this.rgb().formatHex(); } function Bd() { return this.rgb().formatHex8(); } function qd() { return du(this).formatHsl(); } function io() { return this.rgb().formatRgb(); } function qe(e) { var t, n; return e = (e + "").trim().toLowerCase(), (t = Wd.exec(e)) ? (n = t[1].length, t = parseInt(t[1], 16), n === 6 ? so(t) : n === 3 ? new St(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : n === 8 ? Cr(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : n === 4 ? Cr(t >> 12 & 15 | t >> 8 & 240, t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, ((t & 15) << 4 | t & 15) / 255) : null) : (t = Hd.exec(e)) ? new St(t[1], t[2], t[3], 1) : (t = Zd.exec(e)) ? new St(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = jd.exec(e)) ? Cr(t[1], t[2], t[3], t[4]) : (t = Yd.exec(e)) ? Cr(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = Kd.exec(e)) ? lo(t[1], t[2] / 100, t[3] / 100, 1) : (t = Gd.exec(e)) ? lo(t[1], t[2] / 100, t[3] / 100, t[4]) : no.hasOwnProperty(e) ? so(no[e]) : e === "transparent" ? new St(NaN, NaN, NaN, 0) : null; } function so(e) { return new St(e >> 16 & 255, e >> 8 & 255, e & 255, 1); } function Cr(e, t, n, r) { return r <= 0 && (e = t = n = NaN), new St(e, t, n, r); } function fu(e) { return e instanceof Pn || (e = qe(e)), e ? (e = e.rgb(), new St(e.r, e.g, e.b, e.opacity)) : new St(); } function Ps(e, t, n, r) { return arguments.length === 1 ? fu(e) : new St(e, t, n, r ?? 1); } function St(e, t, n, r) { this.r = +e, this.g = +t, this.b = +n, this.opacity = +r; } Ei(St, Ps, wa(Pn, { brighter(e) { return e = e == null ? Tn : Math.pow(Tn, e), new St(this.r * e, this.g * e, this.b * e, this.opacity); }, darker(e) { return e = e == null ? Be : Math.pow(Be, e), new St(this.r * e, this.g * e, this.b * e, this.opacity); }, rgb() { return this; }, clamp() { return new St(Ke(this.r), Ke(this.g), Ke(this.b), ai(this.opacity)); }, displayable() { return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1; }, hex: ao, // Deprecated! Use color.formatHex. formatHex: ao, formatHex8: Xd, formatRgb: oo, toString: oo })); function ao() { return `#${Ze(this.r)}${Ze(this.g)}${Ze(this.b)}`; } function Xd() { return `#${Ze(this.r)}${Ze(this.g)}${Ze(this.b)}${Ze((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`; } function oo() { const e = ai(this.opacity); return `${e === 1 ? "rgb(" : "rgba("}${Ke(this.r)}, ${Ke(this.g)}, ${Ke(this.b)}${e === 1 ? ")" : `, ${e})`}`; } function ai(e) { return isNaN(e) ? 1 : Math.max(0, Math.min(1, e)); } function Ke(e) { return Math.max(0, Math.min(255, Math.round(e) || 0)); } function Ze(e) { return e = Ke(e), (e < 16 ? "0" : "") + e.toString(16); } function lo(e, t, n, r) { return r <= 0 ? e = t = n = NaN : n <= 0 || n >= 1 ? e = t = NaN : t <= 0 && (e = NaN), new ne(e, t, n, r); } function du(e) { if (e instanceof ne) return new ne(e.h, e.s, e.l, e.opacity); if (e instanceof Pn || (e = qe(e)), !e) return new ne(); if (e instanceof ne) return e; e = e.rgb(); var t = e.r / 255, n = e.g / 255, r = e.b / 255, i = Math.min(t, n, r), s = Math.max(t, n, r), a = NaN, o = s - i, l = (s + i) / 2; return o ? (t === s ? a = (n - r) / o + (n < r) * 6 : n === s ? a = (r - t) / o + 2 : a = (t - n) / o + 4, o /= l < 0.5 ? s + i : 2 - s - i, a *= 60) : o = l > 0 && l < 1 ? 0 : a, new ne(a, o, l, e.opacity); } function Jd(e, t, n, r) { return arguments.length === 1 ? du(e) : new ne(e, t, n, r ?? 1); } function ne(e, t, n, r) { this.h = +e, this.s = +t, this.l = +n, this.opacity = +r; } Ei(ne, Jd, wa(Pn, { brighter(e) { return e = e == null ? Tn : Math.pow(Tn, e), new ne(this.h, this.s, this.l * e, this.opacity); }, darker(e) { return e = e == null ? Be : Math.pow(Be, e), new ne(this.h, this.s, this.l * e, this.opacity); }, rgb() { var e = this.h % 360 + (this.h < 0) * 360, t = isNaN(e) || isNaN(this.s) ? 0 : this.s, n = this.l, r = n + (n < 0.5 ? n : 1 - n) * t, i = 2 * n - r; return new St( ts(e >= 240 ? e - 240 : e + 120, i, r), ts(e, i, r), ts(e < 120 ? e + 240 : e - 120, i, r), this.opacity ); }, clamp() { return new ne(uo(this.h), Ar(this.s), Ar(this.l), ai(this.opacity)); }, displayable() { return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1; }, formatHsl() { const e = ai(this.opacity); return `${e === 1 ? "hsl(" : "hsla("}${uo(this.h)}, ${Ar(this.s) * 100}%, ${Ar(this.l) * 100}%${e === 1 ? ")" : `, ${e})`}`; } })); function uo(e) { return e = (e || 0) % 360, e < 0 ? e + 360 : e; } function Ar(e) { return Math.max(0, Math.min(1, e || 0)); } function ts(e, t, n) { return (e < 60 ? t + (n - t) * e / 60 : e < 180 ? n : e < 240 ? t + (n - t) * (240 - e) / 60 : t) * 255; } const Qd = Math.PI / 180, tp = 180 / Math.PI; var pu = -0.14861, xa = 1.78277, Sa = -0.29227, Ii = -0.90649, ur = 1.97294, co = ur * Ii, ho = ur * xa, fo = xa * Sa - Ii * pu; function ep(e) { if (e instanceof Ge) return new Ge(e.h, e.s, e.l, e.opacity); e instanceof St || (e = fu(e)); var t = e.r / 255, n = e.g / 255, r = e.b / 255, i = (fo * r + co * t - ho * n) / (fo + co - ho), s = r - i, a = (ur * (n - i) - Sa * s) / Ii, o = Math.sqrt(a * a + s * s) / (ur * i * (1 - i)), l = o ? Math.atan2(a, s) * tp - 120 : NaN; return new Ge(l < 0 ? l + 360 : l, o, i, e.opacity); } function Fe(e, t, n, r) { return arguments.length === 1 ? ep(e) : new Ge(e, t, n, r ?? 1); } function Ge(e, t, n, r) { this.h = +e, this.s = +t, this.l = +n, this.opacity = +r; } Ei(Ge, Fe, wa(Pn, { brighter(e) { return e = e == null ? Tn : Math.pow(Tn, e), new Ge(this.h, this.s, this.l * e, this.opacity); }, darker(e) { return e = e == null ? Be : Math.pow(Be, e), new Ge(this.h, this.s, this.l * e, this.opacity); }, rgb() { var e = isNaN(this.h) ? 0 : (this.h + 120) * Qd, t = +this.l, n = isNaN(this.s) ? 0 : this.s * t * (1 - t), r = Math.cos(e), i = Math.sin(e); return new St( 255 * (t + n * (pu * r + xa * i)), 255 * (t + n * (Sa * r + Ii * i)), 255 * (t + n * (ur * r)), this.opacity ); } })); const Di = (e) => () => e; function mu(e, t) { return function(n) { return e + n * t; }; } function np(e, t, n) { return e = Math.pow(e, n), t = Math.pow(t, n) - e, n = 1 / n, function(r) { return Math.pow(e + r * t, n); }; } function rp(e, t) { var n = t - e; return n ? mu(e, n > 180 || n < -180 ? n - 360 * Math.round(n / 360) : n) : Di(isNaN(e) ? t : e); } function ip(e) { return (e = +e) == 1 ? vn : function(t, n) { return n - t ? np(t, n, e) : Di(isNaN(t) ? n : t); }; } function vn(e, t) { var n = t - e; return n ? mu(e, n) : Di(isNaN(e) ? t : e); } const oi = (function e(t) { var n = ip(t); function r(i, s) { var a = n((i = Ps(i)).r, (s = Ps(s)).r), o = n(i.g, s.g), l = n(i.b, s.b), u = vn(i.opacity, s.opacity); return function(c) { return i.r = a(c), i.g = o(c), i.b = l(c), i.opacity = u(c), i + ""; }; } return r.gamma = e, r; })(1); function gu(e, t) { t || (t = []); var n = e ? Math.min(t.length, e.length) : 0, r = t.slice(), i; return function(s) { for (i = 0; i < n; ++i) r[i] = e[i] * (1 - s) + t[i] * s; return r; }; } function yu(e) { return ArrayBuffer.isView(e) && !(e instanceof DataView); } function li(e, t) { return (yu(t) ? gu : vu)(e, t); } function vu(e, t) { var n = t ? t.length : 0, r = e ? Math.min(n, e.length) : 0, i = new Array(r), s = new Array(n), a; for (a = 0; a < r; ++a) i[a] = Rt(e[a], t[a]); for (; a < n; ++a) s[a] = t[a]; return function(o) { for (a = 0; a < r; ++a) s[a] = i[a](o); return s; }; } function sp(e, t) { var n = /* @__PURE__ */ new Date(); return e = +e, t = +t, function(r) { return n.setTime(e * (1 - r) + t * r), n; }; } function ee(e, t) { return e = +e, t = +t, function(n) { return e * (1 - n) + t * n; }; } function ap(e, t) { var n = {}, r = {}, i; (e === null || typeof e != "object") && (e = {}), (t === null || typeof t != "object") && (t = {}); for (i in t) i in e ? n[i] = Rt(e[i], t[i]) : r[i] = t[i]; return function(s) { for (i in n) r[i] = n[i](s); return r; }; } var $s = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, es = new RegExp($s.source, "g"); function op(e) { return function() { return e; }; } function lp(e) { return function(t) { return e(t) + ""; }; } function bu(e, t) { var n = $s.lastIndex = es.lastIndex = 0, r, i, s, a = -1, o = [], l = []; for (e = e + "", t = t + ""; (r = $s.exec(e)) && (i = es.exec(t)); ) (s = i.index) > n && (s = t.slice(n, s), o[a] ? o[a] += s : o[++a] = s), (r = r[0]) === (i = i[0]) ? o[a] ? o[a] += i : o[++a] = i : (o[++a] = null, l.push({ i: a, x: ee(r, i) })), n = es.lastIndex; return n < t.length && (s = t.slice(n), o[a] ? o[a] += s : o[++a] = s), o.length < 2 ? l[0] ? lp(l[0].x) : op(t) : (t = l.length, function(u) { for (var c = 0, f; c < t; ++c) o[(f = l[c]).i] = f.x(u); return o.join(""); }); } function Rt(e, t) { var n = typeof t, r; return t == null || n === "boolean" ? Di(t) : (n === "number" ? ee : n === "string" ? (r = qe(t)) ? (t = r, oi) : bu : t instanceof qe ? oi : t instanceof Date ? sp : yu(t) ? gu : Array.isArray(t) ? vu : typeof t.valueOf != "function" && typeof t.toString != "function" || isNaN(t) ? ap : ee)(e, t); } function wu(e, t) { return e = +e, t = +t, function(n) { return Math.round(e * (1 - n) + t * n); }; } var po = 180 / Math.PI, Fs = { translateX: 0, translateY: 0, rotate: 0, skewX: 0, scaleX: 1, scaleY: 1 }; function xu(e, t, n, r, i, s) { var a, o, l; return (a = Math.sqrt(e * e + t * t)) && (e /= a, t /= a), (l = e * n + t * r) && (n -= e * l, r -= t * l), (o = Math.sqrt(n * n + r * r)) && (n /= o, r /= o, l /= o), e * r < t * n && (e = -e, t = -t, l = -l, a = -a), { translateX: i, translateY: s, rotate: Math.atan2(t, e) * po, skewX: Math.atan(l) * po, scaleX: a, scaleY: o }; } var Er; function up(e) { const t = new (typeof DOMMatrix == "function" ? DOMMatrix : WebKitCSSMatrix)(e + ""); return t.isIdentity ? Fs : xu(t.a, t.b, t.c, t.d, t.e, t.f); } function cp(e) { return e == null || (Er || (Er = document.createElementNS("http://www.w3.org/2000/svg", "g")), Er.setAttribute("transform", e), !(e = Er.transform.baseVal.consolidate())) ? Fs : (e = e.matrix, xu(e.a, e.b, e.c, e.d, e.e, e.f)); } function Su(e, t, n, r) { function i(u) { return u.length ? u.pop() + " " : ""; } function s(u, c, f, h, d, p) { if (u !== f || c !== h) { var g = d.push("translate(", null, t, null, n); p.push({ i: g - 4, x: ee(u, f) }, { i: g - 2, x: ee(c, h) }); } else (f || h) && d.push("translate(" + f + t + h + n); } function a(u, c, f, h) { u !== c ? (u - c > 180 ? c += 360 : c - u > 180 && (u += 360), h.push({ i: f.push(i(f) + "rotate(", null, r) - 2, x: ee(u, c) })) : c && f.push(i(f) + "rotate(" + c + r); } function o(u, c, f, h) { u !== c ? h.push({ i: f.push(i(f) + "skewX(", null, r) - 2, x: ee(u, c) }) : c && f.push(i(f) + "skewX(" + c + r); } function l(u, c, f, h, d, p) { if (u !== f || c !== h) { var g = d.push(i(d) + "scale(", null, ",", null, ")"); p.push({ i: g - 4, x: ee(u, f) }, { i: g - 2, x: ee(c, h) }); } else (f !== 1 || h !== 1) && d.push(i(d) + "scale(" + f + "," + h + ")"); } return function(u, c) { var f = [], h = []; return u = e(u), c = e(c), s(u.translateX, u.translateY, c.translateX, c.translateY, f, h), a(u.rotate, c.rotate, f, h), o(u.skewX, c.skewX, f, h), l(u.scaleX, u.scaleY, c.scaleX, c.scaleY, f, h), u = c = null, function(d) { for (var p = -1, g = h.length, m; ++p < g; ) f[(m = h[p]).i] = m.x(d); return f.join(""); }; }; } var hp = Su(up, "px, ", "px)", "deg)"), fp = Su(cp, ", ", ")", ")"); function Tu(e) { return (function t(n) { n = +n; function r(i, s) { var a = e((i = Fe(i)).h, (s = Fe(s)).h), o = vn(i.s, s.s), l = vn(i.l, s.l), u = vn(i.opacity, s.opacity); return function(c) { return i.h = a(c), i.s = o(c), i.l = l(Math.pow(c, n)), i.opacity = u(c), i + ""; }; } return r.gamma = t, r; })(1); } Tu(rp); var Mu = Tu(vn), Mn = 0, Bn = 0, Wn = 0, _u = 1e3, ui, qn, ci = 0, Xe = 0, Ni = 0, cr = typeof performance == "object" && performance.now ? performance : Date, ku = typeof window == "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(e) { setTimeout(e, 17); }; function Pi() { return Xe || (ku(dp), Xe = cr.now() + Ni); } function dp() { Xe = 0; } function hr() { this._call = this._time = this._next = null; } hr.prototype = Ta.prototype = { constructor: hr, restart: function(e, t, n) { if (typeof e != "function") throw new TypeError("callback is not a function"); n = (n == null ? Pi() : +n) + (t == null ? 0 : +t), !this._next && qn !== this && (qn ? qn._next = this : ui = this, qn = this), this._call = e, this._time = n, Ls(); }, stop: function() { this._call && (this._call = null, this._time = 1 / 0, Ls()); } }; function Ta(e, t, n) { var r = new hr(); return r.restart(e, t, n), r; } function pp() { Pi(), ++Mn; for (var e = ui, t; e; ) (t = Xe - e._time) >= 0 && e._call.call(void 0, t), e = e._next; --Mn; } function mo() { Xe = (ci = cr.now()) + Ni, Mn = Bn = 0; try { pp(); } finally { Mn = 0, gp(), Xe = 0; } } function mp() {