UNPKG

arbor-dashboard

Version:
2 lines 643 kB
/*! For license information please see dashboard.js.LICENSE.txt */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.dashboard=t(require("react")):e.dashboard=t(e.react)}(self,(e=>(()=>{var t={7184:(e,t,n)=>{"use strict";n.d(t,{YH:()=>C,e0:()=>E,wI:()=>v,x$:()=>b});var r=n(9155),i=n(7612),o=n.n(i),a=n(8023),s=n.n(a),l=n(179),u=n.n(l),c=n(1644),f=n(2555),d=n(4848);function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h.apply(this,arguments)}var p=function(e){return"circle"===e.type},g=function(e){return"dot"===e.type},m=function(e){return"rect"===e.type},y=function(e){var t,n,r=e.x,i=e.y,o=e.noteX,a=e.noteY,l=e.noteWidth,u=void 0===l?120:l,f=e.noteTextOffset,d=void 0===f?8:f;if(s()(o))t=r+o;else{if(void 0===o.abs)throw new Error("noteX should be either a number or an object containing an 'abs' property");t=o.abs}if(s()(a))n=i+a;else{if(void 0===a.abs)throw new Error("noteY should be either a number or an object containing an 'abs' property");n=a.abs}var h=r,g=i,y=function(e,t,n,r){var i=Math.atan2(r-t,n-e);return(0,c.mQ)((0,c.nv)(i))}(r,i,t,n);if(p(e)){var v=(0,c.B2)((0,c.tR)(y),e.size/2);h+=v.x,g+=v.y}if(m(e)){var b=Math.round((y+90)/45)%8;0===b&&(g-=e.height/2),1===b&&(h+=e.width/2,g-=e.height/2),2===b&&(h+=e.width/2),3===b&&(h+=e.width/2,g+=e.height/2),4===b&&(g+=e.height/2),5===b&&(h-=e.width/2,g+=e.height/2),6===b&&(h-=e.width/2),7===b&&(h-=e.width/2,g-=e.height/2)}var x=t,w=t;return(y+90)%360>180?(x-=u,w-=u):w+=u,{points:[[h,g],[t,n],[w,n]],text:[x,n-d],angle:y+90}},v=function(e){var t=e.data,n=e.annotations,i=e.getPosition,a=e.getDimensions;return(0,r.useMemo)((function(){return function(e){var t=e.data,n=e.getPosition,r=e.getDimensions;return e.annotations.reduce((function(e,i){var a=i.offset||0;return[].concat(e,o()(t,i.match).map((function(e){var t=n(e),o=r(e);return(p(i)||m(i))&&(o.size=o.size+2*a,o.width=o.width+2*a,o.height=o.height+2*a),h({},u()(i,["match","offset"]),t,o,{size:i.size||o.size,datum:e})})))}),[])}({data:t,annotations:n,getPosition:i,getDimensions:a})}),[t,n,i,a])},b=function(e){var t=e.annotations;return(0,r.useMemo)((function(){return t.map((function(e){return h({},e,{computed:y(h({},e))})}))}),[t])},x=function(e){var t=e.datum,n=e.x,i=e.y,o=e.note,a=(0,c.DP)(),s=(0,c.mk)(),l=s.animate,p=s.config,g=(0,f.zh)({x:n,y:i,config:p,immediate:!l});return"function"==typeof o?(0,r.createElement)(o,{x:n,y:i,datum:t}):(0,d.jsxs)(d.Fragment,{children:[a.annotations.text.outlineWidth>0&&(0,d.jsx)(f.CS.text,{x:g.x,y:g.y,style:h({},a.annotations.text,{strokeLinejoin:"round",strokeWidth:2*a.annotations.text.outlineWidth,stroke:a.annotations.text.outlineColor}),children:o}),(0,d.jsx)(f.CS.text,{x:g.x,y:g.y,style:u()(a.annotations.text,["outlineWidth","outlineColor"]),children:o})]})},w=function(e){var t=e.points,n=e.isOutline,i=void 0!==n&&n,o=(0,c.DP)(),a=(0,r.useMemo)((function(){var e=t[0];return t.slice(1).reduce((function(e,t){return e+" L"+t[0]+","+t[1]}),"M"+e[0]+","+e[1])}),[t]),s=(0,c.wA)(a);if(i&&o.annotations.link.outlineWidth<=0)return null;var l=h({},o.annotations.link);return i&&(l.strokeLinecap="square",l.strokeWidth=o.annotations.link.strokeWidth+2*o.annotations.link.outlineWidth,l.stroke=o.annotations.link.outlineColor,l.opacity=o.annotations.link.outlineOpacity),(0,d.jsx)(f.CS.path,{fill:"none",d:s,style:l})},_=function(e){var t=e.x,n=e.y,r=e.size,i=(0,c.DP)(),o=(0,c.mk)(),a=o.animate,s=o.config,l=(0,f.zh)({x:t,y:n,radius:r/2,config:s,immediate:!a});return(0,d.jsxs)(d.Fragment,{children:[i.annotations.outline.outlineWidth>0&&(0,d.jsx)(f.CS.circle,{cx:l.x,cy:l.y,r:l.radius,style:h({},i.annotations.outline,{fill:"none",strokeWidth:i.annotations.outline.strokeWidth+2*i.annotations.outline.outlineWidth,stroke:i.annotations.outline.outlineColor,opacity:i.annotations.outline.outlineOpacity})}),(0,d.jsx)(f.CS.circle,{cx:l.x,cy:l.y,r:l.radius,style:i.annotations.outline})]})},k=function(e){var t=e.x,n=e.y,r=e.size,i=void 0===r?4:r,o=(0,c.DP)(),a=(0,c.mk)(),s=a.animate,l=a.config,u=(0,f.zh)({x:t,y:n,radius:i/2,config:l,immediate:!s});return(0,d.jsxs)(d.Fragment,{children:[o.annotations.outline.outlineWidth>0&&(0,d.jsx)(f.CS.circle,{cx:u.x,cy:u.y,r:u.radius,style:h({},o.annotations.outline,{fill:"none",strokeWidth:2*o.annotations.outline.outlineWidth,stroke:o.annotations.outline.outlineColor,opacity:o.annotations.outline.outlineOpacity})}),(0,d.jsx)(f.CS.circle,{cx:u.x,cy:u.y,r:u.radius,style:o.annotations.symbol})]})},S=function(e){var t=e.x,n=e.y,r=e.width,i=e.height,o=e.borderRadius,a=void 0===o?6:o,s=(0,c.DP)(),l=(0,c.mk)(),u=l.animate,p=l.config,g=(0,f.zh)({x:t-r/2,y:n-i/2,width:r,height:i,config:p,immediate:!u});return(0,d.jsxs)(d.Fragment,{children:[s.annotations.outline.outlineWidth>0&&(0,d.jsx)(f.CS.rect,{x:g.x,y:g.y,rx:a,ry:a,width:g.width,height:g.height,style:h({},s.annotations.outline,{fill:"none",strokeWidth:s.annotations.outline.strokeWidth+2*s.annotations.outline.outlineWidth,stroke:s.annotations.outline.outlineColor,opacity:s.annotations.outline.outlineOpacity})}),(0,d.jsx)(f.CS.rect,{x:g.x,y:g.y,rx:a,ry:a,width:g.width,height:g.height,style:s.annotations.outline})]})},C=function(e){var t=e.datum,n=e.x,i=e.y,o=e.note,a=function(e){return(0,r.useMemo)((function(){return y(e)}),[e])}(e);if(!function(e){var t=typeof e;return(0,r.isValidElement)(e)||"string"===t||"function"===t||"object"===t}(o))throw new Error("note should be a valid react element");return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(w,{points:a.points,isOutline:!0}),p(e)&&(0,d.jsx)(_,{x:n,y:i,size:e.size}),g(e)&&(0,d.jsx)(k,{x:n,y:i,size:e.size}),m(e)&&(0,d.jsx)(S,{x:n,y:i,width:e.width,height:e.height,borderRadius:e.borderRadius}),(0,d.jsx)(w,{points:a.points}),(0,d.jsx)(x,{datum:t,x:a.text[0],y:a.text[1],note:o})]})},M=function(e,t){t.forEach((function(t,n){var r=t[0],i=t[1];0===n?e.moveTo(r,i):e.lineTo(r,i)}))},E=function(e,t){var n=t.annotations,r=t.theme;0!==n.length&&(e.save(),n.forEach((function(t){if(!function(e){var t=typeof e;return"string"===t||"function"===t}(t.note))throw new Error("note is invalid for canvas implementation");r.annotations.link.outlineWidth>0&&(e.lineCap="square",e.strokeStyle=r.annotations.link.outlineColor,e.lineWidth=r.annotations.link.strokeWidth+2*r.annotations.link.outlineWidth,e.beginPath(),M(e,t.computed.points),e.stroke(),e.lineCap="butt"),p(t)&&r.annotations.outline.outlineWidth>0&&(e.strokeStyle=r.annotations.outline.outlineColor,e.lineWidth=r.annotations.outline.strokeWidth+2*r.annotations.outline.outlineWidth,e.beginPath(),e.arc(t.x,t.y,t.size/2,0,2*Math.PI),e.stroke()),g(t)&&r.annotations.symbol.outlineWidth>0&&(e.strokeStyle=r.annotations.symbol.outlineColor,e.lineWidth=2*r.annotations.symbol.outlineWidth,e.beginPath(),e.arc(t.x,t.y,t.size/2,0,2*Math.PI),e.stroke()),m(t)&&r.annotations.outline.outlineWidth>0&&(e.strokeStyle=r.annotations.outline.outlineColor,e.lineWidth=r.annotations.outline.strokeWidth+2*r.annotations.outline.outlineWidth,e.beginPath(),e.rect(t.x-t.width/2,t.y-t.height/2,t.width,t.height),e.stroke()),e.strokeStyle=r.annotations.link.stroke,e.lineWidth=r.annotations.link.strokeWidth,e.beginPath(),M(e,t.computed.points),e.stroke(),p(t)&&(e.strokeStyle=r.annotations.outline.stroke,e.lineWidth=r.annotations.outline.strokeWidth,e.beginPath(),e.arc(t.x,t.y,t.size/2,0,2*Math.PI),e.stroke()),g(t)&&(e.fillStyle=r.annotations.symbol.fill,e.beginPath(),e.arc(t.x,t.y,t.size/2,0,2*Math.PI),e.fill()),m(t)&&(e.strokeStyle=r.annotations.outline.stroke,e.lineWidth=r.annotations.outline.strokeWidth,e.beginPath(),e.rect(t.x-t.width/2,t.y-t.height/2,t.width,t.height),e.stroke()),"function"==typeof t.note?t.note(e,{datum:t.datum,x:t.computed.text[0],y:t.computed.text[1],theme:r}):(e.font=r.annotations.text.fontSize+"px "+r.annotations.text.fontFamily,e.textAlign="left",e.textBaseline="alphabetic",e.fillStyle=r.annotations.text.fill,e.strokeStyle=r.annotations.text.outlineColor,e.lineWidth=2*r.annotations.text.outlineWidth,r.annotations.text.outlineWidth>0&&(e.lineJoin="round",e.strokeText(t.note,t.computed.text[0],t.computed.text[1]),e.lineJoin="miter"),e.fillText(t.note,t.computed.text[0],t.computed.text[1]))})),e.restore())}},3296:(e,t,n)=>{"use strict";n.d(t,{Y5:()=>y,ZY:()=>w,xA:()=>x,xu:()=>_});var r=n(9155),i=n(1644),o=n(2555),a=n(2560),s=n(6906),l=n(5485),u=n(4848);function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(this,arguments)}var f=function(e){var t,n=e.axis,r=e.scale,o=e.ticksPosition,a=e.tickValues,s=e.tickSize,u=e.tickPadding,f=e.tickRotation,d=e.truncateTickAt,h=e.engine,p=void 0===h?"svg":h,g=(0,l.fS)(r,a),m=i.ni[p],y="bandwidth"in r?(0,l.ok)(r):r,v={lineX:0,lineY:0},b={textX:0,textY:0},x="object"==typeof document&&"rtl"===document.dir,w=m.align.center,_=m.baseline.center;return"x"===n?(t=function(e){var t;return{x:null!=(t=y(e))?t:0,y:0}},v.lineY=s*("after"===o?1:-1),b.textY=(s+u)*("after"===o?1:-1),_="after"===o?m.baseline.top:m.baseline.bottom,0===f?w=m.align.center:"after"===o&&f<0||"before"===o&&f>0?(w=m.align[x?"left":"right"],_=m.baseline.center):("after"===o&&f>0||"before"===o&&f<0)&&(w=m.align[x?"right":"left"],_=m.baseline.center)):(t=function(e){var t;return{x:0,y:null!=(t=y(e))?t:0}},v.lineX=s*("after"===o?1:-1),b.textX=(s+u)*("after"===o?1:-1),w="after"===o?m.align.left:m.align.right),{ticks:g.map((function(e){var n="string"==typeof e?function(e){var t=String(e).length;return d&&d>0&&t>d?""+String(e).slice(0,d).concat("..."):""+e}(e):e;return c({key:e instanceof Date?""+e.valueOf():""+e,value:n},t(e),v,b)})),textAlign:w,textBaseline:_}},d=function(e,t){if(void 0===e||"function"==typeof e)return e;if("time"===t.type){var n=(0,a.DC)(e);return function(e){return n(e instanceof Date?e:new Date(e))}}return(0,s.GP)(e)},h=function(e){var t,n=e.width,r=e.height,i=e.scale,o=e.axis,a=e.values,s=(t=a,(Array.isArray(t)?a:void 0)||(0,l.fS)(i,a)),u="bandwidth"in i?(0,l.ok)(i):i,c="x"===o?s.map((function(e){var t,n;return{key:e instanceof Date?""+e.valueOf():""+e,x1:null!=(t=u(e))?t:0,x2:null!=(n=u(e))?n:0,y1:0,y2:r}})):s.map((function(e){var t,r;return{key:e instanceof Date?""+e.valueOf():""+e,x1:0,x2:n,y1:null!=(t=u(e))?t:0,y2:null!=(r=u(e))?r:0}}));return c},p=(0,r.memo)((function(e){var t,n=e.value,a=e.format,s=e.lineX,l=e.lineY,f=e.onClick,d=e.textBaseline,h=e.textAnchor,p=e.animatedProps,g=(0,i.DP)(),m=g.axis.ticks.line,y=g.axis.ticks.text,v=null!=(t=null==a?void 0:a(n))?t:n,b=(0,r.useMemo)((function(){var e={opacity:p.opacity};return f?{style:c({},e,{cursor:"pointer"}),onClick:function(e){return f(e,v)}}:{style:e}}),[p.opacity,f,v]);return(0,u.jsxs)(o.CS.g,c({transform:p.transform},b,{children:[(0,u.jsx)("line",{x1:0,x2:s,y1:0,y2:l,style:m}),y.outlineWidth>0&&(0,u.jsx)(o.CS.text,{dominantBaseline:d,textAnchor:h,transform:p.textTransform,style:y,strokeWidth:2*y.outlineWidth,stroke:y.outlineColor,strokeLinejoin:"round",children:""+v}),(0,u.jsx)(o.CS.text,{dominantBaseline:d,textAnchor:h,transform:p.textTransform,style:(0,i.Ou)(y),children:""+v})]}))})),g=(0,r.memo)((function(e){var t=e.axis,n=e.scale,a=e.x,s=void 0===a?0:a,l=e.y,h=void 0===l?0:l,g=e.length,m=e.ticksPosition,y=e.tickValues,v=e.tickSize,b=void 0===v?5:v,x=e.tickPadding,w=void 0===x?5:x,_=e.tickRotation,k=void 0===_?0:_,S=e.format,C=e.renderTick,M=void 0===C?p:C,E=e.truncateTickAt,O=e.legend,T=e.legendPosition,A=void 0===T?"end":T,P=e.legendOffset,j=void 0===P?0:P,R=e.onClick,D=e.ariaHidden,z=(0,i.DP)(),L=z.axis.legend.text,N=(0,r.useMemo)((function(){return d(S,n)}),[S,n]),F=f({axis:t,scale:n,ticksPosition:m,tickValues:y,tickSize:b,tickPadding:w,tickRotation:k,truncateTickAt:E}),I=F.ticks,W=F.textAlign,U=F.textBaseline,q=null;if(void 0!==O){var H,B=0,V=0,$=0;"y"===t?($=-90,B=j,"start"===A?(H="start",V=g):"middle"===A?(H="middle",V=g/2):"end"===A&&(H="end")):(V=j,"start"===A?H="start":"middle"===A?(H="middle",B=g/2):"end"===A&&(H="end",B=g)),q=(0,u.jsxs)(u.Fragment,{children:[L.outlineWidth>0&&(0,u.jsx)("text",{transform:"translate("+B+", "+V+") rotate("+$+")",textAnchor:H,style:c({dominantBaseline:"central"},L),strokeWidth:2*L.outlineWidth,stroke:L.outlineColor,strokeLinejoin:"round",children:O}),(0,u.jsx)("text",{transform:"translate("+B+", "+V+") rotate("+$+")",textAnchor:H,style:c({dominantBaseline:"central"},L),children:O})]})}var Y=(0,i.mk)(),Q=Y.animate,K=Y.config,G=(0,o.zh)({transform:"translate("+s+","+h+")",lineX2:"x"===t?g:0,lineY2:"x"===t?0:g,config:K,immediate:!Q}),X=(0,r.useCallback)((function(e){return{opacity:1,transform:"translate("+e.x+","+e.y+")",textTransform:"translate("+e.textX+","+e.textY+") rotate("+k+")"}}),[k]),Z=(0,r.useCallback)((function(e){return{opacity:0,transform:"translate("+e.x+","+e.y+")",textTransform:"translate("+e.textX+","+e.textY+") rotate("+k+")"}}),[k]),J=(0,o.pn)(I,{keys:function(e){return e.key},initial:X,from:Z,enter:X,update:X,leave:{opacity:0},config:K,immediate:!Q});return(0,u.jsxs)(o.CS.g,{transform:G.transform,"aria-hidden":D,children:[J((function(e,t,n,i){return r.createElement(M,c({tickIndex:i,format:N,rotate:k,textBaseline:U,textAnchor:W,truncateTickAt:E,animatedProps:e},t,R?{onClick:R}:{}))})),(0,u.jsx)(o.CS.line,{style:z.axis.domain.line,x1:0,x2:G.lineX2,y1:0,y2:G.lineY2}),q]})})),m=["top","right","bottom","left"],y=(0,r.memo)((function(e){var t=e.xScale,n=e.yScale,r=e.width,i=e.height,o={top:e.top,right:e.right,bottom:e.bottom,left:e.left};return(0,u.jsx)(u.Fragment,{children:m.map((function(e){var a=o[e];if(!a)return null;var s="top"===e||"bottom"===e;return(0,u.jsx)(g,c({},a,{axis:s?"x":"y",x:"right"===e?r:0,y:"bottom"===e?i:0,scale:s?t:n,length:s?r:i,ticksPosition:"top"===e||"left"===e?"before":"after",truncateTickAt:a.truncateTickAt}),e)}))})})),v=(0,r.memo)((function(e){var t=e.animatedProps,n=(0,i.DP)();return(0,u.jsx)(o.CS.line,c({},t,n.grid.line))})),b=(0,r.memo)((function(e){var t=e.lines,n=(0,i.mk)(),a=n.animate,s=n.config,l=(0,o.pn)(t,{keys:function(e){return e.key},initial:function(e){return{opacity:1,x1:e.x1,x2:e.x2,y1:e.y1,y2:e.y2}},from:function(e){return{opacity:0,x1:e.x1,x2:e.x2,y1:e.y1,y2:e.y2}},enter:function(e){return{opacity:1,x1:e.x1,x2:e.x2,y1:e.y1,y2:e.y2}},update:function(e){return{opacity:1,x1:e.x1,x2:e.x2,y1:e.y1,y2:e.y2}},leave:{opacity:0},config:s,immediate:!a});return(0,u.jsx)("g",{children:l((function(e,t){return(0,r.createElement)(v,c({},t,{key:t.key,animatedProps:e}))}))})})),x=(0,r.memo)((function(e){var t=e.width,n=e.height,i=e.xScale,o=e.yScale,a=e.xValues,s=e.yValues,l=(0,r.useMemo)((function(){return!!i&&h({width:t,height:n,scale:i,axis:"x",values:a})}),[i,a,t,n]),c=(0,r.useMemo)((function(){return!!o&&h({width:t,height:n,scale:o,axis:"y",values:s})}),[n,t,o,s]);return(0,u.jsxs)(u.Fragment,{children:[l&&(0,u.jsx)(b,{lines:l}),c&&(0,u.jsx)(b,{lines:c})]})})),w=function(e,t){var n=t.xScale,r=t.yScale,o=t.width,a=t.height,s=t.top,l=t.right,u=t.bottom,h=t.left,p=t.theme,g={top:s,right:l,bottom:u,left:h};m.forEach((function(t){var s=g[t];if(!s)return null;var l="top"===t||"bottom"===t,u="top"===t||"left"===t?"before":"after",h=l?n:r,m=d(s.format,h);!function(e,t){var n,r=t.axis,o=t.scale,a=t.x,s=void 0===a?0:a,l=t.y,u=void 0===l?0:l,c=t.length,d=t.ticksPosition,h=t.tickValues,p=t.tickSize,g=void 0===p?5:p,m=t.tickPadding,y=void 0===m?5:m,v=t.tickRotation,b=void 0===v?0:v,x=t.format,w=t.legend,_=t.legendPosition,k=void 0===_?"end":_,S=t.legendOffset,C=void 0===S?0:S,M=t.theme,E=f({axis:r,scale:o,ticksPosition:d,tickValues:h,tickSize:g,tickPadding:y,tickRotation:b,engine:"canvas"}),O=E.ticks,T=E.textAlign,A=E.textBaseline;e.save(),e.translate(s,u),e.textAlign=T,e.textBaseline=A;var P=M.axis.ticks.text;e.font=(P.fontWeight?P.fontWeight+" ":"")+P.fontSize+"px "+P.fontFamily,(null!=(n=M.axis.domain.line.strokeWidth)?n:0)>0&&(e.lineWidth=Number(M.axis.domain.line.strokeWidth),e.lineCap="square",M.axis.domain.line.stroke&&(e.strokeStyle=M.axis.domain.line.stroke),e.beginPath(),e.moveTo(0,0),e.lineTo("x"===r?c:0,"x"===r?0:c),e.stroke());var j="function"==typeof x?x:function(e){return""+e};if(O.forEach((function(t){var n;(null!=(n=M.axis.ticks.line.strokeWidth)?n:0)>0&&(e.lineWidth=Number(M.axis.ticks.line.strokeWidth),e.lineCap="square",M.axis.ticks.line.stroke&&(e.strokeStyle=M.axis.ticks.line.stroke),e.beginPath(),e.moveTo(t.x,t.y),e.lineTo(t.x+t.lineX,t.y+t.lineY),e.stroke());var r=j(t.value);e.save(),e.translate(t.x+t.textX,t.y+t.textY),e.rotate((0,i.tR)(b)),P.outlineWidth>0&&(e.strokeStyle=P.outlineColor,e.lineWidth=2*P.outlineWidth,e.lineJoin="round",e.strokeText(""+r,0,0)),M.axis.ticks.text.fill&&(e.fillStyle=P.fill),e.fillText(""+r,0,0),e.restore()})),void 0!==w){var R=0,D=0,z=0,L="center";"y"===r?(z=-90,R=C,"start"===k?(L="start",D=c):"middle"===k?(L="center",D=c/2):"end"===k&&(L="end")):(D=C,"start"===k?L="start":"middle"===k?(L="center",R=c/2):"end"===k&&(L="end",R=c)),e.translate(R,D),e.rotate((0,i.tR)(z)),e.font=(M.axis.legend.text.fontWeight?M.axis.legend.text.fontWeight+" ":"")+M.axis.legend.text.fontSize+"px "+M.axis.legend.text.fontFamily,M.axis.legend.text.fill&&(e.fillStyle=M.axis.legend.text.fill),e.textAlign=L,e.textBaseline="middle",e.fillText(w,0,0)}e.restore()}(e,c({},s,{axis:l?"x":"y",x:"right"===t?o:0,y:"bottom"===t?a:0,scale:h,format:m,length:l?o:a,ticksPosition:u,theme:p}))}))},_=function(e,t){var n=t.width,r=t.height,i=t.scale,o=t.axis,a=t.values;h({width:n,height:r,scale:i,axis:o,values:a}).forEach((function(t){e.beginPath(),e.moveTo(t.x1,t.y1),e.lineTo(t.x2,t.y2),e.stroke()}))}},6502:(e,t,n)=>{"use strict";n.d(t,{yT:()=>be,pN:()=>ve,nz:()=>me,m1:()=>xe});var r=n(6406),i=n(9573),o=n(4025),a=n(6018),s=n(5167),l=n(6786),u=n(2612),c=n(1021),f=n(5006);const d=(0,n(8557).A)("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");var h=n(9505),p=n(9429),g=n(2389),m=n(7680),y=n(9501),v=n(1060),b=n(4704),x=n(6268),w=n(5874),_=n(6476),k=n(4425),S=n(6417),C=n(7666),M=n(9902),E=n(5813),O=n(1632),T=n(2402),A=n(456),P=n(7971),j=n(1223),R=n(5430),D=n(1077),z=n(5961),L=n(6041),N=n(8732),F=n(7616),I=n(4630),W=n(8710),U=n(5988),q=n(6253),H=n(541),B=n(9155),V=n(8156),$=n.n(V),Y=n(1331),Q=n.n(Y),K=n(6957),G=n(5556),X=n.n(G),Z=n(8980),J=n(7991),ee=n(4660),te=n(8849),ne=n(4598);function re(){return re=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},re.apply(this,arguments)}function ie(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var oe={nivo:["#e8c1a0","#f47560","#f1e15b","#e8a838","#61cdbb","#97e3d5"],category10:r.A,accent:i.A,dark2:o.A,paired:a.A,pastel1:s.A,pastel2:l.A,set1:u.A,set2:c.A,set3:f.A,tableau10:d},ae=Object.keys(oe),se={brown_blueGreen:h.K,purpleRed_green:p.K,pink_yellowGreen:g.K,purple_orange:m.K,red_blue:y.K,red_grey:v.K,red_yellow_blue:b.K,red_yellow_green:x.K,spectral:w.K},le=Object.keys(se),ue={brown_blueGreen:h.A,purpleRed_green:p.A,pink_yellowGreen:g.A,purple_orange:m.A,red_blue:y.A,red_grey:v.A,red_yellow_blue:b.A,red_yellow_green:x.A,spectral:w.A},ce={blues:_.K,greens:k.K,greys:S.K,oranges:C.K,purples:M.K,reds:E.K,blue_green:O.K,blue_purple:T.K,green_blue:A.K,orange_red:P.K,purple_blue_green:j.K,purple_blue:R.K,purple_red:D.K,red_purple:z.K,yellow_green_blue:L.K,yellow_green:N.K,yellow_orange_brown:F.K,yellow_orange_red:I.K},fe=Object.keys(ce),de={blues:_.A,greens:k.A,greys:S.A,oranges:C.A,purples:M.A,reds:E.A,turbo:function(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+e*(1172.33-e*(10793.56-e*(33300.12-e*(38394.49-14825.05*e)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+e*(557.33+e*(1225.33-e*(3574.96-e*(1073.77+707.56*e)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+e*(3211.1-e*(15327.97-e*(27814-e*(22569.18-6838.66*e)))))))+")"},viridis:W.Ay,inferno:W.e0,magma:W.uz,plasma:W.pv,cividis:function(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-e*(35.34-e*(2381.73-e*(6402.7-e*(7024.72-2710.57*e)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+e*(170.73+e*(52.82-e*(131.46-e*(176.58-67.37*e)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+e*(442.36-e*(2482.43-e*(6167.24-e*(6614.94-2475.67*e)))))))+")"},warm:U.Ko,cool:U.Ub,cubehelixDefault:q.A,blue_green:O.A,blue_purple:T.A,green_blue:A.A,orange_red:P.A,purple_blue_green:j.A,purple_blue:R.A,purple_red:D.A,red_purple:z.A,yellow_green_blue:L.A,yellow_green:N.A,yellow_orange_brown:F.A,yellow_orange_red:I.A},he=re({},oe,se,ce),pe=(Object.keys(he),re({},ue,de,{rainbow:U.Ay,sinebow:H.A})),ge=(Object.keys(pe),function(e,t){if("function"==typeof e)return e;if(Q()(e)){if(function(e){return void 0!==e.theme}(e)){if(void 0===t)throw new Error("Unable to use color from theme as no theme was provided");var n=$()(t,e.theme);if(void 0===n)throw new Error("Color from theme is undefined at path: '"+e.theme+"'");return function(){return n}}if(function(e){return void 0!==e.from}(e)){var r=function(t){return $()(t,e.from)};if(Array.isArray(e.modifiers)){for(var i,o=[],a=function(){var e=i.value,t=e[0],n=e[1];if("brighter"===t)o.push((function(e){return e.brighter(n)}));else if("darker"===t)o.push((function(e){return e.darker(n)}));else{if("opacity"!==t)throw new Error("Invalid color modifier: '"+t+"', must be one of: 'brighter', 'darker', 'opacity'");o.push((function(e){return e.opacity=n,e}))}},s=function(e){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(t)return(t=t.call(e)).next.bind(t);if(Array.isArray(e)||(t=function(e,t){if(e){if("string"==typeof e)return ie(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ie(e,t):void 0}}(e))){t&&(e=t);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e.modifiers);!(i=s()).done;)a();return 0===o.length?r:function(e){return o.reduce((function(e,t){return t(e)}),(0,K.Qh)(r(e))).toString()}}return r}throw new Error("Invalid color spec, you should either specify 'theme' or 'from' when using a config object")}return function(){return e}}),me=function(e,t){return(0,B.useMemo)((function(){return ge(e,t)}),[e,t])},ye=(X().oneOfType([X().string,X().func,X().shape({theme:X().string.isRequired}),X().shape({from:X().string.isRequired,modifiers:X().arrayOf(X().array)})]),"turbo"),ve=function(e,t){if(function(e){return"sequential"===e.type}(e))return function(e,t){var n=e.minValue,r=e.maxValue,i=void 0!==n?n:t.min,o=void 0!==r?r:t.max,a=(0,Z.Ay)().domain([i,o]).clamp(!0);if("colors"in e)a.range(e.colors);else if("interpolator"in e)a.interpolator(e.interpolator);else{var s,l=null!=(s=e.scheme)?s:ye;a.interpolator(pe[l])}return a}(e,t);if(function(e){return"diverging"===e.type}(e))return function(e,t){var n,r=e.minValue,i=e.maxValue,o=void 0!==r?r:t.min,a=void 0!==i?i:t.max,s=[o,o+(a-o)/2,a],l=.5-(null!=(n=e.divergeAt)?n:.5),u=(0,J.Ay)().domain(s).clamp(!0),c=function(e){return String(e)};if("colors"in e)c=(0,J.Ay)().domain(s.map((function(e){return e-l*(a-o)}))).range(e.colors).interpolator();else if("interpolator"in e)c=e.interpolator;else{var f,d=null!=(f=e.scheme)?f:"red_yellow_blue";c=pe[d]}return u.interpolator((function(e){return c(e+l)}))}(e,t);if(function(e){return"quantize"===e.type}(e))return function(e,t){var n=(0,ee.A)().domain(e.domain||[t.min,t.max]).nice();if("colors"in e)n.range(e.colors);else{var r=e.scheme||"turbo",i=void 0===e.steps?7:e.steps,o=pe[r],a=Array.from({length:i}).map((function(e,t){return o(t*(1/(i-1)))}));n.range(a)}return n}(e,t);throw new Error("Invalid continuous color scale config")},be=function(e,t){void 0===t&&(t=16);var n=e.domain();if("thresholds"in e){var r=[],i=(0,te.A)().domain(n).range([0,1]);return e.range().forEach((function(t,n){var o=e.invertExtent(t),a=o[0],s=o[1];r.push({key:n+".0",offset:i(a),stopColor:t}),r.push({key:n+".1",offset:i(s),stopColor:t})})),r}var o=e.copy();return 2===n.length?o.domain([0,1]):3===n.length&&o.domain([0,.5,1]),o.ticks(t).map((function(e){return{key:""+e,offset:e,stopColor:""+o(e)}}))},xe=function(e,t){return(0,B.useMemo)((function(){return function(e,t){if("function"==typeof e)return e;var n="function"==typeof t?t:function(e){return $()(e,t)};if(Array.isArray(e)){var r=(0,ne.A)(e),i=function(e){return r(n(e))};return i.scale=r,i}if(Q()(e)){if(function(e){return void 0!==e.datum}(e))return function(t){return $()(t,e.datum)};if(function(e){return void 0!==e.scheme}(e)){if(function(e){return ae.includes(e)}(e.scheme)){var o=(0,ne.A)(he[e.scheme]),a=function(e){return o(n(e))};return a.scale=o,a}if(function(e){return le.includes(e)}(e.scheme)){if(void 0!==e.size&&(e.size<3||e.size>11))throw new Error("Invalid size '"+e.size+"' for diverging color scheme '"+e.scheme+"', must be between 3~11");var s=(0,ne.A)(he[e.scheme][e.size||11]),l=function(e){return s(n(e))};return l.scale=s,l}if(function(e){return fe.includes(e)}(e.scheme)){if(void 0!==e.size&&(e.size<3||e.size>9))throw new Error("Invalid size '"+e.size+"' for sequential color scheme '"+e.scheme+"', must be between 3~9");var u=(0,ne.A)(he[e.scheme][e.size||9]),c=function(e){return u(n(e))};return c.scale=u,c}}throw new Error("Invalid colors, when using an object, you should either pass a 'datum' or a 'scheme' property")}return function(){return e}}(e,t)}),[e,t])}},1644:(e,t,n)=>{"use strict";n.d(t,{U9:()=>sn,mc:()=>Dt,sg:()=>nn,KF:()=>zt,Ge:()=>Zt,mQ:()=>Ht,kc:()=>vn,Lp:()=>vt,kT:()=>wt,tR:()=>Wt,Yf:()=>hn,gD:()=>cn,x:()=>fn,H9:()=>gn,gC:()=>St,u7:()=>pn,B2:()=>qt,nv:()=>Ut,Ou:()=>Pt,ni:()=>Bt,wA:()=>ht,Xl:()=>_t,W_:()=>kt,mk:()=>dt,Ob:()=>dn,DP:()=>Tt,d_:()=>Ct,Ub:()=>un});var r=n(9155),i=n(5556),o=n.n(i),a=n(956),s=n(5364),l=n.n(s),u=n(8156),c=n.n(u),f=n(3560),d=n.n(f),h=n(7737),p=n(2555),g=n(5015),m=n.n(g),y=n(4848),v=n(8090),b=n.n(v),x=(n(6449),n(4598)),w=n(9505),_=n(9429),k=n(2389),S=n(7680),C=n(9501),M=n(1060),E=n(4704),O=n(6268),T=n(5874),A=n(6476),P=n(4425),j=n(6417),R=n(7666),D=n(9902),z=n(5813),L=n(1632),N=n(2402),F=n(456),I=n(7971),W=n(1223),U=n(5430),q=n(1077),H=n(5961),B=n(6041),V=n(8732),$=n(7616),Y=n(4630),Q=n(6406),K=n(9573),G=n(4025),X=n(6018),Z=n(5167),J=n(6786),ee=n(2612),te=n(1021),ne=n(5006),re=n(8710),ie=n(5988),oe=n(6253),ae=n(541),se=n(1882),le=n.n(se),ue=n(1648),ce=n.n(ue);function fe(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function de(e){this._context=e}function he(){}function pe(e){this._context=e}function ge(e){this._context=e}function me(e,t){this._basis=new de(e),this._beta=t}de.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:fe(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:fe(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},pe.prototype={areaStart:he,areaEnd:he,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:fe(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},ge.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:fe(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},me.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r,i=e[0],o=t[0],a=e[n]-i,s=t[n]-o,l=-1;++l<=n;)r=l/n,this._basis.point(this._beta*e[l]+(1-this._beta)*(i+r*a),this._beta*t[l]+(1-this._beta)*(o+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const ye=function e(t){function n(e){return 1===t?new de(e):new me(e,t)}return n.beta=function(t){return e(+t)},n}(.85);function ve(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function be(e,t){this._context=e,this._k=(1-t)/6}be.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:ve(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:ve(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const xe=function e(t){function n(e){return new be(e,t)}return n.tension=function(t){return e(+t)},n}(0);function we(e,t){this._context=e,this._k=(1-t)/6}we.prototype={areaStart:he,areaEnd:he,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:ve(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const _e=function e(t){function n(e){return new we(e,t)}return n.tension=function(t){return e(+t)},n}(0);function ke(e,t){this._context=e,this._k=(1-t)/6}ke.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:ve(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Se=function e(t){function n(e){return new ke(e,t)}return n.tension=function(t){return e(+t)},n}(0);function Ce(e,t,n){var r=e._x1,i=e._y1,o=e._x2,a=e._y2;if(e._l01_a>1e-12){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>1e-12){var u=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,c=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*u+e._x1*e._l23_2a-t*e._l12_2a)/c,a=(a*u+e._y1*e._l23_2a-n*e._l12_2a)/c}e._context.bezierCurveTo(r,i,o,a,e._x2,e._y2)}function Me(e,t){this._context=e,this._alpha=t}Math.abs,Math.atan2,Math.cos,Math.max,Math.min,Math.sin,Math.sqrt,Math.PI,Me.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Ce(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Ee=function e(t){function n(e){return t?new Me(e,t):new be(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function Oe(e,t){this._context=e,this._alpha=t}Oe.prototype={areaStart:he,areaEnd:he,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Ce(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Te=function e(t){function n(e){return t?new Oe(e,t):new we(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function Ae(e,t){this._context=e,this._alpha=t}Ae.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ce(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Pe=function e(t){function n(e){return t?new Ae(e,t):new ke(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);var je=n(6343);function Re(e){this._context=e}function De(e){return e<0?-1:1}function ze(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(De(o)+De(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function Le(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Ne(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function Fe(e){this._context=e}function Ie(e){this._context=new We(e)}function We(e){this._context=e}function Ue(e){this._context=e}function qe(e){var t,n,r=e.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/o[t-1],o[t]-=n,a[t]-=n*a[t-1];for(i[r-1]=a[r-1]/o[r-1],t=r-2;t>=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function He(e,t){this._context=e,this._t=t}Re.prototype={areaStart:he,areaEnd:he,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}},Fe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Ne(this,this._t0,Le(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Ne(this,Le(this,n=ze(this,e,t)),n);break;default:Ne(this,this._t0,n=ze(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(Ie.prototype=Object.create(Fe.prototype)).point=function(e,t){Fe.prototype.point.call(this,t,e)},We.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}},Ue.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=qe(e),i=qe(t),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],e[a],t[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},He.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};var Be=n(4873);function Ve(e){var t=e.map($e);return(0,Be.A)(e).sort((function(e,n){return t[e]-t[n]}))}function $e(e){for(var t,n=0,r=-1,i=e.length;++r<i;)(t=+e[r][1])&&(n+=t);return n}function Ye(e){for(var t,n=-1,r=0,i=e.length,o=-1/0;++n<i;)(t=+e[n][1])>o&&(o=t,r=n);return r}var Qe=n(3414),Ke=n(8801),Ge=n(6906),Xe=n(2560),Ze=n(1331),Je=n.n(Ze),et=n(4383),tt=n.n(et),nt=n(2404),rt=n.n(nt),it={background:"transparent",text:{fontFamily:"sans-serif",fontSize:11,fill:"#333333",outlineWidth:0,outlineColor:"transparent",outlineOpacity:1},axis:{domain:{line:{stroke:"transparent",strokeWidth:1}},ticks:{line:{stroke:"#777777",strokeWidth:1},text:{}},legend:{text:{fontSize:12}}},grid:{line:{stroke:"#dddddd",strokeWidth:1}},legends:{hidden:{symbol:{fill:"#333333",opacity:.6},text:{fill:"#333333",opacity:.6}},text:{},ticks:{line:{stroke:"#777777",strokeWidth:1},text:{fontSize:10}},title:{text:{}}},labels:{text:{}},markers:{lineColor:"#000000",lineStrokeWidth:1,text:{}},dots:{text:{}},tooltip:{container:{background:"white",color:"inherit",fontSize:"inherit",borderRadius:"2px",boxShadow:"0 1px 2px rgba(0, 0, 0, 0.25)",padding:"5px 9px"},basic:{whiteSpace:"pre",display:"flex",alignItems:"center"},chip:{marginRight:7},table:{},tableCell:{padding:"3px 5px"},tableCellValue:{fontWeight:"bold"}},crosshair:{line:{stroke:"#000000",strokeWidth:1,strokeOpacity:.75,strokeDasharray:"6 6"}},annotations:{text:{fontSize:13,outlineWidth:2,outlineColor:"#ffffff",outlineOpacity:1},link:{stroke:"#000000",strokeWidth:1,outlineWidth:2,outlineColor:"#ffffff",outlineOpacity:1},outline:{fill:"none",stroke:"#000000",strokeWidth:2,outlineWidth:2,outlineColor:"#ffffff",outlineOpacity:1},symbol:{fill:"#000000",outlineWidth:2,outlineColor:"#ffffff",outlineOpacity:1}}};function ot(){return ot=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ot.apply(this,arguments)}function at(e,t){return at=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},at(e,t)}function st(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var lt=["axis.ticks.text","axis.legend.text","legends.title.text","legends.text","legends.ticks.text","legends.title.text","labels.text","dots.text","markers.text","annotations.text"],ut=(0,r.createContext)(),ct=function(e){var t=e.children,n=e.animate,i=void 0===n||n,o=e.config,a=void 0===o?"default":o,s=(0,r.useMemo)((function(){var e=m()(a)?p.$W[a]:a;return{animate:i,config:e}}),[i,a]);return(0,y.jsx)(ut.Provider,{value:s,children:t})},ft={animate:o().bool,motionConfig:o().oneOfType([o().oneOf(Object.keys(p.$W)),o().shape({mass:o().number,tension:o().number,friction:o().number,clamp:o().bool,precision:o().number,velocity:o().number,duration:o().number,easing:o().func})])};ct.propTypes={children:o().node.isRequired,animate:ft.animate,config:ft.motionConfig};var dt=function(){return(0,r.useContext)(ut)},ht=function(e){var t=dt(),n=t.animate,i=t.config,o=function(e){var t=(0,r.useRef)();return(0,r.useEffect)((function(){t.current=e}),[e]),t.current}(e),a=(0,r.useMemo)((function(){return(0,h.A)(o,e)}),[o,e]),s=(0,p.zh)({from:{value:0},to:{value:1},reset:!0,config:i,immediate:!n}).value;return(0,p.to)(s,a)},pt={nivo:["#d76445","#f47560","#e8c1a0","#97e3d5","#61cdbb","#00b0a7"],BrBG:b()(w.K),PRGn:b()(_.K),PiYG:b()(k.K),PuOr:b()(S.K),RdBu:b()(C.K),RdGy:b()(M.K),RdYlBu:b()(E.K),RdYlGn:b()(O.K),spectral:b()(T.K),blues:b()(A.K),greens:b()(P.K),greys:b()(j.K),oranges:b()(R.K),purples:b()(D.K),reds:b()(z.K),BuGn:b()(L.K),BuPu:b()(N.K),GnBu:b()(F.K),OrRd:b()(I.K),PuBuGn:b()(W.K),PuBu:b()(U.K),PuRd:b()(q.K),RdPu:b()(H.K),YlGnBu:b()(B.K),YlGn:b()(V.K),YlOrBr:b()($.K),YlOrRd:b()(Y.K)},gt=Object.keys(pt),mt=(Q.A,K.A,G.A,X.A,Z.A,J.A,ee.A,te.A,ne.A,b()(w.K),b()(_.K),b()(k.K),b()(S.K),b()(C.K),b()(M.K),b()(E.K),b()(O.K),b()(T.K),b()(A.K),b()(P.K),b()(j.K),b()(R.K),b()(D.K),b()(z.K),b()(L.K),b()(N.K),b()(F.K),b()(I.K),b()(W.K),b()(U.K),b()(q.K),b()(H.K),b()(B.K),b()(V.K),b()($.K),b()(Y.K),w.A,_.A,k.A,S.A,C.A,M.A,E.A,O.A,T.A,A.A,P.A,j.A,R.A,D.A,z.A,re.Ay,re.e0,re.uz,re.pv,ie.Ko,ie.Ub,oe.A,L.A,N.A,F.A,I.A,W.A,U.A,q.A,H.A,B.A,V.A,$.A,Y.A,ie.Ay,ae.A,o().oneOfType([o().oneOf(gt),o().func,o().arrayOf(o().string)]),{basis:function(e){return new de(e)},basisClosed:function(e){return new pe(e)},basisOpen:function(e){return new ge(e)},bundle:ye,cardinal:xe,cardinalClosed:_e,cardinalOpen:Se,catmullRom:Ee,catmullRomClosed:Te,catmullRomOpen:Pe,linear:je.A,linearClosed:function(e){return new Re(e)},monotoneX:function(e){return new Fe(e)},monotoneY:function(e){return new Ie(e)},natural:function(e){return new Ue(e)},step:function(e){return new He(e,.5)},stepAfter:function(e){return new He(e,1)},stepBefore:function(e){return new He(e,0)}}),yt=Object.keys(mt),vt=(yt.filter((function(e){return e.endsWith("Closed")})),ce()(yt,"bundle","basisClosed","basisOpen","cardinalClosed","cardinalOpen","catmullRomClosed","catmullRomOpen","linearClosed"),ce()(yt,"bundle","basisClosed","basisOpen","cardinalClosed","cardinalOpen","catmullRomClosed","catmullRomOpen","linearClosed"),function(e){if(!mt[e])throw new TypeError("'"+e+"', is not a valid curve interpolator identifier.");return mt[e]}),bt={ascending:Ve,descending:function(e){return Ve(e).reverse()},insideOut:function(e){var t,n,r=e.length,i=e.map($e),o=function(e){var t=e.map(Ye);return(0,Be.A)(e).sort((function(e,n){return t[e]-t[n]}))}(e),a=0,s=0,l=[],u=[];for(t=0;t<r;++t)n=o[t],a<s?(a+=i[n],l.push(n)):(s+=i[n],u.push(n));return u.reverse().concat(l)},none:Be.A,reverse:function(e){return(0,Be.A)(e).reverse()}},xt=(Object.keys(bt),{expand:function(e,t){if((r=e.length)>0){for(var n,r,i,o=0,a=e[0].length;o<a;++o){for(i=n=0;n<r;++n)i+=e[n][o][1]||0;if(i)for(n=0;n<r;++n)e[n][o][1]/=i}(0,Qe.A)(e,t)}},diverging:Ke.A,none:Qe.A,silhouette:function(e,t){if((n=e.length)>0){for(var n,r=0,i=e[t[0]],o=i.length;r<o;++r){for(var a=0,s=0;a<n;++a)s+=e[a][r][1]||0;i[r][1]+=i[r][0]=-s/2}(0,Qe.A)(e,t)}},wiggle:function(e,t){if((i=e.length)>0&&(r=(n=e[t[0]]).length)>0){for(var n,r,i,o=0,a=1;a<r;++a){for(var s=0,l=0,u=0;s<i;++s){for(var c=e[t[s]],f=c[a][1]||0,d=(f-(c[a-1][1]||0))/2,h=0;h<s;++h){var p=e[t[h]];d+=(p[a][1]||0)-(p[a-1][1]||0)}l+=f,u+=d*f}n[a-1][1]+=n[a-1][0]=o,l&&(o-=u/l)}n[a-1][1]+=n[a-1][0]=o,(0,Qe.A)(e,t)}}}),wt=(Object.keys(xt),o().shape({top:o().number,right:o().number,bottom:o().number,left:o().number}).isRequired,o().oneOf(["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]),(0,x.A)(ne.A),{top:0,right:0,bottom:0,left:0}),_t=function(e,t,n){return void 0===n&&(n={}),(0,r.useMemo)((function(){var r=ot({},wt,n);return{margin:r,innerWidth:e-r.left-r.right,innerHeight:t-r.top-r.bottom,outerWidth:e,outerHeight:t}}),[e,t,n.top,n.right,n.bottom,n.left])},kt=function(){var e=(0,r.useRef)(null),t=(0,r.useState)({left:0,top:0,width:0,height:0}),n=t[0],i=t[1],o=(0,r.useState)((function(){return"undefined"==typeof ResizeObserver?null:new ResizeObserver((function(e){var t=e[0];return i(t.contentRect)}))}))[0];return(0,r.useEffect)((function(){return e.current&&null!==o&&o.observe(e.current),function(){null!==o&&o.disconnect()}}),[]),[e,n]},St=function(e){return"function"==typeof e?e:"string"==typeof e?0===e.indexOf("time:")?(0,Xe.DC)(e.slice("5")):(0,Ge.GP)(e):function(e){return""+e}},Ct=function(e){return(0,r.useMemo)((function(){return St(e)}),[e])},Mt=(0,r.createContext)(),Et={},Ot=function(e){var t=e.theme,n=void 0===t?Et:t,i=e.children,o=function(e){return(0,r.useMemo)((function(){return function(e,t){var n=l()({},e,t);return lt.forEach((function(e){d()(n,e,function(e,t){return ot({},t,e)}(c()(n,e),n.text))})),n}(it,e)}),[e])}(n);return(0,y.jsx)(Mt.Provider,{value:o,children:i})};Ot.propTypes={children:o().node.isRequired,theme:o().object};var Tt=function(){return(0,r.useContext)(Mt)},At=["outlineWidth","outlineColor","outlineOpacity"],Pt=function(e){return e.outlineWidth,e.outlineColor,e.outlineOpacity,st(e,At)},jt=function(e){var t=e.children,n=e.condition,i=e.wrapper;return n?(0,r.cloneElement)(i,{},t):t};jt.propTypes={children:o().node.isRequired,condition:o().bool.isRequired,wrapper:o().element.isRequired};var Rt={position:"relative"},Dt=function(e){var t=e.children,n=e.theme,i=e.renderWrapper,o=void 0===i||i,s=e.isInteractive,l=void 0===s||s,u=e.animate,c=e.motionConfig,f=(0,r.useRef)(null);return(0,y.jsx)(Ot,{theme:n,children:(0,y.jsx)(ct,{animate:u,config:c,children:(0,y.jsx)(a.Bc,{container:f,children:(0,y.jsxs)(jt,{condition:o,wrapper:(0,y.jsx)("div",{style:Rt,ref:f}),children:[t,l&&(0,y.jsx)(a.m_,{})]})})})})};Dt.propTypes={children:o().element.isRequired,isInteractive:o().bool,renderWrapper:o().bool,theme:o().object,animate:o().bool,motionConfig:o().oneOfType([o().string,ft.motionConfig])},o().func.isRequired,o().bool,o().bool,o().object.isRequired,o().bool.isRequired,o().oneOfType([o().string,ft.motionConfig]);var zt=function(e){var t=e.children,n=kt(),r=n[0],i=n[1],o=i.width>0&&i.height>0;return(0,y.jsx)("div",{ref:r,style:{width:"100%",height:"100%"},children:o&&t({width:i.width,height:i.height})})};zt.propTypes={children:o().func.isRequired};var Lt=["id","colors"],Nt=function(e){var t=e.id,n=e.colors,r=st(e,Lt);return(0,y.jsx)("linearGradient"