Files
mission-control-v2/frontend/dist/assets/GraphView-JdSE2NmA.js
T
Hitonabi cb649aac34
Ampel / ampel (push) Successful in 24s
Ideen 2.0: schreiben zuerst, die Box waehlt vor
Die Seite verlangte eine technische Weichenstellung, BEVOR man gesagt hat was man
will — mit Begriffen aus dem Maschinenraum (BOX / IDE: SIMPEL / IDE: GRUENDLICH).
Deshalb klebten 116 Woerter Beipackzettel unter einem einzigen Eingabefeld.

Zwei unabhaengige Entscheidungen, vorher in vier sich ausschliessende Knoepfe gepresst:
  wer       — die Box allein, oder ein Repo fuer Zed
  nurDenken — erst nur ein Konzept (passt zu beidem, jetzt ein Haken)
Die Knoepfe nennen das ERGEBNIS statt des Werkzeugs, und der erklaerende Satz steht
an der Option statt in einer Legende darunter.

Neu: POST /api/ideen/einordnen — das dauerwarme Hirn liest den getippten Text und
waehlt vor (gemessen ~500 ms, 5 von 5 Testfaellen richtig, inkl. "Lohnt sich...?"
-> nur denken). Bewusst ein VORSCHLAG mit sichtbarem Etikett: er setzt nur die
Auswahl, die ohnehin dasteht. Faellt er aus, bleibt schlicht die Voreinstellung —
das Tippen wird nie blockiert, es gibt keinen Ladebalken und keine Fehlermeldung.

Tiefe und Ziel erscheinen nur noch beim Repo-Weg, weil sie nur dort wirken. Ein
Schalter der nichts tut ist schlimmer als keiner.

Leerer Zustand zeigt drei anklickbare Beispiele statt "wirf der Box eine Idee zu".
Kopfzeile nennt nur noch den Zustand — "Ideen" stand dreimal uebereinander.

Die API bleibt unveraendert; die Abbildung passiert in submit().

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-25 23:58:51 +02:00

45 lines
183 KiB
JavaScript

