@inkeep/open-knowledge 0.0.0-dev-20260422103101 → 0.0.0-dev-20260422171440

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/dist/cli.mjs +4 -4
  2. package/dist/constants-BsBTeRCL.mjs +2 -0
  3. package/dist/index.mjs +1 -1
  4. package/dist/init-B6Ufq752.mjs +1 -0
  5. package/dist/{init-d9wf2ATC.mjs → init-CM66xil2.mjs} +3 -3
  6. package/dist/{init-BwRnDaUa.mjs → init-DrSlBesI.mjs} +2 -2
  7. package/dist/init-DrW3fwT1.mjs +1 -0
  8. package/dist/{loader-X2UYTNqe.mjs → loader-CYvz6nef.mjs} +2 -2
  9. package/dist/loader-CiFIlkkp.mjs +1 -0
  10. package/dist/{paths-DYcYIqx2.mjs → paths-D6Xgg5WG.mjs} +2 -2
  11. package/dist/paths-Szv_tZj8.mjs +1 -0
  12. package/dist/{preview-CG6UE3J0.mjs → preview-CRZPJMbg.mjs} +2 -2
  13. package/dist/preview-CT7B_1hJ.mjs +1 -0
  14. package/dist/public/assets/GraphPanel-DqKpB1Tz.js +46 -0
  15. package/dist/public/assets/SourceEditor-CV7AqTwb.js +3 -0
  16. package/dist/public/assets/clipboard-D_fdmuyh.js +80 -0
  17. package/dist/public/assets/dist-BXy0xauE.js +1 -0
  18. package/dist/public/assets/dist-BZpbe8U5.js +1 -0
  19. package/dist/public/assets/dist-C0ssNH5f.js +9 -0
  20. package/dist/public/assets/dist-C5cYj6hk.js +1 -0
  21. package/dist/public/assets/dist-CYCPSCCQ.js +1 -0
  22. package/dist/public/assets/dist-CtX4SukE.js +13 -0
  23. package/dist/public/assets/dist-ztaVC3x4.js +1 -0
  24. package/dist/public/assets/index-Cc7W6NSO.js +17 -0
  25. package/dist/public/assets/panel-DFRQJTBG.js +240 -0
  26. package/dist/public/assets/toggle-group-D4a_dmpa.js +1 -0
  27. package/dist/public/assets/w3c-keyname-DLDSJn4E.js +1 -0
  28. package/dist/public/index.html +8 -4
  29. package/dist/src-vp93REiw.mjs +1 -0
  30. package/dist/start-CrLEzGrk.mjs +1 -0
  31. package/dist/{start-DHi9coRg.mjs → start-Dtc5s628.mjs} +2 -2
  32. package/package.json +1 -1
  33. package/dist/constants-BVlXdKF2.mjs +0 -2
  34. package/dist/init-BEXFKO6K.mjs +0 -1
  35. package/dist/init-CXKU8pCL.mjs +0 -1
  36. package/dist/loader-Ck0aVV42.mjs +0 -1
  37. package/dist/paths-BIn1dA04.mjs +0 -1
  38. package/dist/preview-CWlYVyE-.mjs +0 -1
  39. package/dist/public/assets/dist-4KUZ8qw_.js +0 -1
  40. package/dist/public/assets/dist-Bvlmbwcy.js +0 -1
  41. package/dist/public/assets/dist-CWsgPYc6.js +0 -13
  42. package/dist/public/assets/dist-D5yBWykF.js +0 -1
  43. package/dist/public/assets/dist-DcQNS1eS.js +0 -1
  44. package/dist/public/assets/dist-DvCIPVI0.js +0 -9
  45. package/dist/public/assets/dist-csWIvcml.js +0 -1
  46. package/dist/public/assets/dist-saWP7AQm.js +0 -1
  47. package/dist/public/assets/index-Baf8TpjF.js +0 -381
  48. package/dist/src-2kqr_sLQ.mjs +0 -1
  49. package/dist/start-BqWssZGZ.mjs +0 -1
  50. /package/dist/public/assets/{go-B8kgVkyB.js → go-IODVg4Ok.js} +0 -0
  51. /package/dist/public/assets/{shell-BsPlf5L6.js → shell-COsTRxlr.js} +0 -0
