UNPKG

higlass

Version:

HiGlass Hi-C / genomic / large data viewer

4 lines 2.08 MB
(function(At,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("react"),require("pixi.js"),require("react-dom"),require("react/jsx-runtime")):typeof define=="function"&&define.amd?define(["exports","react","pixi.js","react-dom","react/jsx-runtime"],x):(At=typeof globalThis<"u"?globalThis:At||self,x(At.hglib={},At.React,At.PIXI,At.ReactDOM,At.ReactJSXRuntime))})(this,function(At,x,ZH,bn,la){"use strict";function Xx(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const QH=Xx(x),Tm=Xx(ZH);function Kx(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Kx(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function $t(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Kx(e))&&(r&&(r+=" "),r+=t);return r}function _n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Zi(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){var i=!1;try{i=this instanceof r}catch{}return i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var Ph={exports:{}},JH=Ph.exports,Zx;function Qx(){return Zx||(Zx=1,function(e,t){(function(n,r){e.exports=r()})(typeof window<"u"?window:JH,function(){if(typeof window>"u")return null;var n=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")(),r=n.requestAnimationFrame||n.mozRequestAnimationFrame||n.webkitRequestAnimationFrame||function(u){return n.setTimeout(u,20)},i=n.cancelAnimationFrame||n.mozCancelAnimationFrame||n.webkitCancelAnimationFrame||function(u){n.clearTimeout(u)};function o(u,f){var h=Object.prototype.toString.call(u),p=h==="[object Array]"||h==="[object NodeList]"||h==="[object HTMLCollection]"||h==="[object Object]"||typeof jQuery<"u"&&u instanceof jQuery||typeof Elements<"u"&&u instanceof Elements,d=0,g=u.length;if(p)for(;d<g;d++)f(u[d]);else f(u)}function a(u){if(!u.getBoundingClientRect)return{width:u.offsetWidth,height:u.offsetHeight};var f=u.getBoundingClientRect();return{width:Math.round(f.width),height:Math.round(f.height)}}function s(u,f){Object.keys(f).forEach(function(h){u.style[h]=f[h]})}var c=function(u,f){var h=0;function p(){var g=[];this.add=function(m){g.push(m)};var y,b;this.call=function(m){for(y=0,b=g.length;y<b;y++)g[y].call(this,m)},this.remove=function(m){var v=[];for(y=0,b=g.length;y<b;y++)g[y]!==m&&v.push(g[y]);g=v},this.length=function(){return g.length}}function d(g,y){if(g){if(g.resizedAttached){g.resizedAttached.add(y);return}g.resizedAttached=new p,g.resizedAttached.add(y),g.resizeSensor=document.createElement("div"),g.resizeSensor.dir="ltr",g.resizeSensor.className="resize-sensor";var b={pointerEvents:"none",position:"absolute",left:"0px",top:"0px",right:"0px",bottom:"0px",overflow:"hidden",zIndex:"-1",visibility:"hidden",maxWidth:"100%"},m={position:"absolute",left:"0px",top:"0px",transition:"0s"};s(g.resizeSensor,b);var v=document.createElement("div");v.className="resize-sensor-expand",s(v,b);var _=document.createElement("div");s(_,m),v.appendChild(_);var T=document.createElement("div");T.className="resize-sensor-shrink",s(T,b);var w=document.createElement("div");s(w,m),s(w,{width:"200%",height:"200%"}),T.appendChild(w),g.resizeSensor.appendChild(v),g.resizeSensor.appendChild(T),g.appendChild(g.resizeSensor);var S=window.getComputedStyle(g),k=S?S.getPropertyValue("position"):null;k!=="absolute"&&k!=="relative"&&k!=="fixed"&&k!=="sticky"&&(g.style.position="relative");var E=!1,P=0,C=a(g),I=0,O=0,M=!0;h=0;var R=function(){var W=g.offsetWidth,re=g.offsetHeight;_.style.width=W+10+"px",_.style.height=re+10+"px",v.scrollLeft=W+10,v.scrollTop=re+10,T.scrollLeft=W+10,T.scrollTop=re+10},z=function(){if(M){var W=g.offsetWidth===0&&g.offsetHeight===0;if(W){h||(h=r(function(){h=0,z()}));return}else M=!1}R()};g.resizeSensor.resetSensor=z;var U=function(){P=0,E&&(I=C.width,O=C.height,g.resizedAttached&&g.resizedAttached.call(C))},j=function(){C=a(g),E=C.width!==I||C.height!==O,E&&!P&&(P=r(U)),z()},H=function(W,re,Y){W.attachEvent?W.attachEvent("on"+re,Y):W.addEventListener(re,Y)};H(v,"scroll",j),H(T,"scroll",j),h=r(function(){h=0,z()})}}o(u,function(g){d(g,f)}),this.detach=function(g){h||(i(h),h=0),c.detach(u,g)},this.reset=function(){u.resizeSensor.resetSensor()}};if(c.reset=function(u){o(u,function(f){f.resizeSensor.resetSensor()})},c.detach=function(u,f){o(u,function(h){h&&(h.resizedAttached&&typeof f=="function"&&(h.resizedAttached.remove(f),h.resizedAttached.length())||h.resizeSensor&&(h.contains(h.resizeSensor)&&h.removeChild(h.resizeSensor),delete h.resizeSensor,delete h.resizedAttached))})},typeof MutationObserver<"u"){var l=new MutationObserver(function(u){for(var f in u)if(u.hasOwnProperty(f))for(var h=u[f].addedNodes,p=0;p<h.length;p++)h[p].resizeSensor&&c.reset(h[p])});document.addEventListener("DOMContentLoaded",function(u){l.observe(document.body,{childList:!0,subtree:!0})})}return c})}(Ph)),Ph.exports}var Ah={exports:{}},eF=Ah.exports,Jx;function tF(){return Jx||(Jx=1,function(e,t){(function(n,r){e.exports=r(Qx())})(typeof window<"u"?window:eF,function(n){var r=function(){var o,a={},s=[];function c(S){S||(S=document.documentElement);var k=window.getComputedStyle(S,null).fontSize;return parseFloat(k)||16}function l(S){if(!S.getBoundingClientRect)return{width:S.offsetWidth,height:S.offsetHeight};var k=S.getBoundingClientRect();return{width:Math.round(k.width),height:Math.round(k.height)}}function u(S,k){var E=k.split(/\d/),P=E[E.length-1];switch(k=parseFloat(k),P){case"px":return k;case"em":return k*c(S);case"rem":return k*c();case"vw":return k*document.documentElement.clientWidth/100;case"vh":return k*document.documentElement.clientHeight/100;case"vmin":case"vmax":var C=document.documentElement.clientWidth/100,I=document.documentElement.clientHeight/100,O=Math[P==="vmin"?"min":"max"];return k*O(C,I);default:return k}}function f(S,k){this.element=S;var E,P,C,I,O,M,R,z,U=["min-width","min-height","max-width","max-height"];this.call=function(){C=l(this.element),M={};for(E in a[k])a[k].hasOwnProperty(E)&&(P=a[k][E],I=u(this.element,P.value),O=P.property==="width"?C.width:C.height,z=P.mode+"-"+P.property,R="",P.mode==="min"&&O>=I&&(R+=P.value),P.mode==="max"&&O<=I&&(R+=P.value),M[z]||(M[z]=""),R&&(" "+M[z]+" ").indexOf(" "+R+" ")===-1&&(M[z]+=" "+R));for(var j in U)U.hasOwnProperty(j)&&(M[U[j]]?this.element.setAttribute(U[j],M[U[j]].substr(1)):this.element.removeAttribute(U[j]))}}function h(S,k){S.elementQueriesSetupInformation||(S.elementQueriesSetupInformation=new f(S,k)),S.elementQueriesSensor||(S.elementQueriesSensor=new n(S,function(){S.elementQueriesSetupInformation.call()}))}function p(S,k,E,P){if(typeof a[S]>"u"){a[S]=[];var C=s.length;o.innerHTML+=` `+S+" {animation: 0.1s element-queries;}",o.innerHTML+=` `+S+" > .resize-sensor {min-width: "+C+"px;}",s.push(S)}a[S].push({mode:k,property:E,value:P})}function d(S){var k;if(document.querySelectorAll&&(k=S?S.querySelectorAll.bind(S):document.querySelectorAll.bind(document)),!k&&typeof $$<"u"&&(k=$$),!k&&typeof jQuery<"u"&&(k=jQuery),!k)throw"No document.querySelectorAll, jQuery or Mootools's $$ found.";return k}function g(S){var k=d(S);for(var E in a)if(a.hasOwnProperty(E))for(var P=k(E,S),C=0,I=P.length;C<I;C++)h(P[C],E)}function y(S){var k=[],E=[],P=[],C=0,I=-1,O=[];for(var M in S.children)if(S.children.hasOwnProperty(M)&&S.children[M].tagName&&S.children[M].tagName.toLowerCase()==="img"){k.push(S.children[M]);var R=S.children[M].getAttribute("min-width")||S.children[M].getAttribute("data-min-width"),z=S.children[M].getAttribute("data-src")||S.children[M].getAttribute("url");P.push(z);var U={minWidth:R};E.push(U),R?S.children[M].style.display="none":(C=k.length-1,S.children[M].style.display="block")}I=C;function j(){var H=!1,W;for(W in k)k.hasOwnProperty(W)&&E[W].minWidth&&S.offsetWidth>E[W].minWidth&&(H=W);if(H||(H=C),I!==H)if(O[H])k[I].style.display="none",k[H].style.display="block",I=H;else{var re=new Image;re.onload=function(){k[H].src=P[H],k[I].style.display="none",k[H].style.display="block",O[H]=!0,I=H},re.src=P[H]}else k[H].src=P[H]}S.resizeSensorInstance=new n(S,j),j()}function b(){for(var S=d(),k=S("[data-responsive-image],[responsive-image]"),E=0,P=k.length;E<P;E++)y(k[E])}var m=/,?[\s\t]*([^,\n]*?)((?:\[[\s\t]*?(?:min|max)-(?:width|height)[\s\t]*?[~$\^]?=[\s\t]*?"[^"]*?"[\s\t]*?])+)([^,\n\s\{]*)/mgi,v=/\[[\s\t]*?(min|max)-(width|height)[\s\t]*?[~$\^]?=[\s\t]*?"([^"]*?)"[\s\t]*?]/mgi;function _(S){var k,E,P,C;for(S=S.replace(/'/g,'"');(k=m.exec(S))!==null;)for(E=k[1]+k[3],P=k[2];(C=v.exec(P))!==null;)p(E,C[1],C[2],C[3])}function T(S){var k="";if(S)if(typeof S=="string")S=S.toLowerCase(),(S.indexOf("min-width")!==-1||S.indexOf("max-width")!==-1)&&_(S);else for(var E=0,P=S.length;E<P;E++)S[E].type===1?(k=S[E].selectorText||S[E].cssText,(k.indexOf("min-height")!==-1||k.indexOf("max-height")!==-1||k.indexOf("min-width")!==-1||k.indexOf("max-width")!==-1)&&_(k)):S[E].type===4?T(S[E].cssRules||S[E].rules):S[E].type===3&&S[E].styleSheet.hasOwnProperty("cssRules")&&T(S[E].styleSheet.cssRules)}var w=!1;this.init=function(){var S="animationstart";typeof document.documentElement.style.webkitAnimationName<"u"?S="webkitAnimationStart":typeof document.documentElement.style.MozAnimationName<"u"?S="mozanimationstart":typeof document.documentElement.style.OAnimationName<"u"&&(S="oanimationstart"),document.body.addEventListener(S,function(P){var C=P.target,I=C&&window.getComputedStyle(C,null),O=I&&I.getPropertyValue("animation-name"),M=O&&O.indexOf("element-queries")!==-1;if(M){C.elementQueriesSensor=new n(C,function(){C.elementQueriesSetupInformation&&C.elementQueriesSetupInformation.call()});var R=window.getComputedStyle(C.resizeSensor,null),z=R.getPropertyValue("min-width");z=parseInt(z.replace("px","")),h(P.target,s[z])}}),w||(o=document.createElement("style"),o.type="text/css",o.innerHTML="[responsive-image] > img, [data-responsive-image] {overflow: hidden; padding: 0; } [responsive-image] > img, [data-responsive-image] > img {width: 100%;}",o.innerHTML+=` @keyframes element-queries { 0% { visibility: inherit; } }`,document.getElementsByTagName("head")[0].appendChild(o),w=!0);for(var k=0,E=document.styleSheets.length;k<E;k++)try{document.styleSheets[k].href&&document.styleSheets[k].href.indexOf("file://")===0&&console.warn("CssElementQueries: unable to parse local css files, "+document.styleSheets[k].href),T(document.styleSheets[k].cssRules||document.styleSheets[k].rules||document.styleSheets[k].cssText)}catch{}b()},this.findElementQueriesElements=function(S){g(S)},this.update=function(){this.init()}};r.update=function(){r.instance.update()},r.detach=function(o){o.elementQueriesSetupInformation?(o.elementQueriesSensor.detach(),delete o.elementQueriesSetupInformation,delete o.elementQueriesSensor):o.resizeSensorInstance&&(o.resizeSensorInstance.detach(),delete o.resizeSensorInstance)},r.init=function(){r.instance||(r.instance=new r),r.instance.init()};var i=function(o){if(document.addEventListener)document.addEventListener("DOMContentLoaded",o,!1);else if(/KHTML|WebKit|iCab/i.test(navigator.userAgent))var a=setInterval(function(){/loaded|complete/i.test(document.readyState)&&(o(),clearInterval(a))},10);else window.onload=o};return r.findElementQueriesElements=function(o){r.instance.findElementQueriesElements(o)},r.listen=function(){i(r.init)},r})}(Ah)),Ah.exports}var wm,eC;function rF(){return eC||(eC=1,wm={ResizeSensor:Qx(),ElementQueries:tF()}),wm}var Mh=rF();function wr(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function fs(e){let t=e,n=e;e.length===1&&(t=(a,s)=>e(a)-s,n=nF(e));function r(a,s,c,l){for(c==null&&(c=0),l==null&&(l=a.length);c<l;){const u=c+l>>>1;n(a[u],s)<0?c=u+1:l=u}return c}function i(a,s,c,l){for(c==null&&(c=0),l==null&&(l=a.length);c<l;){const u=c+l>>>1;n(a[u],s)>0?l=u:c=u+1}return c}function o(a,s,c,l){c==null&&(c=0),l==null&&(l=a.length);const u=r(a,s,c,l-1);return u>c&&t(a[u-1],s)>-t(a[u],s)?u-1:u}return{left:r,center:o,right:i}}function nF(e){return(t,n)=>wr(e(t),n)}function tC(e){return e===null?NaN:+e}function*iF(e,t){if(t===void 0)for(let n of e)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of e)(r=t(r,++n,e))!=null&&(r=+r)>=r&&(yield r)}}const rC=fs(wr),Ao=rC.right,oF=rC.left,aF=fs(tC).center;function Ih(e,t){let n=0;if(t===void 0)for(let r of e)r!=null&&(r=+r)>=r&&++n;else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(i=+i)>=i&&++n}return n}function sF(e){return e.length|0}function lF(e){return!(e>0)}function cF(e){return typeof e!="object"||"length"in e?e:Array.from(e)}function uF(e){return t=>e(...t)}function fF(...e){const t=typeof e[e.length-1]=="function"&&uF(e.pop());e=e.map(cF);const n=e.map(sF),r=e.length-1,i=new Array(r+1).fill(0),o=[];if(r<0||n.some(lF))return o;for(;;){o.push(i.map((s,c)=>e[c][s]));let a=r;for(;++i[a]===n[a];){if(a===0)return t?o.map(t):o;i[a--]=0}}}function hF(e,t){var n=0,r=0;return Float64Array.from(e,t===void 0?i=>n+=+i||0:i=>n+=+t(i,r++,e)||0)}function pF(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function Sm(e,t){let n=0,r,i=0,o=0;if(t===void 0)for(let a of e)a!=null&&(a=+a)>=a&&(r=a-i,i+=r/++n,o+=r*(a-i));else{let a=-1;for(let s of e)(s=t(s,++a,e))!=null&&(s=+s)>=s&&(r=s-i,i+=r/++n,o+=r*(s-i))}if(n>1)return o/(n-1)}function Em(e,t){const n=Sm(e,t);return n&&Math.sqrt(n)}function Rh(e,t){let n,r;if(t===void 0)for(const i of e)i!=null&&(n===void 0?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)));else{let i=-1;for(let o of e)(o=t(o,++i,e))!=null&&(n===void 0?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)))}return[n,r]}function dF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gF(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,vF(r.key),r)}}function mF(e,t,n){return t&&gF(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function vF(e){var t=yF(e,"string");return typeof t=="symbol"?t:t+""}function yF(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}let Sr=function(){function e(){dF(this,e),this._partials=new Float64Array(32),this._n=0}return mF(e,[{key:"add",value:function(n){const r=this._partials;let i=0;for(let o=0;o<this._n&&o<32;o++){const a=r[o],s=n+a,c=Math.abs(n)<Math.abs(a)?n-(s-a):a-(s-n);c&&(r[i++]=c),n=s}return r[i]=n,this._n=i+1,this}},{key:"valueOf",value:function(){const n=this._partials;let r=this._n,i,o,a,s=0;if(r>0){for(s=n[--r];r>0&&(i=s,o=n[--r],s=i+o,a=o-(s-i),!a););r>0&&(a<0&&n[r-1]<0||a>0&&n[r-1]>0)&&(o=a*2,i=s+o,o==i-s&&(s=i))}return s}}])}();function bF(e,t){const n=new Sr;if(t===void 0)for(let r of e)(r=+r)&&n.add(r);else{let r=-1;for(let i of e)(i=+t(i,++r,e))&&n.add(i)}return+n}function _F(e,t){const n=new Sr;let r=-1;return Float64Array.from(e,t===void 0?i=>n.add(+i||0):i=>n.add(+t(i,++r,e)||0))}function nC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function TF(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,wF(r.key),r)}}function iC(e,t,n){return t&&TF(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function wF(e){var t=SF(e,"string");return typeof t=="symbol"?t:t+""}function SF(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function oC(e,t,n){return t=ua(t),EF(e,xm()?Reflect.construct(t,[],ua(e).constructor):t.apply(e,n))}function EF(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return kF(e)}function kF(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ca(e,t,n,r){var i=km(ua(e.prototype),t,n);return 2&r&&typeof i=="function"?function(o){return i.apply(n,o)}:i}function km(){return km=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=xF(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},km.apply(null,arguments)}function xF(e,t){for(;!{}.hasOwnProperty.call(e,t)&&(e=ua(e))!==null;);return e}function aC(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Yc(e,t)}function Dh(e){var t=typeof Map=="function"?new Map:void 0;return Dh=function(n){if(n===null||!OF(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(n))return t.get(n);t.set(n,r)}function r(){return CF(n,arguments,ua(this).constructor)}return r.prototype=Object.create(n.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Yc(r,n)},Dh(e)}function CF(e,t,n){if(xm())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&Yc(i,n.prototype),i}function xm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(xm=function(){return!!e})()}function OF(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch{return typeof e=="function"}}function Yc(e,t){return Yc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Yc(e,t)}function ua(e){return ua=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ua(e)}let Nh=function(e){function t(n,r=cC){var i;if(nC(this,t),i=oC(this,t),Object.defineProperties(i,{_intern:{value:new Map},_key:{value:r}}),n!=null)for(const[o,a]of n)i.set(o,a);return i}return aC(t,e),iC(t,[{key:"get",value:function(r){return ca(t,"get",this,3)([Cm(this,r)])}},{key:"has",value:function(r){return ca(t,"has",this,3)([Cm(this,r)])}},{key:"set",value:function(r,i){return ca(t,"set",this,3)([sC(this,r),i])}},{key:"delete",value:function(r){return ca(t,"delete",this,3)([lC(this,r)])}}])}(Dh(Map)),PF=function(e){function t(n,r=cC){var i;if(nC(this,t),i=oC(this,t),Object.defineProperties(i,{_intern:{value:new Map},_key:{value:r}}),n!=null)for(const o of n)i.add(o);return i}return aC(t,e),iC(t,[{key:"has",value:function(r){return ca(t,"has",this,3)([Cm(this,r)])}},{key:"add",value:function(r){return ca(t,"add",this,3)([sC(this,r)])}},{key:"delete",value:function(r){return ca(t,"delete",this,3)([lC(this,r)])}}])}(Dh(Set));function Cm({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function sC({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function lC({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(n),e.delete(r)),n}function cC(e){return e!==null&&typeof e=="object"?e.valueOf():e}function hs(e){return e}function uC(e,...t){return ps(e,hs,hs,t)}function AF(e,...t){return ps(e,Array.from,hs,t)}function fC(e,t,...n){return ps(e,hs,t,n)}function MF(e,t,...n){return ps(e,Array.from,t,n)}function IF(e,...t){return ps(e,hs,hC,t)}function RF(e,...t){return ps(e,Array.from,hC,t)}function hC(e){if(e.length!==1)throw new Error("duplicate key");return e[0]}function ps(e,t,n,r){return function i(o,a){if(a>=r.length)return n(o);const s=new Nh,c=r[a++];let l=-1;for(const u of o){const f=c(u,++l,o),h=s.get(f);h?h.push(u):s.set(f,[u])}for(const[u,f]of s)s.set(u,i(f,a));return t(s)}(e,0)}function pC(e,t){return Array.from(t,n=>e[n])}function Om(e,...t){if(typeof e[Symbol.iterator]!="function")throw new TypeError("values is not iterable");e=Array.from(e);let[n=wr]=t;if(n.length===1||t.length>1){const r=Uint32Array.from(e,(i,o)=>o);return t.length>1?(t=t.map(i=>e.map(i)),r.sort((i,o)=>{for(const a of t){const s=wr(a[i],a[o]);if(s)return s}})):(n=e.map(n),r.sort((i,o)=>wr(n[i],n[o]))),pC(e,r)}return e.sort(n)}function DF(e,t,n){return(t.length===1?Om(fC(e,t,n),([r,i],[o,a])=>wr(i,a)||wr(r,o)):Om(uC(e,n),([r,i],[o,a])=>t(i,a)||wr(r,o))).map(([r])=>r)}var NF=Array.prototype,LF=NF.slice;function Lh(e){return function(){return e}}var Pm=Math.sqrt(50),Am=Math.sqrt(10),Mm=Math.sqrt(2);function fa(e,t,n){var r,i=-1,o,a,s;if(t=+t,e=+e,n=+n,e===t&&n>0)return[e];if((r=t<e)&&(o=e,e=t,t=o),(s=Xc(e,t,n))===0||!isFinite(s))return[];if(s>0){let c=Math.round(e/s),l=Math.round(t/s);for(c*s<e&&++c,l*s>t&&--l,a=new Array(o=l-c+1);++i<o;)a[i]=(c+i)*s}else{s=-s;let c=Math.round(e*s),l=Math.round(t*s);for(c/s<e&&++c,l/s>t&&--l,a=new Array(o=l-c+1);++i<o;)a[i]=(c+i)/s}return r&&a.reverse(),a}function Xc(e,t,n){var r=(t-e)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=Pm?10:o>=Am?5:o>=Mm?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=Pm?10:o>=Am?5:o>=Mm?2:1)}function $h(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=Pm?i*=10:o>=Am?i*=5:o>=Mm&&(i*=2),t<e?-i:i}function dC(e,t,n){let r;for(;;){const i=Xc(e,t,n);if(i===r||i===0||!isFinite(i))return[e,t];i>0?(e=Math.floor(e/i)*i,t=Math.ceil(t/i)*i):i<0&&(e=Math.ceil(e*i)/i,t=Math.floor(t*i)/i),r=i}}function gC(e){return Math.ceil(Math.log(Ih(e))/Math.LN2)+1}function mC(){var e=hs,t=Rh,n=gC;function r(i){Array.isArray(i)||(i=Array.from(i));var o,a=i.length,s,c=new Array(a);for(o=0;o<a;++o)c[o]=e(i[o],o,i);var l=t(c),u=l[0],f=l[1],h=n(c,u,f);if(!Array.isArray(h)){const y=f,b=+h;if(t===Rh&&([u,f]=dC(u,f,b)),h=fa(u,f,b),h[h.length-1]>=f)if(y>=f&&t===Rh){const m=Xc(u,f,b);isFinite(m)&&(m>0?f=(Math.floor(f/m)+1)*m:m<0&&(f=(Math.ceil(f*-m)+1)/-m))}else h.pop()}for(var p=h.length;h[0]<=u;)h.shift(),--p;for(;h[p-1]>f;)h.pop(),--p;var d=new Array(p+1),g;for(o=0;o<=p;++o)g=d[o]=[],g.x0=o>0?h[o-1]:u,g.x1=o<p?h[o]:f;for(o=0;o<a;++o)s=c[o],u<=s&&s<=f&&d[Ao(h,s,0,p)].push(i[o]);return d}return r.value=function(i){return arguments.length?(e=typeof i=="function"?i:Lh(i),r):e},r.domain=function(i){return arguments.length?(t=typeof i=="function"?i:Lh([i[0],i[1]]),r):t},r.thresholds=function(i){return arguments.length?(n=typeof i=="function"?i:Array.isArray(i)?Lh(LF.call(i)):Lh(i),r):n},r}function Im(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function jh(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function Rm(e,t,n=0,r=e.length-1,i=wr){for(;r>n;){if(r-n>600){const c=r-n+1,l=t-n+1,u=Math.log(c),f=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*f*(c-f)/c)*(l-c/2<0?-1:1),p=Math.max(n,Math.floor(t-l*f/c+h)),d=Math.min(r,Math.floor(t+(c-l)*f/c+h));Rm(e,t,p,d,i)}const o=e[t];let a=n,s=r;for(Kc(e,n,t),i(e[r],o)>0&&Kc(e,n,r);a<s;){for(Kc(e,a,s),++a,--s;i(e[a],o)<0;)++a;for(;i(e[s],o)>0;)--s}i(e[n],o)===0?Kc(e,n,s):(++s,Kc(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function Kc(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Zc(e,t,n){if(e=Float64Array.from(iF(e,n)),!!(r=e.length)){if((t=+t)<=0||r<2)return jh(e);if(t>=1)return Im(e);var r,i=(r-1)*t,o=Math.floor(i),a=Im(Rm(e,o).subarray(0,o+1)),s=jh(e.subarray(o+1));return a+(s-a)*(i-o)}}function vC(e,t,n=tC){if(r=e.length){if((t=+t)<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),a=+n(e[o],o,e),s=+n(e[o+1],o+1,e);return a+(s-a)*(i-o)}}function $F(e,t,n){return Math.ceil((n-t)/(2*(Zc(e,.75)-Zc(e,.25))*Math.pow(Ih(e),-1/3)))}function jF(e,t,n){return Math.ceil((n-t)/(3.5*Em(e)*Math.pow(Ih(e),-1/3)))}function yC(e,t){let n,r=-1,i=-1;if(t===void 0)for(const o of e)++i,o!=null&&(n<o||n===void 0&&o>=o)&&(n=o,r=i);else for(let o of e)(o=t(o,++i,e))!=null&&(n<o||n===void 0&&o>=o)&&(n=o,r=i);return r}function Dm(e,t){let n=0,r=0;if(t===void 0)for(let i of e)i!=null&&(i=+i)>=i&&(++n,r+=i);else{let i=-1;for(let o of e)(o=t(o,++i,e))!=null&&(o=+o)>=o&&(++n,r+=o)}if(n)return r/n}function Nm(e,t){return Zc(e,.5,t)}function*BF(e){for(const t of e)yield*t}function Lm(e){return Array.from(BF(e))}function bC(e,t){let n,r=-1,i=-1;if(t===void 0)for(const o of e)++i,o!=null&&(n>o||n===void 0&&o>=o)&&(n=o,r=i);else for(let o of e)(o=t(o,++i,e))!=null&&(n>o||n===void 0&&o>=o)&&(n=o,r=i);return r}function zF(e,t=HF){const n=[];let r,i=!1;for(const o of e)i&&n.push(t(r,o)),r=o,i=!0;return n}function HF(e,t){return[e,t]}function en(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(i);++r<i;)o[r]=e+r*n;return o}function FF(e,t=wr){let n,r=!1;if(t.length===1){let i;for(const o of e){const a=t(o);(r?wr(a,i)<0:wr(a,a)===0)&&(n=o,i=a,r=!0)}}else for(const i of e)(r?t(i,n)<0:t(i,i)===0)&&(n=i,r=!0);return n}function _C(e,t=wr){if(t.length===1)return bC(e,t);let n,r=-1,i=-1;for(const o of e)++i,(r<0?t(o,o)===0:t(o,n)<0)&&(n=o,r=i);return r}function qF(e,t=wr){let n,r=!1;if(t.length===1){let i;for(const o of e){const a=t(o);(r?wr(a,i)>0:wr(a,a)===0)&&(n=o,i=a,r=!0)}}else for(const i of e)(r?t(i,n)>0:t(i,i)===0)&&(n=i,r=!0);return n}function UF(e,t=wr){if(t.length===1)return yC(e,t);let n,r=-1,i=-1;for(const o of e)++i,(r<0?t(o,o)===0:t(o,n)>0)&&(n=o,r=i);return r}function VF(e,t){const n=_C(e,t);return n<0?void 0:n}const GF=TC(Math.random);function TC(e){return function(n,r=0,i=n.length){let o=i-(r=+r);for(;o;){const a=e()*o--|0,s=n[o+r];n[o+r]=n[a+r],n[a+r]=s}return n}}function wC(e,t){let n=0;if(t===void 0)for(let r of e)(r=+r)&&(n+=r);else{let r=-1;for(let i of e)(i=+t(i,++r,e))&&(n+=i)}return n}function SC(e){if(!(o=e.length))return[];for(var t=-1,n=jh(e,WF),r=new Array(n);++t<n;)for(var i=-1,o,a=r[t]=new Array(o);++i<o;)a[i]=e[i][t];return r}function WF(e){return e.length}function YF(){return SC(arguments)}function XF(e,t){if(typeof t!="function")throw new TypeError("test is not a function");let n=-1;for(const r of e)if(!t(r,++n,e))return!1;return!0}function KF(e,t){if(typeof t!="function")throw new TypeError("test is not a function");let n=-1;for(const r of e)if(t(r,++n,e))return!0;return!1}function ZF(e,t){if(typeof t!="function")throw new TypeError("test is not a function");const n=[];let r=-1;for(const i of e)t(i,++r,e)&&n.push(i);return n}function QF(e,t){if(typeof e[Symbol.iterator]!="function")throw new TypeError("values is not iterable");if(typeof t!="function")throw new TypeError("mapper is not a function");return Array.from(e,(n,r)=>t(n,r,e))}function JF(e,t,n){if(typeof t!="function")throw new TypeError("reducer is not a function");const r=e[Symbol.iterator]();let i,o,a=-1;if(arguments.length<3){if({done:i,value:n}=r.next(),i)return;++a}for(;{done:i,value:o}=r.next(),!i;)n=t(n,o,++a,e);return n}function eq(e){if(typeof e[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(e).reverse()}function tq(e,...t){e=new Set(e);for(const n of t)for(const r of n)e.delete(r);return e}function rq(e,t){const n=t[Symbol.iterator](),r=new Set;for(const i of e){if(r.has(i))return!1;let o,a;for(;({value:o,done:a}=n.next())&&!a;){if(Object.is(i,o))return!1;r.add(o)}}return!0}function nq(e){return e instanceof Set?e:new Set(e)}function iq(e,...t){e=new Set(e),t=t.map(nq);e:for(const n of e)for(const r of t)if(!r.has(n)){e.delete(n);continue e}return e}function EC(e,t){const n=e[Symbol.iterator](),r=new Set;for(const i of t){if(r.has(i))continue;let o,a;for(;{value:o,done:a}=n.next();){if(a)return!1;if(r.add(o),Object.is(i,o))break}}return!0}function oq(e,t){return EC(t,e)}function aq(...e){const t=new Set;for(const n of e)for(const r of n)t.add(r);return t}const sq=Object.freeze(Object.defineProperty({__proto__:null,Adder:Sr,InternMap:Nh,InternSet:PF,ascending:wr,bin:mC,bisect:Ao,bisectCenter:aF,bisectLeft:oF,bisectRight:Ao,bisector:fs,count:Ih,cross:fF,cumsum:hF,descending:pF,deviation:Em,difference:tq,disjoint:rq,every:XF,extent:Rh,fcumsum:_F,filter:ZF,fsum:bF,greatest:qF,greatestIndex:UF,group:uC,groupSort:DF,groups:AF,histogram:mC,index:IF,indexes:RF,intersection:iq,least:FF,leastIndex:_C,map:QF,max:Im,maxIndex:yC,mean:Dm,median:Nm,merge:Lm,min:jh,minIndex:bC,nice:dC,pairs:zF,permute:pC,quantile:Zc,quantileSorted:vC,quickselect:Rm,range:en,reduce:JF,reverse:eq,rollup:fC,rollups:MF,scan:VF,shuffle:GF,shuffler:TC,some:KF,sort:Om,subset:oq,sum:wC,superset:EC,thresholdFreedmanDiaconis:$F,thresholdScott:jF,thresholdSturges:gC,tickIncrement:Xc,tickStep:$h,ticks:fa,transpose:SC,union:aq,variance:Sm,zip:YF},Symbol.toStringTag,{value:"Module"}));function Un(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Qi(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const $m=Symbol("implicit");function jm(){var e=new Nh,t=[],n=[],r=$m;function i(o){let a=e.get(o);if(a===void 0){if(r!==$m)return r;e.set(o,a=t.push(o)-1)}return n[a%n.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new Nh;for(const a of o)e.has(a)||e.set(a,t.push(a)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return jm(t,n).unknown(r)},Un.apply(i,arguments),i}function Qc(){var e=jm().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,o,a,s=!1,c=0,l=0,u=.5;delete e.unknown;function f(){var h=t().length,p=i<r,d=p?i:r,g=p?r:i;o=(g-d)/Math.max(1,h-c+l*2),s&&(o=Math.floor(o)),d+=(g-d-o*(h-c))*u,a=o*(1-c),s&&(d=Math.round(d),a=Math.round(a));var y=en(h).map(function(b){return d+o*b});return n(p?y.reverse():y)}return e.domain=function(h){return arguments.length?(t(h),f()):t()},e.range=function(h){return arguments.length?([r,i]=h,r=+r,i=+i,f()):[r,i]},e.rangeRound=function(h){return[r,i]=h,r=+r,i=+i,s=!0,f()},e.bandwidth=function(){return a},e.step=function(){return o},e.round=function(h){return arguments.length?(s=!!h,f()):s},e.padding=function(h){return arguments.length?(c=Math.min(1,l=+h),f()):c},e.paddingInner=function(h){return arguments.length?(c=Math.min(1,h),f()):c},e.paddingOuter=function(h){return arguments.length?(l=+h,f()):l},e.align=function(h){return arguments.length?(u=Math.max(0,Math.min(1,h)),f()):u},e.copy=function(){return Qc(t(),[r,i]).round(s).paddingInner(c).paddingOuter(l).align(u)},Un.apply(f(),arguments)}function kC(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return kC(t())},e}function lq(){return kC(Qc.apply(null,arguments).paddingInner(1))}function ds(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Jc(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Mo(){}var ha=.7,gs=1/ha,ms="\\s*([+-]?\\d+)\\s*",eu="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Pi="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",cq=/^#([0-9a-f]{3,8})$/,uq=new RegExp("^rgb\\("+[ms,ms,ms]+"\\)$"),fq=new RegExp("^rgb\\("+[Pi,Pi,Pi]+"\\)$"),hq=new RegExp("^rgba\\("+[ms,ms,ms,eu]+"\\)$"),pq=new RegExp("^rgba\\("+[Pi,Pi,Pi,eu]+"\\)$"),dq=new RegExp("^hsl\\("+[eu,Pi,Pi]+"\\)$"),gq=new RegExp("^hsla\\("+[eu,Pi,Pi,eu]+"\\)$"),xC={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};ds(Mo,Tn,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:CC,formatHex:CC,formatHsl:mq,formatRgb:OC,toString:OC});function CC(){return this.rgb().formatHex()}function mq(){return RC(this).formatHsl()}function OC(){return this.rgb().formatRgb()}function Tn(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=cq.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?PC(t):n===3?new $r(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Bh(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Bh(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=uq.exec(e))?new $r(t[1],t[2],t[3],1):(t=fq.exec(e))?new $r(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=hq.exec(e))?Bh(t[1],t[2],t[3],t[4]):(t=pq.exec(e))?Bh(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=dq.exec(e))?IC(t[1],t[2]/100,t[3]/100,1):(t=gq.exec(e))?IC(t[1],t[2]/100,t[3]/100,t[4]):xC.hasOwnProperty(e)?PC(xC[e]):e==="transparent"?new $r(NaN,NaN,NaN,0):null}function PC(e){return new $r(e>>16&255,e>>8&255,e&255,1)}function Bh(e,t,n,r){return r<=0&&(e=t=n=NaN),new $r(e,t,n,r)}function Bm(e){return e instanceof Mo||(e=Tn(e)),e?(e=e.rgb(),new $r(e.r,e.g,e.b,e.opacity)):new $r}function vs(e,t,n,r){return arguments.length===1?Bm(e):new $r(e,t,n,r??1)}function $r(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}ds($r,vs,Jc(Mo,{brighter:function(e){return e=e==null?gs:Math.pow(gs,e),new $r(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=e==null?ha:Math.pow(ha,e),new $r(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){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:AC,formatHex:AC,formatRgb:MC,toString:MC}));function AC(){return"#"+zm(this.r)+zm(this.g)+zm(this.b)}function MC(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(e===1?")":", "+e+")")}function zm(e){return e=Math.max(0,Math.min(255,Math.round(e)||0)),(e<16?"0":"")+e.toString(16)}function IC(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ai(e,t,n,r)}function RC(e){if(e instanceof Ai)return new Ai(e.h,e.s,e.l,e.opacity);if(e instanceof Mo||(e=Tn(e)),!e)return new Ai;if(e instanceof Ai)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,c=(o+i)/2;return s?(t===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-t)/s+2:a=(t-n)/s+4,s/=c<.5?o+i:2-o-i,a*=60):s=c>0&&c<1?0:a,new Ai(a,s,c,e.opacity)}function DC(e,t,n,r){return arguments.length===1?RC(e):new Ai(e,t,n,r??1)}function Ai(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}ds(Ai,DC,Jc(Mo,{brighter:function(e){return e=e==null?gs:Math.pow(gs,e),new Ai(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?ha:Math.pow(ha,e),new Ai(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new $r(Hm(e>=240?e-240:e+120,i,r),Hm(e,i,r),Hm(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"hsl(":"hsla(")+(this.h||0)+", "+(this.s||0)*100+"%, "+(this.l||0)*100+"%"+(e===1?")":", "+e+")")}}));function Hm(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const NC=Math.PI/180,LC=180/Math.PI,zh=18,$C=.96422,jC=1,BC=.82521,zC=4/29,ys=6/29,HC=3*ys*ys,vq=ys*ys*ys;function FC(e){if(e instanceof si)return new si(e.l,e.a,e.b,e.opacity);if(e instanceof Mi)return GC(e);e instanceof $r||(e=Bm(e));var t=Vm(e.r),n=Vm(e.g),r=Vm(e.b),i=Fm((.2225045*t+.7168786*n+.0606169*r)/jC),o,a;return t===n&&n===r?o=a=i:(o=Fm((.4360747*t+.3850649*n+.1430804*r)/$C),a=Fm((.0139322*t+.0971045*n+.7141733*r)/BC)),new si(116*i-16,500*(o-i),200*(i-a),e.opacity)}function yq(e,t){return new si(e,0,0,t??1)}function qC(e,t,n,r){return arguments.length===1?FC(e):new si(e,t,n,r??1)}function si(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}ds(si,qC,Jc(Mo,{brighter:function(e){return new si(this.l+zh*(e??1),this.a,this.b,this.opacity)},darker:function(e){return new si(this.l-zh*(e??1),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return t=$C*qm(t),e=jC*qm(e),n=BC*qm(n),new $r(Um(3.1338561*t-1.6168667*e-.4906146*n),Um(-.9787684*t+1.9161415*e+.033454*n),Um(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function Fm(e){return e>vq?Math.pow(e,1/3):e/HC+zC}function qm(e){return e>ys?e*e*e:HC*(e-zC)}function Um(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Vm(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function UC(e){if(e instanceof Mi)return new Mi(e.h,e.c,e.l,e.opacity);if(e instanceof si||(e=FC(e)),e.a===0&&e.b===0)return new Mi(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*LC;return new Mi(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function bq(e,t,n,r){return arguments.length===1?UC(e):new Mi(n,t,e,r??1)}function VC(e,t,n,r){return arguments.length===1?UC(e):new Mi(e,t,n,r??1)}function Mi(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function GC(e){if(isNaN(e.h))return new si(e.l,0,0,e.opacity);var t=e.h*NC;return new si(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}ds(Mi,VC,Jc(Mo,{brighter:function(e){return new Mi(this.h,this.c,this.l+zh*(e??1),this.opacity)},darker:function(e){return new Mi(this.h,this.c,this.l-zh*(e??1),this.opacity)},rgb:function(){return GC(this).rgb()}}));var WC=-.14861,Gm=1.78277,Wm=-.29227,Hh=-.90649,tu=1.97294,YC=tu*Hh,XC=tu*Gm,KC=Gm*Wm-Hh*WC;function _q(e){if(e instanceof pa)return new pa(e.h,e.s,e.l,e.opacity);e instanceof $r||(e=Bm(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(KC*r+YC*t-XC*n)/(KC+YC-XC),o=r-i,a=(tu*(n-i)-Wm*o)/Hh,s=Math.sqrt(a*a+o*o)/(tu*i*(1-i)),c=s?Math.atan2(a,o)*LC-120:NaN;return new pa(c<0?c+360:c,s,i,e.opacity)}function ZC(e,t,n,r){return arguments.length===1?_q(e):new pa(e,t,n,r??1)}function pa(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}ds(pa,ZC,Jc(Mo,{brighter:function(e){return e=e==null?gs:Math.pow(gs,e),new pa(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?ha:Math.pow(ha,e),new pa(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*NC,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new $r(255*(t+n*(WC*r+Gm*i)),255*(t+n*(Wm*r+Hh*i)),255*(t+n*(tu*r)),this.opacity)}}));const Tq=Object.freeze(Object.defineProperty({__proto__:null,color:Tn,cubehelix:ZC,gray:yq,hcl:VC,hsl:DC,lab:qC,lch:bq,rgb:vs},Symbol.toStringTag,{value:"Module"})),Ym=e=>()=>e;function wq(e,t){return function(n){return e+n*t}}function Sq(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Eq(e){return(e=+e)==1?QC:function(t,n){return n-t?Sq(t,n,e):Ym(isNaN(t)?n:t)}}function QC(e,t){var n=t-e;return n?wq(e,n):Ym(isNaN(e)?t:e)}const bs=function e(t){var n=Eq(t);function r(i,o){var a=n((i=vs(i)).r,(o=vs(o)).r),s=n(i.g,o.g),c=n(i.b,o.b),l=QC(i.opacity,o.opacity);return function(u){return i.r=a(u),i.g=s(u),i.b=c(u),i.opacity=l(u),i+""}}return r.gamma=e,r}(1);function kq(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=e[i]*(1-o)+t[i]*o;return r}}function xq(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Cq(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=da(e[a],t[a]);for(;a<n;++a)o[a]=t[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function Oq(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Vn(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Pq(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=da(e[i],t[i]):r[i]=t[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var Xm=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Km=new RegExp(Xm.source,"g");function Aq(e){return function(){return e}}function Mq(e){return function(t){return e(t)+""}}function Zm(e,t){var n=Xm.lastIndex=Km.lastIndex=0,r,i,o,a=-1,s=[],c=[];for(e=e+"",t=t+"";(r=Xm.exec(e))&&(i=Km.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,c.push({i:a,x:Vn(r,i)})),n=Km.lastIndex;return n<t.length&&(o=t.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?c[0]?Mq(c[0].x):Aq(t):(t=c.length,function(l){for(var u=0,f;u<t;++u)s[(f=c[u]).i]=f.x(l);return s.join("")})}function da(e,t){var n=typeof t,r;return t==null||n==="boolean"?Ym(t):(n==="number"?Vn:n==="string"?(r=Tn(t))?(t=r,bs):Zm:t instanceof Tn?bs:t instanceof Date?Oq:xq(t)?kq:Array.isArray(t)?Cq:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Pq:Vn)(e,t)}function Qm(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var JC=180/Math.PI,Jm={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function eO(e,t,n,r,i,o){var a,s,c;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),e*r<t*n&&(e=-e,t=-t,c=-c,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*JC,skewX:Math.atan(c)*JC,scaleX:a,scaleY:s}}var Fh;function Iq(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Jm:eO(t.a,t.b,t.c,t.d,t.e,t.f)}function Rq(e){return e==null||(Fh||(Fh=document.createElementNS("http://www.w3.org/2000/svg","g")),Fh.setAttribute("transform",e),!(e=Fh.transform.baseVal.consolidate()))?Jm:(e=e.matrix,eO(e.a,e.b,e.c,e.d,e.e,e.f))}function tO(e,t,n,r){function i(l){return l.length?l.pop()+" ":""}function o(l,u,f,h,p,d){if(l!==f||u!==h){var g=p.push("translate(",null,t,null,n);d.push({i:g-4,x:Vn(l,f)},{i:g-2,x:Vn(u,h)})}else(f||h)&&p.push("translate("+f+t+h+n)}function a(l,u,f,h){l!==u?(l-u>180?u+=360:u-l>180&&(l+=360),h.push({i:f.push(i(f)+"rotate(",null,r)-2,x:Vn(l,u)})):u&&f.push(i(f)+"rotate("+u+r)}function s(l,u,f,h){l!==u?h.push({i:f.push(i(f)+"skewX(",null,r)-2,x:Vn(l,u)}):u&&f.push(i(f)+"skewX("+u+r)}function c(l,u,f,h,p,d){if(l!==f||u!==h){var g=p.push(i(p)+"scale(",null,",",null,")");d.push({i:g-4,x:Vn(l,f)},{i:g-2,x:Vn(u,h)})}else(f!==1||h!==1)&&p.push(i(p)+"scale("+f+","+h+")")}return function(l,u){var f=[],h=[];return l=e(l),u=e(u),o(l.translateX,l.translateY,u.translateX,u.translateY,f,h),a(l.rotate,u.rotate,f,h),s(l.skewX,u.skewX,f,h),c(l.scaleX,l.scaleY,u.scaleX,u.scaleY,f,h),l=u=null,function(p){for(var d=-1,g=h.length,y;++d<g;)f[(y=h[d]).i]=y.x(p);return f.join("")}}}var rO=tO(Iq,"px, ","px)","deg)"),nO=tO(Rq,", ",")",")"),Dq=1e-12;function iO(e){return((e=Math.exp(e))+1/e)/2}function Nq(e){return((e=Math.exp(e))-1/e)/2}function Lq(e){return((e=Math.exp(2*e))-1)/(e+1)}const $q=function e(t,n,r){function i(o,a){var s=o[0],c=o[1],l=o[2],u=a[0],f=a[1],h=a[2],p=u-s,d=f-c,g=p*p+d*d,y,b;if(g<Dq)b=Math.log(h/l)/t,y=function(S){return[s+S*p,c+S*d,l*Math.exp(t*S*b)]};else{var m=Math.sqrt(g),v=(h*h-l*l+r*g)/(2*l*n*m),_=(h*h-l*l-r*g)/(2*h*n*m),T=Math.log(Math.sqrt(v*v+1)-v),w=Math.log(Math.sqrt(_*_+1)-_);b=(w-T)/t,y=function(S){var k=S*b,E=iO(T),P=l/(n*m)*(E*Lq(t*k+T)-Nq(T));return[s+P*p,c+P*d,l*E/iO(t*k+T)]}}return y.duration=b*1e3*t/Math.SQRT2,y}return i.rho=function(o){var a=Math.max(.001,+o),s=a*a,c=s*s;return e(a,s,c)},i}(Math.SQRT2,2,4);function jq(e,t){t===void 0&&(t=e,e=da);for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(i,i=t[++n]);return function(a){var s=Math.max(0,Math.min(r-1,Math.floor(a*=r)));return o[s](a-s)}}function Bq(e){return function(){return e}}function qh(e){return+e}var oO=[0,1];function tn(e){return e}function ev(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:Bq(isNaN(t)?NaN:.5)}function zq(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function Hq(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=ev(i,r),o=n(a,o)):(r=ev(r,i),o=n(o,a)),function(s){return o(r(s))}}function Fq(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=ev(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(s){var c=Ao(e,s,1,r)-1;return o[c](i[c](s))}}function ru(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Uh(){var e=oO,t=oO,n=da,r,i,o,a=tn,s,c,l;function u(){var h=Math.min(e.length,t.length);return a!==tn&&(a=zq(e[0],e[h-1])),s=h>2?Fq:Hq,c=l=null,f}function f(h){return h==null||isNaN(h=+h)?o:(c||(c=s(e.map(r),t,n)))(r(a(h)))}return f.invert=function(h){return a(i((l||(l=s(t,e.map(r),Vn)))(h)))},f.domain=function(h){return arguments.length?(e=Array.from(h,qh),u()):e.slice()},f.range=function(h){return arguments.length?(t=Array.from(h),u()):t.slice()},f.rangeRound=function(h){return t=Array.from(h),n=Qm,u()},f.clamp=function(h){return arguments.length?(a=h?!0:tn,u()):a!==tn},f.interpolate=function(h){return arguments.length?(n=h,u()):n},f.unknown=function(h){return arguments.length?(o=h,f):o},function(h,p){return r=h,i=p,u()}}function tv(){return Uh()(tn,tn)}function qq(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Vh(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function _s(e){return e=Vh(Math.abs(e)),e?e[1]:NaN}function Uq(e,t){return function(n,r){for(var i=n.length,o=[],a=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),o.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}function Vq(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var Gq=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ts(e){if(!(t=Gq.exec(e)))throw new Error("invalid format: "+e);var t;return new Gh({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Ts.prototype=Gh.prototype;function Gh(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Gh.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.t