@vizabi/bubblechart 3.14.1 → 3.14.3

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.
package/build/stats.html CHANGED
@@ -8,19 +8,12 @@
8
8
  <title>RollUp Visualizer</title>
9
9
  <style>
10
10
  :root {
11
- --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
12
- "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji",
13
- "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
14
- --background-color: #f7eedf;
15
- --text-color: #333;
11
+ --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif,
12
+ "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
13
+ --background-color: #2b2d42;
14
+ --text-color: #edf2f4;
16
15
  }
17
16
 
18
- @media (prefers-color-scheme: dark) {
19
- :root {
20
- --background-color: #2b2d42;
21
- --text-color: #edf2f4;
22
- }
23
- }
24
17
  html {
25
18
  box-sizing: border-box;
26
19
  }
@@ -151,9 +144,9 @@ main {
151
144
  var drawChart = (function (exports) {
152
145
  'use strict';
153
146
 
154
- var n,u$1,i$1,t$1,o$2,r$1={},f$1=[],e$1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function c$1(n,l){for(var u in l)n[u]=l[u];return n}function s$1(n){var l=n.parentNode;l&&l.removeChild(n);}function a$1(n,l,u){var i,t,o,r=arguments,f={};for(o in l)"key"==o?i=l[o]:"ref"==o?t=l[o]:f[o]=l[o];if(arguments.length>3)for(u=[u],o=3;o<arguments.length;o++)u.push(r[o]);if(null!=u&&(f.children=u),"function"==typeof n&&null!=n.defaultProps)for(o in n.defaultProps)void 0===f[o]&&(f[o]=n.defaultProps[o]);return v$1(n,f,i,t,null)}function v$1(l,u,i,t,o){var r={type:l,props:u,key:i,ref:t,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++n.__v:o};return null!=n.vnode&&n.vnode(r),r}function y$1(n){return n.children}function p$1(n,l){this.props=n,this.context=l;}function d$1(n,l){if(null==l)return n.__?d$1(n.__,n.__.__k.indexOf(n)+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return "function"==typeof n.type?d$1(n):null}function _(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return _(n)}}function k$1(l){(!l.__d&&(l.__d=!0)&&u$1.push(l)&&!b$1.__r++||t$1!==n.debounceRendering)&&((t$1=n.debounceRendering)||i$1)(b$1);}function b$1(){for(var n;b$1.__r=u$1.length;)n=u$1.sort(function(n,l){return n.__v.__b-l.__v.__b}),u$1=[],n.some(function(n){var l,u,i,t,o,r;n.__d&&(o=(t=(l=n).__v).__e,(r=l.__P)&&(u=[],(i=c$1({},t)).__v=t.__v+1,I(r,t,i,l.__n,void 0!==r.ownerSVGElement,null!=t.__h?[o]:null,u,null==o?d$1(t):o,t.__h),T(u,t),t.__e!=o&&_(t)));});}function m$1(n,l,u,i,t,o,e,c,s,a){var h,p,_,k,b,m,w,A=i&&i.__k||f$1,P=A.length;for(u.__k=[],h=0;h<l.length;h++)if(null!=(k=u.__k[h]=null==(k=l[h])||"boolean"==typeof k?null:"string"==typeof k||"number"==typeof k||"bigint"==typeof k?v$1(null,k,null,null,k):Array.isArray(k)?v$1(y$1,{children:k},null,null,null):k.__b>0?v$1(k.type,k.props,k.key,null,k.__v):k)){if(k.__=u,k.__b=u.__b+1,null===(_=A[h])||_&&k.key==_.key&&k.type===_.type)A[h]=void 0;else for(p=0;p<P;p++){if((_=A[p])&&k.key==_.key&&k.type===_.type){A[p]=void 0;break}_=null;}I(n,k,_=_||r$1,t,o,e,c,s,a),b=k.__e,(p=k.ref)&&_.ref!=p&&(w||(w=[]),_.ref&&w.push(_.ref,null,k),w.push(p,k.__c||b,k)),null!=b?(null==m&&(m=b),"function"==typeof k.type&&null!=k.__k&&k.__k===_.__k?k.__d=s=g$1(k,s,n):s=x$1(n,k,_,A,b,s),a||"option"!==u.type?"function"==typeof u.type&&(u.__d=s):n.value=""):s&&_.__e==s&&s.parentNode!=n&&(s=d$1(_));}for(u.__e=m,h=P;h--;)null!=A[h]&&("function"==typeof u.type&&null!=A[h].__e&&A[h].__e==u.__d&&(u.__d=d$1(i,h+1)),L(A[h],A[h]));if(w)for(h=0;h<w.length;h++)z(w[h],w[++h],w[++h]);}function g$1(n,l,u){var i,t;for(i=0;i<n.__k.length;i++)(t=n.__k[i])&&(t.__=n,l="function"==typeof t.type?g$1(t,l,u):x$1(u,t,t,n.__k,t.__e,l));return l}function x$1(n,l,u,i,t,o){var r,f,e;if(void 0!==l.__d)r=l.__d,l.__d=void 0;else if(null==u||t!=o||null==t.parentNode)n:if(null==o||o.parentNode!==n)n.appendChild(t),r=null;else {for(f=o,e=0;(f=f.nextSibling)&&e<i.length;e+=2)if(f==t)break n;n.insertBefore(t,o),r=o;}return void 0!==r?r:t.nextSibling}function A$1(n,l,u,i,t){var o;for(o in u)"children"===o||"key"===o||o in l||C$1(n,o,null,u[o],i);for(o in l)t&&"function"!=typeof l[o]||"children"===o||"key"===o||"value"===o||"checked"===o||u[o]===l[o]||C$1(n,o,l[o],u[o],i);}function P(n,l,u){"-"===l[0]?n.setProperty(l,u):n[l]=null==u?"":"number"!=typeof u||e$1.test(l)?u:u+"px";}function C$1(n,l,u,i,t){var o;n:if("style"===l)if("string"==typeof u)n.style.cssText=u;else {if("string"==typeof i&&(n.style.cssText=i=""),i)for(l in i)u&&l in u||P(n.style,l,"");if(u)for(l in u)i&&u[l]===i[l]||P(n.style,l,u[l]);}else if("o"===l[0]&&"n"===l[1])o=l!==(l=l.replace(/Capture$/,"")),l=l.toLowerCase()in n?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=u,u?i||n.addEventListener(l,o?H:$,o):n.removeEventListener(l,o?H:$,o);else if("dangerouslySetInnerHTML"!==l){if(t)l=l.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==l&&"list"!==l&&"form"!==l&&"tabIndex"!==l&&"download"!==l&&l in n)try{n[l]=null==u?"":u;break n}catch(n){}"function"==typeof u||(null!=u&&(!1!==u||"a"===l[0]&&"r"===l[1])?n.setAttribute(l,u):n.removeAttribute(l));}}function $(l){this.l[l.type+!1](n.event?n.event(l):l);}function H(l){this.l[l.type+!0](n.event?n.event(l):l);}function I(l,u,i,t,o,r,f,e,s){var a,v,h,d,_,k,b,g,w,x,A,P=u.type;if(void 0!==u.constructor)return null;null!=i.__h&&(s=i.__h,e=u.__e=i.__e,u.__h=null,r=[e]),(a=n.__b)&&a(u);try{n:if("function"==typeof P){if(g=u.props,w=(a=P.contextType)&&t[a.__c],x=a?w?w.props.value:a.__:t,i.__c?b=(v=u.__c=i.__c).__=v.__E:("prototype"in P&&P.prototype.render?u.__c=v=new P(g,x):(u.__c=v=new p$1(g,x),v.constructor=P,v.render=M),w&&w.sub(v),v.props=g,v.state||(v.state={}),v.context=x,v.__n=t,h=v.__d=!0,v.__h=[]),null==v.__s&&(v.__s=v.state),null!=P.getDerivedStateFromProps&&(v.__s==v.state&&(v.__s=c$1({},v.__s)),c$1(v.__s,P.getDerivedStateFromProps(g,v.__s))),d=v.props,_=v.state,h)null==P.getDerivedStateFromProps&&null!=v.componentWillMount&&v.componentWillMount(),null!=v.componentDidMount&&v.__h.push(v.componentDidMount);else {if(null==P.getDerivedStateFromProps&&g!==d&&null!=v.componentWillReceiveProps&&v.componentWillReceiveProps(g,x),!v.__e&&null!=v.shouldComponentUpdate&&!1===v.shouldComponentUpdate(g,v.__s,x)||u.__v===i.__v){v.props=g,v.state=v.__s,u.__v!==i.__v&&(v.__d=!1),v.__v=u,u.__e=i.__e,u.__k=i.__k,u.__k.forEach(function(n){n&&(n.__=u);}),v.__h.length&&f.push(v);break n}null!=v.componentWillUpdate&&v.componentWillUpdate(g,v.__s,x),null!=v.componentDidUpdate&&v.__h.push(function(){v.componentDidUpdate(d,_,k);});}v.context=x,v.props=g,v.state=v.__s,(a=n.__r)&&a(u),v.__d=!1,v.__v=u,v.__P=l,a=v.render(v.props,v.state,v.context),v.state=v.__s,null!=v.getChildContext&&(t=c$1(c$1({},t),v.getChildContext())),h||null==v.getSnapshotBeforeUpdate||(k=v.getSnapshotBeforeUpdate(d,_)),A=null!=a&&a.type===y$1&&null==a.key?a.props.children:a,m$1(l,Array.isArray(A)?A:[A],u,i,t,o,r,f,e,s),v.base=u.__e,u.__h=null,v.__h.length&&f.push(v),b&&(v.__E=v.__=null),v.__e=!1;}else null==r&&u.__v===i.__v?(u.__k=i.__k,u.__e=i.__e):u.__e=j$1(i.__e,u,i,t,o,r,f,s);(a=n.diffed)&&a(u);}catch(l){u.__v=null,(s||null!=r)&&(u.__e=e,u.__h=!!s,r[r.indexOf(e)]=null),n.__e(l,u,i);}}function T(l,u){n.__c&&n.__c(u,l),l.some(function(u){try{l=u.__h,u.__h=[],l.some(function(n){n.call(u);});}catch(l){n.__e(l,u.__v);}});}function j$1(n,l,u,i,t,o,e,c){var a,v,h,y,p=u.props,d=l.props,_=l.type,k=0;if("svg"===_&&(t=!0),null!=o)for(;k<o.length;k++)if((a=o[k])&&(a===n||(_?a.localName==_:3==a.nodeType))){n=a,o[k]=null;break}if(null==n){if(null===_)return document.createTextNode(d);n=t?document.createElementNS("http://www.w3.org/2000/svg",_):document.createElement(_,d.is&&d),o=null,c=!1;}if(null===_)p===d||c&&n.data===d||(n.data=d);else {if(o=o&&f$1.slice.call(n.childNodes),v=(p=u.props||r$1).dangerouslySetInnerHTML,h=d.dangerouslySetInnerHTML,!c){if(null!=o)for(p={},y=0;y<n.attributes.length;y++)p[n.attributes[y].name]=n.attributes[y].value;(h||v)&&(h&&(v&&h.__html==v.__html||h.__html===n.innerHTML)||(n.innerHTML=h&&h.__html||""));}if(A$1(n,d,p,t,c),h)l.__k=[];else if(k=l.props.children,m$1(n,Array.isArray(k)?k:[k],l,u,i,t&&"foreignObject"!==_,o,e,n.firstChild,c),null!=o)for(k=o.length;k--;)null!=o[k]&&s$1(o[k]);c||("value"in d&&void 0!==(k=d.value)&&(k!==n.value||"progress"===_&&!k)&&C$1(n,"value",k,p.value,!1),"checked"in d&&void 0!==(k=d.checked)&&k!==n.checked&&C$1(n,"checked",k,p.checked,!1));}return n}function z(l,u,i){try{"function"==typeof l?l(u):l.current=u;}catch(l){n.__e(l,i);}}function L(l,u,i){var t,o,r;if(n.unmount&&n.unmount(l),(t=l.ref)&&(t.current&&t.current!==l.__e||z(t,null,u)),i||"function"==typeof l.type||(i=null!=(o=l.__e)),l.__e=l.__d=void 0,null!=(t=l.__c)){if(t.componentWillUnmount)try{t.componentWillUnmount();}catch(l){n.__e(l,u);}t.base=t.__P=null;}if(t=l.__k)for(r=0;r<t.length;r++)t[r]&&L(t[r],u,i);null!=o&&s$1(o);}function M(n,l,u){return this.constructor(n,u)}function N(l,u,i){var t,o,e;n.__&&n.__(l,u),o=(t="function"==typeof i)?null:i&&i.__k||u.__k,e=[],I(u,l=(!t&&i||u).__k=a$1(y$1,null,[l]),o||r$1,r$1,void 0!==u.ownerSVGElement,!t&&i?[i]:o?null:u.firstChild?f$1.slice.call(u.childNodes):null,e,!t&&i?i:o?o.__e:u.firstChild,t),T(e,l);}function q(n,l){var u={__c:l="__cC"+o$2++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var u,i;return this.getChildContext||(u=[],(i={})[l]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&u.some(k$1);},this.sub=function(n){u.push(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u.splice(u.indexOf(n),1),l&&l.call(n);};}),n.children}};return u.Provider.__=u.Consumer.contextType=u}n={__e:function(n,l){for(var u,i,t;l=l.__;)if((u=l.__c)&&!u.__)try{if((i=u.constructor)&&null!=i.getDerivedStateFromError&&(u.setState(i.getDerivedStateFromError(n)),t=u.__d),null!=u.componentDidCatch&&(u.componentDidCatch(n),t=u.__d),t)return u.__E=u}catch(l){n=l;}throw n},__v:0},p$1.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=c$1({},this.state),"function"==typeof n&&(n=n(c$1({},u),this.props)),n&&c$1(u,n),null!=n&&this.__v&&(l&&this.__h.push(l),k$1(this));},p$1.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),k$1(this));},p$1.prototype.render=y$1,u$1=[],i$1="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,b$1.__r=0,o$2=0;
147
+ var n,l$1,u$1,t$1,o$2,r$1,f$1={},e$2=[],c$1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function s$1(n,l){for(var u in l)n[u]=l[u];return n}function a$1(n){var l=n.parentNode;l&&l.removeChild(n);}function h$1(l,u,i){var t,o,r,f={};for(r in u)"key"==r?t=u[r]:"ref"==r?o=u[r]:f[r]=u[r];if(arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):i),"function"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===f[r]&&(f[r]=l.defaultProps[r]);return v$1(l,f,t,o,null)}function v$1(n,i,t,o,r){var f={type:n,props:i,key:t,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==r?++u$1:r};return null==r&&null!=l$1.vnode&&l$1.vnode(f),f}function p$1(n){return n.children}function d$1(n,l){this.props=n,this.context=l;}function _$1(n,l){if(null==l)return n.__?_$1(n.__,n.__.__k.indexOf(n)+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return "function"==typeof n.type?_$1(n):null}function k$1(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return k$1(n)}}function b$1(n){(!n.__d&&(n.__d=!0)&&t$1.push(n)&&!g$1.__r++||o$2!==l$1.debounceRendering)&&((o$2=l$1.debounceRendering)||setTimeout)(g$1);}function g$1(){for(var n;g$1.__r=t$1.length;)n=t$1.sort(function(n,l){return n.__v.__b-l.__v.__b}),t$1=[],n.some(function(n){var l,u,i,t,o,r;n.__d&&(o=(t=(l=n).__v).__e,(r=l.__P)&&(u=[],(i=s$1({},t)).__v=t.__v+1,j$1(r,t,i,l.__n,void 0!==r.ownerSVGElement,null!=t.__h?[o]:null,u,null==o?_$1(t):o,t.__h),z$1(u,t),t.__e!=o&&k$1(t)));});}function w$1(n,l,u,i,t,o,r,c,s,a){var h,y,d,k,b,g,w,x=i&&i.__k||e$2,C=x.length;for(u.__k=[],h=0;h<l.length;h++)if(null!=(k=u.__k[h]=null==(k=l[h])||"boolean"==typeof k?null:"string"==typeof k||"number"==typeof k||"bigint"==typeof k?v$1(null,k,null,null,k):Array.isArray(k)?v$1(p$1,{children:k},null,null,null):k.__b>0?v$1(k.type,k.props,k.key,null,k.__v):k)){if(k.__=u,k.__b=u.__b+1,null===(d=x[h])||d&&k.key==d.key&&k.type===d.type)x[h]=void 0;else for(y=0;y<C;y++){if((d=x[y])&&k.key==d.key&&k.type===d.type){x[y]=void 0;break}d=null;}j$1(n,k,d=d||f$1,t,o,r,c,s,a),b=k.__e,(y=k.ref)&&d.ref!=y&&(w||(w=[]),d.ref&&w.push(d.ref,null,k),w.push(y,k.__c||b,k)),null!=b?(null==g&&(g=b),"function"==typeof k.type&&k.__k===d.__k?k.__d=s=m$1(k,s,n):s=A$1(n,k,d,x,b,s),"function"==typeof u.type&&(u.__d=s)):s&&d.__e==s&&s.parentNode!=n&&(s=_$1(d));}for(u.__e=g,h=C;h--;)null!=x[h]&&("function"==typeof u.type&&null!=x[h].__e&&x[h].__e==u.__d&&(u.__d=_$1(i,h+1)),N(x[h],x[h]));if(w)for(h=0;h<w.length;h++)M(w[h],w[++h],w[++h]);}function m$1(n,l,u){for(var i,t=n.__k,o=0;t&&o<t.length;o++)(i=t[o])&&(i.__=n,l="function"==typeof i.type?m$1(i,l,u):A$1(u,i,i,t,i.__e,l));return l}function A$1(n,l,u,i,t,o){var r,f,e;if(void 0!==l.__d)r=l.__d,l.__d=void 0;else if(null==u||t!=o||null==t.parentNode)n:if(null==o||o.parentNode!==n)n.appendChild(t),r=null;else {for(f=o,e=0;(f=f.nextSibling)&&e<i.length;e+=2)if(f==t)break n;n.insertBefore(t,o),r=o;}return void 0!==r?r:t.nextSibling}function C$1(n,l,u,i,t){var o;for(o in u)"children"===o||"key"===o||o in l||H(n,o,null,u[o],i);for(o in l)t&&"function"!=typeof l[o]||"children"===o||"key"===o||"value"===o||"checked"===o||u[o]===l[o]||H(n,o,l[o],u[o],i);}function $(n,l,u){"-"===l[0]?n.setProperty(l,u):n[l]=null==u?"":"number"!=typeof u||c$1.test(l)?u:u+"px";}function H(n,l,u,i,t){var o;n:if("style"===l)if("string"==typeof u)n.style.cssText=u;else {if("string"==typeof i&&(n.style.cssText=i=""),i)for(l in i)u&&l in u||$(n.style,l,"");if(u)for(l in u)i&&u[l]===i[l]||$(n.style,l,u[l]);}else if("o"===l[0]&&"n"===l[1])o=l!==(l=l.replace(/Capture$/,"")),l=l.toLowerCase()in n?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=u,u?i||n.addEventListener(l,o?T:I,o):n.removeEventListener(l,o?T:I,o);else if("dangerouslySetInnerHTML"!==l){if(t)l=l.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("href"!==l&&"list"!==l&&"form"!==l&&"tabIndex"!==l&&"download"!==l&&l in n)try{n[l]=null==u?"":u;break n}catch(n){}"function"==typeof u||(null!=u&&(!1!==u||"a"===l[0]&&"r"===l[1])?n.setAttribute(l,u):n.removeAttribute(l));}}function I(n){this.l[n.type+!1](l$1.event?l$1.event(n):n);}function T(n){this.l[n.type+!0](l$1.event?l$1.event(n):n);}function j$1(n,u,i,t,o,r,f,e,c){var a,h,v,y,_,k,b,g,m,x,A,C,$,H=u.type;if(void 0!==u.constructor)return null;null!=i.__h&&(c=i.__h,e=u.__e=i.__e,u.__h=null,r=[e]),(a=l$1.__b)&&a(u);try{n:if("function"==typeof H){if(g=u.props,m=(a=H.contextType)&&t[a.__c],x=a?m?m.props.value:a.__:t,i.__c?b=(h=u.__c=i.__c).__=h.__E:("prototype"in H&&H.prototype.render?u.__c=h=new H(g,x):(u.__c=h=new d$1(g,x),h.constructor=H,h.render=O),m&&m.sub(h),h.props=g,h.state||(h.state={}),h.context=x,h.__n=t,v=h.__d=!0,h.__h=[]),null==h.__s&&(h.__s=h.state),null!=H.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=s$1({},h.__s)),s$1(h.__s,H.getDerivedStateFromProps(g,h.__s))),y=h.props,_=h.state,v)null==H.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else {if(null==H.getDerivedStateFromProps&&g!==y&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(g,x),!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(g,h.__s,x)||u.__v===i.__v){h.props=g,h.state=h.__s,u.__v!==i.__v&&(h.__d=!1),h.__v=u,u.__e=i.__e,u.__k=i.__k,u.__k.forEach(function(n){n&&(n.__=u);}),h.__h.length&&f.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(g,h.__s,x),null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(y,_,k);});}if(h.context=x,h.props=g,h.__v=u,h.__P=n,A=l$1.__r,C=0,"prototype"in H&&H.prototype.render)h.state=h.__s,h.__d=!1,A&&A(u),a=h.render(h.props,h.state,h.context);else do{h.__d=!1,A&&A(u),a=h.render(h.props,h.state,h.context),h.state=h.__s;}while(h.__d&&++C<25);h.state=h.__s,null!=h.getChildContext&&(t=s$1(s$1({},t),h.getChildContext())),v||null==h.getSnapshotBeforeUpdate||(k=h.getSnapshotBeforeUpdate(y,_)),$=null!=a&&a.type===p$1&&null==a.key?a.props.children:a,w$1(n,Array.isArray($)?$:[$],u,i,t,o,r,f,e,c),h.base=u.__e,u.__h=null,h.__h.length&&f.push(h),b&&(h.__E=h.__=null),h.__e=!1;}else null==r&&u.__v===i.__v?(u.__k=i.__k,u.__e=i.__e):u.__e=L(i.__e,u,i,t,o,r,f,c);(a=l$1.diffed)&&a(u);}catch(n){u.__v=null,(c||null!=r)&&(u.__e=e,u.__h=!!c,r[r.indexOf(e)]=null),l$1.__e(n,u,i);}}function z$1(n,u){l$1.__c&&l$1.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u);});}catch(n){l$1.__e(n,u.__v);}});}function L(l,u,i,t,o,r,e,c){var s,h,v,y=i.props,p=u.props,d=u.type,k=0;if("svg"===d&&(o=!0),null!=r)for(;k<r.length;k++)if((s=r[k])&&"setAttribute"in s==!!d&&(d?s.localName===d:3===s.nodeType)){l=s,r[k]=null;break}if(null==l){if(null===d)return document.createTextNode(p);l=o?document.createElementNS("http://www.w3.org/2000/svg",d):document.createElement(d,p.is&&p),r=null,c=!1;}if(null===d)y===p||c&&l.data===p||(l.data=p);else {if(r=r&&n.call(l.childNodes),h=(y=i.props||f$1).dangerouslySetInnerHTML,v=p.dangerouslySetInnerHTML,!c){if(null!=r)for(y={},k=0;k<l.attributes.length;k++)y[l.attributes[k].name]=l.attributes[k].value;(v||h)&&(v&&(h&&v.__html==h.__html||v.__html===l.innerHTML)||(l.innerHTML=v&&v.__html||""));}if(C$1(l,p,y,o,c),v)u.__k=[];else if(k=u.props.children,w$1(l,Array.isArray(k)?k:[k],u,i,t,o&&"foreignObject"!==d,r,e,r?r[0]:i.__k&&_$1(i,0),c),null!=r)for(k=r.length;k--;)null!=r[k]&&a$1(r[k]);c||("value"in p&&void 0!==(k=p.value)&&(k!==l.value||"progress"===d&&!k||"option"===d&&k!==y.value)&&H(l,"value",k,y.value,!1),"checked"in p&&void 0!==(k=p.checked)&&k!==l.checked&&H(l,"checked",k,y.checked,!1));}return l}function M(n,u,i){try{"function"==typeof n?n(u):n.current=u;}catch(n){l$1.__e(n,i);}}function N(n,u,i){var t,o;if(l$1.unmount&&l$1.unmount(n),(t=n.ref)&&(t.current&&t.current!==n.__e||M(t,null,u)),null!=(t=n.__c)){if(t.componentWillUnmount)try{t.componentWillUnmount();}catch(n){l$1.__e(n,u);}t.base=t.__P=null;}if(t=n.__k)for(o=0;o<t.length;o++)t[o]&&N(t[o],u,"function"!=typeof n.type);i||null==n.__e||a$1(n.__e),n.__e=n.__d=void 0;}function O(n,l,u){return this.constructor(n,u)}function P(u,i,t){var o,r,e;l$1.__&&l$1.__(u,i),r=(o="function"==typeof t)?null:t&&t.__k||i.__k,e=[],j$1(i,u=(!o&&t||i).__k=h$1(p$1,null,[u]),r||f$1,f$1,void 0!==i.ownerSVGElement,!o&&t?[t]:r?null:i.firstChild?n.call(i.childNodes):null,e,!o&&t?t:r?r.__e:i.firstChild,o),z$1(e,u);}function B$1(n,l){var u={__c:l="__cC"+r$1++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var u,i;return this.getChildContext||(u=[],(i={})[l]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&u.some(b$1);},this.sub=function(n){u.push(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u.splice(u.indexOf(n),1),l&&l.call(n);};}),n.children}};return u.Provider.__=u.Consumer.contextType=u}n=e$2.slice,l$1={__e:function(n,l,u,i){for(var t,o,r;l=l.__;)if((t=l.__c)&&!t.__)try{if((o=t.constructor)&&null!=o.getDerivedStateFromError&&(t.setState(o.getDerivedStateFromError(n)),r=t.__d),null!=t.componentDidCatch&&(t.componentDidCatch(n,i||{}),r=t.__d),r)return t.__E=t}catch(l){n=l;}throw n}},u$1=0,d$1.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=s$1({},this.state),"function"==typeof n&&(n=n(s$1({},u),this.props)),n&&s$1(u,n),null!=n&&this.__v&&(l&&this.__h.push(l),b$1(this));},d$1.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),b$1(this));},d$1.prototype.render=p$1,t$1=[],g$1.__r=0,r$1=0;
155
148
 
