claude-code-session-manager 0.62.1 → 0.63.0

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 (45) hide show
  1. package/dist/assets/AgentLibrary-BeJJa_zv.js +1 -0
  2. package/dist/assets/History-mWbqemhZ.js +2 -0
  3. package/dist/assets/Hooks-D_8sciZu.js +3 -0
  4. package/dist/assets/HostBilko-6aUJ7Smz.js +1 -0
  5. package/dist/assets/Library-CG1LDXLw.js +46 -0
  6. package/dist/assets/ListDetail-CIIJOWwI.js +1 -0
  7. package/dist/assets/MarkdownEditor-D0-y8V-f.js +1 -0
  8. package/dist/assets/McpServers-Kc-djiVi.js +2 -0
  9. package/dist/assets/Memory-B60DGRTW.js +8 -0
  10. package/dist/assets/Panel-CbTPsYHq.js +1 -0
  11. package/dist/assets/Permissions-C8KrSfrd.js +3 -0
  12. package/dist/assets/Plugins-BT8EumHb.js +2 -0
  13. package/dist/assets/ProvenanceBadge-cEqPpFsT.js +1 -0
  14. package/dist/assets/Scheduler-DbKPd0or.js +14 -0
  15. package/dist/assets/ScopeSwitcher-BNesCJ_t.js +1 -0
  16. package/dist/assets/Settings-Bjt7AQ6G.js +3 -0
  17. package/dist/assets/SkillReferenceGraph-DzuaPDM-.js +46 -0
  18. package/dist/assets/Skills-CVL_4X3T.js +3 -0
  19. package/dist/assets/SystemPrompt-Ct__nFF1.js +1 -0
  20. package/dist/assets/TagLibrary-DmrTfw4D.js +1 -0
  21. package/dist/assets/{TiptapBody-BwN4pNC0.js → TiptapBody-DaS0M_Ni.js} +1 -1
  22. package/dist/assets/Toggle-C0a-6xV7.js +1 -0
  23. package/dist/assets/index-CO_7DroC.js +3066 -0
  24. package/dist/assets/{index-CVCCMw5o.css → index-LlWpj2VJ.css} +1 -1
  25. package/dist/assets/listSkills-QORduPIk.js +1 -0
  26. package/dist/assets/settingsSchema-B7dMJaix.js +3 -0
  27. package/dist/assets/skillFrontmatter-Dif5JIg7.js +10 -0
  28. package/dist/index.html +2 -2
  29. package/package.json +1 -3
  30. package/src/main/__tests__/config-readText-bounded.test.cjs +84 -0
  31. package/src/main/__tests__/heapSnapshot.test.cjs +121 -0
  32. package/src/main/__tests__/historyAggregatorIntraday.test.cjs +313 -0
  33. package/src/main/__tests__/runLogRetention.test.cjs +343 -0
  34. package/src/main/__tests__/transcripts-batch-flush.test.cjs +249 -0
  35. package/src/main/config.cjs +31 -7
  36. package/src/main/health.cjs +32 -0
  37. package/src/main/heapSnapshot.cjs +122 -0
  38. package/src/main/historyAggregator.cjs +176 -36
  39. package/src/main/index.cjs +9 -0
  40. package/src/main/ipcSchemas.cjs +9 -0
  41. package/src/main/lib/runLogRetention.cjs +358 -0
  42. package/src/main/transcripts.cjs +29 -5
  43. package/src/preload/api.d.ts +16 -2
  44. package/src/preload/index.cjs +11 -2
  45. package/dist/assets/index-ZjTDk5b7.js +0 -3197
