React 18.3.1 -> 19.2.8, dazu @types/react(-dom) 19.
## Nichts brach
tsc --noEmit sauber, 54/54 Tests gruen, ESLint 0 Fehler
Im Browser gegen die ECHTE Box: Cockpit mit 2 Diagrammen und 4 Flaechen,
Statusleiste live (40,8/122,7 GB, 38 °C, 532 748 115 Token), 8 Karten
NULL Konsolen-Warnungen — keine veralteten Muster im Bestand
Das eigentliche Risiko war `react-force-graph-2d` (peer: react "*", also ungeprueft,
und es umhuellt eine Nicht-React-Bibliothek). Gegen den echten Vault der Box getestet:
Canvas 500x560, 4498 gezeichnete Pixel, keine Fehlerflaeche. Es laeuft.
## Das Budget hat angeschlagen — und ich habe es trotzdem angehoben
Gemessen kostet der Sprung 14 645 B gzip (118 762 -> 133 407) und riss damit das
in P0 gesetzte Budget von 125 000. Das Gate hat also getan, was es soll.
Beim Router (P2) habe ich in derselben Lage NICHT das Budget angefasst, sondern den
Platz zurueckgeholt (Schublade und Palette hinter lazy()). Hier geht das nicht: Der
Zuwachs IST die Plattform, es gibt nichts wegzulassen.
Also angehoben — einmalig, auf 140 000, mit der Begruendung IM Ampel-Skript, damit ein
spaeterer Leser sieht, dass es ein ueberlegter Schritt war und kein Nachgeben:
MC2 ist eine LAN-Appliance; 14 kB sind ueber Gigabit-Ethernet keine messbare Wartezeit.
Das Budget existiert gegen DRIFT — einen 24-MB-Avatar, eine 95-kB-Diagramm-Bibliothek
auf der Startseite — nicht gegen einen bewussten Plattform-Schritt. Der relative
Abstand zum Deckel bleibt derselbe wie vorher (~5 %).
## Ehrlich zum Nutzen
React 19 bringt diesem Projekt HEUTE wenig Konkretes: use(), Actions und
Server-Komponenten sind hier nicht im Spiel. Der Grund ist die Zukunft — 18 altert,
und der React Compiler ist der Pfad, auf dem die 18 offenen Warnungen aus
eslint-plugin-react-hooks (setState im Effekt, Ref-Zugriff im Render) irgendwann
nicht mehr nur Warnungen sind.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
53 lines
193 KiB
JavaScript
53 lines
193 KiB
JavaScript
var to=Object.defineProperty;var eo=(e,n,r)=>n in e?to(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r;var Bn=(e,n,r)=>eo(e,typeof n!="symbol"?n+"":n,r);import{c as no,r as W,an as ro,ao as io,j as $,ap as oo,z as ao,A as so,aq as uo,n as lo,b as Ae,L as Ke,a1 as co,ar as fo}from"./index-Dd1yR_F_.js";import{i as Ft,c as Xn,a as Yn,b as ho,o as po,m as Zn,d as Kn}from"./string-DoZi9Vij.js";import{R as go}from"./refresh-cw-c_vCbXLa.js";import{S as yo}from"./search-304843k8.js";import{F as _o}from"./file-text-CBWKyLdT.js";/**
|
|
* @license lucide-react v0.460.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const vo=no("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);function mo(e,n){let r=0;for(let i of e)(i=+i)&&(r+=i);return r}var Qn=180/Math.PI,fn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Yr(e,n,r,i,o,a){var s,u,c;return(s=Math.sqrt(e*e+n*n))&&(e/=s,n/=s),(c=e*r+n*i)&&(r-=e*c,i-=n*c),(u=Math.sqrt(r*r+i*i))&&(r/=u,i/=u,c/=u),e*i<n*r&&(e=-e,n=-n,c=-c,s=-s),{translateX:o,translateY:a,rotate:Math.atan2(n,e)*Qn,skewX:Math.atan(c)*Qn,scaleX:s,scaleY:u}}var xe;function xo(e){const n=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return n.isIdentity?fn:Yr(n.a,n.b,n.c,n.d,n.e,n.f)}function bo(e){return e==null||(xe||(xe=document.createElementNS("http://www.w3.org/2000/svg","g")),xe.setAttribute("transform",e),!(e=xe.transform.baseVal.consolidate()))?fn:(e=e.matrix,Yr(e.a,e.b,e.c,e.d,e.e,e.f))}function Zr(e,n,r,i){function o(l){return l.length?l.pop()+" ":""}function a(l,f,h,d,p,y){if(l!==h||f!==d){var m=p.push("translate(",null,n,null,r);y.push({i:m-4,x:Ft(l,h)},{i:m-2,x:Ft(f,d)})}else(h||d)&&p.push("translate("+h+n+d+r)}function s(l,f,h,d){l!==f?(l-f>180?f+=360:f-l>180&&(l+=360),d.push({i:h.push(o(h)+"rotate(",null,i)-2,x:Ft(l,f)})):f&&h.push(o(h)+"rotate("+f+i)}function u(l,f,h,d){l!==f?d.push({i:h.push(o(h)+"skewX(",null,i)-2,x:Ft(l,f)}):f&&h.push(o(h)+"skewX("+f+i)}function c(l,f,h,d,p,y){if(l!==h||f!==d){var m=p.push(o(p)+"scale(",null,",",null,")");y.push({i:m-4,x:Ft(l,h)},{i:m-2,x:Ft(f,d)})}else(h!==1||d!==1)&&p.push(o(p)+"scale("+h+","+d+")")}return function(l,f){var h=[],d=[];return l=e(l),f=e(f),a(l.translateX,l.translateY,f.translateX,f.translateY,h,d),s(l.rotate,f.rotate,h,d),u(l.skewX,f.skewX,h,d),c(l.scaleX,l.scaleY,f.scaleX,f.scaleY,h,d),l=f=null,function(p){for(var y=-1,m=d.length,v;++y<m;)h[(v=d[y]).i]=v.x(p);return h.join("")}}}var wo=Zr(xo,"px, ","px)","deg)"),ko=Zr(bo,", ",")",")"),Co=1e-12;function Jn(e){return((e=Math.exp(e))+1/e)/2}function Ao(e){return((e=Math.exp(e))-1/e)/2}function So(e){return((e=Math.exp(2*e))-1)/(e+1)}const Mo=(function e(n,r,i){function o(a,s){var u=a[0],c=a[1],l=a[2],f=s[0],h=s[1],d=s[2],p=f-u,y=h-c,m=p*p+y*y,v,g;if(m<Co)g=Math.log(d/l)/n,v=function(A){return[u+A*p,c+A*y,l*Math.exp(n*A*g)]};else{var k=Math.sqrt(m),M=(d*d-l*l+i*m)/(2*l*r*k),b=(d*d-l*l-i*m)/(2*d*r*k),_=Math.log(Math.sqrt(M*M+1)-M),w=Math.log(Math.sqrt(b*b+1)-b);g=(w-_)/n,v=function(A){var T=A*g,R=Jn(_),P=l/(r*k)*(R*So(n*T+_)-Ao(_));return[u+P*p,c+P*y,l*R/Jn(n*T+_)]}}return v.duration=g*1e3*n/Math.SQRT2,v}return o.rho=function(a){var s=Math.max(.001,+a),u=s*s,c=u*u;return e(s,u,c)},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=[],c=!0,l=!1;try{if(a=(r=r.call(e)).next,n===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(i=a.call(r)).done)&&(u.push(i.value),u.length!==n);c=!0);}catch(f){l=!0,o=f}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(l)throw o}}return u}}function Po(e,n,r){return n=Io(n),n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function tr(e,n){return zo(e)||To(e,n)||Kr(e,n)||jo()}function Oo(e){return Eo(e)||No(e)||Kr(e)||Ro()}function Eo(e){if(Array.isArray(e))return hn(e)}function zo(e){if(Array.isArray(e))return e}function No(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Kr(e,n){if(e){if(typeof e=="string")return hn(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 hn(e,n)}}function hn(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 Ro(){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 jo(){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 Do(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 Io(e){var n=Do(e,"string");return typeof n=="symbol"?n:String(n)}var $o=function(n,r){var i=new Set(r);return Object.assign.apply(Object,[{}].concat(Oo(Object.entries(n).filter(function(o){var a=tr(o,1),s=a[0];return!i.has(s)}).map(function(o){var a=tr(o,2),s=a[0],u=a[1];return Po({},s,u)}))))};function Lo(e,{wrapperElementType:n="div",nodeMapper:r=a=>a,methodNames:i=[],initPropNames:o=[]}={}){return W.forwardRef((a,s)=>{const u=W.useRef(),c=W.useMemo(()=>{const h=Object.fromEntries(o.filter(d=>a.hasOwnProperty(d)).map(d=>[d,a[d]]));return e(h)},[]);er(()=>{c(r(u.current))},W.useLayoutEffect),er(()=>c._destructor instanceof Function?c._destructor:void 0);const l=W.useCallback((h,...d)=>c[h]instanceof Function?c[h](...d):void 0,[c]),f=W.useRef({});return Object.keys($o(a,[...i,...o])).filter(h=>f.current[h]!==a[h]).forEach(h=>l(h,a[h])),f.current=a,W.useImperativeHandle(s,()=>Object.fromEntries(i.map(h=>[h,(...d)=>l(h,...d)])),[l]),ro.createElement(n,{ref:u})})}function er(e,n=W.useEffect){const r=W.useRef(),i=W.useRef(!1),o=W.useRef(!1),[a,s]=W.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 dn="http://www.w3.org/1999/xhtml";const nr={svg:"http://www.w3.org/2000/svg",xhtml:dn,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function We(e){var n=e+="",r=n.indexOf(":");return r>=0&&(n=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),nr.hasOwnProperty(n)?{space:nr[n],local:e}:e}function Fo(e){return function(){var n=this.ownerDocument,r=this.namespaceURI;return r===dn&&n.documentElement.namespaceURI===dn?n.createElement(e):n.createElementNS(r,e)}}function Uo(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Qr(e){var n=We(e);return(n.local?Uo:Fo)(n)}function Ho(){}function Tn(e){return e==null?Ho:function(){return this.querySelector(e)}}function qo(e){typeof e!="function"&&(e=Tn(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),c,l,f=0;f<s;++f)(c=a[f])&&(l=e.call(c,c.__data__,f,a))&&("__data__"in c&&(l.__data__=c.__data__),u[f]=l);return new ft(i,this._parents)}function Wo(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Go(){return[]}function Jr(e){return e==null?Go:function(){return this.querySelectorAll(e)}}function Vo(e){return function(){return Wo(e.apply(this,arguments))}}function Bo(e){typeof e=="function"?e=Vo(e):e=Jr(e);for(var n=this._groups,r=n.length,i=[],o=[],a=0;a<r;++a)for(var s=n[a],u=s.length,c,l=0;l<u;++l)(c=s[l])&&(i.push(e.call(c,c.__data__,l,s)),o.push(c));return new ft(i,o)}function ti(e){return function(){return this.matches(e)}}function ei(e){return function(n){return n.matches(e)}}var Xo=Array.prototype.find;function Yo(e){return function(){return Xo.call(this.children,e)}}function Zo(){return this.firstElementChild}function Ko(e){return this.select(e==null?Zo:Yo(typeof e=="function"?e:ei(e)))}var Qo=Array.prototype.filter;function Jo(){return Array.from(this.children)}function ta(e){return function(){return Qo.call(this.children,e)}}function ea(e){return this.selectAll(e==null?Jo:ta(typeof e=="function"?e:ei(e)))}function na(e){typeof e!="function"&&(e=ti(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]=[],c,l=0;l<s;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&u.push(c);return new ft(i,this._parents)}function ni(e){return new Array(e.length)}function ra(){return new ft(this._enter||this._groups.map(ni),this._parents)}function ze(e,n){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=n}ze.prototype={constructor:ze,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 ia(e){return function(){return e}}function oa(e,n,r,i,o,a){for(var s=0,u,c=n.length,l=a.length;s<l;++s)(u=n[s])?(u.__data__=a[s],i[s]=u):r[s]=new ze(e,a[s]);for(;s<c;++s)(u=n[s])&&(o[s]=u)}function aa(e,n,r,i,o,a,s){var u,c,l=new Map,f=n.length,h=a.length,d=new Array(f),p;for(u=0;u<f;++u)(c=n[u])&&(d[u]=p=s.call(c,c.__data__,u,n)+"",l.has(p)?o[u]=c:l.set(p,c));for(u=0;u<h;++u)p=s.call(e,a[u],u,a)+"",(c=l.get(p))?(i[u]=c,c.__data__=a[u],l.delete(p)):r[u]=new ze(e,a[u]);for(u=0;u<f;++u)(c=n[u])&&l.get(d[u])===c&&(o[u]=c)}function sa(e){return e.__data__}function ua(e,n){if(!arguments.length)return Array.from(this,sa);var r=n?aa:oa,i=this._parents,o=this._groups;typeof e!="function"&&(e=ia(e));for(var a=o.length,s=new Array(a),u=new Array(a),c=new Array(a),l=0;l<a;++l){var f=i[l],h=o[l],d=h.length,p=la(e.call(f,f&&f.__data__,l,i)),y=p.length,m=u[l]=new Array(y),v=s[l]=new Array(y),g=c[l]=new Array(d);r(f,h,m,v,g,p,n);for(var k=0,M=0,b,_;k<y;++k)if(b=m[k]){for(k>=M&&(M=k+1);!(_=v[M])&&++M<y;);b._next=_||null}}return s=new ft(s,i),s._enter=u,s._exit=c,s}function la(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function ca(){return new ft(this._exit||this._groups.map(ni),this._parents)}function fa(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 ha(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),c=0;c<s;++c)for(var l=r[c],f=i[c],h=l.length,d=u[c]=new Array(h),p,y=0;y<h;++y)(p=l[y]||f[y])&&(d[y]=p);for(;c<o;++c)u[c]=r[c];return new ft(u,this._parents)}function da(){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 pa(e){e||(e=ga);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,c=o[a]=new Array(u),l,f=0;f<u;++f)(l=s[f])&&(c[f]=l);c.sort(n)}return new ft(o,this._parents).order()}function ga(e,n){return e<n?-1:e>n?1:e>=n?0:NaN}function ya(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function _a(){return Array.from(this)}function va(){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 ma(){let e=0;for(const n of this)++e;return e}function xa(){return!this.node()}function ba(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 wa(e){return function(){this.removeAttribute(e)}}function ka(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Ca(e,n){return function(){this.setAttribute(e,n)}}function Aa(e,n){return function(){this.setAttributeNS(e.space,e.local,n)}}function Sa(e,n){return function(){var r=n.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function Ma(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 Ta(e,n){var r=We(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?ka:wa:typeof n=="function"?r.local?Ma:Sa:r.local?Aa:Ca)(r,n))}function ri(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Pa(e){return function(){this.style.removeProperty(e)}}function Oa(e,n,r){return function(){this.style.setProperty(e,n,r)}}function Ea(e,n,r){return function(){var i=n.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function za(e,n,r){return arguments.length>1?this.each((n==null?Pa:typeof n=="function"?Ea:Oa)(e,n,r??"")):Bt(this.node(),e)}function Bt(e,n){return e.style.getPropertyValue(n)||ri(e).getComputedStyle(e,null).getPropertyValue(n)}function Na(e){return function(){delete this[e]}}function Ra(e,n){return function(){this[e]=n}}function ja(e,n){return function(){var r=n.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function Da(e,n){return arguments.length>1?this.each((n==null?Na:typeof n=="function"?ja:Ra)(e,n)):this.node()[e]}function ii(e){return e.trim().split(/^|\s+/)}function Pn(e){return e.classList||new oi(e)}function oi(e){this._node=e,this._names=ii(e.getAttribute("class")||"")}oi.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 ai(e,n){for(var r=Pn(e),i=-1,o=n.length;++i<o;)r.add(n[i])}function si(e,n){for(var r=Pn(e),i=-1,o=n.length;++i<o;)r.remove(n[i])}function Ia(e){return function(){ai(this,e)}}function $a(e){return function(){si(this,e)}}function La(e,n){return function(){(n.apply(this,arguments)?ai:si)(this,e)}}function Fa(e,n){var r=ii(e+"");if(arguments.length<2){for(var i=Pn(this.node()),o=-1,a=r.length;++o<a;)if(!i.contains(r[o]))return!1;return!0}return this.each((typeof n=="function"?La:n?Ia:$a)(r,n))}function Ua(){this.textContent=""}function Ha(e){return function(){this.textContent=e}}function qa(e){return function(){var n=e.apply(this,arguments);this.textContent=n??""}}function Wa(e){return arguments.length?this.each(e==null?Ua:(typeof e=="function"?qa:Ha)(e)):this.node().textContent}function Ga(){this.innerHTML=""}function Va(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?Ga:(typeof e=="function"?Ba:Va)(e)):this.node().innerHTML}function Ya(){this.nextSibling&&this.parentNode.appendChild(this)}function Za(){return this.each(Ya)}function Ka(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Qa(){return this.each(Ka)}function Ja(e){var n=typeof e=="function"?e:Qr(e);return this.select(function(){return this.appendChild(n.apply(this,arguments))})}function ts(){return null}function es(e,n){var r=typeof e=="function"?e:Qr(e),i=n==null?ts:typeof n=="function"?n:Tn(n);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function ns(){var e=this.parentNode;e&&e.removeChild(this)}function rs(){return this.each(ns)}function is(){var e=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(e,this.nextSibling):e}function os(){var e=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(e,this.nextSibling):e}function as(e){return this.select(e?os:is)}function ss(e){return arguments.length?this.property("__data__",e):this.node().__data__}function us(e){return function(n){e.call(this,n,this.__data__)}}function ls(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 cs(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 fs(e,n,r){return function(){var i=this.__on,o,a=us(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 hs(e,n,r){var i=ls(e+""),o,a=i.length,s;if(arguments.length<2){var u=this.node().__on;if(u){for(var c=0,l=u.length,f;c<l;++c)for(o=0,f=u[c];o<a;++o)if((s=i[o]).type===f.type&&s.name===f.name)return f.value}return}for(u=n?fs:cs,o=0;o<a;++o)this.each(u(i[o],n,r));return this}function ui(e,n,r){var i=ri(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 ds(e,n){return function(){return ui(this,e,n)}}function ps(e,n){return function(){return ui(this,e,n.apply(this,arguments))}}function gs(e,n){return this.each((typeof n=="function"?ps:ds)(e,n))}function*ys(){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 li=[null];function ft(e,n){this._groups=e,this._parents=n}function _e(){return new ft([[document.documentElement]],li)}function _s(){return this}ft.prototype=_e.prototype={constructor:ft,select:qo,selectAll:Bo,selectChild:Ko,selectChildren:ea,filter:na,data:ua,enter:ra,exit:ca,join:fa,merge:ha,selection:_s,order:da,sort:pa,call:ya,nodes:_a,node:va,size:ma,empty:xa,each:ba,attr:Ta,style:za,property:Da,classed:Fa,text:Wa,html:Xa,raise:Za,lower:Qa,append:Ja,insert:es,remove:rs,clone:as,datum:ss,on:hs,dispatch:gs,[Symbol.iterator]:ys};function pt(e){return typeof e=="string"?new ft([[document.querySelector(e)]],[document.documentElement]):new ft([[e]],li)}function vs(e){let n;for(;n=e.sourceEvent;)e=n;return e}function xt(e,n){if(e=vs(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 ms={value:()=>{}};function ve(){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 Se(r)}function Se(e){this._=e}function xs(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}})}Se.prototype=ve.prototype={constructor:Se,on:function(e,n){var r=this._,i=xs(e+"",r),o,a=-1,s=i.length;if(arguments.length<2){for(;++a<s;)if((o=(e=i[a]).type)&&(o=bs(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]=rr(r[o],e.name,n);else if(n==null)for(o in r)r[o]=rr(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 Se(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 bs(e,n){for(var r=0,i=e.length,o;r<i;++r)if((o=e[r]).name===n)return o.value}function rr(e,n,r){for(var i=0,o=e.length;i<o;++i)if(e[i].name===n){e[i]=ms,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:n,value:r}),e}const ws={passive:!1},pe={capture:!0,passive:!1};function Qe(e){e.stopImmediatePropagation()}function Vt(e){e.preventDefault(),e.stopImmediatePropagation()}function ci(e){var n=e.document.documentElement,r=pt(e).on("dragstart.drag",Vt,pe);"onselectstart"in n?r.on("selectstart.drag",Vt,pe):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")}function fi(e,n){var r=e.document.documentElement,i=pt(e).on("dragstart.drag",null);n&&(i.on("click.drag",Vt,pe),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 be=e=>()=>e;function pn(e,{sourceEvent:n,subject:r,target:i,identifier:o,active:a,x:s,y:u,dx:c,dy:l,dispatch:f}){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:c,enumerable:!0,configurable:!0},dy:{value:l,enumerable:!0,configurable:!0},_:{value:f}})}pn.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function ks(e){return!e.ctrlKey&&!e.button}function Cs(){return this.parentNode}function As(e,n){return n??{x:e.x,y:e.y}}function Ss(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ms(){var e=ks,n=Cs,r=As,i=Ss,o={},a=ve("start","drag","end"),s=0,u,c,l,f,h=0;function d(b){b.on("mousedown.drag",p).filter(i).on("touchstart.drag",v).on("touchmove.drag",g,ws).on("touchend.drag touchcancel.drag",k).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(b,_){if(!(f||!e.call(this,b,_))){var w=M(this,n.call(this,b,_),b,_,"mouse");w&&(pt(b.view).on("mousemove.drag",y,pe).on("mouseup.drag",m,pe),ci(b.view),Qe(b),l=!1,u=b.clientX,c=b.clientY,w("start",b))}}function y(b){if(Vt(b),!l){var _=b.clientX-u,w=b.clientY-c;l=_*_+w*w>h}o.mouse("drag",b)}function m(b){pt(b.view).on("mousemove.drag mouseup.drag",null),fi(b.view,l),Vt(b),o.mouse("end",b)}function v(b,_){if(e.call(this,b,_)){var w=b.changedTouches,A=n.call(this,b,_),T=w.length,R,P;for(R=0;R<T;++R)(P=M(this,A,b,_,w[R].identifier,w[R]))&&(Qe(b),P("start",b,w[R]))}}function g(b){var _=b.changedTouches,w=_.length,A,T;for(A=0;A<w;++A)(T=o[_[A].identifier])&&(Vt(b),T("drag",b,_[A]))}function k(b){var _=b.changedTouches,w=_.length,A,T;for(f&&clearTimeout(f),f=setTimeout(function(){f=null},500),A=0;A<w;++A)(T=o[_[A].identifier])&&(Qe(b),T("end",b,_[A]))}function M(b,_,w,A,T,R){var P=a.copy(),N=xt(R||w,_),D,U,S;if((S=r.call(b,new pn("beforestart",{sourceEvent:w,target:d,identifier:T,active:s,x:N[0],y:N[1],dx:0,dy:0,dispatch:P}),A))!=null)return D=S.x-N[0]||0,U=S.y-N[1]||0,function j(E,C,O){var I=N,L;switch(E){case"start":o[T]=j,L=s++;break;case"end":delete o[T],--s;case"drag":N=xt(O||C,_),L=s;break}P.call(E,b,new pn(E,{sourceEvent:C,subject:S,target:d,identifier:T,active:L,x:N[0]+D,y:N[1]+U,dx:N[0]-I[0],dy:N[1]-I[1],dispatch:P}),A)}}return d.filter=function(b){return arguments.length?(e=typeof b=="function"?b:be(!!b),d):e},d.container=function(b){return arguments.length?(n=typeof b=="function"?b:be(b),d):n},d.subject=function(b){return arguments.length?(r=typeof b=="function"?b:be(b),d):r},d.touchable=function(b){return arguments.length?(i=typeof b=="function"?b:be(!!b),d):i},d.on=function(){var b=a.on.apply(a,arguments);return b===a?d:b},d.clickDistance=function(b){return arguments.length?(h=(b=+b)*b,d):Math.sqrt(h)},d}var Xt=0,ae=0,Qt=0,hi=1e3,Ne,se,Re=0,Ht=0,Ge=0,ge=typeof performance=="object"&&performance.now?performance:Date,di=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function On(){return Ht||(di(Ts),Ht=ge.now()+Ge)}function Ts(){Ht=0}function je(){this._call=this._time=this._next=null}je.prototype=En.prototype={constructor:je,restart:function(e,n,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?On():+r)+(n==null?0:+n),!this._next&&se!==this&&(se?se._next=this:Ne=this,se=this),this._call=e,this._time=r,gn()},stop:function(){this._call&&(this._call=null,this._time=1/0,gn())}};function En(e,n,r){var i=new je;return i.restart(e,n,r),i}function Ps(){On(),++Xt;for(var e=Ne,n;e;)(n=Ht-e._time)>=0&&e._call.call(void 0,n),e=e._next;--Xt}function ir(){Ht=(Re=ge.now())+Ge,Xt=ae=0;try{Ps()}finally{Xt=0,Es(),Ht=0}}function Os(){var e=ge.now(),n=e-Re;n>hi&&(Ge-=n,Re=e)}function Es(){for(var e,n=Ne,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:Ne=r);se=e,gn(i)}function gn(e){if(!Xt){ae&&(ae=clearTimeout(ae));var n=e-Ht;n>24?(e<1/0&&(ae=setTimeout(ir,e-ge.now()-Ge)),Qt&&(Qt=clearInterval(Qt))):(Qt||(Re=ge.now(),Qt=setInterval(Os,hi)),Xt=1,di(ir))}}function or(e,n,r){var i=new je;return n=n==null?0:+n,i.restart(o=>{i.stop(),e(o+n)},n,r),i}var zs=ve("start","end","cancel","interrupt"),Ns=[],pi=0,ar=1,yn=2,Me=3,sr=4,_n=5,Te=6;function Ve(e,n,r,i,o,a){var s=e.__transition;if(!s)e.__transition={};else if(r in s)return;Rs(e,r,{name:n,index:i,group:o,on:zs,tween:Ns,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:pi})}function zn(e,n){var r=vt(e,n);if(r.state>pi)throw new Error("too late; already scheduled");return r}function Ct(e,n){var r=vt(e,n);if(r.state>Me)throw new Error("too late; already running");return r}function vt(e,n){var r=e.__transition;if(!r||!(r=r[n]))throw new Error("transition not found");return r}function Rs(e,n,r){var i=e.__transition,o;i[n]=r,r.timer=En(a,0,r.time);function a(l){r.state=ar,r.timer.restart(s,r.delay,r.time),r.delay<=l&&s(l-r.delay)}function s(l){var f,h,d,p;if(r.state!==ar)return c();for(f in i)if(p=i[f],p.name===r.name){if(p.state===Me)return or(s);p.state===sr?(p.state=Te,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete i[f]):+f<n&&(p.state=Te,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete i[f])}if(or(function(){r.state===Me&&(r.state=sr,r.timer.restart(u,r.delay,r.time),u(l))}),r.state=yn,r.on.call("start",e,e.__data__,r.index,r.group),r.state===yn){for(r.state=Me,o=new Array(d=r.tween.length),f=0,h=-1;f<d;++f)(p=r.tween[f].value.call(e,e.__data__,r.index,r.group))&&(o[++h]=p);o.length=h+1}}function u(l){for(var f=l<r.duration?r.ease.call(null,l/r.duration):(r.timer.restart(c),r.state=_n,1),h=-1,d=o.length;++h<d;)o[h].call(e,f);r.state===_n&&(r.on.call("end",e,e.__data__,r.index,r.group),c())}function c(){r.state=Te,r.timer.stop(),delete i[n];for(var l in i)return;delete e.__transition}}function Pe(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>yn&&i.state<_n,i.state=Te,i.timer.stop(),i.on.call(o?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[s]}a&&delete e.__transition}}function js(e){return this.each(function(){Pe(this,e)})}function Ds(e,n){var r,i;return function(){var o=Ct(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 Is(e,n,r){var i,o;if(typeof r!="function")throw new Error;return function(){var a=Ct(this,e),s=a.tween;if(s!==i){o=(i=s).slice();for(var u={name:n,value:r},c=0,l=o.length;c<l;++c)if(o[c].name===n){o[c]=u;break}c===l&&o.push(u)}a.tween=o}}function $s(e,n){var r=this._id;if(e+="",arguments.length<2){for(var i=vt(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?Ds:Is)(r,e,n))}function Nn(e,n,r){var i=e._id;return e.each(function(){var o=Ct(this,i);(o.value||(o.value={}))[n]=r.apply(this,arguments)}),function(o){return vt(o,i).value[n]}}function gi(e,n){var r;return(typeof n=="number"?Ft:n instanceof Xn?Yn:(r=Xn(n))?(n=r,Yn):ho)(e,n)}function Ls(e){return function(){this.removeAttribute(e)}}function Fs(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Us(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 Hs(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 qs(e,n,r){var i,o,a;return function(){var s,u=r(this),c;return u==null?void this.removeAttribute(e):(s=this.getAttribute(e),c=u+"",s===c?null:s===i&&c===o?a:(o=c,a=n(i=s,u)))}}function Ws(e,n,r){var i,o,a;return function(){var s,u=r(this),c;return u==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),c=u+"",s===c?null:s===i&&c===o?a:(o=c,a=n(i=s,u)))}}function Gs(e,n){var r=We(e),i=r==="transform"?ko:gi;return this.attrTween(e,typeof n=="function"?(r.local?Ws:qs)(r,i,Nn(this,"attr."+e,n)):n==null?(r.local?Fs:Ls)(r):(r.local?Hs:Us)(r,i,n))}function Vs(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 Ys(e,n){var r,i;function o(){var a=n.apply(this,arguments);return a!==i&&(r=(i=a)&&Vs(e,a)),r}return o._value=n,o}function Zs(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=We(e);return this.tween(r,(i.local?Xs:Ys)(i,n))}function Ks(e,n){return function(){zn(this,e).delay=+n.apply(this,arguments)}}function Qs(e,n){return n=+n,function(){zn(this,e).delay=n}}function Js(e){var n=this._id;return arguments.length?this.each((typeof e=="function"?Ks:Qs)(n,e)):vt(this.node(),n).delay}function tu(e,n){return function(){Ct(this,e).duration=+n.apply(this,arguments)}}function eu(e,n){return n=+n,function(){Ct(this,e).duration=n}}function nu(e){var n=this._id;return arguments.length?this.each((typeof e=="function"?tu:eu)(n,e)):vt(this.node(),n).duration}function ru(e,n){if(typeof n!="function")throw new Error;return function(){Ct(this,e).ease=n}}function iu(e){var n=this._id;return arguments.length?this.each(ru(n,e)):vt(this.node(),n).ease}function ou(e,n){return function(){var r=n.apply(this,arguments);if(typeof r!="function")throw new Error;Ct(this,e).ease=r}}function au(e){if(typeof e!="function")throw new Error;return this.each(ou(this._id,e))}function su(e){typeof e!="function"&&(e=ti(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]=[],c,l=0;l<s;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&u.push(c);return new Rt(i,this._parents,this._name,this._id)}function uu(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 c=n[u],l=r[u],f=c.length,h=s[u]=new Array(f),d,p=0;p<f;++p)(d=c[p]||l[p])&&(h[p]=d);for(;u<i;++u)s[u]=n[u];return new Rt(s,this._parents,this._name,this._id)}function lu(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 cu(e,n,r){var i,o,a=lu(n)?zn:Ct;return function(){var s=a(this,e),u=s.on;u!==i&&(o=(i=u).copy()).on(n,r),s.on=o}}function fu(e,n){var r=this._id;return arguments.length<2?vt(this.node(),r).on.on(e):this.each(cu(r,e,n))}function hu(e){return function(){var n=this.parentNode;for(var r in this.__transition)if(+r!==e)return;n&&n.removeChild(this)}}function du(){return this.on("end.remove",hu(this._id))}function pu(e){var n=this._name,r=this._id;typeof e!="function"&&(e=Tn(e));for(var i=this._groups,o=i.length,a=new Array(o),s=0;s<o;++s)for(var u=i[s],c=u.length,l=a[s]=new Array(c),f,h,d=0;d<c;++d)(f=u[d])&&(h=e.call(f,f.__data__,d,u))&&("__data__"in f&&(h.__data__=f.__data__),l[d]=h,Ve(l[d],n,r,d,l,vt(f,r)));return new Rt(a,this._parents,n,r)}function gu(e){var n=this._name,r=this._id;typeof e!="function"&&(e=Jr(e));for(var i=this._groups,o=i.length,a=[],s=[],u=0;u<o;++u)for(var c=i[u],l=c.length,f,h=0;h<l;++h)if(f=c[h]){for(var d=e.call(f,f.__data__,h,c),p,y=vt(f,r),m=0,v=d.length;m<v;++m)(p=d[m])&&Ve(p,n,r,m,d,y);a.push(d),s.push(f)}return new Rt(a,s,n,r)}var yu=_e.prototype.constructor;function _u(){return new yu(this._groups,this._parents)}function vu(e,n){var r,i,o;return function(){var a=Bt(this,e),s=(this.style.removeProperty(e),Bt(this,e));return a===s?null:a===r&&s===i?o:o=n(r=a,i=s)}}function yi(e){return function(){this.style.removeProperty(e)}}function mu(e,n,r){var i,o=r+"",a;return function(){var s=Bt(this,e);return s===o?null:s===i?a:a=n(i=s,r)}}function xu(e,n,r){var i,o,a;return function(){var s=Bt(this,e),u=r(this),c=u+"";return u==null&&(c=u=(this.style.removeProperty(e),Bt(this,e))),s===c?null:s===i&&c===o?a:(o=c,a=n(i=s,u))}}function bu(e,n){var r,i,o,a="style."+n,s="end."+a,u;return function(){var c=Ct(this,e),l=c.on,f=c.value[a]==null?u||(u=yi(n)):void 0;(l!==r||o!==f)&&(i=(r=l).copy()).on(s,o=f),c.on=i}}function wu(e,n,r){var i=(e+="")=="transform"?wo:gi;return n==null?this.styleTween(e,vu(e,i)).on("end.style."+e,yi(e)):typeof n=="function"?this.styleTween(e,xu(e,i,Nn(this,"style."+e,n))).each(bu(this._id,e)):this.styleTween(e,mu(e,i,n),r).on("end.style."+e,null)}function ku(e,n,r){return function(i){this.style.setProperty(e,n.call(this,i),r)}}function Cu(e,n,r){var i,o;function a(){var s=n.apply(this,arguments);return s!==o&&(i=(o=s)&&ku(e,s,r)),i}return a._value=n,a}function Au(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,Cu(e,n,r??""))}function Su(e){return function(){this.textContent=e}}function Mu(e){return function(){var n=e(this);this.textContent=n??""}}function Tu(e){return this.tween("text",typeof e=="function"?Mu(Nn(this,"text",e)):Su(e==null?"":e+""))}function Pu(e){return function(n){this.textContent=e.call(this,n)}}function Ou(e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&Pu(o)),n}return i._value=e,i}function Eu(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,Ou(e))}function zu(){for(var e=this._name,n=this._id,r=_i(),i=this._groups,o=i.length,a=0;a<o;++a)for(var s=i[a],u=s.length,c,l=0;l<u;++l)if(c=s[l]){var f=vt(c,n);Ve(c,e,r,l,s,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new Rt(i,this._parents,e,r)}function Nu(){var e,n,r=this,i=r._id,o=r.size();return new Promise(function(a,s){var u={value:s},c={value:function(){--o===0&&a()}};r.each(function(){var l=Ct(this,i),f=l.on;f!==e&&(n=(e=f).copy(),n._.cancel.push(u),n._.interrupt.push(u),n._.end.push(c)),l.on=n}),o===0&&a()})}var Ru=0;function Rt(e,n,r,i){this._groups=e,this._parents=n,this._name=r,this._id=i}function _i(){return++Ru}var St=_e.prototype;Rt.prototype={constructor:Rt,select:pu,selectAll:gu,selectChild:St.selectChild,selectChildren:St.selectChildren,filter:su,merge:uu,selection:_u,transition:zu,call:St.call,nodes:St.nodes,node:St.node,size:St.size,empty:St.empty,each:St.each,on:fu,attr:Gs,attrTween:Zs,style:wu,styleTween:Au,text:Tu,textTween:Eu,remove:du,tween:$s,delay:Js,duration:nu,ease:iu,easeVarying:au,end:Nu,[Symbol.iterator]:St[Symbol.iterator]};function ju(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Du={time:null,delay:0,duration:250,ease:ju};function Iu(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 $u(e){var n,r;e instanceof Rt?(n=e._id,e=e._name):(n=_i(),(r=Du).time=On(),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,c,l=0;l<u;++l)(c=s[l])&&Ve(c,e,n,l,s,r||Iu(c,n));return new Rt(i,this._parents,e,n)}_e.prototype.interrupt=js;_e.prototype.transition=$u;const we=e=>()=>e;function Lu(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 Et(e,n,r){this.k=e,this.x=n,this.y=r}Et.prototype={constructor:Et,scale:function(e){return e===1?this:new Et(this.k*e,this.x,this.y)},translate:function(e,n){return e===0&n===0?this:new Et(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 Rn=new Et(1,0,0);mt.prototype=Et.prototype;function mt(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Rn;return e.__zoom}function Je(e){e.stopImmediatePropagation()}function Jt(e){e.preventDefault(),e.stopImmediatePropagation()}function Fu(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Uu(){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 ur(){return this.__zoom||Rn}function Hu(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function qu(){return navigator.maxTouchPoints||"ontouchstart"in this}function Wu(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 Gu(){var e=Fu,n=Uu,r=Wu,i=Hu,o=qu,a=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],u=250,c=Mo,l=ve("start","zoom","end"),f,h,d,p=500,y=150,m=0,v=10;function g(S){S.property("__zoom",ur).on("wheel.zoom",T,{passive:!1}).on("mousedown.zoom",R).on("dblclick.zoom",P).filter(o).on("touchstart.zoom",N).on("touchmove.zoom",D).on("touchend.zoom touchcancel.zoom",U).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}g.transform=function(S,j,E,C){var O=S.selection?S.selection():S;O.property("__zoom",ur),S!==O?_(S,j,E,C):O.interrupt().each(function(){w(this,arguments).event(C).start().zoom(null,typeof j=="function"?j.apply(this,arguments):j).end()})},g.scaleBy=function(S,j,E,C){g.scaleTo(S,function(){var O=this.__zoom.k,I=typeof j=="function"?j.apply(this,arguments):j;return O*I},E,C)},g.scaleTo=function(S,j,E,C){g.transform(S,function(){var O=n.apply(this,arguments),I=this.__zoom,L=E==null?b(O):typeof E=="function"?E.apply(this,arguments):E,H=I.invert(L),F=typeof j=="function"?j.apply(this,arguments):j;return r(M(k(I,F),L,H),O,s)},E,C)},g.translateBy=function(S,j,E,C){g.transform(S,function(){return r(this.__zoom.translate(typeof j=="function"?j.apply(this,arguments):j,typeof E=="function"?E.apply(this,arguments):E),n.apply(this,arguments),s)},null,C)},g.translateTo=function(S,j,E,C,O){g.transform(S,function(){var I=n.apply(this,arguments),L=this.__zoom,H=C==null?b(I):typeof C=="function"?C.apply(this,arguments):C;return r(Rn.translate(H[0],H[1]).scale(L.k).translate(typeof j=="function"?-j.apply(this,arguments):-j,typeof E=="function"?-E.apply(this,arguments):-E),I,s)},C,O)};function k(S,j){return j=Math.max(a[0],Math.min(a[1],j)),j===S.k?S:new Et(j,S.x,S.y)}function M(S,j,E){var C=j[0]-E[0]*S.k,O=j[1]-E[1]*S.k;return C===S.x&&O===S.y?S:new Et(S.k,C,O)}function b(S){return[(+S[0][0]+ +S[1][0])/2,(+S[0][1]+ +S[1][1])/2]}function _(S,j,E,C){S.on("start.zoom",function(){w(this,arguments).event(C).start()}).on("interrupt.zoom end.zoom",function(){w(this,arguments).event(C).end()}).tween("zoom",function(){var O=this,I=arguments,L=w(O,I).event(C),H=n.apply(O,I),F=E==null?b(H):typeof E=="function"?E.apply(O,I):E,G=Math.max(H[1][0]-H[0][0],H[1][1]-H[0][1]),V=O.__zoom,X=typeof j=="function"?j.apply(O,I):j,tt=c(V.invert(F).concat(G/V.k),X.invert(F).concat(G/X.k));return function(Z){if(Z===1)Z=X;else{var st=tt(Z),et=G/st[2];Z=new Et(et,F[0]-st[0]*et,F[1]-st[1]*et)}L.zoom(null,Z)}})}function w(S,j,E){return!E&&S.__zooming||new A(S,j)}function A(S,j){this.that=S,this.args=j,this.active=0,this.sourceEvent=null,this.extent=n.apply(S,j),this.taps=0}A.prototype={event:function(S){return S&&(this.sourceEvent=S),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(S,j){return this.mouse&&S!=="mouse"&&(this.mouse[1]=j.invert(this.mouse[0])),this.touch0&&S!=="touch"&&(this.touch0[1]=j.invert(this.touch0[0])),this.touch1&&S!=="touch"&&(this.touch1[1]=j.invert(this.touch1[0])),this.that.__zoom=j,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(S){var j=pt(this.that).datum();l.call(S,this.that,new Lu(S,{sourceEvent:this.sourceEvent,target:g,transform:this.that.__zoom,dispatch:l}),j)}};function T(S,...j){if(!e.apply(this,arguments))return;var E=w(this,j).event(S),C=this.__zoom,O=Math.max(a[0],Math.min(a[1],C.k*Math.pow(2,i.apply(this,arguments)))),I=xt(S);if(E.wheel)(E.mouse[0][0]!==I[0]||E.mouse[0][1]!==I[1])&&(E.mouse[1]=C.invert(E.mouse[0]=I)),clearTimeout(E.wheel);else{if(C.k===O)return;E.mouse=[I,C.invert(I)],Pe(this),E.start()}Jt(S),E.wheel=setTimeout(L,y),E.zoom("mouse",r(M(k(C,O),E.mouse[0],E.mouse[1]),E.extent,s));function L(){E.wheel=null,E.end()}}function R(S,...j){if(d||!e.apply(this,arguments))return;var E=S.currentTarget,C=w(this,j,!0).event(S),O=pt(S.view).on("mousemove.zoom",F,!0).on("mouseup.zoom",G,!0),I=xt(S,E),L=S.clientX,H=S.clientY;ci(S.view),Je(S),C.mouse=[I,this.__zoom.invert(I)],Pe(this),C.start();function F(V){if(Jt(V),!C.moved){var X=V.clientX-L,tt=V.clientY-H;C.moved=X*X+tt*tt>m}C.event(V).zoom("mouse",r(M(C.that.__zoom,C.mouse[0]=xt(V,E),C.mouse[1]),C.extent,s))}function G(V){O.on("mousemove.zoom mouseup.zoom",null),fi(V.view,C.moved),Jt(V),C.event(V).end()}}function P(S,...j){if(e.apply(this,arguments)){var E=this.__zoom,C=xt(S.changedTouches?S.changedTouches[0]:S,this),O=E.invert(C),I=E.k*(S.shiftKey?.5:2),L=r(M(k(E,I),C,O),n.apply(this,j),s);Jt(S),u>0?pt(this).transition().duration(u).call(_,L,C,S):pt(this).call(g.transform,L,C,S)}}function N(S,...j){if(e.apply(this,arguments)){var E=S.touches,C=E.length,O=w(this,j,S.changedTouches.length===C).event(S),I,L,H,F;for(Je(S),L=0;L<C;++L)H=E[L],F=xt(H,this),F=[F,this.__zoom.invert(F),H.identifier],O.touch0?!O.touch1&&O.touch0[2]!==F[2]&&(O.touch1=F,O.taps=0):(O.touch0=F,I=!0,O.taps=1+!!f);f&&(f=clearTimeout(f)),I&&(O.taps<2&&(h=F[0],f=setTimeout(function(){f=null},p)),Pe(this),O.start())}}function D(S,...j){if(this.__zooming){var E=w(this,j).event(S),C=S.changedTouches,O=C.length,I,L,H,F;for(Jt(S),I=0;I<O;++I)L=C[I],H=xt(L,this),E.touch0&&E.touch0[2]===L.identifier?E.touch0[0]=H:E.touch1&&E.touch1[2]===L.identifier&&(E.touch1[0]=H);if(L=E.that.__zoom,E.touch1){var G=E.touch0[0],V=E.touch0[1],X=E.touch1[0],tt=E.touch1[1],Z=(Z=X[0]-G[0])*Z+(Z=X[1]-G[1])*Z,st=(st=tt[0]-V[0])*st+(st=tt[1]-V[1])*st;L=k(L,Math.sqrt(Z/st)),H=[(G[0]+X[0])/2,(G[1]+X[1])/2],F=[(V[0]+tt[0])/2,(V[1]+tt[1])/2]}else if(E.touch0)H=E.touch0[0],F=E.touch0[1];else return;E.zoom("touch",r(M(L,H,F),E.extent,s))}}function U(S,...j){if(this.__zooming){var E=w(this,j).event(S),C=S.changedTouches,O=C.length,I,L;for(Je(S),d&&clearTimeout(d),d=setTimeout(function(){d=null},p),I=0;I<O;++I)L=C[I],E.touch0&&E.touch0[2]===L.identifier?delete E.touch0:E.touch1&&E.touch1[2]===L.identifier&&delete E.touch1;if(E.touch1&&!E.touch0&&(E.touch0=E.touch1,delete E.touch1),E.touch0)E.touch0[1]=this.__zoom.invert(E.touch0[0]);else if(E.end(),E.taps===2&&(L=xt(L,this),Math.hypot(h[0]-L[0],h[1]-L[1])<v)){var H=pt(this).on("dblclick.zoom");H&&H.apply(this,arguments)}}}return g.wheelDelta=function(S){return arguments.length?(i=typeof S=="function"?S:we(+S),g):i},g.filter=function(S){return arguments.length?(e=typeof S=="function"?S:we(!!S),g):e},g.touchable=function(S){return arguments.length?(o=typeof S=="function"?S:we(!!S),g):o},g.extent=function(S){return arguments.length?(n=typeof S=="function"?S:we([[+S[0][0],+S[0][1]],[+S[1][0],+S[1][1]]]),g):n},g.scaleExtent=function(S){return arguments.length?(a[0]=+S[0],a[1]=+S[1],g):[a[0],a[1]]},g.translateExtent=function(S){return arguments.length?(s[0][0]=+S[0][0],s[1][0]=+S[1][0],s[0][1]=+S[0][1],s[1][1]=+S[1][1],g):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},g.constrain=function(S){return arguments.length?(r=S,g):r},g.duration=function(S){return arguments.length?(u=+S,g):u},g.interpolate=function(S){return arguments.length?(c=S,g):c},g.on=function(){var S=l.on.apply(l,arguments);return S===l?g:S},g.clickDistance=function(S){return arguments.length?(m=(S=+S)*S,g):Math.sqrt(m)},g.tapDistance=function(S){return arguments.length?(v=+S,g):v},g}var Vu=typeof global=="object"&&global&&global.Object===Object&&global,Bu=typeof self=="object"&&self&&self.Object===Object&&self,vi=Vu||Bu||Function("return this")(),De=vi.Symbol,mi=Object.prototype,Xu=mi.hasOwnProperty,Yu=mi.toString,te=De?De.toStringTag:void 0;function Zu(e){var n=Xu.call(e,te),r=e[te];try{e[te]=void 0;var i=!0}catch{}var o=Yu.call(e);return i&&(n?e[te]=r:delete e[te]),o}var Ku=Object.prototype,Qu=Ku.toString;function Ju(e){return Qu.call(e)}var tl="[object Null]",el="[object Undefined]",lr=De?De.toStringTag:void 0;function nl(e){return e==null?e===void 0?el:tl:lr&&lr in Object(e)?Zu(e):Ju(e)}function rl(e){return e!=null&&typeof e=="object"}var il="[object Symbol]";function ol(e){return typeof e=="symbol"||rl(e)&&nl(e)==il}var al=/\s/;function sl(e){for(var n=e.length;n--&&al.test(e.charAt(n)););return n}var ul=/^\s+/;function ll(e){return e&&e.slice(0,sl(e)+1).replace(ul,"")}function Ie(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}var cr=NaN,cl=/^[-+]0x[0-9a-f]+$/i,fl=/^0b[01]+$/i,hl=/^0o[0-7]+$/i,dl=parseInt;function fr(e){if(typeof e=="number")return e;if(ol(e))return cr;if(Ie(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=Ie(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=ll(e);var r=fl.test(e);return r||hl.test(e)?dl(e.slice(2),r?2:8):cl.test(e)?cr:+e}var tn=function(){return vi.Date.now()},pl="Expected a function",gl=Math.max,yl=Math.min;function xi(e,n,r){var i,o,a,s,u,c,l=0,f=!1,h=!1,d=!0;if(typeof e!="function")throw new TypeError(pl);n=fr(n)||0,Ie(r)&&(f=!!r.leading,h="maxWait"in r,a=h?gl(fr(r.maxWait)||0,n):a,d="trailing"in r?!!r.trailing:d);function p(w){var A=i,T=o;return i=o=void 0,l=w,s=e.apply(T,A),s}function y(w){return l=w,u=setTimeout(g,n),f?p(w):s}function m(w){var A=w-c,T=w-l,R=n-A;return h?yl(R,a-T):R}function v(w){var A=w-c,T=w-l;return c===void 0||A>=n||A<0||h&&T>=a}function g(){var w=tn();if(v(w))return k(w);u=setTimeout(g,m(w))}function k(w){return u=void 0,d&&i?p(w):(i=o=void 0,s)}function M(){u!==void 0&&clearTimeout(u),l=0,i=c=o=u=void 0}function b(){return u===void 0?s:k(tn())}function _(){var w=tn(),A=v(w);if(i=arguments,o=this,c=w,A){if(u===void 0)return y(c);if(h)return clearTimeout(u),u=setTimeout(g,n),p(c)}return u===void 0&&(u=setTimeout(g,n)),s}return _.cancel=M,_.flush=b,_}var _l="Expected a function";function vl(e,n,r){var i=!0,o=!0;if(typeof e!="function")throw new TypeError(_l);return Ie(r)&&(i="leading"in r?!!r.leading:i,o="trailing"in r?!!r.trailing:o),xi(e,n,{leading:i,maxWait:n,trailing:o})}var Ut=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-Ut.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?Ut.Bounce.In(e*2)*.5:Ut.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}}}}),ue=function(){return performance.now()},bi=(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=ue()),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})(),vn={Linear:function(e,n){var r=e.length-1,i=r*n,o=Math.floor(i),a=vn.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}}},wi=(function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e})(),mn=new bi,hr=(function(){function e(n,r){r===void 0&&(r=mn),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=Ut.Linear.None,this._interpolationFunction=vn.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=wi.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=ue()),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],c=Array.isArray(u),l=c?"array":typeof u,f=!c&&Array.isArray(i[s]);if(!(l==="undefined"||l==="function")){if(f){var h=i[s];if(h.length===0)continue;for(var d=[u],p=0,y=h.length;p<y;p+=1){var m=this._handleRelativeValue(u,h[p]);if(isNaN(m)){f=!1,console.warn("Found invalid interpolation list. Skipping.");break}d.push(m)}f&&(i[s]=d)}if((l==="object"||c)&&u&&!f){r[s]=c?[]:{};var v=u;for(var g in v)r[s][g]=v[g];o[s]=c?[]:{};var h=i[s];if(!this._isDynamic){var k={};for(var g in h)k[g]=h[g];i[s]=h=k}this._setupProperties(v,r[s],h,o[s],a)}else(typeof r[s]>"u"||a)&&(r[s]=u),c||(r[s]*=1),f?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=ue()),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=ue()),!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=mn),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=Ut.Linear.None),this._easingFunction=n,this},e.prototype.interpolation=function(n){return n===void 0&&(n=vn.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=ue()),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,c=this._duration+((o=this._repeatDelayTime)!==null&&o!==void 0?o:this._delayTime),l=this._duration+this._repeat*c,f=function(){if(i._duration===0||u>l)return 1;var v=Math.trunc(u/c),g=u-v*c,k=Math.min(g/i._duration,1);return k===0&&u===i._duration?1:k},h=f(),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 p=Math.min(Math.trunc((u-this._duration)/c)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=p);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+=c*p,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var y=0,m=this._chainedTweens.length;y<m;y++)this._chainedTweens[y].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],c=Array.isArray(n[a]),l=Array.isArray(u),f=!c&&l;f?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})();wi.nextId;var kt=mn;kt.getAll.bind(kt);kt.removeAll.bind(kt);kt.add.bind(kt);kt.remove.bind(kt);kt.update.bind(kt);function dr(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 ml(e){if(Array.isArray(e))return e}function xl(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function bl(e,n,r){return Object.defineProperty(e,"prototype",{writable:!1}),e}function wl(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,a,s,u=[],c=!0,l=!1;try{if(a=(r=r.call(e)).next,n!==0)for(;!(c=(i=a.call(r)).done)&&(u.push(i.value),u.length!==n);c=!0);}catch(f){l=!0,o=f}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(l)throw o}}return u}}function kl(){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 Cl(e,n){return ml(e)||wl(e,n)||Al(e,n)||kl()}function Al(e,n){if(e){if(typeof e=="string")return dr(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)?dr(e,n):void 0}}var Sl=bl(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,c=u===void 0?function(l,f){}:u;xl(this,e),this.name=n,this.defaultVal=o,this.triggerUpdate=s,this.onChange=c});function jn(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,c=u===void 0?{}:u,l=e.init,f=l===void 0?function(){}:l,h=e.update,d=h===void 0?function(){}:h,p=Object.keys(o).map(function(y){return new Sl(y,o[y])});return function y(){for(var m=arguments.length,v=new Array(m),g=0;g<m;g++)v[g]=arguments[g];var k=!!(this instanceof y&&this.constructor),M=k?v.shift():void 0,b=v[0],_=b===void 0?{}:b,w=Object.assign({},r instanceof Function?r(_):r,{initialised:!1}),A={};function T(N){return R(N,_),P(),T}var R=function(D,U){f.call(T,D,w,U),w.initialised=!0},P=xi(function(){w.initialised&&(d.call(T,w,A),A={})},1);return p.forEach(function(N){T[N.name]=D(N);function D(U){var S=U.name,j=U.triggerUpdate,E=j===void 0?!1:j,C=U.onChange,O=C===void 0?function(H,F){}:C,I=U.defaultVal,L=I===void 0?null:I;return function(H){var F=w[S];if(!arguments.length)return F;var G=H===void 0?L:H;return w[S]=G,O.call(T,G,w,F),!A.hasOwnProperty(S)&&(A[S]=F),E&&P(),T}}}),Object.keys(s).forEach(function(N){T[N]=function(){for(var D,U=arguments.length,S=new Array(U),j=0;j<U;j++)S[j]=arguments[j];return(D=s[N]).call.apply(D,[T,w].concat(S))}}),Object.entries(c).forEach(function(N){var D=Cl(N,2),U=D[0],S=D[1];return T[U]=T[S]}),T.resetProps=function(){return p.forEach(function(N){T[N.name](N.defaultVal)}),T},T.resetProps(),w._rerender=P,k&&M&&T(M),T}}var B=(function(e){return typeof e=="function"?e:typeof e=="string"?function(n){return n[e]}:function(n){return e}});function $e(e){"@babel/helpers - typeof";return $e=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},$e(e)}var Ml=/^\s+/,Tl=/\s+$/;function q(e,n){if(e=e||"",n=n||{},e instanceof q)return e;if(!(this instanceof q))return new q(e,n);var r=Pl(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}q.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=ki(n),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var n=gr(this._r,this._g,this._b);return{h:n.h*360,s:n.s,v:n.v,a:this._a}},toHsvString:function(){var n=gr(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=pr(this._r,this._g,this._b);return{h:n.h*360,s:n.s,l:n.l,a:this._a}},toHslString:function(){var n=pr(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 yr(this._r,this._g,this._b,n)},toHexString:function(n){return"#"+this.toHex(n)},toHex8:function(n){return Nl(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(Q(this._r,255)*100)+"%",g:Math.round(Q(this._g,255)*100)+"%",b:Math.round(Q(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(Q(this._r,255)*100)+"%, "+Math.round(Q(this._g,255)*100)+"%, "+Math.round(Q(this._b,255)*100)+"%)":"rgba("+Math.round(Q(this._r,255)*100)+"%, "+Math.round(Q(this._g,255)*100)+"%, "+Math.round(Q(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:Gl[yr(this._r,this._g,this._b,!0)]||!1},toFilter:function(n){var r="#"+_r(this._r,this._g,this._b,this._a),i=r,o=this._gradientType?"GradientType = 1, ":"";if(n){var a=q(n);i="#"+_r(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 q(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(Il,arguments)},brighten:function(){return this._applyModification($l,arguments)},darken:function(){return this._applyModification(Ll,arguments)},desaturate:function(){return this._applyModification(Rl,arguments)},saturate:function(){return this._applyModification(jl,arguments)},greyscale:function(){return this._applyModification(Dl,arguments)},spin:function(){return this._applyModification(Fl,arguments)},_applyCombination:function(n,r){return n.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(ql,arguments)},complement:function(){return this._applyCombination(Ul,arguments)},monochromatic:function(){return this._applyCombination(Wl,arguments)},splitcomplement:function(){return this._applyCombination(Hl,arguments)},triad:function(){return this._applyCombination(vr,[3])},tetrad:function(){return this._applyCombination(vr,[4])}};q.fromRatio=function(e,n){if($e(e)=="object"){var r={};for(var i in e)e.hasOwnProperty(i)&&(i==="a"?r[i]=e[i]:r[i]=le(e[i]));e=r}return q(e,n)};function Pl(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=Yl(e)),$e(e)=="object"&&(Mt(e.r)&&Mt(e.g)&&Mt(e.b)?(n=Ol(e.r,e.g,e.b),s=!0,u=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Mt(e.h)&&Mt(e.s)&&Mt(e.v)?(i=le(e.s),o=le(e.v),n=zl(e.h,i,o),s=!0,u="hsv"):Mt(e.h)&&Mt(e.s)&&Mt(e.l)&&(i=le(e.s),a=le(e.l),n=El(e.h,i,a),s=!0,u="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=ki(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 Ol(e,n,r){return{r:Q(e,255)*255,g:Q(n,255)*255,b:Q(r,255)*255}}function pr(e,n,r){e=Q(e,255),n=Q(n,255),r=Q(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 c=i-o;switch(s=u>.5?c/(2-i-o):c/(i+o),i){case e:a=(n-r)/c+(n<r?6:0);break;case n:a=(r-e)/c+2;break;case r:a=(e-n)/c+4;break}a/=6}return{h:a,s,l:u}}function El(e,n,r){var i,o,a;e=Q(e,360),n=Q(n,100),r=Q(r,100);function s(l,f,h){return h<0&&(h+=1),h>1&&(h-=1),h<1/6?l+(f-l)*6*h:h<1/2?f:h<2/3?l+(f-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,c=2*r-u;i=s(c,u,e+1/3),o=s(c,u,e),a=s(c,u,e-1/3)}return{r:i*255,g:o*255,b:a*255}}function gr(e,n,r){e=Q(e,255),n=Q(n,255),r=Q(r,255);var i=Math.max(e,n,r),o=Math.min(e,n,r),a,s,u=i,c=i-o;if(s=i===0?0:c/i,i==o)a=0;else{switch(i){case e:a=(n-r)/c+(n<r?6:0);break;case n:a=(r-e)/c+2;break;case r:a=(e-n)/c+4;break}a/=6}return{h:a,s,v:u}}function zl(e,n,r){e=Q(e,360)*6,n=Q(n,100),r=Q(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),c=i%6,l=[r,s,a,a,u,r][c],f=[u,r,r,s,a,a][c],h=[a,a,u,r,r,s][c];return{r:l*255,g:f*255,b:h*255}}function yr(e,n,r,i){var o=[_t(Math.round(e).toString(16)),_t(Math.round(n).toString(16)),_t(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 Nl(e,n,r,i,o){var a=[_t(Math.round(e).toString(16)),_t(Math.round(n).toString(16)),_t(Math.round(r).toString(16)),_t(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 _r(e,n,r,i){var o=[_t(Ci(i)),_t(Math.round(e).toString(16)),_t(Math.round(n).toString(16)),_t(Math.round(r).toString(16))];return o.join("")}q.equals=function(e,n){return!e||!n?!1:q(e).toRgbString()==q(n).toRgbString()};q.random=function(){return q.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function Rl(e,n){n=n===0?0:n||10;var r=q(e).toHsl();return r.s-=n/100,r.s=Be(r.s),q(r)}function jl(e,n){n=n===0?0:n||10;var r=q(e).toHsl();return r.s+=n/100,r.s=Be(r.s),q(r)}function Dl(e){return q(e).desaturate(100)}function Il(e,n){n=n===0?0:n||10;var r=q(e).toHsl();return r.l+=n/100,r.l=Be(r.l),q(r)}function $l(e,n){n=n===0?0:n||10;var r=q(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)))),q(r)}function Ll(e,n){n=n===0?0:n||10;var r=q(e).toHsl();return r.l-=n/100,r.l=Be(r.l),q(r)}function Fl(e,n){var r=q(e).toHsl(),i=(r.h+n)%360;return r.h=i<0?360+i:i,q(r)}function Ul(e){var n=q(e).toHsl();return n.h=(n.h+180)%360,q(n)}function vr(e,n){if(isNaN(n)||n<=0)throw new Error("Argument to polyad must be a positive number");for(var r=q(e).toHsl(),i=[q(e)],o=360/n,a=1;a<n;a++)i.push(q({h:(r.h+a*o)%360,s:r.s,l:r.l}));return i}function Hl(e){var n=q(e).toHsl(),r=n.h;return[q(e),q({h:(r+72)%360,s:n.s,l:n.l}),q({h:(r+216)%360,s:n.s,l:n.l})]}function ql(e,n,r){n=n||6,r=r||30;var i=q(e).toHsl(),o=360/r,a=[q(e)];for(i.h=(i.h-(o*n>>1)+720)%360;--n;)i.h=(i.h+o)%360,a.push(q(i));return a}function Wl(e,n){n=n||6;for(var r=q(e).toHsv(),i=r.h,o=r.s,a=r.v,s=[],u=1/n;n--;)s.push(q({h:i,s:o,v:a})),a=(a+u)%1;return s}q.mix=function(e,n,r){r=r===0?0:r||50;var i=q(e).toRgb(),o=q(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 q(s)};q.readability=function(e,n){var r=q(e),i=q(n);return(Math.max(r.getLuminance(),i.getLuminance())+.05)/(Math.min(r.getLuminance(),i.getLuminance())+.05)};q.isReadable=function(e,n,r){var i=q.readability(e,n),o,a;switch(a=!1,o=Zl(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};q.mostReadable=function(e,n,r){var i=null,o=0,a,s,u,c;r=r||{},s=r.includeFallbackColors,u=r.level,c=r.size;for(var l=0;l<n.length;l++)a=q.readability(e,n[l]),a>o&&(o=a,i=q(n[l]));return q.isReadable(e,i,{level:u,size:c})||!s?i:(r.includeFallbackColors=!1,q.mostReadable(e,["#fff","#000"],r))};var xn=q.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"},Gl=q.hexNames=Vl(xn);function Vl(e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[e[r]]=r);return n}function ki(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Q(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 Be(e){return Math.min(1,Math.max(0,e))}function ct(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 _t(e){return e.length==1?"0"+e:""+e}function le(e){return e<=1&&(e=e*100+"%"),e}function Ci(e){return Math.round(parseFloat(e)*255).toString(16)}function mr(e){return ct(e)/255}var yt=(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 Mt(e){return!!yt.CSS_UNIT.exec(e)}function Yl(e){e=e.replace(Ml,"").replace(Tl,"").toLowerCase();var n=!1;if(xn[e])e=xn[e],n=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=yt.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=yt.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=yt.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=yt.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=yt.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=yt.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=yt.hex8.exec(e))?{r:ct(r[1]),g:ct(r[2]),b:ct(r[3]),a:mr(r[4]),format:n?"name":"hex8"}:(r=yt.hex6.exec(e))?{r:ct(r[1]),g:ct(r[2]),b:ct(r[3]),format:n?"name":"hex"}:(r=yt.hex4.exec(e))?{r:ct(r[1]+""+r[1]),g:ct(r[2]+""+r[2]),b:ct(r[3]+""+r[3]),a:mr(r[4]+""+r[4]),format:n?"name":"hex8"}:(r=yt.hex3.exec(e))?{r:ct(r[1]+""+r[1]),g:ct(r[2]+""+r[2]),b:ct(r[3]+""+r[3]),format:n?"name":"hex"}:!1}function Zl(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 bn(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 Kl(e){if(Array.isArray(e))return bn(e)}function Ai(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 Ql(e,n){if(n.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Jl(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function ht(e,n){return e.get(Ai(e,n))}function xr(e,n,r){Ql(e,n),n.set(e,r)}function br(e,n,r){return e.set(Ai(e,n),r),r}function tc(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,ac(i.key),i)}}function ec(e,n,r){return n&&tc(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function nc(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function rc(){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 ic(e){return Kl(e)||nc(e)||sc(e)||rc()}function oc(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 ac(e){var n=oc(e,"string");return typeof n=="symbol"?n:n+""}function sc(e,n){if(e){if(typeof e=="string")return bn(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)?bn(e,n):void 0}}var uc=123,lc=function(n){return"#".concat(Math.min(n,Math.pow(2,24)).toString(16).padStart(6,"0"))},Si=function(n,r,i){return(n<<16)+(r<<8)+i},cc=function(n){var r=q(n).toRgb(),i=r.r,o=r.g,a=r.b;return Si(i,o,a)},wr=function(n,r){return n*uc%Math.pow(2,r)},Lt=new WeakMap,Tt=new WeakMap,fc=(function(){function e(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:6;Jl(this,e),xr(this,Lt,void 0),xr(this,Tt,void 0),br(Tt,this,n),this.reset()}return ec(e,[{key:"reset",value:function(){br(Lt,this,["__reserved for background__"])}},{key:"register",value:function(r){if(ht(Lt,this).length>=Math.pow(2,24-ht(Tt,this)))return null;var i=ht(Lt,this).length,o=wr(i,ht(Tt,this)),a=lc(i+(o<<24-ht(Tt,this)));return ht(Lt,this).push(r),a}},{key:"lookup",value:function(r){if(!r)return null;var i=typeof r=="string"?cc(r):Si.apply(void 0,ic(r));if(!i)return null;var o=i&Math.pow(2,24-ht(Tt,this))-1,a=i>>24-ht(Tt,this)&Math.pow(2,ht(Tt,this))-1;return wr(o,ht(Tt,this))!==a||o>=ht(Lt,this).length?null:ht(Lt,this)[o]}}])})(),me,J,Mi,Ti,$t,kr,Pi,Oi,en,Oe,ce,Ei,Dn,wn,kn,Le={},Fe=[],hc=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Xe=Array.isArray;function bt(e,n){for(var r in n)e[r]=n[r];return e}function In(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function dc(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?me.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 fe(e,s,i,o,null)}function fe(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??++Mi,__i:-1,__u:0};return o==null&&J.vnode!=null&&J.vnode(a),a}function Ye(e){return e.children}function Ee(e,n){this.props=e,this.context=n}function Yt(e,n){if(n==null)return e.__?Yt(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"?Yt(e):null}function pc(e){if(e.__P&&e.__d){var n=e.__v,r=n.__e,i=[],o=[],a=bt({},n);a.__v=n.__v+1,J.vnode&&J.vnode(a),$n(e.__P,a,n,e.__n,e.__P.namespaceURI,32&n.__u?[r]:null,i,r??Yt(n),!!(32&n.__u),o),a.__v=n.__v,a.__.__k[a.__i]=a,Di(i,a,o),n.__e=n.__=null,a.__e!=r&&zi(a)}}function zi(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}),zi(e)}function Cr(e){(!e.__d&&(e.__d=!0)&&$t.push(e)&&!Ue.__r++||kr!=J.debounceRendering)&&((kr=J.debounceRendering)||Pi)(Ue)}function Ue(){try{for(var e,n=1;$t.length;)$t.length>n&&$t.sort(Oi),e=$t.shift(),n=$t.length,pc(e)}finally{$t.length=Ue.__r=0}}function Ni(e,n,r,i,o,a,s,u,c,l,f){var h,d,p,y,m,v,g,k=i&&i.__k||Fe,M=n.length;for(c=gc(r,n,k,c,M),h=0;h<M;h++)(p=r.__k[h])!=null&&(d=p.__i!=-1&&k[p.__i]||Le,p.__i=h,v=$n(e,p,d,o,a,s,u,c,l,f),y=p.__e,p.ref&&d.ref!=p.ref&&(d.ref&&Ln(d.ref,null,p),f.push(p.ref,p.__c||y,p)),m==null&&y!=null&&(m=y),(g=!!(4&p.__u))||d.__k===p.__k?(c=Ri(p,c,e,g),g&&d.__e&&(d.__e=null)):typeof p.type=="function"&&v!==void 0?c=v:y&&(c=y.nextSibling),p.__u&=-7);return r.__e=m,c}function gc(e,n,r,i,o){var a,s,u,c,l,f=r.length,h=f,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]=fe(null,s,null,null,null):Xe(s)?s=e.__k[a]=fe(Ye,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=e.__k[a]=fe(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[a]=s,c=a+d,s.__=e,s.__b=e.__b+1,u=null,(l=s.__i=yc(s,r,c,h))!=-1&&(h--,(u=r[l])&&(u.__u|=2)),u==null||u.__v==null?(l==-1&&(o>f?d--:o<f&&d++),typeof s.type!="function"&&(s.__u|=4)):l!=c&&(l==c-1?d--:l==c+1?d++:(l>c?d--:d++,s.__u|=4))):e.__k[a]=null;if(h)for(a=0;a<f;a++)(u=r[a])!=null&&(2&u.__u)==0&&(u.__e==i&&(i=Yt(u)),$i(u,u));return i}function Ri(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=Ri(o[a],n,r,i));return n}e.__e!=n&&(i&&(n&&e.type&&!n.parentNode&&(n=Yt(e)),r.insertBefore(e.__e,n||null)),n=e.__e);do n=n&&n.nextSibling;while(n!=null&&n.nodeType==8);return n}function yc(e,n,r,i){var o,a,s,u=e.key,c=e.type,l=n[r],f=l!=null&&(2&l.__u)==0;if(l===null&&u==null||f&&u==l.key&&c==l.type)return r;if(i>(f?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&&c==l.type)return s}return-1}function Ar(e,n,r){n[0]=="-"?e.setProperty(n,r??""):e[n]=r==null?"":typeof r!="number"||hc.test(n)?r:r+"px"}function ke(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||Ar(e.style,n,"");if(r)for(n in r)i&&r[n]==i[n]||Ar(e.style,n,r[n])}else if(n[0]=="o"&&n[1]=="n")a=n!=(n=n.replace(Ei,"$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[ce]=i[ce]:(r[ce]=Dn,e.addEventListener(n,a?kn:wn,a)):e.removeEventListener(n,a?kn:wn,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 Sr(e){return function(n){if(this.l){var r=this.l[n.type+e];if(n[Oe]==null)n[Oe]=Dn++;else if(n[Oe]<r[ce])return;return r(J.event?J.event(n):n)}}}function $n(e,n,r,i,o,a,s,u,c,l){var f,h,d,p,y,m,v,g,k,M,b,_,w,A,T,R,P=n.type;if(n.constructor!==void 0)return null;128&r.__u&&(c=!!(32&r.__u),a=[u=n.__e=r.__e]),(f=J.__b)&&f(n);t:if(typeof P=="function"){h=s.length;try{if(k=n.props,M=P.prototype&&P.prototype.render,b=(f=P.contextType)&&i[f.__c],_=f?b?b.props.value:f.__:i,r.__c?g=(d=n.__c=r.__c).__=d.__E:(M?n.__c=d=new P(k,_):(n.__c=d=new Ee(k,_),d.constructor=P,d.render=vc),b&&b.sub(d),d.state||(d.state={}),d.__n=i,p=d.__d=!0,d.__h=[],d._sb=[]),M&&d.__s==null&&(d.__s=d.state),M&&P.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=bt({},d.__s)),bt(d.__s,P.getDerivedStateFromProps(k,d.__s))),y=d.props,m=d.state,d.__v=n,p)M&&P.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),M&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(M&&P.getDerivedStateFromProps==null&&k!==y&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(k,_),n.__v==r.__v||!d.__e&&d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(k,d.__s,_)===!1){n.__v!=r.__v&&(d.props=k,d.state=d.__s,d.__d=!1),n.__e=r.__e,n.__k=r.__k,n.__k.some(function(N){N&&(N.__=n)}),Fe.push.apply(d.__h,d._sb),d._sb=[],d.__h.length&&s.push(d);break t}d.componentWillUpdate!=null&&d.componentWillUpdate(k,d.__s,_),M&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(y,m,v)})}if(d.context=_,d.props=k,d.__P=e,d.__e=!1,w=J.__r,A=0,M)d.state=d.__s,d.__d=!1,w&&w(n),f=d.render(d.props,d.state,d.context),Fe.push.apply(d.__h,d._sb),d._sb=[];else do d.__d=!1,w&&w(n),f=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++A<25);d.state=d.__s,d.getChildContext!=null&&(i=bt(bt({},i),d.getChildContext())),M&&!p&&d.getSnapshotBeforeUpdate!=null&&(v=d.getSnapshotBeforeUpdate(y,m)),T=f!=null&&f.type===Ye&&f.key==null?Ii(f.props.children):f,u=Ni(e,Xe(T)?T:[T],n,r,i,o,a,s,u,c,l),d.base=n.__e,n.__u&=-161,d.__h.length&&s.push(d),g&&(d.__E=d.__=null)}catch(N){if(s.length=h,n.__v=null,c||a!=null){if(N.then){for(n.__u|=c?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(R=a.length;R--;)In(a[R])}else n.__e=r.__e;n.__k==null&&(n.__k=r.__k||[]),N.then||ji(n),J.__e(N,n,r)}}else a==null&&n.__v==r.__v?(n.__k=r.__k,n.__e=r.__e):u=n.__e=_c(r.__e,n,r,i,o,a,s,c,l);return(f=J.diffed)&&f(n),128&n.__u?void 0:u}function ji(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(ji))}function Di(e,n,r){for(var i=0;i<r.length;i++)Ln(r[i],r[++i],r[++i]);J.__c&&J.__c(n,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(a){a.call(o)})}catch(a){J.__e(a,o.__v)}})}function Ii(e){return typeof e!="object"||e==null||e.__b>0?e:Xe(e)?e.map(Ii):e.constructor!==void 0?null:bt({},e)}function _c(e,n,r,i,o,a,s,u,c){var l,f,h,d,p,y,m,v=r.props||Le,g=n.props,k=n.type;if(k=="svg"?o="http://www.w3.org/2000/svg":k=="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((p=a[l])&&"setAttribute"in p==!!k&&(k?p.localName==k:p.nodeType==3)){e=p,a[l]=null;break}}if(e==null){if(k==null)return document.createTextNode(g);e=document.createElementNS(o,k,g.is&&g),u&&(J.__m&&J.__m(n,a),u=!1),a=null}if(k==null)v===g||u&&e.data==g||(e.data=g);else{if(a=k=="textarea"&&g.defaultValue!=null?null:a&&me.call(e.childNodes),!u&&a!=null)for(v={},l=0;l<e.attributes.length;l++)v[(p=e.attributes[l]).name]=p.value;for(l in v)p=v[l],l=="dangerouslySetInnerHTML"?h=p:l=="children"||l in g||l=="value"&&"defaultValue"in g||l=="checked"&&"defaultChecked"in g||ke(e,l,null,p,o);for(l in g)p=g[l],l=="children"?d=p:l=="dangerouslySetInnerHTML"?f=p:l=="value"?y=p:l=="checked"?m=p:u&&typeof p!="function"||v[l]===p||ke(e,l,p,v[l],o);if(f)u||h&&(f.__html==h.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),n.__k=[];else if(h&&(e.innerHTML=""),Ni(n.type=="template"?e.content:e,Xe(d)?d:[d],n,r,i,k=="foreignObject"?"http://www.w3.org/1999/xhtml":o,a,s,a?a[0]:r.__k&&Yt(r,0),u,c),a!=null)for(l=a.length;l--;)In(a[l]);u&&k!="textarea"||(l="value",k=="progress"&&y==null?e.removeAttribute("value"):y!=null&&(y!==e[l]||k=="progress"&&!y||k=="option"&&y!=v[l])&&ke(e,l,y,v[l],o),l="checked",m!=null&&m!=e[l]&&ke(e,l,m,v[l],o))}return e}function Ln(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){J.__e(o,r)}}function $i(e,n,r){var i,o;if(J.unmount&&J.unmount(e),(i=e.ref)&&(i.current&&i.current!=e.__e||Ln(i,null,n)),(i=e.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(a){J.__e(a,n)}i.base=i.__P=i.__n=null}if(i=e.__k)for(o=0;o<i.length;o++)i[o]&&$i(i[o],n,r||typeof e.type!="function");r||In(e.__e),e.__c=e.__=e.__e=void 0}function vc(e,n,r){return this.constructor(e,r)}function mc(e,n,r){var i,o,a,s;n==document&&(n=document.documentElement),J.__&&J.__(e,n),o=(i=!1)?null:n.__k,a=[],s=[],$n(n,e=n.__k=dc(Ye,null,[e]),o||Le,Le,n.namespaceURI,o?null:n.firstChild?me.call(n.childNodes):null,a,o?o.__e:n.firstChild,i,s),Di(a,e,s),e.props.children=null}function Li(e,n,r){var i,o,a,s,u=bt({},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?me.call(arguments,2):r),fe(e.type,u,i||e.key,o||e.ref,null)}me=Fe.slice,J={__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}},Mi=0,Ti=function(e){return e!=null&&e.constructor===void 0},Ee.prototype.setState=function(e,n){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=bt({},this.state),typeof e=="function"&&(e=e(bt({},r),this.props)),e&&bt(r,e),e!=null&&this.__v&&(n&&this._sb.push(n),Cr(this))},Ee.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Cr(this))},Ee.prototype.render=Ye,$t=[],Pi=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Oi=function(e,n){return e.__v.__b-n.__v.__b},Ue.__r=0,en=Math.random().toString(8),Oe="__d"+en,ce="__a"+en,Ei=/(PointerCapture)$|Capture$/i,Dn=0,wn=Sr(!1),kn=Sr(!0);function Mr(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 xc(e){if(Array.isArray(e))return e}function bc(e,n,r){return(n=Mc(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function wc(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,a,s,u=[],c=!0,l=!1;try{if(a=(r=r.call(e)).next,n!==0)for(;!(c=(i=a.call(r)).done)&&(u.push(i.value),u.length!==n);c=!0);}catch(f){l=!0,o=f}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(l)throw o}}return u}}function kc(){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 Tr(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 Cc(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?Tr(Object(r),!0).forEach(function(i){bc(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tr(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function Ac(e,n){return xc(e)||wc(e,n)||Tc(e,n)||kc()}function Sc(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 Mc(e){var n=Sc(e,"string");return typeof n=="symbol"?n:n+""}function He(e){"@babel/helpers - typeof";return He=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},He(e)}function Tc(e,n){if(e){if(typeof e=="string")return Mr(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)?Mr(e,n):void 0}}var Cn=function(n){if(He(n)!=="object")return n;var r=Li(n);if(r.props){var i;r.props=Cc({},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(Cn):Cn(r.props.children))}return r},Pc=function(n){return Ti(Li(n))},Oc=function(n,r){delete r.__k,mc(Cn(n),r)};function Ec(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 zc=`.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;
|
|
}
|
|
`;Ec(zc);var Nc=jn({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&&He(n)==="object"&&!!n.node&&typeof n.node=="function",u=pt(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 f=Ac(l,2),h=f[0],d=f[1];return r.tooltipEl.style(h,d)}),r.tooltipEl.style("left","-10000px").style("display","none");var c="tooltip-".concat(Math.round(Math.random()*1e12));r.mouseInside=!1,u.on("mousemove.".concat(c),function(l){r.mouseInside=!0;var f=xt(l),h=u.node(),d=h.offsetWidth,p=h.offsetHeight,y=[r.offsetX===null||r.offsetX===void 0?"-".concat(f[0]/d*100,"%"):typeof r.offsetX=="number"?"calc(-50% + ".concat(r.offsetX,"px)"):r.offsetX,r.offsetY===null||r.offsetY===void 0?p>130&&p-f[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",f[0]+"px").style("top",f[1]+"px").style("transform","translate(".concat(y.join(","),")")),r.content&&r.tooltipEl.style("display","inline")}),u.on("mouseover.".concat(c),function(){r.mouseInside=!0,r.content&&r.tooltipEl.style("display","inline")}),u.on("mouseout.".concat(c),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):Pc(n.content)?(n.tooltipEl.text(""),Oc(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 Rc(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,c,l=0,f=0,h=0;for(s=0;s<u;++s)c=i[s],l+=c.x||0,f+=c.y||0,h+=c.z||0;for(l=(l/u-e)*o,f=(f/u-n)*o,h=(h/u-r)*o,s=0;s<u;++s)c=i[s],l&&(c.x-=l),f&&(c.y-=f),h&&(c.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 jc(e){const n=+this._x.call(null,e);return Fi(this.cover(n),n,e)}function Fi(e,n,r){if(isNaN(n))return e;var i,o=e._root,a={data:r},s=e._x0,u=e._x1,c,l,f,h,d;if(!o)return e._root=a,e;for(;o.length;)if((f=n>=(c=(s+u)/2))?s=c:u=c,i=o,!(o=o[h=+f]))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),(f=n>=(c=(s+u)/2))?s=c:u=c;while((h=+f)==(d=+(l>=c)));return i[d]=o,i[h]=a,e}function Dc(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)Fi(this,r[a],e[a]);return this}function Ic(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 $c(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function Lc(e){return arguments.length?this.cover(+e[0][0]).cover(+e[1][0]):isNaN(this._x0)?void 0:[[this._x0],[this._x1]]}function Nt(e,n,r){this.node=e,this.x0=n,this.x1=r}function Fc(e,n){var r,i=this._x0,o,a,s=this._x1,u=[],c=this._root,l,f;for(c&&u.push(new Nt(c,i,s)),n==null?n=1/0:(i=e-n,s=e+n);l=u.pop();)if(!(!(c=l.node)||(o=l.x0)>s||(a=l.x1)<i))if(c.length){var h=(o+a)/2;u.push(new Nt(c[1],h,a),new Nt(c[0],o,h)),(f=+(e>=h))&&(l=u[u.length-1],u[u.length-1]=u[u.length-1-f],u[u.length-1-f]=l)}else{var d=Math.abs(e-+this._x.call(null,c.data));d<n&&(n=d,i=e-d,s=e+d,r=c.data)}return r}function Uc(e){if(isNaN(c=+this._x.call(null,e)))return this;var n,r=this._root,i,o,a,s=this._x0,u=this._x1,c,l,f,h,d;if(!r)return this;if(r.length)for(;;){if((f=c>=(l=(s+u)/2))?s=l:u=l,n=r,!(r=r[h=+f]))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 Hc(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function qc(){return this._root}function Wc(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function Gc(e){var n=[],r,i=this._root,o,a,s;for(i&&n.push(new Nt(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 Nt(o,u,s)),(o=i[0])&&n.push(new Nt(o,a,u))}return this}function Vc(e){var n=[],r=[],i;for(this._root&&n.push(new Nt(this._root,this._x0,this._x1));i=n.pop();){var o=i.node;if(o.length){var a,s=i.x0,u=i.x1,c=(s+u)/2;(a=o[0])&&n.push(new Nt(a,s,c)),(a=o[1])&&n.push(new Nt(a,c,u))}r.push(i)}for(;i=r.pop();)e(i.node,i.x0,i.x1);return this}function Bc(e){return e[0]}function Xc(e){return arguments.length?(this._x=e,this):this._x}function Ui(e,n){var r=new Fn(n??Bc,NaN,NaN);return e==null?r:r.addAll(e)}function Fn(e,n,r){this._x=e,this._x0=n,this._x1=r,this._root=void 0}function Pr(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var ut=Ui.prototype=Fn.prototype;ut.copy=function(){var e=new Fn(this._x,this._x0,this._x1),n=this._root,r,i;if(!n)return e;if(!n.length)return e._root=Pr(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]=Pr(i));return e};ut.add=jc;ut.addAll=Dc;ut.cover=Ic;ut.data=$c;ut.extent=Lc;ut.find=Fc;ut.remove=Uc;ut.removeAll=Hc;ut.root=qc;ut.size=Wc;ut.visit=Gc;ut.visitAfter=Vc;ut.x=Xc;function Yc(e){const n=+this._x.call(null,e),r=+this._y.call(null,e);return Hi(this.cover(n,r),n,r,e)}function Hi(e,n,r,i){if(isNaN(n)||isNaN(r))return e;var o,a=e._root,s={data:i},u=e._x0,c=e._y0,l=e._x1,f=e._y1,h,d,p,y,m,v,g,k;if(!a)return e._root=s,e;for(;a.length;)if((m=n>=(h=(u+l)/2))?u=h:l=h,(v=r>=(d=(c+f)/2))?c=d:f=d,o=a,!(a=a[g=v<<1|m]))return o[g]=s,e;if(p=+e._x.call(null,a.data),y=+e._y.call(null,a.data),n===p&&r===y)return s.next=a,o?o[g]=s:e._root=s,e;do o=o?o[g]=new Array(4):e._root=new Array(4),(m=n>=(h=(u+l)/2))?u=h:l=h,(v=r>=(d=(c+f)/2))?c=d:f=d;while((g=v<<1|m)===(k=(y>=d)<<1|p>=h));return o[k]=a,o[g]=s,e}function Zc(e){var n,r,i=e.length,o,a,s=new Array(i),u=new Array(i),c=1/0,l=1/0,f=-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<c&&(c=o),o>f&&(f=o),a<l&&(l=a),a>h&&(h=a));if(c>f||l>h)return this;for(this.cover(c,l).cover(f,h),r=0;r<i;++r)Hi(this,s[r],u[r],e[r]);return this}function Kc(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,c,l;r>e||e>=o||i>n||n>=a;)switch(l=(n<i)<<1|e<r,c=new Array(4),c[l]=u,u=c,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 Qc(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function Jc(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 ot(e,n,r,i,o){this.node=e,this.x0=n,this.y0=r,this.x1=i,this.y1=o}function tf(e,n,r){var i,o=this._x0,a=this._y0,s,u,c,l,f=this._x1,h=this._y1,d=[],p=this._root,y,m;for(p&&d.push(new ot(p,o,a,f,h)),r==null?r=1/0:(o=e-r,a=n-r,f=e+r,h=n+r,r*=r);y=d.pop();)if(!(!(p=y.node)||(s=y.x0)>f||(u=y.y0)>h||(c=y.x1)<o||(l=y.y1)<a))if(p.length){var v=(s+c)/2,g=(u+l)/2;d.push(new ot(p[3],v,g,c,l),new ot(p[2],s,g,v,l),new ot(p[1],v,u,c,g),new ot(p[0],s,u,v,g)),(m=(n>=g)<<1|e>=v)&&(y=d[d.length-1],d[d.length-1]=d[d.length-1-m],d[d.length-1-m]=y)}else{var k=e-+this._x.call(null,p.data),M=n-+this._y.call(null,p.data),b=k*k+M*M;if(b<r){var _=Math.sqrt(r=b);o=e-_,a=n-_,f=e+_,h=n+_,i=p.data}}return i}function ef(e){if(isNaN(f=+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,c=this._x1,l=this._y1,f,h,d,p,y,m,v,g;if(!r)return this;if(r.length)for(;;){if((y=f>=(d=(s+c)/2))?s=d:c=d,(m=h>=(p=(u+l)/2))?u=p:l=p,n=r,!(r=r[v=m<<1|y]))return this;if(!r.length)break;(n[v+1&3]||n[v+2&3]||n[v+3&3])&&(i=n,g=v)}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[v]=a:delete n[v],(r=n[0]||n[1]||n[2]||n[3])&&r===(n[3]||n[2]||n[1]||n[0])&&!r.length&&(i?i[g]=r:this._root=r),this):(this._root=a,this)}function nf(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function rf(){return this._root}function of(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function af(e){var n=[],r,i=this._root,o,a,s,u,c;for(i&&n.push(new ot(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,c=r.y1)&&i.length){var l=(a+u)/2,f=(s+c)/2;(o=i[3])&&n.push(new ot(o,l,f,u,c)),(o=i[2])&&n.push(new ot(o,a,f,l,c)),(o=i[1])&&n.push(new ot(o,l,s,u,f)),(o=i[0])&&n.push(new ot(o,a,s,l,f))}return this}function sf(e){var n=[],r=[],i;for(this._root&&n.push(new ot(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,c=i.x1,l=i.y1,f=(s+c)/2,h=(u+l)/2;(a=o[0])&&n.push(new ot(a,s,u,f,h)),(a=o[1])&&n.push(new ot(a,f,u,c,h)),(a=o[2])&&n.push(new ot(a,s,h,f,l)),(a=o[3])&&n.push(new ot(a,f,h,c,l))}r.push(i)}for(;i=r.pop();)e(i.node,i.x0,i.y0,i.x1,i.y1);return this}function uf(e){return e[0]}function lf(e){return arguments.length?(this._x=e,this):this._x}function cf(e){return e[1]}function ff(e){return arguments.length?(this._y=e,this):this._y}function Un(e,n,r){var i=new Hn(n??uf,r??cf,NaN,NaN,NaN,NaN);return e==null?i:i.addAll(e)}function Hn(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 Or(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var at=Un.prototype=Hn.prototype;at.copy=function(){var e=new Hn(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=Or(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]=Or(i));return e};at.add=Yc;at.addAll=Zc;at.cover=Kc;at.data=Qc;at.extent=Jc;at.find=tf;at.remove=ef;at.removeAll=nf;at.root=rf;at.size=of;at.visit=af;at.visitAfter=sf;at.x=lf;at.y=ff;function hf(e){const n=+this._x.call(null,e),r=+this._y.call(null,e),i=+this._z.call(null,e);return qi(this.cover(n,r,i),n,r,i,e)}function qi(e,n,r,i,o){if(isNaN(n)||isNaN(r)||isNaN(i))return e;var a,s=e._root,u={data:o},c=e._x0,l=e._y0,f=e._z0,h=e._x1,d=e._y1,p=e._z1,y,m,v,g,k,M,b,_,w,A,T;if(!s)return e._root=u,e;for(;s.length;)if((b=n>=(y=(c+h)/2))?c=y:h=y,(_=r>=(m=(l+d)/2))?l=m:d=m,(w=i>=(v=(f+p)/2))?f=v:p=v,a=s,!(s=s[A=w<<2|_<<1|b]))return a[A]=u,e;if(g=+e._x.call(null,s.data),k=+e._y.call(null,s.data),M=+e._z.call(null,s.data),n===g&&r===k&&i===M)return u.next=s,a?a[A]=u:e._root=u,e;do a=a?a[A]=new Array(8):e._root=new Array(8),(b=n>=(y=(c+h)/2))?c=y:h=y,(_=r>=(m=(l+d)/2))?l=m:d=m,(w=i>=(v=(f+p)/2))?f=v:p=v;while((A=w<<2|_<<1|b)===(T=(M>=v)<<2|(k>=m)<<1|g>=y));return a[T]=s,a[A]=u,e}function df(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,c=-1/0,l=-1/0,f=-1/0;for(let h=0,d,p,y,m;h<n;++h)isNaN(p=+this._x.call(null,d=e[h]))||isNaN(y=+this._y.call(null,d))||isNaN(m=+this._z.call(null,d))||(r[h]=p,i[h]=y,o[h]=m,p<a&&(a=p),p>c&&(c=p),y<s&&(s=y),y>l&&(l=y),m<u&&(u=m),m>f&&(f=m));if(a>c||s>l||u>f)return this;this.cover(a,s,u).cover(c,l,f);for(let h=0;h<n;++h)qi(this,r[h],i[h],o[h],e[h]);return this}function pf(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,c=this._z1;if(isNaN(i))s=(i=Math.floor(e))+1,u=(o=Math.floor(n))+1,c=(a=Math.floor(r))+1;else{for(var l=s-i||1,f=this._root,h,d;i>e||e>=s||o>n||n>=u||a>r||r>=c;)switch(d=(r<a)<<2|(n<o)<<1|e<i,h=new Array(8),h[d]=f,f=h,l*=2,d){case 0:s=i+l,u=o+l,c=a+l;break;case 1:i=s-l,u=o+l,c=a+l;break;case 2:s=i+l,o=u-l,c=a+l;break;case 3:i=s-l,o=u-l,c=a+l;break;case 4:s=i+l,u=o+l,a=c-l;break;case 5:i=s-l,u=o+l,a=c-l;break;case 6:s=i+l,o=u-l,a=c-l;break;case 7:i=s-l,o=u-l,a=c-l;break}this._root&&this._root.length&&(this._root=f)}return this._x0=i,this._y0=o,this._z0=a,this._x1=s,this._y1=u,this._z1=c,this}function gf(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function yf(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 Y(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 _f(e,n,r,i){var o,a=this._x0,s=this._y0,u=this._z0,c,l,f,h,d,p,y=this._x1,m=this._y1,v=this._z1,g=[],k=this._root,M,b;for(k&&g.push(new Y(k,a,s,u,y,m,v)),i==null?i=1/0:(a=e-i,s=n-i,u=r-i,y=e+i,m=n+i,v=r+i,i*=i);M=g.pop();)if(!(!(k=M.node)||(c=M.x0)>y||(l=M.y0)>m||(f=M.z0)>v||(h=M.x1)<a||(d=M.y1)<s||(p=M.z1)<u))if(k.length){var _=(c+h)/2,w=(l+d)/2,A=(f+p)/2;g.push(new Y(k[7],_,w,A,h,d,p),new Y(k[6],c,w,A,_,d,p),new Y(k[5],_,l,A,h,w,p),new Y(k[4],c,l,A,_,w,p),new Y(k[3],_,w,f,h,d,A),new Y(k[2],c,w,f,_,d,A),new Y(k[1],_,l,f,h,w,A),new Y(k[0],c,l,f,_,w,A)),(b=(r>=A)<<2|(n>=w)<<1|e>=_)&&(M=g[g.length-1],g[g.length-1]=g[g.length-1-b],g[g.length-1-b]=M)}else{var T=e-+this._x.call(null,k.data),R=n-+this._y.call(null,k.data),P=r-+this._z.call(null,k.data),N=T*T+R*R+P*P;if(N<i){var D=Math.sqrt(i=N);a=e-D,s=n-D,u=r-D,y=e+D,m=n+D,v=r+D,o=k.data}}return o}const vf=(e,n,r,i,o,a)=>Math.sqrt((e-i)**2+(n-o)**2+(r-a)**2);function mf(e,n,r,i){const o=[],a=e-i,s=n-i,u=r-i,c=e+i,l=n+i,f=r+i;return this.visit((h,d,p,y,m,v,g)=>{if(!h.length)do{const k=h.data;vf(e,n,r,this._x(k),this._y(k),this._z(k))<=i&&o.push(k)}while(h=h.next);return d>c||p>l||y>f||m<a||v<s||g<u}),o}function xf(e){if(isNaN(d=+this._x.call(null,e))||isNaN(p=+this._y.call(null,e))||isNaN(y=+this._z.call(null,e)))return this;var n,r=this._root,i,o,a,s=this._x0,u=this._y0,c=this._z0,l=this._x1,f=this._y1,h=this._z1,d,p,y,m,v,g,k,M,b,_,w;if(!r)return this;if(r.length)for(;;){if((k=d>=(m=(s+l)/2))?s=m:l=m,(M=p>=(v=(u+f)/2))?u=v:f=v,(b=y>=(g=(c+h)/2))?c=g:h=g,n=r,!(r=r[_=b<<2|M<<1|k]))return this;if(!r.length)break;(n[_+1&7]||n[_+2&7]||n[_+3&7]||n[_+4&7]||n[_+5&7]||n[_+6&7]||n[_+7&7])&&(i=n,w=_)}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[_]=a:delete n[_],(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[w]=r:this._root=r),this):(this._root=a,this)}function bf(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function wf(){return this._root}function kf(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function Cf(e){var n=[],r,i=this._root,o,a,s,u,c,l,f;for(i&&n.push(new Y(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,c=r.x1,l=r.y1,f=r.z1)&&i.length){var h=(a+c)/2,d=(s+l)/2,p=(u+f)/2;(o=i[7])&&n.push(new Y(o,h,d,p,c,l,f)),(o=i[6])&&n.push(new Y(o,a,d,p,h,l,f)),(o=i[5])&&n.push(new Y(o,h,s,p,c,d,f)),(o=i[4])&&n.push(new Y(o,a,s,p,h,d,f)),(o=i[3])&&n.push(new Y(o,h,d,u,c,l,p)),(o=i[2])&&n.push(new Y(o,a,d,u,h,l,p)),(o=i[1])&&n.push(new Y(o,h,s,u,c,d,p)),(o=i[0])&&n.push(new Y(o,a,s,u,h,d,p))}return this}function Af(e){var n=[],r=[],i;for(this._root&&n.push(new Y(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,c=i.z0,l=i.x1,f=i.y1,h=i.z1,d=(s+l)/2,p=(u+f)/2,y=(c+h)/2;(a=o[0])&&n.push(new Y(a,s,u,c,d,p,y)),(a=o[1])&&n.push(new Y(a,d,u,c,l,p,y)),(a=o[2])&&n.push(new Y(a,s,p,c,d,f,y)),(a=o[3])&&n.push(new Y(a,d,p,c,l,f,y)),(a=o[4])&&n.push(new Y(a,s,u,y,d,p,h)),(a=o[5])&&n.push(new Y(a,d,u,y,l,p,h)),(a=o[6])&&n.push(new Y(a,s,p,y,d,f,h)),(a=o[7])&&n.push(new Y(a,d,p,y,l,f,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 Sf(e){return e[0]}function Mf(e){return arguments.length?(this._x=e,this):this._x}function Tf(e){return e[1]}function Pf(e){return arguments.length?(this._y=e,this):this._y}function Of(e){return e[2]}function Ef(e){return arguments.length?(this._z=e,this):this._z}function Wi(e,n,r,i){var o=new qn(n??Sf,r??Tf,i??Of,NaN,NaN,NaN,NaN,NaN,NaN);return e==null?o:o.addAll(e)}function qn(e,n,r,i,o,a,s,u,c){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=c,this._root=void 0}function Er(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var rt=Wi.prototype=qn.prototype;rt.copy=function(){var e=new qn(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=Er(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]=Er(i));return e};rt.add=hf;rt.addAll=df;rt.cover=pf;rt.data=gf;rt.extent=yf;rt.find=_f;rt.findAllWithinRadius=mf;rt.remove=xf;rt.removeAll=bf;rt.root=wf;rt.size=kf;rt.visit=Cf;rt.visitAfter=Af;rt.x=Mf;rt.y=Pf;rt.z=Ef;function zt(e){return function(){return e}}function Ot(e){return(e()-.5)*1e-6}function zf(e){return e.index}function zr(e,n){var r=e.get(n);if(!r)throw new Error("node not found: "+n);return r}function Nf(e){var n=zf,r=d,i,o=zt(30),a,s,u,c,l,f,h=1;e==null&&(e=[]);function d(g){return 1/Math.min(c[g.source.index],c[g.target.index])}function p(g){for(var k=0,M=e.length;k<h;++k)for(var b=0,_,w,A,T=0,R=0,P=0,N,D;b<M;++b)_=e[b],w=_.source,A=_.target,T=A.x+A.vx-w.x-w.vx||Ot(f),u>1&&(R=A.y+A.vy-w.y-w.vy||Ot(f)),u>2&&(P=A.z+A.vz-w.z-w.vz||Ot(f)),N=Math.sqrt(T*T+R*R+P*P),N=(N-a[b])/N*g*i[b],T*=N,R*=N,P*=N,A.vx-=T*(D=l[b]),u>1&&(A.vy-=R*D),u>2&&(A.vz-=P*D),w.vx+=T*(D=1-D),u>1&&(w.vy+=R*D),u>2&&(w.vz+=P*D)}function y(){if(s){var g,k=s.length,M=e.length,b=new Map(s.map((w,A)=>[n(w,A,s),w])),_;for(g=0,c=new Array(k);g<M;++g)_=e[g],_.index=g,typeof _.source!="object"&&(_.source=zr(b,_.source)),typeof _.target!="object"&&(_.target=zr(b,_.target)),c[_.source.index]=(c[_.source.index]||0)+1,c[_.target.index]=(c[_.target.index]||0)+1;for(g=0,l=new Array(M);g<M;++g)_=e[g],l[g]=c[_.source.index]/(c[_.source.index]+c[_.target.index]);i=new Array(M),m(),a=new Array(M),v()}}function m(){if(s)for(var g=0,k=e.length;g<k;++g)i[g]=+r(e[g],g,e)}function v(){if(s)for(var g=0,k=e.length;g<k;++g)a[g]=+o(e[g],g,e)}return p.initialize=function(g,...k){s=g,f=k.find(M=>typeof M=="function")||Math.random,u=k.find(M=>[1,2,3].includes(M))||2,y()},p.links=function(g){return arguments.length?(e=g,y(),p):e},p.id=function(g){return arguments.length?(n=g,p):n},p.iterations=function(g){return arguments.length?(h=+g,p):h},p.strength=function(g){return arguments.length?(r=typeof g=="function"?g:zt(+g),m(),p):r},p.distance=function(g){return arguments.length?(o=typeof g=="function"?g:zt(+g),v(),p):o},p}const Rf=1664525,jf=1013904223,Nr=4294967296;function Df(){let e=1;return()=>(e=(Rf*e+jf)%Nr)/Nr}var Rr=3;function nn(e){return e.x}function jr(e){return e.y}function If(e){return e.z}var $f=10,Lf=Math.PI*(3-Math.sqrt(5)),Ff=Math.PI*20/(9+Math.sqrt(221));function Uf(e,n){n=n||2;var r=Math.min(Rr,Math.max(1,Math.round(n))),i,o=1,a=.001,s=1-Math.pow(a,1/300),u=0,c=.6,l=new Map,f=En(p),h=ve("tick","end"),d=Df();e==null&&(e=[]);function p(){y(),h.call("tick",i),o<a&&(f.stop(),h.call("end",i))}function y(g){var k,M=e.length,b;g===void 0&&(g=1);for(var _=0;_<g;++_)for(o+=(u-o)*s,l.forEach(function(w){w(o)}),k=0;k<M;++k)b=e[k],b.fx==null?b.x+=b.vx*=c:(b.x=b.fx,b.vx=0),r>1&&(b.fy==null?b.y+=b.vy*=c:(b.y=b.fy,b.vy=0)),r>2&&(b.fz==null?b.z+=b.vz*=c:(b.z=b.fz,b.vz=0));return i}function m(){for(var g=0,k=e.length,M;g<k;++g){if(M=e[g],M.index=g,M.fx!=null&&(M.x=M.fx),M.fy!=null&&(M.y=M.fy),M.fz!=null&&(M.z=M.fz),isNaN(M.x)||r>1&&isNaN(M.y)||r>2&&isNaN(M.z)){var b=$f*(r>2?Math.cbrt(.5+g):r>1?Math.sqrt(.5+g):g),_=g*Lf,w=g*Ff;r===1?M.x=b:r===2?(M.x=b*Math.cos(_),M.y=b*Math.sin(_)):(M.x=b*Math.sin(_)*Math.cos(w),M.y=b*Math.cos(_),M.z=b*Math.sin(_)*Math.sin(w))}(isNaN(M.vx)||r>1&&isNaN(M.vy)||r>2&&isNaN(M.vz))&&(M.vx=0,r>1&&(M.vy=0),r>2&&(M.vz=0))}}function v(g){return g.initialize&&g.initialize(e,d,r),g}return m(),i={tick:y,restart:function(){return f.restart(p),i},stop:function(){return f.stop(),i},numDimensions:function(g){return arguments.length?(r=Math.min(Rr,Math.max(1,Math.round(g))),l.forEach(v),i):r},nodes:function(g){return arguments.length?(e=g,m(),l.forEach(v),i):e},alpha:function(g){return arguments.length?(o=+g,i):o},alphaMin:function(g){return arguments.length?(a=+g,i):a},alphaDecay:function(g){return arguments.length?(s=+g,i):+s},alphaTarget:function(g){return arguments.length?(u=+g,i):u},velocityDecay:function(g){return arguments.length?(c=1-g,i):1-c},randomSource:function(g){return arguments.length?(d=g,l.forEach(v),i):d},force:function(g,k){return arguments.length>1?(k==null?l.delete(g):l.set(g,v(k)),i):l.get(g)},find:function(){var g=Array.prototype.slice.call(arguments),k=g.shift()||0,M=(r>1?g.shift():null)||0,b=(r>2?g.shift():null)||0,_=g.shift()||1/0,w=0,A=e.length,T,R,P,N,D,U;for(_*=_,w=0;w<A;++w)D=e[w],T=k-D.x,R=M-(D.y||0),P=b-(D.z||0),N=T*T+R*R+P*P,N<_&&(U=D,_=N);return U},on:function(g,k){return arguments.length>1?(h.on(g,k),i):h.on(g)}}}function Hf(){var e,n,r,i,o,a=zt(-30),s,u=1,c=1/0,l=.81;function f(y){var m,v=e.length,g=(n===1?Ui(e,nn):n===2?Un(e,nn,jr):n===3?Wi(e,nn,jr,If):null).visitAfter(d);for(o=y,m=0;m<v;++m)r=e[m],g.visit(p)}function h(){if(e){var y,m=e.length,v;for(s=new Array(m),y=0;y<m;++y)v=e[y],s[v.index]=+a(v,y,e)}}function d(y){var m=0,v,g,k=0,M,b,_,w,A=y.length;if(A){for(M=b=_=w=0;w<A;++w)(v=y[w])&&(g=Math.abs(v.value))&&(m+=v.value,k+=g,M+=g*(v.x||0),b+=g*(v.y||0),_+=g*(v.z||0));m*=Math.sqrt(4/A),y.x=M/k,n>1&&(y.y=b/k),n>2&&(y.z=_/k)}else{v=y,v.x=v.data.x,n>1&&(v.y=v.data.y),n>2&&(v.z=v.data.z);do m+=s[v.data.index];while(v=v.next)}y.value=m}function p(y,m,v,g,k){if(!y.value)return!0;var M=[v,g,k][n-1],b=y.x-r.x,_=n>1?y.y-r.y:0,w=n>2?y.z-r.z:0,A=M-m,T=b*b+_*_+w*w;if(A*A/l<T)return T<c&&(b===0&&(b=Ot(i),T+=b*b),n>1&&_===0&&(_=Ot(i),T+=_*_),n>2&&w===0&&(w=Ot(i),T+=w*w),T<u&&(T=Math.sqrt(u*T)),r.vx+=b*y.value*o/T,n>1&&(r.vy+=_*y.value*o/T),n>2&&(r.vz+=w*y.value*o/T)),!0;if(y.length||T>=c)return;(y.data!==r||y.next)&&(b===0&&(b=Ot(i),T+=b*b),n>1&&_===0&&(_=Ot(i),T+=_*_),n>2&&w===0&&(w=Ot(i),T+=w*w),T<u&&(T=Math.sqrt(u*T)));do y.data!==r&&(A=s[y.data.index]*o/T,r.vx+=b*A,n>1&&(r.vy+=_*A),n>2&&(r.vz+=w*A));while(y=y.next)}return f.initialize=function(y,...m){e=y,i=m.find(v=>typeof v=="function")||Math.random,n=m.find(v=>[1,2,3].includes(v))||2,h()},f.strength=function(y){return arguments.length?(a=typeof y=="function"?y:zt(+y),h(),f):a},f.distanceMin=function(y){return arguments.length?(u=y*y,f):Math.sqrt(u)},f.distanceMax=function(y){return arguments.length?(c=y*y,f):Math.sqrt(c)},f.theta=function(y){return arguments.length?(l=y*y,f):Math.sqrt(l)},f}function qf(e,n,r,i){var o,a,s=zt(.1),u,c;typeof e!="function"&&(e=zt(+e)),n==null&&(n=0),r==null&&(r=0),i==null&&(i=0);function l(h){for(var d=0,p=o.length;d<p;++d){var y=o[d],m=y.x-n||1e-6,v=(y.y||0)-r||1e-6,g=(y.z||0)-i||1e-6,k=Math.sqrt(m*m+v*v+g*g),M=(c[d]-k)*u[d]*h/k;y.vx+=m*M,a>1&&(y.vy+=v*M),a>2&&(y.vz+=g*M)}}function f(){if(o){var h,d=o.length;for(u=new Array(d),c=new Array(d),h=0;h<d;++h)c[h]=+e(o[h],h,o),u[h]=isNaN(c[h])?0:+s(o[h],h,o)}}return l.initialize=function(h,...d){o=h,a=d.find(p=>[1,2,3].includes(p))||2,f()},l.strength=function(h){return arguments.length?(s=typeof h=="function"?h:zt(+h),f(),l):s},l.radius=function(h){return arguments.length?(e=typeof h=="function"?h:zt(+h),f(),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:ee,cos:Pt,sin:Wt,acos:Wf,atan2:ne,sqrt:Dt,pow:dt}=Math;function re(e){return e<0?-dt(-e,1/3):dt(e,1/3)}const Gi=Math.PI,Ce=2*Gi,It=Gi/2,Gf=1e-6,rn=Number.MAX_SAFE_INTEGER||9007199254740991,on=Number.MIN_SAFE_INTEGER||-9007199254740991,Vf={x:0,y:0,z:0},z={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),Dt(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,c=e*e,l,f,h,d=0;i===2?(a=[a[0],a[1],a[2],Vf],l=u,f=o*e*2,h=c):i===3&&(l=u*o,f=u*e*3,h=o*c*3,d=e*c);const p={x:l*a[0].x+f*a[1].x+h*a[2].x+d*a[3].x,y:l*a[0].y+f*a[1].y+h*a[2].y+d*a[3].y,t:e};return r&&(p.z=l*a[0].z+f*a[1].z+h*a[2].z+d*a[3].z),p}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],c=a[1],l=a[2],f=a[3],h;if(u*=o,c*=e,s.length===2)return h=u+c,{x:(u*s[0].x+c*s[1].x)/h,y:(u*s[0].y+c*s[1].y)/h,z:i?(u*s[0].z+c*s[1].z)/h:!1,t:e};if(u*=o,c*=2*o,l*=e*e,s.length===3)return h=u+c+l,{x:(u*s[0].x+c*s[1].x+l*s[2].x)/h,y:(u*s[0].y+c*s[1].y+l*s[2].y)/h,z:i?(u*s[0].z+c*s[1].z+l*s[2].z)/h:!1,t:e};if(u*=o,c*=1.5*o,l*=3*o,f*=e*e*e,s.length===4)return h=u+c+l+f,{x:(u*s[0].x+c*s[1].x+l*s[2].x+f*s[3].x)/h,y:(u*s[0].y+c*s[1].y+l*s[2].y+f*s[3].y)/h,z:i?(u*s[0].z+c*s[1].z+l*s[2].z+f*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,c;u<a;u++)c={x:a*(i[u+1].x-i[u].x),y:a*(i[u+1].y-i[u].y)},n&&(c.z=a*(i[u+1].z-i[u].z)),s.push(c);r.push(s),i=s}return r},between:function(e,n,r){return n<=e&&e<=r||z.approximately(e,n)||z.approximately(e,r)},approximately:function(e,n,r){return ee(e-n)<=(r||Gf)},length:function(e){const r=z.Tvalues.length;let i=0;for(let o=0,a;o<r;o++)a=.5*z.Tvalues[o]+.5,i+=z.Cvalues[o]*z.arcfn(a,e);return .5*i},map:function(e,n,r,i,o){const a=r-n,s=o-i,u=e-n,c=u/a;return i+s*c},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(z.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,c=i*a+o*s;return ne(u,c)},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 Dt(r*r+i*i)},closest:function(e,n){let r=dt(2,63),i,o;return e.forEach(function(a,s){o=z.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=dt(e,n)+dt(1-e,n),i=r-1;return ee(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=dt(1-e,n),i=dt(e,n)+r;return r/i},lli8:function(e,n,r,i,o,a,s,u){const c=(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),f=(e-r)*(a-u)-(n-i)*(o-s);return f==0?!1:{x:c/f,y:l/f}},lli4:function(e,n,r,i){const o=e.x,a=e.y,s=n.x,u=n.y,c=r.x,l=r.y,f=i.x,h=i.y;return z.lli8(o,a,s,u,c,l,f,h)},lli:function(e,n){return z.lli4(e,e.c,n,n.c)},makeline:function(e,n){return new K(e.x,e.y,(e.x+n.x)/2,(e.y+n.y)/2,n.x,n.y)},findbbox:function(e){let n=rn,r=rn,i=on,o=on;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(!z.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(c){c.virtual||u.forEach(function(l){if(l.virtual)return;const f=c.intersects(l,o);f.length>0&&(f.c1=c,f.c2=l,f.s1=e,f.s2=r,a.push(f))})}),a},makeshape:function(e,n,r){const i=n.points.length,o=e.points.length,a=z.makeline(n.points[i-1],e.points[0]),s=z.makeline(e.points[o-1],n.points[0]),u={startcap:a,forward:e,back:n,endcap:s,bbox:z.findbbox([a,e,n,s])};return u.intersections=function(c){return z.shapeintersections(u,u.bbox,c,c.bbox,r)},u},getminmax:function(e,n,r){if(!r)return{min:0,max:0};let i=rn,o=on,a,s;r.indexOf(0)===-1&&(r=[0].concat(r)),r.indexOf(1)===-1&&r.push(1);for(let u=0,c=r.length;u<c;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=-ne(n.p2.y-i,n.p2.x-r),a=function(s){return{x:(s.x-r)*Pt(o)-(s.y-i)*Wt(o),y:(s.x-r)*Wt(o)+(s.y-i)*Pt(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=z.align(e,n),o=function(A){return 0<=A&&A<=1};if(r===2){const A=i[0].y,T=i[1].y,R=i[2].y,P=A-2*T+R;if(P!==0){const N=-Dt(T*T-A*R),D=-A+T,U=-(N+D)/P,S=-(-N+D)/P;return[U,S].filter(o)}else if(T!==R&&P===0)return[(2*T-R)/(2*T-2*R)].filter(o);return[]}const a=i[0].y,s=i[1].y,u=i[2].y,c=i[3].y;let l=-a+3*s-3*u+c,f=3*a-6*s+3*u,h=-3*a+3*s,d=a;if(z.approximately(l,0)){if(z.approximately(f,0))return z.approximately(h,0)?[]:[-d/h].filter(o);const A=Dt(h*h-4*f*d),T=2*f;return[(A-h)/T,(-h-A)/T].filter(o)}f/=l,h/=l,d/=l;const p=(3*h-f*f)/3,y=p/3,m=(2*f*f*f-9*f*h+27*d)/27,v=m/2,g=v*v+y*y*y;let k,M,b,_,w;if(g<0){const A=-p/3,T=A*A*A,R=Dt(T),P=-m/(2*R),N=P<-1?-1:P>1?1:P,D=Wf(N),U=re(R),S=2*U;return b=S*Pt(D/3)-f/3,_=S*Pt((D+Ce)/3)-f/3,w=S*Pt((D+2*Ce)/3)-f/3,[b,_,w].filter(o)}else{if(g===0)return k=v<0?re(-v):-re(v),b=2*k-f/3,_=-k-f/3,[b,_].filter(o);{const A=Dt(g);return k=re(-v+A),M=re(v+A),[k-M-f/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=-Dt(r*r-n*i),s=-n+r,u=-(a+s)/o,c=-(-a+s)/o;return[u,c]}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,c,l=0,f=0;const h=z.compute(e,n),d=z.compute(e,r),p=h.x*h.x+h.y*h.y;if(i?(a=Dt(dt(h.y*d.z-d.y*h.z,2)+dt(h.z*d.x-d.z*h.x,2)+dt(h.x*d.y-d.x*h.y,2)),s=dt(p+h.z*h.z,3/2)):(a=h.x*d.y-h.y*d.x,s=dt(p,3/2)),a===0||s===0)return{k:0,r:0};if(l=a/s,f=s/a,!o){const y=z.curvature(e-.001,n,r,i,!0).k,m=z.curvature(e+.001,n,r,i,!0).k;c=(m-l+(l-y))/2,u=(ee(m-l)+ee(l-y))/2}return{k:l,r:f,dk:c,adk:u}},inflections:function(e){if(e.length<4)return[];const n=z.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),c=18*(o-r);if(z.approximately(s,0)){if(!z.approximately(u,0)){let d=-c/u;if(0<=d&&d<=1)return[d]}return[]}const l=2*s;if(z.approximately(l,0))return[];const f=u*u-4*s*c;if(f<0)return[];const h=Math.sqrt(f);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,c;o<i;o++)if(a=r[o],s=e[a].mid,u=n[a].mid,c=(e[a].size+n[a].size)/2,ee(s-u)>=c)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),c=n.split(.5),l=[{left:u.left,right:c.left},{left:u.left,right:c.right},{left:u.right,right:c.right},{left:u.right,right:c.left}];l=l.filter(function(h){return z.bboxoverlap(h.left.bbox(),h.right.bbox())});let f=[];return l.length===0||(l.forEach(function(h){f=f.concat(z.pairiteration(h.left,h.right,s))}),f=f.filter(function(h,d){return f.indexOf(h)===d})),f},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*Pt(It)-o*Wt(It),c=i*Wt(It)+o*Pt(It),l=a*Pt(It)-s*Wt(It),f=a*Wt(It)+s*Pt(It),h=(e.x+n.x)/2,d=(e.y+n.y)/2,p=(n.x+r.x)/2,y=(n.y+r.y)/2,m=h+u,v=d+c,g=p+l,k=y+f,M=z.lli8(h,d,m,v,p,y,g,k),b=z.dist(M,e);let _=ne(e.y-M.y,e.x-M.x),w=ne(n.y-M.y,n.x-M.x),A=ne(r.y-M.y,r.x-M.x),T;return _<A?((_>w||w>A)&&(_+=Ce),_>A&&(T=A,A=_,_=T)):A<w&&w<_?(T=A,A=_,_=T):A+=Ce,M.s=_,M.e=A,M.r=b,M},numberSort:function(e,n){return e-n}};class he{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 z.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++)z.expandbox(r,n[i].bbox());return r}offset(n){const r=[];return this.curves.forEach(function(i){r.push(...i.offset(n))}),new he(r)}}const{abs:ie,min:Dr,max:Ir,cos:Bf,sin:Xf,acos:Yf,sqrt:oe}=Math,Zf=Math.PI;class K{constructor(n){let r=n&&n.forEach?n:Array.from(arguments).slice(),i=!1;if(typeof r[0]=="object"){i=r.length;const p=[];r.forEach(function(y){["x","y","z"].forEach(function(m){typeof y[m]<"u"&&p.push(y[m])})}),r=p}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 p=0,y=s?3:2;p<a;p+=y){var c={x:r[p],y:r[p+1]};s&&(c.z=r[p+2]),u.push(c)}const l=this.order=u.length-1,f=this.dims=["x","y"];s&&f.push("z"),this.dimlen=f.length;const h=z.align(u,{p1:u[0],p2:u[l]}),d=z.dist(u[0],u[l]);this._linear=h.reduce((p,y)=>p+ie(y.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 K(r,r,i);if(o===1)return new K(n,r,r);const a=K.getABC(2,n,r,i,o);return new K(n,a.A,i)}static cubicFromPoints(n,r,i,o,a){typeof o>"u"&&(o=.5);const s=K.getABC(3,n,r,i,o);typeof a>"u"&&(a=z.dist(r,s.C));const u=a*(1-o)/o,c=z.dist(n,i),l=(i.x-n.x)/c,f=(i.y-n.y)/c,h=a*l,d=a*f,p=u*l,y=u*f,m={x:r.x-h,y:r.y-d},v={x:r.x+p,y:r.y+y},g=s.A,k={x:g.x+(m.x-g.x)/(1-o),y:g.y+(m.y-g.y)/(1-o)},M={x:g.x+(v.x-g.x)/o,y:g.y+(v.y-g.y)/o},b={x:n.x+(k.x-n.x)/o,y:n.y+(k.y-n.y)/o},_={x:i.x+(M.x-i.x)/(1-o),y:i.y+(M.y-i.y)/(1-o)};return new K(n,b,_,i)}static getUtils(){return z}getUtils(){return K.getUtils()}static get PolyBezier(){return he}valueOf(){return this.toString()}toString(){return z.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=z.derive(this.points,this._3d),this.computedirection()}computedirection(){const n=this.points,r=z.angle(n[0],n[this.order],n[1]);this.clockwise=r>0}length(){return z.length(this.derivative.bind(this))}static getABC(n=2,r,i,o,a=.5){const s=z.projectionratio(a,n),u=1-s,c={x:s*r.x+u*o.x,y:s*r.y+u*o.y},l=z.abcratio(a,n);return{A:{x:i.x+(i.x-c.x)/l,y:i.y+(i.y-c.y)/l},B:i,C:c,S:r,E:o}}getABC(n,r){r=r||this.get(n);let i=this.points[0],o=this.points[this.order];return K.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],z.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=z.closest(r,n),a=o.mpos,s=(a-1)/i,u=(a+1)/i,c=.1/i;let l=o.mdist,f=s,h=f,d;l+=1;for(let p;f<u+c;f+=c)d=this.compute(f),p=z.dist(n,d),p<l&&(l=p,h=f);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?z.computeWithRatios(n,this.points,this.ratios,this._3d):z.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 K(r)}derivative(n){return z.compute(n,this.dpoints[0],this._3d)}dderivative(n){return z.compute(n,this.dpoints[1],this._3d)}align(){let n=this.points;return new K(z.align(n,{p1:n[0],p2:n[n.length-1]}))}curvature(n){return z.curvature(n,this.dpoints[0],this.dpoints[1],this._3d)}inflections(){return z.inflections(this.points)}normal(n){return this._3d?this.__normal3(n):this.__normal2(n)}__normal2(n){const r=this.derivative(n),i=oe(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=oe(r.x*r.x+r.y*r.y+r.z*r.z),a=oe(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=oe(s.x*s.x+s.y*s.y+s.z*s.z);s.x/=u,s.y/=u,s.z/=u;const c=[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:c[0]*r.x+c[1]*r.y+c[2]*r.z,y:c[3]*r.x+c[4]*r.y+c[5]*r.z,z:c[6]*r.x+c[7]*r.y+c[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,c=r.length-1;s<c;s++)u=z.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 K([i[0],i[3],i[5]]):new K([i[0],i[4],i[7],i[9]]),right:this.order===2?new K([i[5],i[4],i[2]]):new K([i[9],i[8],i[6],i[3]]),span:i};return o.left._t1=z.map(0,0,1,this._t1,this._t2),o.left._t2=z.map(n,0,1,this._t1,this._t2),o.right._t1=z.map(n,0,1,this._t1,this._t2),o.right._t2=z.map(1,0,1,this._t1,this._t2),r?(r=z.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]=z.droots(a),this.order===3&&(a=this.dpoints[1].map(o),n[i]=n[i].concat(z.droots(a))),n[i]=n[i].filter(function(s){return s>=0&&s<=1}),r=r.concat(n[i].sort(z.numberSort))}).bind(this)),n.values=r.sort(z.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]=z.getminmax(this,i,n[i])}).bind(this)),r}overlaps(n){const r=this.bbox(),i=n.bbox();return z.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 K(o)]}return this.reduce().map(function(i){return i._linear?i.offset(n)[0]:i.scale(n)})}simple(){if(this.order===3){const o=z.angle(this.points[0],this.points[3],this.points[1]),a=z.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),ie(Yf(i))<Zf/3}reduce(){let n,r=0,i=0,o=.01,a,s=[],u=[],c=this.extrema().values;for(c.indexOf(0)===-1&&(c=[0].concat(c)),c.indexOf(1)===-1&&c.push(1),r=c[0],n=1;n<c.length;n++)i=c[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,ie(r-i)<o)return[];a=l.split(r,i),a._t1=z.map(r,0,1,l._t1,l._t2),a._t2=z.map(i,0,1,l._t1,l._t2),u.push(a),r=i;break}r<1&&(a=l.split(r,1),a._t1=z.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 K(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,c=[this.offset(0,10),this.offset(1,10)],l=[],f=z.lli4(c[0],c[0].c,c[1],c[1].c);if(!f)throw new Error("cannot scale this curve. Try reducing it first.");return[0,1].forEach(function(h){const d=l[h*r]=z.copy(a[h*r]);d.x+=(h?u:s)*c[h].n.x,d.y+=(h?u:s)*c[h].n.y}),i?([0,1].forEach(function(h){if(!(r===2&&h)){var d=a[h+1],p={x:d.x-f.x,y:d.y-f.y},y=i?i((h+1)/r):n;i&&!o&&(y=-y);var m=oe(p.x*p.x+p.y*p.y);p.x/=m,p.y/=m,l[h+1]={x:d.x+y*p.x,y:d.y+y*p.y}}}),new K(l)):([0,1].forEach(h=>{if(r===2&&h)return;const d=l[h*r],p=this.derivative(h),y={x:d.x+p.x,y:d.y+p.y};l[h+1]=z.lli4(d,y,f,a[h+1])}),new K(l))}outline(n,r,i,o){if(r=r===void 0?n:r,this._linear){const _=this.normal(0),w=this.points[0],A=this.points[this.points.length-1];let T,R,P;i===void 0&&(i=n,o=r),T={x:w.x+_.x*n,y:w.y+_.y*n},P={x:A.x+_.x*i,y:A.y+_.y*i},R={x:(T.x+P.x)/2,y:(T.y+P.y)/2};const N=[T,R,P];T={x:w.x-_.x*r,y:w.y-_.y*r},P={x:A.x-_.x*o,y:A.y-_.y*o},R={x:(T.x+P.x)/2,y:(T.y+P.y)/2};const D=[P,R,T],U=z.makeline(D[2],N[0]),S=z.makeline(N[2],D[0]),j=[U,new K(N),S,new K(D)];return new he(j)}const a=this.reduce(),s=a.length,u=[];let c=[],l,f=0,h=this.length();const d=typeof i<"u"&&typeof o<"u";function p(_,w,A,T,R){return function(P){const N=T/A,D=(T+R)/A,U=w-_;return z.map(P,0,1,_+N*U,_+D*U)}}a.forEach(function(_){const w=_.length();d?(u.push(_.scale(p(n,i,h,f,w))),c.push(_.scale(p(-r,-o,h,f,w)))):(u.push(_.scale(n)),c.push(_.scale(-r))),f+=w}),c=c.map(function(_){return l=_.points,l[3]?_.points=[l[3],l[2],l[1],l[0]]:_.points=[l[2],l[1],l[0]],_}).reverse();const y=u[0].points[0],m=u[s-1].points[u[s-1].points.length-1],v=c[s-1].points[c[s-1].points.length-1],g=c[0].points[0],k=z.makeline(v,y),M=z.makeline(m,g),b=[k].concat(u).concat([M]).concat(c);return new he(b)}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 c=z.makeshape(o[s],o[u-s],i);c.startcap.virtual=s>1,c.endcap.virtual=s<u/2-1,a.push(c)}return a}intersects(n,r){return n?n.p1&&n.p2?this.lineIntersects(n):(n instanceof K&&(n=n.reduce()),this.curveintersects(this.reduce(),n,r)):this.selfintersects(r)}lineIntersects(n){const r=Dr(n.p1.x,n.p2.x),i=Dr(n.p1.y,n.p2.y),o=Ir(n.p1.x,n.p2.x),a=Ir(n.p1.y,n.p2.y);return z.roots(this.points,n).filter(s=>{var u=this.get(s);return z.between(u.x,r,o)&&z.between(u.y,i,a)})}selfintersects(n){const r=this.reduce(),i=r.length-2,o=[];for(let a=0,s,u,c;a<i;a++)u=r.slice(a,a+1),c=r.slice(a+2),s=this.curveintersects(u,c,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=z.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),c=z.dist(n,r),l=z.dist(n,s),f=z.dist(n,u);return ie(l-c)+ie(f-c)}_iterate(n,r){let i=0,o=1,a;do{a=0,o=1;let s=this.get(i),u,c,l,f,h=!1,d=!1,p,y=o,m=1;do if(d=h,f=l,y=(i+o)/2,u=this.get(y),c=this.get(o),l=z.getccenter(s,u,c),l.interval={start:i,end:o},h=this._error(l,s,i,o)<=n,p=d&&!h,p||(m=o),h){if(o>=1){if(l.interval.end=m=1,f=l,o>1){let g={x:l.x+l.r*Bf(l.e),y:l.y+l.r*Xf(l.e)};l.e+=z.angle({x:l.x,y:l.y},g,this.get(1))}break}o=o+(o-i)/2}else o=y;while(!p&&a++<100);if(a>=100)break;f=f||l,r.push(f),i=m}while(o<1);return r}}function An(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 Kf(e){if(Array.isArray(e))return e}function Qf(e){if(Array.isArray(e))return An(e)}function Jf(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function th(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,a,s,u=[],c=!0,l=!1;try{if(a=(r=r.call(e)).next,n!==0)for(;!(c=(i=a.call(r)).done)&&(u.push(i.value),u.length!==n);c=!0);}catch(f){l=!0,o=f}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(l)throw o}}return u}}function eh(){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 nh(){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 rh(e,n){if(e==null)return{};var r,i,o=ih(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 ih(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 oh(e,n){return Kf(e)||th(e,n)||Vi(e,n)||eh()}function ah(e){return Qf(e)||Jf(e)||Vi(e)||nh()}function sh(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 uh(e){var n=sh(e,"string");return typeof n=="symbol"?n:n+""}function Vi(e,n){if(e){if(typeof e=="string")return An(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)?An(e,n):void 0}}var lh=(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,c){var l=u,f=c;return o.forEach(function(h,d){var p=h.keyAccessor,y=h.isProp,m;if(y){var v=f,g=v[p],k=rh(v,[p].map(uh));m=g,f=k}else m=p(f,d);d+1<o.length?(l.hasOwnProperty(m)||(l[m]={}),l=l[m]):r?(l.hasOwnProperty(m)||(l[m]=[]),l[m].push(f)):l[m]=f}),u},{});r instanceof Function&&(function u(c){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;l===o.length?Object.keys(c).forEach(function(f){return c[f]=r(c[f])}):Object.values(c).forEach(function(f){return u(f,l+1)})})(a);var s=a;return i&&(s=[],(function u(c){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];l.length===o.length?s.push({keys:l,vals:c}):Object.entries(c).forEach(function(f){var h=oh(f,2),d=h[0],p=h[1];return u(p,[].concat(ah(l),[d]))})})(a),n instanceof Array&&n.length===0&&s.length===1&&(s[0].keys=[])),s});function ch(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 fh=ch("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");function hh(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 dh=`.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;
|
|
}
|
|
`;hh(dh);function Sn(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 ph(e){if(Array.isArray(e))return e}function gh(e){if(Array.isArray(e))return Sn(e)}function $r(e,n,r){if(Bi())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 ye(e,n,r){return(n=bh(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function Bi(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Bi=function(){return!!e})()}function yh(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _h(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,a,s,u=[],c=!0,l=!1;try{if(a=(r=r.call(e)).next,n!==0)for(;!(c=(i=a.call(r)).done)&&(u.push(i.value),u.length!==n);c=!0);}catch(f){l=!0,o=f}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(l)throw o}}return u}}function vh(){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 mh(){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 Lr(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 Gt(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?Lr(Object(r),!0).forEach(function(i){ye(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Lr(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function de(e,n){return ph(e)||_h(e,n)||Xi(e,n)||vh()}function gt(e){return gh(e)||yh(e)||Xi(e)||mh()}function xh(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 bh(e){var n=xh(e,"string");return typeof n=="symbol"?n:n+""}function Mn(e){"@babel/helpers - typeof";return Mn=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},Mn(e)}function Xi(e,n){if(e){if(typeof e=="string")return Sn(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)?Sn(e,n):void 0}}var wh=po(fh);function Fr(e,n,r){!n||typeof r!="string"||e.filter(function(i){return!i[r]}).forEach(function(i){i[r]=wh(n(i))})}function kh(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,c=u===void 0?function(p){throw"Invalid DAG structure! Found cycle in node path: ".concat(p.join(" -> "),".")}:u,l={};r.forEach(function(p){return l[n(p)]={data:p,out:[],depth:-1,skip:!s(p)}}),i.forEach(function(p){var y=p.source,m=p.target,v=b(y),g=b(m);if(!l.hasOwnProperty(v))throw"Missing source node with id: ".concat(v);if(!l.hasOwnProperty(g))throw"Missing target node with id: ".concat(g);var k=l[v],M=l[g];k.out.push(M);function b(_){return Mn(_)==="object"?n(_):_}});var f=[];d(Object.values(l));var h=Object.assign.apply(Object,[{}].concat(gt(Object.entries(l).filter(function(p){var y=de(p,2),m=y[1];return!m.skip}).map(function(p){var y=de(p,2),m=y[0],v=y[1];return ye({},m,v.depth)}))));return h;function d(p){for(var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,v=function(){var b=p[g];if(y.indexOf(b)!==-1){var _=[].concat(gt(y.slice(y.indexOf(b))),[b]).map(function(w){return n(w.data)});return f.some(function(w){return w.length===_.length&&w.every(function(A,T){return A===_[T]})})||(f.push(_),c(_)),1}m>b.depth&&(b.depth=m,d(b.out,[].concat(gt(y),[b]),m+(b.skip?0:1)))},g=0,k=p.length;g<k;g++)v()}}var Ch=2,it=function(n,r){return r.onNeedsRedraw&&r.onNeedsRedraw()},Ur=function(n,r){if(!r.isShadow){var i=B(r.linkDirectionalParticles);r.graphData.links.forEach(function(o){var a=Math.round(Math.abs(i(o)));a?o.__photons=gt(Array(a)).map(function(){return{}}):delete o.__photons})}},qe=jn({props:{graphData:{default:{nodes:[],links:[]},onChange:function(n,r){r.engineRunning=!1,Ur(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:it},nodeId:{default:"id"},nodeVal:{default:"val",triggerUpdate:!1,onChange:it},nodeColor:{default:"color",triggerUpdate:!1,onChange:it},nodeAutoColorBy:{},nodeCanvasObject:{triggerUpdate:!1,onChange:it},nodeCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:it},nodeVisibility:{default:!0,triggerUpdate:!1,onChange:it},linkSource:{default:"source"},linkTarget:{default:"target"},linkVisibility:{default:!0,triggerUpdate:!1,onChange:it},linkColor:{default:"color",triggerUpdate:!1,onChange:it},linkAutoColorBy:{},linkLineDash:{triggerUpdate:!1,onChange:it},linkWidth:{default:1,triggerUpdate:!1,onChange:it},linkCurvature:{default:0,triggerUpdate:!1,onChange:it},linkCanvasObject:{triggerUpdate:!1,onChange:it},linkCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:it},linkDirectionalArrowLength:{default:0,triggerUpdate:!1,onChange:it},linkDirectionalArrowColor:{triggerUpdate:!1,onChange:it},linkDirectionalArrowRelPos:{default:.5,triggerUpdate:!1,onChange:it},linkDirectionalParticles:{default:0,triggerUpdate:!1,onChange:Ur},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=B(n.nodeVisibility),c=B(n.nodeVal),l=B(n.nodeColor),f=B(n.nodeCanvasObjectMode),h=n.ctx,d=n.isShadow/n.globalScale,p=n.graphData.nodes.filter(u);h.save(),p.forEach(function(y){var m=f(y);if(n.nodeCanvasObject&&(m==="before"||m==="replace")&&(n.nodeCanvasObject(y,h,n.globalScale),m==="replace")){h.restore();return}var v=Math.sqrt(Math.max(0,c(y)||1))*n.nodeRelSize+d;h.beginPath(),h.arc(y.x,y.y,v,0,2*Math.PI,!1),h.fillStyle=l(y)||"rgba(31, 120, 180, 0.92)",h.fill(),n.nodeCanvasObject&&m==="after"&&n.nodeCanvasObject(y,n.ctx,n.globalScale)}),h.restore()}function o(){var u=B(n.linkVisibility),c=B(n.linkColor),l=B(n.linkWidth),f=B(n.linkLineDash),h=B(n.linkCurvature),d=B(n.linkCanvasObjectMode),p=n.ctx,y=n.isShadow*2,m=n.graphData.links.filter(u);m.forEach(w);var v=[],g=[],k=m;if(n.linkCanvasObject){var M=[],b=[];m.forEach(function(A){return({before:v,after:g,replace:M}[d(A)]||b).push(A)}),k=[].concat(gt(v),g,b),v=v.concat(M)}p.save(),v.forEach(function(A){return n.linkCanvasObject(A,p,n.globalScale)}),p.restore();var _=lh(k,[c,l,f]);p.save(),Object.entries(_).forEach(function(A){var T=de(A,2),R=T[0],P=T[1],N=!R||R==="undefined"?"rgba(0,0,0,0.15)":R;Object.entries(P).forEach(function(D){var U=de(D,2),S=U[0],j=U[1],E=(S||1)/n.globalScale+y;Object.entries(j).forEach(function(C){var O=de(C,2);O[0];var I=O[1],L=f(I[0]);p.beginPath(),I.forEach(function(H){var F=H.source,G=H.target;if(!(!F||!G||!F.hasOwnProperty("x")||!G.hasOwnProperty("x"))){p.moveTo(F.x,F.y);var V=H.__controlPoints;V?p[V.length===2?"quadraticCurveTo":"bezierCurveTo"].apply(p,gt(V).concat([G.x,G.y])):p.lineTo(G.x,G.y)}}),p.strokeStyle=N,p.lineWidth=E,p.setLineDash(L||[]),p.stroke()})})}),p.restore(),p.save(),g.forEach(function(A){return n.linkCanvasObject(A,p,n.globalScale)}),p.restore();function w(A){var T=h(A);if(!T){A.__controlPoints=null;return}var R=A.source,P=A.target;if(!(!R||!P||!R.hasOwnProperty("x")||!P.hasOwnProperty("x"))){var N=Math.sqrt(Math.pow(P.x-R.x,2)+Math.pow(P.y-R.y,2));if(N>0){var D=Math.atan2(P.y-R.y,P.x-R.x),U=N*T,S={x:(R.x+P.x)/2+U*Math.cos(D-Math.PI/2),y:(R.y+P.y)/2+U*Math.sin(D-Math.PI/2)};A.__controlPoints=[S.x,S.y]}else{var j=T*70;A.__controlPoints=[P.x,P.y-j,P.x+j,P.y]}}}}function a(){var u=1.6,c=.2,l=B(n.linkDirectionalArrowLength),f=B(n.linkDirectionalArrowRelPos),h=B(n.linkVisibility),d=B(n.linkDirectionalArrowColor||n.linkColor),p=B(n.nodeVal),y=n.ctx;y.save(),n.graphData.links.filter(h).forEach(function(m){var v=l(m);if(!(!v||v<0)){var g=m.source,k=m.target;if(!(!g||!k||!g.hasOwnProperty("x")||!k.hasOwnProperty("x"))){var M=Math.sqrt(Math.max(0,p(g)||1))*n.nodeRelSize,b=Math.sqrt(Math.max(0,p(k)||1))*n.nodeRelSize,_=Math.min(1,Math.max(0,f(m))),w=d(m)||"rgba(0,0,0,0.28)",A=v/u/2,T=m.__controlPoints&&$r(K,[g.x,g.y].concat(gt(m.__controlPoints),[k.x,k.y])),R=T?function(E){return T.get(E)}:function(E){return{x:g.x+(k.x-g.x)*E||0,y:g.y+(k.y-g.y)*E||0}},P=T?T.length():Math.sqrt(Math.pow(k.x-g.x,2)+Math.pow(k.y-g.y,2)),N=M+v+(P-M-b-v)*_,D=R(N/P),U=R((N-v)/P),S=R((N-v*(1-c))/P),j=Math.atan2(D.y-U.y,D.x-U.x)-Math.PI/2;y.beginPath(),y.moveTo(D.x,D.y),y.lineTo(U.x+A*Math.cos(j),U.y+A*Math.sin(j)),y.lineTo(S.x,S.y),y.lineTo(U.x-A*Math.cos(j),U.y-A*Math.sin(j)),y.fillStyle=w,y.fill()}}}),y.restore()}function s(){var u=B(n.linkDirectionalParticles),c=B(n.linkDirectionalParticleSpeed),l=B(n.linkDirectionalParticleOffset),f=B(n.linkDirectionalParticleWidth),h=B(n.linkVisibility),d=B(n.linkDirectionalParticleColor||n.linkColor),p=n.ctx;p.save(),n.graphData.links.filter(h).forEach(function(y){var m=u(y);if(!(!y.hasOwnProperty("__photons")||!y.__photons.length)){var v=y.source,g=y.target;if(!(!v||!g||!v.hasOwnProperty("x")||!g.hasOwnProperty("x"))){var k=c(y),M=Math.abs(l(y)),b=y.__photons||[],_=Math.max(0,f(y)/2)/Math.sqrt(n.globalScale),w=d(y)||"rgba(0,0,0,0.28)";p.fillStyle=w;var A=y.__controlPoints?$r(K,[v.x,v.y].concat(gt(y.__controlPoints),[g.x,g.y])):null,T=0,R=!1;b.forEach(function(P){var N=!!P.__singleHop;if(P.hasOwnProperty("__progressRatio")||(P.__progressRatio=N?k<0?1:0:(T+M)/m),!N&&T++,P.__progressRatio+=k,P.__progressRatio>=1||P.__progressRatio<0)if(!N)P.__progressRatio=P.__progressRatio%1,P.__progressRatio<0&&P.__progressRatio++;else{R=!0;return}var D=P.__progressRatio,U=A?A.get(D):{x:v.x+(g.x-v.x)*D||0,y:v.y+(g.y-v.y)*D||0};n.linkDirectionalParticleCanvasObject?n.linkDirectionalParticleCanvasObject(U.x,U.y,y,p,n.globalScale):(p.beginPath(),p.arc(U.x,U.y,_,0,2*Math.PI,!1),p.fill())}),R&&(y.__photons=y.__photons.filter(function(P){return!P.__singleHop||P.__progressRatio<=1&&P.__progressRatio>=0}))}}}),p.restore()}},emitParticle:function(n,r){return r&&(!r.__photons&&(r.__photons=[]),r.__photons.push({__singleHop:!0})),this}},stateInit:function(){return{forceLayout:Uf().force("link",Nf()).force("charge",Hf()).force("center",Rc()).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&&Fr(n.graphData.nodes,B(n.nodeAutoColorBy),n.nodeColor),n.linkAutoColorBy!==null&&Fr(n.graphData.links,B(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&&kh(n.graphData,function(d){return d[n.nodeId]},{nodeFilter:n.dagNodeFilter,onLoopError:n.onDagError||void 0}),a=Math.max.apply(Math,gt(Object.values(o||[]))),s=n.dagLevelDistance||n.graphData.nodes.length/(a||1)*Ch*(["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 c=["rl","bu"].includes(n.dagMode),l=function(p){return(o[p[n.nodeId]]-a/2)*s*(c?-1:1)},f=["lr","rl"].includes(n.dagMode)?"fx":"fy";n.graphData.nodes.filter(n.dagNodeFilter).forEach(function(d){return d[f]=l(d)})}n.forceLayout.force("dagRadial",["radialin","radialout"].indexOf(n.dagMode)!==-1?qf(function(d){var p=o[d[n.nodeId]]||-1;return(n.dagMode==="radialin"?a-p:p)*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 Yi(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,c){r.forEach(function(l){return c[l][a](u)})},triggerUpdate:!1}},linkMethod:function(a){return function(s){for(var u=arguments.length,c=new Array(u>1?u-1:0),l=1;l<u;l++)c[l-1]=arguments[l];var f=[];return r.forEach(function(h){var d=s[h],p=d[a].apply(d,c);p!==d&&f.push(p)}),f.length?f[0]:this}}}}var Ah=800,Sh=4,Mh=5,Zi=Yi("forceGraph",qe),Th=Yi(["forceGraph","shadowGraph"],qe),Ph=Object.assign.apply(Object,gt(["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 ye({},e,Zi.linkProp(e))})).concat(gt(["nodeRelSize","nodeId","nodeVal","nodeVisibility","linkSource","linkTarget","linkVisibility","linkCurvature"].map(function(e){return ye({},e,Th.linkProp(e))})))),Oh=Object.assign.apply(Object,gt(["d3Force","d3ReheatSimulation","emitParticle"].map(function(e){return ye({},e,Zi.linkMethod(e))})));function an(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=mt(e.canvas).k;e.zoom.translateBy(e.zoom.__baseElem,(e.width-n)/2/o,(e.height-r)/2/o),e.needsRedraw=!0}}function Ki(e){var n=window.devicePixelRatio;e.setTransform(n,0,0,n,0,0)}function Hr(e,n,r){e.save(),Ki(e),e.clearRect(0,0,n,r),e.restore()}var Eh=jn({props:Gt({width:{default:window.innerWidth,onChange:function(n,r){return an(r)},triggerUpdate:!1},height:{default:window.innerHeight,onChange:function(n,r){return an(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 c=r.colorTracker.lookup(u.__indexColor);return!c||!c.hasOwnProperty("d")||c.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}},Ph),aliases:{stopAnimation:"pauseAnimation"},methods:Gt({graph2ScreenCoords:function(n,r,i){var o=mt(n.canvas);return{x:r*o.k+o.x,y:i*o.k+o.y}},screen2GraphCoords:function(n,r,i){var o=mt(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 hr(s()).to(a,o).easing(Ut.Quadratic.Out).onUpdate(u).onComplete(function(){n.tweenGroup.remove(this)}).start()):u(a),this}return s();function s(){var c=mt(n.canvas);return{x:(n.width/2-c.x)/c.k,y:(n.height/2-c.y)/c.k}}function u(c){var l=c.x,f=c.y;n.zoom.translateTo(n.zoom.__baseElem,l===void 0?s().x:l,f===void 0?s().y:f),n.needsRedraw=!0}},zoom:function(n,r,i){if(!n.canvas)return null;if(r!==void 0)return i?n.tweenGroup.add(new hr({k:o()}).to({k:r},i).easing(Ut.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 mt(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 c={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(c.x,c.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=B(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:[Zn(a,function(s){return s.x-s.r}),Kn(a,function(s){return s.x+s.r})],y:[Zn(a,function(s){return s.y-s.r}),Kn(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:[]})}},Oh),stateInit:function(){return{lastSetZoom:1,zoom:Gu(),forceGraph:new qe,shadowGraph:new qe().cooldownTicks(0).nodeColor("__indexColor").linkColor("__indexColor").isShadow(!0),colorTracker:new fc,tweenGroup:new bi}},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},c=function(){var h=null,d=window.devicePixelRatio,p=u.x>0&&u.y>0?s.getImageData(u.x*d,u.y*d,1,1):null;return p&&(h=r.colorTracker.lookup(p.data)),h};pt(r.canvas).call(Ms().subject(function(){if(!r.enableNodeDrag)return null;var f=c();return f&&f.type==="Node"?f.d:null}).on("start",function(f){var h=f.subject;h.__initialDragPos={x:h.x,y:h.y,fx:h.fx,fy:h.fy},f.active||(h.fx=h.x,h.fy=h.y),r.canvas.classList.add("grabbable")}).on("drag",function(f){var h=f.subject,d=h.__initialDragPos,p=f,y=mt(r.canvas).k,m={x:d.x+(p.x-d.x)/y-h.x,y:d.y+(p.y-d.y)/y-h.y};["x","y"].forEach(function(v){return h["f".concat(v)]=h[v]=d[v]+(p[v]-d[v])/y}),!(!h.__dragged&&Mh>=Math.sqrt(mo(["x","y"].map(function(v){return Math.pow(f[v]-d[v],2)}))))&&(r.forceGraph.d3AlphaTarget(.3).resetCountdown(),r.isPointerDragging=!0,h.__dragged=!0,r.onNodeDrag(h,m))}).on("end",function(f){var h=f.subject,d=h.__initialDragPos,p={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,p))})),r.zoom(r.zoom.__baseElem=pt(r.canvas)),r.zoom.__baseElem.on("dblclick.zoom",null),r.zoom.filter(function(f){return!f.button&&r.enableZoomPanInteraction&&(f.type!=="wheel"||B(r.enableZoomInteraction)(f))&&(f.type==="wheel"||B(r.enablePanInteraction)(f))}).on("zoom",function(f){var h=f.transform;[a,s].forEach(function(d){Ki(d),d.translate(h.x,h.y),d.scale(h.k,h.k)}),r.isPointerDragging=!0,r.onZoom&&r.onZoom(Gt(Gt({},h),i.centerAt())),r.needsRedraw=!0}).on("end",function(f){r.isPointerDragging=!1,r.onZoomEnd&&r.onZoomEnd(Gt(Gt({},f.transform),i.centerAt()))}),an(r),r.forceGraph.onNeedsRedraw(function(){return r.needsRedraw=!0}).onFinishUpdate(function(){mt(r.canvas).k===r.lastSetZoom&&r.graphData.nodes.length&&(r.zoom.scaleTo(r.zoom.__baseElem,r.lastSetZoom=Sh/Math.cbrt(r.graphData.nodes.length)),r.needsRedraw=!0)}),r.tooltip=new Nc(o),["pointermove","pointerdown"].forEach(function(f){return o.addEventListener(f,function(h){f==="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(y){return Math.abs(y)>1}))&&(r.isPointerDragging=!0);var d=p(o);u.x=h.pageX-d.left,u.y=h.pageY-d.top;function p(y){var m=y.getBoundingClientRect(),v=window.pageXOffset||document.documentElement.scrollLeft,g=window.pageYOffset||document.documentElement.scrollTop;return{top:m.top+g,left:m.left+v}}},{passive:!0})}),o.addEventListener("pointerup",function(f){if(r.isPointerPressed){if(r.isPointerPressed=!1,r.isPointerDragging){r.isPointerDragging=!1;return}var h=[f,r.pointerDownEvent];requestAnimationFrame(function(){if(f.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(f.button===2)if(r.hoverObj){var p=r["on".concat(r.hoverObj.type,"RightClick")];p&&p.apply(void 0,[r.hoverObj.d].concat(h))}else r.onBackgroundRightClick&&r.onBackgroundRightClick.apply(r,h)})}},{passive:!0}),o.addEventListener("contextmenu",function(f){return!r.onBackgroundRightClick&&!r.onNodeRightClick&&!r.onLinkRightClick?!0:(f.preventDefault(),!1)}),r.forceGraph(a),r.shadowGraph(s);var l=vl(function(){Hr(s,r.width,r.height),r.shadowGraph.linkWidth(function(h){return B(r.linkWidth)(h)+r.linkHoverPrecision});var f=mt(r.canvas);r.shadowGraph.globalScale(f.k).tickFrame()},Ah);r.flushShadowCanvas=l.flush,(this._animationCycle=function f(){var h=!r.autoPauseRedraw||!!r.needsRedraw||r.forceGraph.isEngineRunning()||r.graphData.links.some(function(M){return M.__photons&&M.__photons.length});if(r.needsRedraw=!1,r.enablePointerInteraction){var d=r.isPointerDragging?null:c();if(d!==r.hoverObj){var p=r.hoverObj,y=p?p.type:null,m=d?d.type:null;if(y&&y!==m){var v=r["on".concat(y,"Hover")];v&&v(null,p.d)}if(m){var g=r["on".concat(m,"Hover")];g&&g(d.d,y===m?p.d:null)}r.tooltip.content(d&&B(r["".concat(d.type.toLowerCase(),"Label")])(d.d)||null),r.canvas.classList[(d&&r["on".concat(m,"Click")]||!d&&r.onBackgroundClick)&&B(r.showPointerCursor)(d==null?void 0:d.d)?"add":"remove"]("clickable"),r.hoverObj=d}h&&l()}if(h){Hr(a,r.width,r.height);var k=mt(r.canvas).k;r.onRenderFramePre&&r.onRenderFramePre(a,k),r.forceGraph.globalScale(k).tickFrame(),r.onRenderFramePost&&r.onRenderFramePost(a,k)}r.tweenGroup.update(),r.animationFrameRequestId=requestAnimationFrame(f)})()},update:function(n){}}),sn={exports:{}},un,qr;function zh(){if(qr)return un;qr=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return un=e,un}var ln,Wr;function Nh(){if(Wr)return ln;Wr=1;var e=zh();function n(){}function r(){}return r.resetWarningCache=n,ln=function(){function i(s,u,c,l,f,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},ln}var Gr;function Rh(){return Gr||(Gr=1,sn.exports=Nh()()),sn.exports}var jh=Rh();const x=io(jh),Ze={width:x.number,height:x.number,graphData:x.shape({nodes:x.arrayOf(x.object).isRequired,links:x.arrayOf(x.object).isRequired}),backgroundColor:x.string,nodeRelSize:x.number,nodeId:x.string,nodeLabel:x.oneOfType([x.string,x.func]),nodeVal:x.oneOfType([x.number,x.string,x.func]),nodeVisibility:x.oneOfType([x.bool,x.string,x.func]),nodeColor:x.oneOfType([x.string,x.func]),nodeAutoColorBy:x.oneOfType([x.string,x.func]),onNodeHover:x.func,onNodeClick:x.func,linkSource:x.string,linkTarget:x.string,linkLabel:x.oneOfType([x.string,x.func]),linkVisibility:x.oneOfType([x.bool,x.string,x.func]),linkColor:x.oneOfType([x.string,x.func]),linkAutoColorBy:x.oneOfType([x.string,x.func]),linkWidth:x.oneOfType([x.number,x.string,x.func]),linkCurvature:x.oneOfType([x.number,x.string,x.func]),linkDirectionalArrowLength:x.oneOfType([x.number,x.string,x.func]),linkDirectionalArrowColor:x.oneOfType([x.string,x.func]),linkDirectionalArrowRelPos:x.oneOfType([x.number,x.string,x.func]),linkDirectionalParticles:x.oneOfType([x.number,x.string,x.func]),linkDirectionalParticleSpeed:x.oneOfType([x.number,x.string,x.func]),linkDirectionalParticleOffset:x.oneOfType([x.number,x.string,x.func]),linkDirectionalParticleWidth:x.oneOfType([x.number,x.string,x.func]),linkDirectionalParticleColor:x.oneOfType([x.string,x.func]),onLinkHover:x.func,onLinkClick:x.func,dagMode:x.oneOf(["td","bu","lr","rl","zin","zout","radialin","radialout"]),dagLevelDistance:x.number,dagNodeFilter:x.func,onDagError:x.func,d3AlphaMin:x.number,d3AlphaDecay:x.number,d3VelocityDecay:x.number,warmupTicks:x.number,cooldownTicks:x.number,cooldownTime:x.number,onEngineTick:x.func,onEngineStop:x.func,getGraphBbox:x.func},Qi={zoomToFit:x.func,onNodeRightClick:x.func,onNodeDrag:x.func,onNodeDragEnd:x.func,onLinkRightClick:x.func,linkHoverPrecision:x.number,onBackgroundClick:x.func,onBackgroundRightClick:x.func,showPointerCursor:x.oneOfType([x.bool,x.func]),enablePointerInteraction:x.bool,enableNodeDrag:x.bool},Wn={showNavInfo:x.bool,nodeOpacity:x.number,nodeResolution:x.number,nodeThreeObject:x.oneOfType([x.object,x.string,x.func]),nodeThreeObjectExtend:x.oneOfType([x.bool,x.string,x.func]),nodePositionUpdate:x.func,linkOpacity:x.number,linkResolution:x.number,linkCurveRotation:x.oneOfType([x.number,x.string,x.func]),linkMaterial:x.oneOfType([x.object,x.string,x.func]),linkThreeObject:x.oneOfType([x.object,x.string,x.func]),linkThreeObjectExtend:x.oneOfType([x.bool,x.string,x.func]),linkPositionUpdate:x.func,linkDirectionalArrowResolution:x.number,linkDirectionalParticleResolution:x.number,linkDirectionalParticleThreeObject:x.oneOfType([x.object,x.string,x.func]),forceEngine:x.oneOf(["d3","ngraph"]),ngraphPhysics:x.object,numDimensions:x.oneOf([1,2,3])},Dh=Object.assign({},Ze,Qi,{linkLineDash:x.oneOfType([x.arrayOf(x.number),x.string,x.func]),nodeCanvasObjectMode:x.oneOfType([x.string,x.func]),nodeCanvasObject:x.func,nodePointerAreaPaint:x.func,linkCanvasObjectMode:x.oneOfType([x.string,x.func]),linkCanvasObject:x.func,linkPointerAreaPaint:x.func,linkDirectionalParticleCanvasObject:x.func,autoPauseRedraw:x.bool,minZoom:x.number,maxZoom:x.number,enableZoomInteraction:x.oneOfType([x.bool,x.func]),enablePanInteraction:x.oneOfType([x.bool,x.func]),onZoom:x.func,onZoomEnd:x.func,onRenderFramePre:x.func,onRenderFramePost:x.func});Object.assign({},Ze,Qi,Wn,{enableNavigationControls:x.bool,controlType:x.oneOf(["trackball","orbit","fly"]),rendererConfig:x.object,extraRenderers:x.arrayOf(x.shape({render:x.func.isRequired}))});Object.assign({},Ze,Wn,{nodeDesc:x.oneOfType([x.string,x.func]),linkDesc:x.oneOfType([x.string,x.func])});Object.assign({},Ze,Wn,{markerAttrs:x.object,yOffset:x.number,glScale:x.number});const Gn=Lo(Eh,{methodNames:["emitParticle","d3Force","d3ReheatSimulation","stopAnimation","pauseAnimation","resumeAnimation","centerAt","zoom","zoomToFit","getGraphBbox","screen2GraphCoords","graph2ScreenCoords"]});Gn.displayName="ForceGraph2D";Gn.propTypes=Dh;function wt(e){return function(){return e}}function Vr(e){return(e()-.5)*1e-6}function Ih(e){return e.x+e.vx}function $h(e){return e.y+e.vy}function Lh(e){var n,r,i,o=1,a=1;typeof e!="function"&&(e=wt(e==null?1:+e));function s(){for(var l,f=n.length,h,d,p,y,m,v,g=0;g<a;++g)for(h=Un(n,Ih,$h).visitAfter(u),l=0;l<f;++l)d=n[l],m=r[d.index],v=m*m,p=d.x+d.vx,y=d.y+d.vy,h.visit(k);function k(M,b,_,w,A){var T=M.data,R=M.r,P=m+R;if(T){if(T.index>d.index){var N=p-T.x-T.vx,D=y-T.y-T.vy,U=N*N+D*D;U<P*P&&(N===0&&(N=Vr(i),U+=N*N),D===0&&(D=Vr(i),U+=D*D),U=(P-(U=Math.sqrt(U)))/U*o,d.vx+=(N*=U)*(P=(R*=R)/(v+R)),d.vy+=(D*=U)*P,T.vx-=N*(P=1-P),T.vy-=D*P)}return}return b>p+P||w<p-P||_>y+P||A<y-P}}function u(l){if(l.data)return l.r=r[l.data.index];for(var f=l.r=0;f<4;++f)l[f]&&l[f].r>l.r&&(l.r=l[f].r)}function c(){if(n){var l,f=n.length,h;for(r=new Array(f),l=0;l<f;++l)h=n[l],r[h.index]=+e(h,l,n)}}return s.initialize=function(l,f){n=l,i=f,c()},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:wt(+l),c(),s):e},s}function Fh(e){var n=wt(.1),r,i,o;typeof e!="function"&&(e=wt(e==null?0:+e));function a(u){for(var c=0,l=r.length,f;c<l;++c)f=r[c],f.vx+=(o[c]-f.x)*i[c]*u}function s(){if(r){var u,c=r.length;for(i=new Array(c),o=new Array(c),u=0;u<c;++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:wt(+u),s(),a):n},a.x=function(u){return arguments.length?(e=typeof u=="function"?u:wt(+u),s(),a):e},a}function Uh(e){var n=wt(.1),r,i,o;typeof e!="function"&&(e=wt(e==null?0:+e));function a(u){for(var c=0,l=r.length,f;c<l;++c)f=r[c],f.vy+=(o[c]-f.y)*i[c]*u}function s(){if(r){var u,c=r.length;for(i=new Array(c),o=new Array(c),u=0;u<c;++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:wt(+u),s(),a):n},a.y=function(u){return arguments.length?(e=typeof u=="function"?u:wt(+u),s(),a):e},a}const Br={identity:"#00f5ff",knowledge:"#3b82f6",rules:"#d946ef",events:"#fbbf24"},Xr={identity:"Identität",knowledge:"Wissen",rules:"Regeln",events:"Ereignisse"},Hh="rgba(99, 102, 241, 0.9)",qh="rgba(100, 116, 139, 0.3)",Wh={identity:"rgba(0, 245, 255, 0.3)",knowledge:"rgba(59, 130, 246, 0.3)",rules:"rgba(217, 70, 239, 0.3)",events:"rgba(251, 191, 36, 0.3)"},Gh={identity:"rgba(0, 245, 255, 0.16)",knowledge:"rgba(59, 130, 246, 0.16)",rules:"rgba(217, 70, 239, 0.16)",events:"rgba(251, 191, 36, 0.16)"},Vh={identity:"rgba(0, 245, 255, 0.05)",knowledge:"rgba(59, 130, 246, 0.05)",rules:"rgba(217, 70, 239, 0.05)",events:"rgba(251, 191, 36, 0.05)"},Bh={identity:"rgba(0, 245, 255, 0.16)",knowledge:"rgba(59, 130, 246, 0.16)",rules:"rgba(217, 70, 239, 0.16)",events:"rgba(251, 191, 36, 0.16)"},Xh={identity:"rgba(0, 245, 255, 0.3)",knowledge:"rgba(59, 130, 246, 0.3)",rules:"rgba(217, 70, 239, 0.3)",events:"rgba(251, 191, 36, 0.3)"};function Yh(e){if(e.length<3)return e;const n=[...e].sort((a,s)=>a[0]-s[0]||a[1]-s[1]),r=(a,s,u)=>(s[0]-a[0])*(u[1]-a[1])-(s[1]-a[1])*(u[0]-a[0]),i=[];for(const a of n){for(;i.length>=2&&r(i[i.length-2],i[i.length-1],a)<=0;)i.pop();i.push(a)}const o=[];for(let a=n.length-1;a>=0;a--){const s=n[a];for(;o.length>=2&&r(o[o.length-2],o[o.length-1],s)<=0;)o.pop();o.push(s)}return i.pop(),o.pop(),i.concat(o)}function Zh({data:e,selectedNodeId:n,onNodeSelect:r}){const[i,o]=W.useState(null),[a,s]=W.useState(.75),u=W.useRef(null),c=W.useRef(null),[l,f]=W.useState({width:500,height:560});W.useEffect(()=>{if(!u.current)return;const C=new ResizeObserver(O=>{for(const I of O)I.contentRect.width>0&&I.contentRect.height>0&&f({width:Math.floor(I.contentRect.width),height:Math.floor(I.contentRect.height)})});return C.observe(u.current),()=>C.disconnect()},[]);const h=W.useRef(new Map),d=W.useMemo(()=>{const C=h.current,O=new Set,I=e.nodes.map(F=>{O.add(F.id);let G=C.get(F.id);return G?(G.content!==F.content||G.category!==F.category)&&(G.content=F.content,G.category=F.category,G.__baseTextWidth=void 0):(G={...F},C.set(F.id,G)),G});for(const F of Array.from(C.keys()))O.has(F)||C.delete(F);const L=new Map(e.nodes.map(F=>[F.id,F.category])),H=e.edges.map(F=>({source:F.source,target:F.target,weight:F.weight||0,__sid:F.source,__tid:F.target,__sameCat:L.get(F.source)===L.get(F.target),__restColor:Wh[L.get(F.source)??""]??qh}));return{nodes:I,links:H}},[e]),p=W.useMemo(()=>{const C={};return e.edges.forEach(O=>{C[O.source]=(C[O.source]||0)+1,C[O.target]=(C[O.target]||0)+1}),C},[e]),y=C=>({identity:-240,knowledge:240,rules:-240,events:240})[C]||0,m=C=>({identity:-240,knowledge:-240,rules:240,events:240})[C]||0,v=W.useMemo(()=>`${e.nodes.map(C=>C.id).sort().join(",")}#${e.edges.length}`,[e]);W.useEffect(()=>{const C=c.current;if(!C)return;C.d3Force("center",null),C.d3Force("x",Fh().x(L=>y(L.category)).strength(.1)),C.d3Force("y",Uh().y(L=>m(L.category)).strength(.1));const O=C.d3Force("charge");O&&O.strength(-380),C.d3Force("collide",Lh().radius(28).iterations(2));const I=C.d3Force("link");I&&I.distance(L=>L.__sameCat?70:200).strength(L=>L.__sameCat?.3*(L.weight||.6):.01),C.d3ReheatSimulation()},[v]);const g=i||n,k=W.useMemo(()=>d.links.filter(C=>C.__sameCat&&(C.weight||0)>=a).length,[d,a]),M=()=>{c.current&&c.current.zoomToFit(400,40)},b=W.useMemo(()=>{if(!g)return new Set;const C=new Set;return e.edges.forEach(O=>{O.source===g&&C.add(O.target),O.target===g&&C.add(O.source)}),C},[g,e]),_=W.useCallback(C=>g?C.__sid===g||C.__tid===g:C.__sameCat&&(C.weight||0)>=a,[g,a]),w=W.useCallback(C=>g&&(C.__sid===g||C.__tid===g)?Hh:C.__restColor,[g]),A=W.useCallback(C=>g&&(C.__sid===g||C.__tid===g)?2.5:1.4,[g]),T=W.useCallback(C=>g&&(C.__sid===g||C.__tid===g)?4:0,[g]),R=W.useCallback((C,O)=>{const I=c.current,L=u.current;if(!I||!L)return null;const H=L.getBoundingClientRect(),{x:F,y:G}=I.screen2GraphCoords(C-H.left,O-H.top),V=Math.max(I.zoom()||1,.01);let X=null,tt=1/0;for(const Z of d.nodes){if(Z.x==null||Z.y==null)continue;const st=6+Math.min(p[Z.id]||0,15)*.8,et=Math.max(st+3,16/V),qt=Z.x-F,At=Z.y-G,nt=qt*qt+At*At;nt<=et*et&&nt<tt&&(tt=nt,X=Z)}return X},[d,p]),P=W.useCallback(C=>{const O=C.target instanceof HTMLCanvasElement?R(C.clientX,C.clientY):null;o(O?O.id:null),u.current&&(u.current.style.cursor=O?"pointer":"default")},[R]),N=W.useCallback(()=>{o(null),u.current&&(u.current.style.cursor="default")},[]),D=W.useRef(null),U=W.useCallback(C=>{D.current={x:C.clientX,y:C.clientY}},[]),S=W.useCallback(C=>{if(!(C.target instanceof HTMLCanvasElement))return;const O=D.current;if(O&&Math.hypot(C.clientX-O.x,C.clientY-O.y)>6)return;const I=R(C.clientX,C.clientY);r(I?I.id:null)},[R,r]),j=W.useCallback((C,O)=>{var L;const I={};for(const H of d.nodes)H.x==null||H.y==null||(I[L=H.category]??(I[L]=[])).push([H.x,H.y]);for(const[H,F]of Object.entries(I)){const G=Vh[H];if(!G||F.length===0)continue;const V=Yh(F);let X=0,tt=0;V.forEach(et=>{X+=et[0],tt+=et[1]}),X/=V.length,tt/=V.length;const Z=34;if(C.beginPath(),V.length<3)C.arc(X,tt,Z+16,0,2*Math.PI);else{const et=V.map(([nt,lt])=>{const jt=nt-X,Zt=lt-tt,Kt=Math.hypot(jt,Zt)||1;return[nt+jt/Kt*Z,lt+Zt/Kt*Z]}),qt=(nt,lt)=>[(nt[0]+lt[0])/2,(nt[1]+lt[1])/2],At=qt(et[et.length-1],et[0]);C.moveTo(At[0],At[1]);for(let nt=0;nt<et.length;nt++){const lt=et[nt],jt=qt(lt,et[(nt+1)%et.length]);C.quadraticCurveTo(lt[0],lt[1],jt[0],jt[1])}C.closePath()}C.fillStyle=G,C.fill(),C.strokeStyle=Bh[H],C.lineWidth=1.2/Math.max(O,.3),C.stroke();const st=Math.min(...V.map(et=>et[1]));C.font='600 26px "Space Grotesk", sans-serif',C.textAlign="center",C.textBaseline="bottom",C.fillStyle=Xh[H],C.fillText(Xr[H]||H,X,st-Z-8)}},[d]),E=W.useCallback((C,O,I)=>{const L=C.x??0,H=C.y??0,F=6+Math.min(p[C.id]||0,15)*.8,G=Br[C.category]||"#64748b",V=C.id===i,X=C.id===n,tt=g&&C.id!==g&&!b.has(C.id),Z=tt?"#1e293b":G;if(tt||(O.beginPath(),O.arc(L,H,F*1.9,0,2*Math.PI,!1),O.fillStyle=Gh[C.category]||"rgba(100, 116, 139, 0.14)",O.fill()),(V||X)&&(O.shadowColor=G,O.shadowBlur=15),O.beginPath(),O.arc(L,H,F,0,2*Math.PI,!1),O.fillStyle=Z,O.fill(),O.shadowBlur=0,(V||X)&&(O.beginPath(),O.arc(L,H,F+2.5,0,2*Math.PI,!1),O.strokeStyle=X?"#ffffff":"rgba(255, 255, 255, 0.7)",O.lineWidth=1.5,O.stroke()),V||X||g&&b.has(C.id)){const et=C.content.length>35?C.content.slice(0,34)+"…":C.content;if(C.__baseTextWidth===void 0){const Ji=O.font;O.font='500 10px "Space Grotesk", sans-serif',C.__baseTextWidth=O.measureText(et).width,O.font=Ji}const At=(V||X?10.5:9.5)/Math.max(.5,I);O.font=`${V||X?"bold":"500"} ${At}px "Space Grotesk", sans-serif`;const nt=C.__baseTextWidth*(At/10),lt=4.5/Math.max(.5,I),jt=L-nt/2-lt,Zt=H+F+6/Math.max(.5,I),Kt=nt+lt*2,Vn=At+lt*1.6;O.fillStyle=tt?"rgba(10, 15, 25, 0.45)":"rgba(8, 12, 20, 0.88)",O.fillRect(jt,Zt,Kt,Vn),O.strokeStyle=V||X?"rgba(255, 255, 255, 0.2)":"rgba(255, 255, 255, 0.08)",O.lineWidth=.6/Math.max(.5,I),O.strokeRect(jt,Zt,Kt,Vn),O.textAlign="center",O.textBaseline="top",O.fillStyle=tt?"#475569":V||X?"#ffffff":"#cbd5e1",O.fillText(et,L,H+F+7/Math.max(.5,I))}},[p,i,n,g,b]);return $.jsxs("div",{className:"absolute inset-0",ref:u,onPointerMove:P,onPointerLeave:N,onPointerDown:U,onClick:S,style:{background:"radial-gradient(circle at center, rgba(59, 130, 246, 0.08) 0%, #030712 100%)"},children:[$.jsx(Gn,{ref:c,width:l.width,height:l.height,graphData:d,backgroundColor:"rgba(0,0,0,0)",cooldownTicks:120,enablePointerInteraction:!1,enableNodeDrag:!1,onRenderFramePre:j,linkVisibility:_,linkColor:w,linkWidth:A,linkDirectionalParticles:T,linkDirectionalParticleWidth:2.2,linkDirectionalParticleSpeed:.006,nodeCanvasObject:E}),$.jsxs("button",{onClick:M,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:[$.jsx(go,{className:"h-3.5 w-3.5"})," Zentrieren"]}),$.jsxs("div",{className:"absolute left-3 bottom-3 flex flex-wrap items-center gap-x-3 gap-y-1.5 rounded-lg bg-background/40 px-2.5 py-1.5 backdrop-blur-sm",children:[Object.entries(Xr).map(([C,O])=>$.jsxs("span",{className:"flex items-center gap-1 text-[10px] text-muted-foreground",children:[$.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:Br[C]}}),O]},C)),$.jsxs("label",{className:"flex items-center gap-1.5 text-[10px] text-muted-foreground border-l border-border/40 pl-3",children:[$.jsx("span",{children:"Verbindungen"}),$.jsx("span",{className:"text-[9px] text-muted-foreground/60",children:"alle"}),$.jsx("input",{type:"range",min:.45,max:.95,step:.05,value:a,onChange:C=>s(Number(C.target.value)),className:"w-20 accent-primary cursor-pointer",title:"Nur Verbindungen ab dieser Stärke zeigen"}),$.jsx("span",{className:"text-[9px] text-muted-foreground/60",children:"stark"}),$.jsx("span",{className:"font-mono text-[9px] text-muted-foreground/80 min-w-[3ch] text-right",children:k})]})]})]})}class Kh extends W.Component{constructor(){super(...arguments);Bn(this,"state",{error:null})}static getDerivedStateFromError(r){return{error:r}}render(){return this.state.error?$.jsxs("div",{className:"h-[480px] rounded-2xl border border-red-500/20 bg-red-500/5 p-6 text-xs text-red-400 overflow-auto",children:[$.jsx("div",{className:"font-semibold mb-2",children:"Graph konnte nicht gerendert werden"}),$.jsx("pre",{className:"whitespace-pre-wrap break-words text-[11px] leading-relaxed",children:this.state.error.message})]}):this.props.children}}const Qh={"":"Allgemein",traeume:"Träume",muster:"Muster","skill-kandidaten":"Skill-Kandidaten","skill-kandidaten/beauftragt":"Skill-Kandidaten · beauftragt","skill-kandidaten/verworfen":"Skill-Kandidaten · verworfen"};function ad(){const{data:e,isLoading:n}=oo(),[r,i]=W.useState(null),[o,a]=W.useState(null),[s,u]=W.useState(!1),c=ao(),{suche:l=""}=so({from:"/wissen"}),f=l,h=_=>c({to:"/wissen",search:w=>({...w,suche:_||void 0}),replace:!0}),[d,p]=W.useState(!1),{data:y,isLoading:m}=uo(d),v=W.useMemo(()=>(e==null?void 0:e.files)??[],[e]),g=W.useMemo(()=>{const _=new Map;for(const w of v)_.set(w.name.toLowerCase(),w.path);return _},[v]),k=W.useMemo(()=>{if(!f.trim())return v;const _=f.toLowerCase();return v.filter(w=>w.title.toLowerCase().includes(_)||w.path.toLowerCase().includes(_))},[v,f]),M=W.useMemo(()=>{const _=[];for(const w of k){const A=_.find(T=>T.dir===w.dir);A?A.files.push(w):_.push({dir:w.dir,files:[w]})}return _.sort((w,A)=>w.dir===""?-1:A.dir===""?1:w.dir.localeCompare(A.dir))},[k]);W.useEffect(()=>{if(!r&&v.length){const _=v.find(w=>w.path.toLowerCase()==="index.md");i((_==null?void 0:_.path)??v[0].path)}},[v,r]),W.useEffect(()=>{r&&(u(!0),lo(`/api/wissen/datei?pfad=${encodeURIComponent(r)}`).then(a).catch(()=>a({path:r,content:"*(Notiz nicht ladbar)*",mtime:0})).finally(()=>u(!1)))},[r]);const b=_=>{const w=g.get(_.toLowerCase());w&&i(w)};return $.jsxs("div",{className:"space-y-5",children:[$.jsxs("div",{className:"flex items-center justify-between",children:[$.jsxs("div",{children:[$.jsx("h1",{className:"bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text font-space text-2xl font-bold tracking-tight text-transparent",children:"Wissen"}),$.jsx("p",{className:"text-sm text-muted-foreground",children:"Was sich die Box nachts erschließt — Traum-Notizen, Muster und Skill-Ideen aus dem Wissens-Vault, verlinkt wie ein Wiki."})]}),v.length>0&&$.jsxs("div",{className:"flex rounded-lg border border-border/60 bg-card p-1",children:[$.jsx("button",{onClick:()=>p(!1),className:Ae("rounded-md px-3 py-1.5 text-xs font-medium transition-colors",d?"text-muted-foreground hover:bg-muted":"bg-primary text-primary-foreground shadow"),children:"Liste"}),$.jsx("button",{onClick:()=>p(!0),className:Ae("rounded-md px-3 py-1.5 text-xs font-medium transition-colors",d?"bg-primary text-primary-foreground shadow":"text-muted-foreground hover:bg-muted"),children:"Graph"})]})]}),e&&!e.available&&$.jsx("div",{className:"rounded-2xl border border-amber-500/30 bg-amber-500/5 p-4 text-xs text-amber-300",children:"Der Wissens-Vault liegt auf der Box (~/wissens-vault) — im lokalen Dev-Modus nicht verfügbar."}),n&&$.jsxs("div",{className:"flex items-center gap-2 rounded-2xl border border-border/60 bg-card/30 p-6 text-xs text-muted-foreground",children:[$.jsx(Ke,{className:"h-4 w-4 animate-spin"})," Vault wird geladen …"]}),(e==null?void 0:e.available)&&v.length===0&&$.jsx("div",{className:"rounded-2xl border border-dashed border-border/60 bg-card/20 p-8 text-center text-xs text-muted-foreground",children:"Noch keine Notizen. Der nächtliche Traum (03:15) legt sie an — morgen früh steht hier die erste."}),d?$.jsxs("div",{className:"mc-card flex h-[70vh] flex-col overflow-hidden p-0 relative",children:[m&&$.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-background/50 z-10",children:$.jsxs("div",{className:"flex items-center gap-2 rounded-2xl border border-border/60 bg-card p-6 text-xs text-muted-foreground",children:[$.jsx(Ke,{className:"h-4 w-4 animate-spin"})," Graph wird berechnet …"]})}),$.jsx(Kh,{children:y&&$.jsx(Zh,{data:y,selectedNodeId:r,onNodeSelect:_=>{_&&(i(_),p(!1))}})})]}):v.length>0&&$.jsxs("div",{className:"flex flex-col gap-4 lg:flex-row",children:[$.jsxs("aside",{className:"w-full shrink-0 space-y-3 lg:w-72",children:[$.jsxs("div",{className:"relative",children:[$.jsx("input",{value:f,onChange:_=>h(_.target.value),type:"search",placeholder:"Notizen durchsuchen…","aria-label":"Notizen durchsuchen",className:"h-9 w-full rounded-lg border border-border/60 bg-card/45 pl-8 pr-3 text-xs text-foreground outline-none focus:ring-1 focus:ring-primary/50"}),$.jsx(yo,{className:"absolute left-2.5 top-2.5 h-3.5 w-3.5 text-muted-foreground"})]}),$.jsx("div",{className:"max-h-[70vh] space-y-3 overflow-y-auto pr-1 scrollbar-thin",children:M.map(({dir:_,files:w})=>$.jsxs("div",{children:[$.jsxs("p",{className:"mb-1 flex items-center gap-1 text-[10px] font-bold uppercase tracking-wider text-muted-foreground/60",children:[$.jsx(vo,{className:"h-3 w-3"})," ",Qh[_]??_]}),$.jsx("div",{className:"space-y-0.5",children:w.map(A=>$.jsxs("button",{onClick:()=>i(A.path),className:Ae("flex w-full items-center gap-1.5 rounded-lg px-2 py-1.5 text-left text-xs transition-all cursor-pointer",r===A.path?"bg-primary/15 text-primary":"text-muted-foreground hover:bg-accent hover:text-foreground"),children:[$.jsx(_o,{className:"h-3.5 w-3.5 shrink-0"}),$.jsx("span",{className:"truncate",title:A.title,children:A.name}),A.neu&&$.jsxs("span",{className:"ml-auto flex items-center gap-0.5 rounded bg-violet-500/15 px-1 py-0.5 text-[8px] font-bold uppercase text-violet-300",children:[$.jsx(co,{className:"h-2.5 w-2.5"}),"neu"]})]},A.path))})]},_||"__root"))})]}),$.jsx("div",{className:"min-w-0 flex-1 mc-card p-5",children:s?$.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[$.jsx(Ke,{className:"h-4 w-4 animate-spin"})," Notiz wird geladen …"]}):o?$.jsxs($.Fragment,{children:[$.jsxs("div",{className:"mb-3 flex items-center justify-between border-b border-border/40 pb-2",children:[$.jsxs("span",{className:"flex items-center gap-1.5 font-mono text-[11px] text-muted-foreground",children:[$.jsx(fo,{className:"h-3.5 w-3.5"})," ",o.path]}),o.mtime>0&&$.jsxs("span",{className:"text-[10px] text-muted-foreground/60",children:["Stand ",new Date(o.mtime*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit"})]})]}),$.jsx(Jh,{text:o.content,onWikiLink:b,known:g})]}):null})]})]})}function Jh({text:e,onWikiLink:n,known:r}){const i=e.split(`
|
|
`),o=[];let a=[],s=null;const u=c=>{a.length&&(o.push($.jsx("ul",{className:"mb-3 ml-4 list-disc space-y-1",children:a},c)),a=[])};return i.forEach((c,l)=>{const f=`l${l}`;if(s!==null){c.trimEnd()==="```"?(o.push($.jsx("pre",{className:"mb-3 overflow-x-auto rounded-xl border border-border/50 bg-background/50 p-3 font-mono text-[11px] leading-relaxed text-foreground/85",children:s.join(`
|
|
`)},f)),s=null):s.push(c);return}if(c.trimStart().startsWith("```")){u(f),s=[];return}const h=c.trimEnd();if(!h.trim()){u(f);return}const d=h.match(/^(#{1,4})\s+(.*)$/);if(d){u(f);const y=d[1].length,m=y===1?"text-lg font-bold mt-1 mb-3":y===2?"text-base font-bold mt-4 mb-2":"text-sm font-bold mt-3 mb-1.5";o.push($.jsx("p",{className:Ae(m,"font-space text-foreground"),children:cn(d[2],n,r,f)},f));return}const p=h.match(/^\s*[-*•]\s+(.*)$/);if(p){a.push($.jsx("li",{className:"text-xs leading-relaxed text-foreground/85",children:cn(p[1],n,r,f)},f));return}u(f),o.push($.jsx("p",{className:"mb-2 text-xs leading-relaxed text-foreground/85",children:cn(h,n,r,f)},f))}),u("end"),s!==null&&o.push($.jsx("pre",{className:"mb-3 overflow-x-auto rounded-xl border border-border/50 bg-background/50 p-3 font-mono text-[11px]",children:s.join(`
|
|
`)},"code-end")),$.jsx("div",{className:"max-w-3xl",children:o})}function cn(e,n,r,i){return e.split(/(\[\[[^\]]+\]\]|\*\*[^*]+\*\*|\*[^*]+\*|`[^`]+`)/g).map((a,s)=>{const u=`${i}-${s}`,c=a.match(/^\[\[([^\]|]+)(?:\|([^\]]+))?\]\]$/);if(c){const l=c[1].trim(),f=(c[2]??c[1]).trim();return r.has(l.toLowerCase())?$.jsx("button",{onClick:()=>n(l),className:"rounded bg-primary/10 px-1 text-primary underline decoration-primary/40 underline-offset-2 hover:bg-primary/20 cursor-pointer",children:f},u):$.jsx("span",{className:"rounded bg-background/40 px-1 text-muted-foreground",title:"Notiz existiert (noch) nicht",children:f},u)}return a.startsWith("**")&&a.endsWith("**")?$.jsx("b",{className:"font-semibold text-foreground",children:a.slice(2,-2)},u):a.startsWith("*")&&a.endsWith("*")&&a.length>2?$.jsx("i",{children:a.slice(1,-1)},u):a.startsWith("`")&&a.endsWith("`")?$.jsx("code",{className:"rounded bg-background/50 px-1 font-mono text-[11px] text-teal-300",children:a.slice(1,-1)},u):$.jsx("span",{children:a},u)})}export{ad as WissenView};
|