156
- function o$1(_,o,e,n$1,t){var f={};for(var l in o)"ref"!=l&&(f[l]=o[l]);var s,u,a={type:_,props:f,key:e,ref:o&&o.ref,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:++n.__v,__source:n$1,__self:t};if("function"==typeof _&&(s=_.defaultProps))for(u in s)void 0===f[u]&&(f[u]=s[u]);return n.vnode&&n.vnode(a),a}
149
+ var o$1=0;function e$1(_,e,n,t,f){var l,s,u={};for(s in e)"ref"==s?l=e[s]:u[s]=e[s];var a={type:_,props:u,key:n,ref:l,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--o$1,__source:f,__self:t};if("function"==typeof _&&(l=_.defaultProps))for(s in l)void 0===u[s]&&(u[s]=l[s]);return l$1.vnode&&l$1.vnode(a),a}
157
150
 
158
151
  function count$1(node) {
159
152
  var sum = 0,
@@ -397,7 +390,7 @@ var drawChart = (function (exports) {
397
390
  return 0;
398
391
  }
399
392
 
400
- function constant(x) {
393
+ function constant$1(x) {
401
394
  return function() {
402
395
  return x;
403
396
  };
@@ -423,6 +416,8 @@ var drawChart = (function (exports) {
423
416
  }
424
417
  }
425
418
 
419
+ Object.create(Node$1.prototype);
420
+
426
421
  function treemapSlice(parent, x0, y0, x1, y1) {
427
422
  var nodes = parent.children,
428
423
  node,
@@ -564,7 +559,7 @@ var drawChart = (function (exports) {
564
559
  };
565
560
 
566
561
  treemap.paddingInner = function(x) {
567
- return arguments.length ? (paddingInner = typeof x === "function" ? x : constant(+x), treemap) : paddingInner;
562
+ return arguments.length ? (paddingInner = typeof x === "function" ? x : constant$1(+x), treemap) : paddingInner;
568
563
  };
569
564
 
570
565
  treemap.paddingOuter = function(x) {
@@ -572,19 +567,19 @@ var drawChart = (function (exports) {
572
567
  };
573
568
 
574
569
  treemap.paddingTop = function(x) {
575
- return arguments.length ? (paddingTop = typeof x === "function" ? x : constant(+x), treemap) : paddingTop;
570
+ return arguments.length ? (paddingTop = typeof x === "function" ? x : constant$1(+x), treemap) : paddingTop;
576
571
  };
577
572
 
578
573
  treemap.paddingRight = function(x) {
579
- return arguments.length ? (paddingRight = typeof x === "function" ? x : constant(+x), treemap) : paddingRight;
574
+ return arguments.length ? (paddingRight = typeof x === "function" ? x : constant$1(+x), treemap) : paddingRight;
580
575
  };
581
576
 
582
577
  treemap.paddingBottom = function(x) {
583
- return arguments.length ? (paddingBottom = typeof x === "function" ? x : constant(+x), treemap) : paddingBottom;
578
+ return arguments.length ? (paddingBottom = typeof x === "function" ? x : constant$1(+x), treemap) : paddingBottom;
584
579
  };
585
580
 
586
581
  treemap.paddingLeft = function(x) {
587
- return arguments.length ? (paddingLeft = typeof x === "function" ? x : constant(+x), treemap) : paddingLeft;
582
+ return arguments.length ? (paddingLeft = typeof x === "function" ? x : constant$1(+x), treemap) : paddingLeft;
588
583
  };
589
584
 
590
585
  return treemap;
@@ -665,11 +660,11 @@ var drawChart = (function (exports) {
665
660
  return availableSizeProperties;
666
661
  };
667
662
 
668
- var t,u,r,o=0,i=[],c=n.__b,f=n.__r,e=n.diffed,a=n.__c,v=n.unmount;function m(t,r){n.__h&&n.__h(u,t,o||r),o=0;var i=u.__H||(u.__H={__:[],__h:[]});return t>=i.__.length&&i.__.push({}),i.__[t]}function l(n){return o=1,p(w,n)}function p(n,r,o){var i=m(t++,2);return i.t=n,i.__c||(i.__=[o?o(r):w(void 0,r),function(n){var t=i.t(i.__[0],n);i.__[0]!==t&&(i.__=[t,i.__[1]],i.__c.setState({}));}],i.__c=u),i.__}function y(r,o){var i=m(t++,3);!n.__s&&k(i.__H,o)&&(i.__=r,i.__H=o,u.__H.__h.push(i));}function h(r,o){var i=m(t++,4);!n.__s&&k(i.__H,o)&&(i.__=r,i.__H=o,u.__h.push(i));}function s(n){return o=5,d(function(){return {current:n}},[])}function d(n,u){var r=m(t++,7);return k(r.__H,u)&&(r.__=n(),r.__H=u,r.__h=n),r.__}function F(n){var r=u.context[n.__c],o=m(t++,9);return o.__c=n,r?(null==o.__&&(o.__=!0,r.sub(u)),r.props.value):n.__}function x(){i.forEach(function(t){if(t.__P)try{t.__H.__h.forEach(g),t.__H.__h.forEach(j),t.__H.__h=[];}catch(u){t.__H.__h=[],n.__e(u,t.__v);}}),i=[];}n.__b=function(n){u=null,c&&c(n);},n.__r=function(n){f&&f(n),t=0;var r=(u=n.__c).__H;r&&(r.__h.forEach(g),r.__h.forEach(j),r.__h=[]);},n.diffed=function(t){e&&e(t);var o=t.__c;o&&o.__H&&o.__H.__h.length&&(1!==i.push(o)&&r===n.requestAnimationFrame||((r=n.requestAnimationFrame)||function(n){var t,u=function(){clearTimeout(r),b&&cancelAnimationFrame(t),setTimeout(n);},r=setTimeout(u,100);b&&(t=requestAnimationFrame(u));})(x)),u=void 0;},n.__c=function(t,u){u.some(function(t){try{t.__h.forEach(g),t.__h=t.__h.filter(function(n){return !n.__||j(n)});}catch(r){u.some(function(n){n.__h&&(n.__h=[]);}),u=[],n.__e(r,t.__v);}}),a&&a(t,u);},n.unmount=function(t){v&&v(t);var u=t.__c;if(u&&u.__H)try{u.__H.__.forEach(g);}catch(t){n.__e(t,u.__v);}};var b="function"==typeof requestAnimationFrame;function g(n){var t=u;"function"==typeof n.__c&&n.__c(),u=t;}function j(n){var t=u;n.__c=n.__(),u=t;}function k(n,t){return !n||n.length!==t.length||t.some(function(t,u){return t!==n[u]})}function w(n,t){return "function"==typeof t?t(n):t}
663
+ var t,u,r,o,i=0,c=[],f=[],e=l$1.__b,a=l$1.__r,v=l$1.diffed,l=l$1.__c,m=l$1.unmount;function p(t,r){l$1.__h&&l$1.__h(u,t,i||r),i=0;var o=u.__H||(u.__H={__:[],__h:[]});return t>=o.__.length&&o.__.push({__V:f}),o.__[t]}function y(n){return i=1,d(z,n)}function d(n,r,o){var i=p(t++,2);return i.t=n,i.__c||(i.__=[o?o(r):z(void 0,r),function(n){var t=i.t(i.__[0],n);i.__[0]!==t&&(i.__=[t,i.__[1]],i.__c.setState({}));}],i.__c=u),i.__}function _(r,o){var i=p(t++,3);!l$1.__s&&w(i.__H,o)&&(i.__=r,i.u=o,u.__H.__h.push(i));}function h(r,o){var i=p(t++,4);!l$1.__s&&w(i.__H,o)&&(i.__=r,i.u=o,u.__h.push(i));}function s(n){return i=5,F(function(){return {current:n}},[])}function F(n,u){var r=p(t++,7);return w(r.__H,u)?(r.__V=n(),r.u=u,r.__h=n,r.__V):r.__}function q(n){var r=u.context[n.__c],o=p(t++,9);return o.c=n,r?(null==o.__&&(o.__=!0,r.sub(u)),r.props.value):n.__}function b(){for(var t;t=c.shift();)if(t.__P)try{t.__H.__h.forEach(j),t.__H.__h.forEach(k),t.__H.__h=[];}catch(u){t.__H.__h=[],l$1.__e(u,t.__v);}}l$1.__b=function(n){u=null,e&&e(n);},l$1.__r=function(n){a&&a(n),t=0;var o=(u=n.__c).__H;o&&(r===u?(o.__h=[],u.__h=[],o.__.forEach(function(n){n.__V=f,n.u=void 0;})):(o.__h.forEach(j),o.__h.forEach(k),o.__h=[])),r=u;},l$1.diffed=function(t){v&&v(t);var i=t.__c;i&&i.__H&&(i.__H.__h.length&&(1!==c.push(i)&&o===l$1.requestAnimationFrame||((o=l$1.requestAnimationFrame)||function(n){var t,u=function(){clearTimeout(r),g&&cancelAnimationFrame(t),setTimeout(n);},r=setTimeout(u,100);g&&(t=requestAnimationFrame(u));})(b)),i.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.__V!==f&&(n.__=n.__V),n.u=void 0,n.__V=f;})),r=u=null;},l$1.__c=function(t,u){u.some(function(t){try{t.__h.forEach(j),t.__h=t.__h.filter(function(n){return !n.__||k(n)});}catch(r){u.some(function(n){n.__h&&(n.__h=[]);}),u=[],l$1.__e(r,t.__v);}}),l&&l(t,u);},l$1.unmount=function(t){m&&m(t);var u,r=t.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{j(n);}catch(n){u=n;}}),u&&l$1.__e(u,r.__v));};var g="function"==typeof requestAnimationFrame;function j(n){var t=u,r=n.__c;"function"==typeof r&&(n.__c=void 0,r()),u=t;}function k(n){var t=u;n.__c=n.__(),u=t;}function w(n,t){return !n||n.length!==t.length||t.some(function(t,u){return t!==n[u]})}function z(n,t){return "function"==typeof t?t(n):t}
669
664
 
670
665
  const SideBar = ({ availableSizeProperties, sizeProperty, setSizeProperty, onExcludeChange, onIncludeChange, }) => {
671
- const [includeValue, setIncludeValue] = l("");
672
- const [excludeValue, setExcludeValue] = l("");
666
+ const [includeValue, setIncludeValue] = y("");
667
+ const [excludeValue, setExcludeValue] = y("");
673
668
  const handleSizePropertyChange = (sizeProp) => () => {
674
669
  if (sizeProp !== sizeProperty) {
675
670
  setSizeProperty(sizeProp);
@@ -685,16 +680,11 @@ var drawChart = (function (exports) {
685
680
  setExcludeValue(value);
686
681
  onExcludeChange(value);
687
682
  };
688
- return (o$1("aside", Object.assign({ className: "sidebar" }, { children: [o$1("div", Object.assign({ className: "size-selectors" }, { children: availableSizeProperties.length > 1 &&
683
+ return (e$1("aside", Object.assign({ className: "sidebar" }, { children: [e$1("div", Object.assign({ className: "size-selectors" }, { children: availableSizeProperties.length > 1 &&
689
684
  availableSizeProperties.map((sizeProp) => {
690
685
  const id = `selector-${sizeProp}`;
691
- return (o$1("div", Object.assign({ className: "size-selector" }, { children: [o$1("input", { type: "radio", id: id, checked: sizeProp === sizeProperty, onChange: handleSizePropertyChange(sizeProp) }, void 0),
692
- o$1("label", Object.assign({ htmlFor: id }, { children: LABELS[sizeProp] }), void 0)] }), sizeProp));
693
- }) }), void 0),
694
- o$1("div", Object.assign({ className: "module-filters" }, { children: [o$1("div", Object.assign({ className: "module-filter" }, { children: [o$1("label", Object.assign({ htmlFor: "module-filter-exclude" }, { children: "Exclude" }), void 0),
695
- o$1("input", { type: "text", id: "module-filter-exclude", value: excludeValue, onInput: handleExcludeChange }, void 0)] }), void 0),
696
- o$1("div", Object.assign({ className: "module-filter" }, { children: [o$1("label", Object.assign({ htmlFor: "module-filter-include" }, { children: "Include" }), void 0),
697
- o$1("input", { type: "text", id: "module-filter-include", value: includeValue, onInput: handleIncludeChange }, void 0)] }), void 0)] }), void 0)] }), void 0));
686
+ return (e$1("div", Object.assign({ className: "size-selector" }, { children: [e$1("input", { type: "radio", id: id, checked: sizeProp === sizeProperty, onChange: handleSizePropertyChange(sizeProp) }), e$1("label", Object.assign({ htmlFor: id }, { children: LABELS[sizeProp] }))] }), sizeProp));
687
+ }) })), e$1("div", Object.assign({ className: "module-filters" }, { children: [e$1("div", Object.assign({ className: "module-filter" }, { children: [e$1("label", Object.assign({ htmlFor: "module-filter-exclude" }, { children: "Exclude" })), e$1("input", { type: "text", id: "module-filter-exclude", value: excludeValue, onInput: handleExcludeChange, placeholder: "RegExp" })] })), e$1("div", Object.assign({ className: "module-filter" }, { children: [e$1("label", Object.assign({ htmlFor: "module-filter-include" }, { children: "Include" })), e$1("input", { type: "text", id: "module-filter-include", value: includeValue, onInput: handleIncludeChange, placeholder: "RegExp" })] }))] }))] })));
698
688
  };
699
689
 
700
690
  const throttleFilter = (callback, limit) => {
@@ -710,11 +700,11 @@ var drawChart = (function (exports) {
710
700
  };
711
701
  };
712
702
  const useFilter = () => {
713
- const [includeFilter, setIncludeFilter] = l("");
714
- const [excludeFilter, setExcludeFilter] = l("");
715
- const setIncludeFilterTrottled = d(() => throttleFilter(setIncludeFilter, 200), []);
716
- const setExcludeFilterTrottled = d(() => throttleFilter(setExcludeFilter, 200), []);
717
- const isModuleIncluded = d(() => {
703
+ const [includeFilter, setIncludeFilter] = y("");
704
+ const [excludeFilter, setExcludeFilter] = y("");
705
+ const setIncludeFilterTrottled = F(() => throttleFilter(setIncludeFilter, 200), []);
706
+ const setExcludeFilterTrottled = F(() => throttleFilter(setExcludeFilter, 200), []);
707
+ const isModuleIncluded = F(() => {
718
708
  if (includeFilter === "") {
719
709
  return () => true;
720
710
  }
@@ -726,7 +716,7 @@ var drawChart = (function (exports) {
726
716
  return () => false;
727
717
  }
728
718
  }, [includeFilter]);
729
- const isModuleExcluded = d(() => {
719
+ const isModuleExcluded = F(() => {
730
720
  if (excludeFilter === "") {
731
721
  return () => false;
732
722
  }
@@ -739,7 +729,7 @@ var drawChart = (function (exports) {
739
729
  }
740
730
  }, [excludeFilter]);
741
731
  const isDefaultInclude = includeFilter === "";
742
- const getModuleFilterMultiplier = d(() => {
732
+ const getModuleFilterMultiplier = F(() => {
743
733
  return (data) => {
744
734
  if (isDefaultInclude) {
745
735
  return isModuleExcluded(data) ? 0 : 1;
@@ -757,43 +747,60 @@ var drawChart = (function (exports) {
757
747
  };
758
748
 
759
749
  function ascending(a, b) {
760
- return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
750
+ return a == null || b == null ? NaN : a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
761
751
  }
762
752
 
763
- function bisector(f) {
764
- let delta = f;
765
- let compare = f;
753
+ function descending(a, b) {
754
+ return a == null || b == null ? NaN
755
+ : b < a ? -1
756
+ : b > a ? 1
757
+ : b >= a ? 0
758
+ : NaN;
759
+ }
766
760
 
767
- if (f.length === 1) {
761
+ function bisector(f) {
762
+ let compare1, compare2, delta;
763
+
764
+ // If an accessor is specified, promote it to a comparator. In this case we
765
+ // can test whether the search value is (self-) comparable. We can’t do this
766
+ // for a comparator (except for specific, known comparators) because we can’t
767
+ // tell if the comparator is symmetric, and an asymmetric comparator can’t be
768
+ // used to test whether a single value is comparable.
769
+ if (f.length !== 2) {
770
+ compare1 = ascending;
771
+ compare2 = (d, x) => ascending(f(d), x);
768
772
  delta = (d, x) => f(d) - x;
769
- compare = ascendingComparator(f);
770
- }
771
-
772
- function left(a, x, lo, hi) {
773
- if (lo == null) lo = 0;
774
- if (hi == null) hi = a.length;
775
- while (lo < hi) {
776
- const mid = (lo + hi) >>> 1;
777
- if (compare(a[mid], x) < 0) lo = mid + 1;
778
- else hi = mid;
773
+ } else {
774
+ compare1 = f === ascending || f === descending ? f : zero$1;
775
+ compare2 = f;
776
+ delta = f;
777
+ }
778
+
779
+ function left(a, x, lo = 0, hi = a.length) {
780
+ if (lo < hi) {
781
+ if (compare1(x, x) !== 0) return hi;
782
+ do {
783
+ const mid = (lo + hi) >>> 1;
784
+ if (compare2(a[mid], x) < 0) lo = mid + 1;
785
+ else hi = mid;
786
+ } while (lo < hi);
779
787
  }
780
788
  return lo;
781
789
  }
782
790
 
783
- function right(a, x, lo, hi) {
784
- if (lo == null) lo = 0;
785
- if (hi == null) hi = a.length;
786
- while (lo < hi) {
787
- const mid = (lo + hi) >>> 1;
788
- if (compare(a[mid], x) > 0) hi = mid;
789
- else lo = mid + 1;
791
+ function right(a, x, lo = 0, hi = a.length) {
792
+ if (lo < hi) {
793
+ if (compare1(x, x) !== 0) return hi;
794
+ do {
795
+ const mid = (lo + hi) >>> 1;
796
+ if (compare2(a[mid], x) <= 0) lo = mid + 1;
797
+ else hi = mid;
798
+ } while (lo < hi);
790
799
  }
791
800
  return lo;
792
801
  }
793
802
 
794
- function center(a, x, lo, hi) {
795
- if (lo == null) lo = 0;
796
- if (hi == null) hi = a.length;
803
+ function center(a, x, lo = 0, hi = a.length) {
797
804
  const i = left(a, x, lo, hi - 1);
798
805
  return i > lo && delta(a[i - 1], x) > -delta(a[i], x) ? i - 1 : i;
799
806
  }
@@ -801,8 +808,8 @@ var drawChart = (function (exports) {
801
808
  return {left, center, right};
802
809
  }
803
810
 
804
- function ascendingComparator(f) {
805
- return (d, x) => ascending(f(d), x);
811
+ function zero$1() {
812
+ return 0;
806
813
  }
807
814
 
808
815
  function number$1(x) {
@@ -813,31 +820,6 @@ var drawChart = (function (exports) {
813
820
  const bisectRight = ascendingBisect.right;
814
821
  bisector(number$1).center;
815
822
 
816
- function getAugmentedNamespace(n) {
817
- if (n.__esModule) return n;
818
- var a = Object.defineProperty({}, '__esModule', {value: true});
819
- Object.keys(n).forEach(function (k) {
820
- var d = Object.getOwnPropertyDescriptor(n, k);
821
- Object.defineProperty(a, k, d.get ? d : {
822
- enumerable: true,
823
- get: function () {
824
- return n[k];
825
- }
826
- });
827
- });
828
- return a;
829
- }
830
-
831
- function createCommonjsModule(fn) {
832
- var module = { exports: {} };
833
- return fn(module, module.exports), module.exports;
834
- }
835
-
836
- var internmap = createCommonjsModule(function (module, exports) {
837
- // https://github.com/mbostock/internmap/ v1.0.1 Copyright 2021 Mike Bostock
838
- (function (global, factory) {
839
- factory(exports) ;
840
- }(this, (function (exports) {
841
823
  class InternMap extends Map {
842
824
  constructor(entries, key = keyof) {
843
825
  super();
@@ -858,23 +840,6 @@ var drawChart = (function (exports) {
858
840
  }
859
841
  }
860
842
 
861
- class InternSet extends Set {
862
- constructor(values, key = keyof) {
863
- super();
864
- Object.defineProperties(this, {_intern: {value: new Map()}, _key: {value: key}});
865
- if (values != null) for (const value of values) this.add(value);
866
- }
867
- has(value) {
868
- return super.has(intern_get(this, value));
869
- }
870
- add(value) {
871
- return super.add(intern_set(this, value));
872
- }
873
- delete(value) {
874
- return super.delete(intern_delete(this, value));
875
- }
876
- }
877
-
878
843
  function intern_get({_intern, _key}, value) {
879
844
  const key = _key(value);
880
845
  return _intern.has(key) ? _intern.get(key) : value;
@@ -890,7 +855,7 @@ var drawChart = (function (exports) {
890
855
  function intern_delete({_intern, _key}, value) {
891
856
  const key = _key(value);
892
857
  if (_intern.has(key)) {
893
- value = _intern.get(value);
858
+ value = _intern.get(key);
894
859
  _intern.delete(key);
895
860
  }
896
861
  return value;
@@ -900,26 +865,18 @@ var drawChart = (function (exports) {
900
865
  return value !== null && typeof value === "object" ? value.valueOf() : value;
901
866
  }
902
867
 
903
- exports.InternMap = InternMap;
904
- exports.InternSet = InternSet;
905
-
906
- Object.defineProperty(exports, '__esModule', { value: true });
907
-
908
- })));
909
- });
910
-
911
- function identity$1(x) {
868
+ function identity$2(x) {
912
869
  return x;
913
870
  }
914
871
 
915
872
  function group(values, ...keys) {
916
- return nest(values, identity$1, identity$1, keys);
873
+ return nest(values, identity$2, identity$2, keys);
917
874
  }
918
875
 
919
876
  function nest(values, map, reduce, keys) {
920
877
  return (function regroup(values, i) {
921
878
  if (i >= keys.length) return reduce(values);
922
- const groups = new internmap.InternMap();
879
+ const groups = new InternMap();
923
880
  const keyof = keys[i++];
924
881
  let index = -1;
925
882
  for (const value of values) {
@@ -994,10 +951,10 @@ var drawChart = (function (exports) {
994
951
  const PADDING = 2;
995
952
 
996
953
  const Node = ({ node, onMouseOver, onClick, selected }) => {
997
- const { getModuleColor } = F(StaticContext);
954
+ const { getModuleColor } = q(StaticContext);
998
955
  const { backgroundColor, fontColor } = getModuleColor(node);
999
956
  const { x0, x1, y1, y0, data, children = null } = node;
1000
- const textRef = s();
957
+ const textRef = s(null);
1001
958
  const textRectRef = s();
1002
959
  const width = x1 - x0;
1003
960
  const height = y1 - y0;
@@ -1014,7 +971,7 @@ var drawChart = (function (exports) {
1014
971
  textProps.y = height / 2;
1015
972
  }
1016
973
  h(() => {
1017
- if (width == 0 || height == 0) {
974
+ if (width == 0 || height == 0 || !textRef.current) {
1018
975
  return;
1019
976
  }
1020
977
  if (textRectRef.current == null) {
@@ -1038,26 +995,25 @@ var drawChart = (function (exports) {
1038
995
  if (width == 0 || height == 0) {
1039
996
  return null;
1040
997
  }
1041
- return (o$1("g", Object.assign({ className: "node", transform: `translate(${x0},${y0})`, onClick: (event) => {
998
+ return (e$1("g", Object.assign({ className: "node", transform: `translate(${x0},${y0})`, onClick: (event) => {
1042
999
  event.stopPropagation();
1043
1000
  onClick(node);
1044
1001
  }, onMouseOver: (event) => {
1045
1002
  event.stopPropagation();
1046
1003
  onMouseOver(node);
1047
- } }, { children: [o$1("rect", { fill: backgroundColor, rx: 2, ry: 2, width: x1 - x0, height: y1 - y0, stroke: selected ? "#fff" : undefined, "stroke-width": selected ? 2 : undefined }, void 0),
1048
- o$1("text", Object.assign({ ref: textRef, fill: fontColor, onClick: (event) => {
1004
+ } }, { children: [e$1("rect", { fill: backgroundColor, rx: 2, ry: 2, width: x1 - x0, height: y1 - y0, stroke: selected ? "#fff" : undefined, "stroke-width": selected ? 2 : undefined }), e$1("text", Object.assign({ ref: textRef, fill: fontColor, onClick: (event) => {
1049
1005
  var _a;
1050
1006
  if (((_a = window.getSelection()) === null || _a === void 0 ? void 0 : _a.toString()) !== "") {
1051
1007
  event.stopPropagation();
1052
1008
  }
1053
- } }, textProps, { children: data.name }), void 0)] }), void 0));
1009
+ } }, textProps, { children: data.name }))] })));
1054
1010
  };
1055
1011
 
1056
1012
  const TreeMap = ({ root, onNodeHover, selectedNode, onNodeClick }) => {
1057
- const { width, height, getModuleIds } = F(StaticContext);
1013
+ const { width, height, getModuleIds } = q(StaticContext);
1058
1014
  console.time("layering");
1059
1015
  // this will make groups by height
1060
- const nestedData = d(() => {
1016
+ const nestedData = F(() => {
1061
1017
  const nestedDataMap = group(root.descendants(), (d) => d.height);
1062
1018
  const nestedData = Array.from(nestedDataMap, ([key, values]) => ({
1063
1019
  key,
@@ -1067,20 +1023,30 @@ var drawChart = (function (exports) {
1067
1023
  return nestedData;
1068
1024
  }, [root]);
1069
1025
  console.timeEnd("layering");
1070
- return (o$1("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: `0 0 ${width} ${height}` }, { children: nestedData.map(({ key, values }) => {
1071
- return (o$1("g", Object.assign({ className: "layer" }, { children: values.map((node) => {
1072
- return (o$1(Node, { node: node, onMouseOver: onNodeHover, selected: selectedNode === node, onClick: onNodeClick }, getModuleIds(node.data).nodeUid.id));
1026
+ return (e$1("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: `0 0 ${width} ${height}` }, { children: nestedData.map(({ key, values }) => {
1027
+ return (e$1("g", Object.assign({ className: "layer" }, { children: values.map((node) => {
1028
+ return (e$1(Node, { node: node, onMouseOver: onNodeHover, selected: selectedNode === node, onClick: onNodeClick }, getModuleIds(node.data).nodeUid.id));
1073
1029
  }) }), key));
1074
- }) }), void 0));
1030
+ }) })));
1075
1031
  };
1076
1032
 
1033
+ var bytes$1 = {exports: {}};
1034
+
1077
1035
  /*!
1078
1036
  * bytes
1079
1037
  * Copyright(c) 2012-2014 TJ Holowaychuk
1080
1038
  * Copyright(c) 2015 Jed Watson
1081
1039
  * MIT Licensed
1082
1040
  */
1083
- var format_1 = format;
1041
+
1042
+ /**
1043
+ * Module exports.
1044
+ * @public
1045
+ */
1046
+
1047
+ bytes$1.exports = bytes;
1048
+ var format_1 = bytes$1.exports.format = format$1;
1049
+ bytes$1.exports.parse = parse;
1084
1050
 
1085
1051
  /**
1086
1052
  * Module variables.
@@ -1091,7 +1057,7 @@ var drawChart = (function (exports) {
1091
1057
 
1092
1058
  var formatDecimalsRegExp = /(?:\.0*|(\.[^0]+)0+)$/;
1093
1059
 
1094
- var map = {
1060
+ var map$1 = {
1095
1061
  b: 1,
1096
1062
  kb: 1 << 10,
1097
1063
  mb: 1 << 20,
@@ -1100,6 +1066,35 @@ var drawChart = (function (exports) {
1100
1066
  pb: Math.pow(1024, 5),
1101
1067
  };
1102
1068
 
1069
+ var parseRegExp = /^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb|pb)$/i;
1070
+
1071
+ /**
1072
+ * Convert the given value in bytes into a string or parse to string to an integer in bytes.
1073
+ *
1074
+ * @param {string|number} value
1075
+ * @param {{
1076
+ * case: [string],
1077
+ * decimalPlaces: [number]
1078
+ * fixedDecimals: [boolean]
1079
+ * thousandsSeparator: [string]
1080
+ * unitSeparator: [string]
1081
+ * }} [options] bytes options.
1082
+ *
1083
+ * @returns {string|number|null}
1084
+ */
1085
+
1086
+ function bytes(value, options) {
1087
+ if (typeof value === 'string') {
1088
+ return parse(value);
1089
+ }
1090
+
1091
+ if (typeof value === 'number') {
1092
+ return format$1(value, options);
1093
+ }
1094
+
1095
+ return null;
1096
+ }
1097
+
1103
1098
  /**
1104
1099
  * Format the given value in bytes into a string.
1105
1100
  *
@@ -1118,7 +1113,7 @@ var drawChart = (function (exports) {
1118
1113
  * @public
1119
1114
  */
1120
1115
 
1121
- function format(value, options) {
1116
+ function format$1(value, options) {
1122
1117
  if (!Number.isFinite(value)) {
1123
1118
  return null;
1124
1119
  }
@@ -1130,23 +1125,23 @@ var drawChart = (function (exports) {
1130
1125
  var fixedDecimals = Boolean(options && options.fixedDecimals);
1131
1126
  var unit = (options && options.unit) || '';
1132
1127
 
1133
- if (!unit || !map[unit.toLowerCase()]) {
1134
- if (mag >= map.pb) {
1128
+ if (!unit || !map$1[unit.toLowerCase()]) {
1129
+ if (mag >= map$1.pb) {
1135
1130
  unit = 'PB';
1136
- } else if (mag >= map.tb) {
1131
+ } else if (mag >= map$1.tb) {
1137
1132
  unit = 'TB';
1138
- } else if (mag >= map.gb) {
1133
+ } else if (mag >= map$1.gb) {
1139
1134
  unit = 'GB';
1140
- } else if (mag >= map.mb) {
1135
+ } else if (mag >= map$1.mb) {
1141
1136
  unit = 'MB';
1142
- } else if (mag >= map.kb) {
1137
+ } else if (mag >= map$1.kb) {
1143
1138
  unit = 'KB';
1144
1139
  } else {
1145
1140
  unit = 'B';
1146
1141
  }
1147
1142
  }
1148
1143
 
1149
- var val = value / map[unit.toLowerCase()];
1144
+ var val = value / map$1[unit.toLowerCase()];
1150
1145
  var str = val.toFixed(decimalPlaces);
1151
1146
 
1152
1147
  if (!fixedDecimals) {
@@ -1154,22 +1149,68 @@ var drawChart = (function (exports) {
1154
1149
  }
1155
1150
 
1156
1151
  if (thousandsSeparator) {
1157
- str = str.replace(formatThousandsRegExp, thousandsSeparator);
1152
+ str = str.split('.').map(function (s, i) {
1153
+ return i === 0
1154
+ ? s.replace(formatThousandsRegExp, thousandsSeparator)
1155
+ : s
1156
+ }).join('.');
1158
1157
  }
1159
1158
 
1160
1159
  return str + unitSeparator + unit;
1161
1160
  }
1162
1161
 
1162
+ /**
1163
+ * Parse the string value into an integer in bytes.
1164
+ *
1165
+ * If no unit is given, it is assumed the value is in bytes.
1166
+ *
1167
+ * @param {number|string} val
1168
+ *
1169
+ * @returns {number|null}
1170
+ * @public
1171
+ */
1172
+
1173
+ function parse(val) {
1174
+ if (typeof val === 'number' && !isNaN(val)) {
1175
+ return val;
1176
+ }
1177
+
1178
+ if (typeof val !== 'string') {
1179
+ return null;
1180
+ }
1181
+
1182
+ // Test if the string passed is valid
1183
+ var results = parseRegExp.exec(val);
1184
+ var floatValue;
1185
+ var unit = 'b';
1186
+
1187
+ if (!results) {
1188
+ // Nothing could be extracted from the given string
1189
+ floatValue = parseInt(val, 10);
1190
+ unit = 'b';
1191
+ } else {
1192
+ // Retrieve the value and the unit
1193
+ floatValue = parseFloat(results[1]);
1194
+ unit = results[4].toLowerCase();
1195
+ }
1196
+
1197
+ if (isNaN(floatValue)) {
1198
+ return null;
1199
+ }
1200
+
1201
+ return Math.floor(map$1[unit] * floatValue);
1202
+ }
1203
+
1163
1204
  const Tooltip_marginX = 10;
1164
1205
  const Tooltip_marginY = 30;
1165
- const SOURCEMAP_RENDERED = (o$1("span", { children: [" ", o$1("b", { children: LABELS.renderedLength }, void 0), " is a number of characters in the file after individual and ", o$1("br", {}, void 0), " whole bundle transformations according to sourcemap."] }, void 0));
1166
- const RENDRED = (o$1("span", { children: [o$1("b", { children: LABELS.renderedLength }, void 0), " is a byte size of individual file after transformations and treeshake."] }, void 0));
1167
- const COMPRESSED = (o$1("span", { children: [o$1("b", { children: LABELS.gzipLength }, void 0), " and ", o$1("b", { children: LABELS.brotliLength }, void 0), " is a byte size of individual file after individual", " ", "transformations,", o$1("br", {}, void 0), " treeshake and compression."] }, void 0));
1206
+ const SOURCEMAP_RENDERED = (e$1("span", { children: [" ", e$1("b", { children: LABELS.renderedLength }), " is a number of characters in the file after individual and ", e$1("br", {}), " whole bundle transformations according to sourcemap."] }));
1207
+ const RENDRED = (e$1("span", { children: [e$1("b", { children: LABELS.renderedLength }), " is a byte size of individual file after transformations and treeshake."] }));
1208
+ const COMPRESSED = (e$1("span", { children: [e$1("b", { children: LABELS.gzipLength }), " and ", e$1("b", { children: LABELS.brotliLength }), " is a byte size of individual file after individual", " ", "transformations,", e$1("br", {}), " treeshake and compression."] }));
1168
1209
  const Tooltip = ({ node, visible, root, sizeProperty }) => {
1169
- const { availableSizeProperties, getModuleSize, data } = F(StaticContext);
1170
- const ref = s();
1171
- const [style, setStyle] = l({});
1172
- const content = d(() => {
1210
+ const { availableSizeProperties, getModuleSize, data } = q(StaticContext);
1211
+ const ref = s(null);
1212
+ const [style, setStyle] = y({});
1213
+ const content = F(() => {
1173
1214
  if (!node)
1174
1215
  return null;
1175
1216
  const mainSize = getModuleSize(node.data, sizeProperty);
@@ -1186,27 +1227,21 @@ var drawChart = (function (exports) {
1186
1227
  const mainUid = data.nodeParts[node.data.uid].mainUid;
1187
1228
  dataNode = data.nodeMetas[mainUid];
1188
1229
  }
1189
- return (o$1(y$1, { children: [o$1("div", { children: path }, void 0),
1190
- availableSizeProperties.map((sizeProp) => {
1230
+ return (e$1(p$1, { children: [e$1("div", { children: path }), availableSizeProperties.map((sizeProp) => {
1191
1231
  if (sizeProp === sizeProperty) {
1192
- return (o$1("div", { children: [o$1("b", { children: [LABELS[sizeProp], ": ", format_1(mainSize)] }, void 0), " ", "(", percentageString, ")"] }, void 0));
1232
+ return (e$1("div", { children: [e$1("b", { children: [LABELS[sizeProp], ": ", format_1(mainSize)] }), " ", "(", percentageString, ")"] }));
1193
1233
  }
1194
1234
  else {
1195
- return (o$1("div", { children: [LABELS[sizeProp], ": ", format_1(getModuleSize(node.data, sizeProp))] }, void 0));
1235
+ return (e$1("div", { children: [LABELS[sizeProp], ": ", format_1(getModuleSize(node.data, sizeProp))] }));
1196
1236
  }
1197
- }),
1198
- o$1("br", {}, void 0),
1199
- dataNode && dataNode.importedBy.length > 0 && (o$1("div", { children: [o$1("div", { children: [o$1("b", { children: "Imported By" }, void 0), ":"] }, void 0),
1200
- dataNode.importedBy.map(({ uid }) => {
1237
+ }), e$1("br", {}), dataNode && dataNode.importedBy.length > 0 && (e$1("div", { children: [e$1("div", { children: [e$1("b", { children: "Imported By" }), ":"] }), dataNode.importedBy.map(({ uid }) => {
1201
1238
  const id = data.nodeMetas[uid].id;
1202
- return o$1("div", { children: id }, id);
1203
- })] }, void 0)),
1204
- o$1("br", {}, void 0),
1205
- o$1("small", { children: data.options.sourcemap ? SOURCEMAP_RENDERED : RENDRED }, void 0),
1206
- (data.options.gzip || data.options.brotli) && (o$1(y$1, { children: [o$1("br", {}, void 0),
1207
- o$1("small", { children: COMPRESSED }, void 0)] }, void 0))] }, void 0));
1239
+ return e$1("div", { children: id }, id);
1240
+ })] })), e$1("br", {}), e$1("small", { children: data.options.sourcemap ? SOURCEMAP_RENDERED : RENDRED }), (data.options.gzip || data.options.brotli) && (e$1(p$1, { children: [e$1("br", {}), e$1("small", { children: COMPRESSED })] }))] }));
1208
1241
  }, [availableSizeProperties, data, getModuleSize, node, root.data, sizeProperty]);
1209
1242
  const updatePosition = (mouseCoords) => {
1243
+ if (!ref.current)
1244
+ return;
1210
1245
  const pos = {
1211
1246
  left: mouseCoords.x + Tooltip_marginX,
1212
1247
  top: mouseCoords.y + Tooltip_marginY,
@@ -1222,7 +1257,7 @@ var drawChart = (function (exports) {
1222
1257
  }
1223
1258
  setStyle(pos);
1224
1259
  };
1225
- y(() => {
1260
+ _(() => {
1226
1261
  const handleMouseMove = (event) => {
1227
1262
  updatePosition({
1228
1263
  x: event.pageX,
@@ -1234,13 +1269,13 @@ var drawChart = (function (exports) {
1234
1269
  document.removeEventListener("mousemove", handleMouseMove, true);
1235
1270
  };
1236
1271
  }, []);
1237
- return (o$1("div", Object.assign({ className: `tooltip ${visible ? "" : "tooltip-hidden"}`, ref: ref, style: style }, { children: content }), void 0));
1272
+ return (e$1("div", Object.assign({ className: `tooltip ${visible ? "" : "tooltip-hidden"}`, ref: ref, style: style }, { children: content })));
1238
1273
  };
1239
1274
 
1240
1275
  const Chart = ({ root, sizeProperty, selectedNode, setSelectedNode }) => {
1241
- const [showTooltip, setShowTooltip] = l(false);
1242
- const [tooltipNode, setTooltipNode] = l(undefined);
1243
- y(() => {
1276
+ const [showTooltip, setShowTooltip] = y(false);
1277
+ const [tooltipNode, setTooltipNode] = y(undefined);
1278
+ _(() => {
1244
1279
  const handleMouseOut = () => {
1245
1280
  setShowTooltip(false);
1246
1281
  };
@@ -1249,22 +1284,21 @@ var drawChart = (function (exports) {
1249
1284
  document.removeEventListener("mouseover", handleMouseOut);
1250
1285
  };
1251
1286
  }, []);
1252
- return (o$1(y$1, { children: [o$1(TreeMap, { root: root, onNodeHover: (node) => {
1287
+ return (e$1(p$1, { children: [e$1(TreeMap, { root: root, onNodeHover: (node) => {
1253
1288
  setTooltipNode(node);
1254
1289
  setShowTooltip(true);
1255
1290
  }, selectedNode: selectedNode, onNodeClick: (node) => {
1256
1291
  setSelectedNode(selectedNode === node ? undefined : node);
1257
- } }, void 0),
1258
- o$1(Tooltip, { visible: showTooltip, node: tooltipNode, root: root, sizeProperty: sizeProperty }, void 0)] }, void 0));
1292
+ } }), e$1(Tooltip, { visible: showTooltip, node: tooltipNode, root: root, sizeProperty: sizeProperty })] }));
1259
1293
  };
1260
1294
 
1261
1295
  const Main = () => {
1262
- const { availableSizeProperties, rawHierarchy, getModuleSize, layout, data } = F(StaticContext);
1263
- const [sizeProperty, setSizeProperty] = l(availableSizeProperties[0]);
1264
- const [selectedNode, setSelectedNode] = l(undefined);
1296
+ const { availableSizeProperties, rawHierarchy, getModuleSize, layout, data } = q(StaticContext);
1297
+ const [sizeProperty, setSizeProperty] = y(availableSizeProperties[0]);
1298
+ const [selectedNode, setSelectedNode] = y(undefined);
1265
1299
  const { getModuleFilterMultiplier, setExcludeFilter, setIncludeFilter } = useFilter();
1266
1300
  console.time("getNodeSizeMultiplier");
1267
- const getNodeSizeMultiplier = d(() => {
1301
+ const getNodeSizeMultiplier = F(() => {
1268
1302
  const rootSize = getModuleSize(rawHierarchy.data, sizeProperty);
1269
1303
  const selectedSize = selectedNode ? getModuleSize(selectedNode.data, sizeProperty) : 1;
1270
1304
  const multiplier = rootSize * 0.2 > selectedSize ? (rootSize * 0.2) / selectedSize : 3;
@@ -1292,7 +1326,7 @@ var drawChart = (function (exports) {
1292
1326
  console.timeEnd("getNodeSizeMultiplier");
1293
1327
  console.time("root hierarchy compute");
1294
1328
  // root here always be the same as rawHierarchy even after layouting
1295
- const root = d(() => {
1329
+ const root = F(() => {
1296
1330
  const rootWithSizesAndSorted = rawHierarchy
1297
1331
  .sum((node) => {
1298
1332
  if (isModuleTree(node))
@@ -1306,8 +1340,7 @@ var drawChart = (function (exports) {
1306
1340
  return layout(rootWithSizesAndSorted);
1307
1341
  }, [data, getModuleFilterMultiplier, getModuleSize, getNodeSizeMultiplier, layout, rawHierarchy, sizeProperty]);
1308
1342
  console.timeEnd("root hierarchy compute");
1309
- return (o$1(y$1, { children: [o$1(SideBar, { sizeProperty: sizeProperty, availableSizeProperties: availableSizeProperties, setSizeProperty: setSizeProperty, onExcludeChange: setExcludeFilter, onIncludeChange: setIncludeFilter }, void 0),
1310
- o$1(Chart, { root: root, sizeProperty: sizeProperty, selectedNode: selectedNode, setSelectedNode: setSelectedNode }, void 0)] }, void 0));
1343
+ return (e$1(p$1, { children: [e$1(SideBar, { sizeProperty: sizeProperty, availableSizeProperties: availableSizeProperties, setSizeProperty: setSizeProperty, onExcludeChange: setExcludeFilter, onIncludeChange: setIncludeFilter }), e$1(Chart, { root: root, sizeProperty: sizeProperty, selectedNode: selectedNode, setSelectedNode: setSelectedNode })] }));
1311
1344
  };
1312
1345
 
1313
1346
  function initRange(domain, range) {
@@ -1354,15 +1387,15 @@ var drawChart = (function (exports) {
1354
1387
  var brighter = 1 / darker;
1355
1388
 
1356
1389
  var reI = "\\s*([+-]?\\d+)\\s*",
1357
- reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",
1358
- reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",
1390
+ reN = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",
1391
+ reP = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",
1359
1392
  reHex = /^#([0-9a-f]{3,8})$/,
1360
- reRgbInteger = new RegExp("^rgb\\(" + [reI, reI, reI] + "\\)$"),
1361
- reRgbPercent = new RegExp("^rgb\\(" + [reP, reP, reP] + "\\)$"),
1362
- reRgbaInteger = new RegExp("^rgba\\(" + [reI, reI, reI, reN] + "\\)$"),
1363
- reRgbaPercent = new RegExp("^rgba\\(" + [reP, reP, reP, reN] + "\\)$"),
1364
- reHslPercent = new RegExp("^hsl\\(" + [reN, reP, reP] + "\\)$"),
1365
- reHslaPercent = new RegExp("^hsla\\(" + [reN, reP, reP, reN] + "\\)$");
1393
+ reRgbInteger = new RegExp(`^rgb\\(${reI},${reI},${reI}\\)$`),
1394
+ reRgbPercent = new RegExp(`^rgb\\(${reP},${reP},${reP}\\)$`),
1395
+ reRgbaInteger = new RegExp(`^rgba\\(${reI},${reI},${reI},${reN}\\)$`),
1396
+ reRgbaPercent = new RegExp(`^rgba\\(${reP},${reP},${reP},${reN}\\)$`),
1397
+ reHslPercent = new RegExp(`^hsl\\(${reN},${reP},${reP}\\)$`),
1398
+ reHslaPercent = new RegExp(`^hsla\\(${reN},${reP},${reP},${reN}\\)$`);
1366
1399
 
1367
1400
  var named = {
1368
1401
  aliceblue: 0xf0f8ff,
@@ -1516,14 +1549,15 @@ var drawChart = (function (exports) {
1516
1549
  };
1517
1550
 
1518
1551
  define(Color, color, {
1519
- copy: function(channels) {
1552
+ copy(channels) {
1520
1553
  return Object.assign(new this.constructor, this, channels);
1521
1554
  },
1522
- displayable: function() {
1555
+ displayable() {
1523
1556
  return this.rgb().displayable();
1524
1557
  },
1525
1558
  hex: color_formatHex, // Deprecated! Use color.formatHex.
1526
1559
  formatHex: color_formatHex,
1560
+ formatHex8: color_formatHex8,
1527
1561
  formatHsl: color_formatHsl,
1528
1562
  formatRgb: color_formatRgb,
1529
1563
  toString: color_formatRgb
@@ -1533,6 +1567,10 @@ var drawChart = (function (exports) {
1533
1567
  return this.rgb().formatHex();
1534
1568
  }
1535
1569
 
1570
+ function color_formatHex8() {
1571
+ return this.rgb().formatHex8();
1572
+ }
1573
+
1536
1574
  function color_formatHsl() {
1537
1575
  return hslConvert(this).formatHsl();
1538
1576
  }
@@ -1576,7 +1614,7 @@ var drawChart = (function (exports) {
1576
1614
  return new Rgb(o.r, o.g, o.b, o.opacity);
1577
1615
  }
1578
1616
 
1579
- function rgb(r, g, b, opacity) {
1617
+ function rgb$1(r, g, b, opacity) {
1580
1618
  return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);
1581
1619
  }
1582
1620
 
@@ -1587,19 +1625,22 @@ var drawChart = (function (exports) {
1587
1625
  this.opacity = +opacity;
1588
1626
  }
1589
1627
 
1590
- define(Rgb, rgb, extend(Color, {
1591
- brighter: function(k) {
1628
+ define(Rgb, rgb$1, extend(Color, {
1629
+ brighter(k) {
1592
1630
  k = k == null ? brighter : Math.pow(brighter, k);
1593
1631
  return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
1594
1632
  },
1595
- darker: function(k) {
1633
+ darker(k) {
1596
1634
  k = k == null ? darker : Math.pow(darker, k);
1597
1635
  return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
1598
1636
  },
1599
- rgb: function() {
1637
+ rgb() {
1600
1638
  return this;
1601
1639
  },
1602
- displayable: function() {
1640
+ clamp() {
1641
+ return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity));
1642
+ },
1643
+ displayable() {
1603
1644
  return (-0.5 <= this.r && this.r < 255.5)
1604
1645
  && (-0.5 <= this.g && this.g < 255.5)
1605
1646
  && (-0.5 <= this.b && this.b < 255.5)
@@ -1607,25 +1648,34 @@ var drawChart = (function (exports) {
1607
1648
  },
1608
1649
  hex: rgb_formatHex, // Deprecated! Use color.formatHex.
1609
1650
  formatHex: rgb_formatHex,
1651
+ formatHex8: rgb_formatHex8,
1610
1652
  formatRgb: rgb_formatRgb,
1611
1653
  toString: rgb_formatRgb
1612
1654
  }));
1613
1655
 
1614
1656
  function rgb_formatHex() {
1615
- return "#" + hex(this.r) + hex(this.g) + hex(this.b);
1657
+ return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}`;
1658
+ }
1659
+
1660
+ function rgb_formatHex8() {
1661
+ return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
1616
1662
  }
1617
1663
 
1618
1664
  function rgb_formatRgb() {
1619
- var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
1620
- return (a === 1 ? "rgb(" : "rgba(")
1621
- + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", "
1622
- + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", "
1623
- + Math.max(0, Math.min(255, Math.round(this.b) || 0))
1624
- + (a === 1 ? ")" : ", " + a + ")");
1665
+ const a = clampa(this.opacity);
1666
+ return `${a === 1 ? "rgb(" : "rgba("}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${a === 1 ? ")" : `, ${a})`}`;
1667
+ }
1668
+
1669
+ function clampa(opacity) {
1670
+ return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity));
1671
+ }
1672
+
1673
+ function clampi(value) {
1674
+ return Math.max(0, Math.min(255, Math.round(value) || 0));
1625
1675
  }
1626
1676
 
1627
1677
  function hex(value) {
1628
- value = Math.max(0, Math.min(255, Math.round(value) || 0));
1678
+ value = clampi(value);
1629
1679
  return (value < 16 ? "0" : "") + value.toString(16);
1630
1680
  }
1631
1681
 
@@ -1674,15 +1724,15 @@ var drawChart = (function (exports) {
1674
1724
  }
1675
1725
 
1676
1726
  define(Hsl, hsl, extend(Color, {
1677
- brighter: function(k) {
1727
+ brighter(k) {
1678
1728
  k = k == null ? brighter : Math.pow(brighter, k);
1679
1729
  return new Hsl(this.h, this.s, this.l * k, this.opacity);
1680
1730
  },
1681
- darker: function(k) {
1731
+ darker(k) {
1682
1732
  k = k == null ? darker : Math.pow(darker, k);
1683
1733
  return new Hsl(this.h, this.s, this.l * k, this.opacity);
1684
1734
  },
1685
- rgb: function() {
1735
+ rgb() {
1686
1736
  var h = this.h % 360 + (this.h < 0) * 360,
1687
1737
  s = isNaN(h) || isNaN(this.s) ? 0 : this.s,
1688
1738
  l = this.l,
@@ -1695,21 +1745,29 @@ var drawChart = (function (exports) {
1695
1745
  this.opacity
1696
1746
  );
1697
1747
  },
1698
- displayable: function() {
1748
+ clamp() {
1749
+ return new Hsl(clamph(this.h), clampt(this.s), clampt(this.l), clampa(this.opacity));
1750
+ },
1751
+ displayable() {
1699
1752
  return (0 <= this.s && this.s <= 1 || isNaN(this.s))
1700
1753
  && (0 <= this.l && this.l <= 1)
1701
1754
  && (0 <= this.opacity && this.opacity <= 1);
1702
1755
  },
1703
- formatHsl: function() {
1704
- var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
1705
- return (a === 1 ? "hsl(" : "hsla(")
1706
- + (this.h || 0) + ", "
1707
- + (this.s || 0) * 100 + "%, "
1708
- + (this.l || 0) * 100 + "%"
1709
- + (a === 1 ? ")" : ", " + a + ")");
1756
+ formatHsl() {
1757
+ const a = clampa(this.opacity);
1758
+ return `${a === 1 ? "hsl(" : "hsla("}${clamph(this.h)}, ${clampt(this.s) * 100}%, ${clampt(this.l) * 100}%${a === 1 ? ")" : `, ${a})`}`;
1710
1759
  }
1711
1760
  }));
1712
1761
 
1762
+ function clamph(value) {
1763
+ value = (value || 0) % 360;
1764
+ return value < 0 ? value + 360 : value;
1765
+ }
1766
+
1767
+ function clampt(value) {
1768
+ return Math.max(0, Math.min(1, value || 0));
1769
+ }
1770
+
1713
1771
  /* From FvD 13.37, CSS Color Module Level 3 */
1714
1772
  function hsl2rgb(h, m1, m2) {
1715
1773
  return (h < 60 ? m1 + (m2 - m1) * h / 60
@@ -1726,10 +1784,10 @@ var drawChart = (function (exports) {
1726
1784
  Xn = 0.96422,
1727
1785
  Yn = 1,
1728
1786
  Zn = 0.82521,
1729
- t0 = 4 / 29,
1730
- t1 = 6 / 29,
1731
- t2 = 3 * t1 * t1,
1732
- t3 = t1 * t1 * t1;
1787
+ t0$1 = 4 / 29,
1788
+ t1$1 = 6 / 29,
1789
+ t2 = 3 * t1$1 * t1$1,
1790
+ t3 = t1$1 * t1$1 * t1$1;
1733
1791
 
1734
1792
  function labConvert(o) {
1735
1793
  if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity);
@@ -1746,10 +1804,6 @@ var drawChart = (function (exports) {
1746
1804
  return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity);
1747
1805
  }
1748
1806
 
1749
- function gray(l, opacity) {
1750
- return new Lab(l, 0, 0, opacity == null ? 1 : opacity);
1751
- }
1752
-
1753
1807
  function lab(l, a, b, opacity) {
1754
1808
  return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity);
1755
1809
  }
@@ -1762,13 +1816,13 @@ var drawChart = (function (exports) {
1762
1816
  }
1763
1817
 
1764
1818
  define(Lab, lab, extend(Color, {
1765
- brighter: function(k) {
1819
+ brighter(k) {
1766
1820
  return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity);
1767
1821
  },
1768
- darker: function(k) {
1822
+ darker(k) {
1769
1823
  return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity);
1770
1824
  },
1771
- rgb: function() {
1825
+ rgb() {
1772
1826
  var y = (this.l + 16) / 116,
1773
1827
  x = isNaN(this.a) ? y : y + this.a / 500,
1774
1828
  z = isNaN(this.b) ? y : y - this.b / 200;
@@ -1785,11 +1839,11 @@ var drawChart = (function (exports) {
1785
1839
  }));
1786
1840
 
1787
1841
  function xyz2lab(t) {
1788
- return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;
1842
+ return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0$1;
1789
1843
  }
1790
1844
 
1791
1845
  function lab2xyz(t) {
1792
- return t > t1 ? t * t * t : t2 * (t - t0);
1846
+ return t > t1$1 ? t * t * t : t2 * (t - t0$1);
1793
1847
  }
1794
1848
 
1795
1849
  function lrgb2rgb(x) {
@@ -1808,10 +1862,6 @@ var drawChart = (function (exports) {
1808
1862
  return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity);
1809
1863
  }
1810
1864
 
1811
- function lch(l, c, h, opacity) {
1812
- return arguments.length === 1 ? hclConvert(l) : new Hcl(h, c, l, opacity == null ? 1 : opacity);
1813
- }
1814
-
1815
1865
  function hcl(h, c, l, opacity) {
1816
1866
  return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity);
1817
1867
  }
@@ -1830,13 +1880,13 @@ var drawChart = (function (exports) {
1830
1880
  }
1831
1881
 
1832
1882
  define(Hcl, hcl, extend(Color, {
1833
- brighter: function(k) {
1883
+ brighter(k) {
1834
1884
  return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity);
1835
1885
  },
1836
- darker: function(k) {
1886
+ darker(k) {
1837
1887
  return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity);
1838
1888
  },
1839
- rgb: function() {
1889
+ rgb() {
1840
1890
  return hcl2lab(this).rgb();
1841
1891
  }
1842
1892
  }));
@@ -1864,7 +1914,7 @@ var drawChart = (function (exports) {
1864
1914
  return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity);
1865
1915
  }
1866
1916
 
1867
- function cubehelix(h, s, l, opacity) {
1917
+ function cubehelix$1(h, s, l, opacity) {
1868
1918
  return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity);
1869
1919
  }
1870
1920
 
@@ -1875,16 +1925,16 @@ var drawChart = (function (exports) {
1875
1925
  this.opacity = +opacity;
1876
1926
  }
1877
1927
 
1878
- define(Cubehelix, cubehelix, extend(Color, {
1879
- brighter: function(k) {
1928
+ define(Cubehelix, cubehelix$1, extend(Color, {
1929
+ brighter(k) {
1880
1930
  k = k == null ? brighter : Math.pow(brighter, k);
1881
1931
  return new Cubehelix(this.h, this.s, this.l * k, this.opacity);
1882
1932
  },
1883
- darker: function(k) {
1933
+ darker(k) {
1884
1934
  k = k == null ? darker : Math.pow(darker, k);
1885
1935
  return new Cubehelix(this.h, this.s, this.l * k, this.opacity);
1886
1936
  },
1887
- rgb: function() {
1937
+ rgb() {
1888
1938
  var h = isNaN(this.h) ? 0 : (this.h + 120) * radians,
1889
1939
  l = +this.l,
1890
1940
  a = isNaN(this.s) ? 0 : this.s * l * (1 - l),
@@ -1899,60 +1949,9 @@ var drawChart = (function (exports) {
1899
1949
  }
1900
1950
  }));
1901
1951
 
1902
- var src = /*#__PURE__*/Object.freeze({
1903
- __proto__: null,
1904
- color: color,
1905
- rgb: rgb,
1906
- hsl: hsl,
1907
- lab: lab,
1908
- hcl: hcl,
1909
- lch: lch,
1910
- gray: gray,
1911
- cubehelix: cubehelix
1912
- });
1913
-
1914
- var require$$0 = /*@__PURE__*/getAugmentedNamespace(src);
1915
-
1916
- var d3Interpolate = createCommonjsModule(function (module, exports) {
1917
- // https://d3js.org/d3-interpolate/ v2.0.1 Copyright 2020 Mike Bostock
1918
- (function (global, factory) {
1919
- factory(exports, require$$0) ;
1920
- }(this, function (exports, d3Color) {
1921
- function basis(t1, v0, v1, v2, v3) {
1922
- var t2 = t1 * t1, t3 = t2 * t1;
1923
- return ((1 - 3 * t1 + 3 * t2 - t3) * v0
1924
- + (4 - 6 * t2 + 3 * t3) * v1
1925
- + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2
1926
- + t3 * v3) / 6;
1927
- }
1928
-
1929
- function basis$1(values) {
1930
- var n = values.length - 1;
1931
- return function(t) {
1932
- var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n),
1933
- v1 = values[i],
1934
- v2 = values[i + 1],
1935
- v0 = i > 0 ? values[i - 1] : 2 * v1 - v2,
1936
- v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;
1937
- return basis((t - i / n) * n, v0, v1, v2, v3);
1938
- };
1939
- }
1940
-
1941
- function basisClosed(values) {
1942
- var n = values.length;
1943
- return function(t) {
1944
- var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n),
1945
- v0 = values[(i + n - 1) % n],
1946
- v1 = values[i % n],
1947
- v2 = values[(i + 1) % n],
1948
- v3 = values[(i + 2) % n];
1949
- return basis((t - i / n) * n, v0, v1, v2, v3);
1950
- };
1951
- }
1952
-
1953
1952
  var constant = x => () => x;
1954
1953
 
1955
- function linear(a, d) {
1954
+ function linear$1(a, d) {
1956
1955
  return function(t) {
1957
1956
  return a + t * d;
1958
1957
  };
@@ -1966,7 +1965,7 @@ var drawChart = (function (exports) {
1966
1965
 
1967
1966
  function hue(a, b) {
1968
1967
  var d = b - a;
1969
- return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant(isNaN(a) ? b : a);
1968
+ return d ? linear$1(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant(isNaN(a) ? b : a);
1970
1969
  }
1971
1970
 
1972
1971
  function gamma(y) {
@@ -1977,14 +1976,14 @@ var drawChart = (function (exports) {
1977
1976
 
1978
1977
  function nogamma(a, b) {
1979
1978
  var d = b - a;
1980
- return d ? linear(a, d) : constant(isNaN(a) ? b : a);
1979
+ return d ? linear$1(a, d) : constant(isNaN(a) ? b : a);
1981
1980
  }
1982
1981
 
1983
1982
  var rgb = (function rgbGamma(y) {
1984
1983
  var color = gamma(y);
1985
1984
 
1986
1985
  function rgb(start, end) {
1987
- var r = color((start = d3Color.rgb(start)).r, (end = d3Color.rgb(end)).r),
1986
+ var r = color((start = rgb$1(start)).r, (end = rgb$1(end)).r),
1988
1987
  g = color(start.g, end.g),
1989
1988
  b = color(start.b, end.b),
1990
1989
  opacity = nogamma(start.opacity, end.opacity);
@@ -2002,35 +2001,6 @@ var drawChart = (function (exports) {
2002
2001
  return rgb;
2003
2002
  })(1);
2004
2003
 
2005
- function rgbSpline(spline) {
2006
- return function(colors) {
2007
- var n = colors.length,
2008
- r = new Array(n),
2009
- g = new Array(n),
2010
- b = new Array(n),
2011
- i, color;
2012
- for (i = 0; i < n; ++i) {
2013
- color = d3Color.rgb(colors[i]);
2014
- r[i] = color.r || 0;
2015
- g[i] = color.g || 0;
2016
- b[i] = color.b || 0;
2017
- }
2018
- r = spline(r);
2019
- g = spline(g);
2020
- b = spline(b);
2021
- color.opacity = 1;
2022
- return function(t) {
2023
- color.r = r(t);
2024
- color.g = g(t);
2025
- color.b = b(t);
2026
- return color + "";
2027
- };
2028
- };
2029
- }
2030
-
2031
- var rgbBasis = rgbSpline(basis$1);
2032
- var rgbBasisClosed = rgbSpline(basisClosed);
2033
-
2034
2004
  function numberArray(a, b) {
2035
2005
  if (!b) b = [];
2036
2006
  var n = a ? Math.min(b.length, a.length) : 0,
@@ -2046,10 +2016,6 @@ var drawChart = (function (exports) {
2046
2016
  return ArrayBuffer.isView(x) && !(x instanceof DataView);
2047
2017
  }
2048
2018
 
2049
- function array(a, b) {
2050
- return (isNumberArray(b) ? numberArray : genericArray)(a, b);
2051
- }
2052
-
2053
2019
  function genericArray(a, b) {
2054
2020
  var nb = b ? b.length : 0,
2055
2021
  na = a ? Math.min(nb, a.length) : 0,
@@ -2057,7 +2023,7 @@ var drawChart = (function (exports) {
2057
2023
  c = new Array(nb),
2058
2024
  i;
2059
2025
 
2060
- for (i = 0; i < na; ++i) x[i] = value(a[i], b[i]);
2026
+ for (i = 0; i < na; ++i) x[i] = interpolate(a[i], b[i]);
2061
2027
  for (; i < nb; ++i) c[i] = b[i];
2062
2028
 
2063
2029
  return function(t) {
@@ -2073,7 +2039,7 @@ var drawChart = (function (exports) {
2073
2039
  };
2074
2040
  }
2075
2041
 
2076
- function number(a, b) {
2042
+ function interpolateNumber(a, b) {
2077
2043
  return a = +a, b = +b, function(t) {
2078
2044
  return a * (1 - t) + b * t;
2079
2045
  };
@@ -2089,7 +2055,7 @@ var drawChart = (function (exports) {
2089
2055
 
2090
2056
  for (k in b) {
2091
2057
  if (k in a) {
2092
- i[k] = value(a[k], b[k]);
2058
+ i[k] = interpolate(a[k], b[k]);
2093
2059
  } else {
2094
2060
  c[k] = b[k];
2095
2061
  }
@@ -2141,7 +2107,7 @@ var drawChart = (function (exports) {
2141
2107
  else s[++i] = bm;
2142
2108
  } else { // interpolate non-matching numbers
2143
2109
  s[++i] = null;
2144
- q.push({i: i, x: number(am, bm)});
2110
+ q.push({i: i, x: interpolateNumber(am, bm)});
2145
2111
  }
2146
2112
  bi = reB.lastIndex;
2147
2113
  }
@@ -2164,145 +2130,25 @@ var drawChart = (function (exports) {
2164
2130
  });
2165
2131
  }
2166
2132
 
2167
- function value(a, b) {
2133
+ function interpolate(a, b) {
2168
2134
  var t = typeof b, c;
2169
2135
  return b == null || t === "boolean" ? constant(b)
2170
- : (t === "number" ? number
2171
- : t === "string" ? ((c = d3Color.color(b)) ? (b = c, rgb) : string)
2172
- : b instanceof d3Color.color ? rgb
2136
+ : (t === "number" ? interpolateNumber
2137
+ : t === "string" ? ((c = color(b)) ? (b = c, rgb) : string)
2138
+ : b instanceof color ? rgb
2173
2139
  : b instanceof Date ? date
2174
2140
  : isNumberArray(b) ? numberArray
2175
2141
  : Array.isArray(b) ? genericArray
2176
2142
  : typeof b.valueOf !== "function" && typeof b.toString !== "function" || isNaN(b) ? object
2177
- : number)(a, b);
2143
+ : interpolateNumber)(a, b);
2178
2144
  }
2179
2145
 
2180
- function discrete(range) {
2181
- var n = range.length;
2182
- return function(t) {
2183
- return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))];
2184
- };
2185
- }
2186
-
2187
- function hue$1(a, b) {
2188
- var i = hue(+a, +b);
2189
- return function(t) {
2190
- var x = i(t);
2191
- return x - 360 * Math.floor(x / 360);
2192
- };
2193
- }
2194
-
2195
- function round(a, b) {
2146
+ function interpolateRound(a, b) {
2196
2147
  return a = +a, b = +b, function(t) {
2197
2148
  return Math.round(a * (1 - t) + b * t);
2198
2149
  };
2199
2150
  }
2200
2151
 
2201
- var degrees = 180 / Math.PI;
2202
-
2203
- var identity = {
2204
- translateX: 0,
2205
- translateY: 0,
2206
- rotate: 0,
2207
- skewX: 0,
2208
- scaleX: 1,
2209
- scaleY: 1
2210
- };
2211
-
2212
- function decompose(a, b, c, d, e, f) {
2213
- var scaleX, scaleY, skewX;
2214
- if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX;
2215
- if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX;
2216
- if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY;
2217
- if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;
2218
- return {
2219
- translateX: e,
2220
- translateY: f,
2221
- rotate: Math.atan2(b, a) * degrees,
2222
- skewX: Math.atan(skewX) * degrees,
2223
- scaleX: scaleX,
2224
- scaleY: scaleY
2225
- };
2226
- }
2227
-
2228
- var svgNode;
2229
-
2230
- /* eslint-disable no-undef */
2231
- function parseCss(value) {
2232
- const m = new (typeof DOMMatrix === "function" ? DOMMatrix : WebKitCSSMatrix)(value + "");
2233
- return m.isIdentity ? identity : decompose(m.a, m.b, m.c, m.d, m.e, m.f);
2234
- }
2235
-
2236
- function parseSvg(value) {
2237
- if (value == null) return identity;
2238
- if (!svgNode) svgNode = document.createElementNS("http://www.w3.org/2000/svg", "g");
2239
- svgNode.setAttribute("transform", value);
2240
- if (!(value = svgNode.transform.baseVal.consolidate())) return identity;
2241
- value = value.matrix;
2242
- return decompose(value.a, value.b, value.c, value.d, value.e, value.f);
2243
- }
2244
-
2245
- function interpolateTransform(parse, pxComma, pxParen, degParen) {
2246
-
2247
- function pop(s) {
2248
- return s.length ? s.pop() + " " : "";
2249
- }
2250
-
2251
- function translate(xa, ya, xb, yb, s, q) {
2252
- if (xa !== xb || ya !== yb) {
2253
- var i = s.push("translate(", null, pxComma, null, pxParen);
2254
- q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)});
2255
- } else if (xb || yb) {
2256
- s.push("translate(" + xb + pxComma + yb + pxParen);
2257
- }
2258
- }
2259
-
2260
- function rotate(a, b, s, q) {
2261
- if (a !== b) {
2262
- if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path
2263
- q.push({i: s.push(pop(s) + "rotate(", null, degParen) - 2, x: number(a, b)});
2264
- } else if (b) {
2265
- s.push(pop(s) + "rotate(" + b + degParen);
2266
- }
2267
- }
2268
-
2269
- function skewX(a, b, s, q) {
2270
- if (a !== b) {
2271
- q.push({i: s.push(pop(s) + "skewX(", null, degParen) - 2, x: number(a, b)});
2272
- } else if (b) {
2273
- s.push(pop(s) + "skewX(" + b + degParen);
2274
- }
2275
- }
2276
-
2277
- function scale(xa, ya, xb, yb, s, q) {
2278
- if (xa !== xb || ya !== yb) {
2279
- var i = s.push(pop(s) + "scale(", null, ",", null, ")");
2280
- q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)});
2281
- } else if (xb !== 1 || yb !== 1) {
2282
- s.push(pop(s) + "scale(" + xb + "," + yb + ")");
2283
- }
2284
- }
2285
-
2286
- return function(a, b) {
2287
- var s = [], // string constants and placeholders
2288
- q = []; // number interpolators
2289
- a = parse(a), b = parse(b);
2290
- translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q);
2291
- rotate(a.rotate, b.rotate, s, q);
2292
- skewX(a.skewX, b.skewX, s, q);
2293
- scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q);
2294
- a = b = null; // gc
2295
- return function(t) {
2296
- var i = -1, n = q.length, o;
2297
- while (++i < n) s[(o = q[i]).i] = o.x(t);
2298
- return s.join("");
2299
- };
2300
- };
2301
- }
2302
-
2303
- var interpolateTransformCss = interpolateTransform(parseCss, "px, ", "px)", "deg)");
2304
- var interpolateTransformSvg = interpolateTransform(parseSvg, ", ", ")", ")");
2305
-
2306
2152
  var epsilon2 = 1e-12;
2307
2153
 
2308
2154
  function cosh(x) {
@@ -2317,7 +2163,7 @@ var drawChart = (function (exports) {
2317
2163
  return ((x = Math.exp(2 * x)) - 1) / (x + 1);
2318
2164
  }
2319
2165
 
2320
- var zoom = (function zoomRho(rho, rho2, rho4) {
2166
+ ((function zoomRho(rho, rho2, rho4) {
2321
2167
 
2322
2168
  // p0 = [ux0, uy0, w0]
2323
2169
  // p1 = [ux1, uy1, w1]
@@ -2373,66 +2219,14 @@ var drawChart = (function (exports) {
2373
2219
  };
2374
2220
 
2375
2221
  return zoom;
2376
- })(Math.SQRT2, 2, 4);
2377
-
2378
- function hsl(hue) {
2379
- return function(start, end) {
2380
- var h = hue((start = d3Color.hsl(start)).h, (end = d3Color.hsl(end)).h),
2381
- s = nogamma(start.s, end.s),
2382
- l = nogamma(start.l, end.l),
2383
- opacity = nogamma(start.opacity, end.opacity);
2384
- return function(t) {
2385
- start.h = h(t);
2386
- start.s = s(t);
2387
- start.l = l(t);
2388
- start.opacity = opacity(t);
2389
- return start + "";
2390
- };
2391
- }
2392
- }
2393
-
2394
- var hsl$1 = hsl(hue);
2395
- var hslLong = hsl(nogamma);
2396
-
2397
- function lab(start, end) {
2398
- var l = nogamma((start = d3Color.lab(start)).l, (end = d3Color.lab(end)).l),
2399
- a = nogamma(start.a, end.a),
2400
- b = nogamma(start.b, end.b),
2401
- opacity = nogamma(start.opacity, end.opacity);
2402
- return function(t) {
2403
- start.l = l(t);
2404
- start.a = a(t);
2405
- start.b = b(t);
2406
- start.opacity = opacity(t);
2407
- return start + "";
2408
- };
2409
- }
2410
-
2411
- function hcl(hue) {
2412
- return function(start, end) {
2413
- var h = hue((start = d3Color.hcl(start)).h, (end = d3Color.hcl(end)).h),
2414
- c = nogamma(start.c, end.c),
2415
- l = nogamma(start.l, end.l),
2416
- opacity = nogamma(start.opacity, end.opacity);
2417
- return function(t) {
2418
- start.h = h(t);
2419
- start.c = c(t);
2420
- start.l = l(t);
2421
- start.opacity = opacity(t);
2422
- return start + "";
2423
- };
2424
- }
2425
- }
2426
-
2427
- var hcl$1 = hcl(hue);
2428
- var hclLong = hcl(nogamma);
2222
+ }))(Math.SQRT2, 2, 4);
2429
2223
 
2430
2224
  function cubehelix(hue) {
2431
2225
  return (function cubehelixGamma(y) {
2432
2226
  y = +y;
2433
2227
 
2434
2228
  function cubehelix(start, end) {
2435
- var h = hue((start = d3Color.cubehelix(start)).h, (end = d3Color.cubehelix(end)).h),
2229
+ var h = hue((start = cubehelix$1(start)).h, (end = cubehelix$1(end)).h),
2436
2230
  s = nogamma(start.s, end.s),
2437
2231
  l = nogamma(start.l, end.l),
2438
2232
  opacity = nogamma(start.opacity, end.opacity);
@@ -2451,57 +2245,8 @@ var drawChart = (function (exports) {
2451
2245
  })(1);
2452
2246
  }
2453
2247
 
2454
- var cubehelix$1 = cubehelix(hue);
2455
- var cubehelixLong = cubehelix(nogamma);
2456
-
2457
- function piecewise(interpolate, values) {
2458
- if (values === undefined) values = interpolate, interpolate = value;
2459
- var i = 0, n = values.length - 1, v = values[0], I = new Array(n < 0 ? 0 : n);
2460
- while (i < n) I[i] = interpolate(v, v = values[++i]);
2461
- return function(t) {
2462
- var i = Math.max(0, Math.min(n - 1, Math.floor(t *= n)));
2463
- return I[i](t - i);
2464
- };
2465
- }
2466
-
2467
- function quantize(interpolator, n) {
2468
- var samples = new Array(n);
2469
- for (var i = 0; i < n; ++i) samples[i] = interpolator(i / (n - 1));
2470
- return samples;
2471
- }
2472
-
2473
- exports.interpolate = value;
2474
- exports.interpolateArray = array;
2475
- exports.interpolateBasis = basis$1;
2476
- exports.interpolateBasisClosed = basisClosed;
2477
- exports.interpolateCubehelix = cubehelix$1;
2478
- exports.interpolateCubehelixLong = cubehelixLong;
2479
- exports.interpolateDate = date;
2480
- exports.interpolateDiscrete = discrete;
2481
- exports.interpolateHcl = hcl$1;
2482
- exports.interpolateHclLong = hclLong;
2483
- exports.interpolateHsl = hsl$1;
2484
- exports.interpolateHslLong = hslLong;
2485
- exports.interpolateHue = hue$1;
2486
- exports.interpolateLab = lab;
2487
- exports.interpolateNumber = number;
2488
- exports.interpolateNumberArray = numberArray;
2489
- exports.interpolateObject = object;
2490
- exports.interpolateRgb = rgb;
2491
- exports.interpolateRgbBasis = rgbBasis;
2492
- exports.interpolateRgbBasisClosed = rgbBasisClosed;
2493
- exports.interpolateRound = round;
2494
- exports.interpolateString = string;
2495
- exports.interpolateTransformCss = interpolateTransformCss;
2496
- exports.interpolateTransformSvg = interpolateTransformSvg;
2497
- exports.interpolateZoom = zoom;
2498
- exports.piecewise = piecewise;
2499
- exports.quantize = quantize;
2500
-
2501
- Object.defineProperty(exports, '__esModule', { value: true });
2502
-
2503
- }));
2504
- });
2248
+ cubehelix(hue);
2249
+ cubehelix(nogamma);
2505
2250
 
2506
2251
  function constants(x) {
2507
2252
  return function() {
@@ -2515,7 +2260,7 @@ var drawChart = (function (exports) {
2515
2260
 
2516
2261
  var unit = [0, 1];
2517
2262
 
2518
- function identity(x) {
2263
+ function identity$1(x) {
2519
2264
  return x;
2520
2265
  }
2521
2266
 
@@ -2575,29 +2320,29 @@ var drawChart = (function (exports) {
2575
2320
  function transformer$1() {
2576
2321
  var domain = unit,
2577
2322
  range = unit,
2578
- interpolate = d3Interpolate.interpolate,
2323
+ interpolate$1 = interpolate,
2579
2324
  transform,
2580
2325
  untransform,
2581
2326
  unknown,
2582
- clamp = identity,
2327
+ clamp = identity$1,
2583
2328
  piecewise,
2584
2329
  output,
2585
2330
  input;
2586
2331
 
2587
2332
  function rescale() {
2588
2333
  var n = Math.min(domain.length, range.length);
2589
- if (clamp !== identity) clamp = clamper(domain[0], domain[n - 1]);
2334
+ if (clamp !== identity$1) clamp = clamper(domain[0], domain[n - 1]);
2590
2335
  piecewise = n > 2 ? polymap : bimap;
2591
2336
  output = input = null;
2592
2337
  return scale;
2593
2338
  }
2594
2339
 
2595
2340
  function scale(x) {
2596
- return x == null || isNaN(x = +x) ? unknown : (output || (output = piecewise(domain.map(transform), range, interpolate)))(transform(clamp(x)));
2341
+ return x == null || isNaN(x = +x) ? unknown : (output || (output = piecewise(domain.map(transform), range, interpolate$1)))(transform(clamp(x)));
2597
2342
  }
2598
2343
 
2599
2344
  scale.invert = function(y) {
2600
- return clamp(untransform((input || (input = piecewise(range, domain.map(transform), d3Interpolate.interpolateNumber)))(y)));
2345
+ return clamp(untransform((input || (input = piecewise(range, domain.map(transform), interpolateNumber)))(y)));
2601
2346
  };
2602
2347
 
2603
2348
  scale.domain = function(_) {
@@ -2609,15 +2354,15 @@ var drawChart = (function (exports) {
2609
2354
  };
2610
2355
 
2611
2356
  scale.rangeRound = function(_) {
2612
- return range = Array.from(_), interpolate = d3Interpolate.interpolateRound, rescale();
2357
+ return range = Array.from(_), interpolate$1 = interpolateRound, rescale();
2613
2358
  };
2614
2359
 
2615
2360
  scale.clamp = function(_) {
2616
- return arguments.length ? (clamp = _ ? true : identity, rescale()) : clamp !== identity;
2361
+ return arguments.length ? (clamp = _ ? true : identity$1, rescale()) : clamp !== identity$1;
2617
2362
  };
2618
2363
 
2619
2364
  scale.interpolate = function(_) {
2620
- return arguments.length ? (interpolate = _, rescale()) : interpolate;
2365
+ return arguments.length ? (interpolate$1 = _, rescale()) : interpolate$1;
2621
2366
  };
2622
2367
 
2623
2368
  scale.unknown = function(_) {
@@ -2631,14 +2376,9 @@ var drawChart = (function (exports) {
2631
2376
  }
2632
2377
 
2633
2378
  function continuous() {
2634
- return transformer$1()(identity, identity);
2379
+ return transformer$1()(identity$1, identity$1);
2635
2380
  }
2636
2381
 
2637
- var d3Format = createCommonjsModule(function (module, exports) {
2638
- // https://d3js.org/d3-format/ v2.0.0 Copyright 2020 Mike Bostock
2639
- (function (global, factory) {
2640
- factory(exports) ;
2641
- }(this, (function (exports) {
2642
2382
  function formatDecimal(x) {
2643
2383
  return Math.abs(x = Math.round(x)) >= 1e21
2644
2384
  ? x.toLocaleString("en").replace(/,/g, "")
@@ -2799,7 +2539,7 @@ var drawChart = (function (exports) {
2799
2539
  var map = Array.prototype.map,
2800
2540
  prefixes = ["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];
2801
2541
 
2802
- function formatLocale(locale) {
2542
+ function formatLocale$1(locale) {
2803
2543
  var group = locale.grouping === undefined || locale.thousands === undefined ? identity : formatGroup(map.call(locale.grouping, Number), locale.thousands + ""),
2804
2544
  currencyPrefix = locale.currency === undefined ? "" : locale.currency[0] + "",
2805
2545
  currencySuffix = locale.currency === undefined ? "" : locale.currency[1] + "",
@@ -2936,19 +2676,21 @@ var drawChart = (function (exports) {
2936
2676
  };
2937
2677
  }
2938
2678
 
2939
- var locale;
2679
+ var locale$1;
2680
+ var format;
2681
+ var formatPrefix;
2940
2682
 
2941
- defaultLocale({
2683
+ defaultLocale$1({
2942
2684
  thousands: ",",
2943
2685
  grouping: [3],
2944
2686
  currency: ["$", ""]
2945
2687
  });
2946
2688
 
2947
- function defaultLocale(definition) {
2948
- locale = formatLocale(definition);
2949
- exports.format = locale.format;
2950
- exports.formatPrefix = locale.formatPrefix;
2951
- return locale;
2689
+ function defaultLocale$1(definition) {
2690
+ locale$1 = formatLocale$1(definition);
2691
+ format = locale$1.format;
2692
+ formatPrefix = locale$1.formatPrefix;
2693
+ return locale$1;
2952
2694
  }
2953
2695
 
2954
2696
  function precisionFixed(step) {
@@ -2964,44 +2706,31 @@ var drawChart = (function (exports) {
2964
2706
  return Math.max(0, exponent(max) - exponent(step)) + 1;
2965
2707
  }
2966
2708
 
2967
- exports.FormatSpecifier = FormatSpecifier;
2968
- exports.formatDefaultLocale = defaultLocale;
2969
- exports.formatLocale = formatLocale;
2970
- exports.formatSpecifier = formatSpecifier;
2971
- exports.precisionFixed = precisionFixed;
2972
- exports.precisionPrefix = precisionPrefix;
2973
- exports.precisionRound = precisionRound;
2974
-
2975
- Object.defineProperty(exports, '__esModule', { value: true });
2976
-
2977
- })));
2978
- });
2979
-
2980
2709
  function tickFormat(start, stop, count, specifier) {
2981
2710
  var step = tickStep(start, stop, count),
2982
2711
  precision;
2983
- specifier = d3Format.formatSpecifier(specifier == null ? ",f" : specifier);
2712
+ specifier = formatSpecifier(specifier == null ? ",f" : specifier);
2984
2713
  switch (specifier.type) {
2985
2714
  case "s": {
2986
2715
  var value = Math.max(Math.abs(start), Math.abs(stop));
2987
- if (specifier.precision == null && !isNaN(precision = d3Format.precisionPrefix(step, value))) specifier.precision = precision;
2988
- return d3Format.formatPrefix(specifier, value);
2716
+ if (specifier.precision == null && !isNaN(precision = precisionPrefix(step, value))) specifier.precision = precision;
2717
+ return formatPrefix(specifier, value);
2989
2718
  }
2990
2719
  case "":
2991
2720
  case "e":
2992
2721
  case "g":
2993
2722
  case "p":
2994
2723
  case "r": {
2995
- if (specifier.precision == null && !isNaN(precision = d3Format.precisionRound(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === "e");
2724
+ if (specifier.precision == null && !isNaN(precision = precisionRound(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === "e");
2996
2725
  break;
2997
2726
  }
2998
2727
  case "f":
2999
2728
  case "%": {
3000
- if (specifier.precision == null && !isNaN(precision = d3Format.precisionFixed(step))) specifier.precision = precision - (specifier.type === "%") * 2;
2729
+ if (specifier.precision == null && !isNaN(precision = precisionFixed(step))) specifier.precision = precision - (specifier.type === "%") * 2;
3001
2730
  break;
3002
2731
  }
3003
2732
  }
3004
- return d3Format.format(specifier);
2733
+ return format(specifier);
3005
2734
  }
3006
2735
 
3007
2736
  function linearish(scale) {
@@ -3070,6 +2799,1032 @@ var drawChart = (function (exports) {
3070
2799
  return linearish(scale);
3071
2800
  }
3072
2801
 
2802
+ var t0 = new Date,
2803
+ t1 = new Date;
2804
+
2805
+ function newInterval(floori, offseti, count, field) {
2806
+
2807
+ function interval(date) {
2808
+ return floori(date = arguments.length === 0 ? new Date : new Date(+date)), date;
2809
+ }
2810
+
2811
+ interval.floor = function(date) {
2812
+ return floori(date = new Date(+date)), date;
2813
+ };
2814
+
2815
+ interval.ceil = function(date) {
2816
+ return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date;
2817
+ };
2818
+
2819
+ interval.round = function(date) {
2820
+ var d0 = interval(date),
2821
+ d1 = interval.ceil(date);
2822
+ return date - d0 < d1 - date ? d0 : d1;
2823
+ };
2824
+
2825
+ interval.offset = function(date, step) {
2826
+ return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;
2827
+ };
2828
+
2829
+ interval.range = function(start, stop, step) {
2830
+ var range = [], previous;
2831
+ start = interval.ceil(start);
2832
+ step = step == null ? 1 : Math.floor(step);
2833
+ if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date
2834
+ do range.push(previous = new Date(+start)), offseti(start, step), floori(start);
2835
+ while (previous < start && start < stop);
2836
+ return range;
2837
+ };
2838
+
2839
+ interval.filter = function(test) {
2840
+ return newInterval(function(date) {
2841
+ if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1);
2842
+ }, function(date, step) {
2843
+ if (date >= date) {
2844
+ if (step < 0) while (++step <= 0) {
2845
+ while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty
2846
+ } else while (--step >= 0) {
2847
+ while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty
2848
+ }
2849
+ }
2850
+ });
2851
+ };
2852
+
2853
+ if (count) {
2854
+ interval.count = function(start, end) {
2855
+ t0.setTime(+start), t1.setTime(+end);
2856
+ floori(t0), floori(t1);
2857
+ return Math.floor(count(t0, t1));
2858
+ };
2859
+
2860
+ interval.every = function(step) {
2861
+ step = Math.floor(step);
2862
+ return !isFinite(step) || !(step > 0) ? null
2863
+ : !(step > 1) ? interval
2864
+ : interval.filter(field
2865
+ ? function(d) { return field(d) % step === 0; }
2866
+ : function(d) { return interval.count(0, d) % step === 0; });
2867
+ };
2868
+ }
2869
+
2870
+ return interval;
2871
+ }
2872
+
2873
+ var millisecond = newInterval(function() {
2874
+ // noop
2875
+ }, function(date, step) {
2876
+ date.setTime(+date + step);
2877
+ }, function(start, end) {
2878
+ return end - start;
2879
+ });
2880
+
2881
+ // An optimized implementation for this simple case.
2882
+ millisecond.every = function(k) {
2883
+ k = Math.floor(k);
2884
+ if (!isFinite(k) || !(k > 0)) return null;
2885
+ if (!(k > 1)) return millisecond;
2886
+ return newInterval(function(date) {
2887
+ date.setTime(Math.floor(date / k) * k);
2888
+ }, function(date, step) {
2889
+ date.setTime(+date + step * k);
2890
+ }, function(start, end) {
2891
+ return (end - start) / k;
2892
+ });
2893
+ };
2894
+ millisecond.range;
2895
+
2896
+ const durationSecond = 1000;
2897
+ const durationMinute = durationSecond * 60;
2898
+ const durationHour = durationMinute * 60;
2899
+ const durationDay = durationHour * 24;
2900
+ const durationWeek = durationDay * 7;
2901
+
2902
+ var second = newInterval(function(date) {
2903
+ date.setTime(date - date.getMilliseconds());
2904
+ }, function(date, step) {
2905
+ date.setTime(+date + step * durationSecond);
2906
+ }, function(start, end) {
2907
+ return (end - start) / durationSecond;
2908
+ }, function(date) {
2909
+ return date.getUTCSeconds();
2910
+ });
2911
+ second.range;
2912
+
2913
+ var minute = newInterval(function(date) {
2914
+ date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond);
2915
+ }, function(date, step) {
2916
+ date.setTime(+date + step * durationMinute);
2917
+ }, function(start, end) {
2918
+ return (end - start) / durationMinute;
2919
+ }, function(date) {
2920
+ return date.getMinutes();
2921
+ });
2922
+ minute.range;
2923
+
2924
+ var hour = newInterval(function(date) {
2925
+ date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond - date.getMinutes() * durationMinute);
2926
+ }, function(date, step) {
2927
+ date.setTime(+date + step * durationHour);
2928
+ }, function(start, end) {
2929
+ return (end - start) / durationHour;
2930
+ }, function(date) {
2931
+ return date.getHours();
2932
+ });
2933
+ hour.range;
2934
+
2935
+ var day = newInterval(
2936
+ date => date.setHours(0, 0, 0, 0),
2937
+ (date, step) => date.setDate(date.getDate() + step),
2938
+ (start, end) => (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay,
2939
+ date => date.getDate() - 1
2940
+ );
2941
+ day.range;
2942
+
2943
+ function weekday(i) {
2944
+ return newInterval(function(date) {
2945
+ date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);
2946
+ date.setHours(0, 0, 0, 0);
2947
+ }, function(date, step) {
2948
+ date.setDate(date.getDate() + step * 7);
2949
+ }, function(start, end) {
2950
+ return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationWeek;
2951
+ });
2952
+ }
2953
+
2954
+ var sunday = weekday(0);
2955
+ var monday = weekday(1);
2956
+ var tuesday = weekday(2);
2957
+ var wednesday = weekday(3);
2958
+ var thursday = weekday(4);
2959
+ var friday = weekday(5);
2960
+ var saturday = weekday(6);
2961
+
2962
+ sunday.range;
2963
+ monday.range;
2964
+ tuesday.range;
2965
+ wednesday.range;
2966
+ thursday.range;
2967
+ friday.range;
2968
+ saturday.range;
2969
+
2970
+ var month = newInterval(function(date) {
2971
+ date.setDate(1);
2972
+ date.setHours(0, 0, 0, 0);
2973
+ }, function(date, step) {
2974
+ date.setMonth(date.getMonth() + step);
2975
+ }, function(start, end) {
2976
+ return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12;
2977
+ }, function(date) {
2978
+ return date.getMonth();
2979
+ });
2980
+ month.range;
2981
+
2982
+ var year = newInterval(function(date) {
2983
+ date.setMonth(0, 1);
2984
+ date.setHours(0, 0, 0, 0);
2985
+ }, function(date, step) {
2986
+ date.setFullYear(date.getFullYear() + step);
2987
+ }, function(start, end) {
2988
+ return end.getFullYear() - start.getFullYear();
2989
+ }, function(date) {
2990
+ return date.getFullYear();
2991
+ });
2992
+
2993
+ // An optimized implementation for this simple case.
2994
+ year.every = function(k) {
2995
+ return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : newInterval(function(date) {
2996
+ date.setFullYear(Math.floor(date.getFullYear() / k) * k);
2997
+ date.setMonth(0, 1);
2998
+ date.setHours(0, 0, 0, 0);
2999
+ }, function(date, step) {
3000
+ date.setFullYear(date.getFullYear() + step * k);
3001
+ });
3002
+ };
3003
+ year.range;
3004
+
3005
+ var utcMinute = newInterval(function(date) {
3006
+ date.setUTCSeconds(0, 0);
3007
+ }, function(date, step) {
3008
+ date.setTime(+date + step * durationMinute);
3009
+ }, function(start, end) {
3010
+ return (end - start) / durationMinute;
3011
+ }, function(date) {
3012
+ return date.getUTCMinutes();
3013
+ });
3014
+ utcMinute.range;
3015
+
3016
+ var utcHour = newInterval(function(date) {
3017
+ date.setUTCMinutes(0, 0, 0);
3018
+ }, function(date, step) {
3019
+ date.setTime(+date + step * durationHour);
3020
+ }, function(start, end) {
3021
+ return (end - start) / durationHour;
3022
+ }, function(date) {
3023
+ return date.getUTCHours();
3024
+ });
3025
+ utcHour.range;
3026
+
3027
+ var utcDay = newInterval(function(date) {
3028
+ date.setUTCHours(0, 0, 0, 0);
3029
+ }, function(date, step) {
3030
+ date.setUTCDate(date.getUTCDate() + step);
3031
+ }, function(start, end) {
3032
+ return (end - start) / durationDay;
3033
+ }, function(date) {
3034
+ return date.getUTCDate() - 1;
3035
+ });
3036
+ utcDay.range;
3037
+
3038
+ function utcWeekday(i) {
3039
+ return newInterval(function(date) {
3040
+ date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);
3041
+ date.setUTCHours(0, 0, 0, 0);
3042
+ }, function(date, step) {
3043
+ date.setUTCDate(date.getUTCDate() + step * 7);
3044
+ }, function(start, end) {
3045
+ return (end - start) / durationWeek;
3046
+ });
3047
+ }
3048
+
3049
+ var utcSunday = utcWeekday(0);
3050
+ var utcMonday = utcWeekday(1);
3051
+ var utcTuesday = utcWeekday(2);
3052
+ var utcWednesday = utcWeekday(3);
3053
+ var utcThursday = utcWeekday(4);
3054
+ var utcFriday = utcWeekday(5);
3055
+ var utcSaturday = utcWeekday(6);
3056
+
3057
+ utcSunday.range;
3058
+ utcMonday.range;
3059
+ utcTuesday.range;
3060
+ utcWednesday.range;
3061
+ utcThursday.range;
3062
+ utcFriday.range;
3063
+ utcSaturday.range;
3064
+
3065
+ var utcMonth = newInterval(function(date) {
3066
+ date.setUTCDate(1);
3067
+ date.setUTCHours(0, 0, 0, 0);
3068
+ }, function(date, step) {
3069
+ date.setUTCMonth(date.getUTCMonth() + step);
3070
+ }, function(start, end) {
3071
+ return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12;
3072
+ }, function(date) {
3073
+ return date.getUTCMonth();
3074
+ });
3075
+ utcMonth.range;
3076
+
3077
+ var utcYear = newInterval(function(date) {
3078
+ date.setUTCMonth(0, 1);
3079
+ date.setUTCHours(0, 0, 0, 0);
3080
+ }, function(date, step) {
3081
+ date.setUTCFullYear(date.getUTCFullYear() + step);
3082
+ }, function(start, end) {
3083
+ return end.getUTCFullYear() - start.getUTCFullYear();
3084
+ }, function(date) {
3085
+ return date.getUTCFullYear();
3086
+ });
3087
+
3088
+ // An optimized implementation for this simple case.
3089
+ utcYear.every = function(k) {
3090
+ return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : newInterval(function(date) {
3091
+ date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k);
3092
+ date.setUTCMonth(0, 1);
3093
+ date.setUTCHours(0, 0, 0, 0);
3094
+ }, function(date, step) {
3095
+ date.setUTCFullYear(date.getUTCFullYear() + step * k);
3096
+ });
3097
+ };
3098
+ utcYear.range;
3099
+
3100
+ function localDate(d) {
3101
+ if (0 <= d.y && d.y < 100) {
3102
+ var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);
3103
+ date.setFullYear(d.y);
3104
+ return date;
3105
+ }
3106
+ return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);
3107
+ }
3108
+
3109
+ function utcDate(d) {
3110
+ if (0 <= d.y && d.y < 100) {
3111
+ var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));
3112
+ date.setUTCFullYear(d.y);
3113
+ return date;
3114
+ }
3115
+ return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));
3116
+ }
3117
+
3118
+ function newDate(y, m, d) {
3119
+ return {y: y, m: m, d: d, H: 0, M: 0, S: 0, L: 0};
3120
+ }
3121
+
3122
+ function formatLocale(locale) {
3123
+ var locale_dateTime = locale.dateTime,
3124
+ locale_date = locale.date,
3125
+ locale_time = locale.time,
3126
+ locale_periods = locale.periods,
3127
+ locale_weekdays = locale.days,
3128
+ locale_shortWeekdays = locale.shortDays,
3129
+ locale_months = locale.months,
3130
+ locale_shortMonths = locale.shortMonths;
3131
+
3132
+ var periodRe = formatRe(locale_periods),
3133
+ periodLookup = formatLookup(locale_periods),
3134
+ weekdayRe = formatRe(locale_weekdays),
3135
+ weekdayLookup = formatLookup(locale_weekdays),
3136
+ shortWeekdayRe = formatRe(locale_shortWeekdays),
3137
+ shortWeekdayLookup = formatLookup(locale_shortWeekdays),
3138
+ monthRe = formatRe(locale_months),
3139
+ monthLookup = formatLookup(locale_months),
3140
+ shortMonthRe = formatRe(locale_shortMonths),
3141
+ shortMonthLookup = formatLookup(locale_shortMonths);
3142
+
3143
+ var formats = {
3144
+ "a": formatShortWeekday,
3145
+ "A": formatWeekday,
3146
+ "b": formatShortMonth,
3147
+ "B": formatMonth,
3148
+ "c": null,
3149
+ "d": formatDayOfMonth,
3150
+ "e": formatDayOfMonth,
3151
+ "f": formatMicroseconds,
3152
+ "g": formatYearISO,
3153
+ "G": formatFullYearISO,
3154
+ "H": formatHour24,
3155
+ "I": formatHour12,
3156
+ "j": formatDayOfYear,
3157
+ "L": formatMilliseconds,
3158
+ "m": formatMonthNumber,
3159
+ "M": formatMinutes,
3160
+ "p": formatPeriod,
3161
+ "q": formatQuarter,
3162
+ "Q": formatUnixTimestamp,
3163
+ "s": formatUnixTimestampSeconds,
3164
+ "S": formatSeconds,
3165
+ "u": formatWeekdayNumberMonday,
3166
+ "U": formatWeekNumberSunday,
3167
+ "V": formatWeekNumberISO,
3168
+ "w": formatWeekdayNumberSunday,
3169
+ "W": formatWeekNumberMonday,
3170
+ "x": null,
3171
+ "X": null,
3172
+ "y": formatYear,
3173
+ "Y": formatFullYear,
3174
+ "Z": formatZone,
3175
+ "%": formatLiteralPercent
3176
+ };
3177
+
3178
+ var utcFormats = {
3179
+ "a": formatUTCShortWeekday,
3180
+ "A": formatUTCWeekday,
3181
+ "b": formatUTCShortMonth,
3182
+ "B": formatUTCMonth,
3183
+ "c": null,
3184
+ "d": formatUTCDayOfMonth,
3185
+ "e": formatUTCDayOfMonth,
3186
+ "f": formatUTCMicroseconds,
3187
+ "g": formatUTCYearISO,
3188
+ "G": formatUTCFullYearISO,
3189
+ "H": formatUTCHour24,
3190
+ "I": formatUTCHour12,
3191
+ "j": formatUTCDayOfYear,
3192
+ "L": formatUTCMilliseconds,
3193
+ "m": formatUTCMonthNumber,
3194
+ "M": formatUTCMinutes,
3195
+ "p": formatUTCPeriod,
3196
+ "q": formatUTCQuarter,
3197
+ "Q": formatUnixTimestamp,
3198
+ "s": formatUnixTimestampSeconds,
3199
+ "S": formatUTCSeconds,
3200
+ "u": formatUTCWeekdayNumberMonday,
3201
+ "U": formatUTCWeekNumberSunday,
3202
+ "V": formatUTCWeekNumberISO,
3203
+ "w": formatUTCWeekdayNumberSunday,
3204
+ "W": formatUTCWeekNumberMonday,
3205
+ "x": null,
3206
+ "X": null,
3207
+ "y": formatUTCYear,
3208
+ "Y": formatUTCFullYear,
3209
+ "Z": formatUTCZone,
3210
+ "%": formatLiteralPercent
3211
+ };
3212
+
3213
+ var parses = {
3214
+ "a": parseShortWeekday,
3215
+ "A": parseWeekday,
3216
+ "b": parseShortMonth,
3217
+ "B": parseMonth,
3218
+ "c": parseLocaleDateTime,
3219
+ "d": parseDayOfMonth,
3220
+ "e": parseDayOfMonth,
3221
+ "f": parseMicroseconds,
3222
+ "g": parseYear,
3223
+ "G": parseFullYear,
3224
+ "H": parseHour24,
3225
+ "I": parseHour24,
3226
+ "j": parseDayOfYear,
3227
+ "L": parseMilliseconds,
3228
+ "m": parseMonthNumber,
3229
+ "M": parseMinutes,
3230
+ "p": parsePeriod,
3231
+ "q": parseQuarter,
3232
+ "Q": parseUnixTimestamp,
3233
+ "s": parseUnixTimestampSeconds,
3234
+ "S": parseSeconds,
3235
+ "u": parseWeekdayNumberMonday,
3236
+ "U": parseWeekNumberSunday,
3237
+ "V": parseWeekNumberISO,
3238
+ "w": parseWeekdayNumberSunday,
3239
+ "W": parseWeekNumberMonday,
3240
+ "x": parseLocaleDate,
3241
+ "X": parseLocaleTime,
3242
+ "y": parseYear,
3243
+ "Y": parseFullYear,
3244
+ "Z": parseZone,
3245
+ "%": parseLiteralPercent
3246
+ };
3247
+
3248
+ // These recursive directive definitions must be deferred.
3249
+ formats.x = newFormat(locale_date, formats);
3250
+ formats.X = newFormat(locale_time, formats);
3251
+ formats.c = newFormat(locale_dateTime, formats);
3252
+ utcFormats.x = newFormat(locale_date, utcFormats);
3253
+ utcFormats.X = newFormat(locale_time, utcFormats);
3254
+ utcFormats.c = newFormat(locale_dateTime, utcFormats);
3255
+
3256
+ function newFormat(specifier, formats) {
3257
+ return function(date) {
3258
+ var string = [],
3259
+ i = -1,
3260
+ j = 0,
3261
+ n = specifier.length,
3262
+ c,
3263
+ pad,
3264
+ format;
3265
+
3266
+ if (!(date instanceof Date)) date = new Date(+date);
3267
+
3268
+ while (++i < n) {
3269
+ if (specifier.charCodeAt(i) === 37) {
3270
+ string.push(specifier.slice(j, i));
3271
+ if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);
3272
+ else pad = c === "e" ? " " : "0";
3273
+ if (format = formats[c]) c = format(date, pad);
3274
+ string.push(c);
3275
+ j = i + 1;
3276
+ }
3277
+ }
3278
+
3279
+ string.push(specifier.slice(j, i));
3280
+ return string.join("");
3281
+ };
3282
+ }
3283
+
3284
+ function newParse(specifier, Z) {
3285
+ return function(string) {
3286
+ var d = newDate(1900, undefined, 1),
3287
+ i = parseSpecifier(d, specifier, string += "", 0),
3288
+ week, day$1;
3289
+ if (i != string.length) return null;
3290
+
3291
+ // If a UNIX timestamp is specified, return it.
3292
+ if ("Q" in d) return new Date(d.Q);
3293
+ if ("s" in d) return new Date(d.s * 1000 + ("L" in d ? d.L : 0));
3294
+
3295
+ // If this is utcParse, never use the local timezone.
3296
+ if (Z && !("Z" in d)) d.Z = 0;
3297
+
3298
+ // The am-pm flag is 0 for AM, and 1 for PM.
3299
+ if ("p" in d) d.H = d.H % 12 + d.p * 12;
3300
+
3301
+ // If the month was not specified, inherit from the quarter.
3302
+ if (d.m === undefined) d.m = "q" in d ? d.q : 0;
3303
+
3304
+ // Convert day-of-week and week-of-year to day-of-year.
3305
+ if ("V" in d) {
3306
+ if (d.V < 1 || d.V > 53) return null;
3307
+ if (!("w" in d)) d.w = 1;
3308
+ if ("Z" in d) {
3309
+ week = utcDate(newDate(d.y, 0, 1)), day$1 = week.getUTCDay();
3310
+ week = day$1 > 4 || day$1 === 0 ? utcMonday.ceil(week) : utcMonday(week);
3311
+ week = utcDay.offset(week, (d.V - 1) * 7);
3312
+ d.y = week.getUTCFullYear();
3313
+ d.m = week.getUTCMonth();
3314
+ d.d = week.getUTCDate() + (d.w + 6) % 7;
3315
+ } else {
3316
+ week = localDate(newDate(d.y, 0, 1)), day$1 = week.getDay();
3317
+ week = day$1 > 4 || day$1 === 0 ? monday.ceil(week) : monday(week);
3318
+ week = day.offset(week, (d.V - 1) * 7);
3319
+ d.y = week.getFullYear();
3320
+ d.m = week.getMonth();
3321
+ d.d = week.getDate() + (d.w + 6) % 7;
3322
+ }
3323
+ } else if ("W" in d || "U" in d) {
3324
+ if (!("w" in d)) d.w = "u" in d ? d.u % 7 : "W" in d ? 1 : 0;
3325
+ day$1 = "Z" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay();
3326
+ d.m = 0;
3327
+ d.d = "W" in d ? (d.w + 6) % 7 + d.W * 7 - (day$1 + 5) % 7 : d.w + d.U * 7 - (day$1 + 6) % 7;
3328
+ }
3329
+
3330
+ // If a time zone is specified, all fields are interpreted as UTC and then
3331
+ // offset according to the specified time zone.
3332
+ if ("Z" in d) {
3333
+ d.H += d.Z / 100 | 0;
3334
+ d.M += d.Z % 100;
3335
+ return utcDate(d);
3336
+ }
3337
+
3338
+ // Otherwise, all fields are in local time.
3339
+ return localDate(d);
3340
+ };
3341
+ }
3342
+
3343
+ function parseSpecifier(d, specifier, string, j) {
3344
+ var i = 0,
3345
+ n = specifier.length,
3346
+ m = string.length,
3347
+ c,
3348
+ parse;
3349
+
3350
+ while (i < n) {
3351
+ if (j >= m) return -1;
3352
+ c = specifier.charCodeAt(i++);
3353
+ if (c === 37) {
3354
+ c = specifier.charAt(i++);
3355
+ parse = parses[c in pads ? specifier.charAt(i++) : c];
3356
+ if (!parse || ((j = parse(d, string, j)) < 0)) return -1;
3357
+ } else if (c != string.charCodeAt(j++)) {
3358
+ return -1;
3359
+ }
3360
+ }
3361
+
3362
+ return j;
3363
+ }
3364
+
3365
+ function parsePeriod(d, string, i) {
3366
+ var n = periodRe.exec(string.slice(i));
3367
+ return n ? (d.p = periodLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;
3368
+ }
3369
+
3370
+ function parseShortWeekday(d, string, i) {
3371
+ var n = shortWeekdayRe.exec(string.slice(i));
3372
+ return n ? (d.w = shortWeekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;
3373
+ }
3374
+
3375
+ function parseWeekday(d, string, i) {
3376
+ var n = weekdayRe.exec(string.slice(i));
3377
+ return n ? (d.w = weekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;
3378
+ }
3379
+
3380
+ function parseShortMonth(d, string, i) {
3381
+ var n = shortMonthRe.exec(string.slice(i));
3382
+ return n ? (d.m = shortMonthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;
3383
+ }
3384
+
3385
+ function parseMonth(d, string, i) {
3386
+ var n = monthRe.exec(string.slice(i));
3387
+ return n ? (d.m = monthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;
3388
+ }
3389
+
3390
+ function parseLocaleDateTime(d, string, i) {
3391
+ return parseSpecifier(d, locale_dateTime, string, i);
3392
+ }
3393
+
3394
+ function parseLocaleDate(d, string, i) {
3395
+ return parseSpecifier(d, locale_date, string, i);
3396
+ }
3397
+
3398
+ function parseLocaleTime(d, string, i) {
3399
+ return parseSpecifier(d, locale_time, string, i);
3400
+ }
3401
+
3402
+ function formatShortWeekday(d) {
3403
+ return locale_shortWeekdays[d.getDay()];
3404
+ }
3405
+
3406
+ function formatWeekday(d) {
3407
+ return locale_weekdays[d.getDay()];
3408
+ }
3409
+
3410
+ function formatShortMonth(d) {
3411
+ return locale_shortMonths[d.getMonth()];
3412
+ }
3413
+
3414
+ function formatMonth(d) {
3415
+ return locale_months[d.getMonth()];
3416
+ }
3417
+
3418
+ function formatPeriod(d) {
3419
+ return locale_periods[+(d.getHours() >= 12)];
3420
+ }
3421
+
3422
+ function formatQuarter(d) {
3423
+ return 1 + ~~(d.getMonth() / 3);
3424
+ }
3425
+
3426
+ function formatUTCShortWeekday(d) {
3427
+ return locale_shortWeekdays[d.getUTCDay()];
3428
+ }
3429
+
3430
+ function formatUTCWeekday(d) {
3431
+ return locale_weekdays[d.getUTCDay()];
3432
+ }
3433
+
3434
+ function formatUTCShortMonth(d) {
3435
+ return locale_shortMonths[d.getUTCMonth()];
3436
+ }
3437
+
3438
+ function formatUTCMonth(d) {
3439
+ return locale_months[d.getUTCMonth()];
3440
+ }
3441
+
3442
+ function formatUTCPeriod(d) {
3443
+ return locale_periods[+(d.getUTCHours() >= 12)];
3444
+ }
3445
+
3446
+ function formatUTCQuarter(d) {
3447
+ return 1 + ~~(d.getUTCMonth() / 3);
3448
+ }
3449
+
3450
+ return {
3451
+ format: function(specifier) {
3452
+ var f = newFormat(specifier += "", formats);
3453
+ f.toString = function() { return specifier; };
3454
+ return f;
3455
+ },
3456
+ parse: function(specifier) {
3457
+ var p = newParse(specifier += "", false);
3458
+ p.toString = function() { return specifier; };
3459
+ return p;
3460
+ },
3461
+ utcFormat: function(specifier) {
3462
+ var f = newFormat(specifier += "", utcFormats);
3463
+ f.toString = function() { return specifier; };
3464
+ return f;
3465
+ },
3466
+ utcParse: function(specifier) {
3467
+ var p = newParse(specifier += "", true);
3468
+ p.toString = function() { return specifier; };
3469
+ return p;
3470
+ }
3471
+ };
3472
+ }
3473
+
3474
+ var pads = {"-": "", "_": " ", "0": "0"},
3475
+ numberRe = /^\s*\d+/, // note: ignores next directive
3476
+ percentRe = /^%/,
3477
+ requoteRe = /[\\^$*+?|[\]().{}]/g;
3478
+
3479
+ function pad(value, fill, width) {
3480
+ var sign = value < 0 ? "-" : "",
3481
+ string = (sign ? -value : value) + "",
3482
+ length = string.length;
3483
+ return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);
3484
+ }
3485
+
3486
+ function requote(s) {
3487
+ return s.replace(requoteRe, "\\$&");
3488
+ }
3489
+
3490
+ function formatRe(names) {
3491
+ return new RegExp("^(?:" + names.map(requote).join("|") + ")", "i");
3492
+ }
3493
+
3494
+ function formatLookup(names) {
3495
+ return new Map(names.map((name, i) => [name.toLowerCase(), i]));
3496
+ }
3497
+
3498
+ function parseWeekdayNumberSunday(d, string, i) {
3499
+ var n = numberRe.exec(string.slice(i, i + 1));
3500
+ return n ? (d.w = +n[0], i + n[0].length) : -1;
3501
+ }
3502
+
3503
+ function parseWeekdayNumberMonday(d, string, i) {
3504
+ var n = numberRe.exec(string.slice(i, i + 1));
3505
+ return n ? (d.u = +n[0], i + n[0].length) : -1;
3506
+ }
3507
+
3508
+ function parseWeekNumberSunday(d, string, i) {
3509
+ var n = numberRe.exec(string.slice(i, i + 2));
3510
+ return n ? (d.U = +n[0], i + n[0].length) : -1;
3511
+ }
3512
+
3513
+ function parseWeekNumberISO(d, string, i) {
3514
+ var n = numberRe.exec(string.slice(i, i + 2));
3515
+ return n ? (d.V = +n[0], i + n[0].length) : -1;
3516
+ }
3517
+
3518
+ function parseWeekNumberMonday(d, string, i) {
3519
+ var n = numberRe.exec(string.slice(i, i + 2));
3520
+ return n ? (d.W = +n[0], i + n[0].length) : -1;
3521
+ }
3522
+
3523
+ function parseFullYear(d, string, i) {
3524
+ var n = numberRe.exec(string.slice(i, i + 4));
3525
+ return n ? (d.y = +n[0], i + n[0].length) : -1;
3526
+ }
3527
+
3528
+ function parseYear(d, string, i) {
3529
+ var n = numberRe.exec(string.slice(i, i + 2));
3530
+ return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1;
3531
+ }
3532
+
3533
+ function parseZone(d, string, i) {
3534
+ var n = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(string.slice(i, i + 6));
3535
+ return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || "00")), i + n[0].length) : -1;
3536
+ }
3537
+
3538
+ function parseQuarter(d, string, i) {
3539
+ var n = numberRe.exec(string.slice(i, i + 1));
3540
+ return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1;
3541
+ }
3542
+
3543
+ function parseMonthNumber(d, string, i) {
3544
+ var n = numberRe.exec(string.slice(i, i + 2));
3545
+ return n ? (d.m = n[0] - 1, i + n[0].length) : -1;
3546
+ }
3547
+
3548
+ function parseDayOfMonth(d, string, i) {
3549
+ var n = numberRe.exec(string.slice(i, i + 2));
3550
+ return n ? (d.d = +n[0], i + n[0].length) : -1;
3551
+ }
3552
+
3553
+ function parseDayOfYear(d, string, i) {
3554
+ var n = numberRe.exec(string.slice(i, i + 3));
3555
+ return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;
3556
+ }
3557
+
3558
+ function parseHour24(d, string, i) {
3559
+ var n = numberRe.exec(string.slice(i, i + 2));
3560
+ return n ? (d.H = +n[0], i + n[0].length) : -1;
3561
+ }
3562
+
3563
+ function parseMinutes(d, string, i) {
3564
+ var n = numberRe.exec(string.slice(i, i + 2));
3565
+ return n ? (d.M = +n[0], i + n[0].length) : -1;
3566
+ }
3567
+
3568
+ function parseSeconds(d, string, i) {
3569
+ var n = numberRe.exec(string.slice(i, i + 2));
3570
+ return n ? (d.S = +n[0], i + n[0].length) : -1;
3571
+ }
3572
+
3573
+ function parseMilliseconds(d, string, i) {
3574
+ var n = numberRe.exec(string.slice(i, i + 3));
3575
+ return n ? (d.L = +n[0], i + n[0].length) : -1;
3576
+ }
3577
+
3578
+ function parseMicroseconds(d, string, i) {
3579
+ var n = numberRe.exec(string.slice(i, i + 6));
3580
+ return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1;
3581
+ }
3582
+
3583
+ function parseLiteralPercent(d, string, i) {
3584
+ var n = percentRe.exec(string.slice(i, i + 1));
3585
+ return n ? i + n[0].length : -1;
3586
+ }
3587
+
3588
+ function parseUnixTimestamp(d, string, i) {
3589
+ var n = numberRe.exec(string.slice(i));
3590
+ return n ? (d.Q = +n[0], i + n[0].length) : -1;
3591
+ }
3592
+
3593
+ function parseUnixTimestampSeconds(d, string, i) {
3594
+ var n = numberRe.exec(string.slice(i));
3595
+ return n ? (d.s = +n[0], i + n[0].length) : -1;
3596
+ }
3597
+
3598
+ function formatDayOfMonth(d, p) {
3599
+ return pad(d.getDate(), p, 2);
3600
+ }
3601
+
3602
+ function formatHour24(d, p) {
3603
+ return pad(d.getHours(), p, 2);
3604
+ }
3605
+
3606
+ function formatHour12(d, p) {
3607
+ return pad(d.getHours() % 12 || 12, p, 2);
3608
+ }
3609
+
3610
+ function formatDayOfYear(d, p) {
3611
+ return pad(1 + day.count(year(d), d), p, 3);
3612
+ }
3613
+
3614
+ function formatMilliseconds(d, p) {
3615
+ return pad(d.getMilliseconds(), p, 3);
3616
+ }
3617
+
3618
+ function formatMicroseconds(d, p) {
3619
+ return formatMilliseconds(d, p) + "000";
3620
+ }
3621
+
3622
+ function formatMonthNumber(d, p) {
3623
+ return pad(d.getMonth() + 1, p, 2);
3624
+ }
3625
+
3626
+ function formatMinutes(d, p) {
3627
+ return pad(d.getMinutes(), p, 2);
3628
+ }
3629
+
3630
+ function formatSeconds(d, p) {
3631
+ return pad(d.getSeconds(), p, 2);
3632
+ }
3633
+
3634
+ function formatWeekdayNumberMonday(d) {
3635
+ var day = d.getDay();
3636
+ return day === 0 ? 7 : day;
3637
+ }
3638
+
3639
+ function formatWeekNumberSunday(d, p) {
3640
+ return pad(sunday.count(year(d) - 1, d), p, 2);
3641
+ }
3642
+
3643
+ function dISO(d) {
3644
+ var day = d.getDay();
3645
+ return (day >= 4 || day === 0) ? thursday(d) : thursday.ceil(d);
3646
+ }
3647
+
3648
+ function formatWeekNumberISO(d, p) {
3649
+ d = dISO(d);
3650
+ return pad(thursday.count(year(d), d) + (year(d).getDay() === 4), p, 2);
3651
+ }
3652
+
3653
+ function formatWeekdayNumberSunday(d) {
3654
+ return d.getDay();
3655
+ }
3656
+
3657
+ function formatWeekNumberMonday(d, p) {
3658
+ return pad(monday.count(year(d) - 1, d), p, 2);
3659
+ }
3660
+
3661
+ function formatYear(d, p) {
3662
+ return pad(d.getFullYear() % 100, p, 2);
3663
+ }
3664
+
3665
+ function formatYearISO(d, p) {
3666
+ d = dISO(d);
3667
+ return pad(d.getFullYear() % 100, p, 2);
3668
+ }
3669
+
3670
+ function formatFullYear(d, p) {
3671
+ return pad(d.getFullYear() % 10000, p, 4);
3672
+ }
3673
+
3674
+ function formatFullYearISO(d, p) {
3675
+ var day = d.getDay();
3676
+ d = (day >= 4 || day === 0) ? thursday(d) : thursday.ceil(d);
3677
+ return pad(d.getFullYear() % 10000, p, 4);
3678
+ }
3679
+
3680
+ function formatZone(d) {
3681
+ var z = d.getTimezoneOffset();
3682
+ return (z > 0 ? "-" : (z *= -1, "+"))
3683
+ + pad(z / 60 | 0, "0", 2)
3684
+ + pad(z % 60, "0", 2);
3685
+ }
3686
+
3687
+ function formatUTCDayOfMonth(d, p) {
3688
+ return pad(d.getUTCDate(), p, 2);
3689
+ }
3690
+
3691
+ function formatUTCHour24(d, p) {
3692
+ return pad(d.getUTCHours(), p, 2);
3693
+ }
3694
+
3695
+ function formatUTCHour12(d, p) {
3696
+ return pad(d.getUTCHours() % 12 || 12, p, 2);
3697
+ }
3698
+
3699
+ function formatUTCDayOfYear(d, p) {
3700
+ return pad(1 + utcDay.count(utcYear(d), d), p, 3);
3701
+ }
3702
+
3703
+ function formatUTCMilliseconds(d, p) {
3704
+ return pad(d.getUTCMilliseconds(), p, 3);
3705
+ }
3706
+
3707
+ function formatUTCMicroseconds(d, p) {
3708
+ return formatUTCMilliseconds(d, p) + "000";
3709
+ }
3710
+
3711
+ function formatUTCMonthNumber(d, p) {
3712
+ return pad(d.getUTCMonth() + 1, p, 2);
3713
+ }
3714
+
3715
+ function formatUTCMinutes(d, p) {
3716
+ return pad(d.getUTCMinutes(), p, 2);
3717
+ }
3718
+
3719
+ function formatUTCSeconds(d, p) {
3720
+ return pad(d.getUTCSeconds(), p, 2);
3721
+ }
3722
+
3723
+ function formatUTCWeekdayNumberMonday(d) {
3724
+ var dow = d.getUTCDay();
3725
+ return dow === 0 ? 7 : dow;
3726
+ }
3727
+
3728
+ function formatUTCWeekNumberSunday(d, p) {
3729
+ return pad(utcSunday.count(utcYear(d) - 1, d), p, 2);
3730
+ }
3731
+
3732
+ function UTCdISO(d) {
3733
+ var day = d.getUTCDay();
3734
+ return (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);
3735
+ }
3736
+
3737
+ function formatUTCWeekNumberISO(d, p) {
3738
+ d = UTCdISO(d);
3739
+ return pad(utcThursday.count(utcYear(d), d) + (utcYear(d).getUTCDay() === 4), p, 2);
3740
+ }
3741
+
3742
+ function formatUTCWeekdayNumberSunday(d) {
3743
+ return d.getUTCDay();
3744
+ }
3745
+
3746
+ function formatUTCWeekNumberMonday(d, p) {
3747
+ return pad(utcMonday.count(utcYear(d) - 1, d), p, 2);
3748
+ }
3749
+
3750
+ function formatUTCYear(d, p) {
3751
+ return pad(d.getUTCFullYear() % 100, p, 2);
3752
+ }
3753
+
3754
+ function formatUTCYearISO(d, p) {
3755
+ d = UTCdISO(d);
3756
+ return pad(d.getUTCFullYear() % 100, p, 2);
3757
+ }
3758
+
3759
+ function formatUTCFullYear(d, p) {
3760
+ return pad(d.getUTCFullYear() % 10000, p, 4);
3761
+ }
3762
+
3763
+ function formatUTCFullYearISO(d, p) {
3764
+ var day = d.getUTCDay();
3765
+ d = (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);
3766
+ return pad(d.getUTCFullYear() % 10000, p, 4);
3767
+ }
3768
+
3769
+ function formatUTCZone() {
3770
+ return "+0000";
3771
+ }
3772
+
3773
+ function formatLiteralPercent() {
3774
+ return "%";
3775
+ }
3776
+
3777
+ function formatUnixTimestamp(d) {
3778
+ return +d;
3779
+ }
3780
+
3781
+ function formatUnixTimestampSeconds(d) {
3782
+ return Math.floor(+d / 1000);
3783
+ }
3784
+
3785
+ var locale;
3786
+ var utcFormat;
3787
+ var utcParse;
3788
+
3789
+ defaultLocale({
3790
+ dateTime: "%x, %X",
3791
+ date: "%-m/%-d/%Y",
3792
+ time: "%-I:%M:%S %p",
3793
+ periods: ["AM", "PM"],
3794
+ days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
3795
+ shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
3796
+ months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
3797
+ shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
3798
+ });
3799
+
3800
+ function defaultLocale(definition) {
3801
+ locale = formatLocale(definition);
3802
+ locale.format;
3803
+ locale.parse;
3804
+ utcFormat = locale.utcFormat;
3805
+ utcParse = locale.utcParse;
3806
+ return locale;
3807
+ }
3808
+
3809
+ var isoSpecifier = "%Y-%m-%dT%H:%M:%S.%LZ";
3810
+
3811
+ function formatIsoNative(date) {
3812
+ return date.toISOString();
3813
+ }
3814
+
3815
+ Date.prototype.toISOString
3816
+ ? formatIsoNative
3817
+ : utcFormat(isoSpecifier);
3818
+
3819
+ function parseIsoNative(string) {
3820
+ var date = new Date(string);
3821
+ return isNaN(date) ? null : date;
3822
+ }
3823
+
3824
+ +new Date("2000-01-01T00:00:00.000Z")
3825
+ ? parseIsoNative
3826
+ : utcParse(isoSpecifier);
3827
+
3073
3828
  function transformer() {
3074
3829
  var x0 = 0,
3075
3830
  x1 = 1,
@@ -3077,7 +3832,7 @@ var drawChart = (function (exports) {
3077
3832
  t1,
3078
3833
  k10,
3079
3834
  transform,
3080
- interpolator = identity,
3835
+ interpolator = identity$1,
3081
3836
  clamp = false,
3082
3837
  unknown;
3083
3838
 
@@ -3104,9 +3859,9 @@ var drawChart = (function (exports) {
3104
3859
  };
3105
3860
  }
3106
3861
 
3107
- scale.range = range(d3Interpolate.interpolate);
3862
+ scale.range = range(interpolate);
3108
3863
 
3109
- scale.rangeRound = range(d3Interpolate.interpolateRound);
3864
+ scale.rangeRound = range(interpolateRound);
3110
3865
 
3111
3866
  scale.unknown = function(_) {
3112
3867
  return arguments.length ? (unknown = _, scale) : unknown;
@@ -3127,7 +3882,7 @@ var drawChart = (function (exports) {
3127
3882
  }
3128
3883
 
3129
3884
  function sequential() {
3130
- var scale = linearish(transformer()(identity));
3885
+ var scale = linearish(transformer()(identity$1));
3131
3886
 
3132
3887
  scale.copy = function() {
3133
3888
  return copy(scale, sequential());
@@ -3160,7 +3915,7 @@ var drawChart = (function (exports) {
3160
3915
  const colorParentMap = new Map();
3161
3916
  colorParentMap.set(root, COLOR_BASE);
3162
3917
  if (root.children != null) {
3163
- const colorScale = sequential([0, root.children.length], (n) => hsl(360 * n, 0.6, 0.85));
3918
+ const colorScale = sequential([0, root.children.length], (n) => hsl(360 * n, 0.3, 0.85));
3164
3919
  root.children.forEach((c, id) => {
3165
3920
  colorParentMap.set(c, colorScale(id).toString());
3166
3921
  });
@@ -3178,7 +3933,7 @@ var drawChart = (function (exports) {
3178
3933
  if (!colorMap.has(node)) {
3179
3934
  const backgroundColor = getBackgroundColor(node);
3180
3935
  const l = relativeLuminance(backgroundColor.rgb());
3181
- const fontColor = l > 0.179 ? "#000" : "#fff";
3936
+ const fontColor = l > 0.19 ? "#000" : "#fff";
3182
3937
  colorMap.set(node, {
3183
3938
  backgroundColor: backgroundColor.toString(),
3184
3939
  fontColor,
@@ -3188,7 +3943,7 @@ var drawChart = (function (exports) {
3188
3943
  };
3189
3944
  };
3190
3945
 
3191
- const StaticContext = q({});
3946
+ const StaticContext = B$1({});
3192
3947
  const drawChart = (parentNode, data, width, height) => {
3193
3948
  const availableSizeProperties = getAvailableSizeOptions(data.options);
3194
3949
  console.time("layout create");
@@ -3232,7 +3987,7 @@ var drawChart = (function (exports) {
3232
3987
  console.time("color");
3233
3988
  const getModuleColor = createRainbowColor(rawHierarchy);
3234
3989
  console.timeEnd("color");
3235
- N(o$1(StaticContext.Provider, Object.assign({ value: {
3990
+ P(e$1(StaticContext.Provider, Object.assign({ value: {
3236
3991
  data,
3237
3992
  availableSizeProperties,
3238
3993
  width,
@@ -3242,24 +3997,24 @@ var drawChart = (function (exports) {
3242
3997
  getModuleColor,
3243
3998
  rawHierarchy,
3244
3999
  layout,
3245
- } }, { children: o$1(Main, {}, void 0) }), void 0), parentNode);
4000
+ } }, { children: e$1(Main, {}) })), parentNode);
3246
4001
  };
3247
4002
 
3248
4003
  exports.StaticContext = StaticContext;
3249
- exports.default = drawChart;
4004
+ exports["default"] = drawChart;
3250
4005
 
3251
4006
  Object.defineProperty(exports, '__esModule', { value: true });
3252
4007
 
3253
4008
  return exports;
3254
4009
 
3255
- }({}));
4010
+ })({});
3256
4011
  //# sourceMappingURL=treemap.js.map
3257
4012
 
3258
4013
  /*-->*/
3259
4014
  </script>
3260
4015
  <script>
3261
4016
  /*<!--*/
3262
- const data = {"version":2,"tree":{"name":"root","children":[{"name":"bubblechart.js","children":[{"name":"src","children":[{"uid":"ffa6-1","name":"panzoom.js"},{"uid":"ffa6-3","name":"decorations.js"},{"uid":"ffa6-5","name":"component.js"},{"uid":"ffa6-7","name":"index.js"}]}]}],"isRoot":true},"nodeParts":{"ffa6-1":{"renderedLength":26566,"gzipLength":0,"brotliLength":0,"mainUid":"ffa6-0"},"ffa6-3":{"renderedLength":6465,"gzipLength":0,"brotliLength":0,"mainUid":"ffa6-2"},"ffa6-5":{"renderedLength":66699,"gzipLength":0,"brotliLength":0,"mainUid":"ffa6-4"},"ffa6-7":{"renderedLength":4707,"gzipLength":0,"brotliLength":0,"mainUid":"ffa6-6"}},"nodeMetas":{"ffa6-0":{"id":"/src/panzoom.js","moduleParts":{"bubblechart.js":"ffa6-1"},"imported":[{"uid":"ffa6-9"}],"importedBy":[{"uid":"ffa6-4"}]},"ffa6-2":{"id":"/src/decorations.js","moduleParts":{"bubblechart.js":"ffa6-3"},"imported":[{"uid":"ffa6-9"}],"importedBy":[{"uid":"ffa6-4"}]},"ffa6-4":{"id":"/src/component.js","moduleParts":{"bubblechart.js":"ffa6-5"},"imported":[{"uid":"ffa6-9"},{"uid":"ffa6-0"},{"uid":"ffa6-2"},{"uid":"ffa6-10"}],"importedBy":[{"uid":"ffa6-6"}]},"ffa6-6":{"id":"/src/index.js","moduleParts":{"bubblechart.js":"ffa6-7"},"imported":[{"uid":"ffa6-8"},{"uid":"ffa6-9"},{"uid":"ffa6-4"}],"importedBy":[],"isEntry":true},"ffa6-8":{"id":"/src/styles.scss","moduleParts":{},"imported":[],"importedBy":[{"uid":"ffa6-6"}]},"ffa6-9":{"id":"VizabiSharedComponents","moduleParts":{},"imported":[],"importedBy":[{"uid":"ffa6-6"},{"uid":"ffa6-4"},{"uid":"ffa6-0"},{"uid":"ffa6-2"}],"isExternal":true},"ffa6-10":{"id":"mobx","moduleParts":{},"imported":[],"importedBy":[{"uid":"ffa6-4"}],"isExternal":true}},"env":{"rollup":"2.56.3"},"options":{"gzip":false,"brotli":false,"sourcemap":false}};
4017
+ const data = {"version":2,"tree":{"name":"root","children":[{"name":"bubblechart.js","children":[{"name":"src","children":[{"uid":"0aa6-1","name":"panzoom.js"},{"uid":"0aa6-3","name":"decorations.js"},{"uid":"0aa6-5","name":"component.js"},{"uid":"0aa6-7","name":"index.js"}]}]}],"isRoot":true},"nodeParts":{"0aa6-1":{"renderedLength":26566,"gzipLength":0,"brotliLength":0,"mainUid":"0aa6-0"},"0aa6-3":{"renderedLength":6465,"gzipLength":0,"brotliLength":0,"mainUid":"0aa6-2"},"0aa6-5":{"renderedLength":66978,"gzipLength":0,"brotliLength":0,"mainUid":"0aa6-4"},"0aa6-7":{"renderedLength":4767,"gzipLength":0,"brotliLength":0,"mainUid":"0aa6-6"}},"nodeMetas":{"0aa6-0":{"id":"/src/panzoom.js","moduleParts":{"bubblechart.js":"0aa6-1"},"imported":[{"uid":"0aa6-9"}],"importedBy":[{"uid":"0aa6-4"}]},"0aa6-2":{"id":"/src/decorations.js","moduleParts":{"bubblechart.js":"0aa6-3"},"imported":[{"uid":"0aa6-9"}],"importedBy":[{"uid":"0aa6-4"}]},"0aa6-4":{"id":"/src/component.js","moduleParts":{"bubblechart.js":"0aa6-5"},"imported":[{"uid":"0aa6-9"},{"uid":"0aa6-0"},{"uid":"0aa6-2"},{"uid":"0aa6-10"}],"importedBy":[{"uid":"0aa6-6"}]},"0aa6-6":{"id":"/src/index.js","moduleParts":{"bubblechart.js":"0aa6-7"},"imported":[{"uid":"0aa6-8"},{"uid":"0aa6-9"},{"uid":"0aa6-4"}],"importedBy":[],"isEntry":true},"0aa6-8":{"id":"/src/styles.scss","moduleParts":{},"imported":[],"importedBy":[{"uid":"0aa6-6"}]},"0aa6-9":{"id":"VizabiSharedComponents","moduleParts":{},"imported":[],"importedBy":[{"uid":"0aa6-6"},{"uid":"0aa6-4"},{"uid":"0aa6-0"},{"uid":"0aa6-2"}],"isExternal":true},"0aa6-10":{"id":"mobx","moduleParts":{},"imported":[],"importedBy":[{"uid":"0aa6-4"}],"isExternal":true}},"env":{"rollup":"2.77.0"},"options":{"gzip":false,"brotli":false,"sourcemap":false}};
3263
4018
 
3264
4019
  const run = () => {
3265
4020
  const width = window.innerWidth;