@@ -0,0 +1,46 @@
1
+ import{G as e,Hn as n,Lt as r,W as i,Wn as a,_n as o,a as s,bn as c,d as l,fn as u,gn as d,h as f,i as p,l as m,n as h,o as g,ot as _,pn as v,r as y,s as b,t as x,xn as S}from"./panel-DFRQJTBG.js";import{a as C,b as w,i as T,n as E,r as ee,s as te,t as ne,x as re,y as ie}from"./toggle-group-D4a_dmpa.js";var ae=u(`maximize-2`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]),oe=u(`minimize-2`,[[`path`,{d:`m14 10 7-7`,key:`oa77jy`}],[`path`,{d:`M20 10h-6V4`,key:`mjg0md`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M4 14h6v6`,key:`rmj7iw`}]]),D=a(S(),1),se=v(),ce=[`#60a5fa`,`#a78bfa`,`#34d399`,`#f472b6`,`#fb923c`,`#22d3ee`,`#c084fc`,`#4ade80`,`#f87171`,`#eab308`,`#ec4899`,`#06b67f`,`#8b5cf6`,`#f43f5e`,`#0ea5e9`,`#a855f7`],le=[`#1e40af`,`#6b21a8`,`#166534`,`#9f1239`,`#9a3412`,`#164e63`,`#581c87`,`#166534`,`#991b1b`,`#854d0e`,`#831843`,`#0f766e`,`#312e81`,`#9f1239`,`#0c4a6e`,`#6b21a8`];function ue(e){let n=2;for(let r=0;r<e.length;r++)n=Math.imul(n^e.charCodeAt(r),1540483477),n^=n>>>13,n=Math.imul(n,1540483477),n^=n>>>15;return n>>>0}function de(e,n){let r=n?ce:le;return r[ue(e)%r.length]}var O=c(),fe=10;function pe(e){let n=(0,se.c)(17),{clusters:r}=e,{resolvedTheme:i}=d(),a=i===`dark`;if(r.length===0)return null;let o,s,c,l;if(n[0]!==r||n[1]!==a){let e=r.slice(0,fe);o=r.length-e.length,s=`absolute bottom-3 left-3 z-10 flex flex-col gap-1 rounded-lg px-3 py-2 text-xs backdrop-blur-sm ${a?`bg-black/70 text-gray-200`:`bg-white/80 text-gray-800 ring-1 ring-black/5`}`;let i=`font-medium mb-1.5 ${a?`text-slate-300`:`text-slate-700`}`;n[6]===i?c=n[7]:(c=(0,O.jsx)(`div`,{className:i,children:`Clusters`}),n[6]=i,n[7]=c);let u;n[8]===a?u=n[9]:(u=e=>(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsx)(`span`,{className:`inline-block size-2.5 shrink-0 rounded-full`,style:{backgroundColor:de(e,a)}}),(0,O.jsx)(`span`,{className:`truncate max-w-[140px]`,children:e})]},e),n[8]=a,n[9]=u),l=e.map(u),n[0]=r,n[1]=a,n[2]=o,n[3]=s,n[4]=c,n[5]=l}else o=n[2],s=n[3],c=n[4],l=n[5];let u;n[10]===o?u=n[11]:(u=o>0&&(0,O.jsxs)(`div`,{className:`text-muted-foreground pl-[18px]`,children:[`+ `,o,` more`]}),n[10]=o,n[11]=u);let f;return n[12]!==s||n[13]!==c||n[14]!==l||n[15]!==u?(f=(0,O.jsxs)(`div`,{className:s,children:[c,l,u]}),n[12]=s,n[13]=c,n[14]=l,n[15]=u,n[16]=f):f=n[16],f}function me(e,n){var r=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(r!=null){var i,a,o,s,c=[],l=!0,u=!1;try{if(o=(r=r.call(e)).next,n===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=o.call(r)).done)&&(c.push(i.value),c.length!==n);l=!0);}catch(e){u=!0,a=e}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return c}}function he(e,n,r){return n=Ce(n),n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function ge(e,n){return ye(e)||me(e,n)||k(e,n)||Se()}function _e(e){return ve(e)||be(e)||k(e)||xe()}function ve(e){if(Array.isArray(e))return A(e)}function ye(e){if(Array.isArray(e))return e}function be(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function k(e,n){if(e){if(typeof e==`string`)return A(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 A(e,n)}}function A(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 xe(){throw TypeError(`Invalid attempt to spread non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Se(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
3
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function j(e,n){if(typeof e!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n||`default`);if(typeof i!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(e)}function Ce(e){var n=j(e,`string`);return typeof n==`symbol`?n:String(n)}var we=function(e,n){var r=new Set(n);return Object.assign.apply(Object,[{}].concat(_e(Object.entries(e).filter(function(e){var n=ge(e,1)[0];return!r.has(n)}).map(function(e){var n=ge(e,2),r=n[0],i=n[1];return he({},r,i)}))))};function M(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 Te(e){if(Array.isArray(e))return e}function Ee(e){if(Array.isArray(e))return M(e)}function De(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function Oe(e,n){var r=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(r!=null){var i,a,o,s,c=[],l=!0,u=!1;try{if(o=(r=r.call(e)).next,n!==0)for(;!(l=(i=o.call(r)).done)&&(c.push(i.value),c.length!==n);l=!0);}catch(e){u=!0,a=e}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return c}}function ke(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
4
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ae(){throw TypeError(`Invalid attempt to spread non-iterable instance.
5
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function je(e,n){return Te(e)||Oe(e,n)||Ne(e,n)||ke()}function Me(e){return Ee(e)||De(e)||Ne(e)||Ae()}function Ne(e,n){if(e){if(typeof e==`string`)return M(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)?M(e,n):void 0}}function Pe(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.wrapperElementType,i=r===void 0?`div`:r,a=n.nodeMapper,o=a===void 0?function(e){return e}:a,s=n.methodNames,c=s===void 0?[]:s,l=n.initPropNames,u=l===void 0?[]:l;return(0,D.forwardRef)(function(n,r){var a=(0,D.useRef)(),s=(0,D.useMemo)(function(){return e(Object.fromEntries(u.filter(function(e){return n.hasOwnProperty(e)}).map(function(e){return[e,n[e]]})))},[]);Fe(function(){s(o(a.current))},D.useLayoutEffect),Fe(function(){return s._destructor instanceof Function?s._destructor:void 0});var l=(0,D.useCallback)(function(e){var n=[...arguments].slice(1);return s[e]instanceof Function?s[e].apply(s,n):void 0},[s]),d=(0,D.useRef)({});return Object.keys(we(n,[].concat(Me(c),Me(u)))).filter(function(e){return d.current[e]!==n[e]}).forEach(function(e){return l(e,n[e])}),d.current=n,(0,D.useImperativeHandle)(r,function(){return Object.fromEntries(c.map(function(e){return[e,function(){var n=[...arguments];return l.apply(void 0,[e].concat(n))}]}))},[l]),D.createElement(i,{ref:a})})}function Fe(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:D.useEffect,r=(0,D.useRef)(),i=(0,D.useRef)(!1),a=(0,D.useRef)(!1),o=je((0,D.useState)(0),2);o[0];var s=o[1];i.current&&(a.current=!0),n(function(){return i.current||=(r.current=e(),!0),s(function(e){return e+1}),function(){a.current&&r.current&&r.current()}},[])}var Ie={svg:`http://www.w3.org/2000/svg`,xhtml:`http://www.w3.org/1999/xhtml`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`};function Le(e){var n=e+=``,r=n.indexOf(`:`);return r>=0&&(n=e.slice(0,r))!==`xmlns`&&(e=e.slice(r+1)),Ie.hasOwnProperty(n)?{space:Ie[n],local:e}:e}function Re(e){return function(){var n=this.ownerDocument,r=this.namespaceURI;return r===`http://www.w3.org/1999/xhtml`&&n.documentElement.namespaceURI===`http://www.w3.org/1999/xhtml`?n.createElement(e):n.createElementNS(r,e)}}function ze(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function N(e){var n=Le(e);return(n.local?ze:Re)(n)}function Be(){}function P(e){return e==null?Be:function(){return this.querySelector(e)}}function F(e){typeof e!=`function`&&(e=P(e));for(var n=this._groups,r=n.length,i=Array(r),a=0;a<r;++a)for(var o=n[a],s=o.length,c=i[a]=Array(s),l,u,d=0;d<s;++d)(l=o[d])&&(u=e.call(l,l.__data__,d,o))&&(`__data__`in l&&(u.__data__=l.__data__),c[d]=u);return new R(i,this._parents)}function I(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Ve(){return[]}function He(e){return e==null?Ve:function(){return this.querySelectorAll(e)}}function Ue(e){return function(){return I(e.apply(this,arguments))}}function L(e){e=typeof e==`function`?Ue(e):He(e);for(var n=this._groups,r=n.length,i=[],a=[],o=0;o<r;++o)for(var s=n[o],c=s.length,l,u=0;u<c;++u)(l=s[u])&&(i.push(e.call(l,l.__data__,u,s)),a.push(l));return new R(i,a)}function We(e){return function(){return this.matches(e)}}function Ge(e){return function(n){return n.matches(e)}}var Ke=Array.prototype.find;function qe(e){return function(){return Ke.call(this.children,e)}}function Je(){return this.firstElementChild}function Ye(e){return this.select(e==null?Je:qe(typeof e==`function`?e:Ge(e)))}var Xe=Array.prototype.filter;function Ze(){return Array.from(this.children)}function Qe(e){return function(){return Xe.call(this.children,e)}}function $e(e){return this.selectAll(e==null?Ze:Qe(typeof e==`function`?e:Ge(e)))}function et(e){typeof e!=`function`&&(e=We(e));for(var n=this._groups,r=n.length,i=Array(r),a=0;a<r;++a)for(var o=n[a],s=o.length,c=i[a]=[],l,u=0;u<s;++u)(l=o[u])&&e.call(l,l.__data__,u,o)&&c.push(l);return new R(i,this._parents)}function tt(e){return Array(e.length)}function nt(){return new R(this._enter||this._groups.map(tt),this._parents)}function rt(e,n){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=n}rt.prototype={constructor:rt,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 it(e){return function(){return e}}function at(e,n,r,i,a,o){for(var s=0,c,l=n.length,u=o.length;s<u;++s)(c=n[s])?(c.__data__=o[s],i[s]=c):r[s]=new rt(e,o[s]);for(;s<l;++s)(c=n[s])&&(a[s]=c)}function ot(e,n,r,i,a,o,s){var c,l,u=new Map,d=n.length,f=o.length,p=Array(d),m;for(c=0;c<d;++c)(l=n[c])&&(p[c]=m=s.call(l,l.__data__,c,n)+``,u.has(m)?a[c]=l:u.set(m,l));for(c=0;c<f;++c)m=s.call(e,o[c],c,o)+``,(l=u.get(m))?(i[c]=l,l.__data__=o[c],u.delete(m)):r[c]=new rt(e,o[c]);for(c=0;c<d;++c)(l=n[c])&&u.get(p[c])===l&&(a[c]=l)}function st(e){return e.__data__}function ct(e,n){if(!arguments.length)return Array.from(this,st);var r=n?ot:at,i=this._parents,a=this._groups;typeof e!=`function`&&(e=it(e));for(var o=a.length,s=Array(o),c=Array(o),l=Array(o),u=0;u<o;++u){var d=i[u],f=a[u],p=f.length,m=lt(e.call(d,d&&d.__data__,u,i)),h=m.length,g=c[u]=Array(h),_=s[u]=Array(h);r(d,f,g,_,l[u]=Array(p),m,n);for(var v=0,y=0,b,x;v<h;++v)if(b=g[v]){for(v>=y&&(y=v+1);!(x=_[y])&&++y<h;);b._next=x||null}}return s=new R(s,i),s._enter=c,s._exit=l,s}function lt(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function ut(){return new R(this._exit||this._groups.map(tt),this._parents)}function dt(e,n,r){var i=this.enter(),a=this,o=this.exit();return typeof e==`function`?(i=e(i),i&&=i.selection()):i=i.append(e+``),n!=null&&(a=n(a),a&&=a.selection()),r==null?o.remove():r(o),i&&a?i.merge(a).order():a}function ft(e){for(var n=e.selection?e.selection():e,r=this._groups,i=n._groups,a=r.length,o=i.length,s=Math.min(a,o),c=Array(a),l=0;l<s;++l)for(var u=r[l],d=i[l],f=u.length,p=c[l]=Array(f),m,h=0;h<f;++h)(m=u[h]||d[h])&&(p[h]=m);for(;l<a;++l)c[l]=r[l];return new R(c,this._parents)}function pt(){for(var e=this._groups,n=-1,r=e.length;++n<r;)for(var i=e[n],a=i.length-1,o=i[a],s;--a>=0;)(s=i[a])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function mt(e){e||=ht;function n(n,r){return n&&r?e(n.__data__,r.__data__):!n-!r}for(var r=this._groups,i=r.length,a=Array(i),o=0;o<i;++o){for(var s=r[o],c=s.length,l=a[o]=Array(c),u,d=0;d<c;++d)(u=s[d])&&(l[d]=u);l.sort(n)}return new R(a,this._parents).order()}function ht(e,n){return e<n?-1:e>n?1:e>=n?0:NaN}function gt(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function _t(){return Array.from(this)}function vt(){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],a=0,o=i.length;a<o;++a){var s=i[a];if(s)return s}return null}function yt(){let e=0;for(let n of this)++e;return e}function bt(){return!this.node()}function xt(e){for(var n=this._groups,r=0,i=n.length;r<i;++r)for(var a=n[r],o=0,s=a.length,c;o<s;++o)(c=a[o])&&e.call(c,c.__data__,o,a);return this}function St(e){return function(){this.removeAttribute(e)}}function Ct(e){return function(){this.removeAttributeNS(e.space,e.local)}}function wt(e,n){return function(){this.setAttribute(e,n)}}function Tt(e,n){return function(){this.setAttributeNS(e.space,e.local,n)}}function Et(e,n){return function(){var r=n.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function Dt(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 Ot(e,n){var r=Le(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?Ct:St:typeof n==`function`?r.local?Dt:Et:r.local?Tt:wt)(r,n))}function kt(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function At(e){return function(){this.style.removeProperty(e)}}function jt(e,n,r){return function(){this.style.setProperty(e,n,r)}}function Mt(e,n,r){return function(){var i=n.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function Nt(e,n,r){return arguments.length>1?this.each((n==null?At:typeof n==`function`?Mt:jt)(e,n,r??``)):Pt(this.node(),e)}function Pt(e,n){return e.style.getPropertyValue(n)||kt(e).getComputedStyle(e,null).getPropertyValue(n)}function Ft(e){return function(){delete this[e]}}function It(e,n){return function(){this[e]=n}}function Lt(e,n){return function(){var r=n.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function Rt(e,n){return arguments.length>1?this.each((n==null?Ft:typeof n==`function`?Lt:It)(e,n)):this.node()[e]}function zt(e){return e.trim().split(/^|\s+/)}function Bt(e){return e.classList||new Vt(e)}function Vt(e){this._node=e,this._names=zt(e.getAttribute(`class`)||``)}Vt.prototype={add:function(e){this._names.indexOf(e)<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 Ht(e,n){for(var r=Bt(e),i=-1,a=n.length;++i<a;)r.add(n[i])}function Ut(e,n){for(var r=Bt(e),i=-1,a=n.length;++i<a;)r.remove(n[i])}function Wt(e){return function(){Ht(this,e)}}function Gt(e){return function(){Ut(this,e)}}function Kt(e,n){return function(){(n.apply(this,arguments)?Ht:Ut)(this,e)}}function qt(e,n){var r=zt(e+``);if(arguments.length<2){for(var i=Bt(this.node()),a=-1,o=r.length;++a<o;)if(!i.contains(r[a]))return!1;return!0}return this.each((typeof n==`function`?Kt:n?Wt:Gt)(r,n))}function Jt(){this.textContent=``}function Yt(e){return function(){this.textContent=e}}function Xt(e){return function(){this.textContent=e.apply(this,arguments)??``}}function Zt(e){return arguments.length?this.each(e==null?Jt:(typeof e==`function`?Xt:Yt)(e)):this.node().textContent}function Qt(){this.innerHTML=``}function $t(e){return function(){this.innerHTML=e}}function en(e){return function(){this.innerHTML=e.apply(this,arguments)??``}}function tn(e){return arguments.length?this.each(e==null?Qt:(typeof e==`function`?en:$t)(e)):this.node().innerHTML}function nn(){this.nextSibling&&this.parentNode.appendChild(this)}function rn(){return this.each(nn)}function an(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function on(){return this.each(an)}function sn(e){var n=typeof e==`function`?e:N(e);return this.select(function(){return this.appendChild(n.apply(this,arguments))})}function cn(){return null}function ln(e,n){var r=typeof e==`function`?e:N(e),i=n==null?cn:typeof n==`function`?n:P(n);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function un(){var e=this.parentNode;e&&e.removeChild(this)}function dn(){return this.each(un)}function fn(){var e=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(e,this.nextSibling):e}function pn(){var e=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(e,this.nextSibling):e}function mn(e){return this.select(e?pn:fn)}function hn(e){return arguments.length?this.property(`__data__`,e):this.node().__data__}function gn(e){return function(n){e.call(this,n,this.__data__)}}function _n(e){return e.trim().split(/^|\s+/).map(function(e){var n=``,r=e.indexOf(`.`);return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function vn(e){return function(){var n=this.__on;if(n){for(var r=0,i=-1,a=n.length,o;r<a;++r)o=n[r],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):n[++i]=o;++i?n.length=i:delete this.__on}}}function yn(e,n,r){return function(){var i=this.__on,a,o=gn(n);if(i){for(var s=0,c=i.length;s<c;++s)if((a=i[s]).type===e.type&&a.name===e.name){this.removeEventListener(a.type,a.listener,a.options),this.addEventListener(a.type,a.listener=o,a.options=r),a.value=n;return}}this.addEventListener(e.type,o,r),a={type:e.type,name:e.name,value:n,listener:o,options:r},i?i.push(a):this.__on=[a]}}function bn(e,n,r){var i=_n(e+``),a,o=i.length,s;if(arguments.length<2){var c=this.node().__on;if(c){for(var l=0,u=c.length,d;l<u;++l)for(a=0,d=c[l];a<o;++a)if((s=i[a]).type===d.type&&s.name===d.name)return d.value}return}for(c=n?yn:vn,a=0;a<o;++a)this.each(c(i[a],n,r));return this}function xn(e,n,r){var i=kt(e),a=i.CustomEvent;typeof a==`function`?a=new a(n,r):(a=i.document.createEvent(`Event`),r?(a.initEvent(n,r.bubbles,r.cancelable),a.detail=r.detail):a.initEvent(n,!1,!1)),e.dispatchEvent(a)}function Sn(e,n){return function(){return xn(this,e,n)}}function Cn(e,n){return function(){return xn(this,e,n.apply(this,arguments))}}function wn(e,n){return this.each((typeof n==`function`?Cn:Sn)(e,n))}function*Tn(){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],a=0,o=i.length,s;a<o;++a)(s=i[a])&&(yield s)}var En=[null];function R(e,n){this._groups=e,this._parents=n}function Dn(){return new R([[document.documentElement]],En)}function On(){return this}R.prototype=Dn.prototype={constructor:R,select:F,selectAll:L,selectChild:Ye,selectChildren:$e,filter:et,data:ct,enter:nt,exit:ut,join:dt,merge:ft,selection:On,order:pt,sort:mt,call:gt,nodes:_t,node:vt,size:yt,empty:bt,each:xt,attr:Ot,style:Nt,property:Rt,classed:qt,text:Zt,html:tn,raise:rn,lower:on,append:sn,insert:ln,remove:dn,clone:mn,datum:hn,on:bn,dispatch:wn,[Symbol.iterator]:Tn};function z(e){return typeof e==`string`?new R([[document.querySelector(e)]],[document.documentElement]):new R([[e]],En)}function kn(e){let n;for(;n=e.sourceEvent;)e=n;return e}function An(e,n){if(e=kn(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 a=n.getBoundingClientRect();return[e.clientX-a.left-n.clientLeft,e.clientY-a.top-n.clientTop]}}return[e.pageX,e.pageY]}var jn={value:()=>{}};function Mn(){for(var e=0,n=arguments.length,r={},i;e<n;++e){if(!(i=arguments[e]+``)||i in r||/[\s.]/.test(i))throw Error(`illegal type: `+i);r[i]=[]}return new Nn(r)}function Nn(e){this._=e}function Pn(e,n){return e.trim().split(/^|\s+/).map(function(e){var r=``,i=e.indexOf(`.`);if(i>=0&&(r=e.slice(i+1),e=e.slice(0,i)),e&&!n.hasOwnProperty(e))throw Error(`unknown type: `+e);return{type:e,name:r}})}Nn.prototype=Mn.prototype={constructor:Nn,on:function(e,n){var r=this._,i=Pn(e+``,r),a,o=-1,s=i.length;if(arguments.length<2){for(;++o<s;)if((a=(e=i[o]).type)&&(a=Fn(r[a],e.name)))return a;return}if(n!=null&&typeof n!=`function`)throw Error(`invalid callback: `+n);for(;++o<s;)if(a=(e=i[o]).type)r[a]=In(r[a],e.name,n);else if(n==null)for(a in r)r[a]=In(r[a],e.name,null);return this},copy:function(){var e={},n=this._;for(var r in n)e[r]=n[r].slice();return new Nn(e)},call:function(e,n){if((a=arguments.length-2)>0)for(var r=Array(a),i=0,a,o;i<a;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(o=this._[e],i=0,a=o.length;i<a;++i)o[i].value.apply(n,r)},apply:function(e,n,r){if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(var i=this._[e],a=0,o=i.length;a<o;++a)i[a].value.apply(n,r)}};function Fn(e,n){for(var r=0,i=e.length,a;r<i;++r)if((a=e[r]).name===n)return a.value}function In(e,n,r){for(var i=0,a=e.length;i<a;++i)if(e[i].name===n){e[i]=jn,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:n,value:r}),e}var Ln={passive:!1},Rn={capture:!0,passive:!1};function zn(e){e.stopImmediatePropagation()}function Bn(e){e.preventDefault(),e.stopImmediatePropagation()}function Vn(e){var n=e.document.documentElement,r=z(e).on(`dragstart.drag`,Bn,Rn);`onselectstart`in n?r.on(`selectstart.drag`,Bn,Rn):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect=`none`)}function Hn(e,n){var r=e.document.documentElement,i=z(e).on(`dragstart.drag`,null);n&&(i.on(`click.drag`,Bn,Rn),setTimeout(function(){i.on(`click.drag`,null)},0)),`onselectstart`in r?i.on(`selectstart.drag`,null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}var Un=e=>()=>e;function Wn(e,{sourceEvent:n,subject:r,target:i,identifier:a,active:o,x:s,y:c,dx:l,dy:u,dispatch:d}){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:a,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:c,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:d}})}Wn.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Gn(e){return!e.ctrlKey&&!e.button}function Kn(){return this.parentNode}function qn(e,n){return n??{x:e.x,y:e.y}}function Jn(){return navigator.maxTouchPoints||`ontouchstart`in this}function Yn(){var e=Gn,n=Kn,r=qn,i=Jn,a={},o=Mn(`start`,`drag`,`end`),s=0,c,l,u,d,f=0;function p(e){e.on(`mousedown.drag`,m).filter(i).on(`touchstart.drag`,_).on(`touchmove.drag`,v,Ln).on(`touchend.drag touchcancel.drag`,y).style(`touch-action`,`none`).style(`-webkit-tap-highlight-color`,`rgba(0,0,0,0)`)}function m(r,i){if(!(d||!e.call(this,r,i))){var a=b(this,n.call(this,r,i),r,i,`mouse`);a&&(z(r.view).on(`mousemove.drag`,h,Rn).on(`mouseup.drag`,g,Rn),Vn(r.view),zn(r),u=!1,c=r.clientX,l=r.clientY,a(`start`,r))}}function h(e){if(Bn(e),!u){var n=e.clientX-c,r=e.clientY-l;u=n*n+r*r>f}a.mouse(`drag`,e)}function g(e){z(e.view).on(`mousemove.drag mouseup.drag`,null),Hn(e.view,u),Bn(e),a.mouse(`end`,e)}function _(r,i){if(e.call(this,r,i)){var a=r.changedTouches,o=n.call(this,r,i),s=a.length,c,l;for(c=0;c<s;++c)(l=b(this,o,r,i,a[c].identifier,a[c]))&&(zn(r),l(`start`,r,a[c]))}}function v(e){var n=e.changedTouches,r=n.length,i,o;for(i=0;i<r;++i)(o=a[n[i].identifier])&&(Bn(e),o(`drag`,e,n[i]))}function y(e){var n=e.changedTouches,r=n.length,i,o;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),i=0;i<r;++i)(o=a[n[i].identifier])&&(zn(e),o(`end`,e,n[i]))}function b(e,n,i,c,l,u){var d=o.copy(),f=An(u||i,n),m,h,g;if((g=r.call(e,new Wn(`beforestart`,{sourceEvent:i,target:p,identifier:l,active:s,x:f[0],y:f[1],dx:0,dy:0,dispatch:d}),c))!=null)return m=g.x-f[0]||0,h=g.y-f[1]||0,function r(i,o,u){var _=f,v;switch(i){case`start`:a[l]=r,v=s++;break;case`end`:delete a[l],--s;case`drag`:f=An(u||o,n),v=s;break}d.call(i,e,new Wn(i,{sourceEvent:o,subject:g,target:p,identifier:l,active:v,x:f[0]+m,y:f[1]+h,dx:f[0]-_[0],dy:f[1]-_[1],dispatch:d}),c)}}return p.filter=function(n){return arguments.length?(e=typeof n==`function`?n:Un(!!n),p):e},p.container=function(e){return arguments.length?(n=typeof e==`function`?e:Un(e),p):n},p.subject=function(e){return arguments.length?(r=typeof e==`function`?e:Un(e),p):r},p.touchable=function(e){return arguments.length?(i=typeof e==`function`?e:Un(!!e),p):i},p.on=function(){var e=o.on.apply(o,arguments);return e===o?p:e},p.clickDistance=function(e){return arguments.length?(f=(e=+e)*e,p):Math.sqrt(f)},p}function Xn(e,n,r){e.prototype=n.prototype=r,r.constructor=e}function Zn(e,n){var r=Object.create(e.prototype);for(var i in n)r[i]=n[i];return r}function Qn(){}var $n=.7,er=1/$n,tr=`\\s*([+-]?\\d+)\\s*`,nr=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,rr=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,ir=/^#([0-9a-f]{3,8})$/,ar=RegExp(`^rgb\\(${tr},${tr},${tr}\\)$`),or=RegExp(`^rgb\\(${rr},${rr},${rr}\\)$`),sr=RegExp(`^rgba\\(${tr},${tr},${tr},${nr}\\)$`),cr=RegExp(`^rgba\\(${rr},${rr},${rr},${nr}\\)$`),lr=RegExp(`^hsl\\(${nr},${rr},${rr}\\)$`),ur=RegExp(`^hsla\\(${nr},${rr},${rr},${nr}\\)$`),dr={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Xn(Qn,gr,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:fr,formatHex:fr,formatHex8:pr,formatHsl:mr,formatRgb:hr,toString:hr});function fr(){return this.rgb().formatHex()}function pr(){return this.rgb().formatHex8()}function mr(){return Or(this).formatHsl()}function hr(){return this.rgb().formatRgb()}function gr(e){var n,r;return e=(e+``).trim().toLowerCase(),(n=ir.exec(e))?(r=n[1].length,n=parseInt(n[1],16),r===6?_r(n):r===3?new B(n>>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):r===8?vr(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):r===4?vr(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|n&240,((n&15)<<4|n&15)/255):null):(n=ar.exec(e))?new B(n[1],n[2],n[3],1):(n=or.exec(e))?new B(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=sr.exec(e))?vr(n[1],n[2],n[3],n[4]):(n=cr.exec(e))?vr(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=lr.exec(e))?Dr(n[1],n[2]/100,n[3]/100,1):(n=ur.exec(e))?Dr(n[1],n[2]/100,n[3]/100,n[4]):dr.hasOwnProperty(e)?_r(dr[e]):e===`transparent`?new B(NaN,NaN,NaN,0):null}function _r(e){return new B(e>>16&255,e>>8&255,e&255,1)}function vr(e,n,r,i){return i<=0&&(e=n=r=NaN),new B(e,n,r,i)}function yr(e){return e instanceof Qn||(e=gr(e)),e?(e=e.rgb(),new B(e.r,e.g,e.b,e.opacity)):new B}function br(e,n,r,i){return arguments.length===1?yr(e):new B(e,n,r,i??1)}function B(e,n,r,i){this.r=+e,this.g=+n,this.b=+r,this.opacity=+i}Xn(B,br,Zn(Qn,{brighter(e){return e=e==null?er:er**+e,new B(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?$n:$n**+e,new B(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new B(Tr(this.r),Tr(this.g),Tr(this.b),wr(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:xr,formatHex:xr,formatHex8:Sr,formatRgb:Cr,toString:Cr}));function xr(){return`#${Er(this.r)}${Er(this.g)}${Er(this.b)}`}function Sr(){return`#${Er(this.r)}${Er(this.g)}${Er(this.b)}${Er((isNaN(this.opacity)?1:this.opacity)*255)}`}function Cr(){let e=wr(this.opacity);return`${e===1?`rgb(`:`rgba(`}${Tr(this.r)}, ${Tr(this.g)}, ${Tr(this.b)}${e===1?`)`:`, ${e})`}`}function wr(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Tr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Er(e){return e=Tr(e),(e<16?`0`:``)+e.toString(16)}function Dr(e,n,r,i){return i<=0?e=n=r=NaN:r<=0||r>=1?e=n=NaN:n<=0&&(e=NaN),new Ar(e,n,r,i)}function Or(e){if(e instanceof Ar)return new Ar(e.h,e.s,e.l,e.opacity);if(e instanceof Qn||(e=gr(e)),!e)return new Ar;if(e instanceof Ar)return e;e=e.rgb();var n=e.r/255,r=e.g/255,i=e.b/255,a=Math.min(n,r,i),o=Math.max(n,r,i),s=NaN,c=o-a,l=(o+a)/2;return c?(s=n===o?(r-i)/c+(r<i)*6:r===o?(i-n)/c+2:(n-r)/c+4,c/=l<.5?o+a:2-o-a,s*=60):c=l>0&&l<1?0:s,new Ar(s,c,l,e.opacity)}function kr(e,n,r,i){return arguments.length===1?Or(e):new Ar(e,n,r,i??1)}function Ar(e,n,r,i){this.h=+e,this.s=+n,this.l=+r,this.opacity=+i}Xn(Ar,kr,Zn(Qn,{brighter(e){return e=e==null?er:er**+e,new Ar(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?$n:$n**+e,new Ar(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,n=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*n,a=2*r-i;return new B(Nr(e>=240?e-240:e+120,a,i),Nr(e,a,i),Nr(e<120?e+240:e-120,a,i),this.opacity)},clamp(){return new Ar(jr(this.h),Mr(this.s),Mr(this.l),wr(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=wr(this.opacity);return`${e===1?`hsl(`:`hsla(`}${jr(this.h)}, ${Mr(this.s)*100}%, ${Mr(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function jr(e){return e=(e||0)%360,e<0?e+360:e}function Mr(e){return Math.max(0,Math.min(1,e||0))}function Nr(e,n,r){return(e<60?n+(r-n)*e/60:e<180?r:e<240?n+(r-n)*(240-e)/60:n)*255}var Pr=e=>()=>e;function Fr(e,n){return function(r){return e+r*n}}function Ir(e,n,r){return e**=+r,n=n**+r-e,r=1/r,function(i){return(e+i*n)**+r}}function Lr(e){return(e=+e)==1?Rr:function(n,r){return r-n?Ir(n,r,e):Pr(isNaN(n)?r:n)}}function Rr(e,n){var r=n-e;return r?Fr(e,r):Pr(isNaN(e)?n:e)}var zr=(function e(n){var r=Lr(n);function i(e,n){var i=r((e=br(e)).r,(n=br(n)).r),a=r(e.g,n.g),o=r(e.b,n.b),s=Rr(e.opacity,n.opacity);return function(n){return e.r=i(n),e.g=a(n),e.b=o(n),e.opacity=s(n),e+``}}return i.gamma=e,i})(1);function Br(e,n){return e=+e,n=+n,function(r){return e*(1-r)+n*r}}var Vr=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Hr=new RegExp(Vr.source,`g`);function Ur(e){return function(){return e}}function Wr(e){return function(n){return e(n)+``}}function Gr(e,n){var r=Vr.lastIndex=Hr.lastIndex=0,i,a,o,s=-1,c=[],l=[];for(e+=``,n+=``;(i=Vr.exec(e))&&(a=Hr.exec(n));)(o=a.index)>r&&(o=n.slice(r,o),c[s]?c[s]+=o:c[++s]=o),(i=i[0])===(a=a[0])?c[s]?c[s]+=a:c[++s]=a:(c[++s]=null,l.push({i:s,x:Br(i,a)})),r=Hr.lastIndex;return r<n.length&&(o=n.slice(r),c[s]?c[s]+=o:c[++s]=o),c.length<2?l[0]?Wr(l[0].x):Ur(n):(n=l.length,function(e){for(var r=0,i;r<n;++r)c[(i=l[r]).i]=i.x(e);return c.join(``)})}var Kr=180/Math.PI,qr={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Jr(e,n,r,i,a,o){var s,c,l;return(s=Math.sqrt(e*e+n*n))&&(e/=s,n/=s),(l=e*r+n*i)&&(r-=e*l,i-=n*l),(c=Math.sqrt(r*r+i*i))&&(r/=c,i/=c,l/=c),e*i<n*r&&(e=-e,n=-n,l=-l,s=-s),{translateX:a,translateY:o,rotate:Math.atan2(n,e)*Kr,skewX:Math.atan(l)*Kr,scaleX:s,scaleY:c}}var Yr;function Xr(e){let n=new(typeof DOMMatrix==`function`?DOMMatrix:WebKitCSSMatrix)(e+``);return n.isIdentity?qr:Jr(n.a,n.b,n.c,n.d,n.e,n.f)}function Zr(e){return e==null||(Yr||=document.createElementNS(`http://www.w3.org/2000/svg`,`g`),Yr.setAttribute(`transform`,e),!(e=Yr.transform.baseVal.consolidate()))?qr:(e=e.matrix,Jr(e.a,e.b,e.c,e.d,e.e,e.f))}function Qr(e,n,r,i){function a(e){return e.length?e.pop()+` `:``}function o(e,i,a,o,s,c){if(e!==a||i!==o){var l=s.push(`translate(`,null,n,null,r);c.push({i:l-4,x:Br(e,a)},{i:l-2,x:Br(i,o)})}else (a||o)&&s.push(`translate(`+a+n+o+r)}function s(e,n,r,o){e===n?n&&r.push(a(r)+`rotate(`+n+i):(e-n>180?n+=360:n-e>180&&(e+=360),o.push({i:r.push(a(r)+`rotate(`,null,i)-2,x:Br(e,n)}))}function c(e,n,r,o){e===n?n&&r.push(a(r)+`skewX(`+n+i):o.push({i:r.push(a(r)+`skewX(`,null,i)-2,x:Br(e,n)})}function l(e,n,r,i,o,s){if(e!==r||n!==i){var c=o.push(a(o)+`scale(`,null,`,`,null,`)`);s.push({i:c-4,x:Br(e,r)},{i:c-2,x:Br(n,i)})}else (r!==1||i!==1)&&o.push(a(o)+`scale(`+r+`,`+i+`)`)}return function(n,r){var i=[],a=[];return n=e(n),r=e(r),o(n.translateX,n.translateY,r.translateX,r.translateY,i,a),s(n.rotate,r.rotate,i,a),c(n.skewX,r.skewX,i,a),l(n.scaleX,n.scaleY,r.scaleX,r.scaleY,i,a),n=r=null,function(e){for(var n=-1,r=a.length,o;++n<r;)i[(o=a[n]).i]=o.x(e);return i.join(``)}}}var $r=Qr(Xr,`px, `,`px)`,`deg)`),ei=Qr(Zr,`, `,`)`,`)`),ti=1e-12;function ni(e){return((e=Math.exp(e))+1/e)/2}function ri(e){return((e=Math.exp(e))-1/e)/2}function ii(e){return((e=Math.exp(2*e))-1)/(e+1)}var ai=(function e(n,r,i){function a(e,a){var o=e[0],s=e[1],c=e[2],l=a[0],u=a[1],d=a[2],f=l-o,p=u-s,m=f*f+p*p,h,g;if(m<ti)g=Math.log(d/c)/n,h=function(e){return[o+e*f,s+e*p,c*Math.exp(n*e*g)]};else{var _=Math.sqrt(m),v=(d*d-c*c+i*m)/(2*c*r*_),y=(d*d-c*c-i*m)/(2*d*r*_),b=Math.log(Math.sqrt(v*v+1)-v);g=(Math.log(Math.sqrt(y*y+1)-y)-b)/n,h=function(e){var i=e*g,a=ni(b),l=c/(r*_)*(a*ii(n*i+b)-ri(b));return[o+l*f,s+l*p,c*a/ni(n*i+b)]}}return h.duration=g*1e3*n/Math.SQRT2,h}return a.rho=function(n){var r=Math.max(.001,+n),i=r*r;return e(r,i,i*i)},a})(Math.SQRT2,2,4),oi=0,si=0,ci=0,li=1e3,ui,di,fi=0,pi=0,mi=0,hi=typeof performance==`object`&&performance.now?performance:Date,gi=typeof window==`object`&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function _i(){return pi||=(gi(vi),hi.now()+mi)}function vi(){pi=0}function yi(){this._call=this._time=this._next=null}yi.prototype=bi.prototype={constructor:yi,restart:function(e,n,r){if(typeof e!=`function`)throw TypeError(`callback is not a function`);r=(r==null?_i():+r)+(n==null?0:+n),!this._next&&di!==this&&(di?di._next=this:ui=this,di=this),this._call=e,this._time=r,Ti()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ti())}};function bi(e,n,r){var i=new yi;return i.restart(e,n,r),i}function xi(){_i(),++oi;for(var e=ui,n;e;)(n=pi-e._time)>=0&&e._call.call(void 0,n),e=e._next;--oi}function Si(){pi=(fi=hi.now())+mi,oi=si=0;try{xi()}finally{oi=0,wi(),pi=0}}function Ci(){var e=hi.now(),n=e-fi;n>li&&(mi-=n,fi=e)}function wi(){for(var e,n=ui,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:ui=r);di=e,Ti(i)}function Ti(e){oi||(si&&=clearTimeout(si),e-pi>24?(e<1/0&&(si=setTimeout(Si,e-hi.now()-mi)),ci&&=clearInterval(ci)):(ci||=(fi=hi.now(),setInterval(Ci,li)),oi=1,gi(Si)))}function Ei(e,n,r){var i=new yi;return n=n==null?0:+n,i.restart(r=>{i.stop(),e(r+n)},n,r),i}var Di=Mn(`start`,`end`,`cancel`,`interrupt`),Oi=[];function ki(e,n,r,i,a,o){var s=e.__transition;if(!s)e.__transition={};else if(r in s)return;Ni(e,r,{name:n,index:i,group:a,on:Di,tween:Oi,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function Ai(e,n){var r=Mi(e,n);if(r.state>0)throw Error(`too late; already scheduled`);return r}function ji(e,n){var r=Mi(e,n);if(r.state>3)throw Error(`too late; already running`);return r}function Mi(e,n){var r=e.__transition;if(!r||!(r=r[n]))throw Error(`transition not found`);return r}function Ni(e,n,r){var i=e.__transition,a;i[n]=r,r.timer=bi(o,0,r.time);function o(e){r.state=1,r.timer.restart(s,r.delay,r.time),r.delay<=e&&s(e-r.delay)}function s(o){var u,d,f,p;if(r.state!==1)return l();for(u in i)if(p=i[u],p.name===r.name){if(p.state===3)return Ei(s);p.state===4?(p.state=6,p.timer.stop(),p.on.call(`interrupt`,e,e.__data__,p.index,p.group),delete i[u]):+u<n&&(p.state=6,p.timer.stop(),p.on.call(`cancel`,e,e.__data__,p.index,p.group),delete i[u])}if(Ei(function(){r.state===3&&(r.state=4,r.timer.restart(c,r.delay,r.time),c(o))}),r.state=2,r.on.call(`start`,e,e.__data__,r.index,r.group),r.state===2){for(r.state=3,a=Array(f=r.tween.length),u=0,d=-1;u<f;++u)(p=r.tween[u].value.call(e,e.__data__,r.index,r.group))&&(a[++d]=p);a.length=d+1}}function c(n){for(var i=n<r.duration?r.ease.call(null,n/r.duration):(r.timer.restart(l),r.state=5,1),o=-1,s=a.length;++o<s;)a[o].call(e,i);r.state===5&&(r.on.call(`end`,e,e.__data__,r.index,r.group),l())}function l(){for(var a in r.state=6,r.timer.stop(),delete i[n],i)return;delete e.__transition}}function Pi(e,n){var r=e.__transition,i,a,o=!0,s;if(r){for(s in n=n==null?null:n+``,r){if((i=r[s]).name!==n){o=!1;continue}a=i.state>2&&i.state<5,i.state=6,i.timer.stop(),i.on.call(a?`interrupt`:`cancel`,e,e.__data__,i.index,i.group),delete r[s]}o&&delete e.__transition}}function Fi(e){return this.each(function(){Pi(this,e)})}function Ii(e,n){var r,i;return function(){var a=ji(this,e),o=a.tween;if(o!==r){i=r=o;for(var s=0,c=i.length;s<c;++s)if(i[s].name===n){i=i.slice(),i.splice(s,1);break}}a.tween=i}}function Li(e,n,r){var i,a;if(typeof r!=`function`)throw Error();return function(){var o=ji(this,e),s=o.tween;if(s!==i){a=(i=s).slice();for(var c={name:n,value:r},l=0,u=a.length;l<u;++l)if(a[l].name===n){a[l]=c;break}l===u&&a.push(c)}o.tween=a}}function Ri(e,n){var r=this._id;if(e+=``,arguments.length<2){for(var i=Mi(this.node(),r).tween,a=0,o=i.length,s;a<o;++a)if((s=i[a]).name===e)return s.value;return null}return this.each((n==null?Ii:Li)(r,e,n))}function zi(e,n,r){var i=e._id;return e.each(function(){var e=ji(this,i);(e.value||={})[n]=r.apply(this,arguments)}),function(e){return Mi(e,i).value[n]}}function Bi(e,n){var r;return(typeof n==`number`?Br:n instanceof gr?zr:(r=gr(n))?(n=r,zr):Gr)(e,n)}function Vi(e){return function(){this.removeAttribute(e)}}function Hi(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Ui(e,n,r){var i,a=r+``,o;return function(){var s=this.getAttribute(e);return s===a?null:s===i?o:o=n(i=s,r)}}function Wi(e,n,r){var i,a=r+``,o;return function(){var s=this.getAttributeNS(e.space,e.local);return s===a?null:s===i?o:o=n(i=s,r)}}function Gi(e,n,r){var i,a,o;return function(){var s,c=r(this),l;return c==null?void this.removeAttribute(e):(s=this.getAttribute(e),l=c+``,s===l?null:s===i&&l===a?o:(a=l,o=n(i=s,c)))}}function Ki(e,n,r){var i,a,o;return function(){var s,c=r(this),l;return c==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),l=c+``,s===l?null:s===i&&l===a?o:(a=l,o=n(i=s,c)))}}function qi(e,n){var r=Le(e),i=r===`transform`?ei:Bi;return this.attrTween(e,typeof n==`function`?(r.local?Ki:Gi)(r,i,zi(this,`attr.`+e,n)):n==null?(r.local?Hi:Vi)(r):(r.local?Wi:Ui)(r,i,n))}function Ji(e,n){return function(r){this.setAttribute(e,n.call(this,r))}}function Yi(e,n){return function(r){this.setAttributeNS(e.space,e.local,n.call(this,r))}}function Xi(e,n){var r,i;function a(){var a=n.apply(this,arguments);return a!==i&&(r=(i=a)&&Yi(e,a)),r}return a._value=n,a}function Zi(e,n){var r,i;function a(){var a=n.apply(this,arguments);return a!==i&&(r=(i=a)&&Ji(e,a)),r}return a._value=n,a}function Qi(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 Error();var i=Le(e);return this.tween(r,(i.local?Xi:Zi)(i,n))}function $i(e,n){return function(){Ai(this,e).delay=+n.apply(this,arguments)}}function ea(e,n){return n=+n,function(){Ai(this,e).delay=n}}function ta(e){var n=this._id;return arguments.length?this.each((typeof e==`function`?$i:ea)(n,e)):Mi(this.node(),n).delay}function na(e,n){return function(){ji(this,e).duration=+n.apply(this,arguments)}}function ra(e,n){return n=+n,function(){ji(this,e).duration=n}}function ia(e){var n=this._id;return arguments.length?this.each((typeof e==`function`?na:ra)(n,e)):Mi(this.node(),n).duration}function aa(e,n){if(typeof n!=`function`)throw Error();return function(){ji(this,e).ease=n}}function oa(e){var n=this._id;return arguments.length?this.each(aa(n,e)):Mi(this.node(),n).ease}function sa(e,n){return function(){var r=n.apply(this,arguments);if(typeof r!=`function`)throw Error();ji(this,e).ease=r}}function ca(e){if(typeof e!=`function`)throw Error();return this.each(sa(this._id,e))}function la(e){typeof e!=`function`&&(e=We(e));for(var n=this._groups,r=n.length,i=Array(r),a=0;a<r;++a)for(var o=n[a],s=o.length,c=i[a]=[],l,u=0;u<s;++u)(l=o[u])&&e.call(l,l.__data__,u,o)&&c.push(l);return new Ra(i,this._parents,this._name,this._id)}function ua(e){if(e._id!==this._id)throw Error();for(var n=this._groups,r=e._groups,i=n.length,a=r.length,o=Math.min(i,a),s=Array(i),c=0;c<o;++c)for(var l=n[c],u=r[c],d=l.length,f=s[c]=Array(d),p,m=0;m<d;++m)(p=l[m]||u[m])&&(f[m]=p);for(;c<i;++c)s[c]=n[c];return new Ra(s,this._parents,this._name,this._id)}function da(e){return(e+``).trim().split(/^|\s+/).every(function(e){var n=e.indexOf(`.`);return n>=0&&(e=e.slice(0,n)),!e||e===`start`})}function fa(e,n,r){var i,a,o=da(n)?Ai:ji;return function(){var s=o(this,e),c=s.on;c!==i&&(a=(i=c).copy()).on(n,r),s.on=a}}function pa(e,n){var r=this._id;return arguments.length<2?Mi(this.node(),r).on.on(e):this.each(fa(r,e,n))}function ma(e){return function(){var n=this.parentNode;for(var r in this.__transition)if(+r!==e)return;n&&n.removeChild(this)}}function ha(){return this.on(`end.remove`,ma(this._id))}function ga(e){var n=this._name,r=this._id;typeof e!=`function`&&(e=P(e));for(var i=this._groups,a=i.length,o=Array(a),s=0;s<a;++s)for(var c=i[s],l=c.length,u=o[s]=Array(l),d,f,p=0;p<l;++p)(d=c[p])&&(f=e.call(d,d.__data__,p,c))&&(`__data__`in d&&(f.__data__=d.__data__),u[p]=f,ki(u[p],n,r,p,u,Mi(d,r)));return new Ra(o,this._parents,n,r)}function _a(e){var n=this._name,r=this._id;typeof e!=`function`&&(e=He(e));for(var i=this._groups,a=i.length,o=[],s=[],c=0;c<a;++c)for(var l=i[c],u=l.length,d,f=0;f<u;++f)if(d=l[f]){for(var p=e.call(d,d.__data__,f,l),m,h=Mi(d,r),g=0,_=p.length;g<_;++g)(m=p[g])&&ki(m,n,r,g,p,h);o.push(p),s.push(d)}return new Ra(o,s,n,r)}var va=Dn.prototype.constructor;function ya(){return new va(this._groups,this._parents)}function ba(e,n){var r,i,a;return function(){var o=Pt(this,e),s=(this.style.removeProperty(e),Pt(this,e));return o===s?null:o===r&&s===i?a:a=n(r=o,i=s)}}function xa(e){return function(){this.style.removeProperty(e)}}function Sa(e,n,r){var i,a=r+``,o;return function(){var s=Pt(this,e);return s===a?null:s===i?o:o=n(i=s,r)}}function Ca(e,n,r){var i,a,o;return function(){var s=Pt(this,e),c=r(this),l=c+``;return c??(l=c=(this.style.removeProperty(e),Pt(this,e))),s===l?null:s===i&&l===a?o:(a=l,o=n(i=s,c))}}function wa(e,n){var r,i,a,o=`style.`+n,s=`end.`+o,c;return function(){var l=ji(this,e),u=l.on,d=l.value[o]==null?c||=xa(n):void 0;(u!==r||a!==d)&&(i=(r=u).copy()).on(s,a=d),l.on=i}}function Ta(e,n,r){var i=(e+=``)==`transform`?$r:Bi;return n==null?this.styleTween(e,ba(e,i)).on(`end.style.`+e,xa(e)):typeof n==`function`?this.styleTween(e,Ca(e,i,zi(this,`style.`+e,n))).each(wa(this._id,e)):this.styleTween(e,Sa(e,i,n),r).on(`end.style.`+e,null)}function Ea(e,n,r){return function(i){this.style.setProperty(e,n.call(this,i),r)}}function Da(e,n,r){var i,a;function o(){var o=n.apply(this,arguments);return o!==a&&(i=(a=o)&&Ea(e,o,r)),i}return o._value=n,o}function Oa(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 Error();return this.tween(i,Da(e,n,r??``))}function ka(e){return function(){this.textContent=e}}function Aa(e){return function(){this.textContent=e(this)??``}}function ja(e){return this.tween(`text`,typeof e==`function`?Aa(zi(this,`text`,e)):ka(e==null?``:e+``))}function Ma(e){return function(n){this.textContent=e.call(this,n)}}function Na(e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Ma(i)),n}return i._value=e,i}function Pa(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 Error();return this.tween(n,Na(e))}function Fa(){for(var e=this._name,n=this._id,r=Ba(),i=this._groups,a=i.length,o=0;o<a;++o)for(var s=i[o],c=s.length,l,u=0;u<c;++u)if(l=s[u]){var d=Mi(l,n);ki(l,e,r,u,s,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new Ra(i,this._parents,e,r)}function Ia(){var e,n,r=this,i=r._id,a=r.size();return new Promise(function(o,s){var c={value:s},l={value:function(){--a===0&&o()}};r.each(function(){var r=ji(this,i),a=r.on;a!==e&&(n=(e=a).copy(),n._.cancel.push(c),n._.interrupt.push(c),n._.end.push(l)),r.on=n}),a===0&&o()})}var La=0;function Ra(e,n,r,i){this._groups=e,this._parents=n,this._name=r,this._id=i}function za(e){return Dn().transition(e)}function Ba(){return++La}var Va=Dn.prototype;Ra.prototype=za.prototype={constructor:Ra,select:ga,selectAll:_a,selectChild:Va.selectChild,selectChildren:Va.selectChildren,filter:la,merge:ua,selection:ya,transition:Fa,call:Va.call,nodes:Va.nodes,node:Va.node,size:Va.size,empty:Va.empty,each:Va.each,on:pa,attr:qi,attrTween:Qi,style:Ta,styleTween:Oa,text:ja,textTween:Pa,remove:ha,tween:Ri,delay:ta,duration:ia,ease:oa,easeVarying:ca,end:Ia,[Symbol.iterator]:Va[Symbol.iterator]};function Ha(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Ua={time:null,delay:0,duration:250,ease:Ha};function Wa(e,n){for(var r;!(r=e.__transition)||!(r=r[n]);)if(!(e=e.parentNode))throw Error(`transition ${n} not found`);return r}function Ga(e){var n,r;e instanceof Ra?(n=e._id,e=e._name):(n=Ba(),(r=Ua).time=_i(),e=e==null?null:e+``);for(var i=this._groups,a=i.length,o=0;o<a;++o)for(var s=i[o],c=s.length,l,u=0;u<c;++u)(l=s[u])&&ki(l,e,n,u,s,r||Wa(l,n));return new Ra(i,this._parents,e,n)}Dn.prototype.interrupt=Fi,Dn.prototype.transition=Ga;var Ka=e=>()=>e;function qa(e,{sourceEvent:n,target:r,transform:i,dispatch:a}){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:a}})}function Ja(e,n,r){this.k=e,this.x=n,this.y=r}Ja.prototype={constructor:Ja,scale:function(e){return e===1?this:new Ja(this.k*e,this.x,this.y)},translate:function(e,n){return e===0&n===0?this:new Ja(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 Ya=new Ja(1,0,0);Xa.prototype=Ja.prototype;function Xa(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Ya;return e.__zoom}function Za(e){e.stopImmediatePropagation()}function Qa(e){e.preventDefault(),e.stopImmediatePropagation()}function $a(e){return(!e.ctrlKey||e.type===`wheel`)&&!e.button}function eo(){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 to(){return this.__zoom||Ya}function no(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function ro(){return navigator.maxTouchPoints||`ontouchstart`in this}function io(e,n,r){var i=e.invertX(n[0][0])-r[0][0],a=e.invertX(n[1][0])-r[1][0],o=e.invertY(n[0][1])-r[0][1],s=e.invertY(n[1][1])-r[1][1];return e.translate(a>i?(i+a)/2:Math.min(0,i)||Math.max(0,a),s>o?(o+s)/2:Math.min(0,o)||Math.max(0,s))}function ao(){var e=$a,n=eo,r=io,i=no,a=ro,o=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],c=250,l=ai,u=Mn(`start`,`zoom`,`end`),d,f,p,m=500,h=150,g=0,_=10;function v(e){e.property(`__zoom`,to).on(`wheel.zoom`,T,{passive:!1}).on(`mousedown.zoom`,E).on(`dblclick.zoom`,ee).filter(a).on(`touchstart.zoom`,te).on(`touchmove.zoom`,ne).on(`touchend.zoom touchcancel.zoom`,re).style(`-webkit-tap-highlight-color`,`rgba(0,0,0,0)`)}v.transform=function(e,n,r,i){var a=e.selection?e.selection():e;a.property(`__zoom`,to),e===a?a.interrupt().each(function(){C(this,arguments).event(i).start().zoom(null,typeof n==`function`?n.apply(this,arguments):n).end()}):S(e,n,r,i)},v.scaleBy=function(e,n,r,i){v.scaleTo(e,function(){return this.__zoom.k*(typeof n==`function`?n.apply(this,arguments):n)},r,i)},v.scaleTo=function(e,i,a,o){v.transform(e,function(){var e=n.apply(this,arguments),o=this.__zoom,c=a==null?x(e):typeof a==`function`?a.apply(this,arguments):a,l=o.invert(c),u=typeof i==`function`?i.apply(this,arguments):i;return r(b(y(o,u),c,l),e,s)},a,o)},v.translateBy=function(e,i,a,o){v.transform(e,function(){return r(this.__zoom.translate(typeof i==`function`?i.apply(this,arguments):i,typeof a==`function`?a.apply(this,arguments):a),n.apply(this,arguments),s)},null,o)},v.translateTo=function(e,i,a,o,c){v.transform(e,function(){var e=n.apply(this,arguments),c=this.__zoom,l=o==null?x(e):typeof o==`function`?o.apply(this,arguments):o;return r(Ya.translate(l[0],l[1]).scale(c.k).translate(typeof i==`function`?-i.apply(this,arguments):-i,typeof a==`function`?-a.apply(this,arguments):-a),e,s)},o,c)};function y(e,n){return n=Math.max(o[0],Math.min(o[1],n)),n===e.k?e:new Ja(n,e.x,e.y)}function b(e,n,r){var i=n[0]-r[0]*e.k,a=n[1]-r[1]*e.k;return i===e.x&&a===e.y?e:new Ja(e.k,i,a)}function x(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function S(e,r,i,a){e.on(`start.zoom`,function(){C(this,arguments).event(a).start()}).on(`interrupt.zoom end.zoom`,function(){C(this,arguments).event(a).end()}).tween(`zoom`,function(){var e=this,o=arguments,s=C(e,o).event(a),c=n.apply(e,o),u=i==null?x(c):typeof i==`function`?i.apply(e,o):i,d=Math.max(c[1][0]-c[0][0],c[1][1]-c[0][1]),f=e.__zoom,p=typeof r==`function`?r.apply(e,o):r,m=l(f.invert(u).concat(d/f.k),p.invert(u).concat(d/p.k));return function(e){if(e===1)e=p;else{var n=m(e),r=d/n[2];e=new Ja(r,u[0]-n[0]*r,u[1]-n[1]*r)}s.zoom(null,e)}})}function C(e,n,r){return!r&&e.__zooming||new w(e,n)}function w(e,r){this.that=e,this.args=r,this.active=0,this.sourceEvent=null,this.extent=n.apply(e,r),this.taps=0}w.prototype={event:function(e){return e&&(this.sourceEvent=e),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit(`start`)),this},zoom:function(e,n){return this.mouse&&e!==`mouse`&&(this.mouse[1]=n.invert(this.mouse[0])),this.touch0&&e!==`touch`&&(this.touch0[1]=n.invert(this.touch0[0])),this.touch1&&e!==`touch`&&(this.touch1[1]=n.invert(this.touch1[0])),this.that.__zoom=n,this.emit(`zoom`),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit(`end`)),this},emit:function(e){var n=z(this.that).datum();u.call(e,this.that,new qa(e,{sourceEvent:this.sourceEvent,target:v,type:e,transform:this.that.__zoom,dispatch:u}),n)}};function T(n,...a){if(!e.apply(this,arguments))return;var c=C(this,a).event(n),l=this.__zoom,u=Math.max(o[0],Math.min(o[1],l.k*2**i.apply(this,arguments))),d=An(n);if(c.wheel)(c.mouse[0][0]!==d[0]||c.mouse[0][1]!==d[1])&&(c.mouse[1]=l.invert(c.mouse[0]=d)),clearTimeout(c.wheel);else if(l.k===u)return;else c.mouse=[d,l.invert(d)],Pi(this),c.start();Qa(n),c.wheel=setTimeout(f,h),c.zoom(`mouse`,r(b(y(l,u),c.mouse[0],c.mouse[1]),c.extent,s));function f(){c.wheel=null,c.end()}}function E(n,...i){if(p||!e.apply(this,arguments))return;var a=n.currentTarget,o=C(this,i,!0).event(n),c=z(n.view).on(`mousemove.zoom`,f,!0).on(`mouseup.zoom`,m,!0),l=An(n,a),u=n.clientX,d=n.clientY;Vn(n.view),Za(n),o.mouse=[l,this.__zoom.invert(l)],Pi(this),o.start();function f(e){if(Qa(e),!o.moved){var n=e.clientX-u,i=e.clientY-d;o.moved=n*n+i*i>g}o.event(e).zoom(`mouse`,r(b(o.that.__zoom,o.mouse[0]=An(e,a),o.mouse[1]),o.extent,s))}function m(e){c.on(`mousemove.zoom mouseup.zoom`,null),Hn(e.view,o.moved),Qa(e),o.event(e).end()}}function ee(i,...a){if(e.apply(this,arguments)){var o=this.__zoom,l=An(i.changedTouches?i.changedTouches[0]:i,this),u=o.invert(l),d=o.k*(i.shiftKey?.5:2),f=r(b(y(o,d),l,u),n.apply(this,a),s);Qa(i),c>0?z(this).transition().duration(c).call(S,f,l,i):z(this).call(v.transform,f,l,i)}}function te(n,...r){if(e.apply(this,arguments)){var i=n.touches,a=i.length,o=C(this,r,n.changedTouches.length===a).event(n),s,c,l,u;for(Za(n),c=0;c<a;++c)l=i[c],u=An(l,this),u=[u,this.__zoom.invert(u),l.identifier],o.touch0?!o.touch1&&o.touch0[2]!==u[2]&&(o.touch1=u,o.taps=0):(o.touch0=u,s=!0,o.taps=1+!!d);d&&=clearTimeout(d),s&&(o.taps<2&&(f=u[0],d=setTimeout(function(){d=null},m)),Pi(this),o.start())}}function ne(e,...n){if(this.__zooming){var i=C(this,n).event(e),a=e.changedTouches,o=a.length,c,l,u,d;for(Qa(e),c=0;c<o;++c)l=a[c],u=An(l,this),i.touch0&&i.touch0[2]===l.identifier?i.touch0[0]=u:i.touch1&&i.touch1[2]===l.identifier&&(i.touch1[0]=u);if(l=i.that.__zoom,i.touch1){var f=i.touch0[0],p=i.touch0[1],m=i.touch1[0],h=i.touch1[1],g=(g=m[0]-f[0])*g+(g=m[1]-f[1])*g,_=(_=h[0]-p[0])*_+(_=h[1]-p[1])*_;l=y(l,Math.sqrt(g/_)),u=[(f[0]+m[0])/2,(f[1]+m[1])/2],d=[(p[0]+h[0])/2,(p[1]+h[1])/2]}else if(i.touch0)u=i.touch0[0],d=i.touch0[1];else return;i.zoom(`touch`,r(b(l,u,d),i.extent,s))}}function re(e,...n){if(this.__zooming){var r=C(this,n).event(e),i=e.changedTouches,a=i.length,o,s;for(Za(e),p&&clearTimeout(p),p=setTimeout(function(){p=null},m),o=0;o<a;++o)s=i[o],r.touch0&&r.touch0[2]===s.identifier?delete r.touch0:r.touch1&&r.touch1[2]===s.identifier&&delete r.touch1;if(r.touch1&&!r.touch0&&(r.touch0=r.touch1,delete r.touch1),r.touch0)r.touch0[1]=this.__zoom.invert(r.touch0[0]);else if(r.end(),r.taps===2&&(s=An(s,this),Math.hypot(f[0]-s[0],f[1]-s[1])<_)){var c=z(this).on(`dblclick.zoom`);c&&c.apply(this,arguments)}}}return v.wheelDelta=function(e){return arguments.length?(i=typeof e==`function`?e:Ka(+e),v):i},v.filter=function(n){return arguments.length?(e=typeof n==`function`?n:Ka(!!n),v):e},v.touchable=function(e){return arguments.length?(a=typeof e==`function`?e:Ka(!!e),v):a},v.extent=function(e){return arguments.length?(n=typeof e==`function`?e:Ka([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),v):n},v.scaleExtent=function(e){return arguments.length?(o[0]=+e[0],o[1]=+e[1],v):[o[0],o[1]]},v.translateExtent=function(e){return arguments.length?(s[0][0]=+e[0][0],s[1][0]=+e[1][0],s[0][1]=+e[0][1],s[1][1]=+e[1][1],v):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},v.constrain=function(e){return arguments.length?(r=e,v):r},v.duration=function(e){return arguments.length?(c=+e,v):c},v.interpolate=function(e){return arguments.length?(l=e,v):l},v.on=function(){var e=u.on.apply(u,arguments);return e===u?v:e},v.clickDistance=function(e){return arguments.length?(g=(e=+e)*e,v):Math.sqrt(g)},v.tapDistance=function(e){return arguments.length?(_=+e,v):_},v}var oo=class extends Map{constructor(e,n=uo){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(let[n,r]of e)this.set(n,r)}get(e){return super.get(so(this,e))}has(e){return super.has(so(this,e))}set(e,n){return super.set(co(this,e),n)}delete(e){return super.delete(lo(this,e))}};function so({_intern:e,_key:n},r){let i=n(r);return e.has(i)?e.get(i):r}function co({_intern:e,_key:n},r){let i=n(r);return e.has(i)?e.get(i):(e.set(i,r),r)}function lo({_intern:e,_key:n},r){let i=n(r);return e.has(i)&&(r=e.get(r),e.delete(i)),r}function uo(e){return typeof e==`object`&&e?e.valueOf():e}function fo(e,n){let r;if(n===void 0)for(let n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);else{let i=-1;for(let a of e)(a=n(a,++i,e))!=null&&(r<a||r===void 0&&a>=a)&&(r=a)}return r}function po(e,n){let r;if(n===void 0)for(let n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let i=-1;for(let a of e)(a=n(a,++i,e))!=null&&(r>a||r===void 0&&a>=a)&&(r=a)}return r}function mo(e,n){let r=0;if(n===void 0)for(let n of e)(n=+n)&&(r+=n);else{let i=-1;for(let a of e)(a=+n(a,++i,e))&&(r+=a)}return r}var ho=typeof global==`object`&&global&&global.Object===Object&&global,go=typeof self==`object`&&self&&self.Object===Object&&self,_o=ho||go||Function(`return this`)(),vo=_o.Symbol,yo=Object.prototype,bo=yo.hasOwnProperty,xo=yo.toString,So=vo?vo.toStringTag:void 0;function Co(e){var n=bo.call(e,So),r=e[So];try{e[So]=void 0;var i=!0}catch{}var a=xo.call(e);return i&&(n?e[So]=r:delete e[So]),a}var wo=Object.prototype.toString;function To(e){return wo.call(e)}var Eo=`[object Null]`,Do=`[object Undefined]`,Oo=vo?vo.toStringTag:void 0;function ko(e){return e==null?e===void 0?Do:Eo:Oo&&Oo in Object(e)?Co(e):To(e)}function Ao(e){return typeof e==`object`&&!!e}var jo=`[object Symbol]`;function Mo(e){return typeof e==`symbol`||Ao(e)&&ko(e)==jo}var No=/\s/;function Po(e){for(var n=e.length;n--&&No.test(e.charAt(n)););return n}var Fo=/^\s+/;function Io(e){return e&&e.slice(0,Po(e)+1).replace(Fo,``)}function Lo(e){var n=typeof e;return e!=null&&(n==`object`||n==`function`)}var Ro=NaN,zo=/^[-+]0x[0-9a-f]+$/i,Bo=/^0b[01]+$/i,Vo=/^0o[0-7]+$/i,Ho=parseInt;function Uo(e){if(typeof e==`number`)return e;if(Mo(e))return Ro;if(Lo(e)){var n=typeof e.valueOf==`function`?e.valueOf():e;e=Lo(n)?n+``:n}if(typeof e!=`string`)return e===0?e:+e;e=Io(e);var r=Bo.test(e);return r||Vo.test(e)?Ho(e.slice(2),r?2:8):zo.test(e)?Ro:+e}var Wo=function(){return _o.Date.now()},Go=`Expected a function`,Ko=Math.max,qo=Math.min;function Jo(e,n,r){var i,a,o,s,c,l,u=0,d=!1,f=!1,p=!0;if(typeof e!=`function`)throw TypeError(Go);n=Uo(n)||0,Lo(r)&&(d=!!r.leading,f=`maxWait`in r,o=f?Ko(Uo(r.maxWait)||0,n):o,p=`trailing`in r?!!r.trailing:p);function m(n){var r=i,o=a;return i=a=void 0,u=n,s=e.apply(o,r),s}function h(e){return u=e,c=setTimeout(v,n),d?m(e):s}function g(e){var r=e-l,i=e-u,a=n-r;return f?qo(a,o-i):a}function _(e){var r=e-l,i=e-u;return l===void 0||r>=n||r<0||f&&i>=o}function v(){var e=Wo();if(_(e))return y(e);c=setTimeout(v,g(e))}function y(e){return c=void 0,p&&i?m(e):(i=a=void 0,s)}function b(){c!==void 0&&clearTimeout(c),u=0,i=l=a=c=void 0}function x(){return c===void 0?s:y(Wo())}function S(){var e=Wo(),r=_(e);if(i=arguments,a=this,l=e,r){if(c===void 0)return h(l);if(f)return clearTimeout(c),c=setTimeout(v,n),m(l)}return c===void 0&&(c=setTimeout(v,n)),s}return S.cancel=b,S.flush=x,S}var Yo=`Expected a function`;function Xo(e,n,r){var i=!0,a=!0;if(typeof e!=`function`)throw TypeError(Yo);return Lo(r)&&(i=`leading`in r?!!r.leading:i,a=`trailing`in r?!!r.trailing:a),Jo(e,n,{leading:i,maxWait:n,trailing:a})}var Zo=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:1024**(e-1)},Out:function(e){return e===1?1:1-2**(-10*e)},InOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*1024**(e-1):.5*(-(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:-(2**(10*(e-1)))*Math.sin((e-1.1)*5*Math.PI)},Out:function(e){return e===0?0:e===1?1: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*2**(10*(e-1))*Math.sin((e-1.1)*5*Math.PI):.5*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=1.70158*1.525;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-Zo.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?Zo.Bounce.In(e*2)*.5:Zo.Bounce.Out(e*2-1)*.5+.5}}),generatePow:function(e){return e===void 0&&(e=4),e=e<2**-52?2**-52:e,e=e>1e4?1e4:e,{In:function(n){return n**+e},Out:function(n){return 1-(1-n)**e},InOut:function(n){return n<.5?(n*2)**e/2:(1-(2-n*2)**e)/2+.5}}}}),Qo=function(){return performance.now()},$o=function(){function e(){var e=[...arguments];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,e)}return e.prototype.getAll=function(){var e=this;return Object.keys(this._tweens).map(function(n){return e._tweens[n]})},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(){for(var e,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];for(var i=0,a=n;i<a.length;i++){var o=a[i];(e=o._group)==null||e.remove(o),o._group=this,this._tweens[o.getId()]=o,this._tweensAddedDuringUpdate[o.getId()]=o}},e.prototype.remove=function(){for(var e=[...arguments],n=0,r=e;n<r.length;n++){var i=r[n];i._group=void 0,delete this._tweens[i.getId()],delete this._tweensAddedDuringUpdate[i.getId()]}},e.prototype.allStopped=function(){return this.getAll().every(function(e){return!e.isPlaying()})},e.prototype.update=function(e,n){e===void 0&&(e=Qo()),n===void 0&&(n=!0);var r=Object.keys(this._tweens);if(r.length!==0)for(;r.length>0;){this._tweensAddedDuringUpdate={};for(var i=0;i<r.length;i++){var a=this._tweens[r[i]],o=!n;a&&a.update(e,o)===!1&&!n&&this.remove(a)}r=Object.keys(this._tweensAddedDuringUpdate)}},e}(),es={Linear:function(e,n){var r=e.length-1,i=r*n,a=Math.floor(i),o=es.Utils.Linear;return n<0?o(e[0],e[1],i):n>1?o(e[r],e[r-1],r-i):o(e[a],e[a+1>r?r:a+1],i-a)},Bezier:function(e,n){for(var r=0,i=e.length-1,a=Math.pow,o=es.Utils.Bernstein,s=0;s<=i;s++)r+=a(1-n,i-s)*a(n,s)*e[s]*o(i,s);return r},CatmullRom:function(e,n){var r=e.length-1,i=r*n,a=Math.floor(i),o=es.Utils.CatmullRom;return e[0]===e[r]?(n<0&&(a=Math.floor(i=r*(1+n))),o(e[(a-1+r)%r],e[a],e[(a+1)%r],e[(a+2)%r],i-a)):n<0?e[0]-(o(e[0],e[0],e[1],e[1],-i)-e[0]):n>1?e[r]-(o(e[r],e[r],e[r-1],e[r-1],i-r)-e[r]):o(e[a?a-1:0],e[a],e[r<a+1?r:a+1],e[r<a+2?r:a+2],i-a)},Utils:{Linear:function(e,n,r){return(n-e)*r+e},Bernstein:function(e,n){var r=es.Utils.Factorial;return r(e)/r(n)/r(e-n)},Factorial:(function(){var e=[1];return function(n){var r=1;if(e[n])return e[n];for(var i=n;i>1;i--)r*=i;return e[n]=r,r}})(),CatmullRom:function(e,n,r,i,a){var o=(r-e)*.5,s=(i-n)*.5,c=a*a,l=a*c;return(2*n-2*r+o+s)*l+(-3*n+3*r-2*o-s)*c+o*a+n}}},ts=function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e}(),ns=new $o,rs=function(){function e(e,n){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=Zo.Linear.None,this._interpolationFunction=es.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=ts.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=e,typeof n==`object`?(this._group=n,n.add(this)):n===!0&&(this._group=ns,ns.add(this))}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(e,n){if(n===void 0&&(n=1e3),this._isPlaying)throw Error(`Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.`);return this._valuesEnd=e,this._propertiesAreSetUp=!1,this._duration=n<0?0:n,this},e.prototype.duration=function(e){return e===void 0&&(e=1e3),this._duration=e<0?0:e,this},e.prototype.dynamic=function(e){return e===void 0&&(e=!1),this._isDynamic=e,this},e.prototype.start=function(e,n){if(e===void 0&&(e=Qo()),n===void 0&&(n=!1),this._isPlaying)return this;if(this._repeat=this._initialRepeat,this._reversed)for(var r in this._reversed=!1,this._valuesStartRepeat)this._swapEndStartRepeatValues(r),this._valuesStart[r]=this._valuesStartRepeat[r];if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=e,this._startTime+=this._delayTime,!this._propertiesAreSetUp||n){if(this._propertiesAreSetUp=!0,!this._isDynamic){var i={};for(var a in this._valuesEnd)i[a]=this._valuesEnd[a];this._valuesEnd=i}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,n)}return this},e.prototype.startFromCurrentValues=function(e){return this.start(e,!0)},e.prototype._setupProperties=function(e,n,r,i,a){for(var o in r){var s=e[o],c=Array.isArray(s),l=c?`array`:typeof s,u=!c&&Array.isArray(r[o]);if(!(l===`undefined`||l===`function`)){if(u){var d=r[o];if(d.length===0)continue;for(var f=[s],p=0,m=d.length;p<m;p+=1){var h=this._handleRelativeValue(s,d[p]);if(isNaN(h)){u=!1,console.warn(`Found invalid interpolation list. Skipping.`);break}f.push(h)}u&&(r[o]=f)}if((l===`object`||c)&&s&&!u){n[o]=c?[]:{};var g=s;for(var _ in g)n[o][_]=g[_];i[o]=c?[]:{};var d=r[o];if(!this._isDynamic){var v={};for(var _ in d)v[_]=d[_];r[o]=d=v}this._setupProperties(g,n[o],d,i[o],a)}else (n[o]===void 0||a)&&(n[o]=s),c||(n[o]*=1),u?i[o]=r[o].slice().reverse():i[o]=n[o]||0}}},e.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},e.prototype.end=function(){return this._goToEnd=!0,this.update(this._startTime+this._duration),this},e.prototype.pause=function(e){return e===void 0&&(e=Qo()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=e,this)},e.prototype.resume=function(e){return e===void 0&&(e=Qo()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=e-this._pauseStart,this._pauseStart=0,this)},e.prototype.stopChainedTweens=function(){for(var e=0,n=this._chainedTweens.length;e<n;e++)this._chainedTweens[e].stop();return this},e.prototype.group=function(e){return e?(e.add(this),this):(console.warn(`tween.group() without args has been removed, use group.add(tween) instead.`),this)},e.prototype.remove=function(){var e;return(e=this._group)==null||e.remove(this),this},e.prototype.delay=function(e){return e===void 0&&(e=0),this._delayTime=e,this},e.prototype.repeat=function(e){return e===void 0&&(e=0),this._initialRepeat=e,this._repeat=e,this},e.prototype.repeatDelay=function(e){return this._repeatDelayTime=e,this},e.prototype.yoyo=function(e){return e===void 0&&(e=!1),this._yoyo=e,this},e.prototype.easing=function(e){return e===void 0&&(e=Zo.Linear.None),this._easingFunction=e,this},e.prototype.interpolation=function(e){return e===void 0&&(e=es.Linear),this._interpolationFunction=e,this},e.prototype.chain=function(){return this._chainedTweens=[...arguments],this},e.prototype.onStart=function(e){return this._onStartCallback=e,this},e.prototype.onEveryStart=function(e){return this._onEveryStartCallback=e,this},e.prototype.onUpdate=function(e){return this._onUpdateCallback=e,this},e.prototype.onRepeat=function(e){return this._onRepeatCallback=e,this},e.prototype.onComplete=function(e){return this._onCompleteCallback=e,this},e.prototype.onStop=function(e){return this._onStopCallback=e,this},e.prototype.update=function(n,r){var i=this;if(n===void 0&&(n=Qo()),r===void 0&&(r=e.autoStartOnUpdate),this._isPaused)return!0;var a;if(!this._goToEnd&&!this._isPlaying)if(r)this.start(n,!0);else return!1;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 o=n-this._startTime,s=this._duration+(this._repeatDelayTime??this._delayTime),c=this._duration+this._repeat*s,l=function(){if(i._duration===0||o>c)return 1;var e=o-Math.trunc(o/s)*s,n=Math.min(e/i._duration,1);return n===0&&o===i._duration?1:n}(),u=this._easingFunction(l);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,u),this._onUpdateCallback&&this._onUpdateCallback(this._object,l),this._duration===0||o>=this._duration)if(this._repeat>0){var d=Math.min(Math.trunc((o-this._duration)/s)+1,this._repeat);for(a in isFinite(this._repeat)&&(this._repeat-=d),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+=s*d,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var f=0,p=this._chainedTweens.length;f<p;f++)this._chainedTweens[f].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},e.prototype._updateProperties=function(e,n,r,i){for(var a in r)if(n[a]!==void 0){var o=n[a]||0,s=r[a];!Array.isArray(e[a])&&Array.isArray(s)?e[a]=this._interpolationFunction(s,i):typeof s==`object`&&s?this._updateProperties(e[a],o,s,i):(s=this._handleRelativeValue(o,s),typeof s==`number`&&(e[a]=o+(s-o)*i))}},e.prototype._handleRelativeValue=function(e,n){return typeof n==`string`?n.charAt(0)===`+`||n.charAt(0)===`-`?e+parseFloat(n):parseFloat(n):n},e.prototype._swapEndStartRepeatValues=function(e){var n=this._valuesStartRepeat[e],r=this._valuesEnd[e];typeof r==`string`?this._valuesStartRepeat[e]=this._valuesStartRepeat[e]+parseFloat(r):this._valuesStartRepeat[e]=this._valuesEnd[e],this._valuesEnd[e]=n},e.autoStartOnUpdate=!1,e}();ts.nextId;var is=ns;is.getAll.bind(is),is.removeAll.bind(is),is.add.bind(is),is.remove.bind(is),is.update.bind(is);function as(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 os(e){if(Array.isArray(e))return e}function ss(e,n){if(!(e instanceof n))throw TypeError(`Cannot call a class as a function`)}function cs(e,n,r){return Object.defineProperty(e,`prototype`,{writable:!1}),e}function ls(e,n){var r=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(r!=null){var i,a,o,s,c=[],l=!0,u=!1;try{if(o=(r=r.call(e)).next,n!==0)for(;!(l=(i=o.call(r)).done)&&(c.push(i.value),c.length!==n);l=!0);}catch(e){u=!0,a=e}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return c}}function us(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
6
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ds(e,n){return os(e)||ls(e,n)||fs(e,n)||us()}function fs(e,n){if(e){if(typeof e==`string`)return as(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)?as(e,n):void 0}}var ps=cs(function e(n,r){var i=r.default,a=i===void 0?null:i,o=r.triggerUpdate,s=o===void 0?!0:o,c=r.onChange,l=c===void 0?function(e,n){}:c;ss(this,e),this.name=n,this.defaultVal=a,this.triggerUpdate=s,this.onChange=l});function ms(e){var n=e.stateInit,r=n===void 0?function(){return{}}:n,i=e.props,a=i===void 0?{}:i,o=e.methods,s=o===void 0?{}:o,c=e.aliases,l=c===void 0?{}:c,u=e.init,d=u===void 0?function(){}:u,f=e.update,p=f===void 0?function(){}:f,m=Object.keys(a).map(function(e){return new ps(e,a[e])});return function e(){var n=[...arguments],i=!!(this instanceof e&&this.constructor),a=i?n.shift():void 0,o=n[0],c=o===void 0?{}:o,u=Object.assign({},r instanceof Function?r(c):r,{initialised:!1}),f={};function h(e){return g(e,c),_(),h}var g=function(e,n){d.call(h,e,u,n),u.initialised=!0},_=Jo(function(){u.initialised&&(p.call(h,u,f),f={})},1);return m.forEach(function(e){h[e.name]=n(e);function n(e){var n=e.name,r=e.triggerUpdate,i=r===void 0?!1:r,a=e.onChange,o=a===void 0?function(e,n){}:a,s=e.defaultVal,c=s===void 0?null:s;return function(e){var r=u[n];if(!arguments.length)return r;var a=e===void 0?c:e;return u[n]=a,o.call(h,a,u,r),!f.hasOwnProperty(n)&&(f[n]=r),i&&_(),h}}}),Object.keys(s).forEach(function(e){h[e]=function(){var n,r=[...arguments];return(n=s[e]).call.apply(n,[h,u].concat(r))}}),Object.entries(l).forEach(function(e){var n=ds(e,2),r=n[0];return h[r]=h[n[1]]}),h.resetProps=function(){return m.forEach(function(e){h[e.name](e.defaultVal)}),h},h.resetProps(),u._rerender=_,i&&a&&h(a),h}}var V=(function(e){return typeof e==`function`?e:typeof e==`string`?function(n){return n[e]}:function(n){return e}});function hs(e){"@babel/helpers - typeof";return hs=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},hs(e)}var gs=/^\s+/,_s=/\s+$/;function H(e,n){if(e||=``,n||={},e instanceof H)return e;if(!(this instanceof H))return new H(e,n);var r=vs(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 e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var e=this.toRgb(),n=e.r/255,r=e.g/255,i=e.b/255,a=n<=.03928?n/12.92:((n+.055)/1.055)**2.4,o=r<=.03928?r/12.92:((r+.055)/1.055)**2.4,s=i<=.03928?i/12.92:((i+.055)/1.055)**2.4;return .2126*a+.7152*o+.0722*s},setAlpha:function(e){return this._a=Hs(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=Ss(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=Ss(this._r,this._g,this._b),n=Math.round(e.h*360),r=Math.round(e.s*100),i=Math.round(e.v*100);return this._a==1?`hsv(`+n+`, `+r+`%, `+i+`%)`:`hsva(`+n+`, `+r+`%, `+i+`%, `+this._roundA+`)`},toHsl:function(){var e=bs(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=bs(this._r,this._g,this._b),n=Math.round(e.h*360),r=Math.round(e.s*100),i=Math.round(e.l*100);return this._a==1?`hsl(`+n+`, `+r+`%, `+i+`%)`:`hsla(`+n+`, `+r+`%, `+i+`%, `+this._roundA+`)`},toHex:function(e){return ws(this._r,this._g,this._b,e)},toHexString:function(e){return`#`+this.toHex(e)},toHex8:function(e){return Ts(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return`#`+this.toHex8(e)},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(U(this._r,255)*100)+`%`,g:Math.round(U(this._g,255)*100)+`%`,b:Math.round(U(this._b,255)*100)+`%`,a:this._a}},toPercentageRgbString:function(){return this._a==1?`rgb(`+Math.round(U(this._r,255)*100)+`%, `+Math.round(U(this._g,255)*100)+`%, `+Math.round(U(this._b,255)*100)+`%)`:`rgba(`+Math.round(U(this._r,255)*100)+`%, `+Math.round(U(this._g,255)*100)+`%, `+Math.round(U(this._b,255)*100)+`%, `+this._roundA+`)`},toName:function(){return this._a===0?`transparent`:this._a<1?!1:Bs[ws(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var n=`#`+Es(this._r,this._g,this._b,this._a),r=n,i=this._gradientType?`GradientType = 1, `:``;if(e){var a=H(e);r=`#`+Es(a._r,a._g,a._b,a._a)}return`progid:DXImageTransform.Microsoft.gradient(`+i+`startColorstr=`+n+`,endColorstr=`+r+`)`},toString:function(e){var n=!!e;e||=this._format;var r=!1,i=this._a<1&&this._a>=0;return!n&&i&&(e===`hex`||e===`hex6`||e===`hex3`||e===`hex4`||e===`hex8`||e===`name`)?e===`name`&&this._a===0?this.toName():this.toRgbString():(e===`rgb`&&(r=this.toRgbString()),e===`prgb`&&(r=this.toPercentageRgbString()),(e===`hex`||e===`hex6`)&&(r=this.toHexString()),e===`hex3`&&(r=this.toHexString(!0)),e===`hex4`&&(r=this.toHex8String(!0)),e===`hex8`&&(r=this.toHex8String()),e===`name`&&(r=this.toName()),e===`hsl`&&(r=this.toHslString()),e===`hsv`&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return H(this.toString())},_applyModification:function(e,n){var r=e.apply(null,[this].concat([].slice.call(n)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(As,arguments)},brighten:function(){return this._applyModification(js,arguments)},darken:function(){return this._applyModification(Ms,arguments)},desaturate:function(){return this._applyModification(Ds,arguments)},saturate:function(){return this._applyModification(Os,arguments)},greyscale:function(){return this._applyModification(ks,arguments)},spin:function(){return this._applyModification(Ns,arguments)},_applyCombination:function(e,n){return e.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(Ls,arguments)},complement:function(){return this._applyCombination(Ps,arguments)},monochromatic:function(){return this._applyCombination(Rs,arguments)},splitcomplement:function(){return this._applyCombination(Is,arguments)},triad:function(){return this._applyCombination(Fs,[3])},tetrad:function(){return this._applyCombination(Fs,[4])}},H.fromRatio=function(e,n){if(hs(e)==`object`){var r={};for(var i in e)e.hasOwnProperty(i)&&(i===`a`?r[i]=e[i]:r[i]=qs(e[i]));e=r}return H(e,n)};function vs(e){var n={r:0,g:0,b:0},r=1,i=null,a=null,o=null,s=!1,c=!1;return typeof e==`string`&&(e=Qs(e)),hs(e)==`object`&&(Zs(e.r)&&Zs(e.g)&&Zs(e.b)?(n=ys(e.r,e.g,e.b),s=!0,c=String(e.r).substr(-1)===`%`?`prgb`:`rgb`):Zs(e.h)&&Zs(e.s)&&Zs(e.v)?(i=qs(e.s),a=qs(e.v),n=Cs(e.h,i,a),s=!0,c=`hsv`):Zs(e.h)&&Zs(e.s)&&Zs(e.l)&&(i=qs(e.s),o=qs(e.l),n=xs(e.h,i,o),s=!0,c=`hsl`),e.hasOwnProperty(`a`)&&(r=e.a)),r=Hs(r),{ok:s,format:e.format||c,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 ys(e,n,r){return{r:U(e,255)*255,g:U(n,255)*255,b:U(r,255)*255}}function bs(e,n,r){e=U(e,255),n=U(n,255),r=U(r,255);var i=Math.max(e,n,r),a=Math.min(e,n,r),o,s,c=(i+a)/2;if(i==a)o=s=0;else{var l=i-a;switch(s=c>.5?l/(2-i-a):l/(i+a),i){case e:o=(n-r)/l+(n<r?6:0);break;case n:o=(r-e)/l+2;break;case r:o=(e-n)/l+4;break}o/=6}return{h:o,s,l:c}}function xs(e,n,r){var i,a,o;e=U(e,360),n=U(n,100),r=U(r,100);function s(e,n,r){return r<0&&(r+=1),r>1&&--r,r<1/6?e+(n-e)*6*r:r<1/2?n:r<2/3?e+(n-e)*(2/3-r)*6:e}if(n===0)i=a=o=r;else{var c=r<.5?r*(1+n):r+n-r*n,l=2*r-c;i=s(l,c,e+1/3),a=s(l,c,e),o=s(l,c,e-1/3)}return{r:i*255,g:a*255,b:o*255}}function Ss(e,n,r){e=U(e,255),n=U(n,255),r=U(r,255);var i=Math.max(e,n,r),a=Math.min(e,n,r),o,s,c=i,l=i-a;if(s=i===0?0:l/i,i==a)o=0;else{switch(i){case e:o=(n-r)/l+(n<r?6:0);break;case n:o=(r-e)/l+2;break;case r:o=(e-n)/l+4;break}o/=6}return{h:o,s,v:c}}function Cs(e,n,r){e=U(e,360)*6,n=U(n,100),r=U(r,100);var i=Math.floor(e),a=e-i,o=r*(1-n),s=r*(1-a*n),c=r*(1-(1-a)*n),l=i%6,u=[r,s,o,o,c,r][l],d=[c,r,r,s,o,o][l],f=[o,o,c,r,r,s][l];return{r:u*255,g:d*255,b:f*255}}function ws(e,n,r,i){var a=[Ks(Math.round(e).toString(16)),Ks(Math.round(n).toString(16)),Ks(Math.round(r).toString(16))];return i&&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[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join(``)}function Ts(e,n,r,i,a){var o=[Ks(Math.round(e).toString(16)),Ks(Math.round(n).toString(16)),Ks(Math.round(r).toString(16)),Ks(Js(i))];return a&&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[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join(``)}function Es(e,n,r,i){return[Ks(Js(i)),Ks(Math.round(e).toString(16)),Ks(Math.round(n).toString(16)),Ks(Math.round(r).toString(16))].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 Ds(e,n){n=n===0?0:n||10;var r=H(e).toHsl();return r.s-=n/100,r.s=Us(r.s),H(r)}function Os(e,n){n=n===0?0:n||10;var r=H(e).toHsl();return r.s+=n/100,r.s=Us(r.s),H(r)}function ks(e){return H(e).desaturate(100)}function As(e,n){n=n===0?0:n||10;var r=H(e).toHsl();return r.l+=n/100,r.l=Us(r.l),H(r)}function js(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 Ms(e,n){n=n===0?0:n||10;var r=H(e).toHsl();return r.l-=n/100,r.l=Us(r.l),H(r)}function Ns(e,n){var r=H(e).toHsl(),i=(r.h+n)%360;return r.h=i<0?360+i:i,H(r)}function Ps(e){var n=H(e).toHsl();return n.h=(n.h+180)%360,H(n)}function Fs(e,n){if(isNaN(n)||n<=0)throw Error(`Argument to polyad must be a positive number`);for(var r=H(e).toHsl(),i=[H(e)],a=360/n,o=1;o<n;o++)i.push(H({h:(r.h+o*a)%360,s:r.s,l:r.l}));return i}function Is(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 Ls(e,n,r){n||=6,r||=30;var i=H(e).toHsl(),a=360/r,o=[H(e)];for(i.h=(i.h-(a*n>>1)+720)%360;--n;)i.h=(i.h+a)%360,o.push(H(i));return o}function Rs(e,n){n||=6;for(var r=H(e).toHsv(),i=r.h,a=r.s,o=r.v,s=[],c=1/n;n--;)s.push(H({h:i,s:a,v:o})),o=(o+c)%1;return s}H.mix=function(e,n,r){r=r===0?0:r||50;var i=H(e).toRgb(),a=H(n).toRgb(),o=r/100;return H({r:(a.r-i.r)*o+i.r,g:(a.g-i.g)*o+i.g,b:(a.b-i.b)*o+i.b,a:(a.a-i.a)*o+i.a})},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),a,o=!1;switch(a=$s(r),a.level+a.size){case`AAsmall`:case`AAAlarge`:o=i>=4.5;break;case`AAlarge`:o=i>=3;break;case`AAAsmall`:o=i>=7;break}return o},H.mostReadable=function(e,n,r){var i=null,a=0,o,s,c,l;r||={},s=r.includeFallbackColors,c=r.level,l=r.size;for(var u=0;u<n.length;u++)o=H.readability(e,n[u]),o>a&&(a=o,i=H(n[u]));return H.isReadable(e,i,{level:c,size:l})||!s?i:(r.includeFallbackColors=!1,H.mostReadable(e,[`#fff`,`#000`],r))};var zs=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`},Bs=H.hexNames=Vs(zs);function Vs(e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[e[r]]=r);return n}function Hs(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function U(e,n){Ws(e)&&(e=`100%`);var r=Gs(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 Us(e){return Math.min(1,Math.max(0,e))}function W(e){return parseInt(e,16)}function Ws(e){return typeof e==`string`&&e.indexOf(`.`)!=-1&&parseFloat(e)===1}function Gs(e){return typeof e==`string`&&e.indexOf(`%`)!=-1}function Ks(e){return e.length==1?`0`+e:``+e}function qs(e){return e<=1&&(e=e*100+`%`),e}function Js(e){return Math.round(parseFloat(e)*255).toString(16)}function Ys(e){return W(e)/255}var Xs=function(){var e=`(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)`,n=`[\\s|\\(]+(`+e+`)[,|\\s]+(`+e+`)[,|\\s]+(`+e+`)\\s*\\)?`,r=`[\\s|\\(]+(`+e+`)[,|\\s]+(`+e+`)[,|\\s]+(`+e+`)[,|\\s]+(`+e+`)\\s*\\)?`;return{CSS_UNIT:new RegExp(e),rgb:RegExp(`rgb`+n),rgba:RegExp(`rgba`+r),hsl:RegExp(`hsl`+n),hsla:RegExp(`hsla`+r),hsv:RegExp(`hsv`+n),hsva:RegExp(`hsva`+r),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 Zs(e){return!!Xs.CSS_UNIT.exec(e)}function Qs(e){e=e.replace(gs,``).replace(_s,``).toLowerCase();var n=!1;if(zs[e])e=zs[e],n=!0;else if(e==`transparent`)return{r:0,g:0,b:0,a:0,format:`name`};var r;return(r=Xs.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=Xs.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=Xs.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=Xs.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=Xs.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=Xs.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=Xs.hex8.exec(e))?{r:W(r[1]),g:W(r[2]),b:W(r[3]),a:Ys(r[4]),format:n?`name`:`hex8`}:(r=Xs.hex6.exec(e))?{r:W(r[1]),g:W(r[2]),b:W(r[3]),format:n?`name`:`hex`}:(r=Xs.hex4.exec(e))?{r:W(r[1]+``+r[1]),g:W(r[2]+``+r[2]),b:W(r[3]+``+r[3]),a:Ys(r[4]+``+r[4]),format:n?`name`:`hex8`}:(r=Xs.hex3.exec(e))?{r:W(r[1]+``+r[1]),g:W(r[2]+``+r[2]),b:W(r[3]+``+r[3]),format:n?`name`:`hex`}:!1}function $s(e){var n,r;return 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 ec(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 tc(e){if(Array.isArray(e))return ec(e)}function nc(e,n,r){if(typeof e==`function`?e===n:e.has(n))return arguments.length<3?n:r;throw TypeError(`Private element is not present on this object`)}function rc(e,n){if(n.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function ic(e,n){if(!(e instanceof n))throw TypeError(`Cannot call a class as a function`)}function ac(e,n){return e.get(nc(e,n))}function oc(e,n,r){rc(e,n),n.set(e,r)}function sc(e,n,r){return e.set(nc(e,n),r),r}function cc(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,mc(i.key),i)}}function lc(e,n,r){return n&&cc(e.prototype,n),Object.defineProperty(e,`prototype`,{writable:!1}),e}function uc(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function dc(){throw TypeError(`Invalid attempt to spread non-iterable instance.
7
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fc(e){return tc(e)||uc(e)||hc(e)||dc()}function pc(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 TypeError(`@@toPrimitive must return a primitive value.`)}return String(e)}function mc(e){var n=pc(e,`string`);return typeof n==`symbol`?n:n+``}function hc(e,n){if(e){if(typeof e==`string`)return ec(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)?ec(e,n):void 0}}var gc=123,_c=function(e){return`#${Math.min(e,2**24).toString(16).padStart(6,`0`)}`},vc=function(e,n,r){return(e<<16)+(n<<8)+r},yc=function(e){var n=H(e).toRgb(),r=n.r,i=n.g,a=n.b;return vc(r,i,a)},bc=function(e,n){return e*gc%2**n},xc=new WeakMap,Sc=new WeakMap,Cc=function(){function e(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:6;ic(this,e),oc(this,xc,void 0),oc(this,Sc,void 0),sc(Sc,this,n),this.reset()}return lc(e,[{key:`reset`,value:function(){sc(xc,this,[`__reserved for background__`])}},{key:`register`,value:function(e){if(ac(xc,this).length>=2**(24-ac(Sc,this)))return null;var n=ac(xc,this).length,r=_c(n+(bc(n,ac(Sc,this))<<24-ac(Sc,this)));return ac(xc,this).push(e),r}},{key:`lookup`,value:function(e){if(!e)return null;var n=typeof e==`string`?yc(e):vc.apply(void 0,fc(e));if(!n)return null;var r=n&2**(24-ac(Sc,this))-1,i=n>>24-ac(Sc,this)&2**ac(Sc,this)-1;return bc(r,ac(Sc,this))!==i||r>=ac(xc,this).length?null:ac(xc,this)[r]}}])}(),wc,G,Tc,Ec,Dc,Oc,kc,Ac,jc,Mc,Nc,Pc,Fc,Ic,Lc,Rc={},zc=[],Bc=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Vc=Array.isArray;function Hc(e,n){for(var r in n)e[r]=n[r];return e}function Uc(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Wc(e,n,r){var i,a,o,s={};for(o in n)o==`key`?i=n[o]:o==`ref`?a=n[o]:s[o]=n[o];if(arguments.length>2&&(s.children=arguments.length>3?wc.call(arguments,2):r),typeof e==`function`&&e.defaultProps!=null)for(o in e.defaultProps)s[o]===void 0&&(s[o]=e.defaultProps[o]);return Gc(e,s,i,a,null)}function Gc(e,n,r,i,a){var o={type:e,props:n,key:r,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:a??++Tc,__i:-1,__u:0};return a==null&&G.vnode!=null&&G.vnode(o),o}function Kc(e){return e.children}function qc(e,n){this.props=e,this.context=n}function Jc(e,n){if(n==null)return e.__?Jc(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`?Jc(e):null}function Yc(e){if(e.__P&&e.__d){var n=e.__v,r=n.__e,i=[],a=[],o=Hc({},n);o.__v=n.__v+1,G.vnode&&G.vnode(o),ol(e.__P,o,n,e.__n,e.__P.namespaceURI,32&n.__u?[r]:null,i,r??Jc(n),!!(32&n.__u),a),o.__v=n.__v,o.__.__k[o.__i]=o,cl(i,o,a),n.__e=n.__=null,o.__e!=r&&Xc(o)}}function Xc(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}),Xc(e)}function Zc(e){(!e.__d&&(e.__d=!0)&&Dc.push(e)&&!Qc.__r++||Oc!=G.debounceRendering)&&((Oc=G.debounceRendering)||kc)(Qc)}function Qc(){try{for(var e,n=1;Dc.length;)Dc.length>n&&Dc.sort(Ac),e=Dc.shift(),n=Dc.length,Yc(e)}finally{Dc.length=Qc.__r=0}}function $c(e,n,r,i,a,o,s,c,l,u,d){var f,p,m,h,g,_,v,y=i&&i.__k||zc,b=n.length;for(l=el(r,n,y,l,b),f=0;f<b;f++)(m=r.__k[f])!=null&&(p=m.__i!=-1&&y[m.__i]||Rc,m.__i=f,_=ol(e,m,p,a,o,s,c,l,u,d),h=m.__e,m.ref&&p.ref!=m.ref&&(p.ref&&dl(p.ref,null,m),d.push(m.ref,m.__c||h,m)),g==null&&h!=null&&(g=h),(v=!!(4&m.__u))||p.__k===m.__k?(l=tl(m,l,e,v),v&&p.__e&&(p.__e=null)):typeof m.type==`function`&&_!==void 0?l=_:h&&(l=h.nextSibling),m.__u&=-7);return r.__e=g,l}function el(e,n,r,i,a){var o,s,c,l,u,d=r.length,f=d,p=0;for(e.__k=Array(a),o=0;o<a;o++)(s=n[o])!=null&&typeof s!=`boolean`&&typeof s!=`function`?(typeof s==`string`||typeof s==`number`||typeof s==`bigint`||s.constructor==String?s=e.__k[o]=Gc(null,s,null,null,null):Vc(s)?s=e.__k[o]=Gc(Kc,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=e.__k[o]=Gc(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[o]=s,l=o+p,s.__=e,s.__b=e.__b+1,c=null,(u=s.__i=nl(s,r,l,f))!=-1&&(f--,(c=r[u])&&(c.__u|=2)),c==null||c.__v==null?(u==-1&&(a>d?p--:a<d&&p++),typeof s.type!=`function`&&(s.__u|=4)):u!=l&&(u==l-1?p--:u==l+1?p++:(u>l?p--:p++,s.__u|=4))):e.__k[o]=null;if(f)for(o=0;o<d;o++)(c=r[o])!=null&&!(2&c.__u)&&(c.__e==i&&(i=Jc(c)),fl(c,c));return i}function tl(e,n,r,i){var a,o;if(typeof e.type==`function`){for(a=e.__k,o=0;a&&o<a.length;o++)a[o]&&(a[o].__=e,n=tl(a[o],n,r,i));return n}e.__e!=n&&(i&&(n&&e.type&&!n.parentNode&&(n=Jc(e)),r.insertBefore(e.__e,n||null)),n=e.__e);do n&&=n.nextSibling;while(n!=null&&n.nodeType==8);return n}function nl(e,n,r,i){var a,o,s,c=e.key,l=e.type,u=n[r],d=u!=null&&(2&u.__u)==0;if(u===null&&c==null||d&&c==u.key&&l==u.type)return r;if(i>+!!d){for(a=r-1,o=r+1;a>=0||o<n.length;)if((u=n[s=a>=0?a--:o++])!=null&&!(2&u.__u)&&c==u.key&&l==u.type)return s}return-1}function rl(e,n,r){n[0]==`-`?e.setProperty(n,r??``):e[n]=r==null?``:typeof r!=`number`||Bc.test(n)?r:r+`px`}function il(e,n,r,i,a){var o,s;n: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||rl(e.style,n,``);if(r)for(n in r)i&&r[n]==i[n]||rl(e.style,n,r[n])}else if(n[0]==`o`&&n[1]==`n`)o=n!=(n=n.replace(Pc,`$1`)),s=n.toLowerCase(),n=s in e||n==`onFocusOut`||n==`onFocusIn`?s.slice(2):n.slice(2),e.l||={},e.l[n+o]=r,r?i?r[Nc]=i[Nc]:(r[Nc]=Fc,e.addEventListener(n,o?Lc:Ic,o)):e.removeEventListener(n,o?Lc:Ic,o);else{if(a==`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 n}catch{}typeof r==`function`||(r==null||!1===r&&n[4]!=`-`?e.removeAttribute(n):e.setAttribute(n,n==`popover`&&r==1?``:r))}}function al(e){return function(n){if(this.l){var r=this.l[n.type+e];if(n[Mc]==null)n[Mc]=Fc++;else if(n[Mc]<r[Nc])return;return r(G.event?G.event(n):n)}}}function ol(e,n,r,i,a,o,s,c,l,u){var d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E=n.type;if(n.constructor!==void 0)return null;128&r.__u&&(l=!!(32&r.__u),o=[c=n.__e=r.__e]),(d=G.__b)&&d(n);n:if(typeof E==`function`)try{if(v=n.props,y=E.prototype&&E.prototype.render,b=(d=E.contextType)&&i[d.__c],x=d?b?b.props.value:d.__:i,r.__c?_=(f=n.__c=r.__c).__=f.__E:(y?n.__c=f=new E(v,x):(n.__c=f=new qc(v,x),f.constructor=E,f.render=pl),b&&b.sub(f),f.state||={},f.__n=i,p=f.__d=!0,f.__h=[],f._sb=[]),y&&f.__s==null&&(f.__s=f.state),y&&E.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=Hc({},f.__s)),Hc(f.__s,E.getDerivedStateFromProps(v,f.__s))),m=f.props,h=f.state,f.__v=n,p)y&&E.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),y&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(y&&E.getDerivedStateFromProps==null&&v!==m&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(v,x),n.__v==r.__v||!f.__e&&f.shouldComponentUpdate!=null&&!1===f.shouldComponentUpdate(v,f.__s,x)){n.__v!=r.__v&&(f.props=v,f.state=f.__s,f.__d=!1),n.__e=r.__e,n.__k=r.__k,n.__k.some(function(e){e&&(e.__=n)}),zc.push.apply(f.__h,f._sb),f._sb=[],f.__h.length&&s.push(f);break n}f.componentWillUpdate!=null&&f.componentWillUpdate(v,f.__s,x),y&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(m,h,g)})}if(f.context=x,f.props=v,f.__P=e,f.__e=!1,S=G.__r,C=0,y)f.state=f.__s,f.__d=!1,S&&S(n),d=f.render(f.props,f.state,f.context),zc.push.apply(f.__h,f._sb),f._sb=[];else do f.__d=!1,S&&S(n),d=f.render(f.props,f.state,f.context),f.state=f.__s;while(f.__d&&++C<25);f.state=f.__s,f.getChildContext!=null&&(i=Hc(Hc({},i),f.getChildContext())),y&&!p&&f.getSnapshotBeforeUpdate!=null&&(g=f.getSnapshotBeforeUpdate(m,h)),w=d!=null&&d.type===Kc&&d.key==null?ll(d.props.children):d,c=$c(e,Vc(w)?w:[w],n,r,i,a,o,s,c,l,u),f.base=n.__e,n.__u&=-161,f.__h.length&&s.push(f),_&&(f.__E=f.__=null)}catch(e){if(n.__v=null,l||o!=null)if(e.then){for(n.__u|=l?160:128;c&&c.nodeType==8&&c.nextSibling;)c=c.nextSibling;o[o.indexOf(c)]=null,n.__e=c}else{for(T=o.length;T--;)Uc(o[T]);sl(n)}else n.__e=r.__e,n.__k=r.__k,e.then||sl(n);G.__e(e,n,r)}else o==null&&n.__v==r.__v?(n.__k=r.__k,n.__e=r.__e):c=n.__e=ul(r.__e,n,r,i,a,o,s,l,u);return(d=G.diffed)&&d(n),128&n.__u?void 0:c}function sl(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(sl))}function cl(e,n,r){for(var i=0;i<r.length;i++)dl(r[i],r[++i],r[++i]);G.__c&&G.__c(n,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(e){e.call(n)})}catch(e){G.__e(e,n.__v)}})}function ll(e){return typeof e!=`object`||!e||e.__b>0?e:Vc(e)?e.map(ll):Hc({},e)}function ul(e,n,r,i,a,o,s,c,l){var u,d,f,p,m,h,g,_=r.props||Rc,v=n.props,y=n.type;if(y==`svg`?a=`http://www.w3.org/2000/svg`:y==`math`?a=`http://www.w3.org/1998/Math/MathML`:a||=`http://www.w3.org/1999/xhtml`,o!=null){for(u=0;u<o.length;u++)if((m=o[u])&&`setAttribute`in m==!!y&&(y?m.localName==y:m.nodeType==3)){e=m,o[u]=null;break}}if(e==null){if(y==null)return document.createTextNode(v);e=document.createElementNS(a,y,v.is&&v),c&&=(G.__m&&G.__m(n,o),!1),o=null}if(y==null)_===v||c&&e.data==v||(e.data=v);else{if(o&&=wc.call(e.childNodes),!c&&o!=null)for(_={},u=0;u<e.attributes.length;u++)_[(m=e.attributes[u]).name]=m.value;for(u in _)m=_[u],u==`dangerouslySetInnerHTML`?f=m:u==`children`||u in v||u==`value`&&`defaultValue`in v||u==`checked`&&`defaultChecked`in v||il(e,u,null,m,a);for(u in v)m=v[u],u==`children`?p=m:u==`dangerouslySetInnerHTML`?d=m:u==`value`?h=m:u==`checked`?g=m:c&&typeof m!=`function`||_[u]===m||il(e,u,m,_[u],a);if(d)c||f&&(d.__html==f.__html||d.__html==e.innerHTML)||(e.innerHTML=d.__html),n.__k=[];else if(f&&(e.innerHTML=``),$c(n.type==`template`?e.content:e,Vc(p)?p:[p],n,r,i,y==`foreignObject`?`http://www.w3.org/1999/xhtml`:a,o,s,o?o[0]:r.__k&&Jc(r,0),c,l),o!=null)for(u=o.length;u--;)Uc(o[u]);c||(u=`value`,y==`progress`&&h==null?e.removeAttribute(`value`):h!=null&&(h!==e[u]||y==`progress`&&!h||y==`option`&&h!=_[u])&&il(e,u,h,_[u],a),u=`checked`,g!=null&&g!=e[u]&&il(e,u,g,_[u],a))}return e}function dl(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(e){G.__e(e,r)}}function fl(e,n,r){var i,a;if(G.unmount&&G.unmount(e),(i=e.ref)&&(i.current&&i.current!=e.__e||dl(i,null,n)),(i=e.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(e){G.__e(e,n)}i.base=i.__P=null}if(i=e.__k)for(a=0;a<i.length;a++)i[a]&&fl(i[a],n,r||typeof e.type!=`function`);r||Uc(e.__e),e.__c=e.__=e.__e=void 0}function pl(e,n,r){return this.constructor(e,r)}function ml(e,n,r){var i,a,o,s;n==document&&(n=document.documentElement),G.__&&G.__(e,n),a=(i=typeof r==`function`)?null:r&&r.__k||n.__k,o=[],s=[],ol(n,e=(!i&&r||n).__k=Wc(Kc,null,[e]),a||Rc,Rc,n.namespaceURI,!i&&r?[r]:a?null:n.firstChild?wc.call(n.childNodes):null,o,!i&&r?r:a?a.__e:n.firstChild,i,s),cl(o,e,s)}function hl(e,n,r){var i,a,o,s,c=Hc({},e.props);for(o in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),n)o==`key`?i=n[o]:o==`ref`?a=n[o]:c[o]=n[o]===void 0&&s!=null?s[o]:n[o];return arguments.length>2&&(c.children=arguments.length>3?wc.call(arguments,2):r),Gc(e.type,c,i||e.key,a||e.ref,null)}wc=zc.slice,G={__e:function(e,n,r,i){for(var a,o,s;n=n.__;)if((a=n.__c)&&!a.__)try{if((o=a.constructor)&&o.getDerivedStateFromError!=null&&(a.setState(o.getDerivedStateFromError(e)),s=a.__d),a.componentDidCatch!=null&&(a.componentDidCatch(e,i||{}),s=a.__d),s)return a.__E=a}catch(n){e=n}throw e}},Tc=0,Ec=function(e){return e!=null&&e.constructor===void 0},qc.prototype.setState=function(e,n){var r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Hc({},this.state);typeof e==`function`&&(e=e(Hc({},r),this.props)),e&&Hc(r,e),e!=null&&this.__v&&(n&&this._sb.push(n),Zc(this))},qc.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Zc(this))},qc.prototype.render=Kc,Dc=[],kc=typeof Promise==`function`?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ac=function(e,n){return e.__v.__b-n.__v.__b},Qc.__r=0,jc=Math.random().toString(8),Mc=`__d`+jc,Nc=`__a`+jc,Pc=/(PointerCapture)$|Capture$/i,Fc=0,Ic=al(!1),Lc=al(!0);function gl(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 _l(e){if(Array.isArray(e))return e}function vl(e,n,r){return(n=Tl(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function yl(e,n){var r=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(r!=null){var i,a,o,s,c=[],l=!0,u=!1;try{if(o=(r=r.call(e)).next,n!==0)for(;!(l=(i=o.call(r)).done)&&(c.push(i.value),c.length!==n);l=!0);}catch(e){u=!0,a=e}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return c}}function bl(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
8
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xl(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}function Sl(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]==null?{}:arguments[n];n%2?xl(Object(r),!0).forEach(function(n){vl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xl(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Cl(e,n){return _l(e)||yl(e,n)||Dl(e,n)||bl()}function wl(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 TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(e)}function Tl(e){var n=wl(e,`string`);return typeof n==`symbol`?n:n+``}function El(e){"@babel/helpers - typeof";return El=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},El(e)}function Dl(e,n){if(e){if(typeof e==`string`)return gl(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)?gl(e,n):void 0}}var Ol=function(e){if(El(e)!==`object`)return e;var n=hl(e);if(n.props){var r;n.props=Sl({},n.props),n!=null&&(r=n.props)!=null&&r.children&&(n.props.children=Array.isArray(n.props.children)?n.props.children.map(Ol):Ol(n.props.children))}return n},kl=function(e){return Ec(hl(e))},Al=function(e,n){delete n.__k,ml(Ol(e),n)};function jl(e,n){n===void 0&&(n={});var r=n.insertAt;if(!(typeof document>`u`)){var i=document.head||document.getElementsByTagName(`head`)[0],a=document.createElement(`style`);a.type=`text/css`,r===`top`&&i.firstChild?i.insertBefore(a,i.firstChild):i.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}jl(`.float-tooltip-kap {
9
+ position: absolute;
10
+ width: max-content; /* prevent shrinking near right edge */
11
+ max-width: max(50%, 150px);
12
+ padding: 3px 5px;
13
+ border-radius: 3px;
14
+ font: 12px sans-serif;
15
+ color: #eee;
16
+ background: rgba(0,0,0,0.6);
17
+ pointer-events: none;
18
+ }
19
+ `);var Ml=ms({props:{content:{default:!1},offsetX:{triggerUpdate:!1},offsetY:{triggerUpdate:!1}},init:function(e,n){var r=(arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}).style,i=r===void 0?{}:r,a=z(e&&El(e)===`object`&&e.node&&typeof e.node==`function`?e.node():e);a.style(`position`)===`static`&&a.style(`position`,`relative`),n.tooltipEl=a.append(`div`).attr(`class`,`float-tooltip-kap`),Object.entries(i).forEach(function(e){var r=Cl(e,2),i=r[0],a=r[1];return n.tooltipEl.style(i,a)}),n.tooltipEl.style(`left`,`-10000px`).style(`display`,`none`);var o=`tooltip-${Math.round(Math.random()*0xe8d4a51000)}`;n.mouseInside=!1,a.on(`mousemove.${o}`,function(e){n.mouseInside=!0;var r=An(e),i=a.node(),o=i.offsetWidth,s=i.offsetHeight,c=[n.offsetX===null||n.offsetX===void 0?`-${r[0]/o*100}%`:typeof n.offsetX==`number`?`calc(-50% + ${n.offsetX}px)`:n.offsetX,n.offsetY===null||n.offsetY===void 0?s>130&&s-r[1]<100?`calc(-100% - 6px)`:`21px`:typeof n.offsetY==`number`?n.offsetY<0?`calc(-100% - ${Math.abs(n.offsetY)}px)`:`${n.offsetY}px`:n.offsetY];n.tooltipEl.style(`left`,r[0]+`px`).style(`top`,r[1]+`px`).style(`transform`,`translate(${c.join(`,`)})`),n.content&&n.tooltipEl.style(`display`,`inline`)}),a.on(`mouseover.${o}`,function(){n.mouseInside=!0,n.content&&n.tooltipEl.style(`display`,`inline`)}),a.on(`mouseout.${o}`,function(){n.mouseInside=!1,n.tooltipEl.style(`display`,`none`)})},update:function(e){e.tooltipEl.style(`display`,e.content&&e.mouseInside?`inline`:`none`),e.content?e.content instanceof HTMLElement?(e.tooltipEl.text(``),e.tooltipEl.append(function(){return e.content})):typeof e.content==`string`?e.tooltipEl.html(e.content):kl(e.content)?(e.tooltipEl.text(``),Al(e.content,e.tooltipEl.node())):(e.tooltipEl.style(`display`,`none`),console.warn(`Tooltip content is invalid, skipping.`,e.content,e.content.toString())):e.tooltipEl.text(``)}});function Nl(e,n,r){var i,a=1;e??=0,n??=0,r??=0;function o(){var o,s=i.length,c,l=0,u=0,d=0;for(o=0;o<s;++o)c=i[o],l+=c.x||0,u+=c.y||0,d+=c.z||0;for(l=(l/s-e)*a,u=(u/s-n)*a,d=(d/s-r)*a,o=0;o<s;++o)c=i[o],l&&(c.x-=l),u&&(c.y-=u),d&&(c.z-=d)}return o.initialize=function(e){i=e},o.x=function(n){return arguments.length?(e=+n,o):e},o.y=function(e){return arguments.length?(n=+e,o):n},o.z=function(e){return arguments.length?(r=+e,o):r},o.strength=function(e){return arguments.length?(a=+e,o):a},o}function Pl(e){let n=+this._x.call(null,e);return Fl(this.cover(n),n,e)}function Fl(e,n,r){if(isNaN(n))return e;var i,a=e._root,o={data:r},s=e._x0,c=e._x1,l,u,d,f,p;if(!a)return e._root=o,e;for(;a.length;)if((d=n>=(l=(s+c)/2))?s=l:c=l,i=a,!(a=a[f=+d]))return i[f]=o,e;if(u=+e._x.call(null,a.data),n===u)return o.next=a,i?i[f]=o:e._root=o,e;do i=i?i[f]=[,,]:e._root=[,,],(d=n>=(l=(s+c)/2))?s=l:c=l;while((f=+d)==(p=+(u>=l)));return i[p]=a,i[f]=o,e}function Il(e){Array.isArray(e)||(e=Array.from(e));let n=e.length,r=new Float64Array(n),i=1/0,a=-1/0;for(let o=0,s;o<n;++o)isNaN(s=+this._x.call(null,e[o]))||(r[o]=s,s<i&&(i=s),s>a&&(a=s));if(i>a)return this;this.cover(i).cover(a);for(let i=0;i<n;++i)Fl(this,r[i],e[i]);return this}function Ll(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,a=this._root,o,s;n>e||e>=r;)switch(s=+(e<n),o=[,,],o[s]=a,a=o,i*=2,s){case 0:r=n+i;break;case 1:n=r-i;break}this._root&&this._root.length&&(this._root=a)}return this._x0=n,this._x1=r,this}function Rl(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function zl(e){return arguments.length?this.cover(+e[0][0]).cover(+e[1][0]):isNaN(this._x0)?void 0:[[this._x0],[this._x1]]}function Bl(e,n,r){this.node=e,this.x0=n,this.x1=r}function Vl(e,n){var r,i=this._x0,a,o,s=this._x1,c=[],l=this._root,u,d;for(l&&c.push(new Bl(l,i,s)),n==null?n=1/0:(i=e-n,s=e+n);u=c.pop();)if(!(!(l=u.node)||(a=u.x0)>s||(o=u.x1)<i))if(l.length){var f=(a+o)/2;c.push(new Bl(l[1],f,o),new Bl(l[0],a,f)),(d=+(e>=f))&&(u=c[c.length-1],c[c.length-1]=c[c.length-1-d],c[c.length-1-d]=u)}else{var p=Math.abs(e-+this._x.call(null,l.data));p<n&&(n=p,i=e-p,s=e+p,r=l.data)}return r}function Hl(e){if(isNaN(l=+this._x.call(null,e)))return this;var n,r=this._root,i,a,o,s=this._x0,c=this._x1,l,u,d,f,p;if(!r)return this;if(r.length)for(;;){if((d=l>=(u=(s+c)/2))?s=u:c=u,n=r,!(r=r[f=+d]))return this;if(!r.length)break;n[f+1&1]&&(i=n,p=f)}for(;r.data!==e;)if(a=r,!(r=r.next))return this;return(o=r.next)&&delete r.next,a?(o?a.next=o:delete a.next,this):n?(o?n[f]=o:delete n[f],(r=n[0]||n[1])&&r===(n[1]||n[0])&&!r.length&&(i?i[p]=r:this._root=r),this):(this._root=o,this)}function Ul(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function Wl(){return this._root}function Gl(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function Kl(e){var n=[],r,i=this._root,a,o,s;for(i&&n.push(new Bl(i,this._x0,this._x1));r=n.pop();)if(!e(i=r.node,o=r.x0,s=r.x1)&&i.length){var c=(o+s)/2;(a=i[1])&&n.push(new Bl(a,c,s)),(a=i[0])&&n.push(new Bl(a,o,c))}return this}function ql(e){var n=[],r=[],i;for(this._root&&n.push(new Bl(this._root,this._x0,this._x1));i=n.pop();){var a=i.node;if(a.length){var o,s=i.x0,c=i.x1,l=(s+c)/2;(o=a[0])&&n.push(new Bl(o,s,l)),(o=a[1])&&n.push(new Bl(o,l,c))}r.push(i)}for(;i=r.pop();)e(i.node,i.x0,i.x1);return this}function Jl(e){return e[0]}function Yl(e){return arguments.length?(this._x=e,this):this._x}function Xl(e,n){var r=new Zl(n??Jl,NaN,NaN);return e==null?r:r.addAll(e)}function Zl(e,n,r){this._x=e,this._x0=n,this._x1=r,this._root=void 0}function Ql(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var K=Xl.prototype=Zl.prototype;K.copy=function(){var e=new Zl(this._x,this._x0,this._x1),n=this._root,r,i;if(!n)return e;if(!n.length)return e._root=Ql(n),e;for(r=[{source:n,target:e._root=[,,]}];n=r.pop();)for(var a=0;a<2;++a)(i=n.source[a])&&(i.length?r.push({source:i,target:n.target[a]=[,,]}):n.target[a]=Ql(i));return e},K.add=Pl,K.addAll=Il,K.cover=Ll,K.data=Rl,K.extent=zl,K.find=Vl,K.remove=Hl,K.removeAll=Ul,K.root=Wl,K.size=Gl,K.visit=Kl,K.visitAfter=ql,K.x=Yl;function $l(e){let n=+this._x.call(null,e),r=+this._y.call(null,e);return eu(this.cover(n,r),n,r,e)}function eu(e,n,r,i){if(isNaN(n)||isNaN(r))return e;var a,o=e._root,s={data:i},c=e._x0,l=e._y0,u=e._x1,d=e._y1,f,p,m,h,g,_,v,y;if(!o)return e._root=s,e;for(;o.length;)if((g=n>=(f=(c+u)/2))?c=f:u=f,(_=r>=(p=(l+d)/2))?l=p:d=p,a=o,!(o=o[v=_<<1|g]))return a[v]=s,e;if(m=+e._x.call(null,o.data),h=+e._y.call(null,o.data),n===m&&r===h)return s.next=o,a?a[v]=s:e._root=s,e;do a=a?a[v]=[,,,,]:e._root=[,,,,],(g=n>=(f=(c+u)/2))?c=f:u=f,(_=r>=(p=(l+d)/2))?l=p:d=p;while((v=_<<1|g)==(y=(h>=p)<<1|m>=f));return a[y]=o,a[v]=s,e}function tu(e){var n,r,i=e.length,a,o,s=Array(i),c=Array(i),l=1/0,u=1/0,d=-1/0,f=-1/0;for(r=0;r<i;++r)isNaN(a=+this._x.call(null,n=e[r]))||isNaN(o=+this._y.call(null,n))||(s[r]=a,c[r]=o,a<l&&(l=a),a>d&&(d=a),o<u&&(u=o),o>f&&(f=o));if(l>d||u>f)return this;for(this.cover(l,u).cover(d,f),r=0;r<i;++r)eu(this,s[r],c[r],e[r]);return this}function nu(e,n){if(isNaN(e=+e)||isNaN(n=+n))return this;var r=this._x0,i=this._y0,a=this._x1,o=this._y1;if(isNaN(r))a=(r=Math.floor(e))+1,o=(i=Math.floor(n))+1;else{for(var s=a-r||1,c=this._root,l,u;r>e||e>=a||i>n||n>=o;)switch(u=(n<i)<<1|e<r,l=[,,,,],l[u]=c,c=l,s*=2,u){case 0:a=r+s,o=i+s;break;case 1:r=a-s,o=i+s;break;case 2:a=r+s,i=o-s;break;case 3:r=a-s,i=o-s;break}this._root&&this._root.length&&(this._root=c)}return this._x0=r,this._y0=i,this._x1=a,this._y1=o,this}function ru(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function iu(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 q(e,n,r,i,a){this.node=e,this.x0=n,this.y0=r,this.x1=i,this.y1=a}function au(e,n,r){var i,a=this._x0,o=this._y0,s,c,l,u,d=this._x1,f=this._y1,p=[],m=this._root,h,g;for(m&&p.push(new q(m,a,o,d,f)),r==null?r=1/0:(a=e-r,o=n-r,d=e+r,f=n+r,r*=r);h=p.pop();)if(!(!(m=h.node)||(s=h.x0)>d||(c=h.y0)>f||(l=h.x1)<a||(u=h.y1)<o))if(m.length){var _=(s+l)/2,v=(c+u)/2;p.push(new q(m[3],_,v,l,u),new q(m[2],s,v,_,u),new q(m[1],_,c,l,v),new q(m[0],s,c,_,v)),(g=(n>=v)<<1|e>=_)&&(h=p[p.length-1],p[p.length-1]=p[p.length-1-g],p[p.length-1-g]=h)}else{var y=e-+this._x.call(null,m.data),b=n-+this._y.call(null,m.data),x=y*y+b*b;if(x<r){var S=Math.sqrt(r=x);a=e-S,o=n-S,d=e+S,f=n+S,i=m.data}}return i}function ou(e){if(isNaN(d=+this._x.call(null,e))||isNaN(f=+this._y.call(null,e)))return this;var n,r=this._root,i,a,o,s=this._x0,c=this._y0,l=this._x1,u=this._y1,d,f,p,m,h,g,_,v;if(!r)return this;if(r.length)for(;;){if((h=d>=(p=(s+l)/2))?s=p:l=p,(g=f>=(m=(c+u)/2))?c=m:u=m,n=r,!(r=r[_=g<<1|h]))return this;if(!r.length)break;(n[_+1&3]||n[_+2&3]||n[_+3&3])&&(i=n,v=_)}for(;r.data!==e;)if(a=r,!(r=r.next))return this;return(o=r.next)&&delete r.next,a?(o?a.next=o:delete a.next,this):n?(o?n[_]=o:delete n[_],(r=n[0]||n[1]||n[2]||n[3])&&r===(n[3]||n[2]||n[1]||n[0])&&!r.length&&(i?i[v]=r:this._root=r),this):(this._root=o,this)}function su(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function cu(){return this._root}function lu(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function uu(e){var n=[],r,i=this._root,a,o,s,c,l;for(i&&n.push(new q(i,this._x0,this._y0,this._x1,this._y1));r=n.pop();)if(!e(i=r.node,o=r.x0,s=r.y0,c=r.x1,l=r.y1)&&i.length){var u=(o+c)/2,d=(s+l)/2;(a=i[3])&&n.push(new q(a,u,d,c,l)),(a=i[2])&&n.push(new q(a,o,d,u,l)),(a=i[1])&&n.push(new q(a,u,s,c,d)),(a=i[0])&&n.push(new q(a,o,s,u,d))}return this}function du(e){var n=[],r=[],i;for(this._root&&n.push(new q(this._root,this._x0,this._y0,this._x1,this._y1));i=n.pop();){var a=i.node;if(a.length){var o,s=i.x0,c=i.y0,l=i.x1,u=i.y1,d=(s+l)/2,f=(c+u)/2;(o=a[0])&&n.push(new q(o,s,c,d,f)),(o=a[1])&&n.push(new q(o,d,c,l,f)),(o=a[2])&&n.push(new q(o,s,f,d,u)),(o=a[3])&&n.push(new q(o,d,f,l,u))}r.push(i)}for(;i=r.pop();)e(i.node,i.x0,i.y0,i.x1,i.y1);return this}function fu(e){return e[0]}function pu(e){return arguments.length?(this._x=e,this):this._x}function mu(e){return e[1]}function hu(e){return arguments.length?(this._y=e,this):this._y}function gu(e,n,r){var i=new _u(n??fu,r??mu,NaN,NaN,NaN,NaN);return e==null?i:i.addAll(e)}function _u(e,n,r,i,a,o){this._x=e,this._y=n,this._x0=r,this._y0=i,this._x1=a,this._y1=o,this._root=void 0}function vu(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var J=gu.prototype=_u.prototype;J.copy=function(){var e=new _u(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=vu(n),e;for(r=[{source:n,target:e._root=[,,,,]}];n=r.pop();)for(var a=0;a<4;++a)(i=n.source[a])&&(i.length?r.push({source:i,target:n.target[a]=[,,,,]}):n.target[a]=vu(i));return e},J.add=$l,J.addAll=tu,J.cover=nu,J.data=ru,J.extent=iu,J.find=au,J.remove=ou,J.removeAll=su,J.root=cu,J.size=lu,J.visit=uu,J.visitAfter=du,J.x=pu,J.y=hu;function yu(e){let n=+this._x.call(null,e),r=+this._y.call(null,e),i=+this._z.call(null,e);return bu(this.cover(n,r,i),n,r,i,e)}function bu(e,n,r,i,a){if(isNaN(n)||isNaN(r)||isNaN(i))return e;var o,s=e._root,c={data:a},l=e._x0,u=e._y0,d=e._z0,f=e._x1,p=e._y1,m=e._z1,h,g,_,v,y,b,x,S,C,w,T;if(!s)return e._root=c,e;for(;s.length;)if((x=n>=(h=(l+f)/2))?l=h:f=h,(S=r>=(g=(u+p)/2))?u=g:p=g,(C=i>=(_=(d+m)/2))?d=_:m=_,o=s,!(s=s[w=C<<2|S<<1|x]))return o[w]=c,e;if(v=+e._x.call(null,s.data),y=+e._y.call(null,s.data),b=+e._z.call(null,s.data),n===v&&r===y&&i===b)return c.next=s,o?o[w]=c:e._root=c,e;do o=o?o[w]=Array(8):e._root=Array(8),(x=n>=(h=(l+f)/2))?l=h:f=h,(S=r>=(g=(u+p)/2))?u=g:p=g,(C=i>=(_=(d+m)/2))?d=_:m=_;while((w=C<<2|S<<1|x)==(T=(b>=_)<<2|(y>=g)<<1|v>=h));return o[T]=s,o[w]=c,e}function xu(e){Array.isArray(e)||(e=Array.from(e));let n=e.length,r=new Float64Array(n),i=new Float64Array(n),a=new Float64Array(n),o=1/0,s=1/0,c=1/0,l=-1/0,u=-1/0,d=-1/0;for(let f=0,p,m,h,g;f<n;++f)isNaN(m=+this._x.call(null,p=e[f]))||isNaN(h=+this._y.call(null,p))||isNaN(g=+this._z.call(null,p))||(r[f]=m,i[f]=h,a[f]=g,m<o&&(o=m),m>l&&(l=m),h<s&&(s=h),h>u&&(u=h),g<c&&(c=g),g>d&&(d=g));if(o>l||s>u||c>d)return this;this.cover(o,s,c).cover(l,u,d);for(let o=0;o<n;++o)bu(this,r[o],i[o],a[o],e[o]);return this}function Su(e,n,r){if(isNaN(e=+e)||isNaN(n=+n)||isNaN(r=+r))return this;var i=this._x0,a=this._y0,o=this._z0,s=this._x1,c=this._y1,l=this._z1;if(isNaN(i))s=(i=Math.floor(e))+1,c=(a=Math.floor(n))+1,l=(o=Math.floor(r))+1;else{for(var u=s-i||1,d=this._root,f,p;i>e||e>=s||a>n||n>=c||o>r||r>=l;)switch(p=(r<o)<<2|(n<a)<<1|e<i,f=Array(8),f[p]=d,d=f,u*=2,p){case 0:s=i+u,c=a+u,l=o+u;break;case 1:i=s-u,c=a+u,l=o+u;break;case 2:s=i+u,a=c-u,l=o+u;break;case 3:i=s-u,a=c-u,l=o+u;break;case 4:s=i+u,c=a+u,o=l-u;break;case 5:i=s-u,c=a+u,o=l-u;break;case 6:s=i+u,a=c-u,o=l-u;break;case 7:i=s-u,a=c-u,o=l-u;break}this._root&&this._root.length&&(this._root=d)}return this._x0=i,this._y0=a,this._z0=o,this._x1=s,this._y1=c,this._z1=l,this}function Cu(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function wu(e){return arguments.length?this.cover(+e[0][0],+e[0][1],+e[0][2]).cover(+e[1][0],+e[1][1],+e[1][2]):isNaN(this._x0)?void 0:[[this._x0,this._y0,this._z0],[this._x1,this._y1,this._z1]]}function Y(e,n,r,i,a,o,s){this.node=e,this.x0=n,this.y0=r,this.z0=i,this.x1=a,this.y1=o,this.z1=s}function Tu(e,n,r,i){var a,o=this._x0,s=this._y0,c=this._z0,l,u,d,f,p,m,h=this._x1,g=this._y1,_=this._z1,v=[],y=this._root,b,x;for(y&&v.push(new Y(y,o,s,c,h,g,_)),i==null?i=1/0:(o=e-i,s=n-i,c=r-i,h=e+i,g=n+i,_=r+i,i*=i);b=v.pop();)if(!(!(y=b.node)||(l=b.x0)>h||(u=b.y0)>g||(d=b.z0)>_||(f=b.x1)<o||(p=b.y1)<s||(m=b.z1)<c))if(y.length){var S=(l+f)/2,C=(u+p)/2,w=(d+m)/2;v.push(new Y(y[7],S,C,w,f,p,m),new Y(y[6],l,C,w,S,p,m),new Y(y[5],S,u,w,f,C,m),new Y(y[4],l,u,w,S,C,m),new Y(y[3],S,C,d,f,p,w),new Y(y[2],l,C,d,S,p,w),new Y(y[1],S,u,d,f,C,w),new Y(y[0],l,u,d,S,C,w)),(x=(r>=w)<<2|(n>=C)<<1|e>=S)&&(b=v[v.length-1],v[v.length-1]=v[v.length-1-x],v[v.length-1-x]=b)}else{var T=e-+this._x.call(null,y.data),E=n-+this._y.call(null,y.data),ee=r-+this._z.call(null,y.data),te=T*T+E*E+ee*ee;if(te<i){var ne=Math.sqrt(i=te);o=e-ne,s=n-ne,c=r-ne,h=e+ne,g=n+ne,_=r+ne,a=y.data}}return a}var Eu=(e,n,r,i,a,o)=>Math.sqrt((e-i)**2+(n-a)**2+(r-o)**2);function Du(e,n,r,i){let a=[],o=e-i,s=n-i,c=r-i,l=e+i,u=n+i,d=r+i;return this.visit((f,p,m,h,g,_,v)=>{if(!f.length)do{let o=f.data;Eu(e,n,r,this._x(o),this._y(o),this._z(o))<=i&&a.push(o)}while(f=f.next);return p>l||m>u||h>d||g<o||_<s||v<c}),a}function Ou(e){if(isNaN(p=+this._x.call(null,e))||isNaN(m=+this._y.call(null,e))||isNaN(h=+this._z.call(null,e)))return this;var n,r=this._root,i,a,o,s=this._x0,c=this._y0,l=this._z0,u=this._x1,d=this._y1,f=this._z1,p,m,h,g,_,v,y,b,x,S,C;if(!r)return this;if(r.length)for(;;){if((y=p>=(g=(s+u)/2))?s=g:u=g,(b=m>=(_=(c+d)/2))?c=_:d=_,(x=h>=(v=(l+f)/2))?l=v:f=v,n=r,!(r=r[S=x<<2|b<<1|y]))return this;if(!r.length)break;(n[S+1&7]||n[S+2&7]||n[S+3&7]||n[S+4&7]||n[S+5&7]||n[S+6&7]||n[S+7&7])&&(i=n,C=S)}for(;r.data!==e;)if(a=r,!(r=r.next))return this;return(o=r.next)&&delete r.next,a?(o?a.next=o:delete a.next,this):n?(o?n[S]=o:delete n[S],(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=o,this)}function ku(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function Au(){return this._root}function ju(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function Mu(e){var n=[],r,i=this._root,a,o,s,c,l,u,d;for(i&&n.push(new Y(i,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));r=n.pop();)if(!e(i=r.node,o=r.x0,s=r.y0,c=r.z0,l=r.x1,u=r.y1,d=r.z1)&&i.length){var f=(o+l)/2,p=(s+u)/2,m=(c+d)/2;(a=i[7])&&n.push(new Y(a,f,p,m,l,u,d)),(a=i[6])&&n.push(new Y(a,o,p,m,f,u,d)),(a=i[5])&&n.push(new Y(a,f,s,m,l,p,d)),(a=i[4])&&n.push(new Y(a,o,s,m,f,p,d)),(a=i[3])&&n.push(new Y(a,f,p,c,l,u,m)),(a=i[2])&&n.push(new Y(a,o,p,c,f,u,m)),(a=i[1])&&n.push(new Y(a,f,s,c,l,p,m)),(a=i[0])&&n.push(new Y(a,o,s,c,f,p,m))}return this}function Nu(e){var n=[],r=[],i;for(this._root&&n.push(new Y(this._root,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));i=n.pop();){var a=i.node;if(a.length){var o,s=i.x0,c=i.y0,l=i.z0,u=i.x1,d=i.y1,f=i.z1,p=(s+u)/2,m=(c+d)/2,h=(l+f)/2;(o=a[0])&&n.push(new Y(o,s,c,l,p,m,h)),(o=a[1])&&n.push(new Y(o,p,c,l,u,m,h)),(o=a[2])&&n.push(new Y(o,s,m,l,p,d,h)),(o=a[3])&&n.push(new Y(o,p,m,l,u,d,h)),(o=a[4])&&n.push(new Y(o,s,c,h,p,m,f)),(o=a[5])&&n.push(new Y(o,p,c,h,u,m,f)),(o=a[6])&&n.push(new Y(o,s,m,h,p,d,f)),(o=a[7])&&n.push(new Y(o,p,m,h,u,d,f))}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 Pu(e){return e[0]}function Fu(e){return arguments.length?(this._x=e,this):this._x}function Iu(e){return e[1]}function Lu(e){return arguments.length?(this._y=e,this):this._y}function Ru(e){return e[2]}function zu(e){return arguments.length?(this._z=e,this):this._z}function Bu(e,n,r,i){var a=new Vu(n??Pu,r??Iu,i??Ru,NaN,NaN,NaN,NaN,NaN,NaN);return e==null?a:a.addAll(e)}function Vu(e,n,r,i,a,o,s,c,l){this._x=e,this._y=n,this._z=r,this._x0=i,this._y0=a,this._z0=o,this._x1=s,this._y1=c,this._z1=l,this._root=void 0}function Hu(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var X=Bu.prototype=Vu.prototype;X.copy=function(){var e=new Vu(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=Hu(n),e;for(r=[{source:n,target:e._root=Array(8)}];n=r.pop();)for(var a=0;a<8;++a)(i=n.source[a])&&(i.length?r.push({source:i,target:n.target[a]=Array(8)}):n.target[a]=Hu(i));return e},X.add=yu,X.addAll=xu,X.cover=Su,X.data=Cu,X.extent=wu,X.find=Tu,X.findAllWithinRadius=Du,X.remove=Ou,X.removeAll=ku,X.root=Au,X.size=ju,X.visit=Mu,X.visitAfter=Nu,X.x=Fu,X.y=Lu,X.z=zu;function Uu(e){return function(){return e}}function Wu(e){return(e()-.5)*1e-6}function Gu(e){return e.index}function Ku(e,n){var r=e.get(n);if(!r)throw Error(`node not found: `+n);return r}function qu(e){var n=Gu,r=p,i,a=Uu(30),o,s,c,l,u,d,f=1;e??=[];function p(e){return 1/Math.min(l[e.source.index],l[e.target.index])}function m(n){for(var r=0,a=e.length;r<f;++r)for(var s=0,l,p,m,h=0,g=0,_=0,v,y;s<a;++s)l=e[s],p=l.source,m=l.target,h=m.x+m.vx-p.x-p.vx||Wu(d),c>1&&(g=m.y+m.vy-p.y-p.vy||Wu(d)),c>2&&(_=m.z+m.vz-p.z-p.vz||Wu(d)),v=Math.sqrt(h*h+g*g+_*_),v=(v-o[s])/v*n*i[s],h*=v,g*=v,_*=v,m.vx-=h*(y=u[s]),c>1&&(m.vy-=g*y),c>2&&(m.vz-=_*y),p.vx+=h*(y=1-y),c>1&&(p.vy+=g*y),c>2&&(p.vz+=_*y)}function h(){if(s){var r,a=s.length,c=e.length,d=new Map(s.map((e,r)=>[n(e,r,s),e])),f;for(r=0,l=Array(a);r<c;++r)f=e[r],f.index=r,typeof f.source!=`object`&&(f.source=Ku(d,f.source)),typeof f.target!=`object`&&(f.target=Ku(d,f.target)),l[f.source.index]=(l[f.source.index]||0)+1,l[f.target.index]=(l[f.target.index]||0)+1;for(r=0,u=Array(c);r<c;++r)f=e[r],u[r]=l[f.source.index]/(l[f.source.index]+l[f.target.index]);i=Array(c),g(),o=Array(c),_()}}function g(){if(s)for(var n=0,a=e.length;n<a;++n)i[n]=+r(e[n],n,e)}function _(){if(s)for(var n=0,r=e.length;n<r;++n)o[n]=+a(e[n],n,e)}return m.initialize=function(e,...n){s=e,d=n.find(e=>typeof e==`function`)||Math.random,c=n.find(e=>[1,2,3].includes(e))||2,h()},m.links=function(n){return arguments.length?(e=n,h(),m):e},m.id=function(e){return arguments.length?(n=e,m):n},m.iterations=function(e){return arguments.length?(f=+e,m):f},m.strength=function(e){return arguments.length?(r=typeof e==`function`?e:Uu(+e),g(),m):r},m.distance=function(e){return arguments.length?(a=typeof e==`function`?e:Uu(+e),_(),m):a},m}var Ju=1664525,Yu=1013904223,Xu=4294967296;function Zu(){let e=1;return()=>(e=(Ju*e+Yu)%Xu)/Xu}var Qu=3;function $u(e){return e.x}function ed(e){return e.y}function td(e){return e.z}var nd=10,rd=Math.PI*(3-Math.sqrt(5)),id=Math.PI*20/(9+Math.sqrt(221));function ad(e,n){n||=2;var r=Math.min(Qu,Math.max(1,Math.round(n))),i,a=1,o=.001,s=1-o**(1/300),c=0,l=.6,u=new Map,d=bi(m),f=Mn(`tick`,`end`),p=Zu();e??=[];function m(){h(),f.call(`tick`,i),a<o&&(d.stop(),f.call(`end`,i))}function h(n){var o,d=e.length,f;n===void 0&&(n=1);for(var p=0;p<n;++p)for(a+=(c-a)*s,u.forEach(function(e){e(a)}),o=0;o<d;++o)f=e[o],f.fx==null?f.x+=f.vx*=l:(f.x=f.fx,f.vx=0),r>1&&(f.fy==null?f.y+=f.vy*=l:(f.y=f.fy,f.vy=0)),r>2&&(f.fz==null?f.z+=f.vz*=l:(f.z=f.fz,f.vz=0));return i}function g(){for(var n=0,i=e.length,a;n<i;++n){if(a=e[n],a.index=n,a.fx!=null&&(a.x=a.fx),a.fy!=null&&(a.y=a.fy),a.fz!=null&&(a.z=a.fz),isNaN(a.x)||r>1&&isNaN(a.y)||r>2&&isNaN(a.z)){var o=nd*(r>2?Math.cbrt(.5+n):r>1?Math.sqrt(.5+n):n),s=n*rd,c=n*id;r===1?a.x=o:r===2?(a.x=o*Math.cos(s),a.y=o*Math.sin(s)):(a.x=o*Math.sin(s)*Math.cos(c),a.y=o*Math.cos(s),a.z=o*Math.sin(s)*Math.sin(c))}(isNaN(a.vx)||r>1&&isNaN(a.vy)||r>2&&isNaN(a.vz))&&(a.vx=0,r>1&&(a.vy=0),r>2&&(a.vz=0))}}function _(n){return n.initialize&&n.initialize(e,p,r),n}return g(),i={tick:h,restart:function(){return d.restart(m),i},stop:function(){return d.stop(),i},numDimensions:function(e){return arguments.length?(r=Math.min(Qu,Math.max(1,Math.round(e))),u.forEach(_),i):r},nodes:function(n){return arguments.length?(e=n,g(),u.forEach(_),i):e},alpha:function(e){return arguments.length?(a=+e,i):a},alphaMin:function(e){return arguments.length?(o=+e,i):o},alphaDecay:function(e){return arguments.length?(s=+e,i):+s},alphaTarget:function(e){return arguments.length?(c=+e,i):c},velocityDecay:function(e){return arguments.length?(l=1-e,i):1-l},randomSource:function(e){return arguments.length?(p=e,u.forEach(_),i):p},force:function(e,n){return arguments.length>1?(n==null?u.delete(e):u.set(e,_(n)),i):u.get(e)},find:function(){var n=Array.prototype.slice.call(arguments),i=n.shift()||0,a=(r>1?n.shift():null)||0,o=(r>2?n.shift():null)||0,s=n.shift()||1/0,c=0,l=e.length,u,d,f,p,m,h;for(s*=s,c=0;c<l;++c)m=e[c],u=i-m.x,d=a-(m.y||0),f=o-(m.z||0),p=u*u+d*d+f*f,p<s&&(h=m,s=p);return h},on:function(e,n){return arguments.length>1?(f.on(e,n),i):f.on(e)}}}function od(){var e,n,r,i,a,o=Uu(-30),s,c=1,l=1/0,u=.81;function d(i){var o,s=e.length,c=(n===1?Xl(e,$u):n===2?gu(e,$u,ed):n===3?Bu(e,$u,ed,td):null).visitAfter(p);for(a=i,o=0;o<s;++o)r=e[o],c.visit(m)}function f(){if(e){var n,r=e.length,i;for(s=Array(r),n=0;n<r;++n)i=e[n],s[i.index]=+o(i,n,e)}}function p(e){var r=0,i,a,o=0,c,l,u,d,f=e.length;if(f){for(c=l=u=d=0;d<f;++d)(i=e[d])&&(a=Math.abs(i.value))&&(r+=i.value,o+=a,c+=a*(i.x||0),l+=a*(i.y||0),u+=a*(i.z||0));r*=Math.sqrt(4/f),e.x=c/o,n>1&&(e.y=l/o),n>2&&(e.z=u/o)}else{i=e,i.x=i.data.x,n>1&&(i.y=i.data.y),n>2&&(i.z=i.data.z);do r+=s[i.data.index];while(i=i.next)}e.value=r}function m(e,o,d,f,p){if(!e.value)return!0;var m=[d,f,p][n-1],h=e.x-r.x,g=n>1?e.y-r.y:0,_=n>2?e.z-r.z:0,v=m-o,y=h*h+g*g+_*_;if(v*v/u<y)return y<l&&(h===0&&(h=Wu(i),y+=h*h),n>1&&g===0&&(g=Wu(i),y+=g*g),n>2&&_===0&&(_=Wu(i),y+=_*_),y<c&&(y=Math.sqrt(c*y)),r.vx+=h*e.value*a/y,n>1&&(r.vy+=g*e.value*a/y),n>2&&(r.vz+=_*e.value*a/y)),!0;if(!(e.length||y>=l)){(e.data!==r||e.next)&&(h===0&&(h=Wu(i),y+=h*h),n>1&&g===0&&(g=Wu(i),y+=g*g),n>2&&_===0&&(_=Wu(i),y+=_*_),y<c&&(y=Math.sqrt(c*y)));do e.data!==r&&(v=s[e.data.index]*a/y,r.vx+=h*v,n>1&&(r.vy+=g*v),n>2&&(r.vz+=_*v));while(e=e.next)}}return d.initialize=function(r,...a){e=r,i=a.find(e=>typeof e==`function`)||Math.random,n=a.find(e=>[1,2,3].includes(e))||2,f()},d.strength=function(e){return arguments.length?(o=typeof e==`function`?e:Uu(+e),f(),d):o},d.distanceMin=function(e){return arguments.length?(c=e*e,d):Math.sqrt(c)},d.distanceMax=function(e){return arguments.length?(l=e*e,d):Math.sqrt(l)},d.theta=function(e){return arguments.length?(u=e*e,d):Math.sqrt(u)},d}function sd(e,n,r,i){var a,o,s=Uu(.1),c,l;typeof e!=`function`&&(e=Uu(+e)),n??=0,r??=0,i??=0;function u(e){for(var s=0,u=a.length;s<u;++s){var d=a[s],f=d.x-n||1e-6,p=(d.y||0)-r||1e-6,m=(d.z||0)-i||1e-6,h=Math.sqrt(f*f+p*p+m*m),g=(l[s]-h)*c[s]*e/h;d.vx+=f*g,o>1&&(d.vy+=p*g),o>2&&(d.vz+=m*g)}}function d(){if(a){var n,r=a.length;for(c=Array(r),l=Array(r),n=0;n<r;++n)l[n]=+e(a[n],n,a),c[n]=isNaN(l[n])?0:+s(a[n],n,a)}}return u.initialize=function(e,...n){a=e,o=n.find(e=>[1,2,3].includes(e))||2,d()},u.strength=function(e){return arguments.length?(s=typeof e==`function`?e:Uu(+e),d(),u):s},u.radius=function(n){return arguments.length?(e=typeof n==`function`?n:Uu(+n),d(),u):e},u.x=function(e){return arguments.length?(n=+e,u):n},u.y=function(e){return arguments.length?(r=+e,u):r},u.z=function(e){return arguments.length?(i=+e,u):i},u}var{abs:cd,cos:ld,sin:ud,acos:dd,atan2:fd,sqrt:pd,pow:md}=Math;function hd(e){return e<0?-md(-e,1/3):md(e,1/3)}var gd=Math.PI,_d=2*gd,vd=gd/2,yd=1e-6,bd=2**53-1||9007199254740991,xd=-(2**53-1)||-9007199254740991,Sd={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){let r=n(e),i=r.x*r.x+r.y*r.y;return r.z!==void 0&&(i+=r.z*r.z),pd(i)},compute:function(e,n,r){if(e===0)return n[0].t=0,n[0];let i=n.length-1;if(e===1)return n[i].t=1,n[i];let a=1-e,o=n;if(i===0)return n[0].t=e,n[0];if(i===1){let n={x:a*o[0].x+e*o[1].x,y:a*o[0].y+e*o[1].y,t:e};return r&&(n.z=a*o[0].z+e*o[1].z),n}if(i<4){let n=a*a,s=e*e,c,l,u,d=0;i===2?(o=[o[0],o[1],o[2],Sd],c=n,l=a*e*2,u=s):i===3&&(c=n*a,l=n*e*3,u=a*s*3,d=e*s);let f={x:c*o[0].x+l*o[1].x+u*o[2].x+d*o[3].x,y:c*o[0].y+l*o[1].y+u*o[2].y+d*o[3].y,t:e};return r&&(f.z=c*o[0].z+l*o[1].z+u*o[2].z+d*o[3].z),f}let s=JSON.parse(JSON.stringify(n));for(;s.length>1;){for(let n=0;n<s.length-1;n++)s[n]={x:s[n].x+(s[n+1].x-s[n].x)*e,y:s[n].y+(s[n+1].y-s[n].y)*e},s[n].z!==void 0&&(s[n].z=s[n].z+(s[n+1].z-s[n].z)*e);s.splice(s.length-1,1)}return s[0].t=e,s[0]},computeWithRatios:function(e,n,r,i){let a=1-e,o=r,s=n,c=o[0],l=o[1],u=o[2],d=o[3],f;if(c*=a,l*=e,s.length===2)return f=c+l,{x:(c*s[0].x+l*s[1].x)/f,y:(c*s[0].y+l*s[1].y)/f,z:i?(c*s[0].z+l*s[1].z)/f:!1,t:e};if(c*=a,l*=2*a,u*=e*e,s.length===3)return f=c+l+u,{x:(c*s[0].x+l*s[1].x+u*s[2].x)/f,y:(c*s[0].y+l*s[1].y+u*s[2].y)/f,z:i?(c*s[0].z+l*s[1].z+u*s[2].z)/f:!1,t:e};if(c*=a,l*=1.5*a,u*=3*a,d*=e*e*e,s.length===4)return f=c+l+u+d,{x:(c*s[0].x+l*s[1].x+u*s[2].x+d*s[3].x)/f,y:(c*s[0].y+l*s[1].y+u*s[2].y+d*s[3].y)/f,z:i?(c*s[0].z+l*s[1].z+u*s[2].z+d*s[3].z)/f:!1,t:e}},derive:function(e,n){let r=[];for(let i=e,a=i.length,o=a-1;a>1;a--,o--){let e=[];for(let r=0,a;r<o;r++)a={x:o*(i[r+1].x-i[r].x),y:o*(i[r+1].y-i[r].y)},n&&(a.z=o*(i[r+1].z-i[r].z)),e.push(a);r.push(e),i=e}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 cd(e-n)<=(r||yd)},length:function(e){let n=.5,r=Z.Tvalues.length,i=0;for(let a=0,o;a<r;a++)o=n*Z.Tvalues[a]+n,i+=Z.Cvalues[a]*Z.arcfn(o,e);return n*i},map:function(e,n,r,i,a){let o=r-n;return i+(a-i)*((e-n)/o)},lerp:function(e,n,r){let 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 e.z!==void 0&&(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){let i=n.x-e.x,a=n.y-e.y,o=r.x-e.x,s=r.y-e.y;return fd(i*s-a*o,i*o+a*s)},round:function(e,n){let r=``+e,i=r.indexOf(`.`);return parseFloat(r.substring(0,i+1+n))},dist:function(e,n){let r=e.x-n.x,i=e.y-n.y;return pd(r*r+i*i)},closest:function(e,n){let r=md(2,63),i,a;return e.forEach(function(e,o){a=Z.dist(n,e),a<r&&(r=a,i=o)}),{mdist:r,mpos:i}},abcratio:function(e,n){if(n!==2&&n!==3)return!1;if(e===void 0)e=.5;else if(e===0||e===1)return e;let r=md(e,n)+md(1-e,n);return cd((r-1)/r)},projectionratio:function(e,n){if(n!==2&&n!==3)return!1;if(e===void 0)e=.5;else if(e===0||e===1)return e;let r=md(1-e,n);return r/(md(e,n)+r)},lli8:function(e,n,r,i,a,o,s,c){let l=(e*i-n*r)*(a-s)-(e-r)*(a*c-o*s),u=(e*i-n*r)*(o-c)-(n-i)*(a*c-o*s),d=(e-r)*(o-c)-(n-i)*(a-s);return d==0?!1:{x:l/d,y:u/d}},lli4:function(e,n,r,i){let a=e.x,o=e.y,s=n.x,c=n.y,l=r.x,u=r.y,d=i.x,f=i.y;return Z.lli8(a,o,s,c,l,u,d,f)},lli:function(e,n){return Z.lli4(e,e.c,n,n.c)},makeline:function(e,n){return new Md(e.x,e.y,(e.x+n.x)/2,(e.y+n.y)/2,n.x,n.y)},findbbox:function(e){let n=bd,r=bd,i=xd,a=xd;return e.forEach(function(e){let o=e.bbox();n>o.x.min&&(n=o.x.min),r>o.y.min&&(r=o.y.min),i<o.x.max&&(i=o.x.max),a<o.y.max&&(a=o.y.max)}),{x:{min:n,mid:(n+i)/2,max:i,size:i-n},y:{min:r,mid:(r+a)/2,max:a,size:a-r}}},shapeintersections:function(e,n,r,i,a){if(!Z.bboxoverlap(n,i))return[];let o=[],s=[e.startcap,e.forward,e.back,e.endcap],c=[r.startcap,r.forward,r.back,r.endcap];return s.forEach(function(n){n.virtual||c.forEach(function(i){if(i.virtual)return;let s=n.intersects(i,a);s.length>0&&(s.c1=n,s.c2=i,s.s1=e,s.s2=r,o.push(s))})}),o},makeshape:function(e,n,r){let i=n.points.length,a=e.points.length,o=Z.makeline(n.points[i-1],e.points[0]),s=Z.makeline(e.points[a-1],n.points[0]),c={startcap:o,forward:e,back:n,endcap:s,bbox:Z.findbbox([o,e,n,s])};return c.intersections=function(e){return Z.shapeintersections(c,c.bbox,e,e.bbox,r)},c},getminmax:function(e,n,r){if(!r)return{min:0,max:0};let i=bd,a=xd,o,s;r.indexOf(0)===-1&&(r=[0].concat(r)),r.indexOf(1)===-1&&r.push(1);for(let c=0,l=r.length;c<l;c++)o=r[c],s=e.get(o),s[n]<i&&(i=s[n]),s[n]>a&&(a=s[n]);return{min:i,mid:(i+a)/2,max:a,size:a-i}},align:function(e,n){let r=n.p1.x,i=n.p1.y,a=-fd(n.p2.y-i,n.p2.x-r);return e.map(function(e){return{x:(e.x-r)*ld(a)-(e.y-i)*ud(a),y:(e.x-r)*ud(a)+(e.y-i)*ld(a)}})},roots:function(e,n){n||={p1:{x:0,y:0},p2:{x:1,y:0}};let r=e.length-1,i=Z.align(e,n),a=function(e){return 0<=e&&e<=1};if(r===2){let e=i[0].y,n=i[1].y,r=i[2].y,o=e-2*n+r;if(o!==0){let i=-pd(n*n-e*r),s=-e+n;return[-(i+s)/o,-(-i+s)/o].filter(a)}else if(n!==r&&o===0)return[(2*n-r)/(2*n-2*r)].filter(a);return[]}let o=i[0].y,s=i[1].y,c=i[2].y,l=i[3].y,u=-o+3*s-3*c+l,d=3*o-6*s+3*c,f=-3*o+3*s,p=o;if(Z.approximately(u,0)){if(Z.approximately(d,0))return Z.approximately(f,0)?[]:[-p/f].filter(a);let e=pd(f*f-4*d*p),n=2*d;return[(e-f)/n,(-f-e)/n].filter(a)}d/=u,f/=u,p/=u;let m=(3*f-d*d)/3,h=m/3,g=(2*d*d*d-9*d*f+27*p)/27,_=g/2,v=_*_+h*h*h,y,b,x,S,C;if(v<0){let e=-m/3,n=pd(e*e*e),r=-g/(2*n),i=dd(r<-1?-1:r>1?1:r),o=2*hd(n);return x=o*ld(i/3)-d/3,S=o*ld((i+_d)/3)-d/3,C=o*ld((i+2*_d)/3)-d/3,[x,S,C].filter(a)}else if(v===0)return y=_<0?hd(-_):-hd(_),x=2*y-d/3,S=-y-d/3,[x,S].filter(a);else{let e=pd(v);return y=hd(-_+e),b=hd(_+e),[y-b-d/3].filter(a)}},droots:function(e){if(e.length===3){let n=e[0],r=e[1],i=e[2],a=n-2*r+i;if(a!==0){let e=-pd(r*r-n*i),o=-n+r;return[-(e+o)/a,-(-e+o)/a]}else if(r!==i&&a===0)return[(2*r-i)/(2*(r-i))];return[]}if(e.length===2){let n=e[0],r=e[1];return n===r?[]:[n/(n-r)]}return[]},curvature:function(e,n,r,i,a){let o,s,c,l,u=0,d=0,f=Z.compute(e,n),p=Z.compute(e,r),m=f.x*f.x+f.y*f.y;if(i?(o=pd(md(f.y*p.z-p.y*f.z,2)+md(f.z*p.x-p.z*f.x,2)+md(f.x*p.y-p.x*f.y,2)),s=md(m+f.z*f.z,3/2)):(o=f.x*p.y-f.y*p.x,s=md(m,3/2)),o===0||s===0)return{k:0,r:0};if(u=o/s,d=s/o,!a){let a=Z.curvature(e-.001,n,r,i,!0).k,o=Z.curvature(e+.001,n,r,i,!0).k;l=(o-u+(u-a))/2,c=(cd(o-u)+cd(u-a))/2}return{k:u,r:d,dk:l,adk:c}},inflections:function(e){if(e.length<4)return[];let 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,a=n[1].x*n[2].y,o=n[3].x*n[2].y,s=18*(-3*r+2*i+3*a-o),c=18*(3*r-i-3*a),l=18*(a-r);if(Z.approximately(s,0)){if(!Z.approximately(c,0)){let e=-l/c;if(0<=e&&e<=1)return[e]}return[]}let u=2*s;if(Z.approximately(u,0))return[];let d=c*c-4*s*l;if(d<0)return[];let f=Math.sqrt(d);return[(f-c)/u,-(c+f)/u].filter(function(e){return 0<=e&&e<=1})},bboxoverlap:function(e,n){let r=[`x`,`y`],i=r.length;for(let a=0,o,s,c,l;a<i;a++)if(o=r[a],s=e[o].mid,c=n[o].mid,l=(e[o].size+n[o].size)/2,cd(s-c)>=l)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){let i=e.bbox(),a=n.bbox(),o=1e5,s=r||.5;if(i.x.size+i.y.size<s&&a.x.size+a.y.size<s)return[(o*(e._t1+e._t2)/2|0)/o+`/`+(o*(n._t1+n._t2)/2|0)/o];let c=e.split(.5),l=n.split(.5),u=[{left:c.left,right:l.left},{left:c.left,right:l.right},{left:c.right,right:l.right},{left:c.right,right:l.left}];u=u.filter(function(e){return Z.bboxoverlap(e.left.bbox(),e.right.bbox())});let d=[];return u.length===0?d:(u.forEach(function(e){d=d.concat(Z.pairiteration(e.left,e.right,s))}),d=d.filter(function(e,n){return d.indexOf(e)===n}),d)},getccenter:function(e,n,r){let i=n.x-e.x,a=n.y-e.y,o=r.x-n.x,s=r.y-n.y,c=i*ld(vd)-a*ud(vd),l=i*ud(vd)+a*ld(vd),u=o*ld(vd)-s*ud(vd),d=o*ud(vd)+s*ld(vd),f=(e.x+n.x)/2,p=(e.y+n.y)/2,m=(n.x+r.x)/2,h=(n.y+r.y)/2,g=f+c,_=p+l,v=m+u,y=h+d,b=Z.lli8(f,p,g,_,m,h,v,y),x=Z.dist(b,e),S=fd(e.y-b.y,e.x-b.x),C=fd(n.y-b.y,n.x-b.x),w=fd(r.y-b.y,r.x-b.x),T;return S<w?((S>C||C>w)&&(S+=_d),S>w&&(T=w,w=S,S=T)):w<C&&C<S?(T=w,w=S,S=T):w+=_d,b.s=S,b.e=w,b.r=x,b},numberSort:function(e,n){return e-n}},Cd=class e{constructor(e){this.curves=[],this._3d=!1,e&&(this.curves=e,this._3d=this.curves[0]._3d)}valueOf(){return this.toString()}toString(){return`[`+this.curves.map(function(e){return Z.pointsToString(e.points)}).join(`, `)+`]`}addCurve(e){this.curves.push(e),this._3d=this._3d||e._3d}length(){return this.curves.map(function(e){return e.length()}).reduce(function(e,n){return e+n})}curve(e){return this.curves[e]}bbox(){let e=this.curves;for(var n=e[0].bbox(),r=1;r<e.length;r++)Z.expandbox(n,e[r].bbox());return n}offset(n){let r=[];return this.curves.forEach(function(e){r.push(...e.offset(n))}),new e(r)}},{abs:wd,min:Td,max:Ed,cos:Dd,sin:Od,acos:kd,sqrt:Ad}=Math,jd=Math.PI,Md=class e{constructor(e){let n=e&&e.forEach?e:Array.from(arguments).slice(),r=!1;if(typeof n[0]==`object`){r=n.length;let e=[];n.forEach(function(n){[`x`,`y`,`z`].forEach(function(r){n[r]!==void 0&&e.push(n[r])})}),n=e}let i=!1,a=n.length;if(r){if(r>4){if(arguments.length!==1)throw Error(`Only new Bezier(point[]) is accepted for 4th and higher order curves`);i=!0}}else if(a!==6&&a!==8&&a!==9&&a!==12&&arguments.length!==1)throw Error(`Only new Bezier(point[]) is accepted for 4th and higher order curves`);let o=this._3d=!i&&(a===9||a===12)||e&&e[0]&&e[0].z!==void 0,s=this.points=[];for(let e=0,r=o?3:2;e<a;e+=r){var c={x:n[e],y:n[e+1]};o&&(c.z=n[e+2]),s.push(c)}let l=this.order=s.length-1,u=this.dims=[`x`,`y`];o&&u.push(`z`),this.dimlen=u.length;let d=Z.align(s,{p1:s[0],p2:s[l]}),f=Z.dist(s[0],s[l]);this._linear=d.reduce((e,n)=>e+wd(n.y),0)<f/50,this._lut=[],this._t1=0,this._t2=1,this.update()}static quadraticFromPoints(n,r,i,a){return a===void 0&&(a=.5),a===0?new e(r,r,i):a===1?new e(n,r,r):new e(n,e.getABC(2,n,r,i,a).A,i)}static cubicFromPoints(n,r,i,a,o){a===void 0&&(a=.5);let s=e.getABC(3,n,r,i,a);o===void 0&&(o=Z.dist(r,s.C));let c=o*(1-a)/a,l=Z.dist(n,i),u=(i.x-n.x)/l,d=(i.y-n.y)/l,f=o*u,p=o*d,m=c*u,h=c*d,g={x:r.x-f,y:r.y-p},_={x:r.x+m,y:r.y+h},v=s.A,y={x:v.x+(g.x-v.x)/(1-a),y:v.y+(g.y-v.y)/(1-a)},b={x:v.x+(_.x-v.x)/a,y:v.y+(_.y-v.y)/a};return new e(n,{x:n.x+(y.x-n.x)/a,y:n.y+(y.y-n.y)/a},{x:i.x+(b.x-i.x)/(1-a),y:i.y+(b.y-i.y)/(1-a)},i)}static getUtils(){return Z}getUtils(){return e.getUtils()}static get PolyBezier(){return Cd}valueOf(){return this.toString()}toString(){return Z.pointsToString(this.points)}toSVG(){if(this._3d)return!1;let e=this.points,n=[`M`,e[0].x,e[0].y,this.order===2?`Q`:`C`];for(let r=1,i=e.length;r<i;r++)n.push(e[r].x),n.push(e[r].y);return n.join(` `)}setRatios(e){if(e.length!==this.points.length)throw Error(`incorrect number of ratio values`);this.ratios=e,this._lut=[]}verify(){let e=this.coordDigest();e!==this._print&&(this._print=e,this.update())}coordDigest(){return this.points.map(function(e,n){return``+n+e.x+e.y+(e.z?e.z:0)}).join(``)}update(){this._lut=[],this.dpoints=Z.derive(this.points,this._3d),this.computedirection()}computedirection(){let e=this.points;this.clockwise=Z.angle(e[0],e[this.order],e[1])>0}length(){return Z.length(this.derivative.bind(this))}static getABC(e=2,n,r,i,a=.5){let o=Z.projectionratio(a,e),s=1-o,c={x:o*n.x+s*i.x,y:o*n.y+s*i.y},l=Z.abcratio(a,e);return{A:{x:r.x+(r.x-c.x)/l,y:r.y+(r.y-c.y)/l},B:r,C:c,S:n,E:i}}getABC(n,r){r||=this.get(n);let i=this.points[0],a=this.points[this.order];return e.getABC(this.order,i,r,a,n)}getLUT(e){if(this.verify(),e||=100,this._lut.length===e+1)return this._lut;this._lut=[],e++,this._lut=[];for(let n=0,r,i;n<e;n++)i=n/(e-1),r=this.compute(i),r.t=i,this._lut.push(r);return this._lut}on(e,n){n||=5;let r=this.getLUT(),i=[];for(let a=0,o,s=0;a<r.length;a++)o=r[a],Z.dist(o,e)<n&&(i.push(o),s+=a/r.length);return i.length?t/=i.length:!1}project(e){let n=this.getLUT(),r=n.length-1,i=Z.closest(n,e),a=i.mpos,o=(a-1)/r,s=(a+1)/r,c=.1/r,l=i.mdist,u=o,d=u,f;l+=1;for(let n;u<s+c;u+=c)f=this.compute(u),n=Z.dist(e,f),n<l&&(l=n,d=u);return d=d<0?0:d>1?1:d,f=this.compute(d),f.t=d,f.d=l,f}get(e){return this.compute(e)}point(e){return this.points[e]}compute(e){return this.ratios?Z.computeWithRatios(e,this.points,this.ratios,this._3d):Z.compute(e,this.points,this._3d,this.ratios)}raise(){let n=this.points,r=[n[0]],i=n.length;for(let e=1,a,o;e<i;e++)a=n[e],o=n[e-1],r[e]={x:(i-e)/i*a.x+e/i*o.x,y:(i-e)/i*a.y+e/i*o.y};return r[i]=n[i-1],new e(r)}derivative(e){return Z.compute(e,this.dpoints[0],this._3d)}dderivative(e){return Z.compute(e,this.dpoints[1],this._3d)}align(){let n=this.points;return new e(Z.align(n,{p1:n[0],p2:n[n.length-1]}))}curvature(e){return Z.curvature(e,this.dpoints[0],this.dpoints[1],this._3d)}inflections(){return Z.inflections(this.points)}normal(e){return this._3d?this.__normal3(e):this.__normal2(e)}__normal2(e){let n=this.derivative(e),r=Ad(n.x*n.x+n.y*n.y);return{t:e,x:-n.y/r,y:n.x/r}}__normal3(e){let n=this.derivative(e),r=this.derivative(e+.01),i=Ad(n.x*n.x+n.y*n.y+n.z*n.z),a=Ad(r.x*r.x+r.y*r.y+r.z*r.z);n.x/=i,n.y/=i,n.z/=i,r.x/=a,r.y/=a,r.z/=a;let o={x:r.y*n.z-r.z*n.y,y:r.z*n.x-r.x*n.z,z:r.x*n.y-r.y*n.x},s=Ad(o.x*o.x+o.y*o.y+o.z*o.z);o.x/=s,o.y/=s,o.z/=s;let c=[o.x*o.x,o.x*o.y-o.z,o.x*o.z+o.y,o.x*o.y+o.z,o.y*o.y,o.y*o.z-o.x,o.x*o.z-o.y,o.y*o.z+o.x,o.z*o.z];return{t:e,x:c[0]*n.x+c[1]*n.y+c[2]*n.z,y:c[3]*n.x+c[4]*n.y+c[5]*n.z,z:c[6]*n.x+c[7]*n.y+c[8]*n.z}}hull(e){let n=this.points,r=[],i=[],a=0;for(i[a++]=n[0],i[a++]=n[1],i[a++]=n[2],this.order===3&&(i[a++]=n[3]);n.length>1;){r=[];for(let o=0,s,c=n.length-1;o<c;o++)s=Z.lerp(e,n[o],n[o+1]),i[a++]=s,r.push(s);n=r}return i}split(n,r){if(n===0&&r)return this.split(r).left;if(r===1)return this.split(n).right;let i=this.hull(n),a={left:this.order===2?new e([i[0],i[3],i[5]]):new e([i[0],i[4],i[7],i[9]]),right:this.order===2?new e([i[5],i[4],i[2]]):new e([i[9],i[8],i[6],i[3]]),span:i};return a.left._t1=Z.map(0,0,1,this._t1,this._t2),a.left._t2=Z.map(n,0,1,this._t1,this._t2),a.right._t1=Z.map(n,0,1,this._t1,this._t2),a.right._t2=Z.map(1,0,1,this._t1,this._t2),r?(r=Z.map(r,n,1,0,1),a.right.split(r).left):a}extrema(){let e={},n=[];return this.dims.forEach(function(r){let i=function(e){return e[r]},a=this.dpoints[0].map(i);e[r]=Z.droots(a),this.order===3&&(a=this.dpoints[1].map(i),e[r]=e[r].concat(Z.droots(a))),e[r]=e[r].filter(function(e){return e>=0&&e<=1}),n=n.concat(e[r].sort(Z.numberSort))}.bind(this)),e.values=n.sort(Z.numberSort).filter(function(e,r){return n.indexOf(e)===r}),e}bbox(){let e=this.extrema(),n={};return this.dims.forEach(function(r){n[r]=Z.getminmax(this,r,e[r])}.bind(this)),n}overlaps(e){let n=this.bbox(),r=e.bbox();return Z.bboxoverlap(n,r)}offset(n,r){if(r!==void 0){let e=this.get(n),i=this.normal(n),a={c:e,n:i,x:e.x+i.x*r,y:e.y+i.y*r};return this._3d&&(a.z=e.z+i.z*r),a}if(this._linear){let r=this.normal(0);return[new e(this.points.map(function(e){let i={x:e.x+n*r.x,y:e.y+n*r.y};return e.z&&r.z&&(i.z=e.z+n*r.z),i}))]}return this.reduce().map(function(e){return e._linear?e.offset(n)[0]:e.scale(n)})}simple(){if(this.order===3){let e=Z.angle(this.points[0],this.points[3],this.points[1]),n=Z.angle(this.points[0],this.points[3],this.points[2]);if(e>0&&n<0||e<0&&n>0)return!1}let e=this.normal(0),n=this.normal(1),r=e.x*n.x+e.y*n.y;return this._3d&&(r+=e.z*n.z),wd(kd(r))<jd/3}reduce(){let e,n=0,r=0,i=.01,a,o=[],s=[],c=this.extrema().values;for(c.indexOf(0)===-1&&(c=[0].concat(c)),c.indexOf(1)===-1&&c.push(1),n=c[0],e=1;e<c.length;e++)r=c[e],a=this.split(n,r),a._t1=n,a._t2=r,o.push(a),n=r;return o.forEach(function(e){for(n=0,r=0;r<=1;)for(r=n+i;r<=1+i;r+=i)if(a=e.split(n,r),!a.simple()){if(r-=i,wd(n-r)<i)return[];a=e.split(n,r),a._t1=Z.map(n,0,1,e._t1,e._t2),a._t2=Z.map(r,0,1,e._t1,e._t2),s.push(a),n=r;break}n<1&&(a=e.split(n,1),a._t1=Z.map(n,0,1,e._t1,e._t2),a._t2=e._t2,s.push(a))}),s}translate(n,r,i){i=typeof i==`number`?i:r;let a=this.order,o=this.points.map((e,n)=>(1-n/a)*r+n/a*i);return new e(this.points.map((e,r)=>({x:e.x+n.x*o[r],y:e.y+n.y*o[r]})))}scale(n){let r=this.order,i=!1;if(typeof n==`function`&&(i=n),i&&r===2)return this.raise().scale(i);let a=this.clockwise,o=this.points;if(this._linear)return this.translate(this.normal(0),i?i(0):n,i?i(1):n);let s=i?i(0):n,c=i?i(1):n,l=[this.offset(0,10),this.offset(1,10)],u=[],d=Z.lli4(l[0],l[0].c,l[1],l[1].c);if(!d)throw Error(`cannot scale this curve. Try reducing it first.`);return[0,1].forEach(function(e){let n=u[e*r]=Z.copy(o[e*r]);n.x+=(e?c:s)*l[e].n.x,n.y+=(e?c:s)*l[e].n.y}),i?([0,1].forEach(function(e){if(!(r===2&&e)){var s=o[e+1],c={x:s.x-d.x,y:s.y-d.y},l=i?i((e+1)/r):n;i&&!a&&(l=-l);var f=Ad(c.x*c.x+c.y*c.y);c.x/=f,c.y/=f,u[e+1]={x:s.x+l*c.x,y:s.y+l*c.y}}}),new e(u)):([0,1].forEach(e=>{if(r===2&&e)return;let n=u[e*r],i=this.derivative(e),a={x:n.x+i.x,y:n.y+i.y};u[e+1]=Z.lli4(n,a,d,o[e+1])}),new e(u))}outline(n,r,i,a){if(r=r===void 0?n:r,this._linear){let o=this.normal(0),s=this.points[0],c=this.points[this.points.length-1],l,u,d;i===void 0&&(i=n,a=r),l={x:s.x+o.x*n,y:s.y+o.y*n},d={x:c.x+o.x*i,y:c.y+o.y*i},u={x:(l.x+d.x)/2,y:(l.y+d.y)/2};let f=[l,u,d];l={x:s.x-o.x*r,y:s.y-o.y*r},d={x:c.x-o.x*a,y:c.y-o.y*a},u={x:(l.x+d.x)/2,y:(l.y+d.y)/2};let p=[d,u,l],m=Z.makeline(p[2],f[0]),h=Z.makeline(f[2],p[0]);return new Cd([m,new e(f),h,new e(p)])}let o=this.reduce(),s=o.length,c=[],l=[],u,d=0,f=this.length(),p=i!==void 0&&a!==void 0;function m(e,n,r,i,a){return function(o){let s=i/r,c=(i+a)/r,l=n-e;return Z.map(o,0,1,e+s*l,e+c*l)}}o.forEach(function(e){let o=e.length();p?(c.push(e.scale(m(n,i,f,d,o))),l.push(e.scale(m(-r,-a,f,d,o)))):(c.push(e.scale(n)),l.push(e.scale(-r))),d+=o}),l=l.map(function(e){return u=e.points,u[3]?e.points=[u[3],u[2],u[1],u[0]]:e.points=[u[2],u[1],u[0]],e}).reverse();let h=c[0].points[0],g=c[s-1].points[c[s-1].points.length-1],_=l[s-1].points[l[s-1].points.length-1],v=l[0].points[0],y=Z.makeline(_,h),b=Z.makeline(g,v);return new Cd([y].concat(c,[b],l))}outlineshapes(e,n,r){n||=e;let i=this.outline(e,n).curves,a=[];for(let e=1,n=i.length;e<n/2;e++){let o=Z.makeshape(i[e],i[n-e],r);o.startcap.virtual=e>1,o.endcap.virtual=e<n/2-1,a.push(o)}return a}intersects(n,r){return n?n.p1&&n.p2?this.lineIntersects(n):(n instanceof e&&(n=n.reduce()),this.curveintersects(this.reduce(),n,r)):this.selfintersects(r)}lineIntersects(e){let n=Td(e.p1.x,e.p2.x),r=Td(e.p1.y,e.p2.y),i=Ed(e.p1.x,e.p2.x),a=Ed(e.p1.y,e.p2.y);return Z.roots(this.points,e).filter(e=>{var o=this.get(e);return Z.between(o.x,n,i)&&Z.between(o.y,r,a)})}selfintersects(e){let n=this.reduce(),r=n.length-2,i=[];for(let a=0,o,s,c;a<r;a++)s=n.slice(a,a+1),c=n.slice(a+2),o=this.curveintersects(s,c,e),i.push(...o);return i}curveintersects(e,n,r){let i=[];e.forEach(function(e){n.forEach(function(n){e.overlaps(n)&&i.push({left:e,right:n})})});let a=[];return i.forEach(function(e){let n=Z.pairiteration(e.left,e.right,r);n.length>0&&(a=a.concat(n))}),a}arcs(e){return e||=.5,this._iterate(e,[])}_error(e,n,r,i){let a=(i-r)/4,o=this.get(r+a),s=this.get(i-a),c=Z.dist(e,n),l=Z.dist(e,o),u=Z.dist(e,s);return wd(l-c)+wd(u-c)}_iterate(e,n){let r=0,i=1,a;do{a=0,i=1;let o=this.get(r),s,c,l,u,d=!1,f=!1,p,m=i,h=1,g=0;do if(f=d,u=l,m=(r+i)/2,g++,s=this.get(m),c=this.get(i),l=Z.getccenter(o,s,c),l.interval={start:r,end:i},d=this._error(l,o,r,i)<=e,p=f&&!d,p||(h=i),d){if(i>=1){if(l.interval.end=h=1,u=l,i>1){let e={x:l.x+l.r*Dd(l.e),y:l.y+l.r*Od(l.e)};l.e+=Z.angle({x:l.x,y:l.y},e,this.get(1))}break}i+=(i-r)/2}else i=m;while(!p&&a++<100);if(a>=100)break;u||=l,n.push(u),r=h}while(i<1);return n}};function Nd(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 Pd(e){if(Array.isArray(e))return e}function Fd(e){if(Array.isArray(e))return Nd(e)}function Id(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function Ld(e,n){var r=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(r!=null){var i,a,o,s,c=[],l=!0,u=!1;try{if(o=(r=r.call(e)).next,n!==0)for(;!(l=(i=o.call(r)).done)&&(c.push(i.value),c.length!==n);l=!0);}catch(e){u=!0,a=e}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return c}}function Rd(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
20
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zd(){throw TypeError(`Invalid attempt to spread non-iterable instance.
21
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Bd(e,n){if(e==null)return{};var r,i,a=Vd(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],n.includes(r)||{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function Vd(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 Hd(e,n){return Pd(e)||Ld(e,n)||Kd(e,n)||Rd()}function Ud(e){return Fd(e)||Id(e)||Kd(e)||zd()}function Wd(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 TypeError(`@@toPrimitive must return a primitive value.`)}return String(e)}function Gd(e){var n=Wd(e,`string`);return typeof n==`symbol`?n:n+``}function Kd(e,n){if(e){if(typeof e==`string`)return Nd(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)?Nd(e,n):void 0}}var qd=(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,a=(n instanceof Array?n.length?n:[void 0]:[n]).map(function(e){return{keyAccessor:e,isProp:!(e instanceof Function)}}),o=e.reduce(function(e,n){var i=e,o=n;return a.forEach(function(e,n){var s=e.keyAccessor,c=e.isProp,l;if(c){var u=o,d=u[s],f=Bd(u,[s].map(Gd));l=d,o=f}else l=s(o,n);n+1<a.length?(i.hasOwnProperty(l)||(i[l]={}),i=i[l]):r?(i.hasOwnProperty(l)||(i[l]=[]),i[l].push(o)):i[l]=o}),e},{});r instanceof Function&&(function e(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;i===a.length?Object.keys(n).forEach(function(e){return n[e]=r(n[e])}):Object.values(n).forEach(function(n){return e(n,i+1)})})(o);var s=o;return i&&(s=[],(function e(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];r.length===a.length?s.push({keys:r,vals:n}):Object.entries(n).forEach(function(n){var i=Hd(n,2),a=i[0],o=i[1];return e(o,[].concat(Ud(r),[a]))})})(o),n instanceof Array&&n.length===0&&s.length===1&&(s[0].keys=[])),s});function Jd(e,n){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(n).domain(e);break}return this}var Yd=Symbol(`implicit`);function Xd(){var e=new oo,n=[],r=[],i=Yd;function a(a){let o=e.get(a);if(o===void 0){if(i!==Yd)return i;e.set(a,o=n.push(a)-1)}return r[o%r.length]}return a.domain=function(r){if(!arguments.length)return n.slice();n=[],e=new oo;for(let i of r)e.has(i)||e.set(i,n.push(i)-1);return a},a.range=function(e){return arguments.length?(r=Array.from(e),a):r.slice()},a.unknown=function(e){return arguments.length?(i=e,a):i},a.copy=function(){return Xd(n,r).unknown(i)},Jd.apply(a,arguments),a}function Zd(e){for(var n=e.length/6|0,r=Array(n),i=0;i<n;)r[i]=`#`+e.slice(i*6,++i*6);return r}var Qd=Zd(`a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928`);function $d(e,n){n===void 0&&(n={});var r=n.insertAt;if(!(typeof document>`u`)){var i=document.head||document.getElementsByTagName(`head`)[0],a=document.createElement(`style`);a.type=`text/css`,r===`top`&&i.firstChild?i.insertBefore(a,i.firstChild):i.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}$d(`.force-graph-container canvas {
22
+ display: block;
23
+ user-select: none;
24
+ outline: none;
25
+ -webkit-tap-highlight-color: transparent;
26
+ }
27
+
28
+ .force-graph-container .clickable {
29
+ cursor: pointer;
30
+ }
31
+
32
+ .force-graph-container .grabbable {
33
+ cursor: move;
34
+ cursor: grab;
35
+ cursor: -moz-grab;
36
+ cursor: -webkit-grab;
37
+ }
38
+
39
+ .force-graph-container .grabbable:active {
40
+ cursor: grabbing;
41
+ cursor: -moz-grabbing;
42
+ cursor: -webkit-grabbing;
43
+ }
44
+ `);function ef(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 tf(e){if(Array.isArray(e))return e}function nf(e){if(Array.isArray(e))return ef(e)}function rf(e,n,r){if(of())return Reflect.construct.apply(null,arguments);var i=[null];return i.push.apply(i,n),new(e.bind.apply(e,i))}function af(e,n,r){return(n=gf(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function of(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(of=function(){return!!e})()}function sf(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function cf(e,n){var r=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(r!=null){var i,a,o,s,c=[],l=!0,u=!1;try{if(o=(r=r.call(e)).next,n!==0)for(;!(l=(i=o.call(r)).done)&&(c.push(i.value),c.length!==n);l=!0);}catch(e){u=!0,a=e}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return c}}function lf(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
45
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uf(){throw TypeError(`Invalid attempt to spread non-iterable instance.
46
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function df(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}function ff(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]==null?{}:arguments[n];n%2?df(Object(r),!0).forEach(function(n){af(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):df(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pf(e,n){return tf(e)||cf(e,n)||vf(e,n)||lf()}function mf(e){return nf(e)||sf(e)||vf(e)||uf()}function hf(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 TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(e)}function gf(e){var n=hf(e,`string`);return typeof n==`symbol`?n:n+``}function _f(e){"@babel/helpers - typeof";return _f=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},_f(e)}function vf(e,n){if(e){if(typeof e==`string`)return ef(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)?ef(e,n):void 0}}var yf=Xd(Qd);function bf(e,n,r){!n||typeof r!=`string`||e.filter(function(e){return!e[r]}).forEach(function(e){e[r]=yf(n(e))})}function xf(e,n){var r=e.nodes,i=e.links,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=a.nodeFilter,s=o===void 0?function(){return!0}:o,c=a.onLoopError,l=c===void 0?function(e){throw`Invalid DAG structure! Found cycle in node path: ${e.join(` -> `)}.`}:c,u={};r.forEach(function(e){return u[n(e)]={data:e,out:[],depth:-1,skip:!s(e)}}),i.forEach(function(e){var r=e.source,i=e.target,a=l(r),o=l(i);if(!u.hasOwnProperty(a))throw`Missing source node with id: ${a}`;if(!u.hasOwnProperty(o))throw`Missing target node with id: ${o}`;var s=u[a],c=u[o];s.out.push(c);function l(e){return _f(e)===`object`?n(e):e}});var d=[];return f(Object.values(u)),Object.assign.apply(Object,[{}].concat(mf(Object.entries(u).filter(function(e){return!pf(e,2)[1].skip}).map(function(e){var n=pf(e,2),r=n[0],i=n[1];return af({},r,i.depth)}))));function f(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=function(){var a=e[o];if(r.indexOf(a)!==-1){var s=[].concat(mf(r.slice(r.indexOf(a))),[a]).map(function(e){return n(e.data)});return d.some(function(e){return e.length===s.length&&e.every(function(e,n){return e===s[n]})})||(d.push(s),l(s)),1}i>a.depth&&(a.depth=i,f(a.out,[].concat(mf(r),[a]),i+ +!a.skip))},o=0,s=e.length;o<s;o++)if(a())continue}}var Sf=2,Q=function(e,n){return n.onNeedsRedraw&&n.onNeedsRedraw()},Cf=function(e,n){if(!n.isShadow){var r=V(n.linkDirectionalParticles);n.graphData.links.forEach(function(e){var n=Math.round(Math.abs(r(e)));n?e.__photons=mf(Array(n)).map(function(){return{}}):delete e.__photons})}},wf=ms({props:{graphData:{default:{nodes:[],links:[]},onChange:function(e,n){n.engineRunning=!1,Cf(e,n)}},dagMode:{onChange:function(e,n){!e&&(n.graphData.nodes||[]).forEach(function(e){e.fx=e.fy=void 0})}},dagLevelDistance:{},dagNodeFilter:{default:function(e){return!0}},onDagError:{triggerUpdate:!1},nodeRelSize:{default:4,triggerUpdate:!1,onChange:Q},nodeId:{default:`id`},nodeVal:{default:`val`,triggerUpdate:!1,onChange:Q},nodeColor:{default:`color`,triggerUpdate:!1,onChange:Q},nodeAutoColorBy:{},nodeCanvasObject:{triggerUpdate:!1,onChange:Q},nodeCanvasObjectMode:{default:function(){return`replace`},triggerUpdate:!1,onChange:Q},nodeVisibility:{default:!0,triggerUpdate:!1,onChange:Q},linkSource:{default:`source`},linkTarget:{default:`target`},linkVisibility:{default:!0,triggerUpdate:!1,onChange:Q},linkColor:{default:`color`,triggerUpdate:!1,onChange:Q},linkAutoColorBy:{},linkLineDash:{triggerUpdate:!1,onChange:Q},linkWidth:{default:1,triggerUpdate:!1,onChange:Q},linkCurvature:{default:0,triggerUpdate:!1,onChange:Q},linkCanvasObject:{triggerUpdate:!1,onChange:Q},linkCanvasObjectMode:{default:function(){return`replace`},triggerUpdate:!1,onChange:Q},linkDirectionalArrowLength:{default:0,triggerUpdate:!1,onChange:Q},linkDirectionalArrowColor:{triggerUpdate:!1,onChange:Q},linkDirectionalArrowRelPos:{default:.5,triggerUpdate:!1,onChange:Q},linkDirectionalParticles:{default:0,triggerUpdate:!1,onChange:Cf},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(e,n){n.forceLayout.alphaDecay(e)}},d3AlphaTarget:{default:0,triggerUpdate:!1,onChange:function(e,n){n.forceLayout.alphaTarget(e)}},d3VelocityDecay:{default:.4,triggerUpdate:!1,onChange:function(e,n){n.forceLayout.velocityDecay(e)}},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(e,n,r){return r===void 0?e.forceLayout.force(n):(e.forceLayout.force(n,r),this)},d3ReheatSimulation:function(e){return e.forceLayout.alpha(1),this.resetCountdown(),this},resetCountdown:function(e){return e.cntTicks=0,e.startTickTime=new Date,e.engineRunning=!0,this},isEngineRunning:function(e){return!!e.engineRunning},tickFrame:function(e){return!e.isShadow&&n(),i(),!e.isShadow&&a(),!e.isShadow&&o(),r(),this;function n(){e.engineRunning&&(++e.cntTicks>e.cooldownTicks||new Date-e.startTickTime>e.cooldownTime||e.d3AlphaMin>0&&e.forceLayout.alpha()<e.d3AlphaMin?(e.engineRunning=!1,e.onEngineStop()):(e.forceLayout.tick(),e.onEngineTick()))}function r(){var n=V(e.nodeVisibility),r=V(e.nodeVal),i=V(e.nodeColor),a=V(e.nodeCanvasObjectMode),o=e.ctx,s=e.isShadow/e.globalScale,c=e.graphData.nodes.filter(n);o.save(),c.forEach(function(n){var c=a(n);if(e.nodeCanvasObject&&(c===`before`||c===`replace`)&&(e.nodeCanvasObject(n,o,e.globalScale),c===`replace`)){o.restore();return}var l=Math.sqrt(Math.max(0,r(n)||1))*e.nodeRelSize+s;o.beginPath(),o.arc(n.x,n.y,l,0,2*Math.PI,!1),o.fillStyle=i(n)||`rgba(31, 120, 180, 0.92)`,o.fill(),e.nodeCanvasObject&&c===`after`&&e.nodeCanvasObject(n,e.ctx,e.globalScale)}),o.restore()}function i(){var n=V(e.linkVisibility),r=V(e.linkColor),i=V(e.linkWidth),a=V(e.linkLineDash),o=V(e.linkCurvature),s=V(e.linkCanvasObjectMode),c=e.ctx,l=e.isShadow*2,u=e.graphData.links.filter(n);u.forEach(_);var d=[],f=[],p=u;if(e.linkCanvasObject){var m=[],h=[];u.forEach(function(e){return({before:d,after:f,replace:m}[s(e)]||h).push(e)}),p=[].concat(mf(d),f,h),d=d.concat(m)}c.save(),d.forEach(function(n){return e.linkCanvasObject(n,c,e.globalScale)}),c.restore();var g=qd(p,[r,i,a]);c.save(),Object.entries(g).forEach(function(n){var r=pf(n,2),i=r[0],o=r[1],s=!i||i===`undefined`?`rgba(0,0,0,0.15)`:i;Object.entries(o).forEach(function(n){var r=pf(n,2),i=r[0],o=r[1],u=(i||1)/e.globalScale+l;Object.entries(o).forEach(function(e){var n=pf(e,2);n[0];var r=n[1],i=a(r[0]);c.beginPath(),r.forEach(function(e){var n=e.source,r=e.target;if(!(!n||!r||!n.hasOwnProperty(`x`)||!r.hasOwnProperty(`x`))){c.moveTo(n.x,n.y);var i=e.__controlPoints;i?c[i.length===2?`quadraticCurveTo`:`bezierCurveTo`].apply(c,mf(i).concat([r.x,r.y])):c.lineTo(r.x,r.y)}}),c.strokeStyle=s,c.lineWidth=u,c.setLineDash(i||[]),c.stroke()})})}),c.restore(),c.save(),f.forEach(function(n){return e.linkCanvasObject(n,c,e.globalScale)}),c.restore();function _(e){var n=o(e);if(!n){e.__controlPoints=null;return}var r=e.source,i=e.target;if(!(!r||!i||!r.hasOwnProperty(`x`)||!i.hasOwnProperty(`x`))){var a=Math.sqrt((i.x-r.x)**2+(i.y-r.y)**2);if(a>0){var s=Math.atan2(i.y-r.y,i.x-r.x),c=a*n,l={x:(r.x+i.x)/2+c*Math.cos(s-Math.PI/2),y:(r.y+i.y)/2+c*Math.sin(s-Math.PI/2)};e.__controlPoints=[l.x,l.y]}else{var u=n*70;e.__controlPoints=[i.x,i.y-u,i.x+u,i.y]}}}}function a(){var n=1.6,r=.2,i=V(e.linkDirectionalArrowLength),a=V(e.linkDirectionalArrowRelPos),o=V(e.linkVisibility),s=V(e.linkDirectionalArrowColor||e.linkColor),c=V(e.nodeVal),l=e.ctx;l.save(),e.graphData.links.filter(o).forEach(function(o){var u=i(o);if(!(!u||u<0)){var d=o.source,f=o.target;if(!(!d||!f||!d.hasOwnProperty(`x`)||!f.hasOwnProperty(`x`))){var p=Math.sqrt(Math.max(0,c(d)||1))*e.nodeRelSize,m=Math.sqrt(Math.max(0,c(f)||1))*e.nodeRelSize,h=Math.min(1,Math.max(0,a(o))),g=s(o)||`rgba(0,0,0,0.28)`,_=u/n/2,v=o.__controlPoints&&rf(Md,[d.x,d.y].concat(mf(o.__controlPoints),[f.x,f.y])),y=v?function(e){return v.get(e)}:function(e){return{x:d.x+(f.x-d.x)*e||0,y:d.y+(f.y-d.y)*e||0}},b=v?v.length():Math.sqrt((f.x-d.x)**2+(f.y-d.y)**2),x=p+u+(b-p-m-u)*h,S=y(x/b),C=y((x-u)/b),w=y((x-u*(1-r))/b),T=Math.atan2(S.y-C.y,S.x-C.x)-Math.PI/2;l.beginPath(),l.moveTo(S.x,S.y),l.lineTo(C.x+_*Math.cos(T),C.y+_*Math.sin(T)),l.lineTo(w.x,w.y),l.lineTo(C.x-_*Math.cos(T),C.y-_*Math.sin(T)),l.fillStyle=g,l.fill()}}}),l.restore()}function o(){var n=V(e.linkDirectionalParticles),r=V(e.linkDirectionalParticleSpeed),i=V(e.linkDirectionalParticleOffset),a=V(e.linkDirectionalParticleWidth),o=V(e.linkVisibility),s=V(e.linkDirectionalParticleColor||e.linkColor),c=e.ctx;c.save(),e.graphData.links.filter(o).forEach(function(o){var l=n(o);if(!(!o.hasOwnProperty(`__photons`)||!o.__photons.length)){var u=o.source,d=o.target;if(!(!u||!d||!u.hasOwnProperty(`x`)||!d.hasOwnProperty(`x`))){var f=r(o),p=Math.abs(i(o)),m=o.__photons||[],h=Math.max(0,a(o)/2)/Math.sqrt(e.globalScale);c.fillStyle=s(o)||`rgba(0,0,0,0.28)`;var g=o.__controlPoints?rf(Md,[u.x,u.y].concat(mf(o.__controlPoints),[d.x,d.y])):null,_=0,v=!1;m.forEach(function(n){var r=!!n.__singleHop;if(n.hasOwnProperty(`__progressRatio`)||(n.__progressRatio=r?0:(_+p)/l),!r&&_++,n.__progressRatio+=f,n.__progressRatio>=1)if(!r)n.__progressRatio%=1;else{v=!0;return}var i=n.__progressRatio,a=g?g.get(i):{x:u.x+(d.x-u.x)*i||0,y:u.y+(d.y-u.y)*i||0};e.linkDirectionalParticleCanvasObject?e.linkDirectionalParticleCanvasObject(a.x,a.y,o,c,e.globalScale):(c.beginPath(),c.arc(a.x,a.y,h,0,2*Math.PI,!1),c.fill())}),v&&(o.__photons=o.__photons.filter(function(e){return!e.__singleHop||e.__progressRatio<=1}))}}}),c.restore()}},emitParticle:function(e,n){return n&&(!n.__photons&&(n.__photons=[]),n.__photons.push({__singleHop:!0})),this}},stateInit:function(){return{forceLayout:ad().force(`link`,qu()).force(`charge`,od()).force(`center`,Nl()).force(`dagRadial`,null).stop(),engineRunning:!1}},init:function(e,n){n.ctx=e},update:function(e,n){e.engineRunning=!1,e.onUpdate(),e.nodeAutoColorBy!==null&&bf(e.graphData.nodes,V(e.nodeAutoColorBy),e.nodeColor),e.linkAutoColorBy!==null&&bf(e.graphData.links,V(e.linkAutoColorBy),e.linkColor),e.graphData.links.forEach(function(n){n.source=n[e.linkSource],n.target=n[e.linkTarget]}),e.forceLayout.stop().alpha(1).nodes(e.graphData.nodes);var r=e.forceLayout.force(`link`);r&&r.id(function(n){return n[e.nodeId]}).links(e.graphData.links);var i=e.dagMode&&xf(e.graphData,function(n){return n[e.nodeId]},{nodeFilter:e.dagNodeFilter,onLoopError:e.onDagError||void 0}),a=Math.max.apply(Math,mf(Object.values(i||[]))),o=e.dagLevelDistance||e.graphData.nodes.length/(a||1)*Sf*([`radialin`,`radialout`].indexOf(e.dagMode)===-1?1:.7);if([`lr`,`rl`,`td`,`bu`].includes(n.dagMode)){var s=[`lr`,`rl`].includes(n.dagMode)?`fx`:`fy`;e.graphData.nodes.filter(e.dagNodeFilter).forEach(function(e){return delete e[s]})}if([`lr`,`rl`,`td`,`bu`].includes(e.dagMode)){var c=[`rl`,`bu`].includes(e.dagMode),l=function(n){return(i[n[e.nodeId]]-a/2)*o*(c?-1:1)},u=[`lr`,`rl`].includes(e.dagMode)?`fx`:`fy`;e.graphData.nodes.filter(e.dagNodeFilter).forEach(function(e){return e[u]=l(e)})}e.forceLayout.force(`dagRadial`,[`radialin`,`radialout`].indexOf(e.dagMode)===-1?null:sd(function(n){var r=i[n[e.nodeId]]||-1;return(e.dagMode===`radialin`?a-r:r)*o}).strength(function(n){return+!!e.dagNodeFilter(n)}));for(var d=0;d<e.warmupTicks&&!(e.d3AlphaMin>0&&e.forceLayout.alpha()<e.d3AlphaMin);d++)e.forceLayout.tick();this.resetCountdown(),e.onFinishUpdate()}});function Tf(e,n){var r=e instanceof Array?e:[e],i=new n;return i._destructor&&i._destructor(),{linkProp:function(e){return{default:i[e](),onChange:function(n,i){r.forEach(function(r){return i[r][e](n)})},triggerUpdate:!1}},linkMethod:function(e){return function(n){var i=[...arguments].slice(1),a=[];return r.forEach(function(r){var o=n[r],s=o[e].apply(o,i);s!==o&&a.push(s)}),a.length?a[0]:this}}}}var Ef=800,Df=4,Of=5,kf=Tf(`forceGraph`,wf),Af=Tf([`forceGraph`,`shadowGraph`],wf),jf=Object.assign.apply(Object,mf(`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`.split(`.`).map(function(e){return af({},e,kf.linkProp(e))})).concat(mf([`nodeRelSize`,`nodeId`,`nodeVal`,`nodeVisibility`,`linkSource`,`linkTarget`,`linkVisibility`,`linkCurvature`].map(function(e){return af({},e,Af.linkProp(e))})))),Mf=Object.assign.apply(Object,mf([`d3Force`,`d3ReheatSimulation`,`emitParticle`].map(function(e){return af({},e,kf.linkMethod(e))})));function Nf(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=`${e.width}px`,a.style.height=`${e.height}px`,a.width=e.width*i,a.height=e.height*i,!n&&!r&&a.getContext(`2d`).scale(i,i)});var a=Xa(e.canvas).k;e.zoom.translateBy(e.zoom.__baseElem,(e.width-n)/2/a,(e.height-r)/2/a),e.needsRedraw=!0}}function Pf(e){var n=window.devicePixelRatio;e.setTransform(n,0,0,n,0,0)}function Ff(e,n,r){e.save(),Pf(e),e.clearRect(0,0,n,r),e.restore()}var If=ms({props:ff({width:{default:window.innerWidth,onChange:function(e,n){return Nf(n)},triggerUpdate:!1},height:{default:window.innerHeight,onChange:function(e,n){return Nf(n)},triggerUpdate:!1},graphData:{default:{nodes:[],links:[]},onChange:function(e,n){[e.nodes,e.links].every(function(e){return(e||[]).every(function(e){return!e.hasOwnProperty(`__indexColor`)})})&&n.colorTracker.reset(),[{type:`Node`,objs:e.nodes},{type:`Link`,objs:e.links}].forEach(r),n.forceGraph.graphData(e),n.shadowGraph.graphData(e);function r(e){var r=e.type;e.objs.filter(function(e){if(!e.hasOwnProperty(`__indexColor`))return!0;var r=n.colorTracker.lookup(e.__indexColor);return!r||!r.hasOwnProperty(`d`)||r.d!==e}).forEach(function(e){e.__indexColor=n.colorTracker.register({type:r,d:e})})}},triggerUpdate:!1},backgroundColor:{onChange:function(e,n){n.canvas&&e&&(n.canvas.style.background=e)},triggerUpdate:!1},nodeLabel:{default:`name`,triggerUpdate:!1},nodePointerAreaPaint:{onChange:function(e,n){n.shadowGraph.nodeCanvasObject(e?function(n,r,i){return e(n,n.__indexColor,r,i)}:null),n.flushShadowCanvas&&n.flushShadowCanvas()},triggerUpdate:!1},linkPointerAreaPaint:{onChange:function(e,n){n.shadowGraph.linkCanvasObject(e?function(n,r,i){return e(n,n.__indexColor,r,i)}:null),n.flushShadowCanvas&&n.flushShadowCanvas()},triggerUpdate:!1},linkLabel:{default:`name`,triggerUpdate:!1},linkHoverPrecision:{default:4,triggerUpdate:!1},minZoom:{default:.01,onChange:function(e,n){n.zoom.scaleExtent([e,n.zoom.scaleExtent()[1]])},triggerUpdate:!1},maxZoom:{default:1e3,onChange:function(e,n){n.zoom.scaleExtent([n.zoom.scaleExtent()[0],e])},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(e,n){n.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}},jf),aliases:{stopAnimation:`pauseAnimation`},methods:ff({graph2ScreenCoords:function(e,n,r){var i=Xa(e.canvas);return{x:n*i.k+i.x,y:r*i.k+i.y}},screen2GraphCoords:function(e,n,r){var i=Xa(e.canvas);return{x:(n-i.x)/i.k,y:(r-i.y)/i.k}},centerAt:function(e,n,r,i){if(!e.canvas)return null;if(n!==void 0||r!==void 0){var a=Object.assign({},n===void 0?{}:{x:n},r===void 0?{}:{y:r});return i?e.tweenGroup.add(new rs(o()).to(a,i).easing(Zo.Quadratic.Out).onUpdate(s).onComplete(function(){e.tweenGroup.remove(this)}).start()):s(a),this}return o();function o(){var n=Xa(e.canvas);return{x:(e.width/2-n.x)/n.k,y:(e.height/2-n.y)/n.k}}function s(n){var r=n.x,i=n.y;e.zoom.translateTo(e.zoom.__baseElem,r===void 0?o().x:r,i===void 0?o().y:i),e.needsRedraw=!0}},zoom:function(e,n,r){if(!e.canvas)return null;if(n!==void 0)return r?e.tweenGroup.add(new rs({k:i()}).to({k:n},r).easing(Zo.Quadratic.Out).onUpdate(function(e){var n=e.k;return a(n)}).onComplete(function(){e.tweenGroup.remove(this)}).start()):a(n),this;return i();function i(){return Xa(e.canvas).k}function a(n){e.zoom.scaleTo(e.zoom.__baseElem,n),e.needsRedraw=!0}},zoomToFit:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:10,i=[...arguments].slice(3),a=this.getGraphBbox.apply(this,i);if(a){var o={x:(a.x[0]+a.x[1])/2,y:(a.y[0]+a.y[1])/2},s=Math.max(1e-12,Math.min(0xe8d4a51000,(e.width-r*2)/(a.x[1]-a.x[0]),(e.height-r*2)/(a.y[1]-a.y[0])));this.centerAt(o.x,o.y,n),this.zoom(s,n)}return this},getGraphBbox:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){return!0},r=V(e.nodeVal),i=function(n){return Math.sqrt(Math.max(0,r(n)||1))*e.nodeRelSize},a=e.graphData.nodes.filter(n).map(function(e){return{x:e.x,y:e.y,r:i(e)}});return a.length?{x:[po(a,function(e){return e.x-e.r}),fo(a,function(e){return e.x+e.r})],y:[po(a,function(e){return e.y-e.r}),fo(a,function(e){return e.y+e.r})]}:null},pauseAnimation:function(e){return e.animationFrameRequestId&&=(cancelAnimationFrame(e.animationFrameRequestId),null),this},resumeAnimation:function(e){return e.animationFrameRequestId||this._animationCycle(),this},_destructor:function(){this.pauseAnimation(),this.graphData({nodes:[],links:[]})}},Mf),stateInit:function(){return{lastSetZoom:1,zoom:ao(),forceGraph:new wf,shadowGraph:new wf().cooldownTicks(0).nodeColor(`__indexColor`).linkColor(`__indexColor`).isShadow(!0),colorTracker:new Cc,tweenGroup:new $o}},init:function(e,n){var r=this;e.innerHTML=``;var i=document.createElement(`div`);i.classList.add(`force-graph-container`),i.style.position=`relative`,e.appendChild(i),n.canvas=document.createElement(`canvas`),n.backgroundColor&&(n.canvas.style.background=n.backgroundColor),i.appendChild(n.canvas),n.shadowCanvas=document.createElement(`canvas`);var a=n.canvas.getContext(`2d`),o=n.shadowCanvas.getContext(`2d`,{willReadFrequently:!0}),s={x:-0xe8d4a51000,y:-0xe8d4a51000},c=function(){var e=null,r=window.devicePixelRatio,i=s.x>0&&s.y>0?o.getImageData(s.x*r,s.y*r,1,1):null;return i&&(e=n.colorTracker.lookup(i.data)),e};z(n.canvas).call(Yn().subject(function(){if(!n.enableNodeDrag)return null;var e=c();return e&&e.type===`Node`?e.d:null}).on(`start`,function(e){var r=e.subject;r.__initialDragPos={x:r.x,y:r.y,fx:r.fx,fy:r.fy},e.active||(r.fx=r.x,r.fy=r.y),n.canvas.classList.add(`grabbable`)}).on(`drag`,function(e){var r=e.subject,i=r.__initialDragPos,a=e,o=Xa(n.canvas).k,s={x:i.x+(a.x-i.x)/o-r.x,y:i.y+(a.y-i.y)/o-r.y};[`x`,`y`].forEach(function(e){return r[`f${e}`]=r[e]=i[e]+(a[e]-i[e])/o}),!(!r.__dragged&&Of>=Math.sqrt(mo([`x`,`y`].map(function(n){return(e[n]-i[n])**2}))))&&(n.forceGraph.d3AlphaTarget(.3).resetCountdown(),n.isPointerDragging=!0,r.__dragged=!0,n.onNodeDrag(r,s))}).on(`end`,function(e){var r=e.subject,i=r.__initialDragPos,a={x:r.x-i.x,y:r.y-i.y};i.fx===void 0&&(r.fx=void 0),i.fy===void 0&&(r.fy=void 0),delete r.__initialDragPos,n.forceGraph.d3AlphaTarget()&&n.forceGraph.d3AlphaTarget(0).resetCountdown(),n.canvas.classList.remove(`grabbable`),n.isPointerDragging=!1,r.__dragged&&(delete r.__dragged,n.onNodeDragEnd(r,a))})),n.zoom(n.zoom.__baseElem=z(n.canvas)),n.zoom.__baseElem.on(`dblclick.zoom`,null),n.zoom.filter(function(e){return!e.button&&n.enableZoomPanInteraction&&(e.type!==`wheel`||V(n.enableZoomInteraction)(e))&&(e.type===`wheel`||V(n.enablePanInteraction)(e))}).on(`zoom`,function(e){var i=e.transform;[a,o].forEach(function(e){Pf(e),e.translate(i.x,i.y),e.scale(i.k,i.k)}),n.isPointerDragging=!0,n.onZoom&&n.onZoom(ff(ff({},i),r.centerAt())),n.needsRedraw=!0}).on(`end`,function(e){n.isPointerDragging=!1,n.onZoomEnd&&n.onZoomEnd(ff(ff({},e.transform),r.centerAt()))}),Nf(n),n.forceGraph.onNeedsRedraw(function(){return n.needsRedraw=!0}).onFinishUpdate(function(){Xa(n.canvas).k===n.lastSetZoom&&n.graphData.nodes.length&&(n.zoom.scaleTo(n.zoom.__baseElem,n.lastSetZoom=Df/Math.cbrt(n.graphData.nodes.length)),n.needsRedraw=!0)}),n.tooltip=new Ml(i),[`pointermove`,`pointerdown`].forEach(function(e){return i.addEventListener(e,function(r){e===`pointerdown`&&(n.isPointerPressed=!0,n.pointerDownEvent=r),!n.isPointerDragging&&r.type===`pointermove`&&n.onBackgroundClick&&(r.pressure>0||n.isPointerPressed)&&(r.pointerType===`mouse`||r.movementX===void 0||[r.movementX,r.movementY].some(function(e){return Math.abs(e)>1}))&&(n.isPointerDragging=!0);var a=o(i);s.x=r.pageX-a.left,s.y=r.pageY-a.top;function o(e){var n=e.getBoundingClientRect(),r=window.pageXOffset||document.documentElement.scrollLeft,i=window.pageYOffset||document.documentElement.scrollTop;return{top:n.top+i,left:n.left+r}}},{passive:!0})}),i.addEventListener(`pointerup`,function(e){if(n.isPointerPressed){if(n.isPointerPressed=!1,n.isPointerDragging){n.isPointerDragging=!1;return}var r=[e,n.pointerDownEvent];requestAnimationFrame(function(){if(e.button===0)if(n.hoverObj){var i=n[`on${n.hoverObj.type}Click`];i&&i.apply(void 0,[n.hoverObj.d].concat(r))}else n.onBackgroundClick&&n.onBackgroundClick.apply(n,r);if(e.button===2)if(n.hoverObj){var a=n[`on${n.hoverObj.type}RightClick`];a&&a.apply(void 0,[n.hoverObj.d].concat(r))}else n.onBackgroundRightClick&&n.onBackgroundRightClick.apply(n,r)})}},{passive:!0}),i.addEventListener(`contextmenu`,function(e){return!n.onBackgroundRightClick&&!n.onNodeRightClick&&!n.onLinkRightClick?!0:(e.preventDefault(),!1)}),n.forceGraph(a),n.shadowGraph(o);var l=Xo(function(){Ff(o,n.width,n.height),n.shadowGraph.linkWidth(function(e){return V(n.linkWidth)(e)+n.linkHoverPrecision});var e=Xa(n.canvas);n.shadowGraph.globalScale(e.k).tickFrame()},Ef);n.flushShadowCanvas=l.flush,(this._animationCycle=function e(){var r=!n.autoPauseRedraw||!!n.needsRedraw||n.forceGraph.isEngineRunning()||n.graphData.links.some(function(e){return e.__photons&&e.__photons.length});if(n.needsRedraw=!1,n.enablePointerInteraction){var i=n.isPointerDragging?null:c();if(i!==n.hoverObj){var o=n.hoverObj,s=o?o.type:null,u=i?i.type:null;if(s&&s!==u){var d=n[`on${s}Hover`];d&&d(null,o.d)}if(u){var f=n[`on${u}Hover`];f&&f(i.d,s===u?o.d:null)}n.tooltip.content(i&&V(n[`${i.type.toLowerCase()}Label`])(i.d)||null),n.canvas.classList[(i&&n[`on${u}Click`]||!i&&n.onBackgroundClick)&&V(n.showPointerCursor)(i?.d)?`add`:`remove`](`clickable`),n.hoverObj=i}r&&l()}if(r){Ff(a,n.width,n.height);var p=Xa(n.canvas).k;n.onRenderFramePre&&n.onRenderFramePre(a,p),n.forceGraph.globalScale(p).tickFrame(),n.onRenderFramePost&&n.onRenderFramePost(a,p)}n.tweenGroup.update(),n.animationFrameRequestId=requestAnimationFrame(e)})()},update:function(e){}}),Lf=n(((e,n)=>{n.exports=`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`})),Rf=n(((e,n)=>{var r=Lf();function i(){}function a(){}a.resetWarningCache=i,n.exports=function(){function e(e,n,i,a,o,s){if(s!==r){var c=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 c.name=`Invariant Violation`,c}}e.isRequired=e;function n(){return e}var o={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:a,resetWarningCache:i};return o.PropTypes=o,o}})),$=a(n(((e,n)=>{n.exports=Rf()()}))(),1),zf={width:$.default.number,height:$.default.number,graphData:$.default.shape({nodes:$.default.arrayOf($.default.object).isRequired,links:$.default.arrayOf($.default.object).isRequired}),backgroundColor:$.default.string,nodeRelSize:$.default.number,nodeId:$.default.string,nodeLabel:$.default.oneOfType([$.default.string,$.default.func]),nodeVal:$.default.oneOfType([$.default.number,$.default.string,$.default.func]),nodeVisibility:$.default.oneOfType([$.default.bool,$.default.string,$.default.func]),nodeColor:$.default.oneOfType([$.default.string,$.default.func]),nodeAutoColorBy:$.default.oneOfType([$.default.string,$.default.func]),onNodeHover:$.default.func,onNodeClick:$.default.func,linkSource:$.default.string,linkTarget:$.default.string,linkLabel:$.default.oneOfType([$.default.string,$.default.func]),linkVisibility:$.default.oneOfType([$.default.bool,$.default.string,$.default.func]),linkColor:$.default.oneOfType([$.default.string,$.default.func]),linkAutoColorBy:$.default.oneOfType([$.default.string,$.default.func]),linkWidth:$.default.oneOfType([$.default.number,$.default.string,$.default.func]),linkCurvature:$.default.oneOfType([$.default.number,$.default.string,$.default.func]),linkDirectionalArrowLength:$.default.oneOfType([$.default.number,$.default.string,$.default.func]),linkDirectionalArrowColor:$.default.oneOfType([$.default.string,$.default.func]),linkDirectionalArrowRelPos:$.default.oneOfType([$.default.number,$.default.string,$.default.func]),linkDirectionalParticles:$.default.oneOfType([$.default.number,$.default.string,$.default.func]),linkDirectionalParticleSpeed:$.default.oneOfType([$.default.number,$.default.string,$.default.func]),linkDirectionalParticleOffset:$.default.oneOfType([$.default.number,$.default.string,$.default.func]),linkDirectionalParticleWidth:$.default.oneOfType([$.default.number,$.default.string,$.default.func]),linkDirectionalParticleColor:$.default.oneOfType([$.default.string,$.default.func]),onLinkHover:$.default.func,onLinkClick:$.default.func,dagMode:$.default.oneOf([`td`,`bu`,`lr`,`rl`,`zin`,`zout`,`radialin`,`radialout`]),dagLevelDistance:$.default.number,dagNodeFilter:$.default.func,onDagError:$.default.func,d3AlphaMin:$.default.number,d3AlphaDecay:$.default.number,d3VelocityDecay:$.default.number,warmupTicks:$.default.number,cooldownTicks:$.default.number,cooldownTime:$.default.number,onEngineTick:$.default.func,onEngineStop:$.default.func,getGraphBbox:$.default.func},Bf={zoomToFit:$.default.func,onNodeRightClick:$.default.func,onNodeDrag:$.default.func,onNodeDragEnd:$.default.func,onLinkRightClick:$.default.func,linkHoverPrecision:$.default.number,onBackgroundClick:$.default.func,onBackgroundRightClick:$.default.func,showPointerCursor:$.default.oneOfType([$.default.bool,$.default.func]),enablePointerInteraction:$.default.bool,enableNodeDrag:$.default.bool},Vf={showNavInfo:$.default.bool,nodeOpacity:$.default.number,nodeResolution:$.default.number,nodeThreeObject:$.default.oneOfType([$.default.object,$.default.string,$.default.func]),nodeThreeObjectExtend:$.default.oneOfType([$.default.bool,$.default.string,$.default.func]),nodePositionUpdate:$.default.func,linkOpacity:$.default.number,linkResolution:$.default.number,linkCurveRotation:$.default.oneOfType([$.default.number,$.default.string,$.default.func]),linkMaterial:$.default.oneOfType([$.default.object,$.default.string,$.default.func]),linkThreeObject:$.default.oneOfType([$.default.object,$.default.string,$.default.func]),linkThreeObjectExtend:$.default.oneOfType([$.default.bool,$.default.string,$.default.func]),linkPositionUpdate:$.default.func,linkDirectionalArrowResolution:$.default.number,linkDirectionalParticleResolution:$.default.number,linkDirectionalParticleThreeObject:$.default.oneOfType([$.default.object,$.default.string,$.default.func]),forceEngine:$.default.oneOf([`d3`,`ngraph`]),ngraphPhysics:$.default.object,numDimensions:$.default.oneOf([1,2,3])},Hf=Object.assign({},zf,Bf,{linkLineDash:$.default.oneOfType([$.default.arrayOf($.default.number),$.default.string,$.default.func]),nodeCanvasObjectMode:$.default.oneOfType([$.default.string,$.default.func]),nodeCanvasObject:$.default.func,nodePointerAreaPaint:$.default.func,linkCanvasObjectMode:$.default.oneOfType([$.default.string,$.default.func]),linkCanvasObject:$.default.func,linkPointerAreaPaint:$.default.func,linkDirectionalParticleCanvasObject:$.default.func,autoPauseRedraw:$.default.bool,minZoom:$.default.number,maxZoom:$.default.number,enableZoomInteraction:$.default.oneOfType([$.default.bool,$.default.func]),enablePanInteraction:$.default.oneOfType([$.default.bool,$.default.func]),onZoom:$.default.func,onZoomEnd:$.default.func,onRenderFramePre:$.default.func,onRenderFramePost:$.default.func});Object.assign({},zf,Bf,Vf,{enableNavigationControls:$.default.bool,controlType:$.default.oneOf([`trackball`,`orbit`,`fly`]),rendererConfig:$.default.object,extraRenderers:$.default.arrayOf($.default.shape({render:$.default.func.isRequired}))}),Object.assign({},zf,Vf,{nodeDesc:$.default.oneOfType([$.default.string,$.default.func]),linkDesc:$.default.oneOfType([$.default.string,$.default.func])}),Object.assign({},zf,Vf,{markerAttrs:$.default.object,yOffset:$.default.number,glScale:$.default.number});var Uf=Pe(If,{methodNames:[`emitParticle`,`d3Force`,`d3ReheatSimulation`,`stopAnimation`,`pauseAnimation`,`resumeAnimation`,`centerAt`,`zoom`,`zoomToFit`,`getGraphBbox`,`screen2GraphCoords`,`graph2ScreenCoords`]});Uf.displayName=`ForceGraph2D`,Uf.propTypes=Hf;var Wf=/(?:\s+[—–|]\s+|:\s+)/;function Gf(e){let n=new Map;for(let r of e){let e=ep(r.label||r.id),i=Xf(e),a=Qf(r.kind===`doc`?r.docName??r.id:r.url??r.id),o=Zf(i),s=o?Qf(i):i,c=o?[]:Yf(i),l=c.length>1?c[0]??null:null,u=c.length>1?c.at(-1)??null:null;n.set(r.id,{fullLabel:e,leadLabel:l&&l!==s&&l!==u?l:null,pathLabel:a,primaryLabel:s,topicLabel:u&&u!==s?u:null})}return n}function Kf(e,n,r){if(!e)return``;let i=e=>r(e)<=n;for(let n of tp([e.primaryLabel,e.topicLabel]))if(i(n))return n;for(let i of tp([e.topicLabel,e.primaryLabel])){let e=qf(i,n,r);if(e)return e}if(e.leadLabel&&i(e.leadLabel))return e.leadLabel;if(e.leadLabel){let i=qf(e.leadLabel,n,r);if(i)return i}return i(e.pathLabel)?e.pathLabel:qf(e.pathLabel,n,r)||e.pathLabel}function qf(e,n,r){if(!e)return``;if(r(e)<=n)return e;let i=e.split(/\s+/).filter(Boolean),a=tp([i.length>=3?`${i.slice(0,2).join(` `)} ... ${i.at(-1)??``}`:void 0,i.length>=2?`${i[0]} ... ${i.at(-1)??``}`:void 0]);for(let e of a)if(r(e)<=n)return e;return Jf(e,n,r)}function Jf(e,n,r){if(r(`...`)>n)return``;let i=1,a=Math.max(1,Math.floor((e.length-3)/2)),o=``;for(;i<=a;){let s=Math.floor((i+a)/2),c=`${e.slice(0,s)}...${e.slice(-s)}`;r(c)<=n?(o=c,i=s+1):a=s-1}if(o)return o;let s=`${e[0]??``}...`;return r(s)<=n?s:`...`}function Yf(e){return ep(e).split(Wf).map(e=>ep(e)).filter(Boolean)}function Xf(e){let n=ep(e);for(;;){let e=n.replace(/\s*\([^()]*\)\s*$/,``).trim();if(!e||e===n)return n;n=e}}function Zf(e){let n=(e.match(/\//g)??[]).length,r=(e.match(/\s/g)??[]).length;return n>0&&(r===0||n*3>r)}function Qf(e){let n=e.split(`/`).map(e=>e.trim()).filter(Boolean);return n.length===0?e:n.length===1?$f(n[0]):n.slice(-2).map($f).join(` / `)}function $f(e){if(e.length<=24)return e;let n=e.split(`-`).filter(Boolean);if(n.length>=4){let e=[...n];for(;e.length>2&&/^\d+$/.test(e[0]);)e.shift();if(e.length>=2)return e.slice(-3).join(`-`)}return e.length<=24?e:`${e.slice(0,10)}...${e.slice(-10)}`}function ep(e){return e.replace(/\s+/g,` `).trim()}function tp(e){let n=new Set;for(let r of e)r&&n.add(r);return[...n]}var np=8,rp=10,ip=4,ap=6,op=4,sp=rp+op*2,cp=2,lp=.001;function up(e){let{nodes:n,links:r,activeDocName:i,viewport:a,maxLabels:o,maxLabelWidthPx:s,labelDescriptors:c,measureTextWidthPx:l,projectToScreen:u,getNodeRadiusPx:d}=e;if(o<=0||a.width<=0||a.height<=0||n.length===0)return[];let f=dp(r),p=a.width/2,m=a.height/2,h=n.flatMap(e=>{if(typeof e.x!=`number`||typeof e.y!=`number`)return[];let n=u(e.x,e.y);return[{node:e,screenX:n.x,screenY:n.y,radiusPx:d(e)}]}),g=h.map(e=>{let n=Kf(c.get(e.node.id),s,l);if(!n)return null;let r=l(n);return r<=0?null:{...e,text:n,textWidthPx:r,isActive:e.node.id===i,degree:f.get(e.node.id)??0,distanceToCenterPx:Math.hypot(e.screenX-p,e.screenY-m)}}).filter(e=>e!==null);g.sort(pp);let _=[],v=[];for(let e=0;e<g.length&&!(_.length>=o);e+=1){let n=g[e],r=mp(n,{priority:g.length-e,viewport:a,acceptedRects:v,positionedNodes:h});r&&(_.push(r),v.push(r.rect))}return _}function dp(e){let n=new Map;for(let r of e){let e=fp(r.source),i=fp(r.target);e&&n.set(e,(n.get(e)??0)+1),i&&n.set(i,(n.get(i)??0)+1)}return n}function fp(e){return typeof e==`string`?e:typeof e?.id==`string`?e.id:typeof e?.id==`number`?String(e.id):null}function pp(e,n){return e.isActive===n.isActive?Math.abs(e.distanceToCenterPx-n.distanceToCenterPx)>lp?e.distanceToCenterPx-n.distanceToCenterPx:e.degree===n.degree?e.text.length===n.text.length?e.node.id.localeCompare(n.node.id):e.text.length-n.text.length:n.degree-e.degree:e.isActive?-1:1}function mp(e,{priority:n,viewport:r,acceptedRects:i,positionedNodes:a}){for(let o of[`bottom`,`top`,`right`,`left`]){let s=hp(e,o,n);if(gp(s.rect,r)&&!i.some(e=>_p(e,s.rect))&&!a.some(n=>n.node.id!==e.node.id&&vp(s.rect,{x:n.screenX,y:n.screenY,radius:n.radiusPx+cp})))return s}return null}function hp(e,n,r){let i=e.textWidthPx+ap*2,a=i/2,o=sp/2,s=e.screenX-a,c=e.screenY+e.radiusPx+ip;return n===`top`?c=e.screenY-e.radiusPx-ip-sp:n===`right`?(s=e.screenX+e.radiusPx+ip,c=e.screenY-o):n===`left`&&(s=e.screenX-e.radiusPx-ip-i,c=e.screenY-o),{nodeId:e.node.id,text:e.text,anchor:n,priority:r,isActive:e.isActive,rect:{left:s,top:c,right:s+i,bottom:c+sp},textX:s+a,textY:c+op}}function gp(e,n){return e.left>=np&&e.top>=np&&e.right<=n.width-np&&e.bottom<=n.height-np}function _p(e,n){return!(e.right<=n.left||e.left>=n.right||e.bottom<=n.top||e.top>=n.bottom)}function vp(e,n){let r=yp(n.x,e.left,e.right),i=yp(n.y,e.top,e.bottom);return Math.hypot(n.x-r,n.y-i)<n.radius}function yp(e,n,r){return Math.min(r,Math.max(n,e))}var bp=5,xp=7,Sp=8;function Cp(e){if(e.kind===`external`)return e.url;let n=e.label??e.id;if(!(e.cluster||e.category||e.tags&&e.tags.length>0))return n;let r=[`<div style="font-weight:600;font-size:14px;color:#f1f5f9;margin-bottom:8px;padding-bottom:6px;border-bottom:1px solid rgba(148,163,184,0.3)">${wp(n)}</div>`];return e.cluster&&r.push(`<div style="font-size:12.5px;color:#f1f5f9;margin-bottom:2px"><span style="color:#cbd5e1">cluster:</span> ${wp(e.cluster)}</div>`),e.category&&r.push(`<div style="font-size:12.5px;color:#f1f5f9;margin-bottom:2px"><span style="color:#cbd5e1">category:</span> ${wp(e.category)}</div>`),e.tags&&e.tags.length>0&&r.push(`<div style="font-size:12.5px;color:#f1f5f9"><span style="color:#cbd5e1">tags:</span> ${e.tags.map(wp).join(`, `)}</div>`),r.join(``)}function wp(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`)}function Tp(e,{activeDocName:n,selectedNodeId:r}){let i=r!==null&&e.id===r;if(e.kind===`external`)return i?`external-selected`:`external`;let a=e.docName===n;return a&&i?`active-selected`:a?`active`:i?`selected`:`default`}function Ep(e){return e===`active`||e===`active-selected`?Sp:e===`selected`||e===`external-selected`?xp:bp}function Dp(e,n){let r=Ep(e);return e===`active`||e===`selected`||e===`active-selected`||e===`external-selected`?r+2/Math.max(n,.01):r}function Op(e){return f(e.docName,e.anchor)}function kp(e,n){return e.kind===`external`?n===`select`?{kind:`select`,selection:{kind:`external`,id:e.id,label:e.label,url:e.url}}:{kind:`external`,url:e.url}:n===`select`?{kind:`select`,selection:{kind:`doc`,id:e.id,docName:e.docName,label:e.label,anchor:e.anchor??null}}:{kind:`navigate`,hash:Op({docName:e.docName,label:e.label,anchor:e.anchor??null})}}var Ap=350,jp=120,Mp=18,Np=28,Pp=5;function Fp({nodes:e,activeDocName:n}){let r=e.find(e=>e.kind===`doc`&&e.docName===n);return typeof r?.x!=`number`||typeof r?.y!=`number`?null:{x:r.x,y:r.y}}function Ip({fg:e,coords:n,dimensions:r}){if(!e||!n||r.width<=0||r.height<=0)return!1;let i=e.graph2ScreenCoords(n.x,n.y);return Math.hypot(i.x-r.width/2,i.y-r.height/2)>=Np}function Lp({fg:e,nodes:n,activeDocName:r,zoom:i,focusKey:a,focusState:o,force:s=!1,durationMs:c=Ap}){let l=Date.now(),u=o;if(u.key!==a)u={key:a,lastX:null,lastY:null,lastAt:0};else if(!s&&l-u.lastAt<jp)return u;let d=Fp({nodes:n,activeDocName:r});if(!d)return u;let f=u.lastX===null||u.lastY===null?1/0:Math.hypot(d.x-u.lastX,d.y-u.lastY);return!s&&f<Mp&&u.lastAt!==0?{...u,lastAt:l}:e?(e.centerAt(d.x,d.y,c),Math.abs(e.zoom()-i)>.01&&e.zoom(i,c),{key:a,lastX:d.x,lastY:d.y,lastAt:l}):u}function Rp({ctx:e,placements:n,labelColor:r,chipColor:i,chipBorderColor:a}){e.textAlign=`center`,e.textBaseline=`top`;for(let o of n){let n=o.rect.right-o.rect.left,s=o.rect.bottom-o.rect.top;e.fillStyle=i,e.fillRect(o.rect.left,o.rect.top,n,s),e.strokeStyle=a,e.lineWidth=1,e.strokeRect(o.rect.left,o.rect.top,n,s),e.fillStyle=r,e.fillText(o.text,o.textX,o.textY)}}function zp({node:e,fg:n,activeDocName:r,selectedNodeId:i,globalScale:a}){if(typeof e.x!=`number`||typeof e.y!=`number`)return null;let o=Tp(e,{activeDocName:r,selectedNodeId:i}),s=n.graph2ScreenCoords(e.x,e.y);return{x:s.x,y:s.y,radiusPx:Dp(o,a)*a,state:o}}function Bp({clientX:e,clientY:n,container:r}){let i=r.getBoundingClientRect();return{x:e-i.left,y:n-i.top}}function Vp({point:e,fg:n,nodes:r,activeDocName:i,selectedNodeId:a}){let o=n.zoom(),s=null;for(let c of r){let r=zp({node:c,fg:n,activeDocName:i,selectedNodeId:a,globalScale:o});if(!r)continue;let l=Math.hypot(e.x-r.x,e.y-r.y);l>r.radiusPx||s!==null&&l>=s.distance||(s={node:c,distance:l})}return s?.node??null}function Hp(e,n){return e===void 0||typeof e==`string`||typeof e==`number`||typeof e.x!=`number`||typeof e.y!=`number`?null:n.graph2ScreenCoords(e.x,e.y)}function Up({point:e,start:n,end:r}){let i=r.x-n.x,a=r.y-n.y;if(i===0&&a===0)return Math.hypot(e.x-n.x,e.y-n.y);let o=Math.max(0,Math.min(1,((e.x-n.x)*i+(e.y-n.y)*a)/(i*i+a*a))),s=n.x+o*i,c=n.y+o*a;return Math.hypot(e.x-s,e.y-c)}function Wp({point:e,fg:n,links:r}){return r.some(r=>{let i=Hp(r.source,n),a=Hp(r.target,n);return!i||!a?!1:Up({point:e,start:i,end:a})<=6})}function Gp({node:e,docClickBehavior:n,onSelectNode:r}){let i=kp(e,n);if(i.kind===`external`){window.open(i.url,`_blank`,`noopener,noreferrer`);return}if(i.kind===`navigate`){window.location.assign(i.hash);return}r?.(i.selection)}function Kp({target:e,docClickBehavior:n,selectedNodeId:r,onSelectNode:i,onBackgroundClick:a}){if(e.kind===`background`||e.kind===`link`){a?.();return}if(n===`select`&&r!==null&&e.node.id===r){a?.();return}Gp({node:e.node,docClickBehavior:n,onSelectNode:i})}function qp(e){let n=(0,se.c)(113),{activeDocName:i,selectedNodeId:a,isFullscreen:o,showUrlNodes:s,className:c,docClickBehavior:u,onSelectNode:p,onBackgroundClick:h,onStatsChange:g,onClustersChange:_}=e,v=a===void 0?null:a,y=o===void 0?!1:o,b=s===void 0?!0:s,x=c===void 0?``:c,S=u===void 0?`navigate`:u,C;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(C={nodes:[],links:[]},n[0]=C):C=n[0];let[w,T]=(0,D.useState)(C),E;n[1]===Symbol.for(`react.memo_cache_sentinel`)?(E={nodes:``,links:``},n[1]=E):E=n[1];let[te,ne]=(0,D.useState)(E),re;n[2]===Symbol.for(`react.memo_cache_sentinel`)?(re={nodes:``,links:``},n[2]=re):re=n[2];let ie=(0,D.useRef)(re),[ae,oe]=(0,D.useState)(!0),[ce,le]=(0,D.useState)(null),ue=(0,D.useRef)(null),fe=(0,D.useRef)(void 0),pe;n[3]===Symbol.for(`react.memo_cache_sentinel`)?(pe={key:``,lastX:null,lastY:null,lastAt:0},n[3]=pe):pe=n[3];let me=(0,D.useRef)(pe),he=(0,D.useRef)(null),ge=(0,D.useRef)(!1),_e;n[4]===Symbol.for(`react.memo_cache_sentinel`)?(_e={width:320,height:400},n[4]=_e):_e=n[4];let[ve,ye]=(0,D.useState)(_e),{resolvedTheme:be}=d(),{folderPaths:k,loading:A,pages:xe}=m(),Se,j;n[5]!==i||n[6]!==y?(Se=()=>{let e=!1,n=async function(){try{let n=new URLSearchParams;!y&&i&&(n.set(`docName`,i),n.set(`degrees`,`2`));let r=n.size>0?`/api/link-graph?${n.toString()}`:`/api/link-graph`,a=await fetch(r);if(!a.ok){if(e)return;le(`Server error: ${a.status}`),oe(!1);return}let o=await a.json();if(e)return;if(!o.ok){le(o.error??`Failed to load graph`),oe(!1);return}let s=o.nodes??[],c=o.links??[],l=s.map(em).join(`,`),u=c.map($p).join(`,`);(l!==ie.current.nodes||u!==ie.current.links)&&(ie.current={nodes:l,links:u},ne({nodes:l,links:u}),T({nodes:s,links:c})),le(null),oe(!1)}catch(n){let r=n;if(e)return;le(r instanceof Error?r.message:`Failed to load graph`),oe(!1)}};oe(!0),n();let r=()=>{document.visibilityState===`visible`&&n()};window.addEventListener(`focus`,r),window.addEventListener(`visibilitychange`,r);let a=l(e=>{(e.includes(`files`)||e.includes(`graph`))&&n()});return()=>{e=!0,window.removeEventListener(`focus`,r),window.removeEventListener(`visibilitychange`,r),a()}},j=[i,y],n[5]=i,n[6]=y,n[7]=Se,n[8]=j):(Se=n[7],j=n[8]),(0,D.useEffect)(Se,j);let Ce,we;n[9]===Symbol.for(`react.memo_cache_sentinel`)?(Ce=()=>{let e=ue.current;if(!e)return;let n=new ResizeObserver(e=>{let[n]=e,{width:r,height:i}=n.contentRect;r>0&&i>0&&ye({width:Math.floor(r),height:Math.floor(i)})});return n.observe(e),()=>n.disconnect()},we=[],n[9]=Ce,n[10]=we):(Ce=n[9],we=n[10]),(0,D.useEffect)(Ce,we);let M=be===`dark`,Te=M?`hsl(0 0% 4%)`:`hsl(0 0% 100%)`,Ee=M?`#6b7280`:`#9ca3af`,De=M?`#69a3ff`:`#3784ff`,Oe=M?`#34d399`:`#059669`,ke=M?`#c084fc`:`#7c3aed`,Ae=M?`#f59e0b`:`#c2410c`,je=M?`#a78bfa`:`#7c3aed`,Me=M?`rgba(75,85,99,0.6)`:`rgba(209,213,219,0.8)`,Ne=M?`#f3f4f6`:`#111827`,Pe=M?`rgba(105,163,255,0.45)`:`rgba(55,132,255,0.3)`,Fe=M?`rgba(167,139,250,0.38)`:`rgba(124,58,237,0.22)`,Ie=M?`rgba(52,211,153,0.5)`:`rgba(5,150,105,0.3)`,Le=M?`rgba(192,132,252,0.5)`:`rgba(124,58,237,0.35)`,Re=M?`rgba(3,7,18,0.92)`:`rgba(255,255,255,0.94)`,ze=M?`rgba(243,244,246,0.08)`:`rgba(17,24,39,0.08)`,N=y?1.6:2.35,Be=y?220:150,P=y?10:18,F,I,Ve;n[11]!==w.links||n[12]!==w.nodes||n[13]!==b?(I=b?null:new Set(w.nodes.filter(Qp).map(Zp)),F=I?w.nodes.filter(Xp):w.nodes,Ve=I?w.links.filter(e=>{let n=e.source,r=e.target,i=typeof n==`string`?n:typeof n==`object`&&n&&`id`in n?String(n.id):``,a=typeof r==`string`?r:typeof r==`object`&&r&&`id`in r?String(r.id):``;return!I.has(i)&&!I.has(a)}):w.links,n[11]=w.links,n[12]=w.nodes,n[13]=b,n[14]=F,n[15]=I,n[16]=Ve):(F=n[14],I=n[15],Ve=n[16]);let He=Ve,Ue;n[17]!==He||n[18]!==F||n[19]!==I||n[20]!==w?(Ue=I?{nodes:F,links:He}:w,n[17]=He,n[18]=F,n[19]=I,n[20]=w,n[21]=Ue):Ue=n[21];let L=Ue,We=L.nodes,Ge=L.links,Ke;n[22]===L.nodes?Ke=n[23]:(Ke=Gf(L.nodes),n[22]=L.nodes,n[23]=Ke);let qe=Ke,Je=`${i}|${N}|${te.nodes}|${te.links}`,Ye;if(n[24]!==k||n[25]!==w.nodes||n[26]!==A||n[27]!==xe){let e;n[29]!==k||n[30]!==A||n[31]!==xe?(e=e=>{if(e.kind!==`doc`)return[];let n=A?{displayState:`doc`,hashDocName:e.docName}:ee(e.docName,{pages:xe,folderPaths:k});return[[e.id,n]]},n[29]=k,n[30]=A,n[31]=xe,n[32]=e):e=n[32],Ye=new Map(w.nodes.flatMap(e)),n[24]=k,n[25]=w.nodes,n[26]=A,n[27]=xe,n[28]=Ye}else Ye=n[28];let Xe=Ye,Ze;n[33]!==L.links||n[34]!==L.nodes||n[35]!==ae||n[36]!==g?(Ze=()=>{g?.(L.nodes.length,L.links.length,ae)},n[33]=L.links,n[34]=L.nodes,n[35]=ae,n[36]=g,n[37]=Ze):Ze=n[37];let Qe;n[38]!==L||n[39]!==ae||n[40]!==g?(Qe=[L,ae,g],n[38]=L,n[39]=ae,n[40]=g,n[41]=Qe):Qe=n[41],(0,D.useEffect)(Ze,Qe);let $e;n[42]!==w.nodes||n[43]!==_?($e=()=>{if(!_)return;let e=new Set;for(let n of w.nodes)n.kind===`doc`&&n.cluster&&e.add(n.cluster);_(Array.from(e).sort())},n[42]=w.nodes,n[43]=_,n[44]=$e):$e=n[44];let et;n[45]!==w||n[46]!==_?(et=[w,_],n[45]=w,n[46]=_,n[47]=et):et=n[47],(0,D.useEffect)($e,et);let tt,nt;n[48]!==i||n[49]!==Je||n[50]!==N||n[51]!==w.nodes?(tt=()=>{me.current={key:Je,lastX:null,lastY:null,lastAt:0};let e=window.requestAnimationFrame(()=>{me.current=Lp({fg:fe.current,nodes:w.nodes,activeDocName:i,zoom:N,focusKey:Je,focusState:me.current,force:!0})});return()=>window.cancelAnimationFrame(e)},nt=[Je,i,N,w.nodes],n[48]=i,n[49]=Je,n[50]=N,n[51]=w.nodes,n[52]=tt,n[53]=nt):(tt=n[52],nt=n[53]),(0,D.useEffect)(tt,nt);let rt,it;n[54]!==i||n[55]!==L.links||n[56]!==L.nodes||n[57]!==S||n[58]!==h||n[59]!==p||n[60]!==v?(rt=()=>{},it=[i,S,L.links,L.nodes,h,p,v],n[54]=i,n[55]=L.links,n[56]=L.nodes,n[57]=S,n[58]=h,n[59]=p,n[60]=v,n[61]=rt,n[62]=it):(rt=n[61],it=n[62]),(0,D.useEffect)(rt,it);let at;n[63]===x?at=n[64]:(at=r(`h-full min-h-0 overflow-hidden`,x),n[63]=x,n[64]=at);let ot;n[65]===Symbol.for(`react.memo_cache_sentinel`)?(ot=()=>{he.current=null},n[65]=ot):ot=n[65];let st;n[66]!==i||n[67]!==L.links||n[68]!==L.nodes||n[69]!==v?(st=e=>{if(!e.isPrimary||e.button!==0){he.current=null;return}he.current={pointerId:e.pointerId,clientX:e.clientX,clientY:e.clientY,target:(()=>{let n=ue.current,r=fe.current;if(!n||!r)return{kind:`background`};let a=Bp({clientX:e.clientX,clientY:e.clientY,container:n}),o=Vp({point:a,fg:r,nodes:L.nodes,activeDocName:i,selectedNodeId:v});return o?{kind:`node`,node:o}:Wp({point:a,fg:r,links:L.links})?{kind:`link`}:{kind:`background`}})()}},n[66]=i,n[67]=L.links,n[68]=L.nodes,n[69]=v,n[70]=st):st=n[70];let ct;n[71]!==S||n[72]!==h||n[73]!==p||n[74]!==v?(ct=e=>{if(!e.isPrimary||e.button!==0){he.current=null;return}let n=he.current;he.current=null,!(!n||n.pointerId!==e.pointerId)&&(Math.hypot(e.clientX-n.clientX,e.clientY-n.clientY)>Pp||Kp({target:n.target,docClickBehavior:S,selectedNodeId:v,onSelectNode:p,onBackgroundClick:h}))},n[71]=S,n[72]=h,n[73]=p,n[74]=v,n[75]=ct):ct=n[75];let lt;n[76]!==i||n[77]!==De||n[78]!==Pe||n[79]!==ke||n[80]!==Le||n[81]!==Te||n[82]!==Ee||n[83]!==ve||n[84]!==L||n[85]!==Me||n[86]!==ce||n[87]!==Ae||n[88]!==Je||n[89]!==N||n[90]!==je||n[91]!==Fe||n[92]!==w.nodes||n[93]!==M||n[94]!==ze||n[95]!==Re||n[96]!==Ne||n[97]!==qe||n[98]!==Ge||n[99]!==We||n[100]!==ae||n[101]!==Be||n[102]!==P||n[103]!==Xe||n[104]!==Oe||n[105]!==v||n[106]!==Ie?(lt=ce?(0,O.jsx)(`p`,{className:`p-4 text-sm text-destructive`,children:ce}):L.nodes.length===0&&!ae?(0,O.jsx)(`p`,{className:`p-4 text-sm text-muted-foreground`,children:`No links yet. Add wiki links or markdown links to build a graph.`}):(0,O.jsx)(`div`,{className:`h-full min-h-0`,role:`img`,"aria-label":`Graph visualization of document links`,children:(0,O.jsx)(Uf,{ref:fe,graphData:L,cooldownTicks:150,onEngineTick:()=>{ge.current=!1,me.current=Lp({fg:fe.current,nodes:w.nodes,activeDocName:i,zoom:N,focusKey:Je,focusState:me.current})},onEngineStop:()=>{ge.current=!0;let e=Fp({nodes:w.nodes,activeDocName:i});Ip({fg:fe.current,coords:e,dimensions:ve})&&(me.current=Lp({fg:fe.current,nodes:w.nodes,activeDocName:i,zoom:N,focusKey:Je,focusState:me.current,force:!0}))},width:ve.width,height:ve.height,backgroundColor:Te,nodeId:`id`,nodeLabel:e=>{let n=Cp(e);return e.kind===`doc`&&Xe.get(e.id)?.displayState===`folder`?`Folder: ${n}`:n},nodeRelSize:4,nodeVal:e=>{let n=Tp(e,{activeDocName:i,selectedNodeId:v});return n===`active-selected`?20:n===`active`?18:n===`selected`||n===`external-selected`?12:6},nodeCanvasObjectMode:Yp,nodeCanvasObject:(e,n,r)=>{if(typeof e.x!=`number`||typeof e.y!=`number`)return;let a=Tp(e,{activeDocName:i,selectedNodeId:v}),o=e.kind===`doc`&&Xe.get(e.id)?.displayState===`folder`,s=Ep(a),c=Dp(a,r),l=e.kind===`doc`?e.cluster:void 0,u=l?de(l,M):Ee;n.beginPath(),n.arc(e.x,e.y,s,0,2*Math.PI,!1),n.fillStyle=a===`active`?De:a===`selected`?Oe:a===`active-selected`?ke:a===`external`||a===`external-selected`?Ae:o?je:u,n.fill(),c>s?(n.beginPath(),n.arc(e.x,e.y,c,0,2*Math.PI,!1),n.strokeStyle=a===`active`?Pe:a===`selected`||a===`external-selected`?Ie:Le,n.lineWidth=2/r,n.stroke()):o&&(n.beginPath(),n.arc(e.x,e.y,s+2/r,0,2*Math.PI,!1),n.strokeStyle=Fe,n.lineWidth=1.5/r,n.stroke())},nodePointerAreaPaint:(e,n,r,a)=>{if(typeof e.x!=`number`||typeof e.y!=`number`)return;let o=Tp(e,{activeDocName:i,selectedNodeId:v});r.beginPath(),r.arc(e.x,e.y,Dp(o,a),0,2*Math.PI,!1),r.fillStyle=n,r.fill()},onRenderFramePost:(e,n)=>{if(n<1.8)return;let r=fe.current;if(!r)return;e.save();let a=window.devicePixelRatio||1;e.setTransform(a,0,0,a,0,0),e.font=`10px system-ui, sans-serif`,Rp({ctx:e,placements:up({nodes:We,links:Ge,activeDocName:i,viewport:ve,maxLabels:P,maxLabelWidthPx:Be,labelDescriptors:qe,measureTextWidthPx:n=>e.measureText(n).width,projectToScreen:(e,n)=>r.graph2ScreenCoords(e,n),getNodeRadiusPx:e=>Dp(Tp(e,{activeDocName:i,selectedNodeId:v}),n)*n+4}),labelColor:Ne,chipColor:Re,chipBorderColor:ze}),e.restore()},linkColor:()=>Me,linkDirectionalArrowLength:3,linkDirectionalArrowRelPos:1,linkWidth:1,showPointerCursor:Jp,onNodeClick:e=>{if(e.kind===`external`){window.open(e.url,`_blank`,`noopener,noreferrer`);return}if(e.docName){let n=Xe.get(e.id);window.location.assign(f(n?.hashDocName??e.docName,e.anchor??null))}}})}),n[76]=i,n[77]=De,n[78]=Pe,n[79]=ke,n[80]=Le,n[81]=Te,n[82]=Ee,n[83]=ve,n[84]=L,n[85]=Me,n[86]=ce,n[87]=Ae,n[88]=Je,n[89]=N,n[90]=je,n[91]=Fe,n[92]=w.nodes,n[93]=M,n[94]=ze,n[95]=Re,n[96]=Ne,n[97]=qe,n[98]=Ge,n[99]=We,n[100]=ae,n[101]=Be,n[102]=P,n[103]=Xe,n[104]=Oe,n[105]=v,n[106]=Ie,n[107]=lt):lt=n[107];let ut;return n[108]!==at||n[109]!==st||n[110]!==ct||n[111]!==lt?(ut=(0,O.jsx)(`div`,{ref:ue,className:at,onPointerCancel:ot,onPointerDownCapture:st,onPointerUpCapture:ct,children:lt}),n[108]=at,n[109]=st,n[110]=ct,n[111]=lt,n[112]=ut):ut=n[112],ut}function Jp(e){return!!(e&&`kind`in e)}function Yp(){return`replace`}function Xp(e){return e.kind!==`external`}function Zp(e){return e.id}function Qp(e){return e.kind===`external`}function $p(e){return`${e.source}>${e.target}`}function em(e){return`${e.id}:${e.label}`}var tm=50,nm=`ok-graph-docked-url-nodes-v1`,rm=`ok-graph-fullscreen-url-nodes-v1`;function im(e){if(typeof window>`u`)return!1;try{return window.localStorage.getItem(e)===`true`}catch{return!1}}function am(e,n){if(!(typeof window>`u`))try{n?window.localStorage.setItem(e,`true`):window.localStorage.removeItem(e)}catch{}}var om={explore:`Explore`,orphans:`Orphans`,hubs:`Hubs`},sm={incoming:`No Incoming`,outgoing:`No Outgoing`,both:`Both`};async function cm(e){let n=await fetch(`/api/orphans?mode=${encodeURIComponent(e)}`);if(!n.ok)throw Error(`Server error: ${n.status} ${n.statusText}`);let r=await n.json();if(!r.ok)throw Error(r.error??`Failed to load orphan pages`);return r.orphans??[]}async function lm(e){let n=await fetch(`/api/hubs?limit=${encodeURIComponent(String(e))}`);if(!n.ok)throw Error(`Server error: ${n.status} ${n.statusText}`);let r=await n.json();if(!r.ok)throw Error(r.error??`Failed to load hub pages`);return r.hubs??[]}function um(e){window.location.assign(f(e))}async function dm(){if(bm())try{await(document.exitFullscreen?.()??document.webkitExitFullscreen?.())}catch{}}function fm(e){return e===`incoming`?`Project-level pages with no incoming graph edges.`:e===`outgoing`?`Project-level pages with no outgoing graph edges.`:`Project-level pages with neither incoming nor outgoing graph edges.`}function pm(e){return e===`incoming`?`No pages are missing incoming graph links.`:e===`outgoing`?`No pages are missing outgoing graph links.`:`No disconnected pages. Pages appear here only when they have no incoming and no outgoing graph edges.`}function mm(n){let r=(0,se.c)(29),{mode:a,onModeChange:c}=n,l;r[0]===a?l=r[1]:(l={queryKey:[`orphans`,a],queryFn:()=>cm(a)},r[0]=a,r[1]=l);let{data:u,isLoading:d,error:f}=o(l),m;r[2]===u?m=r[3]:(m=u===void 0?[]:u,r[2]=u,r[3]=m);let g=m,_;r[4]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,O.jsx)(`p`,{className:`text-sm font-medium`,children:`Project-level disconnected pages`}),r[4]=_):_=r[4];let v;r[5]===a?v=r[6]:(v=fm(a),r[5]=a,r[6]=v);let y;r[7]===v?y=r[8]:(y=(0,O.jsxs)(`div`,{className:`space-y-1`,children:[_,(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:v})]}),r[7]=v,r[8]=y);let b;r[9]===c?b=r[10]:(b=n=>{n&&e(n)&&c(n)},r[9]=c,r[10]=b);let x;r[11]===Symbol.for(`react.memo_cache_sentinel`)?(x=i.map(gm),r[11]=x):x=r[11];let S;r[12]!==a||r[13]!==b?(S=(0,O.jsx)(ne,{type:`single`,size:`sm`,variant:`outline`,value:a,"aria-label":`Orphan mode`,onValueChange:b,children:x}),r[12]=a,r[13]=b,r[14]=S):S=r[14];let C;r[15]!==y||r[16]!==S?(C=(0,O.jsx)(`div`,{className:`border-b border-border/60 px-4 py-3`,children:(0,O.jsxs)(`div`,{className:`flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between`,children:[y,S]})}),r[15]=y,r[16]=S,r[17]=C):C=r[17];let w;r[18]!==f||r[19]!==d||r[20]!==a||r[21]!==g?(w=f?(0,O.jsx)(s,{children:f instanceof Error?f.message:`Failed to load orphan pages`}):g.length===0&&!d?(0,O.jsx)(p,{children:pm(a)}):(0,O.jsx)(`div`,{className:`flex flex-col gap-2`,children:g.map(hm)}),r[18]=f,r[19]=d,r[20]=a,r[21]=g,r[22]=w):w=r[22];let T;r[23]!==d||r[24]!==w?(T=(0,O.jsx)(h,{"aria-busy":d,children:w}),r[23]=d,r[24]=w,r[25]=T):T=r[25];let E;return r[26]!==C||r[27]!==T?(E=(0,O.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[C,T]}),r[26]=C,r[27]=T,r[28]=E):E=r[28],E}function hm(e){return(0,O.jsxs)(`button`,{type:`button`,className:`block w-full rounded-lg border border-border bg-background/80 px-3 py-2 text-left transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,onClick:()=>um(e.docName),children:[(0,O.jsx)(`div`,{className:`truncate text-sm font-medium`,children:e.title}),(0,O.jsx)(`div`,{className:`truncate text-xs text-muted-foreground`,children:e.docName})]},e.docName)}function gm(e){return(0,O.jsx)(E,{value:e,children:sm[e]},e)}function _m(){let e=(0,se.c)(11),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={queryKey:[`hubs`,tm],queryFn:ym},e[0]=n):n=e[0];let{data:r,isLoading:i,error:a}=o(n),c;e[1]===r?c=e[2]:(c=r===void 0?[]:r,e[1]=r,e[2]=c);let l=c,u;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,O.jsx)(`div`,{className:`border-b border-border/60 px-4 py-3`,children:(0,O.jsxs)(`div`,{className:`space-y-1`,children:[(0,O.jsx)(`p`,{className:`text-sm font-medium`,children:`Top linked pages`}),(0,O.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Project-level pages ordered by inbound link count, up to `,tm,` results.`]})]})}),e[3]=u):u=e[3];let d;e[4]!==a||e[5]!==l||e[6]!==i?(d=a?(0,O.jsx)(s,{children:a instanceof Error?a.message:`Failed to load hub pages`}):l.length===0&&!i?(0,O.jsx)(p,{children:`No hub pages yet. Hubs appear once pages accumulate inbound graph links.`}):(0,O.jsx)(`div`,{className:`flex flex-col gap-2`,children:l.map(vm)}),e[4]=a,e[5]=l,e[6]=i,e[7]=d):d=e[7];let f;return e[8]!==i||e[9]!==d?(f=(0,O.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[u,(0,O.jsx)(h,{"aria-busy":i,children:d})]}),e[8]=i,e[9]=d,e[10]=f):f=e[10],f}function vm(e){return(0,O.jsx)(`button`,{type:`button`,className:`block w-full rounded-lg border border-border bg-background/80 px-3 py-2 text-left transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,onClick:()=>um(e.docName),children:(0,O.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,O.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,O.jsx)(`div`,{className:`truncate text-sm font-medium`,children:e.title}),(0,O.jsx)(`div`,{className:`truncate text-xs text-muted-foreground`,children:e.docName})]}),(0,O.jsx)(`span`,{className:`rounded-md bg-muted px-2 py-1 text-xs font-mono text-muted-foreground`,children:e.count})]})},e.docName)}function ym(){return lm(tm)}function bm(){return document.fullscreenElement??document.webkitFullscreenElement??null}async function xm(e){if(e)try{bm()?await dm():await(e.requestFullscreen?.()??e.webkitRequestFullscreen?.())}catch{}}function Sm(e){let n=(0,se.c)(86),{activeDocName:r}=e,i=(0,D.useRef)(null),[a,o]=(0,D.useState)(!1),[s,c]=(0,D.useState)(`explore`),[l,u]=(0,D.useState)(`both`),[d,f]=(0,D.useState)(null),[p,m]=(0,D.useState)(null),h;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(h=[],n[0]=h):h=n[0];let[v,S]=(0,D.useState)(h),[E,ee]=(0,D.useState)(Em),[ce,le]=(0,D.useState)(Tm),ue,de;n[1]===Symbol.for(`react.memo_cache_sentinel`)?(ue=()=>{let e=()=>o(bm()===i.current);return document.addEventListener(`fullscreenchange`,e),document.addEventListener(`webkitfullscreenchange`,e),()=>{document.removeEventListener(`fullscreenchange`,e),document.removeEventListener(`webkitfullscreenchange`,e)}},de=[],n[1]=ue,n[2]=de):(ue=n[1],de=n[2]),(0,D.useEffect)(ue,de);let fe,me;n[3]===E?(fe=n[4],me=n[5]):(fe=()=>{am(nm,E)},me=[E],n[3]=E,n[4]=fe,n[5]=me),(0,D.useEffect)(fe,me);let he,ge;n[6]===ce?(he=n[7],ge=n[8]):(he=()=>{am(rm,ce)},ge=[ce],n[6]=ce,n[7]=he,n[8]=ge),(0,D.useEffect)(he,ge);let _e,ve;n[9]!==a||n[10]!==d?(_e=()=>{!a&&d!==null&&f(null)},ve=[a,d],n[9]=a,n[10]=d,n[11]=_e,n[12]=ve):(_e=n[11],ve=n[12]),(0,D.useEffect)(_e,ve);let ye,be;n[13]!==s||n[14]!==d?(ye=()=>{s!==`explore`&&d!==null&&f(null)},be=[s,d],n[13]=s,n[14]=d,n[15]=ye,n[16]=be):(ye=n[15],be=n[16]),(0,D.useEffect)(ye,be);let k=a?s:`explore`,A=a?ce:E,xe=a?le:ee,Se;n[17]!==r||n[18]!==d?(Se=d===null?null:d.kind===`doc`&&d.docName===r?{eyebrow:`Already open`,description:`This document is already active in the editor. Use Open to leave fullscreen.`,Icon:w,actionLabel:`Open`,secondaryLabel:d.docName,onAction:()=>{let e=Op(d);(async()=>{await dm(),window.location.assign(e)})()}}:d.kind===`doc`?{eyebrow:`Selected in graph`,description:`Open this document in the editor and leave fullscreen.`,Icon:re,actionLabel:`Open`,secondaryLabel:d.docName,onAction:()=>{let e=Op(d);(async()=>{await dm(),window.location.assign(e)})()}}:{eyebrow:`Selected in graph`,description:`Open this link in a new tab and leave fullscreen.`,Icon:re,actionLabel:`Open link`,secondaryLabel:d.url,onAction:()=>{window.open(d.url,`_blank`,`noopener,noreferrer`),dm()}},n[17]=r,n[18]=d,n[19]=Se):Se=n[19];let j=Se,Ce=a?`min-h-[100dvh] bg-background`:void 0,we;n[20]===Symbol.for(`react.memo_cache_sentinel`)?(we=(0,O.jsx)(b,{children:`Graph`}),n[20]=we):we=n[20];let M;n[21]!==k||n[22]!==p?(M=k===`explore`&&p?(0,O.jsxs)(`div`,{className:`flex items-center gap-0.5`,children:[(0,O.jsxs)(y,{children:[p.nodes,` nodes`]}),(0,O.jsxs)(y,{children:[p.links,` links`]})]}):null,n[21]=k,n[22]=p,n[23]=M):M=n[23];let Te;n[24]===M?Te=n[25]:(Te=(0,O.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,children:[we,M]}),n[24]=M,n[25]=Te);let Ee;n[26]!==s||n[27]!==a?(Ee=a?(0,O.jsx)(ne,{type:`single`,size:`sm`,variant:`outline`,value:s,"aria-label":`Fullscreen graph mode`,onValueChange:e=>{(e===`explore`||e===`orphans`||e===`hubs`)&&c(e)},children:Object.entries(om).map(wm)}):null,n[26]=s,n[27]=a,n[28]=Ee):Ee=n[28];let De=A?`Hide external URL nodes`:`Show external URL nodes`,Oe;n[29]===xe?Oe=n[30]:(Oe=()=>xe(Cm),n[29]=xe,n[30]=Oe);let ke=A?`size-4 text-sidebar-accent-foreground`:`size-4 text-muted-foreground`,Ae;n[31]===ke?Ae=n[32]:(Ae=(0,O.jsx)(ie,{className:ke}),n[31]=ke,n[32]=Ae);let je;n[33]!==A||n[34]!==De||n[35]!==Oe||n[36]!==Ae?(je=(0,O.jsx)(te,{asChild:!0,children:(0,O.jsx)(_,{variant:`ghost`,size:`icon-sm`,className:`text-muted-foreground hover:text-foreground hover:bg-accent`,"aria-label":De,"aria-pressed":A,onClick:Oe,children:Ae})}),n[33]=A,n[34]=De,n[35]=Oe,n[36]=Ae,n[37]=je):je=n[37];let Me=a?`z-[9999]`:void 0,Ne=A?`Hide external URL nodes`:`Show external URL nodes`,Pe;n[38]!==Me||n[39]!==Ne?(Pe=(0,O.jsx)(C,{side:`bottom`,sideOffset:8,className:Me,children:Ne}),n[38]=Me,n[39]=Ne,n[40]=Pe):Pe=n[40];let Fe;n[41]!==je||n[42]!==Pe?(Fe=(0,O.jsxs)(T,{delayDuration:0,children:[je,Pe]}),n[41]=je,n[42]=Pe,n[43]=Fe):Fe=n[43];let Ie=a?`Exit fullscreen`:`Full screen`,Le;n[44]===Symbol.for(`react.memo_cache_sentinel`)?(Le=()=>void xm(i.current),n[44]=Le):Le=n[44];let Re;n[45]===a?Re=n[46]:(Re=a?(0,O.jsx)(oe,{className:`size-4`}):(0,O.jsx)(ae,{className:`size-4`}),n[45]=a,n[46]=Re);let ze;n[47]!==Ie||n[48]!==Re?(ze=(0,O.jsx)(te,{asChild:!0,children:(0,O.jsx)(_,{variant:`ghost`,size:`icon-sm`,className:`text-muted-foreground hover:text-foreground hover:bg-accent`,"aria-label":Ie,onClick:Le,children:Re})}),n[47]=Ie,n[48]=Re,n[49]=ze):ze=n[49];let N=a?`z-[9999]`:void 0,Be=a?`Exit fullscreen`:`Enter fullscreen`,P;n[50]!==N||n[51]!==Be?(P=(0,O.jsx)(C,{side:`bottom`,sideOffset:8,className:N,children:Be}),n[50]=N,n[51]=Be,n[52]=P):P=n[52];let F;n[53]!==ze||n[54]!==P?(F=(0,O.jsxs)(T,{delayDuration:0,children:[ze,P]}),n[53]=ze,n[54]=P,n[55]=F):F=n[55];let I;n[56]!==Fe||n[57]!==F?(I=(0,O.jsxs)(`div`,{className:`flex items-center gap-0.5`,children:[Fe,F]}),n[56]=Fe,n[57]=F,n[58]=I):I=n[58];let Ve;n[59]!==Ee||n[60]!==I?(Ve=(0,O.jsxs)(`div`,{className:`ml-auto flex items-center gap-2`,children:[Ee,I]}),n[59]=Ee,n[60]=I,n[61]=Ve):Ve=n[61];let He;n[62]!==Te||n[63]!==Ve?(He=(0,O.jsxs)(g,{className:`flex-wrap gap-3`,children:[Te,Ve]}),n[62]=Te,n[63]=Ve,n[64]=He):He=n[64];let Ue;n[65]!==r||n[66]!==k||n[67]!==v||n[68]!==a||n[69]!==d||n[70]!==j||n[71]!==A?(Ue=k===`explore`?(0,O.jsxs)(`div`,{className:`relative flex min-h-0 flex-1 flex-col`,children:[(0,O.jsx)(qp,{activeDocName:r,selectedNodeId:a?d?.id??null:null,isFullscreen:a,showUrlNodes:A,className:`h-full min-h-0`,docClickBehavior:a?`select`:`navigate`,onSelectNode:a?f:void 0,onBackgroundClick:a?()=>{d!==null&&f(null)}:void 0,onStatsChange:(e,n,r)=>{if(r){m(null);return}m({nodes:e,links:n})},onClustersChange:a?S:void 0}),a&&(0,O.jsx)(pe,{clusters:v}),a&&k===`explore`&&d!==null&&j?(0,O.jsx)(`div`,{className:`pointer-events-none absolute inset-x-4 top-4 z-10 flex justify-center`,children:(0,O.jsxs)(`div`,{role:`status`,"aria-label":`Selected graph item`,className:`pointer-events-auto flex w-full max-w-2xl items-center gap-3 rounded-xl border border-border/70 bg-background/95 px-4 py-3 text-sm shadow-lg backdrop-blur supports-[backdrop-filter]:bg-background/85`,children:[(0,O.jsx)(j.Icon,{className:`size-4 shrink-0 text-primary`}),(0,O.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,O.jsx)(`div`,{className:`text-xs font-medium uppercase tracking-wide text-muted-foreground`,children:j.eyebrow}),(0,O.jsx)(`div`,{className:`truncate font-medium text-foreground`,children:d.label}),(0,O.jsx)(`div`,{className:`truncate text-xs text-muted-foreground`,children:j.secondaryLabel}),(0,O.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:j.description})]}),(0,O.jsx)(_,{size:`sm`,className:`shrink-0`,onClick:j.onAction,children:j.actionLabel})]})}):null]}):null,n[65]=r,n[66]=k,n[67]=v,n[68]=a,n[69]=d,n[70]=j,n[71]=A,n[72]=Ue):Ue=n[72];let L;n[73]!==k||n[74]!==a||n[75]!==l?(L=a&&k===`orphans`?(0,O.jsx)(mm,{mode:l,onModeChange:u}):null,n[73]=k,n[74]=a,n[75]=l,n[76]=L):L=n[76];let We;n[77]!==k||n[78]!==a?(We=a&&k===`hubs`?(0,O.jsx)(_m,{}):null,n[77]=k,n[78]=a,n[79]=We):We=n[79];let Ge;return n[80]!==Ce||n[81]!==He||n[82]!==Ue||n[83]!==L||n[84]!==We?(Ge=(0,O.jsxs)(x,{ref:i,className:Ce,children:[He,Ue,L,We]}),n[80]=Ce,n[81]=He,n[82]=Ue,n[83]=L,n[84]=We,n[85]=Ge):Ge=n[85],Ge}function Cm(e){return!e}function wm(e){let[n,r]=e;return(0,O.jsx)(E,{value:n,children:r},n)}function Tm(){return im(rm)}function Em(){return im(nm)}export{Sm as GraphPanel};