45 lines
180 KiB
JavaScript
45 lines
180 KiB
JavaScript
import{i as Nt,r as Y,R as Ui,c as jn,a as $n,b as Li,o as qi,m as Fn,d as Un,g as Hi,j as Rt,e as Gi}from"./index-CqKqlxwP.js";function Wi(e,n){let r=0;for(let i of e)(i=+i)&&(r+=i);return r}var Ln=180/Math.PI,en={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Dr(e,n,r,i,o,a){var s,u,f;return(s=Math.sqrt(e*e+n*n))&&(e/=s,n/=s),(f=e*r+n*i)&&(r-=e*f,i-=n*f),(u=Math.sqrt(r*r+i*i))&&(r/=u,i/=u,f/=u),e*i<n*r&&(e=-e,n=-n,f=-f,s=-s),{translateX:o,translateY:a,rotate:Math.atan2(n,e)*Ln,skewX:Math.atan(f)*Ln,scaleX:s,scaleY:u}}var he;function Vi(e){const n=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return n.isIdentity?en:Dr(n.a,n.b,n.c,n.d,n.e,n.f)}function Bi(e){return e==null||(he||(he=document.createElementNS("http://www.w3.org/2000/svg","g")),he.setAttribute("transform",e),!(e=he.transform.baseVal.consolidate()))?en:(e=e.matrix,Dr(e.a,e.b,e.c,e.d,e.e,e.f))}function jr(e,n,r,i){function o(l){return l.length?l.pop()+" ":""}function a(l,c,h,d,g,_){if(l!==h||c!==d){var b=g.push("translate(",null,n,null,r);_.push({i:b-4,x:Nt(l,h)},{i:b-2,x:Nt(c,d)})}else(h||d)&&g.push("translate("+h+n+d+r)}function s(l,c,h,d){l!==c?(l-c>180?c+=360:c-l>180&&(l+=360),d.push({i:h.push(o(h)+"rotate(",null,i)-2,x:Nt(l,c)})):c&&h.push(o(h)+"rotate("+c+i)}function u(l,c,h,d){l!==c?d.push({i:h.push(o(h)+"skewX(",null,i)-2,x:Nt(l,c)}):c&&h.push(o(h)+"skewX("+c+i)}function f(l,c,h,d,g,_){if(l!==h||c!==d){var b=g.push(o(g)+"scale(",null,",",null,")");_.push({i:b-4,x:Nt(l,h)},{i:b-2,x:Nt(c,d)})}else(h!==1||d!==1)&&g.push(o(g)+"scale("+h+","+d+")")}return function(l,c){var h=[],d=[];return l=e(l),c=e(c),a(l.translateX,l.translateY,c.translateX,c.translateY,h,d),s(l.rotate,c.rotate,h,d),u(l.skewX,c.skewX,h,d),f(l.scaleX,l.scaleY,c.scaleX,c.scaleY,h,d),l=c=null,function(g){for(var _=-1,b=d.length,y;++_<b;)h[(y=d[_]).i]=y.x(g);return h.join("")}}}var Xi=jr(Vi,"px, ","px)","deg)"),Yi=jr(Bi,", ",")",")"),Zi=1e-12;function qn(e){return((e=Math.exp(e))+1/e)/2}function Ki(e){return((e=Math.exp(e))-1/e)/2}function Qi(e){return((e=Math.exp(2*e))-1)/(e+1)}const Ji=(function e(n,r,i){function o(a,s){var u=a[0],f=a[1],l=a[2],c=s[0],h=s[1],d=s[2],g=c-u,_=h-f,b=g*g+_*_,y,p;if(b<Zi)p=Math.log(d/l)/n,y=function(S){return[u+S*g,f+S*_,l*Math.exp(n*S*p)]};else{var v=Math.sqrt(b),k=(d*d-l*l+i*b)/(2*l*r*v),x=(d*d-l*l-i*b)/(2*d*r*v),m=Math.log(Math.sqrt(k*k+1)-k),C=Math.log(Math.sqrt(x*x+1)-x);p=(C-m)/n,y=function(S){var T=S*p,E=qn(m),M=l/(r*v)*(E*Qi(n*T+m)-Ki(m));return[u+M*g,f+M*_,l*E/qn(n*T+m)]}}return y.duration=p*1e3*n/Math.SQRT2,y}return o.rho=function(a){var s=Math.max(.001,+a),u=s*s,f=u*u;return e(s,u,f)},o})(Math.SQRT2,2,4);function to(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,a,s,u=[],f=!0,l=!1;try{if(a=(r=r.call(e)).next,n===0){if(Object(r)!==r)return;f=!1}else for(;!(f=(i=a.call(r)).done)&&(u.push(i.value),u.length!==n);f=!0);}catch(c){l=!0,o=c}finally{try{if(!f&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(l)throw o}}return u}}function eo(e,n,r){return n=lo(n),n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function Hn(e,n){return io(e)||to(e,n)||$r(e,n)||so()}function no(e){return ro(e)||oo(e)||$r(e)||ao()}function ro(e){if(Array.isArray(e))return nn(e)}function io(e){if(Array.isArray(e))return e}function oo(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function $r(e,n){if(e){if(typeof e=="string")return nn(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return nn(e,n)}}function nn(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=new Array(n);r<n;r++)i[r]=e[r];return i}function ao(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function so(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uo(e,n){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function lo(e){var n=uo(e,"string");return typeof n=="symbol"?n:String(n)}var fo=function(n,r){var i=new Set(r);return Object.assign.apply(Object,[{}].concat(no(Object.entries(n).filter(function(o){var a=Hn(o,1),s=a[0];return!i.has(s)}).map(function(o){var a=Hn(o,2),s=a[0],u=a[1];return eo({},s,u)}))))};function co(e,{wrapperElementType:n="div",nodeMapper:r=a=>a,methodNames:i=[],initPropNames:o=[]}={}){return Y.forwardRef((a,s)=>{const u=Y.useRef(),f=Y.useMemo(()=>{const h=Object.fromEntries(o.filter(d=>a.hasOwnProperty(d)).map(d=>[d,a[d]]));return e(h)},[]);Gn(()=>{f(r(u.current))},Y.useLayoutEffect),Gn(()=>f._destructor instanceof Function?f._destructor:void 0);const l=Y.useCallback((h,...d)=>f[h]instanceof Function?f[h](...d):void 0,[f]),c=Y.useRef({});return Object.keys(fo(a,[...i,...o])).filter(h=>c.current[h]!==a[h]).forEach(h=>l(h,a[h])),c.current=a,Y.useImperativeHandle(s,()=>Object.fromEntries(i.map(h=>[h,(...d)=>l(h,...d)])),[l]),Ui.createElement(n,{ref:u})})}function Gn(e,n=Y.useEffect){const r=Y.useRef(),i=Y.useRef(!1),o=Y.useRef(!1),[a,s]=Y.useState(0);i.current&&(o.current=!0),n(()=>(i.current||(r.current=e(),i.current=!0),s(u=>u+1),()=>{o.current&&(r.current&&r.current(),r.current=void 0,i.current=!1,o.current=!1)}),[])}var rn="http://www.w3.org/1999/xhtml";const Wn={svg:"http://www.w3.org/2000/svg",xhtml:rn,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ne(e){var n=e+="",r=n.indexOf(":");return r>=0&&(n=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Wn.hasOwnProperty(n)?{space:Wn[n],local:e}:e}function ho(e){return function(){var n=this.ownerDocument,r=this.namespaceURI;return r===rn&&n.documentElement.namespaceURI===rn?n.createElement(e):n.createElementNS(r,e)}}function po(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Fr(e){var n=Ne(e);return(n.local?po:ho)(n)}function go(){}function mn(e){return e==null?go:function(){return this.querySelector(e)}}function yo(e){typeof e!="function"&&(e=mn(e));for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o)for(var a=n[o],s=a.length,u=i[o]=new Array(s),f,l,c=0;c<s;++c)(f=a[c])&&(l=e.call(f,f.__data__,c,a))&&("__data__"in f&&(l.__data__=f.__data__),u[c]=l);return new rt(i,this._parents)}function _o(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function vo(){return[]}function Ur(e){return e==null?vo:function(){return this.querySelectorAll(e)}}function mo(e){return function(){return _o(e.apply(this,arguments))}}function bo(e){typeof e=="function"?e=mo(e):e=Ur(e);for(var n=this._groups,r=n.length,i=[],o=[],a=0;a<r;++a)for(var s=n[a],u=s.length,f,l=0;l<u;++l)(f=s[l])&&(i.push(e.call(f,f.__data__,l,s)),o.push(f));return new rt(i,o)}function Lr(e){return function(){return this.matches(e)}}function qr(e){return function(n){return n.matches(e)}}var xo=Array.prototype.find;function wo(e){return function(){return xo.call(this.children,e)}}function ko(){return this.firstElementChild}function Ao(e){return this.select(e==null?ko:wo(typeof e=="function"?e:qr(e)))}var Co=Array.prototype.filter;function So(){return Array.from(this.children)}function To(e){return function(){return Co.call(this.children,e)}}function Mo(e){return this.selectAll(e==null?So:To(typeof e=="function"?e:qr(e)))}function Po(e){typeof e!="function"&&(e=Lr(e));for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o)for(var a=n[o],s=a.length,u=i[o]=[],f,l=0;l<s;++l)(f=a[l])&&e.call(f,f.__data__,l,a)&&u.push(f);return new rt(i,this._parents)}function Hr(e){return new Array(e.length)}function Oo(){return new rt(this._enter||this._groups.map(Hr),this._parents)}function ke(e,n){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=n}ke.prototype={constructor:ke,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,n){return this._parent.insertBefore(e,n)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Eo(e){return function(){return e}}function zo(e,n,r,i,o,a){for(var s=0,u,f=n.length,l=a.length;s<l;++s)(u=n[s])?(u.__data__=a[s],i[s]=u):r[s]=new ke(e,a[s]);for(;s<f;++s)(u=n[s])&&(o[s]=u)}function Ro(e,n,r,i,o,a,s){var u,f,l=new Map,c=n.length,h=a.length,d=new Array(c),g;for(u=0;u<c;++u)(f=n[u])&&(d[u]=g=s.call(f,f.__data__,u,n)+"",l.has(g)?o[u]=f:l.set(g,f));for(u=0;u<h;++u)g=s.call(e,a[u],u,a)+"",(f=l.get(g))?(i[u]=f,f.__data__=a[u],l.delete(g)):r[u]=new ke(e,a[u]);for(u=0;u<c;++u)(f=n[u])&&l.get(d[u])===f&&(o[u]=f)}function Io(e){return e.__data__}function No(e,n){if(!arguments.length)return Array.from(this,Io);var r=n?Ro:zo,i=this._parents,o=this._groups;typeof e!="function"&&(e=Eo(e));for(var a=o.length,s=new Array(a),u=new Array(a),f=new Array(a),l=0;l<a;++l){var c=i[l],h=o[l],d=h.length,g=Do(e.call(c,c&&c.__data__,l,i)),_=g.length,b=u[l]=new Array(_),y=s[l]=new Array(_),p=f[l]=new Array(d);r(c,h,b,y,p,g,n);for(var v=0,k=0,x,m;v<_;++v)if(x=b[v]){for(v>=k&&(k=v+1);!(m=y[k])&&++k<_;);x._next=m||null}}return s=new rt(s,i),s._enter=u,s._exit=f,s}function Do(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function jo(){return new rt(this._exit||this._groups.map(Hr),this._parents)}function $o(e,n,r){var i=this.enter(),o=this,a=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),n!=null&&(o=n(o),o&&(o=o.selection())),r==null?a.remove():r(a),i&&o?i.merge(o).order():o}function Fo(e){for(var n=e.selection?e.selection():e,r=this._groups,i=n._groups,o=r.length,a=i.length,s=Math.min(o,a),u=new Array(o),f=0;f<s;++f)for(var l=r[f],c=i[f],h=l.length,d=u[f]=new Array(h),g,_=0;_<h;++_)(g=l[_]||c[_])&&(d[_]=g);for(;f<o;++f)u[f]=r[f];return new rt(u,this._parents)}function Uo(){for(var e=this._groups,n=-1,r=e.length;++n<r;)for(var i=e[n],o=i.length-1,a=i[o],s;--o>=0;)(s=i[o])&&(a&&s.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(s,a),a=s);return this}function Lo(e){e||(e=qo);function n(h,d){return h&&d?e(h.__data__,d.__data__):!h-!d}for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a){for(var s=r[a],u=s.length,f=o[a]=new Array(u),l,c=0;c<u;++c)(l=s[c])&&(f[c]=l);f.sort(n)}return new rt(o,this._parents).order()}function qo(e,n){return e<n?-1:e>n?1:e>=n?0:NaN}function Ho(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Go(){return Array.from(this)}function Wo(){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,a=i.length;o<a;++o){var s=i[o];if(s)return s}return null}function Vo(){let e=0;for(const n of this)++e;return e}function Bo(){return!this.node()}function Xo(e){for(var n=this._groups,r=0,i=n.length;r<i;++r)for(var o=n[r],a=0,s=o.length,u;a<s;++a)(u=o[a])&&e.call(u,u.__data__,a,o);return this}function Yo(e){return function(){this.removeAttribute(e)}}function Zo(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Ko(e,n){return function(){this.setAttribute(e,n)}}function Qo(e,n){return function(){this.setAttributeNS(e.space,e.local,n)}}function Jo(e,n){return function(){var r=n.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function ta(e,n){return function(){var r=n.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function ea(e,n){var r=Ne(e);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((n==null?r.local?Zo:Yo:typeof n=="function"?r.local?ta:Jo:r.local?Qo:Ko)(r,n))}function Gr(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function na(e){return function(){this.style.removeProperty(e)}}function ra(e,n,r){return function(){this.style.setProperty(e,n,r)}}function ia(e,n,r){return function(){var i=n.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function oa(e,n,r){return arguments.length>1?this.each((n==null?na:typeof n=="function"?ia:ra)(e,n,r??"")):Lt(this.node(),e)}function Lt(e,n){return e.style.getPropertyValue(n)||Gr(e).getComputedStyle(e,null).getPropertyValue(n)}function aa(e){return function(){delete this[e]}}function sa(e,n){return function(){this[e]=n}}function ua(e,n){return function(){var r=n.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function la(e,n){return arguments.length>1?this.each((n==null?aa:typeof n=="function"?ua:sa)(e,n)):this.node()[e]}function Wr(e){return e.trim().split(/^|\s+/)}function bn(e){return e.classList||new Vr(e)}function Vr(e){this._node=e,this._names=Wr(e.getAttribute("class")||"")}Vr.prototype={add:function(e){var n=this._names.indexOf(e);n<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var n=this._names.indexOf(e);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Br(e,n){for(var r=bn(e),i=-1,o=n.length;++i<o;)r.add(n[i])}function Xr(e,n){for(var r=bn(e),i=-1,o=n.length;++i<o;)r.remove(n[i])}function fa(e){return function(){Br(this,e)}}function ca(e){return function(){Xr(this,e)}}function ha(e,n){return function(){(n.apply(this,arguments)?Br:Xr)(this,e)}}function da(e,n){var r=Wr(e+"");if(arguments.length<2){for(var i=bn(this.node()),o=-1,a=r.length;++o<a;)if(!i.contains(r[o]))return!1;return!0}return this.each((typeof n=="function"?ha:n?fa:ca)(r,n))}function pa(){this.textContent=""}function ga(e){return function(){this.textContent=e}}function ya(e){return function(){var n=e.apply(this,arguments);this.textContent=n??""}}function _a(e){return arguments.length?this.each(e==null?pa:(typeof e=="function"?ya:ga)(e)):this.node().textContent}function va(){this.innerHTML=""}function ma(e){return function(){this.innerHTML=e}}function ba(e){return function(){var n=e.apply(this,arguments);this.innerHTML=n??""}}function xa(e){return arguments.length?this.each(e==null?va:(typeof e=="function"?ba:ma)(e)):this.node().innerHTML}function wa(){this.nextSibling&&this.parentNode.appendChild(this)}function ka(){return this.each(wa)}function Aa(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ca(){return this.each(Aa)}function Sa(e){var n=typeof e=="function"?e:Fr(e);return this.select(function(){return this.appendChild(n.apply(this,arguments))})}function Ta(){return null}function Ma(e,n){var r=typeof e=="function"?e:Fr(e),i=n==null?Ta:typeof n=="function"?n:mn(n);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function Pa(){var e=this.parentNode;e&&e.removeChild(this)}function Oa(){return this.each(Pa)}function Ea(){var e=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(e,this.nextSibling):e}function za(){var e=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(e,this.nextSibling):e}function Ra(e){return this.select(e?za:Ea)}function Ia(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Na(e){return function(n){e.call(this,n,this.__data__)}}function Da(e){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");return i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),{type:n,name:r}})}function ja(e){return function(){var n=this.__on;if(n){for(var r=0,i=-1,o=n.length,a;r<o;++r)a=n[r],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):n[++i]=a;++i?n.length=i:delete this.__on}}}function $a(e,n,r){return function(){var i=this.__on,o,a=Na(n);if(i){for(var s=0,u=i.length;s<u;++s)if((o=i[s]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=a,o.options=r),o.value=n;return}}this.addEventListener(e.type,a,r),o={type:e.type,name:e.name,value:n,listener:a,options:r},i?i.push(o):this.__on=[o]}}function Fa(e,n,r){var i=Da(e+""),o,a=i.length,s;if(arguments.length<2){var u=this.node().__on;if(u){for(var f=0,l=u.length,c;f<l;++f)for(o=0,c=u[f];o<a;++o)if((s=i[o]).type===c.type&&s.name===c.name)return c.value}return}for(u=n?$a:ja,o=0;o<a;++o)this.each(u(i[o],n,r));return this}function Yr(e,n,r){var i=Gr(e),o=i.CustomEvent;typeof o=="function"?o=new o(n,r):(o=i.document.createEvent("Event"),r?(o.initEvent(n,r.bubbles,r.cancelable),o.detail=r.detail):o.initEvent(n,!1,!1)),e.dispatchEvent(o)}function Ua(e,n){return function(){return Yr(this,e,n)}}function La(e,n){return function(){return Yr(this,e,n.apply(this,arguments))}}function qa(e,n){return this.each((typeof n=="function"?La:Ua)(e,n))}function*Ha(){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,a=i.length,s;o<a;++o)(s=i[o])&&(yield s)}var Zr=[null];function rt(e,n){this._groups=e,this._parents=n}function le(){return new rt([[document.documentElement]],Zr)}function Ga(){return this}rt.prototype=le.prototype={constructor:rt,select:yo,selectAll:bo,selectChild:Ao,selectChildren:Mo,filter:Po,data:No,enter:Oo,exit:jo,join:$o,merge:Fo,selection:Ga,order:Uo,sort:Lo,call:Ho,nodes:Go,node:Wo,size:Vo,empty:Bo,each:Xo,attr:ea,style:oa,property:la,classed:da,text:_a,html:xa,raise:ka,lower:Ca,append:Sa,insert:Ma,remove:Oa,clone:Ra,datum:Ia,on:Fa,dispatch:qa,[Symbol.iterator]:Ha};function at(e){return typeof e=="string"?new rt([[document.querySelector(e)]],[document.documentElement]):new rt([[e]],Zr)}function Wa(e){let n;for(;n=e.sourceEvent;)e=n;return e}function pt(e,n){if(e=Wa(e),n===void 0&&(n=e.currentTarget),n){var r=n.ownerSVGElement||n;if(r.createSVGPoint){var i=r.createSVGPoint();return i.x=e.clientX,i.y=e.clientY,i=i.matrixTransform(n.getScreenCTM().inverse()),[i.x,i.y]}if(n.getBoundingClientRect){var o=n.getBoundingClientRect();return[e.clientX-o.left-n.clientLeft,e.clientY-o.top-n.clientTop]}}return[e.pageX,e.pageY]}var Va={value:()=>{}};function fe(){for(var e=0,n=arguments.length,r={},i;e<n;++e){if(!(i=arguments[e]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new _e(r)}function _e(e){this._=e}function Ba(e,n){return e.trim().split(/^|\s+/).map(function(r){var i="",o=r.indexOf(".");if(o>=0&&(i=r.slice(o+1),r=r.slice(0,o)),r&&!n.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}_e.prototype=fe.prototype={constructor:_e,on:function(e,n){var r=this._,i=Ba(e+"",r),o,a=-1,s=i.length;if(arguments.length<2){for(;++a<s;)if((o=(e=i[a]).type)&&(o=Xa(r[o],e.name)))return o;return}if(n!=null&&typeof n!="function")throw new Error("invalid callback: "+n);for(;++a<s;)if(o=(e=i[a]).type)r[o]=Vn(r[o],e.name,n);else if(n==null)for(o in r)r[o]=Vn(r[o],e.name,null);return this},copy:function(){var e={},n=this._;for(var r in n)e[r]=n[r].slice();return new _e(e)},call:function(e,n){if((o=arguments.length-2)>0)for(var r=new Array(o),i=0,o,a;i<o;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],i=0,o=a.length;i<o;++i)a[i].value.apply(n,r)},apply:function(e,n,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],o=0,a=i.length;o<a;++o)i[o].value.apply(n,r)}};function Xa(e,n){for(var r=0,i=e.length,o;r<i;++r)if((o=e[r]).name===n)return o.value}function Vn(e,n,r){for(var i=0,o=e.length;i<o;++i)if(e[i].name===n){e[i]=Va,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:n,value:r}),e}const Ya={passive:!1},ae={capture:!0,passive:!1};function He(e){e.stopImmediatePropagation()}function Ut(e){e.preventDefault(),e.stopImmediatePropagation()}function Kr(e){var n=e.document.documentElement,r=at(e).on("dragstart.drag",Ut,ae);"onselectstart"in n?r.on("selectstart.drag",Ut,ae):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")}function Qr(e,n){var r=e.document.documentElement,i=at(e).on("dragstart.drag",null);n&&(i.on("click.drag",Ut,ae),setTimeout(function(){i.on("click.drag",null)},0)),"onselectstart"in r?i.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}const de=e=>()=>e;function on(e,{sourceEvent:n,subject:r,target:i,identifier:o,active:a,x:s,y:u,dx:f,dy:l,dispatch:c}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:u,enumerable:!0,configurable:!0},dx:{value:f,enumerable:!0,configurable:!0},dy:{value:l,enumerable:!0,configurable:!0},_:{value:c}})}on.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Za(e){return!e.ctrlKey&&!e.button}function Ka(){return this.parentNode}function Qa(e,n){return n??{x:e.x,y:e.y}}function Ja(){return navigator.maxTouchPoints||"ontouchstart"in this}function ts(){var e=Za,n=Ka,r=Qa,i=Ja,o={},a=fe("start","drag","end"),s=0,u,f,l,c,h=0;function d(x){x.on("mousedown.drag",g).filter(i).on("touchstart.drag",y).on("touchmove.drag",p,Ya).on("touchend.drag touchcancel.drag",v).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(x,m){if(!(c||!e.call(this,x,m))){var C=k(this,n.call(this,x,m),x,m,"mouse");C&&(at(x.view).on("mousemove.drag",_,ae).on("mouseup.drag",b,ae),Kr(x.view),He(x),l=!1,u=x.clientX,f=x.clientY,C("start",x))}}function _(x){if(Ut(x),!l){var m=x.clientX-u,C=x.clientY-f;l=m*m+C*C>h}o.mouse("drag",x)}function b(x){at(x.view).on("mousemove.drag mouseup.drag",null),Qr(x.view,l),Ut(x),o.mouse("end",x)}function y(x,m){if(e.call(this,x,m)){var C=x.changedTouches,S=n.call(this,x,m),T=C.length,E,M;for(E=0;E<T;++E)(M=k(this,S,x,m,C[E].identifier,C[E]))&&(He(x),M("start",x,C[E]))}}function p(x){var m=x.changedTouches,C=m.length,S,T;for(S=0;S<C;++S)(T=o[m[S].identifier])&&(Ut(x),T("drag",x,m[S]))}function v(x){var m=x.changedTouches,C=m.length,S,T;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),S=0;S<C;++S)(T=o[m[S].identifier])&&(He(x),T("end",x,m[S]))}function k(x,m,C,S,T,E){var M=a.copy(),z=pt(E||C,m),N,j,A;if((A=r.call(x,new on("beforestart",{sourceEvent:C,target:d,identifier:T,active:s,x:z[0],y:z[1],dx:0,dy:0,dispatch:M}),S))!=null)return N=A.x-z[0]||0,j=A.y-z[1]||0,function R(P,I,D){var F=z,U;switch(P){case"start":o[T]=R,U=s++;break;case"end":delete o[T],--s;case"drag":z=pt(D||I,m),U=s;break}M.call(P,x,new on(P,{sourceEvent:I,subject:A,target:d,identifier:T,active:U,x:z[0]+N,y:z[1]+j,dx:z[0]-F[0],dy:z[1]-F[1],dispatch:M}),S)}}return d.filter=function(x){return arguments.length?(e=typeof x=="function"?x:de(!!x),d):e},d.container=function(x){return arguments.length?(n=typeof x=="function"?x:de(x),d):n},d.subject=function(x){return arguments.length?(r=typeof x=="function"?x:de(x),d):r},d.touchable=function(x){return arguments.length?(i=typeof x=="function"?x:de(!!x),d):i},d.on=function(){var x=a.on.apply(a,arguments);return x===a?d:x},d.clickDistance=function(x){return arguments.length?(h=(x=+x)*x,d):Math.sqrt(h)},d}var qt=0,Qt=0,Gt=0,Jr=1e3,Ae,Jt,Ce=0,jt=0,De=0,se=typeof performance=="object"&&performance.now?performance:Date,ti=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function xn(){return jt||(ti(es),jt=se.now()+De)}function es(){jt=0}function Se(){this._call=this._time=this._next=null}Se.prototype=wn.prototype={constructor:Se,restart:function(e,n,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?xn():+r)+(n==null?0:+n),!this._next&&Jt!==this&&(Jt?Jt._next=this:Ae=this,Jt=this),this._call=e,this._time=r,an()},stop:function(){this._call&&(this._call=null,this._time=1/0,an())}};function wn(e,n,r){var i=new Se;return i.restart(e,n,r),i}function ns(){xn(),++qt;for(var e=Ae,n;e;)(n=jt-e._time)>=0&&e._call.call(void 0,n),e=e._next;--qt}function Bn(){jt=(Ce=se.now())+De,qt=Qt=0;try{ns()}finally{qt=0,is(),jt=0}}function rs(){var e=se.now(),n=e-Ce;n>Jr&&(De-=n,Ce=e)}function is(){for(var e,n=Ae,r,i=1/0;n;)n._call?(i>n._time&&(i=n._time),e=n,n=n._next):(r=n._next,n._next=null,n=e?e._next=r:Ae=r);Jt=e,an(i)}function an(e){if(!qt){Qt&&(Qt=clearTimeout(Qt));var n=e-jt;n>24?(e<1/0&&(Qt=setTimeout(Bn,e-se.now()-De)),Gt&&(Gt=clearInterval(Gt))):(Gt||(Ce=se.now(),Gt=setInterval(rs,Jr)),qt=1,ti(Bn))}}function Xn(e,n,r){var i=new Se;return n=n==null?0:+n,i.restart(o=>{i.stop(),e(o+n)},n,r),i}var os=fe("start","end","cancel","interrupt"),as=[],ei=0,Yn=1,sn=2,ve=3,Zn=4,un=5,me=6;function je(e,n,r,i,o,a){var s=e.__transition;if(!s)e.__transition={};else if(r in s)return;ss(e,r,{name:n,index:i,group:o,on:os,tween:as,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:ei})}function kn(e,n){var r=ht(e,n);if(r.state>ei)throw new Error("too late; already scheduled");return r}function vt(e,n){var r=ht(e,n);if(r.state>ve)throw new Error("too late; already running");return r}function ht(e,n){var r=e.__transition;if(!r||!(r=r[n]))throw new Error("transition not found");return r}function ss(e,n,r){var i=e.__transition,o;i[n]=r,r.timer=wn(a,0,r.time);function a(l){r.state=Yn,r.timer.restart(s,r.delay,r.time),r.delay<=l&&s(l-r.delay)}function s(l){var c,h,d,g;if(r.state!==Yn)return f();for(c in i)if(g=i[c],g.name===r.name){if(g.state===ve)return Xn(s);g.state===Zn?(g.state=me,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete i[c]):+c<n&&(g.state=me,g.timer.stop(),g.on.call("cancel",e,e.__data__,g.index,g.group),delete i[c])}if(Xn(function(){r.state===ve&&(r.state=Zn,r.timer.restart(u,r.delay,r.time),u(l))}),r.state=sn,r.on.call("start",e,e.__data__,r.index,r.group),r.state===sn){for(r.state=ve,o=new Array(d=r.tween.length),c=0,h=-1;c<d;++c)(g=r.tween[c].value.call(e,e.__data__,r.index,r.group))&&(o[++h]=g);o.length=h+1}}function u(l){for(var c=l<r.duration?r.ease.call(null,l/r.duration):(r.timer.restart(f),r.state=un,1),h=-1,d=o.length;++h<d;)o[h].call(e,c);r.state===un&&(r.on.call("end",e,e.__data__,r.index,r.group),f())}function f(){r.state=me,r.timer.stop(),delete i[n];for(var l in i)return;delete e.__transition}}function be(e,n){var r=e.__transition,i,o,a=!0,s;if(r){n=n==null?null:n+"";for(s in r){if((i=r[s]).name!==n){a=!1;continue}o=i.state>sn&&i.state<un,i.state=me,i.timer.stop(),i.on.call(o?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[s]}a&&delete e.__transition}}function us(e){return this.each(function(){be(this,e)})}function ls(e,n){var r,i;return function(){var o=vt(this,e),a=o.tween;if(a!==r){i=r=a;for(var s=0,u=i.length;s<u;++s)if(i[s].name===n){i=i.slice(),i.splice(s,1);break}}o.tween=i}}function fs(e,n,r){var i,o;if(typeof r!="function")throw new Error;return function(){var a=vt(this,e),s=a.tween;if(s!==i){o=(i=s).slice();for(var u={name:n,value:r},f=0,l=o.length;f<l;++f)if(o[f].name===n){o[f]=u;break}f===l&&o.push(u)}a.tween=o}}function cs(e,n){var r=this._id;if(e+="",arguments.length<2){for(var i=ht(this.node(),r).tween,o=0,a=i.length,s;o<a;++o)if((s=i[o]).name===e)return s.value;return null}return this.each((n==null?ls:fs)(r,e,n))}function An(e,n,r){var i=e._id;return e.each(function(){var o=vt(this,i);(o.value||(o.value={}))[n]=r.apply(this,arguments)}),function(o){return ht(o,i).value[n]}}function ni(e,n){var r;return(typeof n=="number"?Nt:n instanceof jn?$n:(r=jn(n))?(n=r,$n):Li)(e,n)}function hs(e){return function(){this.removeAttribute(e)}}function ds(e){return function(){this.removeAttributeNS(e.space,e.local)}}function ps(e,n,r){var i,o=r+"",a;return function(){var s=this.getAttribute(e);return s===o?null:s===i?a:a=n(i=s,r)}}function gs(e,n,r){var i,o=r+"",a;return function(){var s=this.getAttributeNS(e.space,e.local);return s===o?null:s===i?a:a=n(i=s,r)}}function ys(e,n,r){var i,o,a;return function(){var s,u=r(this),f;return u==null?void this.removeAttribute(e):(s=this.getAttribute(e),f=u+"",s===f?null:s===i&&f===o?a:(o=f,a=n(i=s,u)))}}function _s(e,n,r){var i,o,a;return function(){var s,u=r(this),f;return u==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),f=u+"",s===f?null:s===i&&f===o?a:(o=f,a=n(i=s,u)))}}function vs(e,n){var r=Ne(e),i=r==="transform"?Yi:ni;return this.attrTween(e,typeof n=="function"?(r.local?_s:ys)(r,i,An(this,"attr."+e,n)):n==null?(r.local?ds:hs)(r):(r.local?gs:ps)(r,i,n))}function ms(e,n){return function(r){this.setAttribute(e,n.call(this,r))}}function bs(e,n){return function(r){this.setAttributeNS(e.space,e.local,n.call(this,r))}}function xs(e,n){var r,i;function o(){var a=n.apply(this,arguments);return a!==i&&(r=(i=a)&&bs(e,a)),r}return o._value=n,o}function ws(e,n){var r,i;function o(){var a=n.apply(this,arguments);return a!==i&&(r=(i=a)&&ms(e,a)),r}return o._value=n,o}function ks(e,n){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(n==null)return this.tween(r,null);if(typeof n!="function")throw new Error;var i=Ne(e);return this.tween(r,(i.local?xs:ws)(i,n))}function As(e,n){return function(){kn(this,e).delay=+n.apply(this,arguments)}}function Cs(e,n){return n=+n,function(){kn(this,e).delay=n}}function Ss(e){var n=this._id;return arguments.length?this.each((typeof e=="function"?As:Cs)(n,e)):ht(this.node(),n).delay}function Ts(e,n){return function(){vt(this,e).duration=+n.apply(this,arguments)}}function Ms(e,n){return n=+n,function(){vt(this,e).duration=n}}function Ps(e){var n=this._id;return arguments.length?this.each((typeof e=="function"?Ts:Ms)(n,e)):ht(this.node(),n).duration}function Os(e,n){if(typeof n!="function")throw new Error;return function(){vt(this,e).ease=n}}function Es(e){var n=this._id;return arguments.length?this.each(Os(n,e)):ht(this.node(),n).ease}function zs(e,n){return function(){var r=n.apply(this,arguments);if(typeof r!="function")throw new Error;vt(this,e).ease=r}}function Rs(e){if(typeof e!="function")throw new Error;return this.each(zs(this._id,e))}function Is(e){typeof e!="function"&&(e=Lr(e));for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o)for(var a=n[o],s=a.length,u=i[o]=[],f,l=0;l<s;++l)(f=a[l])&&e.call(f,f.__data__,l,a)&&u.push(f);return new Pt(i,this._parents,this._name,this._id)}function Ns(e){if(e._id!==this._id)throw new Error;for(var n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),u=0;u<a;++u)for(var f=n[u],l=r[u],c=f.length,h=s[u]=new Array(c),d,g=0;g<c;++g)(d=f[g]||l[g])&&(h[g]=d);for(;u<i;++u)s[u]=n[u];return new Pt(s,this._parents,this._name,this._id)}function Ds(e){return(e+"").trim().split(/^|\s+/).every(function(n){var r=n.indexOf(".");return r>=0&&(n=n.slice(0,r)),!n||n==="start"})}function js(e,n,r){var i,o,a=Ds(n)?kn:vt;return function(){var s=a(this,e),u=s.on;u!==i&&(o=(i=u).copy()).on(n,r),s.on=o}}function $s(e,n){var r=this._id;return arguments.length<2?ht(this.node(),r).on.on(e):this.each(js(r,e,n))}function Fs(e){return function(){var n=this.parentNode;for(var r in this.__transition)if(+r!==e)return;n&&n.removeChild(this)}}function Us(){return this.on("end.remove",Fs(this._id))}function Ls(e){var n=this._name,r=this._id;typeof e!="function"&&(e=mn(e));for(var i=this._groups,o=i.length,a=new Array(o),s=0;s<o;++s)for(var u=i[s],f=u.length,l=a[s]=new Array(f),c,h,d=0;d<f;++d)(c=u[d])&&(h=e.call(c,c.__data__,d,u))&&("__data__"in c&&(h.__data__=c.__data__),l[d]=h,je(l[d],n,r,d,l,ht(c,r)));return new Pt(a,this._parents,n,r)}function qs(e){var n=this._name,r=this._id;typeof e!="function"&&(e=Ur(e));for(var i=this._groups,o=i.length,a=[],s=[],u=0;u<o;++u)for(var f=i[u],l=f.length,c,h=0;h<l;++h)if(c=f[h]){for(var d=e.call(c,c.__data__,h,f),g,_=ht(c,r),b=0,y=d.length;b<y;++b)(g=d[b])&&je(g,n,r,b,d,_);a.push(d),s.push(c)}return new Pt(a,s,n,r)}var Hs=le.prototype.constructor;function Gs(){return new Hs(this._groups,this._parents)}function Ws(e,n){var r,i,o;return function(){var a=Lt(this,e),s=(this.style.removeProperty(e),Lt(this,e));return a===s?null:a===r&&s===i?o:o=n(r=a,i=s)}}function ri(e){return function(){this.style.removeProperty(e)}}function Vs(e,n,r){var i,o=r+"",a;return function(){var s=Lt(this,e);return s===o?null:s===i?a:a=n(i=s,r)}}function Bs(e,n,r){var i,o,a;return function(){var s=Lt(this,e),u=r(this),f=u+"";return u==null&&(f=u=(this.style.removeProperty(e),Lt(this,e))),s===f?null:s===i&&f===o?a:(o=f,a=n(i=s,u))}}function Xs(e,n){var r,i,o,a="style."+n,s="end."+a,u;return function(){var f=vt(this,e),l=f.on,c=f.value[a]==null?u||(u=ri(n)):void 0;(l!==r||o!==c)&&(i=(r=l).copy()).on(s,o=c),f.on=i}}function Ys(e,n,r){var i=(e+="")=="transform"?Xi:ni;return n==null?this.styleTween(e,Ws(e,i)).on("end.style."+e,ri(e)):typeof n=="function"?this.styleTween(e,Bs(e,i,An(this,"style."+e,n))).each(Xs(this._id,e)):this.styleTween(e,Vs(e,i,n),r).on("end.style."+e,null)}function Zs(e,n,r){return function(i){this.style.setProperty(e,n.call(this,i),r)}}function Ks(e,n,r){var i,o;function a(){var s=n.apply(this,arguments);return s!==o&&(i=(o=s)&&Zs(e,s,r)),i}return a._value=n,a}function Qs(e,n,r){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(n==null)return this.tween(i,null);if(typeof n!="function")throw new Error;return this.tween(i,Ks(e,n,r??""))}function Js(e){return function(){this.textContent=e}}function tu(e){return function(){var n=e(this);this.textContent=n??""}}function eu(e){return this.tween("text",typeof e=="function"?tu(An(this,"text",e)):Js(e==null?"":e+""))}function nu(e){return function(n){this.textContent=e.call(this,n)}}function ru(e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&nu(o)),n}return i._value=e,i}function iu(e){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;return this.tween(n,ru(e))}function ou(){for(var e=this._name,n=this._id,r=ii(),i=this._groups,o=i.length,a=0;a<o;++a)for(var s=i[a],u=s.length,f,l=0;l<u;++l)if(f=s[l]){var c=ht(f,n);je(f,e,r,l,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Pt(i,this._parents,e,r)}function au(){var e,n,r=this,i=r._id,o=r.size();return new Promise(function(a,s){var u={value:s},f={value:function(){--o===0&&a()}};r.each(function(){var l=vt(this,i),c=l.on;c!==e&&(n=(e=c).copy(),n._.cancel.push(u),n._.interrupt.push(u),n._.end.push(f)),l.on=n}),o===0&&a()})}var su=0;function Pt(e,n,r,i){this._groups=e,this._parents=n,this._name=r,this._id=i}function ii(){return++su}var xt=le.prototype;Pt.prototype={constructor:Pt,select:Ls,selectAll:qs,selectChild:xt.selectChild,selectChildren:xt.selectChildren,filter:Is,merge:Ns,selection:Gs,transition:ou,call:xt.call,nodes:xt.nodes,node:xt.node,size:xt.size,empty:xt.empty,each:xt.each,on:$s,attr:vs,attrTween:ks,style:Ys,styleTween:Qs,text:eu,textTween:iu,remove:Us,tween:cs,delay:Ss,duration:Ps,ease:Es,easeVarying:Rs,end:au,[Symbol.iterator]:xt[Symbol.iterator]};function uu(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var lu={time:null,delay:0,duration:250,ease:uu};function fu(e,n){for(var r;!(r=e.__transition)||!(r=r[n]);)if(!(e=e.parentNode))throw new Error(`transition ${n} not found`);return r}function cu(e){var n,r;e instanceof Pt?(n=e._id,e=e._name):(n=ii(),(r=lu).time=xn(),e=e==null?null:e+"");for(var i=this._groups,o=i.length,a=0;a<o;++a)for(var s=i[a],u=s.length,f,l=0;l<u;++l)(f=s[l])&&je(f,e,n,l,s,r||fu(f,n));return new Pt(i,this._parents,e,n)}le.prototype.interrupt=us;le.prototype.transition=cu;const pe=e=>()=>e;function hu(e,{sourceEvent:n,target:r,transform:i,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function St(e,n,r){this.k=e,this.x=n,this.y=r}St.prototype={constructor:St,scale:function(e){return e===1?this:new St(this.k*e,this.x,this.y)},translate:function(e,n){return e===0&n===0?this:new St(this.k,this.x+this.k*e,this.y+this.k*n)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Cn=new St(1,0,0);dt.prototype=St.prototype;function dt(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Cn;return e.__zoom}function Ge(e){e.stopImmediatePropagation()}function Wt(e){e.preventDefault(),e.stopImmediatePropagation()}function du(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function pu(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function Kn(){return this.__zoom||Cn}function gu(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function yu(){return navigator.maxTouchPoints||"ontouchstart"in this}function _u(e,n,r){var i=e.invertX(n[0][0])-r[0][0],o=e.invertX(n[1][0])-r[1][0],a=e.invertY(n[0][1])-r[0][1],s=e.invertY(n[1][1])-r[1][1];return e.translate(o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o),s>a?(a+s)/2:Math.min(0,a)||Math.max(0,s))}function vu(){var e=du,n=pu,r=_u,i=gu,o=yu,a=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],u=250,f=Ji,l=fe("start","zoom","end"),c,h,d,g=500,_=150,b=0,y=10;function p(A){A.property("__zoom",Kn).on("wheel.zoom",T,{passive:!1}).on("mousedown.zoom",E).on("dblclick.zoom",M).filter(o).on("touchstart.zoom",z).on("touchmove.zoom",N).on("touchend.zoom touchcancel.zoom",j).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}p.transform=function(A,R,P,I){var D=A.selection?A.selection():A;D.property("__zoom",Kn),A!==D?m(A,R,P,I):D.interrupt().each(function(){C(this,arguments).event(I).start().zoom(null,typeof R=="function"?R.apply(this,arguments):R).end()})},p.scaleBy=function(A,R,P,I){p.scaleTo(A,function(){var D=this.__zoom.k,F=typeof R=="function"?R.apply(this,arguments):R;return D*F},P,I)},p.scaleTo=function(A,R,P,I){p.transform(A,function(){var D=n.apply(this,arguments),F=this.__zoom,U=P==null?x(D):typeof P=="function"?P.apply(this,arguments):P,L=F.invert(U),q=typeof R=="function"?R.apply(this,arguments):R;return r(k(v(F,q),U,L),D,s)},P,I)},p.translateBy=function(A,R,P,I){p.transform(A,function(){return r(this.__zoom.translate(typeof R=="function"?R.apply(this,arguments):R,typeof P=="function"?P.apply(this,arguments):P),n.apply(this,arguments),s)},null,I)},p.translateTo=function(A,R,P,I,D){p.transform(A,function(){var F=n.apply(this,arguments),U=this.__zoom,L=I==null?x(F):typeof I=="function"?I.apply(this,arguments):I;return r(Cn.translate(L[0],L[1]).scale(U.k).translate(typeof R=="function"?-R.apply(this,arguments):-R,typeof P=="function"?-P.apply(this,arguments):-P),F,s)},I,D)};function v(A,R){return R=Math.max(a[0],Math.min(a[1],R)),R===A.k?A:new St(R,A.x,A.y)}function k(A,R,P){var I=R[0]-P[0]*A.k,D=R[1]-P[1]*A.k;return I===A.x&&D===A.y?A:new St(A.k,I,D)}function x(A){return[(+A[0][0]+ +A[1][0])/2,(+A[0][1]+ +A[1][1])/2]}function m(A,R,P,I){A.on("start.zoom",function(){C(this,arguments).event(I).start()}).on("interrupt.zoom end.zoom",function(){C(this,arguments).event(I).end()}).tween("zoom",function(){var D=this,F=arguments,U=C(D,F).event(I),L=n.apply(D,F),q=P==null?x(L):typeof P=="function"?P.apply(D,F):P,Z=Math.max(L[1][0]-L[0][0],L[1][1]-L[0][1]),X=D.__zoom,ut=typeof R=="function"?R.apply(D,F):R,mt=f(X.invert(q).concat(Z/X.k),ut.invert(q).concat(Z/ut.k));return function(lt){if(lt===1)lt=ut;else{var bt=mt(lt),qe=Z/bt[2];lt=new St(qe,q[0]-bt[0]*qe,q[1]-bt[1]*qe)}U.zoom(null,lt)}})}function C(A,R,P){return!P&&A.__zooming||new S(A,R)}function S(A,R){this.that=A,this.args=R,this.active=0,this.sourceEvent=null,this.extent=n.apply(A,R),this.taps=0}S.prototype={event:function(A){return A&&(this.sourceEvent=A),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(A,R){return this.mouse&&A!=="mouse"&&(this.mouse[1]=R.invert(this.mouse[0])),this.touch0&&A!=="touch"&&(this.touch0[1]=R.invert(this.touch0[0])),this.touch1&&A!=="touch"&&(this.touch1[1]=R.invert(this.touch1[0])),this.that.__zoom=R,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(A){var R=at(this.that).datum();l.call(A,this.that,new hu(A,{sourceEvent:this.sourceEvent,target:p,transform:this.that.__zoom,dispatch:l}),R)}};function T(A,...R){if(!e.apply(this,arguments))return;var P=C(this,R).event(A),I=this.__zoom,D=Math.max(a[0],Math.min(a[1],I.k*Math.pow(2,i.apply(this,arguments)))),F=pt(A);if(P.wheel)(P.mouse[0][0]!==F[0]||P.mouse[0][1]!==F[1])&&(P.mouse[1]=I.invert(P.mouse[0]=F)),clearTimeout(P.wheel);else{if(I.k===D)return;P.mouse=[F,I.invert(F)],be(this),P.start()}Wt(A),P.wheel=setTimeout(U,_),P.zoom("mouse",r(k(v(I,D),P.mouse[0],P.mouse[1]),P.extent,s));function U(){P.wheel=null,P.end()}}function E(A,...R){if(d||!e.apply(this,arguments))return;var P=A.currentTarget,I=C(this,R,!0).event(A),D=at(A.view).on("mousemove.zoom",q,!0).on("mouseup.zoom",Z,!0),F=pt(A,P),U=A.clientX,L=A.clientY;Kr(A.view),Ge(A),I.mouse=[F,this.__zoom.invert(F)],be(this),I.start();function q(X){if(Wt(X),!I.moved){var ut=X.clientX-U,mt=X.clientY-L;I.moved=ut*ut+mt*mt>b}I.event(X).zoom("mouse",r(k(I.that.__zoom,I.mouse[0]=pt(X,P),I.mouse[1]),I.extent,s))}function Z(X){D.on("mousemove.zoom mouseup.zoom",null),Qr(X.view,I.moved),Wt(X),I.event(X).end()}}function M(A,...R){if(e.apply(this,arguments)){var P=this.__zoom,I=pt(A.changedTouches?A.changedTouches[0]:A,this),D=P.invert(I),F=P.k*(A.shiftKey?.5:2),U=r(k(v(P,F),I,D),n.apply(this,R),s);Wt(A),u>0?at(this).transition().duration(u).call(m,U,I,A):at(this).call(p.transform,U,I,A)}}function z(A,...R){if(e.apply(this,arguments)){var P=A.touches,I=P.length,D=C(this,R,A.changedTouches.length===I).event(A),F,U,L,q;for(Ge(A),U=0;U<I;++U)L=P[U],q=pt(L,this),q=[q,this.__zoom.invert(q),L.identifier],D.touch0?!D.touch1&&D.touch0[2]!==q[2]&&(D.touch1=q,D.taps=0):(D.touch0=q,F=!0,D.taps=1+!!c);c&&(c=clearTimeout(c)),F&&(D.taps<2&&(h=q[0],c=setTimeout(function(){c=null},g)),be(this),D.start())}}function N(A,...R){if(this.__zooming){var P=C(this,R).event(A),I=A.changedTouches,D=I.length,F,U,L,q;for(Wt(A),F=0;F<D;++F)U=I[F],L=pt(U,this),P.touch0&&P.touch0[2]===U.identifier?P.touch0[0]=L:P.touch1&&P.touch1[2]===U.identifier&&(P.touch1[0]=L);if(U=P.that.__zoom,P.touch1){var Z=P.touch0[0],X=P.touch0[1],ut=P.touch1[0],mt=P.touch1[1],lt=(lt=ut[0]-Z[0])*lt+(lt=ut[1]-Z[1])*lt,bt=(bt=mt[0]-X[0])*bt+(bt=mt[1]-X[1])*bt;U=v(U,Math.sqrt(lt/bt)),L=[(Z[0]+ut[0])/2,(Z[1]+ut[1])/2],q=[(X[0]+mt[0])/2,(X[1]+mt[1])/2]}else if(P.touch0)L=P.touch0[0],q=P.touch0[1];else return;P.zoom("touch",r(k(U,L,q),P.extent,s))}}function j(A,...R){if(this.__zooming){var P=C(this,R).event(A),I=A.changedTouches,D=I.length,F,U;for(Ge(A),d&&clearTimeout(d),d=setTimeout(function(){d=null},g),F=0;F<D;++F)U=I[F],P.touch0&&P.touch0[2]===U.identifier?delete P.touch0:P.touch1&&P.touch1[2]===U.identifier&&delete P.touch1;if(P.touch1&&!P.touch0&&(P.touch0=P.touch1,delete P.touch1),P.touch0)P.touch0[1]=this.__zoom.invert(P.touch0[0]);else if(P.end(),P.taps===2&&(U=pt(U,this),Math.hypot(h[0]-U[0],h[1]-U[1])<y)){var L=at(this).on("dblclick.zoom");L&&L.apply(this,arguments)}}}return p.wheelDelta=function(A){return arguments.length?(i=typeof A=="function"?A:pe(+A),p):i},p.filter=function(A){return arguments.length?(e=typeof A=="function"?A:pe(!!A),p):e},p.touchable=function(A){return arguments.length?(o=typeof A=="function"?A:pe(!!A),p):o},p.extent=function(A){return arguments.length?(n=typeof A=="function"?A:pe([[+A[0][0],+A[0][1]],[+A[1][0],+A[1][1]]]),p):n},p.scaleExtent=function(A){return arguments.length?(a[0]=+A[0],a[1]=+A[1],p):[a[0],a[1]]},p.translateExtent=function(A){return arguments.length?(s[0][0]=+A[0][0],s[1][0]=+A[1][0],s[0][1]=+A[0][1],s[1][1]=+A[1][1],p):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},p.constrain=function(A){return arguments.length?(r=A,p):r},p.duration=function(A){return arguments.length?(u=+A,p):u},p.interpolate=function(A){return arguments.length?(f=A,p):f},p.on=function(){var A=l.on.apply(l,arguments);return A===l?p:A},p.clickDistance=function(A){return arguments.length?(b=(A=+A)*A,p):Math.sqrt(b)},p.tapDistance=function(A){return arguments.length?(y=+A,p):y},p}var mu=typeof global=="object"&&global&&global.Object===Object&&global,bu=typeof self=="object"&&self&&self.Object===Object&&self,oi=mu||bu||Function("return this")(),Te=oi.Symbol,ai=Object.prototype,xu=ai.hasOwnProperty,wu=ai.toString,Vt=Te?Te.toStringTag:void 0;function ku(e){var n=xu.call(e,Vt),r=e[Vt];try{e[Vt]=void 0;var i=!0}catch{}var o=wu.call(e);return i&&(n?e[Vt]=r:delete e[Vt]),o}var Au=Object.prototype,Cu=Au.toString;function Su(e){return Cu.call(e)}var Tu="[object Null]",Mu="[object Undefined]",Qn=Te?Te.toStringTag:void 0;function Pu(e){return e==null?e===void 0?Mu:Tu:Qn&&Qn in Object(e)?ku(e):Su(e)}function Ou(e){return e!=null&&typeof e=="object"}var Eu="[object Symbol]";function zu(e){return typeof e=="symbol"||Ou(e)&&Pu(e)==Eu}var Ru=/\s/;function Iu(e){for(var n=e.length;n--&&Ru.test(e.charAt(n)););return n}var Nu=/^\s+/;function Du(e){return e&&e.slice(0,Iu(e)+1).replace(Nu,"")}function Me(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}var Jn=NaN,ju=/^[-+]0x[0-9a-f]+$/i,$u=/^0b[01]+$/i,Fu=/^0o[0-7]+$/i,Uu=parseInt;function tr(e){if(typeof e=="number")return e;if(zu(e))return Jn;if(Me(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=Me(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=Du(e);var r=$u.test(e);return r||Fu.test(e)?Uu(e.slice(2),r?2:8):ju.test(e)?Jn:+e}var We=function(){return oi.Date.now()},Lu="Expected a function",qu=Math.max,Hu=Math.min;function si(e,n,r){var i,o,a,s,u,f,l=0,c=!1,h=!1,d=!0;if(typeof e!="function")throw new TypeError(Lu);n=tr(n)||0,Me(r)&&(c=!!r.leading,h="maxWait"in r,a=h?qu(tr(r.maxWait)||0,n):a,d="trailing"in r?!!r.trailing:d);function g(C){var S=i,T=o;return i=o=void 0,l=C,s=e.apply(T,S),s}function _(C){return l=C,u=setTimeout(p,n),c?g(C):s}function b(C){var S=C-f,T=C-l,E=n-S;return h?Hu(E,a-T):E}function y(C){var S=C-f,T=C-l;return f===void 0||S>=n||S<0||h&&T>=a}function p(){var C=We();if(y(C))return v(C);u=setTimeout(p,b(C))}function v(C){return u=void 0,d&&i?g(C):(i=o=void 0,s)}function k(){u!==void 0&&clearTimeout(u),l=0,i=f=o=u=void 0}function x(){return u===void 0?s:v(We())}function m(){var C=We(),S=y(C);if(i=arguments,o=this,f=C,S){if(u===void 0)return _(f);if(h)return clearTimeout(u),u=setTimeout(p,n),g(f)}return u===void 0&&(u=setTimeout(p,n)),s}return m.cancel=k,m.flush=x,m}var Gu="Expected a function";function Wu(e,n,r){var i=!0,o=!0;if(typeof e!="function")throw new TypeError(Gu);return Me(r)&&(i="leading"in r?!!r.leading:i,o="trailing"in r?!!r.trailing:o),si(e,n,{leading:i,maxWait:n,trailing:o})}var Dt=Object.freeze({Linear:Object.freeze({None:function(e){return e},In:function(e){return e},Out:function(e){return e},InOut:function(e){return e}}),Quadratic:Object.freeze({In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}}),Cubic:Object.freeze({In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}}),Quartic:Object.freeze({In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}}),Quintic:Object.freeze({In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}}),Sinusoidal:Object.freeze({In:function(e){return 1-Math.sin((1-e)*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return .5*(1-Math.sin(Math.PI*(.5-e)))}}),Exponential:Object.freeze({In:function(e){return e===0?0:Math.pow(1024,e-1)},Out:function(e){return e===1?1:1-Math.pow(2,-10*e)},InOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)}}),Circular:Object.freeze({In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}}),Elastic:Object.freeze({In:function(e){return e===0?0:e===1?1:-Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI)},Out:function(e){return e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e-.1)*5*Math.PI)+1},InOut:function(e){return e===0?0:e===1?1:(e*=2,e<1?-.5*Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI):.5*Math.pow(2,-10*(e-1))*Math.sin((e-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(e){var n=1.70158;return e===1?1:e*e*((n+1)*e-n)},Out:function(e){var n=1.70158;return e===0?0:--e*e*((n+1)*e+n)+1},InOut:function(e){var n=2.5949095;return(e*=2)<1?.5*(e*e*((n+1)*e-n)):.5*((e-=2)*e*((n+1)*e+n)+2)}}),Bounce:Object.freeze({In:function(e){return 1-Dt.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?Dt.Bounce.In(e*2)*.5:Dt.Bounce.Out(e*2-1)*.5+.5}}),generatePow:function(e){return e===void 0&&(e=4),e=e<Number.EPSILON?Number.EPSILON:e,e=e>1e4?1e4:e,{In:function(n){return Math.pow(n,e)},Out:function(n){return 1-Math.pow(1-n,e)},InOut:function(n){return n<.5?Math.pow(n*2,e)/2:(1-Math.pow(2-n*2,e))/2+.5}}}}),te=function(){return performance.now()},ui=(function(){function e(){this._tweens={},this._tweensAddedDuringUpdate={}}return e.prototype.getAll=function(){var n=this;return Object.keys(this._tweens).map(function(r){return n._tweens[r]})},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(n){this._tweens[n.getId()]=n,this._tweensAddedDuringUpdate[n.getId()]=n},e.prototype.remove=function(n){delete this._tweens[n.getId()],delete this._tweensAddedDuringUpdate[n.getId()]},e.prototype.update=function(n,r){n===void 0&&(n=te()),r===void 0&&(r=!1);var i=Object.keys(this._tweens);if(i.length===0)return!1;for(;i.length>0;){this._tweensAddedDuringUpdate={};for(var o=0;o<i.length;o++){var a=this._tweens[i[o]],s=!r;a&&a.update(n,s)===!1&&!r&&delete this._tweens[i[o]]}i=Object.keys(this._tweensAddedDuringUpdate)}return!0},e})(),ln={Linear:function(e,n){var r=e.length-1,i=r*n,o=Math.floor(i),a=ln.Utils.Linear;return n<0?a(e[0],e[1],i):n>1?a(e[r],e[r-1],r-i):a(e[o],e[o+1>r?r:o+1],i-o)},Utils:{Linear:function(e,n,r){return(n-e)*r+e}}},li=(function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e})(),fn=new ui,er=(function(){function e(n,r){r===void 0&&(r=fn),this._object=n,this._group=r,this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=Dt.Linear.None,this._interpolationFunction=ln.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=li.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1}return e.prototype.getId=function(){return this._id},e.prototype.isPlaying=function(){return this._isPlaying},e.prototype.isPaused=function(){return this._isPaused},e.prototype.getDuration=function(){return this._duration},e.prototype.to=function(n,r){if(r===void 0&&(r=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=n,this._propertiesAreSetUp=!1,this._duration=r<0?0:r,this},e.prototype.duration=function(n){return n===void 0&&(n=1e3),this._duration=n<0?0:n,this},e.prototype.dynamic=function(n){return n===void 0&&(n=!1),this._isDynamic=n,this},e.prototype.start=function(n,r){if(n===void 0&&(n=te()),r===void 0&&(r=!1),this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var i in this._valuesStartRepeat)this._swapEndStartRepeatValues(i),this._valuesStart[i]=this._valuesStartRepeat[i]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=n,this._startTime+=this._delayTime,!this._propertiesAreSetUp||r){if(this._propertiesAreSetUp=!0,!this._isDynamic){var o={};for(var a in this._valuesEnd)o[a]=this._valuesEnd[a];this._valuesEnd=o}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,r)}return this},e.prototype.startFromCurrentValues=function(n){return this.start(n,!0)},e.prototype._setupProperties=function(n,r,i,o,a){for(var s in i){var u=n[s],f=Array.isArray(u),l=f?"array":typeof u,c=!f&&Array.isArray(i[s]);if(!(l==="undefined"||l==="function")){if(c){var h=i[s];if(h.length===0)continue;for(var d=[u],g=0,_=h.length;g<_;g+=1){var b=this._handleRelativeValue(u,h[g]);if(isNaN(b)){c=!1,console.warn("Found invalid interpolation list. Skipping.");break}d.push(b)}c&&(i[s]=d)}if((l==="object"||f)&&u&&!c){r[s]=f?[]:{};var y=u;for(var p in y)r[s][p]=y[p];o[s]=f?[]:{};var h=i[s];if(!this._isDynamic){var v={};for(var p in h)v[p]=h[p];i[s]=h=v}this._setupProperties(y,r[s],h,o[s],a)}else(typeof r[s]>"u"||a)&&(r[s]=u),f||(r[s]*=1),c?o[s]=i[s].slice().reverse():o[s]=r[s]||0}}},e.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},e.prototype.end=function(){return this._goToEnd=!0,this.update(1/0),this},e.prototype.pause=function(n){return n===void 0&&(n=te()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=n,this._group&&this._group.remove(this),this)},e.prototype.resume=function(n){return n===void 0&&(n=te()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=n-this._pauseStart,this._pauseStart=0,this._group&&this._group.add(this),this)},e.prototype.stopChainedTweens=function(){for(var n=0,r=this._chainedTweens.length;n<r;n++)this._chainedTweens[n].stop();return this},e.prototype.group=function(n){return n===void 0&&(n=fn),this._group=n,this},e.prototype.delay=function(n){return n===void 0&&(n=0),this._delayTime=n,this},e.prototype.repeat=function(n){return n===void 0&&(n=0),this._initialRepeat=n,this._repeat=n,this},e.prototype.repeatDelay=function(n){return this._repeatDelayTime=n,this},e.prototype.yoyo=function(n){return n===void 0&&(n=!1),this._yoyo=n,this},e.prototype.easing=function(n){return n===void 0&&(n=Dt.Linear.None),this._easingFunction=n,this},e.prototype.interpolation=function(n){return n===void 0&&(n=ln.Linear),this._interpolationFunction=n,this},e.prototype.chain=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return this._chainedTweens=n,this},e.prototype.onStart=function(n){return this._onStartCallback=n,this},e.prototype.onEveryStart=function(n){return this._onEveryStartCallback=n,this},e.prototype.onUpdate=function(n){return this._onUpdateCallback=n,this},e.prototype.onRepeat=function(n){return this._onRepeatCallback=n,this},e.prototype.onComplete=function(n){return this._onCompleteCallback=n,this},e.prototype.onStop=function(n){return this._onStopCallback=n,this},e.prototype.update=function(n,r){var i=this,o;if(n===void 0&&(n=te()),r===void 0&&(r=!0),this._isPaused)return!0;var a,s=this._startTime+this._duration;if(!this._goToEnd&&!this._isPlaying){if(n>s)return!1;r&&this.start(n,!0)}if(this._goToEnd=!1,n<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var u=n-this._startTime,f=this._duration+((o=this._repeatDelayTime)!==null&&o!==void 0?o:this._delayTime),l=this._duration+this._repeat*f,c=function(){if(i._duration===0||u>l)return 1;var y=Math.trunc(u/f),p=u-y*f,v=Math.min(p/i._duration,1);return v===0&&u===i._duration?1:v},h=c(),d=this._easingFunction(h);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,d),this._onUpdateCallback&&this._onUpdateCallback(this._object,h),this._duration===0||u>=this._duration)if(this._repeat>0){var g=Math.min(Math.trunc((u-this._duration)/f)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=g);for(a in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[a]=="string"&&(this._valuesStartRepeat[a]=this._valuesStartRepeat[a]+parseFloat(this._valuesEnd[a])),this._yoyo&&this._swapEndStartRepeatValues(a),this._valuesStart[a]=this._valuesStartRepeat[a];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=f*g,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var _=0,b=this._chainedTweens.length;_<b;_++)this._chainedTweens[_].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},e.prototype._updateProperties=function(n,r,i,o){for(var a in i)if(r[a]!==void 0){var s=r[a]||0,u=i[a],f=Array.isArray(n[a]),l=Array.isArray(u),c=!f&&l;c?n[a]=this._interpolationFunction(u,o):typeof u=="object"&&u?this._updateProperties(n[a],s,u,o):(u=this._handleRelativeValue(s,u),typeof u=="number"&&(n[a]=s+(u-s)*o))}},e.prototype._handleRelativeValue=function(n,r){return typeof r!="string"?r:r.charAt(0)==="+"||r.charAt(0)==="-"?n+parseFloat(r):parseFloat(r)},e.prototype._swapEndStartRepeatValues=function(n){var r=this._valuesStartRepeat[n],i=this._valuesEnd[n];typeof i=="string"?this._valuesStartRepeat[n]=this._valuesStartRepeat[n]+parseFloat(i):this._valuesStartRepeat[n]=this._valuesEnd[n],this._valuesEnd[n]=r},e})();li.nextId;var _t=fn;_t.getAll.bind(_t);_t.removeAll.bind(_t);_t.add.bind(_t);_t.remove.bind(_t);_t.update.bind(_t);function nr(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function Vu(e){if(Array.isArray(e))return e}function Bu(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Xu(e,n,r){return Object.defineProperty(e,"prototype",{writable:!1}),e}function Yu(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,a,s,u=[],f=!0,l=!1;try{if(a=(r=r.call(e)).next,n!==0)for(;!(f=(i=a.call(r)).done)&&(u.push(i.value),u.length!==n);f=!0);}catch(c){l=!0,o=c}finally{try{if(!f&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(l)throw o}}return u}}function Zu(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ku(e,n){return Vu(e)||Yu(e,n)||Qu(e,n)||Zu()}function Qu(e,n){if(e){if(typeof e=="string")return nr(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?nr(e,n):void 0}}var Ju=Xu(function e(n,r){var i=r.default,o=i===void 0?null:i,a=r.triggerUpdate,s=a===void 0?!0:a,u=r.onChange,f=u===void 0?function(l,c){}:u;Bu(this,e),this.name=n,this.defaultVal=o,this.triggerUpdate=s,this.onChange=f});function Sn(e){var n=e.stateInit,r=n===void 0?function(){return{}}:n,i=e.props,o=i===void 0?{}:i,a=e.methods,s=a===void 0?{}:a,u=e.aliases,f=u===void 0?{}:u,l=e.init,c=l===void 0?function(){}:l,h=e.update,d=h===void 0?function(){}:h,g=Object.keys(o).map(function(_){return new Ju(_,o[_])});return function _(){for(var b=arguments.length,y=new Array(b),p=0;p<b;p++)y[p]=arguments[p];var v=!!(this instanceof _&&this.constructor),k=v?y.shift():void 0,x=y[0],m=x===void 0?{}:x,C=Object.assign({},r instanceof Function?r(m):r,{initialised:!1}),S={};function T(z){return E(z,m),M(),T}var E=function(N,j){c.call(T,N,C,j),C.initialised=!0},M=si(function(){C.initialised&&(d.call(T,C,S),S={})},1);return g.forEach(function(z){T[z.name]=N(z);function N(j){var A=j.name,R=j.triggerUpdate,P=R===void 0?!1:R,I=j.onChange,D=I===void 0?function(L,q){}:I,F=j.defaultVal,U=F===void 0?null:F;return function(L){var q=C[A];if(!arguments.length)return q;var Z=L===void 0?U:L;return C[A]=Z,D.call(T,Z,C,q),!S.hasOwnProperty(A)&&(S[A]=q),P&&M(),T}}}),Object.keys(s).forEach(function(z){T[z]=function(){for(var N,j=arguments.length,A=new Array(j),R=0;R<j;R++)A[R]=arguments[R];return(N=s[z]).call.apply(N,[T,C].concat(A))}}),Object.entries(f).forEach(function(z){var N=Ku(z,2),j=N[0],A=N[1];return T[j]=T[A]}),T.resetProps=function(){return g.forEach(function(z){T[z.name](z.defaultVal)}),T},T.resetProps(),C._rerender=M,v&&k&&T(k),T}}var H=(function(e){return typeof e=="function"?e:typeof e=="string"?function(n){return n[e]}:function(n){return e}});function Pe(e){"@babel/helpers - typeof";return Pe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Pe(e)}var tl=/^\s+/,el=/\s+$/;function $(e,n){if(e=e||"",n=n||{},e instanceof $)return e;if(!(this instanceof $))return new $(e,n);var r=nl(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=n.format||r.format,this._gradientType=n.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}$.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var n=this.toRgb();return(n.r*299+n.g*587+n.b*114)/1e3},getLuminance:function(){var n=this.toRgb(),r,i,o,a,s,u;return r=n.r/255,i=n.g/255,o=n.b/255,r<=.03928?a=r/12.92:a=Math.pow((r+.055)/1.055,2.4),i<=.03928?s=i/12.92:s=Math.pow((i+.055)/1.055,2.4),o<=.03928?u=o/12.92:u=Math.pow((o+.055)/1.055,2.4),.2126*a+.7152*s+.0722*u},setAlpha:function(n){return this._a=fi(n),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var n=ir(this._r,this._g,this._b);return{h:n.h*360,s:n.s,v:n.v,a:this._a}},toHsvString:function(){var n=ir(this._r,this._g,this._b),r=Math.round(n.h*360),i=Math.round(n.s*100),o=Math.round(n.v*100);return this._a==1?"hsv("+r+", "+i+"%, "+o+"%)":"hsva("+r+", "+i+"%, "+o+"%, "+this._roundA+")"},toHsl:function(){var n=rr(this._r,this._g,this._b);return{h:n.h*360,s:n.s,l:n.l,a:this._a}},toHslString:function(){var n=rr(this._r,this._g,this._b),r=Math.round(n.h*360),i=Math.round(n.s*100),o=Math.round(n.l*100);return this._a==1?"hsl("+r+", "+i+"%, "+o+"%)":"hsla("+r+", "+i+"%, "+o+"%, "+this._roundA+")"},toHex:function(n){return or(this._r,this._g,this._b,n)},toHexString:function(n){return"#"+this.toHex(n)},toHex8:function(n){return al(this._r,this._g,this._b,this._a,n)},toHex8String:function(n){return"#"+this.toHex8(n)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(V(this._r,255)*100)+"%",g:Math.round(V(this._g,255)*100)+"%",b:Math.round(V(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(V(this._r,255)*100)+"%, "+Math.round(V(this._g,255)*100)+"%, "+Math.round(V(this._b,255)*100)+"%)":"rgba("+Math.round(V(this._r,255)*100)+"%, "+Math.round(V(this._g,255)*100)+"%, "+Math.round(V(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:vl[or(this._r,this._g,this._b,!0)]||!1},toFilter:function(n){var r="#"+ar(this._r,this._g,this._b,this._a),i=r,o=this._gradientType?"GradientType = 1, ":"";if(n){var a=$(n);i="#"+ar(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+o+"startColorstr="+r+",endColorstr="+i+")"},toString:function(n){var r=!!n;n=n||this._format;var i=!1,o=this._a<1&&this._a>=0,a=!r&&o&&(n==="hex"||n==="hex6"||n==="hex3"||n==="hex4"||n==="hex8"||n==="name");return a?n==="name"&&this._a===0?this.toName():this.toRgbString():(n==="rgb"&&(i=this.toRgbString()),n==="prgb"&&(i=this.toPercentageRgbString()),(n==="hex"||n==="hex6")&&(i=this.toHexString()),n==="hex3"&&(i=this.toHexString(!0)),n==="hex4"&&(i=this.toHex8String(!0)),n==="hex8"&&(i=this.toHex8String()),n==="name"&&(i=this.toName()),n==="hsl"&&(i=this.toHslString()),n==="hsv"&&(i=this.toHsvString()),i||this.toHexString())},clone:function(){return $(this.toString())},_applyModification:function(n,r){var i=n.apply(null,[this].concat([].slice.call(r)));return this._r=i._r,this._g=i._g,this._b=i._b,this.setAlpha(i._a),this},lighten:function(){return this._applyModification(fl,arguments)},brighten:function(){return this._applyModification(cl,arguments)},darken:function(){return this._applyModification(hl,arguments)},desaturate:function(){return this._applyModification(sl,arguments)},saturate:function(){return this._applyModification(ul,arguments)},greyscale:function(){return this._applyModification(ll,arguments)},spin:function(){return this._applyModification(dl,arguments)},_applyCombination:function(n,r){return n.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(yl,arguments)},complement:function(){return this._applyCombination(pl,arguments)},monochromatic:function(){return this._applyCombination(_l,arguments)},splitcomplement:function(){return this._applyCombination(gl,arguments)},triad:function(){return this._applyCombination(sr,[3])},tetrad:function(){return this._applyCombination(sr,[4])}};$.fromRatio=function(e,n){if(Pe(e)=="object"){var r={};for(var i in e)e.hasOwnProperty(i)&&(i==="a"?r[i]=e[i]:r[i]=ee(e[i]));e=r}return $(e,n)};function nl(e){var n={r:0,g:0,b:0},r=1,i=null,o=null,a=null,s=!1,u=!1;return typeof e=="string"&&(e=wl(e)),Pe(e)=="object"&&(wt(e.r)&&wt(e.g)&&wt(e.b)?(n=rl(e.r,e.g,e.b),s=!0,u=String(e.r).substr(-1)==="%"?"prgb":"rgb"):wt(e.h)&&wt(e.s)&&wt(e.v)?(i=ee(e.s),o=ee(e.v),n=ol(e.h,i,o),s=!0,u="hsv"):wt(e.h)&&wt(e.s)&&wt(e.l)&&(i=ee(e.s),a=ee(e.l),n=il(e.h,i,a),s=!0,u="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=fi(r),{ok:s,format:e.format||u,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:r}}function rl(e,n,r){return{r:V(e,255)*255,g:V(n,255)*255,b:V(r,255)*255}}function rr(e,n,r){e=V(e,255),n=V(n,255),r=V(r,255);var i=Math.max(e,n,r),o=Math.min(e,n,r),a,s,u=(i+o)/2;if(i==o)a=s=0;else{var f=i-o;switch(s=u>.5?f/(2-i-o):f/(i+o),i){case e:a=(n-r)/f+(n<r?6:0);break;case n:a=(r-e)/f+2;break;case r:a=(e-n)/f+4;break}a/=6}return{h:a,s,l:u}}function il(e,n,r){var i,o,a;e=V(e,360),n=V(n,100),r=V(r,100);function s(l,c,h){return h<0&&(h+=1),h>1&&(h-=1),h<1/6?l+(c-l)*6*h:h<1/2?c:h<2/3?l+(c-l)*(2/3-h)*6:l}if(n===0)i=o=a=r;else{var u=r<.5?r*(1+n):r+n-r*n,f=2*r-u;i=s(f,u,e+1/3),o=s(f,u,e),a=s(f,u,e-1/3)}return{r:i*255,g:o*255,b:a*255}}function ir(e,n,r){e=V(e,255),n=V(n,255),r=V(r,255);var i=Math.max(e,n,r),o=Math.min(e,n,r),a,s,u=i,f=i-o;if(s=i===0?0:f/i,i==o)a=0;else{switch(i){case e:a=(n-r)/f+(n<r?6:0);break;case n:a=(r-e)/f+2;break;case r:a=(e-n)/f+4;break}a/=6}return{h:a,s,v:u}}function ol(e,n,r){e=V(e,360)*6,n=V(n,100),r=V(r,100);var i=Math.floor(e),o=e-i,a=r*(1-n),s=r*(1-o*n),u=r*(1-(1-o)*n),f=i%6,l=[r,s,a,a,u,r][f],c=[u,r,r,s,a,a][f],h=[a,a,u,r,r,s][f];return{r:l*255,g:c*255,b:h*255}}function or(e,n,r,i){var o=[ct(Math.round(e).toString(16)),ct(Math.round(n).toString(16)),ct(Math.round(r).toString(16))];return i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function al(e,n,r,i,o){var a=[ct(Math.round(e).toString(16)),ct(Math.round(n).toString(16)),ct(Math.round(r).toString(16)),ct(ci(i))];return o&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function ar(e,n,r,i){var o=[ct(ci(i)),ct(Math.round(e).toString(16)),ct(Math.round(n).toString(16)),ct(Math.round(r).toString(16))];return o.join("")}$.equals=function(e,n){return!e||!n?!1:$(e).toRgbString()==$(n).toRgbString()};$.random=function(){return $.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function sl(e,n){n=n===0?0:n||10;var r=$(e).toHsl();return r.s-=n/100,r.s=$e(r.s),$(r)}function ul(e,n){n=n===0?0:n||10;var r=$(e).toHsl();return r.s+=n/100,r.s=$e(r.s),$(r)}function ll(e){return $(e).desaturate(100)}function fl(e,n){n=n===0?0:n||10;var r=$(e).toHsl();return r.l+=n/100,r.l=$e(r.l),$(r)}function cl(e,n){n=n===0?0:n||10;var r=$(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(n/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(n/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(n/100)))),$(r)}function hl(e,n){n=n===0?0:n||10;var r=$(e).toHsl();return r.l-=n/100,r.l=$e(r.l),$(r)}function dl(e,n){var r=$(e).toHsl(),i=(r.h+n)%360;return r.h=i<0?360+i:i,$(r)}function pl(e){var n=$(e).toHsl();return n.h=(n.h+180)%360,$(n)}function sr(e,n){if(isNaN(n)||n<=0)throw new Error("Argument to polyad must be a positive number");for(var r=$(e).toHsl(),i=[$(e)],o=360/n,a=1;a<n;a++)i.push($({h:(r.h+a*o)%360,s:r.s,l:r.l}));return i}function gl(e){var n=$(e).toHsl(),r=n.h;return[$(e),$({h:(r+72)%360,s:n.s,l:n.l}),$({h:(r+216)%360,s:n.s,l:n.l})]}function yl(e,n,r){n=n||6,r=r||30;var i=$(e).toHsl(),o=360/r,a=[$(e)];for(i.h=(i.h-(o*n>>1)+720)%360;--n;)i.h=(i.h+o)%360,a.push($(i));return a}function _l(e,n){n=n||6;for(var r=$(e).toHsv(),i=r.h,o=r.s,a=r.v,s=[],u=1/n;n--;)s.push($({h:i,s:o,v:a})),a=(a+u)%1;return s}$.mix=function(e,n,r){r=r===0?0:r||50;var i=$(e).toRgb(),o=$(n).toRgb(),a=r/100,s={r:(o.r-i.r)*a+i.r,g:(o.g-i.g)*a+i.g,b:(o.b-i.b)*a+i.b,a:(o.a-i.a)*a+i.a};return $(s)};$.readability=function(e,n){var r=$(e),i=$(n);return(Math.max(r.getLuminance(),i.getLuminance())+.05)/(Math.min(r.getLuminance(),i.getLuminance())+.05)};$.isReadable=function(e,n,r){var i=$.readability(e,n),o,a;switch(a=!1,o=kl(r),o.level+o.size){case"AAsmall":case"AAAlarge":a=i>=4.5;break;case"AAlarge":a=i>=3;break;case"AAAsmall":a=i>=7;break}return a};$.mostReadable=function(e,n,r){var i=null,o=0,a,s,u,f;r=r||{},s=r.includeFallbackColors,u=r.level,f=r.size;for(var l=0;l<n.length;l++)a=$.readability(e,n[l]),a>o&&(o=a,i=$(n[l]));return $.isReadable(e,i,{level:u,size:f})||!s?i:(r.includeFallbackColors=!1,$.mostReadable(e,["#fff","#000"],r))};var cn=$.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},vl=$.hexNames=ml(cn);function ml(e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[e[r]]=r);return n}function fi(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function V(e,n){bl(e)&&(e="100%");var r=xl(e);return e=Math.min(n,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*n,10)/100),Math.abs(e-n)<1e-6?1:e%n/parseFloat(n)}function $e(e){return Math.min(1,Math.max(0,e))}function nt(e){return parseInt(e,16)}function bl(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function xl(e){return typeof e=="string"&&e.indexOf("%")!=-1}function ct(e){return e.length==1?"0"+e:""+e}function ee(e){return e<=1&&(e=e*100+"%"),e}function ci(e){return Math.round(parseFloat(e)*255).toString(16)}function ur(e){return nt(e)/255}var ft=(function(){var e="[-\\+]?\\d+%?",n="[-\\+]?\\d*\\.\\d+%?",r="(?:"+n+")|(?:"+e+")",i="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",o="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+i),rgba:new RegExp("rgba"+o),hsl:new RegExp("hsl"+i),hsla:new RegExp("hsla"+o),hsv:new RegExp("hsv"+i),hsva:new RegExp("hsva"+o),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}})();function wt(e){return!!ft.CSS_UNIT.exec(e)}function wl(e){e=e.replace(tl,"").replace(el,"").toLowerCase();var n=!1;if(cn[e])e=cn[e],n=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=ft.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=ft.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=ft.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=ft.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=ft.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=ft.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=ft.hex8.exec(e))?{r:nt(r[1]),g:nt(r[2]),b:nt(r[3]),a:ur(r[4]),format:n?"name":"hex8"}:(r=ft.hex6.exec(e))?{r:nt(r[1]),g:nt(r[2]),b:nt(r[3]),format:n?"name":"hex"}:(r=ft.hex4.exec(e))?{r:nt(r[1]+""+r[1]),g:nt(r[2]+""+r[2]),b:nt(r[3]+""+r[3]),a:ur(r[4]+""+r[4]),format:n?"name":"hex8"}:(r=ft.hex3.exec(e))?{r:nt(r[1]+""+r[1]),g:nt(r[2]+""+r[2]),b:nt(r[3]+""+r[3]),format:n?"name":"hex"}:!1}function kl(e){var n,r;return e=e||{level:"AA",size:"small"},n=(e.level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),n!=="AA"&&n!=="AAA"&&(n="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:n,size:r}}function hn(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function Al(e){if(Array.isArray(e))return hn(e)}function hi(e,n,r){if(typeof e=="function"?e===n:e.has(n))return arguments.length<3?n:r;throw new TypeError("Private element is not present on this object")}function Cl(e,n){if(n.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Sl(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function it(e,n){return e.get(hi(e,n))}function lr(e,n,r){Cl(e,n),n.set(e,r)}function fr(e,n,r){return e.set(hi(e,n),r),r}function Tl(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,Rl(i.key),i)}}function Ml(e,n,r){return n&&Tl(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Pl(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ol(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function El(e){return Al(e)||Pl(e)||Il(e)||Ol()}function zl(e,n){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Rl(e){var n=zl(e,"string");return typeof n=="symbol"?n:n+""}function Il(e,n){if(e){if(typeof e=="string")return hn(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?hn(e,n):void 0}}var Nl=123,Dl=function(n){return"#".concat(Math.min(n,Math.pow(2,24)).toString(16).padStart(6,"0"))},di=function(n,r,i){return(n<<16)+(r<<8)+i},jl=function(n){var r=$(n).toRgb(),i=r.r,o=r.g,a=r.b;return di(i,o,a)},cr=function(n,r){return n*Nl%Math.pow(2,r)},It=new WeakMap,kt=new WeakMap,$l=(function(){function e(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:6;Sl(this,e),lr(this,It,void 0),lr(this,kt,void 0),fr(kt,this,n),this.reset()}return Ml(e,[{key:"reset",value:function(){fr(It,this,["__reserved for background__"])}},{key:"register",value:function(r){if(it(It,this).length>=Math.pow(2,24-it(kt,this)))return null;var i=it(It,this).length,o=cr(i,it(kt,this)),a=Dl(i+(o<<24-it(kt,this)));return it(It,this).push(r),a}},{key:"lookup",value:function(r){if(!r)return null;var i=typeof r=="string"?jl(r):di.apply(void 0,El(r));if(!i)return null;var o=i&Math.pow(2,24-it(kt,this))-1,a=i>>24-it(kt,this)&Math.pow(2,it(kt,this))-1;return cr(o,it(kt,this))!==a||o>=it(It,this).length?null:it(It,this)[o]}}])})(),ce,B,pi,gi,zt,hr,yi,_i,Ve,xe,ne,vi,Tn,dn,pn,Oe={},Ee=[],Fl=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Fe=Array.isArray;function gt(e,n){for(var r in n)e[r]=n[r];return e}function Mn(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Ul(e,n,r){var i,o,a,s={};for(a in n)a=="key"?i=n[a]:a=="ref"?o=n[a]:s[a]=n[a];if(arguments.length>2&&(s.children=arguments.length>3?ce.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)s[a]===void 0&&(s[a]=e.defaultProps[a]);return re(e,s,i,o,null)}function re(e,n,r,i,o){var a={type:e,props:n,key:r,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++pi,__i:-1,__u:0};return o==null&&B.vnode!=null&&B.vnode(a),a}function Ue(e){return e.children}function we(e,n){this.props=e,this.context=n}function Ht(e,n){if(n==null)return e.__?Ht(e.__,e.__i+1):null;for(var r;n<e.__k.length;n++)if((r=e.__k[n])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?Ht(e):null}function Ll(e){if(e.__P&&e.__d){var n=e.__v,r=n.__e,i=[],o=[],a=gt({},n);a.__v=n.__v+1,B.vnode&&B.vnode(a),Pn(e.__P,a,n,e.__n,e.__P.namespaceURI,32&n.__u?[r]:null,i,r??Ht(n),!!(32&n.__u),o),a.__v=n.__v,a.__.__k[a.__i]=a,ki(i,a,o),n.__e=n.__=null,a.__e!=r&&mi(a)}}function mi(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(n){if(n!=null&&n.__e!=null)return e.__e=e.__c.base=n.__e}),mi(e)}function dr(e){(!e.__d&&(e.__d=!0)&&zt.push(e)&&!ze.__r++||hr!=B.debounceRendering)&&((hr=B.debounceRendering)||yi)(ze)}function ze(){try{for(var e,n=1;zt.length;)zt.length>n&&zt.sort(_i),e=zt.shift(),n=zt.length,Ll(e)}finally{zt.length=ze.__r=0}}function bi(e,n,r,i,o,a,s,u,f,l,c){var h,d,g,_,b,y,p,v=i&&i.__k||Ee,k=n.length;for(f=ql(r,n,v,f,k),h=0;h<k;h++)(g=r.__k[h])!=null&&(d=g.__i!=-1&&v[g.__i]||Oe,g.__i=h,y=Pn(e,g,d,o,a,s,u,f,l,c),_=g.__e,g.ref&&d.ref!=g.ref&&(d.ref&&On(d.ref,null,g),c.push(g.ref,g.__c||_,g)),b==null&&_!=null&&(b=_),(p=!!(4&g.__u))||d.__k===g.__k?(f=xi(g,f,e,p),p&&d.__e&&(d.__e=null)):typeof g.type=="function"&&y!==void 0?f=y:_&&(f=_.nextSibling),g.__u&=-7);return r.__e=b,f}function ql(e,n,r,i,o){var a,s,u,f,l,c=r.length,h=c,d=0;for(e.__k=new Array(o),a=0;a<o;a++)(s=n[a])!=null&&typeof s!="boolean"&&typeof s!="function"?(typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?s=e.__k[a]=re(null,s,null,null,null):Fe(s)?s=e.__k[a]=re(Ue,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=e.__k[a]=re(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[a]=s,f=a+d,s.__=e,s.__b=e.__b+1,u=null,(l=s.__i=Hl(s,r,f,h))!=-1&&(h--,(u=r[l])&&(u.__u|=2)),u==null||u.__v==null?(l==-1&&(o>c?d--:o<c&&d++),typeof s.type!="function"&&(s.__u|=4)):l!=f&&(l==f-1?d--:l==f+1?d++:(l>f?d--:d++,s.__u|=4))):e.__k[a]=null;if(h)for(a=0;a<c;a++)(u=r[a])!=null&&(2&u.__u)==0&&(u.__e==i&&(i=Ht(u)),Ci(u,u));return i}function xi(e,n,r,i){var o,a;if(typeof e.type=="function"){for(o=e.__k,a=0;o&&a<o.length;a++)o[a]&&(o[a].__=e,n=xi(o[a],n,r,i));return n}e.__e!=n&&(i&&(n&&e.type&&!n.parentNode&&(n=Ht(e)),r.insertBefore(e.__e,n||null)),n=e.__e);do n=n&&n.nextSibling;while(n!=null&&n.nodeType==8);return n}function Hl(e,n,r,i){var o,a,s,u=e.key,f=e.type,l=n[r],c=l!=null&&(2&l.__u)==0;if(l===null&&u==null||c&&u==l.key&&f==l.type)return r;if(i>(c?1:0)){for(o=r-1,a=r+1;o>=0||a<n.length;)if((l=n[s=o>=0?o--:a++])!=null&&(2&l.__u)==0&&u==l.key&&f==l.type)return s}return-1}function pr(e,n,r){n[0]=="-"?e.setProperty(n,r??""):e[n]=r==null?"":typeof r!="number"||Fl.test(n)?r:r+"px"}function ge(e,n,r,i,o){var a,s;t:if(n=="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof i=="string"&&(e.style.cssText=i=""),i)for(n in i)r&&n in r||pr(e.style,n,"");if(r)for(n in r)i&&r[n]==i[n]||pr(e.style,n,r[n])}else if(n[0]=="o"&&n[1]=="n")a=n!=(n=n.replace(vi,"$1")),s=n.toLowerCase(),n=s in e||n=="onFocusOut"||n=="onFocusIn"?s.slice(2):n.slice(2),e.l||(e.l={}),e.l[n+a]=r,r?i?r[ne]=i[ne]:(r[ne]=Tn,e.addEventListener(n,a?pn:dn,a)):e.removeEventListener(n,a?pn:dn,a);else{if(o=="http://www.w3.org/2000/svg")n=n.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(n!="width"&&n!="height"&&n!="href"&&n!="list"&&n!="form"&&n!="tabIndex"&&n!="download"&&n!="rowSpan"&&n!="colSpan"&&n!="role"&&n!="popover"&&n in e)try{e[n]=r??"";break t}catch{}typeof r=="function"||(r==null||r===!1&&n[4]!="-"?e.removeAttribute(n):e.setAttribute(n,n=="popover"&&r==1?"":r))}}function gr(e){return function(n){if(this.l){var r=this.l[n.type+e];if(n[xe]==null)n[xe]=Tn++;else if(n[xe]<r[ne])return;return r(B.event?B.event(n):n)}}}function Pn(e,n,r,i,o,a,s,u,f,l){var c,h,d,g,_,b,y,p,v,k,x,m,C,S,T,E,M=n.type;if(n.constructor!==void 0)return null;128&r.__u&&(f=!!(32&r.__u),a=[u=n.__e=r.__e]),(c=B.__b)&&c(n);t:if(typeof M=="function"){h=s.length;try{if(v=n.props,k=M.prototype&&M.prototype.render,x=(c=M.contextType)&&i[c.__c],m=c?x?x.props.value:c.__:i,r.__c?p=(d=n.__c=r.__c).__=d.__E:(k?n.__c=d=new M(v,m):(n.__c=d=new we(v,m),d.constructor=M,d.render=Wl),x&&x.sub(d),d.state||(d.state={}),d.__n=i,g=d.__d=!0,d.__h=[],d._sb=[]),k&&d.__s==null&&(d.__s=d.state),k&&M.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=gt({},d.__s)),gt(d.__s,M.getDerivedStateFromProps(v,d.__s))),_=d.props,b=d.state,d.__v=n,g)k&&M.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),k&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(k&&M.getDerivedStateFromProps==null&&v!==_&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(v,m),n.__v==r.__v||!d.__e&&d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(v,d.__s,m)===!1){n.__v!=r.__v&&(d.props=v,d.state=d.__s,d.__d=!1),n.__e=r.__e,n.__k=r.__k,n.__k.some(function(z){z&&(z.__=n)}),Ee.push.apply(d.__h,d._sb),d._sb=[],d.__h.length&&s.push(d);break t}d.componentWillUpdate!=null&&d.componentWillUpdate(v,d.__s,m),k&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(_,b,y)})}if(d.context=m,d.props=v,d.__P=e,d.__e=!1,C=B.__r,S=0,k)d.state=d.__s,d.__d=!1,C&&C(n),c=d.render(d.props,d.state,d.context),Ee.push.apply(d.__h,d._sb),d._sb=[];else do d.__d=!1,C&&C(n),c=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++S<25);d.state=d.__s,d.getChildContext!=null&&(i=gt(gt({},i),d.getChildContext())),k&&!g&&d.getSnapshotBeforeUpdate!=null&&(y=d.getSnapshotBeforeUpdate(_,b)),T=c!=null&&c.type===Ue&&c.key==null?Ai(c.props.children):c,u=bi(e,Fe(T)?T:[T],n,r,i,o,a,s,u,f,l),d.base=n.__e,n.__u&=-161,d.__h.length&&s.push(d),p&&(d.__E=d.__=null)}catch(z){if(s.length=h,n.__v=null,f||a!=null){if(z.then){for(n.__u|=f?160:128;u&&u.nodeType==8&&u.nextSibling;)u=u.nextSibling;a!=null&&(a[a.indexOf(u)]=null),n.__e=u}else if(a!=null)for(E=a.length;E--;)Mn(a[E])}else n.__e=r.__e;n.__k==null&&(n.__k=r.__k||[]),z.then||wi(n),B.__e(z,n,r)}}else a==null&&n.__v==r.__v?(n.__k=r.__k,n.__e=r.__e):u=n.__e=Gl(r.__e,n,r,i,o,a,s,f,l);return(c=B.diffed)&&c(n),128&n.__u?void 0:u}function wi(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(wi))}function ki(e,n,r){for(var i=0;i<r.length;i++)On(r[i],r[++i],r[++i]);B.__c&&B.__c(n,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(a){a.call(o)})}catch(a){B.__e(a,o.__v)}})}function Ai(e){return typeof e!="object"||e==null||e.__b>0?e:Fe(e)?e.map(Ai):e.constructor!==void 0?null:gt({},e)}function Gl(e,n,r,i,o,a,s,u,f){var l,c,h,d,g,_,b,y=r.props||Oe,p=n.props,v=n.type;if(v=="svg"?o="http://www.w3.org/2000/svg":v=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),a!=null){for(l=0;l<a.length;l++)if((g=a[l])&&"setAttribute"in g==!!v&&(v?g.localName==v:g.nodeType==3)){e=g,a[l]=null;break}}if(e==null){if(v==null)return document.createTextNode(p);e=document.createElementNS(o,v,p.is&&p),u&&(B.__m&&B.__m(n,a),u=!1),a=null}if(v==null)y===p||u&&e.data==p||(e.data=p);else{if(a=v=="textarea"&&p.defaultValue!=null?null:a&&ce.call(e.childNodes),!u&&a!=null)for(y={},l=0;l<e.attributes.length;l++)y[(g=e.attributes[l]).name]=g.value;for(l in y)g=y[l],l=="dangerouslySetInnerHTML"?h=g:l=="children"||l in p||l=="value"&&"defaultValue"in p||l=="checked"&&"defaultChecked"in p||ge(e,l,null,g,o);for(l in p)g=p[l],l=="children"?d=g:l=="dangerouslySetInnerHTML"?c=g:l=="value"?_=g:l=="checked"?b=g:u&&typeof g!="function"||y[l]===g||ge(e,l,g,y[l],o);if(c)u||h&&(c.__html==h.__html||c.__html==e.innerHTML)||(e.innerHTML=c.__html),n.__k=[];else if(h&&(e.innerHTML=""),bi(n.type=="template"?e.content:e,Fe(d)?d:[d],n,r,i,v=="foreignObject"?"http://www.w3.org/1999/xhtml":o,a,s,a?a[0]:r.__k&&Ht(r,0),u,f),a!=null)for(l=a.length;l--;)Mn(a[l]);u&&v!="textarea"||(l="value",v=="progress"&&_==null?e.removeAttribute("value"):_!=null&&(_!==e[l]||v=="progress"&&!_||v=="option"&&_!=y[l])&&ge(e,l,_,y[l],o),l="checked",b!=null&&b!=e[l]&&ge(e,l,b,y[l],o))}return e}function On(e,n,r){try{if(typeof e=="function"){var i=typeof e.__u=="function";i&&e.__u(),i&&n==null||(e.__u=e(n))}else e.current=n}catch(o){B.__e(o,r)}}function Ci(e,n,r){var i,o;if(B.unmount&&B.unmount(e),(i=e.ref)&&(i.current&&i.current!=e.__e||On(i,null,n)),(i=e.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(a){B.__e(a,n)}i.base=i.__P=i.__n=null}if(i=e.__k)for(o=0;o<i.length;o++)i[o]&&Ci(i[o],n,r||typeof e.type!="function");r||Mn(e.__e),e.__c=e.__=e.__e=void 0}function Wl(e,n,r){return this.constructor(e,r)}function Vl(e,n,r){var i,o,a,s;n==document&&(n=document.documentElement),B.__&&B.__(e,n),o=(i=!1)?null:n.__k,a=[],s=[],Pn(n,e=n.__k=Ul(Ue,null,[e]),o||Oe,Oe,n.namespaceURI,o?null:n.firstChild?ce.call(n.childNodes):null,a,o?o.__e:n.firstChild,i,s),ki(a,e,s),e.props.children=null}function Si(e,n,r){var i,o,a,s,u=gt({},e.props);for(a in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),n)a=="key"?i=n[a]:a=="ref"?o=n[a]:u[a]=n[a]===void 0&&s!=null?s[a]:n[a];return arguments.length>2&&(u.children=arguments.length>3?ce.call(arguments,2):r),re(e.type,u,i||e.key,o||e.ref,null)}ce=Ee.slice,B={__e:function(e,n,r,i){for(var o,a,s;n=n.__;)if((o=n.__c)&&!o.__)try{if((a=o.constructor)&&a.getDerivedStateFromError!=null&&(o.setState(a.getDerivedStateFromError(e)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,i||{}),s=o.__d),s)return o.__E=o}catch(u){e=u}throw e}},pi=0,gi=function(e){return e!=null&&e.constructor===void 0},we.prototype.setState=function(e,n){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=gt({},this.state),typeof e=="function"&&(e=e(gt({},r),this.props)),e&>(r,e),e!=null&&this.__v&&(n&&this._sb.push(n),dr(this))},we.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),dr(this))},we.prototype.render=Ue,zt=[],yi=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,_i=function(e,n){return e.__v.__b-n.__v.__b},ze.__r=0,Ve=Math.random().toString(8),xe="__d"+Ve,ne="__a"+Ve,vi=/(PointerCapture)$|Capture$/i,Tn=0,dn=gr(!1),pn=gr(!0);function yr(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function Bl(e){if(Array.isArray(e))return e}function Xl(e,n,r){return(n=tf(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function Yl(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,a,s,u=[],f=!0,l=!1;try{if(a=(r=r.call(e)).next,n!==0)for(;!(f=(i=a.call(r)).done)&&(u.push(i.value),u.length!==n);f=!0);}catch(c){l=!0,o=c}finally{try{if(!f&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(l)throw o}}return u}}function Zl(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _r(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function Kl(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?_r(Object(r),!0).forEach(function(i){Xl(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_r(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function Ql(e,n){return Bl(e)||Yl(e,n)||ef(e,n)||Zl()}function Jl(e,n){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function tf(e){var n=Jl(e,"string");return typeof n=="symbol"?n:n+""}function Re(e){"@babel/helpers - typeof";return Re=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Re(e)}function ef(e,n){if(e){if(typeof e=="string")return yr(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?yr(e,n):void 0}}var gn=function(n){if(Re(n)!=="object")return n;var r=Si(n);if(r.props){var i;r.props=Kl({},r.props),r!=null&&(i=r.props)!==null&&i!==void 0&&i.children&&(r.props.children=Array.isArray(r.props.children)?r.props.children.map(gn):gn(r.props.children))}return r},nf=function(n){return gi(Si(n))},rf=function(n,r){delete r.__k,Vl(gn(n),r)};function of(e,n){n===void 0&&(n={});var r=n.insertAt;if(!(typeof document>"u")){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",r==="top"&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}var af=`.float-tooltip-kap {
|
|
position: absolute;
|
|
width: max-content; /* prevent shrinking near right edge */
|
|
max-width: max(50%, 150px);
|
|
padding: 3px 5px;
|
|
border-radius: 3px;
|
|
font: 12px sans-serif;
|
|
color: #eee;
|
|
background: rgba(0,0,0,0.6);
|
|
pointer-events: none;
|
|
}
|
|
`;of(af);var sf=Sn({props:{content:{default:!1},offsetX:{triggerUpdate:!1},offsetY:{triggerUpdate:!1}},init:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.style,a=o===void 0?{}:o,s=!!n&&Re(n)==="object"&&!!n.node&&typeof n.node=="function",u=at(s?n.node():n);u.style("position")==="static"&&u.style("position","relative"),r.tooltipEl=u.append("div").attr("class","float-tooltip-kap"),Object.entries(a).forEach(function(l){var c=Ql(l,2),h=c[0],d=c[1];return r.tooltipEl.style(h,d)}),r.tooltipEl.style("left","-10000px").style("display","none");var f="tooltip-".concat(Math.round(Math.random()*1e12));r.mouseInside=!1,u.on("mousemove.".concat(f),function(l){r.mouseInside=!0;var c=pt(l),h=u.node(),d=h.offsetWidth,g=h.offsetHeight,_=[r.offsetX===null||r.offsetX===void 0?"-".concat(c[0]/d*100,"%"):typeof r.offsetX=="number"?"calc(-50% + ".concat(r.offsetX,"px)"):r.offsetX,r.offsetY===null||r.offsetY===void 0?g>130&&g-c[1]<100?"calc(-100% - 6px)":"21px":typeof r.offsetY=="number"?r.offsetY<0?"calc(-100% - ".concat(Math.abs(r.offsetY),"px)"):"".concat(r.offsetY,"px"):r.offsetY];r.tooltipEl.style("left",c[0]+"px").style("top",c[1]+"px").style("transform","translate(".concat(_.join(","),")")),r.content&&r.tooltipEl.style("display","inline")}),u.on("mouseover.".concat(f),function(){r.mouseInside=!0,r.content&&r.tooltipEl.style("display","inline")}),u.on("mouseout.".concat(f),function(){r.mouseInside=!1,r.tooltipEl.style("display","none")})},update:function(n){n.tooltipEl.style("display",n.content&&n.mouseInside?"inline":"none"),n.content?n.content instanceof HTMLElement?(n.tooltipEl.text(""),n.tooltipEl.append(function(){return n.content})):typeof n.content=="string"?n.tooltipEl.html(n.content):nf(n.content)?(n.tooltipEl.text(""),rf(n.content,n.tooltipEl.node())):(n.tooltipEl.style("display","none"),console.warn("Tooltip content is invalid, skipping.",n.content,n.content.toString())):n.tooltipEl.text("")}});function uf(e,n,r){var i,o=1;e==null&&(e=0),n==null&&(n=0),r==null&&(r=0);function a(){var s,u=i.length,f,l=0,c=0,h=0;for(s=0;s<u;++s)f=i[s],l+=f.x||0,c+=f.y||0,h+=f.z||0;for(l=(l/u-e)*o,c=(c/u-n)*o,h=(h/u-r)*o,s=0;s<u;++s)f=i[s],l&&(f.x-=l),c&&(f.y-=c),h&&(f.z-=h)}return a.initialize=function(s){i=s},a.x=function(s){return arguments.length?(e=+s,a):e},a.y=function(s){return arguments.length?(n=+s,a):n},a.z=function(s){return arguments.length?(r=+s,a):r},a.strength=function(s){return arguments.length?(o=+s,a):o},a}function lf(e){const n=+this._x.call(null,e);return Ti(this.cover(n),n,e)}function Ti(e,n,r){if(isNaN(n))return e;var i,o=e._root,a={data:r},s=e._x0,u=e._x1,f,l,c,h,d;if(!o)return e._root=a,e;for(;o.length;)if((c=n>=(f=(s+u)/2))?s=f:u=f,i=o,!(o=o[h=+c]))return i[h]=a,e;if(l=+e._x.call(null,o.data),n===l)return a.next=o,i?i[h]=a:e._root=a,e;do i=i?i[h]=new Array(2):e._root=new Array(2),(c=n>=(f=(s+u)/2))?s=f:u=f;while((h=+c)==(d=+(l>=f)));return i[d]=o,i[h]=a,e}function ff(e){Array.isArray(e)||(e=Array.from(e));const n=e.length,r=new Float64Array(n);let i=1/0,o=-1/0;for(let a=0,s;a<n;++a)isNaN(s=+this._x.call(null,e[a]))||(r[a]=s,s<i&&(i=s),s>o&&(o=s));if(i>o)return this;this.cover(i).cover(o);for(let a=0;a<n;++a)Ti(this,r[a],e[a]);return this}function cf(e){if(isNaN(e=+e))return this;var n=this._x0,r=this._x1;if(isNaN(n))r=(n=Math.floor(e))+1;else{for(var i=r-n||1,o=this._root,a,s;n>e||e>=r;)switch(s=+(e<n),a=new Array(2),a[s]=o,o=a,i*=2,s){case 0:r=n+i;break;case 1:n=r-i;break}this._root&&this._root.length&&(this._root=o)}return this._x0=n,this._x1=r,this}function hf(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function df(e){return arguments.length?this.cover(+e[0][0]).cover(+e[1][0]):isNaN(this._x0)?void 0:[[this._x0],[this._x1]]}function Mt(e,n,r){this.node=e,this.x0=n,this.x1=r}function pf(e,n){var r,i=this._x0,o,a,s=this._x1,u=[],f=this._root,l,c;for(f&&u.push(new Mt(f,i,s)),n==null?n=1/0:(i=e-n,s=e+n);l=u.pop();)if(!(!(f=l.node)||(o=l.x0)>s||(a=l.x1)<i))if(f.length){var h=(o+a)/2;u.push(new Mt(f[1],h,a),new Mt(f[0],o,h)),(c=+(e>=h))&&(l=u[u.length-1],u[u.length-1]=u[u.length-1-c],u[u.length-1-c]=l)}else{var d=Math.abs(e-+this._x.call(null,f.data));d<n&&(n=d,i=e-d,s=e+d,r=f.data)}return r}function gf(e){if(isNaN(f=+this._x.call(null,e)))return this;var n,r=this._root,i,o,a,s=this._x0,u=this._x1,f,l,c,h,d;if(!r)return this;if(r.length)for(;;){if((c=f>=(l=(s+u)/2))?s=l:u=l,n=r,!(r=r[h=+c]))return this;if(!r.length)break;n[h+1&1]&&(i=n,d=h)}for(;r.data!==e;)if(o=r,!(r=r.next))return this;return(a=r.next)&&delete r.next,o?(a?o.next=a:delete o.next,this):n?(a?n[h]=a:delete n[h],(r=n[0]||n[1])&&r===(n[1]||n[0])&&!r.length&&(i?i[d]=r:this._root=r),this):(this._root=a,this)}function yf(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function _f(){return this._root}function vf(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function mf(e){var n=[],r,i=this._root,o,a,s;for(i&&n.push(new Mt(i,this._x0,this._x1));r=n.pop();)if(!e(i=r.node,a=r.x0,s=r.x1)&&i.length){var u=(a+s)/2;(o=i[1])&&n.push(new Mt(o,u,s)),(o=i[0])&&n.push(new Mt(o,a,u))}return this}function bf(e){var n=[],r=[],i;for(this._root&&n.push(new Mt(this._root,this._x0,this._x1));i=n.pop();){var o=i.node;if(o.length){var a,s=i.x0,u=i.x1,f=(s+u)/2;(a=o[0])&&n.push(new Mt(a,s,f)),(a=o[1])&&n.push(new Mt(a,f,u))}r.push(i)}for(;i=r.pop();)e(i.node,i.x0,i.x1);return this}function xf(e){return e[0]}function wf(e){return arguments.length?(this._x=e,this):this._x}function Mi(e,n){var r=new En(n??xf,NaN,NaN);return e==null?r:r.addAll(e)}function En(e,n,r){this._x=e,this._x0=n,this._x1=r,this._root=void 0}function vr(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var et=Mi.prototype=En.prototype;et.copy=function(){var e=new En(this._x,this._x0,this._x1),n=this._root,r,i;if(!n)return e;if(!n.length)return e._root=vr(n),e;for(r=[{source:n,target:e._root=new Array(2)}];n=r.pop();)for(var o=0;o<2;++o)(i=n.source[o])&&(i.length?r.push({source:i,target:n.target[o]=new Array(2)}):n.target[o]=vr(i));return e};et.add=lf;et.addAll=ff;et.cover=cf;et.data=hf;et.extent=df;et.find=pf;et.remove=gf;et.removeAll=yf;et.root=_f;et.size=vf;et.visit=mf;et.visitAfter=bf;et.x=wf;function kf(e){const n=+this._x.call(null,e),r=+this._y.call(null,e);return Pi(this.cover(n,r),n,r,e)}function Pi(e,n,r,i){if(isNaN(n)||isNaN(r))return e;var o,a=e._root,s={data:i},u=e._x0,f=e._y0,l=e._x1,c=e._y1,h,d,g,_,b,y,p,v;if(!a)return e._root=s,e;for(;a.length;)if((b=n>=(h=(u+l)/2))?u=h:l=h,(y=r>=(d=(f+c)/2))?f=d:c=d,o=a,!(a=a[p=y<<1|b]))return o[p]=s,e;if(g=+e._x.call(null,a.data),_=+e._y.call(null,a.data),n===g&&r===_)return s.next=a,o?o[p]=s:e._root=s,e;do o=o?o[p]=new Array(4):e._root=new Array(4),(b=n>=(h=(u+l)/2))?u=h:l=h,(y=r>=(d=(f+c)/2))?f=d:c=d;while((p=y<<1|b)===(v=(_>=d)<<1|g>=h));return o[v]=a,o[p]=s,e}function Af(e){var n,r,i=e.length,o,a,s=new Array(i),u=new Array(i),f=1/0,l=1/0,c=-1/0,h=-1/0;for(r=0;r<i;++r)isNaN(o=+this._x.call(null,n=e[r]))||isNaN(a=+this._y.call(null,n))||(s[r]=o,u[r]=a,o<f&&(f=o),o>c&&(c=o),a<l&&(l=a),a>h&&(h=a));if(f>c||l>h)return this;for(this.cover(f,l).cover(c,h),r=0;r<i;++r)Pi(this,s[r],u[r],e[r]);return this}function Cf(e,n){if(isNaN(e=+e)||isNaN(n=+n))return this;var r=this._x0,i=this._y0,o=this._x1,a=this._y1;if(isNaN(r))o=(r=Math.floor(e))+1,a=(i=Math.floor(n))+1;else{for(var s=o-r||1,u=this._root,f,l;r>e||e>=o||i>n||n>=a;)switch(l=(n<i)<<1|e<r,f=new Array(4),f[l]=u,u=f,s*=2,l){case 0:o=r+s,a=i+s;break;case 1:r=o-s,a=i+s;break;case 2:o=r+s,i=a-s;break;case 3:r=o-s,i=a-s;break}this._root&&this._root.length&&(this._root=u)}return this._x0=r,this._y0=i,this._x1=o,this._y1=a,this}function Sf(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function Tf(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function J(e,n,r,i,o){this.node=e,this.x0=n,this.y0=r,this.x1=i,this.y1=o}function Mf(e,n,r){var i,o=this._x0,a=this._y0,s,u,f,l,c=this._x1,h=this._y1,d=[],g=this._root,_,b;for(g&&d.push(new J(g,o,a,c,h)),r==null?r=1/0:(o=e-r,a=n-r,c=e+r,h=n+r,r*=r);_=d.pop();)if(!(!(g=_.node)||(s=_.x0)>c||(u=_.y0)>h||(f=_.x1)<o||(l=_.y1)<a))if(g.length){var y=(s+f)/2,p=(u+l)/2;d.push(new J(g[3],y,p,f,l),new J(g[2],s,p,y,l),new J(g[1],y,u,f,p),new J(g[0],s,u,y,p)),(b=(n>=p)<<1|e>=y)&&(_=d[d.length-1],d[d.length-1]=d[d.length-1-b],d[d.length-1-b]=_)}else{var v=e-+this._x.call(null,g.data),k=n-+this._y.call(null,g.data),x=v*v+k*k;if(x<r){var m=Math.sqrt(r=x);o=e-m,a=n-m,c=e+m,h=n+m,i=g.data}}return i}function Pf(e){if(isNaN(c=+this._x.call(null,e))||isNaN(h=+this._y.call(null,e)))return this;var n,r=this._root,i,o,a,s=this._x0,u=this._y0,f=this._x1,l=this._y1,c,h,d,g,_,b,y,p;if(!r)return this;if(r.length)for(;;){if((_=c>=(d=(s+f)/2))?s=d:f=d,(b=h>=(g=(u+l)/2))?u=g:l=g,n=r,!(r=r[y=b<<1|_]))return this;if(!r.length)break;(n[y+1&3]||n[y+2&3]||n[y+3&3])&&(i=n,p=y)}for(;r.data!==e;)if(o=r,!(r=r.next))return this;return(a=r.next)&&delete r.next,o?(a?o.next=a:delete o.next,this):n?(a?n[y]=a:delete n[y],(r=n[0]||n[1]||n[2]||n[3])&&r===(n[3]||n[2]||n[1]||n[0])&&!r.length&&(i?i[p]=r:this._root=r),this):(this._root=a,this)}function Of(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function Ef(){return this._root}function zf(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function Rf(e){var n=[],r,i=this._root,o,a,s,u,f;for(i&&n.push(new J(i,this._x0,this._y0,this._x1,this._y1));r=n.pop();)if(!e(i=r.node,a=r.x0,s=r.y0,u=r.x1,f=r.y1)&&i.length){var l=(a+u)/2,c=(s+f)/2;(o=i[3])&&n.push(new J(o,l,c,u,f)),(o=i[2])&&n.push(new J(o,a,c,l,f)),(o=i[1])&&n.push(new J(o,l,s,u,c)),(o=i[0])&&n.push(new J(o,a,s,l,c))}return this}function If(e){var n=[],r=[],i;for(this._root&&n.push(new J(this._root,this._x0,this._y0,this._x1,this._y1));i=n.pop();){var o=i.node;if(o.length){var a,s=i.x0,u=i.y0,f=i.x1,l=i.y1,c=(s+f)/2,h=(u+l)/2;(a=o[0])&&n.push(new J(a,s,u,c,h)),(a=o[1])&&n.push(new J(a,c,u,f,h)),(a=o[2])&&n.push(new J(a,s,h,c,l)),(a=o[3])&&n.push(new J(a,c,h,f,l))}r.push(i)}for(;i=r.pop();)e(i.node,i.x0,i.y0,i.x1,i.y1);return this}function Nf(e){return e[0]}function Df(e){return arguments.length?(this._x=e,this):this._x}function jf(e){return e[1]}function $f(e){return arguments.length?(this._y=e,this):this._y}function zn(e,n,r){var i=new Rn(n??Nf,r??jf,NaN,NaN,NaN,NaN);return e==null?i:i.addAll(e)}function Rn(e,n,r,i,o,a){this._x=e,this._y=n,this._x0=r,this._y0=i,this._x1=o,this._y1=a,this._root=void 0}function mr(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var tt=zn.prototype=Rn.prototype;tt.copy=function(){var e=new Rn(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root,r,i;if(!n)return e;if(!n.length)return e._root=mr(n),e;for(r=[{source:n,target:e._root=new Array(4)}];n=r.pop();)for(var o=0;o<4;++o)(i=n.source[o])&&(i.length?r.push({source:i,target:n.target[o]=new Array(4)}):n.target[o]=mr(i));return e};tt.add=kf;tt.addAll=Af;tt.cover=Cf;tt.data=Sf;tt.extent=Tf;tt.find=Mf;tt.remove=Pf;tt.removeAll=Of;tt.root=Ef;tt.size=zf;tt.visit=Rf;tt.visitAfter=If;tt.x=Df;tt.y=$f;function Ff(e){const n=+this._x.call(null,e),r=+this._y.call(null,e),i=+this._z.call(null,e);return Oi(this.cover(n,r,i),n,r,i,e)}function Oi(e,n,r,i,o){if(isNaN(n)||isNaN(r)||isNaN(i))return e;var a,s=e._root,u={data:o},f=e._x0,l=e._y0,c=e._z0,h=e._x1,d=e._y1,g=e._z1,_,b,y,p,v,k,x,m,C,S,T;if(!s)return e._root=u,e;for(;s.length;)if((x=n>=(_=(f+h)/2))?f=_:h=_,(m=r>=(b=(l+d)/2))?l=b:d=b,(C=i>=(y=(c+g)/2))?c=y:g=y,a=s,!(s=s[S=C<<2|m<<1|x]))return a[S]=u,e;if(p=+e._x.call(null,s.data),v=+e._y.call(null,s.data),k=+e._z.call(null,s.data),n===p&&r===v&&i===k)return u.next=s,a?a[S]=u:e._root=u,e;do a=a?a[S]=new Array(8):e._root=new Array(8),(x=n>=(_=(f+h)/2))?f=_:h=_,(m=r>=(b=(l+d)/2))?l=b:d=b,(C=i>=(y=(c+g)/2))?c=y:g=y;while((S=C<<2|m<<1|x)===(T=(k>=y)<<2|(v>=b)<<1|p>=_));return a[T]=s,a[S]=u,e}function Uf(e){Array.isArray(e)||(e=Array.from(e));const n=e.length,r=new Float64Array(n),i=new Float64Array(n),o=new Float64Array(n);let a=1/0,s=1/0,u=1/0,f=-1/0,l=-1/0,c=-1/0;for(let h=0,d,g,_,b;h<n;++h)isNaN(g=+this._x.call(null,d=e[h]))||isNaN(_=+this._y.call(null,d))||isNaN(b=+this._z.call(null,d))||(r[h]=g,i[h]=_,o[h]=b,g<a&&(a=g),g>f&&(f=g),_<s&&(s=_),_>l&&(l=_),b<u&&(u=b),b>c&&(c=b));if(a>f||s>l||u>c)return this;this.cover(a,s,u).cover(f,l,c);for(let h=0;h<n;++h)Oi(this,r[h],i[h],o[h],e[h]);return this}function Lf(e,n,r){if(isNaN(e=+e)||isNaN(n=+n)||isNaN(r=+r))return this;var i=this._x0,o=this._y0,a=this._z0,s=this._x1,u=this._y1,f=this._z1;if(isNaN(i))s=(i=Math.floor(e))+1,u=(o=Math.floor(n))+1,f=(a=Math.floor(r))+1;else{for(var l=s-i||1,c=this._root,h,d;i>e||e>=s||o>n||n>=u||a>r||r>=f;)switch(d=(r<a)<<2|(n<o)<<1|e<i,h=new Array(8),h[d]=c,c=h,l*=2,d){case 0:s=i+l,u=o+l,f=a+l;break;case 1:i=s-l,u=o+l,f=a+l;break;case 2:s=i+l,o=u-l,f=a+l;break;case 3:i=s-l,o=u-l,f=a+l;break;case 4:s=i+l,u=o+l,a=f-l;break;case 5:i=s-l,u=o+l,a=f-l;break;case 6:s=i+l,o=u-l,a=f-l;break;case 7:i=s-l,o=u-l,a=f-l;break}this._root&&this._root.length&&(this._root=c)}return this._x0=i,this._y0=o,this._z0=a,this._x1=s,this._y1=u,this._z1=f,this}function qf(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function Hf(e){return arguments.length?this.cover(+e[0][0],+e[0][1],+e[0][2]).cover(+e[1][0],+e[1][1],+e[1][2]):isNaN(this._x0)?void 0:[[this._x0,this._y0,this._z0],[this._x1,this._y1,this._z1]]}function G(e,n,r,i,o,a,s){this.node=e,this.x0=n,this.y0=r,this.z0=i,this.x1=o,this.y1=a,this.z1=s}function Gf(e,n,r,i){var o,a=this._x0,s=this._y0,u=this._z0,f,l,c,h,d,g,_=this._x1,b=this._y1,y=this._z1,p=[],v=this._root,k,x;for(v&&p.push(new G(v,a,s,u,_,b,y)),i==null?i=1/0:(a=e-i,s=n-i,u=r-i,_=e+i,b=n+i,y=r+i,i*=i);k=p.pop();)if(!(!(v=k.node)||(f=k.x0)>_||(l=k.y0)>b||(c=k.z0)>y||(h=k.x1)<a||(d=k.y1)<s||(g=k.z1)<u))if(v.length){var m=(f+h)/2,C=(l+d)/2,S=(c+g)/2;p.push(new G(v[7],m,C,S,h,d,g),new G(v[6],f,C,S,m,d,g),new G(v[5],m,l,S,h,C,g),new G(v[4],f,l,S,m,C,g),new G(v[3],m,C,c,h,d,S),new G(v[2],f,C,c,m,d,S),new G(v[1],m,l,c,h,C,S),new G(v[0],f,l,c,m,C,S)),(x=(r>=S)<<2|(n>=C)<<1|e>=m)&&(k=p[p.length-1],p[p.length-1]=p[p.length-1-x],p[p.length-1-x]=k)}else{var T=e-+this._x.call(null,v.data),E=n-+this._y.call(null,v.data),M=r-+this._z.call(null,v.data),z=T*T+E*E+M*M;if(z<i){var N=Math.sqrt(i=z);a=e-N,s=n-N,u=r-N,_=e+N,b=n+N,y=r+N,o=v.data}}return o}const Wf=(e,n,r,i,o,a)=>Math.sqrt((e-i)**2+(n-o)**2+(r-a)**2);function Vf(e,n,r,i){const o=[],a=e-i,s=n-i,u=r-i,f=e+i,l=n+i,c=r+i;return this.visit((h,d,g,_,b,y,p)=>{if(!h.length)do{const v=h.data;Wf(e,n,r,this._x(v),this._y(v),this._z(v))<=i&&o.push(v)}while(h=h.next);return d>f||g>l||_>c||b<a||y<s||p<u}),o}function Bf(e){if(isNaN(d=+this._x.call(null,e))||isNaN(g=+this._y.call(null,e))||isNaN(_=+this._z.call(null,e)))return this;var n,r=this._root,i,o,a,s=this._x0,u=this._y0,f=this._z0,l=this._x1,c=this._y1,h=this._z1,d,g,_,b,y,p,v,k,x,m,C;if(!r)return this;if(r.length)for(;;){if((v=d>=(b=(s+l)/2))?s=b:l=b,(k=g>=(y=(u+c)/2))?u=y:c=y,(x=_>=(p=(f+h)/2))?f=p:h=p,n=r,!(r=r[m=x<<2|k<<1|v]))return this;if(!r.length)break;(n[m+1&7]||n[m+2&7]||n[m+3&7]||n[m+4&7]||n[m+5&7]||n[m+6&7]||n[m+7&7])&&(i=n,C=m)}for(;r.data!==e;)if(o=r,!(r=r.next))return this;return(a=r.next)&&delete r.next,o?(a?o.next=a:delete o.next,this):n?(a?n[m]=a:delete n[m],(r=n[0]||n[1]||n[2]||n[3]||n[4]||n[5]||n[6]||n[7])&&r===(n[7]||n[6]||n[5]||n[4]||n[3]||n[2]||n[1]||n[0])&&!r.length&&(i?i[C]=r:this._root=r),this):(this._root=a,this)}function Xf(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function Yf(){return this._root}function Zf(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function Kf(e){var n=[],r,i=this._root,o,a,s,u,f,l,c;for(i&&n.push(new G(i,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));r=n.pop();)if(!e(i=r.node,a=r.x0,s=r.y0,u=r.z0,f=r.x1,l=r.y1,c=r.z1)&&i.length){var h=(a+f)/2,d=(s+l)/2,g=(u+c)/2;(o=i[7])&&n.push(new G(o,h,d,g,f,l,c)),(o=i[6])&&n.push(new G(o,a,d,g,h,l,c)),(o=i[5])&&n.push(new G(o,h,s,g,f,d,c)),(o=i[4])&&n.push(new G(o,a,s,g,h,d,c)),(o=i[3])&&n.push(new G(o,h,d,u,f,l,g)),(o=i[2])&&n.push(new G(o,a,d,u,h,l,g)),(o=i[1])&&n.push(new G(o,h,s,u,f,d,g)),(o=i[0])&&n.push(new G(o,a,s,u,h,d,g))}return this}function Qf(e){var n=[],r=[],i;for(this._root&&n.push(new G(this._root,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));i=n.pop();){var o=i.node;if(o.length){var a,s=i.x0,u=i.y0,f=i.z0,l=i.x1,c=i.y1,h=i.z1,d=(s+l)/2,g=(u+c)/2,_=(f+h)/2;(a=o[0])&&n.push(new G(a,s,u,f,d,g,_)),(a=o[1])&&n.push(new G(a,d,u,f,l,g,_)),(a=o[2])&&n.push(new G(a,s,g,f,d,c,_)),(a=o[3])&&n.push(new G(a,d,g,f,l,c,_)),(a=o[4])&&n.push(new G(a,s,u,_,d,g,h)),(a=o[5])&&n.push(new G(a,d,u,_,l,g,h)),(a=o[6])&&n.push(new G(a,s,g,_,d,c,h)),(a=o[7])&&n.push(new G(a,d,g,_,l,c,h))}r.push(i)}for(;i=r.pop();)e(i.node,i.x0,i.y0,i.z0,i.x1,i.y1,i.z1);return this}function Jf(e){return e[0]}function tc(e){return arguments.length?(this._x=e,this):this._x}function ec(e){return e[1]}function nc(e){return arguments.length?(this._y=e,this):this._y}function rc(e){return e[2]}function ic(e){return arguments.length?(this._z=e,this):this._z}function Ei(e,n,r,i){var o=new In(n??Jf,r??ec,i??rc,NaN,NaN,NaN,NaN,NaN,NaN);return e==null?o:o.addAll(e)}function In(e,n,r,i,o,a,s,u,f){this._x=e,this._y=n,this._z=r,this._x0=i,this._y0=o,this._z0=a,this._x1=s,this._y1=u,this._z1=f,this._root=void 0}function br(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var K=Ei.prototype=In.prototype;K.copy=function(){var e=new In(this._x,this._y,this._z,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1),n=this._root,r,i;if(!n)return e;if(!n.length)return e._root=br(n),e;for(r=[{source:n,target:e._root=new Array(8)}];n=r.pop();)for(var o=0;o<8;++o)(i=n.source[o])&&(i.length?r.push({source:i,target:n.target[o]=new Array(8)}):n.target[o]=br(i));return e};K.add=Ff;K.addAll=Uf;K.cover=Lf;K.data=qf;K.extent=Hf;K.find=Gf;K.findAllWithinRadius=Vf;K.remove=Bf;K.removeAll=Xf;K.root=Yf;K.size=Zf;K.visit=Kf;K.visitAfter=Qf;K.x=tc;K.y=nc;K.z=ic;function Tt(e){return function(){return e}}function Ct(e){return(e()-.5)*1e-6}function oc(e){return e.index}function xr(e,n){var r=e.get(n);if(!r)throw new Error("node not found: "+n);return r}function ac(e){var n=oc,r=d,i,o=Tt(30),a,s,u,f,l,c,h=1;e==null&&(e=[]);function d(p){return 1/Math.min(f[p.source.index],f[p.target.index])}function g(p){for(var v=0,k=e.length;v<h;++v)for(var x=0,m,C,S,T=0,E=0,M=0,z,N;x<k;++x)m=e[x],C=m.source,S=m.target,T=S.x+S.vx-C.x-C.vx||Ct(c),u>1&&(E=S.y+S.vy-C.y-C.vy||Ct(c)),u>2&&(M=S.z+S.vz-C.z-C.vz||Ct(c)),z=Math.sqrt(T*T+E*E+M*M),z=(z-a[x])/z*p*i[x],T*=z,E*=z,M*=z,S.vx-=T*(N=l[x]),u>1&&(S.vy-=E*N),u>2&&(S.vz-=M*N),C.vx+=T*(N=1-N),u>1&&(C.vy+=E*N),u>2&&(C.vz+=M*N)}function _(){if(s){var p,v=s.length,k=e.length,x=new Map(s.map((C,S)=>[n(C,S,s),C])),m;for(p=0,f=new Array(v);p<k;++p)m=e[p],m.index=p,typeof m.source!="object"&&(m.source=xr(x,m.source)),typeof m.target!="object"&&(m.target=xr(x,m.target)),f[m.source.index]=(f[m.source.index]||0)+1,f[m.target.index]=(f[m.target.index]||0)+1;for(p=0,l=new Array(k);p<k;++p)m=e[p],l[p]=f[m.source.index]/(f[m.source.index]+f[m.target.index]);i=new Array(k),b(),a=new Array(k),y()}}function b(){if(s)for(var p=0,v=e.length;p<v;++p)i[p]=+r(e[p],p,e)}function y(){if(s)for(var p=0,v=e.length;p<v;++p)a[p]=+o(e[p],p,e)}return g.initialize=function(p,...v){s=p,c=v.find(k=>typeof k=="function")||Math.random,u=v.find(k=>[1,2,3].includes(k))||2,_()},g.links=function(p){return arguments.length?(e=p,_(),g):e},g.id=function(p){return arguments.length?(n=p,g):n},g.iterations=function(p){return arguments.length?(h=+p,g):h},g.strength=function(p){return arguments.length?(r=typeof p=="function"?p:Tt(+p),b(),g):r},g.distance=function(p){return arguments.length?(o=typeof p=="function"?p:Tt(+p),y(),g):o},g}const sc=1664525,uc=1013904223,wr=4294967296;function lc(){let e=1;return()=>(e=(sc*e+uc)%wr)/wr}var kr=3;function Be(e){return e.x}function Ar(e){return e.y}function fc(e){return e.z}var cc=10,hc=Math.PI*(3-Math.sqrt(5)),dc=Math.PI*20/(9+Math.sqrt(221));function pc(e,n){n=n||2;var r=Math.min(kr,Math.max(1,Math.round(n))),i,o=1,a=.001,s=1-Math.pow(a,1/300),u=0,f=.6,l=new Map,c=wn(g),h=fe("tick","end"),d=lc();e==null&&(e=[]);function g(){_(),h.call("tick",i),o<a&&(c.stop(),h.call("end",i))}function _(p){var v,k=e.length,x;p===void 0&&(p=1);for(var m=0;m<p;++m)for(o+=(u-o)*s,l.forEach(function(C){C(o)}),v=0;v<k;++v)x=e[v],x.fx==null?x.x+=x.vx*=f:(x.x=x.fx,x.vx=0),r>1&&(x.fy==null?x.y+=x.vy*=f:(x.y=x.fy,x.vy=0)),r>2&&(x.fz==null?x.z+=x.vz*=f:(x.z=x.fz,x.vz=0));return i}function b(){for(var p=0,v=e.length,k;p<v;++p){if(k=e[p],k.index=p,k.fx!=null&&(k.x=k.fx),k.fy!=null&&(k.y=k.fy),k.fz!=null&&(k.z=k.fz),isNaN(k.x)||r>1&&isNaN(k.y)||r>2&&isNaN(k.z)){var x=cc*(r>2?Math.cbrt(.5+p):r>1?Math.sqrt(.5+p):p),m=p*hc,C=p*dc;r===1?k.x=x:r===2?(k.x=x*Math.cos(m),k.y=x*Math.sin(m)):(k.x=x*Math.sin(m)*Math.cos(C),k.y=x*Math.cos(m),k.z=x*Math.sin(m)*Math.sin(C))}(isNaN(k.vx)||r>1&&isNaN(k.vy)||r>2&&isNaN(k.vz))&&(k.vx=0,r>1&&(k.vy=0),r>2&&(k.vz=0))}}function y(p){return p.initialize&&p.initialize(e,d,r),p}return b(),i={tick:_,restart:function(){return c.restart(g),i},stop:function(){return c.stop(),i},numDimensions:function(p){return arguments.length?(r=Math.min(kr,Math.max(1,Math.round(p))),l.forEach(y),i):r},nodes:function(p){return arguments.length?(e=p,b(),l.forEach(y),i):e},alpha:function(p){return arguments.length?(o=+p,i):o},alphaMin:function(p){return arguments.length?(a=+p,i):a},alphaDecay:function(p){return arguments.length?(s=+p,i):+s},alphaTarget:function(p){return arguments.length?(u=+p,i):u},velocityDecay:function(p){return arguments.length?(f=1-p,i):1-f},randomSource:function(p){return arguments.length?(d=p,l.forEach(y),i):d},force:function(p,v){return arguments.length>1?(v==null?l.delete(p):l.set(p,y(v)),i):l.get(p)},find:function(){var p=Array.prototype.slice.call(arguments),v=p.shift()||0,k=(r>1?p.shift():null)||0,x=(r>2?p.shift():null)||0,m=p.shift()||1/0,C=0,S=e.length,T,E,M,z,N,j;for(m*=m,C=0;C<S;++C)N=e[C],T=v-N.x,E=k-(N.y||0),M=x-(N.z||0),z=T*T+E*E+M*M,z<m&&(j=N,m=z);return j},on:function(p,v){return arguments.length>1?(h.on(p,v),i):h.on(p)}}}function gc(){var e,n,r,i,o,a=Tt(-30),s,u=1,f=1/0,l=.81;function c(_){var b,y=e.length,p=(n===1?Mi(e,Be):n===2?zn(e,Be,Ar):n===3?Ei(e,Be,Ar,fc):null).visitAfter(d);for(o=_,b=0;b<y;++b)r=e[b],p.visit(g)}function h(){if(e){var _,b=e.length,y;for(s=new Array(b),_=0;_<b;++_)y=e[_],s[y.index]=+a(y,_,e)}}function d(_){var b=0,y,p,v=0,k,x,m,C,S=_.length;if(S){for(k=x=m=C=0;C<S;++C)(y=_[C])&&(p=Math.abs(y.value))&&(b+=y.value,v+=p,k+=p*(y.x||0),x+=p*(y.y||0),m+=p*(y.z||0));b*=Math.sqrt(4/S),_.x=k/v,n>1&&(_.y=x/v),n>2&&(_.z=m/v)}else{y=_,y.x=y.data.x,n>1&&(y.y=y.data.y),n>2&&(y.z=y.data.z);do b+=s[y.data.index];while(y=y.next)}_.value=b}function g(_,b,y,p,v){if(!_.value)return!0;var k=[y,p,v][n-1],x=_.x-r.x,m=n>1?_.y-r.y:0,C=n>2?_.z-r.z:0,S=k-b,T=x*x+m*m+C*C;if(S*S/l<T)return T<f&&(x===0&&(x=Ct(i),T+=x*x),n>1&&m===0&&(m=Ct(i),T+=m*m),n>2&&C===0&&(C=Ct(i),T+=C*C),T<u&&(T=Math.sqrt(u*T)),r.vx+=x*_.value*o/T,n>1&&(r.vy+=m*_.value*o/T),n>2&&(r.vz+=C*_.value*o/T)),!0;if(_.length||T>=f)return;(_.data!==r||_.next)&&(x===0&&(x=Ct(i),T+=x*x),n>1&&m===0&&(m=Ct(i),T+=m*m),n>2&&C===0&&(C=Ct(i),T+=C*C),T<u&&(T=Math.sqrt(u*T)));do _.data!==r&&(S=s[_.data.index]*o/T,r.vx+=x*S,n>1&&(r.vy+=m*S),n>2&&(r.vz+=C*S));while(_=_.next)}return c.initialize=function(_,...b){e=_,i=b.find(y=>typeof y=="function")||Math.random,n=b.find(y=>[1,2,3].includes(y))||2,h()},c.strength=function(_){return arguments.length?(a=typeof _=="function"?_:Tt(+_),h(),c):a},c.distanceMin=function(_){return arguments.length?(u=_*_,c):Math.sqrt(u)},c.distanceMax=function(_){return arguments.length?(f=_*_,c):Math.sqrt(f)},c.theta=function(_){return arguments.length?(l=_*_,c):Math.sqrt(l)},c}function yc(e,n,r,i){var o,a,s=Tt(.1),u,f;typeof e!="function"&&(e=Tt(+e)),n==null&&(n=0),r==null&&(r=0),i==null&&(i=0);function l(h){for(var d=0,g=o.length;d<g;++d){var _=o[d],b=_.x-n||1e-6,y=(_.y||0)-r||1e-6,p=(_.z||0)-i||1e-6,v=Math.sqrt(b*b+y*y+p*p),k=(f[d]-v)*u[d]*h/v;_.vx+=b*k,a>1&&(_.vy+=y*k),a>2&&(_.vz+=p*k)}}function c(){if(o){var h,d=o.length;for(u=new Array(d),f=new Array(d),h=0;h<d;++h)f[h]=+e(o[h],h,o),u[h]=isNaN(f[h])?0:+s(o[h],h,o)}}return l.initialize=function(h,...d){o=h,a=d.find(g=>[1,2,3].includes(g))||2,c()},l.strength=function(h){return arguments.length?(s=typeof h=="function"?h:Tt(+h),c(),l):s},l.radius=function(h){return arguments.length?(e=typeof h=="function"?h:Tt(+h),c(),l):e},l.x=function(h){return arguments.length?(n=+h,l):n},l.y=function(h){return arguments.length?(r=+h,l):r},l.z=function(h){return arguments.length?(i=+h,l):i},l}const{abs:Bt,cos:At,sin:$t,acos:_c,atan2:Xt,sqrt:Ot,pow:ot}=Math;function Yt(e){return e<0?-ot(-e,1/3):ot(e,1/3)}const zi=Math.PI,ye=2*zi,Et=zi/2,vc=1e-6,Xe=Number.MAX_SAFE_INTEGER||9007199254740991,Ye=Number.MIN_SAFE_INTEGER||-9007199254740991,mc={x:0,y:0,z:0},O={Tvalues:[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213],Cvalues:[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872],arcfn:function(e,n){const r=n(e);let i=r.x*r.x+r.y*r.y;return typeof r.z<"u"&&(i+=r.z*r.z),Ot(i)},compute:function(e,n,r){if(e===0)return n[0].t=0,n[0];const i=n.length-1;if(e===1)return n[i].t=1,n[i];const o=1-e;let a=n;if(i===0)return n[0].t=e,n[0];if(i===1){const u={x:o*a[0].x+e*a[1].x,y:o*a[0].y+e*a[1].y,t:e};return r&&(u.z=o*a[0].z+e*a[1].z),u}if(i<4){let u=o*o,f=e*e,l,c,h,d=0;i===2?(a=[a[0],a[1],a[2],mc],l=u,c=o*e*2,h=f):i===3&&(l=u*o,c=u*e*3,h=o*f*3,d=e*f);const g={x:l*a[0].x+c*a[1].x+h*a[2].x+d*a[3].x,y:l*a[0].y+c*a[1].y+h*a[2].y+d*a[3].y,t:e};return r&&(g.z=l*a[0].z+c*a[1].z+h*a[2].z+d*a[3].z),g}const s=JSON.parse(JSON.stringify(n));for(;s.length>1;){for(let u=0;u<s.length-1;u++)s[u]={x:s[u].x+(s[u+1].x-s[u].x)*e,y:s[u].y+(s[u+1].y-s[u].y)*e},typeof s[u].z<"u"&&(s[u].z=s[u].z+(s[u+1].z-s[u].z)*e);s.splice(s.length-1,1)}return s[0].t=e,s[0]},computeWithRatios:function(e,n,r,i){const o=1-e,a=r,s=n;let u=a[0],f=a[1],l=a[2],c=a[3],h;if(u*=o,f*=e,s.length===2)return h=u+f,{x:(u*s[0].x+f*s[1].x)/h,y:(u*s[0].y+f*s[1].y)/h,z:i?(u*s[0].z+f*s[1].z)/h:!1,t:e};if(u*=o,f*=2*o,l*=e*e,s.length===3)return h=u+f+l,{x:(u*s[0].x+f*s[1].x+l*s[2].x)/h,y:(u*s[0].y+f*s[1].y+l*s[2].y)/h,z:i?(u*s[0].z+f*s[1].z+l*s[2].z)/h:!1,t:e};if(u*=o,f*=1.5*o,l*=3*o,c*=e*e*e,s.length===4)return h=u+f+l+c,{x:(u*s[0].x+f*s[1].x+l*s[2].x+c*s[3].x)/h,y:(u*s[0].y+f*s[1].y+l*s[2].y+c*s[3].y)/h,z:i?(u*s[0].z+f*s[1].z+l*s[2].z+c*s[3].z)/h:!1,t:e}},derive:function(e,n){const r=[];for(let i=e,o=i.length,a=o-1;o>1;o--,a--){const s=[];for(let u=0,f;u<a;u++)f={x:a*(i[u+1].x-i[u].x),y:a*(i[u+1].y-i[u].y)},n&&(f.z=a*(i[u+1].z-i[u].z)),s.push(f);r.push(s),i=s}return r},between:function(e,n,r){return n<=e&&e<=r||O.approximately(e,n)||O.approximately(e,r)},approximately:function(e,n,r){return Bt(e-n)<=(r||vc)},length:function(e){const r=O.Tvalues.length;let i=0;for(let o=0,a;o<r;o++)a=.5*O.Tvalues[o]+.5,i+=O.Cvalues[o]*O.arcfn(a,e);return .5*i},map:function(e,n,r,i,o){const a=r-n,s=o-i,u=e-n,f=u/a;return i+s*f},lerp:function(e,n,r){const i={x:n.x+e*(r.x-n.x),y:n.y+e*(r.y-n.y)};return n.z!==void 0&&r.z!==void 0&&(i.z=n.z+e*(r.z-n.z)),i},pointToString:function(e){let n=e.x+"/"+e.y;return typeof e.z<"u"&&(n+="/"+e.z),n},pointsToString:function(e){return"["+e.map(O.pointToString).join(", ")+"]"},copy:function(e){return JSON.parse(JSON.stringify(e))},angle:function(e,n,r){const i=n.x-e.x,o=n.y-e.y,a=r.x-e.x,s=r.y-e.y,u=i*s-o*a,f=i*a+o*s;return Xt(u,f)},round:function(e,n){const r=""+e,i=r.indexOf(".");return parseFloat(r.substring(0,i+1+n))},dist:function(e,n){const r=e.x-n.x,i=e.y-n.y;return Ot(r*r+i*i)},closest:function(e,n){let r=ot(2,63),i,o;return e.forEach(function(a,s){o=O.dist(n,a),o<r&&(r=o,i=s)}),{mdist:r,mpos:i}},abcratio:function(e,n){if(n!==2&&n!==3)return!1;if(typeof e>"u")e=.5;else if(e===0||e===1)return e;const r=ot(e,n)+ot(1-e,n),i=r-1;return Bt(i/r)},projectionratio:function(e,n){if(n!==2&&n!==3)return!1;if(typeof e>"u")e=.5;else if(e===0||e===1)return e;const r=ot(1-e,n),i=ot(e,n)+r;return r/i},lli8:function(e,n,r,i,o,a,s,u){const f=(e*i-n*r)*(o-s)-(e-r)*(o*u-a*s),l=(e*i-n*r)*(a-u)-(n-i)*(o*u-a*s),c=(e-r)*(a-u)-(n-i)*(o-s);return c==0?!1:{x:f/c,y:l/c}},lli4:function(e,n,r,i){const o=e.x,a=e.y,s=n.x,u=n.y,f=r.x,l=r.y,c=i.x,h=i.y;return O.lli8(o,a,s,u,f,l,c,h)},lli:function(e,n){return O.lli4(e,e.c,n,n.c)},makeline:function(e,n){return new W(e.x,e.y,(e.x+n.x)/2,(e.y+n.y)/2,n.x,n.y)},findbbox:function(e){let n=Xe,r=Xe,i=Ye,o=Ye;return e.forEach(function(a){const s=a.bbox();n>s.x.min&&(n=s.x.min),r>s.y.min&&(r=s.y.min),i<s.x.max&&(i=s.x.max),o<s.y.max&&(o=s.y.max)}),{x:{min:n,mid:(n+i)/2,max:i,size:i-n},y:{min:r,mid:(r+o)/2,max:o,size:o-r}}},shapeintersections:function(e,n,r,i,o){if(!O.bboxoverlap(n,i))return[];const a=[],s=[e.startcap,e.forward,e.back,e.endcap],u=[r.startcap,r.forward,r.back,r.endcap];return s.forEach(function(f){f.virtual||u.forEach(function(l){if(l.virtual)return;const c=f.intersects(l,o);c.length>0&&(c.c1=f,c.c2=l,c.s1=e,c.s2=r,a.push(c))})}),a},makeshape:function(e,n,r){const i=n.points.length,o=e.points.length,a=O.makeline(n.points[i-1],e.points[0]),s=O.makeline(e.points[o-1],n.points[0]),u={startcap:a,forward:e,back:n,endcap:s,bbox:O.findbbox([a,e,n,s])};return u.intersections=function(f){return O.shapeintersections(u,u.bbox,f,f.bbox,r)},u},getminmax:function(e,n,r){if(!r)return{min:0,max:0};let i=Xe,o=Ye,a,s;r.indexOf(0)===-1&&(r=[0].concat(r)),r.indexOf(1)===-1&&r.push(1);for(let u=0,f=r.length;u<f;u++)a=r[u],s=e.get(a),s[n]<i&&(i=s[n]),s[n]>o&&(o=s[n]);return{min:i,mid:(i+o)/2,max:o,size:o-i}},align:function(e,n){const r=n.p1.x,i=n.p1.y,o=-Xt(n.p2.y-i,n.p2.x-r),a=function(s){return{x:(s.x-r)*At(o)-(s.y-i)*$t(o),y:(s.x-r)*$t(o)+(s.y-i)*At(o)}};return e.map(a)},roots:function(e,n){n=n||{p1:{x:0,y:0},p2:{x:1,y:0}};const r=e.length-1,i=O.align(e,n),o=function(S){return 0<=S&&S<=1};if(r===2){const S=i[0].y,T=i[1].y,E=i[2].y,M=S-2*T+E;if(M!==0){const z=-Ot(T*T-S*E),N=-S+T,j=-(z+N)/M,A=-(-z+N)/M;return[j,A].filter(o)}else if(T!==E&&M===0)return[(2*T-E)/(2*T-2*E)].filter(o);return[]}const a=i[0].y,s=i[1].y,u=i[2].y,f=i[3].y;let l=-a+3*s-3*u+f,c=3*a-6*s+3*u,h=-3*a+3*s,d=a;if(O.approximately(l,0)){if(O.approximately(c,0))return O.approximately(h,0)?[]:[-d/h].filter(o);const S=Ot(h*h-4*c*d),T=2*c;return[(S-h)/T,(-h-S)/T].filter(o)}c/=l,h/=l,d/=l;const g=(3*h-c*c)/3,_=g/3,b=(2*c*c*c-9*c*h+27*d)/27,y=b/2,p=y*y+_*_*_;let v,k,x,m,C;if(p<0){const S=-g/3,T=S*S*S,E=Ot(T),M=-b/(2*E),z=M<-1?-1:M>1?1:M,N=_c(z),j=Yt(E),A=2*j;return x=A*At(N/3)-c/3,m=A*At((N+ye)/3)-c/3,C=A*At((N+2*ye)/3)-c/3,[x,m,C].filter(o)}else{if(p===0)return v=y<0?Yt(-y):-Yt(y),x=2*v-c/3,m=-v-c/3,[x,m].filter(o);{const S=Ot(p);return v=Yt(-y+S),k=Yt(y+S),[v-k-c/3].filter(o)}}},droots:function(e){if(e.length===3){const n=e[0],r=e[1],i=e[2],o=n-2*r+i;if(o!==0){const a=-Ot(r*r-n*i),s=-n+r,u=-(a+s)/o,f=-(-a+s)/o;return[u,f]}else if(r!==i&&o===0)return[(2*r-i)/(2*(r-i))];return[]}if(e.length===2){const n=e[0],r=e[1];return n!==r?[n/(n-r)]:[]}return[]},curvature:function(e,n,r,i,o){let a,s,u,f,l=0,c=0;const h=O.compute(e,n),d=O.compute(e,r),g=h.x*h.x+h.y*h.y;if(i?(a=Ot(ot(h.y*d.z-d.y*h.z,2)+ot(h.z*d.x-d.z*h.x,2)+ot(h.x*d.y-d.x*h.y,2)),s=ot(g+h.z*h.z,3/2)):(a=h.x*d.y-h.y*d.x,s=ot(g,3/2)),a===0||s===0)return{k:0,r:0};if(l=a/s,c=s/a,!o){const _=O.curvature(e-.001,n,r,i,!0).k,b=O.curvature(e+.001,n,r,i,!0).k;f=(b-l+(l-_))/2,u=(Bt(b-l)+Bt(l-_))/2}return{k:l,r:c,dk:f,adk:u}},inflections:function(e){if(e.length<4)return[];const n=O.align(e,{p1:e[0],p2:e.slice(-1)[0]}),r=n[2].x*n[1].y,i=n[3].x*n[1].y,o=n[1].x*n[2].y,a=n[3].x*n[2].y,s=18*(-3*r+2*i+3*o-a),u=18*(3*r-i-3*o),f=18*(o-r);if(O.approximately(s,0)){if(!O.approximately(u,0)){let d=-f/u;if(0<=d&&d<=1)return[d]}return[]}const l=2*s;if(O.approximately(l,0))return[];const c=u*u-4*s*f;if(c<0)return[];const h=Math.sqrt(c);return[(h-u)/l,-(u+h)/l].filter(function(d){return 0<=d&&d<=1})},bboxoverlap:function(e,n){const r=["x","y"],i=r.length;for(let o=0,a,s,u,f;o<i;o++)if(a=r[o],s=e[a].mid,u=n[a].mid,f=(e[a].size+n[a].size)/2,Bt(s-u)>=f)return!1;return!0},expandbox:function(e,n){n.x.min<e.x.min&&(e.x.min=n.x.min),n.y.min<e.y.min&&(e.y.min=n.y.min),n.z&&n.z.min<e.z.min&&(e.z.min=n.z.min),n.x.max>e.x.max&&(e.x.max=n.x.max),n.y.max>e.y.max&&(e.y.max=n.y.max),n.z&&n.z.max>e.z.max&&(e.z.max=n.z.max),e.x.mid=(e.x.min+e.x.max)/2,e.y.mid=(e.y.min+e.y.max)/2,e.z&&(e.z.mid=(e.z.min+e.z.max)/2),e.x.size=e.x.max-e.x.min,e.y.size=e.y.max-e.y.min,e.z&&(e.z.size=e.z.max-e.z.min)},pairiteration:function(e,n,r){const i=e.bbox(),o=n.bbox(),a=1e5,s=r||.5;if(i.x.size+i.y.size<s&&o.x.size+o.y.size<s)return[(a*(e._t1+e._t2)/2|0)/a+"/"+(a*(n._t1+n._t2)/2|0)/a];let u=e.split(.5),f=n.split(.5),l=[{left:u.left,right:f.left},{left:u.left,right:f.right},{left:u.right,right:f.right},{left:u.right,right:f.left}];l=l.filter(function(h){return O.bboxoverlap(h.left.bbox(),h.right.bbox())});let c=[];return l.length===0||(l.forEach(function(h){c=c.concat(O.pairiteration(h.left,h.right,s))}),c=c.filter(function(h,d){return c.indexOf(h)===d})),c},getccenter:function(e,n,r){const i=n.x-e.x,o=n.y-e.y,a=r.x-n.x,s=r.y-n.y,u=i*At(Et)-o*$t(Et),f=i*$t(Et)+o*At(Et),l=a*At(Et)-s*$t(Et),c=a*$t(Et)+s*At(Et),h=(e.x+n.x)/2,d=(e.y+n.y)/2,g=(n.x+r.x)/2,_=(n.y+r.y)/2,b=h+u,y=d+f,p=g+l,v=_+c,k=O.lli8(h,d,b,y,g,_,p,v),x=O.dist(k,e);let m=Xt(e.y-k.y,e.x-k.x),C=Xt(n.y-k.y,n.x-k.x),S=Xt(r.y-k.y,r.x-k.x),T;return m<S?((m>C||C>S)&&(m+=ye),m>S&&(T=S,S=m,m=T)):S<C&&C<m?(T=S,S=m,m=T):S+=ye,k.s=m,k.e=S,k.r=x,k},numberSort:function(e,n){return e-n}};class ie{constructor(n){this.curves=[],this._3d=!1,n&&(this.curves=n,this._3d=this.curves[0]._3d)}valueOf(){return this.toString()}toString(){return"["+this.curves.map(function(n){return O.pointsToString(n.points)}).join(", ")+"]"}addCurve(n){this.curves.push(n),this._3d=this._3d||n._3d}length(){return this.curves.map(function(n){return n.length()}).reduce(function(n,r){return n+r})}curve(n){return this.curves[n]}bbox(){const n=this.curves;for(var r=n[0].bbox(),i=1;i<n.length;i++)O.expandbox(r,n[i].bbox());return r}offset(n){const r=[];return this.curves.forEach(function(i){r.push(...i.offset(n))}),new ie(r)}}const{abs:Zt,min:Cr,max:Sr,cos:bc,sin:xc,acos:wc,sqrt:Kt}=Math,kc=Math.PI;class W{constructor(n){let r=n&&n.forEach?n:Array.from(arguments).slice(),i=!1;if(typeof r[0]=="object"){i=r.length;const g=[];r.forEach(function(_){["x","y","z"].forEach(function(b){typeof _[b]<"u"&&g.push(_[b])})}),r=g}let o=!1;const a=r.length;if(i){if(i>4){if(arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");o=!0}}else if(a!==6&&a!==8&&a!==9&&a!==12&&arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");const s=this._3d=!o&&(a===9||a===12)||n&&n[0]&&typeof n[0].z<"u",u=this.points=[];for(let g=0,_=s?3:2;g<a;g+=_){var f={x:r[g],y:r[g+1]};s&&(f.z=r[g+2]),u.push(f)}const l=this.order=u.length-1,c=this.dims=["x","y"];s&&c.push("z"),this.dimlen=c.length;const h=O.align(u,{p1:u[0],p2:u[l]}),d=O.dist(u[0],u[l]);this._linear=h.reduce((g,_)=>g+Zt(_.y),0)<d/50,this._lut=[],this._t1=0,this._t2=1,this.update()}static quadraticFromPoints(n,r,i,o){if(typeof o>"u"&&(o=.5),o===0)return new W(r,r,i);if(o===1)return new W(n,r,r);const a=W.getABC(2,n,r,i,o);return new W(n,a.A,i)}static cubicFromPoints(n,r,i,o,a){typeof o>"u"&&(o=.5);const s=W.getABC(3,n,r,i,o);typeof a>"u"&&(a=O.dist(r,s.C));const u=a*(1-o)/o,f=O.dist(n,i),l=(i.x-n.x)/f,c=(i.y-n.y)/f,h=a*l,d=a*c,g=u*l,_=u*c,b={x:r.x-h,y:r.y-d},y={x:r.x+g,y:r.y+_},p=s.A,v={x:p.x+(b.x-p.x)/(1-o),y:p.y+(b.y-p.y)/(1-o)},k={x:p.x+(y.x-p.x)/o,y:p.y+(y.y-p.y)/o},x={x:n.x+(v.x-n.x)/o,y:n.y+(v.y-n.y)/o},m={x:i.x+(k.x-i.x)/(1-o),y:i.y+(k.y-i.y)/(1-o)};return new W(n,x,m,i)}static getUtils(){return O}getUtils(){return W.getUtils()}static get PolyBezier(){return ie}valueOf(){return this.toString()}toString(){return O.pointsToString(this.points)}toSVG(){if(this._3d)return!1;const n=this.points,r=n[0].x,i=n[0].y,o=["M",r,i,this.order===2?"Q":"C"];for(let a=1,s=n.length;a<s;a++)o.push(n[a].x),o.push(n[a].y);return o.join(" ")}setRatios(n){if(n.length!==this.points.length)throw new Error("incorrect number of ratio values");this.ratios=n,this._lut=[]}verify(){const n=this.coordDigest();n!==this._print&&(this._print=n,this.update())}coordDigest(){return this.points.map(function(n,r){return""+r+n.x+n.y+(n.z?n.z:0)}).join("")}update(){this._lut=[],this.dpoints=O.derive(this.points,this._3d),this.computedirection()}computedirection(){const n=this.points,r=O.angle(n[0],n[this.order],n[1]);this.clockwise=r>0}length(){return O.length(this.derivative.bind(this))}static getABC(n=2,r,i,o,a=.5){const s=O.projectionratio(a,n),u=1-s,f={x:s*r.x+u*o.x,y:s*r.y+u*o.y},l=O.abcratio(a,n);return{A:{x:i.x+(i.x-f.x)/l,y:i.y+(i.y-f.y)/l},B:i,C:f,S:r,E:o}}getABC(n,r){r=r||this.get(n);let i=this.points[0],o=this.points[this.order];return W.getABC(this.order,i,r,o,n)}getLUT(n){if(this.verify(),n=n||100,this._lut.length===n+1)return this._lut;this._lut=[],n++,this._lut=[];for(let r=0,i,o;r<n;r++)o=r/(n-1),i=this.compute(o),i.t=o,this._lut.push(i);return this._lut}on(n,r){r=r||5;const i=this.getLUT(),o=[];for(let a=0,s,u=0;a<i.length;a++)s=i[a],O.dist(s,n)<r&&(o.push(s),u+=a/i.length);return o.length?t/=o.length:!1}project(n){const r=this.getLUT(),i=r.length-1,o=O.closest(r,n),a=o.mpos,s=(a-1)/i,u=(a+1)/i,f=.1/i;let l=o.mdist,c=s,h=c,d;l+=1;for(let g;c<u+f;c+=f)d=this.compute(c),g=O.dist(n,d),g<l&&(l=g,h=c);return h=h<0?0:h>1?1:h,d=this.compute(h),d.t=h,d.d=l,d}get(n){return this.compute(n)}point(n){return this.points[n]}compute(n){return this.ratios?O.computeWithRatios(n,this.points,this.ratios,this._3d):O.compute(n,this.points,this._3d,this.ratios)}raise(){const n=this.points,r=[n[0]],i=n.length;for(let o=1,a,s;o<i;o++)a=n[o],s=n[o-1],r[o]={x:(i-o)/i*a.x+o/i*s.x,y:(i-o)/i*a.y+o/i*s.y};return r[i]=n[i-1],new W(r)}derivative(n){return O.compute(n,this.dpoints[0],this._3d)}dderivative(n){return O.compute(n,this.dpoints[1],this._3d)}align(){let n=this.points;return new W(O.align(n,{p1:n[0],p2:n[n.length-1]}))}curvature(n){return O.curvature(n,this.dpoints[0],this.dpoints[1],this._3d)}inflections(){return O.inflections(this.points)}normal(n){return this._3d?this.__normal3(n):this.__normal2(n)}__normal2(n){const r=this.derivative(n),i=Kt(r.x*r.x+r.y*r.y);return{t:n,x:-r.y/i,y:r.x/i}}__normal3(n){const r=this.derivative(n),i=this.derivative(n+.01),o=Kt(r.x*r.x+r.y*r.y+r.z*r.z),a=Kt(i.x*i.x+i.y*i.y+i.z*i.z);r.x/=o,r.y/=o,r.z/=o,i.x/=a,i.y/=a,i.z/=a;const s={x:i.y*r.z-i.z*r.y,y:i.z*r.x-i.x*r.z,z:i.x*r.y-i.y*r.x},u=Kt(s.x*s.x+s.y*s.y+s.z*s.z);s.x/=u,s.y/=u,s.z/=u;const f=[s.x*s.x,s.x*s.y-s.z,s.x*s.z+s.y,s.x*s.y+s.z,s.y*s.y,s.y*s.z-s.x,s.x*s.z-s.y,s.y*s.z+s.x,s.z*s.z];return{t:n,x:f[0]*r.x+f[1]*r.y+f[2]*r.z,y:f[3]*r.x+f[4]*r.y+f[5]*r.z,z:f[6]*r.x+f[7]*r.y+f[8]*r.z}}hull(n){let r=this.points,i=[],o=[],a=0;for(o[a++]=r[0],o[a++]=r[1],o[a++]=r[2],this.order===3&&(o[a++]=r[3]);r.length>1;){i=[];for(let s=0,u,f=r.length-1;s<f;s++)u=O.lerp(n,r[s],r[s+1]),o[a++]=u,i.push(u);r=i}return o}split(n,r){if(n===0&&r)return this.split(r).left;if(r===1)return this.split(n).right;const i=this.hull(n),o={left:this.order===2?new W([i[0],i[3],i[5]]):new W([i[0],i[4],i[7],i[9]]),right:this.order===2?new W([i[5],i[4],i[2]]):new W([i[9],i[8],i[6],i[3]]),span:i};return o.left._t1=O.map(0,0,1,this._t1,this._t2),o.left._t2=O.map(n,0,1,this._t1,this._t2),o.right._t1=O.map(n,0,1,this._t1,this._t2),o.right._t2=O.map(1,0,1,this._t1,this._t2),r?(r=O.map(r,n,1,0,1),o.right.split(r).left):o}extrema(){const n={};let r=[];return this.dims.forEach((function(i){let o=function(s){return s[i]},a=this.dpoints[0].map(o);n[i]=O.droots(a),this.order===3&&(a=this.dpoints[1].map(o),n[i]=n[i].concat(O.droots(a))),n[i]=n[i].filter(function(s){return s>=0&&s<=1}),r=r.concat(n[i].sort(O.numberSort))}).bind(this)),n.values=r.sort(O.numberSort).filter(function(i,o){return r.indexOf(i)===o}),n}bbox(){const n=this.extrema(),r={};return this.dims.forEach((function(i){r[i]=O.getminmax(this,i,n[i])}).bind(this)),r}overlaps(n){const r=this.bbox(),i=n.bbox();return O.bboxoverlap(r,i)}offset(n,r){if(typeof r<"u"){const i=this.get(n),o=this.normal(n),a={c:i,n:o,x:i.x+o.x*r,y:i.y+o.y*r};return this._3d&&(a.z=i.z+o.z*r),a}if(this._linear){const i=this.normal(0),o=this.points.map(function(a){const s={x:a.x+n*i.x,y:a.y+n*i.y};return a.z&&i.z&&(s.z=a.z+n*i.z),s});return[new W(o)]}return this.reduce().map(function(i){return i._linear?i.offset(n)[0]:i.scale(n)})}simple(){if(this.order===3){const o=O.angle(this.points[0],this.points[3],this.points[1]),a=O.angle(this.points[0],this.points[3],this.points[2]);if(o>0&&a<0||o<0&&a>0)return!1}const n=this.normal(0),r=this.normal(1);let i=n.x*r.x+n.y*r.y;return this._3d&&(i+=n.z*r.z),Zt(wc(i))<kc/3}reduce(){let n,r=0,i=0,o=.01,a,s=[],u=[],f=this.extrema().values;for(f.indexOf(0)===-1&&(f=[0].concat(f)),f.indexOf(1)===-1&&f.push(1),r=f[0],n=1;n<f.length;n++)i=f[n],a=this.split(r,i),a._t1=r,a._t2=i,s.push(a),r=i;return s.forEach(function(l){for(r=0,i=0;i<=1;)for(i=r+o;i<=1+o;i+=o)if(a=l.split(r,i),!a.simple()){if(i-=o,Zt(r-i)<o)return[];a=l.split(r,i),a._t1=O.map(r,0,1,l._t1,l._t2),a._t2=O.map(i,0,1,l._t1,l._t2),u.push(a),r=i;break}r<1&&(a=l.split(r,1),a._t1=O.map(r,0,1,l._t1,l._t2),a._t2=l._t2,u.push(a))}),u}translate(n,r,i){i=typeof i=="number"?i:r;const o=this.order;let a=this.points.map((s,u)=>(1-u/o)*r+u/o*i);return new W(this.points.map((s,u)=>({x:s.x+n.x*a[u],y:s.y+n.y*a[u]})))}scale(n){const r=this.order;let i=!1;if(typeof n=="function"&&(i=n),i&&r===2)return this.raise().scale(i);const o=this.clockwise,a=this.points;if(this._linear)return this.translate(this.normal(0),i?i(0):n,i?i(1):n);const s=i?i(0):n,u=i?i(1):n,f=[this.offset(0,10),this.offset(1,10)],l=[],c=O.lli4(f[0],f[0].c,f[1],f[1].c);if(!c)throw new Error("cannot scale this curve. Try reducing it first.");return[0,1].forEach(function(h){const d=l[h*r]=O.copy(a[h*r]);d.x+=(h?u:s)*f[h].n.x,d.y+=(h?u:s)*f[h].n.y}),i?([0,1].forEach(function(h){if(!(r===2&&h)){var d=a[h+1],g={x:d.x-c.x,y:d.y-c.y},_=i?i((h+1)/r):n;i&&!o&&(_=-_);var b=Kt(g.x*g.x+g.y*g.y);g.x/=b,g.y/=b,l[h+1]={x:d.x+_*g.x,y:d.y+_*g.y}}}),new W(l)):([0,1].forEach(h=>{if(r===2&&h)return;const d=l[h*r],g=this.derivative(h),_={x:d.x+g.x,y:d.y+g.y};l[h+1]=O.lli4(d,_,c,a[h+1])}),new W(l))}outline(n,r,i,o){if(r=r===void 0?n:r,this._linear){const m=this.normal(0),C=this.points[0],S=this.points[this.points.length-1];let T,E,M;i===void 0&&(i=n,o=r),T={x:C.x+m.x*n,y:C.y+m.y*n},M={x:S.x+m.x*i,y:S.y+m.y*i},E={x:(T.x+M.x)/2,y:(T.y+M.y)/2};const z=[T,E,M];T={x:C.x-m.x*r,y:C.y-m.y*r},M={x:S.x-m.x*o,y:S.y-m.y*o},E={x:(T.x+M.x)/2,y:(T.y+M.y)/2};const N=[M,E,T],j=O.makeline(N[2],z[0]),A=O.makeline(z[2],N[0]),R=[j,new W(z),A,new W(N)];return new ie(R)}const a=this.reduce(),s=a.length,u=[];let f=[],l,c=0,h=this.length();const d=typeof i<"u"&&typeof o<"u";function g(m,C,S,T,E){return function(M){const z=T/S,N=(T+E)/S,j=C-m;return O.map(M,0,1,m+z*j,m+N*j)}}a.forEach(function(m){const C=m.length();d?(u.push(m.scale(g(n,i,h,c,C))),f.push(m.scale(g(-r,-o,h,c,C)))):(u.push(m.scale(n)),f.push(m.scale(-r))),c+=C}),f=f.map(function(m){return l=m.points,l[3]?m.points=[l[3],l[2],l[1],l[0]]:m.points=[l[2],l[1],l[0]],m}).reverse();const _=u[0].points[0],b=u[s-1].points[u[s-1].points.length-1],y=f[s-1].points[f[s-1].points.length-1],p=f[0].points[0],v=O.makeline(y,_),k=O.makeline(b,p),x=[v].concat(u).concat([k]).concat(f);return new ie(x)}outlineshapes(n,r,i){r=r||n;const o=this.outline(n,r).curves,a=[];for(let s=1,u=o.length;s<u/2;s++){const f=O.makeshape(o[s],o[u-s],i);f.startcap.virtual=s>1,f.endcap.virtual=s<u/2-1,a.push(f)}return a}intersects(n,r){return n?n.p1&&n.p2?this.lineIntersects(n):(n instanceof W&&(n=n.reduce()),this.curveintersects(this.reduce(),n,r)):this.selfintersects(r)}lineIntersects(n){const r=Cr(n.p1.x,n.p2.x),i=Cr(n.p1.y,n.p2.y),o=Sr(n.p1.x,n.p2.x),a=Sr(n.p1.y,n.p2.y);return O.roots(this.points,n).filter(s=>{var u=this.get(s);return O.between(u.x,r,o)&&O.between(u.y,i,a)})}selfintersects(n){const r=this.reduce(),i=r.length-2,o=[];for(let a=0,s,u,f;a<i;a++)u=r.slice(a,a+1),f=r.slice(a+2),s=this.curveintersects(u,f,n),o.push(...s);return o}curveintersects(n,r,i){const o=[];n.forEach(function(s){r.forEach(function(u){s.overlaps(u)&&o.push({left:s,right:u})})});let a=[];return o.forEach(function(s){const u=O.pairiteration(s.left,s.right,i);u.length>0&&(a=a.concat(u))}),a}arcs(n){return n=n||.5,this._iterate(n,[])}_error(n,r,i,o){const a=(o-i)/4,s=this.get(i+a),u=this.get(o-a),f=O.dist(n,r),l=O.dist(n,s),c=O.dist(n,u);return Zt(l-f)+Zt(c-f)}_iterate(n,r){let i=0,o=1,a;do{a=0,o=1;let s=this.get(i),u,f,l,c,h=!1,d=!1,g,_=o,b=1;do if(d=h,c=l,_=(i+o)/2,u=this.get(_),f=this.get(o),l=O.getccenter(s,u,f),l.interval={start:i,end:o},h=this._error(l,s,i,o)<=n,g=d&&!h,g||(b=o),h){if(o>=1){if(l.interval.end=b=1,c=l,o>1){let p={x:l.x+l.r*bc(l.e),y:l.y+l.r*xc(l.e)};l.e+=O.angle({x:l.x,y:l.y},p,this.get(1))}break}o=o+(o-i)/2}else o=_;while(!g&&a++<100);if(a>=100)break;c=c||l,r.push(c),i=b}while(o<1);return r}}function yn(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function Ac(e){if(Array.isArray(e))return e}function Cc(e){if(Array.isArray(e))return yn(e)}function Sc(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Tc(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,a,s,u=[],f=!0,l=!1;try{if(a=(r=r.call(e)).next,n!==0)for(;!(f=(i=a.call(r)).done)&&(u.push(i.value),u.length!==n);f=!0);}catch(c){l=!0,o=c}finally{try{if(!f&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(l)throw o}}return u}}function Mc(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Pc(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Oc(e,n){if(e==null)return{};var r,i,o=Ec(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],n.includes(r)||{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Ec(e,n){if(e==null)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(n.includes(i))continue;r[i]=e[i]}return r}function zc(e,n){return Ac(e)||Tc(e,n)||Ri(e,n)||Mc()}function Rc(e){return Cc(e)||Sc(e)||Ri(e)||Pc()}function Ic(e,n){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Nc(e){var n=Ic(e,"string");return typeof n=="symbol"?n:n+""}function Ri(e,n){if(e){if(typeof e=="string")return yn(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?yn(e,n):void 0}}var Dc=(function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,o=(n instanceof Array?n.length?n:[void 0]:[n]).map(function(u){return{keyAccessor:u,isProp:!(u instanceof Function)}}),a=e.reduce(function(u,f){var l=u,c=f;return o.forEach(function(h,d){var g=h.keyAccessor,_=h.isProp,b;if(_){var y=c,p=y[g],v=Oc(y,[g].map(Nc));b=p,c=v}else b=g(c,d);d+1<o.length?(l.hasOwnProperty(b)||(l[b]={}),l=l[b]):r?(l.hasOwnProperty(b)||(l[b]=[]),l[b].push(c)):l[b]=c}),u},{});r instanceof Function&&(function u(f){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;l===o.length?Object.keys(f).forEach(function(c){return f[c]=r(f[c])}):Object.values(f).forEach(function(c){return u(c,l+1)})})(a);var s=a;return i&&(s=[],(function u(f){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];l.length===o.length?s.push({keys:l,vals:f}):Object.entries(f).forEach(function(c){var h=zc(c,2),d=h[0],g=h[1];return u(g,[].concat(Rc(l),[d]))})})(a),n instanceof Array&&n.length===0&&s.length===1&&(s[0].keys=[])),s});function jc(e){for(var n=e.length/6|0,r=new Array(n),i=0;i<n;)r[i]="#"+e.slice(i*6,++i*6);return r}const $c=jc("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");function Fc(e,n){n===void 0&&(n={});var r=n.insertAt;if(!(typeof document>"u")){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",r==="top"&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}var Uc=`.force-graph-container canvas {
|
|
display: block;
|
|
user-select: none;
|
|
outline: none;
|
|
-webkit-tap-highlight-color: transparent;
|
|
}
|
|
|
|
.force-graph-container .clickable {
|
|
cursor: pointer;
|
|
}
|
|
|
|
.force-graph-container .grabbable {
|
|
cursor: move;
|
|
cursor: grab;
|
|
cursor: -moz-grab;
|
|
cursor: -webkit-grab;
|
|
}
|
|
|
|
.force-graph-container .grabbable:active {
|
|
cursor: grabbing;
|
|
cursor: -moz-grabbing;
|
|
cursor: -webkit-grabbing;
|
|
}
|
|
`;Fc(Uc);function _n(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function Lc(e){if(Array.isArray(e))return e}function qc(e){if(Array.isArray(e))return _n(e)}function Tr(e,n,r){if(Ii())return Reflect.construct.apply(null,arguments);var i=[null];i.push.apply(i,n);var o=new(e.bind.apply(e,i));return o}function ue(e,n,r){return(n=Xc(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function Ii(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ii=function(){return!!e})()}function Hc(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Gc(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,a,s,u=[],f=!0,l=!1;try{if(a=(r=r.call(e)).next,n!==0)for(;!(f=(i=a.call(r)).done)&&(u.push(i.value),u.length!==n);f=!0);}catch(c){l=!0,o=c}finally{try{if(!f&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(l)throw o}}return u}}function Wc(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vc(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Mr(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function Ft(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?Mr(Object(r),!0).forEach(function(i){ue(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mr(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function oe(e,n){return Lc(e)||Gc(e,n)||Ni(e,n)||Wc()}function st(e){return qc(e)||Hc(e)||Ni(e)||Vc()}function Bc(e,n){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function Xc(e){var n=Bc(e,"string");return typeof n=="symbol"?n:n+""}function vn(e){"@babel/helpers - typeof";return vn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},vn(e)}function Ni(e,n){if(e){if(typeof e=="string")return _n(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_n(e,n):void 0}}var Yc=qi($c);function Pr(e,n,r){!n||typeof r!="string"||e.filter(function(i){return!i[r]}).forEach(function(i){i[r]=Yc(n(i))})}function Zc(e,n){var r=e.nodes,i=e.links,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=o.nodeFilter,s=a===void 0?function(){return!0}:a,u=o.onLoopError,f=u===void 0?function(g){throw"Invalid DAG structure! Found cycle in node path: ".concat(g.join(" -> "),".")}:u,l={};r.forEach(function(g){return l[n(g)]={data:g,out:[],depth:-1,skip:!s(g)}}),i.forEach(function(g){var _=g.source,b=g.target,y=x(_),p=x(b);if(!l.hasOwnProperty(y))throw"Missing source node with id: ".concat(y);if(!l.hasOwnProperty(p))throw"Missing target node with id: ".concat(p);var v=l[y],k=l[p];v.out.push(k);function x(m){return vn(m)==="object"?n(m):m}});var c=[];d(Object.values(l));var h=Object.assign.apply(Object,[{}].concat(st(Object.entries(l).filter(function(g){var _=oe(g,2),b=_[1];return!b.skip}).map(function(g){var _=oe(g,2),b=_[0],y=_[1];return ue({},b,y.depth)}))));return h;function d(g){for(var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,y=function(){var x=g[p];if(_.indexOf(x)!==-1){var m=[].concat(st(_.slice(_.indexOf(x))),[x]).map(function(C){return n(C.data)});return c.some(function(C){return C.length===m.length&&C.every(function(S,T){return S===m[T]})})||(c.push(m),f(m)),1}b>x.depth&&(x.depth=b,d(x.out,[].concat(st(_),[x]),b+(x.skip?0:1)))},p=0,v=g.length;p<v;p++)y()}}var Kc=2,Q=function(n,r){return r.onNeedsRedraw&&r.onNeedsRedraw()},Or=function(n,r){if(!r.isShadow){var i=H(r.linkDirectionalParticles);r.graphData.links.forEach(function(o){var a=Math.round(Math.abs(i(o)));a?o.__photons=st(Array(a)).map(function(){return{}}):delete o.__photons})}},Ie=Sn({props:{graphData:{default:{nodes:[],links:[]},onChange:function(n,r){r.engineRunning=!1,Or(n,r)}},dagMode:{onChange:function(n,r){!n&&(r.graphData.nodes||[]).forEach(function(i){return i.fx=i.fy=void 0})}},dagLevelDistance:{},dagNodeFilter:{default:function(n){return!0}},onDagError:{triggerUpdate:!1},nodeRelSize:{default:4,triggerUpdate:!1,onChange:Q},nodeId:{default:"id"},nodeVal:{default:"val",triggerUpdate:!1,onChange:Q},nodeColor:{default:"color",triggerUpdate:!1,onChange:Q},nodeAutoColorBy:{},nodeCanvasObject:{triggerUpdate:!1,onChange:Q},nodeCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:Q},nodeVisibility:{default:!0,triggerUpdate:!1,onChange:Q},linkSource:{default:"source"},linkTarget:{default:"target"},linkVisibility:{default:!0,triggerUpdate:!1,onChange:Q},linkColor:{default:"color",triggerUpdate:!1,onChange:Q},linkAutoColorBy:{},linkLineDash:{triggerUpdate:!1,onChange:Q},linkWidth:{default:1,triggerUpdate:!1,onChange:Q},linkCurvature:{default:0,triggerUpdate:!1,onChange:Q},linkCanvasObject:{triggerUpdate:!1,onChange:Q},linkCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:Q},linkDirectionalArrowLength:{default:0,triggerUpdate:!1,onChange:Q},linkDirectionalArrowColor:{triggerUpdate:!1,onChange:Q},linkDirectionalArrowRelPos:{default:.5,triggerUpdate:!1,onChange:Q},linkDirectionalParticles:{default:0,triggerUpdate:!1,onChange:Or},linkDirectionalParticleSpeed:{default:.01,triggerUpdate:!1},linkDirectionalParticleOffset:{default:0,triggerUpdate:!1},linkDirectionalParticleWidth:{default:4,triggerUpdate:!1},linkDirectionalParticleColor:{triggerUpdate:!1},linkDirectionalParticleCanvasObject:{triggerUpdate:!1},globalScale:{default:1,triggerUpdate:!1},d3AlphaMin:{default:0,triggerUpdate:!1},d3AlphaDecay:{default:.0228,triggerUpdate:!1,onChange:function(n,r){r.forceLayout.alphaDecay(n)}},d3AlphaTarget:{default:0,triggerUpdate:!1,onChange:function(n,r){r.forceLayout.alphaTarget(n)}},d3VelocityDecay:{default:.4,triggerUpdate:!1,onChange:function(n,r){r.forceLayout.velocityDecay(n)}},warmupTicks:{default:0,triggerUpdate:!1},cooldownTicks:{default:1/0,triggerUpdate:!1},cooldownTime:{default:15e3,triggerUpdate:!1},onUpdate:{default:function(){},triggerUpdate:!1},onFinishUpdate:{default:function(){},triggerUpdate:!1},onEngineTick:{default:function(){},triggerUpdate:!1},onEngineStop:{default:function(){},triggerUpdate:!1},onNeedsRedraw:{triggerUpdate:!1},isShadow:{default:!1,triggerUpdate:!1}},methods:{d3Force:function(n,r,i){return i===void 0?n.forceLayout.force(r):(n.forceLayout.force(r,i),this)},d3ReheatSimulation:function(n){return n.forceLayout.alpha(1),this.resetCountdown(),this},resetCountdown:function(n){return n.cntTicks=0,n.startTickTime=new Date,n.engineRunning=!0,this},isEngineRunning:function(n){return!!n.engineRunning},tickFrame:function(n){return!n.isShadow&&r(),o(),!n.isShadow&&a(),!n.isShadow&&s(),i(),this;function r(){n.engineRunning&&(++n.cntTicks>n.cooldownTicks||new Date-n.startTickTime>n.cooldownTime||n.d3AlphaMin>0&&n.forceLayout.alpha()<n.d3AlphaMin?(n.engineRunning=!1,n.onEngineStop()):(n.forceLayout.tick(),n.onEngineTick()))}function i(){var u=H(n.nodeVisibility),f=H(n.nodeVal),l=H(n.nodeColor),c=H(n.nodeCanvasObjectMode),h=n.ctx,d=n.isShadow/n.globalScale,g=n.graphData.nodes.filter(u);h.save(),g.forEach(function(_){var b=c(_);if(n.nodeCanvasObject&&(b==="before"||b==="replace")&&(n.nodeCanvasObject(_,h,n.globalScale),b==="replace")){h.restore();return}var y=Math.sqrt(Math.max(0,f(_)||1))*n.nodeRelSize+d;h.beginPath(),h.arc(_.x,_.y,y,0,2*Math.PI,!1),h.fillStyle=l(_)||"rgba(31, 120, 180, 0.92)",h.fill(),n.nodeCanvasObject&&b==="after"&&n.nodeCanvasObject(_,n.ctx,n.globalScale)}),h.restore()}function o(){var u=H(n.linkVisibility),f=H(n.linkColor),l=H(n.linkWidth),c=H(n.linkLineDash),h=H(n.linkCurvature),d=H(n.linkCanvasObjectMode),g=n.ctx,_=n.isShadow*2,b=n.graphData.links.filter(u);b.forEach(C);var y=[],p=[],v=b;if(n.linkCanvasObject){var k=[],x=[];b.forEach(function(S){return({before:y,after:p,replace:k}[d(S)]||x).push(S)}),v=[].concat(st(y),p,x),y=y.concat(k)}g.save(),y.forEach(function(S){return n.linkCanvasObject(S,g,n.globalScale)}),g.restore();var m=Dc(v,[f,l,c]);g.save(),Object.entries(m).forEach(function(S){var T=oe(S,2),E=T[0],M=T[1],z=!E||E==="undefined"?"rgba(0,0,0,0.15)":E;Object.entries(M).forEach(function(N){var j=oe(N,2),A=j[0],R=j[1],P=(A||1)/n.globalScale+_;Object.entries(R).forEach(function(I){var D=oe(I,2);D[0];var F=D[1],U=c(F[0]);g.beginPath(),F.forEach(function(L){var q=L.source,Z=L.target;if(!(!q||!Z||!q.hasOwnProperty("x")||!Z.hasOwnProperty("x"))){g.moveTo(q.x,q.y);var X=L.__controlPoints;X?g[X.length===2?"quadraticCurveTo":"bezierCurveTo"].apply(g,st(X).concat([Z.x,Z.y])):g.lineTo(Z.x,Z.y)}}),g.strokeStyle=z,g.lineWidth=P,g.setLineDash(U||[]),g.stroke()})})}),g.restore(),g.save(),p.forEach(function(S){return n.linkCanvasObject(S,g,n.globalScale)}),g.restore();function C(S){var T=h(S);if(!T){S.__controlPoints=null;return}var E=S.source,M=S.target;if(!(!E||!M||!E.hasOwnProperty("x")||!M.hasOwnProperty("x"))){var z=Math.sqrt(Math.pow(M.x-E.x,2)+Math.pow(M.y-E.y,2));if(z>0){var N=Math.atan2(M.y-E.y,M.x-E.x),j=z*T,A={x:(E.x+M.x)/2+j*Math.cos(N-Math.PI/2),y:(E.y+M.y)/2+j*Math.sin(N-Math.PI/2)};S.__controlPoints=[A.x,A.y]}else{var R=T*70;S.__controlPoints=[M.x,M.y-R,M.x+R,M.y]}}}}function a(){var u=1.6,f=.2,l=H(n.linkDirectionalArrowLength),c=H(n.linkDirectionalArrowRelPos),h=H(n.linkVisibility),d=H(n.linkDirectionalArrowColor||n.linkColor),g=H(n.nodeVal),_=n.ctx;_.save(),n.graphData.links.filter(h).forEach(function(b){var y=l(b);if(!(!y||y<0)){var p=b.source,v=b.target;if(!(!p||!v||!p.hasOwnProperty("x")||!v.hasOwnProperty("x"))){var k=Math.sqrt(Math.max(0,g(p)||1))*n.nodeRelSize,x=Math.sqrt(Math.max(0,g(v)||1))*n.nodeRelSize,m=Math.min(1,Math.max(0,c(b))),C=d(b)||"rgba(0,0,0,0.28)",S=y/u/2,T=b.__controlPoints&&Tr(W,[p.x,p.y].concat(st(b.__controlPoints),[v.x,v.y])),E=T?function(P){return T.get(P)}:function(P){return{x:p.x+(v.x-p.x)*P||0,y:p.y+(v.y-p.y)*P||0}},M=T?T.length():Math.sqrt(Math.pow(v.x-p.x,2)+Math.pow(v.y-p.y,2)),z=k+y+(M-k-x-y)*m,N=E(z/M),j=E((z-y)/M),A=E((z-y*(1-f))/M),R=Math.atan2(N.y-j.y,N.x-j.x)-Math.PI/2;_.beginPath(),_.moveTo(N.x,N.y),_.lineTo(j.x+S*Math.cos(R),j.y+S*Math.sin(R)),_.lineTo(A.x,A.y),_.lineTo(j.x-S*Math.cos(R),j.y-S*Math.sin(R)),_.fillStyle=C,_.fill()}}}),_.restore()}function s(){var u=H(n.linkDirectionalParticles),f=H(n.linkDirectionalParticleSpeed),l=H(n.linkDirectionalParticleOffset),c=H(n.linkDirectionalParticleWidth),h=H(n.linkVisibility),d=H(n.linkDirectionalParticleColor||n.linkColor),g=n.ctx;g.save(),n.graphData.links.filter(h).forEach(function(_){var b=u(_);if(!(!_.hasOwnProperty("__photons")||!_.__photons.length)){var y=_.source,p=_.target;if(!(!y||!p||!y.hasOwnProperty("x")||!p.hasOwnProperty("x"))){var v=f(_),k=Math.abs(l(_)),x=_.__photons||[],m=Math.max(0,c(_)/2)/Math.sqrt(n.globalScale),C=d(_)||"rgba(0,0,0,0.28)";g.fillStyle=C;var S=_.__controlPoints?Tr(W,[y.x,y.y].concat(st(_.__controlPoints),[p.x,p.y])):null,T=0,E=!1;x.forEach(function(M){var z=!!M.__singleHop;if(M.hasOwnProperty("__progressRatio")||(M.__progressRatio=z?v<0?1:0:(T+k)/b),!z&&T++,M.__progressRatio+=v,M.__progressRatio>=1||M.__progressRatio<0)if(!z)M.__progressRatio=M.__progressRatio%1,M.__progressRatio<0&&M.__progressRatio++;else{E=!0;return}var N=M.__progressRatio,j=S?S.get(N):{x:y.x+(p.x-y.x)*N||0,y:y.y+(p.y-y.y)*N||0};n.linkDirectionalParticleCanvasObject?n.linkDirectionalParticleCanvasObject(j.x,j.y,_,g,n.globalScale):(g.beginPath(),g.arc(j.x,j.y,m,0,2*Math.PI,!1),g.fill())}),E&&(_.__photons=_.__photons.filter(function(M){return!M.__singleHop||M.__progressRatio<=1&&M.__progressRatio>=0}))}}}),g.restore()}},emitParticle:function(n,r){return r&&(!r.__photons&&(r.__photons=[]),r.__photons.push({__singleHop:!0})),this}},stateInit:function(){return{forceLayout:pc().force("link",ac()).force("charge",gc()).force("center",uf()).force("dagRadial",null).stop(),engineRunning:!1}},init:function(n,r){r.ctx=n},update:function(n,r){n.engineRunning=!1,n.onUpdate(),n.nodeAutoColorBy!==null&&Pr(n.graphData.nodes,H(n.nodeAutoColorBy),n.nodeColor),n.linkAutoColorBy!==null&&Pr(n.graphData.links,H(n.linkAutoColorBy),n.linkColor),n.graphData.links.forEach(function(d){d.source=d[n.linkSource],d.target=d[n.linkTarget]}),n.forceLayout.stop().alpha(1).nodes(n.graphData.nodes);var i=n.forceLayout.force("link");i&&i.id(function(d){return d[n.nodeId]}).links(n.graphData.links);var o=n.dagMode&&Zc(n.graphData,function(d){return d[n.nodeId]},{nodeFilter:n.dagNodeFilter,onLoopError:n.onDagError||void 0}),a=Math.max.apply(Math,st(Object.values(o||[]))),s=n.dagLevelDistance||n.graphData.nodes.length/(a||1)*Kc*(["radialin","radialout"].indexOf(n.dagMode)!==-1?.7:1);if(["lr","rl","td","bu"].includes(r.dagMode)){var u=["lr","rl"].includes(r.dagMode)?"fx":"fy";n.graphData.nodes.filter(n.dagNodeFilter).forEach(function(d){return delete d[u]})}if(["lr","rl","td","bu"].includes(n.dagMode)){var f=["rl","bu"].includes(n.dagMode),l=function(g){return(o[g[n.nodeId]]-a/2)*s*(f?-1:1)},c=["lr","rl"].includes(n.dagMode)?"fx":"fy";n.graphData.nodes.filter(n.dagNodeFilter).forEach(function(d){return d[c]=l(d)})}n.forceLayout.force("dagRadial",["radialin","radialout"].indexOf(n.dagMode)!==-1?yc(function(d){var g=o[d[n.nodeId]]||-1;return(n.dagMode==="radialin"?a-g:g)*s}).strength(function(d){return n.dagNodeFilter(d)?1:0}):null);for(var h=0;h<n.warmupTicks&&!(n.d3AlphaMin>0&&n.forceLayout.alpha()<n.d3AlphaMin);h++)n.forceLayout.tick();this.resetCountdown(),n.onFinishUpdate()}});function Di(e,n){var r=e instanceof Array?e:[e],i=new n;return i._destructor&&i._destructor(),{linkProp:function(a){return{default:i[a](),onChange:function(u,f){r.forEach(function(l){return f[l][a](u)})},triggerUpdate:!1}},linkMethod:function(a){return function(s){for(var u=arguments.length,f=new Array(u>1?u-1:0),l=1;l<u;l++)f[l-1]=arguments[l];var c=[];return r.forEach(function(h){var d=s[h],g=d[a].apply(d,f);g!==d&&c.push(g)}),c.length?c[0]:this}}}}var Qc=800,Jc=4,th=5,ji=Di("forceGraph",Ie),eh=Di(["forceGraph","shadowGraph"],Ie),nh=Object.assign.apply(Object,st(["nodeColor","nodeAutoColorBy","nodeCanvasObject","nodeCanvasObjectMode","linkColor","linkAutoColorBy","linkLineDash","linkWidth","linkCanvasObject","linkCanvasObjectMode","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowRelPos","linkDirectionalParticles","linkDirectionalParticleSpeed","linkDirectionalParticleOffset","linkDirectionalParticleWidth","linkDirectionalParticleColor","linkDirectionalParticleCanvasObject","dagMode","dagLevelDistance","dagNodeFilter","onDagError","d3AlphaMin","d3AlphaDecay","d3VelocityDecay","warmupTicks","cooldownTicks","cooldownTime","onEngineTick","onEngineStop"].map(function(e){return ue({},e,ji.linkProp(e))})).concat(st(["nodeRelSize","nodeId","nodeVal","nodeVisibility","linkSource","linkTarget","linkVisibility","linkCurvature"].map(function(e){return ue({},e,eh.linkProp(e))})))),rh=Object.assign.apply(Object,st(["d3Force","d3ReheatSimulation","emitParticle"].map(function(e){return ue({},e,ji.linkMethod(e))})));function Ze(e){if(e.canvas){var n=e.canvas.width,r=e.canvas.height;n===300&&r===150&&(n=r=0);var i=window.devicePixelRatio;n/=i,r/=i,[e.canvas,e.shadowCanvas].forEach(function(a){a.style.width="".concat(e.width,"px"),a.style.height="".concat(e.height,"px"),a.width=e.width*i,a.height=e.height*i,!n&&!r&&a.getContext("2d").scale(i,i)});var o=dt(e.canvas).k;e.zoom.translateBy(e.zoom.__baseElem,(e.width-n)/2/o,(e.height-r)/2/o),e.needsRedraw=!0}}function $i(e){var n=window.devicePixelRatio;e.setTransform(n,0,0,n,0,0)}function Er(e,n,r){e.save(),$i(e),e.clearRect(0,0,n,r),e.restore()}var ih=Sn({props:Ft({width:{default:window.innerWidth,onChange:function(n,r){return Ze(r)},triggerUpdate:!1},height:{default:window.innerHeight,onChange:function(n,r){return Ze(r)},triggerUpdate:!1},graphData:{default:{nodes:[],links:[]},onChange:function(n,r){[n.nodes,n.links].every(function(o){return(o||[]).every(function(a){return!a.hasOwnProperty("__indexColor")})})&&r.colorTracker.reset(),[{type:"Node",objs:n.nodes},{type:"Link",objs:n.links}].forEach(i),r.forceGraph.graphData(n),r.shadowGraph.graphData(n);function i(o){var a=o.type,s=o.objs;s.filter(function(u){if(!u.hasOwnProperty("__indexColor"))return!0;var f=r.colorTracker.lookup(u.__indexColor);return!f||!f.hasOwnProperty("d")||f.d!==u}).forEach(function(u){u.__indexColor=r.colorTracker.register({type:a,d:u})})}},triggerUpdate:!1},backgroundColor:{onChange:function(n,r){r.canvas&&n&&(r.canvas.style.background=n)},triggerUpdate:!1},nodeLabel:{default:"name",triggerUpdate:!1},nodePointerAreaPaint:{onChange:function(n,r){r.shadowGraph.nodeCanvasObject(n?function(i,o,a){return n(i,i.__indexColor,o,a)}:null),r.flushShadowCanvas&&r.flushShadowCanvas()},triggerUpdate:!1},linkPointerAreaPaint:{onChange:function(n,r){r.shadowGraph.linkCanvasObject(n?function(i,o,a){return n(i,i.__indexColor,o,a)}:null),r.flushShadowCanvas&&r.flushShadowCanvas()},triggerUpdate:!1},linkLabel:{default:"name",triggerUpdate:!1},linkHoverPrecision:{default:4,triggerUpdate:!1},minZoom:{default:.01,onChange:function(n,r){r.zoom.scaleExtent([n,r.zoom.scaleExtent()[1]])},triggerUpdate:!1},maxZoom:{default:1e3,onChange:function(n,r){r.zoom.scaleExtent([r.zoom.scaleExtent()[0],n])},triggerUpdate:!1},enableNodeDrag:{default:!0,triggerUpdate:!1},enableZoomInteraction:{default:!0,triggerUpdate:!1},enablePanInteraction:{default:!0,triggerUpdate:!1},enableZoomPanInteraction:{default:!0,triggerUpdate:!1},enablePointerInteraction:{default:!0,onChange:function(n,r){r.hoverObj=null},triggerUpdate:!1},autoPauseRedraw:{default:!0,triggerUpdate:!1},onNodeDrag:{default:function(){},triggerUpdate:!1},onNodeDragEnd:{default:function(){},triggerUpdate:!1},onNodeClick:{triggerUpdate:!1},onNodeRightClick:{triggerUpdate:!1},onNodeHover:{triggerUpdate:!1},onLinkClick:{triggerUpdate:!1},onLinkRightClick:{triggerUpdate:!1},onLinkHover:{triggerUpdate:!1},onBackgroundClick:{triggerUpdate:!1},onBackgroundRightClick:{triggerUpdate:!1},showPointerCursor:{default:!0,triggerUpdate:!1},onZoom:{triggerUpdate:!1},onZoomEnd:{triggerUpdate:!1},onRenderFramePre:{triggerUpdate:!1},onRenderFramePost:{triggerUpdate:!1}},nh),aliases:{stopAnimation:"pauseAnimation"},methods:Ft({graph2ScreenCoords:function(n,r,i){var o=dt(n.canvas);return{x:r*o.k+o.x,y:i*o.k+o.y}},screen2GraphCoords:function(n,r,i){var o=dt(n.canvas);return{x:(r-o.x)/o.k,y:(i-o.y)/o.k}},centerAt:function(n,r,i,o){if(!n.canvas)return null;if(r!==void 0||i!==void 0){var a=Object.assign({},r!==void 0?{x:r}:{},i!==void 0?{y:i}:{});return o?n.tweenGroup.add(new er(s()).to(a,o).easing(Dt.Quadratic.Out).onUpdate(u).onComplete(function(){n.tweenGroup.remove(this)}).start()):u(a),this}return s();function s(){var f=dt(n.canvas);return{x:(n.width/2-f.x)/f.k,y:(n.height/2-f.y)/f.k}}function u(f){var l=f.x,c=f.y;n.zoom.translateTo(n.zoom.__baseElem,l===void 0?s().x:l,c===void 0?s().y:c),n.needsRedraw=!0}},zoom:function(n,r,i){if(!n.canvas)return null;if(r!==void 0)return i?n.tweenGroup.add(new er({k:o()}).to({k:r},i).easing(Dt.Quadratic.Out).onUpdate(function(s){var u=s.k;return a(u)}).onComplete(function(){n.tweenGroup.remove(this)}).start()):a(r),this;return o();function o(){return dt(n.canvas).k}function a(s){n.zoom.scaleTo(n.zoom.__baseElem,s),n.needsRedraw=!0}},zoomToFit:function(n){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:10,o=arguments.length,a=new Array(o>3?o-3:0),s=3;s<o;s++)a[s-3]=arguments[s];var u=this.getGraphBbox.apply(this,a);if(u){var f={x:(u.x[0]+u.x[1])/2,y:(u.y[0]+u.y[1])/2},l=Math.max(1e-12,Math.min(1e12,(n.width-i*2)/(u.x[1]-u.x[0]),(n.height-i*2)/(u.y[1]-u.y[0])));this.centerAt(f.x,f.y,r),this.zoom(l,r)}return this},getGraphBbox:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){return!0},i=H(n.nodeVal),o=function(u){return Math.sqrt(Math.max(0,i(u)||1))*n.nodeRelSize},a=n.graphData.nodes.filter(r).map(function(s){return{x:s.x,y:s.y,r:o(s)}});return a.length?{x:[Fn(a,function(s){return s.x-s.r}),Un(a,function(s){return s.x+s.r})],y:[Fn(a,function(s){return s.y-s.r}),Un(a,function(s){return s.y+s.r})]}:null},pauseAnimation:function(n){return n.animationFrameRequestId&&(cancelAnimationFrame(n.animationFrameRequestId),n.animationFrameRequestId=null),this},resumeAnimation:function(n){return n.animationFrameRequestId||this._animationCycle(),this},_destructor:function(){this.pauseAnimation(),this.graphData({nodes:[],links:[]})}},rh),stateInit:function(){return{lastSetZoom:1,zoom:vu(),forceGraph:new Ie,shadowGraph:new Ie().cooldownTicks(0).nodeColor("__indexColor").linkColor("__indexColor").isShadow(!0),colorTracker:new $l,tweenGroup:new ui}},init:function(n,r){var i=this;n.innerHTML="";var o=document.createElement("div");o.classList.add("force-graph-container"),o.style.position="relative",n.appendChild(o),r.canvas=document.createElement("canvas"),r.backgroundColor&&(r.canvas.style.background=r.backgroundColor),o.appendChild(r.canvas),r.shadowCanvas=document.createElement("canvas");var a=r.canvas.getContext("2d"),s=r.shadowCanvas.getContext("2d",{willReadFrequently:!0}),u={x:-1e12,y:-1e12},f=function(){var h=null,d=window.devicePixelRatio,g=u.x>0&&u.y>0?s.getImageData(u.x*d,u.y*d,1,1):null;return g&&(h=r.colorTracker.lookup(g.data)),h};at(r.canvas).call(ts().subject(function(){if(!r.enableNodeDrag)return null;var c=f();return c&&c.type==="Node"?c.d:null}).on("start",function(c){var h=c.subject;h.__initialDragPos={x:h.x,y:h.y,fx:h.fx,fy:h.fy},c.active||(h.fx=h.x,h.fy=h.y),r.canvas.classList.add("grabbable")}).on("drag",function(c){var h=c.subject,d=h.__initialDragPos,g=c,_=dt(r.canvas).k,b={x:d.x+(g.x-d.x)/_-h.x,y:d.y+(g.y-d.y)/_-h.y};["x","y"].forEach(function(y){return h["f".concat(y)]=h[y]=d[y]+(g[y]-d[y])/_}),!(!h.__dragged&&th>=Math.sqrt(Wi(["x","y"].map(function(y){return Math.pow(c[y]-d[y],2)}))))&&(r.forceGraph.d3AlphaTarget(.3).resetCountdown(),r.isPointerDragging=!0,h.__dragged=!0,r.onNodeDrag(h,b))}).on("end",function(c){var h=c.subject,d=h.__initialDragPos,g={x:h.x-d.x,y:h.y-d.y};d.fx===void 0&&(h.fx=void 0),d.fy===void 0&&(h.fy=void 0),delete h.__initialDragPos,r.forceGraph.d3AlphaTarget()&&r.forceGraph.d3AlphaTarget(0).resetCountdown(),r.canvas.classList.remove("grabbable"),r.isPointerDragging=!1,h.__dragged&&(delete h.__dragged,r.onNodeDragEnd(h,g))})),r.zoom(r.zoom.__baseElem=at(r.canvas)),r.zoom.__baseElem.on("dblclick.zoom",null),r.zoom.filter(function(c){return!c.button&&r.enableZoomPanInteraction&&(c.type!=="wheel"||H(r.enableZoomInteraction)(c))&&(c.type==="wheel"||H(r.enablePanInteraction)(c))}).on("zoom",function(c){var h=c.transform;[a,s].forEach(function(d){$i(d),d.translate(h.x,h.y),d.scale(h.k,h.k)}),r.isPointerDragging=!0,r.onZoom&&r.onZoom(Ft(Ft({},h),i.centerAt())),r.needsRedraw=!0}).on("end",function(c){r.isPointerDragging=!1,r.onZoomEnd&&r.onZoomEnd(Ft(Ft({},c.transform),i.centerAt()))}),Ze(r),r.forceGraph.onNeedsRedraw(function(){return r.needsRedraw=!0}).onFinishUpdate(function(){dt(r.canvas).k===r.lastSetZoom&&r.graphData.nodes.length&&(r.zoom.scaleTo(r.zoom.__baseElem,r.lastSetZoom=Jc/Math.cbrt(r.graphData.nodes.length)),r.needsRedraw=!0)}),r.tooltip=new sf(o),["pointermove","pointerdown"].forEach(function(c){return o.addEventListener(c,function(h){c==="pointerdown"&&(r.isPointerPressed=!0,r.pointerDownEvent=h),!r.isPointerDragging&&h.type==="pointermove"&&r.onBackgroundClick&&(h.pressure>0||r.isPointerPressed)&&(h.pointerType==="mouse"||h.movementX===void 0||[h.movementX,h.movementY].some(function(_){return Math.abs(_)>1}))&&(r.isPointerDragging=!0);var d=g(o);u.x=h.pageX-d.left,u.y=h.pageY-d.top;function g(_){var b=_.getBoundingClientRect(),y=window.pageXOffset||document.documentElement.scrollLeft,p=window.pageYOffset||document.documentElement.scrollTop;return{top:b.top+p,left:b.left+y}}},{passive:!0})}),o.addEventListener("pointerup",function(c){if(r.isPointerPressed){if(r.isPointerPressed=!1,r.isPointerDragging){r.isPointerDragging=!1;return}var h=[c,r.pointerDownEvent];requestAnimationFrame(function(){if(c.button===0)if(r.hoverObj){var d=r["on".concat(r.hoverObj.type,"Click")];d&&d.apply(void 0,[r.hoverObj.d].concat(h))}else r.onBackgroundClick&&r.onBackgroundClick.apply(r,h);if(c.button===2)if(r.hoverObj){var g=r["on".concat(r.hoverObj.type,"RightClick")];g&&g.apply(void 0,[r.hoverObj.d].concat(h))}else r.onBackgroundRightClick&&r.onBackgroundRightClick.apply(r,h)})}},{passive:!0}),o.addEventListener("contextmenu",function(c){return!r.onBackgroundRightClick&&!r.onNodeRightClick&&!r.onLinkRightClick?!0:(c.preventDefault(),!1)}),r.forceGraph(a),r.shadowGraph(s);var l=Wu(function(){Er(s,r.width,r.height),r.shadowGraph.linkWidth(function(h){return H(r.linkWidth)(h)+r.linkHoverPrecision});var c=dt(r.canvas);r.shadowGraph.globalScale(c.k).tickFrame()},Qc);r.flushShadowCanvas=l.flush,(this._animationCycle=function c(){var h=!r.autoPauseRedraw||!!r.needsRedraw||r.forceGraph.isEngineRunning()||r.graphData.links.some(function(k){return k.__photons&&k.__photons.length});if(r.needsRedraw=!1,r.enablePointerInteraction){var d=r.isPointerDragging?null:f();if(d!==r.hoverObj){var g=r.hoverObj,_=g?g.type:null,b=d?d.type:null;if(_&&_!==b){var y=r["on".concat(_,"Hover")];y&&y(null,g.d)}if(b){var p=r["on".concat(b,"Hover")];p&&p(d.d,_===b?g.d:null)}r.tooltip.content(d&&H(r["".concat(d.type.toLowerCase(),"Label")])(d.d)||null),r.canvas.classList[(d&&r["on".concat(b,"Click")]||!d&&r.onBackgroundClick)&&H(r.showPointerCursor)(d==null?void 0:d.d)?"add":"remove"]("clickable"),r.hoverObj=d}h&&l()}if(h){Er(a,r.width,r.height);var v=dt(r.canvas).k;r.onRenderFramePre&&r.onRenderFramePre(a,v),r.forceGraph.globalScale(v).tickFrame(),r.onRenderFramePost&&r.onRenderFramePost(a,v)}r.tweenGroup.update(),r.animationFrameRequestId=requestAnimationFrame(c)})()},update:function(n){}}),Ke={exports:{}},Qe,zr;function oh(){if(zr)return Qe;zr=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Qe=e,Qe}var Je,Rr;function ah(){if(Rr)return Je;Rr=1;var e=oh();function n(){}function r(){}return r.resetWarningCache=n,Je=function(){function i(s,u,f,l,c,h){if(h!==e){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}i.isRequired=i;function o(){return i}var a={array:i,bigint:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:o,element:i,elementType:i,instanceOf:o,node:i,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:n};return a.PropTypes=a,a},Je}var Ir;function sh(){return Ir||(Ir=1,Ke.exports=ah()()),Ke.exports}var uh=sh();const w=Hi(uh),Le={width:w.number,height:w.number,graphData:w.shape({nodes:w.arrayOf(w.object).isRequired,links:w.arrayOf(w.object).isRequired}),backgroundColor:w.string,nodeRelSize:w.number,nodeId:w.string,nodeLabel:w.oneOfType([w.string,w.func]),nodeVal:w.oneOfType([w.number,w.string,w.func]),nodeVisibility:w.oneOfType([w.bool,w.string,w.func]),nodeColor:w.oneOfType([w.string,w.func]),nodeAutoColorBy:w.oneOfType([w.string,w.func]),onNodeHover:w.func,onNodeClick:w.func,linkSource:w.string,linkTarget:w.string,linkLabel:w.oneOfType([w.string,w.func]),linkVisibility:w.oneOfType([w.bool,w.string,w.func]),linkColor:w.oneOfType([w.string,w.func]),linkAutoColorBy:w.oneOfType([w.string,w.func]),linkWidth:w.oneOfType([w.number,w.string,w.func]),linkCurvature:w.oneOfType([w.number,w.string,w.func]),linkDirectionalArrowLength:w.oneOfType([w.number,w.string,w.func]),linkDirectionalArrowColor:w.oneOfType([w.string,w.func]),linkDirectionalArrowRelPos:w.oneOfType([w.number,w.string,w.func]),linkDirectionalParticles:w.oneOfType([w.number,w.string,w.func]),linkDirectionalParticleSpeed:w.oneOfType([w.number,w.string,w.func]),linkDirectionalParticleOffset:w.oneOfType([w.number,w.string,w.func]),linkDirectionalParticleWidth:w.oneOfType([w.number,w.string,w.func]),linkDirectionalParticleColor:w.oneOfType([w.string,w.func]),onLinkHover:w.func,onLinkClick:w.func,dagMode:w.oneOf(["td","bu","lr","rl","zin","zout","radialin","radialout"]),dagLevelDistance:w.number,dagNodeFilter:w.func,onDagError:w.func,d3AlphaMin:w.number,d3AlphaDecay:w.number,d3VelocityDecay:w.number,warmupTicks:w.number,cooldownTicks:w.number,cooldownTime:w.number,onEngineTick:w.func,onEngineStop:w.func,getGraphBbox:w.func},Fi={zoomToFit:w.func,onNodeRightClick:w.func,onNodeDrag:w.func,onNodeDragEnd:w.func,onLinkRightClick:w.func,linkHoverPrecision:w.number,onBackgroundClick:w.func,onBackgroundRightClick:w.func,showPointerCursor:w.oneOfType([w.bool,w.func]),enablePointerInteraction:w.bool,enableNodeDrag:w.bool},Nn={showNavInfo:w.bool,nodeOpacity:w.number,nodeResolution:w.number,nodeThreeObject:w.oneOfType([w.object,w.string,w.func]),nodeThreeObjectExtend:w.oneOfType([w.bool,w.string,w.func]),nodePositionUpdate:w.func,linkOpacity:w.number,linkResolution:w.number,linkCurveRotation:w.oneOfType([w.number,w.string,w.func]),linkMaterial:w.oneOfType([w.object,w.string,w.func]),linkThreeObject:w.oneOfType([w.object,w.string,w.func]),linkThreeObjectExtend:w.oneOfType([w.bool,w.string,w.func]),linkPositionUpdate:w.func,linkDirectionalArrowResolution:w.number,linkDirectionalParticleResolution:w.number,linkDirectionalParticleThreeObject:w.oneOfType([w.object,w.string,w.func]),forceEngine:w.oneOf(["d3","ngraph"]),ngraphPhysics:w.object,numDimensions:w.oneOf([1,2,3])},lh=Object.assign({},Le,Fi,{linkLineDash:w.oneOfType([w.arrayOf(w.number),w.string,w.func]),nodeCanvasObjectMode:w.oneOfType([w.string,w.func]),nodeCanvasObject:w.func,nodePointerAreaPaint:w.func,linkCanvasObjectMode:w.oneOfType([w.string,w.func]),linkCanvasObject:w.func,linkPointerAreaPaint:w.func,linkDirectionalParticleCanvasObject:w.func,autoPauseRedraw:w.bool,minZoom:w.number,maxZoom:w.number,enableZoomInteraction:w.oneOfType([w.bool,w.func]),enablePanInteraction:w.oneOfType([w.bool,w.func]),onZoom:w.func,onZoomEnd:w.func,onRenderFramePre:w.func,onRenderFramePost:w.func});Object.assign({},Le,Fi,Nn,{enableNavigationControls:w.bool,controlType:w.oneOf(["trackball","orbit","fly"]),rendererConfig:w.object,extraRenderers:w.arrayOf(w.shape({render:w.func.isRequired}))});Object.assign({},Le,Nn,{nodeDesc:w.oneOfType([w.string,w.func]),linkDesc:w.oneOfType([w.string,w.func])});Object.assign({},Le,Nn,{markerAttrs:w.object,yOffset:w.number,glScale:w.number});const Dn=co(ih,{methodNames:["emitParticle","d3Force","d3ReheatSimulation","stopAnimation","pauseAnimation","resumeAnimation","centerAt","zoom","zoomToFit","getGraphBbox","screen2GraphCoords","graph2ScreenCoords"]});Dn.displayName="ForceGraph2D";Dn.propTypes=lh;function yt(e){return function(){return e}}function Nr(e){return(e()-.5)*1e-6}function fh(e){return e.x+e.vx}function ch(e){return e.y+e.vy}function hh(e){var n,r,i,o=1,a=1;typeof e!="function"&&(e=yt(e==null?1:+e));function s(){for(var l,c=n.length,h,d,g,_,b,y,p=0;p<a;++p)for(h=zn(n,fh,ch).visitAfter(u),l=0;l<c;++l)d=n[l],b=r[d.index],y=b*b,g=d.x+d.vx,_=d.y+d.vy,h.visit(v);function v(k,x,m,C,S){var T=k.data,E=k.r,M=b+E;if(T){if(T.index>d.index){var z=g-T.x-T.vx,N=_-T.y-T.vy,j=z*z+N*N;j<M*M&&(z===0&&(z=Nr(i),j+=z*z),N===0&&(N=Nr(i),j+=N*N),j=(M-(j=Math.sqrt(j)))/j*o,d.vx+=(z*=j)*(M=(E*=E)/(y+E)),d.vy+=(N*=j)*M,T.vx-=z*(M=1-M),T.vy-=N*M)}return}return x>g+M||C<g-M||m>_+M||S<_-M}}function u(l){if(l.data)return l.r=r[l.data.index];for(var c=l.r=0;c<4;++c)l[c]&&l[c].r>l.r&&(l.r=l[c].r)}function f(){if(n){var l,c=n.length,h;for(r=new Array(c),l=0;l<c;++l)h=n[l],r[h.index]=+e(h,l,n)}}return s.initialize=function(l,c){n=l,i=c,f()},s.iterations=function(l){return arguments.length?(a=+l,s):a},s.strength=function(l){return arguments.length?(o=+l,s):o},s.radius=function(l){return arguments.length?(e=typeof l=="function"?l:yt(+l),f(),s):e},s}function dh(e){var n=yt(.1),r,i,o;typeof e!="function"&&(e=yt(e==null?0:+e));function a(u){for(var f=0,l=r.length,c;f<l;++f)c=r[f],c.vx+=(o[f]-c.x)*i[f]*u}function s(){if(r){var u,f=r.length;for(i=new Array(f),o=new Array(f),u=0;u<f;++u)i[u]=isNaN(o[u]=+e(r[u],u,r))?0:+n(r[u],u,r)}}return a.initialize=function(u){r=u,s()},a.strength=function(u){return arguments.length?(n=typeof u=="function"?u:yt(+u),s(),a):n},a.x=function(u){return arguments.length?(e=typeof u=="function"?u:yt(+u),s(),a):e},a}function ph(e){var n=yt(.1),r,i,o;typeof e!="function"&&(e=yt(e==null?0:+e));function a(u){for(var f=0,l=r.length,c;f<l;++f)c=r[f],c.vy+=(o[f]-c.y)*i[f]*u}function s(){if(r){var u,f=r.length;for(i=new Array(f),o=new Array(f),u=0;u<f;++u)i[u]=isNaN(o[u]=+e(r[u],u,r))?0:+n(r[u],u,r)}}return a.initialize=function(u){r=u,s()},a.strength=function(u){return arguments.length?(n=typeof u=="function"?u:yt(+u),s(),a):n},a.y=function(u){return arguments.length?(e=typeof u=="function"?u:yt(+u),s(),a):e},a}const tn={identity:"#00f5ff",knowledge:"#3b82f6",rules:"#d946ef",events:"#fbbf24"},gh={identity:"Identität",knowledge:"Wissen",rules:"Regeln",events:"Ereignisse"},yh="rgba(99, 102, 241, 0.9)",_h="rgba(255, 255, 255, 0.02)";function vh(e,n){const r=parseInt(e.slice(1,3),16),i=parseInt(e.slice(3,5),16),o=parseInt(e.slice(5,7),16);return`rgba(${r}, ${i}, ${o}, ${n})`}function bh({data:e,selectedNodeId:n,onNodeSelect:r}){const[i,o]=Y.useState(null),a=Y.useRef(null),s=Y.useRef(null),[u,f]=Y.useState({width:500,height:560});Y.useEffect(()=>{if(!a.current)return;const y=new ResizeObserver(p=>{for(let v of p)v.contentRect.width>0&&v.contentRect.height>0&&f({width:Math.floor(v.contentRect.width),height:Math.floor(v.contentRect.height)})});return y.observe(a.current),()=>y.disconnect()},[]);const l=Y.useMemo(()=>({nodes:e.nodes.map(y=>({...y})),links:e.edges.map(y=>({source:y.source,target:y.target,weight:y.weight||0}))}),[e]),c=Y.useMemo(()=>{const y={};return e.edges.forEach(p=>{const v=typeof p.source=="object"?p.source.id:p.source,k=typeof p.target=="object"?p.target.id:p.target;v&&k&&(y[v]=(y[v]||0)+1,y[k]=(y[k]||0)+1)}),y},[e]),h=y=>({identity:-240,knowledge:240,rules:-240,events:240})[y]||0,d=y=>({identity:-240,knowledge:-240,rules:240,events:240})[y]||0;Y.useEffect(()=>{const y=s.current;if(!y)return;y.d3Force("center",null),y.d3Force("x",dh().x(k=>h(k.category)).strength(.07)),y.d3Force("y",ph().y(k=>d(k.category)).strength(.07));const p=y.d3Force("charge");p&&p.strength(-380),y.d3Force("collide",hh().radius(28).iterations(2));const v=y.d3Force("link");v&&v.distance(85),y.d3ReheatSimulation()},[l]);const g=i||n,_=()=>{s.current&&s.current.zoomToFit(400,40)},b=Y.useMemo(()=>{if(!g)return new Set;const y=new Set;return e.edges.forEach(p=>{const v=typeof p.source=="object"?p.source.id:p.source,k=typeof p.target=="object"?p.target.id:p.target;v===g&&y.add(k),k===g&&y.add(v)}),y},[g,e]);return Rt.jsxs("div",{className:"absolute inset-0",ref:a,style:{background:"radial-gradient(circle at center, rgba(59, 130, 246, 0.08) 0%, #030712 100%)"},children:[Rt.jsx(Dn,{ref:s,width:u.width,height:u.height,graphData:l,backgroundColor:"rgba(0,0,0,0)",cooldownTicks:120,nodePointerAreaPaint:(y,p,v)=>{v.fillStyle=p,v.beginPath();const k=typeof y=="object"?y.id:y,x=6+Math.min(c[k]||0,15)*.8;v.arc(y.x??0,y.y??0,x+5,0,2*Math.PI,!1),v.fill()},onNodeClick:y=>r(y.id),onBackgroundClick:()=>r(null),onNodeHover:y=>{o(y?y.id:null),a.current&&(a.current.style.cursor=y?"pointer":"default")},linkColor:y=>{const p=typeof y.source=="object"?y.source.id:y.source,v=typeof y.target=="object"?y.target.id:y.target;if(g===p||g===v)return yh;if(g)return _h;const k=l.nodes.find(m=>m.id===p),x=k?tn[k.category]:"#64748b";return vh(x,.25)},linkWidth:y=>{const p=typeof y.source=="object"?y.source.id:y.source,v=typeof y.target=="object"?y.target.id:y.target;return g===p||g===v?2.5:1.4},linkDirectionalParticles:y=>{const p=typeof y.source=="object"?y.source.id:y.source,v=typeof y.target=="object"?y.target.id:y.target;return g===p||g===v?4:0},linkDirectionalParticleWidth:2.2,linkDirectionalParticleSpeed:.006,nodeCanvasObject:(y,p,v)=>{const k=y.x??0,x=y.y??0,m=6+Math.min(c[y.id]||0,15)*.8,C=tn[y.category]||"#64748b",S=y.id===i,T=y.id===n,E=g&&y.id!==g&&!b.has(y.id),M=E?"#1e293b":C;if(E||(p.shadowColor=C,p.shadowBlur=S||T?15:6),p.beginPath(),p.arc(k,x,m,0,2*Math.PI,!1),p.fillStyle=M,p.fill(),p.shadowBlur=0,(S||T)&&(p.beginPath(),p.arc(k,x,m+2.5,0,2*Math.PI,!1),p.strokeStyle=T?"#ffffff":"rgba(255, 255, 255, 0.7)",p.lineWidth=1.5,p.stroke()),S||T||v>=1.25||g&&b.has(y.id)){const N=y.content.length>35?y.content.slice(0,34)+"…":y.content;if(y.__baseTextWidth===void 0){const q=p.font;p.font='500 10px "Space Grotesk", sans-serif',y.__baseTextWidth=p.measureText(N).width,p.font=q}const A=(S||T?10.5:9.5)/Math.max(.5,v);p.font=`${S||T?"bold":"500"} ${A}px "Space Grotesk", sans-serif`;const R=y.__baseTextWidth*(A/10),P=4.5/Math.max(.5,v);p.fillStyle=E?"rgba(10, 15, 25, 0.45)":"rgba(8, 12, 20, 0.88)",p.beginPath();const I=k-R/2-P,D=x+m+6/Math.max(.5,v),F=R+P*2,U=A+P*1.6,L=4/Math.max(.5,v);p.beginPath(),p.moveTo(I+L,D),p.lineTo(I+F-L,D),p.quadraticCurveTo(I+F,D,I+F,D+L),p.lineTo(I+F,D+U-L),p.quadraticCurveTo(I+F,D+U,I+F-L,D+U),p.lineTo(I+L,D+U),p.quadraticCurveTo(I,D+U,I,D+U-L),p.lineTo(I,D+L),p.quadraticCurveTo(I,D,I+L,D),p.closePath(),p.fill(),p.strokeStyle=S||T?"rgba(255, 255, 255, 0.2)":"rgba(255, 255, 255, 0.08)",p.lineWidth=.6/Math.max(.5,v),p.stroke(),p.textAlign="center",p.textBaseline="top",p.fillStyle=E?"#475569":S||T?"#ffffff":"#cbd5e1",p.fillText(N,k,x+m+7/Math.max(.5,v))}}}),Rt.jsxs("button",{onClick:_,title:"Zentrieren",className:"absolute right-3 top-3 z-10 flex items-center gap-1.5 rounded-lg border border-border/60 bg-background/50 px-2.5 py-1.5 text-[11px] text-muted-foreground hover:text-foreground backdrop-blur-sm transition-colors cursor-pointer",children:[Rt.jsx(Gi,{className:"h-3.5 w-3.5"})," Zentrieren"]}),Rt.jsx("div",{className:"absolute left-3 bottom-3 flex flex-wrap gap-2 rounded-lg bg-background/40 px-2.5 py-1.5 backdrop-blur-sm",children:Object.entries(gh).map(([y,p])=>Rt.jsxs("span",{className:"flex items-center gap-1 text-[10px] text-muted-foreground",children:[Rt.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:tn[y]}}),p]},y))})]})}export{bh as GraphView};
|