UNPKG

@rws-framework/client

Version:

This package provides the core client-side framework for Realtime Web Suit (RWS), enabling modular, asynchronous web components, state management, and integration with backend services. It is located in `.dev/client`.

2 lines 277 kB
// https://d3js.org v7.4.4 Copyright 2010-2022 Mike Bostock !function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).d3=t.d3||{})}(this,(function(t){"use strict";function n(t,n){return null==t||null==n?NaN:t<n?-1:t>n?1:t>=n?0:NaN}function e(t,n){return null==t||null==n?NaN:n<t?-1:n>t?1:n>=t?0:NaN}function r(t){let r,o,a;function u(t,n,e=0,i=t.length){if(e<i){if(0!==r(n,n))return i;do{const r=e+i>>>1;o(t[r],n)<0?e=r+1:i=r}while(e<i)}return e}return 2!==t.length?(r=n,o=(e,r)=>n(t(e),r),a=(n,e)=>t(n)-e):(r=t===n||t===e?t:i,o=t,a=t),{left:u,center:function(t,n,e=0,r=t.length){const i=u(t,n,e,r-1);return i>e&&a(t[i-1],n)>-a(t[i],n)?i-1:i},right:function(t,n,e=0,i=t.length){if(e<i){if(0!==r(n,n))return i;do{const r=e+i>>>1;o(t[r],n)<=0?e=r+1:i=r}while(e<i)}return e}}}function i(){return 0}function o(t){return null===t?NaN:+t}const a=r(n),u=a.right,c=a.left,f=r(o).center;var s=u;function l(t,n){let e=0;if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&++e;else{let r=-1;for(let i of t)null!=(i=n(i,++r,t))&&(i=+i)>=i&&++e}return e}function h(t){return 0|t.length}function d(t){return!(t>0)}function p(t){return"object"!=typeof t||"length"in t?t:Array.from(t)}function g(t,n){let e,r=0,i=0,o=0;if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&(e=n-i,i+=e/++r,o+=e*(n-i));else{let a=-1;for(let u of t)null!=(u=n(u,++a,t))&&(u=+u)>=u&&(e=u-i,i+=e/++r,o+=e*(u-i))}if(r>1)return o/(r-1)}function y(t,n){const e=g(t,n);return e?Math.sqrt(e):e}function v(t,n){let e,r;if(void 0===n)for(const n of t)null!=n&&(void 0===e?n>=n&&(e=r=n):(e>n&&(e=n),r<n&&(r=n)));else{let i=-1;for(let o of t)null!=(o=n(o,++i,t))&&(void 0===e?o>=o&&(e=r=o):(e>o&&(e=o),r<o&&(r=o)))}return[e,r]}class _{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){const n=this._partials;let e=0;for(let r=0;r<this._n&&r<32;r++){const i=n[r],o=t+i,a=Math.abs(t)<Math.abs(i)?t-(o-i):i-(o-t);a&&(n[e++]=a),t=o}return n[e]=t,this._n=e+1,this}valueOf(){const t=this._partials;let n,e,r,i=this._n,o=0;if(i>0){for(o=t[--i];i>0&&(n=o,e=t[--i],o=n+e,r=e-(o-n),!r););i>0&&(r<0&&t[i-1]<0||r>0&&t[i-1]>0)&&(e=2*r,n=o+e,e==n-o&&(o=n))}return o}}class InternMap extends Map{constructor(t,n=w){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),null!=t)for(const[n,e]of t)this.set(n,e)}get(t){return super.get(b(this,t))}has(t){return super.has(b(this,t))}set(t,n){return super.set(m(this,t),n)}delete(t){return super.delete(x(this,t))}}class InternSet extends Set{constructor(t,n=w){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),null!=t)for(const n of t)this.add(n)}has(t){return super.has(b(this,t))}add(t){return super.add(m(this,t))}delete(t){return super.delete(x(this,t))}}function b({_intern:t,_key:n},e){const r=n(e);return t.has(r)?t.get(r):e}function m({_intern:t,_key:n},e){const r=n(e);return t.has(r)?t.get(r):(t.set(r,e),e)}function x({_intern:t,_key:n},e){const r=n(e);return t.has(r)&&(e=t.get(r),t.delete(r)),e}function w(t){return null!==t&&"object"==typeof t?t.valueOf():t}function M(t){return t}function A(t,...n){return C(t,M,M,n)}function T(t,...n){return C(t,Array.from,M,n)}function S(t,n){for(let e=1,r=n.length;e<r;++e)t=t.flatMap((t=>t.pop().map((([n,e])=>[...t,n,e]))));return t}function E(t,n,...e){return C(t,M,n,e)}function k(t,n,...e){return C(t,Array.from,n,e)}function N(t){if(1!==t.length)throw new Error("duplicate key");return t[0]}function C(t,n,e,r){return function t(i,o){if(o>=r.length)return e(i);const a=new InternMap,u=r[o++];let c=-1;for(const t of i){const n=u(t,++c,i),e=a.get(n);e?e.push(t):a.set(n,[t])}for(const[n,e]of a)a.set(n,t(e,o));return n(a)}(t,0)}function P(t,n){return Array.from(n,(n=>t[n]))}function z(t,...n){if("function"!=typeof t[Symbol.iterator])throw new TypeError("values is not iterable");t=Array.from(t);let[e]=n;if(e&&2!==e.length||n.length>1){const r=Uint32Array.from(t,((t,n)=>n));return n.length>1?(n=n.map((n=>t.map(n))),r.sort(((t,e)=>{for(const r of n){const n=R(r[t],r[e]);if(n)return n}}))):(e=t.map(e),r.sort(((t,n)=>R(e[t],e[n])))),P(t,r)}return t.sort(D(e))}function D(t=n){if(t===n)return R;if("function"!=typeof t)throw new TypeError("compare is not a function");return(n,e)=>{const r=t(n,e);return r||0===r?r:(0===t(e,e))-(0===t(n,n))}}function R(t,n){return(null==t||!(t>=t))-(null==n||!(n>=n))||(t<n?-1:t>n?1:0)}var F=Array.prototype.slice;function q(t){return()=>t}var O=Math.sqrt(50),U=Math.sqrt(10),I=Math.sqrt(2);function B(t,n,e){var r,i,o,a,u=-1;if(e=+e,(t=+t)===(n=+n)&&e>0)return[t];if((r=n<t)&&(i=t,t=n,n=i),0===(a=Y(t,n,e))||!isFinite(a))return[];if(a>0){let e=Math.round(t/a),r=Math.round(n/a);for(e*a<t&&++e,r*a>n&&--r,o=new Array(i=r-e+1);++u<i;)o[u]=(e+u)*a}else{a=-a;let e=Math.round(t*a),r=Math.round(n*a);for(e/a<t&&++e,r/a>n&&--r,o=new Array(i=r-e+1);++u<i;)o[u]=(e+u)/a}return r&&o.reverse(),o}function Y(t,n,e){var r=(n-t)/Math.max(0,e),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=O?10:o>=U?5:o>=I?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=O?10:o>=U?5:o>=I?2:1)}function L(t,n,e){var r=Math.abs(n-t)/Math.max(0,e),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=O?i*=10:o>=U?i*=5:o>=I&&(i*=2),n<t?-i:i}function j(t,n,e){let r;for(;;){const i=Y(t,n,e);if(i===r||0===i||!isFinite(i))return[t,n];i>0?(t=Math.floor(t/i)*i,n=Math.ceil(n/i)*i):i<0&&(t=Math.ceil(t*i)/i,n=Math.floor(n*i)/i),r=i}}function $(t){return Math.ceil(Math.log(l(t))/Math.LN2)+1}function H(){var t=M,n=v,e=$;function r(r){Array.isArray(r)||(r=Array.from(r));var i,o,a,u=r.length,c=new Array(u);for(i=0;i<u;++i)c[i]=t(r[i],i,r);var f=n(c),l=f[0],h=f[1],d=e(c,l,h);if(!Array.isArray(d)){const t=h,e=+d;if(n===v&&([l,h]=j(l,h,e)),(d=B(l,h,e))[0]<=l&&(a=Y(l,h,e)),d[d.length-1]>=h)if(t>=h&&n===v){const t=Y(l,h,e);isFinite(t)&&(t>0?h=(Math.floor(h/t)+1)*t:t<0&&(h=(Math.ceil(h*-t)+1)/-t))}else d.pop()}for(var p=d.length;d[0]<=l;)d.shift(),--p;for(;d[p-1]>h;)d.pop(),--p;var g,y=new Array(p+1);for(i=0;i<=p;++i)(g=y[i]=[]).x0=i>0?d[i-1]:l,g.x1=i<p?d[i]:h;if(isFinite(a)){if(a>0)for(i=0;i<u;++i)null!=(o=c[i])&&l<=o&&o<=h&&y[Math.min(p,Math.floor((o-l)/a))].push(r[i]);else if(a<0)for(i=0;i<u;++i)if(null!=(o=c[i])&&l<=o&&o<=h){const t=Math.floor((l-o)*a);y[Math.min(p,t+(d[t]<=o))].push(r[i])}}else for(i=0;i<u;++i)null!=(o=c[i])&&l<=o&&o<=h&&y[s(d,o,0,p)].push(r[i]);return y}return r.value=function(n){return arguments.length?(t="function"==typeof n?n:q(n),r):t},r.domain=function(t){return arguments.length?(n="function"==typeof t?t:q([t[0],t[1]]),r):n},r.thresholds=function(t){return arguments.length?(e="function"==typeof t?t:Array.isArray(t)?q(F.call(t)):q(t),r):e},r}function X(t,n){let e;if(void 0===n)for(const n of t)null!=n&&(e<n||void 0===e&&n>=n)&&(e=n);else{let r=-1;for(let i of t)null!=(i=n(i,++r,t))&&(e<i||void 0===e&&i>=i)&&(e=i)}return e}function G(t,n){let e;if(void 0===n)for(const n of t)null!=n&&(e>n||void 0===e&&n>=n)&&(e=n);else{let r=-1;for(let i of t)null!=(i=n(i,++r,t))&&(e>i||void 0===e&&i>=i)&&(e=i)}return e}function V(t,n,e=0,r=t.length-1,i){for(i=void 0===i?R:D(i);r>e;){if(r-e>600){const o=r-e+1,a=n-e+1,u=Math.log(o),c=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*c*(o-c)/o)*(a-o/2<0?-1:1);V(t,n,Math.max(e,Math.floor(n-a*c/o+f)),Math.min(r,Math.floor(n+(o-a)*c/o+f)),i)}const o=t[n];let a=e,u=r;for(W(t,e,n),i(t[r],o)>0&&W(t,e,r);a<u;){for(W(t,a,u),++a,--u;i(t[a],o)<0;)++a;for(;i(t[u],o)>0;)--u}0===i(t[e],o)?W(t,e,u):(++u,W(t,u,r)),u<=n&&(e=u+1),n<=u&&(r=u-1)}return t}function W(t,n,e){const r=t[n];t[n]=t[e],t[e]=r}function Z(t,n,e){if(t=Float64Array.from(function*(t,n){if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&(yield n);else{let e=-1;for(let r of t)null!=(r=n(r,++e,t))&&(r=+r)>=r&&(yield r)}}(t,e)),r=t.length){if((n=+n)<=0||r<2)return G(t);if(n>=1)return X(t);var r,i=(r-1)*n,o=Math.floor(i),a=X(V(t,o).subarray(0,o+1));return a+(G(t.subarray(o+1))-a)*(i-o)}}function K(t,n,e=o){if(r=t.length){if((n=+n)<=0||r<2)return+e(t[0],0,t);if(n>=1)return+e(t[r-1],r-1,t);var r,i=(r-1)*n,a=Math.floor(i),u=+e(t[a],a,t);return u+(+e(t[a+1],a+1,t)-u)*(i-a)}}function Q(t,n){let e,r=-1,i=-1;if(void 0===n)for(const n of t)++i,null!=n&&(e<n||void 0===e&&n>=n)&&(e=n,r=i);else for(let o of t)null!=(o=n(o,++i,t))&&(e<o||void 0===e&&o>=o)&&(e=o,r=i);return r}function J(t){return Array.from(function*(t){for(const n of t)yield*n}(t))}function tt(t,n){let e,r=-1,i=-1;if(void 0===n)for(const n of t)++i,null!=n&&(e>n||void 0===e&&n>=n)&&(e=n,r=i);else for(let o of t)null!=(o=n(o,++i,t))&&(e>o||void 0===e&&o>=o)&&(e=o,r=i);return r}function nt(t,n){return[t,n]}function et(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=0|Math.max(0,Math.ceil((n-t)/e)),o=new Array(i);++r<i;)o[r]=t+r*e;return o}function rt(t,e=n){if(1===e.length)return tt(t,e);let r,i=-1,o=-1;for(const n of t)++o,(i<0?0===e(n,n):e(n,r)<0)&&(r=n,i=o);return i}var it=ot(Math.random);function ot(t){return function(n,e=0,r=n.length){let i=r-(e=+e);for(;i;){const r=t()*i--|0,o=n[i+e];n[i+e]=n[r+e],n[r+e]=o}return n}}function at(t){if(!(i=t.length))return[];for(var n=-1,e=G(t,ut),r=new Array(e);++n<e;)for(var i,o=-1,a=r[n]=new Array(i);++o<i;)a[o]=t[o][n];return r}function ut(t){return t.length}function ct(t){return t instanceof InternSet?t:new InternSet(t)}function ft(t,n){const e=t[Symbol.iterator](),r=new Set;for(const t of n){const n=st(t);if(r.has(n))continue;let i,o;for(;({value:i,done:o}=e.next());){if(o)return!1;const t=st(i);if(r.add(t),Object.is(n,t))break}}return!0}function st(t){return null!==t&&"object"==typeof t?t.valueOf():t}function lt(t){return t}var ht=1e-6;function dt(t){return"translate("+t+",0)"}function pt(t){return"translate(0,"+t+")"}function gt(t){return n=>+t(n)}function yt(t,n){return n=Math.max(0,t.bandwidth()-2*n)/2,t.round()&&(n=Math.round(n)),e=>+t(e)+n}function vt(){return!this.__axis}function _t(t,n){var e=[],r=null,i=null,o=6,a=6,u=3,c="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,f=1===t||4===t?-1:1,s=4===t||2===t?"x":"y",l=1===t||3===t?dt:pt;function h(h){var d=null==r?n.ticks?n.ticks.apply(n,e):n.domain():r,p=null==i?n.tickFormat?n.tickFormat.apply(n,e):lt:i,g=Math.max(o,0)+u,y=n.range(),v=+y[0]+c,_=+y[y.length-1]+c,b=(n.bandwidth?yt:gt)(n.copy(),c),m=h.selection?h.selection():h,x=m.selectAll(".domain").data([null]),w=m.selectAll(".tick").data(d,n).order(),M=w.exit(),A=w.enter().append("g").attr("class","tick"),T=w.select("line"),S=w.select("text");x=x.merge(x.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),w=w.merge(A),T=T.merge(A.append("line").attr("stroke","currentColor").attr(s+"2",f*o)),S=S.merge(A.append("text").attr("fill","currentColor").attr(s,f*g).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),h!==m&&(x=x.transition(h),w=w.transition(h),T=T.transition(h),S=S.transition(h),M=M.transition(h).attr("opacity",ht).attr("transform",(function(t){return isFinite(t=b(t))?l(t+c):this.getAttribute("transform")})),A.attr("opacity",ht).attr("transform",(function(t){var n=this.parentNode.__axis;return l((n&&isFinite(n=n(t))?n:b(t))+c)}))),M.remove(),x.attr("d",4===t||2===t?a?"M"+f*a+","+v+"H"+c+"V"+_+"H"+f*a:"M"+c+","+v+"V"+_:a?"M"+v+","+f*a+"V"+c+"H"+_+"V"+f*a:"M"+v+","+c+"H"+_),w.attr("opacity",1).attr("transform",(function(t){return l(b(t)+c)})),T.attr(s+"2",f*o),S.attr(s,f*g).text(p),m.filter(vt).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),m.each((function(){this.__axis=b}))}return h.scale=function(t){return arguments.length?(n=t,h):n},h.ticks=function(){return e=Array.from(arguments),h},h.tickArguments=function(t){return arguments.length?(e=null==t?[]:Array.from(t),h):e.slice()},h.tickValues=function(t){return arguments.length?(r=null==t?null:Array.from(t),h):r&&r.slice()},h.tickFormat=function(t){return arguments.length?(i=t,h):i},h.tickSize=function(t){return arguments.length?(o=a=+t,h):o},h.tickSizeInner=function(t){return arguments.length?(o=+t,h):o},h.tickSizeOuter=function(t){return arguments.length?(a=+t,h):a},h.tickPadding=function(t){return arguments.length?(u=+t,h):u},h.offset=function(t){return arguments.length?(c=+t,h):c},h}var bt={value:()=>{}};function mt(){for(var t,n=0,e=arguments.length,r={};n<e;++n){if(!(t=arguments[n]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new xt(r)}function xt(t){this._=t}function wt(t,n){return t.trim().split(/^|\s+/).map((function(t){var e="",r=t.indexOf(".");if(r>=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))}function Mt(t,n){for(var e,r=0,i=t.length;r<i;++r)if((e=t[r]).name===n)return e.value}function At(t,n,e){for(var r=0,i=t.length;r<i;++r)if(t[r].name===n){t[r]=bt,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=e&&t.push({name:n,value:e}),t}xt.prototype=mt.prototype={constructor:xt,on:function(t,n){var e,r=this._,i=wt(t+"",r),o=-1,a=i.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++o<a;)if(e=(t=i[o]).type)r[e]=At(r[e],t.name,n);else if(null==n)for(e in r)r[e]=At(r[e],t.name,null);return this}for(;++o<a;)if((e=(t=i[o]).type)&&(e=Mt(r[e],t.name)))return e},copy:function(){var t={},n=this._;for(var e in n)t[e]=n[e].slice();return new xt(t)},call:function(t,n){if((e=arguments.length-2)>0)for(var e,r,i=new Array(e),o=0;o<e;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,e=(r=this._[t]).length;o<e;++o)r[o].value.apply(n,i)},apply:function(t,n,e){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(n,e)}};var Tt="http://www.w3.org/1999/xhtml",St={svg:"http://www.w3.org/2000/svg",xhtml:Tt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Et(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),St.hasOwnProperty(n)?{space:St[n],local:t}:t}function kt(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===Tt&&n.documentElement.namespaceURI===Tt?n.createElement(t):n.createElementNS(e,t)}}function Nt(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Ct(t){var n=Et(t);return(n.local?Nt:kt)(n)}function Pt(){}function zt(t){return null==t?Pt:function(){return this.querySelector(t)}}function Dt(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function Rt(){return[]}function Ft(t){return null==t?Rt:function(){return this.querySelectorAll(t)}}function qt(t){return function(){return this.matches(t)}}function Ot(t){return function(n){return n.matches(t)}}var Ut=Array.prototype.find;function It(){return this.firstElementChild}var Bt=Array.prototype.filter;function Yt(){return Array.from(this.children)}function Lt(t){return new Array(t.length)}function jt(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function $t(t){return function(){return t}}function Ht(t,n,e,r,i,o){for(var a,u=0,c=n.length,f=o.length;u<f;++u)(a=n[u])?(a.__data__=o[u],r[u]=a):e[u]=new jt(t,o[u]);for(;u<c;++u)(a=n[u])&&(i[u]=a)}function Xt(t,n,e,r,i,o,a){var u,c,f,s=new Map,l=n.length,h=o.length,d=new Array(l);for(u=0;u<l;++u)(c=n[u])&&(d[u]=f=a.call(c,c.__data__,u,n)+"",s.has(f)?i[u]=c:s.set(f,c));for(u=0;u<h;++u)f=a.call(t,o[u],u,o)+"",(c=s.get(f))?(r[u]=c,c.__data__=o[u],s.delete(f)):e[u]=new jt(t,o[u]);for(u=0;u<l;++u)(c=n[u])&&s.get(d[u])===c&&(i[u]=c)}function Gt(t){return t.__data__}function Vt(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function Wt(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function Zt(t){return function(){this.removeAttribute(t)}}function Kt(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Qt(t,n){return function(){this.setAttribute(t,n)}}function Jt(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function tn(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function nn(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function en(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function rn(t){return function(){this.style.removeProperty(t)}}function on(t,n,e){return function(){this.style.setProperty(t,n,e)}}function an(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function un(t,n){return t.style.getPropertyValue(n)||en(t).getComputedStyle(t,null).getPropertyValue(n)}function cn(t){return function(){delete this[t]}}function fn(t,n){return function(){this[t]=n}}function sn(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function ln(t){return t.trim().split(/^|\s+/)}function hn(t){return t.classList||new dn(t)}function dn(t){this._node=t,this._names=ln(t.getAttribute("class")||"")}function pn(t,n){for(var e=hn(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function gn(t,n){for(var e=hn(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function yn(t){return function(){pn(this,t)}}function vn(t){return function(){gn(this,t)}}function _n(t,n){return function(){(n.apply(this,arguments)?pn:gn)(this,t)}}function bn(){this.textContent=""}function mn(t){return function(){this.textContent=t}}function xn(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function wn(){this.innerHTML=""}function Mn(t){return function(){this.innerHTML=t}}function An(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function Tn(){this.nextSibling&&this.parentNode.appendChild(this)}function Sn(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function En(){return null}function kn(){var t=this.parentNode;t&&t.removeChild(this)}function Nn(){var t=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function Cn(){var t=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function Pn(t){return t.trim().split(/^|\s+/).map((function(t){var n="",e=t.indexOf(".");return e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}}))}function zn(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;r<o;++r)e=n[r],t.type&&e.type!==t.type||e.name!==t.name?n[++i]=e:this.removeEventListener(e.type,e.listener,e.options);++i?n.length=i:delete this.__on}}}function Dn(t,n,e){return function(){var r,i=this.__on,o=function(t){return function(n){t.call(this,n,this.__data__)}}(n);if(i)for(var a=0,u=i.length;a<u;++a)if((r=i[a]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=e),void(r.value=n);this.addEventListener(t.type,o,e),r={type:t.type,name:t.name,value:n,listener:o,options:e},i?i.push(r):this.__on=[r]}}function Rn(t,n,e){var r=en(t),i=r.CustomEvent;"function"==typeof i?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 Fn(t,n){return function(){return Rn(this,t,n)}}function qn(t,n){return function(){return Rn(this,t,n.apply(this,arguments))}}jt.prototype={constructor:jt,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)}},dn.prototype={add:function(t){this._names.indexOf(t)<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}};var On=[null];function Un(t,n){this._groups=t,this._parents=n}function In(){return new Un([[document.documentElement]],On)}function Bn(t){return"string"==typeof t?new Un([[document.querySelector(t)]],[document.documentElement]):new Un([[t]],On)}Un.prototype=In.prototype={constructor:Un,select:function(t){"function"!=typeof t&&(t=zt(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,a,u=n[i],c=u.length,f=r[i]=new Array(c),s=0;s<c;++s)(o=u[s])&&(a=t.call(o,o.__data__,s,u))&&("__data__"in o&&(a.__data__=o.__data__),f[s]=a);return new Un(r,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return Dt(t.apply(this,arguments))}}(t):Ft(t);for(var n=this._groups,e=n.length,r=[],i=[],o=0;o<e;++o)for(var a,u=n[o],c=u.length,f=0;f<c;++f)(a=u[f])&&(r.push(t.call(a,a.__data__,f,u)),i.push(a));return new Un(r,i)},selectChild:function(t){return this.select(null==t?It:function(t){return function(){return Ut.call(this.children,t)}}("function"==typeof t?t:Ot(t)))},selectChildren:function(t){return this.selectAll(null==t?Yt:function(t){return function(){return Bt.call(this.children,t)}}("function"==typeof t?t:Ot(t)))},filter:function(t){"function"!=typeof t&&(t=qt(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,a=n[i],u=a.length,c=r[i]=[],f=0;f<u;++f)(o=a[f])&&t.call(o,o.__data__,f,a)&&c.push(o);return new Un(r,this._parents)},data:function(t,n){if(!arguments.length)return Array.from(this,Gt);var e=n?Xt:Ht,r=this._parents,i=this._groups;"function"!=typeof t&&(t=$t(t));for(var o=i.length,a=new Array(o),u=new Array(o),c=new Array(o),f=0;f<o;++f){var s=r[f],l=i[f],h=l.length,d=Vt(t.call(s,s&&s.__data__,f,r)),p=d.length,g=u[f]=new Array(p),y=a[f]=new Array(p),v=c[f]=new Array(h);e(s,l,g,y,v,d,n);for(var _,b,m=0,x=0;m<p;++m)if(_=g[m]){for(m>=x&&(x=m+1);!(b=y[x])&&++x<p;);_._next=b||null}}return(a=new Un(a,r))._enter=u,a._exit=c,a},enter:function(){return new Un(this._enter||this._groups.map(Lt),this._parents)},exit:function(){return new Un(this._exit||this._groups.map(Lt),this._parents)},join:function(t,n,e){var r=this.enter(),i=this,o=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=n&&(i=n(i))&&(i=i.selection()),null==e?o.remove():e(o),r&&i?r.merge(i).order():i},merge:function(t){for(var n=t.selection?t.selection():t,e=this._groups,r=n._groups,i=e.length,o=r.length,a=Math.min(i,o),u=new Array(i),c=0;c<a;++c)for(var f,s=e[c],l=r[c],h=s.length,d=u[c]=new Array(h),p=0;p<h;++p)(f=s[p]||l[p])&&(d[p]=f);for(;c<i;++c)u[c]=e[c];return new Un(u,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r,i=t[n],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=Wt);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o){for(var a,u=e[o],c=u.length,f=i[o]=new Array(c),s=0;s<c;++s)(a=u[s])&&(f[s]=a);f.sort(n)}return new Un(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null},size:function(){let t=0;for(const n of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var n=this._groups,e=0,r=n.length;e<r;++e)for(var i,o=n[e],a=0,u=o.length;a<u;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this},attr:function(t,n){var e=Et(t);if(arguments.length<2){var r=this.node();return e.local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}return this.each((null==n?e.local?Kt:Zt:"function"==typeof n?e.local?nn:tn:e.local?Jt:Qt)(e,n))},style:function(t,n,e){return arguments.length>1?this.each((null==n?rn:"function"==typeof n?an:on)(t,n,null==e?"":e)):un(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?cn:"function"==typeof n?sn:fn)(t,n)):this.node()[t]},classed:function(t,n){var e=ln(t+"");if(arguments.length<2){for(var r=hn(this.node()),i=-1,o=e.length;++i<o;)if(!r.contains(e[i]))return!1;return!0}return this.each(("function"==typeof n?_n:n?yn:vn)(e,n))},text:function(t){return arguments.length?this.each(null==t?bn:("function"==typeof t?xn:mn)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?wn:("function"==typeof t?An:Mn)(t)):this.node().innerHTML},raise:function(){return this.each(Tn)},lower:function(){return this.each(Sn)},append:function(t){var n="function"==typeof t?t:Ct(t);return this.select((function(){return this.appendChild(n.apply(this,arguments))}))},insert:function(t,n){var e="function"==typeof t?t:Ct(t),r=null==n?En:"function"==typeof n?n:zt(n);return this.select((function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(kn)},clone:function(t){return this.select(t?Cn:Nn)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,n,e){var r,i,o=Pn(t+""),a=o.length;if(!(arguments.length<2)){for(u=n?Dn:zn,r=0;r<a;++r)this.each(u(o[r],n,e));return this}var u=this.node().__on;if(u)for(var c,f=0,s=u.length;f<s;++f)for(r=0,c=u[f];r<a;++r)if((i=o[r]).type===c.type&&i.name===c.name)return c.value},dispatch:function(t,n){return this.each(("function"==typeof n?qn:Fn)(t,n))},[Symbol.iterator]:function*(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r,i=t[n],o=0,a=i.length;o<a;++o)(r=i[o])&&(yield r)}};var Yn=0;function Ln(){return new jn}function jn(){this._="@"+(++Yn).toString(36)}function $n(t){let n;for(;n=t.sourceEvent;)t=n;return t}function Hn(t,n){if(t=$n(t),void 0===n&&(n=t.currentTarget),n){var e=n.ownerSVGElement||n;if(e.createSVGPoint){var r=e.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,[(r=r.matrixTransform(n.getScreenCTM().inverse())).x,r.y]}if(n.getBoundingClientRect){var i=n.getBoundingClientRect();return[t.clientX-i.left-n.clientLeft,t.clientY-i.top-n.clientTop]}}return[t.pageX,t.pageY]}jn.prototype=Ln.prototype={constructor:jn,get:function(t){for(var n=this._;!(n in t);)if(!(t=t.parentNode))return;return t[n]},set:function(t,n){return t[this._]=n},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};const Xn={passive:!1},Gn={capture:!0,passive:!1};function Vn(t){t.stopImmediatePropagation()}function Wn(t){t.preventDefault(),t.stopImmediatePropagation()}function Zn(t){var n=t.document.documentElement,e=Bn(t).on("dragstart.drag",Wn,Gn);"onselectstart"in n?e.on("selectstart.drag",Wn,Gn):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")}function Kn(t,n){var e=t.document.documentElement,r=Bn(t).on("dragstart.drag",null);n&&(r.on("click.drag",Wn,Gn),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in e?r.on("selectstart.drag",null):(e.style.MozUserSelect=e.__noselect,delete e.__noselect)}var Qn=t=>()=>t;function Jn(t,{sourceEvent:n,subject:e,target:r,identifier:i,active:o,x:a,y:u,dx:c,dy:f,dispatch:s}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:e,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:u,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:f,enumerable:!0,configurable:!0},_:{value:s}})}function te(t){return!t.ctrlKey&&!t.button}function ne(){return this.parentNode}function ee(t,n){return null==n?{x:t.x,y:t.y}:n}function re(){return navigator.maxTouchPoints||"ontouchstart"in this}function ie(t,n,e){t.prototype=n.prototype=e,e.constructor=t}function oe(t,n){var e=Object.create(t.prototype);for(var r in n)e[r]=n[r];return e}function ae(){}Jn.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var ue=.7,ce=1/ue,fe="\\s*([+-]?\\d+)\\s*",se="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",le="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",he=/^#([0-9a-f]{3,8})$/,de=new RegExp(`^rgb\\(${fe},${fe},${fe}\\)$`),pe=new RegExp(`^rgb\\(${le},${le},${le}\\)$`),ge=new RegExp(`^rgba\\(${fe},${fe},${fe},${se}\\)$`),ye=new RegExp(`^rgba\\(${le},${le},${le},${se}\\)$`),ve=new RegExp(`^hsl\\(${se},${le},${le}\\)$`),_e=new RegExp(`^hsla\\(${se},${le},${le},${se}\\)$`),be={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function me(){return this.rgb().formatHex()}function xe(){return this.rgb().formatRgb()}function we(t){var n,e;return t=(t+"").trim().toLowerCase(),(n=he.exec(t))?(e=n[1].length,n=parseInt(n[1],16),6===e?Me(n):3===e?new Ee(n>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?Ae(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?Ae(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=de.exec(t))?new Ee(n[1],n[2],n[3],1):(n=pe.exec(t))?new Ee(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=ge.exec(t))?Ae(n[1],n[2],n[3],n[4]):(n=ye.exec(t))?Ae(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=ve.exec(t))?De(n[1],n[2]/100,n[3]/100,1):(n=_e.exec(t))?De(n[1],n[2]/100,n[3]/100,n[4]):be.hasOwnProperty(t)?Me(be[t]):"transparent"===t?new Ee(NaN,NaN,NaN,0):null}function Me(t){return new Ee(t>>16&255,t>>8&255,255&t,1)}function Ae(t,n,e,r){return r<=0&&(t=n=e=NaN),new Ee(t,n,e,r)}function Te(t){return t instanceof ae||(t=we(t)),t?new Ee((t=t.rgb()).r,t.g,t.b,t.opacity):new Ee}function Se(t,n,e,r){return 1===arguments.length?Te(t):new Ee(t,n,e,null==r?1:r)}function Ee(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function ke(){return`#${ze(this.r)}${ze(this.g)}${ze(this.b)}`}function Ne(){const t=Ce(this.opacity);return`${1===t?"rgb(":"rgba("}${Pe(this.r)}, ${Pe(this.g)}, ${Pe(this.b)}${1===t?")":`, ${t})`}`}function Ce(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Pe(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function ze(t){return((t=Pe(t))<16?"0":"")+t.toString(16)}function De(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new qe(t,n,e,r)}function Re(t){if(t instanceof qe)return new qe(t.h,t.s,t.l,t.opacity);if(t instanceof ae||(t=we(t)),!t)return new qe;if(t instanceof qe)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),o=Math.max(n,e,r),a=NaN,u=o-i,c=(o+i)/2;return u?(a=n===o?(e-r)/u+6*(e<r):e===o?(r-n)/u+2:(n-e)/u+4,u/=c<.5?o+i:2-o-i,a*=60):u=c>0&&c<1?0:a,new qe(a,u,c,t.opacity)}function Fe(t,n,e,r){return 1===arguments.length?Re(t):new qe(t,n,e,null==r?1:r)}function qe(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function Oe(t){return(t=(t||0)%360)<0?t+360:t}function Ue(t){return Math.max(0,Math.min(1,t||0))}function Ie(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}ie(ae,we,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:me,formatHex:me,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Re(this).formatHsl()},formatRgb:xe,toString:xe}),ie(Ee,Se,oe(ae,{brighter(t){return t=null==t?ce:Math.pow(ce,t),new Ee(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?ue:Math.pow(ue,t),new Ee(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Ee(Pe(this.r),Pe(this.g),Pe(this.b),Ce(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ke,formatHex:ke,formatHex8:function(){return`#${ze(this.r)}${ze(this.g)}${ze(this.b)}${ze(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Ne,toString:Ne})),ie(qe,Fe,oe(ae,{brighter(t){return t=null==t?ce:Math.pow(ce,t),new qe(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?ue:Math.pow(ue,t),new qe(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new Ee(Ie(t>=240?t-240:t+120,i,r),Ie(t,i,r),Ie(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new qe(Oe(this.h),Ue(this.s),Ue(this.l),Ce(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=Ce(this.opacity);return`${1===t?"hsl(":"hsla("}${Oe(this.h)}, ${100*Ue(this.s)}%, ${100*Ue(this.l)}%${1===t?")":`, ${t})`}`}}));const Be=Math.PI/180,Ye=180/Math.PI,Le=.96422,je=.82521,$e=4/29,He=6/29,Xe=3*He*He;function Ge(t){if(t instanceof We)return new We(t.l,t.a,t.b,t.opacity);if(t instanceof er)return rr(t);t instanceof Ee||(t=Te(t));var n,e,r=Je(t.r),i=Je(t.g),o=Je(t.b),a=Ze((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?n=e=a:(n=Ze((.4360747*r+.3850649*i+.1430804*o)/Le),e=Ze((.0139322*r+.0971045*i+.7141733*o)/je)),new We(116*a-16,500*(n-a),200*(a-e),t.opacity)}function Ve(t,n,e,r){return 1===arguments.length?Ge(t):new We(t,n,e,null==r?1:r)}function We(t,n,e,r){this.l=+t,this.a=+n,this.b=+e,this.opacity=+r}function Ze(t){return t>.008856451679035631?Math.pow(t,1/3):t/Xe+$e}function Ke(t){return t>He?t*t*t:Xe*(t-$e)}function Qe(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Je(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function tr(t){if(t instanceof er)return new er(t.h,t.c,t.l,t.opacity);if(t instanceof We||(t=Ge(t)),0===t.a&&0===t.b)return new er(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var n=Math.atan2(t.b,t.a)*Ye;return new er(n<0?n+360:n,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function nr(t,n,e,r){return 1===arguments.length?tr(t):new er(t,n,e,null==r?1:r)}function er(t,n,e,r){this.h=+t,this.c=+n,this.l=+e,this.opacity=+r}function rr(t){if(isNaN(t.h))return new We(t.l,0,0,t.opacity);var n=t.h*Be;return new We(t.l,Math.cos(n)*t.c,Math.sin(n)*t.c,t.opacity)}ie(We,Ve,oe(ae,{brighter(t){return new We(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker(t){return new We(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,n=isNaN(this.a)?t:t+this.a/500,e=isNaN(this.b)?t:t-this.b/200;return new Ee(Qe(3.1338561*(n=Le*Ke(n))-1.6168667*(t=1*Ke(t))-.4906146*(e=je*Ke(e))),Qe(-.9787684*n+1.9161415*t+.033454*e),Qe(.0719453*n-.2289914*t+1.4052427*e),this.opacity)}})),ie(er,nr,oe(ae,{brighter(t){return new er(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker(t){return new er(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb(){return rr(this).rgb()}}));var ir=-.14861,or=1.78277,ar=-.29227,ur=-.90649,cr=1.97294,fr=cr*ur,sr=cr*or,lr=or*ar-ur*ir;function hr(t){if(t instanceof pr)return new pr(t.h,t.s,t.l,t.opacity);t instanceof Ee||(t=Te(t));var n=t.r/255,e=t.g/255,r=t.b/255,i=(lr*r+fr*n-sr*e)/(lr+fr-sr),o=r-i,a=(cr*(e-i)-ar*o)/ur,u=Math.sqrt(a*a+o*o)/(cr*i*(1-i)),c=u?Math.atan2(a,o)*Ye-120:NaN;return new pr(c<0?c+360:c,u,i,t.opacity)}function dr(t,n,e,r){return 1===arguments.length?hr(t):new pr(t,n,e,null==r?1:r)}function pr(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function gr(t,n,e,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*n+(4-6*o+3*a)*e+(1+3*t+3*o-3*a)*r+a*i)/6}function yr(t){var n=t.length-1;return function(e){var r=e<=0?e=0:e>=1?(e=1,n-1):Math.floor(e*n),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,u=r<n-1?t[r+2]:2*o-i;return gr((e-r/n)*n,a,i,o,u)}}function vr(t){var n=t.length;return function(e){var r=Math.floor(((e%=1)<0?++e:e)*n),i=t[(r+n-1)%n],o=t[r%n],a=t[(r+1)%n],u=t[(r+2)%n];return gr((e-r/n)*n,i,o,a,u)}}ie(pr,dr,oe(ae,{brighter(t){return t=null==t?ce:Math.pow(ce,t),new pr(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?ue:Math.pow(ue,t),new pr(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*Be,n=+this.l,e=isNaN(this.s)?0:this.s*n*(1-n),r=Math.cos(t),i=Math.sin(t);return new Ee(255*(n+e*(ir*r+or*i)),255*(n+e*(ar*r+ur*i)),255*(n+e*(cr*r)),this.opacity)}}));var _r=t=>()=>t;function br(t,n){return function(e){return t+e*n}}function mr(t,n){var e=n-t;return e?br(t,e>180||e<-180?e-360*Math.round(e/360):e):_r(isNaN(t)?n:t)}function xr(t){return 1==(t=+t)?wr:function(n,e){return e-n?function(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)}}(n,e,t):_r(isNaN(n)?e:n)}}function wr(t,n){var e=n-t;return e?br(t,e):_r(isNaN(t)?n:t)}var Mr=function t(n){var e=xr(n);function r(t,n){var r=e((t=Se(t)).r,(n=Se(n)).r),i=e(t.g,n.g),o=e(t.b,n.b),a=wr(t.opacity,n.opacity);return function(n){return t.r=r(n),t.g=i(n),t.b=o(n),t.opacity=a(n),t+""}}return r.gamma=t,r}(1);function Ar(t){return function(n){var e,r,i=n.length,o=new Array(i),a=new Array(i),u=new Array(i);for(e=0;e<i;++e)r=Se(n[e]),o[e]=r.r||0,a[e]=r.g||0,u[e]=r.b||0;return o=t(o),a=t(a),u=t(u),r.opacity=1,function(t){return r.r=o(t),r.g=a(t),r.b=u(t),r+""}}}var Tr=Ar(yr),Sr=Ar(vr);function Er(t,n){n||(n=[]);var e,r=t?Math.min(n.length,t.length):0,i=n.slice();return function(o){for(e=0;e<r;++e)i[e]=t[e]*(1-o)+n[e]*o;return i}}function kr(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Nr(t,n){var e,r=n?n.length:0,i=t?Math.min(r,t.length):0,o=new Array(i),a=new Array(r);for(e=0;e<i;++e)o[e]=qr(t[e],n[e]);for(;e<r;++e)a[e]=n[e];return function(t){for(e=0;e<i;++e)a[e]=o[e](t);return a}}function Cr(t,n){var e=new Date;return t=+t,n=+n,function(r){return e.setTime(t*(1-r)+n*r),e}}function Pr(t,n){return t=+t,n=+n,function(e){return t*(1-e)+n*e}}function zr(t,n){var e,r={},i={};for(e in null!==t&&"object"==typeof t||(t={}),null!==n&&"object"==typeof n||(n={}),n)e in t?r[e]=qr(t[e],n[e]):i[e]=n[e];return function(t){for(e in r)i[e]=r[e](t);return i}}var Dr=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Rr=new RegExp(Dr.source,"g");function Fr(t,n){var e,r,i,o=Dr.lastIndex=Rr.lastIndex=0,a=-1,u=[],c=[];for(t+="",n+="";(e=Dr.exec(t))&&(r=Rr.exec(n));)(i=r.index)>o&&(i=n.slice(o,i),u[a]?u[a]+=i:u[++a]=i),(e=e[0])===(r=r[0])?u[a]?u[a]+=r:u[++a]=r:(u[++a]=null,c.push({i:a,x:Pr(e,r)})),o=Rr.lastIndex;return o<n.length&&(i=n.slice(o),u[a]?u[a]+=i:u[++a]=i),u.length<2?c[0]?function(t){return function(n){return t(n)+""}}(c[0].x):function(t){return function(){return t}}(n):(n=c.length,function(t){for(var e,r=0;r<n;++r)u[(e=c[r]).i]=e.x(t);return u.join("")})}function qr(t,n){var e,r=typeof n;return null==n||"boolean"===r?_r(n):("number"===r?Pr:"string"===r?(e=we(n))?(n=e,Mr):Fr:n instanceof we?Mr:n instanceof Date?Cr:kr(n)?Er:Array.isArray(n)?Nr:"function"!=typeof n.valueOf&&"function"!=typeof n.toString||isNaN(n)?zr:Pr)(t,n)}function Or(t,n){return t=+t,n=+n,function(e){return Math.round(t*(1-e)+n*e)}}var Ur,Ir=180/Math.PI,Br={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Yr(t,n,e,r,i,o){var a,u,c;return(a=Math.sqrt(t*t+n*n))&&(t/=a,n/=a),(c=t*e+n*r)&&(e-=t*c,r-=n*c),(u=Math.sqrt(e*e+r*r))&&(e/=u,r/=u,c/=u),t*r<n*e&&(t=-t,n=-n,c=-c,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(n,t)*Ir,skewX:Math.atan(c)*Ir,scaleX:a,scaleY:u}}function Lr(t,n,e,r){function i(t){return t.length?t.pop()+" ":""}return function(o,a){var u=[],c=[];return o=t(o),a=t(a),function(t,r,i,o,a,u){if(t!==i||r!==o){var c=a.push("translate(",null,n,null,e);u.push({i:c-4,x:Pr(t,i)},{i:c-2,x:Pr(r,o)})}else(i||o)&&a.push("translate("+i+n+o+e)}(o.translateX,o.translateY,a.translateX,a.translateY,u,c),function(t,n,e,o){t!==n?(t-n>180?n+=360:n-t>180&&(t+=360),o.push({i:e.push(i(e)+"rotate(",null,r)-2,x:Pr(t,n)})):n&&e.push(i(e)+"rotate("+n+r)}(o.rotate,a.rotate,u,c),function(t,n,e,o){t!==n?o.push({i:e.push(i(e)+"skewX(",null,r)-2,x:Pr(t,n)}):n&&e.push(i(e)+"skewX("+n+r)}(o.skewX,a.skewX,u,c),function(t,n,e,r,o,a){if(t!==e||n!==r){var u=o.push(i(o)+"scale(",null,",",null,")");a.push({i:u-4,x:Pr(t,e)},{i:u-2,x:Pr(n,r)})}else 1===e&&1===r||o.push(i(o)+"scale("+e+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,u,c),o=a=null,function(t){for(var n,e=-1,r=c.length;++e<r;)u[(n=c[e]).i]=n.x(t);return u.join("")}}}var jr=Lr((function(t){const n=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return n.isIdentity?Br:Yr(n.a,n.b,n.c,n.d,n.e,n.f)}),"px, ","px)","deg)"),$r=Lr((function(t){return null==t?Br:(Ur||(Ur=document.createElementNS("http://www.w3.org/2000/svg","g")),Ur.setAttribute("transform",t),(t=Ur.transform.baseVal.consolidate())?Yr((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Br)}),", ",")",")");function Hr(t){return((t=Math.exp(t))+1/t)/2}var Xr=function t(n,e,r){function i(t,i){var o,a,u=t[0],c=t[1],f=t[2],s=i[0],l=i[1],h=i[2],d=s-u,p=l-c,g=d*d+p*p;if(g<1e-12)a=Math.log(h/f)/n,o=function(t){return[u+t*d,c+t*p,f*Math.exp(n*t*a)]};else{var y=Math.sqrt(g),v=(h*h-f*f+r*g)/(2*f*e*y),_=(h*h-f*f-r*g)/(2*h*e*y),b=Math.log(Math.sqrt(v*v+1)-v),m=Math.log(Math.sqrt(_*_+1)-_);a=(m-b)/n,o=function(t){var r=t*a,i=Hr(b),o=f/(e*y)*(i*function(t){return((t=Math.exp(2*t))-1)/(t+1)}(n*r+b)-function(t){return((t=Math.exp(t))-1/t)/2}(b));return[u+o*d,c+o*p,f*i/Hr(n*r+b)]}}return o.duration=1e3*a*n/Math.SQRT2,o}return i.rho=function(n){var e=Math.max(.001,+n),r=e*e;return t(e,r,r*r)},i}(Math.SQRT2,2,4);function Gr(t){return function(n,e){var r=t((n=Fe(n)).h,(e=Fe(e)).h),i=wr(n.s,e.s),o=wr(n.l,e.l),a=wr(n.opacity,e.opacity);return function(t){return n.h=r(t),n.s=i(t),n.l=o(t),n.opacity=a(t),n+""}}}var Vr=Gr(mr),Wr=Gr(wr);function Zr(t){return function(n,e){var r=t((n=nr(n)).h,(e=nr(e)).h),i=wr(n.c,e.c),o=wr(n.l,e.l),a=wr(n.opacity,e.opacity);return function(t){return n.h=r(t),n.c=i(t),n.l=o(t),n.opacity=a(t),n+""}}}var Kr=Zr(mr),Qr=Zr(wr);function Jr(t){return function n(e){function r(n,r){var i=t((n=dr(n)).h,(r=dr(r)).h),o=wr(n.s,r.s),a=wr(n.l,r.l),u=wr(n.opacity,r.opacity);return function(t){return n.h=i(t),n.s=o(t),n.l=a(Math.pow(t,e)),n.opacity=u(t),n+""}}return e=+e,r.gamma=n,r}(1)}var ti=Jr(mr),ni=Jr(wr);function ei(t,n){void 0===n&&(n=t,t=qr);for(var e=0,r=n.length-1,i=n[0],o=new Array(r<0?0:r);e<r;)o[e]=t(i,i=n[++e]);return function(t){var n=Math.max(0,Math.min(r-1,Math.floor(t*=r)));return o[n](t-n)}}var ri,ii,oi=0,ai=0,ui=0,ci=0,fi=0,si=0,li="object"==typeof performance&&performance.now?performance:Date,hi="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function di(){return fi||(hi(pi),fi=li.now()+si)}function pi(){fi=0}function gi(){this._call=this._time=this._next=null}function yi(t,n,e){var r=new gi;return r.restart(t,n,e),r}function vi(){di(),++oi;for(var t,n=ri;n;)(t=fi-n._time)>=0&&n._call.call(void 0,t),n=n._next;--oi}function _i(){fi=(ci=li.now())+si,oi=ai=0;try{vi()}finally{oi=0,function(){var t,n,e=ri,r=1/0;for(;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:ri=n);ii=t,mi(r)}(),fi=0}}function bi(){var t=li.now(),n=t-ci;n>1e3&&(si-=n,ci=t)}function mi(t){oi||(ai&&(ai=clearTimeout(ai)),t-fi>24?(t<1/0&&(ai=setTimeout(_i,t-li.now()-si)),ui&&(ui=clearInterval(ui))):(ui||(ci=li.now(),ui=setInterval(bi,1e3)),oi=1,hi(_i)))}function xi(t,n,e){var r=new gi;return n=null==n?0:+n,r.restart((e=>{r.stop(),t(e+n)}),n,e),r}gi.prototype=yi.prototype={constructor:gi,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?di():+e)+(null==n?0:+n),this._next||ii===this||(ii?ii._next=this:ri=this,ii=this),this._call=t,this._time=e,mi()},stop:function(){this._call&&(this._call=null,this._time=1/0,mi())}};var wi=mt("start","end","cancel","interrupt"),Mi=[];function Ai(t,n,e,r,i,o){var a=t.__transition;if(a){if(e in a)return}else t.__transition={};!function(t,n,e){var r,i=t.__transition;function o(t){e.state=1,e.timer.restart(a,e.delay,e.time),e.delay<=t&&a(t-e.delay)}function a(o){var f,s,l,h;if(1!==e.state)return c();for(f in i)if((h=i[f]).name===e.name){if(3===h.state)return xi(a);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[f]):+f<n&&(h.state=6,h.timer.stop(),h.on.call("cancel",t,t.__data__,h.index,h.group),delete i[f])}if(xi((function(){3===e.state&&(e.state=4,e.timer.restart(u,e.delay,e.time),u(o))})),e.state=2,e.on.call("start",t,t.__data__,e.index,e.group),2===e.state){for(e.state=3,r=new Array(l=e.tween.length),f=0,s=-1;f<l;++f)(h=e.tween[f].value.call(t,t.__data__,e.index,e.group))&&(r[++s]=h);r.length=s+1}}function u(n){for(var i=n<e.duration?e.ease.call(null,n/e.duration):(e.timer.restart(c),e.state=5,1),o=-1,a=r.length;++o<a;)r[o].call(t,i);5===e.state&&(e.on.call("end",t,t.__data__,e.index,e.group),c())}function c(){for(var r in e.state=6,e.timer.stop(),delete i[n],i)return;delete t.__transition}i[n]=e,e.timer=yi(o,0,e.time)}(t,e,{name:n,index:r,group:i,on:wi,tween:Mi,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function Ti(t,n){var e=Ei(t,n);if(e.state>0)throw new Error("too late; already scheduled");return e}function Si(t,n){var e=Ei(t,n);if(e.state>3)throw new Error("too late; already running");return e}function Ei(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}function ki(t,n){var e,r,i,o=t.__transition,a=!0;if(o){for(i in n=null==n?null:n+"",o)(e=o[i]).name===n?(r=e.state>2&&e.state<5,e.state=6,e.timer.stop(),e.on.call(r?"interrupt":"cancel",t,t.__data__,e.index,e.group),delete o[i]):a=!1;a&&delete t.__transition}}function Ni(t,n){var e,r;return function(){var i=Si(this,t),o=i.tween;if(o!==e)for(var a=0,u=(r=e=o).length;a<u;++a)if(r[a].name===n){(r=r.slice()).splice(a,1);break}i.tween=r}}function Ci(t,n,e){var r,i;if("function"!=typeof e)throw new Error;return function(){var o=Si(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var u={name:n,value:e},c=0,f=i.length;c<f;++c)if(i[c].name===n){i[c]=u;break}c===f&&i.push(u)}o.tween=i}}function Pi(t,n,e){var r=t._id;return t.each((function(){var t=Si(this,r);(t.value||(t.value={}))[n]=e.apply(this,arguments)})),function(t){return Ei(t,r).value[n]}}function zi(t,n){var e;return("number"==typeof n?Pr:n instanceof we?Mr:(e=we(n))?(n=e,Mr):Fr)(t,n)}function Di(t){return function(){this.removeAttribute(t)}}function Ri(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Fi(t,n,e){var r,i,o=e+"";return function(){var a=this.getAttribute(t);return a===o?null:a===r?i:i=n(r=a,e)}}function qi(t,n,e){var r,i,o=e+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===o?null:a===r?i:i=n(r=a,e)}}function Oi(t,n,e){var r,i,o;return function(){var a,u,c=e(this);if(null!=c)return(a=this.getAttribute(t))===(u=c+"")?null:a===r&&u===i?o:(i=u,o=n(r=a,c));this.removeAttribute(t)}}function Ui(t,n,e){var r,i,o;return function(){var a,u,c=e(this);if(null!=c)return(a=this.getAttributeNS(t.space,t.local))===(u=c+"")?null:a===r&&u===i?o:(i=u,o=n(r=a,c));this.removeAttributeNS(t.space,t.local)}}function Ii(t,n){return function(e){this.setAttribute(t,n.call(this,e))}}function Bi(t,n){return function(e){this.setAttributeNS(t.space,t.local,n.call(this,e))}}function Yi(t,n){var e,r;function i(){var i=n.apply(this,arguments);return i!==r&&(e=(r=i)&&Bi(t,i)),e}return i._value=n,i}function Li(t,n){var e,r;function i(){var i=n.apply(this,arguments);r