import{at as Lt,r as V,au as Zi,av as Gn,aw as Vn,ax as Ki,ay as Qi,az as Wn,aA as Bn,aB as Ji,j as lt,a3 as to}from"./index-DI19YZ2i.js";function eo(e,n){let r=0;for(let i of e)(i=+i)&&(r+=i);return r}var Xn=180/Math.PI,un={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Vr(e,n,r,i,o,a){var s,u,f;return(s=Math.sqrt(e*e+n*n))&&(e/=s,n/=s),(f=e*r+n*i)&&(r-=e*f,i-=n*f),(u=Math.sqrt(r*r+i*i))&&(r/=u,i/=u,f/=u),e*i<n*r&&(e=-e,n=-n,f=-f,s=-s),{translateX:o,translateY:a,rotate:Math.atan2(n,e)*Xn,skewX:Math.atan(f)*Xn,scaleX:s,scaleY:u}}var be;function no(e){const n=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return n.isIdentity?un:Vr(n.a,n.b,n.c,n.d,n.e,n.f)}function ro(e){return e==null||(be||(be=document.createElementNS("http://www.w3.org/2000/svg","g")),be.setAttribute("transform",e),!(e=be.transform.baseVal.consolidate()))?un:(e=e.matrix,Vr(e.a,e.b,e.c,e.d,e.e,e.f))}function Wr(e,n,r,i){function o(l){return l.length?l.pop()+" ":""}function a(l,c,h,d,p,y){if(l!==h||c!==d){var v=p.push("translate(",null,n,null,r);y.push({i:v-4,x:Lt(l,h)},{i:v-2,x:Lt(c,d)})}else(h||d)&&p.push("translate("+h+n+d+r)}function s(l,c,h,d){l!==c?(l-c>180?c+=360:c-l>180&&(l+=360),d.push({i:h.push(o(h)+"rotate(",null,i)-2,x:Lt(l,c)})):c&&h.push(o(h)+"rotate("+c+i)}function u(l,c,h,d){l!==c?d.push({i:h.push(o(h)+"skewX(",null,i)-2,x:Lt(l,c)}):c&&h.push(o(h)+"skewX("+c+i)}function f(l,c,h,d,p,y){if(l!==h||c!==d){var v=p.push(o(p)+"scale(",null,",",null,")");y.push({i:v-4,x:Lt(l,h)},{i:v-2,x:Lt(c,d)})}else(h!==1||d!==1)&&p.push(o(p)+"scale("+h+","+d+")")}return function(l,c){var h=[],d=[];return l=e(l),c=e(c),a(l.translateX,l.translateY,c.translateX,c.translateY,h,d),s(l.rotate,c.rotate,h,d),u(l.skewX,c.skewX,h,d),f(l.scaleX,l.scaleY,c.scaleX,c.scaleY,h,d),l=c=null,function(p){for(var y=-1,v=d.length,_;++y<v;)h[(_=d[y]).i]=_.x(p);return h.join("")}}}var io=Wr(no,"px, ","px)","deg)"),oo=Wr(ro,", ",")",")"),ao=1e-12;function Yn(e){return((e=Math.exp(e))+1/e)/2}function so(e){return((e=Math.exp(e))-1/e)/2}function uo(e){return((e=Math.exp(2*e))-1)/(e+1)}const lo=(function e(n,r,i){function o(a,s){var u=a[0],f=a[1],l=a[2],c=s[0],h=s[1],d=s[2],p=c-u,y=h-f,v=p*p+y*y,_,g;if(v<ao)g=Math.log(d/l)/n,_=function(S){return[u+S*p,f+S*y,l*Math.exp(n*S*g)]};else{var w=Math.sqrt(v),T=(d*d-l*l+i*v)/(2*l*r*w),x=(d*d-l*l-i*v)/(2*d*r*w),b=Math.log(Math.sqrt(T*T+1)-T),C=Math.log(Math.sqrt(x*x+1)-x);g=(C-b)/n,_=function(S){var M=S*g,N=Yn(b),P=l/(r*w)*(N*uo(n*M+b)-so(b));return[u+P*p,f+P*y,l*N/Yn(n*M+b)]}}return _.duration=g*1e3*n/Math.SQRT2,_}return o.rho=function(a){var s=Math.max(.001,+a),u=s*s,f=u*u;return e(s,u,f)},o})(Math.SQRT2,2,4);function fo(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,a,s,u=[],f=!0,l=!1;try{if(a=(r=r.call(e)).next,n===0){if(Object(r)!==r)return;f=!1}else for(;!(f=(i=a.call(r)).done)&&(u.push(i.value),u.length!==n);f=!0);}catch(c){l=!0,o=c}finally{try{if(!f&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(l)throw o}}return u}}function co(e,n,r){return n=bo(n),n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function Zn(e,n){return go(e)||fo(e,n)||Br(e,n)||vo()}function ho(e){return po(e)||yo(e)||Br(e)||_o()}function po(e){if(Array.isArray(e))return ln(e)}function go(e){if(Array.isArray(e))return e}function yo(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Br(e,n){if(e){if(typeof e=="string")return ln(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 ln(e,n)}}function ln(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 _o(){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 vo(){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 mo(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 bo(e){var n=mo(e,"string");return typeof n=="symbol"?n:String(n)}var xo=function(n,r){var i=new Set(r);return Object.assign.apply(Object,[{}].concat(ho(Object.entries(n).filter(function(o){var a=Zn(o,1),s=a[0];return!i.has(s)}).map(function(o){var a=Zn(o,2),s=a[0],u=a[1];return co({},s,u)}))))};function wo(e,{wrapperElementType:n="div",nodeMapper:r=a=>a,methodNames:i=[],initPropNames:o=[]}={}){return V.forwardRef((a,s)=>{const u=V.useRef(),f=V.useMemo(()=>{const h=Object.fromEntries(o.filter(d=>a.hasOwnProperty(d)).map(d=>[d,a[d]]));return e(h)},[]);Kn(()=>{f(r(u.current))},V.useLayoutEffect),Kn(()=>f._destructor instanceof Function?f._destructor:void 0);const l=V.useCallback((h,...d)=>f[h]instanceof Function?f[h](...d):void 0,[f]),c=V.useRef({});return Object.keys(xo(a,[...i,...o])).filter(h=>c.current[h]!==a[h]).forEach(h=>l(h,a[h])),c.current=a,V.useImperativeHandle(s,()=>Object.fromEntries(i.map(h=>[h,(...d)=>l(h,...d)])),[l]),Zi.createElement(n,{ref:u})})}function Kn(e,n=V.useEffect){const r=V.useRef(),i=V.useRef(!1),o=V.useRef(!1),[a,s]=V.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 fn="http://www.w3.org/1999/xhtml";const Qn={svg:"http://www.w3.org/2000/svg",xhtml:fn,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function qe(e){var n=e+="",r=n.indexOf(":");return r>=0&&(n=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Qn.hasOwnProperty(n)?{space:Qn[n],local:e}:e}function ko(e){return function(){var n=this.ownerDocument,r=this.namespaceURI;return r===fn&&n.documentElement.namespaceURI===fn?n.createElement(e):n.createElementNS(r,e)}}function Co(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Xr(e){var n=qe(e);return(n.local?Co:ko)(n)}function Ao(){}function An(e){return e==null?Ao:function(){return this.querySelector(e)}}function So(e){typeof e!="function"&&(e=An(e));for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o)for(var a=n[o],s=a.length,u=i[o]=new Array(s),f,l,c=0;c<s;++c)(f=a[c])&&(l=e.call(f,f.__data__,c,a))&&("__data__"in f&&(l.__data__=f.__data__),u[c]=l);return new ct(i,this._parents)}function To(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Mo(){return[]}function Yr(e){return e==null?Mo:function(){return this.querySelectorAll(e)}}function Po(e){return function(){return To(e.apply(this,arguments))}}function Oo(e){typeof e=="function"?e=Po(e):e=Yr(e);for(var n=this._groups,r=n.length,i=[],o=[],a=0;a<r;++a)for(var s=n[a],u=s.length,f,l=0;l<u;++l)(f=s[l])&&(i.push(e.call(f,f.__data__,l,s)),o.push(f));return new ct(i,o)}function Zr(e){return function(){return this.matches(e)}}function Kr(e){return function(n){return n.matches(e)}}var Eo=Array.prototype.find;function zo(e){return function(){return Eo.call(this.children,e)}}function Ro(){return this.firstElementChild}function No(e){return this.select(e==null?Ro:zo(typeof e=="function"?e:Kr(e)))}var Io=Array.prototype.filter;function Do(){return Array.from(this.children)}function jo(e){return function(){return Io.call(this.children,e)}}function $o(e){return this.selectAll(e==null?Do:jo(typeof e=="function"?e:Kr(e)))}function Fo(e){typeof e!="function"&&(e=Zr(e));for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o)for(var a=n[o],s=a.length,u=i[o]=[],f,l=0;l<s;++l)(f=a[l])&&e.call(f,f.__data__,l,a)&&u.push(f);return new ct(i,this._parents)}function Qr(e){return new Array(e.length)}function Lo(){return new ct(this._enter||this._groups.map(Qr),this._parents)}function Ee(e,n){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=n}Ee.prototype={constructor:Ee,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 Uo(e){return function(){return e}}function Ho(e,n,r,i,o,a){for(var s=0,u,f=n.length,l=a.length;s<l;++s)(u=n[s])?(u.__data__=a[s],i[s]=u):r[s]=new Ee(e,a[s]);for(;s<f;++s)(u=n[s])&&(o[s]=u)}function qo(e,n,r,i,o,a,s){var u,f,l=new Map,c=n.length,h=a.length,d=new Array(c),p;for(u=0;u<c;++u)(f=n[u])&&(d[u]=p=s.call(f,f.__data__,u,n)+"",l.has(p)?o[u]=f:l.set(p,f));for(u=0;u<h;++u)p=s.call(e,a[u],u,a)+"",(f=l.get(p))?(i[u]=f,f.__data__=a[u],l.delete(p)):r[u]=new Ee(e,a[u]);for(u=0;u<c;++u)(f=n[u])&&l.get(d[u])===f&&(o[u]=f)}function Go(e){return e.__data__}function Vo(e,n){if(!arguments.length)return Array.from(this,Go);var r=n?qo:Ho,i=this._parents,o=this._groups;typeof e!="function"&&(e=Uo(e));for(var a=o.length,s=new Array(a),u=new Array(a),f=new Array(a),l=0;l<a;++l){var c=i[l],h=o[l],d=h.length,p=Wo(e.call(c,c&&c.__data__,l,i)),y=p.length,v=u[l]=new Array(y),_=s[l]=new Array(y),g=f[l]=new Array(d);r(c,h,v,_,g,p,n);for(var w=0,T=0,x,b;w<y;++w)if(x=v[w]){for(w>=T&&(T=w+1);!(b=_[T])&&++T<y;);x._next=b||null}}return s=new ct(s,i),s._enter=u,s._exit=f,s}function Wo(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Bo(){return new ct(this._exit||this._groups.map(Qr),this._parents)}function Xo(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 Yo(e){for(var n=e.selection?e.selection():e,r=this._groups,i=n._groups,o=r.length,a=i.length,s=Math.min(o,a),u=new Array(o),f=0;f<s;++f)for(var l=r[f],c=i[f],h=l.length,d=u[f]=new Array(h),p,y=0;y<h;++y)(p=l[y]||c[y])&&(d[y]=p);for(;f<o;++f)u[f]=r[f];return new ct(u,this._parents)}function Zo(){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 Ko(e){e||(e=Qo);function n(h,d){return h&&d?e(h.__data__,d.__data__):!h-!d}for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a){for(var s=r[a],u=s.length,f=o[a]=new Array(u),l,c=0;c<u;++c)(l=s[c])&&(f[c]=l);f.sort(n)}return new ct(o,this._parents).order()}function Qo(e,n){return e<n?-1:e>n?1:e>=n?0:NaN}function Jo(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function ta(){return Array.from(this)}function ea(){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 na(){let e=0;for(const n of this)++e;return e}function ra(){return!this.node()}function ia(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 oa(e){return function(){this.removeAttribute(e)}}function aa(e){return function(){this.removeAttributeNS(e.space,e.local)}}function sa(e,n){return function(){this.setAttribute(e,n)}}function ua(e,n){return function(){this.setAttributeNS(e.space,e.local,n)}}function la(e,n){return function(){var r=n.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function fa(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 ca(e,n){var r=qe(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?aa:oa:typeof n=="function"?r.local?fa:la:r.local?ua:sa)(r,n))}function Jr(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function ha(e){return function(){this.style.removeProperty(e)}}function da(e,n,r){return function(){this.style.setProperty(e,n,r)}}function pa(e,n,r){return function(){var i=n.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function ga(e,n,r){return arguments.length>1?this.each((n==null?ha:typeof n=="function"?pa:da)(e,n,r??"")):Bt(this.node(),e)}function Bt(e,n){return e.style.getPropertyValue(n)||Jr(e).getComputedStyle(e,null).getPropertyValue(n)}function ya(e){return function(){delete this[e]}}function _a(e,n){return function(){this[e]=n}}function va(e,n){return function(){var r=n.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function ma(e,n){return arguments.length>1?this.each((n==null?ya:typeof n=="function"?va:_a)(e,n)):this.node()[e]}function ti(e){return e.trim().split(/^|\s+/)}function Sn(e){return e.classList||new ei(e)}function ei(e){this._node=e,this._names=ti(e.getAttribute("class")||"")}ei.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 ni(e,n){for(var r=Sn(e),i=-1,o=n.length;++i<o;)r.add(n[i])}function ri(e,n){for(var r=Sn(e),i=-1,o=n.length;++i<o;)r.remove(n[i])}function ba(e){return function(){ni(this,e)}}function xa(e){return function(){ri(this,e)}}function wa(e,n){return function(){(n.apply(this,arguments)?ni:ri)(this,e)}}function ka(e,n){var r=ti(e+"");if(arguments.length<2){for(var i=Sn(this.node()),o=-1,a=r.length;++o<a;)if(!i.contains(r[o]))return!1;return!0}return this.each((typeof n=="function"?wa:n?ba:xa)(r,n))}function Ca(){this.textContent=""}function Aa(e){return function(){this.textContent=e}}function Sa(e){return function(){var n=e.apply(this,arguments);this.textContent=n??""}}function Ta(e){return arguments.length?this.each(e==null?Ca:(typeof e=="function"?Sa:Aa)(e)):this.node().textContent}function Ma(){this.innerHTML=""}function Pa(e){return function(){this.innerHTML=e}}function Oa(e){return function(){var n=e.apply(this,arguments);this.innerHTML=n??""}}function Ea(e){return arguments.length?this.each(e==null?Ma:(typeof e=="function"?Oa:Pa)(e)):this.node().innerHTML}function za(){this.nextSibling&&this.parentNode.appendChild(this)}function Ra(){return this.each(za)}function Na(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ia(){return this.each(Na)}function Da(e){var n=typeof e=="function"?e:Xr(e);return this.select(function(){return this.appendChild(n.apply(this,arguments))})}function ja(){return null}function $a(e,n){var r=typeof e=="function"?e:Xr(e),i=n==null?ja:typeof n=="function"?n:An(n);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function Fa(){var e=this.parentNode;e&&e.removeChild(this)}function La(){return this.each(Fa)}function Ua(){var e=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(e,this.nextSibling):e}function Ha(){var e=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(e,this.nextSibling):e}function qa(e){return this.select(e?Ha:Ua)}function Ga(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Va(e){return function(n){e.call(this,n,this.__data__)}}function Wa(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 Ba(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 Xa(e,n,r){return function(){var i=this.__on,o,a=Va(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 Ya(e,n,r){var i=Wa(e+""),o,a=i.length,s;if(arguments.length<2){var u=this.node().__on;if(u){for(var f=0,l=u.length,c;f<l;++f)for(o=0,c=u[f];o<a;++o)if((s=i[o]).type===c.type&&s.name===c.name)return c.value}return}for(u=n?Xa:Ba,o=0;o<a;++o)this.each(u(i[o],n,r));return this}function ii(e,n,r){var i=Jr(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 Za(e,n){return function(){return ii(this,e,n)}}function Ka(e,n){return function(){return ii(this,e,n.apply(this,arguments))}}function Qa(e,n){return this.each((typeof n=="function"?Ka:Za)(e,n))}function*Ja(){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 oi=[null];function ct(e,n){this._groups=e,this._parents=n}function _e(){return new ct([[document.documentElement]],oi)}function ts(){return this}ct.prototype=_e.prototype={constructor:ct,select:So,selectAll:Oo,selectChild:No,selectChildren:$o,filter:Fo,data:Vo,enter:Lo,exit:Bo,join:Xo,merge:Yo,selection:ts,order:Zo,sort:Ko,call:Jo,nodes:ta,node:ea,size:na,empty:ra,each:ia,attr:ca,style:ga,property:ma,classed:ka,text:Ta,html:Ea,raise:Ra,lower:Ia,append:Da,insert:$a,remove:La,clone:qa,datum:Ga,on:Ya,dispatch:Qa,[Symbol.iterator]:Ja};function pt(e){return typeof e=="string"?new ct([[document.querySelector(e)]],[document.documentElement]):new ct([[e]],oi)}function es(e){let n;for(;n=e.sourceEvent;)e=n;return e}function bt(e,n){if(e=es(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 ns={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 Ae(r)}function Ae(e){this._=e}function rs(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}})}Ae.prototype=ve.prototype={constructor:Ae,on:function(e,n){var r=this._,i=rs(e+"",r),o,a=-1,s=i.length;if(arguments.length<2){for(;++a<s;)if((o=(e=i[a]).type)&&(o=is(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]=Jn(r[o],e.name,n);else if(n==null)for(o in r)r[o]=Jn(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 Ae(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 is(e,n){for(var r=0,i=e.length,o;r<i;++r)if((o=e[r]).name===n)return o.value}function Jn(e,n,r){for(var i=0,o=e.length;i<o;++i)if(e[i].name===n){e[i]=ns,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:n,value:r}),e}const os={passive:!1},pe={capture:!0,passive:!1};function Ze(e){e.stopImmediatePropagation()}function Wt(e){e.preventDefault(),e.stopImmediatePropagation()}function ai(e){var n=e.document.documentElement,r=pt(e).on("dragstart.drag",Wt,pe);"onselectstart"in n?r.on("selectstart.drag",Wt,pe):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")}function si(e,n){var r=e.document.documentElement,i=pt(e).on("dragstart.drag",null);n&&(i.on("click.drag",Wt,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 xe=e=>()=>e;function cn(e,{sourceEvent:n,subject:r,target:i,identifier:o,active:a,x:s,y:u,dx:f,dy:l,dispatch:c}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:u,enumerable:!0,configurable:!0},dx:{value:f,enumerable:!0,configurable:!0},dy:{value:l,enumerable:!0,configurable:!0},_:{value:c}})}cn.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function as(e){return!e.ctrlKey&&!e.button}function ss(){return this.parentNode}function us(e,n){return n??{x:e.x,y:e.y}}function ls(){return navigator.maxTouchPoints||"ontouchstart"in this}function fs(){var e=as,n=ss,r=us,i=ls,o={},a=ve("start","drag","end"),s=0,u,f,l,c,h=0;function d(x){x.on("mousedown.drag",p).filter(i).on("touchstart.drag",_).on("touchmove.drag",g,os).on("touchend.drag touchcancel.drag",w).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(x,b){if(!(c||!e.call(this,x,b))){var C=T(this,n.call(this,x,b),x,b,"mouse");C&&(pt(x.view).on("mousemove.drag",y,pe).on("mouseup.drag",v,pe),ai(x.view),Ze(x),l=!1,u=x.clientX,f=x.clientY,C("start",x))}}function y(x){if(Wt(x),!l){var b=x.clientX-u,C=x.clientY-f;l=b*b+C*C>h}o.mouse("drag",x)}function v(x){pt(x.view).on("mousemove.drag mouseup.drag",null),si(x.view,l),Wt(x),o.mouse("end",x)}function _(x,b){if(e.call(this,x,b)){var C=x.changedTouches,S=n.call(this,x,b),M=C.length,N,P;for(N=0;N<M;++N)(P=T(this,S,x,b,C[N].identifier,C[N]))&&(Ze(x),P("start",x,C[N]))}}function g(x){var b=x.changedTouches,C=b.length,S,M;for(S=0;S<C;++S)(M=o[b[S].identifier])&&(Wt(x),M("drag",x,b[S]))}function w(x){var b=x.changedTouches,C=b.length,S,M;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),S=0;S<C;++S)(M=o[b[S].identifier])&&(Ze(x),M("end",x,b[S]))}function T(x,b,C,S,M,N){var P=a.copy(),R=bt(N||C,b),D,L,A;if((A=r.call(x,new cn("beforestart",{sourceEvent:C,target:d,identifier:M,active:s,x:R[0],y:R[1],dx:0,dy:0,dispatch:P}),S))!=null)return D=A.x-R[0]||0,L=A.y-R[1]||0,function I(E,k,O){var j=R,$;switch(E){case"start":o[M]=I,$=s++;break;case"end":delete o[M],--s;case"drag":R=bt(O||k,b),$=s;break}P.call(E,x,new cn(E,{sourceEvent:k,subject:A,target:d,identifier:M,active:$,x:R[0]+D,y:R[1]+L,dx:R[0]-j[0],dy:R[1]-j[1],dispatch:P}),S)}}return d.filter=function(x){return arguments.length?(e=typeof x=="function"?x:xe(!!x),d):e},d.container=function(x){return arguments.length?(n=typeof x=="function"?x:xe(x),d):n},d.subject=function(x){return arguments.length?(r=typeof x=="function"?x:xe(x),d):r},d.touchable=function(x){return arguments.length?(i=typeof x=="function"?x:xe(!!x),d):i},d.on=function(){var x=a.on.apply(a,arguments);return x===a?d:x},d.clickDistance=function(x){return arguments.length?(h=(x=+x)*x,d):Math.sqrt(h)},d}var Xt=0,ae=0,Qt=0,ui=1e3,ze,se,Re=0,Ht=0,Ge=0,ge=typeof performance=="object"&&performance.now?performance:Date,li=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Tn(){return Ht||(li(cs),Ht=ge.now()+Ge)}function cs(){Ht=0}function Ne(){this._call=this._time=this._next=null}Ne.prototype=Mn.prototype={constructor:Ne,restart:function(e,n,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Tn():+r)+(n==null?0:+n),!this._next&&se!==this&&(se?se._next=this:ze=this,se=this),this._call=e,this._time=r,hn()},stop:function(){this._call&&(this._call=null,this._time=1/0,hn())}};function Mn(e,n,r){var i=new Ne;return i.restart(e,n,r),i}function hs(){Tn(),++Xt;for(var e=ze,n;e;)(n=Ht-e._time)>=0&&e._call.call(void 0,n),e=e._next;--Xt}function tr(){Ht=(Re=ge.now())+Ge,Xt=ae=0;try{hs()}finally{Xt=0,ps(),Ht=0}}function ds(){var e=ge.now(),n=e-Re;n>ui&&(Ge-=n,Re=e)}function ps(){for(var e,n=ze,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:ze=r);se=e,hn(i)}function hn(e){if(!Xt){ae&&(ae=clearTimeout(ae));var n=e-Ht;n>24?(e<1/0&&(ae=setTimeout(tr,e-ge.now()-Ge)),Qt&&(Qt=clearInterval(Qt))):(Qt||(Re=ge.now(),Qt=setInterval(ds,ui)),Xt=1,li(tr))}}function er(e,n,r){var i=new Ne;return n=n==null?0:+n,i.restart(o=>{i.stop(),e(o+n)},n,r),i}var gs=ve("start","end","cancel","interrupt"),ys=[],fi=0,nr=1,dn=2,Se=3,rr=4,pn=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;_s(e,r,{name:n,index:i,group:o,on:gs,tween:ys,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:fi})}function Pn(e,n){var r=vt(e,n);if(r.state>fi)throw new Error("too late; already scheduled");return r}function Ct(e,n){var r=vt(e,n);if(r.state>Se)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 _s(e,n,r){var i=e.__transition,o;i[n]=r,r.timer=Mn(a,0,r.time);function a(l){r.state=nr,r.timer.restart(s,r.delay,r.time),r.delay<=l&&s(l-r.delay)}function s(l){var c,h,d,p;if(r.state!==nr)return f();for(c in i)if(p=i[c],p.name===r.name){if(p.state===Se)return er(s);p.state===rr?(p.state=Te,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete i[c]):+c<n&&(p.state=Te,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete i[c])}if(er(function(){r.state===Se&&(r.state=rr,r.timer.restart(u,r.delay,r.time),u(l))}),r.state=dn,r.on.call("start",e,e.__data__,r.index,r.group),r.state===dn){for(r.state=Se,o=new Array(d=r.tween.length),c=0,h=-1;c<d;++c)(p=r.tween[c].value.call(e,e.__data__,r.index,r.group))&&(o[++h]=p);o.length=h+1}}function u(l){for(var c=l<r.duration?r.ease.call(null,l/r.duration):(r.timer.restart(f),r.state=pn,1),h=-1,d=o.length;++h<d;)o[h].call(e,c);r.state===pn&&(r.on.call("end",e,e.__data__,r.index,r.group),f())}function f(){r.state=Te,r.timer.stop(),delete i[n];for(var l in i)return;delete e.__transition}}function Me(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>dn&&i.state<pn,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 vs(e){return this.each(function(){Me(this,e)})}function ms(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 bs(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},f=0,l=o.length;f<l;++f)if(o[f].name===n){o[f]=u;break}f===l&&o.push(u)}a.tween=o}}function xs(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?ms:bs)(r,e,n))}function On(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 ci(e,n){var r;return(typeof n=="number"?Lt:n instanceof Gn?Vn:(r=Gn(n))?(n=r,Vn):Ki)(e,n)}function ws(e){return function(){this.removeAttribute(e)}}function ks(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Cs(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 As(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 Ss(e,n,r){var i,o,a;return function(){var s,u=r(this),f;return u==null?void this.removeAttribute(e):(s=this.getAttribute(e),f=u+"",s===f?null:s===i&&f===o?a:(o=f,a=n(i=s,u)))}}function Ts(e,n,r){var i,o,a;return function(){var s,u=r(this),f;return u==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),f=u+"",s===f?null:s===i&&f===o?a:(o=f,a=n(i=s,u)))}}function Ms(e,n){var r=qe(e),i=r==="transform"?oo:ci;return this.attrTween(e,typeof n=="function"?(r.local?Ts:Ss)(r,i,On(this,"attr."+e,n)):n==null?(r.local?ks:ws)(r):(r.local?As:Cs)(r,i,n))}function Ps(e,n){return function(r){this.setAttribute(e,n.call(this,r))}}function Os(e,n){return function(r){this.setAttributeNS(e.space,e.local,n.call(this,r))}}function Es(e,n){var r,i;function o(){var a=n.apply(this,arguments);return a!==i&&(r=(i=a)&&Os(e,a)),r}return o._value=n,o}function zs(e,n){var r,i;function o(){var a=n.apply(this,arguments);return a!==i&&(r=(i=a)&&Ps(e,a)),r}return o._value=n,o}function Rs(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=qe(e);return this.tween(r,(i.local?Es:zs)(i,n))}function Ns(e,n){return function(){Pn(this,e).delay=+n.apply(this,arguments)}}function Is(e,n){return n=+n,function(){Pn(this,e).delay=n}}function Ds(e){var n=this._id;return arguments.length?this.each((typeof e=="function"?Ns:Is)(n,e)):vt(this.node(),n).delay}function js(e,n){return function(){Ct(this,e).duration=+n.apply(this,arguments)}}function $s(e,n){return n=+n,function(){Ct(this,e).duration=n}}function Fs(e){var n=this._id;return arguments.length?this.each((typeof e=="function"?js:$s)(n,e)):vt(this.node(),n).duration}function Ls(e,n){if(typeof n!="function")throw new Error;return function(){Ct(this,e).ease=n}}function Us(e){var n=this._id;return arguments.length?this.each(Ls(n,e)):vt(this.node(),n).ease}function Hs(e,n){return function(){var r=n.apply(this,arguments);if(typeof r!="function")throw new Error;Ct(this,e).ease=r}}function qs(e){if(typeof e!="function")throw new Error;return this.each(Hs(this._id,e))}function Gs(e){typeof e!="function"&&(e=Zr(e));for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o)for(var a=n[o],s=a.length,u=i[o]=[],f,l=0;l<s;++l)(f=a[l])&&e.call(f,f.__data__,l,a)&&u.push(f);return new Nt(i,this._parents,this._name,this._id)}function Vs(e){if(e._id!==this._id)throw new Error;for(var n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),u=0;u<a;++u)for(var f=n[u],l=r[u],c=f.length,h=s[u]=new Array(c),d,p=0;p<c;++p)(d=f[p]||l[p])&&(h[p]=d);for(;u<i;++u)s[u]=n[u];return new Nt(s,this._parents,this._name,this._id)}function Ws(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 Bs(e,n,r){var i,o,a=Ws(n)?Pn:Ct;return function(){var s=a(this,e),u=s.on;u!==i&&(o=(i=u).copy()).on(n,r),s.on=o}}function Xs(e,n){var r=this._id;return arguments.length<2?vt(this.node(),r).on.on(e):this.each(Bs(r,e,n))}function Ys(e){return function(){var n=this.parentNode;for(var r in this.__transition)if(+r!==e)return;n&&n.removeChild(this)}}function Zs(){return this.on("end.remove",Ys(this._id))}function Ks(e){var n=this._name,r=this._id;typeof e!="function"&&(e=An(e));for(var i=this._groups,o=i.length,a=new Array(o),s=0;s<o;++s)for(var u=i[s],f=u.length,l=a[s]=new Array(f),c,h,d=0;d<f;++d)(c=u[d])&&(h=e.call(c,c.__data__,d,u))&&("__data__"in c&&(h.__data__=c.__data__),l[d]=h,Ve(l[d],n,r,d,l,vt(c,r)));return new Nt(a,this._parents,n,r)}function Qs(e){var n=this._name,r=this._id;typeof e!="function"&&(e=Yr(e));for(var i=this._groups,o=i.length,a=[],s=[],u=0;u<o;++u)for(var f=i[u],l=f.length,c,h=0;h<l;++h)if(c=f[h]){for(var d=e.call(c,c.__data__,h,f),p,y=vt(c,r),v=0,_=d.length;v<_;++v)(p=d[v])&&Ve(p,n,r,v,d,y);a.push(d),s.push(c)}return new Nt(a,s,n,r)}var Js=_e.prototype.constructor;function tu(){return new Js(this._groups,this._parents)}function eu(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 hi(e){return function(){this.style.removeProperty(e)}}function nu(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 ru(e,n,r){var i,o,a;return function(){var s=Bt(this,e),u=r(this),f=u+"";return u==null&&(f=u=(this.style.removeProperty(e),Bt(this,e))),s===f?null:s===i&&f===o?a:(o=f,a=n(i=s,u))}}function iu(e,n){var r,i,o,a="style."+n,s="end."+a,u;return function(){var f=Ct(this,e),l=f.on,c=f.value[a]==null?u||(u=hi(n)):void 0;(l!==r||o!==c)&&(i=(r=l).copy()).on(s,o=c),f.on=i}}function ou(e,n,r){var i=(e+="")=="transform"?io:ci;return n==null?this.styleTween(e,eu(e,i)).on("end.style."+e,hi(e)):typeof n=="function"?this.styleTween(e,ru(e,i,On(this,"style."+e,n))).each(iu(this._id,e)):this.styleTween(e,nu(e,i,n),r).on("end.style."+e,null)}function au(e,n,r){return function(i){this.style.setProperty(e,n.call(this,i),r)}}function su(e,n,r){var i,o;function a(){var s=n.apply(this,arguments);return s!==o&&(i=(o=s)&&au(e,s,r)),i}return a._value=n,a}function uu(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,su(e,n,r??""))}function lu(e){return function(){this.textContent=e}}function fu(e){return function(){var n=e(this);this.textContent=n??""}}function cu(e){return this.tween("text",typeof e=="function"?fu(On(this,"text",e)):lu(e==null?"":e+""))}function hu(e){return function(n){this.textContent=e.call(this,n)}}function du(e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&hu(o)),n}return i._value=e,i}function pu(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,du(e))}function gu(){for(var e=this._name,n=this._id,r=di(),i=this._groups,o=i.length,a=0;a<o;++a)for(var s=i[a],u=s.length,f,l=0;l<u;++l)if(f=s[l]){var c=vt(f,n);Ve(f,e,r,l,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Nt(i,this._parents,e,r)}function yu(){var e,n,r=this,i=r._id,o=r.size();return new Promise(function(a,s){var u={value:s},f={value:function(){--o===0&&a()}};r.each(function(){var l=Ct(this,i),c=l.on;c!==e&&(n=(e=c).copy(),n._.cancel.push(u),n._.interrupt.push(u),n._.end.push(f)),l.on=n}),o===0&&a()})}var _u=0;function Nt(e,n,r,i){this._groups=e,this._parents=n,this._name=r,this._id=i}function di(){return++_u}var St=_e.prototype;Nt.prototype={constructor:Nt,select:Ks,selectAll:Qs,selectChild:St.selectChild,selectChildren:St.selectChildren,filter:Gs,merge:Vs,selection:tu,transition:gu,call:St.call,nodes:St.nodes,node:St.node,size:St.size,empty:St.empty,each:St.each,on:Xs,attr:Ms,attrTween:Rs,style:ou,styleTween:uu,text:cu,textTween:pu,remove:Zs,tween:xs,delay:Ds,duration:Fs,ease:Us,easeVarying:qs,end:yu,[Symbol.iterator]:St[Symbol.iterator]};function vu(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var mu={time:null,delay:0,duration:250,ease:vu};function bu(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 xu(e){var n,r;e instanceof Nt?(n=e._id,e=e._name):(n=di(),(r=mu).time=Tn(),e=e==null?null:e+"");for(var i=this._groups,o=i.length,a=0;a<o;++a)for(var s=i[a],u=s.length,f,l=0;l<u;++l)(f=s[l])&&Ve(f,e,n,l,s,r||bu(f,n));return new Nt(i,this._parents,e,n)}_e.prototype.interrupt=vs;_e.prototype.transition=xu;const we=e=>()=>e;function wu(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 En=new Et(1,0,0);mt.prototype=Et.prototype;function mt(e){for(;!e.__zoom;)if(!(e=e.parentNode))return En;return e.__zoom}function Ke(e){e.stopImmediatePropagation()}function Jt(e){e.preventDefault(),e.stopImmediatePropagation()}function ku(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Cu(){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 ir(){return this.__zoom||En}function Au(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Su(){return navigator.maxTouchPoints||"ontouchstart"in this}function Tu(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 Mu(){var e=ku,n=Cu,r=Tu,i=Au,o=Su,a=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],u=250,f=lo,l=ve("start","zoom","end"),c,h,d,p=500,y=150,v=0,_=10;function g(A){A.property("__zoom",ir).on("wheel.zoom",M,{passive:!1}).on("mousedown.zoom",N).on("dblclick.zoom",P).filter(o).on("touchstart.zoom",R).on("touchmove.zoom",D).on("touchend.zoom touchcancel.zoom",L).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}g.transform=function(A,I,E,k){var O=A.selection?A.selection():A;O.property("__zoom",ir),A!==O?b(A,I,E,k):O.interrupt().each(function(){C(this,arguments).event(k).start().zoom(null,typeof I=="function"?I.apply(this,arguments):I).end()})},g.scaleBy=function(A,I,E,k){g.scaleTo(A,function(){var O=this.__zoom.k,j=typeof I=="function"?I.apply(this,arguments):I;return O*j},E,k)},g.scaleTo=function(A,I,E,k){g.transform(A,function(){var O=n.apply(this,arguments),j=this.__zoom,$=E==null?x(O):typeof E=="function"?E.apply(this,arguments):E,U=j.invert($),F=typeof I=="function"?I.apply(this,arguments):I;return r(T(w(j,F),$,U),O,s)},E,k)},g.translateBy=function(A,I,E,k){g.transform(A,function(){return r(this.__zoom.translate(typeof I=="function"?I.apply(this,arguments):I,typeof E=="function"?E.apply(this,arguments):E),n.apply(this,arguments),s)},null,k)},g.translateTo=function(A,I,E,k,O){g.transform(A,function(){var j=n.apply(this,arguments),$=this.__zoom,U=k==null?x(j):typeof k=="function"?k.apply(this,arguments):k;return r(En.translate(U[0],U[1]).scale($.k).translate(typeof I=="function"?-I.apply(this,arguments):-I,typeof E=="function"?-E.apply(this,arguments):-E),j,s)},k,O)};function w(A,I){return I=Math.max(a[0],Math.min(a[1],I)),I===A.k?A:new Et(I,A.x,A.y)}function T(A,I,E){var k=I[0]-E[0]*A.k,O=I[1]-E[1]*A.k;return k===A.x&&O===A.y?A:new Et(A.k,k,O)}function x(A){return[(+A[0][0]+ +A[1][0])/2,(+A[0][1]+ +A[1][1])/2]}function b(A,I,E,k){A.on("start.zoom",function(){C(this,arguments).event(k).start()}).on("interrupt.zoom end.zoom",function(){C(this,arguments).event(k).end()}).tween("zoom",function(){var O=this,j=arguments,$=C(O,j).event(k),U=n.apply(O,j),F=E==null?x(U):typeof E=="function"?E.apply(O,j):E,q=Math.max(U[1][0]-U[0][0],U[1][1]-U[0][1]),G=O.__zoom,B=typeof I=="function"?I.apply(O,j):I,J=f(G.invert(F).concat(q/G.k),B.invert(F).concat(q/B.k));return function(Y){if(Y===1)Y=B;else{var at=J(Y),tt=q/at[2];Y=new Et(tt,F[0]-at[0]*tt,F[1]-at[1]*tt)}$.zoom(null,Y)}})}function C(A,I,E){return!E&&A.__zooming||new S(A,I)}function S(A,I){this.that=A,this.args=I,this.active=0,this.sourceEvent=null,this.extent=n.apply(A,I),this.taps=0}S.prototype={event:function(A){return A&&(this.sourceEvent=A),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(A,I){return this.mouse&&A!=="mouse"&&(this.mouse[1]=I.invert(this.mouse[0])),this.touch0&&A!=="touch"&&(this.touch0[1]=I.invert(this.touch0[0])),this.touch1&&A!=="touch"&&(this.touch1[1]=I.invert(this.touch1[0])),this.that.__zoom=I,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(A){var I=pt(this.that).datum();l.call(A,this.that,new wu(A,{sourceEvent:this.sourceEvent,target:g,transform:this.that.__zoom,dispatch:l}),I)}};function M(A,...I){if(!e.apply(this,arguments))return;var E=C(this,I).event(A),k=this.__zoom,O=Math.max(a[0],Math.min(a[1],k.k*Math.pow(2,i.apply(this,arguments)))),j=bt(A);if(E.wheel)(E.mouse[0][0]!==j[0]||E.mouse[0][1]!==j[1])&&(E.mouse[1]=k.invert(E.mouse[0]=j)),clearTimeout(E.wheel);else{if(k.k===O)return;E.mouse=[j,k.invert(j)],Me(this),E.start()}Jt(A),E.wheel=setTimeout($,y),E.zoom("mouse",r(T(w(k,O),E.mouse[0],E.mouse[1]),E.extent,s));function $(){E.wheel=null,E.end()}}function N(A,...I){if(d||!e.apply(this,arguments))return;var E=A.currentTarget,k=C(this,I,!0).event(A),O=pt(A.view).on("mousemove.zoom",F,!0).on("mouseup.zoom",q,!0),j=bt(A,E),$=A.clientX,U=A.clientY;ai(A.view),Ke(A),k.mouse=[j,this.__zoom.invert(j)],Me(this),k.start();function F(G){if(Jt(G),!k.moved){var B=G.clientX-$,J=G.clientY-U;k.moved=B*B+J*J>v}k.event(G).zoom("mouse",r(T(k.that.__zoom,k.mouse[0]=bt(G,E),k.mouse[1]),k.extent,s))}function q(G){O.on("mousemove.zoom mouseup.zoom",null),si(G.view,k.moved),Jt(G),k.event(G).end()}}function P(A,...I){if(e.apply(this,arguments)){var E=this.__zoom,k=bt(A.changedTouches?A.changedTouches[0]:A,this),O=E.invert(k),j=E.k*(A.shiftKey?.5:2),$=r(T(w(E,j),k,O),n.apply(this,I),s);Jt(A),u>0?pt(this).transition().duration(u).call(b,$,k,A):pt(this).call(g.transform,$,k,A)}}function R(A,...I){if(e.apply(this,arguments)){var E=A.touches,k=E.length,O=C(this,I,A.changedTouches.length===k).event(A),j,$,U,F;for(Ke(A),$=0;$<k;++$)U=E[$],F=bt(U,this),F=[F,this.__zoom.invert(F),U.identifier],O.touch0?!O.touch1&&O.touch0[2]!==F[2]&&(O.touch1=F,O.taps=0):(O.touch0=F,j=!0,O.taps=1+!!c);c&&(c=clearTimeout(c)),j&&(O.taps<2&&(h=F[0],c=setTimeout(function(){c=null},p)),Me(this),O.start())}}function D(A,...I){if(this.__zooming){var E=C(this,I).event(A),k=A.changedTouches,O=k.length,j,$,U,F;for(Jt(A),j=0;j<O;++j)$=k[j],U=bt($,this),E.touch0&&E.touch0[2]===$.identifier?E.touch0[0]=U:E.touch1&&E.touch1[2]===$.identifier&&(E.touch1[0]=U);if($=E.that.__zoom,E.touch1){var q=E.touch0[0],G=E.touch0[1],B=E.touch1[0],J=E.touch1[1],Y=(Y=B[0]-q[0])*Y+(Y=B[1]-q[1])*Y,at=(at=J[0]-G[0])*at+(at=J[1]-G[1])*at;$=w($,Math.sqrt(Y/at)),U=[(q[0]+B[0])/2,(q[1]+B[1])/2],F=[(G[0]+J[0])/2,(G[1]+J[1])/2]}else if(E.touch0)U=E.touch0[0],F=E.touch0[1];else return;E.zoom("touch",r(T($,U,F),E.extent,s))}}function L(A,...I){if(this.__zooming){var E=C(this,I).event(A),k=A.changedTouches,O=k.length,j,$;for(Ke(A),d&&clearTimeout(d),d=setTimeout(function(){d=null},p),j=0;j<O;++j)$=k[j],E.touch0&&E.touch0[2]===$.identifier?delete E.touch0:E.touch1&&E.touch1[2]===$.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&&($=bt($,this),Math.hypot(h[0]-$[0],h[1]-$[1])<_)){var U=pt(this).on("dblclick.zoom");U&&U.apply(this,arguments)}}}return g.wheelDelta=function(A){return arguments.length?(i=typeof A=="function"?A:we(+A),g):i},g.filter=function(A){return arguments.length?(e=typeof A=="function"?A:we(!!A),g):e},g.touchable=function(A){return arguments.length?(o=typeof A=="function"?A:we(!!A),g):o},g.extent=function(A){return arguments.length?(n=typeof A=="function"?A:we([[+A[0][0],+A[0][1]],[+A[1][0],+A[1][1]]]),g):n},g.scaleExtent=function(A){return arguments.length?(a[0]=+A[0],a[1]=+A[1],g):[a[0],a[1]]},g.translateExtent=function(A){return arguments.length?(s[0][0]=+A[0][0],s[1][0]=+A[1][0],s[0][1]=+A[0][1],s[1][1]=+A[1][1],g):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},g.constrain=function(A){return arguments.length?(r=A,g):r},g.duration=function(A){return arguments.length?(u=+A,g):u},g.interpolate=function(A){return arguments.length?(f=A,g):f},g.on=function(){var A=l.on.apply(l,arguments);return A===l?g:A},g.clickDistance=function(A){return arguments.length?(v=(A=+A)*A,g):Math.sqrt(v)},g.tapDistance=function(A){return arguments.length?(_=+A,g):_},g}var Pu=typeof global=="object"&&global&&global.Object===Object&&global,Ou=typeof self=="object"&&self&&self.Object===Object&&self,pi=Pu||Ou||Function("return this")(),Ie=pi.Symbol,gi=Object.prototype,Eu=gi.hasOwnProperty,zu=gi.toString,te=Ie?Ie.toStringTag:void 0;function Ru(e){var n=Eu.call(e,te),r=e[te];try{e[te]=void 0;var i=!0}catch{}var o=zu.call(e);return i&&(n?e[te]=r:delete e[te]),o}var Nu=Object.prototype,Iu=Nu.toString;function Du(e){return Iu.call(e)}var ju="[object Null]",$u="[object Undefined]",or=Ie?Ie.toStringTag:void 0;function Fu(e){return e==null?e===void 0?$u:ju:or&&or in Object(e)?Ru(e):Du(e)}function Lu(e){return e!=null&&typeof e=="object"}var Uu="[object Symbol]";function Hu(e){return typeof e=="symbol"||Lu(e)&&Fu(e)==Uu}var qu=/\s/;function Gu(e){for(var n=e.length;n--&&qu.test(e.charAt(n)););return n}var Vu=/^\s+/;function Wu(e){return e&&e.slice(0,Gu(e)+1).replace(Vu,"")}function De(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}var ar=NaN,Bu=/^[-+]0x[0-9a-f]+$/i,Xu=/^0b[01]+$/i,Yu=/^0o[0-7]+$/i,Zu=parseInt;function sr(e){if(typeof e=="number")return e;if(Hu(e))return ar;if(De(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=De(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=Wu(e);var r=Xu.test(e);return r||Yu.test(e)?Zu(e.slice(2),r?2:8):Bu.test(e)?ar:+e}var Qe=function(){return pi.Date.now()},Ku="Expected a function",Qu=Math.max,Ju=Math.min;function yi(e,n,r){var i,o,a,s,u,f,l=0,c=!1,h=!1,d=!0;if(typeof e!="function")throw new TypeError(Ku);n=sr(n)||0,De(r)&&(c=!!r.leading,h="maxWait"in r,a=h?Qu(sr(r.maxWait)||0,n):a,d="trailing"in r?!!r.trailing:d);function p(C){var S=i,M=o;return i=o=void 0,l=C,s=e.apply(M,S),s}function y(C){return l=C,u=setTimeout(g,n),c?p(C):s}function v(C){var S=C-f,M=C-l,N=n-S;return h?Ju(N,a-M):N}function _(C){var S=C-f,M=C-l;return f===void 0||S>=n||S<0||h&&M>=a}function g(){var C=Qe();if(_(C))return w(C);u=setTimeout(g,v(C))}function w(C){return u=void 0,d&&i?p(C):(i=o=void 0,s)}function T(){u!==void 0&&clearTimeout(u),l=0,i=f=o=u=void 0}function x(){return u===void 0?s:w(Qe())}function b(){var C=Qe(),S=_(C);if(i=arguments,o=this,f=C,S){if(u===void 0)return y(f);if(h)return clearTimeout(u),u=setTimeout(g,n),p(f)}return u===void 0&&(u=setTimeout(g,n)),s}return b.cancel=T,b.flush=x,b}var tl="Expected a function";function el(e,n,r){var i=!0,o=!0;if(typeof e!="function")throw new TypeError(tl);return De(r)&&(i="leading"in r?!!r.leading:i,o="trailing"in r?!!r.trailing:o),yi(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()},_i=(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})(),gn={Linear:function(e,n){var r=e.length-1,i=r*n,o=Math.floor(i),a=gn.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}}},vi=(function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e})(),yn=new _i,ur=(function(){function e(n,r){r===void 0&&(r=yn),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=gn.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=vi.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],f=Array.isArray(u),l=f?"array":typeof u,c=!f&&Array.isArray(i[s]);if(!(l==="undefined"||l==="function")){if(c){var h=i[s];if(h.length===0)continue;for(var d=[u],p=0,y=h.length;p<y;p+=1){var v=this._handleRelativeValue(u,h[p]);if(isNaN(v)){c=!1,console.warn("Found invalid interpolation list. Skipping.");break}d.push(v)}c&&(i[s]=d)}if((l==="object"||f)&&u&&!c){r[s]=f?[]:{};var _=u;for(var g in _)r[s][g]=_[g];o[s]=f?[]:{};var h=i[s];if(!this._isDynamic){var w={};for(var g in h)w[g]=h[g];i[s]=h=w}this._setupProperties(_,r[s],h,o[s],a)}else(typeof r[s]>"u"||a)&&(r[s]=u),f||(r[s]*=1),c?o[s]=i[s].slice().reverse():o[s]=r[s]||0}}},e.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},e.prototype.end=function(){return this._goToEnd=!0,this.update(1/0),this},e.prototype.pause=function(n){return n===void 0&&(n=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=yn),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=gn.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,f=this._duration+((o=this._repeatDelayTime)!==null&&o!==void 0?o:this._delayTime),l=this._duration+this._repeat*f,c=function(){if(i._duration===0||u>l)return 1;var _=Math.trunc(u/f),g=u-_*f,w=Math.min(g/i._duration,1);return w===0&&u===i._duration?1:w},h=c(),d=this._easingFunction(h);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,d),this._onUpdateCallback&&this._onUpdateCallback(this._object,h),this._duration===0||u>=this._duration)if(this._repeat>0){var p=Math.min(Math.trunc((u-this._duration)/f)+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+=f*p,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var y=0,v=this._chainedTweens.length;y<v;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],f=Array.isArray(n[a]),l=Array.isArray(u),c=!f&&l;c?n[a]=this._interpolationFunction(u,o):typeof u=="object"&&u?this._updateProperties(n[a],s,u,o):(u=this._handleRelativeValue(s,u),typeof u=="number"&&(n[a]=s+(u-s)*o))}},e.prototype._handleRelativeValue=function(n,r){return typeof r!="string"?r:r.charAt(0)==="+"||r.charAt(0)==="-"?n+parseFloat(r):parseFloat(r)},e.prototype._swapEndStartRepeatValues=function(n){var r=this._valuesStartRepeat[n],i=this._valuesEnd[n];typeof i=="string"?this._valuesStartRepeat[n]=this._valuesStartRepeat[n]+parseFloat(i):this._valuesStartRepeat[n]=this._valuesEnd[n],this._valuesEnd[n]=r},e})();vi.nextId;var kt=yn;kt.getAll.bind(kt);kt.removeAll.bind(kt);kt.add.bind(kt);kt.remove.bind(kt);kt.update.bind(kt);function lr(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 nl(e){if(Array.isArray(e))return e}function rl(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function il(e,n,r){return Object.defineProperty(e,"prototype",{writable:!1}),e}function ol(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,a,s,u=[],f=!0,l=!1;try{if(a=(r=r.call(e)).next,n!==0)for(;!(f=(i=a.call(r)).done)&&(u.push(i.value),u.length!==n);f=!0);}catch(c){l=!0,o=c}finally{try{if(!f&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(l)throw o}}return u}}function al(){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 sl(e,n){return nl(e)||ol(e,n)||ul(e,n)||al()}function ul(e,n){if(e){if(typeof e=="string")return lr(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)?lr(e,n):void 0}}var ll=il(function e(n,r){var i=r.default,o=i===void 0?null:i,a=r.triggerUpdate,s=a===void 0?!0:a,u=r.onChange,f=u===void 0?function(l,c){}:u;rl(this,e),this.name=n,this.defaultVal=o,this.triggerUpdate=s,this.onChange=f});function zn(e){var n=e.stateInit,r=n===void 0?function(){return{}}:n,i=e.props,o=i===void 0?{}:i,a=e.methods,s=a===void 0?{}:a,u=e.aliases,f=u===void 0?{}:u,l=e.init,c=l===void 0?function(){}:l,h=e.update,d=h===void 0?function(){}:h,p=Object.keys(o).map(function(y){return new ll(y,o[y])});return function y(){for(var v=arguments.length,_=new Array(v),g=0;g<v;g++)_[g]=arguments[g];var w=!!(this instanceof y&&this.constructor),T=w?_.shift():void 0,x=_[0],b=x===void 0?{}:x,C=Object.assign({},r instanceof Function?r(b):r,{initialised:!1}),S={};function M(R){return N(R,b),P(),M}var N=function(D,L){c.call(M,D,C,L),C.initialised=!0},P=yi(function(){C.initialised&&(d.call(M,C,S),S={})},1);return p.forEach(function(R){M[R.name]=D(R);function D(L){var A=L.name,I=L.triggerUpdate,E=I===void 0?!1:I,k=L.onChange,O=k===void 0?function(U,F){}:k,j=L.defaultVal,$=j===void 0?null:j;return function(U){var F=C[A];if(!arguments.length)return F;var q=U===void 0?$:U;return C[A]=q,O.call(M,q,C,F),!S.hasOwnProperty(A)&&(S[A]=F),E&&P(),M}}}),Object.keys(s).forEach(function(R){M[R]=function(){for(var D,L=arguments.length,A=new Array(L),I=0;I<L;I++)A[I]=arguments[I];return(D=s[R]).call.apply(D,[M,C].concat(A))}}),Object.entries(f).forEach(function(R){var D=sl(R,2),L=D[0],A=D[1];return M[L]=M[A]}),M.resetProps=function(){return p.forEach(function(R){M[R.name](R.defaultVal)}),M},M.resetProps(),C._rerender=P,w&&T&&M(T),M}}var W=(function(e){return typeof e=="function"?e:typeof e=="string"?function(n){return n[e]}:function(n){return e}});function je(e){"@babel/helpers - typeof";return je=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},je(e)}var fl=/^\s+/,cl=/\s+$/;function H(e,n){if(e=e||"",n=n||{},e instanceof H)return e;if(!(this instanceof H))return new H(e,n);var r=hl(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}H.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=mi(n),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var n=cr(this._r,this._g,this._b);return{h:n.h*360,s:n.s,v:n.v,a:this._a}},toHsvString:function(){var n=cr(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=fr(this._r,this._g,this._b);return{h:n.h*360,s:n.s,l:n.l,a:this._a}},toHslString:function(){var n=fr(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 hr(this._r,this._g,this._b,n)},toHexString:function(n){return"#"+this.toHex(n)},toHex8:function(n){return yl(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(K(this._r,255)*100)+"%",g:Math.round(K(this._g,255)*100)+"%",b:Math.round(K(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(K(this._r,255)*100)+"%, "+Math.round(K(this._g,255)*100)+"%, "+Math.round(K(this._b,255)*100)+"%)":"rgba("+Math.round(K(this._r,255)*100)+"%, "+Math.round(K(this._g,255)*100)+"%, "+Math.round(K(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:Ml[hr(this._r,this._g,this._b,!0)]||!1},toFilter:function(n){var r="#"+dr(this._r,this._g,this._b,this._a),i=r,o=this._gradientType?"GradientType = 1, ":"";if(n){var a=H(n);i="#"+dr(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 H(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(bl,arguments)},brighten:function(){return this._applyModification(xl,arguments)},darken:function(){return this._applyModification(wl,arguments)},desaturate:function(){return this._applyModification(_l,arguments)},saturate:function(){return this._applyModification(vl,arguments)},greyscale:function(){return this._applyModification(ml,arguments)},spin:function(){return this._applyModification(kl,arguments)},_applyCombination:function(n,r){return n.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(Sl,arguments)},complement:function(){return this._applyCombination(Cl,arguments)},monochromatic:function(){return this._applyCombination(Tl,arguments)},splitcomplement:function(){return this._applyCombination(Al,arguments)},triad:function(){return this._applyCombination(pr,[3])},tetrad:function(){return this._applyCombination(pr,[4])}};H.fromRatio=function(e,n){if(je(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 H(e,n)};function hl(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=zl(e)),je(e)=="object"&&(Tt(e.r)&&Tt(e.g)&&Tt(e.b)?(n=dl(e.r,e.g,e.b),s=!0,u=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Tt(e.h)&&Tt(e.s)&&Tt(e.v)?(i=le(e.s),o=le(e.v),n=gl(e.h,i,o),s=!0,u="hsv"):Tt(e.h)&&Tt(e.s)&&Tt(e.l)&&(i=le(e.s),a=le(e.l),n=pl(e.h,i,a),s=!0,u="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=mi(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 dl(e,n,r){return{r:K(e,255)*255,g:K(n,255)*255,b:K(r,255)*255}}function fr(e,n,r){e=K(e,255),n=K(n,255),r=K(r,255);var i=Math.max(e,n,r),o=Math.min(e,n,r),a,s,u=(i+o)/2;if(i==o)a=s=0;else{var f=i-o;switch(s=u>.5?f/(2-i-o):f/(i+o),i){case e:a=(n-r)/f+(n<r?6:0);break;case n:a=(r-e)/f+2;break;case r:a=(e-n)/f+4;break}a/=6}return{h:a,s,l:u}}function pl(e,n,r){var i,o,a;e=K(e,360),n=K(n,100),r=K(r,100);function s(l,c,h){return h<0&&(h+=1),h>1&&(h-=1),h<1/6?l+(c-l)*6*h:h<1/2?c:h<2/3?l+(c-l)*(2/3-h)*6:l}if(n===0)i=o=a=r;else{var u=r<.5?r*(1+n):r+n-r*n,f=2*r-u;i=s(f,u,e+1/3),o=s(f,u,e),a=s(f,u,e-1/3)}return{r:i*255,g:o*255,b:a*255}}function cr(e,n,r){e=K(e,255),n=K(n,255),r=K(r,255);var i=Math.max(e,n,r),o=Math.min(e,n,r),a,s,u=i,f=i-o;if(s=i===0?0:f/i,i==o)a=0;else{switch(i){case e:a=(n-r)/f+(n<r?6:0);break;case n:a=(r-e)/f+2;break;case r:a=(e-n)/f+4;break}a/=6}return{h:a,s,v:u}}function gl(e,n,r){e=K(e,360)*6,n=K(n,100),r=K(r,100);var i=Math.floor(e),o=e-i,a=r*(1-n),s=r*(1-o*n),u=r*(1-(1-o)*n),f=i%6,l=[r,s,a,a,u,r][f],c=[u,r,r,s,a,a][f],h=[a,a,u,r,r,s][f];return{r:l*255,g:c*255,b:h*255}}function hr(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 yl(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(bi(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 dr(e,n,r,i){var o=[_t(bi(i)),_t(Math.round(e).toString(16)),_t(Math.round(n).toString(16)),_t(Math.round(r).toString(16))];return o.join("")}H.equals=function(e,n){return!e||!n?!1:H(e).toRgbString()==H(n).toRgbString()};H.random=function(){return H.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function _l(e,n){n=n===0?0:n||10;var r=H(e).toHsl();return r.s-=n/100,r.s=We(r.s),H(r)}function vl(e,n){n=n===0?0:n||10;var r=H(e).toHsl();return r.s+=n/100,r.s=We(r.s),H(r)}function ml(e){return H(e).desaturate(100)}function bl(e,n){n=n===0?0:n||10;var r=H(e).toHsl();return r.l+=n/100,r.l=We(r.l),H(r)}function xl(e,n){n=n===0?0:n||10;var r=H(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)))),H(r)}function wl(e,n){n=n===0?0:n||10;var r=H(e).toHsl();return r.l-=n/100,r.l=We(r.l),H(r)}function kl(e,n){var r=H(e).toHsl(),i=(r.h+n)%360;return r.h=i<0?360+i:i,H(r)}function Cl(e){var n=H(e).toHsl();return n.h=(n.h+180)%360,H(n)}function pr(e,n){if(isNaN(n)||n<=0)throw new Error("Argument to polyad must be a positive number");for(var r=H(e).toHsl(),i=[H(e)],o=360/n,a=1;a<n;a++)i.push(H({h:(r.h+a*o)%360,s:r.s,l:r.l}));return i}function Al(e){var n=H(e).toHsl(),r=n.h;return[H(e),H({h:(r+72)%360,s:n.s,l:n.l}),H({h:(r+216)%360,s:n.s,l:n.l})]}function Sl(e,n,r){n=n||6,r=r||30;var i=H(e).toHsl(),o=360/r,a=[H(e)];for(i.h=(i.h-(o*n>>1)+720)%360;--n;)i.h=(i.h+o)%360,a.push(H(i));return a}function Tl(e,n){n=n||6;for(var r=H(e).toHsv(),i=r.h,o=r.s,a=r.v,s=[],u=1/n;n--;)s.push(H({h:i,s:o,v:a})),a=(a+u)%1;return s}H.mix=function(e,n,r){r=r===0?0:r||50;var i=H(e).toRgb(),o=H(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 H(s)};H.readability=function(e,n){var r=H(e),i=H(n);return(Math.max(r.getLuminance(),i.getLuminance())+.05)/(Math.min(r.getLuminance(),i.getLuminance())+.05)};H.isReadable=function(e,n,r){var i=H.readability(e,n),o,a;switch(a=!1,o=Rl(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};H.mostReadable=function(e,n,r){var i=null,o=0,a,s,u,f;r=r||{},s=r.includeFallbackColors,u=r.level,f=r.size;for(var l=0;l<n.length;l++)a=H.readability(e,n[l]),a>o&&(o=a,i=H(n[l]));return H.isReadable(e,i,{level:u,size:f})||!s?i:(r.includeFallbackColors=!1,H.mostReadable(e,["#fff","#000"],r))};var _n=H.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"},Ml=H.hexNames=Pl(_n);function Pl(e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[e[r]]=r);return n}function mi(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function K(e,n){Ol(e)&&(e="100%");var r=El(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 We(e){return Math.min(1,Math.max(0,e))}function ft(e){return parseInt(e,16)}function Ol(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function El(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 bi(e){return Math.round(parseFloat(e)*255).toString(16)}function gr(e){return ft(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 Tt(e){return!!yt.CSS_UNIT.exec(e)}function zl(e){e=e.replace(fl,"").replace(cl,"").toLowerCase();var n=!1;if(_n[e])e=_n[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:ft(r[1]),g:ft(r[2]),b:ft(r[3]),a:gr(r[4]),format:n?"name":"hex8"}:(r=yt.hex6.exec(e))?{r:ft(r[1]),g:ft(r[2]),b:ft(r[3]),format:n?"name":"hex"}:(r=yt.hex4.exec(e))?{r:ft(r[1]+""+r[1]),g:ft(r[2]+""+r[2]),b:ft(r[3]+""+r[3]),a:gr(r[4]+""+r[4]),format:n?"name":"hex8"}:(r=yt.hex3.exec(e))?{r:ft(r[1]+""+r[1]),g:ft(r[2]+""+r[2]),b:ft(r[3]+""+r[3]),format:n?"name":"hex"}:!1}function Rl(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 vn(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 Nl(e){if(Array.isArray(e))return vn(e)}function xi(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 Il(e,n){if(n.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Dl(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function ht(e,n){return e.get(xi(e,n))}function yr(e,n,r){Il(e,n),n.set(e,r)}function _r(e,n,r){return e.set(xi(e,n),r),r}function jl(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,ql(i.key),i)}}function $l(e,n,r){return n&&jl(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Fl(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ll(){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 Ul(e){return Nl(e)||Fl(e)||Gl(e)||Ll()}function Hl(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 ql(e){var n=Hl(e,"string");return typeof n=="symbol"?n:n+""}function Gl(e,n){if(e){if(typeof e=="string")return vn(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)?vn(e,n):void 0}}var Vl=123,Wl=function(n){return"#".concat(Math.min(n,Math.pow(2,24)).toString(16).padStart(6,"0"))},wi=function(n,r,i){return(n<<16)+(r<<8)+i},Bl=function(n){var r=H(n).toRgb(),i=r.r,o=r.g,a=r.b;return wi(i,o,a)},vr=function(n,r){return n*Vl%Math.pow(2,r)},Ft=new WeakMap,Mt=new WeakMap,Xl=(function(){function e(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:6;Dl(this,e),yr(this,Ft,void 0),yr(this,Mt,void 0),_r(Mt,this,n),this.reset()}return $l(e,[{key:"reset",value:function(){_r(Ft,this,["__reserved for background__"])}},{key:"register",value:function(r){if(ht(Ft,this).length>=Math.pow(2,24-ht(Mt,this)))return null;var i=ht(Ft,this).length,o=vr(i,ht(Mt,this)),a=Wl(i+(o<<24-ht(Mt,this)));return ht(Ft,this).push(r),a}},{key:"lookup",value:function(r){if(!r)return null;var i=typeof r=="string"?Bl(r):wi.apply(void 0,Ul(r));if(!i)return null;var o=i&Math.pow(2,24-ht(Mt,this))-1,a=i>>24-ht(Mt,this)&Math.pow(2,ht(Mt,this))-1;return vr(o,ht(Mt,this))!==a||o>=ht(Ft,this).length?null:ht(Ft,this)[o]}}])})(),me,Q,ki,Ci,$t,mr,Ai,Si,Je,Pe,fe,Ti,Rn,mn,bn,$e={},Fe=[],Yl=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Be=Array.isArray;function xt(e,n){for(var r in n)e[r]=n[r];return e}function Nn(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Zl(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 ce(e,s,i,o,null)}function ce(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??++ki,__i:-1,__u:0};return o==null&&Q.vnode!=null&&Q.vnode(a),a}function Xe(e){return e.children}function Oe(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 Kl(e){if(e.__P&&e.__d){var n=e.__v,r=n.__e,i=[],o=[],a=xt({},n);a.__v=n.__v+1,Q.vnode&&Q.vnode(a),In(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,zi(i,a,o),n.__e=n.__=null,a.__e!=r&&Mi(a)}}function Mi(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(n){if(n!=null&&n.__e!=null)return e.__e=e.__c.base=n.__e}),Mi(e)}function br(e){(!e.__d&&(e.__d=!0)&&$t.push(e)&&!Le.__r++||mr!=Q.debounceRendering)&&((mr=Q.debounceRendering)||Ai)(Le)}function Le(){try{for(var e,n=1;$t.length;)$t.length>n&&$t.sort(Si),e=$t.shift(),n=$t.length,Kl(e)}finally{$t.length=Le.__r=0}}function Pi(e,n,r,i,o,a,s,u,f,l,c){var h,d,p,y,v,_,g,w=i&&i.__k||Fe,T=n.length;for(f=Ql(r,n,w,f,T),h=0;h<T;h++)(p=r.__k[h])!=null&&(d=p.__i!=-1&&w[p.__i]||$e,p.__i=h,_=In(e,p,d,o,a,s,u,f,l,c),y=p.__e,p.ref&&d.ref!=p.ref&&(d.ref&&Dn(d.ref,null,p),c.push(p.ref,p.__c||y,p)),v==null&&y!=null&&(v=y),(g=!!(4&p.__u))||d.__k===p.__k?(f=Oi(p,f,e,g),g&&d.__e&&(d.__e=null)):typeof p.type=="function"&&_!==void 0?f=_:y&&(f=y.nextSibling),p.__u&=-7);return r.__e=v,f}function Ql(e,n,r,i,o){var a,s,u,f,l,c=r.length,h=c,d=0;for(e.__k=new Array(o),a=0;a<o;a++)(s=n[a])!=null&&typeof s!="boolean"&&typeof s!="function"?(typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?s=e.__k[a]=ce(null,s,null,null,null):Be(s)?s=e.__k[a]=ce(Xe,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=e.__k[a]=ce(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[a]=s,f=a+d,s.__=e,s.__b=e.__b+1,u=null,(l=s.__i=Jl(s,r,f,h))!=-1&&(h--,(u=r[l])&&(u.__u|=2)),u==null||u.__v==null?(l==-1&&(o>c?d--:o<c&&d++),typeof s.type!="function"&&(s.__u|=4)):l!=f&&(l==f-1?d--:l==f+1?d++:(l>f?d--:d++,s.__u|=4))):e.__k[a]=null;if(h)for(a=0;a<c;a++)(u=r[a])!=null&&(2&u.__u)==0&&(u.__e==i&&(i=Yt(u)),Ni(u,u));return i}function Oi(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=Oi(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 Jl(e,n,r,i){var o,a,s,u=e.key,f=e.type,l=n[r],c=l!=null&&(2&l.__u)==0;if(l===null&&u==null||c&&u==l.key&&f==l.type)return r;if(i>(c?1:0)){for(o=r-1,a=r+1;o>=0||a<n.length;)if((l=n[s=o>=0?o--:a++])!=null&&(2&l.__u)==0&&u==l.key&&f==l.type)return s}return-1}function xr(e,n,r){n[0]=="-"?e.setProperty(n,r??""):e[n]=r==null?"":typeof r!="number"||Yl.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||xr(e.style,n,"");if(r)for(n in r)i&&r[n]==i[n]||xr(e.style,n,r[n])}else if(n[0]=="o"&&n[1]=="n")a=n!=(n=n.replace(Ti,"$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[fe]=i[fe]:(r[fe]=Rn,e.addEventListener(n,a?bn:mn,a)):e.removeEventListener(n,a?bn:mn,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 wr(e){return function(n){if(this.l){var r=this.l[n.type+e];if(n[Pe]==null)n[Pe]=Rn++;else if(n[Pe]<r[fe])return;return r(Q.event?Q.event(n):n)}}}function In(e,n,r,i,o,a,s,u,f,l){var c,h,d,p,y,v,_,g,w,T,x,b,C,S,M,N,P=n.type;if(n.constructor!==void 0)return null;128&r.__u&&(f=!!(32&r.__u),a=[u=n.__e=r.__e]),(c=Q.__b)&&c(n);t:if(typeof P=="function"){h=s.length;try{if(w=n.props,T=P.prototype&&P.prototype.render,x=(c=P.contextType)&&i[c.__c],b=c?x?x.props.value:c.__:i,r.__c?g=(d=n.__c=r.__c).__=d.__E:(T?n.__c=d=new P(w,b):(n.__c=d=new Oe(w,b),d.constructor=P,d.render=ef),x&&x.sub(d),d.state||(d.state={}),d.__n=i,p=d.__d=!0,d.__h=[],d._sb=[]),T&&d.__s==null&&(d.__s=d.state),T&&P.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=xt({},d.__s)),xt(d.__s,P.getDerivedStateFromProps(w,d.__s))),y=d.props,v=d.state,d.__v=n,p)T&&P.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),T&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(T&&P.getDerivedStateFromProps==null&&w!==y&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(w,b),n.__v==r.__v||!d.__e&&d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(w,d.__s,b)===!1){n.__v!=r.__v&&(d.props=w,d.state=d.__s,d.__d=!1),n.__e=r.__e,n.__k=r.__k,n.__k.some(function(R){R&&(R.__=n)}),Fe.push.apply(d.__h,d._sb),d._sb=[],d.__h.length&&s.push(d);break t}d.componentWillUpdate!=null&&d.componentWillUpdate(w,d.__s,b),T&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(y,v,_)})}if(d.context=b,d.props=w,d.__P=e,d.__e=!1,C=Q.__r,S=0,T)d.state=d.__s,d.__d=!1,C&&C(n),c=d.render(d.props,d.state,d.context),Fe.push.apply(d.__h,d._sb),d._sb=[];else do d.__d=!1,C&&C(n),c=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++S<25);d.state=d.__s,d.getChildContext!=null&&(i=xt(xt({},i),d.getChildContext())),T&&!p&&d.getSnapshotBeforeUpdate!=null&&(_=d.getSnapshotBeforeUpdate(y,v)),M=c!=null&&c.type===Xe&&c.key==null?Ri(c.props.children):c,u=Pi(e,Be(M)?M:[M],n,r,i,o,a,s,u,f,l),d.base=n.__e,n.__u&=-161,d.__h.length&&s.push(d),g&&(d.__E=d.__=null)}catch(R){if(s.length=h,n.__v=null,f||a!=null){if(R.then){for(n.__u|=f?160:128;u&&u.nodeType==8&&u.nextSibling;)u=u.nextSibling;a!=null&&(a[a.indexOf(u)]=null),n.__e=u}else if(a!=null)for(N=a.length;N--;)Nn(a[N])}else n.__e=r.__e;n.__k==null&&(n.__k=r.__k||[]),R.then||Ei(n),Q.__e(R,n,r)}}else a==null&&n.__v==r.__v?(n.__k=r.__k,n.__e=r.__e):u=n.__e=tf(r.__e,n,r,i,o,a,s,f,l);return(c=Q.diffed)&&c(n),128&n.__u?void 0:u}function Ei(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(Ei))}function zi(e,n,r){for(var i=0;i<r.length;i++)Dn(r[i],r[++i],r[++i]);Q.__c&&Q.__c(n,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(a){a.call(o)})}catch(a){Q.__e(a,o.__v)}})}function Ri(e){return typeof e!="object"||e==null||e.__b>0?e:Be(e)?e.map(Ri):e.constructor!==void 0?null:xt({},e)}function tf(e,n,r,i,o,a,s,u,f){var l,c,h,d,p,y,v,_=r.props||$e,g=n.props,w=n.type;if(w=="svg"?o="http://www.w3.org/2000/svg":w=="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==!!w&&(w?p.localName==w:p.nodeType==3)){e=p,a[l]=null;break}}if(e==null){if(w==null)return document.createTextNode(g);e=document.createElementNS(o,w,g.is&&g),u&&(Q.__m&&Q.__m(n,a),u=!1),a=null}if(w==null)_===g||u&&e.data==g||(e.data=g);else{if(a=w=="textarea"&&g.defaultValue!=null?null:a&&me.call(e.childNodes),!u&&a!=null)for(_={},l=0;l<e.attributes.length;l++)_[(p=e.attributes[l]).name]=p.value;for(l in _)p=_[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"?c=p:l=="value"?y=p:l=="checked"?v=p:u&&typeof p!="function"||_[l]===p||ke(e,l,p,_[l],o);if(c)u||h&&(c.__html==h.__html||c.__html==e.innerHTML)||(e.innerHTML=c.__html),n.__k=[];else if(h&&(e.innerHTML=""),Pi(n.type=="template"?e.content:e,Be(d)?d:[d],n,r,i,w=="foreignObject"?"http://www.w3.org/1999/xhtml":o,a,s,a?a[0]:r.__k&&Yt(r,0),u,f),a!=null)for(l=a.length;l--;)Nn(a[l]);u&&w!="textarea"||(l="value",w=="progress"&&y==null?e.removeAttribute("value"):y!=null&&(y!==e[l]||w=="progress"&&!y||w=="option"&&y!=_[l])&&ke(e,l,y,_[l],o),l="checked",v!=null&&v!=e[l]&&ke(e,l,v,_[l],o))}return e}function Dn(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){Q.__e(o,r)}}function Ni(e,n,r){var i,o;if(Q.unmount&&Q.unmount(e),(i=e.ref)&&(i.current&&i.current!=e.__e||Dn(i,null,n)),(i=e.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(a){Q.__e(a,n)}i.base=i.__P=i.__n=null}if(i=e.__k)for(o=0;o<i.length;o++)i[o]&&Ni(i[o],n,r||typeof e.type!="function");r||Nn(e.__e),e.__c=e.__=e.__e=void 0}function ef(e,n,r){return this.constructor(e,r)}function nf(e,n,r){var i,o,a,s;n==document&&(n=document.documentElement),Q.__&&Q.__(e,n),o=(i=!1)?null:n.__k,a=[],s=[],In(n,e=n.__k=Zl(Xe,null,[e]),o||$e,$e,n.namespaceURI,o?null:n.firstChild?me.call(n.childNodes):null,a,o?o.__e:n.firstChild,i,s),zi(a,e,s),e.props.children=null}function Ii(e,n,r){var i,o,a,s,u=xt({},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),ce(e.type,u,i||e.key,o||e.ref,null)}me=Fe.slice,Q={__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}},ki=0,Ci=function(e){return e!=null&&e.constructor===void 0},Oe.prototype.setState=function(e,n){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=xt({},this.state),typeof e=="function"&&(e=e(xt({},r),this.props)),e&&xt(r,e),e!=null&&this.__v&&(n&&this._sb.push(n),br(this))},Oe.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),br(this))},Oe.prototype.render=Xe,$t=[],Ai=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Si=function(e,n){return e.__v.__b-n.__v.__b},Le.__r=0,Je=Math.random().toString(8),Pe="__d"+Je,fe="__a"+Je,Ti=/(PointerCapture)$|Capture$/i,Rn=0,mn=wr(!1),bn=wr(!0);function kr(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 rf(e){if(Array.isArray(e))return e}function of(e,n,r){return(n=cf(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function af(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,a,s,u=[],f=!0,l=!1;try{if(a=(r=r.call(e)).next,n!==0)for(;!(f=(i=a.call(r)).done)&&(u.push(i.value),u.length!==n);f=!0);}catch(c){l=!0,o=c}finally{try{if(!f&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(l)throw o}}return u}}function sf(){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 Cr(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 uf(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?Cr(Object(r),!0).forEach(function(i){of(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cr(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function lf(e,n){return rf(e)||af(e,n)||hf(e,n)||sf()}function ff(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 cf(e){var n=ff(e,"string");return typeof n=="symbol"?n:n+""}function Ue(e){"@babel/helpers - typeof";return Ue=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},Ue(e)}function hf(e,n){if(e){if(typeof e=="string")return kr(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)?kr(e,n):void 0}}var xn=function(n){if(Ue(n)!=="object")return n;var r=Ii(n);if(r.props){var i;r.props=uf({},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(xn):xn(r.props.children))}return r},df=function(n){return Ci(Ii(n))},pf=function(n,r){delete r.__k,nf(xn(n),r)};function gf(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 yf=`.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;
}
`;gf(yf);var _f=zn({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&&Ue(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 c=lf(l,2),h=c[0],d=c[1];return r.tooltipEl.style(h,d)}),r.tooltipEl.style("left","-10000px").style("display","none");var f="tooltip-".concat(Math.round(Math.random()*1e12));r.mouseInside=!1,u.on("mousemove.".concat(f),function(l){r.mouseInside=!0;var c=bt(l),h=u.node(),d=h.offsetWidth,p=h.offsetHeight,y=[r.offsetX===null||r.offsetX===void 0?"-".concat(c[0]/d*100,"%"):typeof r.offsetX=="number"?"calc(-50% + ".concat(r.offsetX,"px)"):r.offsetX,r.offsetY===null||r.offsetY===void 0?p>130&&p-c[1]<100?"calc(-100% - 6px)":"21px":typeof r.offsetY=="number"?r.offsetY<0?"calc(-100% - ".concat(Math.abs(r.offsetY),"px)"):"".concat(r.offsetY,"px"):r.offsetY];r.tooltipEl.style("left",c[0]+"px").style("top",c[1]+"px").style("transform","translate(".concat(y.join(","),")")),r.content&&r.tooltipEl.style("display","inline")}),u.on("mouseover.".concat(f),function(){r.mouseInside=!0,r.content&&r.tooltipEl.style("display","inline")}),u.on("mouseout.".concat(f),function(){r.mouseInside=!1,r.tooltipEl.style("display","none")})},update:function(n){n.tooltipEl.style("display",n.content&&n.mouseInside?"inline":"none"),n.content?n.content instanceof HTMLElement?(n.tooltipEl.text(""),n.tooltipEl.append(function(){return n.content})):typeof n.content=="string"?n.tooltipEl.html(n.content):df(n.content)?(n.tooltipEl.text(""),pf(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 vf(e,n,r){var i,o=1;e==null&&(e=0),n==null&&(n=0),r==null&&(r=0);function a(){var s,u=i.length,f,l=0,c=0,h=0;for(s=0;s<u;++s)f=i[s],l+=f.x||0,c+=f.y||0,h+=f.z||0;for(l=(l/u-e)*o,c=(c/u-n)*o,h=(h/u-r)*o,s=0;s<u;++s)f=i[s],l&&(f.x-=l),c&&(f.y-=c),h&&(f.z-=h)}return a.initialize=function(s){i=s},a.x=function(s){return arguments.length?(e=+s,a):e},a.y=function(s){return arguments.length?(n=+s,a):n},a.z=function(s){return arguments.length?(r=+s,a):r},a.strength=function(s){return arguments.length?(o=+s,a):o},a}function mf(e){const n=+this._x.call(null,e);return Di(this.cover(n),n,e)}function Di(e,n,r){if(isNaN(n))return e;var i,o=e._root,a={data:r},s=e._x0,u=e._x1,f,l,c,h,d;if(!o)return e._root=a,e;for(;o.length;)if((c=n>=(f=(s+u)/2))?s=f:u=f,i=o,!(o=o[h=+c]))return i[h]=a,e;if(l=+e._x.call(null,o.data),n===l)return a.next=o,i?i[h]=a:e._root=a,e;do i=i?i[h]=new Array(2):e._root=new Array(2),(c=n>=(f=(s+u)/2))?s=f:u=f;while((h=+c)==(d=+(l>=f)));return i[d]=o,i[h]=a,e}function bf(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)Di(this,r[a],e[a]);return this}function xf(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 wf(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function kf(e){return arguments.length?this.cover(+e[0][0]).cover(+e[1][0]):isNaN(this._x0)?void 0:[[this._x0],[this._x1]]}function Rt(e,n,r){this.node=e,this.x0=n,this.x1=r}function Cf(e,n){var r,i=this._x0,o,a,s=this._x1,u=[],f=this._root,l,c;for(f&&u.push(new Rt(f,i,s)),n==null?n=1/0:(i=e-n,s=e+n);l=u.pop();)if(!(!(f=l.node)||(o=l.x0)>s||(a=l.x1)<i))if(f.length){var h=(o+a)/2;u.push(new Rt(f[1],h,a),new Rt(f[0],o,h)),(c=+(e>=h))&&(l=u[u.length-1],u[u.length-1]=u[u.length-1-c],u[u.length-1-c]=l)}else{var d=Math.abs(e-+this._x.call(null,f.data));d<n&&(n=d,i=e-d,s=e+d,r=f.data)}return r}function Af(e){if(isNaN(f=+this._x.call(null,e)))return this;var n,r=this._root,i,o,a,s=this._x0,u=this._x1,f,l,c,h,d;if(!r)return this;if(r.length)for(;;){if((c=f>=(l=(s+u)/2))?s=l:u=l,n=r,!(r=r[h=+c]))return this;if(!r.length)break;n[h+1&1]&&(i=n,d=h)}for(;r.data!==e;)if(o=r,!(r=r.next))return this;return(a=r.next)&&delete r.next,o?(a?o.next=a:delete o.next,this):n?(a?n[h]=a:delete n[h],(r=n[0]||n[1])&&r===(n[1]||n[0])&&!r.length&&(i?i[d]=r:this._root=r),this):(this._root=a,this)}function Sf(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function Tf(){return this._root}function Mf(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function Pf(e){var n=[],r,i=this._root,o,a,s;for(i&&n.push(new Rt(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 Rt(o,u,s)),(o=i[0])&&n.push(new Rt(o,a,u))}return this}function Of(e){var n=[],r=[],i;for(this._root&&n.push(new Rt(this._root,this._x0,this._x1));i=n.pop();){var o=i.node;if(o.length){var a,s=i.x0,u=i.x1,f=(s+u)/2;(a=o[0])&&n.push(new Rt(a,s,f)),(a=o[1])&&n.push(new Rt(a,f,u))}r.push(i)}for(;i=r.pop();)e(i.node,i.x0,i.x1);return this}function Ef(e){return e[0]}function zf(e){return arguments.length?(this._x=e,this):this._x}function ji(e,n){var r=new jn(n??Ef,NaN,NaN);return e==null?r:r.addAll(e)}function jn(e,n,r){this._x=e,this._x0=n,this._x1=r,this._root=void 0}function Ar(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var st=ji.prototype=jn.prototype;st.copy=function(){var e=new jn(this._x,this._x0,this._x1),n=this._root,r,i;if(!n)return e;if(!n.length)return e._root=Ar(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]=Ar(i));return e};st.add=mf;st.addAll=bf;st.cover=xf;st.data=wf;st.extent=kf;st.find=Cf;st.remove=Af;st.removeAll=Sf;st.root=Tf;st.size=Mf;st.visit=Pf;st.visitAfter=Of;st.x=zf;function Rf(e){const n=+this._x.call(null,e),r=+this._y.call(null,e);return $i(this.cover(n,r),n,r,e)}function $i(e,n,r,i){if(isNaN(n)||isNaN(r))return e;var o,a=e._root,s={data:i},u=e._x0,f=e._y0,l=e._x1,c=e._y1,h,d,p,y,v,_,g,w;if(!a)return e._root=s,e;for(;a.length;)if((v=n>=(h=(u+l)/2))?u=h:l=h,(_=r>=(d=(f+c)/2))?f=d:c=d,o=a,!(a=a[g=_<<1|v]))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),(v=n>=(h=(u+l)/2))?u=h:l=h,(_=r>=(d=(f+c)/2))?f=d:c=d;while((g=_<<1|v)===(w=(y>=d)<<1|p>=h));return o[w]=a,o[g]=s,e}function Nf(e){var n,r,i=e.length,o,a,s=new Array(i),u=new Array(i),f=1/0,l=1/0,c=-1/0,h=-1/0;for(r=0;r<i;++r)isNaN(o=+this._x.call(null,n=e[r]))||isNaN(a=+this._y.call(null,n))||(s[r]=o,u[r]=a,o<f&&(f=o),o>c&&(c=o),a<l&&(l=a),a>h&&(h=a));if(f>c||l>h)return this;for(this.cover(f,l).cover(c,h),r=0;r<i;++r)$i(this,s[r],u[r],e[r]);return this}function If(e,n){if(isNaN(e=+e)||isNaN(n=+n))return this;var r=this._x0,i=this._y0,o=this._x1,a=this._y1;if(isNaN(r))o=(r=Math.floor(e))+1,a=(i=Math.floor(n))+1;else{for(var s=o-r||1,u=this._root,f,l;r>e||e>=o||i>n||n>=a;)switch(l=(n<i)<<1|e<r,f=new Array(4),f[l]=u,u=f,s*=2,l){case 0:o=r+s,a=i+s;break;case 1:r=o-s,a=i+s;break;case 2:o=r+s,i=a-s;break;case 3:r=o-s,i=a-s;break}this._root&&this._root.length&&(this._root=u)}return this._x0=r,this._y0=i,this._x1=o,this._y1=a,this}function Df(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function jf(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 it(e,n,r,i,o){this.node=e,this.x0=n,this.y0=r,this.x1=i,this.y1=o}function $f(e,n,r){var i,o=this._x0,a=this._y0,s,u,f,l,c=this._x1,h=this._y1,d=[],p=this._root,y,v;for(p&&d.push(new it(p,o,a,c,h)),r==null?r=1/0:(o=e-r,a=n-r,c=e+r,h=n+r,r*=r);y=d.pop();)if(!(!(p=y.node)||(s=y.x0)>c||(u=y.y0)>h||(f=y.x1)<o||(l=y.y1)<a))if(p.length){var _=(s+f)/2,g=(u+l)/2;d.push(new it(p[3],_,g,f,l),new it(p[2],s,g,_,l),new it(p[1],_,u,f,g),new it(p[0],s,u,_,g)),(v=(n>=g)<<1|e>=_)&&(y=d[d.length-1],d[d.length-1]=d[d.length-1-v],d[d.length-1-v]=y)}else{var w=e-+this._x.call(null,p.data),T=n-+this._y.call(null,p.data),x=w*w+T*T;if(x<r){var b=Math.sqrt(r=x);o=e-b,a=n-b,c=e+b,h=n+b,i=p.data}}return i}function Ff(e){if(isNaN(c=+this._x.call(null,e))||isNaN(h=+this._y.call(null,e)))return this;var n,r=this._root,i,o,a,s=this._x0,u=this._y0,f=this._x1,l=this._y1,c,h,d,p,y,v,_,g;if(!r)return this;if(r.length)for(;;){if((y=c>=(d=(s+f)/2))?s=d:f=d,(v=h>=(p=(u+l)/2))?u=p:l=p,n=r,!(r=r[_=v<<1|y]))return this;if(!r.length)break;(n[_+1&3]||n[_+2&3]||n[_+3&3])&&(i=n,g=_)}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])&&r===(n[3]||n[2]||n[1]||n[0])&&!r.length&&(i?i[g]=r:this._root=r),this):(this._root=a,this)}function Lf(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function Uf(){return this._root}function Hf(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function qf(e){var n=[],r,i=this._root,o,a,s,u,f;for(i&&n.push(new it(i,this._x0,this._y0,this._x1,this._y1));r=n.pop();)if(!e(i=r.node,a=r.x0,s=r.y0,u=r.x1,f=r.y1)&&i.length){var l=(a+u)/2,c=(s+f)/2;(o=i[3])&&n.push(new it(o,l,c,u,f)),(o=i[2])&&n.push(new it(o,a,c,l,f)),(o=i[1])&&n.push(new it(o,l,s,u,c)),(o=i[0])&&n.push(new it(o,a,s,l,c))}return this}function Gf(e){var n=[],r=[],i;for(this._root&&n.push(new it(this._root,this._x0,this._y0,this._x1,this._y1));i=n.pop();){var o=i.node;if(o.length){var a,s=i.x0,u=i.y0,f=i.x1,l=i.y1,c=(s+f)/2,h=(u+l)/2;(a=o[0])&&n.push(new it(a,s,u,c,h)),(a=o[1])&&n.push(new it(a,c,u,f,h)),(a=o[2])&&n.push(new it(a,s,h,c,l)),(a=o[3])&&n.push(new it(a,c,h,f,l))}r.push(i)}for(;i=r.pop();)e(i.node,i.x0,i.y0,i.x1,i.y1);return this}function Vf(e){return e[0]}function Wf(e){return arguments.length?(this._x=e,this):this._x}function Bf(e){return e[1]}function Xf(e){return arguments.length?(this._y=e,this):this._y}function $n(e,n,r){var i=new Fn(n??Vf,r??Bf,NaN,NaN,NaN,NaN);return e==null?i:i.addAll(e)}function Fn(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 Sr(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var ot=$n.prototype=Fn.prototype;ot.copy=function(){var e=new Fn(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=Sr(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]=Sr(i));return e};ot.add=Rf;ot.addAll=Nf;ot.cover=If;ot.data=Df;ot.extent=jf;ot.find=$f;ot.remove=Ff;ot.removeAll=Lf;ot.root=Uf;ot.size=Hf;ot.visit=qf;ot.visitAfter=Gf;ot.x=Wf;ot.y=Xf;function Yf(e){const n=+this._x.call(null,e),r=+this._y.call(null,e),i=+this._z.call(null,e);return Fi(this.cover(n,r,i),n,r,i,e)}function Fi(e,n,r,i,o){if(isNaN(n)||isNaN(r)||isNaN(i))return e;var a,s=e._root,u={data:o},f=e._x0,l=e._y0,c=e._z0,h=e._x1,d=e._y1,p=e._z1,y,v,_,g,w,T,x,b,C,S,M;if(!s)return e._root=u,e;for(;s.length;)if((x=n>=(y=(f+h)/2))?f=y:h=y,(b=r>=(v=(l+d)/2))?l=v:d=v,(C=i>=(_=(c+p)/2))?c=_:p=_,a=s,!(s=s[S=C<<2|b<<1|x]))return a[S]=u,e;if(g=+e._x.call(null,s.data),w=+e._y.call(null,s.data),T=+e._z.call(null,s.data),n===g&&r===w&&i===T)return u.next=s,a?a[S]=u:e._root=u,e;do a=a?a[S]=new Array(8):e._root=new Array(8),(x=n>=(y=(f+h)/2))?f=y:h=y,(b=r>=(v=(l+d)/2))?l=v:d=v,(C=i>=(_=(c+p)/2))?c=_:p=_;while((S=C<<2|b<<1|x)===(M=(T>=_)<<2|(w>=v)<<1|g>=y));return a[M]=s,a[S]=u,e}function Zf(e){Array.isArray(e)||(e=Array.from(e));const n=e.length,r=new Float64Array(n),i=new Float64Array(n),o=new Float64Array(n);let a=1/0,s=1/0,u=1/0,f=-1/0,l=-1/0,c=-1/0;for(let h=0,d,p,y,v;h<n;++h)isNaN(p=+this._x.call(null,d=e[h]))||isNaN(y=+this._y.call(null,d))||isNaN(v=+this._z.call(null,d))||(r[h]=p,i[h]=y,o[h]=v,p<a&&(a=p),p>f&&(f=p),y<s&&(s=y),y>l&&(l=y),v<u&&(u=v),v>c&&(c=v));if(a>f||s>l||u>c)return this;this.cover(a,s,u).cover(f,l,c);for(let h=0;h<n;++h)Fi(this,r[h],i[h],o[h],e[h]);return this}function Kf(e,n,r){if(isNaN(e=+e)||isNaN(n=+n)||isNaN(r=+r))return this;var i=this._x0,o=this._y0,a=this._z0,s=this._x1,u=this._y1,f=this._z1;if(isNaN(i))s=(i=Math.floor(e))+1,u=(o=Math.floor(n))+1,f=(a=Math.floor(r))+1;else{for(var l=s-i||1,c=this._root,h,d;i>e||e>=s||o>n||n>=u||a>r||r>=f;)switch(d=(r<a)<<2|(n<o)<<1|e<i,h=new Array(8),h[d]=c,c=h,l*=2,d){case 0:s=i+l,u=o+l,f=a+l;break;case 1:i=s-l,u=o+l,f=a+l;break;case 2:s=i+l,o=u-l,f=a+l;break;case 3:i=s-l,o=u-l,f=a+l;break;case 4:s=i+l,u=o+l,a=f-l;break;case 5:i=s-l,u=o+l,a=f-l;break;case 6:s=i+l,o=u-l,a=f-l;break;case 7:i=s-l,o=u-l,a=f-l;break}this._root&&this._root.length&&(this._root=c)}return this._x0=i,this._y0=o,this._z0=a,this._x1=s,this._y1=u,this._z1=f,this}function Qf(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function Jf(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 X(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 tc(e,n,r,i){var o,a=this._x0,s=this._y0,u=this._z0,f,l,c,h,d,p,y=this._x1,v=this._y1,_=this._z1,g=[],w=this._root,T,x;for(w&&g.push(new X(w,a,s,u,y,v,_)),i==null?i=1/0:(a=e-i,s=n-i,u=r-i,y=e+i,v=n+i,_=r+i,i*=i);T=g.pop();)if(!(!(w=T.node)||(f=T.x0)>y||(l=T.y0)>v||(c=T.z0)>_||(h=T.x1)<a||(d=T.y1)<s||(p=T.z1)<u))if(w.length){var b=(f+h)/2,C=(l+d)/2,S=(c+p)/2;g.push(new X(w[7],b,C,S,h,d,p),new X(w[6],f,C,S,b,d,p),new X(w[5],b,l,S,h,C,p),new X(w[4],f,l,S,b,C,p),new X(w[3],b,C,c,h,d,S),new X(w[2],f,C,c,b,d,S),new X(w[1],b,l,c,h,C,S),new X(w[0],f,l,c,b,C,S)),(x=(r>=S)<<2|(n>=C)<<1|e>=b)&&(T=g[g.length-1],g[g.length-1]=g[g.length-1-x],g[g.length-1-x]=T)}else{var M=e-+this._x.call(null,w.data),N=n-+this._y.call(null,w.data),P=r-+this._z.call(null,w.data),R=M*M+N*N+P*P;if(R<i){var D=Math.sqrt(i=R);a=e-D,s=n-D,u=r-D,y=e+D,v=n+D,_=r+D,o=w.data}}return o}const ec=(e,n,r,i,o,a)=>Math.sqrt((e-i)**2+(n-o)**2+(r-a)**2);function nc(e,n,r,i){const o=[],a=e-i,s=n-i,u=r-i,f=e+i,l=n+i,c=r+i;return this.visit((h,d,p,y,v,_,g)=>{if(!h.length)do{const w=h.data;ec(e,n,r,this._x(w),this._y(w),this._z(w))<=i&&o.push(w)}while(h=h.next);return d>f||p>l||y>c||v<a||_<s||g<u}),o}function rc(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,f=this._z0,l=this._x1,c=this._y1,h=this._z1,d,p,y,v,_,g,w,T,x,b,C;if(!r)return this;if(r.length)for(;;){if((w=d>=(v=(s+l)/2))?s=v:l=v,(T=p>=(_=(u+c)/2))?u=_:c=_,(x=y>=(g=(f+h)/2))?f=g:h=g,n=r,!(r=r[b=x<<2|T<<1|w]))return this;if(!r.length)break;(n[b+1&7]||n[b+2&7]||n[b+3&7]||n[b+4&7]||n[b+5&7]||n[b+6&7]||n[b+7&7])&&(i=n,C=b)}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[b]=a:delete n[b],(r=n[0]||n[1]||n[2]||n[3]||n[4]||n[5]||n[6]||n[7])&&r===(n[7]||n[6]||n[5]||n[4]||n[3]||n[2]||n[1]||n[0])&&!r.length&&(i?i[C]=r:this._root=r),this):(this._root=a,this)}function ic(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function oc(){return this._root}function ac(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function sc(e){var n=[],r,i=this._root,o,a,s,u,f,l,c;for(i&&n.push(new X(i,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));r=n.pop();)if(!e(i=r.node,a=r.x0,s=r.y0,u=r.z0,f=r.x1,l=r.y1,c=r.z1)&&i.length){var h=(a+f)/2,d=(s+l)/2,p=(u+c)/2;(o=i[7])&&n.push(new X(o,h,d,p,f,l,c)),(o=i[6])&&n.push(new X(o,a,d,p,h,l,c)),(o=i[5])&&n.push(new X(o,h,s,p,f,d,c)),(o=i[4])&&n.push(new X(o,a,s,p,h,d,c)),(o=i[3])&&n.push(new X(o,h,d,u,f,l,p)),(o=i[2])&&n.push(new X(o,a,d,u,h,l,p)),(o=i[1])&&n.push(new X(o,h,s,u,f,d,p)),(o=i[0])&&n.push(new X(o,a,s,u,h,d,p))}return this}function uc(e){var n=[],r=[],i;for(this._root&&n.push(new X(this._root,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));i=n.pop();){var o=i.node;if(o.length){var a,s=i.x0,u=i.y0,f=i.z0,l=i.x1,c=i.y1,h=i.z1,d=(s+l)/2,p=(u+c)/2,y=(f+h)/2;(a=o[0])&&n.push(new X(a,s,u,f,d,p,y)),(a=o[1])&&n.push(new X(a,d,u,f,l,p,y)),(a=o[2])&&n.push(new X(a,s,p,f,d,c,y)),(a=o[3])&&n.push(new X(a,d,p,f,l,c,y)),(a=o[4])&&n.push(new X(a,s,u,y,d,p,h)),(a=o[5])&&n.push(new X(a,d,u,y,l,p,h)),(a=o[6])&&n.push(new X(a,s,p,y,d,c,h)),(a=o[7])&&n.push(new X(a,d,p,y,l,c,h))}r.push(i)}for(;i=r.pop();)e(i.node,i.x0,i.y0,i.z0,i.x1,i.y1,i.z1);return this}function lc(e){return e[0]}function fc(e){return arguments.length?(this._x=e,this):this._x}function cc(e){return e[1]}function hc(e){return arguments.length?(this._y=e,this):this._y}function dc(e){return e[2]}function pc(e){return arguments.length?(this._z=e,this):this._z}function Li(e,n,r,i){var o=new Ln(n??lc,r??cc,i??dc,NaN,NaN,NaN,NaN,NaN,NaN);return e==null?o:o.addAll(e)}function Ln(e,n,r,i,o,a,s,u,f){this._x=e,this._y=n,this._z=r,this._x0=i,this._y0=o,this._z0=a,this._x1=s,this._y1=u,this._z1=f,this._root=void 0}function Tr(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var nt=Li.prototype=Ln.prototype;nt.copy=function(){var e=new Ln(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=Tr(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]=Tr(i));return e};nt.add=Yf;nt.addAll=Zf;nt.cover=Kf;nt.data=Qf;nt.extent=Jf;nt.find=tc;nt.findAllWithinRadius=nc;nt.remove=rc;nt.removeAll=ic;nt.root=oc;nt.size=ac;nt.visit=sc;nt.visitAfter=uc;nt.x=fc;nt.y=hc;nt.z=pc;function zt(e){return function(){return e}}function Ot(e){return(e()-.5)*1e-6}function gc(e){return e.index}function Mr(e,n){var r=e.get(n);if(!r)throw new Error("node not found: "+n);return r}function yc(e){var n=gc,r=d,i,o=zt(30),a,s,u,f,l,c,h=1;e==null&&(e=[]);function d(g){return 1/Math.min(f[g.source.index],f[g.target.index])}function p(g){for(var w=0,T=e.length;w<h;++w)for(var x=0,b,C,S,M=0,N=0,P=0,R,D;x<T;++x)b=e[x],C=b.source,S=b.target,M=S.x+S.vx-C.x-C.vx||Ot(c),u>1&&(N=S.y+S.vy-C.y-C.vy||Ot(c)),u>2&&(P=S.z+S.vz-C.z-C.vz||Ot(c)),R=Math.sqrt(M*M+N*N+P*P),R=(R-a[x])/R*g*i[x],M*=R,N*=R,P*=R,S.vx-=M*(D=l[x]),u>1&&(S.vy-=N*D),u>2&&(S.vz-=P*D),C.vx+=M*(D=1-D),u>1&&(C.vy+=N*D),u>2&&(C.vz+=P*D)}function y(){if(s){var g,w=s.length,T=e.length,x=new Map(s.map((C,S)=>[n(C,S,s),C])),b;for(g=0,f=new Array(w);g<T;++g)b=e[g],b.index=g,typeof b.source!="object"&&(b.source=Mr(x,b.source)),typeof b.target!="object"&&(b.target=Mr(x,b.target)),f[b.source.index]=(f[b.source.index]||0)+1,f[b.target.index]=(f[b.target.index]||0)+1;for(g=0,l=new Array(T);g<T;++g)b=e[g],l[g]=f[b.source.index]/(f[b.source.index]+f[b.target.index]);i=new Array(T),v(),a=new Array(T),_()}}function v(){if(s)for(var g=0,w=e.length;g<w;++g)i[g]=+r(e[g],g,e)}function _(){if(s)for(var g=0,w=e.length;g<w;++g)a[g]=+o(e[g],g,e)}return p.initialize=function(g,...w){s=g,c=w.find(T=>typeof T=="function")||Math.random,u=w.find(T=>[1,2,3].includes(T))||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),v(),p):r},p.distance=function(g){return arguments.length?(o=typeof g=="function"?g:zt(+g),_(),p):o},p}const _c=1664525,vc=1013904223,Pr=4294967296;function mc(){let e=1;return()=>(e=(_c*e+vc)%Pr)/Pr}var Or=3;function tn(e){return e.x}function Er(e){return e.y}function bc(e){return e.z}var xc=10,wc=Math.PI*(3-Math.sqrt(5)),kc=Math.PI*20/(9+Math.sqrt(221));function Cc(e,n){n=n||2;var r=Math.min(Or,Math.max(1,Math.round(n))),i,o=1,a=.001,s=1-Math.pow(a,1/300),u=0,f=.6,l=new Map,c=Mn(p),h=ve("tick","end"),d=mc();e==null&&(e=[]);function p(){y(),h.call("tick",i),o<a&&(c.stop(),h.call("end",i))}function y(g){var w,T=e.length,x;g===void 0&&(g=1);for(var b=0;b<g;++b)for(o+=(u-o)*s,l.forEach(function(C){C(o)}),w=0;w<T;++w)x=e[w],x.fx==null?x.x+=x.vx*=f:(x.x=x.fx,x.vx=0),r>1&&(x.fy==null?x.y+=x.vy*=f:(x.y=x.fy,x.vy=0)),r>2&&(x.fz==null?x.z+=x.vz*=f:(x.z=x.fz,x.vz=0));return i}function v(){for(var g=0,w=e.length,T;g<w;++g){if(T=e[g],T.index=g,T.fx!=null&&(T.x=T.fx),T.fy!=null&&(T.y=T.fy),T.fz!=null&&(T.z=T.fz),isNaN(T.x)||r>1&&isNaN(T.y)||r>2&&isNaN(T.z)){var x=xc*(r>2?Math.cbrt(.5+g):r>1?Math.sqrt(.5+g):g),b=g*wc,C=g*kc;r===1?T.x=x:r===2?(T.x=x*Math.cos(b),T.y=x*Math.sin(b)):(T.x=x*Math.sin(b)*Math.cos(C),T.y=x*Math.cos(b),T.z=x*Math.sin(b)*Math.sin(C))}(isNaN(T.vx)||r>1&&isNaN(T.vy)||r>2&&isNaN(T.vz))&&(T.vx=0,r>1&&(T.vy=0),r>2&&(T.vz=0))}}function _(g){return g.initialize&&g.initialize(e,d,r),g}return v(),i={tick:y,restart:function(){return c.restart(p),i},stop:function(){return c.stop(),i},numDimensions:function(g){return arguments.length?(r=Math.min(Or,Math.max(1,Math.round(g))),l.forEach(_),i):r},nodes:function(g){return arguments.length?(e=g,v(),l.forEach(_),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?(f=1-g,i):1-f},randomSource:function(g){return arguments.length?(d=g,l.forEach(_),i):d},force:function(g,w){return arguments.length>1?(w==null?l.delete(g):l.set(g,_(w)),i):l.get(g)},find:function(){var g=Array.prototype.slice.call(arguments),w=g.shift()||0,T=(r>1?g.shift():null)||0,x=(r>2?g.shift():null)||0,b=g.shift()||1/0,C=0,S=e.length,M,N,P,R,D,L;for(b*=b,C=0;C<S;++C)D=e[C],M=w-D.x,N=T-(D.y||0),P=x-(D.z||0),R=M*M+N*N+P*P,R<b&&(L=D,b=R);return L},on:function(g,w){return arguments.length>1?(h.on(g,w),i):h.on(g)}}}function Ac(){var e,n,r,i,o,a=zt(-30),s,u=1,f=1/0,l=.81;function c(y){var v,_=e.length,g=(n===1?ji(e,tn):n===2?$n(e,tn,Er):n===3?Li(e,tn,Er,bc):null).visitAfter(d);for(o=y,v=0;v<_;++v)r=e[v],g.visit(p)}function h(){if(e){var y,v=e.length,_;for(s=new Array(v),y=0;y<v;++y)_=e[y],s[_.index]=+a(_,y,e)}}function d(y){var v=0,_,g,w=0,T,x,b,C,S=y.length;if(S){for(T=x=b=C=0;C<S;++C)(_=y[C])&&(g=Math.abs(_.value))&&(v+=_.value,w+=g,T+=g*(_.x||0),x+=g*(_.y||0),b+=g*(_.z||0));v*=Math.sqrt(4/S),y.x=T/w,n>1&&(y.y=x/w),n>2&&(y.z=b/w)}else{_=y,_.x=_.data.x,n>1&&(_.y=_.data.y),n>2&&(_.z=_.data.z);do v+=s[_.data.index];while(_=_.next)}y.value=v}function p(y,v,_,g,w){if(!y.value)return!0;var T=[_,g,w][n-1],x=y.x-r.x,b=n>1?y.y-r.y:0,C=n>2?y.z-r.z:0,S=T-v,M=x*x+b*b+C*C;if(S*S/l<M)return M<f&&(x===0&&(x=Ot(i),M+=x*x),n>1&&b===0&&(b=Ot(i),M+=b*b),n>2&&C===0&&(C=Ot(i),M+=C*C),M<u&&(M=Math.sqrt(u*M)),r.vx+=x*y.value*o/M,n>1&&(r.vy+=b*y.value*o/M),n>2&&(r.vz+=C*y.value*o/M)),!0;if(y.length||M>=f)return;(y.data!==r||y.next)&&(x===0&&(x=Ot(i),M+=x*x),n>1&&b===0&&(b=Ot(i),M+=b*b),n>2&&C===0&&(C=Ot(i),M+=C*C),M<u&&(M=Math.sqrt(u*M)));do y.data!==r&&(S=s[y.data.index]*o/M,r.vx+=x*S,n>1&&(r.vy+=b*S),n>2&&(r.vz+=C*S));while(y=y.next)}return c.initialize=function(y,...v){e=y,i=v.find(_=>typeof _=="function")||Math.random,n=v.find(_=>[1,2,3].includes(_))||2,h()},c.strength=function(y){return arguments.length?(a=typeof y=="function"?y:zt(+y),h(),c):a},c.distanceMin=function(y){return arguments.length?(u=y*y,c):Math.sqrt(u)},c.distanceMax=function(y){return arguments.length?(f=y*y,c):Math.sqrt(f)},c.theta=function(y){return arguments.length?(l=y*y,c):Math.sqrt(l)},c}function Sc(e,n,r,i){var o,a,s=zt(.1),u,f;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],v=y.x-n||1e-6,_=(y.y||0)-r||1e-6,g=(y.z||0)-i||1e-6,w=Math.sqrt(v*v+_*_+g*g),T=(f[d]-w)*u[d]*h/w;y.vx+=v*T,a>1&&(y.vy+=_*T),a>2&&(y.vz+=g*T)}}function c(){if(o){var h,d=o.length;for(u=new Array(d),f=new Array(d),h=0;h<d;++h)f[h]=+e(o[h],h,o),u[h]=isNaN(f[h])?0:+s(o[h],h,o)}}return l.initialize=function(h,...d){o=h,a=d.find(p=>[1,2,3].includes(p))||2,c()},l.strength=function(h){return arguments.length?(s=typeof h=="function"?h:zt(+h),c(),l):s},l.radius=function(h){return arguments.length?(e=typeof h=="function"?h:zt(+h),c(),l):e},l.x=function(h){return arguments.length?(n=+h,l):n},l.y=function(h){return arguments.length?(r=+h,l):r},l.z=function(h){return arguments.length?(i=+h,l):i},l}const{abs:ee,cos:Pt,sin:Gt,acos:Tc,atan2:ne,sqrt:Dt,pow:dt}=Math;function re(e){return e<0?-dt(-e,1/3):dt(e,1/3)}const Ui=Math.PI,Ce=2*Ui,jt=Ui/2,Mc=1e-6,en=Number.MAX_SAFE_INTEGER||9007199254740991,nn=Number.MIN_SAFE_INTEGER||-9007199254740991,Pc={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,f=e*e,l,c,h,d=0;i===2?(a=[a[0],a[1],a[2],Pc],l=u,c=o*e*2,h=f):i===3&&(l=u*o,c=u*e*3,h=o*f*3,d=e*f);const p={x:l*a[0].x+c*a[1].x+h*a[2].x+d*a[3].x,y:l*a[0].y+c*a[1].y+h*a[2].y+d*a[3].y,t:e};return r&&(p.z=l*a[0].z+c*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],f=a[1],l=a[2],c=a[3],h;if(u*=o,f*=e,s.length===2)return h=u+f,{x:(u*s[0].x+f*s[1].x)/h,y:(u*s[0].y+f*s[1].y)/h,z:i?(u*s[0].z+f*s[1].z)/h:!1,t:e};if(u*=o,f*=2*o,l*=e*e,s.length===3)return h=u+f+l,{x:(u*s[0].x+f*s[1].x+l*s[2].x)/h,y:(u*s[0].y+f*s[1].y+l*s[2].y)/h,z:i?(u*s[0].z+f*s[1].z+l*s[2].z)/h:!1,t:e};if(u*=o,f*=1.5*o,l*=3*o,c*=e*e*e,s.length===4)return h=u+f+l+c,{x:(u*s[0].x+f*s[1].x+l*s[2].x+c*s[3].x)/h,y:(u*s[0].y+f*s[1].y+l*s[2].y+c*s[3].y)/h,z:i?(u*s[0].z+f*s[1].z+l*s[2].z+c*s[3].z)/h:!1,t:e}},derive:function(e,n){const r=[];for(let i=e,o=i.length,a=o-1;o>1;o--,a--){const s=[];for(let u=0,f;u<a;u++)f={x:a*(i[u+1].x-i[u].x),y:a*(i[u+1].y-i[u].y)},n&&(f.z=a*(i[u+1].z-i[u].z)),s.push(f);r.push(s),i=s}return r},between:function(e,n,r){return n<=e&&e<=r||z.approximately(e,n)||z.approximately(e,r)},approximately:function(e,n,r){return ee(e-n)<=(r||Mc)},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,f=u/a;return i+s*f},lerp:function(e,n,r){const i={x:n.x+e*(r.x-n.x),y:n.y+e*(r.y-n.y)};return n.z!==void 0&&r.z!==void 0&&(i.z=n.z+e*(r.z-n.z)),i},pointToString:function(e){let n=e.x+"/"+e.y;return typeof e.z<"u"&&(n+="/"+e.z),n},pointsToString:function(e){return"["+e.map(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,f=i*a+o*s;return ne(u,f)},round:function(e,n){const r=""+e,i=r.indexOf(".");return parseFloat(r.substring(0,i+1+n))},dist:function(e,n){const r=e.x-n.x,i=e.y-n.y;return 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 f=(e*i-n*r)*(o-s)-(e-r)*(o*u-a*s),l=(e*i-n*r)*(a-u)-(n-i)*(o*u-a*s),c=(e-r)*(a-u)-(n-i)*(o-s);return c==0?!1:{x:f/c,y:l/c}},lli4:function(e,n,r,i){const o=e.x,a=e.y,s=n.x,u=n.y,f=r.x,l=r.y,c=i.x,h=i.y;return z.lli8(o,a,s,u,f,l,c,h)},lli:function(e,n){return z.lli4(e,e.c,n,n.c)},makeline:function(e,n){return new Z(e.x,e.y,(e.x+n.x)/2,(e.y+n.y)/2,n.x,n.y)},findbbox:function(e){let n=en,r=en,i=nn,o=nn;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(f){f.virtual||u.forEach(function(l){if(l.virtual)return;const c=f.intersects(l,o);c.length>0&&(c.c1=f,c.c2=l,c.s1=e,c.s2=r,a.push(c))})}),a},makeshape:function(e,n,r){const i=n.points.length,o=e.points.length,a=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(f){return z.shapeintersections(u,u.bbox,f,f.bbox,r)},u},getminmax:function(e,n,r){if(!r)return{min:0,max:0};let i=en,o=nn,a,s;r.indexOf(0)===-1&&(r=[0].concat(r)),r.indexOf(1)===-1&&r.push(1);for(let u=0,f=r.length;u<f;u++)a=r[u],s=e.get(a),s[n]<i&&(i=s[n]),s[n]>o&&(o=s[n]);return{min:i,mid:(i+o)/2,max:o,size:o-i}},align:function(e,n){const r=n.p1.x,i=n.p1.y,o=-ne(n.p2.y-i,n.p2.x-r),a=function(s){return{x:(s.x-r)*Pt(o)-(s.y-i)*Gt(o),y:(s.x-r)*Gt(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(S){return 0<=S&&S<=1};if(r===2){const S=i[0].y,M=i[1].y,N=i[2].y,P=S-2*M+N;if(P!==0){const R=-Dt(M*M-S*N),D=-S+M,L=-(R+D)/P,A=-(-R+D)/P;return[L,A].filter(o)}else if(M!==N&&P===0)return[(2*M-N)/(2*M-2*N)].filter(o);return[]}const a=i[0].y,s=i[1].y,u=i[2].y,f=i[3].y;let l=-a+3*s-3*u+f,c=3*a-6*s+3*u,h=-3*a+3*s,d=a;if(z.approximately(l,0)){if(z.approximately(c,0))return z.approximately(h,0)?[]:[-d/h].filter(o);const S=Dt(h*h-4*c*d),M=2*c;return[(S-h)/M,(-h-S)/M].filter(o)}c/=l,h/=l,d/=l;const p=(3*h-c*c)/3,y=p/3,v=(2*c*c*c-9*c*h+27*d)/27,_=v/2,g=_*_+y*y*y;let w,T,x,b,C;if(g<0){const S=-p/3,M=S*S*S,N=Dt(M),P=-v/(2*N),R=P<-1?-1:P>1?1:P,D=Tc(R),L=re(N),A=2*L;return x=A*Pt(D/3)-c/3,b=A*Pt((D+Ce)/3)-c/3,C=A*Pt((D+2*Ce)/3)-c/3,[x,b,C].filter(o)}else{if(g===0)return w=_<0?re(-_):-re(_),x=2*w-c/3,b=-w-c/3,[x,b].filter(o);{const S=Dt(g);return w=re(-_+S),T=re(_+S),[w-T-c/3].filter(o)}}},droots:function(e){if(e.length===3){const n=e[0],r=e[1],i=e[2],o=n-2*r+i;if(o!==0){const a=-Dt(r*r-n*i),s=-n+r,u=-(a+s)/o,f=-(-a+s)/o;return[u,f]}else if(r!==i&&o===0)return[(2*r-i)/(2*(r-i))];return[]}if(e.length===2){const n=e[0],r=e[1];return n!==r?[n/(n-r)]:[]}return[]},curvature:function(e,n,r,i,o){let a,s,u,f,l=0,c=0;const h=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,c=s/a,!o){const y=z.curvature(e-.001,n,r,i,!0).k,v=z.curvature(e+.001,n,r,i,!0).k;f=(v-l+(l-y))/2,u=(ee(v-l)+ee(l-y))/2}return{k:l,r:c,dk:f,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),f=18*(o-r);if(z.approximately(s,0)){if(!z.approximately(u,0)){let d=-f/u;if(0<=d&&d<=1)return[d]}return[]}const l=2*s;if(z.approximately(l,0))return[];const c=u*u-4*s*f;if(c<0)return[];const h=Math.sqrt(c);return[(h-u)/l,-(u+h)/l].filter(function(d){return 0<=d&&d<=1})},bboxoverlap:function(e,n){const r=["x","y"],i=r.length;for(let o=0,a,s,u,f;o<i;o++)if(a=r[o],s=e[a].mid,u=n[a].mid,f=(e[a].size+n[a].size)/2,ee(s-u)>=f)return!1;return!0},expandbox:function(e,n){n.x.min<e.x.min&&(e.x.min=n.x.min),n.y.min<e.y.min&&(e.y.min=n.y.min),n.z&&n.z.min<e.z.min&&(e.z.min=n.z.min),n.x.max>e.x.max&&(e.x.max=n.x.max),n.y.max>e.y.max&&(e.y.max=n.y.max),n.z&&n.z.max>e.z.max&&(e.z.max=n.z.max),e.x.mid=(e.x.min+e.x.max)/2,e.y.mid=(e.y.min+e.y.max)/2,e.z&&(e.z.mid=(e.z.min+e.z.max)/2),e.x.size=e.x.max-e.x.min,e.y.size=e.y.max-e.y.min,e.z&&(e.z.size=e.z.max-e.z.min)},pairiteration:function(e,n,r){const i=e.bbox(),o=n.bbox(),a=1e5,s=r||.5;if(i.x.size+i.y.size<s&&o.x.size+o.y.size<s)return[(a*(e._t1+e._t2)/2|0)/a+"/"+(a*(n._t1+n._t2)/2|0)/a];let u=e.split(.5),f=n.split(.5),l=[{left:u.left,right:f.left},{left:u.left,right:f.right},{left:u.right,right:f.right},{left:u.right,right:f.left}];l=l.filter(function(h){return z.bboxoverlap(h.left.bbox(),h.right.bbox())});let c=[];return l.length===0||(l.forEach(function(h){c=c.concat(z.pairiteration(h.left,h.right,s))}),c=c.filter(function(h,d){return c.indexOf(h)===d})),c},getccenter:function(e,n,r){const i=n.x-e.x,o=n.y-e.y,a=r.x-n.x,s=r.y-n.y,u=i*Pt(jt)-o*Gt(jt),f=i*Gt(jt)+o*Pt(jt),l=a*Pt(jt)-s*Gt(jt),c=a*Gt(jt)+s*Pt(jt),h=(e.x+n.x)/2,d=(e.y+n.y)/2,p=(n.x+r.x)/2,y=(n.y+r.y)/2,v=h+u,_=d+f,g=p+l,w=y+c,T=z.lli8(h,d,v,_,p,y,g,w),x=z.dist(T,e);let b=ne(e.y-T.y,e.x-T.x),C=ne(n.y-T.y,n.x-T.x),S=ne(r.y-T.y,r.x-T.x),M;return b<S?((b>C||C>S)&&(b+=Ce),b>S&&(M=S,S=b,b=M)):S<C&&C<b?(M=S,S=b,b=M):S+=Ce,T.s=b,T.e=S,T.r=x,T},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:zr,max:Rr,cos:Oc,sin:Ec,acos:zc,sqrt:oe}=Math,Rc=Math.PI;class Z{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(v){typeof y[v]<"u"&&p.push(y[v])})}),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 f={x:r[p],y:r[p+1]};s&&(f.z=r[p+2]),u.push(f)}const l=this.order=u.length-1,c=this.dims=["x","y"];s&&c.push("z"),this.dimlen=c.length;const h=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 Z(r,r,i);if(o===1)return new Z(n,r,r);const a=Z.getABC(2,n,r,i,o);return new Z(n,a.A,i)}static cubicFromPoints(n,r,i,o,a){typeof o>"u"&&(o=.5);const s=Z.getABC(3,n,r,i,o);typeof a>"u"&&(a=z.dist(r,s.C));const u=a*(1-o)/o,f=z.dist(n,i),l=(i.x-n.x)/f,c=(i.y-n.y)/f,h=a*l,d=a*c,p=u*l,y=u*c,v={x:r.x-h,y:r.y-d},_={x:r.x+p,y:r.y+y},g=s.A,w={x:g.x+(v.x-g.x)/(1-o),y:g.y+(v.y-g.y)/(1-o)},T={x:g.x+(_.x-g.x)/o,y:g.y+(_.y-g.y)/o},x={x:n.x+(w.x-n.x)/o,y:n.y+(w.y-n.y)/o},b={x:i.x+(T.x-i.x)/(1-o),y:i.y+(T.y-i.y)/(1-o)};return new Z(n,x,b,i)}static getUtils(){return z}getUtils(){return Z.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,f={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-f.x)/l,y:i.y+(i.y-f.y)/l},B:i,C:f,S:r,E:o}}getABC(n,r){r=r||this.get(n);let i=this.points[0],o=this.points[this.order];return Z.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,f=.1/i;let l=o.mdist,c=s,h=c,d;l+=1;for(let p;c<u+f;c+=f)d=this.compute(c),p=z.dist(n,d),p<l&&(l=p,h=c);return h=h<0?0:h>1?1:h,d=this.compute(h),d.t=h,d.d=l,d}get(n){return this.compute(n)}point(n){return this.points[n]}compute(n){return this.ratios?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 Z(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 Z(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 f=[s.x*s.x,s.x*s.y-s.z,s.x*s.z+s.y,s.x*s.y+s.z,s.y*s.y,s.y*s.z-s.x,s.x*s.z-s.y,s.y*s.z+s.x,s.z*s.z];return{t:n,x:f[0]*r.x+f[1]*r.y+f[2]*r.z,y:f[3]*r.x+f[4]*r.y+f[5]*r.z,z:f[6]*r.x+f[7]*r.y+f[8]*r.z}}hull(n){let r=this.points,i=[],o=[],a=0;for(o[a++]=r[0],o[a++]=r[1],o[a++]=r[2],this.order===3&&(o[a++]=r[3]);r.length>1;){i=[];for(let s=0,u,f=r.length-1;s<f;s++)u=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 Z([i[0],i[3],i[5]]):new Z([i[0],i[4],i[7],i[9]]),right:this.order===2?new Z([i[5],i[4],i[2]]):new Z([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 Z(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(zc(i))<Rc/3}reduce(){let n,r=0,i=0,o=.01,a,s=[],u=[],f=this.extrema().values;for(f.indexOf(0)===-1&&(f=[0].concat(f)),f.indexOf(1)===-1&&f.push(1),r=f[0],n=1;n<f.length;n++)i=f[n],a=this.split(r,i),a._t1=r,a._t2=i,s.push(a),r=i;return s.forEach(function(l){for(r=0,i=0;i<=1;)for(i=r+o;i<=1+o;i+=o)if(a=l.split(r,i),!a.simple()){if(i-=o,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 Z(this.points.map((s,u)=>({x:s.x+n.x*a[u],y:s.y+n.y*a[u]})))}scale(n){const r=this.order;let i=!1;if(typeof n=="function"&&(i=n),i&&r===2)return this.raise().scale(i);const o=this.clockwise,a=this.points;if(this._linear)return this.translate(this.normal(0),i?i(0):n,i?i(1):n);const s=i?i(0):n,u=i?i(1):n,f=[this.offset(0,10),this.offset(1,10)],l=[],c=z.lli4(f[0],f[0].c,f[1],f[1].c);if(!c)throw new Error("cannot scale this curve. Try reducing it first.");return[0,1].forEach(function(h){const d=l[h*r]=z.copy(a[h*r]);d.x+=(h?u:s)*f[h].n.x,d.y+=(h?u:s)*f[h].n.y}),i?([0,1].forEach(function(h){if(!(r===2&&h)){var d=a[h+1],p={x:d.x-c.x,y:d.y-c.y},y=i?i((h+1)/r):n;i&&!o&&(y=-y);var v=oe(p.x*p.x+p.y*p.y);p.x/=v,p.y/=v,l[h+1]={x:d.x+y*p.x,y:d.y+y*p.y}}}),new Z(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,c,a[h+1])}),new Z(l))}outline(n,r,i,o){if(r=r===void 0?n:r,this._linear){const b=this.normal(0),C=this.points[0],S=this.points[this.points.length-1];let M,N,P;i===void 0&&(i=n,o=r),M={x:C.x+b.x*n,y:C.y+b.y*n},P={x:S.x+b.x*i,y:S.y+b.y*i},N={x:(M.x+P.x)/2,y:(M.y+P.y)/2};const R=[M,N,P];M={x:C.x-b.x*r,y:C.y-b.y*r},P={x:S.x-b.x*o,y:S.y-b.y*o},N={x:(M.x+P.x)/2,y:(M.y+P.y)/2};const D=[P,N,M],L=z.makeline(D[2],R[0]),A=z.makeline(R[2],D[0]),I=[L,new Z(R),A,new Z(D)];return new he(I)}const a=this.reduce(),s=a.length,u=[];let f=[],l,c=0,h=this.length();const d=typeof i<"u"&&typeof o<"u";function p(b,C,S,M,N){return function(P){const R=M/S,D=(M+N)/S,L=C-b;return z.map(P,0,1,b+R*L,b+D*L)}}a.forEach(function(b){const C=b.length();d?(u.push(b.scale(p(n,i,h,c,C))),f.push(b.scale(p(-r,-o,h,c,C)))):(u.push(b.scale(n)),f.push(b.scale(-r))),c+=C}),f=f.map(function(b){return l=b.points,l[3]?b.points=[l[3],l[2],l[1],l[0]]:b.points=[l[2],l[1],l[0]],b}).reverse();const y=u[0].points[0],v=u[s-1].points[u[s-1].points.length-1],_=f[s-1].points[f[s-1].points.length-1],g=f[0].points[0],w=z.makeline(_,y),T=z.makeline(v,g),x=[w].concat(u).concat([T]).concat(f);return new he(x)}outlineshapes(n,r,i){r=r||n;const o=this.outline(n,r).curves,a=[];for(let s=1,u=o.length;s<u/2;s++){const f=z.makeshape(o[s],o[u-s],i);f.startcap.virtual=s>1,f.endcap.virtual=s<u/2-1,a.push(f)}return a}intersects(n,r){return n?n.p1&&n.p2?this.lineIntersects(n):(n instanceof Z&&(n=n.reduce()),this.curveintersects(this.reduce(),n,r)):this.selfintersects(r)}lineIntersects(n){const r=zr(n.p1.x,n.p2.x),i=zr(n.p1.y,n.p2.y),o=Rr(n.p1.x,n.p2.x),a=Rr(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,f;a<i;a++)u=r.slice(a,a+1),f=r.slice(a+2),s=this.curveintersects(u,f,n),o.push(...s);return o}curveintersects(n,r,i){const o=[];n.forEach(function(s){r.forEach(function(u){s.overlaps(u)&&o.push({left:s,right:u})})});let a=[];return o.forEach(function(s){const u=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),f=z.dist(n,r),l=z.dist(n,s),c=z.dist(n,u);return ie(l-f)+ie(c-f)}_iterate(n,r){let i=0,o=1,a;do{a=0,o=1;let s=this.get(i),u,f,l,c,h=!1,d=!1,p,y=o,v=1;do if(d=h,c=l,y=(i+o)/2,u=this.get(y),f=this.get(o),l=z.getccenter(s,u,f),l.interval={start:i,end:o},h=this._error(l,s,i,o)<=n,p=d&&!h,p||(v=o),h){if(o>=1){if(l.interval.end=v=1,c=l,o>1){let g={x:l.x+l.r*Oc(l.e),y:l.y+l.r*Ec(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;c=c||l,r.push(c),i=v}while(o<1);return r}}function wn(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 Nc(e){if(Array.isArray(e))return e}function Ic(e){if(Array.isArray(e))return wn(e)}function Dc(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function jc(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,a,s,u=[],f=!0,l=!1;try{if(a=(r=r.call(e)).next,n!==0)for(;!(f=(i=a.call(r)).done)&&(u.push(i.value),u.length!==n);f=!0);}catch(c){l=!0,o=c}finally{try{if(!f&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(l)throw o}}return u}}function $c(){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 Fc(){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 Lc(e,n){if(e==null)return{};var r,i,o=Uc(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 Uc(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 Hc(e,n){return Nc(e)||jc(e,n)||Hi(e,n)||$c()}function qc(e){return Ic(e)||Dc(e)||Hi(e)||Fc()}function Gc(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 Vc(e){var n=Gc(e,"string");return typeof n=="symbol"?n:n+""}function Hi(e,n){if(e){if(typeof e=="string")return wn(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)?wn(e,n):void 0}}var Wc=(function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,o=(n instanceof Array?n.length?n:[void 0]:[n]).map(function(u){return{keyAccessor:u,isProp:!(u instanceof Function)}}),a=e.reduce(function(u,f){var l=u,c=f;return o.forEach(function(h,d){var p=h.keyAccessor,y=h.isProp,v;if(y){var _=c,g=_[p],w=Lc(_,[p].map(Vc));v=g,c=w}else v=p(c,d);d+1<o.length?(l.hasOwnProperty(v)||(l[v]={}),l=l[v]):r?(l.hasOwnProperty(v)||(l[v]=[]),l[v].push(c)):l[v]=c}),u},{});r instanceof Function&&(function u(f){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;l===o.length?Object.keys(f).forEach(function(c){return f[c]=r(f[c])}):Object.values(f).forEach(function(c){return u(c,l+1)})})(a);var s=a;return i&&(s=[],(function u(f){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];l.length===o.length?s.push({keys:l,vals:f}):Object.entries(f).forEach(function(c){var h=Hc(c,2),d=h[0],p=h[1];return u(p,[].concat(qc(l),[d]))})})(a),n instanceof Array&&n.length===0&&s.length===1&&(s[0].keys=[])),s});function Bc(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 Xc=Bc("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");function Yc(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=`.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;
}
`;Yc(Zc);function kn(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 Kc(e){if(Array.isArray(e))return e}function Qc(e){if(Array.isArray(e))return kn(e)}function Nr(e,n,r){if(qi())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=ih(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function qi(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(qi=function(){return!!e})()}function Jc(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=[],f=!0,l=!1;try{if(a=(r=r.call(e)).next,n!==0)for(;!(f=(i=a.call(r)).done)&&(u.push(i.value),u.length!==n);f=!0);}catch(c){l=!0,o=c}finally{try{if(!f&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(l)throw o}}return u}}function 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 Ir(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 Vt(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?Ir(Object(r),!0).forEach(function(i){ye(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ir(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function de(e,n){return Kc(e)||th(e,n)||Gi(e,n)||eh()}function gt(e){return Qc(e)||Jc(e)||Gi(e)||nh()}function rh(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 ih(e){var n=rh(e,"string");return typeof n=="symbol"?n:n+""}function Cn(e){"@babel/helpers - typeof";return Cn=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},Cn(e)}function Gi(e,n){if(e){if(typeof e=="string")return kn(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)?kn(e,n):void 0}}var oh=Qi(Xc);function Dr(e,n,r){!n||typeof r!="string"||e.filter(function(i){return!i[r]}).forEach(function(i){i[r]=oh(n(i))})}function ah(e,n){var r=e.nodes,i=e.links,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=o.nodeFilter,s=a===void 0?function(){return!0}:a,u=o.onLoopError,f=u===void 0?function(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,v=p.target,_=x(y),g=x(v);if(!l.hasOwnProperty(_))throw"Missing source node with id: ".concat(_);if(!l.hasOwnProperty(g))throw"Missing target node with id: ".concat(g);var w=l[_],T=l[g];w.out.push(T);function x(b){return Cn(b)==="object"?n(b):b}});var c=[];d(Object.values(l));var h=Object.assign.apply(Object,[{}].concat(gt(Object.entries(l).filter(function(p){var y=de(p,2),v=y[1];return!v.skip}).map(function(p){var y=de(p,2),v=y[0],_=y[1];return ye({},v,_.depth)}))));return h;function d(p){for(var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,_=function(){var x=p[g];if(y.indexOf(x)!==-1){var b=[].concat(gt(y.slice(y.indexOf(x))),[x]).map(function(C){return n(C.data)});return c.some(function(C){return C.length===b.length&&C.every(function(S,M){return S===b[M]})})||(c.push(b),f(b)),1}v>x.depth&&(x.depth=v,d(x.out,[].concat(gt(y),[x]),v+(x.skip?0:1)))},g=0,w=p.length;g<w;g++)_()}}var sh=2,rt=function(n,r){return r.onNeedsRedraw&&r.onNeedsRedraw()},jr=function(n,r){if(!r.isShadow){var i=W(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})}},He=zn({props:{graphData:{default:{nodes:[],links:[]},onChange:function(n,r){r.engineRunning=!1,jr(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:rt},nodeId:{default:"id"},nodeVal:{default:"val",triggerUpdate:!1,onChange:rt},nodeColor:{default:"color",triggerUpdate:!1,onChange:rt},nodeAutoColorBy:{},nodeCanvasObject:{triggerUpdate:!1,onChange:rt},nodeCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:rt},nodeVisibility:{default:!0,triggerUpdate:!1,onChange:rt},linkSource:{default:"source"},linkTarget:{default:"target"},linkVisibility:{default:!0,triggerUpdate:!1,onChange:rt},linkColor:{default:"color",triggerUpdate:!1,onChange:rt},linkAutoColorBy:{},linkLineDash:{triggerUpdate:!1,onChange:rt},linkWidth:{default:1,triggerUpdate:!1,onChange:rt},linkCurvature:{default:0,triggerUpdate:!1,onChange:rt},linkCanvasObject:{triggerUpdate:!1,onChange:rt},linkCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:rt},linkDirectionalArrowLength:{default:0,triggerUpdate:!1,onChange:rt},linkDirectionalArrowColor:{triggerUpdate:!1,onChange:rt},linkDirectionalArrowRelPos:{default:.5,triggerUpdate:!1,onChange:rt},linkDirectionalParticles:{default:0,triggerUpdate:!1,onChange:jr},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=W(n.nodeVisibility),f=W(n.nodeVal),l=W(n.nodeColor),c=W(n.nodeCanvasObjectMode),h=n.ctx,d=n.isShadow/n.globalScale,p=n.graphData.nodes.filter(u);h.save(),p.forEach(function(y){var v=c(y);if(n.nodeCanvasObject&&(v==="before"||v==="replace")&&(n.nodeCanvasObject(y,h,n.globalScale),v==="replace")){h.restore();return}var _=Math.sqrt(Math.max(0,f(y)||1))*n.nodeRelSize+d;h.beginPath(),h.arc(y.x,y.y,_,0,2*Math.PI,!1),h.fillStyle=l(y)||"rgba(31, 120, 180, 0.92)",h.fill(),n.nodeCanvasObject&&v==="after"&&n.nodeCanvasObject(y,n.ctx,n.globalScale)}),h.restore()}function o(){var u=W(n.linkVisibility),f=W(n.linkColor),l=W(n.linkWidth),c=W(n.linkLineDash),h=W(n.linkCurvature),d=W(n.linkCanvasObjectMode),p=n.ctx,y=n.isShadow*2,v=n.graphData.links.filter(u);v.forEach(C);var _=[],g=[],w=v;if(n.linkCanvasObject){var T=[],x=[];v.forEach(function(S){return({before:_,after:g,replace:T}[d(S)]||x).push(S)}),w=[].concat(gt(_),g,x),_=_.concat(T)}p.save(),_.forEach(function(S){return n.linkCanvasObject(S,p,n.globalScale)}),p.restore();var b=Wc(w,[f,l,c]);p.save(),Object.entries(b).forEach(function(S){var M=de(S,2),N=M[0],P=M[1],R=!N||N==="undefined"?"rgba(0,0,0,0.15)":N;Object.entries(P).forEach(function(D){var L=de(D,2),A=L[0],I=L[1],E=(A||1)/n.globalScale+y;Object.entries(I).forEach(function(k){var O=de(k,2);O[0];var j=O[1],$=c(j[0]);p.beginPath(),j.forEach(function(U){var F=U.source,q=U.target;if(!(!F||!q||!F.hasOwnProperty("x")||!q.hasOwnProperty("x"))){p.moveTo(F.x,F.y);var G=U.__controlPoints;G?p[G.length===2?"quadraticCurveTo":"bezierCurveTo"].apply(p,gt(G).concat([q.x,q.y])):p.lineTo(q.x,q.y)}}),p.strokeStyle=R,p.lineWidth=E,p.setLineDash($||[]),p.stroke()})})}),p.restore(),p.save(),g.forEach(function(S){return n.linkCanvasObject(S,p,n.globalScale)}),p.restore();function C(S){var M=h(S);if(!M){S.__controlPoints=null;return}var N=S.source,P=S.target;if(!(!N||!P||!N.hasOwnProperty("x")||!P.hasOwnProperty("x"))){var R=Math.sqrt(Math.pow(P.x-N.x,2)+Math.pow(P.y-N.y,2));if(R>0){var D=Math.atan2(P.y-N.y,P.x-N.x),L=R*M,A={x:(N.x+P.x)/2+L*Math.cos(D-Math.PI/2),y:(N.y+P.y)/2+L*Math.sin(D-Math.PI/2)};S.__controlPoints=[A.x,A.y]}else{var I=M*70;S.__controlPoints=[P.x,P.y-I,P.x+I,P.y]}}}}function a(){var u=1.6,f=.2,l=W(n.linkDirectionalArrowLength),c=W(n.linkDirectionalArrowRelPos),h=W(n.linkVisibility),d=W(n.linkDirectionalArrowColor||n.linkColor),p=W(n.nodeVal),y=n.ctx;y.save(),n.graphData.links.filter(h).forEach(function(v){var _=l(v);if(!(!_||_<0)){var g=v.source,w=v.target;if(!(!g||!w||!g.hasOwnProperty("x")||!w.hasOwnProperty("x"))){var T=Math.sqrt(Math.max(0,p(g)||1))*n.nodeRelSize,x=Math.sqrt(Math.max(0,p(w)||1))*n.nodeRelSize,b=Math.min(1,Math.max(0,c(v))),C=d(v)||"rgba(0,0,0,0.28)",S=_/u/2,M=v.__controlPoints&&Nr(Z,[g.x,g.y].concat(gt(v.__controlPoints),[w.x,w.y])),N=M?function(E){return M.get(E)}:function(E){return{x:g.x+(w.x-g.x)*E||0,y:g.y+(w.y-g.y)*E||0}},P=M?M.length():Math.sqrt(Math.pow(w.x-g.x,2)+Math.pow(w.y-g.y,2)),R=T+_+(P-T-x-_)*b,D=N(R/P),L=N((R-_)/P),A=N((R-_*(1-f))/P),I=Math.atan2(D.y-L.y,D.x-L.x)-Math.PI/2;y.beginPath(),y.moveTo(D.x,D.y),y.lineTo(L.x+S*Math.cos(I),L.y+S*Math.sin(I)),y.lineTo(A.x,A.y),y.lineTo(L.x-S*Math.cos(I),L.y-S*Math.sin(I)),y.fillStyle=C,y.fill()}}}),y.restore()}function s(){var u=W(n.linkDirectionalParticles),f=W(n.linkDirectionalParticleSpeed),l=W(n.linkDirectionalParticleOffset),c=W(n.linkDirectionalParticleWidth),h=W(n.linkVisibility),d=W(n.linkDirectionalParticleColor||n.linkColor),p=n.ctx;p.save(),n.graphData.links.filter(h).forEach(function(y){var v=u(y);if(!(!y.hasOwnProperty("__photons")||!y.__photons.length)){var _=y.source,g=y.target;if(!(!_||!g||!_.hasOwnProperty("x")||!g.hasOwnProperty("x"))){var w=f(y),T=Math.abs(l(y)),x=y.__photons||[],b=Math.max(0,c(y)/2)/Math.sqrt(n.globalScale),C=d(y)||"rgba(0,0,0,0.28)";p.fillStyle=C;var S=y.__controlPoints?Nr(Z,[_.x,_.y].concat(gt(y.__controlPoints),[g.x,g.y])):null,M=0,N=!1;x.forEach(function(P){var R=!!P.__singleHop;if(P.hasOwnProperty("__progressRatio")||(P.__progressRatio=R?w<0?1:0:(M+T)/v),!R&&M++,P.__progressRatio+=w,P.__progressRatio>=1||P.__progressRatio<0)if(!R)P.__progressRatio=P.__progressRatio%1,P.__progressRatio<0&&P.__progressRatio++;else{N=!0;return}var D=P.__progressRatio,L=S?S.get(D):{x:_.x+(g.x-_.x)*D||0,y:_.y+(g.y-_.y)*D||0};n.linkDirectionalParticleCanvasObject?n.linkDirectionalParticleCanvasObject(L.x,L.y,y,p,n.globalScale):(p.beginPath(),p.arc(L.x,L.y,b,0,2*Math.PI,!1),p.fill())}),N&&(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:Cc().force("link",yc()).force("charge",Ac()).force("center",vf()).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&&Dr(n.graphData.nodes,W(n.nodeAutoColorBy),n.nodeColor),n.linkAutoColorBy!==null&&Dr(n.graphData.links,W(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&&ah(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)*sh*(["radialin","radialout"].indexOf(n.dagMode)!==-1?.7:1);if(["lr","rl","td","bu"].includes(r.dagMode)){var u=["lr","rl"].includes(r.dagMode)?"fx":"fy";n.graphData.nodes.filter(n.dagNodeFilter).forEach(function(d){return delete d[u]})}if(["lr","rl","td","bu"].includes(n.dagMode)){var f=["rl","bu"].includes(n.dagMode),l=function(p){return(o[p[n.nodeId]]-a/2)*s*(f?-1:1)},c=["lr","rl"].includes(n.dagMode)?"fx":"fy";n.graphData.nodes.filter(n.dagNodeFilter).forEach(function(d){return d[c]=l(d)})}n.forceLayout.force("dagRadial",["radialin","radialout"].indexOf(n.dagMode)!==-1?Sc(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 Vi(e,n){var r=e instanceof Array?e:[e],i=new n;return i._destructor&&i._destructor(),{linkProp:function(a){return{default:i[a](),onChange:function(u,f){r.forEach(function(l){return f[l][a](u)})},triggerUpdate:!1}},linkMethod:function(a){return function(s){for(var u=arguments.length,f=new Array(u>1?u-1:0),l=1;l<u;l++)f[l-1]=arguments[l];var c=[];return r.forEach(function(h){var d=s[h],p=d[a].apply(d,f);p!==d&&c.push(p)}),c.length?c[0]:this}}}}var uh=800,lh=4,fh=5,Wi=Vi("forceGraph",He),ch=Vi(["forceGraph","shadowGraph"],He),hh=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,Wi.linkProp(e))})).concat(gt(["nodeRelSize","nodeId","nodeVal","nodeVisibility","linkSource","linkTarget","linkVisibility","linkCurvature"].map(function(e){return ye({},e,ch.linkProp(e))})))),dh=Object.assign.apply(Object,gt(["d3Force","d3ReheatSimulation","emitParticle"].map(function(e){return ye({},e,Wi.linkMethod(e))})));function rn(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 Bi(e){var n=window.devicePixelRatio;e.setTransform(n,0,0,n,0,0)}function $r(e,n,r){e.save(),Bi(e),e.clearRect(0,0,n,r),e.restore()}var ph=zn({props:Vt({width:{default:window.innerWidth,onChange:function(n,r){return rn(r)},triggerUpdate:!1},height:{default:window.innerHeight,onChange:function(n,r){return rn(r)},triggerUpdate:!1},graphData:{default:{nodes:[],links:[]},onChange:function(n,r){[n.nodes,n.links].every(function(o){return(o||[]).every(function(a){return!a.hasOwnProperty("__indexColor")})})&&r.colorTracker.reset(),[{type:"Node",objs:n.nodes},{type:"Link",objs:n.links}].forEach(i),r.forceGraph.graphData(n),r.shadowGraph.graphData(n);function i(o){var a=o.type,s=o.objs;s.filter(function(u){if(!u.hasOwnProperty("__indexColor"))return!0;var f=r.colorTracker.lookup(u.__indexColor);return!f||!f.hasOwnProperty("d")||f.d!==u}).forEach(function(u){u.__indexColor=r.colorTracker.register({type:a,d:u})})}},triggerUpdate:!1},backgroundColor:{onChange:function(n,r){r.canvas&&n&&(r.canvas.style.background=n)},triggerUpdate:!1},nodeLabel:{default:"name",triggerUpdate:!1},nodePointerAreaPaint:{onChange:function(n,r){r.shadowGraph.nodeCanvasObject(n?function(i,o,a){return n(i,i.__indexColor,o,a)}:null),r.flushShadowCanvas&&r.flushShadowCanvas()},triggerUpdate:!1},linkPointerAreaPaint:{onChange:function(n,r){r.shadowGraph.linkCanvasObject(n?function(i,o,a){return n(i,i.__indexColor,o,a)}:null),r.flushShadowCanvas&&r.flushShadowCanvas()},triggerUpdate:!1},linkLabel:{default:"name",triggerUpdate:!1},linkHoverPrecision:{default:4,triggerUpdate:!1},minZoom:{default:.01,onChange:function(n,r){r.zoom.scaleExtent([n,r.zoom.scaleExtent()[1]])},triggerUpdate:!1},maxZoom:{default:1e3,onChange:function(n,r){r.zoom.scaleExtent([r.zoom.scaleExtent()[0],n])},triggerUpdate:!1},enableNodeDrag:{default:!0,triggerUpdate:!1},enableZoomInteraction:{default:!0,triggerUpdate:!1},enablePanInteraction:{default:!0,triggerUpdate:!1},enableZoomPanInteraction:{default:!0,triggerUpdate:!1},enablePointerInteraction:{default:!0,onChange:function(n,r){r.hoverObj=null},triggerUpdate:!1},autoPauseRedraw:{default:!0,triggerUpdate:!1},onNodeDrag:{default:function(){},triggerUpdate:!1},onNodeDragEnd:{default:function(){},triggerUpdate:!1},onNodeClick:{triggerUpdate:!1},onNodeRightClick:{triggerUpdate:!1},onNodeHover:{triggerUpdate:!1},onLinkClick:{triggerUpdate:!1},onLinkRightClick:{triggerUpdate:!1},onLinkHover:{triggerUpdate:!1},onBackgroundClick:{triggerUpdate:!1},onBackgroundRightClick:{triggerUpdate:!1},showPointerCursor:{default:!0,triggerUpdate:!1},onZoom:{triggerUpdate:!1},onZoomEnd:{triggerUpdate:!1},onRenderFramePre:{triggerUpdate:!1},onRenderFramePost:{triggerUpdate:!1}},hh),aliases:{stopAnimation:"pauseAnimation"},methods:Vt({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 ur(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 f=mt(n.canvas);return{x:(n.width/2-f.x)/f.k,y:(n.height/2-f.y)/f.k}}function u(f){var l=f.x,c=f.y;n.zoom.translateTo(n.zoom.__baseElem,l===void 0?s().x:l,c===void 0?s().y:c),n.needsRedraw=!0}},zoom:function(n,r,i){if(!n.canvas)return null;if(r!==void 0)return i?n.tweenGroup.add(new ur({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 f={x:(u.x[0]+u.x[1])/2,y:(u.y[0]+u.y[1])/2},l=Math.max(1e-12,Math.min(1e12,(n.width-i*2)/(u.x[1]-u.x[0]),(n.height-i*2)/(u.y[1]-u.y[0])));this.centerAt(f.x,f.y,r),this.zoom(l,r)}return this},getGraphBbox:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){return!0},i=W(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:[Wn(a,function(s){return s.x-s.r}),Bn(a,function(s){return s.x+s.r})],y:[Wn(a,function(s){return s.y-s.r}),Bn(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:[]})}},dh),stateInit:function(){return{lastSetZoom:1,zoom:Mu(),forceGraph:new He,shadowGraph:new He().cooldownTicks(0).nodeColor("__indexColor").linkColor("__indexColor").isShadow(!0),colorTracker:new Xl,tweenGroup:new _i}},init:function(n,r){var i=this;n.innerHTML="";var o=document.createElement("div");o.classList.add("force-graph-container"),o.style.position="relative",n.appendChild(o),r.canvas=document.createElement("canvas"),r.backgroundColor&&(r.canvas.style.background=r.backgroundColor),o.appendChild(r.canvas),r.shadowCanvas=document.createElement("canvas");var a=r.canvas.getContext("2d"),s=r.shadowCanvas.getContext("2d",{willReadFrequently:!0}),u={x:-1e12,y:-1e12},f=function(){var h=null,d=window.devicePixelRatio,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(fs().subject(function(){if(!r.enableNodeDrag)return null;var c=f();return c&&c.type==="Node"?c.d:null}).on("start",function(c){var h=c.subject;h.__initialDragPos={x:h.x,y:h.y,fx:h.fx,fy:h.fy},c.active||(h.fx=h.x,h.fy=h.y),r.canvas.classList.add("grabbable")}).on("drag",function(c){var h=c.subject,d=h.__initialDragPos,p=c,y=mt(r.canvas).k,v={x:d.x+(p.x-d.x)/y-h.x,y:d.y+(p.y-d.y)/y-h.y};["x","y"].forEach(function(_){return h["f".concat(_)]=h[_]=d[_]+(p[_]-d[_])/y}),!(!h.__dragged&&fh>=Math.sqrt(eo(["x","y"].map(function(_){return Math.pow(c[_]-d[_],2)}))))&&(r.forceGraph.d3AlphaTarget(.3).resetCountdown(),r.isPointerDragging=!0,h.__dragged=!0,r.onNodeDrag(h,v))}).on("end",function(c){var h=c.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(c){return!c.button&&r.enableZoomPanInteraction&&(c.type!=="wheel"||W(r.enableZoomInteraction)(c))&&(c.type==="wheel"||W(r.enablePanInteraction)(c))}).on("zoom",function(c){var h=c.transform;[a,s].forEach(function(d){Bi(d),d.translate(h.x,h.y),d.scale(h.k,h.k)}),r.isPointerDragging=!0,r.onZoom&&r.onZoom(Vt(Vt({},h),i.centerAt())),r.needsRedraw=!0}).on("end",function(c){r.isPointerDragging=!1,r.onZoomEnd&&r.onZoomEnd(Vt(Vt({},c.transform),i.centerAt()))}),rn(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=lh/Math.cbrt(r.graphData.nodes.length)),r.needsRedraw=!0)}),r.tooltip=new _f(o),["pointermove","pointerdown"].forEach(function(c){return o.addEventListener(c,function(h){c==="pointerdown"&&(r.isPointerPressed=!0,r.pointerDownEvent=h),!r.isPointerDragging&&h.type==="pointermove"&&r.onBackgroundClick&&(h.pressure>0||r.isPointerPressed)&&(h.pointerType==="mouse"||h.movementX===void 0||[h.movementX,h.movementY].some(function(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 v=y.getBoundingClientRect(),_=window.pageXOffset||document.documentElement.scrollLeft,g=window.pageYOffset||document.documentElement.scrollTop;return{top:v.top+g,left:v.left+_}}},{passive:!0})}),o.addEventListener("pointerup",function(c){if(r.isPointerPressed){if(r.isPointerPressed=!1,r.isPointerDragging){r.isPointerDragging=!1;return}var h=[c,r.pointerDownEvent];requestAnimationFrame(function(){if(c.button===0)if(r.hoverObj){var d=r["on".concat(r.hoverObj.type,"Click")];d&&d.apply(void 0,[r.hoverObj.d].concat(h))}else r.onBackgroundClick&&r.onBackgroundClick.apply(r,h);if(c.button===2)if(r.hoverObj){var 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(c){return!r.onBackgroundRightClick&&!r.onNodeRightClick&&!r.onLinkRightClick?!0:(c.preventDefault(),!1)}),r.forceGraph(a),r.shadowGraph(s);var l=el(function(){$r(s,r.width,r.height),r.shadowGraph.linkWidth(function(h){return W(r.linkWidth)(h)+r.linkHoverPrecision});var c=mt(r.canvas);r.shadowGraph.globalScale(c.k).tickFrame()},uh);r.flushShadowCanvas=l.flush,(this._animationCycle=function c(){var h=!r.autoPauseRedraw||!!r.needsRedraw||r.forceGraph.isEngineRunning()||r.graphData.links.some(function(T){return T.__photons&&T.__photons.length});if(r.needsRedraw=!1,r.enablePointerInteraction){var d=r.isPointerDragging?null:f();if(d!==r.hoverObj){var p=r.hoverObj,y=p?p.type:null,v=d?d.type:null;if(y&&y!==v){var _=r["on".concat(y,"Hover")];_&&_(null,p.d)}if(v){var g=r["on".concat(v,"Hover")];g&&g(d.d,y===v?p.d:null)}r.tooltip.content(d&&W(r["".concat(d.type.toLowerCase(),"Label")])(d.d)||null),r.canvas.classList[(d&&r["on".concat(v,"Click")]||!d&&r.onBackgroundClick)&&W(r.showPointerCursor)(d==null?void 0:d.d)?"add":"remove"]("clickable"),r.hoverObj=d}h&&l()}if(h){$r(a,r.width,r.height);var w=mt(r.canvas).k;r.onRenderFramePre&&r.onRenderFramePre(a,w),r.forceGraph.globalScale(w).tickFrame(),r.onRenderFramePost&&r.onRenderFramePost(a,w)}r.tweenGroup.update(),r.animationFrameRequestId=requestAnimationFrame(c)})()},update:function(n){}}),on={exports:{}},an,Fr;function gh(){if(Fr)return an;Fr=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return an=e,an}var sn,Lr;function yh(){if(Lr)return sn;Lr=1;var e=gh();function n(){}function r(){}return r.resetWarningCache=n,sn=function(){function i(s,u,f,l,c,h){if(h!==e){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}i.isRequired=i;function o(){return i}var a={array:i,bigint:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:o,element:i,elementType:i,instanceOf:o,node:i,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:n};return a.PropTypes=a,a},sn}var Ur;function _h(){return Ur||(Ur=1,on.exports=yh()()),on.exports}var vh=_h();const m=Ji(vh),Ye={width:m.number,height:m.number,graphData:m.shape({nodes:m.arrayOf(m.object).isRequired,links:m.arrayOf(m.object).isRequired}),backgroundColor:m.string,nodeRelSize:m.number,nodeId:m.string,nodeLabel:m.oneOfType([m.string,m.func]),nodeVal:m.oneOfType([m.number,m.string,m.func]),nodeVisibility:m.oneOfType([m.bool,m.string,m.func]),nodeColor:m.oneOfType([m.string,m.func]),nodeAutoColorBy:m.oneOfType([m.string,m.func]),onNodeHover:m.func,onNodeClick:m.func,linkSource:m.string,linkTarget:m.string,linkLabel:m.oneOfType([m.string,m.func]),linkVisibility:m.oneOfType([m.bool,m.string,m.func]),linkColor:m.oneOfType([m.string,m.func]),linkAutoColorBy:m.oneOfType([m.string,m.func]),linkWidth:m.oneOfType([m.number,m.string,m.func]),linkCurvature:m.oneOfType([m.number,m.string,m.func]),linkDirectionalArrowLength:m.oneOfType([m.number,m.string,m.func]),linkDirectionalArrowColor:m.oneOfType([m.string,m.func]),linkDirectionalArrowRelPos:m.oneOfType([m.number,m.string,m.func]),linkDirectionalParticles:m.oneOfType([m.number,m.string,m.func]),linkDirectionalParticleSpeed:m.oneOfType([m.number,m.string,m.func]),linkDirectionalParticleOffset:m.oneOfType([m.number,m.string,m.func]),linkDirectionalParticleWidth:m.oneOfType([m.number,m.string,m.func]),linkDirectionalParticleColor:m.oneOfType([m.string,m.func]),onLinkHover:m.func,onLinkClick:m.func,dagMode:m.oneOf(["td","bu","lr","rl","zin","zout","radialin","radialout"]),dagLevelDistance:m.number,dagNodeFilter:m.func,onDagError:m.func,d3AlphaMin:m.number,d3AlphaDecay:m.number,d3VelocityDecay:m.number,warmupTicks:m.number,cooldownTicks:m.number,cooldownTime:m.number,onEngineTick:m.func,onEngineStop:m.func,getGraphBbox:m.func},Xi={zoomToFit:m.func,onNodeRightClick:m.func,onNodeDrag:m.func,onNodeDragEnd:m.func,onLinkRightClick:m.func,linkHoverPrecision:m.number,onBackgroundClick:m.func,onBackgroundRightClick:m.func,showPointerCursor:m.oneOfType([m.bool,m.func]),enablePointerInteraction:m.bool,enableNodeDrag:m.bool},Un={showNavInfo:m.bool,nodeOpacity:m.number,nodeResolution:m.number,nodeThreeObject:m.oneOfType([m.object,m.string,m.func]),nodeThreeObjectExtend:m.oneOfType([m.bool,m.string,m.func]),nodePositionUpdate:m.func,linkOpacity:m.number,linkResolution:m.number,linkCurveRotation:m.oneOfType([m.number,m.string,m.func]),linkMaterial:m.oneOfType([m.object,m.string,m.func]),linkThreeObject:m.oneOfType([m.object,m.string,m.func]),linkThreeObjectExtend:m.oneOfType([m.bool,m.string,m.func]),linkPositionUpdate:m.func,linkDirectionalArrowResolution:m.number,linkDirectionalParticleResolution:m.number,linkDirectionalParticleThreeObject:m.oneOfType([m.object,m.string,m.func]),forceEngine:m.oneOf(["d3","ngraph"]),ngraphPhysics:m.object,numDimensions:m.oneOf([1,2,3])},mh=Object.assign({},Ye,Xi,{linkLineDash:m.oneOfType([m.arrayOf(m.number),m.string,m.func]),nodeCanvasObjectMode:m.oneOfType([m.string,m.func]),nodeCanvasObject:m.func,nodePointerAreaPaint:m.func,linkCanvasObjectMode:m.oneOfType([m.string,m.func]),linkCanvasObject:m.func,linkPointerAreaPaint:m.func,linkDirectionalParticleCanvasObject:m.func,autoPauseRedraw:m.bool,minZoom:m.number,maxZoom:m.number,enableZoomInteraction:m.oneOfType([m.bool,m.func]),enablePanInteraction:m.oneOfType([m.bool,m.func]),onZoom:m.func,onZoomEnd:m.func,onRenderFramePre:m.func,onRenderFramePost:m.func});Object.assign({},Ye,Xi,Un,{enableNavigationControls:m.bool,controlType:m.oneOf(["trackball","orbit","fly"]),rendererConfig:m.object,extraRenderers:m.arrayOf(m.shape({render:m.func.isRequired}))});Object.assign({},Ye,Un,{nodeDesc:m.oneOfType([m.string,m.func]),linkDesc:m.oneOfType([m.string,m.func])});Object.assign({},Ye,Un,{markerAttrs:m.object,yOffset:m.number,glScale:m.number});const Hn=wo(ph,{methodNames:["emitParticle","d3Force","d3ReheatSimulation","stopAnimation","pauseAnimation","resumeAnimation","centerAt","zoom","zoomToFit","getGraphBbox","screen2GraphCoords","graph2ScreenCoords"]});Hn.displayName="ForceGraph2D";Hn.propTypes=mh;function wt(e){return function(){return e}}function Hr(e){return(e()-.5)*1e-6}function bh(e){return e.x+e.vx}function xh(e){return e.y+e.vy}function wh(e){var n,r,i,o=1,a=1;typeof e!="function"&&(e=wt(e==null?1:+e));function s(){for(var l,c=n.length,h,d,p,y,v,_,g=0;g<a;++g)for(h=$n(n,bh,xh).visitAfter(u),l=0;l<c;++l)d=n[l],v=r[d.index],_=v*v,p=d.x+d.vx,y=d.y+d.vy,h.visit(w);function w(T,x,b,C,S){var M=T.data,N=T.r,P=v+N;if(M){if(M.index>d.index){var R=p-M.x-M.vx,D=y-M.y-M.vy,L=R*R+D*D;L<P*P&&(R===0&&(R=Hr(i),L+=R*R),D===0&&(D=Hr(i),L+=D*D),L=(P-(L=Math.sqrt(L)))/L*o,d.vx+=(R*=L)*(P=(N*=N)/(_+N)),d.vy+=(D*=L)*P,M.vx-=R*(P=1-P),M.vy-=D*P)}return}return x>p+P||C<p-P||b>y+P||S<y-P}}function u(l){if(l.data)return l.r=r[l.data.index];for(var c=l.r=0;c<4;++c)l[c]&&l[c].r>l.r&&(l.r=l[c].r)}function f(){if(n){var l,c=n.length,h;for(r=new Array(c),l=0;l<c;++l)h=n[l],r[h.index]=+e(h,l,n)}}return s.initialize=function(l,c){n=l,i=c,f()},s.iterations=function(l){return arguments.length?(a=+l,s):a},s.strength=function(l){return arguments.length?(o=+l,s):o},s.radius=function(l){return arguments.length?(e=typeof l=="function"?l:wt(+l),f(),s):e},s}function kh(e){var n=wt(.1),r,i,o;typeof e!="function"&&(e=wt(e==null?0:+e));function a(u){for(var f=0,l=r.length,c;f<l;++f)c=r[f],c.vx+=(o[f]-c.x)*i[f]*u}function s(){if(r){var u,f=r.length;for(i=new Array(f),o=new Array(f),u=0;u<f;++u)i[u]=isNaN(o[u]=+e(r[u],u,r))?0:+n(r[u],u,r)}}return a.initialize=function(u){r=u,s()},a.strength=function(u){return arguments.length?(n=typeof u=="function"?u:wt(+u),s(),a):n},a.x=function(u){return arguments.length?(e=typeof u=="function"?u:wt(+u),s(),a):e},a}function Ch(e){var n=wt(.1),r,i,o;typeof e!="function"&&(e=wt(e==null?0:+e));function a(u){for(var f=0,l=r.length,c;f<l;++f)c=r[f],c.vy+=(o[f]-c.y)*i[f]*u}function s(){if(r){var u,f=r.length;for(i=new Array(f),o=new Array(f),u=0;u<f;++u)i[u]=isNaN(o[u]=+e(r[u],u,r))?0:+n(r[u],u,r)}}return a.initialize=function(u){r=u,s()},a.strength=function(u){return arguments.length?(n=typeof u=="function"?u:wt(+u),s(),a):n},a.y=function(u){return arguments.length?(e=typeof u=="function"?u:wt(+u),s(),a):e},a}const qr={identity:"#00f5ff",knowledge:"#3b82f6",rules:"#d946ef",events:"#fbbf24"},Gr={identity:"Identität",knowledge:"Wissen",rules:"Regeln",events:"Ereignisse"},Ah="rgba(99, 102, 241, 0.9)",Sh="rgba(100, 116, 139, 0.3)",Th={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)"},Mh={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)"},Ph={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)"},Oh={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)"},Eh={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 zh(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 Nh({data:e,selectedNodeId:n,onNodeSelect:r}){const[i,o]=V.useState(null),[a,s]=V.useState(.75),u=V.useRef(null),f=V.useRef(null),[l,c]=V.useState({width:500,height:560});V.useEffect(()=>{if(!u.current)return;const k=new ResizeObserver(O=>{for(let j of O)j.contentRect.width>0&&j.contentRect.height>0&&c({width:Math.floor(j.contentRect.width),height:Math.floor(j.contentRect.height)})});return k.observe(u.current),()=>k.disconnect()},[]);const h=V.useRef(new Map),d=V.useMemo(()=>{const k=h.current,O=new Set,j=e.nodes.map(F=>{O.add(F.id);let q=k.get(F.id);return q?(q.content!==F.content||q.category!==F.category)&&(q.content=F.content,q.category=F.category,q.__baseTextWidth=void 0):(q={...F},k.set(F.id,q)),q});for(const F of Array.from(k.keys()))O.has(F)||k.delete(F);const $=new Map(e.nodes.map(F=>[F.id,F.category])),U=e.edges.map(F=>({source:F.source,target:F.target,weight:F.weight||0,__sid:F.source,__tid:F.target,__sameCat:$.get(F.source)===$.get(F.target),__restColor:Th[$.get(F.source)??""]??Sh}));return{nodes:j,links:U}},[e]),p=V.useMemo(()=>{const k={};return e.edges.forEach(O=>{k[O.source]=(k[O.source]||0)+1,k[O.target]=(k[O.target]||0)+1}),k},[e]),y=k=>({identity:-240,knowledge:240,rules:-240,events:240})[k]||0,v=k=>({identity:-240,knowledge:-240,rules:240,events:240})[k]||0,_=V.useMemo(()=>`${e.nodes.map(k=>k.id).sort().join(",")}#${e.edges.length}`,[e]);V.useEffect(()=>{const k=f.current;if(!k)return;k.d3Force("center",null),k.d3Force("x",kh().x($=>y($.category)).strength(.1)),k.d3Force("y",Ch().y($=>v($.category)).strength(.1));const O=k.d3Force("charge");O&&O.strength(-380),k.d3Force("collide",wh().radius(28).iterations(2));const j=k.d3Force("link");j&&j.distance($=>$.__sameCat?70:200).strength($=>$.__sameCat?.3*($.weight||.6):.01),k.d3ReheatSimulation()},[_]);const g=i||n,w=V.useMemo(()=>d.links.filter(k=>k.__sameCat&&(k.weight||0)>=a).length,[d,a]),T=()=>{f.current&&f.current.zoomToFit(400,40)},x=V.useMemo(()=>{if(!g)return new Set;const k=new Set;return e.edges.forEach(O=>{O.source===g&&k.add(O.target),O.target===g&&k.add(O.source)}),k},[g,e]),b=V.useCallback(k=>g?k.__sid===g||k.__tid===g:k.__sameCat&&(k.weight||0)>=a,[g,a]),C=V.useCallback(k=>g&&(k.__sid===g||k.__tid===g)?Ah:k.__restColor,[g]),S=V.useCallback(k=>g&&(k.__sid===g||k.__tid===g)?2.5:1.4,[g]),M=V.useCallback(k=>g&&(k.__sid===g||k.__tid===g)?4:0,[g]),N=V.useCallback((k,O)=>{const j=f.current,$=u.current;if(!j||!$)return null;const U=$.getBoundingClientRect(),{x:F,y:q}=j.screen2GraphCoords(k-U.left,O-U.top),G=Math.max(j.zoom()||1,.01);let B=null,J=1/0;for(const Y of d.nodes){if(Y.x==null||Y.y==null)continue;const at=6+Math.min(p[Y.id]||0,15)*.8,tt=Math.max(at+3,16/G),qt=Y.x-F,At=Y.y-q,et=qt*qt+At*At;et<=tt*tt&&et<J&&(J=et,B=Y)}return B},[d,p]),P=V.useCallback(k=>{const O=k.target instanceof HTMLCanvasElement?N(k.clientX,k.clientY):null;o(O?O.id:null),u.current&&(u.current.style.cursor=O?"pointer":"default")},[N]),R=V.useCallback(()=>{o(null),u.current&&(u.current.style.cursor="default")},[]),D=V.useRef(null),L=V.useCallback(k=>{D.current={x:k.clientX,y:k.clientY}},[]),A=V.useCallback(k=>{if(!(k.target instanceof HTMLCanvasElement))return;const O=D.current;if(O&&Math.hypot(k.clientX-O.x,k.clientY-O.y)>6)return;const j=N(k.clientX,k.clientY);r(j?j.id:null)},[N,r]),I=V.useCallback((k,O)=>{var $;const j={};for(const U of d.nodes)U.x==null||U.y==null||(j[$=U.category]??(j[$]=[])).push([U.x,U.y]);for(const[U,F]of Object.entries(j)){const q=Ph[U];if(!q||F.length===0)continue;const G=zh(F);let B=0,J=0;G.forEach(tt=>{B+=tt[0],J+=tt[1]}),B/=G.length,J/=G.length;const Y=34;if(k.beginPath(),G.length<3)k.arc(B,J,Y+16,0,2*Math.PI);else{const tt=G.map(([et,ut])=>{const It=et-B,Zt=ut-J,Kt=Math.hypot(It,Zt)||1;return[et+It/Kt*Y,ut+Zt/Kt*Y]}),qt=(et,ut)=>[(et[0]+ut[0])/2,(et[1]+ut[1])/2],At=qt(tt[tt.length-1],tt[0]);k.moveTo(At[0],At[1]);for(let et=0;et<tt.length;et++){const ut=tt[et],It=qt(ut,tt[(et+1)%tt.length]);k.quadraticCurveTo(ut[0],ut[1],It[0],It[1])}k.closePath()}k.fillStyle=q,k.fill(),k.strokeStyle=Oh[U],k.lineWidth=1.2/Math.max(O,.3),k.stroke();const at=Math.min(...G.map(tt=>tt[1]));k.font='600 26px "Space Grotesk", sans-serif',k.textAlign="center",k.textBaseline="bottom",k.fillStyle=Eh[U],k.fillText(Gr[U]||U,B,at-Y-8)}},[d]),E=V.useCallback((k,O,j)=>{const $=k.x??0,U=k.y??0,F=6+Math.min(p[k.id]||0,15)*.8,q=qr[k.category]||"#64748b",G=k.id===i,B=k.id===n,J=g&&k.id!==g&&!x.has(k.id),Y=J?"#1e293b":q;if(J||(O.beginPath(),O.arc($,U,F*1.9,0,2*Math.PI,!1),O.fillStyle=Mh[k.category]||"rgba(100, 116, 139, 0.14)",O.fill()),(G||B)&&(O.shadowColor=q,O.shadowBlur=15),O.beginPath(),O.arc($,U,F,0,2*Math.PI,!1),O.fillStyle=Y,O.fill(),O.shadowBlur=0,(G||B)&&(O.beginPath(),O.arc($,U,F+2.5,0,2*Math.PI,!1),O.strokeStyle=B?"#ffffff":"rgba(255, 255, 255, 0.7)",O.lineWidth=1.5,O.stroke()),G||B||g&&x.has(k.id)){const tt=k.content.length>35?k.content.slice(0,34)+"…":k.content;if(k.__baseTextWidth===void 0){const Yi=O.font;O.font='500 10px "Space Grotesk", sans-serif',k.__baseTextWidth=O.measureText(tt).width,O.font=Yi}const At=(G||B?10.5:9.5)/Math.max(.5,j);O.font=`${G||B?"bold":"500"} ${At}px "Space Grotesk", sans-serif`;const et=k.__baseTextWidth*(At/10),ut=4.5/Math.max(.5,j),It=$-et/2-ut,Zt=U+F+6/Math.max(.5,j),Kt=et+ut*2,qn=At+ut*1.6;O.fillStyle=J?"rgba(10, 15, 25, 0.45)":"rgba(8, 12, 20, 0.88)",O.fillRect(It,Zt,Kt,qn),O.strokeStyle=G||B?"rgba(255, 255, 255, 0.2)":"rgba(255, 255, 255, 0.08)",O.lineWidth=.6/Math.max(.5,j),O.strokeRect(It,Zt,Kt,qn),O.textAlign="center",O.textBaseline="top",O.fillStyle=J?"#475569":G||B?"#ffffff":"#cbd5e1",O.fillText(tt,$,U+F+7/Math.max(.5,j))}},[p,i,n,g,x]);return lt.jsxs("div",{className:"absolute inset-0",ref:u,onPointerMove:P,onPointerLeave:R,onPointerDown:L,onClick:A,style:{background:"radial-gradient(circle at center, rgba(59, 130, 246, 0.08) 0%, #030712 100%)"},children:[lt.jsx(Hn,{ref:f,width:l.width,height:l.height,graphData:d,backgroundColor:"rgba(0,0,0,0)",cooldownTicks:120,enablePointerInteraction:!1,enableNodeDrag:!1,onRenderFramePre:I,linkVisibility:b,linkColor:C,linkWidth:S,linkDirectionalParticles:M,linkDirectionalParticleWidth:2.2,linkDirectionalParticleSpeed:.006,nodeCanvasObject:E}),lt.jsxs("button",{onClick:T,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:[lt.jsx(to,{className:"h-3.5 w-3.5"})," Zentrieren"]}),lt.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(Gr).map(([k,O])=>lt.jsxs("span",{className:"flex items-center gap-1 text-[10px] text-muted-foreground",children:[lt.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:qr[k]}}),O]},k)),lt.jsxs("label",{className:"flex items-center gap-1.5 text-[10px] text-muted-foreground border-l border-border/40 pl-3",children:[lt.jsx("span",{children:"Verbindungen"}),lt.jsx("span",{className:"text-[9px] text-muted-foreground/60",children:"alle"}),lt.jsx("input",{type:"range",min:.45,max:.95,step:.05,value:a,onChange:k=>s(Number(k.target.value)),className:"w-20 accent-primary cursor-pointer",title:"Nur Verbindungen ab dieser Stärke zeigen"}),lt.jsx("span",{className:"text-[9px] text-muted-foreground/60",children:"stark"}),lt.jsx("span",{className:"font-mono text-[9px] text-muted-foreground/80 min-w-[3ch] text-right",children:w})]})]})]})}export{Nh as GraphView};