UNPKG

@explorables/berlin_8_am

Version:

This explorable illustrates a model for traffic and congestion and the phenomenon knowns as phantom traffic jams, spontaneously emergent congested traffic segments that move slowly and oppositely to the traffic.

1,527 lines 231 kB
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('/*! tailwindcss v4.1.4 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight:initial}}}@layer theme{:root,:host{--tw-font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--tw-color-black:#000;--tw-color-white:#fff;--tw-spacing:.25rem;--tw-container-5xl:64rem;--tw-text-2xl:1.5rem;--tw-text-2xl--line-height:calc(2/1.5);--tw-text-3xl:1.875rem;--tw-text-3xl--line-height: 1.2 ;--tw-text-5xl:3rem;--tw-text-5xl--line-height:1;--tw-font-weight-light:300}}@layer base,components;@layer utilities{.tw\\:m-8{margin:calc(var(--tw-spacing)*8)}.tw\\:grid{display:grid}.tw\\:max-w-5xl{max-width:var(--tw-container-5xl)}.tw\\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.tw\\:bg-white{background-color:var(--tw-color-white)}.tw\\:p-0{padding:calc(var(--tw-spacing)*0)}.tw\\:px-1{padding-inline:calc(var(--tw-spacing)*1)}.tw\\:px-10{padding-inline:calc(var(--tw-spacing)*10)}.tw\\:font-sans{font-family:var(--tw-font-sans)}.tw\\:text-2xl{font-size:var(--tw-text-2xl);line-height:var(--tw-leading,var(--tw-text-2xl--line-height))}.tw\\:text-3xl{font-size:var(--tw-text-3xl);line-height:var(--tw-leading,var(--tw-text-3xl--line-height))}.tw\\:text-5xl{font-size:var(--tw-text-5xl);line-height:var(--tw-leading,var(--tw-text-5xl--line-height))}.tw\\:font-light{--tw-font-weight:var(--tw-font-weight-light);font-weight:var(--tw-font-weight-light)}.tw\\:text-black{color:var(--tw-color-black)}@media (min-width:40rem){.tw\\:sm\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.tw\\:sm\\:gap-8{gap:calc(var(--tw-spacing)*8)}.tw\\:sm\\:p-0{padding:calc(var(--tw-spacing)*0)}}@media (prefers-color-scheme:dark){.tw\\:dark\\:bg-black{background-color:var(--tw-color-black)}.tw\\:dark\\:text-white{color:var(--tw-color-white)}}.debug-grid-16{background-image:linear-gradient(90deg,#0000ff1a 1px,#0000 1px),linear-gradient(#0000ff1a 1px,#0000 1px);background-repeat:repeat;background-size:6.25% 6.25%,6.25% 6.25%}}.explorable *,.explorable :before,.explorable :after{box-sizing:border-box}@property --tw-font-weight{syntax:"*";inherits:false}._displayPanel_u655x_1,._controlPanel_u655x_8{display:block;line-height:0;box-sizing:border-box}._displayPanel_u655x_1>canvas,._displayPanel_u655x_1>svg,._controlPanel_u655x_8>svg,._controlPanel_u655x_8>canvas{display:block;box-sizing:border-box}._car_u655x_29{stroke:#000;stroke-width:1px}._tire_u655x_34{fill:#000;stroke:none}._street_background_u655x_39{stroke:#000;stroke-width:32;fill:none;stroke-linecap:round}._asphalt_u655x_46{stroke:#787878;stroke-width:29;fill:none;stroke-linecap:round}._street_marks_u655x_53{stroke:#fff;stroke-width:1;fill:none;stroke-dasharray:4}._pivot_u655x_62{stroke:#000;fill:#000}._tachoborder_u655x_67{fill:none;stroke:#000;stroke-width:1.5px}._tachoredzone_u655x_73{fill:none;stroke:red;stroke-opacity:.3;stroke-width:7;stroke-linecap:round}._tachotick_u655x_81{fill:none;stroke:#000;stroke-width:1px}._ticklabel_u655x_87{font-size:10;text-anchor:middle}._pin_u655x_93{stroke:#000;stroke-width:1px;stroke-linecap:round;stroke-opacity:.1}._meanspeed_u655x_100{stroke:#b40000;stroke-width:5px;stroke-linecap:round;stroke-opacity:1}@media (prefers-color-scheme: dark){._car_u655x_29{stroke:#000;stroke-width:1px}._tire_u655x_34{fill:#000;stroke:none}._street_background_u655x_39{stroke:#fff;stroke-width:32;fill:none;stroke-linecap:round}._asphalt_u655x_46{stroke:#141414;stroke-width:29;fill:none;stroke-linecap:round}._street_marks_u655x_53{stroke:gray;stroke-width:1;fill:none;stroke-dasharray:4}._tachoborder_u655x_67{fill:none;stroke:#fff;stroke-width:1.5px}._tachoredzone_u655x_73{fill:none;stroke:red;stroke-opacity:.7;stroke-width:7;stroke-linecap:round}._tachotick_u655x_81{fill:none;stroke:#fff;stroke-width:1px}._ticklabel_u655x_87{font-size:10;text-anchor:middle;fill:#fff}._pin_u655x_93{stroke:#fff;stroke-width:1px;stroke-linecap:round;stroke-opacity:.1}._pivot_u655x_62{stroke:#fff;fill:#fff}._meanspeed_u655x_100{stroke:#b40000;stroke-width:5px;stroke-linecap:round;stroke-opacity:1}}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})(); const Hu = { display_type: "svg", // either svg or canvas depending on explorable debug: !1, // if set to true, draws dots on the control panel to help widget placement controls_border: "", display_border: "", debug_lattice: "debug-grid-16", controls_grid: { nx: 12, ny: 12 }, display_size: { width: 500, height: 500 }, controls_size: { width: 480, height: 480 }, display_class: " tw:p-0", controls_class: "tw:p-0", container_class: "tw:font-sans tw:font-light tw:grid tw:grid-cols-1 tw:sm:grid-cols-2 tw:sm:gap-8 tw:px-1 tw:sm:p-0 tw:m-8" }; function oe(t, n) { return t == null || n == null ? NaN : t < n ? -1 : t > n ? 1 : t >= n ? 0 : NaN; } function Uu(t, n) { return t == null || n == null ? NaN : n < t ? -1 : n > t ? 1 : n >= t ? 0 : NaN; } function Oo(t) { let n, e, r; t.length !== 2 ? (n = oe, e = (s, l) => oe(t(s), l), r = (s, l) => t(s) - l) : (n = t === oe || t === Uu ? t : Gu, e = t, r = t); function i(s, l, u = 0, c = s.length) { if (u < c) { if (n(l, l) !== 0) return c; do { const f = u + c >>> 1; e(s[f], l) < 0 ? u = f + 1 : c = f; } while (u < c); } return u; } function a(s, l, u = 0, c = s.length) { if (u < c) { if (n(l, l) !== 0) return c; do { const f = u + c >>> 1; e(s[f], l) <= 0 ? u = f + 1 : c = f; } while (u < c); } return u; } function o(s, l, u = 0, c = s.length) { const f = i(s, l, u, c - 1); return f > u && r(s[f - 1], l) > -r(s[f], l) ? f - 1 : f; } return { left: i, center: o, right: a }; } function Gu() { return 0; } function Yu(t) { return t === null ? NaN : +t; } const Vu = Oo(oe), Ku = Vu.right; Oo(Yu).center; const Zu = Math.sqrt(50), Wu = Math.sqrt(10), Ju = Math.sqrt(2); function ye(t, n, e) { const r = (n - t) / Math.max(0, e), i = Math.floor(Math.log10(r)), a = r / Math.pow(10, i), o = a >= Zu ? 10 : a >= Wu ? 5 : a >= Ju ? 2 : 1; let s, l, u; return i < 0 ? (u = Math.pow(10, -i) / o, s = Math.round(t * u), l = Math.round(n * u), s / u < t && ++s, l / u > n && --l, u = -u) : (u = Math.pow(10, i) * o, s = Math.round(t / u), l = Math.round(n / u), s * u < t && ++s, l * u > n && --l), l < s && 0.5 <= e && e < 2 ? ye(t, n, e * 2) : [s, l, u]; } function Qu(t, n, e) { if (n = +n, t = +t, e = +e, !(e > 0)) return []; if (t === n) return [t]; const r = n < t, [i, a, o] = r ? ye(n, t, e) : ye(t, n, e); if (!(a >= i)) return []; const s = a - i + 1, l = new Array(s); if (r) if (o < 0) for (let u = 0; u < s; ++u) l[u] = (a - u) / -o; else for (let u = 0; u < s; ++u) l[u] = (a - u) * o; else if (o < 0) for (let u = 0; u < s; ++u) l[u] = (i + u) / -o; else for (let u = 0; u < s; ++u) l[u] = (i + u) * o; return l; } function Ar(t, n, e) { return n = +n, t = +t, e = +e, ye(t, n, e)[2]; } function tl(t, n, e) { n = +n, t = +t, e = +e; const r = n < t, i = r ? Ar(n, t, e) : Ar(t, n, e); return (r ? -1 : 1) * (i < 0 ? 1 / -i : i); } function nl(t, n) { let e; if (n === void 0) for (const r of t) r != null && (e < r || e === void 0 && r >= r) && (e = r); else { let r = -1; for (let i of t) (i = n(i, ++r, t)) != null && (e < i || e === void 0 && i >= i) && (e = i); } return e; } function el(t, n) { let e; if (n === void 0) for (const r of t) r != null && (e > r || e === void 0 && r >= r) && (e = r); else { let r = -1; for (let i of t) (i = n(i, ++r, t)) != null && (e > i || e === void 0 && i >= i) && (e = i); } return e; } function zo(t, n) { let e = 0, r = 0; if (n === void 0) for (let i of t) i != null && (i = +i) >= i && (++e, r += i); else { let i = -1; for (let a of t) (a = n(a, ++i, t)) != null && (a = +a) >= a && (++e, r += a); } if (e) return r / e; } function Gn(t, n, e) { t = +t, n = +n, e = (i = arguments.length) < 2 ? (n = t, t = 0, 1) : i < 3 ? 1 : +e; for (var r = -1, i = Math.max(0, Math.ceil((n - t) / e)) | 0, a = new Array(i); ++r < i; ) a[r] = t + r * e; return a; } var rl = { value: () => { } }; function Io() { for (var t = 0, n = arguments.length, e = {}, r; t < n; ++t) { if (!(r = arguments[t] + "") || r in e || /[\s.]/.test(r)) throw new Error("illegal type: " + r); e[r] = []; } return new se(e); } function se(t) { this._ = t; } function il(t, n) { return t.trim().split(/^|\s+/).map(function(e) { var r = "", i = e.indexOf("."); if (i >= 0 && (r = e.slice(i + 1), e = e.slice(0, i)), e && !n.hasOwnProperty(e)) throw new Error("unknown type: " + e); return { type: e, name: r }; }); } se.prototype = Io.prototype = { constructor: se, on: function(t, n) { var e = this._, r = il(t + "", e), i, a = -1, o = r.length; if (arguments.length < 2) { for (; ++a < o; ) if ((i = (t = r[a]).type) && (i = al(e[i], t.name))) return i; return; } if (n != null && typeof n != "function") throw new Error("invalid callback: " + n); for (; ++a < o; ) if (i = (t = r[a]).type) e[i] = Ui(e[i], t.name, n); else if (n == null) for (i in e) e[i] = Ui(e[i], t.name, null); return this; }, copy: function() { var t = {}, n = this._; for (var e in n) t[e] = n[e].slice(); return new se(t); }, call: function(t, n) { if ((i = arguments.length - 2) > 0) for (var e = new Array(i), r = 0, i, a; r < i; ++r) e[r] = arguments[r + 2]; if (!this._.hasOwnProperty(t)) throw new Error("unknown type: " + t); for (a = this._[t], r = 0, i = a.length; r < i; ++r) a[r].value.apply(n, e); }, apply: function(t, n, e) { if (!this._.hasOwnProperty(t)) throw new Error("unknown type: " + t); for (var r = this._[t], i = 0, a = r.length; i < a; ++i) r[i].value.apply(n, e); } }; function al(t, n) { for (var e = 0, r = t.length, i; e < r; ++e) if ((i = t[e]).name === n) return i.value; } function Ui(t, n, e) { for (var r = 0, i = t.length; r < i; ++r) if (t[r].name === n) { t[r] = rl, t = t.slice(0, r).concat(t.slice(r + 1)); break; } return e != null && t.push({ name: n, value: e }), t; } var Tr = "http://www.w3.org/1999/xhtml"; const Gi = { svg: "http://www.w3.org/2000/svg", xhtml: Tr, xlink: "http://www.w3.org/1999/xlink", xml: "http://www.w3.org/XML/1998/namespace", xmlns: "http://www.w3.org/2000/xmlns/" }; function De(t) { var n = t += "", e = n.indexOf(":"); return e >= 0 && (n = t.slice(0, e)) !== "xmlns" && (t = t.slice(e + 1)), Gi.hasOwnProperty(n) ? { space: Gi[n], local: t } : t; } function ol(t) { return function() { var n = this.ownerDocument, e = this.namespaceURI; return e === Tr && n.documentElement.namespaceURI === Tr ? n.createElement(t) : n.createElementNS(e, t); }; } function sl(t) { return function() { return this.ownerDocument.createElementNS(t.space, t.local); }; } function Co(t) { var n = De(t); return (n.local ? sl : ol)(n); } function ul() { } function si(t) { return t == null ? ul : function() { return this.querySelector(t); }; } function ll(t) { typeof t != "function" && (t = si(t)); for (var n = this._groups, e = n.length, r = new Array(e), i = 0; i < e; ++i) for (var a = n[i], o = a.length, s = r[i] = new Array(o), l, u, c = 0; c < o; ++c) (l = a[c]) && (u = t.call(l, l.__data__, c, a)) && ("__data__" in l && (u.__data__ = l.__data__), s[c] = u); return new q(r, this._parents); } function cl(t) { return t == null ? [] : Array.isArray(t) ? t : Array.from(t); } function fl() { return []; } function Ro(t) { return t == null ? fl : function() { return this.querySelectorAll(t); }; } function hl(t) { return function() { return cl(t.apply(this, arguments)); }; } function pl(t) { typeof t == "function" ? t = hl(t) : t = Ro(t); for (var n = this._groups, e = n.length, r = [], i = [], a = 0; a < e; ++a) for (var o = n[a], s = o.length, l, u = 0; u < s; ++u) (l = o[u]) && (r.push(t.call(l, l.__data__, u, o)), i.push(l)); return new q(r, i); } function jo(t) { return function() { return this.matches(t); }; } function Fo(t) { return function(n) { return n.matches(t); }; } var dl = Array.prototype.find; function gl(t) { return function() { return dl.call(this.children, t); }; } function _l() { return this.firstElementChild; } function yl(t) { return this.select(t == null ? _l : gl(typeof t == "function" ? t : Fo(t))); } var vl = Array.prototype.filter; function ml() { return Array.from(this.children); } function wl(t) { return function() { return vl.call(this.children, t); }; } function bl(t) { return this.selectAll(t == null ? ml : wl(typeof t == "function" ? t : Fo(t))); } function xl(t) { typeof t != "function" && (t = jo(t)); for (var n = this._groups, e = n.length, r = new Array(e), i = 0; i < e; ++i) for (var a = n[i], o = a.length, s = r[i] = [], l, u = 0; u < o; ++u) (l = a[u]) && t.call(l, l.__data__, u, a) && s.push(l); return new q(r, this._parents); } function Lo(t) { return new Array(t.length); } function Ml() { return new q(this._enter || this._groups.map(Lo), this._parents); } function ve(t, n) { this.ownerDocument = t.ownerDocument, this.namespaceURI = t.namespaceURI, this._next = null, this._parent = t, this.__data__ = n; } ve.prototype = { constructor: ve, appendChild: function(t) { return this._parent.insertBefore(t, this._next); }, insertBefore: function(t, n) { return this._parent.insertBefore(t, n); }, querySelector: function(t) { return this._parent.querySelector(t); }, querySelectorAll: function(t) { return this._parent.querySelectorAll(t); } }; function $l(t) { return function() { return t; }; } function Al(t, n, e, r, i, a) { for (var o = 0, s, l = n.length, u = a.length; o < u; ++o) (s = n[o]) ? (s.__data__ = a[o], r[o] = s) : e[o] = new ve(t, a[o]); for (; o < l; ++o) (s = n[o]) && (i[o] = s); } function Tl(t, n, e, r, i, a, o) { var s, l, u = /* @__PURE__ */ new Map(), c = n.length, f = a.length, h = new Array(c), p; for (s = 0; s < c; ++s) (l = n[s]) && (h[s] = p = o.call(l, l.__data__, s, n) + "", u.has(p) ? i[s] = l : u.set(p, l)); for (s = 0; s < f; ++s) p = o.call(t, a[s], s, a) + "", (l = u.get(p)) ? (r[s] = l, l.__data__ = a[s], u.delete(p)) : e[s] = new ve(t, a[s]); for (s = 0; s < c; ++s) (l = n[s]) && u.get(h[s]) === l && (i[s] = l); } function Nl(t) { return t.__data__; } function kl(t, n) { if (!arguments.length) return Array.from(this, Nl); var e = n ? Tl : Al, r = this._parents, i = this._groups; typeof t != "function" && (t = $l(t)); for (var a = i.length, o = new Array(a), s = new Array(a), l = new Array(a), u = 0; u < a; ++u) { var c = r[u], f = i[u], h = f.length, p = Sl(t.call(c, c && c.__data__, u, r)), g = p.length, y = s[u] = new Array(g), w = o[u] = new Array(g), b = l[u] = new Array(h); e(c, f, y, w, b, p, n); for (var d = 0, x = 0, _, m; d < g; ++d) if (_ = y[d]) { for (d >= x && (x = d + 1); !(m = w[x]) && ++x < g; ) ; _._next = m || null; } } return o = new q(o, r), o._enter = s, o._exit = l, o; } function Sl(t) { return typeof t == "object" && "length" in t ? t : Array.from(t); } function Pl() { return new q(this._exit || this._groups.map(Lo), this._parents); } function El(t, n, e) { var r = this.enter(), i = this, a = this.exit(); return typeof t == "function" ? (r = t(r), r && (r = r.selection())) : r = r.append(t + ""), n != null && (i = n(i), i && (i = i.selection())), e == null ? a.remove() : e(a), r && i ? r.merge(i).order() : i; } function Ol(t) { for (var n = t.selection ? t.selection() : t, e = this._groups, r = n._groups, i = e.length, a = r.length, o = Math.min(i, a), s = new Array(i), l = 0; l < o; ++l) for (var u = e[l], c = r[l], f = u.length, h = s[l] = new Array(f), p, g = 0; g < f; ++g) (p = u[g] || c[g]) && (h[g] = p); for (; l < i; ++l) s[l] = e[l]; return new q(s, this._parents); } function zl() { for (var t = this._groups, n = -1, e = t.length; ++n < e; ) for (var r = t[n], i = r.length - 1, a = r[i], o; --i >= 0; ) (o = r[i]) && (a && o.compareDocumentPosition(a) ^ 4 && a.parentNode.insertBefore(o, a), a = o); return this; } function Il(t) { t || (t = Cl); function n(f, h) { return f && h ? t(f.__data__, h.__data__) : !f - !h; } for (var e = this._groups, r = e.length, i = new Array(r), a = 0; a < r; ++a) { for (var o = e[a], s = o.length, l = i[a] = new Array(s), u, c = 0; c < s; ++c) (u = o[c]) && (l[c] = u); l.sort(n); } return new q(i, this._parents).order(); } function Cl(t, n) { return t < n ? -1 : t > n ? 1 : t >= n ? 0 : NaN; } function Rl() { var t = arguments[0]; return arguments[0] = this, t.apply(null, arguments), this; } function jl() { return Array.from(this); } function Fl() { for (var t = this._groups, n = 0, e = t.length; n < e; ++n) for (var r = t[n], i = 0, a = r.length; i < a; ++i) { var o = r[i]; if (o) return o; } return null; } function Ll() { let t = 0; for (const n of this) ++t; return t; } function Dl() { return !this.node(); } function ql(t) { for (var n = this._groups, e = 0, r = n.length; e < r; ++e) for (var i = n[e], a = 0, o = i.length, s; a < o; ++a) (s = i[a]) && t.call(s, s.__data__, a, i); return this; } function Xl(t) { return function() { this.removeAttribute(t); }; } function Bl(t) { return function() { this.removeAttributeNS(t.space, t.local); }; } function Hl(t, n) { return function() { this.setAttribute(t, n); }; } function Ul(t, n) { return function() { this.setAttributeNS(t.space, t.local, n); }; } function Gl(t, n) { return function() { var e = n.apply(this, arguments); e == null ? this.removeAttribute(t) : this.setAttribute(t, e); }; } function Yl(t, n) { return function() { var e = n.apply(this, arguments); e == null ? this.removeAttributeNS(t.space, t.local) : this.setAttributeNS(t.space, t.local, e); }; } function Vl(t, n) { var e = De(t); if (arguments.length < 2) { var r = this.node(); return e.local ? r.getAttributeNS(e.space, e.local) : r.getAttribute(e); } return this.each((n == null ? e.local ? Bl : Xl : typeof n == "function" ? e.local ? Yl : Gl : e.local ? Ul : Hl)(e, n)); } function Do(t) { return t.ownerDocument && t.ownerDocument.defaultView || t.document && t || t.defaultView; } function Kl(t) { return function() { this.style.removeProperty(t); }; } function Zl(t, n, e) { return function() { this.style.setProperty(t, n, e); }; } function Wl(t, n, e) { return function() { var r = n.apply(this, arguments); r == null ? this.style.removeProperty(t) : this.style.setProperty(t, r, e); }; } function Jl(t, n, e) { return arguments.length > 1 ? this.each((n == null ? Kl : typeof n == "function" ? Wl : Zl)(t, n, e ?? "")) : nn(this.node(), t); } function nn(t, n) { return t.style.getPropertyValue(n) || Do(t).getComputedStyle(t, null).getPropertyValue(n); } function Ql(t) { return function() { delete this[t]; }; } function tc(t, n) { return function() { this[t] = n; }; } function nc(t, n) { return function() { var e = n.apply(this, arguments); e == null ? delete this[t] : this[t] = e; }; } function ec(t, n) { return arguments.length > 1 ? this.each((n == null ? Ql : typeof n == "function" ? nc : tc)(t, n)) : this.node()[t]; } function qo(t) { return t.trim().split(/^|\s+/); } function ui(t) { return t.classList || new Xo(t); } function Xo(t) { this._node = t, this._names = qo(t.getAttribute("class") || ""); } Xo.prototype = { add: function(t) { var n = this._names.indexOf(t); n < 0 && (this._names.push(t), this._node.setAttribute("class", this._names.join(" "))); }, remove: function(t) { var n = this._names.indexOf(t); n >= 0 && (this._names.splice(n, 1), this._node.setAttribute("class", this._names.join(" "))); }, contains: function(t) { return this._names.indexOf(t) >= 0; } }; function Bo(t, n) { for (var e = ui(t), r = -1, i = n.length; ++r < i; ) e.add(n[r]); } function Ho(t, n) { for (var e = ui(t), r = -1, i = n.length; ++r < i; ) e.remove(n[r]); } function rc(t) { return function() { Bo(this, t); }; } function ic(t) { return function() { Ho(this, t); }; } function ac(t, n) { return function() { (n.apply(this, arguments) ? Bo : Ho)(this, t); }; } function oc(t, n) { var e = qo(t + ""); if (arguments.length < 2) { for (var r = ui(this.node()), i = -1, a = e.length; ++i < a; ) if (!r.contains(e[i])) return !1; return !0; } return this.each((typeof n == "function" ? ac : n ? rc : ic)(e, n)); } function sc() { this.textContent = ""; } function uc(t) { return function() { this.textContent = t; }; } function lc(t) { return function() { var n = t.apply(this, arguments); this.textContent = n ?? ""; }; } function cc(t) { return arguments.length ? this.each(t == null ? sc : (typeof t == "function" ? lc : uc)(t)) : this.node().textContent; } function fc() { this.innerHTML = ""; } function hc(t) { return function() { this.innerHTML = t; }; } function pc(t) { return function() { var n = t.apply(this, arguments); this.innerHTML = n ?? ""; }; } function dc(t) { return arguments.length ? this.each(t == null ? fc : (typeof t == "function" ? pc : hc)(t)) : this.node().innerHTML; } function gc() { this.nextSibling && this.parentNode.appendChild(this); } function _c() { return this.each(gc); } function yc() { this.previousSibling && this.parentNode.insertBefore(this, this.parentNode.firstChild); } function vc() { return this.each(yc); } function mc(t) { var n = typeof t == "function" ? t : Co(t); return this.select(function() { return this.appendChild(n.apply(this, arguments)); }); } function wc() { return null; } function bc(t, n) { var e = typeof t == "function" ? t : Co(t), r = n == null ? wc : typeof n == "function" ? n : si(n); return this.select(function() { return this.insertBefore(e.apply(this, arguments), r.apply(this, arguments) || null); }); } function xc() { var t = this.parentNode; t && t.removeChild(this); } function Mc() { return this.each(xc); } function $c() { var t = this.cloneNode(!1), n = this.parentNode; return n ? n.insertBefore(t, this.nextSibling) : t; } function Ac() { var t = this.cloneNode(!0), n = this.parentNode; return n ? n.insertBefore(t, this.nextSibling) : t; } function Tc(t) { return this.select(t ? Ac : $c); } function Nc(t) { return arguments.length ? this.property("__data__", t) : this.node().__data__; } function kc(t) { return function(n) { t.call(this, n, this.__data__); }; } function Sc(t) { return t.trim().split(/^|\s+/).map(function(n) { var e = "", r = n.indexOf("."); return r >= 0 && (e = n.slice(r + 1), n = n.slice(0, r)), { type: n, name: e }; }); } function Pc(t) { return function() { var n = this.__on; if (n) { for (var e = 0, r = -1, i = n.length, a; e < i; ++e) a = n[e], (!t.type || a.type === t.type) && a.name === t.name ? this.removeEventListener(a.type, a.listener, a.options) : n[++r] = a; ++r ? n.length = r : delete this.__on; } }; } function Ec(t, n, e) { return function() { var r = this.__on, i, a = kc(n); if (r) { for (var o = 0, s = r.length; o < s; ++o) if ((i = r[o]).type === t.type && i.name === t.name) { this.removeEventListener(i.type, i.listener, i.options), this.addEventListener(i.type, i.listener = a, i.options = e), i.value = n; return; } } this.addEventListener(t.type, a, e), i = { type: t.type, name: t.name, value: n, listener: a, options: e }, r ? r.push(i) : this.__on = [i]; }; } function Oc(t, n, e) { var r = Sc(t + ""), i, a = r.length, o; if (arguments.length < 2) { var s = this.node().__on; if (s) { for (var l = 0, u = s.length, c; l < u; ++l) for (i = 0, c = s[l]; i < a; ++i) if ((o = r[i]).type === c.type && o.name === c.name) return c.value; } return; } for (s = n ? Ec : Pc, i = 0; i < a; ++i) this.each(s(r[i], n, e)); return this; } function Uo(t, n, e) { var r = Do(t), i = r.CustomEvent; typeof i == "function" ? i = new i(n, e) : (i = r.document.createEvent("Event"), e ? (i.initEvent(n, e.bubbles, e.cancelable), i.detail = e.detail) : i.initEvent(n, !1, !1)), t.dispatchEvent(i); } function zc(t, n) { return function() { return Uo(this, t, n); }; } function Ic(t, n) { return function() { return Uo(this, t, n.apply(this, arguments)); }; } function Cc(t, n) { return this.each((typeof n == "function" ? Ic : zc)(t, n)); } function* Rc() { for (var t = this._groups, n = 0, e = t.length; n < e; ++n) for (var r = t[n], i = 0, a = r.length, o; i < a; ++i) (o = r[i]) && (yield o); } var Go = [null]; function q(t, n) { this._groups = t, this._parents = n; } function Ln() { return new q([[document.documentElement]], Go); } function jc() { return this; } q.prototype = Ln.prototype = { constructor: q, select: ll, selectAll: pl, selectChild: yl, selectChildren: bl, filter: xl, data: kl, enter: Ml, exit: Pl, join: El, merge: Ol, selection: jc, order: zl, sort: Il, call: Rl, nodes: jl, node: Fl, size: Ll, empty: Dl, each: ql, attr: Vl, style: Jl, property: ec, classed: oc, text: cc, html: dc, raise: _c, lower: vc, append: mc, insert: bc, remove: Mc, clone: Tc, datum: Nc, on: Oc, dispatch: Cc, [Symbol.iterator]: Rc }; function Fc(t) { return typeof t == "string" ? new q([[document.querySelector(t)]], [document.documentElement]) : new q([[t]], Go); } function li(t, n, e) { t.prototype = n.prototype = e, e.constructor = t; } function Yo(t, n) { var e = Object.create(t.prototype); for (var r in n) e[r] = n[r]; return e; } function Dn() { } var Nn = 0.7, me = 1 / Nn, Zt = "\\s*([+-]?\\d+)\\s*", kn = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", rt = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", Lc = /^#([0-9a-f]{3,8})$/, Dc = new RegExp(`^rgb\\(${Zt},${Zt},${Zt}\\)$`), qc = new RegExp(`^rgb\\(${rt},${rt},${rt}\\)$`), Xc = new RegExp(`^rgba\\(${Zt},${Zt},${Zt},${kn}\\)$`), Bc = new RegExp(`^rgba\\(${rt},${rt},${rt},${kn}\\)$`), Hc = new RegExp(`^hsl\\(${kn},${rt},${rt}\\)$`), Uc = new RegExp(`^hsla\\(${kn},${rt},${rt},${kn}\\)$`), Yi = { 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 }; li(Dn, Ot, { copy(t) { return Object.assign(new this.constructor(), this, t); }, displayable() { return this.rgb().displayable(); }, hex: Vi, // Deprecated! Use color.formatHex. formatHex: Vi, formatHex8: Gc, formatHsl: Yc, formatRgb: Ki, toString: Ki }); function Vi() { return this.rgb().formatHex(); } function Gc() { return this.rgb().formatHex8(); } function Yc() { return Vo(this).formatHsl(); } function Ki() { return this.rgb().formatRgb(); } function Ot(t) { var n, e; return t = (t + "").trim().toLowerCase(), (n = Lc.exec(t)) ? (e = n[1].length, n = parseInt(n[1], 16), e === 6 ? Zi(n) : e === 3 ? new F(n >> 8 & 15 | n >> 4 & 240, n >> 4 & 15 | n & 240, (n & 15) << 4 | n & 15, 1) : e === 8 ? Yn(n >> 24 & 255, n >> 16 & 255, n >> 8 & 255, (n & 255) / 255) : e === 4 ? Yn(n >> 12 & 15 | n >> 8 & 240, n >> 8 & 15 | n >> 4 & 240, n >> 4 & 15 | n & 240, ((n & 15) << 4 | n & 15) / 255) : null) : (n = Dc.exec(t)) ? new F(n[1], n[2], n[3], 1) : (n = qc.exec(t)) ? new F(n[1] * 255 / 100, n[2] * 255 / 100, n[3] * 255 / 100, 1) : (n = Xc.exec(t)) ? Yn(n[1], n[2], n[3], n[4]) : (n = Bc.exec(t)) ? Yn(n[1] * 255 / 100, n[2] * 255 / 100, n[3] * 255 / 100, n[4]) : (n = Hc.exec(t)) ? Qi(n[1], n[2] / 100, n[3] / 100, 1) : (n = Uc.exec(t)) ? Qi(n[1], n[2] / 100, n[3] / 100, n[4]) : Yi.hasOwnProperty(t) ? Zi(Yi[t]) : t === "transparent" ? new F(NaN, NaN, NaN, 0) : null; } function Zi(t) { return new F(t >> 16 & 255, t >> 8 & 255, t & 255, 1); } function Yn(t, n, e, r) { return r <= 0 && (t = n = e = NaN), new F(t, n, e, r); } function Vc(t) { return t instanceof Dn || (t = Ot(t)), t ? (t = t.rgb(), new F(t.r, t.g, t.b, t.opacity)) : new F(); } function Nr(t, n, e, r) { return arguments.length === 1 ? Vc(t) : new F(t, n, e, r ?? 1); } function F(t, n, e, r) { this.r = +t, this.g = +n, this.b = +e, this.opacity = +r; } li(F, Nr, Yo(Dn, { brighter(t) { return t = t == null ? me : Math.pow(me, t), new F(this.r * t, this.g * t, this.b * t, this.opacity); }, darker(t) { return t = t == null ? Nn : Math.pow(Nn, t), new F(this.r * t, this.g * t, this.b * t, this.opacity); }, rgb() { return this; }, clamp() { return new F(Pt(this.r), Pt(this.g), Pt(this.b), we(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: Wi, // Deprecated! Use color.formatHex. formatHex: Wi, formatHex8: Kc, formatRgb: Ji, toString: Ji })); function Wi() { return `#${kt(this.r)}${kt(this.g)}${kt(this.b)}`; } function Kc() { return `#${kt(this.r)}${kt(this.g)}${kt(this.b)}${kt((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`; } function Ji() { const t = we(this.opacity); return `${t === 1 ? "rgb(" : "rgba("}${Pt(this.r)}, ${Pt(this.g)}, ${Pt(this.b)}${t === 1 ? ")" : `, ${t})`}`; } function we(t) { return isNaN(t) ? 1 : Math.max(0, Math.min(1, t)); } function Pt(t) { return Math.max(0, Math.min(255, Math.round(t) || 0)); } function kt(t) { return t = Pt(t), (t < 16 ? "0" : "") + t.toString(16); } function Qi(t, n, e, r) { return r <= 0 ? t = n = e = NaN : e <= 0 || e >= 1 ? t = n = NaN : n <= 0 && (t = NaN), new Z(t, n, e, r); } function Vo(t) { if (t instanceof Z) return new Z(t.h, t.s, t.l, t.opacity); if (t instanceof Dn || (t = Ot(t)), !t) return new Z(); if (t instanceof Z) return t; t = t.rgb(); var n = t.r / 255, e = t.g / 255, r = t.b / 255, i = Math.min(n, e, r), a = Math.max(n, e, r), o = NaN, s = a - i, l = (a + i) / 2; return s ? (n === a ? o = (e - r) / s + (e < r) * 6 : e === a ? o = (r - n) / s + 2 : o = (n - e) / s + 4, s /= l < 0.5 ? a + i : 2 - a - i, o *= 60) : s = l > 0 && l < 1 ? 0 : o, new Z(o, s, l, t.opacity); } function Zc(t, n, e, r) { return arguments.length === 1 ? Vo(t) : new Z(t, n, e, r ?? 1); } function Z(t, n, e, r) { this.h = +t, this.s = +n, this.l = +e, this.opacity = +r; } li(Z, Zc, Yo(Dn, { brighter(t) { return t = t == null ? me : Math.pow(me, t), new Z(this.h, this.s, this.l * t, this.opacity); }, darker(t) { return t = t == null ? Nn : Math.pow(Nn, t), new Z(this.h, this.s, this.l * t, this.opacity); }, rgb() { var t = this.h % 360 + (this.h < 0) * 360, n = isNaN(t) || isNaN(this.s) ? 0 : this.s, e = this.l, r = e + (e < 0.5 ? e : 1 - e) * n, i = 2 * e - r; return new F( cr(t >= 240 ? t - 240 : t + 120, i, r), cr(t, i, r), cr(t < 120 ? t + 240 : t - 120, i, r), this.opacity ); }, clamp() { return new Z(ta(this.h), Vn(this.s), Vn(this.l), we(this.opacity)); }, displayable() { return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1; }, formatHsl() { const t = we(this.opacity); return `${t === 1 ? "hsl(" : "hsla("}${ta(this.h)}, ${Vn(this.s) * 100}%, ${Vn(this.l) * 100}%${t === 1 ? ")" : `, ${t})`}`; } })); function ta(t) { return t = (t || 0) % 360, t < 0 ? t + 360 : t; } function Vn(t) { return Math.max(0, Math.min(1, t || 0)); } function cr(t, n, e) { return (t < 60 ? n + (e - n) * t / 60 : t < 180 ? e : t < 240 ? n + (e - n) * (240 - t) / 60 : n) * 255; } const ci = (t) => () => t; function Wc(t, n) { return function(e) { return t + e * n; }; } function Jc(t, n, e) { return t = Math.pow(t, e), n = Math.pow(n, e) - t, e = 1 / e, function(r) { return Math.pow(t + r * n, e); }; } function Qc(t) { return (t = +t) == 1 ? Ko : function(n, e) { return e - n ? Jc(n, e, t) : ci(isNaN(n) ? e : n); }; } function Ko(t, n) { var e = n - t; return e ? Wc(t, e) : ci(isNaN(t) ? n : t); } const be = function t(n) { var e = Qc(n); function r(i, a) { var o = e((i = Nr(i)).r, (a = Nr(a)).r), s = e(i.g, a.g), l = e(i.b, a.b), u = Ko(i.opacity, a.opacity); return function(c) { return i.r = o(c), i.g = s(c), i.b = l(c), i.opacity = u(c), i + ""; }; } return r.gamma = t, r; }(1); function tf(t, n) { n || (n = []); var e = t ? Math.min(n.length, t.length) : 0, r = n.slice(), i; return function(a) { for (i = 0; i < e; ++i) r[i] = t[i] * (1 - a) + n[i] * a; return r; }; } function nf(t) { return ArrayBuffer.isView(t) && !(t instanceof DataView); } function ef(t, n) { var e = n ? n.length : 0, r = t ? Math.min(e, t.length) : 0, i = new Array(r), a = new Array(e), o; for (o = 0; o < r; ++o) i[o] = fi(t[o], n[o]); for (; o < e; ++o) a[o] = n[o]; return function(s) { for (o = 0; o < r; ++o) a[o] = i[o](s); return a; }; } function rf(t, n) { var e = /* @__PURE__ */ new Date(); return t = +t, n = +n, function(r) { return e.setTime(t * (1 - r) + n * r), e; }; } function V(t, n) { return t = +t, n = +n, function(e) { return t * (1 - e) + n * e; }; } function af(t, n) { var e = {}, r = {}, i; (t === null || typeof t != "object") && (t = {}), (n === null || typeof n != "object") && (n = {}); for (i in n) i in t ? e[i] = fi(t[i], n[i]) : r[i] = n[i]; return function(a) { for (i in e) r[i] = e[i](a); return r; }; } var kr = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, fr = new RegExp(kr.source, "g"); function of(t) { return function() { return t; }; } function sf(t) { return function(n) { return t(n) + ""; }; } function Zo(t, n) { var e = kr.lastIndex = fr.lastIndex = 0, r, i, a, o = -1, s = [], l = []; for (t = t + "", n = n + ""; (r = kr.exec(t)) && (i = fr.exec(n)); ) (a = i.index) > e && (a = n.slice(e, a), s[o] ? s[o] += a : s[++o] = a), (r = r[0]) === (i = i[0]) ? s[o] ? s[o] += i : s[++o] = i : (s[++o] = null, l.push({ i: o, x: V(r, i) })), e = fr.lastIndex; return e < n.length && (a = n.slice(e), s[o] ? s[o] += a : s[++o] = a), s.length < 2 ? l[0] ? sf(l[0].x) : of(n) : (n = l.length, function(u) { for (var c = 0, f; c < n; ++c) s[(f = l[c]).i] = f.x(u); return s.join(""); }); } function fi(t, n) { var e = typeof n, r; return n == null || e === "boolean" ? ci(n) : (e === "number" ? V : e === "string" ? (r = Ot(n)) ? (n = r, be) : Zo : n instanceof Ot ? be : n instanceof Date ? rf : nf(n) ? tf : Array.isArray(n) ? ef : typeof n.valueOf != "function" && typeof n.toString != "function" || isNaN(n) ? af : V)(t, n); } function uf(t, n) { return t = +t, n = +n, function(e) { return Math.round(t * (1 - e) + n * e); }; } var na = 180 / Math.PI, Sr = { translateX: 0, translateY: 0, rotate: 0, skewX: 0, scaleX: 1, scaleY: 1 }; function Wo(t, n, e, r, i, a) { var o, s, l; return (o = Math.sqrt(t * t + n * n)) && (t /= o, n /= o), (l = t * e + n * r) && (e -= t * l, r -= n * l), (s = Math.sqrt(e * e + r * r)) && (e /= s, r /= s, l /= s), t * r < n * e && (t = -t, n = -n, l = -l, o = -o), { translateX: i, translateY: a, rotate: Math.atan2(n, t) * na, skewX: Math.atan(l) * na, scaleX: o, scaleY: s }; } var Kn; function lf(t) { const n = new (typeof DOMMatrix == "function" ? DOMMatrix : WebKitCSSMatrix)(t + ""); return n.isIdentity ? Sr : Wo(n.a, n.b, n.c, n.d, n.e, n.f); } function cf(t) { return t == null || (Kn || (Kn = document.createElementNS("http://www.w3.org/2000/svg", "g")), Kn.setAttribute("transform", t), !(t = Kn.transform.baseVal.consolidate())) ? Sr : (t = t.matrix, Wo(t.a, t.b, t.c, t.d, t.e, t.f)); } function Jo(t, n, e, r) { function i(u) { return u.length ? u.pop() + " " : ""; } function a(u, c, f, h, p, g) { if (u !== f || c !== h) { var y = p.push("translate(", null, n, null, e); g.push({ i: y - 4, x: V(u, f) }, { i: y - 2, x: V(c, h) }); } else (f || h) && p.push("translate(" + f + n + h + e); } function o(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: V(u, c) })) : c && f.push(i(f) + "rotate(" + c + r); } function s(u, c, f, h) { u !== c ? h.push({ i: f.push(i(f) + "skewX(", null, r) - 2, x: V(u, c) }) : c && f.push(i(f) + "skewX(" + c + r); } function l(u, c, f, h, p, g) { if (u !== f || c !== h) { var y = p.push(i(p) + "scale(", null, ",", null, ")"); g.push({ i: y - 4, x: V(u, f) }, { i: y - 2, x: V(c, h) }); } else (f !== 1 || h !== 1) && p.push(i(p) + "scale(" + f + "," + h + ")"); } return function(u, c) { var f = [], h = []; return u = t(u), c = t(c), a(u.translateX, u.translateY, c.translateX, c.translateY, f, h), o(u.rotate, c.rotate, f, h), s(u.skewX, c.skewX, f, h), l(u.scaleX, u.scaleY, c.scaleX, c.scaleY, f, h), u = c = null, function(p) { for (var g = -1, y = h.length, w; ++g < y; ) f[(w = h[g]).i] = w.x(p); return f.join(""); }; }; } var ff = Jo(lf, "px, ", "px)", "deg)"), hf = Jo(cf, ", ", ")", ")"), en = 0, mn = 0, gn = 0, Qo = 1e3, xe, wn, Me = 0, zt = 0, qe = 0, Sn = typeof performance == "object" && performance.now ? performance : Date, ts = typeof window == "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(t) { setTimeout(t, 17); }; function Xe() { return zt || (ts(pf), zt = Sn.now() + qe); } function pf() { zt = 0; } function Pn() { this._call = this._time = this._next = null; } Pn.prototype = ns.prototype = { constructor: Pn, restart: function(t, n, e) { if (typeof t != "function") throw new TypeError("callback is not a function"); e = (e == null ? Xe() : +e) + (n == null ? 0 : +n), !this._next && wn !== this && (wn ? wn._next = this : xe = this, wn = this), this._call = t, this._time = e, Pr(); }, stop: function() { this._call && (this._call = null, this._time = 1 / 0, Pr()); } }; function ns(t, n, e) { var r = new Pn(); return r.restart(t, n, e), r; } function df() { Xe(), ++en; for (var t = xe, n; t; ) (n = zt - t._time) >= 0 && t._call.call(void 0, n), t = t._next; --en; } function ea() { zt = (Me = Sn.now()) + qe, en = mn = 0; try { df(); } finally { en = 0, _f(), zt = 0; } } function gf() { var t = Sn.now(), n = t - Me; n > Qo && (qe -= n, Me = t); } function _f() { for (var t, n = xe, e, r = 1 / 0; n; ) n._call ? (r > n._time && (r = n._time), t = n, n = n._next) : (e = n._next, n._next = null, n = t ? t._next = e : xe = e); wn = t, Pr(r); } function Pr(t) { if (!en) { mn && (mn = clearTimeout(mn)); var n = t - zt; n > 24 ? (t < 1 / 0 && (mn = setTimeout(ea, t - Sn.now() - qe)), gn && (gn = clearInterval(gn))) : (gn || (Me = Sn.now(), gn = setInterval(gf, Qo)), en = 1, ts(ea)); } } function ra(t, n, e) { var r = new Pn(); return n = n == null ? 0 : +n, r.restart((i) => { r.stop(), t(i + n); }, n, e), r; } function yf(t, n, e) { var r = new Pn(), i = n; return r._restart = r.restart, r.restart = function(a, o, s) { o = +o, s = s == null ? Xe() : +s, r._restart(function l(u) { u += i, r._restart(l, i += o, s), a(u); }, o, s); }, r.restart(t, n, e), r; } var vf = Io("start", "end", "cancel", "interrupt"), mf = [], es = 0, ia = 1, Er = 2, ue = 3, aa = 4, Or = 5, le = 6; function Be(t, n, e, r, i, a) { var o = t.__transition; if (!o) t.__transition = {}; else if (e in o) return; wf(t, e, { name: n, index: r, // For context during callback. group: i, // For context during callback. on: vf, tween: mf, time: a.time, delay: a.delay, duration: a.duration, ease: a.ease, timer: null, state: es }); } function hi(t, n) { var e = tt(t, n); if (e.state > es) throw new Error("too late; already scheduled"); return e; } function ot(t, n) { var e = tt(t, n); if (e.state > ue) throw new Error("too late; already running"); return e; } function tt(t, n) { var e = t.__transition; if (!e || !(e = e[n])) throw new Error("transition not found"); return e; } function wf(t, n, e) { var r = t.__transition, i; r[n] = e, e.timer = ns(a, 0, e.time); function a(u) { e.state = ia, e.timer.restart(o, e.delay, e.time), e.delay <= u && o(u - e.delay); } function o(u) { var c, f, h, p; if (e.state !== ia) return l(); for (c in r) if (p = r[c], p.name === e.name) { if (p.state === ue) return ra(o); p.state === aa ? (p.state = le, p.timer.stop(), p.on.call("interrupt", t, t.__data__, p.index, p.group), delete r[c]) : +c < n && (p.state = le, p.timer.stop(), p.on.call("cancel", t, t.__data__, p.index, p.group), delete r[c]); } if (ra(function() { e.state === ue && (e.state = aa, e.timer.restart(s, e.delay, e.time), s(u)); }), e.state = Er, e.on.call("start", t, t.__data__, e.index, e.group), e.state === Er) { for (e.state = ue, i = new Array(h = e.tween.length), c = 0, f = -1; c < h; ++c) (p = e.tween[c].value.call(t, t.__data__, e.index, e.group)) && (i[++f] = p); i.length = f + 1; } } function s(u) { for (var c = u < e.duration ? e.ease.call(null, u / e.duration) : (e.timer.restart(l), e.state = Or, 1), f = -1, h = i.length; ++f < h; ) i[f].call(t, c); e.state === Or && (e.on.call("end", t, t.__data__, e.index, e.group), l()); } function l() { e.state = le, e.timer.stop(), delete r[n]; for (var u in r) return; delete t.__transition; } } function bf(t, n) { var e = t.__transition, r, i, a = !0, o; if (e) { n = n == null ? null : n + ""; for (o in e) { if ((r = e[o]).name !== n) { a = !1; continue; } i = r.state > Er && r.state < Or, r.state = le, r.timer.stop(), r.on.call(i ? "interrupt" : "cancel", t, t.__data__, r.index, r.group), delete e[o]; } a && delete t.__transition; } } function xf(t) { return this.each(function() { bf(this, t); }); } function Mf(t, n) { var e, r; return function() { var i = ot(this, t), a = i.tween; if (a !== e) { r = e = a; for (var o = 0, s = r.length; o < s; ++o) if (r[o].name === n) { r = r.slice(), r.splice(o, 1); break; } } i.tween = r; }; } function $f(t, n, e) { var r, i; if (typeof e != "function") throw new Error(); return function() { var a = ot(this, t), o = a.tween; if (o !== r) { i = (r = o).slice(); for (var s = { name: n, value: e }, l = 0, u = i.length; l < u; ++l) if (i[l].name === n) { i[l] = s; break; } l === u && i.push(s); } a.tween = i; }; } function Af(t, n) { var e = this._id; if (t += "", arguments.length < 2) { for (var r = tt(this.node(), e).tween, i = 0, a = r.length, o; i < a; ++i) if ((o = r[i]).name === t) return o.value; return null; } return this.each((n == null ? Mf : $f)(e, t, n)); } function pi(t, n, e) { var r = t._id; return t.each(function() { var i = ot(this, r); (i.value || (i.value = {}))[n] = e.apply(this, arguments); }), function(i) { return tt(i, r).value[n]; }; } function rs(t, n) { var e; return (typeof n == "number" ? V : n instanceof Ot ? be : (e = Ot(n)) ? (n = e, be) : Zo)(t, n); } function Tf(t) { return function() { this.removeAttribute(t); }; } function Nf(t) { return function() { this.removeAttributeNS(t.space, t.local); }; } function kf(t, n, e) { var r, i = e + "", a; return function() { var o = this.getAttribute(t); return o === i ? null : o === r ? a : a = n(r = o, e); }; } function Sf(t, n, e) { var r, i = e + "", a; return function() { var o = this.getAttributeNS(t.space, t.local); return o === i ? null : o === r ? a : a = n(r = o, e); }; } function Pf(t, n, e) { var r, i, a; return function() { var o, s = e(this), l; return s == null ? void this.removeAttribute(t) : (o = this.getAttribute(t), l = s + "", o === l ? null : o === r && l === i ? a : (i = l, a = n(r = o, s))); }; } function Ef(t, n, e) { var r, i, a; return function() { var o, s = e(this), l; return s == null ? void this.removeAttributeNS(t.space, t.local) : (o = this.getAttributeNS(t.space, t.local), l = s + "", o === l ? null : o === r && l === i ? a : (i = l, a = n(r = o, s))); }; } function Of(t, n) { var e = De(t), r = e === "transform" ? hf : rs; return this.attrTween(t, typeof n == "function" ? (e.local ? Ef : Pf)(e, r, pi(this, "attr." + t, n)) : n == null ? (e.local ? Nf : Tf)(e) : (e.local ? Sf : kf)(e, r, n)); } function zf(t, n) { return function(e) { this.setAttribute(t, n.call(this, e)); }; } function If(t, n) { return function(e) { this.setAttributeNS(t.space, t.local, n.call(this, e)); }; } function Cf(t, n) { var e, r; function i() { var a = n.apply(this, arguments); return a !== r && (e = (r = a) && If(t, a)), e; } return i._value = n, i; } function Rf(t, n) { var e, r; function i() { var a = n.apply(this, arguments); return a !== r && (e = (r = a) && zf(t, a)), e; } return i._value = n, i; } function jf(t, n) { var e = "attr." + t; if (arguments.length < 2) return (e = this.tween(e)) && e._value; if (n == null) return this.tween(e, null); if (typeof n != "function") throw new Error(); var r = De(t); return this.tween(e, (r.local ? Cf : Rf)(r, n)); } function Ff(t, n) { return function() { hi(this, t).delay = +n.apply(this, arguments); }; } function Lf(t, n) { return n = +n, function() { hi(this, t).delay = n; }; } function Df(t) { var n = this._id; return arguments.length ? this.each((typeof t == "function" ? Ff : Lf)(n, t)) : tt(this.node(), n).delay; } function qf(t, n) { return function() { ot(this, t).duration =