@@ -0,0 +1,46 @@
1
+ import{X as Q,j as bo,H as wo,I as tr}from"./index-CO_7DroC.js";import"./monaco-editor-BW5C4Iv1.js";function ko(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,a,s,u=[],l=!0,f=!1;try{if(a=(r=r.call(e)).next,n===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=a.call(r)).done)&&(u.push(i.value),u.length!==n);l=!0);}catch(h){f=!0,o=h}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw o}}return u}}function Ao(e,n,r){return n=Ro(n),n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function er(e,n){return Mo(e)||ko(e,n)||fi(e,n)||Oo()}function Co(e){return So(e)||To(e)||fi(e)||Po()}function So(e){if(Array.isArray(e))return gn(e)}function Mo(e){if(Array.isArray(e))return e}function To(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function fi(e,n){if(e){if(typeof e=="string")return gn(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 gn(e,n)}}function gn(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=new Array(n);r<n;r++)i[r]=e[r];return i}function Po(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Oo(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Eo(e,n){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function Ro(e){var n=Eo(e,"string");return typeof n=="symbol"?n:String(n)}var zo=function(n,r){var i=new Set(r);return Object.assign.apply(Object,[{}].concat(Co(Object.entries(n).filter(function(o){var a=er(o,1),s=a[0];return!i.has(s)}).map(function(o){var a=er(o,2),s=a[0],u=a[1];return Ao({},s,u)}))))};function yn(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function No(e){if(Array.isArray(e))return e}function Io(e){if(Array.isArray(e))return yn(e)}function $o(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Do(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,a,s,u=[],l=!0,f=!1;try{if(a=(r=r.call(e)).next,n!==0)for(;!(l=(i=a.call(r)).done)&&(u.push(i.value),u.length!==n);l=!0);}catch(h){f=!0,o=h}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw o}}return u}}function jo(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
4
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fo(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
5
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Uo(e,n){return No(e)||Do(e,n)||ci(e,n)||jo()}function nr(e){return Io(e)||$o(e)||ci(e)||Fo()}function ci(e,n){if(e){if(typeof e=="string")return yn(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?yn(e,n):void 0}}function Lo(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.wrapperElementType,i=r===void 0?"div":r,o=n.nodeMapper,a=o===void 0?function(h){return h}:o,s=n.methodNames,u=s===void 0?[]:s,l=n.initPropNames,f=l===void 0?[]:l;return Q.forwardRef(function(h,c){var d=Q.useRef(),p=Q.useMemo(function(){var _=Object.fromEntries(f.filter(function(g){return h.hasOwnProperty(g)}).map(function(g){return[g,h[g]]}));return e(_)},[]);rr(function(){p(a(d.current))},Q.useLayoutEffect),rr(function(){return p._destructor instanceof Function?p._destructor:void 0});var y=Q.useCallback(function(_){for(var g=arguments.length,w=new Array(g>1?g-1:0),C=1;C<g;C++)w[C-1]=arguments[C];return p[_]instanceof Function?p[_].apply(p,w):void 0},[p]),m=Q.useRef({});return Object.keys(zo(h,[].concat(nr(u),nr(f)))).filter(function(_){return m.current[_]!==h[_]}).forEach(function(_){return y(_,h[_])}),m.current=h,Q.useImperativeHandle(c,function(){return Object.fromEntries(u.map(function(_){return[_,function(){for(var g=arguments.length,w=new Array(g),C=0;C<g;C++)w[C]=arguments[C];return y.apply(void 0,[_].concat(w))}]}))},[y]),bo.createElement(i,{ref:d})})}function rr(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Q.useEffect,r=Q.useRef(),i=Q.useRef(!1),o=Q.useRef(!1),a=Q.useState(0),s=Uo(a,2);s[0];var u=s[1];i.current&&(o.current=!0),n(function(){return i.current||(r.current=e(),i.current=!0),u(function(l){return l+1}),function(){o.current&&r.current&&r.current()}},[])}var _n="http://www.w3.org/1999/xhtml";const ir={svg:"http://www.w3.org/2000/svg",xhtml:_n,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Be(e){var n=e+="",r=n.indexOf(":");return r>=0&&(n=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),ir.hasOwnProperty(n)?{space:ir[n],local:e}:e}function Ho(e){return function(){var n=this.ownerDocument,r=this.namespaceURI;return r===_n&&n.documentElement.namespaceURI===_n?n.createElement(e):n.createElementNS(r,e)}}function qo(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function hi(e){var n=Be(e);return(n.local?qo:Ho)(n)}function Go(){}function $n(e){return e==null?Go:function(){return this.querySelector(e)}}function Vo(e){typeof e!="function"&&(e=$n(e));for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o)for(var a=n[o],s=a.length,u=i[o]=new Array(s),l,f,h=0;h<s;++h)(l=a[h])&&(f=e.call(l,l.__data__,h,a))&&("__data__"in l&&(f.__data__=l.__data__),u[h]=f);return new it(i,this._parents)}function Wo(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Bo(){return[]}function di(e){return e==null?Bo:function(){return this.querySelectorAll(e)}}function Xo(e){return function(){return Wo(e.apply(this,arguments))}}function Yo(e){typeof e=="function"?e=Xo(e):e=di(e);for(var n=this._groups,r=n.length,i=[],o=[],a=0;a<r;++a)for(var s=n[a],u=s.length,l,f=0;f<u;++f)(l=s[f])&&(i.push(e.call(l,l.__data__,f,s)),o.push(l));return new it(i,o)}function pi(e){return function(){return this.matches(e)}}function gi(e){return function(n){return n.matches(e)}}var Zo=Array.prototype.find;function Ko(e){return function(){return Zo.call(this.children,e)}}function Qo(){return this.firstElementChild}function Jo(e){return this.select(e==null?Qo:Ko(typeof e=="function"?e:gi(e)))}var ta=Array.prototype.filter;function ea(){return Array.from(this.children)}function na(e){return function(){return ta.call(this.children,e)}}function ra(e){return this.selectAll(e==null?ea:na(typeof e=="function"?e:gi(e)))}function ia(e){typeof e!="function"&&(e=pi(e));for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o)for(var a=n[o],s=a.length,u=i[o]=[],l,f=0;f<s;++f)(l=a[f])&&e.call(l,l.__data__,f,a)&&u.push(l);return new it(i,this._parents)}function yi(e){return new Array(e.length)}function oa(){return new it(this._enter||this._groups.map(yi),this._parents)}function ze(e,n){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=n}ze.prototype={constructor:ze,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,n){return this._parent.insertBefore(e,n)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function aa(e){return function(){return e}}function sa(e,n,r,i,o,a){for(var s=0,u,l=n.length,f=a.length;s<f;++s)(u=n[s])?(u.__data__=a[s],i[s]=u):r[s]=new ze(e,a[s]);for(;s<l;++s)(u=n[s])&&(o[s]=u)}function ua(e,n,r,i,o,a,s){var u,l,f=new Map,h=n.length,c=a.length,d=new Array(h),p;for(u=0;u<h;++u)(l=n[u])&&(d[u]=p=s.call(l,l.__data__,u,n)+"",f.has(p)?o[u]=l:f.set(p,l));for(u=0;u<c;++u)p=s.call(e,a[u],u,a)+"",(l=f.get(p))?(i[u]=l,l.__data__=a[u],f.delete(p)):r[u]=new ze(e,a[u]);for(u=0;u<h;++u)(l=n[u])&&f.get(d[u])===l&&(o[u]=l)}function la(e){return e.__data__}function fa(e,n){if(!arguments.length)return Array.from(this,la);var r=n?ua:sa,i=this._parents,o=this._groups;typeof e!="function"&&(e=aa(e));for(var a=o.length,s=new Array(a),u=new Array(a),l=new Array(a),f=0;f<a;++f){var h=i[f],c=o[f],d=c.length,p=ca(e.call(h,h&&h.__data__,f,i)),y=p.length,m=u[f]=new Array(y),_=s[f]=new Array(y),g=l[f]=new Array(d);r(h,c,m,_,g,p,n);for(var w=0,C=0,x,b;w<y;++w)if(x=m[w]){for(w>=C&&(C=w+1);!(b=_[C])&&++C<y;);x._next=b||null}}return s=new it(s,i),s._enter=u,s._exit=l,s}function ca(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function ha(){return new it(this._exit||this._groups.map(yi),this._parents)}function da(e,n,r){var i=this.enter(),o=this,a=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),n!=null&&(o=n(o),o&&(o=o.selection())),r==null?a.remove():r(a),i&&o?i.merge(o).order():o}function pa(e){for(var n=e.selection?e.selection():e,r=this._groups,i=n._groups,o=r.length,a=i.length,s=Math.min(o,a),u=new Array(o),l=0;l<s;++l)for(var f=r[l],h=i[l],c=f.length,d=u[l]=new Array(c),p,y=0;y<c;++y)(p=f[y]||h[y])&&(d[y]=p);for(;l<o;++l)u[l]=r[l];return new it(u,this._parents)}function ga(){for(var e=this._groups,n=-1,r=e.length;++n<r;)for(var i=e[n],o=i.length-1,a=i[o],s;--o>=0;)(s=i[o])&&(a&&s.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(s,a),a=s);return this}function ya(e){e||(e=_a);function n(c,d){return c&&d?e(c.__data__,d.__data__):!c-!d}for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a){for(var s=r[a],u=s.length,l=o[a]=new Array(u),f,h=0;h<u;++h)(f=s[h])&&(l[h]=f);l.sort(n)}return new it(o,this._parents).order()}function _a(e,n){return e<n?-1:e>n?1:e>=n?0:NaN}function va(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function ma(){return Array.from(this)}function xa(){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,a=i.length;o<a;++o){var s=i[o];if(s)return s}return null}function ba(){let e=0;for(const n of this)++e;return e}function wa(){return!this.node()}function ka(e){for(var n=this._groups,r=0,i=n.length;r<i;++r)for(var o=n[r],a=0,s=o.length,u;a<s;++a)(u=o[a])&&e.call(u,u.__data__,a,o);return this}function Aa(e){return function(){this.removeAttribute(e)}}function Ca(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Sa(e,n){return function(){this.setAttribute(e,n)}}function Ma(e,n){return function(){this.setAttributeNS(e.space,e.local,n)}}function Ta(e,n){return function(){var r=n.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function Pa(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 Oa(e,n){var r=Be(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?Ca:Aa:typeof n=="function"?r.local?Pa:Ta:r.local?Ma:Sa)(r,n))}function _i(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Ea(e){return function(){this.style.removeProperty(e)}}function Ra(e,n,r){return function(){this.style.setProperty(e,n,r)}}function za(e,n,r){return function(){var i=n.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function Na(e,n,r){return arguments.length>1?this.each((n==null?Ea:typeof n=="function"?za:Ra)(e,n,r??"")):Vt(this.node(),e)}function Vt(e,n){return e.style.getPropertyValue(n)||_i(e).getComputedStyle(e,null).getPropertyValue(n)}function Ia(e){return function(){delete this[e]}}function $a(e,n){return function(){this[e]=n}}function Da(e,n){return function(){var r=n.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function ja(e,n){return arguments.length>1?this.each((n==null?Ia:typeof n=="function"?Da:$a)(e,n)):this.node()[e]}function vi(e){return e.trim().split(/^|\s+/)}function Dn(e){return e.classList||new mi(e)}function mi(e){this._node=e,this._names=vi(e.getAttribute("class")||"")}mi.prototype={add:function(e){var n=this._names.indexOf(e);n<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var n=this._names.indexOf(e);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function xi(e,n){for(var r=Dn(e),i=-1,o=n.length;++i<o;)r.add(n[i])}function bi(e,n){for(var r=Dn(e),i=-1,o=n.length;++i<o;)r.remove(n[i])}function Fa(e){return function(){xi(this,e)}}function Ua(e){return function(){bi(this,e)}}function La(e,n){return function(){(n.apply(this,arguments)?xi:bi)(this,e)}}function Ha(e,n){var r=vi(e+"");if(arguments.length<2){for(var i=Dn(this.node()),o=-1,a=r.length;++o<a;)if(!i.contains(r[o]))return!1;return!0}return this.each((typeof n=="function"?La:n?Fa:Ua)(r,n))}function qa(){this.textContent=""}function Ga(e){return function(){this.textContent=e}}function Va(e){return function(){var n=e.apply(this,arguments);this.textContent=n??""}}function Wa(e){return arguments.length?this.each(e==null?qa:(typeof e=="function"?Va:Ga)(e)):this.node().textContent}function Ba(){this.innerHTML=""}function Xa(e){return function(){this.innerHTML=e}}function Ya(e){return function(){var n=e.apply(this,arguments);this.innerHTML=n??""}}function Za(e){return arguments.length?this.each(e==null?Ba:(typeof e=="function"?Ya:Xa)(e)):this.node().innerHTML}function Ka(){this.nextSibling&&this.parentNode.appendChild(this)}function Qa(){return this.each(Ka)}function Ja(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ts(){return this.each(Ja)}function es(e){var n=typeof e=="function"?e:hi(e);return this.select(function(){return this.appendChild(n.apply(this,arguments))})}function ns(){return null}function rs(e,n){var r=typeof e=="function"?e:hi(e),i=n==null?ns:typeof n=="function"?n:$n(n);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function is(){var e=this.parentNode;e&&e.removeChild(this)}function os(){return this.each(is)}function as(){var e=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(e,this.nextSibling):e}function ss(){var e=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(e,this.nextSibling):e}function us(e){return this.select(e?ss:as)}function ls(e){return arguments.length?this.property("__data__",e):this.node().__data__}function fs(e){return function(n){e.call(this,n,this.__data__)}}function cs(e){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");return i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),{type:n,name:r}})}function hs(e){return function(){var n=this.__on;if(n){for(var r=0,i=-1,o=n.length,a;r<o;++r)a=n[r],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):n[++i]=a;++i?n.length=i:delete this.__on}}}function ds(e,n,r){return function(){var i=this.__on,o,a=fs(n);if(i){for(var s=0,u=i.length;s<u;++s)if((o=i[s]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=a,o.options=r),o.value=n;return}}this.addEventListener(e.type,a,r),o={type:e.type,name:e.name,value:n,listener:a,options:r},i?i.push(o):this.__on=[o]}}function ps(e,n,r){var i=cs(e+""),o,a=i.length,s;if(arguments.length<2){var u=this.node().__on;if(u){for(var l=0,f=u.length,h;l<f;++l)for(o=0,h=u[l];o<a;++o)if((s=i[o]).type===h.type&&s.name===h.name)return h.value}return}for(u=n?ds:hs,o=0;o<a;++o)this.each(u(i[o],n,r));return this}function wi(e,n,r){var i=_i(e),o=i.CustomEvent;typeof o=="function"?o=new o(n,r):(o=i.document.createEvent("Event"),r?(o.initEvent(n,r.bubbles,r.cancelable),o.detail=r.detail):o.initEvent(n,!1,!1)),e.dispatchEvent(o)}function gs(e,n){return function(){return wi(this,e,n)}}function ys(e,n){return function(){return wi(this,e,n.apply(this,arguments))}}function _s(e,n){return this.each((typeof n=="function"?ys:gs)(e,n))}function*vs(){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,a=i.length,s;o<a;++o)(s=i[o])&&(yield s)}var ki=[null];function it(e,n){this._groups=e,this._parents=n}function ye(){return new it([[document.documentElement]],ki)}function ms(){return this}it.prototype=ye.prototype={constructor:it,select:Vo,selectAll:Yo,selectChild:Jo,selectChildren:ra,filter:ia,data:fa,enter:oa,exit:ha,join:da,merge:pa,selection:ms,order:ga,sort:ya,call:va,nodes:ma,node:xa,size:ba,empty:wa,each:ka,attr:Oa,style:Na,property:ja,classed:Ha,text:Wa,html:Za,raise:Qa,lower:ts,append:es,insert:rs,remove:os,clone:us,datum:ls,on:ps,dispatch:_s,[Symbol.iterator]:vs};function st(e){return typeof e=="string"?new it([[document.querySelector(e)]],[document.documentElement]):new it([[e]],ki)}function xs(e){let n;for(;n=e.sourceEvent;)e=n;return e}function yt(e,n){if(e=xs(e),n===void 0&&(n=e.currentTarget),n){var r=n.ownerSVGElement||n;if(r.createSVGPoint){var i=r.createSVGPoint();return i.x=e.clientX,i.y=e.clientY,i=i.matrixTransform(n.getScreenCTM().inverse()),[i.x,i.y]}if(n.getBoundingClientRect){var o=n.getBoundingClientRect();return[e.clientX-o.left-n.clientLeft,e.clientY-o.top-n.clientTop]}}return[e.pageX,e.pageY]}var bs={value:()=>{}};function _e(){for(var e=0,n=arguments.length,r={},i;e<n;++e){if(!(i=arguments[e]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new Me(r)}function Me(e){this._=e}function ws(e,n){return e.trim().split(/^|\s+/).map(function(r){var i="",o=r.indexOf(".");if(o>=0&&(i=r.slice(o+1),r=r.slice(0,o)),r&&!n.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}Me.prototype=_e.prototype={constructor:Me,on:function(e,n){var r=this._,i=ws(e+"",r),o,a=-1,s=i.length;if(arguments.length<2){for(;++a<s;)if((o=(e=i[a]).type)&&(o=ks(r[o],e.name)))return o;return}if(n!=null&&typeof n!="function")throw new Error("invalid callback: "+n);for(;++a<s;)if(o=(e=i[a]).type)r[o]=or(r[o],e.name,n);else if(n==null)for(o in r)r[o]=or(r[o],e.name,null);return this},copy:function(){var e={},n=this._;for(var r in n)e[r]=n[r].slice();return new Me(e)},call:function(e,n){if((o=arguments.length-2)>0)for(var r=new Array(o),i=0,o,a;i<o;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],i=0,o=a.length;i<o;++i)a[i].value.apply(n,r)},apply:function(e,n,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],o=0,a=i.length;o<a;++o)i[o].value.apply(n,r)}};function ks(e,n){for(var r=0,i=e.length,o;r<i;++r)if((o=e[r]).name===n)return o.value}function or(e,n,r){for(var i=0,o=e.length;i<o;++i)if(e[i].name===n){e[i]=bs,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:n,value:r}),e}const As={passive:!1},fe={capture:!0,passive:!1};function en(e){e.stopImmediatePropagation()}function qt(e){e.preventDefault(),e.stopImmediatePropagation()}function Ai(e){var n=e.document.documentElement,r=st(e).on("dragstart.drag",qt,fe);"onselectstart"in n?r.on("selectstart.drag",qt,fe):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")}function Ci(e,n){var r=e.document.documentElement,i=st(e).on("dragstart.drag",null);n&&(i.on("click.drag",qt,fe),setTimeout(function(){i.on("click.drag",null)},0)),"onselectstart"in r?i.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}const xe=e=>()=>e;function vn(e,{sourceEvent:n,subject:r,target:i,identifier:o,active:a,x:s,y:u,dx:l,dy:f,dispatch:h}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:u,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:f,enumerable:!0,configurable:!0},_:{value:h}})}vn.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Cs(e){return!e.ctrlKey&&!e.button}function Ss(){return this.parentNode}function Ms(e,n){return n??{x:e.x,y:e.y}}function Ts(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ps(){var e=Cs,n=Ss,r=Ms,i=Ts,o={},a=_e("start","drag","end"),s=0,u,l,f,h,c=0;function d(x){x.on("mousedown.drag",p).filter(i).on("touchstart.drag",_).on("touchmove.drag",g,As).on("touchend.drag touchcancel.drag",w).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(x,b){if(!(h||!e.call(this,x,b))){var A=C(this,n.call(this,x,b),x,b,"mouse");A&&(st(x.view).on("mousemove.drag",y,fe).on("mouseup.drag",m,fe),Ai(x.view),en(x),f=!1,u=x.clientX,l=x.clientY,A("start",x))}}function y(x){if(qt(x),!f){var b=x.clientX-u,A=x.clientY-l;f=b*b+A*A>c}o.mouse("drag",x)}function m(x){st(x.view).on("mousemove.drag mouseup.drag",null),Ci(x.view,f),qt(x),o.mouse("end",x)}function _(x,b){if(e.call(this,x,b)){var A=x.changedTouches,S=n.call(this,x,b),M=A.length,E,P;for(E=0;E<M;++E)(P=C(this,S,x,b,A[E].identifier,A[E]))&&(en(x),P("start",x,A[E]))}}function g(x){var b=x.changedTouches,A=b.length,S,M;for(S=0;S<A;++S)(M=o[b[S].identifier])&&(qt(x),M("drag",x,b[S]))}function w(x){var b=x.changedTouches,A=b.length,S,M;for(h&&clearTimeout(h),h=setTimeout(function(){h=null},500),S=0;S<A;++S)(M=o[b[S].identifier])&&(en(x),M("end",x,b[S]))}function C(x,b,A,S,M,E){var P=a.copy(),z=yt(E||A,b),N,j,k;if((k=r.call(x,new vn("beforestart",{sourceEvent:A,target:d,identifier:M,active:s,x:z[0],y:z[1],dx:0,dy:0,dispatch:P}),S))!=null)return N=k.x-z[0]||0,j=k.y-z[1]||0,function R(T,I,D){var F=z,U;switch(T){case"start":o[M]=R,U=s++;break;case"end":delete o[M],--s;case"drag":z=yt(D||I,b),U=s;break}P.call(T,x,new vn(T,{sourceEvent:I,subject:k,target:d,identifier:M,active:U,x:z[0]+N,y:z[1]+j,dx:z[0]-F[0],dy:z[1]-F[1],dispatch:P}),S)}}return d.filter=function(x){return arguments.length?(e=typeof x=="function"?x:xe(!!x),d):e},d.container=function(x){return arguments.length?(n=typeof x=="function"?x:xe(x),d):n},d.subject=function(x){return arguments.length?(r=typeof x=="function"?x:xe(x),d):r},d.touchable=function(x){return arguments.length?(i=typeof x=="function"?x:xe(!!x),d):i},d.on=function(){var x=a.on.apply(a,arguments);return x===a?d:x},d.clickDistance=function(x){return arguments.length?(c=(x=+x)*x,d):Math.sqrt(c)},d}function jn(e,n,r){e.prototype=n.prototype=r,r.constructor=e}function Si(e,n){var r=Object.create(e.prototype);for(var i in n)r[i]=n[i];return r}function ve(){}var ce=.7,Ne=1/ce,Gt="\\s*([+-]?\\d+)\\s*",he="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",vt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Os=/^#([0-9a-f]{3,8})$/,Es=new RegExp(`^rgb\\(${Gt},${Gt},${Gt}\\)$`),Rs=new RegExp(`^rgb\\(${vt},${vt},${vt}\\)$`),zs=new RegExp(`^rgba\\(${Gt},${Gt},${Gt},${he}\\)$`),Ns=new RegExp(`^rgba\\(${vt},${vt},${vt},${he}\\)$`),Is=new RegExp(`^hsl\\(${he},${vt},${vt}\\)$`),$s=new RegExp(`^hsla\\(${he},${vt},${vt},${he}\\)$`),ar={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};jn(ve,de,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:sr,formatHex:sr,formatHex8:Ds,formatHsl:js,formatRgb:ur,toString:ur});function sr(){return this.rgb().formatHex()}function Ds(){return this.rgb().formatHex8()}function js(){return Mi(this).formatHsl()}function ur(){return this.rgb().formatRgb()}function de(e){var n,r;return e=(e+"").trim().toLowerCase(),(n=Os.exec(e))?(r=n[1].length,n=parseInt(n[1],16),r===6?lr(n):r===3?new et(n>>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):r===8?be(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):r===4?be(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=Es.exec(e))?new et(n[1],n[2],n[3],1):(n=Rs.exec(e))?new et(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=zs.exec(e))?be(n[1],n[2],n[3],n[4]):(n=Ns.exec(e))?be(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=Is.exec(e))?hr(n[1],n[2]/100,n[3]/100,1):(n=$s.exec(e))?hr(n[1],n[2]/100,n[3]/100,n[4]):ar.hasOwnProperty(e)?lr(ar[e]):e==="transparent"?new et(NaN,NaN,NaN,0):null}function lr(e){return new et(e>>16&255,e>>8&255,e&255,1)}function be(e,n,r,i){return i<=0&&(e=n=r=NaN),new et(e,n,r,i)}function Fs(e){return e instanceof ve||(e=de(e)),e?(e=e.rgb(),new et(e.r,e.g,e.b,e.opacity)):new et}function mn(e,n,r,i){return arguments.length===1?Fs(e):new et(e,n,r,i??1)}function et(e,n,r,i){this.r=+e,this.g=+n,this.b=+r,this.opacity=+i}jn(et,mn,Si(ve,{brighter(e){return e=e==null?Ne:Math.pow(Ne,e),new et(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ce:Math.pow(ce,e),new et(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new et(jt(this.r),jt(this.g),jt(this.b),Ie(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:fr,formatHex:fr,formatHex8:Us,formatRgb:cr,toString:cr}));function fr(){return`#${Dt(this.r)}${Dt(this.g)}${Dt(this.b)}`}function Us(){return`#${Dt(this.r)}${Dt(this.g)}${Dt(this.b)}${Dt((isNaN(this.opacity)?1:this.opacity)*255)}`}function cr(){const e=Ie(this.opacity);return`${e===1?"rgb(":"rgba("}${jt(this.r)}, ${jt(this.g)}, ${jt(this.b)}${e===1?")":`, ${e})`}`}function Ie(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function jt(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Dt(e){return e=jt(e),(e<16?"0":"")+e.toString(16)}function hr(e,n,r,i){return i<=0?e=n=r=NaN:r<=0||r>=1?e=n=NaN:n<=0&&(e=NaN),new ht(e,n,r,i)}function Mi(e){if(e instanceof ht)return new ht(e.h,e.s,e.l,e.opacity);if(e instanceof ve||(e=de(e)),!e)return new ht;if(e instanceof ht)return e;e=e.rgb();var n=e.r/255,r=e.g/255,i=e.b/255,o=Math.min(n,r,i),a=Math.max(n,r,i),s=NaN,u=a-o,l=(a+o)/2;return u?(n===a?s=(r-i)/u+(r<i)*6:r===a?s=(i-n)/u+2:s=(n-r)/u+4,u/=l<.5?a+o:2-a-o,s*=60):u=l>0&&l<1?0:s,new ht(s,u,l,e.opacity)}function Ls(e,n,r,i){return arguments.length===1?Mi(e):new ht(e,n,r,i??1)}function ht(e,n,r,i){this.h=+e,this.s=+n,this.l=+r,this.opacity=+i}jn(ht,Ls,Si(ve,{brighter(e){return e=e==null?Ne:Math.pow(Ne,e),new ht(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ce:Math.pow(ce,e),new ht(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,o=2*r-i;return new et(nn(e>=240?e-240:e+120,o,i),nn(e,o,i),nn(e<120?e+240:e-120,o,i),this.opacity)},clamp(){return new ht(dr(this.h),we(this.s),we(this.l),Ie(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Ie(this.opacity);return`${e===1?"hsl(":"hsla("}${dr(this.h)}, ${we(this.s)*100}%, ${we(this.l)*100}%${e===1?")":`, ${e})`}`}}));function dr(e){return e=(e||0)%360,e<0?e+360:e}function we(e){return Math.max(0,Math.min(1,e||0))}function nn(e,n,r){return(e<60?n+(r-n)*e/60:e<180?r:e<240?n+(r-n)*(240-e)/60:n)*255}const Ti=e=>()=>e;function Hs(e,n){return function(r){return e+r*n}}function qs(e,n,r){return e=Math.pow(e,r),n=Math.pow(n,r)-e,r=1/r,function(i){return Math.pow(e+i*n,r)}}function Gs(e){return(e=+e)==1?Pi:function(n,r){return r-n?qs(n,r,e):Ti(isNaN(n)?r:n)}}function Pi(e,n){var r=n-e;return r?Hs(e,r):Ti(isNaN(e)?n:e)}const pr=(function e(n){var r=Gs(n);function i(o,a){var s=r((o=mn(o)).r,(a=mn(a)).r),u=r(o.g,a.g),l=r(o.b,a.b),f=Pi(o.opacity,a.opacity);return function(h){return o.r=s(h),o.g=u(h),o.b=l(h),o.opacity=f(h),o+""}}return i.gamma=e,i})(1);function Nt(e,n){return e=+e,n=+n,function(r){return e*(1-r)+n*r}}var xn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,rn=new RegExp(xn.source,"g");function Vs(e){return function(){return e}}function Ws(e){return function(n){return e(n)+""}}function Bs(e,n){var r=xn.lastIndex=rn.lastIndex=0,i,o,a,s=-1,u=[],l=[];for(e=e+"",n=n+"";(i=xn.exec(e))&&(o=rn.exec(n));)(a=o.index)>r&&(a=n.slice(r,a),u[s]?u[s]+=a:u[++s]=a),(i=i[0])===(o=o[0])?u[s]?u[s]+=o:u[++s]=o:(u[++s]=null,l.push({i:s,x:Nt(i,o)})),r=rn.lastIndex;return r<n.length&&(a=n.slice(r),u[s]?u[s]+=a:u[++s]=a),u.length<2?l[0]?Ws(l[0].x):Vs(n):(n=l.length,function(f){for(var h=0,c;h<n;++h)u[(c=l[h]).i]=c.x(f);return u.join("")})}var gr=180/Math.PI,bn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Oi(e,n,r,i,o,a){var s,u,l;return(s=Math.sqrt(e*e+n*n))&&(e/=s,n/=s),(l=e*r+n*i)&&(r-=e*l,i-=n*l),(u=Math.sqrt(r*r+i*i))&&(r/=u,i/=u,l/=u),e*i<n*r&&(e=-e,n=-n,l=-l,s=-s),{translateX:o,translateY:a,rotate:Math.atan2(n,e)*gr,skewX:Math.atan(l)*gr,scaleX:s,scaleY:u}}var ke;function Xs(e){const n=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return n.isIdentity?bn:Oi(n.a,n.b,n.c,n.d,n.e,n.f)}function Ys(e){return e==null||(ke||(ke=document.createElementNS("http://www.w3.org/2000/svg","g")),ke.setAttribute("transform",e),!(e=ke.transform.baseVal.consolidate()))?bn:(e=e.matrix,Oi(e.a,e.b,e.c,e.d,e.e,e.f))}function Ei(e,n,r,i){function o(f){return f.length?f.pop()+" ":""}function a(f,h,c,d,p,y){if(f!==c||h!==d){var m=p.push("translate(",null,n,null,r);y.push({i:m-4,x:Nt(f,c)},{i:m-2,x:Nt(h,d)})}else(c||d)&&p.push("translate("+c+n+d+r)}function s(f,h,c,d){f!==h?(f-h>180?h+=360:h-f>180&&(f+=360),d.push({i:c.push(o(c)+"rotate(",null,i)-2,x:Nt(f,h)})):h&&c.push(o(c)+"rotate("+h+i)}function u(f,h,c,d){f!==h?d.push({i:c.push(o(c)+"skewX(",null,i)-2,x:Nt(f,h)}):h&&c.push(o(c)+"skewX("+h+i)}function l(f,h,c,d,p,y){if(f!==c||h!==d){var m=p.push(o(p)+"scale(",null,",",null,")");y.push({i:m-4,x:Nt(f,c)},{i:m-2,x:Nt(h,d)})}else(c!==1||d!==1)&&p.push(o(p)+"scale("+c+","+d+")")}return function(f,h){var c=[],d=[];return f=e(f),h=e(h),a(f.translateX,f.translateY,h.translateX,h.translateY,c,d),s(f.rotate,h.rotate,c,d),u(f.skewX,h.skewX,c,d),l(f.scaleX,f.scaleY,h.scaleX,h.scaleY,c,d),f=h=null,function(p){for(var y=-1,m=d.length,_;++y<m;)c[(_=d[y]).i]=_.x(p);return c.join("")}}}var Zs=Ei(Xs,"px, ","px)","deg)"),Ks=Ei(Ys,", ",")",")"),Qs=1e-12;function yr(e){return((e=Math.exp(e))+1/e)/2}function Js(e){return((e=Math.exp(e))-1/e)/2}function tu(e){return((e=Math.exp(2*e))-1)/(e+1)}const eu=(function e(n,r,i){function o(a,s){var u=a[0],l=a[1],f=a[2],h=s[0],c=s[1],d=s[2],p=h-u,y=c-l,m=p*p+y*y,_,g;if(m<Qs)g=Math.log(d/f)/n,_=function(S){return[u+S*p,l+S*y,f*Math.exp(n*S*g)]};else{var w=Math.sqrt(m),C=(d*d-f*f+i*m)/(2*f*r*w),x=(d*d-f*f-i*m)/(2*d*r*w),b=Math.log(Math.sqrt(C*C+1)-C),A=Math.log(Math.sqrt(x*x+1)-x);g=(A-b)/n,_=function(S){var M=S*g,E=yr(b),P=f/(r*w)*(E*tu(n*M+b)-Js(b));return[u+P*p,l+P*y,f*E/yr(n*M+b)]}}return _.duration=g*1e3*n/Math.SQRT2,_}return o.rho=function(a){var s=Math.max(.001,+a),u=s*s,l=u*u;return e(s,u,l)},o})(Math.SQRT2,2,4);var Wt=0,ne=0,Xt=0,Ri=1e3,$e,re,De=0,Ut=0,Xe=0,pe=typeof performance=="object"&&performance.now?performance:Date,zi=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Fn(){return Ut||(zi(nu),Ut=pe.now()+Xe)}function nu(){Ut=0}function je(){this._call=this._time=this._next=null}je.prototype=Un.prototype={constructor:je,restart:function(e,n,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Fn():+r)+(n==null?0:+n),!this._next&&re!==this&&(re?re._next=this:$e=this,re=this),this._call=e,this._time=r,wn()},stop:function(){this._call&&(this._call=null,this._time=1/0,wn())}};function Un(e,n,r){var i=new je;return i.restart(e,n,r),i}function ru(){Fn(),++Wt;for(var e=$e,n;e;)(n=Ut-e._time)>=0&&e._call.call(void 0,n),e=e._next;--Wt}function _r(){Ut=(De=pe.now())+Xe,Wt=ne=0;try{ru()}finally{Wt=0,ou(),Ut=0}}function iu(){var e=pe.now(),n=e-De;n>Ri&&(Xe-=n,De=e)}function ou(){for(var e,n=$e,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:$e=r);re=e,wn(i)}function wn(e){if(!Wt){ne&&(ne=clearTimeout(ne));var n=e-Ut;n>24?(e<1/0&&(ne=setTimeout(_r,e-pe.now()-Xe)),Xt&&(Xt=clearInterval(Xt))):(Xt||(De=pe.now(),Xt=setInterval(iu,Ri)),Wt=1,zi(_r))}}function vr(e,n,r){var i=new je;return n=n==null?0:+n,i.restart(o=>{i.stop(),e(o+n)},n,r),i}var au=_e("start","end","cancel","interrupt"),su=[],Ni=0,mr=1,kn=2,Te=3,xr=4,An=5,Pe=6;function Ye(e,n,r,i,o,a){var s=e.__transition;if(!s)e.__transition={};else if(r in s)return;uu(e,r,{name:n,index:i,group:o,on:au,tween:su,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Ni})}function Ln(e,n){var r=pt(e,n);if(r.state>Ni)throw new Error("too late; already scheduled");return r}function xt(e,n){var r=pt(e,n);if(r.state>Te)throw new Error("too late; already running");return r}function pt(e,n){var r=e.__transition;if(!r||!(r=r[n]))throw new Error("transition not found");return r}function uu(e,n,r){var i=e.__transition,o;i[n]=r,r.timer=Un(a,0,r.time);function a(f){r.state=mr,r.timer.restart(s,r.delay,r.time),r.delay<=f&&s(f-r.delay)}function s(f){var h,c,d,p;if(r.state!==mr)return l();for(h in i)if(p=i[h],p.name===r.name){if(p.state===Te)return vr(s);p.state===xr?(p.state=Pe,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete i[h]):+h<n&&(p.state=Pe,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete i[h])}if(vr(function(){r.state===Te&&(r.state=xr,r.timer.restart(u,r.delay,r.time),u(f))}),r.state=kn,r.on.call("start",e,e.__data__,r.index,r.group),r.state===kn){for(r.state=Te,o=new Array(d=r.tween.length),h=0,c=-1;h<d;++h)(p=r.tween[h].value.call(e,e.__data__,r.index,r.group))&&(o[++c]=p);o.length=c+1}}function u(f){for(var h=f<r.duration?r.ease.call(null,f/r.duration):(r.timer.restart(l),r.state=An,1),c=-1,d=o.length;++c<d;)o[c].call(e,h);r.state===An&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=Pe,r.timer.stop(),delete i[n];for(var f in i)return;delete e.__transition}}function Oe(e,n){var r=e.__transition,i,o,a=!0,s;if(r){n=n==null?null:n+"";for(s in r){if((i=r[s]).name!==n){a=!1;continue}o=i.state>kn&&i.state<An,i.state=Pe,i.timer.stop(),i.on.call(o?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[s]}a&&delete e.__transition}}function lu(e){return this.each(function(){Oe(this,e)})}function fu(e,n){var r,i;return function(){var o=xt(this,e),a=o.tween;if(a!==r){i=r=a;for(var s=0,u=i.length;s<u;++s)if(i[s].name===n){i=i.slice(),i.splice(s,1);break}}o.tween=i}}function cu(e,n,r){var i,o;if(typeof r!="function")throw new Error;return function(){var a=xt(this,e),s=a.tween;if(s!==i){o=(i=s).slice();for(var u={name:n,value:r},l=0,f=o.length;l<f;++l)if(o[l].name===n){o[l]=u;break}l===f&&o.push(u)}a.tween=o}}function hu(e,n){var r=this._id;if(e+="",arguments.length<2){for(var i=pt(this.node(),r).tween,o=0,a=i.length,s;o<a;++o)if((s=i[o]).name===e)return s.value;return null}return this.each((n==null?fu:cu)(r,e,n))}function Hn(e,n,r){var i=e._id;return e.each(function(){var o=xt(this,i);(o.value||(o.value={}))[n]=r.apply(this,arguments)}),function(o){return pt(o,i).value[n]}}function Ii(e,n){var r;return(typeof n=="number"?Nt:n instanceof de?pr:(r=de(n))?(n=r,pr):Bs)(e,n)}function du(e){return function(){this.removeAttribute(e)}}function pu(e){return function(){this.removeAttributeNS(e.space,e.local)}}function gu(e,n,r){var i,o=r+"",a;return function(){var s=this.getAttribute(e);return s===o?null:s===i?a:a=n(i=s,r)}}function yu(e,n,r){var i,o=r+"",a;return function(){var s=this.getAttributeNS(e.space,e.local);return s===o?null:s===i?a:a=n(i=s,r)}}function _u(e,n,r){var i,o,a;return function(){var s,u=r(this),l;return u==null?void this.removeAttribute(e):(s=this.getAttribute(e),l=u+"",s===l?null:s===i&&l===o?a:(o=l,a=n(i=s,u)))}}function vu(e,n,r){var i,o,a;return function(){var s,u=r(this),l;return u==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),l=u+"",s===l?null:s===i&&l===o?a:(o=l,a=n(i=s,u)))}}function mu(e,n){var r=Be(e),i=r==="transform"?Ks:Ii;return this.attrTween(e,typeof n=="function"?(r.local?vu:_u)(r,i,Hn(this,"attr."+e,n)):n==null?(r.local?pu:du)(r):(r.local?yu:gu)(r,i,n))}function xu(e,n){return function(r){this.setAttribute(e,n.call(this,r))}}function bu(e,n){return function(r){this.setAttributeNS(e.space,e.local,n.call(this,r))}}function wu(e,n){var r,i;function o(){var a=n.apply(this,arguments);return a!==i&&(r=(i=a)&&bu(e,a)),r}return o._value=n,o}function ku(e,n){var r,i;function o(){var a=n.apply(this,arguments);return a!==i&&(r=(i=a)&&xu(e,a)),r}return o._value=n,o}function Au(e,n){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(n==null)return this.tween(r,null);if(typeof n!="function")throw new Error;var i=Be(e);return this.tween(r,(i.local?wu:ku)(i,n))}function Cu(e,n){return function(){Ln(this,e).delay=+n.apply(this,arguments)}}function Su(e,n){return n=+n,function(){Ln(this,e).delay=n}}function Mu(e){var n=this._id;return arguments.length?this.each((typeof e=="function"?Cu:Su)(n,e)):pt(this.node(),n).delay}function Tu(e,n){return function(){xt(this,e).duration=+n.apply(this,arguments)}}function Pu(e,n){return n=+n,function(){xt(this,e).duration=n}}function Ou(e){var n=this._id;return arguments.length?this.each((typeof e=="function"?Tu:Pu)(n,e)):pt(this.node(),n).duration}function Eu(e,n){if(typeof n!="function")throw new Error;return function(){xt(this,e).ease=n}}function Ru(e){var n=this._id;return arguments.length?this.each(Eu(n,e)):pt(this.node(),n).ease}function zu(e,n){return function(){var r=n.apply(this,arguments);if(typeof r!="function")throw new Error;xt(this,e).ease=r}}function Nu(e){if(typeof e!="function")throw new Error;return this.each(zu(this._id,e))}function Iu(e){typeof e!="function"&&(e=pi(e));for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o)for(var a=n[o],s=a.length,u=i[o]=[],l,f=0;f<s;++f)(l=a[f])&&e.call(l,l.__data__,f,a)&&u.push(l);return new Et(i,this._parents,this._name,this._id)}function $u(e){if(e._id!==this._id)throw new Error;for(var n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),u=0;u<a;++u)for(var l=n[u],f=r[u],h=l.length,c=s[u]=new Array(h),d,p=0;p<h;++p)(d=l[p]||f[p])&&(c[p]=d);for(;u<i;++u)s[u]=n[u];return new Et(s,this._parents,this._name,this._id)}function Du(e){return(e+"").trim().split(/^|\s+/).every(function(n){var r=n.indexOf(".");return r>=0&&(n=n.slice(0,r)),!n||n==="start"})}function ju(e,n,r){var i,o,a=Du(n)?Ln:xt;return function(){var s=a(this,e),u=s.on;u!==i&&(o=(i=u).copy()).on(n,r),s.on=o}}function Fu(e,n){var r=this._id;return arguments.length<2?pt(this.node(),r).on.on(e):this.each(ju(r,e,n))}function Uu(e){return function(){var n=this.parentNode;for(var r in this.__transition)if(+r!==e)return;n&&n.removeChild(this)}}function Lu(){return this.on("end.remove",Uu(this._id))}function Hu(e){var n=this._name,r=this._id;typeof e!="function"&&(e=$n(e));for(var i=this._groups,o=i.length,a=new Array(o),s=0;s<o;++s)for(var u=i[s],l=u.length,f=a[s]=new Array(l),h,c,d=0;d<l;++d)(h=u[d])&&(c=e.call(h,h.__data__,d,u))&&("__data__"in h&&(c.__data__=h.__data__),f[d]=c,Ye(f[d],n,r,d,f,pt(h,r)));return new Et(a,this._parents,n,r)}function qu(e){var n=this._name,r=this._id;typeof e!="function"&&(e=di(e));for(var i=this._groups,o=i.length,a=[],s=[],u=0;u<o;++u)for(var l=i[u],f=l.length,h,c=0;c<f;++c)if(h=l[c]){for(var d=e.call(h,h.__data__,c,l),p,y=pt(h,r),m=0,_=d.length;m<_;++m)(p=d[m])&&Ye(p,n,r,m,d,y);a.push(d),s.push(h)}return new Et(a,s,n,r)}var Gu=ye.prototype.constructor;function Vu(){return new Gu(this._groups,this._parents)}function Wu(e,n){var r,i,o;return function(){var a=Vt(this,e),s=(this.style.removeProperty(e),Vt(this,e));return a===s?null:a===r&&s===i?o:o=n(r=a,i=s)}}function $i(e){return function(){this.style.removeProperty(e)}}function Bu(e,n,r){var i,o=r+"",a;return function(){var s=Vt(this,e);return s===o?null:s===i?a:a=n(i=s,r)}}function Xu(e,n,r){var i,o,a;return function(){var s=Vt(this,e),u=r(this),l=u+"";return u==null&&(l=u=(this.style.removeProperty(e),Vt(this,e))),s===l?null:s===i&&l===o?a:(o=l,a=n(i=s,u))}}function Yu(e,n){var r,i,o,a="style."+n,s="end."+a,u;return function(){var l=xt(this,e),f=l.on,h=l.value[a]==null?u||(u=$i(n)):void 0;(f!==r||o!==h)&&(i=(r=f).copy()).on(s,o=h),l.on=i}}function Zu(e,n,r){var i=(e+="")=="transform"?Zs:Ii;return n==null?this.styleTween(e,Wu(e,i)).on("end.style."+e,$i(e)):typeof n=="function"?this.styleTween(e,Xu(e,i,Hn(this,"style."+e,n))).each(Yu(this._id,e)):this.styleTween(e,Bu(e,i,n),r).on("end.style."+e,null)}function Ku(e,n,r){return function(i){this.style.setProperty(e,n.call(this,i),r)}}function Qu(e,n,r){var i,o;function a(){var s=n.apply(this,arguments);return s!==o&&(i=(o=s)&&Ku(e,s,r)),i}return a._value=n,a}function Ju(e,n,r){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(n==null)return this.tween(i,null);if(typeof n!="function")throw new Error;return this.tween(i,Qu(e,n,r??""))}function tl(e){return function(){this.textContent=e}}function el(e){return function(){var n=e(this);this.textContent=n??""}}function nl(e){return this.tween("text",typeof e=="function"?el(Hn(this,"text",e)):tl(e==null?"":e+""))}function rl(e){return function(n){this.textContent=e.call(this,n)}}function il(e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&rl(o)),n}return i._value=e,i}function ol(e){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;return this.tween(n,il(e))}function al(){for(var e=this._name,n=this._id,r=Di(),i=this._groups,o=i.length,a=0;a<o;++a)for(var s=i[a],u=s.length,l,f=0;f<u;++f)if(l=s[f]){var h=pt(l,n);Ye(l,e,r,f,s,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new Et(i,this._parents,e,r)}function sl(){var e,n,r=this,i=r._id,o=r.size();return new Promise(function(a,s){var u={value:s},l={value:function(){--o===0&&a()}};r.each(function(){var f=xt(this,i),h=f.on;h!==e&&(n=(e=h).copy(),n._.cancel.push(u),n._.interrupt.push(u),n._.end.push(l)),f.on=n}),o===0&&a()})}var ul=0;function Et(e,n,r,i){this._groups=e,this._parents=n,this._name=r,this._id=i}function Di(){return++ul}var kt=ye.prototype;Et.prototype={constructor:Et,select:Hu,selectAll:qu,selectChild:kt.selectChild,selectChildren:kt.selectChildren,filter:Iu,merge:$u,selection:Vu,transition:al,call:kt.call,nodes:kt.nodes,node:kt.node,size:kt.size,empty:kt.empty,each:kt.each,on:Fu,attr:mu,attrTween:Au,style:Zu,styleTween:Ju,text:nl,textTween:ol,remove:Lu,tween:hu,delay:Mu,duration:Ou,ease:Ru,easeVarying:Nu,end:sl,[Symbol.iterator]:kt[Symbol.iterator]};function ll(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var fl={time:null,delay:0,duration:250,ease:ll};function cl(e,n){for(var r;!(r=e.__transition)||!(r=r[n]);)if(!(e=e.parentNode))throw new Error(`transition ${n} not found`);return r}function hl(e){var n,r;e instanceof Et?(n=e._id,e=e._name):(n=Di(),(r=fl).time=Fn(),e=e==null?null:e+"");for(var i=this._groups,o=i.length,a=0;a<o;++a)for(var s=i[a],u=s.length,l,f=0;f<u;++f)(l=s[f])&&Ye(l,e,n,f,s,r||cl(l,n));return new Et(i,this._parents,e,n)}ye.prototype.interrupt=lu;ye.prototype.transition=hl;const Ae=e=>()=>e;function dl(e,{sourceEvent:n,target:r,transform:i,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function Tt(e,n,r){this.k=e,this.x=n,this.y=r}Tt.prototype={constructor:Tt,scale:function(e){return e===1?this:new Tt(this.k*e,this.x,this.y)},translate:function(e,n){return e===0&n===0?this:new Tt(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 qn=new Tt(1,0,0);gt.prototype=Tt.prototype;function gt(e){for(;!e.__zoom;)if(!(e=e.parentNode))return qn;return e.__zoom}function on(e){e.stopImmediatePropagation()}function Yt(e){e.preventDefault(),e.stopImmediatePropagation()}function pl(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function gl(){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 br(){return this.__zoom||qn}function yl(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function _l(){return navigator.maxTouchPoints||"ontouchstart"in this}function vl(e,n,r){var i=e.invertX(n[0][0])-r[0][0],o=e.invertX(n[1][0])-r[1][0],a=e.invertY(n[0][1])-r[0][1],s=e.invertY(n[1][1])-r[1][1];return e.translate(o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o),s>a?(a+s)/2:Math.min(0,a)||Math.max(0,s))}function ml(){var e=pl,n=gl,r=vl,i=yl,o=_l,a=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],u=250,l=eu,f=_e("start","zoom","end"),h,c,d,p=500,y=150,m=0,_=10;function g(k){k.property("__zoom",br).on("wheel.zoom",M,{passive:!1}).on("mousedown.zoom",E).on("dblclick.zoom",P).filter(o).on("touchstart.zoom",z).on("touchmove.zoom",N).on("touchend.zoom touchcancel.zoom",j).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}g.transform=function(k,R,T,I){var D=k.selection?k.selection():k;D.property("__zoom",br),k!==D?b(k,R,T,I):D.interrupt().each(function(){A(this,arguments).event(I).start().zoom(null,typeof R=="function"?R.apply(this,arguments):R).end()})},g.scaleBy=function(k,R,T,I){g.scaleTo(k,function(){var D=this.__zoom.k,F=typeof R=="function"?R.apply(this,arguments):R;return D*F},T,I)},g.scaleTo=function(k,R,T,I){g.transform(k,function(){var D=n.apply(this,arguments),F=this.__zoom,U=T==null?x(D):typeof T=="function"?T.apply(this,arguments):T,L=F.invert(U),H=typeof R=="function"?R.apply(this,arguments):R;return r(C(w(F,H),U,L),D,s)},T,I)},g.translateBy=function(k,R,T,I){g.transform(k,function(){return r(this.__zoom.translate(typeof R=="function"?R.apply(this,arguments):R,typeof T=="function"?T.apply(this,arguments):T),n.apply(this,arguments),s)},null,I)},g.translateTo=function(k,R,T,I,D){g.transform(k,function(){var F=n.apply(this,arguments),U=this.__zoom,L=I==null?x(F):typeof I=="function"?I.apply(this,arguments):I;return r(qn.translate(L[0],L[1]).scale(U.k).translate(typeof R=="function"?-R.apply(this,arguments):-R,typeof T=="function"?-T.apply(this,arguments):-T),F,s)},I,D)};function w(k,R){return R=Math.max(a[0],Math.min(a[1],R)),R===k.k?k:new Tt(R,k.x,k.y)}function C(k,R,T){var I=R[0]-T[0]*k.k,D=R[1]-T[1]*k.k;return I===k.x&&D===k.y?k:new Tt(k.k,I,D)}function x(k){return[(+k[0][0]+ +k[1][0])/2,(+k[0][1]+ +k[1][1])/2]}function b(k,R,T,I){k.on("start.zoom",function(){A(this,arguments).event(I).start()}).on("interrupt.zoom end.zoom",function(){A(this,arguments).event(I).end()}).tween("zoom",function(){var D=this,F=arguments,U=A(D,F).event(I),L=n.apply(D,F),H=T==null?x(L):typeof T=="function"?T.apply(D,F):T,Y=Math.max(L[1][0]-L[0][0],L[1][1]-L[0][1]),X=D.__zoom,lt=typeof R=="function"?R.apply(D,F):R,bt=l(X.invert(H).concat(Y/X.k),lt.invert(H).concat(Y/lt.k));return function(ft){if(ft===1)ft=lt;else{var wt=bt(ft),tn=Y/wt[2];ft=new Tt(tn,H[0]-wt[0]*tn,H[1]-wt[1]*tn)}U.zoom(null,ft)}})}function A(k,R,T){return!T&&k.__zooming||new S(k,R)}function S(k,R){this.that=k,this.args=R,this.active=0,this.sourceEvent=null,this.extent=n.apply(k,R),this.taps=0}S.prototype={event:function(k){return k&&(this.sourceEvent=k),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(k,R){return this.mouse&&k!=="mouse"&&(this.mouse[1]=R.invert(this.mouse[0])),this.touch0&&k!=="touch"&&(this.touch0[1]=R.invert(this.touch0[0])),this.touch1&&k!=="touch"&&(this.touch1[1]=R.invert(this.touch1[0])),this.that.__zoom=R,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(k){var R=st(this.that).datum();f.call(k,this.that,new dl(k,{sourceEvent:this.sourceEvent,target:g,transform:this.that.__zoom,dispatch:f}),R)}};function M(k,...R){if(!e.apply(this,arguments))return;var T=A(this,R).event(k),I=this.__zoom,D=Math.max(a[0],Math.min(a[1],I.k*Math.pow(2,i.apply(this,arguments)))),F=yt(k);if(T.wheel)(T.mouse[0][0]!==F[0]||T.mouse[0][1]!==F[1])&&(T.mouse[1]=I.invert(T.mouse[0]=F)),clearTimeout(T.wheel);else{if(I.k===D)return;T.mouse=[F,I.invert(F)],Oe(this),T.start()}Yt(k),T.wheel=setTimeout(U,y),T.zoom("mouse",r(C(w(I,D),T.mouse[0],T.mouse[1]),T.extent,s));function U(){T.wheel=null,T.end()}}function E(k,...R){if(d||!e.apply(this,arguments))return;var T=k.currentTarget,I=A(this,R,!0).event(k),D=st(k.view).on("mousemove.zoom",H,!0).on("mouseup.zoom",Y,!0),F=yt(k,T),U=k.clientX,L=k.clientY;Ai(k.view),on(k),I.mouse=[F,this.__zoom.invert(F)],Oe(this),I.start();function H(X){if(Yt(X),!I.moved){var lt=X.clientX-U,bt=X.clientY-L;I.moved=lt*lt+bt*bt>m}I.event(X).zoom("mouse",r(C(I.that.__zoom,I.mouse[0]=yt(X,T),I.mouse[1]),I.extent,s))}function Y(X){D.on("mousemove.zoom mouseup.zoom",null),Ci(X.view,I.moved),Yt(X),I.event(X).end()}}function P(k,...R){if(e.apply(this,arguments)){var T=this.__zoom,I=yt(k.changedTouches?k.changedTouches[0]:k,this),D=T.invert(I),F=T.k*(k.shiftKey?.5:2),U=r(C(w(T,F),I,D),n.apply(this,R),s);Yt(k),u>0?st(this).transition().duration(u).call(b,U,I,k):st(this).call(g.transform,U,I,k)}}function z(k,...R){if(e.apply(this,arguments)){var T=k.touches,I=T.length,D=A(this,R,k.changedTouches.length===I).event(k),F,U,L,H;for(on(k),U=0;U<I;++U)L=T[U],H=yt(L,this),H=[H,this.__zoom.invert(H),L.identifier],D.touch0?!D.touch1&&D.touch0[2]!==H[2]&&(D.touch1=H,D.taps=0):(D.touch0=H,F=!0,D.taps=1+!!h);h&&(h=clearTimeout(h)),F&&(D.taps<2&&(c=H[0],h=setTimeout(function(){h=null},p)),Oe(this),D.start())}}function N(k,...R){if(this.__zooming){var T=A(this,R).event(k),I=k.changedTouches,D=I.length,F,U,L,H;for(Yt(k),F=0;F<D;++F)U=I[F],L=yt(U,this),T.touch0&&T.touch0[2]===U.identifier?T.touch0[0]=L:T.touch1&&T.touch1[2]===U.identifier&&(T.touch1[0]=L);if(U=T.that.__zoom,T.touch1){var Y=T.touch0[0],X=T.touch0[1],lt=T.touch1[0],bt=T.touch1[1],ft=(ft=lt[0]-Y[0])*ft+(ft=lt[1]-Y[1])*ft,wt=(wt=bt[0]-X[0])*wt+(wt=bt[1]-X[1])*wt;U=w(U,Math.sqrt(ft/wt)),L=[(Y[0]+lt[0])/2,(Y[1]+lt[1])/2],H=[(X[0]+bt[0])/2,(X[1]+bt[1])/2]}else if(T.touch0)L=T.touch0[0],H=T.touch0[1];else return;T.zoom("touch",r(C(U,L,H),T.extent,s))}}function j(k,...R){if(this.__zooming){var T=A(this,R).event(k),I=k.changedTouches,D=I.length,F,U;for(on(k),d&&clearTimeout(d),d=setTimeout(function(){d=null},p),F=0;F<D;++F)U=I[F],T.touch0&&T.touch0[2]===U.identifier?delete T.touch0:T.touch1&&T.touch1[2]===U.identifier&&delete T.touch1;if(T.touch1&&!T.touch0&&(T.touch0=T.touch1,delete T.touch1),T.touch0)T.touch0[1]=this.__zoom.invert(T.touch0[0]);else if(T.end(),T.taps===2&&(U=yt(U,this),Math.hypot(c[0]-U[0],c[1]-U[1])<_)){var L=st(this).on("dblclick.zoom");L&&L.apply(this,arguments)}}}return g.wheelDelta=function(k){return arguments.length?(i=typeof k=="function"?k:Ae(+k),g):i},g.filter=function(k){return arguments.length?(e=typeof k=="function"?k:Ae(!!k),g):e},g.touchable=function(k){return arguments.length?(o=typeof k=="function"?k:Ae(!!k),g):o},g.extent=function(k){return arguments.length?(n=typeof k=="function"?k:Ae([[+k[0][0],+k[0][1]],[+k[1][0],+k[1][1]]]),g):n},g.scaleExtent=function(k){return arguments.length?(a[0]=+k[0],a[1]=+k[1],g):[a[0],a[1]]},g.translateExtent=function(k){return arguments.length?(s[0][0]=+k[0][0],s[1][0]=+k[1][0],s[0][1]=+k[0][1],s[1][1]=+k[1][1],g):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},g.constrain=function(k){return arguments.length?(r=k,g):r},g.duration=function(k){return arguments.length?(u=+k,g):u},g.interpolate=function(k){return arguments.length?(l=k,g):l},g.on=function(){var k=f.on.apply(f,arguments);return k===f?g:k},g.clickDistance=function(k){return arguments.length?(m=(k=+k)*k,g):Math.sqrt(m)},g.tapDistance=function(k){return arguments.length?(_=+k,g):_},g}class wr extends Map{constructor(n,r=wl){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),n!=null)for(const[i,o]of n)this.set(i,o)}get(n){return super.get(kr(this,n))}has(n){return super.has(kr(this,n))}set(n,r){return super.set(xl(this,n),r)}delete(n){return super.delete(bl(this,n))}}function kr({_intern:e,_key:n},r){const i=n(r);return e.has(i)?e.get(i):r}function xl({_intern:e,_key:n},r){const i=n(r);return e.has(i)?e.get(i):(e.set(i,r),r)}function bl({_intern:e,_key:n},r){const i=n(r);return e.has(i)&&(r=e.get(i),e.delete(i)),r}function wl(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Ar(e,n){let r;if(n===void 0)for(const i of e)i!=null&&(r<i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let o of e)(o=n(o,++i,e))!=null&&(r<o||r===void 0&&o>=o)&&(r=o)}return r}function Cr(e,n){let r;if(n===void 0)for(const i of e)i!=null&&(r>i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let o of e)(o=n(o,++i,e))!=null&&(r>o||r===void 0&&o>=o)&&(r=o)}return r}function kl(e,n){let r=0;for(let i of e)(i=+i)&&(r+=i);return r}var Al=typeof global=="object"&&global&&global.Object===Object&&global,Cl=typeof self=="object"&&self&&self.Object===Object&&self,ji=Al||Cl||Function("return this")(),Fe=ji.Symbol,Fi=Object.prototype,Sl=Fi.hasOwnProperty,Ml=Fi.toString,Zt=Fe?Fe.toStringTag:void 0;function Tl(e){var n=Sl.call(e,Zt),r=e[Zt];try{e[Zt]=void 0;var i=!0}catch{}var o=Ml.call(e);return i&&(n?e[Zt]=r:delete e[Zt]),o}var Pl=Object.prototype,Ol=Pl.toString;function El(e){return Ol.call(e)}var Rl="[object Null]",zl="[object Undefined]",Sr=Fe?Fe.toStringTag:void 0;function Nl(e){return e==null?e===void 0?zl:Rl:Sr&&Sr in Object(e)?Tl(e):El(e)}function Il(e){return e!=null&&typeof e=="object"}var $l="[object Symbol]";function Dl(e){return typeof e=="symbol"||Il(e)&&Nl(e)==$l}var jl=/\s/;function Fl(e){for(var n=e.length;n--&&jl.test(e.charAt(n)););return n}var Ul=/^\s+/;function Ll(e){return e&&e.slice(0,Fl(e)+1).replace(Ul,"")}function Ue(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}var Mr=NaN,Hl=/^[-+]0x[0-9a-f]+$/i,ql=/^0b[01]+$/i,Gl=/^0o[0-7]+$/i,Vl=parseInt;function Tr(e){if(typeof e=="number")return e;if(Dl(e))return Mr;if(Ue(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=Ue(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=Ll(e);var r=ql.test(e);return r||Gl.test(e)?Vl(e.slice(2),r?2:8):Hl.test(e)?Mr:+e}var an=function(){return ji.Date.now()},Wl="Expected a function",Bl=Math.max,Xl=Math.min;function Ui(e,n,r){var i,o,a,s,u,l,f=0,h=!1,c=!1,d=!0;if(typeof e!="function")throw new TypeError(Wl);n=Tr(n)||0,Ue(r)&&(h=!!r.leading,c="maxWait"in r,a=c?Bl(Tr(r.maxWait)||0,n):a,d="trailing"in r?!!r.trailing:d);function p(A){var S=i,M=o;return i=o=void 0,f=A,s=e.apply(M,S),s}function y(A){return f=A,u=setTimeout(g,n),h?p(A):s}function m(A){var S=A-l,M=A-f,E=n-S;return c?Xl(E,a-M):E}function _(A){var S=A-l,M=A-f;return l===void 0||S>=n||S<0||c&&M>=a}function g(){var A=an();if(_(A))return w(A);u=setTimeout(g,m(A))}function w(A){return u=void 0,d&&i?p(A):(i=o=void 0,s)}function C(){u!==void 0&&clearTimeout(u),f=0,i=l=o=u=void 0}function x(){return u===void 0?s:w(an())}function b(){var A=an(),S=_(A);if(i=arguments,o=this,l=A,S){if(u===void 0)return y(l);if(c)return clearTimeout(u),u=setTimeout(g,n),p(l)}return u===void 0&&(u=setTimeout(g,n)),s}return b.cancel=C,b.flush=x,b}var Yl="Expected a function";function Zl(e,n,r){var i=!0,o=!0;if(typeof e!="function")throw new TypeError(Yl);return Ue(r)&&(i="leading"in r?!!r.leading:i,o="trailing"in r?!!r.trailing:o),Ui(e,n,{leading:i,maxWait:n,trailing:o})}var Ft=Object.freeze({Linear:Object.freeze({None:function(e){return e},In:function(e){return e},Out:function(e){return e},InOut:function(e){return e}}),Quadratic:Object.freeze({In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}}),Cubic:Object.freeze({In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}}),Quartic:Object.freeze({In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}}),Quintic:Object.freeze({In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}}),Sinusoidal:Object.freeze({In:function(e){return 1-Math.sin((1-e)*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return .5*(1-Math.sin(Math.PI*(.5-e)))}}),Exponential:Object.freeze({In:function(e){return e===0?0:Math.pow(1024,e-1)},Out:function(e){return e===1?1:1-Math.pow(2,-10*e)},InOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)}}),Circular:Object.freeze({In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}}),Elastic:Object.freeze({In:function(e){return e===0?0:e===1?1:-Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI)},Out:function(e){return e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e-.1)*5*Math.PI)+1},InOut:function(e){return e===0?0:e===1?1:(e*=2,e<1?-.5*Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI):.5*Math.pow(2,-10*(e-1))*Math.sin((e-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(e){var n=1.70158;return e===1?1:e*e*((n+1)*e-n)},Out:function(e){var n=1.70158;return e===0?0:--e*e*((n+1)*e+n)+1},InOut:function(e){var n=2.5949095;return(e*=2)<1?.5*(e*e*((n+1)*e-n)):.5*((e-=2)*e*((n+1)*e+n)+2)}}),Bounce:Object.freeze({In:function(e){return 1-Ft.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?Ft.Bounce.In(e*2)*.5:Ft.Bounce.Out(e*2-1)*.5+.5}}),generatePow:function(e){return e===void 0&&(e=4),e=e<Number.EPSILON?Number.EPSILON:e,e=e>1e4?1e4:e,{In:function(n){return Math.pow(n,e)},Out:function(n){return 1-Math.pow(1-n,e)},InOut:function(n){return n<.5?Math.pow(n*2,e)/2:(1-Math.pow(2-n*2,e))/2+.5}}}}),ie=function(){return performance.now()},Li=(function(){function e(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,n)}return e.prototype.getAll=function(){var n=this;return Object.keys(this._tweens).map(function(r){return n._tweens[r]})},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];for(var o=0,a=r;o<a.length;o++){var s=a[o];(n=s._group)===null||n===void 0||n.remove(s),s._group=this,this._tweens[s.getId()]=s,this._tweensAddedDuringUpdate[s.getId()]=s}},e.prototype.remove=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];for(var i=0,o=n;i<o.length;i++){var a=o[i];a._group=void 0,delete this._tweens[a.getId()],delete this._tweensAddedDuringUpdate[a.getId()]}},e.prototype.allStopped=function(){return this.getAll().every(function(n){return!n.isPlaying()})},e.prototype.update=function(n,r){n===void 0&&(n=ie()),r===void 0&&(r=!0);var i=Object.keys(this._tweens);if(i.length!==0)for(;i.length>0;){this._tweensAddedDuringUpdate={};for(var o=0;o<i.length;o++){var a=this._tweens[i[o]],s=!r;a&&a.update(n,s)===!1&&!r&&this.remove(a)}i=Object.keys(this._tweensAddedDuringUpdate)}},e})(),Cn={Linear:function(e,n){var r=e.length-1,i=r*n,o=Math.floor(i),a=Cn.Utils.Linear;return n<0?a(e[0],e[1],i):n>1?a(e[r],e[r-1],r-i):a(e[o],e[o+1>r?r:o+1],i-o)},Utils:{Linear:function(e,n,r){return(n-e)*r+e}}},Hi=(function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e})(),Sn=new Li,Pr=(function(){function e(n,r){this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=Ft.Linear.None,this._interpolationFunction=Cn.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=Hi.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=n,typeof r=="object"?(this._group=r,r.add(this)):r===!0&&(this._group=Sn,Sn.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(n,r){if(r===void 0&&(r=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=n,this._propertiesAreSetUp=!1,this._duration=r<0?0:r,this},e.prototype.duration=function(n){return n===void 0&&(n=1e3),this._duration=n<0?0:n,this},e.prototype.dynamic=function(n){return n===void 0&&(n=!1),this._isDynamic=n,this},e.prototype.start=function(n,r){if(n===void 0&&(n=ie()),r===void 0&&(r=!1),this._isPlaying)return this;if(this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var i in this._valuesStartRepeat)this._swapEndStartRepeatValues(i),this._valuesStart[i]=this._valuesStartRepeat[i]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=n,this._startTime+=this._delayTime,!this._propertiesAreSetUp||r){if(this._propertiesAreSetUp=!0,!this._isDynamic){var o={};for(var a in this._valuesEnd)o[a]=this._valuesEnd[a];this._valuesEnd=o}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,r)}return this},e.prototype.startFromCurrentValues=function(n){return this.start(n,!0)},e.prototype._setupProperties=function(n,r,i,o,a){for(var s in i){var u=n[s],l=Array.isArray(u),f=l?"array":typeof u,h=!l&&Array.isArray(i[s]);if(!(f==="undefined"||f==="function")){if(h){var c=i[s];if(c.length===0)continue;for(var d=[u],p=0,y=c.length;p<y;p+=1){var m=this._handleRelativeValue(u,c[p]);if(isNaN(m)){h=!1,console.warn("Found invalid interpolation list. Skipping.");break}d.push(m)}h&&(i[s]=d)}if((f==="object"||l)&&u&&!h){r[s]=l?[]:{};var _=u;for(var g in _)r[s][g]=_[g];o[s]=l?[]:{};var c=i[s];if(!this._isDynamic){var w={};for(var g in c)w[g]=c[g];i[s]=c=w}this._setupProperties(_,r[s],c,o[s],a)}else(typeof r[s]>"u"||a)&&(r[s]=u),l||(r[s]*=1),h?o[s]=i[s].slice().reverse():o[s]=r[s]||0}}},e.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._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(n){return n===void 0&&(n=ie()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=n,this)},e.prototype.resume=function(n){return n===void 0&&(n=ie()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=n-this._pauseStart,this._pauseStart=0,this)},e.prototype.stopChainedTweens=function(){for(var n=0,r=this._chainedTweens.length;n<r;n++)this._chainedTweens[n].stop();return this},e.prototype.group=function(n){return n?(n.add(this),this):(console.warn("tween.group() without args has been removed, use group.add(tween) instead."),this)},e.prototype.remove=function(){var n;return(n=this._group)===null||n===void 0||n.remove(this),this},e.prototype.delay=function(n){return n===void 0&&(n=0),this._delayTime=n,this},e.prototype.repeat=function(n){return n===void 0&&(n=0),this._initialRepeat=n,this._repeat=n,this},e.prototype.repeatDelay=function(n){return this._repeatDelayTime=n,this},e.prototype.yoyo=function(n){return n===void 0&&(n=!1),this._yoyo=n,this},e.prototype.easing=function(n){return n===void 0&&(n=Ft.Linear.None),this._easingFunction=n,this},e.prototype.interpolation=function(n){return n===void 0&&(n=Cn.Linear),this._interpolationFunction=n,this},e.prototype.chain=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return this._chainedTweens=n,this},e.prototype.onStart=function(n){return this._onStartCallback=n,this},e.prototype.onEveryStart=function(n){return this._onEveryStartCallback=n,this},e.prototype.onUpdate=function(n){return this._onUpdateCallback=n,this},e.prototype.onRepeat=function(n){return this._onRepeatCallback=n,this},e.prototype.onComplete=function(n){return this._onCompleteCallback=n,this},e.prototype.onStop=function(n){return this._onStopCallback=n,this},e.prototype.update=function(n,r){var i=this,o;if(n===void 0&&(n=ie()),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 s=n-this._startTime,u=this._duration+((o=this._repeatDelayTime)!==null&&o!==void 0?o:this._delayTime),l=this._duration+this._repeat*u,f=function(){if(i._duration===0||s>l)return 1;var m=Math.trunc(s/u),_=s-m*u,g=Math.min(_/i._duration,1);return g===0&&s===i._duration?1:g},h=f(),c=this._easingFunction(h);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,c),this._onUpdateCallback&&this._onUpdateCallback(this._object,h),this._duration===0||s>=this._duration)if(this._repeat>0){var d=Math.min(Math.trunc((s-this._duration)/u)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=d);for(a in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[a]=="string"&&(this._valuesStartRepeat[a]=this._valuesStartRepeat[a]+parseFloat(this._valuesEnd[a])),this._yoyo&&this._swapEndStartRepeatValues(a),this._valuesStart[a]=this._valuesStartRepeat[a];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=u*d,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var p=0,y=this._chainedTweens.length;p<y;p++)this._chainedTweens[p].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},e.prototype._updateProperties=function(n,r,i,o){for(var a in i)if(r[a]!==void 0){var s=r[a]||0,u=i[a],l=Array.isArray(n[a]),f=Array.isArray(u),h=!l&&f;h?n[a]=this._interpolationFunction(u,o):typeof u=="object"&&u?this._updateProperties(n[a],s,u,o):(u=this._handleRelativeValue(s,u),typeof u=="number"&&(n[a]=s+(u-s)*o))}},e.prototype._handleRelativeValue=function(n,r){return typeof r!="string"?r:r.charAt(0)==="+"||r.charAt(0)==="-"?n+parseFloat(r):parseFloat(r)},e.prototype._swapEndStartRepeatValues=function(n){var r=this._valuesStartRepeat[n],i=this._valuesEnd[n];typeof i=="string"?this._valuesStartRepeat[n]=this._valuesStartRepeat[n]+parseFloat(i):this._valuesStartRepeat[n]=this._valuesEnd[n],this._valuesEnd[n]=r},e.autoStartOnUpdate=!1,e})();Hi.nextId;var mt=Sn;mt.getAll.bind(mt);mt.removeAll.bind(mt);mt.add.bind(mt);mt.remove.bind(mt);mt.update.bind(mt);function Or(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function Kl(e){if(Array.isArray(e))return e}function Ql(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Jl(e,n,r){return Object.defineProperty(e,"prototype",{writable:!1}),e}function tf(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,a,s,u=[],l=!0,f=!1;try{if(a=(r=r.call(e)).next,n!==0)for(;!(l=(i=a.call(r)).done)&&(u.push(i.value),u.length!==n);l=!0);}catch(h){f=!0,o=h}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw o}}return u}}function ef(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
6
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nf(e,n){return Kl(e)||tf(e,n)||rf(e,n)||ef()}function rf(e,n){if(e){if(typeof e=="string")return Or(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)?Or(e,n):void 0}}var of=Jl(function e(n,r){var i=r.default,o=i===void 0?null:i,a=r.triggerUpdate,s=a===void 0?!0:a,u=r.onChange,l=u===void 0?function(f,h){}:u;Ql(this,e),this.name=n,this.defaultVal=o,this.triggerUpdate=s,this.onChange=l});function Gn(e){var n=e.stateInit,r=n===void 0?function(){return{}}:n,i=e.props,o=i===void 0?{}:i,a=e.methods,s=a===void 0?{}:a,u=e.aliases,l=u===void 0?{}:u,f=e.init,h=f===void 0?function(){}:f,c=e.update,d=c===void 0?function(){}:c,p=Object.keys(o).map(function(y){return new of(y,o[y])});return function y(){for(var m=arguments.length,_=new Array(m),g=0;g<m;g++)_[g]=arguments[g];var w=!!(this instanceof y&&this.constructor),C=w?_.shift():void 0,x=_[0],b=x===void 0?{}:x,A=Object.assign({},r instanceof Function?r(b):r,{initialised:!1}),S={};function M(z){return E(z,b),P(),M}var E=function(N,j){h.call(M,N,A,j),A.initialised=!0},P=Ui(function(){A.initialised&&(d.call(M,A,S),S={})},1);return p.forEach(function(z){M[z.name]=N(z);function N(j){var k=j.name,R=j.triggerUpdate,T=R===void 0?!1:R,I=j.onChange,D=I===void 0?function(L,H){}:I,F=j.defaultVal,U=F===void 0?null:F;return function(L){var H=A[k];if(!arguments.length)return H;var Y=L===void 0?U:L;return A[k]=Y,D.call(M,Y,A,H),!S.hasOwnProperty(k)&&(S[k]=H),T&&P(),M}}}),Object.keys(s).forEach(function(z){M[z]=function(){for(var N,j=arguments.length,k=new Array(j),R=0;R<j;R++)k[R]=arguments[R];return(N=s[z]).call.apply(N,[M,A].concat(k))}}),Object.entries(l).forEach(function(z){var N=nf(z,2),j=N[0],k=N[1];return M[j]=M[k]}),M.resetProps=function(){return p.forEach(function(z){M[z.name](z.defaultVal)}),M},M.resetProps(),A._rerender=P,w&&C&&M(C),M}}var q=(function(e){return typeof e=="function"?e:typeof e=="string"?function(n){return n[e]}:function(n){return e}});function Le(e){"@babel/helpers - typeof";return Le=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Le(e)}var af=/^\s+/,sf=/\s+$/;function $(e,n){if(e=e||"",n=n||{},e instanceof $)return e;if(!(this instanceof $))return new $(e,n);var r=uf(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=n.format||r.format,this._gradientType=n.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}$.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var n=this.toRgb();return(n.r*299+n.g*587+n.b*114)/1e3},getLuminance:function(){var n=this.toRgb(),r,i,o,a,s,u;return r=n.r/255,i=n.g/255,o=n.b/255,r<=.03928?a=r/12.92:a=Math.pow((r+.055)/1.055,2.4),i<=.03928?s=i/12.92:s=Math.pow((i+.055)/1.055,2.4),o<=.03928?u=o/12.92:u=Math.pow((o+.055)/1.055,2.4),.2126*a+.7152*s+.0722*u},setAlpha:function(n){return this._a=qi(n),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var n=Rr(this._r,this._g,this._b);return{h:n.h*360,s:n.s,v:n.v,a:this._a}},toHsvString:function(){var n=Rr(this._r,this._g,this._b),r=Math.round(n.h*360),i=Math.round(n.s*100),o=Math.round(n.v*100);return this._a==1?"hsv("+r+", "+i+"%, "+o+"%)":"hsva("+r+", "+i+"%, "+o+"%, "+this._roundA+")"},toHsl:function(){var n=Er(this._r,this._g,this._b);return{h:n.h*360,s:n.s,l:n.l,a:this._a}},toHslString:function(){var n=Er(this._r,this._g,this._b),r=Math.round(n.h*360),i=Math.round(n.s*100),o=Math.round(n.l*100);return this._a==1?"hsl("+r+", "+i+"%, "+o+"%)":"hsla("+r+", "+i+"%, "+o+"%, "+this._roundA+")"},toHex:function(n){return zr(this._r,this._g,this._b,n)},toHexString:function(n){return"#"+this.toHex(n)},toHex8:function(n){return hf(this._r,this._g,this._b,this._a,n)},toHex8String:function(n){return"#"+this.toHex8(n)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(W(this._r,255)*100)+"%",g:Math.round(W(this._g,255)*100)+"%",b:Math.round(W(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(W(this._r,255)*100)+"%, "+Math.round(W(this._g,255)*100)+"%, "+Math.round(W(this._b,255)*100)+"%)":"rgba("+Math.round(W(this._r,255)*100)+"%, "+Math.round(W(this._g,255)*100)+"%, "+Math.round(W(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:Af[zr(this._r,this._g,this._b,!0)]||!1},toFilter:function(n){var r="#"+Nr(this._r,this._g,this._b,this._a),i=r,o=this._gradientType?"GradientType = 1, ":"";if(n){var a=$(n);i="#"+Nr(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+o+"startColorstr="+r+",endColorstr="+i+")"},toString:function(n){var r=!!n;n=n||this._format;var i=!1,o=this._a<1&&this._a>=0,a=!r&&o&&(n==="hex"||n==="hex6"||n==="hex3"||n==="hex4"||n==="hex8"||n==="name");return a?n==="name"&&this._a===0?this.toName():this.toRgbString():(n==="rgb"&&(i=this.toRgbString()),n==="prgb"&&(i=this.toPercentageRgbString()),(n==="hex"||n==="hex6")&&(i=this.toHexString()),n==="hex3"&&(i=this.toHexString(!0)),n==="hex4"&&(i=this.toHex8String(!0)),n==="hex8"&&(i=this.toHex8String()),n==="name"&&(i=this.toName()),n==="hsl"&&(i=this.toHslString()),n==="hsv"&&(i=this.toHsvString()),i||this.toHexString())},clone:function(){return $(this.toString())},_applyModification:function(n,r){var i=n.apply(null,[this].concat([].slice.call(r)));return this._r=i._r,this._g=i._g,this._b=i._b,this.setAlpha(i._a),this},lighten:function(){return this._applyModification(yf,arguments)},brighten:function(){return this._applyModification(_f,arguments)},darken:function(){return this._applyModification(vf,arguments)},desaturate:function(){return this._applyModification(df,arguments)},saturate:function(){return this._applyModification(pf,arguments)},greyscale:function(){return this._applyModification(gf,arguments)},spin:function(){return this._applyModification(mf,arguments)},_applyCombination:function(n,r){return n.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(wf,arguments)},complement:function(){return this._applyCombination(xf,arguments)},monochromatic:function(){return this._applyCombination(kf,arguments)},splitcomplement:function(){return this._applyCombination(bf,arguments)},triad:function(){return this._applyCombination(Ir,[3])},tetrad:function(){return this._applyCombination(Ir,[4])}};$.fromRatio=function(e,n){if(Le(e)=="object"){var r={};for(var i in e)e.hasOwnProperty(i)&&(i==="a"?r[i]=e[i]:r[i]=oe(e[i]));e=r}return $(e,n)};function uf(e){var n={r:0,g:0,b:0},r=1,i=null,o=null,a=null,s=!1,u=!1;return typeof e=="string"&&(e=Tf(e)),Le(e)=="object"&&(At(e.r)&&At(e.g)&&At(e.b)?(n=lf(e.r,e.g,e.b),s=!0,u=String(e.r).substr(-1)==="%"?"prgb":"rgb"):At(e.h)&&At(e.s)&&At(e.v)?(i=oe(e.s),o=oe(e.v),n=cf(e.h,i,o),s=!0,u="hsv"):At(e.h)&&At(e.s)&&At(e.l)&&(i=oe(e.s),a=oe(e.l),n=ff(e.h,i,a),s=!0,u="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=qi(r),{ok:s,format:e.format||u,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:r}}function lf(e,n,r){return{r:W(e,255)*255,g:W(n,255)*255,b:W(r,255)*255}}function Er(e,n,r){e=W(e,255),n=W(n,255),r=W(r,255);var i=Math.max(e,n,r),o=Math.min(e,n,r),a,s,u=(i+o)/2;if(i==o)a=s=0;else{var l=i-o;switch(s=u>.5?l/(2-i-o):l/(i+o),i){case e:a=(n-r)/l+(n<r?6:0);break;case n:a=(r-e)/l+2;break;case r:a=(e-n)/l+4;break}a/=6}return{h:a,s,l:u}}function ff(e,n,r){var i,o,a;e=W(e,360),n=W(n,100),r=W(r,100);function s(f,h,c){return c<0&&(c+=1),c>1&&(c-=1),c<1/6?f+(h-f)*6*c:c<1/2?h:c<2/3?f+(h-f)*(2/3-c)*6:f}if(n===0)i=o=a=r;else{var u=r<.5?r*(1+n):r+n-r*n,l=2*r-u;i=s(l,u,e+1/3),o=s(l,u,e),a=s(l,u,e-1/3)}return{r:i*255,g:o*255,b:a*255}}function Rr(e,n,r){e=W(e,255),n=W(n,255),r=W(r,255);var i=Math.max(e,n,r),o=Math.min(e,n,r),a,s,u=i,l=i-o;if(s=i===0?0:l/i,i==o)a=0;else{switch(i){case e:a=(n-r)/l+(n<r?6:0);break;case n:a=(r-e)/l+2;break;case r:a=(e-n)/l+4;break}a/=6}return{h:a,s,v:u}}function cf(e,n,r){e=W(e,360)*6,n=W(n,100),r=W(r,100);var i=Math.floor(e),o=e-i,a=r*(1-n),s=r*(1-o*n),u=r*(1-(1-o)*n),l=i%6,f=[r,s,a,a,u,r][l],h=[u,r,r,s,a,a][l],c=[a,a,u,r,r,s][l];return{r:f*255,g:h*255,b:c*255}}function zr(e,n,r,i){var o=[dt(Math.round(e).toString(16)),dt(Math.round(n).toString(16)),dt(Math.round(r).toString(16))];return i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function hf(e,n,r,i,o){var a=[dt(Math.round(e).toString(16)),dt(Math.round(n).toString(16)),dt(Math.round(r).toString(16)),dt(Gi(i))];return o&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function Nr(e,n,r,i){var o=[dt(Gi(i)),dt(Math.round(e).toString(16)),dt(Math.round(n).toString(16)),dt(Math.round(r).toString(16))];return o.join("")}$.equals=function(e,n){return!e||!n?!1:$(e).toRgbString()==$(n).toRgbString()};$.random=function(){return $.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function df(e,n){n=n===0?0:n||10;var r=$(e).toHsl();return r.s-=n/100,r.s=Ze(r.s),$(r)}function pf(e,n){n=n===0?0:n||10;var r=$(e).toHsl();return r.s+=n/100,r.s=Ze(r.s),$(r)}function gf(e){return $(e).desaturate(100)}function yf(e,n){n=n===0?0:n||10;var r=$(e).toHsl();return r.l+=n/100,r.l=Ze(r.l),$(r)}function _f(e,n){n=n===0?0:n||10;var r=$(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(n/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(n/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(n/100)))),$(r)}function vf(e,n){n=n===0?0:n||10;var r=$(e).toHsl();return r.l-=n/100,r.l=Ze(r.l),$(r)}function mf(e,n){var r=$(e).toHsl(),i=(r.h+n)%360;return r.h=i<0?360+i:i,$(r)}function xf(e){var n=$(e).toHsl();return n.h=(n.h+180)%360,$(n)}function Ir(e,n){if(isNaN(n)||n<=0)throw new Error("Argument to polyad must be a positive number");for(var r=$(e).toHsl(),i=[$(e)],o=360/n,a=1;a<n;a++)i.push($({h:(r.h+a*o)%360,s:r.s,l:r.l}));return i}function bf(e){var n=$(e).toHsl(),r=n.h;return[$(e),$({h:(r+72)%360,s:n.s,l:n.l}),$({h:(r+216)%360,s:n.s,l:n.l})]}function wf(e,n,r){n=n||6,r=r||30;var i=$(e).toHsl(),o=360/r,a=[$(e)];for(i.h=(i.h-(o*n>>1)+720)%360;--n;)i.h=(i.h+o)%360,a.push($(i));return a}function kf(e,n){n=n||6;for(var r=$(e).toHsv(),i=r.h,o=r.s,a=r.v,s=[],u=1/n;n--;)s.push($({h:i,s:o,v:a})),a=(a+u)%1;return s}$.mix=function(e,n,r){r=r===0?0:r||50;var i=$(e).toRgb(),o=$(n).toRgb(),a=r/100,s={r:(o.r-i.r)*a+i.r,g:(o.g-i.g)*a+i.g,b:(o.b-i.b)*a+i.b,a:(o.a-i.a)*a+i.a};return $(s)};$.readability=function(e,n){var r=$(e),i=$(n);return(Math.max(r.getLuminance(),i.getLuminance())+.05)/(Math.min(r.getLuminance(),i.getLuminance())+.05)};$.isReadable=function(e,n,r){var i=$.readability(e,n),o,a;switch(a=!1,o=Pf(r),o.level+o.size){case"AAsmall":case"AAAlarge":a=i>=4.5;break;case"AAlarge":a=i>=3;break;case"AAAsmall":a=i>=7;break}return a};$.mostReadable=function(e,n,r){var i=null,o=0,a,s,u,l;r=r||{},s=r.includeFallbackColors,u=r.level,l=r.size;for(var f=0;f<n.length;f++)a=$.readability(e,n[f]),a>o&&(o=a,i=$(n[f]));return $.isReadable(e,i,{level:u,size:l})||!s?i:(r.includeFallbackColors=!1,$.mostReadable(e,["#fff","#000"],r))};var Mn=$.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"},Af=$.hexNames=Cf(Mn);function Cf(e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[e[r]]=r);return n}function qi(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function W(e,n){Sf(e)&&(e="100%");var r=Mf(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 Ze(e){return Math.min(1,Math.max(0,e))}function rt(e){return parseInt(e,16)}function Sf(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function Mf(e){return typeof e=="string"&&e.indexOf("%")!=-1}function dt(e){return e.length==1?"0"+e:""+e}function oe(e){return e<=1&&(e=e*100+"%"),e}function Gi(e){return Math.round(parseFloat(e)*255).toString(16)}function $r(e){return rt(e)/255}var ct=(function(){var e="[-\\+]?\\d+%?",n="[-\\+]?\\d*\\.\\d+%?",r="(?:"+n+")|(?:"+e+")",i="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",o="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+i),rgba:new RegExp("rgba"+o),hsl:new RegExp("hsl"+i),hsla:new RegExp("hsla"+o),hsv:new RegExp("hsv"+i),hsva:new RegExp("hsva"+o),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}})();function At(e){return!!ct.CSS_UNIT.exec(e)}function Tf(e){e=e.replace(af,"").replace(sf,"").toLowerCase();var n=!1;if(Mn[e])e=Mn[e],n=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=ct.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=ct.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=ct.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=ct.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=ct.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=ct.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=ct.hex8.exec(e))?{r:rt(r[1]),g:rt(r[2]),b:rt(r[3]),a:$r(r[4]),format:n?"name":"hex8"}:(r=ct.hex6.exec(e))?{r:rt(r[1]),g:rt(r[2]),b:rt(r[3]),format:n?"name":"hex"}:(r=ct.hex4.exec(e))?{r:rt(r[1]+""+r[1]),g:rt(r[2]+""+r[2]),b:rt(r[3]+""+r[3]),a:$r(r[4]+""+r[4]),format:n?"name":"hex8"}:(r=ct.hex3.exec(e))?{r:rt(r[1]+""+r[1]),g:rt(r[2]+""+r[2]),b:rt(r[3]+""+r[3]),format:n?"name":"hex"}:!1}function Pf(e){var n,r;return e=e||{level:"AA",size:"small"},n=(e.level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),n!=="AA"&&n!=="AAA"&&(n="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:n,size:r}}function Tn(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 Of(e){if(Array.isArray(e))return Tn(e)}function Vi(e,n,r){if(typeof e=="function"?e===n:e.has(n))return arguments.length<3?n:r;throw new TypeError("Private element is not present on this object")}function Ef(e,n){if(n.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Rf(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function ot(e,n){return e.get(Vi(e,n))}function Dr(e,n,r){Ef(e,n),n.set(e,r)}function jr(e,n,r){return e.set(Vi(e,n),r),r}function zf(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,Ff(i.key),i)}}function Nf(e,n,r){return n&&zf(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function If(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function $f(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
7
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Df(e){return Of(e)||If(e)||Uf(e)||$f()}function jf(e,n){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Ff(e){var n=jf(e,"string");return typeof n=="symbol"?n:n+""}function Uf(e,n){if(e){if(typeof e=="string")return Tn(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)?Tn(e,n):void 0}}var Lf=123,Hf=function(n){return"#".concat(Math.min(n,Math.pow(2,24)).toString(16).padStart(6,"0"))},Wi=function(n,r,i){return(n<<16)+(r<<8)+i},qf=function(n){var r=$(n).toRgb(),i=r.r,o=r.g,a=r.b;return Wi(i,o,a)},Fr=function(n,r){return n*Lf%Math.pow(2,r)},$t=new WeakMap,Ct=new WeakMap,Gf=(function(){function e(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:6;Rf(this,e),Dr(this,$t,void 0),Dr(this,Ct,void 0),jr(Ct,this,n),this.reset()}return Nf(e,[{key:"reset",value:function(){jr($t,this,["__reserved for background__"])}},{key:"register",value:function(r){if(ot($t,this).length>=Math.pow(2,24-ot(Ct,this)))return null;var i=ot($t,this).length,o=Fr(i,ot(Ct,this)),a=Hf(i+(o<<24-ot(Ct,this)));return ot($t,this).push(r),a}},{key:"lookup",value:function(r){if(!r)return null;var i=typeof r=="string"?qf(r):Wi.apply(void 0,Df(r));if(!i)return null;var o=i&Math.pow(2,24-ot(Ct,this))-1,a=i>>24-ot(Ct,this)&Math.pow(2,ot(Ct,this))-1;return Fr(o,ot(Ct,this))!==a||o>=ot($t,this).length?null:ot($t,this)[o]}}])})(),me,B,Bi,Xi,It,Ur,Yi,Zi,sn,Ee,ae,Ki,Vn,Pn,On,He={},qe=[],Vf=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ke=Array.isArray;function _t(e,n){for(var r in n)e[r]=n[r];return e}function Wn(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Wf(e,n,r){var i,o,a,s={};for(a in n)a=="key"?i=n[a]:a=="ref"?o=n[a]:s[a]=n[a];if(arguments.length>2&&(s.children=arguments.length>3?me.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)s[a]===void 0&&(s[a]=e.defaultProps[a]);return se(e,s,i,o,null)}function se(e,n,r,i,o){var a={type:e,props:n,key:r,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++Bi,__i:-1,__u:0};return o==null&&B.vnode!=null&&B.vnode(a),a}function Qe(e){return e.children}function Re(e,n){this.props=e,this.context=n}function Bt(e,n){if(n==null)return e.__?Bt(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"?Bt(e):null}function Bf(e){if(e.__P&&e.__d){var n=e.__v,r=n.__e,i=[],o=[],a=_t({},n);a.__v=n.__v+1,B.vnode&&B.vnode(a),Bn(e.__P,a,n,e.__n,e.__P.namespaceURI,32&n.__u?[r]:null,i,r??Bt(n),!!(32&n.__u),o),a.__v=n.__v,a.__.__k[a.__i]=a,eo(i,a,o),n.__e=n.__=null,a.__e!=r&&Qi(a)}}function Qi(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}),Qi(e)}function Lr(e){(!e.__d&&(e.__d=!0)&&It.push(e)&&!Ge.__r++||Ur!=B.debounceRendering)&&((Ur=B.debounceRendering)||Yi)(Ge)}function Ge(){try{for(var e,n=1;It.length;)It.length>n&&It.sort(Zi),e=It.shift(),n=It.length,Bf(e)}finally{It.length=Ge.__r=0}}function Ji(e,n,r,i,o,a,s,u,l,f,h){var c,d,p,y,m,_,g,w=i&&i.__k||qe,C=n.length;for(l=Xf(r,n,w,l,C),c=0;c<C;c++)(p=r.__k[c])!=null&&(d=p.__i!=-1&&w[p.__i]||He,p.__i=c,_=Bn(e,p,d,o,a,s,u,l,f,h),y=p.__e,p.ref&&d.ref!=p.ref&&(d.ref&&Xn(d.ref,null,p),h.push(p.ref,p.__c||y,p)),m==null&&y!=null&&(m=y),(g=!!(4&p.__u))||d.__k===p.__k?(l=to(p,l,e,g),g&&d.__e&&(d.__e=null)):typeof p.type=="function"&&_!==void 0?l=_:y&&(l=y.nextSibling),p.__u&=-7);return r.__e=m,l}function Xf(e,n,r,i,o){var a,s,u,l,f,h=r.length,c=h,d=0;for(e.__k=new Array(o),a=0;a<o;a++)(s=n[a])!=null&&typeof s!="boolean"&&typeof s!="function"?(typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?s=e.__k[a]=se(null,s,null,null,null):Ke(s)?s=e.__k[a]=se(Qe,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=e.__k[a]=se(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[a]=s,l=a+d,s.__=e,s.__b=e.__b+1,u=null,(f=s.__i=Yf(s,r,l,c))!=-1&&(c--,(u=r[f])&&(u.__u|=2)),u==null||u.__v==null?(f==-1&&(o>h?d--:o<h&&d++),typeof s.type!="function"&&(s.__u|=4)):f!=l&&(f==l-1?d--:f==l+1?d++:(f>l?d--:d++,s.__u|=4))):e.__k[a]=null;if(c)for(a=0;a<h;a++)(u=r[a])!=null&&(2&u.__u)==0&&(u.__e==i&&(i=Bt(u)),ro(u,u));return i}function to(e,n,r,i){var o,a;if(typeof e.type=="function"){for(o=e.__k,a=0;o&&a<o.length;a++)o[a]&&(o[a].__=e,n=to(o[a],n,r,i));return n}e.__e!=n&&(i&&(n&&e.type&&!n.parentNode&&(n=Bt(e)),r.insertBefore(e.__e,n||null)),n=e.__e);do n=n&&n.nextSibling;while(n!=null&&n.nodeType==8);return n}function Yf(e,n,r,i){var o,a,s,u=e.key,l=e.type,f=n[r],h=f!=null&&(2&f.__u)==0;if(f===null&&u==null||h&&u==f.key&&l==f.type)return r;if(i>(h?1:0)){for(o=r-1,a=r+1;o>=0||a<n.length;)if((f=n[s=o>=0?o--:a++])!=null&&(2&f.__u)==0&&u==f.key&&l==f.type)return s}return-1}function Hr(e,n,r){n[0]=="-"?e.setProperty(n,r??""):e[n]=r==null?"":typeof r!="number"||Vf.test(n)?r:r+"px"}function Ce(e,n,r,i,o){var a,s;t:if(n=="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof i=="string"&&(e.style.cssText=i=""),i)for(n in i)r&&n in r||Hr(e.style,n,"");if(r)for(n in r)i&&r[n]==i[n]||Hr(e.style,n,r[n])}else if(n[0]=="o"&&n[1]=="n")a=n!=(n=n.replace(Ki,"$1")),s=n.toLowerCase(),n=s in e||n=="onFocusOut"||n=="onFocusIn"?s.slice(2):n.slice(2),e.l||(e.l={}),e.l[n+a]=r,r?i?r[ae]=i[ae]:(r[ae]=Vn,e.addEventListener(n,a?On:Pn,a)):e.removeEventListener(n,a?On:Pn,a);else{if(o=="http://www.w3.org/2000/svg")n=n.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(n!="width"&&n!="height"&&n!="href"&&n!="list"&&n!="form"&&n!="tabIndex"&&n!="download"&&n!="rowSpan"&&n!="colSpan"&&n!="role"&&n!="popover"&&n in e)try{e[n]=r??"";break t}catch{}typeof r=="function"||(r==null||r===!1&&n[4]!="-"?e.removeAttribute(n):e.setAttribute(n,n=="popover"&&r==1?"":r))}}function qr(e){return function(n){if(this.l){var r=this.l[n.type+e];if(n[Ee]==null)n[Ee]=Vn++;else if(n[Ee]<r[ae])return;return r(B.event?B.event(n):n)}}}function Bn(e,n,r,i,o,a,s,u,l,f){var h,c,d,p,y,m,_,g,w,C,x,b,A,S,M,E=n.type;if(n.constructor!==void 0)return null;128&r.__u&&(l=!!(32&r.__u),a=[u=n.__e=r.__e]),(h=B.__b)&&h(n);t:if(typeof E=="function")try{if(g=n.props,w=E.prototype&&E.prototype.render,C=(h=E.contextType)&&i[h.__c],x=h?C?C.props.value:h.__:i,r.__c?_=(c=n.__c=r.__c).__=c.__E:(w?n.__c=c=new E(g,x):(n.__c=c=new Re(g,x),c.constructor=E,c.render=Kf),C&&C.sub(c),c.state||(c.state={}),c.__n=i,d=c.__d=!0,c.__h=[],c._sb=[]),w&&c.__s==null&&(c.__s=c.state),w&&E.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=_t({},c.__s)),_t(c.__s,E.getDerivedStateFromProps(g,c.__s))),p=c.props,y=c.state,c.__v=n,d)w&&E.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),w&&c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(w&&E.getDerivedStateFromProps==null&&g!==p&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(g,x),n.__v==r.__v||!c.__e&&c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(g,c.__s,x)===!1){n.__v!=r.__v&&(c.props=g,c.state=c.__s,c.__d=!1),n.__e=r.__e,n.__k=r.__k,n.__k.some(function(P){P&&(P.__=n)}),qe.push.apply(c.__h,c._sb),c._sb=[],c.__h.length&&s.push(c);break t}c.componentWillUpdate!=null&&c.componentWillUpdate(g,c.__s,x),w&&c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(p,y,m)})}if(c.context=x,c.props=g,c.__P=e,c.__e=!1,b=B.__r,A=0,w)c.state=c.__s,c.__d=!1,b&&b(n),h=c.render(c.props,c.state,c.context),qe.push.apply(c.__h,c._sb),c._sb=[];else do c.__d=!1,b&&b(n),h=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++A<25);c.state=c.__s,c.getChildContext!=null&&(i=_t(_t({},i),c.getChildContext())),w&&!d&&c.getSnapshotBeforeUpdate!=null&&(m=c.getSnapshotBeforeUpdate(p,y)),S=h!=null&&h.type===Qe&&h.key==null?no(h.props.children):h,u=Ji(e,Ke(S)?S:[S],n,r,i,o,a,s,u,l,f),c.base=n.__e,n.__u&=-161,c.__h.length&&s.push(c),_&&(c.__E=c.__=null)}catch(P){if(n.__v=null,l||a!=null)if(P.then){for(n.__u|=l?160:128;u&&u.nodeType==8&&u.nextSibling;)u=u.nextSibling;a[a.indexOf(u)]=null,n.__e=u}else{for(M=a.length;M--;)Wn(a[M]);En(n)}else n.__e=r.__e,n.__k=r.__k,P.then||En(n);B.__e(P,n,r)}else a==null&&n.__v==r.__v?(n.__k=r.__k,n.__e=r.__e):u=n.__e=Zf(r.__e,n,r,i,o,a,s,l,f);return(h=B.diffed)&&h(n),128&n.__u?void 0:u}function En(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(En))}function eo(e,n,r){for(var i=0;i<r.length;i++)Xn(r[i],r[++i],r[++i]);B.__c&&B.__c(n,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(a){a.call(o)})}catch(a){B.__e(a,o.__v)}})}function no(e){return typeof e!="object"||e==null||e.__b>0?e:Ke(e)?e.map(no):e.constructor!==void 0?null:_t({},e)}function Zf(e,n,r,i,o,a,s,u,l){var f,h,c,d,p,y,m,_=r.props||He,g=n.props,w=n.type;if(w=="svg"?o="http://www.w3.org/2000/svg":w=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),a!=null){for(f=0;f<a.length;f++)if((p=a[f])&&"setAttribute"in p==!!w&&(w?p.localName==w:p.nodeType==3)){e=p,a[f]=null;break}}if(e==null){if(w==null)return document.createTextNode(g);e=document.createElementNS(o,w,g.is&&g),u&&(B.__m&&B.__m(n,a),u=!1),a=null}if(w==null)_===g||u&&e.data==g||(e.data=g);else{if(a=w=="textarea"&&g.defaultValue!=null?null:a&&me.call(e.childNodes),!u&&a!=null)for(_={},f=0;f<e.attributes.length;f++)_[(p=e.attributes[f]).name]=p.value;for(f in _)p=_[f],f=="dangerouslySetInnerHTML"?c=p:f=="children"||f in g||f=="value"&&"defaultValue"in g||f=="checked"&&"defaultChecked"in g||Ce(e,f,null,p,o);for(f in g)p=g[f],f=="children"?d=p:f=="dangerouslySetInnerHTML"?h=p:f=="value"?y=p:f=="checked"?m=p:u&&typeof p!="function"||_[f]===p||Ce(e,f,p,_[f],o);if(h)u||c&&(h.__html==c.__html||h.__html==e.innerHTML)||(e.innerHTML=h.__html),n.__k=[];else if(c&&(e.innerHTML=""),Ji(n.type=="template"?e.content:e,Ke(d)?d:[d],n,r,i,w=="foreignObject"?"http://www.w3.org/1999/xhtml":o,a,s,a?a[0]:r.__k&&Bt(r,0),u,l),a!=null)for(f=a.length;f--;)Wn(a[f]);u&&w!="textarea"||(f="value",w=="progress"&&y==null?e.removeAttribute("value"):y!=null&&(y!==e[f]||w=="progress"&&!y||w=="option"&&y!=_[f])&&Ce(e,f,y,_[f],o),f="checked",m!=null&&m!=e[f]&&Ce(e,f,m,_[f],o))}return e}function Xn(e,n,r){try{if(typeof e=="function"){var i=typeof e.__u=="function";i&&e.__u(),i&&n==null||(e.__u=e(n))}else e.current=n}catch(o){B.__e(o,r)}}function ro(e,n,r){var i,o;if(B.unmount&&B.unmount(e),(i=e.ref)&&(i.current&&i.current!=e.__e||Xn(i,null,n)),(i=e.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(a){B.__e(a,n)}i.base=i.__P=null}if(i=e.__k)for(o=0;o<i.length;o++)i[o]&&ro(i[o],n,r||typeof e.type!="function");r||Wn(e.__e),e.__c=e.__=e.__e=void 0}function Kf(e,n,r){return this.constructor(e,r)}function Qf(e,n,r){var i,o,a,s;n==document&&(n=document.documentElement),B.__&&B.__(e,n),o=(i=!1)?null:n.__k,a=[],s=[],Bn(n,e=n.__k=Wf(Qe,null,[e]),o||He,He,n.namespaceURI,o?null:n.firstChild?me.call(n.childNodes):null,a,o?o.__e:n.firstChild,i,s),eo(a,e,s)}function io(e,n,r){var i,o,a,s,u=_t({},e.props);for(a in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),n)a=="key"?i=n[a]:a=="ref"?o=n[a]:u[a]=n[a]===void 0&&s!=null?s[a]:n[a];return arguments.length>2&&(u.children=arguments.length>3?me.call(arguments,2):r),se(e.type,u,i||e.key,o||e.ref,null)}me=qe.slice,B={__e:function(e,n,r,i){for(var o,a,s;n=n.__;)if((o=n.__c)&&!o.__)try{if((a=o.constructor)&&a.getDerivedStateFromError!=null&&(o.setState(a.getDerivedStateFromError(e)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,i||{}),s=o.__d),s)return o.__E=o}catch(u){e=u}throw e}},Bi=0,Xi=function(e){return e!=null&&e.constructor===void 0},Re.prototype.setState=function(e,n){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=_t({},this.state),typeof e=="function"&&(e=e(_t({},r),this.props)),e&&_t(r,e),e!=null&&this.__v&&(n&&this._sb.push(n),Lr(this))},Re.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Lr(this))},Re.prototype.render=Qe,It=[],Yi=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Zi=function(e,n){return e.__v.__b-n.__v.__b},Ge.__r=0,sn=Math.random().toString(8),Ee="__d"+sn,ae="__a"+sn,Ki=/(PointerCapture)$|Capture$/i,Vn=0,Pn=qr(!1),On=qr(!0);function Gr(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 Jf(e){if(Array.isArray(e))return e}function tc(e,n,r){return(n=ac(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function ec(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,a,s,u=[],l=!0,f=!1;try{if(a=(r=r.call(e)).next,n!==0)for(;!(l=(i=a.call(r)).done)&&(u.push(i.value),u.length!==n);l=!0);}catch(h){f=!0,o=h}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw o}}return u}}function nc(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
8
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vr(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function rc(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?Vr(Object(r),!0).forEach(function(i){tc(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vr(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function ic(e,n){return Jf(e)||ec(e,n)||sc(e,n)||nc()}function oc(e,n){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function ac(e){var n=oc(e,"string");return typeof n=="symbol"?n:n+""}function Ve(e){"@babel/helpers - typeof";return Ve=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ve(e)}function sc(e,n){if(e){if(typeof e=="string")return Gr(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)?Gr(e,n):void 0}}var Rn=function(n){if(Ve(n)!=="object")return n;var r=io(n);if(r.props){var i;r.props=rc({},r.props),r!=null&&(i=r.props)!==null&&i!==void 0&&i.children&&(r.props.children=Array.isArray(r.props.children)?r.props.children.map(Rn):Rn(r.props.children))}return r},uc=function(n){return Xi(io(n))},lc=function(n,r){delete r.__k,Qf(Rn(n),r)};function fc(e,n){n===void 0&&(n={});var r=n.insertAt;if(!(typeof document>"u")){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",r==="top"&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}var cc=`.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
+ `;fc(cc);var hc=Gn({props:{content:{default:!1},offsetX:{triggerUpdate:!1},offsetY:{triggerUpdate:!1}},init:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.style,a=o===void 0?{}:o,s=!!n&&Ve(n)==="object"&&!!n.node&&typeof n.node=="function",u=st(s?n.node():n);u.style("position")==="static"&&u.style("position","relative"),r.tooltipEl=u.append("div").attr("class","float-tooltip-kap"),Object.entries(a).forEach(function(f){var h=ic(f,2),c=h[0],d=h[1];return r.tooltipEl.style(c,d)}),r.tooltipEl.style("left","-10000px").style("display","none");var l="tooltip-".concat(Math.round(Math.random()*1e12));r.mouseInside=!1,u.on("mousemove.".concat(l),function(f){r.mouseInside=!0;var h=yt(f),c=u.node(),d=c.offsetWidth,p=c.offsetHeight,y=[r.offsetX===null||r.offsetX===void 0?"-".concat(h[0]/d*100,"%"):typeof r.offsetX=="number"?"calc(-50% + ".concat(r.offsetX,"px)"):r.offsetX,r.offsetY===null||r.offsetY===void 0?p>130&&p-h[1]<100?"calc(-100% - 6px)":"21px":typeof r.offsetY=="number"?r.offsetY<0?"calc(-100% - ".concat(Math.abs(r.offsetY),"px)"):"".concat(r.offsetY,"px"):r.offsetY];r.tooltipEl.style("left",h[0]+"px").style("top",h[1]+"px").style("transform","translate(".concat(y.join(","),")")),r.content&&r.tooltipEl.style("display","inline")}),u.on("mouseover.".concat(l),function(){r.mouseInside=!0,r.content&&r.tooltipEl.style("display","inline")}),u.on("mouseout.".concat(l),function(){r.mouseInside=!1,r.tooltipEl.style("display","none")})},update:function(n){n.tooltipEl.style("display",n.content&&n.mouseInside?"inline":"none"),n.content?n.content instanceof HTMLElement?(n.tooltipEl.text(""),n.tooltipEl.append(function(){return n.content})):typeof n.content=="string"?n.tooltipEl.html(n.content):uc(n.content)?(n.tooltipEl.text(""),lc(n.content,n.tooltipEl.node())):(n.tooltipEl.style("display","none"),console.warn("Tooltip content is invalid, skipping.",n.content,n.content.toString())):n.tooltipEl.text("")}});function dc(e,n,r){var i,o=1;e==null&&(e=0),n==null&&(n=0),r==null&&(r=0);function a(){var s,u=i.length,l,f=0,h=0,c=0;for(s=0;s<u;++s)l=i[s],f+=l.x||0,h+=l.y||0,c+=l.z||0;for(f=(f/u-e)*o,h=(h/u-n)*o,c=(c/u-r)*o,s=0;s<u;++s)l=i[s],f&&(l.x-=f),h&&(l.y-=h),c&&(l.z-=c)}return a.initialize=function(s){i=s},a.x=function(s){return arguments.length?(e=+s,a):e},a.y=function(s){return arguments.length?(n=+s,a):n},a.z=function(s){return arguments.length?(r=+s,a):r},a.strength=function(s){return arguments.length?(o=+s,a):o},a}function pc(e){const n=+this._x.call(null,e);return oo(this.cover(n),n,e)}function oo(e,n,r){if(isNaN(n))return e;var i,o=e._root,a={data:r},s=e._x0,u=e._x1,l,f,h,c,d;if(!o)return e._root=a,e;for(;o.length;)if((h=n>=(l=(s+u)/2))?s=l:u=l,i=o,!(o=o[c=+h]))return i[c]=a,e;if(f=+e._x.call(null,o.data),n===f)return a.next=o,i?i[c]=a:e._root=a,e;do i=i?i[c]=new Array(2):e._root=new Array(2),(h=n>=(l=(s+u)/2))?s=l:u=l;while((c=+h)==(d=+(f>=l)));return i[d]=o,i[c]=a,e}function gc(e){Array.isArray(e)||(e=Array.from(e));const n=e.length,r=new Float64Array(n);let i=1/0,o=-1/0;for(let a=0,s;a<n;++a)isNaN(s=+this._x.call(null,e[a]))||(r[a]=s,s<i&&(i=s),s>o&&(o=s));if(i>o)return this;this.cover(i).cover(o);for(let a=0;a<n;++a)oo(this,r[a],e[a]);return this}function yc(e){if(isNaN(e=+e))return this;var n=this._x0,r=this._x1;if(isNaN(n))r=(n=Math.floor(e))+1;else{for(var i=r-n||1,o=this._root,a,s;n>e||e>=r;)switch(s=+(e<n),a=new Array(2),a[s]=o,o=a,i*=2,s){case 0:r=n+i;break;case 1:n=r-i;break}this._root&&this._root.length&&(this._root=o)}return this._x0=n,this._x1=r,this}function _c(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function vc(e){return arguments.length?this.cover(+e[0][0]).cover(+e[1][0]):isNaN(this._x0)?void 0:[[this._x0],[this._x1]]}function Ot(e,n,r){this.node=e,this.x0=n,this.x1=r}function mc(e,n){var r,i=this._x0,o,a,s=this._x1,u=[],l=this._root,f,h;for(l&&u.push(new Ot(l,i,s)),n==null?n=1/0:(i=e-n,s=e+n);f=u.pop();)if(!(!(l=f.node)||(o=f.x0)>s||(a=f.x1)<i))if(l.length){var c=(o+a)/2;u.push(new Ot(l[1],c,a),new Ot(l[0],o,c)),(h=+(e>=c))&&(f=u[u.length-1],u[u.length-1]=u[u.length-1-h],u[u.length-1-h]=f)}else{var d=Math.abs(e-+this._x.call(null,l.data));d<n&&(n=d,i=e-d,s=e+d,r=l.data)}return r}function xc(e){if(isNaN(l=+this._x.call(null,e)))return this;var n,r=this._root,i,o,a,s=this._x0,u=this._x1,l,f,h,c,d;if(!r)return this;if(r.length)for(;;){if((h=l>=(f=(s+u)/2))?s=f:u=f,n=r,!(r=r[c=+h]))return this;if(!r.length)break;n[c+1&1]&&(i=n,d=c)}for(;r.data!==e;)if(o=r,!(r=r.next))return this;return(a=r.next)&&delete r.next,o?(a?o.next=a:delete o.next,this):n?(a?n[c]=a:delete n[c],(r=n[0]||n[1])&&r===(n[1]||n[0])&&!r.length&&(i?i[d]=r:this._root=r),this):(this._root=a,this)}function bc(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function wc(){return this._root}function kc(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function Ac(e){var n=[],r,i=this._root,o,a,s;for(i&&n.push(new Ot(i,this._x0,this._x1));r=n.pop();)if(!e(i=r.node,a=r.x0,s=r.x1)&&i.length){var u=(a+s)/2;(o=i[1])&&n.push(new Ot(o,u,s)),(o=i[0])&&n.push(new Ot(o,a,u))}return this}function Cc(e){var n=[],r=[],i;for(this._root&&n.push(new Ot(this._root,this._x0,this._x1));i=n.pop();){var o=i.node;if(o.length){var a,s=i.x0,u=i.x1,l=(s+u)/2;(a=o[0])&&n.push(new Ot(a,s,l)),(a=o[1])&&n.push(new Ot(a,l,u))}r.push(i)}for(;i=r.pop();)e(i.node,i.x0,i.x1);return this}function Sc(e){return e[0]}function Mc(e){return arguments.length?(this._x=e,this):this._x}function ao(e,n){var r=new Yn(n??Sc,NaN,NaN);return e==null?r:r.addAll(e)}function Yn(e,n,r){this._x=e,this._x0=n,this._x1=r,this._root=void 0}function Wr(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var nt=ao.prototype=Yn.prototype;nt.copy=function(){var e=new Yn(this._x,this._x0,this._x1),n=this._root,r,i;if(!n)return e;if(!n.length)return e._root=Wr(n),e;for(r=[{source:n,target:e._root=new Array(2)}];n=r.pop();)for(var o=0;o<2;++o)(i=n.source[o])&&(i.length?r.push({source:i,target:n.target[o]=new Array(2)}):n.target[o]=Wr(i));return e};nt.add=pc;nt.addAll=gc;nt.cover=yc;nt.data=_c;nt.extent=vc;nt.find=mc;nt.remove=xc;nt.removeAll=bc;nt.root=wc;nt.size=kc;nt.visit=Ac;nt.visitAfter=Cc;nt.x=Mc;function Tc(e){const n=+this._x.call(null,e),r=+this._y.call(null,e);return so(this.cover(n,r),n,r,e)}function so(e,n,r,i){if(isNaN(n)||isNaN(r))return e;var o,a=e._root,s={data:i},u=e._x0,l=e._y0,f=e._x1,h=e._y1,c,d,p,y,m,_,g,w;if(!a)return e._root=s,e;for(;a.length;)if((m=n>=(c=(u+f)/2))?u=c:f=c,(_=r>=(d=(l+h)/2))?l=d:h=d,o=a,!(a=a[g=_<<1|m]))return o[g]=s,e;if(p=+e._x.call(null,a.data),y=+e._y.call(null,a.data),n===p&&r===y)return s.next=a,o?o[g]=s:e._root=s,e;do o=o?o[g]=new Array(4):e._root=new Array(4),(m=n>=(c=(u+f)/2))?u=c:f=c,(_=r>=(d=(l+h)/2))?l=d:h=d;while((g=_<<1|m)===(w=(y>=d)<<1|p>=c));return o[w]=a,o[g]=s,e}function Pc(e){var n,r,i=e.length,o,a,s=new Array(i),u=new Array(i),l=1/0,f=1/0,h=-1/0,c=-1/0;for(r=0;r<i;++r)isNaN(o=+this._x.call(null,n=e[r]))||isNaN(a=+this._y.call(null,n))||(s[r]=o,u[r]=a,o<l&&(l=o),o>h&&(h=o),a<f&&(f=a),a>c&&(c=a));if(l>h||f>c)return this;for(this.cover(l,f).cover(h,c),r=0;r<i;++r)so(this,s[r],u[r],e[r]);return this}function Oc(e,n){if(isNaN(e=+e)||isNaN(n=+n))return this;var r=this._x0,i=this._y0,o=this._x1,a=this._y1;if(isNaN(r))o=(r=Math.floor(e))+1,a=(i=Math.floor(n))+1;else{for(var s=o-r||1,u=this._root,l,f;r>e||e>=o||i>n||n>=a;)switch(f=(n<i)<<1|e<r,l=new Array(4),l[f]=u,u=l,s*=2,f){case 0:o=r+s,a=i+s;break;case 1:r=o-s,a=i+s;break;case 2:o=r+s,i=a-s;break;case 3:r=o-s,i=a-s;break}this._root&&this._root.length&&(this._root=u)}return this._x0=r,this._y0=i,this._x1=o,this._y1=a,this}function Ec(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function Rc(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function J(e,n,r,i,o){this.node=e,this.x0=n,this.y0=r,this.x1=i,this.y1=o}function zc(e,n,r){var i,o=this._x0,a=this._y0,s,u,l,f,h=this._x1,c=this._y1,d=[],p=this._root,y,m;for(p&&d.push(new J(p,o,a,h,c)),r==null?r=1/0:(o=e-r,a=n-r,h=e+r,c=n+r,r*=r);y=d.pop();)if(!(!(p=y.node)||(s=y.x0)>h||(u=y.y0)>c||(l=y.x1)<o||(f=y.y1)<a))if(p.length){var _=(s+l)/2,g=(u+f)/2;d.push(new J(p[3],_,g,l,f),new J(p[2],s,g,_,f),new J(p[1],_,u,l,g),new J(p[0],s,u,_,g)),(m=(n>=g)<<1|e>=_)&&(y=d[d.length-1],d[d.length-1]=d[d.length-1-m],d[d.length-1-m]=y)}else{var w=e-+this._x.call(null,p.data),C=n-+this._y.call(null,p.data),x=w*w+C*C;if(x<r){var b=Math.sqrt(r=x);o=e-b,a=n-b,h=e+b,c=n+b,i=p.data}}return i}function Nc(e){if(isNaN(h=+this._x.call(null,e))||isNaN(c=+this._y.call(null,e)))return this;var n,r=this._root,i,o,a,s=this._x0,u=this._y0,l=this._x1,f=this._y1,h,c,d,p,y,m,_,g;if(!r)return this;if(r.length)for(;;){if((y=h>=(d=(s+l)/2))?s=d:l=d,(m=c>=(p=(u+f)/2))?u=p:f=p,n=r,!(r=r[_=m<<1|y]))return this;if(!r.length)break;(n[_+1&3]||n[_+2&3]||n[_+3&3])&&(i=n,g=_)}for(;r.data!==e;)if(o=r,!(r=r.next))return this;return(a=r.next)&&delete r.next,o?(a?o.next=a:delete o.next,this):n?(a?n[_]=a:delete n[_],(r=n[0]||n[1]||n[2]||n[3])&&r===(n[3]||n[2]||n[1]||n[0])&&!r.length&&(i?i[g]=r:this._root=r),this):(this._root=a,this)}function Ic(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function $c(){return this._root}function Dc(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function jc(e){var n=[],r,i=this._root,o,a,s,u,l;for(i&&n.push(new J(i,this._x0,this._y0,this._x1,this._y1));r=n.pop();)if(!e(i=r.node,a=r.x0,s=r.y0,u=r.x1,l=r.y1)&&i.length){var f=(a+u)/2,h=(s+l)/2;(o=i[3])&&n.push(new J(o,f,h,u,l)),(o=i[2])&&n.push(new J(o,a,h,f,l)),(o=i[1])&&n.push(new J(o,f,s,u,h)),(o=i[0])&&n.push(new J(o,a,s,f,h))}return this}function Fc(e){var n=[],r=[],i;for(this._root&&n.push(new J(this._root,this._x0,this._y0,this._x1,this._y1));i=n.pop();){var o=i.node;if(o.length){var a,s=i.x0,u=i.y0,l=i.x1,f=i.y1,h=(s+l)/2,c=(u+f)/2;(a=o[0])&&n.push(new J(a,s,u,h,c)),(a=o[1])&&n.push(new J(a,h,u,l,c)),(a=o[2])&&n.push(new J(a,s,c,h,f)),(a=o[3])&&n.push(new J(a,h,c,l,f))}r.push(i)}for(;i=r.pop();)e(i.node,i.x0,i.y0,i.x1,i.y1);return this}function Uc(e){return e[0]}function Lc(e){return arguments.length?(this._x=e,this):this._x}function Hc(e){return e[1]}function qc(e){return arguments.length?(this._y=e,this):this._y}function uo(e,n,r){var i=new Zn(n??Uc,r??Hc,NaN,NaN,NaN,NaN);return e==null?i:i.addAll(e)}function Zn(e,n,r,i,o,a){this._x=e,this._y=n,this._x0=r,this._y0=i,this._x1=o,this._y1=a,this._root=void 0}function Br(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var tt=uo.prototype=Zn.prototype;tt.copy=function(){var e=new Zn(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=Br(n),e;for(r=[{source:n,target:e._root=new Array(4)}];n=r.pop();)for(var o=0;o<4;++o)(i=n.source[o])&&(i.length?r.push({source:i,target:n.target[o]=new Array(4)}):n.target[o]=Br(i));return e};tt.add=Tc;tt.addAll=Pc;tt.cover=Oc;tt.data=Ec;tt.extent=Rc;tt.find=zc;tt.remove=Nc;tt.removeAll=Ic;tt.root=$c;tt.size=Dc;tt.visit=jc;tt.visitAfter=Fc;tt.x=Lc;tt.y=qc;function Gc(e){const n=+this._x.call(null,e),r=+this._y.call(null,e),i=+this._z.call(null,e);return lo(this.cover(n,r,i),n,r,i,e)}function lo(e,n,r,i,o){if(isNaN(n)||isNaN(r)||isNaN(i))return e;var a,s=e._root,u={data:o},l=e._x0,f=e._y0,h=e._z0,c=e._x1,d=e._y1,p=e._z1,y,m,_,g,w,C,x,b,A,S,M;if(!s)return e._root=u,e;for(;s.length;)if((x=n>=(y=(l+c)/2))?l=y:c=y,(b=r>=(m=(f+d)/2))?f=m:d=m,(A=i>=(_=(h+p)/2))?h=_:p=_,a=s,!(s=s[S=A<<2|b<<1|x]))return a[S]=u,e;if(g=+e._x.call(null,s.data),w=+e._y.call(null,s.data),C=+e._z.call(null,s.data),n===g&&r===w&&i===C)return u.next=s,a?a[S]=u:e._root=u,e;do a=a?a[S]=new Array(8):e._root=new Array(8),(x=n>=(y=(l+c)/2))?l=y:c=y,(b=r>=(m=(f+d)/2))?f=m:d=m,(A=i>=(_=(h+p)/2))?h=_:p=_;while((S=A<<2|b<<1|x)===(M=(C>=_)<<2|(w>=m)<<1|g>=y));return a[M]=s,a[S]=u,e}function Vc(e){Array.isArray(e)||(e=Array.from(e));const n=e.length,r=new Float64Array(n),i=new Float64Array(n),o=new Float64Array(n);let a=1/0,s=1/0,u=1/0,l=-1/0,f=-1/0,h=-1/0;for(let c=0,d,p,y,m;c<n;++c)isNaN(p=+this._x.call(null,d=e[c]))||isNaN(y=+this._y.call(null,d))||isNaN(m=+this._z.call(null,d))||(r[c]=p,i[c]=y,o[c]=m,p<a&&(a=p),p>l&&(l=p),y<s&&(s=y),y>f&&(f=y),m<u&&(u=m),m>h&&(h=m));if(a>l||s>f||u>h)return this;this.cover(a,s,u).cover(l,f,h);for(let c=0;c<n;++c)lo(this,r[c],i[c],o[c],e[c]);return this}function Wc(e,n,r){if(isNaN(e=+e)||isNaN(n=+n)||isNaN(r=+r))return this;var i=this._x0,o=this._y0,a=this._z0,s=this._x1,u=this._y1,l=this._z1;if(isNaN(i))s=(i=Math.floor(e))+1,u=(o=Math.floor(n))+1,l=(a=Math.floor(r))+1;else{for(var f=s-i||1,h=this._root,c,d;i>e||e>=s||o>n||n>=u||a>r||r>=l;)switch(d=(r<a)<<2|(n<o)<<1|e<i,c=new Array(8),c[d]=h,h=c,f*=2,d){case 0:s=i+f,u=o+f,l=a+f;break;case 1:i=s-f,u=o+f,l=a+f;break;case 2:s=i+f,o=u-f,l=a+f;break;case 3:i=s-f,o=u-f,l=a+f;break;case 4:s=i+f,u=o+f,a=l-f;break;case 5:i=s-f,u=o+f,a=l-f;break;case 6:s=i+f,o=u-f,a=l-f;break;case 7:i=s-f,o=u-f,a=l-f;break}this._root&&this._root.length&&(this._root=h)}return this._x0=i,this._y0=o,this._z0=a,this._x1=s,this._y1=u,this._z1=l,this}function Bc(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function Xc(e){return arguments.length?this.cover(+e[0][0],+e[0][1],+e[0][2]).cover(+e[1][0],+e[1][1],+e[1][2]):isNaN(this._x0)?void 0:[[this._x0,this._y0,this._z0],[this._x1,this._y1,this._z1]]}function G(e,n,r,i,o,a,s){this.node=e,this.x0=n,this.y0=r,this.z0=i,this.x1=o,this.y1=a,this.z1=s}function Yc(e,n,r,i){var o,a=this._x0,s=this._y0,u=this._z0,l,f,h,c,d,p,y=this._x1,m=this._y1,_=this._z1,g=[],w=this._root,C,x;for(w&&g.push(new G(w,a,s,u,y,m,_)),i==null?i=1/0:(a=e-i,s=n-i,u=r-i,y=e+i,m=n+i,_=r+i,i*=i);C=g.pop();)if(!(!(w=C.node)||(l=C.x0)>y||(f=C.y0)>m||(h=C.z0)>_||(c=C.x1)<a||(d=C.y1)<s||(p=C.z1)<u))if(w.length){var b=(l+c)/2,A=(f+d)/2,S=(h+p)/2;g.push(new G(w[7],b,A,S,c,d,p),new G(w[6],l,A,S,b,d,p),new G(w[5],b,f,S,c,A,p),new G(w[4],l,f,S,b,A,p),new G(w[3],b,A,h,c,d,S),new G(w[2],l,A,h,b,d,S),new G(w[1],b,f,h,c,A,S),new G(w[0],l,f,h,b,A,S)),(x=(r>=S)<<2|(n>=A)<<1|e>=b)&&(C=g[g.length-1],g[g.length-1]=g[g.length-1-x],g[g.length-1-x]=C)}else{var M=e-+this._x.call(null,w.data),E=n-+this._y.call(null,w.data),P=r-+this._z.call(null,w.data),z=M*M+E*E+P*P;if(z<i){var N=Math.sqrt(i=z);a=e-N,s=n-N,u=r-N,y=e+N,m=n+N,_=r+N,o=w.data}}return o}const Zc=(e,n,r,i,o,a)=>Math.sqrt((e-i)**2+(n-o)**2+(r-a)**2);function Kc(e,n,r,i){const o=[],a=e-i,s=n-i,u=r-i,l=e+i,f=n+i,h=r+i;return this.visit((c,d,p,y,m,_,g)=>{if(!c.length)do{const w=c.data;Zc(e,n,r,this._x(w),this._y(w),this._z(w))<=i&&o.push(w)}while(c=c.next);return d>l||p>f||y>h||m<a||_<s||g<u}),o}function Qc(e){if(isNaN(d=+this._x.call(null,e))||isNaN(p=+this._y.call(null,e))||isNaN(y=+this._z.call(null,e)))return this;var n,r=this._root,i,o,a,s=this._x0,u=this._y0,l=this._z0,f=this._x1,h=this._y1,c=this._z1,d,p,y,m,_,g,w,C,x,b,A;if(!r)return this;if(r.length)for(;;){if((w=d>=(m=(s+f)/2))?s=m:f=m,(C=p>=(_=(u+h)/2))?u=_:h=_,(x=y>=(g=(l+c)/2))?l=g:c=g,n=r,!(r=r[b=x<<2|C<<1|w]))return this;if(!r.length)break;(n[b+1&7]||n[b+2&7]||n[b+3&7]||n[b+4&7]||n[b+5&7]||n[b+6&7]||n[b+7&7])&&(i=n,A=b)}for(;r.data!==e;)if(o=r,!(r=r.next))return this;return(a=r.next)&&delete r.next,o?(a?o.next=a:delete o.next,this):n?(a?n[b]=a:delete n[b],(r=n[0]||n[1]||n[2]||n[3]||n[4]||n[5]||n[6]||n[7])&&r===(n[7]||n[6]||n[5]||n[4]||n[3]||n[2]||n[1]||n[0])&&!r.length&&(i?i[A]=r:this._root=r),this):(this._root=a,this)}function Jc(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function th(){return this._root}function eh(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function nh(e){var n=[],r,i=this._root,o,a,s,u,l,f,h;for(i&&n.push(new G(i,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));r=n.pop();)if(!e(i=r.node,a=r.x0,s=r.y0,u=r.z0,l=r.x1,f=r.y1,h=r.z1)&&i.length){var c=(a+l)/2,d=(s+f)/2,p=(u+h)/2;(o=i[7])&&n.push(new G(o,c,d,p,l,f,h)),(o=i[6])&&n.push(new G(o,a,d,p,c,f,h)),(o=i[5])&&n.push(new G(o,c,s,p,l,d,h)),(o=i[4])&&n.push(new G(o,a,s,p,c,d,h)),(o=i[3])&&n.push(new G(o,c,d,u,l,f,p)),(o=i[2])&&n.push(new G(o,a,d,u,c,f,p)),(o=i[1])&&n.push(new G(o,c,s,u,l,d,p)),(o=i[0])&&n.push(new G(o,a,s,u,c,d,p))}return this}function rh(e){var n=[],r=[],i;for(this._root&&n.push(new G(this._root,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));i=n.pop();){var o=i.node;if(o.length){var a,s=i.x0,u=i.y0,l=i.z0,f=i.x1,h=i.y1,c=i.z1,d=(s+f)/2,p=(u+h)/2,y=(l+c)/2;(a=o[0])&&n.push(new G(a,s,u,l,d,p,y)),(a=o[1])&&n.push(new G(a,d,u,l,f,p,y)),(a=o[2])&&n.push(new G(a,s,p,l,d,h,y)),(a=o[3])&&n.push(new G(a,d,p,l,f,h,y)),(a=o[4])&&n.push(new G(a,s,u,y,d,p,c)),(a=o[5])&&n.push(new G(a,d,u,y,f,p,c)),(a=o[6])&&n.push(new G(a,s,p,y,d,h,c)),(a=o[7])&&n.push(new G(a,d,p,y,f,h,c))}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 ih(e){return e[0]}function oh(e){return arguments.length?(this._x=e,this):this._x}function ah(e){return e[1]}function sh(e){return arguments.length?(this._y=e,this):this._y}function uh(e){return e[2]}function lh(e){return arguments.length?(this._z=e,this):this._z}function fo(e,n,r,i){var o=new Kn(n??ih,r??ah,i??uh,NaN,NaN,NaN,NaN,NaN,NaN);return e==null?o:o.addAll(e)}function Kn(e,n,r,i,o,a,s,u,l){this._x=e,this._y=n,this._z=r,this._x0=i,this._y0=o,this._z0=a,this._x1=s,this._y1=u,this._z1=l,this._root=void 0}function Xr(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var Z=fo.prototype=Kn.prototype;Z.copy=function(){var e=new Kn(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=Xr(n),e;for(r=[{source:n,target:e._root=new Array(8)}];n=r.pop();)for(var o=0;o<8;++o)(i=n.source[o])&&(i.length?r.push({source:i,target:n.target[o]=new Array(8)}):n.target[o]=Xr(i));return e};Z.add=Gc;Z.addAll=Vc;Z.cover=Wc;Z.data=Bc;Z.extent=Xc;Z.find=Yc;Z.findAllWithinRadius=Kc;Z.remove=Qc;Z.removeAll=Jc;Z.root=th;Z.size=eh;Z.visit=nh;Z.visitAfter=rh;Z.x=oh;Z.y=sh;Z.z=lh;function Pt(e){return function(){return e}}function Mt(e){return(e()-.5)*1e-6}function fh(e){return e.index}function Yr(e,n){var r=e.get(n);if(!r)throw new Error("node not found: "+n);return r}function ch(e){var n=fh,r=d,i,o=Pt(30),a,s,u,l,f,h,c=1;e==null&&(e=[]);function d(g){return 1/Math.min(l[g.source.index],l[g.target.index])}function p(g){for(var w=0,C=e.length;w<c;++w)for(var x=0,b,A,S,M=0,E=0,P=0,z,N;x<C;++x)b=e[x],A=b.source,S=b.target,M=S.x+S.vx-A.x-A.vx||Mt(h),u>1&&(E=S.y+S.vy-A.y-A.vy||Mt(h)),u>2&&(P=S.z+S.vz-A.z-A.vz||Mt(h)),z=Math.sqrt(M*M+E*E+P*P),z=(z-a[x])/z*g*i[x],M*=z,E*=z,P*=z,S.vx-=M*(N=f[x]),u>1&&(S.vy-=E*N),u>2&&(S.vz-=P*N),A.vx+=M*(N=1-N),u>1&&(A.vy+=E*N),u>2&&(A.vz+=P*N)}function y(){if(s){var g,w=s.length,C=e.length,x=new Map(s.map((A,S)=>[n(A,S,s),A])),b;for(g=0,l=new Array(w);g<C;++g)b=e[g],b.index=g,typeof b.source!="object"&&(b.source=Yr(x,b.source)),typeof b.target!="object"&&(b.target=Yr(x,b.target)),l[b.source.index]=(l[b.source.index]||0)+1,l[b.target.index]=(l[b.target.index]||0)+1;for(g=0,f=new Array(C);g<C;++g)b=e[g],f[g]=l[b.source.index]/(l[b.source.index]+l[b.target.index]);i=new Array(C),m(),a=new Array(C),_()}}function m(){if(s)for(var g=0,w=e.length;g<w;++g)i[g]=+r(e[g],g,e)}function _(){if(s)for(var g=0,w=e.length;g<w;++g)a[g]=+o(e[g],g,e)}return p.initialize=function(g,...w){s=g,h=w.find(C=>typeof C=="function")||Math.random,u=w.find(C=>[1,2,3].includes(C))||2,y()},p.links=function(g){return arguments.length?(e=g,y(),p):e},p.id=function(g){return arguments.length?(n=g,p):n},p.iterations=function(g){return arguments.length?(c=+g,p):c},p.strength=function(g){return arguments.length?(r=typeof g=="function"?g:Pt(+g),m(),p):r},p.distance=function(g){return arguments.length?(o=typeof g=="function"?g:Pt(+g),_(),p):o},p}const hh=1664525,dh=1013904223,Zr=4294967296;function ph(){let e=1;return()=>(e=(hh*e+dh)%Zr)/Zr}var Kr=3;function un(e){return e.x}function Qr(e){return e.y}function gh(e){return e.z}var yh=10,_h=Math.PI*(3-Math.sqrt(5)),vh=Math.PI*20/(9+Math.sqrt(221));function mh(e,n){n=n||2;var r=Math.min(Kr,Math.max(1,Math.round(n))),i,o=1,a=.001,s=1-Math.pow(a,1/300),u=0,l=.6,f=new Map,h=Un(p),c=_e("tick","end"),d=ph();e==null&&(e=[]);function p(){y(),c.call("tick",i),o<a&&(h.stop(),c.call("end",i))}function y(g){var w,C=e.length,x;g===void 0&&(g=1);for(var b=0;b<g;++b)for(o+=(u-o)*s,f.forEach(function(A){A(o)}),w=0;w<C;++w)x=e[w],x.fx==null?x.x+=x.vx*=l:(x.x=x.fx,x.vx=0),r>1&&(x.fy==null?x.y+=x.vy*=l:(x.y=x.fy,x.vy=0)),r>2&&(x.fz==null?x.z+=x.vz*=l:(x.z=x.fz,x.vz=0));return i}function m(){for(var g=0,w=e.length,C;g<w;++g){if(C=e[g],C.index=g,C.fx!=null&&(C.x=C.fx),C.fy!=null&&(C.y=C.fy),C.fz!=null&&(C.z=C.fz),isNaN(C.x)||r>1&&isNaN(C.y)||r>2&&isNaN(C.z)){var x=yh*(r>2?Math.cbrt(.5+g):r>1?Math.sqrt(.5+g):g),b=g*_h,A=g*vh;r===1?C.x=x:r===2?(C.x=x*Math.cos(b),C.y=x*Math.sin(b)):(C.x=x*Math.sin(b)*Math.cos(A),C.y=x*Math.cos(b),C.z=x*Math.sin(b)*Math.sin(A))}(isNaN(C.vx)||r>1&&isNaN(C.vy)||r>2&&isNaN(C.vz))&&(C.vx=0,r>1&&(C.vy=0),r>2&&(C.vz=0))}}function _(g){return g.initialize&&g.initialize(e,d,r),g}return m(),i={tick:y,restart:function(){return h.restart(p),i},stop:function(){return h.stop(),i},numDimensions:function(g){return arguments.length?(r=Math.min(Kr,Math.max(1,Math.round(g))),f.forEach(_),i):r},nodes:function(g){return arguments.length?(e=g,m(),f.forEach(_),i):e},alpha:function(g){return arguments.length?(o=+g,i):o},alphaMin:function(g){return arguments.length?(a=+g,i):a},alphaDecay:function(g){return arguments.length?(s=+g,i):+s},alphaTarget:function(g){return arguments.length?(u=+g,i):u},velocityDecay:function(g){return arguments.length?(l=1-g,i):1-l},randomSource:function(g){return arguments.length?(d=g,f.forEach(_),i):d},force:function(g,w){return arguments.length>1?(w==null?f.delete(g):f.set(g,_(w)),i):f.get(g)},find:function(){var g=Array.prototype.slice.call(arguments),w=g.shift()||0,C=(r>1?g.shift():null)||0,x=(r>2?g.shift():null)||0,b=g.shift()||1/0,A=0,S=e.length,M,E,P,z,N,j;for(b*=b,A=0;A<S;++A)N=e[A],M=w-N.x,E=C-(N.y||0),P=x-(N.z||0),z=M*M+E*E+P*P,z<b&&(j=N,b=z);return j},on:function(g,w){return arguments.length>1?(c.on(g,w),i):c.on(g)}}}function xh(){var e,n,r,i,o,a=Pt(-30),s,u=1,l=1/0,f=.81;function h(y){var m,_=e.length,g=(n===1?ao(e,un):n===2?uo(e,un,Qr):n===3?fo(e,un,Qr,gh):null).visitAfter(d);for(o=y,m=0;m<_;++m)r=e[m],g.visit(p)}function c(){if(e){var y,m=e.length,_;for(s=new Array(m),y=0;y<m;++y)_=e[y],s[_.index]=+a(_,y,e)}}function d(y){var m=0,_,g,w=0,C,x,b,A,S=y.length;if(S){for(C=x=b=A=0;A<S;++A)(_=y[A])&&(g=Math.abs(_.value))&&(m+=_.value,w+=g,C+=g*(_.x||0),x+=g*(_.y||0),b+=g*(_.z||0));m*=Math.sqrt(4/S),y.x=C/w,n>1&&(y.y=x/w),n>2&&(y.z=b/w)}else{_=y,_.x=_.data.x,n>1&&(_.y=_.data.y),n>2&&(_.z=_.data.z);do m+=s[_.data.index];while(_=_.next)}y.value=m}function p(y,m,_,g,w){if(!y.value)return!0;var C=[_,g,w][n-1],x=y.x-r.x,b=n>1?y.y-r.y:0,A=n>2?y.z-r.z:0,S=C-m,M=x*x+b*b+A*A;if(S*S/f<M)return M<l&&(x===0&&(x=Mt(i),M+=x*x),n>1&&b===0&&(b=Mt(i),M+=b*b),n>2&&A===0&&(A=Mt(i),M+=A*A),M<u&&(M=Math.sqrt(u*M)),r.vx+=x*y.value*o/M,n>1&&(r.vy+=b*y.value*o/M),n>2&&(r.vz+=A*y.value*o/M)),!0;if(y.length||M>=l)return;(y.data!==r||y.next)&&(x===0&&(x=Mt(i),M+=x*x),n>1&&b===0&&(b=Mt(i),M+=b*b),n>2&&A===0&&(A=Mt(i),M+=A*A),M<u&&(M=Math.sqrt(u*M)));do y.data!==r&&(S=s[y.data.index]*o/M,r.vx+=x*S,n>1&&(r.vy+=b*S),n>2&&(r.vz+=A*S));while(y=y.next)}return h.initialize=function(y,...m){e=y,i=m.find(_=>typeof _=="function")||Math.random,n=m.find(_=>[1,2,3].includes(_))||2,c()},h.strength=function(y){return arguments.length?(a=typeof y=="function"?y:Pt(+y),c(),h):a},h.distanceMin=function(y){return arguments.length?(u=y*y,h):Math.sqrt(u)},h.distanceMax=function(y){return arguments.length?(l=y*y,h):Math.sqrt(l)},h.theta=function(y){return arguments.length?(f=y*y,h):Math.sqrt(f)},h}function bh(e,n,r,i){var o,a,s=Pt(.1),u,l;typeof e!="function"&&(e=Pt(+e)),n==null&&(n=0),r==null&&(r=0),i==null&&(i=0);function f(c){for(var d=0,p=o.length;d<p;++d){var y=o[d],m=y.x-n||1e-6,_=(y.y||0)-r||1e-6,g=(y.z||0)-i||1e-6,w=Math.sqrt(m*m+_*_+g*g),C=(l[d]-w)*u[d]*c/w;y.vx+=m*C,a>1&&(y.vy+=_*C),a>2&&(y.vz+=g*C)}}function h(){if(o){var c,d=o.length;for(u=new Array(d),l=new Array(d),c=0;c<d;++c)l[c]=+e(o[c],c,o),u[c]=isNaN(l[c])?0:+s(o[c],c,o)}}return f.initialize=function(c,...d){o=c,a=d.find(p=>[1,2,3].includes(p))||2,h()},f.strength=function(c){return arguments.length?(s=typeof c=="function"?c:Pt(+c),h(),f):s},f.radius=function(c){return arguments.length?(e=typeof c=="function"?c:Pt(+c),h(),f):e},f.x=function(c){return arguments.length?(n=+c,f):n},f.y=function(c){return arguments.length?(r=+c,f):r},f.z=function(c){return arguments.length?(i=+c,f):i},f}const{abs:Kt,cos:St,sin:Lt,acos:wh,atan2:Qt,sqrt:Rt,pow:at}=Math;function Jt(e){return e<0?-at(-e,1/3):at(e,1/3)}const co=Math.PI,Se=2*co,zt=co/2,kh=1e-6,ln=Number.MAX_SAFE_INTEGER||9007199254740991,fn=Number.MIN_SAFE_INTEGER||-9007199254740991,Ah={x:0,y:0,z:0},O={Tvalues:[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213],Cvalues:[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872],arcfn:function(e,n){const r=n(e);let i=r.x*r.x+r.y*r.y;return typeof r.z<"u"&&(i+=r.z*r.z),Rt(i)},compute:function(e,n,r){if(e===0)return n[0].t=0,n[0];const i=n.length-1;if(e===1)return n[i].t=1,n[i];const o=1-e;let a=n;if(i===0)return n[0].t=e,n[0];if(i===1){const u={x:o*a[0].x+e*a[1].x,y:o*a[0].y+e*a[1].y,t:e};return r&&(u.z=o*a[0].z+e*a[1].z),u}if(i<4){let u=o*o,l=e*e,f,h,c,d=0;i===2?(a=[a[0],a[1],a[2],Ah],f=u,h=o*e*2,c=l):i===3&&(f=u*o,h=u*e*3,c=o*l*3,d=e*l);const p={x:f*a[0].x+h*a[1].x+c*a[2].x+d*a[3].x,y:f*a[0].y+h*a[1].y+c*a[2].y+d*a[3].y,t:e};return r&&(p.z=f*a[0].z+h*a[1].z+c*a[2].z+d*a[3].z),p}const s=JSON.parse(JSON.stringify(n));for(;s.length>1;){for(let u=0;u<s.length-1;u++)s[u]={x:s[u].x+(s[u+1].x-s[u].x)*e,y:s[u].y+(s[u+1].y-s[u].y)*e},typeof s[u].z<"u"&&(s[u].z=s[u].z+(s[u+1].z-s[u].z)*e);s.splice(s.length-1,1)}return s[0].t=e,s[0]},computeWithRatios:function(e,n,r,i){const o=1-e,a=r,s=n;let u=a[0],l=a[1],f=a[2],h=a[3],c;if(u*=o,l*=e,s.length===2)return c=u+l,{x:(u*s[0].x+l*s[1].x)/c,y:(u*s[0].y+l*s[1].y)/c,z:i?(u*s[0].z+l*s[1].z)/c:!1,t:e};if(u*=o,l*=2*o,f*=e*e,s.length===3)return c=u+l+f,{x:(u*s[0].x+l*s[1].x+f*s[2].x)/c,y:(u*s[0].y+l*s[1].y+f*s[2].y)/c,z:i?(u*s[0].z+l*s[1].z+f*s[2].z)/c:!1,t:e};if(u*=o,l*=1.5*o,f*=3*o,h*=e*e*e,s.length===4)return c=u+l+f+h,{x:(u*s[0].x+l*s[1].x+f*s[2].x+h*s[3].x)/c,y:(u*s[0].y+l*s[1].y+f*s[2].y+h*s[3].y)/c,z:i?(u*s[0].z+l*s[1].z+f*s[2].z+h*s[3].z)/c:!1,t:e}},derive:function(e,n){const r=[];for(let i=e,o=i.length,a=o-1;o>1;o--,a--){const s=[];for(let u=0,l;u<a;u++)l={x:a*(i[u+1].x-i[u].x),y:a*(i[u+1].y-i[u].y)},n&&(l.z=a*(i[u+1].z-i[u].z)),s.push(l);r.push(s),i=s}return r},between:function(e,n,r){return n<=e&&e<=r||O.approximately(e,n)||O.approximately(e,r)},approximately:function(e,n,r){return Kt(e-n)<=(r||kh)},length:function(e){const r=O.Tvalues.length;let i=0;for(let o=0,a;o<r;o++)a=.5*O.Tvalues[o]+.5,i+=O.Cvalues[o]*O.arcfn(a,e);return .5*i},map:function(e,n,r,i,o){const a=r-n,s=o-i,u=e-n,l=u/a;return i+s*l},lerp:function(e,n,r){const i={x:n.x+e*(r.x-n.x),y:n.y+e*(r.y-n.y)};return n.z!==void 0&&r.z!==void 0&&(i.z=n.z+e*(r.z-n.z)),i},pointToString:function(e){let n=e.x+"/"+e.y;return typeof e.z<"u"&&(n+="/"+e.z),n},pointsToString:function(e){return"["+e.map(O.pointToString).join(", ")+"]"},copy:function(e){return JSON.parse(JSON.stringify(e))},angle:function(e,n,r){const i=n.x-e.x,o=n.y-e.y,a=r.x-e.x,s=r.y-e.y,u=i*s-o*a,l=i*a+o*s;return Qt(u,l)},round:function(e,n){const r=""+e,i=r.indexOf(".");return parseFloat(r.substring(0,i+1+n))},dist:function(e,n){const r=e.x-n.x,i=e.y-n.y;return Rt(r*r+i*i)},closest:function(e,n){let r=at(2,63),i,o;return e.forEach(function(a,s){o=O.dist(n,a),o<r&&(r=o,i=s)}),{mdist:r,mpos:i}},abcratio:function(e,n){if(n!==2&&n!==3)return!1;if(typeof e>"u")e=.5;else if(e===0||e===1)return e;const r=at(e,n)+at(1-e,n),i=r-1;return Kt(i/r)},projectionratio:function(e,n){if(n!==2&&n!==3)return!1;if(typeof e>"u")e=.5;else if(e===0||e===1)return e;const r=at(1-e,n),i=at(e,n)+r;return r/i},lli8:function(e,n,r,i,o,a,s,u){const l=(e*i-n*r)*(o-s)-(e-r)*(o*u-a*s),f=(e*i-n*r)*(a-u)-(n-i)*(o*u-a*s),h=(e-r)*(a-u)-(n-i)*(o-s);return h==0?!1:{x:l/h,y:f/h}},lli4:function(e,n,r,i){const o=e.x,a=e.y,s=n.x,u=n.y,l=r.x,f=r.y,h=i.x,c=i.y;return O.lli8(o,a,s,u,l,f,h,c)},lli:function(e,n){return O.lli4(e,e.c,n,n.c)},makeline:function(e,n){return new V(e.x,e.y,(e.x+n.x)/2,(e.y+n.y)/2,n.x,n.y)},findbbox:function(e){let n=ln,r=ln,i=fn,o=fn;return e.forEach(function(a){const s=a.bbox();n>s.x.min&&(n=s.x.min),r>s.y.min&&(r=s.y.min),i<s.x.max&&(i=s.x.max),o<s.y.max&&(o=s.y.max)}),{x:{min:n,mid:(n+i)/2,max:i,size:i-n},y:{min:r,mid:(r+o)/2,max:o,size:o-r}}},shapeintersections:function(e,n,r,i,o){if(!O.bboxoverlap(n,i))return[];const a=[],s=[e.startcap,e.forward,e.back,e.endcap],u=[r.startcap,r.forward,r.back,r.endcap];return s.forEach(function(l){l.virtual||u.forEach(function(f){if(f.virtual)return;const h=l.intersects(f,o);h.length>0&&(h.c1=l,h.c2=f,h.s1=e,h.s2=r,a.push(h))})}),a},makeshape:function(e,n,r){const i=n.points.length,o=e.points.length,a=O.makeline(n.points[i-1],e.points[0]),s=O.makeline(e.points[o-1],n.points[0]),u={startcap:a,forward:e,back:n,endcap:s,bbox:O.findbbox([a,e,n,s])};return u.intersections=function(l){return O.shapeintersections(u,u.bbox,l,l.bbox,r)},u},getminmax:function(e,n,r){if(!r)return{min:0,max:0};let i=ln,o=fn,a,s;r.indexOf(0)===-1&&(r=[0].concat(r)),r.indexOf(1)===-1&&r.push(1);for(let u=0,l=r.length;u<l;u++)a=r[u],s=e.get(a),s[n]<i&&(i=s[n]),s[n]>o&&(o=s[n]);return{min:i,mid:(i+o)/2,max:o,size:o-i}},align:function(e,n){const r=n.p1.x,i=n.p1.y,o=-Qt(n.p2.y-i,n.p2.x-r),a=function(s){return{x:(s.x-r)*St(o)-(s.y-i)*Lt(o),y:(s.x-r)*Lt(o)+(s.y-i)*St(o)}};return e.map(a)},roots:function(e,n){n=n||{p1:{x:0,y:0},p2:{x:1,y:0}};const r=e.length-1,i=O.align(e,n),o=function(S){return 0<=S&&S<=1};if(r===2){const S=i[0].y,M=i[1].y,E=i[2].y,P=S-2*M+E;if(P!==0){const z=-Rt(M*M-S*E),N=-S+M,j=-(z+N)/P,k=-(-z+N)/P;return[j,k].filter(o)}else if(M!==E&&P===0)return[(2*M-E)/(2*M-2*E)].filter(o);return[]}const a=i[0].y,s=i[1].y,u=i[2].y,l=i[3].y;let f=-a+3*s-3*u+l,h=3*a-6*s+3*u,c=-3*a+3*s,d=a;if(O.approximately(f,0)){if(O.approximately(h,0))return O.approximately(c,0)?[]:[-d/c].filter(o);const S=Rt(c*c-4*h*d),M=2*h;return[(S-c)/M,(-c-S)/M].filter(o)}h/=f,c/=f,d/=f;const p=(3*c-h*h)/3,y=p/3,m=(2*h*h*h-9*h*c+27*d)/27,_=m/2,g=_*_+y*y*y;let w,C,x,b,A;if(g<0){const S=-p/3,M=S*S*S,E=Rt(M),P=-m/(2*E),z=P<-1?-1:P>1?1:P,N=wh(z),j=Jt(E),k=2*j;return x=k*St(N/3)-h/3,b=k*St((N+Se)/3)-h/3,A=k*St((N+2*Se)/3)-h/3,[x,b,A].filter(o)}else{if(g===0)return w=_<0?Jt(-_):-Jt(_),x=2*w-h/3,b=-w-h/3,[x,b].filter(o);{const S=Rt(g);return w=Jt(-_+S),C=Jt(_+S),[w-C-h/3].filter(o)}}},droots:function(e){if(e.length===3){const n=e[0],r=e[1],i=e[2],o=n-2*r+i;if(o!==0){const a=-Rt(r*r-n*i),s=-n+r,u=-(a+s)/o,l=-(-a+s)/o;return[u,l]}else if(r!==i&&o===0)return[(2*r-i)/(2*(r-i))];return[]}if(e.length===2){const n=e[0],r=e[1];return n!==r?[n/(n-r)]:[]}return[]},curvature:function(e,n,r,i,o){let a,s,u,l,f=0,h=0;const c=O.compute(e,n),d=O.compute(e,r),p=c.x*c.x+c.y*c.y;if(i?(a=Rt(at(c.y*d.z-d.y*c.z,2)+at(c.z*d.x-d.z*c.x,2)+at(c.x*d.y-d.x*c.y,2)),s=at(p+c.z*c.z,3/2)):(a=c.x*d.y-c.y*d.x,s=at(p,3/2)),a===0||s===0)return{k:0,r:0};if(f=a/s,h=s/a,!o){const y=O.curvature(e-.001,n,r,i,!0).k,m=O.curvature(e+.001,n,r,i,!0).k;l=(m-f+(f-y))/2,u=(Kt(m-f)+Kt(f-y))/2}return{k:f,r:h,dk:l,adk:u}},inflections:function(e){if(e.length<4)return[];const n=O.align(e,{p1:e[0],p2:e.slice(-1)[0]}),r=n[2].x*n[1].y,i=n[3].x*n[1].y,o=n[1].x*n[2].y,a=n[3].x*n[2].y,s=18*(-3*r+2*i+3*o-a),u=18*(3*r-i-3*o),l=18*(o-r);if(O.approximately(s,0)){if(!O.approximately(u,0)){let d=-l/u;if(0<=d&&d<=1)return[d]}return[]}const f=2*s;if(O.approximately(f,0))return[];const h=u*u-4*s*l;if(h<0)return[];const c=Math.sqrt(h);return[(c-u)/f,-(u+c)/f].filter(function(d){return 0<=d&&d<=1})},bboxoverlap:function(e,n){const r=["x","y"],i=r.length;for(let o=0,a,s,u,l;o<i;o++)if(a=r[o],s=e[a].mid,u=n[a].mid,l=(e[a].size+n[a].size)/2,Kt(s-u)>=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){const i=e.bbox(),o=n.bbox(),a=1e5,s=r||.5;if(i.x.size+i.y.size<s&&o.x.size+o.y.size<s)return[(a*(e._t1+e._t2)/2|0)/a+"/"+(a*(n._t1+n._t2)/2|0)/a];let u=e.split(.5),l=n.split(.5),f=[{left:u.left,right:l.left},{left:u.left,right:l.right},{left:u.right,right:l.right},{left:u.right,right:l.left}];f=f.filter(function(c){return O.bboxoverlap(c.left.bbox(),c.right.bbox())});let h=[];return f.length===0||(f.forEach(function(c){h=h.concat(O.pairiteration(c.left,c.right,s))}),h=h.filter(function(c,d){return h.indexOf(c)===d})),h},getccenter:function(e,n,r){const i=n.x-e.x,o=n.y-e.y,a=r.x-n.x,s=r.y-n.y,u=i*St(zt)-o*Lt(zt),l=i*Lt(zt)+o*St(zt),f=a*St(zt)-s*Lt(zt),h=a*Lt(zt)+s*St(zt),c=(e.x+n.x)/2,d=(e.y+n.y)/2,p=(n.x+r.x)/2,y=(n.y+r.y)/2,m=c+u,_=d+l,g=p+f,w=y+h,C=O.lli8(c,d,m,_,p,y,g,w),x=O.dist(C,e);let b=Qt(e.y-C.y,e.x-C.x),A=Qt(n.y-C.y,n.x-C.x),S=Qt(r.y-C.y,r.x-C.x),M;return b<S?((b>A||A>S)&&(b+=Se),b>S&&(M=S,S=b,b=M)):S<A&&A<b?(M=S,S=b,b=M):S+=Se,C.s=b,C.e=S,C.r=x,C},numberSort:function(e,n){return e-n}};class ue{constructor(n){this.curves=[],this._3d=!1,n&&(this.curves=n,this._3d=this.curves[0]._3d)}valueOf(){return this.toString()}toString(){return"["+this.curves.map(function(n){return O.pointsToString(n.points)}).join(", ")+"]"}addCurve(n){this.curves.push(n),this._3d=this._3d||n._3d}length(){return this.curves.map(function(n){return n.length()}).reduce(function(n,r){return n+r})}curve(n){return this.curves[n]}bbox(){const n=this.curves;for(var r=n[0].bbox(),i=1;i<n.length;i++)O.expandbox(r,n[i].bbox());return r}offset(n){const r=[];return this.curves.forEach(function(i){r.push(...i.offset(n))}),new ue(r)}}const{abs:te,min:Jr,max:ti,cos:Ch,sin:Sh,acos:Mh,sqrt:ee}=Math,Th=Math.PI;class V{constructor(n){let r=n&&n.forEach?n:Array.from(arguments).slice(),i=!1;if(typeof r[0]=="object"){i=r.length;const p=[];r.forEach(function(y){["x","y","z"].forEach(function(m){typeof y[m]<"u"&&p.push(y[m])})}),r=p}let o=!1;const a=r.length;if(i){if(i>4){if(arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");o=!0}}else if(a!==6&&a!==8&&a!==9&&a!==12&&arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");const s=this._3d=!o&&(a===9||a===12)||n&&n[0]&&typeof n[0].z<"u",u=this.points=[];for(let p=0,y=s?3:2;p<a;p+=y){var l={x:r[p],y:r[p+1]};s&&(l.z=r[p+2]),u.push(l)}const f=this.order=u.length-1,h=this.dims=["x","y"];s&&h.push("z"),this.dimlen=h.length;const c=O.align(u,{p1:u[0],p2:u[f]}),d=O.dist(u[0],u[f]);this._linear=c.reduce((p,y)=>p+te(y.y),0)<d/50,this._lut=[],this._t1=0,this._t2=1,this.update()}static quadraticFromPoints(n,r,i,o){if(typeof o>"u"&&(o=.5),o===0)return new V(r,r,i);if(o===1)return new V(n,r,r);const a=V.getABC(2,n,r,i,o);return new V(n,a.A,i)}static cubicFromPoints(n,r,i,o,a){typeof o>"u"&&(o=.5);const s=V.getABC(3,n,r,i,o);typeof a>"u"&&(a=O.dist(r,s.C));const u=a*(1-o)/o,l=O.dist(n,i),f=(i.x-n.x)/l,h=(i.y-n.y)/l,c=a*f,d=a*h,p=u*f,y=u*h,m={x:r.x-c,y:r.y-d},_={x:r.x+p,y:r.y+y},g=s.A,w={x:g.x+(m.x-g.x)/(1-o),y:g.y+(m.y-g.y)/(1-o)},C={x:g.x+(_.x-g.x)/o,y:g.y+(_.y-g.y)/o},x={x:n.x+(w.x-n.x)/o,y:n.y+(w.y-n.y)/o},b={x:i.x+(C.x-i.x)/(1-o),y:i.y+(C.y-i.y)/(1-o)};return new V(n,x,b,i)}static getUtils(){return O}getUtils(){return V.getUtils()}static get PolyBezier(){return ue}valueOf(){return this.toString()}toString(){return O.pointsToString(this.points)}toSVG(){if(this._3d)return!1;const n=this.points,r=n[0].x,i=n[0].y,o=["M",r,i,this.order===2?"Q":"C"];for(let a=1,s=n.length;a<s;a++)o.push(n[a].x),o.push(n[a].y);return o.join(" ")}setRatios(n){if(n.length!==this.points.length)throw new Error("incorrect number of ratio values");this.ratios=n,this._lut=[]}verify(){const n=this.coordDigest();n!==this._print&&(this._print=n,this.update())}coordDigest(){return this.points.map(function(n,r){return""+r+n.x+n.y+(n.z?n.z:0)}).join("")}update(){this._lut=[],this.dpoints=O.derive(this.points,this._3d),this.computedirection()}computedirection(){const n=this.points,r=O.angle(n[0],n[this.order],n[1]);this.clockwise=r>0}length(){return O.length(this.derivative.bind(this))}static getABC(n=2,r,i,o,a=.5){const s=O.projectionratio(a,n),u=1-s,l={x:s*r.x+u*o.x,y:s*r.y+u*o.y},f=O.abcratio(a,n);return{A:{x:i.x+(i.x-l.x)/f,y:i.y+(i.y-l.y)/f},B:i,C:l,S:r,E:o}}getABC(n,r){r=r||this.get(n);let i=this.points[0],o=this.points[this.order];return V.getABC(this.order,i,r,o,n)}getLUT(n){if(this.verify(),n=n||100,this._lut.length===n+1)return this._lut;this._lut=[],n++,this._lut=[];for(let r=0,i,o;r<n;r++)o=r/(n-1),i=this.compute(o),i.t=o,this._lut.push(i);return this._lut}on(n,r){r=r||5;const i=this.getLUT(),o=[];for(let a=0,s,u=0;a<i.length;a++)s=i[a],O.dist(s,n)<r&&(o.push(s),u+=a/i.length);return o.length?t/=o.length:!1}project(n){const r=this.getLUT(),i=r.length-1,o=O.closest(r,n),a=o.mpos,s=(a-1)/i,u=(a+1)/i,l=.1/i;let f=o.mdist,h=s,c=h,d;f+=1;for(let p;h<u+l;h+=l)d=this.compute(h),p=O.dist(n,d),p<f&&(f=p,c=h);return c=c<0?0:c>1?1:c,d=this.compute(c),d.t=c,d.d=f,d}get(n){return this.compute(n)}point(n){return this.points[n]}compute(n){return this.ratios?O.computeWithRatios(n,this.points,this.ratios,this._3d):O.compute(n,this.points,this._3d,this.ratios)}raise(){const n=this.points,r=[n[0]],i=n.length;for(let o=1,a,s;o<i;o++)a=n[o],s=n[o-1],r[o]={x:(i-o)/i*a.x+o/i*s.x,y:(i-o)/i*a.y+o/i*s.y};return r[i]=n[i-1],new V(r)}derivative(n){return O.compute(n,this.dpoints[0],this._3d)}dderivative(n){return O.compute(n,this.dpoints[1],this._3d)}align(){let n=this.points;return new V(O.align(n,{p1:n[0],p2:n[n.length-1]}))}curvature(n){return O.curvature(n,this.dpoints[0],this.dpoints[1],this._3d)}inflections(){return O.inflections(this.points)}normal(n){return this._3d?this.__normal3(n):this.__normal2(n)}__normal2(n){const r=this.derivative(n),i=ee(r.x*r.x+r.y*r.y);return{t:n,x:-r.y/i,y:r.x/i}}__normal3(n){const r=this.derivative(n),i=this.derivative(n+.01),o=ee(r.x*r.x+r.y*r.y+r.z*r.z),a=ee(i.x*i.x+i.y*i.y+i.z*i.z);r.x/=o,r.y/=o,r.z/=o,i.x/=a,i.y/=a,i.z/=a;const s={x:i.y*r.z-i.z*r.y,y:i.z*r.x-i.x*r.z,z:i.x*r.y-i.y*r.x},u=ee(s.x*s.x+s.y*s.y+s.z*s.z);s.x/=u,s.y/=u,s.z/=u;const l=[s.x*s.x,s.x*s.y-s.z,s.x*s.z+s.y,s.x*s.y+s.z,s.y*s.y,s.y*s.z-s.x,s.x*s.z-s.y,s.y*s.z+s.x,s.z*s.z];return{t:n,x:l[0]*r.x+l[1]*r.y+l[2]*r.z,y:l[3]*r.x+l[4]*r.y+l[5]*r.z,z:l[6]*r.x+l[7]*r.y+l[8]*r.z}}hull(n){let r=this.points,i=[],o=[],a=0;for(o[a++]=r[0],o[a++]=r[1],o[a++]=r[2],this.order===3&&(o[a++]=r[3]);r.length>1;){i=[];for(let s=0,u,l=r.length-1;s<l;s++)u=O.lerp(n,r[s],r[s+1]),o[a++]=u,i.push(u);r=i}return o}split(n,r){if(n===0&&r)return this.split(r).left;if(r===1)return this.split(n).right;const i=this.hull(n),o={left:this.order===2?new V([i[0],i[3],i[5]]):new V([i[0],i[4],i[7],i[9]]),right:this.order===2?new V([i[5],i[4],i[2]]):new V([i[9],i[8],i[6],i[3]]),span:i};return o.left._t1=O.map(0,0,1,this._t1,this._t2),o.left._t2=O.map(n,0,1,this._t1,this._t2),o.right._t1=O.map(n,0,1,this._t1,this._t2),o.right._t2=O.map(1,0,1,this._t1,this._t2),r?(r=O.map(r,n,1,0,1),o.right.split(r).left):o}extrema(){const n={};let r=[];return this.dims.forEach((function(i){let o=function(s){return s[i]},a=this.dpoints[0].map(o);n[i]=O.droots(a),this.order===3&&(a=this.dpoints[1].map(o),n[i]=n[i].concat(O.droots(a))),n[i]=n[i].filter(function(s){return s>=0&&s<=1}),r=r.concat(n[i].sort(O.numberSort))}).bind(this)),n.values=r.sort(O.numberSort).filter(function(i,o){return r.indexOf(i)===o}),n}bbox(){const n=this.extrema(),r={};return this.dims.forEach((function(i){r[i]=O.getminmax(this,i,n[i])}).bind(this)),r}overlaps(n){const r=this.bbox(),i=n.bbox();return O.bboxoverlap(r,i)}offset(n,r){if(typeof r<"u"){const i=this.get(n),o=this.normal(n),a={c:i,n:o,x:i.x+o.x*r,y:i.y+o.y*r};return this._3d&&(a.z=i.z+o.z*r),a}if(this._linear){const i=this.normal(0),o=this.points.map(function(a){const s={x:a.x+n*i.x,y:a.y+n*i.y};return a.z&&i.z&&(s.z=a.z+n*i.z),s});return[new V(o)]}return this.reduce().map(function(i){return i._linear?i.offset(n)[0]:i.scale(n)})}simple(){if(this.order===3){const o=O.angle(this.points[0],this.points[3],this.points[1]),a=O.angle(this.points[0],this.points[3],this.points[2]);if(o>0&&a<0||o<0&&a>0)return!1}const n=this.normal(0),r=this.normal(1);let i=n.x*r.x+n.y*r.y;return this._3d&&(i+=n.z*r.z),te(Mh(i))<Th/3}reduce(){let n,r=0,i=0,o=.01,a,s=[],u=[],l=this.extrema().values;for(l.indexOf(0)===-1&&(l=[0].concat(l)),l.indexOf(1)===-1&&l.push(1),r=l[0],n=1;n<l.length;n++)i=l[n],a=this.split(r,i),a._t1=r,a._t2=i,s.push(a),r=i;return s.forEach(function(f){for(r=0,i=0;i<=1;)for(i=r+o;i<=1+o;i+=o)if(a=f.split(r,i),!a.simple()){if(i-=o,te(r-i)<o)return[];a=f.split(r,i),a._t1=O.map(r,0,1,f._t1,f._t2),a._t2=O.map(i,0,1,f._t1,f._t2),u.push(a),r=i;break}r<1&&(a=f.split(r,1),a._t1=O.map(r,0,1,f._t1,f._t2),a._t2=f._t2,u.push(a))}),u}translate(n,r,i){i=typeof i=="number"?i:r;const o=this.order;let a=this.points.map((s,u)=>(1-u/o)*r+u/o*i);return new V(this.points.map((s,u)=>({x:s.x+n.x*a[u],y:s.y+n.y*a[u]})))}scale(n){const r=this.order;let i=!1;if(typeof n=="function"&&(i=n),i&&r===2)return this.raise().scale(i);const o=this.clockwise,a=this.points;if(this._linear)return this.translate(this.normal(0),i?i(0):n,i?i(1):n);const s=i?i(0):n,u=i?i(1):n,l=[this.offset(0,10),this.offset(1,10)],f=[],h=O.lli4(l[0],l[0].c,l[1],l[1].c);if(!h)throw new Error("cannot scale this curve. Try reducing it first.");return[0,1].forEach(function(c){const d=f[c*r]=O.copy(a[c*r]);d.x+=(c?u:s)*l[c].n.x,d.y+=(c?u:s)*l[c].n.y}),i?([0,1].forEach(function(c){if(!(r===2&&c)){var d=a[c+1],p={x:d.x-h.x,y:d.y-h.y},y=i?i((c+1)/r):n;i&&!o&&(y=-y);var m=ee(p.x*p.x+p.y*p.y);p.x/=m,p.y/=m,f[c+1]={x:d.x+y*p.x,y:d.y+y*p.y}}}),new V(f)):([0,1].forEach(c=>{if(r===2&&c)return;const d=f[c*r],p=this.derivative(c),y={x:d.x+p.x,y:d.y+p.y};f[c+1]=O.lli4(d,y,h,a[c+1])}),new V(f))}outline(n,r,i,o){if(r=r===void 0?n:r,this._linear){const b=this.normal(0),A=this.points[0],S=this.points[this.points.length-1];let M,E,P;i===void 0&&(i=n,o=r),M={x:A.x+b.x*n,y:A.y+b.y*n},P={x:S.x+b.x*i,y:S.y+b.y*i},E={x:(M.x+P.x)/2,y:(M.y+P.y)/2};const z=[M,E,P];M={x:A.x-b.x*r,y:A.y-b.y*r},P={x:S.x-b.x*o,y:S.y-b.y*o},E={x:(M.x+P.x)/2,y:(M.y+P.y)/2};const N=[P,E,M],j=O.makeline(N[2],z[0]),k=O.makeline(z[2],N[0]),R=[j,new V(z),k,new V(N)];return new ue(R)}const a=this.reduce(),s=a.length,u=[];let l=[],f,h=0,c=this.length();const d=typeof i<"u"&&typeof o<"u";function p(b,A,S,M,E){return function(P){const z=M/S,N=(M+E)/S,j=A-b;return O.map(P,0,1,b+z*j,b+N*j)}}a.forEach(function(b){const A=b.length();d?(u.push(b.scale(p(n,i,c,h,A))),l.push(b.scale(p(-r,-o,c,h,A)))):(u.push(b.scale(n)),l.push(b.scale(-r))),h+=A}),l=l.map(function(b){return f=b.points,f[3]?b.points=[f[3],f[2],f[1],f[0]]:b.points=[f[2],f[1],f[0]],b}).reverse();const y=u[0].points[0],m=u[s-1].points[u[s-1].points.length-1],_=l[s-1].points[l[s-1].points.length-1],g=l[0].points[0],w=O.makeline(_,y),C=O.makeline(m,g),x=[w].concat(u).concat([C]).concat(l);return new ue(x)}outlineshapes(n,r,i){r=r||n;const o=this.outline(n,r).curves,a=[];for(let s=1,u=o.length;s<u/2;s++){const l=O.makeshape(o[s],o[u-s],i);l.startcap.virtual=s>1,l.endcap.virtual=s<u/2-1,a.push(l)}return a}intersects(n,r){return n?n.p1&&n.p2?this.lineIntersects(n):(n instanceof V&&(n=n.reduce()),this.curveintersects(this.reduce(),n,r)):this.selfintersects(r)}lineIntersects(n){const r=Jr(n.p1.x,n.p2.x),i=Jr(n.p1.y,n.p2.y),o=ti(n.p1.x,n.p2.x),a=ti(n.p1.y,n.p2.y);return O.roots(this.points,n).filter(s=>{var u=this.get(s);return O.between(u.x,r,o)&&O.between(u.y,i,a)})}selfintersects(n){const r=this.reduce(),i=r.length-2,o=[];for(let a=0,s,u,l;a<i;a++)u=r.slice(a,a+1),l=r.slice(a+2),s=this.curveintersects(u,l,n),o.push(...s);return o}curveintersects(n,r,i){const o=[];n.forEach(function(s){r.forEach(function(u){s.overlaps(u)&&o.push({left:s,right:u})})});let a=[];return o.forEach(function(s){const u=O.pairiteration(s.left,s.right,i);u.length>0&&(a=a.concat(u))}),a}arcs(n){return n=n||.5,this._iterate(n,[])}_error(n,r,i,o){const a=(o-i)/4,s=this.get(i+a),u=this.get(o-a),l=O.dist(n,r),f=O.dist(n,s),h=O.dist(n,u);return te(f-l)+te(h-l)}_iterate(n,r){let i=0,o=1,a;do{a=0,o=1;let s=this.get(i),u,l,f,h,c=!1,d=!1,p,y=o,m=1;do if(d=c,h=f,y=(i+o)/2,u=this.get(y),l=this.get(o),f=O.getccenter(s,u,l),f.interval={start:i,end:o},c=this._error(f,s,i,o)<=n,p=d&&!c,p||(m=o),c){if(o>=1){if(f.interval.end=m=1,h=f,o>1){let g={x:f.x+f.r*Ch(f.e),y:f.y+f.r*Sh(f.e)};f.e+=O.angle({x:f.x,y:f.y},g,this.get(1))}break}o=o+(o-i)/2}else o=y;while(!p&&a++<100);if(a>=100)break;h=h||f,r.push(h),i=m}while(o<1);return r}}function zn(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function Ph(e){if(Array.isArray(e))return e}function Oh(e){if(Array.isArray(e))return zn(e)}function Eh(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Rh(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,a,s,u=[],l=!0,f=!1;try{if(a=(r=r.call(e)).next,n!==0)for(;!(l=(i=a.call(r)).done)&&(u.push(i.value),u.length!==n);l=!0);}catch(h){f=!0,o=h}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw o}}return u}}function zh(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
20
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nh(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
21
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ih(e,n){if(e==null)return{};var r,i,o=$h(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],n.includes(r)||{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function $h(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 Dh(e,n){return Ph(e)||Rh(e,n)||ho(e,n)||zh()}function jh(e){return Oh(e)||Eh(e)||ho(e)||Nh()}function Fh(e,n){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Uh(e){var n=Fh(e,"string");return typeof n=="symbol"?n:n+""}function ho(e,n){if(e){if(typeof e=="string")return zn(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)?zn(e,n):void 0}}var Lh=(function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,o=(n instanceof Array?n.length?n:[void 0]:[n]).map(function(u){return{keyAccessor:u,isProp:!(u instanceof Function)}}),a=e.reduce(function(u,l){var f=u,h=l;return o.forEach(function(c,d){var p=c.keyAccessor,y=c.isProp,m;if(y){var _=h,g=_[p],w=Ih(_,[p].map(Uh));m=g,h=w}else m=p(h,d);d+1<o.length?(f.hasOwnProperty(m)||(f[m]={}),f=f[m]):r?(f.hasOwnProperty(m)||(f[m]=[]),f[m].push(h)):f[m]=h}),u},{});r instanceof Function&&(function u(l){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;f===o.length?Object.keys(l).forEach(function(h){return l[h]=r(l[h])}):Object.values(l).forEach(function(h){return u(h,f+1)})})(a);var s=a;return i&&(s=[],(function u(l){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];f.length===o.length?s.push({keys:f,vals:l}):Object.entries(l).forEach(function(h){var c=Dh(h,2),d=c[0],p=c[1];return u(p,[].concat(jh(f),[d]))})})(a),n instanceof Array&&n.length===0&&s.length===1&&(s[0].keys=[])),s});function Hh(e,n){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(n).domain(e);break}return this}const ei=Symbol("implicit");function po(){var e=new wr,n=[],r=[],i=ei;function o(a){let s=e.get(a);if(s===void 0){if(i!==ei)return i;e.set(a,s=n.push(a)-1)}return r[s%r.length]}return o.domain=function(a){if(!arguments.length)return n.slice();n=[],e=new wr;for(const s of a)e.has(s)||e.set(s,n.push(s)-1);return o},o.range=function(a){return arguments.length?(r=Array.from(a),o):r.slice()},o.unknown=function(a){return arguments.length?(i=a,o):i},o.copy=function(){return po(n,r).unknown(i)},Hh.apply(o,arguments),o}function qh(e){for(var n=e.length/6|0,r=new Array(n),i=0;i<n;)r[i]="#"+e.slice(i*6,++i*6);return r}const Gh=qh("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");function Vh(e,n){n===void 0&&(n={});var r=n.insertAt;if(!(typeof document>"u")){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",r==="top"&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}var Wh=`.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
+ `;Vh(Wh);function Nn(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 Bh(e){if(Array.isArray(e))return e}function Xh(e){if(Array.isArray(e))return Nn(e)}function ni(e,n,r){if(go())return Reflect.construct.apply(null,arguments);var i=[null];i.push.apply(i,n);var o=new(e.bind.apply(e,i));return o}function ge(e,n,r){return(n=td(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function go(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(go=function(){return!!e})()}function Yh(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Zh(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,a,s,u=[],l=!0,f=!1;try{if(a=(r=r.call(e)).next,n!==0)for(;!(l=(i=a.call(r)).done)&&(u.push(i.value),u.length!==n);l=!0);}catch(h){f=!0,o=h}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw o}}return u}}function Kh(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
45
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qh(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
46
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ri(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function Ht(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?ri(Object(r),!0).forEach(function(i){ge(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ri(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function le(e,n){return Bh(e)||Zh(e,n)||yo(e,n)||Kh()}function ut(e){return Xh(e)||Yh(e)||yo(e)||Qh()}function Jh(e,n){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function td(e){var n=Jh(e,"string");return typeof n=="symbol"?n:n+""}function In(e){"@babel/helpers - typeof";return In=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},In(e)}function yo(e,n){if(e){if(typeof e=="string")return Nn(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)?Nn(e,n):void 0}}var ed=po(Gh);function ii(e,n,r){!n||typeof r!="string"||e.filter(function(i){return!i[r]}).forEach(function(i){i[r]=ed(n(i))})}function nd(e,n){var r=e.nodes,i=e.links,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=o.nodeFilter,s=a===void 0?function(){return!0}:a,u=o.onLoopError,l=u===void 0?function(p){throw"Invalid DAG structure! Found cycle in node path: ".concat(p.join(" -> "),".")}:u,f={};r.forEach(function(p){return f[n(p)]={data:p,out:[],depth:-1,skip:!s(p)}}),i.forEach(function(p){var y=p.source,m=p.target,_=x(y),g=x(m);if(!f.hasOwnProperty(_))throw"Missing source node with id: ".concat(_);if(!f.hasOwnProperty(g))throw"Missing target node with id: ".concat(g);var w=f[_],C=f[g];w.out.push(C);function x(b){return In(b)==="object"?n(b):b}});var h=[];d(Object.values(f));var c=Object.assign.apply(Object,[{}].concat(ut(Object.entries(f).filter(function(p){var y=le(p,2),m=y[1];return!m.skip}).map(function(p){var y=le(p,2),m=y[0],_=y[1];return ge({},m,_.depth)}))));return c;function d(p){for(var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,_=function(){var x=p[g];if(y.indexOf(x)!==-1){var b=[].concat(ut(y.slice(y.indexOf(x))),[x]).map(function(A){return n(A.data)});return h.some(function(A){return A.length===b.length&&A.every(function(S,M){return S===b[M]})})||(h.push(b),l(b)),1}m>x.depth&&(x.depth=m,d(x.out,[].concat(ut(y),[x]),m+(x.skip?0:1)))},g=0,w=p.length;g<w;g++)_()}}var rd=2,K=function(n,r){return r.onNeedsRedraw&&r.onNeedsRedraw()},oi=function(n,r){if(!r.isShadow){var i=q(r.linkDirectionalParticles);r.graphData.links.forEach(function(o){var a=Math.round(Math.abs(i(o)));a?o.__photons=ut(Array(a)).map(function(){return{}}):delete o.__photons})}},We=Gn({props:{graphData:{default:{nodes:[],links:[]},onChange:function(n,r){r.engineRunning=!1,oi(n,r)}},dagMode:{onChange:function(n,r){!n&&(r.graphData.nodes||[]).forEach(function(i){return i.fx=i.fy=void 0})}},dagLevelDistance:{},dagNodeFilter:{default:function(n){return!0}},onDagError:{triggerUpdate:!1},nodeRelSize:{default:4,triggerUpdate:!1,onChange:K},nodeId:{default:"id"},nodeVal:{default:"val",triggerUpdate:!1,onChange:K},nodeColor:{default:"color",triggerUpdate:!1,onChange:K},nodeAutoColorBy:{},nodeCanvasObject:{triggerUpdate:!1,onChange:K},nodeCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:K},nodeVisibility:{default:!0,triggerUpdate:!1,onChange:K},linkSource:{default:"source"},linkTarget:{default:"target"},linkVisibility:{default:!0,triggerUpdate:!1,onChange:K},linkColor:{default:"color",triggerUpdate:!1,onChange:K},linkAutoColorBy:{},linkLineDash:{triggerUpdate:!1,onChange:K},linkWidth:{default:1,triggerUpdate:!1,onChange:K},linkCurvature:{default:0,triggerUpdate:!1,onChange:K},linkCanvasObject:{triggerUpdate:!1,onChange:K},linkCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:K},linkDirectionalArrowLength:{default:0,triggerUpdate:!1,onChange:K},linkDirectionalArrowColor:{triggerUpdate:!1,onChange:K},linkDirectionalArrowRelPos:{default:.5,triggerUpdate:!1,onChange:K},linkDirectionalParticles:{default:0,triggerUpdate:!1,onChange:oi},linkDirectionalParticleSpeed:{default:.01,triggerUpdate:!1},linkDirectionalParticleOffset:{default:0,triggerUpdate:!1},linkDirectionalParticleWidth:{default:4,triggerUpdate:!1},linkDirectionalParticleColor:{triggerUpdate:!1},linkDirectionalParticleCanvasObject:{triggerUpdate:!1},globalScale:{default:1,triggerUpdate:!1},d3AlphaMin:{default:0,triggerUpdate:!1},d3AlphaDecay:{default:.0228,triggerUpdate:!1,onChange:function(n,r){r.forceLayout.alphaDecay(n)}},d3AlphaTarget:{default:0,triggerUpdate:!1,onChange:function(n,r){r.forceLayout.alphaTarget(n)}},d3VelocityDecay:{default:.4,triggerUpdate:!1,onChange:function(n,r){r.forceLayout.velocityDecay(n)}},warmupTicks:{default:0,triggerUpdate:!1},cooldownTicks:{default:1/0,triggerUpdate:!1},cooldownTime:{default:15e3,triggerUpdate:!1},onUpdate:{default:function(){},triggerUpdate:!1},onFinishUpdate:{default:function(){},triggerUpdate:!1},onEngineTick:{default:function(){},triggerUpdate:!1},onEngineStop:{default:function(){},triggerUpdate:!1},onNeedsRedraw:{triggerUpdate:!1},isShadow:{default:!1,triggerUpdate:!1}},methods:{d3Force:function(n,r,i){return i===void 0?n.forceLayout.force(r):(n.forceLayout.force(r,i),this)},d3ReheatSimulation:function(n){return n.forceLayout.alpha(1),this.resetCountdown(),this},resetCountdown:function(n){return n.cntTicks=0,n.startTickTime=new Date,n.engineRunning=!0,this},isEngineRunning:function(n){return!!n.engineRunning},tickFrame:function(n){return!n.isShadow&&r(),o(),!n.isShadow&&a(),!n.isShadow&&s(),i(),this;function r(){n.engineRunning&&(++n.cntTicks>n.cooldownTicks||new Date-n.startTickTime>n.cooldownTime||n.d3AlphaMin>0&&n.forceLayout.alpha()<n.d3AlphaMin?(n.engineRunning=!1,n.onEngineStop()):(n.forceLayout.tick(),n.onEngineTick()))}function i(){var u=q(n.nodeVisibility),l=q(n.nodeVal),f=q(n.nodeColor),h=q(n.nodeCanvasObjectMode),c=n.ctx,d=n.isShadow/n.globalScale,p=n.graphData.nodes.filter(u);c.save(),p.forEach(function(y){var m=h(y);if(n.nodeCanvasObject&&(m==="before"||m==="replace")&&(n.nodeCanvasObject(y,c,n.globalScale),m==="replace")){c.restore();return}var _=Math.sqrt(Math.max(0,l(y)||1))*n.nodeRelSize+d;c.beginPath(),c.arc(y.x,y.y,_,0,2*Math.PI,!1),c.fillStyle=f(y)||"rgba(31, 120, 180, 0.92)",c.fill(),n.nodeCanvasObject&&m==="after"&&n.nodeCanvasObject(y,n.ctx,n.globalScale)}),c.restore()}function o(){var u=q(n.linkVisibility),l=q(n.linkColor),f=q(n.linkWidth),h=q(n.linkLineDash),c=q(n.linkCurvature),d=q(n.linkCanvasObjectMode),p=n.ctx,y=n.isShadow*2,m=n.graphData.links.filter(u);m.forEach(A);var _=[],g=[],w=m;if(n.linkCanvasObject){var C=[],x=[];m.forEach(function(S){return({before:_,after:g,replace:C}[d(S)]||x).push(S)}),w=[].concat(ut(_),g,x),_=_.concat(C)}p.save(),_.forEach(function(S){return n.linkCanvasObject(S,p,n.globalScale)}),p.restore();var b=Lh(w,[l,f,h]);p.save(),Object.entries(b).forEach(function(S){var M=le(S,2),E=M[0],P=M[1],z=!E||E==="undefined"?"rgba(0,0,0,0.15)":E;Object.entries(P).forEach(function(N){var j=le(N,2),k=j[0],R=j[1],T=(k||1)/n.globalScale+y;Object.entries(R).forEach(function(I){var D=le(I,2);D[0];var F=D[1],U=h(F[0]);p.beginPath(),F.forEach(function(L){var H=L.source,Y=L.target;if(!(!H||!Y||!H.hasOwnProperty("x")||!Y.hasOwnProperty("x"))){p.moveTo(H.x,H.y);var X=L.__controlPoints;X?p[X.length===2?"quadraticCurveTo":"bezierCurveTo"].apply(p,ut(X).concat([Y.x,Y.y])):p.lineTo(Y.x,Y.y)}}),p.strokeStyle=z,p.lineWidth=T,p.setLineDash(U||[]),p.stroke()})})}),p.restore(),p.save(),g.forEach(function(S){return n.linkCanvasObject(S,p,n.globalScale)}),p.restore();function A(S){var M=c(S);if(!M){S.__controlPoints=null;return}var E=S.source,P=S.target;if(!(!E||!P||!E.hasOwnProperty("x")||!P.hasOwnProperty("x"))){var z=Math.sqrt(Math.pow(P.x-E.x,2)+Math.pow(P.y-E.y,2));if(z>0){var N=Math.atan2(P.y-E.y,P.x-E.x),j=z*M,k={x:(E.x+P.x)/2+j*Math.cos(N-Math.PI/2),y:(E.y+P.y)/2+j*Math.sin(N-Math.PI/2)};S.__controlPoints=[k.x,k.y]}else{var R=M*70;S.__controlPoints=[P.x,P.y-R,P.x+R,P.y]}}}}function a(){var u=1.6,l=.2,f=q(n.linkDirectionalArrowLength),h=q(n.linkDirectionalArrowRelPos),c=q(n.linkVisibility),d=q(n.linkDirectionalArrowColor||n.linkColor),p=q(n.nodeVal),y=n.ctx;y.save(),n.graphData.links.filter(c).forEach(function(m){var _=f(m);if(!(!_||_<0)){var g=m.source,w=m.target;if(!(!g||!w||!g.hasOwnProperty("x")||!w.hasOwnProperty("x"))){var C=Math.sqrt(Math.max(0,p(g)||1))*n.nodeRelSize,x=Math.sqrt(Math.max(0,p(w)||1))*n.nodeRelSize,b=Math.min(1,Math.max(0,h(m))),A=d(m)||"rgba(0,0,0,0.28)",S=_/u/2,M=m.__controlPoints&&ni(V,[g.x,g.y].concat(ut(m.__controlPoints),[w.x,w.y])),E=M?function(T){return M.get(T)}:function(T){return{x:g.x+(w.x-g.x)*T||0,y:g.y+(w.y-g.y)*T||0}},P=M?M.length():Math.sqrt(Math.pow(w.x-g.x,2)+Math.pow(w.y-g.y,2)),z=C+_+(P-C-x-_)*b,N=E(z/P),j=E((z-_)/P),k=E((z-_*(1-l))/P),R=Math.atan2(N.y-j.y,N.x-j.x)-Math.PI/2;y.beginPath(),y.moveTo(N.x,N.y),y.lineTo(j.x+S*Math.cos(R),j.y+S*Math.sin(R)),y.lineTo(k.x,k.y),y.lineTo(j.x-S*Math.cos(R),j.y-S*Math.sin(R)),y.fillStyle=A,y.fill()}}}),y.restore()}function s(){var u=q(n.linkDirectionalParticles),l=q(n.linkDirectionalParticleSpeed),f=q(n.linkDirectionalParticleOffset),h=q(n.linkDirectionalParticleWidth),c=q(n.linkVisibility),d=q(n.linkDirectionalParticleColor||n.linkColor),p=n.ctx;p.save(),n.graphData.links.filter(c).forEach(function(y){var m=u(y);if(!(!y.hasOwnProperty("__photons")||!y.__photons.length)){var _=y.source,g=y.target;if(!(!_||!g||!_.hasOwnProperty("x")||!g.hasOwnProperty("x"))){var w=l(y),C=Math.abs(f(y)),x=y.__photons||[],b=Math.max(0,h(y)/2)/Math.sqrt(n.globalScale),A=d(y)||"rgba(0,0,0,0.28)";p.fillStyle=A;var S=y.__controlPoints?ni(V,[_.x,_.y].concat(ut(y.__controlPoints),[g.x,g.y])):null,M=0,E=!1;x.forEach(function(P){var z=!!P.__singleHop;if(P.hasOwnProperty("__progressRatio")||(P.__progressRatio=z?w<0?1:0:(M+C)/m),!z&&M++,P.__progressRatio+=w,P.__progressRatio>=1||P.__progressRatio<0)if(!z)P.__progressRatio=P.__progressRatio%1,P.__progressRatio<0&&P.__progressRatio++;else{E=!0;return}var N=P.__progressRatio,j=S?S.get(N):{x:_.x+(g.x-_.x)*N||0,y:_.y+(g.y-_.y)*N||0};n.linkDirectionalParticleCanvasObject?n.linkDirectionalParticleCanvasObject(j.x,j.y,y,p,n.globalScale):(p.beginPath(),p.arc(j.x,j.y,b,0,2*Math.PI,!1),p.fill())}),E&&(y.__photons=y.__photons.filter(function(P){return!P.__singleHop||P.__progressRatio<=1&&P.__progressRatio>=0}))}}}),p.restore()}},emitParticle:function(n,r){return r&&(!r.__photons&&(r.__photons=[]),r.__photons.push({__singleHop:!0})),this}},stateInit:function(){return{forceLayout:mh().force("link",ch()).force("charge",xh()).force("center",dc()).force("dagRadial",null).stop(),engineRunning:!1}},init:function(n,r){r.ctx=n},update:function(n,r){n.engineRunning=!1,n.onUpdate(),n.nodeAutoColorBy!==null&&ii(n.graphData.nodes,q(n.nodeAutoColorBy),n.nodeColor),n.linkAutoColorBy!==null&&ii(n.graphData.links,q(n.linkAutoColorBy),n.linkColor),n.graphData.links.forEach(function(d){d.source=d[n.linkSource],d.target=d[n.linkTarget]}),n.forceLayout.stop().alpha(1).nodes(n.graphData.nodes);var i=n.forceLayout.force("link");i&&i.id(function(d){return d[n.nodeId]}).links(n.graphData.links);var o=n.dagMode&&nd(n.graphData,function(d){return d[n.nodeId]},{nodeFilter:n.dagNodeFilter,onLoopError:n.onDagError||void 0}),a=Math.max.apply(Math,ut(Object.values(o||[]))),s=n.dagLevelDistance||n.graphData.nodes.length/(a||1)*rd*(["radialin","radialout"].indexOf(n.dagMode)!==-1?.7:1);if(["lr","rl","td","bu"].includes(r.dagMode)){var u=["lr","rl"].includes(r.dagMode)?"fx":"fy";n.graphData.nodes.filter(n.dagNodeFilter).forEach(function(d){return delete d[u]})}if(["lr","rl","td","bu"].includes(n.dagMode)){var l=["rl","bu"].includes(n.dagMode),f=function(p){return(o[p[n.nodeId]]-a/2)*s*(l?-1:1)},h=["lr","rl"].includes(n.dagMode)?"fx":"fy";n.graphData.nodes.filter(n.dagNodeFilter).forEach(function(d){return d[h]=f(d)})}n.forceLayout.force("dagRadial",["radialin","radialout"].indexOf(n.dagMode)!==-1?bh(function(d){var p=o[d[n.nodeId]]||-1;return(n.dagMode==="radialin"?a-p:p)*s}).strength(function(d){return n.dagNodeFilter(d)?1:0}):null);for(var c=0;c<n.warmupTicks&&!(n.d3AlphaMin>0&&n.forceLayout.alpha()<n.d3AlphaMin);c++)n.forceLayout.tick();this.resetCountdown(),n.onFinishUpdate()}});function _o(e,n){var r=e instanceof Array?e:[e],i=new n;return i._destructor&&i._destructor(),{linkProp:function(a){return{default:i[a](),onChange:function(u,l){r.forEach(function(f){return l[f][a](u)})},triggerUpdate:!1}},linkMethod:function(a){return function(s){for(var u=arguments.length,l=new Array(u>1?u-1:0),f=1;f<u;f++)l[f-1]=arguments[f];var h=[];return r.forEach(function(c){var d=s[c],p=d[a].apply(d,l);p!==d&&h.push(p)}),h.length?h[0]:this}}}}var id=800,od=4,ad=5,vo=_o("forceGraph",We),sd=_o(["forceGraph","shadowGraph"],We),ud=Object.assign.apply(Object,ut(["nodeColor","nodeAutoColorBy","nodeCanvasObject","nodeCanvasObjectMode","linkColor","linkAutoColorBy","linkLineDash","linkWidth","linkCanvasObject","linkCanvasObjectMode","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowRelPos","linkDirectionalParticles","linkDirectionalParticleSpeed","linkDirectionalParticleOffset","linkDirectionalParticleWidth","linkDirectionalParticleColor","linkDirectionalParticleCanvasObject","dagMode","dagLevelDistance","dagNodeFilter","onDagError","d3AlphaMin","d3AlphaDecay","d3VelocityDecay","warmupTicks","cooldownTicks","cooldownTime","onEngineTick","onEngineStop"].map(function(e){return ge({},e,vo.linkProp(e))})).concat(ut(["nodeRelSize","nodeId","nodeVal","nodeVisibility","linkSource","linkTarget","linkVisibility","linkCurvature"].map(function(e){return ge({},e,sd.linkProp(e))})))),ld=Object.assign.apply(Object,ut(["d3Force","d3ReheatSimulation","emitParticle"].map(function(e){return ge({},e,vo.linkMethod(e))})));function cn(e){if(e.canvas){var n=e.canvas.width,r=e.canvas.height;n===300&&r===150&&(n=r=0);var i=window.devicePixelRatio;n/=i,r/=i,[e.canvas,e.shadowCanvas].forEach(function(a){a.style.width="".concat(e.width,"px"),a.style.height="".concat(e.height,"px"),a.width=e.width*i,a.height=e.height*i,!n&&!r&&a.getContext("2d").scale(i,i)});var o=gt(e.canvas).k;e.zoom.translateBy(e.zoom.__baseElem,(e.width-n)/2/o,(e.height-r)/2/o),e.needsRedraw=!0}}function mo(e){var n=window.devicePixelRatio;e.setTransform(n,0,0,n,0,0)}function ai(e,n,r){e.save(),mo(e),e.clearRect(0,0,n,r),e.restore()}var fd=Gn({props:Ht({width:{default:window.innerWidth,onChange:function(n,r){return cn(r)},triggerUpdate:!1},height:{default:window.innerHeight,onChange:function(n,r){return cn(r)},triggerUpdate:!1},graphData:{default:{nodes:[],links:[]},onChange:function(n,r){[n.nodes,n.links].every(function(o){return(o||[]).every(function(a){return!a.hasOwnProperty("__indexColor")})})&&r.colorTracker.reset(),[{type:"Node",objs:n.nodes},{type:"Link",objs:n.links}].forEach(i),r.forceGraph.graphData(n),r.shadowGraph.graphData(n);function i(o){var a=o.type,s=o.objs;s.filter(function(u){if(!u.hasOwnProperty("__indexColor"))return!0;var l=r.colorTracker.lookup(u.__indexColor);return!l||!l.hasOwnProperty("d")||l.d!==u}).forEach(function(u){u.__indexColor=r.colorTracker.register({type:a,d:u})})}},triggerUpdate:!1},backgroundColor:{onChange:function(n,r){r.canvas&&n&&(r.canvas.style.background=n)},triggerUpdate:!1},nodeLabel:{default:"name",triggerUpdate:!1},nodePointerAreaPaint:{onChange:function(n,r){r.shadowGraph.nodeCanvasObject(n?function(i,o,a){return n(i,i.__indexColor,o,a)}:null),r.flushShadowCanvas&&r.flushShadowCanvas()},triggerUpdate:!1},linkPointerAreaPaint:{onChange:function(n,r){r.shadowGraph.linkCanvasObject(n?function(i,o,a){return n(i,i.__indexColor,o,a)}:null),r.flushShadowCanvas&&r.flushShadowCanvas()},triggerUpdate:!1},linkLabel:{default:"name",triggerUpdate:!1},linkHoverPrecision:{default:4,triggerUpdate:!1},minZoom:{default:.01,onChange:function(n,r){r.zoom.scaleExtent([n,r.zoom.scaleExtent()[1]])},triggerUpdate:!1},maxZoom:{default:1e3,onChange:function(n,r){r.zoom.scaleExtent([r.zoom.scaleExtent()[0],n])},triggerUpdate:!1},enableNodeDrag:{default:!0,triggerUpdate:!1},enableZoomInteraction:{default:!0,triggerUpdate:!1},enablePanInteraction:{default:!0,triggerUpdate:!1},enableZoomPanInteraction:{default:!0,triggerUpdate:!1},enablePointerInteraction:{default:!0,onChange:function(n,r){r.hoverObj=null},triggerUpdate:!1},autoPauseRedraw:{default:!0,triggerUpdate:!1},onNodeDrag:{default:function(){},triggerUpdate:!1},onNodeDragEnd:{default:function(){},triggerUpdate:!1},onNodeClick:{triggerUpdate:!1},onNodeRightClick:{triggerUpdate:!1},onNodeHover:{triggerUpdate:!1},onLinkClick:{triggerUpdate:!1},onLinkRightClick:{triggerUpdate:!1},onLinkHover:{triggerUpdate:!1},onBackgroundClick:{triggerUpdate:!1},onBackgroundRightClick:{triggerUpdate:!1},showPointerCursor:{default:!0,triggerUpdate:!1},onZoom:{triggerUpdate:!1},onZoomEnd:{triggerUpdate:!1},onRenderFramePre:{triggerUpdate:!1},onRenderFramePost:{triggerUpdate:!1}},ud),aliases:{stopAnimation:"pauseAnimation"},methods:Ht({graph2ScreenCoords:function(n,r,i){var o=gt(n.canvas);return{x:r*o.k+o.x,y:i*o.k+o.y}},screen2GraphCoords:function(n,r,i){var o=gt(n.canvas);return{x:(r-o.x)/o.k,y:(i-o.y)/o.k}},centerAt:function(n,r,i,o){if(!n.canvas)return null;if(r!==void 0||i!==void 0){var a=Object.assign({},r!==void 0?{x:r}:{},i!==void 0?{y:i}:{});return o?n.tweenGroup.add(new Pr(s()).to(a,o).easing(Ft.Quadratic.Out).onUpdate(u).onComplete(function(){n.tweenGroup.remove(this)}).start()):u(a),this}return s();function s(){var l=gt(n.canvas);return{x:(n.width/2-l.x)/l.k,y:(n.height/2-l.y)/l.k}}function u(l){var f=l.x,h=l.y;n.zoom.translateTo(n.zoom.__baseElem,f===void 0?s().x:f,h===void 0?s().y:h),n.needsRedraw=!0}},zoom:function(n,r,i){if(!n.canvas)return null;if(r!==void 0)return i?n.tweenGroup.add(new Pr({k:o()}).to({k:r},i).easing(Ft.Quadratic.Out).onUpdate(function(s){var u=s.k;return a(u)}).onComplete(function(){n.tweenGroup.remove(this)}).start()):a(r),this;return o();function o(){return gt(n.canvas).k}function a(s){n.zoom.scaleTo(n.zoom.__baseElem,s),n.needsRedraw=!0}},zoomToFit:function(n){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:10,o=arguments.length,a=new Array(o>3?o-3:0),s=3;s<o;s++)a[s-3]=arguments[s];var u=this.getGraphBbox.apply(this,a);if(u){var l={x:(u.x[0]+u.x[1])/2,y:(u.y[0]+u.y[1])/2},f=Math.max(1e-12,Math.min(1e12,(n.width-i*2)/(u.x[1]-u.x[0]),(n.height-i*2)/(u.y[1]-u.y[0])));this.centerAt(l.x,l.y,r),this.zoom(f,r)}return this},getGraphBbox:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){return!0},i=q(n.nodeVal),o=function(u){return Math.sqrt(Math.max(0,i(u)||1))*n.nodeRelSize},a=n.graphData.nodes.filter(r).map(function(s){return{x:s.x,y:s.y,r:o(s)}});return a.length?{x:[Cr(a,function(s){return s.x-s.r}),Ar(a,function(s){return s.x+s.r})],y:[Cr(a,function(s){return s.y-s.r}),Ar(a,function(s){return s.y+s.r})]}:null},pauseAnimation:function(n){return n.animationFrameRequestId&&(cancelAnimationFrame(n.animationFrameRequestId),n.animationFrameRequestId=null),this},resumeAnimation:function(n){return n.animationFrameRequestId||this._animationCycle(),this},_destructor:function(){this.pauseAnimation(),this.graphData({nodes:[],links:[]})}},ld),stateInit:function(){return{lastSetZoom:1,zoom:ml(),forceGraph:new We,shadowGraph:new We().cooldownTicks(0).nodeColor("__indexColor").linkColor("__indexColor").isShadow(!0),colorTracker:new Gf,tweenGroup:new Li}},init:function(n,r){var i=this;n.innerHTML="";var o=document.createElement("div");o.classList.add("force-graph-container"),o.style.position="relative",n.appendChild(o),r.canvas=document.createElement("canvas"),r.backgroundColor&&(r.canvas.style.background=r.backgroundColor),o.appendChild(r.canvas),r.shadowCanvas=document.createElement("canvas");var a=r.canvas.getContext("2d"),s=r.shadowCanvas.getContext("2d",{willReadFrequently:!0}),u={x:-1e12,y:-1e12},l=function(){var c=null,d=window.devicePixelRatio,p=u.x>0&&u.y>0?s.getImageData(u.x*d,u.y*d,1,1):null;return p&&(c=r.colorTracker.lookup(p.data)),c};st(r.canvas).call(Ps().subject(function(){if(!r.enableNodeDrag)return null;var h=l();return h&&h.type==="Node"?h.d:null}).on("start",function(h){var c=h.subject;c.__initialDragPos={x:c.x,y:c.y,fx:c.fx,fy:c.fy},h.active||(c.fx=c.x,c.fy=c.y),r.canvas.classList.add("grabbable")}).on("drag",function(h){var c=h.subject,d=c.__initialDragPos,p=h,y=gt(r.canvas).k,m={x:d.x+(p.x-d.x)/y-c.x,y:d.y+(p.y-d.y)/y-c.y};["x","y"].forEach(function(_){return c["f".concat(_)]=c[_]=d[_]+(p[_]-d[_])/y}),!(!c.__dragged&&ad>=Math.sqrt(kl(["x","y"].map(function(_){return Math.pow(h[_]-d[_],2)}))))&&(r.forceGraph.d3AlphaTarget(.3).resetCountdown(),r.isPointerDragging=!0,c.__dragged=!0,r.onNodeDrag(c,m))}).on("end",function(h){var c=h.subject,d=c.__initialDragPos,p={x:c.x-d.x,y:c.y-d.y};d.fx===void 0&&(c.fx=void 0),d.fy===void 0&&(c.fy=void 0),delete c.__initialDragPos,r.forceGraph.d3AlphaTarget()&&r.forceGraph.d3AlphaTarget(0).resetCountdown(),r.canvas.classList.remove("grabbable"),r.isPointerDragging=!1,c.__dragged&&(delete c.__dragged,r.onNodeDragEnd(c,p))})),r.zoom(r.zoom.__baseElem=st(r.canvas)),r.zoom.__baseElem.on("dblclick.zoom",null),r.zoom.filter(function(h){return!h.button&&r.enableZoomPanInteraction&&(h.type!=="wheel"||q(r.enableZoomInteraction)(h))&&(h.type==="wheel"||q(r.enablePanInteraction)(h))}).on("zoom",function(h){var c=h.transform;[a,s].forEach(function(d){mo(d),d.translate(c.x,c.y),d.scale(c.k,c.k)}),r.isPointerDragging=!0,r.onZoom&&r.onZoom(Ht(Ht({},c),i.centerAt())),r.needsRedraw=!0}).on("end",function(h){r.isPointerDragging=!1,r.onZoomEnd&&r.onZoomEnd(Ht(Ht({},h.transform),i.centerAt()))}),cn(r),r.forceGraph.onNeedsRedraw(function(){return r.needsRedraw=!0}).onFinishUpdate(function(){gt(r.canvas).k===r.lastSetZoom&&r.graphData.nodes.length&&(r.zoom.scaleTo(r.zoom.__baseElem,r.lastSetZoom=od/Math.cbrt(r.graphData.nodes.length)),r.needsRedraw=!0)}),r.tooltip=new hc(o),["pointermove","pointerdown"].forEach(function(h){return o.addEventListener(h,function(c){h==="pointerdown"&&(r.isPointerPressed=!0,r.pointerDownEvent=c),!r.isPointerDragging&&c.type==="pointermove"&&r.onBackgroundClick&&(c.pressure>0||r.isPointerPressed)&&(c.pointerType==="mouse"||c.movementX===void 0||[c.movementX,c.movementY].some(function(y){return Math.abs(y)>1}))&&(r.isPointerDragging=!0);var d=p(o);u.x=c.pageX-d.left,u.y=c.pageY-d.top;function p(y){var m=y.getBoundingClientRect(),_=window.pageXOffset||document.documentElement.scrollLeft,g=window.pageYOffset||document.documentElement.scrollTop;return{top:m.top+g,left:m.left+_}}},{passive:!0})}),o.addEventListener("pointerup",function(h){if(r.isPointerPressed){if(r.isPointerPressed=!1,r.isPointerDragging){r.isPointerDragging=!1;return}var c=[h,r.pointerDownEvent];requestAnimationFrame(function(){if(h.button===0)if(r.hoverObj){var d=r["on".concat(r.hoverObj.type,"Click")];d&&d.apply(void 0,[r.hoverObj.d].concat(c))}else r.onBackgroundClick&&r.onBackgroundClick.apply(r,c);if(h.button===2)if(r.hoverObj){var p=r["on".concat(r.hoverObj.type,"RightClick")];p&&p.apply(void 0,[r.hoverObj.d].concat(c))}else r.onBackgroundRightClick&&r.onBackgroundRightClick.apply(r,c)})}},{passive:!0}),o.addEventListener("contextmenu",function(h){return!r.onBackgroundRightClick&&!r.onNodeRightClick&&!r.onLinkRightClick?!0:(h.preventDefault(),!1)}),r.forceGraph(a),r.shadowGraph(s);var f=Zl(function(){ai(s,r.width,r.height),r.shadowGraph.linkWidth(function(c){return q(r.linkWidth)(c)+r.linkHoverPrecision});var h=gt(r.canvas);r.shadowGraph.globalScale(h.k).tickFrame()},id);r.flushShadowCanvas=f.flush,(this._animationCycle=function h(){var c=!r.autoPauseRedraw||!!r.needsRedraw||r.forceGraph.isEngineRunning()||r.graphData.links.some(function(C){return C.__photons&&C.__photons.length});if(r.needsRedraw=!1,r.enablePointerInteraction){var d=r.isPointerDragging?null:l();if(d!==r.hoverObj){var p=r.hoverObj,y=p?p.type:null,m=d?d.type:null;if(y&&y!==m){var _=r["on".concat(y,"Hover")];_&&_(null,p.d)}if(m){var g=r["on".concat(m,"Hover")];g&&g(d.d,y===m?p.d:null)}r.tooltip.content(d&&q(r["".concat(d.type.toLowerCase(),"Label")])(d.d)||null),r.canvas.classList[(d&&r["on".concat(m,"Click")]||!d&&r.onBackgroundClick)&&q(r.showPointerCursor)(d==null?void 0:d.d)?"add":"remove"]("clickable"),r.hoverObj=d}c&&f()}if(c){ai(a,r.width,r.height);var w=gt(r.canvas).k;r.onRenderFramePre&&r.onRenderFramePre(a,w),r.forceGraph.globalScale(w).tickFrame(),r.onRenderFramePost&&r.onRenderFramePost(a,w)}r.tweenGroup.update(),r.animationFrameRequestId=requestAnimationFrame(h)})()},update:function(n){}}),hn={exports:{}},dn,si;function cd(){if(si)return dn;si=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return dn=e,dn}var pn,ui;function hd(){if(ui)return pn;ui=1;var e=cd();function n(){}function r(){}return r.resetWarningCache=n,pn=function(){function i(s,u,l,f,h,c){if(c!==e){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}i.isRequired=i;function o(){return i}var a={array:i,bigint:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:o,element:i,elementType:i,instanceOf:o,node:i,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:n};return a.PropTypes=a,a},pn}var li;function dd(){return li||(li=1,hn.exports=hd()()),hn.exports}var pd=dd();const v=wo(pd),Je={width:v.number,height:v.number,graphData:v.shape({nodes:v.arrayOf(v.object).isRequired,links:v.arrayOf(v.object).isRequired}),backgroundColor:v.string,nodeRelSize:v.number,nodeId:v.string,nodeLabel:v.oneOfType([v.string,v.func]),nodeVal:v.oneOfType([v.number,v.string,v.func]),nodeVisibility:v.oneOfType([v.bool,v.string,v.func]),nodeColor:v.oneOfType([v.string,v.func]),nodeAutoColorBy:v.oneOfType([v.string,v.func]),onNodeHover:v.func,onNodeClick:v.func,linkSource:v.string,linkTarget:v.string,linkLabel:v.oneOfType([v.string,v.func]),linkVisibility:v.oneOfType([v.bool,v.string,v.func]),linkColor:v.oneOfType([v.string,v.func]),linkAutoColorBy:v.oneOfType([v.string,v.func]),linkWidth:v.oneOfType([v.number,v.string,v.func]),linkCurvature:v.oneOfType([v.number,v.string,v.func]),linkDirectionalArrowLength:v.oneOfType([v.number,v.string,v.func]),linkDirectionalArrowColor:v.oneOfType([v.string,v.func]),linkDirectionalArrowRelPos:v.oneOfType([v.number,v.string,v.func]),linkDirectionalParticles:v.oneOfType([v.number,v.string,v.func]),linkDirectionalParticleSpeed:v.oneOfType([v.number,v.string,v.func]),linkDirectionalParticleOffset:v.oneOfType([v.number,v.string,v.func]),linkDirectionalParticleWidth:v.oneOfType([v.number,v.string,v.func]),linkDirectionalParticleColor:v.oneOfType([v.string,v.func]),onLinkHover:v.func,onLinkClick:v.func,dagMode:v.oneOf(["td","bu","lr","rl","zin","zout","radialin","radialout"]),dagLevelDistance:v.number,dagNodeFilter:v.func,onDagError:v.func,d3AlphaMin:v.number,d3AlphaDecay:v.number,d3VelocityDecay:v.number,warmupTicks:v.number,cooldownTicks:v.number,cooldownTime:v.number,onEngineTick:v.func,onEngineStop:v.func,getGraphBbox:v.func},xo={zoomToFit:v.func,onNodeRightClick:v.func,onNodeDrag:v.func,onNodeDragEnd:v.func,onLinkRightClick:v.func,linkHoverPrecision:v.number,onBackgroundClick:v.func,onBackgroundRightClick:v.func,showPointerCursor:v.oneOfType([v.bool,v.func]),enablePointerInteraction:v.bool,enableNodeDrag:v.bool},Qn={showNavInfo:v.bool,nodeOpacity:v.number,nodeResolution:v.number,nodeThreeObject:v.oneOfType([v.object,v.string,v.func]),nodeThreeObjectExtend:v.oneOfType([v.bool,v.string,v.func]),nodePositionUpdate:v.func,linkOpacity:v.number,linkResolution:v.number,linkCurveRotation:v.oneOfType([v.number,v.string,v.func]),linkMaterial:v.oneOfType([v.object,v.string,v.func]),linkThreeObject:v.oneOfType([v.object,v.string,v.func]),linkThreeObjectExtend:v.oneOfType([v.bool,v.string,v.func]),linkPositionUpdate:v.func,linkDirectionalArrowResolution:v.number,linkDirectionalParticleResolution:v.number,linkDirectionalParticleThreeObject:v.oneOfType([v.object,v.string,v.func]),forceEngine:v.oneOf(["d3","ngraph"]),ngraphPhysics:v.object,numDimensions:v.oneOf([1,2,3])},gd=Object.assign({},Je,xo,{linkLineDash:v.oneOfType([v.arrayOf(v.number),v.string,v.func]),nodeCanvasObjectMode:v.oneOfType([v.string,v.func]),nodeCanvasObject:v.func,nodePointerAreaPaint:v.func,linkCanvasObjectMode:v.oneOfType([v.string,v.func]),linkCanvasObject:v.func,linkPointerAreaPaint:v.func,linkDirectionalParticleCanvasObject:v.func,autoPauseRedraw:v.bool,minZoom:v.number,maxZoom:v.number,enableZoomInteraction:v.oneOfType([v.bool,v.func]),enablePanInteraction:v.oneOfType([v.bool,v.func]),onZoom:v.func,onZoomEnd:v.func,onRenderFramePre:v.func,onRenderFramePost:v.func});Object.assign({},Je,xo,Qn,{enableNavigationControls:v.bool,controlType:v.oneOf(["trackball","orbit","fly"]),rendererConfig:v.object,extraRenderers:v.arrayOf(v.shape({render:v.func.isRequired}))});Object.assign({},Je,Qn,{nodeDesc:v.oneOfType([v.string,v.func]),linkDesc:v.oneOfType([v.string,v.func])});Object.assign({},Je,Qn,{markerAttrs:v.object,yOffset:v.number,glScale:v.number});const Jn=Lo(fd,{methodNames:["emitParticle","d3Force","d3ReheatSimulation","stopAnimation","pauseAnimation","resumeAnimation","centerAt","zoom","zoomToFit","getGraphBbox","screen2GraphCoords","graph2ScreenCoords"]});Jn.displayName="ForceGraph2D";Jn.propTypes=gd;const yd="#b85c34",_d="#8a7a60";function xd({skills:e,edges:n,selectedId:r,onSelect:i}){const o=Q.useRef(null),[a,s]=Q.useState({width:640,height:420});Q.useEffect(()=>{const l=()=>{const f=o.current;if(!f)return;const h=f.getBoundingClientRect();h.width>0&&h.height>0&&s({width:h.width,height:h.height})};return l(),window.addEventListener("resize",l),()=>window.removeEventListener("resize",l)},[]);const u=Q.useMemo(()=>({nodes:e.map(l=>({id:l.id,name:l.name??l.id})),links:n.map(l=>({source:l.from,target:l.to}))}),[e,n]);return tr.jsx("div",{ref:o,className:"w-full h-full",children:tr.jsx(Jn,{graphData:u,width:a.width,height:a.height,nodeId:"id",nodeLabel:"name",nodeColor:l=>l.id===r?yd:_d,linkDirectionalArrowLength:4,linkDirectionalArrowRelPos:1,onNodeClick:l=>i(l.id)})})}export{xd as SkillReferenceGraph};
@@ -0,0 +1,3 @@
1
+ import{X as l,a9 as J,a5 as K,ab as Q,a7 as f,I as t,c as R,a4 as L}from"./index-CO_7DroC.js";import{P as D}from"./Panel-CbTPsYHq.js";import{L as U}from"./ListDetail-CIIJOWwI.js";import{M as Y}from"./MarkdownEditor-D0-y8V-f.js";import{a as I,S as Z}from"./ScopeSwitcher-BNesCJ_t.js";import{T as _}from"./Toggle-C0a-6xV7.js";import{P as V}from"./ProvenanceBadge-cEqPpFsT.js";import{l as ee}from"./listSkills-QORduPIk.js";import{S as te,V as F}from"./Library-CG1LDXLw.js";import{p as se,r as ae,s as ne}from"./skillFrontmatter-Dif5JIg7.js";import"./monaco-editor-BW5C4Iv1.js";function re(d,m){return{user:{skills:`${d}/.claude/skills`,commands:`${d}/.claude/commands`},project:m?{skills:`${m}/.claude/skills`,commands:`${m}/.claude/commands`}:null}}function le(){const d=J(),m=K(),h=(m==null?void 0:m.cwd)??null,x=Q(e=>e.navFace),j=l.useRef(!1),T=l.useRef(x),[p,N]=l.useState(()=>x==="project"&&h?"project":"user"),[v,k]=l.useState([]),[r,C]=l.useState(null),[b,E]=l.useState("installed"),[$,B]=l.useState(""),w=l.useMemo(()=>d?re(d,h):null,[d,h]);l.useEffect(()=>{if(T.current!==x){if(T.current=x,j.current){j.current=!1;return}N(x==="project"&&h?"project":"user")}},[x,h]),l.useEffect(()=>{if(!w)return;let e=!1;const i=p==="user"?w.user:w.project;if(!i){k([]);return}return(async()=>{var c;const n=[],s=await ee(i.skills);for(const a of s)n.push({kind:"skills",scope:p,name:a.name,path:a.path,dir:a.dir,disabled:ae(a.text),description:se(a.text).description??void 0});const o=await window.api.config.listDir(i.commands,{filesOnly:!0});for(const a of o.entries)a.name.endsWith(".md")&&n.push({kind:"commands",scope:p,name:a.name.replace(/\.md$/,""),path:a.path,dir:null,disabled:!1});e||(n.sort((a,A)=>a.kind===A.kind?a.name.localeCompare(A.name):a.kind==="skills"?-1:1),k(n),n.find(a=>a.path===r)||C(((c=n[0])==null?void 0:c.path)??null))})(),()=>{e=!0}},[p,w]);const y=f(e=>e.files),P=f(e=>e.loadText),H=f(e=>e.setDraft),O=f(e=>e.saveText),W=f(e=>e.revert),X=f(e=>e.watchFile),M=f(e=>e.unwatchFile);async function q(e,i){const n=await window.api.config.readText(e.path);if(!n.exists)return;const s=ne(n.text,i);if(s===n.text)return;const o=await window.api.config.writeText(e.path,s);if(!o.ok){L.error(o.error??"failed to update skill");return}k(c=>c.map(a=>a.path===e.path?{...a,disabled:i}:a)),y[e.path]&&P(e.path)}async function z(e){if(!e.dir||!window.confirm(`Remove skill "${e.name}"?
2
+
3
+ Its folder moves to the trash (recoverable); reinstall any time from the Library.`))return;const i=await window.api.files.delete(e.dir);if(!i.ok){L.error(i.error??"failed to remove skill");return}L.info(`Removed "${e.name}" — moved to trash`),M(e.path),k(n=>n.filter(s=>s.path!==e.path)),C(n=>{var o;return n!==e.path?n:((o=v.filter(c=>c.path!==e.path)[0])==null?void 0:o.path)??null})}l.useEffect(()=>{if(r)return y[r]||P(r),X(r),()=>M(r)},[r]);const[G,S]=l.useState(null);if(!d)return t.jsx(R,{title:"loading…"});if(b==="library")return t.jsx(D,{toolbar:t.jsx(F,{active:b,onChange:E,installedLabel:"Installed",libraryLabel:"Library"}),children:t.jsx(te,{})});if(p==="project"&&!h)return t.jsx(D,{toolbar:t.jsxs(t.Fragment,{children:[t.jsx(F,{active:b,onChange:E}),t.jsx("span",{className:"mx-2 text-fg-faint",children:"·"}),t.jsx(I,{scopes:["user","project"],active:p,onChange:e=>{j.current=!0,N(e)}})]}),children:t.jsx(R,{title:"no active project",hint:"open a tab in a project directory to view project skills & commands"})});const u=v.find(e=>e.path===r)??null,g=r?y[r]:null;return t.jsx(D,{toolbar:t.jsxs(t.Fragment,{children:[t.jsx(F,{active:b,onChange:E}),t.jsx("span",{className:"mx-2 text-fg-faint",children:"·"}),t.jsx(I,{scopes:["user","project"],active:p,onChange:e=>{j.current=!0,N(e)}}),t.jsxs("span",{className:"ml-3 text-fg-faint",children:[v.length," ",v.length===1?"item":"items"]}),t.jsx("div",{className:"flex-1"}),u&&t.jsx(V,{scope:u.scope,input:{type:u.kind==="commands"?"command":"skill",name:u.name}}),t.jsx("span",{className:"ml-2 text-fg-faint truncate",children:(u==null?void 0:u.path)??""})]}),footer:r&&g?t.jsx(Z,{dirty:g.dirty,busy:g.busy,parseError:G,lastSavedAt:g.lastSavedAt,onSave:async()=>{S(null);const e=await O(r);e.ok||S(e.error??"save failed")},onRevert:()=>{S(null),W(r)}}):null,children:t.jsx(U,{sidebar:t.jsxs("div",{className:"py-1",children:[t.jsx("div",{className:"px-2 pb-1",children:t.jsx("input",{value:$,onChange:e=>B(e.target.value),placeholder:"filter…",className:"w-full bg-bg border border-line rounded px-2 py-0.5 text-xs text-fg"})}),["skills","commands"].map(e=>{const i=$.toLowerCase(),n=v.filter(s=>s.kind===e&&(!i||s.name.toLowerCase().includes(i)));return t.jsxs("div",{className:"mb-3",children:[t.jsx("div",{className:"px-3 py-1 text-xs uppercase tracking-wider text-fg-faint",children:e==="skills"?"Skills":"Slash Commands"}),n.length===0?t.jsx("div",{className:"px-3 py-1 text-xs text-fg-faint italic",children:"none"}):n.map(s=>{var c;const o=s.kind==="skills";return t.jsxs("div",{className:`w-full px-3 py-1 text-xs flex items-center justify-between gap-2 ${r===s.path?"bg-bg-hi text-fg":"text-fg-dim hover:text-fg hover:bg-bg-hi"}`,children:[t.jsxs("button",{onClick:()=>C(s.path),className:"flex-1 min-w-0 text-left",children:[t.jsxs("div",{className:`truncate ${s.disabled?"line-through opacity-50":""}`,title:s.disabled?"Disabled — Claude will not auto-invoke this skill":void 0,children:[s.kind==="commands"?"/":"",s.name]}),s.description&&t.jsx("div",{className:"truncate text-fg-faint",children:s.description})]}),t.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[t.jsx(V,{interactive:!1,scope:s.scope,input:{type:s.kind==="commands"?"command":"skill",name:s.name}}),((c=y[s.path])==null?void 0:c.dirty)&&t.jsx("span",{className:"w-1 h-1 rounded-full bg-accent"}),o&&t.jsx(_,{checked:!s.disabled,onChange:a=>void q(s,!a)}),s.kind==="skills"&&t.jsx("button",{onClick:a=>{a.stopPropagation(),z(s)},title:"Remove skill — moves the folder to trash; reinstall from the Library","aria-label":`Remove ${s.name}`,className:"text-fg-faint hover:text-red-400 leading-none px-0.5",children:"✕"})]})]},s.path)})]},e)})]}),detail:r&&g?t.jsx("div",{className:"h-full",children:t.jsx(Y,{path:r,value:g.draftRaw,onChange:e=>{S(null),H(r,e)}})}):t.jsx(R,{title:v.length===0?"no skills or commands":"select an item"})})})}const ge=l.memo(le);export{ge as Skills};
@@ -0,0 +1 @@
1
+ import{X as n,a4 as V,I as t,a9 as U,ah as k,ab as _,C as w,a7 as h,c as y}from"./index-CO_7DroC.js";import{P as C}from"./Panel-CbTPsYHq.js";import{S as z,a as H}from"./ScopeSwitcher-BNesCJ_t.js";import{M as P}from"./MarkdownEditor-D0-y8V-f.js";import{f as J,V as L}from"./Library-CG1LDXLw.js";import"./monaco-editor-BW5C4Iv1.js";function X(a){return a.split("/").pop()||a}function $({activePath:a}){const[v,b]=n.useState([]),[g,i]=n.useState(null),[f,m]=n.useState({}),p=n.useRef(0);if(n.useEffect(()=>{if(p.current+=1,i(null),m({}),!a){b([]);return}const s=p.current;let c=!1;return window.api.config.parseImports(a).then(r=>{c||p.current!==s||(r.ok?b(r.imports):(b([]),V.error(r.error||"failed to parse @-imports")))}),()=>{c=!0}},[a]),v.length===0)return null;function j(s){if(g===s){i(null);return}if(i(s),!f[s]){const c=p.current;m(r=>({...r,[s]:{loading:!0,text:null,error:null}})),window.api.config.readText(s).then(r=>{p.current===c&&m(o=>({...o,[s]:{loading:!1,text:r.text,error:r.error}}))})}}return t.jsx("div",{className:"shrink-0 border-b border-line bg-bg-elev text-xs max-h-64 overflow-auto",children:v.map(s=>{const c=!s.ok||!s.exists,r=g===s.path,o=f[s.path];return t.jsxs("div",{className:"border-b border-line last:border-b-0","data-testid":"referenced-file-row",children:[t.jsxs("button",{type:"button",onClick:()=>j(s.path),className:"w-full flex items-center gap-2 px-3 py-1.5 text-left hover:bg-bg",children:[t.jsx("span",{className:`shrink-0 text-fg-faint transition-transform ${r?"rotate-90":""}`,children:"›"}),t.jsx("span",{className:"shrink-0 font-medium",children:X(s.path)}),t.jsx("span",{className:"text-fg-faint truncate flex-1",title:s.path,children:s.path}),t.jsxs("span",{className:"text-fg-faint shrink-0",children:[s.sizeBytes.toLocaleString()," bytes · ~",s.tokenEstimate.toLocaleString()," tokens"]}),c?t.jsx("span",{className:"shrink-0 px-1.5 py-0.5 rounded text-[10px] uppercase tracking-wide text-amber-400/90 border border-amber-400/30","data-testid":"referenced-file-missing",children:"missing"}):null]}),r?t.jsx("div",{className:"h-64 border-t border-line",children:!o||o.loading?t.jsx("div",{className:"px-3 py-2 text-fg-faint",children:"loading…"}):o.error?t.jsx("div",{className:"px-3 py-2 text-amber-400/90",children:o.error}):t.jsx(P,{path:s.path,value:o.text??"",onChange:()=>{},readOnly:!0})}):null]},s.path)})})}function q(a){return Math.round(a.length/4)}function G(){const a=U(),v=k(e=>e.tabs),b=k(e=>e.activeTabId),g=v.find(e=>e.id===b)??null,i=(g==null?void 0:g.cwd)??null,f=_(e=>e.navFace),m=n.useRef(!1),p=n.useRef(f),[j,s]=n.useState(()=>f==="project"&&i?"project":"user"),[c,r]=n.useState("installed");n.useEffect(()=>{if(p.current!==f){if(p.current=f,m.current){m.current=!1;return}s(f==="project"&&i?"project":"user")}},[f,i]);const o=n.useMemo(()=>{const e={};for(const u of w.scopes){const x=w.resolve(u,a??"",i);x&&(e[u]=x)}return e},[a,i]),d=o[j]??null,E=h(e=>e.files),R=h(e=>e.loadText),F=h(e=>e.setDraft),T=h(e=>e.saveText),D=h(e=>e.revert),I=h(e=>e.watchFile),M=h(e=>e.unwatchFile);n.useEffect(()=>{const e=Object.values(o).filter(Boolean);return e.forEach(u=>{R(u,!0),I(u)}),()=>{e.forEach(u=>M(u))}},[JSON.stringify(o)]);const[A,S]=n.useState(null);if(!a)return t.jsx(y,{title:"loading…"});if(c==="library")return t.jsx(C,{toolbar:t.jsx(L,{active:c,onChange:r,installedLabel:"Editor",libraryLabel:"Presets"}),children:t.jsx(J,{})});const l=d?E[d]:null,N=e=>e!=="user"&&!i,O=l?q(l.draftRaw):0,B=(l==null?void 0:l.draftRaw.length)??0;return t.jsx(C,{toolbar:t.jsxs(t.Fragment,{children:[t.jsx(L,{active:c,onChange:r,installedLabel:"Editor",libraryLabel:"Presets"}),t.jsx("span",{className:"mx-2 text-fg-faint",children:"·"}),t.jsx(H,{scopes:w.scopes,active:j,onChange:e=>{m.current=!0,s(e)},annotate:e=>{if(N(e))return{exists:!1};const u=o[e];if(!u)return null;const x=E[u];return{exists:(x==null?void 0:x.exists)??!1,dirty:(x==null?void 0:x.dirty)??!1}}}),t.jsx("span",{className:"ml-3 text-fg-faint truncate",children:d??"—"}),t.jsx("div",{className:"flex-1"}),t.jsxs("span",{className:"text-fg-faint",children:[B.toLocaleString()," chars · ~",O.toLocaleString()," tokens"]})]}),footer:d&&l?t.jsx(z,{dirty:l.dirty,busy:l.busy,parseError:A,lastSavedAt:l.lastSavedAt,leading:l.exists?null:t.jsx("span",{children:"file will be created on save"}),onSave:async()=>{S(null);const e=await T(d);e.ok||S(e.error??"save failed")},onRevert:()=>{S(null),D(d)}}):null,children:N(j)?t.jsx(y,{title:"no active project",hint:"open a tab in a project directory to edit project or local CLAUDE.md"}):d&&l?t.jsxs("div",{className:"h-full flex flex-col",children:[t.jsx($,{activePath:d}),t.jsx("div",{className:"flex-1 min-h-0",children:t.jsx(P,{path:d,value:l.draftRaw,onChange:e=>{S(null),F(d,e)}})})]}):t.jsx(y,{title:"resolving…"})})}const te=n.memo(G);export{te as SystemPrompt};
@@ -0,0 +1 @@
1
+ import{X as o,T as f,I as e,c as N,a3 as j,a4 as u,q as w}from"./index-CO_7DroC.js";import{P as y}from"./Panel-CbTPsYHq.js";import{L as T}from"./ListDetail-CIIJOWwI.js";import"./monaco-editor-BW5C4Iv1.js";function k(){const[s,n]=o.useState(f[0].tag),[l,g]=o.useState(null),[h,x]=o.useState(!1),r=o.useRef(!0);o.useEffect(()=>()=>{r.current=!1},[]);const c=async()=>{try{const t=await window.api.agents.listPersonas();r.current&&g(t)}catch(t){if(!r.current)return;g([]),u.error(t.message||"failed to load agent personas")}};o.useEffect(()=>{c()},[]),o.useEffect(()=>window.api.agents.onChanged(()=>c()),[]);const m=f.find(t=>t.tag===s)??null,p=async(t,i)=>{try{await window.api.agents.savePersona({name:t.name,originalName:t.name,description:t.description??"",tools:t.tools,model:t.model??"inherit",color:t.color??"",tags:[...t.tags,i],body:t.body}),x(!1),await c()}catch(d){u.error(d.message||"failed to assign tag")}},a=async(t,i)=>{try{await window.api.agents.savePersona({name:t.name,originalName:t.name,description:t.description??"",tools:t.tools,model:t.model??"inherit",color:t.color??"",tags:t.tags.filter(d=>d!==i),body:t.body}),await c()}catch(d){u.error(d.message||"failed to remove tag")}};return e.jsx(y,{toolbar:e.jsxs("span",{className:"text-fg-faint",children:[f.length," tag",f.length===1?"":"s"]}),children:e.jsx(T,{sidebar:e.jsx("div",{className:"py-1",children:f.map(t=>{const i=j(t.tag),d=s===t.tag,b=(l==null?void 0:l.filter(v=>v.tags.includes(t.tag)).length)??0;return e.jsxs("button",{onClick:()=>{n(t.tag),x(!1)},className:`w-full text-left px-3 py-1.5 text-xs flex items-center gap-2 border-l-2 ${d?"bg-bg-hi text-fg border-accent":"text-fg-dim hover:text-fg hover:bg-bg-hi border-transparent"}`,children:[e.jsxs("span",{className:`px-1.5 py-0.5 rounded text-[10px] font-mono font-semibold ${i.bg} ${i.text} ${i.border?"border border-current/30":""}`,children:["#",t.tag]}),e.jsx("span",{className:"truncate",children:t.label}),b>0&&e.jsx("span",{className:"ml-auto text-[10.5px] text-fg-faint font-mono shrink-0",children:b})]},t.tag)})}),detail:m?e.jsx(E,{entry:m,personas:l,adding:h,setAdding:x,onAssign:p,onUnassign:a}):e.jsx(N,{title:"select a tag"})})})}const R=o.memo(k);function E({entry:s,personas:n,adding:l,setAdding:g,onAssign:h,onUnassign:x}){const r=j(s.tag),c=w(s.tag),m=(n==null?void 0:n.filter(a=>a.tags.includes(s.tag)))??[],p=(n==null?void 0:n.filter(a=>!a.tags.includes(s.tag)))??[];return e.jsxs("div",{className:"p-4 space-y-4 max-w-3xl",children:[e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsxs("span",{className:`px-2 py-1 rounded text-xs font-mono font-semibold ${r.bg} ${r.text} ${r.border?"border border-current/30":""}`,children:["#",s.tag]}),e.jsx("span",{className:"text-sm font-semibold text-fg",children:s.label})]}),e.jsx("div",{className:"text-xs text-fg-dim leading-relaxed",children:s.description}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[10.5px] uppercase tracking-wide text-fg-faint mb-1.5 font-mono",children:"/develop eagerness"}),e.jsx("span",{className:"px-1.5 py-0.5 text-[10px] rounded border border-line text-fg-dim font-mono",children:s.developEagerness})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[10.5px] uppercase tracking-wide text-fg-faint mb-1.5 font-mono",children:"develops via"}),e.jsx("span",{className:"px-1.5 py-0.5 text-[10px] rounded border border-line text-fg-dim font-mono",children:s.developsVia})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[10.5px] uppercase tracking-wide text-fg-faint mb-1.5 font-mono",children:"agents carrying this tag"}),n===null?e.jsx("div",{className:"text-xs text-fg-faint italic",children:"loading…"}):e.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[m.map(a=>e.jsxs("span",{className:"inline-flex items-center gap-1.5 bg-bg-elev border border-line rounded px-2 py-0.5 text-[11px] font-mono text-fg-dim",children:[a.name,e.jsx("button",{onClick:()=>x(a,s.tag),title:"Remove this tag from the agent",className:"text-fg-faint hover:text-fg",children:"×"})]},a.name)),m.length===0&&!l&&e.jsx("span",{className:"text-xs text-fg-faint italic mr-1",children:"no agent carries this tag yet."}),l?p.length>0?e.jsxs("select",{autoFocus:!0,defaultValue:"",onChange:a=>{const t=n.find(i=>i.name===a.target.value);t&&h(t,s.tag)},onBlur:()=>g(!1),className:"bg-bg border border-line rounded px-2 py-0.5 text-[11px] text-fg font-mono",children:[e.jsx("option",{value:"",disabled:!0,children:"pick an agent…"}),p.map(a=>e.jsx("option",{value:a.name,children:a.name},a.name))]}):e.jsx("span",{className:"text-xs text-fg-faint italic",children:"every agent already carries this tag."}):e.jsx("button",{onClick:()=>g(!0),className:"px-2 py-0.5 rounded-full text-[11px] font-mono border border-line text-fg-faint hover:text-fg hover:bg-bg-hi",children:"+ assign agent"})]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[10.5px] uppercase tracking-wide text-fg-faint mb-1.5 font-mono",children:"opening framing — sent before the human's goal"}),e.jsx("pre",{className:"text-xs text-fg-dim whitespace-pre-wrap bg-bg-elev border border-line rounded p-3 leading-relaxed font-sans",children:c.initialPromptTemplate})]})]})}export{R as TagLibrary};
@@ -1,4 +1,4 @@
1
- import{b as aa,r as G,R as Pt,j as R,a as Nf,g as If,Z as Rf}from"./index-ZjTDk5b7.js";import"./monaco-editor-BW5C4Iv1.js";var zi={exports:{}},$i={};/**
1
+ import{_ as aa,X as G,j as Pt,I as R,k as Nf,H as If,Z as Rf}from"./index-CO_7DroC.js";import"./monaco-editor-BW5C4Iv1.js";var zi={exports:{}},$i={};/**
2
2
  * @license React
3
3
  * use-sync-external-store-shim.production.js
4
4
  *
@@ -0,0 +1 @@
1
+ import{I as r}from"./index-CO_7DroC.js";function a({checked:t,onChange:e,label:n,disabled:s}){return r.jsxs("label",{className:`inline-flex items-center gap-2 text-xs ${s?"opacity-50 cursor-not-allowed":"cursor-pointer"}`,children:[r.jsx("button",{type:"button",role:"switch","aria-checked":t,disabled:s,onClick:()=>!s&&e(!t),className:`relative w-7 h-4 rounded-full transition-colors ${t?"bg-accent":"bg-bg-hi border border-line"}`,children:r.jsx("span",{className:`absolute top-0.5 w-3 h-3 rounded-full bg-fg transition-transform ${t?"translate-x-3.5":"translate-x-0.5"}`})}),n&&r.jsx("span",{className:"text-fg-dim",children:n})]})}export{a as T};