@spscommerce/ds-react-charts 8.21.0 → 8.21.2
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/lib/index.umd.cjs +239 -0
- package/package.json +13 -13
- package/vite.config.mjs +2 -2
- package/lib/index.cjs.js +0 -239
- /package/lib/{index.es.js → index.js} +0 -0
package/lib/index.cjs.js
DELETED
@@ -1,239 +0,0 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react"),fr=require("@spscommerce/ds-colors"),On=require("@spscommerce/ds-react"),rt=require("@spscommerce/utils"),Tu=require("react-dom");function Ou(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const D=Ou(g),de=Ou(fr);var tr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Yt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ct(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,a.get?a:{enumerable:!0,get:function(){return e[r]}})}),n}var Yi={exports:{}},nr={exports:{}},re={};/** @license React v16.13.1
|
2
|
-
* react-is.production.min.js
|
3
|
-
*
|
4
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
5
|
-
*
|
6
|
-
* This source code is licensed under the MIT license found in the
|
7
|
-
* LICENSE file in the root directory of this source tree.
|
8
|
-
*/var Ms;function Qh(){if(Ms)return re;Ms=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,o=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,d=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,m=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function _(y){if(typeof y=="object"&&y!==null){var w=y.$$typeof;switch(w){case t:switch(y=y.type,y){case l:case u:case r:case i:case a:case f:return y;default:switch(y=y&&y.$$typeof,y){case o:case c:case d:case p:case s:return y;default:return w}}case n:return w}}}function M(y){return _(y)===u}return re.AsyncMode=l,re.ConcurrentMode=u,re.ContextConsumer=o,re.ContextProvider=s,re.Element=t,re.ForwardRef=c,re.Fragment=r,re.Lazy=d,re.Memo=p,re.Portal=n,re.Profiler=i,re.StrictMode=a,re.Suspense=f,re.isAsyncMode=function(y){return M(y)||_(y)===l},re.isConcurrentMode=M,re.isContextConsumer=function(y){return _(y)===o},re.isContextProvider=function(y){return _(y)===s},re.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===t},re.isForwardRef=function(y){return _(y)===c},re.isFragment=function(y){return _(y)===r},re.isLazy=function(y){return _(y)===d},re.isMemo=function(y){return _(y)===p},re.isPortal=function(y){return _(y)===n},re.isProfiler=function(y){return _(y)===i},re.isStrictMode=function(y){return _(y)===a},re.isSuspense=function(y){return _(y)===f},re.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===r||y===u||y===i||y===a||y===f||y===h||typeof y=="object"&&y!==null&&(y.$$typeof===d||y.$$typeof===p||y.$$typeof===s||y.$$typeof===o||y.$$typeof===c||y.$$typeof===x||y.$$typeof===m||y.$$typeof===b||y.$$typeof===v)},re.typeOf=_,re}var ie={};/** @license React v16.13.1
|
9
|
-
* react-is.development.js
|
10
|
-
*
|
11
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
12
|
-
*
|
13
|
-
* This source code is licensed under the MIT license found in the
|
14
|
-
* LICENSE file in the root directory of this source tree.
|
15
|
-
*/var $s;function Jh(){return $s||($s=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,o=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,d=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,m=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function _(O){return typeof O=="string"||typeof O=="function"||O===r||O===u||O===i||O===a||O===f||O===h||typeof O=="object"&&O!==null&&(O.$$typeof===d||O.$$typeof===p||O.$$typeof===s||O.$$typeof===o||O.$$typeof===c||O.$$typeof===x||O.$$typeof===m||O.$$typeof===b||O.$$typeof===v)}function M(O){if(typeof O=="object"&&O!==null){var Q=O.$$typeof;switch(Q){case t:var te=O.type;switch(te){case l:case u:case r:case i:case a:case f:return te;default:var le=te&&te.$$typeof;switch(le){case o:case c:case d:case p:case s:return le;default:return Q}}case n:return Q}}}var y=l,w=u,T=o,$=s,k=t,C=c,P=r,N=d,L=p,I=n,X=i,U=a,Z=f,J=!1;function K(O){return J||(J=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),E(O)||M(O)===l}function E(O){return M(O)===u}function A(O){return M(O)===o}function B(O){return M(O)===s}function W(O){return typeof O=="object"&&O!==null&&O.$$typeof===t}function j(O){return M(O)===c}function F(O){return M(O)===r}function q(O){return M(O)===d}function Y(O){return M(O)===p}function V(O){return M(O)===n}function R(O){return M(O)===i}function z(O){return M(O)===a}function H(O){return M(O)===f}ie.AsyncMode=y,ie.ConcurrentMode=w,ie.ContextConsumer=T,ie.ContextProvider=$,ie.Element=k,ie.ForwardRef=C,ie.Fragment=P,ie.Lazy=N,ie.Memo=L,ie.Portal=I,ie.Profiler=X,ie.StrictMode=U,ie.Suspense=Z,ie.isAsyncMode=K,ie.isConcurrentMode=E,ie.isContextConsumer=A,ie.isContextProvider=B,ie.isElement=W,ie.isForwardRef=j,ie.isFragment=F,ie.isLazy=q,ie.isMemo=Y,ie.isPortal=V,ie.isProfiler=R,ie.isStrictMode=z,ie.isSuspense=H,ie.isValidElementType=_,ie.typeOf=M}()),ie}var Cs;function ku(){return Cs||(Cs=1,process.env.NODE_ENV==="production"?nr.exports=Qh():nr.exports=Jh()),nr.exports}/*
|
16
|
-
object-assign
|
17
|
-
(c) Sindre Sorhus
|
18
|
-
@license MIT
|
19
|
-
*/var di,Es;function ed(){if(Es)return di;Es=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function a(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var s={},o=0;o<10;o++)s["_"+String.fromCharCode(o)]=o;var l=Object.getOwnPropertyNames(s).map(function(c){return s[c]});if(l.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(c){u[c]=c}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return di=a()?Object.assign:function(i,s){for(var o,l=r(i),u,c=1;c<arguments.length;c++){o=Object(arguments[c]);for(var f in o)t.call(o,f)&&(l[f]=o[f]);if(e){u=e(o);for(var h=0;h<u.length;h++)n.call(o,u[h])&&(l[u[h]]=o[u[h]])}}return l},di}var pi,Ps;function Va(){if(Ps)return pi;Ps=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return pi=e,pi}var vi,Ns;function Mu(){return Ns||(Ns=1,vi=Function.call.bind(Object.prototype.hasOwnProperty)),vi}var mi,Rs;function td(){if(Rs)return mi;Rs=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Va(),n={},r=Mu();e=function(i){var s="Warning: "+i;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function a(i,s,o,l,u){if(process.env.NODE_ENV!=="production"){for(var c in i)if(r(i,c)){var f;try{if(typeof i[c]!="function"){var h=Error((l||"React class")+": "+o+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}f=i[c](s,c,l,o,null,t)}catch(d){f=d}if(f&&!(f instanceof Error)&&e((l||"React class")+": type specification of "+o+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var p=u?u():"";e("Failed "+o+" type: "+f.message+(p??""))}}}}return a.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},mi=a,mi}var gi,Ls;function nd(){if(Ls)return gi;Ls=1;var e=ku(),t=ed(),n=Va(),r=Mu(),a=td(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(o){var l="Warning: "+o;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function s(){return null}return gi=function(o,l){var u=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function f(E){var A=E&&(u&&E[u]||E[c]);if(typeof A=="function")return A}var h="<<anonymous>>",p={array:m("array"),bigint:m("bigint"),bool:m("boolean"),func:m("function"),number:m("number"),object:m("object"),string:m("string"),symbol:m("symbol"),any:b(),arrayOf:_,element:M(),elementType:y(),instanceOf:w,node:C(),objectOf:$,oneOf:T,oneOfType:k,shape:N,exact:L};function d(E,A){return E===A?E!==0||1/E===1/A:E!==E&&A!==A}function v(E,A){this.message=E,this.data=A&&typeof A=="object"?A:{},this.stack=""}v.prototype=Error.prototype;function x(E){if(process.env.NODE_ENV!=="production")var A={},B=0;function W(F,q,Y,V,R,z,H){if(V=V||h,z=z||Y,H!==n){if(l){var O=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw O.name="Invariant Violation",O}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Q=V+":"+Y;!A[Q]&&B<3&&(i("You are manually calling a React.PropTypes validation function for the `"+z+"` prop on `"+V+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),A[Q]=!0,B++)}}return q[Y]==null?F?q[Y]===null?new v("The "+R+" `"+z+"` is marked as required "+("in `"+V+"`, but its value is `null`.")):new v("The "+R+" `"+z+"` is marked as required in "+("`"+V+"`, but its value is `undefined`.")):null:E(q,Y,V,R,z)}var j=W.bind(null,!1);return j.isRequired=W.bind(null,!0),j}function m(E){function A(B,W,j,F,q,Y){var V=B[W],R=U(V);if(R!==E){var z=Z(V);return new v("Invalid "+F+" `"+q+"` of type "+("`"+z+"` supplied to `"+j+"`, expected ")+("`"+E+"`."),{expectedType:E})}return null}return x(A)}function b(){return x(s)}function _(E){function A(B,W,j,F,q){if(typeof E!="function")return new v("Property `"+q+"` of component `"+j+"` has invalid PropType notation inside arrayOf.");var Y=B[W];if(!Array.isArray(Y)){var V=U(Y);return new v("Invalid "+F+" `"+q+"` of type "+("`"+V+"` supplied to `"+j+"`, expected an array."))}for(var R=0;R<Y.length;R++){var z=E(Y,R,j,F,q+"["+R+"]",n);if(z instanceof Error)return z}return null}return x(A)}function M(){function E(A,B,W,j,F){var q=A[B];if(!o(q)){var Y=U(q);return new v("Invalid "+j+" `"+F+"` of type "+("`"+Y+"` supplied to `"+W+"`, expected a single ReactElement."))}return null}return x(E)}function y(){function E(A,B,W,j,F){var q=A[B];if(!e.isValidElementType(q)){var Y=U(q);return new v("Invalid "+j+" `"+F+"` of type "+("`"+Y+"` supplied to `"+W+"`, expected a single ReactElement type."))}return null}return x(E)}function w(E){function A(B,W,j,F,q){if(!(B[W]instanceof E)){var Y=E.name||h,V=K(B[W]);return new v("Invalid "+F+" `"+q+"` of type "+("`"+V+"` supplied to `"+j+"`, expected ")+("instance of `"+Y+"`."))}return null}return x(A)}function T(E){if(!Array.isArray(E))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),s;function A(B,W,j,F,q){for(var Y=B[W],V=0;V<E.length;V++)if(d(Y,E[V]))return null;var R=JSON.stringify(E,function(H,O){var Q=Z(O);return Q==="symbol"?String(O):O});return new v("Invalid "+F+" `"+q+"` of value `"+String(Y)+"` "+("supplied to `"+j+"`, expected one of "+R+"."))}return x(A)}function $(E){function A(B,W,j,F,q){if(typeof E!="function")return new v("Property `"+q+"` of component `"+j+"` has invalid PropType notation inside objectOf.");var Y=B[W],V=U(Y);if(V!=="object")return new v("Invalid "+F+" `"+q+"` of type "+("`"+V+"` supplied to `"+j+"`, expected an object."));for(var R in Y)if(r(Y,R)){var z=E(Y,R,j,F,q+"."+R,n);if(z instanceof Error)return z}return null}return x(A)}function k(E){if(!Array.isArray(E))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var A=0;A<E.length;A++){var B=E[A];if(typeof B!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+J(B)+" at index "+A+"."),s}function W(j,F,q,Y,V){for(var R=[],z=0;z<E.length;z++){var H=E[z],O=H(j,F,q,Y,V,n);if(O==null)return null;O.data&&r(O.data,"expectedType")&&R.push(O.data.expectedType)}var Q=R.length>0?", expected one of type ["+R.join(", ")+"]":"";return new v("Invalid "+Y+" `"+V+"` supplied to "+("`"+q+"`"+Q+"."))}return x(W)}function C(){function E(A,B,W,j,F){return I(A[B])?null:new v("Invalid "+j+" `"+F+"` supplied to "+("`"+W+"`, expected a ReactNode."))}return x(E)}function P(E,A,B,W,j){return new v((E||"React class")+": "+A+" type `"+B+"."+W+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+j+"`.")}function N(E){function A(B,W,j,F,q){var Y=B[W],V=U(Y);if(V!=="object")return new v("Invalid "+F+" `"+q+"` of type `"+V+"` "+("supplied to `"+j+"`, expected `object`."));for(var R in E){var z=E[R];if(typeof z!="function")return P(j,F,q,R,Z(z));var H=z(Y,R,j,F,q+"."+R,n);if(H)return H}return null}return x(A)}function L(E){function A(B,W,j,F,q){var Y=B[W],V=U(Y);if(V!=="object")return new v("Invalid "+F+" `"+q+"` of type `"+V+"` "+("supplied to `"+j+"`, expected `object`."));var R=t({},B[W],E);for(var z in R){var H=E[z];if(r(E,z)&&typeof H!="function")return P(j,F,q,z,Z(H));if(!H)return new v("Invalid "+F+" `"+q+"` key `"+z+"` supplied to `"+j+"`.\nBad object: "+JSON.stringify(B[W],null," ")+`
|
20
|
-
Valid keys: `+JSON.stringify(Object.keys(E),null," "));var O=H(Y,z,j,F,q+"."+z,n);if(O)return O}return null}return x(A)}function I(E){switch(typeof E){case"number":case"string":case"undefined":return!0;case"boolean":return!E;case"object":if(Array.isArray(E))return E.every(I);if(E===null||o(E))return!0;var A=f(E);if(A){var B=A.call(E),W;if(A!==E.entries){for(;!(W=B.next()).done;)if(!I(W.value))return!1}else for(;!(W=B.next()).done;){var j=W.value;if(j&&!I(j[1]))return!1}}else return!1;return!0;default:return!1}}function X(E,A){return E==="symbol"?!0:A?A["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&A instanceof Symbol:!1}function U(E){var A=typeof E;return Array.isArray(E)?"array":E instanceof RegExp?"object":X(A,E)?"symbol":A}function Z(E){if(typeof E>"u"||E===null)return""+E;var A=U(E);if(A==="object"){if(E instanceof Date)return"date";if(E instanceof RegExp)return"regexp"}return A}function J(E){var A=Z(E);switch(A){case"array":case"object":return"an "+A;case"boolean":case"date":case"regexp":return"a "+A;default:return A}}function K(E){return!E.constructor||!E.constructor.name?h:E.constructor.name}return p.checkPropTypes=a,p.resetWarningCache=a.resetWarningCache,p.PropTypes=p,p},gi}var yi,As;function rd(){if(As)return yi;As=1;var e=Va();function t(){}function n(){}return n.resetWarningCache=t,yi=function(){function r(s,o,l,u,c,f){if(f!==e){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}r.isRequired=r;function a(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:a,element:r,elementType:r,instanceOf:a,node:r,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},yi}if(process.env.NODE_ENV!=="production"){var id=ku(),ad=!0;Yi.exports=nd()(id.isElement,ad)}else Yi.exports=rd()();var jr=Yi.exports;const S=Yt(jr);var $u={exports:{}};/*!
|
21
|
-
Copyright (c) 2018 Jed Watson.
|
22
|
-
Licensed under the MIT License (MIT), see
|
23
|
-
http://jedwatson.github.io/classnames
|
24
|
-
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var i="",s=0;s<arguments.length;s++){var o=arguments[s];o&&(i=a(i,r(o)))}return i}function r(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return n.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var s="";for(var o in i)t.call(i,o)&&i[o]&&(s=a(s,o));return s}function a(i,s){return s?i?i+" "+s:i+s:i}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})($u);var Ln=$u.exports;const me=Yt(Ln);var od=["top","left","transform","className","children","innerRef"];function Vi(){return Vi=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},Vi.apply(this,arguments)}function sd(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function kn(e){var t=e.top,n=t===void 0?0:t,r=e.left,a=r===void 0?0:r,i=e.transform,s=e.className,o=e.children,l=e.innerRef,u=sd(e,od);return g.createElement("g",Vi({ref:l,className:me("visx-group",s),transform:i||"translate("+a+", "+n+")"},u),o)}kn.propTypes={top:S.number,left:S.number,transform:S.string,className:S.string,children:S.node,innerRef:S.oneOfType([S.string,S.func,S.object])};var Gi=Math.PI,Ki=2*Gi,mt=1e-6,ld=Ki-mt;function Xi(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Vt(){return new Xi}Xi.prototype=Vt.prototype={constructor:Xi,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,a,i){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+a)+","+(this._y1=+i)},arcTo:function(e,t,n,r,a){e=+e,t=+t,n=+n,r=+r,a=+a;var i=this._x1,s=this._y1,o=n-e,l=r-t,u=i-e,c=s-t,f=u*u+c*c;if(a<0)throw new Error("negative radius: "+a);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(f>mt)if(!(Math.abs(c*o-l*u)>mt)||!a)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var h=n-i,p=r-s,d=o*o+l*l,v=h*h+p*p,x=Math.sqrt(d),m=Math.sqrt(f),b=a*Math.tan((Gi-Math.acos((d+f-v)/(2*x*m)))/2),_=b/m,M=b/x;Math.abs(_-1)>mt&&(this._+="L"+(e+_*u)+","+(t+_*c)),this._+="A"+a+","+a+",0,0,"+ +(c*h>u*p)+","+(this._x1=e+M*o)+","+(this._y1=t+M*l)}},arc:function(e,t,n,r,a,i){e=+e,t=+t,n=+n,i=!!i;var s=n*Math.cos(r),o=n*Math.sin(r),l=e+s,u=t+o,c=1^i,f=i?r-a:a-r;if(n<0)throw new Error("negative radius: "+n);this._x1===null?this._+="M"+l+","+u:(Math.abs(this._x1-l)>mt||Math.abs(this._y1-u)>mt)&&(this._+="L"+l+","+u),n&&(f<0&&(f=f%Ki+Ki),f>ld?this._+="A"+n+","+n+",0,1,"+c+","+(e-s)+","+(t-o)+"A"+n+","+n+",0,1,"+c+","+(this._x1=l)+","+(this._y1=u):f>mt&&(this._+="A"+n+","+n+",0,"+ +(f>=Gi)+","+c+","+(this._x1=e+n*Math.cos(a))+","+(this._y1=t+n*Math.sin(a))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};function ee(e){return function(){return e}}var Ds=Math.abs,pe=Math.atan2,vt=Math.cos,ud=Math.max,bi=Math.min,We=Math.sin,zt=Math.sqrt,ve=1e-12,st=Math.PI,dr=st/2,it=2*st;function cd(e){return e>1?0:e<-1?st:Math.acos(e)}function zs(e){return e>=1?dr:e<=-1?-dr:Math.asin(e)}function fd(e){return e.innerRadius}function hd(e){return e.outerRadius}function dd(e){return e.startAngle}function pd(e){return e.endAngle}function vd(e){return e&&e.padAngle}function md(e,t,n,r,a,i,s,o){var l=n-e,u=r-t,c=s-a,f=o-i,h=f*l-c*u;if(!(h*h<ve))return h=(c*(t-i)-f*(e-a))/h,[e+h*l,t+h*u]}function rr(e,t,n,r,a,i,s){var o=e-n,l=t-r,u=(s?i:-i)/zt(o*o+l*l),c=u*l,f=-u*o,h=e+c,p=t+f,d=n+c,v=r+f,x=(h+d)/2,m=(p+v)/2,b=d-h,_=v-p,M=b*b+_*_,y=a-i,w=h*v-d*p,T=(_<0?-1:1)*zt(ud(0,y*y*M-w*w)),$=(w*_-b*T)/M,k=(-w*b-_*T)/M,C=(w*_+b*T)/M,P=(-w*b+_*T)/M,N=$-x,L=k-m,I=C-x,X=P-m;return N*N+L*L>I*I+X*X&&($=C,k=P),{cx:$,cy:k,x01:-c,y01:-f,x11:$*(a/y-1),y11:k*(a/y-1)}}function gd(){var e=fd,t=hd,n=ee(0),r=null,a=dd,i=pd,s=vd,o=null;function l(){var u,c,f=+e.apply(this,arguments),h=+t.apply(this,arguments),p=a.apply(this,arguments)-dr,d=i.apply(this,arguments)-dr,v=Ds(d-p),x=d>p;if(o||(o=u=Vt()),h<f&&(c=h,h=f,f=c),!(h>ve))o.moveTo(0,0);else if(v>it-ve)o.moveTo(h*vt(p),h*We(p)),o.arc(0,0,h,p,d,!x),f>ve&&(o.moveTo(f*vt(d),f*We(d)),o.arc(0,0,f,d,p,x));else{var m=p,b=d,_=p,M=d,y=v,w=v,T=s.apply(this,arguments)/2,$=T>ve&&(r?+r.apply(this,arguments):zt(f*f+h*h)),k=bi(Ds(h-f)/2,+n.apply(this,arguments)),C=k,P=k,N,L;if($>ve){var I=zs($/f*We(T)),X=zs($/h*We(T));(y-=I*2)>ve?(I*=x?1:-1,_+=I,M-=I):(y=0,_=M=(p+d)/2),(w-=X*2)>ve?(X*=x?1:-1,m+=X,b-=X):(w=0,m=b=(p+d)/2)}var U=h*vt(m),Z=h*We(m),J=f*vt(M),K=f*We(M);if(k>ve){var E=h*vt(b),A=h*We(b),B=f*vt(_),W=f*We(_),j;if(v<st&&(j=md(U,Z,B,W,E,A,J,K))){var F=U-j[0],q=Z-j[1],Y=E-j[0],V=A-j[1],R=1/We(cd((F*Y+q*V)/(zt(F*F+q*q)*zt(Y*Y+V*V)))/2),z=zt(j[0]*j[0]+j[1]*j[1]);C=bi(k,(f-z)/(R-1)),P=bi(k,(h-z)/(R+1))}}w>ve?P>ve?(N=rr(B,W,U,Z,h,P,x),L=rr(E,A,J,K,h,P,x),o.moveTo(N.cx+N.x01,N.cy+N.y01),P<k?o.arc(N.cx,N.cy,P,pe(N.y01,N.x01),pe(L.y01,L.x01),!x):(o.arc(N.cx,N.cy,P,pe(N.y01,N.x01),pe(N.y11,N.x11),!x),o.arc(0,0,h,pe(N.cy+N.y11,N.cx+N.x11),pe(L.cy+L.y11,L.cx+L.x11),!x),o.arc(L.cx,L.cy,P,pe(L.y11,L.x11),pe(L.y01,L.x01),!x))):(o.moveTo(U,Z),o.arc(0,0,h,m,b,!x)):o.moveTo(U,Z),!(f>ve)||!(y>ve)?o.lineTo(J,K):C>ve?(N=rr(J,K,E,A,f,-C,x),L=rr(U,Z,B,W,f,-C,x),o.lineTo(N.cx+N.x01,N.cy+N.y01),C<k?o.arc(N.cx,N.cy,C,pe(N.y01,N.x01),pe(L.y01,L.x01),!x):(o.arc(N.cx,N.cy,C,pe(N.y01,N.x01),pe(N.y11,N.x11),!x),o.arc(0,0,f,pe(N.cy+N.y11,N.cx+N.x11),pe(L.cy+L.y11,L.cx+L.x11),x),o.arc(L.cx,L.cy,C,pe(L.y11,L.x11),pe(L.y01,L.x01),!x))):o.arc(0,0,f,M,_,x)}if(o.closePath(),u)return o=null,u+""||null}return l.centroid=function(){var u=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,c=(+a.apply(this,arguments)+ +i.apply(this,arguments))/2-st/2;return[vt(c)*u,We(c)*u]},l.innerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:ee(+u),l):e},l.outerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:ee(+u),l):t},l.cornerRadius=function(u){return arguments.length?(n=typeof u=="function"?u:ee(+u),l):n},l.padRadius=function(u){return arguments.length?(r=u==null?null:typeof u=="function"?u:ee(+u),l):r},l.startAngle=function(u){return arguments.length?(a=typeof u=="function"?u:ee(+u),l):a},l.endAngle=function(u){return arguments.length?(i=typeof u=="function"?u:ee(+u),l):i},l.padAngle=function(u){return arguments.length?(s=typeof u=="function"?u:ee(+u),l):s},l.context=function(u){return arguments.length?(o=u??null,l):o},l}function Cu(e){this._context=e}Cu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&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;default:this._context.lineTo(e,t);break}}};function Fr(e){return new Cu(e)}function Ga(e){return e[0]}function Ka(e){return e[1]}function Xa(){var e=Ga,t=Ka,n=ee(!0),r=null,a=Fr,i=null;function s(o){var l,u=o.length,c,f=!1,h;for(r==null&&(i=a(h=Vt())),l=0;l<=u;++l)!(l<u&&n(c=o[l],l,o))===f&&((f=!f)?i.lineStart():i.lineEnd()),f&&i.point(+e(c,l,o),+t(c,l,o));if(h)return i=null,h+""||null}return s.x=function(o){return arguments.length?(e=typeof o=="function"?o:ee(+o),s):e},s.y=function(o){return arguments.length?(t=typeof o=="function"?o:ee(+o),s):t},s.defined=function(o){return arguments.length?(n=typeof o=="function"?o:ee(!!o),s):n},s.curve=function(o){return arguments.length?(a=o,r!=null&&(i=a(r)),s):a},s.context=function(o){return arguments.length?(o==null?r=i=null:i=a(r=o),s):r},s}function Eu(){var e=Ga,t=null,n=ee(0),r=Ka,a=ee(!0),i=null,s=Fr,o=null;function l(c){var f,h,p,d=c.length,v,x=!1,m,b=new Array(d),_=new Array(d);for(i==null&&(o=s(m=Vt())),f=0;f<=d;++f){if(!(f<d&&a(v=c[f],f,c))===x)if(x=!x)h=f,o.areaStart(),o.lineStart();else{for(o.lineEnd(),o.lineStart(),p=f-1;p>=h;--p)o.point(b[p],_[p]);o.lineEnd(),o.areaEnd()}x&&(b[f]=+e(v,f,c),_[f]=+n(v,f,c),o.point(t?+t(v,f,c):b[f],r?+r(v,f,c):_[f]))}if(m)return o=null,m+""||null}function u(){return Xa().defined(a).curve(s).context(i)}return l.x=function(c){return arguments.length?(e=typeof c=="function"?c:ee(+c),t=null,l):e},l.x0=function(c){return arguments.length?(e=typeof c=="function"?c:ee(+c),l):e},l.x1=function(c){return arguments.length?(t=c==null?null:typeof c=="function"?c:ee(+c),l):t},l.y=function(c){return arguments.length?(n=typeof c=="function"?c:ee(+c),r=null,l):n},l.y0=function(c){return arguments.length?(n=typeof c=="function"?c:ee(+c),l):n},l.y1=function(c){return arguments.length?(r=c==null?null:typeof c=="function"?c:ee(+c),l):r},l.lineX0=l.lineY0=function(){return u().x(e).y(n)},l.lineY1=function(){return u().x(e).y(r)},l.lineX1=function(){return u().x(t).y(n)},l.defined=function(c){return arguments.length?(a=typeof c=="function"?c:ee(!!c),l):a},l.curve=function(c){return arguments.length?(s=c,i!=null&&(o=s(i)),l):s},l.context=function(c){return arguments.length?(c==null?i=o=null:o=s(i=c),l):i},l}function yd(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function bd(e){return e}function xd(){var e=bd,t=yd,n=null,r=ee(0),a=ee(it),i=ee(0);function s(o){var l,u=o.length,c,f,h=0,p=new Array(u),d=new Array(u),v=+r.apply(this,arguments),x=Math.min(it,Math.max(-it,a.apply(this,arguments)-v)),m,b=Math.min(Math.abs(x)/u,i.apply(this,arguments)),_=b*(x<0?-1:1),M;for(l=0;l<u;++l)(M=d[p[l]=l]=+e(o[l],l,o))>0&&(h+=M);for(t!=null?p.sort(function(y,w){return t(d[y],d[w])}):n!=null&&p.sort(function(y,w){return n(o[y],o[w])}),l=0,f=h?(x-u*_)/h:0;l<u;++l,v=m)c=p[l],M=d[c],m=v+(M>0?M*f:0)+_,d[c]={data:o[c],index:l,value:M,startAngle:v,endAngle:m,padAngle:b};return d}return s.value=function(o){return arguments.length?(e=typeof o=="function"?o:ee(+o),s):e},s.sortValues=function(o){return arguments.length?(t=o,n=null,s):t},s.sort=function(o){return arguments.length?(n=o,t=null,s):n},s.startAngle=function(o){return arguments.length?(r=typeof o=="function"?o:ee(+o),s):r},s.endAngle=function(o){return arguments.length?(a=typeof o=="function"?o:ee(+o),s):a},s.padAngle=function(o){return arguments.length?(i=typeof o=="function"?o:ee(+o),s):i},s}var Pu=Za(Fr);function Nu(e){this._curve=e}Nu.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};function Za(e){function t(n){return new Nu(e(n))}return t._curve=e,t}function dn(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(n){return arguments.length?t(Za(n)):t()._curve},e}function js(){return dn(Xa().curve(Pu))}function Fs(){var e=Eu().curve(Pu),t=e.curve,n=e.lineX0,r=e.lineX1,a=e.lineY0,i=e.lineY1;return e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return dn(n())},delete e.lineX0,e.lineEndAngle=function(){return dn(r())},delete e.lineX1,e.lineInnerRadius=function(){return dn(a())},delete e.lineY0,e.lineOuterRadius=function(){return dn(i())},delete e.lineY1,e.curve=function(s){return arguments.length?t(Za(s)):t()._curve},e}function pn(e,t){return[(t=+t)*Math.cos(e-=Math.PI/2),t*Math.sin(e)]}var Zi=Array.prototype.slice;function _d(e){return e.source}function wd(e){return e.target}function Qa(e){var t=_d,n=wd,r=Ga,a=Ka,i=null;function s(){var o,l=Zi.call(arguments),u=t.apply(this,l),c=n.apply(this,l);if(i||(i=o=Vt()),e(i,+r.apply(this,(l[0]=u,l)),+a.apply(this,l),+r.apply(this,(l[0]=c,l)),+a.apply(this,l)),o)return i=null,o+""||null}return s.source=function(o){return arguments.length?(t=o,s):t},s.target=function(o){return arguments.length?(n=o,s):n},s.x=function(o){return arguments.length?(r=typeof o=="function"?o:ee(+o),s):r},s.y=function(o){return arguments.length?(a=typeof o=="function"?o:ee(+o),s):a},s.context=function(o){return arguments.length?(i=o??null,s):i},s}function Sd(e,t,n,r,a){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,a,r,a)}function Td(e,t,n,r,a){e.moveTo(t,n),e.bezierCurveTo(t,n=(n+a)/2,r,n,r,a)}function Od(e,t,n,r,a){var i=pn(t,n),s=pn(t,n=(n+a)/2),o=pn(r,n),l=pn(r,a);e.moveTo(i[0],i[1]),e.bezierCurveTo(s[0],s[1],o[0],o[1],l[0],l[1])}function kd(){return Qa(Sd)}function Md(){return Qa(Td)}function $d(){var e=Qa(Od);return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e}const Ja={draw:function(e,t){var n=Math.sqrt(t/st);e.moveTo(n,0),e.arc(0,0,n,0,it)}},Ru={draw:function(e,t){var n=Math.sqrt(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}};var Lu=Math.sqrt(1/3),Cd=Lu*2;const Au={draw:function(e,t){var n=Math.sqrt(t/Cd),r=n*Lu;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}};var Ed=.8908130915292852,Du=Math.sin(st/10)/Math.sin(7*st/10),Pd=Math.sin(it/10)*Du,Nd=-Math.cos(it/10)*Du;const zu={draw:function(e,t){var n=Math.sqrt(t*Ed),r=Pd*n,a=Nd*n;e.moveTo(0,-n),e.lineTo(r,a);for(var i=1;i<5;++i){var s=it*i/5,o=Math.cos(s),l=Math.sin(s);e.lineTo(l*n,-o*n),e.lineTo(o*r-l*a,l*r+o*a)}e.closePath()}},ju={draw:function(e,t){var n=Math.sqrt(t),r=-n/2;e.rect(r,r,n,n)}};var xi=Math.sqrt(3);const Fu={draw:function(e,t){var n=-Math.sqrt(t/(xi*3));e.moveTo(0,n*2),e.lineTo(-xi*n,-n),e.lineTo(xi*n,-n),e.closePath()}};var Me=-.5,$e=Math.sqrt(3)/2,Qi=1/Math.sqrt(12),Rd=(Qi/2+1)*3;const Iu={draw:function(e,t){var n=Math.sqrt(t/Rd),r=n/2,a=n*Qi,i=r,s=n*Qi+n,o=-i,l=s;e.moveTo(r,a),e.lineTo(i,s),e.lineTo(o,l),e.lineTo(Me*r-$e*a,$e*r+Me*a),e.lineTo(Me*i-$e*s,$e*i+Me*s),e.lineTo(Me*o-$e*l,$e*o+Me*l),e.lineTo(Me*r+$e*a,Me*a-$e*r),e.lineTo(Me*i+$e*s,Me*s-$e*i),e.lineTo(Me*o+$e*l,Me*l-$e*o),e.closePath()}};var Ld=[Ja,Ru,Au,ju,zu,Fu,Iu];function Ad(){var e=ee(Ja),t=ee(64),n=null;function r(){var a;if(n||(n=a=Vt()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),a)return n=null,a+""||null}return r.type=function(a){return arguments.length?(e=typeof a=="function"?a:ee(a),r):e},r.size=function(a){return arguments.length?(t=typeof a=="function"?a:ee(+a),r):t},r.context=function(a){return arguments.length?(n=a??null,r):n},r}function lt(){}function pr(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 Ir(e){this._context=e}Ir.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:pr(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&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:pr(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Dd(e){return new Ir(e)}function Wu(e){this._context=e}Wu.prototype={areaStart:lt,areaEnd:lt,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);break}}},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:pr(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function zd(e){return new Wu(e)}function Bu(e){this._context=e}Bu.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||this._line!==0&&this._point===3)&&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:pr(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function jd(e){return new Bu(e)}function Hu(e,t){this._basis=new Ir(e),this._beta=t}Hu.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=e[0],a=t[0],i=e[n]-r,s=t[n]-a,o=-1,l;++o<=n;)l=o/n,this._basis.point(this._beta*e[o]+(1-this._beta)*(r+l*i),this._beta*t[o]+(1-this._beta)*(a+l*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const Fd=function e(t){function n(r){return t===1?new Ir(r):new Hu(r,t)}return n.beta=function(r){return e(+r)},n}(.85);function vr(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 eo(e,t){this._context=e,this._k=(1-t)/6}eo.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:vr(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&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:vr(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Id=function e(t){function n(r){return new eo(r,t)}return n.tension=function(r){return e(+r)},n}(0);function to(e,t){this._context=e,this._k=(1-t)/6}to.prototype={areaStart:lt,areaEnd:lt,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);break}}},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:vr(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Wd=function e(t){function n(r){return new to(r,t)}return n.tension=function(r){return e(+r)},n}(0);function no(e,t){this._context=e,this._k=(1-t)/6}no.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||this._line!==0&&this._point===3)&&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:vr(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Bd=function e(t){function n(r){return new no(r,t)}return n.tension=function(r){return e(+r)},n}(0);function ro(e,t,n){var r=e._x1,a=e._y1,i=e._x2,s=e._y2;if(e._l01_a>ve){var o=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*o-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,a=(a*o-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>ve){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);i=(i*u+e._x1*e._l23_2a-t*e._l12_2a)/c,s=(s*u+e._y1*e._l23_2a-n*e._l12_2a)/c}e._context.bezierCurveTo(r,a,i,s,e._x2,e._y2)}function Uu(e,t){this._context=e,this._alpha=t}Uu.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);break}(this._line||this._line!==0&&this._point===1)&&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:ro(this,e,t);break}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 Hd=function e(t){function n(r){return t?new Uu(r,t):new eo(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function qu(e,t){this._context=e,this._alpha=t}qu.prototype={areaStart:lt,areaEnd:lt,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);break}}},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:ro(this,e,t);break}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 Ud=function e(t){function n(r){return t?new qu(r,t):new to(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function Yu(e,t){this._context=e,this._alpha=t}Yu.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||this._line!==0&&this._point===3)&&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:ro(this,e,t);break}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 qd=function e(t){function n(r){return t?new Yu(r,t):new no(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function Vu(e){this._context=e}Vu.prototype={areaStart:lt,areaEnd:lt,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))}};function Yd(e){return new Vu(e)}function Is(e){return e<0?-1:1}function Ws(e,t,n){var r=e._x1-e._x0,a=t-e._x1,i=(e._y1-e._y0)/(r||a<0&&-0),s=(n-e._y1)/(a||r<0&&-0),o=(i*a+s*r)/(r+a);return(Is(i)+Is(s))*Math.min(Math.abs(i),Math.abs(s),.5*Math.abs(o))||0}function Bs(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function _i(e,t,n){var r=e._x0,a=e._y0,i=e._x1,s=e._y1,o=(i-r)/3;e._context.bezierCurveTo(r+o,a+o*t,i-o,s-o*n,i,s)}function mr(e){this._context=e}mr.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:_i(this,this._t0,Bs(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(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,_i(this,Bs(this,n=Ws(this,e,t)),n);break;default:_i(this,this._t0,n=Ws(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function Gu(e){this._context=new Ku(e)}(Gu.prototype=Object.create(mr.prototype)).point=function(e,t){mr.prototype.point.call(this,t,e)};function Ku(e){this._context=e}Ku.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,a,i){this._context.bezierCurveTo(t,e,r,n,i,a)}};function Vd(e){return new mr(e)}function Gd(e){return new Gu(e)}function Xu(e){this._context=e}Xu.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]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=Hs(e),a=Hs(t),i=0,s=1;s<n;++i,++s)this._context.bezierCurveTo(r[0][i],a[0][i],r[1][i],a[1][i],e[s],t[s]);(this._line||this._line!==0&&n===1)&&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)}};function Hs(e){var t,n=e.length-1,r,a=new Array(n),i=new Array(n),s=new Array(n);for(a[0]=0,i[0]=2,s[0]=e[0]+2*e[1],t=1;t<n-1;++t)a[t]=1,i[t]=4,s[t]=4*e[t]+2*e[t+1];for(a[n-1]=2,i[n-1]=7,s[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=a[t]/i[t-1],i[t]-=r,s[t]-=r*s[t-1];for(a[n-1]=s[n-1]/i[n-1],t=n-2;t>=0;--t)a[t]=(s[t]-a[t+1])/i[t];for(i[n-1]=(e[n]+a[n-1])/2,t=0;t<n-1;++t)i[t]=2*e[t+1]-a[t+1];return[a,i]}function Kd(e){return new Xu(e)}function Wr(e,t){this._context=e,this._t=t}Wr.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&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&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)}break}}this._x=e,this._y=t}};function Xd(e){return new Wr(e,.5)}function Zd(e){return new Wr(e,0)}function Qd(e){return new Wr(e,1)}function xt(e,t){if((s=e.length)>1)for(var n=1,r,a,i=e[t[0]],s,o=i.length;n<s;++n)for(a=i,i=e[t[n]],r=0;r<o;++r)i[r][1]+=i[r][0]=isNaN(a[r][1])?a[r][0]:a[r][1]}function _t(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function Jd(e,t){return e[t]}function Zu(){var e=ee([]),t=_t,n=xt,r=Jd;function a(i){var s=e.apply(this,arguments),o,l=i.length,u=s.length,c=new Array(u),f;for(o=0;o<u;++o){for(var h=s[o],p=c[o]=new Array(l),d=0,v;d<l;++d)p[d]=v=[0,+r(i[d],h,d,i)],v.data=i[d];p.key=h}for(o=0,f=t(c);o<u;++o)c[f[o]].index=o;return n(c,f),c}return a.keys=function(i){return arguments.length?(e=typeof i=="function"?i:ee(Zi.call(i)),a):e},a.value=function(i){return arguments.length?(r=typeof i=="function"?i:ee(+i),a):r},a.order=function(i){return arguments.length?(t=i==null?_t:typeof i=="function"?i:ee(Zi.call(i)),a):t},a.offset=function(i){return arguments.length?(n=i??xt,a):n},a}function Qu(e,t){if((r=e.length)>0){for(var n,r,a=0,i=e[0].length,s;a<i;++a){for(s=n=0;n<r;++n)s+=e[n][a][1]||0;if(s)for(n=0;n<r;++n)e[n][a][1]/=s}xt(e,t)}}function Ju(e,t){if((l=e.length)>0)for(var n,r=0,a,i,s,o,l,u=e[t[0]].length;r<u;++r)for(s=o=0,n=0;n<l;++n)(i=(a=e[t[n]][r])[1]-a[0])>0?(a[0]=s,a[1]=s+=i):i<0?(a[1]=o,a[0]=o+=i):(a[0]=0,a[1]=i)}function ec(e,t){if((a=e.length)>0){for(var n=0,r=e[t[0]],a,i=r.length;n<i;++n){for(var s=0,o=0;s<a;++s)o+=e[s][n][1]||0;r[n][1]+=r[n][0]=-o/2}xt(e,t)}}function tc(e,t){if(!(!((s=e.length)>0)||!((i=(a=e[t[0]]).length)>0))){for(var n=0,r=1,a,i,s;r<i;++r){for(var o=0,l=0,u=0;o<s;++o){for(var c=e[t[o]],f=c[r][1]||0,h=c[r-1][1]||0,p=(f-h)/2,d=0;d<o;++d){var v=e[t[d]],x=v[r][1]||0,m=v[r-1][1]||0;p+=x-m}l+=f,u+=p*f}a[r-1][1]+=a[r-1][0]=n,l&&(n-=u/l)}a[r-1][1]+=a[r-1][0]=n,xt(e,t)}}function nc(e){var t=e.map(ep);return _t(e).sort(function(n,r){return t[n]-t[r]})}function ep(e){for(var t=-1,n=0,r=e.length,a,i=-1/0;++t<r;)(a=+e[t][1])>i&&(i=a,n=t);return n}function io(e){var t=e.map(rc);return _t(e).sort(function(n,r){return t[n]-t[r]})}function rc(e){for(var t=0,n=-1,r=e.length,a;++n<r;)(a=+e[n][1])&&(t+=a);return t}function ic(e){return io(e).reverse()}function ac(e){var t=e.length,n,r,a=e.map(rc),i=nc(e),s=0,o=0,l=[],u=[];for(n=0;n<t;++n)r=i[n],s<o?(s+=a[r],l.push(r)):(o+=a[r],u.push(r));return u.reverse().concat(l)}function oc(e){return _t(e).reverse()}const tp=Object.freeze(Object.defineProperty({__proto__:null,arc:gd,area:Eu,areaRadial:Fs,curveBasis:Dd,curveBasisClosed:zd,curveBasisOpen:jd,curveBundle:Fd,curveCardinal:Id,curveCardinalClosed:Wd,curveCardinalOpen:Bd,curveCatmullRom:Hd,curveCatmullRomClosed:Ud,curveCatmullRomOpen:qd,curveLinear:Fr,curveLinearClosed:Yd,curveMonotoneX:Vd,curveMonotoneY:Gd,curveNatural:Kd,curveStep:Xd,curveStepAfter:Qd,curveStepBefore:Zd,line:Xa,lineRadial:js,linkHorizontal:kd,linkRadial:$d,linkVertical:Md,pie:xd,pointRadial:pn,radialArea:Fs,radialLine:js,stack:Zu,stackOffsetDiverging:Ju,stackOffsetExpand:Qu,stackOffsetNone:xt,stackOffsetSilhouette:ec,stackOffsetWiggle:tc,stackOrderAppearance:nc,stackOrderAscending:io,stackOrderDescending:ic,stackOrderInsideOut:ac,stackOrderNone:_t,stackOrderReverse:oc,symbol:Ad,symbolCircle:Ja,symbolCross:Ru,symbolDiamond:Au,symbolSquare:ju,symbolStar:zu,symbolTriangle:Fu,symbolWye:Iu,symbols:Ld},Symbol.toStringTag,{value:"Module"}));function np(e,t){e(t)}var Us={ascending:io,descending:ic,insideout:ac,none:_t,reverse:oc};function rp(e){return e&&Us[e]||Us.none}var qs={expand:Qu,diverging:Ju,none:xt,silhouette:ec,wiggle:tc};function ip(e){return e&&qs[e]||qs.none}var ap=["top","left","transform","className","children","innerRef"];function Ji(){return Ji=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},Ji.apply(this,arguments)}function op(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function Qe(e){var t=e.top,n=t===void 0?0:t,r=e.left,a=r===void 0?0:r,i=e.transform,s=e.className,o=e.children,l=e.innerRef,u=op(e,ap);return g.createElement("g",Ji({ref:l,className:me("visx-group",s),transform:i||"translate("+a+", "+n+")"},u),o)}Qe.propTypes={top:S.number,left:S.number,transform:S.string,className:S.string,children:S.node,innerRef:S.oneOfType([S.string,S.func,S.object])};const sp=Object.freeze(Object.defineProperty({__proto__:null,Group:Qe},Symbol.toStringTag,{value:"Module"}));var lp=["from","to","fill","className","innerRef"];function ea(){return ea=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},ea.apply(this,arguments)}function up(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function sc(e){var t=e.from,n=t===void 0?{x:0,y:0}:t,r=e.to,a=r===void 0?{x:1,y:1}:r,i=e.fill,s=i===void 0?"transparent":i,o=e.className,l=e.innerRef,u=up(e,lp),c=n.x===a.x||n.y===a.y;return g.createElement("line",ea({ref:l,className:me("visx-line",o),x1:n.x,y1:n.y,x2:a.x,y2:a.y,fill:s,shapeRendering:c?"crispEdges":"auto"},u))}var cp=["className","innerRef"];function ta(){return ta=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},ta.apply(this,arguments)}function fp(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function hp(e){var t=e.className,n=e.innerRef,r=fp(e,cp);return g.createElement("rect",ta({ref:n,className:me("visx-bar",t)},r))}var dp=["children","className","innerRef","x","y","width","height","radius","all","top","bottom","left","right","topLeft","topRight","bottomLeft","bottomRight"];function na(){return na=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},na.apply(this,arguments)}function pp(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function vp(e){var t=e.all,n=e.bottom,r=e.bottomLeft,a=e.bottomRight,i=e.height,s=e.left,o=e.radius,l=e.right,u=e.top,c=e.topLeft,f=e.topRight,h=e.width,p=e.x,d=e.y;f=t||u||l||f,a=t||n||l||a,r=t||n||s||r,c=t||u||s||c,o=Math.max(1,Math.min(o,Math.min(h,i)/2));var v=2*o,x=("M"+(p+o)+","+d+" h"+(h-v)+`
|
25
|
-
`+(f?"a"+o+","+o+" 0 0 1 "+o+","+o:"h"+o+"v"+o)+`
|
26
|
-
v`+(i-v)+`
|
27
|
-
`+(a?"a"+o+","+o+" 0 0 1 "+-o+","+o:"v"+o+"h"+-o)+`
|
28
|
-
h`+(v-h)+`
|
29
|
-
`+(r?"a"+o+","+o+" 0 0 1 "+-o+","+-o:"h"+-o+"v"+-o)+`
|
30
|
-
v`+(v-i)+`
|
31
|
-
`+(c?"a"+o+","+o+" 0 0 1 "+o+","+-o:"v"+-o+"h"+o)+`
|
32
|
-
z`).split(`
|
33
|
-
`).join("");return x}function lc(e){var t=e.children,n=e.className,r=e.innerRef,a=e.x,i=e.y,s=e.width,o=e.height,l=e.radius,u=e.all,c=u===void 0?!1:u,f=e.top,h=f===void 0?!1:f,p=e.bottom,d=p===void 0?!1:p,v=e.left,x=v===void 0?!1:v,m=e.right,b=m===void 0?!1:m,_=e.topLeft,M=_===void 0?!1:_,y=e.topRight,w=y===void 0?!1:y,T=e.bottomLeft,$=T===void 0?!1:T,k=e.bottomRight,C=k===void 0?!1:k,P=pp(e,dp),N=vp({x:a,y:i,width:s,height:o,radius:l,all:c,top:h,bottom:d,left:x,right:b,topLeft:M,topRight:w,bottomLeft:$,bottomRight:C});return t?g.createElement(g.Fragment,null,t({path:N})):g.createElement("path",na({ref:r,className:me("visx-bar-rounded",n),d:N},P))}function mp(e){if("bandwidth"in e)return e.bandwidth();var t=e.range(),n=e.domain();return Math.abs(t[t.length-1]-t[0])/n.length}function gp(e){return e==null?void 0:e[0]}function yp(e){return e==null?void 0:e[1]}var bp=["data","className","top","left","y","x0","x1","xScale","yScale","color","keys","value","order","offset","children"];function ra(){return ra=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},ra.apply(this,arguments)}function xp(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function _p(e){var t=e.data,n=e.className,r=e.top,a=e.left,i=e.y,s=e.x0,o=s===void 0?gp:s,l=e.x1,u=l===void 0?yp:l,c=e.xScale,f=e.yScale,h=e.color,p=e.keys,d=e.value,v=e.order,x=e.offset,m=e.children,b=xp(e,bp),_=Zu();p&&_.keys(p),d&&np(_.value,d),v&&_.order(rp(v)),x&&_.offset(ip(x));var M=_(t),y=mp(f),w=M.map(function(T,$){var k=T.key;return{index:$,key:k,bars:T.map(function(C,P){var N=(c(u(C))||0)-(c(o(C))||0),L=c(o(C)),I="bandwidth"in f?f(i(C.data)):Math.max((f(i(C.data))||0)-N/2);return{bar:C,key:k,index:P,height:y,width:N,x:L||0,y:I||0,color:h(T.key,P)}})}});return m?g.createElement(g.Fragment,null,m(w)):g.createElement(Qe,{className:me("visx-bar-stack-horizontal",n),top:r,left:a},w.map(function(T){return T.bars.map(function($){return g.createElement(hp,ra({key:"bar-stack-"+T.index+"-"+$.index,x:$.x,y:$.y,height:$.height,width:$.width,fill:$.color},b))})}))}function at(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function wp(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Br(e){let t,n,r;e.length!==2?(t=at,n=(o,l)=>at(e(o),l),r=(o,l)=>e(o)-l):(t=e===at||e===wp?e:Sp,n=e,r=e);function a(o,l,u=0,c=o.length){if(u<c){if(t(l,l)!==0)return c;do{const f=u+c>>>1;n(o[f],l)<0?u=f+1:c=f}while(u<c)}return u}function i(o,l,u=0,c=o.length){if(u<c){if(t(l,l)!==0)return c;do{const f=u+c>>>1;n(o[f],l)<=0?u=f+1:c=f}while(u<c)}return u}function s(o,l,u=0,c=o.length){const f=a(o,l,u,c-1);return f>u&&r(o[f-1],l)>-r(o[f],l)?f-1:f}return{left:a,center:s,right:i}}function Sp(){return 0}function uc(e){return e===null?NaN:+e}function*Tp(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const cc=Br(at),An=cc.right,Op=cc.left;Br(uc).center;function Ys(e,t){let n,r;for(const a of e)a!=null&&(n===void 0?a>=a&&(n=r=a):(n>a&&(n=a),r<a&&(r=a)));return[n,r]}class Vs extends Map{constructor(t,n=$p){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,a]of t)this.set(r,a)}get(t){return super.get(Gs(this,t))}has(t){return super.has(Gs(this,t))}set(t,n){return super.set(kp(this,t),n)}delete(t){return super.delete(Mp(this,t))}}function Gs({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function kp({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function Mp({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function $p(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Cp(e=at){if(e===at)return fc;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function fc(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}var ia=Math.sqrt(50),aa=Math.sqrt(10),oa=Math.sqrt(2);function sa(e,t,n){var r,a=-1,i,s,o;if(t=+t,e=+e,n=+n,e===t&&n>0)return[e];if((r=t<e)&&(i=e,e=t,t=i),(o=hc(e,t,n))===0||!isFinite(o))return[];if(o>0){let l=Math.round(e/o),u=Math.round(t/o);for(l*o<e&&++l,u*o>t&&--u,s=new Array(i=u-l+1);++a<i;)s[a]=(l+a)*o}else{o=-o;let l=Math.round(e*o),u=Math.round(t*o);for(l/o<e&&++l,u/o>t&&--u,s=new Array(i=u-l+1);++a<i;)s[a]=(l+a)/o}return r&&s.reverse(),s}function hc(e,t,n){var r=(t-e)/Math.max(0,n),a=Math.floor(Math.log(r)/Math.LN10),i=r/Math.pow(10,a);return a>=0?(i>=ia?10:i>=aa?5:i>=oa?2:1)*Math.pow(10,a):-Math.pow(10,-a)/(i>=ia?10:i>=aa?5:i>=oa?2:1)}function la(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),a=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),i=r/a;return i>=ia?a*=10:i>=aa?a*=5:i>=oa&&(a*=2),t<e?-a:a}function Ks(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function Xs(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function dc(e,t,n=0,r=1/0,a){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(a=a===void 0?fc:Cp(a);r>n;){if(r-n>600){const l=r-n+1,u=t-n+1,c=Math.log(l),f=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*f*(l-f)/l)*(u-l/2<0?-1:1),p=Math.max(n,Math.floor(t-u*f/l+h)),d=Math.min(r,Math.floor(t+(l-u)*f/l+h));dc(e,t,p,d,a)}const i=e[t];let s=n,o=r;for(nn(e,n,t),a(e[r],i)>0&&nn(e,n,r);s<o;){for(nn(e,s,o),++s,--o;a(e[s],i)<0;)++s;for(;a(e[o],i)>0;)--o}a(e[n],i)===0?nn(e,n,o):(++o,nn(e,o,r)),o<=t&&(n=o+1),t<=o&&(r=o-1)}return e}function nn(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Ep(e,t,n){if(e=Float64Array.from(Tp(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return Xs(e);if(t>=1)return Ks(e);var r,a=(r-1)*t,i=Math.floor(a),s=Ks(dc(e,i).subarray(0,i+1)),o=Xs(e.subarray(i+1));return s+(o-s)*(a-i)}}function Pp(e,t,n=uc){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,a=(r-1)*t,i=Math.floor(a),s=+n(e[i],i,e),o=+n(e[i+1],i+1,e);return s+(o-s)*(a-i)}}function pc(e,t,n){e=+e,t=+t,n=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+n;for(var r=-1,a=Math.max(0,Math.ceil((t-e)/n))|0,i=new Array(a);++r<a;)i[r]=e+r*n;return i}function Ee(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Je(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const ua=Symbol("implicit");function Hr(){var e=new Vs,t=[],n=[],r=ua;function a(i){let s=e.get(i);if(s===void 0){if(r!==ua)return r;e.set(i,s=t.push(i)-1)}return n[s%n.length]}return a.domain=function(i){if(!arguments.length)return t.slice();t=[],e=new Vs;for(const s of i)e.has(s)||e.set(s,t.push(s)-1);return a},a.range=function(i){return arguments.length?(n=Array.from(i),a):n.slice()},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return Hr(t,n).unknown(r)},Ee.apply(a,arguments),a}function Ur(){var e=Hr().unknown(void 0),t=e.domain,n=e.range,r=0,a=1,i,s,o=!1,l=0,u=0,c=.5;delete e.unknown;function f(){var h=t().length,p=a<r,d=p?a:r,v=p?r:a;i=(v-d)/Math.max(1,h-l+u*2),o&&(i=Math.floor(i)),d+=(v-d-i*(h-l))*c,s=i*(1-l),o&&(d=Math.round(d),s=Math.round(s));var x=pc(h).map(function(m){return d+i*m});return n(p?x.reverse():x)}return e.domain=function(h){return arguments.length?(t(h),f()):t()},e.range=function(h){return arguments.length?([r,a]=h,r=+r,a=+a,f()):[r,a]},e.rangeRound=function(h){return[r,a]=h,r=+r,a=+a,o=!0,f()},e.bandwidth=function(){return s},e.step=function(){return i},e.round=function(h){return arguments.length?(o=!!h,f()):o},e.padding=function(h){return arguments.length?(l=Math.min(1,u=+h),f()):l},e.paddingInner=function(h){return arguments.length?(l=Math.min(1,h),f()):l},e.paddingOuter=function(h){return arguments.length?(u=+h,f()):u},e.align=function(h){return arguments.length?(c=Math.max(0,Math.min(1,h)),f()):c},e.copy=function(){return Ur(t(),[r,a]).round(o).paddingInner(l).paddingOuter(u).align(c)},Ee.apply(f(),arguments)}function vc(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return vc(t())},e}function mc(){return vc(Ur.apply(null,arguments).paddingInner(1))}function Gt(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Dn(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function ut(){}var wt=.7,Bt=1/wt,It="\\s*([+-]?\\d+)\\s*",Mn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",He="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Np=/^#([0-9a-f]{3,8})$/,Rp=new RegExp(`^rgb\\(${It},${It},${It}\\)$`),Lp=new RegExp(`^rgb\\(${He},${He},${He}\\)$`),Ap=new RegExp(`^rgba\\(${It},${It},${It},${Mn}\\)$`),Dp=new RegExp(`^rgba\\(${He},${He},${He},${Mn}\\)$`),zp=new RegExp(`^hsl\\(${Mn},${He},${He}\\)$`),jp=new RegExp(`^hsla\\(${Mn},${He},${He},${Mn}\\)$`),Zs={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Gt(ut,$n,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Qs,formatHex:Qs,formatHex8:Fp,formatHsl:Ip,formatRgb:Js,toString:Js});function Qs(){return this.rgb().formatHex()}function Fp(){return this.rgb().formatHex8()}function Ip(){return gc(this).formatHsl()}function Js(){return this.rgb().formatRgb()}function $n(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Np.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?el(t):n===3?new ce(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?ir(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?ir(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Rp.exec(e))?new ce(t[1],t[2],t[3],1):(t=Lp.exec(e))?new ce(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Ap.exec(e))?ir(t[1],t[2],t[3],t[4]):(t=Dp.exec(e))?ir(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=zp.exec(e))?rl(t[1],t[2]/100,t[3]/100,1):(t=jp.exec(e))?rl(t[1],t[2]/100,t[3]/100,t[4]):Zs.hasOwnProperty(e)?el(Zs[e]):e==="transparent"?new ce(NaN,NaN,NaN,0):null}function el(e){return new ce(e>>16&255,e>>8&255,e&255,1)}function ir(e,t,n,r){return r<=0&&(e=t=n=NaN),new ce(e,t,n,r)}function ao(e){return e instanceof ut||(e=$n(e)),e?(e=e.rgb(),new ce(e.r,e.g,e.b,e.opacity)):new ce}function gr(e,t,n,r){return arguments.length===1?ao(e):new ce(e,t,n,r??1)}function ce(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Gt(ce,gr,Dn(ut,{brighter(e){return e=e==null?Bt:Math.pow(Bt,e),new ce(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?wt:Math.pow(wt,e),new ce(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ce(yt(this.r),yt(this.g),yt(this.b),yr(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:tl,formatHex:tl,formatHex8:Wp,formatRgb:nl,toString:nl}));function tl(){return`#${gt(this.r)}${gt(this.g)}${gt(this.b)}`}function Wp(){return`#${gt(this.r)}${gt(this.g)}${gt(this.b)}${gt((isNaN(this.opacity)?1:this.opacity)*255)}`}function nl(){const e=yr(this.opacity);return`${e===1?"rgb(":"rgba("}${yt(this.r)}, ${yt(this.g)}, ${yt(this.b)}${e===1?")":`, ${e})`}`}function yr(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function yt(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function gt(e){return e=yt(e),(e<16?"0":"")+e.toString(16)}function rl(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Le(e,t,n,r)}function gc(e){if(e instanceof Le)return new Le(e.h,e.s,e.l,e.opacity);if(e instanceof ut||(e=$n(e)),!e)return new Le;if(e instanceof Le)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),i=Math.max(t,n,r),s=NaN,o=i-a,l=(i+a)/2;return o?(t===i?s=(n-r)/o+(n<r)*6:n===i?s=(r-t)/o+2:s=(t-n)/o+4,o/=l<.5?i+a:2-i-a,s*=60):o=l>0&&l<1?0:s,new Le(s,o,l,e.opacity)}function ca(e,t,n,r){return arguments.length===1?gc(e):new Le(e,t,n,r??1)}function Le(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Gt(Le,ca,Dn(ut,{brighter(e){return e=e==null?Bt:Math.pow(Bt,e),new Le(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?wt:Math.pow(wt,e),new Le(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,a=2*n-r;return new ce(wi(e>=240?e-240:e+120,a,r),wi(e,a,r),wi(e<120?e+240:e-120,a,r),this.opacity)},clamp(){return new Le(il(this.h),ar(this.s),ar(this.l),yr(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=yr(this.opacity);return`${e===1?"hsl(":"hsla("}${il(this.h)}, ${ar(this.s)*100}%, ${ar(this.l)*100}%${e===1?")":`, ${e})`}`}}));function il(e){return e=(e||0)%360,e<0?e+360:e}function ar(e){return Math.max(0,Math.min(1,e||0))}function wi(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const yc=Math.PI/180,bc=180/Math.PI,br=18,xc=.96422,_c=1,wc=.82521,Sc=4/29,Wt=6/29,Tc=3*Wt*Wt,Bp=Wt*Wt*Wt;function Oc(e){if(e instanceof Ue)return new Ue(e.l,e.a,e.b,e.opacity);if(e instanceof Ge)return kc(e);e instanceof ce||(e=ao(e));var t=ki(e.r),n=ki(e.g),r=ki(e.b),a=Si((.2225045*t+.7168786*n+.0606169*r)/_c),i,s;return t===n&&n===r?i=s=a:(i=Si((.4360747*t+.3850649*n+.1430804*r)/xc),s=Si((.0139322*t+.0971045*n+.7141733*r)/wc)),new Ue(116*a-16,500*(i-a),200*(a-s),e.opacity)}function fa(e,t,n,r){return arguments.length===1?Oc(e):new Ue(e,t,n,r??1)}function Ue(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}Gt(Ue,fa,Dn(ut,{brighter(e){return new Ue(this.l+br*(e??1),this.a,this.b,this.opacity)},darker(e){return new Ue(this.l-br*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return t=xc*Ti(t),e=_c*Ti(e),n=wc*Ti(n),new ce(Oi(3.1338561*t-1.6168667*e-.4906146*n),Oi(-.9787684*t+1.9161415*e+.033454*n),Oi(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function Si(e){return e>Bp?Math.pow(e,1/3):e/Tc+Sc}function Ti(e){return e>Wt?e*e*e:Tc*(e-Sc)}function Oi(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function ki(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Hp(e){if(e instanceof Ge)return new Ge(e.h,e.c,e.l,e.opacity);if(e instanceof Ue||(e=Oc(e)),e.a===0&&e.b===0)return new Ge(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*bc;return new Ge(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function ha(e,t,n,r){return arguments.length===1?Hp(e):new Ge(e,t,n,r??1)}function Ge(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function kc(e){if(isNaN(e.h))return new Ue(e.l,0,0,e.opacity);var t=e.h*yc;return new Ue(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}Gt(Ge,ha,Dn(ut,{brighter(e){return new Ge(this.h,this.c,this.l+br*(e??1),this.opacity)},darker(e){return new Ge(this.h,this.c,this.l-br*(e??1),this.opacity)},rgb(){return kc(this).rgb()}}));var Mc=-.14861,oo=1.78277,so=-.29227,qr=-.90649,Cn=1.97294,al=Cn*qr,ol=Cn*oo,sl=oo*so-qr*Mc;function Up(e){if(e instanceof bt)return new bt(e.h,e.s,e.l,e.opacity);e instanceof ce||(e=ao(e));var t=e.r/255,n=e.g/255,r=e.b/255,a=(sl*r+al*t-ol*n)/(sl+al-ol),i=r-a,s=(Cn*(n-a)-so*i)/qr,o=Math.sqrt(s*s+i*i)/(Cn*a*(1-a)),l=o?Math.atan2(s,i)*bc-120:NaN;return new bt(l<0?l+360:l,o,a,e.opacity)}function da(e,t,n,r){return arguments.length===1?Up(e):new bt(e,t,n,r??1)}function bt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Gt(bt,da,Dn(ut,{brighter(e){return e=e==null?Bt:Math.pow(Bt,e),new bt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?wt:Math.pow(wt,e),new bt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*yc,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),a=Math.sin(e);return new ce(255*(t+n*(Mc*r+oo*a)),255*(t+n*(so*r+qr*a)),255*(t+n*(Cn*r)),this.opacity)}}));function $c(e,t,n,r,a){var i=e*e,s=i*e;return((1-3*e+3*i-s)*t+(4-6*i+3*s)*n+(1+3*e+3*i-3*s)*r+s*a)/6}function Cc(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),a=e[r],i=e[r+1],s=r>0?e[r-1]:2*a-i,o=r<t-1?e[r+2]:2*i-a;return $c((n-r/t)*t,s,a,i,o)}}function Ec(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),a=e[(r+t-1)%t],i=e[r%t],s=e[(r+1)%t],o=e[(r+2)%t];return $c((n-r/t)*t,a,i,s,o)}}const Yr=e=>()=>e;function Pc(e,t){return function(n){return e+n*t}}function qp(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Vr(e,t){var n=t-e;return n?Pc(e,n>180||n<-180?n-360*Math.round(n/360):n):Yr(isNaN(e)?t:e)}function Yp(e){return(e=+e)==1?fe:function(t,n){return n-t?qp(t,n,e):Yr(isNaN(t)?n:t)}}function fe(e,t){var n=t-e;return n?Pc(e,n):Yr(isNaN(e)?t:e)}const xr=function e(t){var n=Yp(t);function r(a,i){var s=n((a=gr(a)).r,(i=gr(i)).r),o=n(a.g,i.g),l=n(a.b,i.b),u=fe(a.opacity,i.opacity);return function(c){return a.r=s(c),a.g=o(c),a.b=l(c),a.opacity=u(c),a+""}}return r.gamma=e,r}(1);function Nc(e){return function(t){var n=t.length,r=new Array(n),a=new Array(n),i=new Array(n),s,o;for(s=0;s<n;++s)o=gr(t[s]),r[s]=o.r||0,a[s]=o.g||0,i[s]=o.b||0;return r=e(r),a=e(a),i=e(i),o.opacity=1,function(l){return o.r=r(l),o.g=a(l),o.b=i(l),o+""}}}var Vp=Nc(Cc),Gp=Nc(Ec);function lo(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),a;return function(i){for(a=0;a<n;++a)r[a]=e[a]*(1-i)+t[a]*i;return r}}function Rc(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Kp(e,t){return(Rc(t)?lo:Lc)(e,t)}function Lc(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,a=new Array(r),i=new Array(n),s;for(s=0;s<r;++s)a[s]=Et(e[s],t[s]);for(;s<n;++s)i[s]=t[s];return function(o){for(s=0;s<r;++s)i[s]=a[s](o);return i}}function Ac(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Re(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Dc(e,t){var n={},r={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?n[a]=Et(e[a],t[a]):r[a]=t[a];return function(i){for(a in n)r[a]=n[a](i);return r}}var pa=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Mi=new RegExp(pa.source,"g");function Xp(e){return function(){return e}}function Zp(e){return function(t){return e(t)+""}}function zc(e,t){var n=pa.lastIndex=Mi.lastIndex=0,r,a,i,s=-1,o=[],l=[];for(e=e+"",t=t+"";(r=pa.exec(e))&&(a=Mi.exec(t));)(i=a.index)>n&&(i=t.slice(n,i),o[s]?o[s]+=i:o[++s]=i),(r=r[0])===(a=a[0])?o[s]?o[s]+=a:o[++s]=a:(o[++s]=null,l.push({i:s,x:Re(r,a)})),n=Mi.lastIndex;return n<t.length&&(i=t.slice(n),o[s]?o[s]+=i:o[++s]=i),o.length<2?l[0]?Zp(l[0].x):Xp(t):(t=l.length,function(u){for(var c=0,f;c<t;++c)o[(f=l[c]).i]=f.x(u);return o.join("")})}function Et(e,t){var n=typeof t,r;return t==null||n==="boolean"?Yr(t):(n==="number"?Re:n==="string"?(r=$n(t))?(t=r,xr):zc:t instanceof $n?xr:t instanceof Date?Ac:Rc(t)?lo:Array.isArray(t)?Lc:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Dc:Re)(e,t)}function Qp(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}function Jp(e,t){var n=Vr(+e,+t);return function(r){var a=n(r);return a-360*Math.floor(a/360)}}function zn(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var ll=180/Math.PI,va={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function jc(e,t,n,r,a,i){var s,o,l;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(o=Math.sqrt(n*n+r*r))&&(n/=o,r/=o,l/=o),e*r<t*n&&(e=-e,t=-t,l=-l,s=-s),{translateX:a,translateY:i,rotate:Math.atan2(t,e)*ll,skewX:Math.atan(l)*ll,scaleX:s,scaleY:o}}var or;function ev(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?va:jc(t.a,t.b,t.c,t.d,t.e,t.f)}function tv(e){return e==null||(or||(or=document.createElementNS("http://www.w3.org/2000/svg","g")),or.setAttribute("transform",e),!(e=or.transform.baseVal.consolidate()))?va:(e=e.matrix,jc(e.a,e.b,e.c,e.d,e.e,e.f))}function Fc(e,t,n,r){function a(u){return u.length?u.pop()+" ":""}function i(u,c,f,h,p,d){if(u!==f||c!==h){var v=p.push("translate(",null,t,null,n);d.push({i:v-4,x:Re(u,f)},{i:v-2,x:Re(c,h)})}else(f||h)&&p.push("translate("+f+t+h+n)}function s(u,c,f,h){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),h.push({i:f.push(a(f)+"rotate(",null,r)-2,x:Re(u,c)})):c&&f.push(a(f)+"rotate("+c+r)}function o(u,c,f,h){u!==c?h.push({i:f.push(a(f)+"skewX(",null,r)-2,x:Re(u,c)}):c&&f.push(a(f)+"skewX("+c+r)}function l(u,c,f,h,p,d){if(u!==f||c!==h){var v=p.push(a(p)+"scale(",null,",",null,")");d.push({i:v-4,x:Re(u,f)},{i:v-2,x:Re(c,h)})}else(f!==1||h!==1)&&p.push(a(p)+"scale("+f+","+h+")")}return function(u,c){var f=[],h=[];return u=e(u),c=e(c),i(u.translateX,u.translateY,c.translateX,c.translateY,f,h),s(u.rotate,c.rotate,f,h),o(u.skewX,c.skewX,f,h),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,f,h),u=c=null,function(p){for(var d=-1,v=h.length,x;++d<v;)f[(x=h[d]).i]=x.x(p);return f.join("")}}}var nv=Fc(ev,"px, ","px)","deg)"),rv=Fc(tv,", ",")",")"),iv=1e-12;function ul(e){return((e=Math.exp(e))+1/e)/2}function av(e){return((e=Math.exp(e))-1/e)/2}function ov(e){return((e=Math.exp(2*e))-1)/(e+1)}const sv=function e(t,n,r){function a(i,s){var o=i[0],l=i[1],u=i[2],c=s[0],f=s[1],h=s[2],p=c-o,d=f-l,v=p*p+d*d,x,m;if(v<iv)m=Math.log(h/u)/t,x=function(T){return[o+T*p,l+T*d,u*Math.exp(t*T*m)]};else{var b=Math.sqrt(v),_=(h*h-u*u+r*v)/(2*u*n*b),M=(h*h-u*u-r*v)/(2*h*n*b),y=Math.log(Math.sqrt(_*_+1)-_),w=Math.log(Math.sqrt(M*M+1)-M);m=(w-y)/t,x=function(T){var $=T*m,k=ul(y),C=u/(n*b)*(k*ov(t*$+y)-av(y));return[o+C*p,l+C*d,u*k/ul(t*$+y)]}}return x.duration=m*1e3*t/Math.SQRT2,x}return a.rho=function(i){var s=Math.max(.001,+i),o=s*s,l=o*o;return e(s,o,l)},a}(Math.SQRT2,2,4);function Ic(e){return function(t,n){var r=e((t=ca(t)).h,(n=ca(n)).h),a=fe(t.s,n.s),i=fe(t.l,n.l),s=fe(t.opacity,n.opacity);return function(o){return t.h=r(o),t.s=a(o),t.l=i(o),t.opacity=s(o),t+""}}}const Wc=Ic(Vr);var Bc=Ic(fe);function Hc(e,t){var n=fe((e=fa(e)).l,(t=fa(t)).l),r=fe(e.a,t.a),a=fe(e.b,t.b),i=fe(e.opacity,t.opacity);return function(s){return e.l=n(s),e.a=r(s),e.b=a(s),e.opacity=i(s),e+""}}function Uc(e){return function(t,n){var r=e((t=ha(t)).h,(n=ha(n)).h),a=fe(t.c,n.c),i=fe(t.l,n.l),s=fe(t.opacity,n.opacity);return function(o){return t.h=r(o),t.c=a(o),t.l=i(o),t.opacity=s(o),t+""}}}const qc=Uc(Vr);var Yc=Uc(fe);function Vc(e){return function t(n){n=+n;function r(a,i){var s=e((a=da(a)).h,(i=da(i)).h),o=fe(a.s,i.s),l=fe(a.l,i.l),u=fe(a.opacity,i.opacity);return function(c){return a.h=s(c),a.s=o(c),a.l=l(Math.pow(c,n)),a.opacity=u(c),a+""}}return r.gamma=t,r}(1)}const Gc=Vc(Vr);var Kc=Vc(fe);function Xc(e,t){t===void 0&&(t=e,e=Et);for(var n=0,r=t.length-1,a=t[0],i=new Array(r<0?0:r);n<r;)i[n]=e(a,a=t[++n]);return function(s){var o=Math.max(0,Math.min(r-1,Math.floor(s*=r)));return i[o](s-o)}}function lv(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e(r/(t-1));return n}function uv(e){return function(){return e}}function _r(e){return+e}var cl=[0,1];function xe(e){return e}function ma(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:uv(isNaN(t)?NaN:.5)}function cv(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function fv(e,t,n){var r=e[0],a=e[1],i=t[0],s=t[1];return a<r?(r=ma(a,r),i=n(s,i)):(r=ma(r,a),i=n(i,s)),function(o){return i(r(o))}}function hv(e,t,n){var r=Math.min(e.length,t.length)-1,a=new Array(r),i=new Array(r),s=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<r;)a[s]=ma(e[s],e[s+1]),i[s]=n(t[s],t[s+1]);return function(o){var l=An(e,o,1,r)-1;return i[l](a[l](o))}}function jn(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Gr(){var e=cl,t=cl,n=Et,r,a,i,s=xe,o,l,u;function c(){var h=Math.min(e.length,t.length);return s!==xe&&(s=cv(e[0],e[h-1])),o=h>2?hv:fv,l=u=null,f}function f(h){return h==null||isNaN(h=+h)?i:(l||(l=o(e.map(r),t,n)))(r(s(h)))}return f.invert=function(h){return s(a((u||(u=o(t,e.map(r),Re)))(h)))},f.domain=function(h){return arguments.length?(e=Array.from(h,_r),c()):e.slice()},f.range=function(h){return arguments.length?(t=Array.from(h),c()):t.slice()},f.rangeRound=function(h){return t=Array.from(h),n=zn,c()},f.clamp=function(h){return arguments.length?(s=h?!0:xe,c()):s!==xe},f.interpolate=function(h){return arguments.length?(n=h,c()):n},f.unknown=function(h){return arguments.length?(i=h,f):i},function(h,p){return r=h,a=p,c()}}function uo(){return Gr()(xe,xe)}function dv(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function wr(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Ht(e){return e=wr(Math.abs(e)),e?e[1]:NaN}function pv(e,t){return function(n,r){for(var a=n.length,i=[],s=0,o=e[0],l=0;a>0&&o>0&&(l+o+1>r&&(o=Math.max(1,r-l)),i.push(n.substring(a-=o,a+o)),!((l+=o+1)>r));)o=e[s=(s+1)%e.length];return i.reverse().join(t)}}function vv(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var mv=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function En(e){if(!(t=mv.exec(e)))throw new Error("invalid format: "+e);var t;return new co({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}En.prototype=co.prototype;function co(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}co.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function gv(e){e:for(var t=e.length,n=1,r=-1,a;n<t;++n)switch(e[n]){case".":r=a=n;break;case"0":r===0&&(r=n),a=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(a+1):e}var Zc;function yv(e,t){var n=wr(e,t);if(!n)return e+"";var r=n[0],a=n[1],i=a-(Zc=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,s=r.length;return i===s?r:i>s?r+new Array(i-s+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+wr(e,Math.max(0,t+i-1))[0]}function fl(e,t){var n=wr(e,t);if(!n)return e+"";var r=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+r:r.length>a+1?r.slice(0,a+1)+"."+r.slice(a+1):r+new Array(a-r.length+2).join("0")}const hl={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:dv,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>fl(e*100,t),r:fl,s:yv,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function dl(e){return e}var pl=Array.prototype.map,vl=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function bv(e){var t=e.grouping===void 0||e.thousands===void 0?dl:pv(pl.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?dl:vv(pl.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",o=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(f){f=En(f);var h=f.fill,p=f.align,d=f.sign,v=f.symbol,x=f.zero,m=f.width,b=f.comma,_=f.precision,M=f.trim,y=f.type;y==="n"?(b=!0,y="g"):hl[y]||(_===void 0&&(_=12),M=!0,y="g"),(x||h==="0"&&p==="=")&&(x=!0,h="0",p="=");var w=v==="$"?n:v==="#"&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",T=v==="$"?r:/[%p]/.test(y)?s:"",$=hl[y],k=/[defgprs%]/.test(y);_=_===void 0?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function C(P){var N=w,L=T,I,X,U;if(y==="c")L=$(P)+L,P="";else{P=+P;var Z=P<0||1/P<0;if(P=isNaN(P)?l:$(Math.abs(P),_),M&&(P=gv(P)),Z&&+P==0&&d!=="+"&&(Z=!1),N=(Z?d==="("?d:o:d==="-"||d==="("?"":d)+N,L=(y==="s"?vl[8+Zc/3]:"")+L+(Z&&d==="("?")":""),k){for(I=-1,X=P.length;++I<X;)if(U=P.charCodeAt(I),48>U||U>57){L=(U===46?a+P.slice(I+1):P.slice(I))+L,P=P.slice(0,I);break}}}b&&!x&&(P=t(P,1/0));var J=N.length+P.length+L.length,K=J<m?new Array(m-J+1).join(h):"";switch(b&&x&&(P=t(K+P,K.length?m-L.length:1/0),K=""),p){case"<":P=N+P+L+K;break;case"=":P=N+K+P+L;break;case"^":P=K.slice(0,J=K.length>>1)+N+P+L+K.slice(J);break;default:P=K+N+P+L;break}return i(P)}return C.toString=function(){return f+""},C}function c(f,h){var p=u((f=En(f),f.type="f",f)),d=Math.max(-8,Math.min(8,Math.floor(Ht(h)/3)))*3,v=Math.pow(10,-d),x=vl[8+d/3];return function(m){return p(v*m)+x}}return{format:u,formatPrefix:c}}var sr,fo,Qc;xv({thousands:",",grouping:[3],currency:["$",""]});function xv(e){return sr=bv(e),fo=sr.format,Qc=sr.formatPrefix,sr}function _v(e){return Math.max(0,-Ht(Math.abs(e)))}function wv(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ht(t)/3)))*3-Ht(Math.abs(e)))}function Sv(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Ht(t)-Ht(e))+1}function Jc(e,t,n,r){var a=la(e,t,n),i;switch(r=En(r??",f"),r.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(i=wv(a,s))&&(r.precision=i),Qc(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=Sv(a,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=_v(a))&&(r.precision=i-(r.type==="%")*2);break}}return fo(r)}function ct(e){var t=e.domain;return e.ticks=function(n){var r=t();return sa(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var a=t();return Jc(a[0],a[a.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),a=0,i=r.length-1,s=r[a],o=r[i],l,u,c=10;for(o<s&&(u=s,s=o,o=u,u=a,a=i,i=u);c-- >0;){if(u=hc(s,o,n),u===l)return r[a]=s,r[i]=o,t(r);if(u>0)s=Math.floor(s/u)*u,o=Math.ceil(o/u)*u;else if(u<0)s=Math.ceil(s*u)/u,o=Math.floor(o*u)/u;else break;l=u}return e},e}function ho(){var e=uo();return e.copy=function(){return jn(e,ho())},Ee.apply(e,arguments),ct(e)}function ef(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,_r),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return ef(e).unknown(t)},e=arguments.length?Array.from(e,_r):[0,1],ct(n)}function tf(e,t){e=e.slice();var n=0,r=e.length-1,a=e[n],i=e[r],s;return i<a&&(s=n,n=r,r=s,s=a,a=i,i=s),e[n]=t.floor(a),e[r]=t.ceil(i),e}function ml(e){return Math.log(e)}function gl(e){return Math.exp(e)}function Tv(e){return-Math.log(-e)}function Ov(e){return-Math.exp(-e)}function kv(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Mv(e){return e===10?kv:e===Math.E?Math.exp:t=>Math.pow(e,t)}function $v(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function yl(e){return(t,n)=>-e(-t,n)}function po(e){const t=e(ml,gl),n=t.domain;let r=10,a,i;function s(){return a=$v(r),i=Mv(r),n()[0]<0?(a=yl(a),i=yl(i),e(Tv,Ov)):e(ml,gl),t}return t.base=function(o){return arguments.length?(r=+o,s()):r},t.domain=function(o){return arguments.length?(n(o),s()):n()},t.ticks=o=>{const l=n();let u=l[0],c=l[l.length-1];const f=c<u;f&&([u,c]=[c,u]);let h=a(u),p=a(c),d,v;const x=o==null?10:+o;let m=[];if(!(r%1)&&p-h<x){if(h=Math.floor(h),p=Math.ceil(p),u>0){for(;h<=p;++h)for(d=1;d<r;++d)if(v=h<0?d/i(-h):d*i(h),!(v<u)){if(v>c)break;m.push(v)}}else for(;h<=p;++h)for(d=r-1;d>=1;--d)if(v=h>0?d/i(-h):d*i(h),!(v<u)){if(v>c)break;m.push(v)}m.length*2<x&&(m=sa(u,c,x))}else m=sa(h,p,Math.min(p-h,x)).map(i);return f?m.reverse():m},t.tickFormat=(o,l)=>{if(o==null&&(o=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=En(l)).precision==null&&(l.trim=!0),l=fo(l)),o===1/0)return l;const u=Math.max(1,r*o/t.ticks().length);return c=>{let f=c/i(Math.round(a(c)));return f*r<r-.5&&(f*=r),f<=u?l(c):""}},t.nice=()=>n(tf(n(),{floor:o=>i(Math.floor(a(o))),ceil:o=>i(Math.ceil(a(o)))})),t}function vo(){const e=po(Gr()).domain([1,10]);return e.copy=()=>jn(e,vo()).base(e.base()),Ee.apply(e,arguments),e}function bl(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function xl(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function mo(e){var t=1,n=e(bl(t),xl(t));return n.constant=function(r){return arguments.length?e(bl(t=+r),xl(t)):t},ct(n)}function go(){var e=mo(Gr());return e.copy=function(){return jn(e,go()).constant(e.constant())},Ee.apply(e,arguments)}function _l(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Cv(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Ev(e){return e<0?-e*e:e*e}function yo(e){var t=e(xe,xe),n=1;function r(){return n===1?e(xe,xe):n===.5?e(Cv,Ev):e(_l(n),_l(1/n))}return t.exponent=function(a){return arguments.length?(n=+a,r()):n},ct(t)}function Kr(){var e=yo(Gr());return e.copy=function(){return jn(e,Kr()).exponent(e.exponent())},Ee.apply(e,arguments),e}function nf(){return Kr.apply(null,arguments).exponent(.5)}function wl(e){return Math.sign(e)*e*e}function Pv(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function bo(){var e=uo(),t=[0,1],n=!1,r;function a(i){var s=Pv(e(i));return isNaN(s)?r:n?Math.round(s):s}return a.invert=function(i){return e.invert(wl(i))},a.domain=function(i){return arguments.length?(e.domain(i),a):e.domain()},a.range=function(i){return arguments.length?(e.range((t=Array.from(i,_r)).map(wl)),a):t.slice()},a.rangeRound=function(i){return a.range(i).round(!0)},a.round=function(i){return arguments.length?(n=!!i,a):n},a.clamp=function(i){return arguments.length?(e.clamp(i),a):e.clamp()},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return bo(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Ee.apply(a,arguments),ct(a)}function xo(){var e=[],t=[],n=[],r;function a(){var s=0,o=Math.max(1,t.length);for(n=new Array(o-1);++s<o;)n[s-1]=Pp(e,s/o);return i}function i(s){return s==null||isNaN(s=+s)?r:t[An(n,s)]}return i.invertExtent=function(s){var o=t.indexOf(s);return o<0?[NaN,NaN]:[o>0?n[o-1]:e[0],o<n.length?n[o]:e[e.length-1]]},i.domain=function(s){if(!arguments.length)return e.slice();e=[];for(let o of s)o!=null&&!isNaN(o=+o)&&e.push(o);return e.sort(at),a()},i.range=function(s){return arguments.length?(t=Array.from(s),a()):t.slice()},i.unknown=function(s){return arguments.length?(r=s,i):r},i.quantiles=function(){return n.slice()},i.copy=function(){return xo().domain(e).range(t).unknown(r)},Ee.apply(i,arguments)}function _o(){var e=0,t=1,n=1,r=[.5],a=[0,1],i;function s(l){return l!=null&&l<=l?a[An(r,l,0,n)]:i}function o(){var l=-1;for(r=new Array(n);++l<n;)r[l]=((l+1)*t-(l-n)*e)/(n+1);return s}return s.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,o()):[e,t]},s.range=function(l){return arguments.length?(n=(a=Array.from(l)).length-1,o()):a.slice()},s.invertExtent=function(l){var u=a.indexOf(l);return u<0?[NaN,NaN]:u<1?[e,r[0]]:u>=n?[r[n-1],t]:[r[u-1],r[u]]},s.unknown=function(l){return arguments.length&&(i=l),s},s.thresholds=function(){return r.slice()},s.copy=function(){return _o().domain([e,t]).range(a).unknown(i)},Ee.apply(ct(s),arguments)}function wo(){var e=[.5],t=[0,1],n,r=1;function a(i){return i!=null&&i<=i?t[An(e,i,0,r)]:n}return a.domain=function(i){return arguments.length?(e=Array.from(i),r=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(i){return arguments.length?(t=Array.from(i),r=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(i){var s=t.indexOf(i);return[e[s-1],e[s]]},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return wo().domain(e).range(t).unknown(n)},Ee.apply(a,arguments)}const $i=new Date,Ci=new Date;function se(e,t,n,r){function a(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return a.floor=i=>(e(i=new Date(+i)),i),a.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),a.round=i=>{const s=a(i),o=a.ceil(i);return i-s<o-i?s:o},a.offset=(i,s)=>(t(i=new Date(+i),s==null?1:Math.floor(s)),i),a.range=(i,s,o)=>{const l=[];if(i=a.ceil(i),o=o==null?1:Math.floor(o),!(i<s)||!(o>0))return l;let u;do l.push(u=new Date(+i)),t(i,o),e(i);while(u<i&&i<s);return l},a.filter=i=>se(s=>{if(s>=s)for(;e(s),!i(s);)s.setTime(s-1)},(s,o)=>{if(s>=s)if(o<0)for(;++o<=0;)for(;t(s,-1),!i(s););else for(;--o>=0;)for(;t(s,1),!i(s););}),n&&(a.count=(i,s)=>($i.setTime(+i),Ci.setTime(+s),e($i),e(Ci),Math.floor(n($i,Ci))),a.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(r?s=>r(s)%i===0:s=>a.count(0,s)%i===0):a)),a}const Ut=se(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Ut.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?se(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Ut);const Sl=Ut.range,Ke=1e3,Ce=Ke*60,Xe=Ce*60,Ze=Xe*24,So=Ze*7,Tl=Ze*30,Ei=Ze*365,Ae=se(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Ke)},(e,t)=>(t-e)/Ke,e=>e.getUTCSeconds()),Ol=Ae.range,Fn=se(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ke)},(e,t)=>{e.setTime(+e+t*Ce)},(e,t)=>(t-e)/Ce,e=>e.getMinutes()),Nv=Fn.range,In=se(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Ce)},(e,t)=>(t-e)/Ce,e=>e.getUTCMinutes()),Rv=In.range,Wn=se(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ke-e.getMinutes()*Ce)},(e,t)=>{e.setTime(+e+t*Xe)},(e,t)=>(t-e)/Xe,e=>e.getHours()),Lv=Wn.range,Bn=se(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Xe)},(e,t)=>(t-e)/Xe,e=>e.getUTCHours()),Av=Bn.range,Pt=se(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ce)/Ze,e=>e.getDate()-1),Dv=Pt.range,Kt=se(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ze,e=>e.getUTCDate()-1),zv=Kt.range,To=se(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ze,e=>Math.floor(e/Ze)),jv=To.range;function Nt(e){return se(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Ce)/So)}const St=Nt(0),Pn=Nt(1),rf=Nt(2),af=Nt(3),Tt=Nt(4),of=Nt(5),sf=Nt(6),kl=St.range,Fv=Pn.range,Iv=rf.range,Wv=af.range,Bv=Tt.range,Hv=of.range,Uv=sf.range;function Rt(e){return se(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/So)}const Ot=Rt(0),Nn=Rt(1),lf=Rt(2),uf=Rt(3),kt=Rt(4),cf=Rt(5),ff=Rt(6),Ml=Ot.range,qv=Nn.range,Yv=lf.range,Vv=uf.range,Gv=kt.range,Kv=cf.range,Xv=ff.range,Hn=se(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth()),Zv=Hn.range,Un=se(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth()),Qv=Un.range,De=se(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());De.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:se(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});const Jv=De.range,ze=se(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());ze.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:se(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});const em=ze.range;function hf(e,t,n,r,a,i){const s=[[Ae,1,Ke],[Ae,5,5*Ke],[Ae,15,15*Ke],[Ae,30,30*Ke],[i,1,Ce],[i,5,5*Ce],[i,15,15*Ce],[i,30,30*Ce],[a,1,Xe],[a,3,3*Xe],[a,6,6*Xe],[a,12,12*Xe],[r,1,Ze],[r,2,2*Ze],[n,1,So],[t,1,Tl],[t,3,3*Tl],[e,1,Ei]];function o(u,c,f){const h=c<u;h&&([u,c]=[c,u]);const p=f&&typeof f.range=="function"?f:l(u,c,f),d=p?p.range(u,+c+1):[];return h?d.reverse():d}function l(u,c,f){const h=Math.abs(c-u)/f,p=Br(([,,x])=>x).right(s,h);if(p===s.length)return e.every(la(u/Ei,c/Ei,f));if(p===0)return Ut.every(Math.max(la(u,c,f),1));const[d,v]=s[h/s[p-1][2]<s[p][2]/h?p-1:p];return d.every(v)}return[o,l]}const[df,pf]=hf(ze,Un,Ot,To,Bn,In),[vf,mf]=hf(De,Hn,St,Pt,Wn,Fn);function Pi(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Ni(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function rn(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function tm(e){var t=e.dateTime,n=e.date,r=e.time,a=e.periods,i=e.days,s=e.shortDays,o=e.months,l=e.shortMonths,u=an(a),c=on(a),f=an(i),h=on(i),p=an(s),d=on(s),v=an(o),x=on(o),m=an(l),b=on(l),_={a:Z,A:J,b:K,B:E,c:null,d:Rl,e:Rl,f:Tm,g:Lm,G:Dm,H:_m,I:wm,j:Sm,L:gf,m:Om,M:km,p:A,q:B,Q:Dl,s:zl,S:Mm,u:$m,U:Cm,V:Em,w:Pm,W:Nm,x:null,X:null,y:Rm,Y:Am,Z:zm,"%":Al},M={a:W,A:j,b:F,B:q,c:null,d:Ll,e:Ll,f:Wm,g:Zm,G:Jm,H:jm,I:Fm,j:Im,L:bf,m:Bm,M:Hm,p:Y,q:V,Q:Dl,s:zl,S:Um,u:qm,U:Ym,V:Vm,w:Gm,W:Km,x:null,X:null,y:Xm,Y:Qm,Z:eg,"%":Al},y={a:C,A:P,b:N,B:L,c:I,d:Pl,e:Pl,f:gm,g:El,G:Cl,H:Nl,I:Nl,j:dm,L:mm,m:hm,M:pm,p:k,q:fm,Q:bm,s:xm,S:vm,u:om,U:sm,V:lm,w:am,W:um,x:X,X:U,y:El,Y:Cl,Z:cm,"%":ym};_.x=w(n,_),_.X=w(r,_),_.c=w(t,_),M.x=w(n,M),M.X=w(r,M),M.c=w(t,M);function w(R,z){return function(H){var O=[],Q=-1,te=0,le=R.length,ue,je,Xn;for(H instanceof Date||(H=new Date(+H));++Q<le;)R.charCodeAt(Q)===37&&(O.push(R.slice(te,Q)),(je=$l[ue=R.charAt(++Q)])!=null?ue=R.charAt(++Q):je=ue==="e"?" ":"0",(Xn=z[ue])&&(ue=Xn(H,je)),O.push(ue),te=Q+1);return O.push(R.slice(te,Q)),O.join("")}}function T(R,z){return function(H){var O=rn(1900,void 0,1),Q=$(O,R,H+="",0),te,le;if(Q!=H.length)return null;if("Q"in O)return new Date(O.Q);if("s"in O)return new Date(O.s*1e3+("L"in O?O.L:0));if(z&&!("Z"in O)&&(O.Z=0),"p"in O&&(O.H=O.H%12+O.p*12),O.m===void 0&&(O.m="q"in O?O.q:0),"V"in O){if(O.V<1||O.V>53)return null;"w"in O||(O.w=1),"Z"in O?(te=Ni(rn(O.y,0,1)),le=te.getUTCDay(),te=le>4||le===0?Nn.ceil(te):Nn(te),te=Kt.offset(te,(O.V-1)*7),O.y=te.getUTCFullYear(),O.m=te.getUTCMonth(),O.d=te.getUTCDate()+(O.w+6)%7):(te=Pi(rn(O.y,0,1)),le=te.getDay(),te=le>4||le===0?Pn.ceil(te):Pn(te),te=Pt.offset(te,(O.V-1)*7),O.y=te.getFullYear(),O.m=te.getMonth(),O.d=te.getDate()+(O.w+6)%7)}else("W"in O||"U"in O)&&("w"in O||(O.w="u"in O?O.u%7:"W"in O?1:0),le="Z"in O?Ni(rn(O.y,0,1)).getUTCDay():Pi(rn(O.y,0,1)).getDay(),O.m=0,O.d="W"in O?(O.w+6)%7+O.W*7-(le+5)%7:O.w+O.U*7-(le+6)%7);return"Z"in O?(O.H+=O.Z/100|0,O.M+=O.Z%100,Ni(O)):Pi(O)}}function $(R,z,H,O){for(var Q=0,te=z.length,le=H.length,ue,je;Q<te;){if(O>=le)return-1;if(ue=z.charCodeAt(Q++),ue===37){if(ue=z.charAt(Q++),je=y[ue in $l?z.charAt(Q++):ue],!je||(O=je(R,H,O))<0)return-1}else if(ue!=H.charCodeAt(O++))return-1}return O}function k(R,z,H){var O=u.exec(z.slice(H));return O?(R.p=c.get(O[0].toLowerCase()),H+O[0].length):-1}function C(R,z,H){var O=p.exec(z.slice(H));return O?(R.w=d.get(O[0].toLowerCase()),H+O[0].length):-1}function P(R,z,H){var O=f.exec(z.slice(H));return O?(R.w=h.get(O[0].toLowerCase()),H+O[0].length):-1}function N(R,z,H){var O=m.exec(z.slice(H));return O?(R.m=b.get(O[0].toLowerCase()),H+O[0].length):-1}function L(R,z,H){var O=v.exec(z.slice(H));return O?(R.m=x.get(O[0].toLowerCase()),H+O[0].length):-1}function I(R,z,H){return $(R,t,z,H)}function X(R,z,H){return $(R,n,z,H)}function U(R,z,H){return $(R,r,z,H)}function Z(R){return s[R.getDay()]}function J(R){return i[R.getDay()]}function K(R){return l[R.getMonth()]}function E(R){return o[R.getMonth()]}function A(R){return a[+(R.getHours()>=12)]}function B(R){return 1+~~(R.getMonth()/3)}function W(R){return s[R.getUTCDay()]}function j(R){return i[R.getUTCDay()]}function F(R){return l[R.getUTCMonth()]}function q(R){return o[R.getUTCMonth()]}function Y(R){return a[+(R.getUTCHours()>=12)]}function V(R){return 1+~~(R.getUTCMonth()/3)}return{format:function(R){var z=w(R+="",_);return z.toString=function(){return R},z},parse:function(R){var z=T(R+="",!1);return z.toString=function(){return R},z},utcFormat:function(R){var z=w(R+="",M);return z.toString=function(){return R},z},utcParse:function(R){var z=T(R+="",!0);return z.toString=function(){return R},z}}}var $l={"-":"",_:" ",0:"0"},he=/^\s*\d+/,nm=/^%/,rm=/[\\^$*+?|[\]().{}]/g;function ne(e,t,n){var r=e<0?"-":"",a=(r?-e:e)+"",i=a.length;return r+(i<n?new Array(n-i+1).join(t)+a:a)}function im(e){return e.replace(rm,"\\$&")}function an(e){return new RegExp("^(?:"+e.map(im).join("|")+")","i")}function on(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function am(e,t,n){var r=he.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function om(e,t,n){var r=he.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function sm(e,t,n){var r=he.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function lm(e,t,n){var r=he.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function um(e,t,n){var r=he.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Cl(e,t,n){var r=he.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function El(e,t,n){var r=he.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function cm(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function fm(e,t,n){var r=he.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function hm(e,t,n){var r=he.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Pl(e,t,n){var r=he.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function dm(e,t,n){var r=he.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Nl(e,t,n){var r=he.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function pm(e,t,n){var r=he.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function vm(e,t,n){var r=he.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function mm(e,t,n){var r=he.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function gm(e,t,n){var r=he.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function ym(e,t,n){var r=nm.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function bm(e,t,n){var r=he.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function xm(e,t,n){var r=he.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Rl(e,t){return ne(e.getDate(),t,2)}function _m(e,t){return ne(e.getHours(),t,2)}function wm(e,t){return ne(e.getHours()%12||12,t,2)}function Sm(e,t){return ne(1+Pt.count(De(e),e),t,3)}function gf(e,t){return ne(e.getMilliseconds(),t,3)}function Tm(e,t){return gf(e,t)+"000"}function Om(e,t){return ne(e.getMonth()+1,t,2)}function km(e,t){return ne(e.getMinutes(),t,2)}function Mm(e,t){return ne(e.getSeconds(),t,2)}function $m(e){var t=e.getDay();return t===0?7:t}function Cm(e,t){return ne(St.count(De(e)-1,e),t,2)}function yf(e){var t=e.getDay();return t>=4||t===0?Tt(e):Tt.ceil(e)}function Em(e,t){return e=yf(e),ne(Tt.count(De(e),e)+(De(e).getDay()===4),t,2)}function Pm(e){return e.getDay()}function Nm(e,t){return ne(Pn.count(De(e)-1,e),t,2)}function Rm(e,t){return ne(e.getFullYear()%100,t,2)}function Lm(e,t){return e=yf(e),ne(e.getFullYear()%100,t,2)}function Am(e,t){return ne(e.getFullYear()%1e4,t,4)}function Dm(e,t){var n=e.getDay();return e=n>=4||n===0?Tt(e):Tt.ceil(e),ne(e.getFullYear()%1e4,t,4)}function zm(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ne(t/60|0,"0",2)+ne(t%60,"0",2)}function Ll(e,t){return ne(e.getUTCDate(),t,2)}function jm(e,t){return ne(e.getUTCHours(),t,2)}function Fm(e,t){return ne(e.getUTCHours()%12||12,t,2)}function Im(e,t){return ne(1+Kt.count(ze(e),e),t,3)}function bf(e,t){return ne(e.getUTCMilliseconds(),t,3)}function Wm(e,t){return bf(e,t)+"000"}function Bm(e,t){return ne(e.getUTCMonth()+1,t,2)}function Hm(e,t){return ne(e.getUTCMinutes(),t,2)}function Um(e,t){return ne(e.getUTCSeconds(),t,2)}function qm(e){var t=e.getUTCDay();return t===0?7:t}function Ym(e,t){return ne(Ot.count(ze(e)-1,e),t,2)}function xf(e){var t=e.getUTCDay();return t>=4||t===0?kt(e):kt.ceil(e)}function Vm(e,t){return e=xf(e),ne(kt.count(ze(e),e)+(ze(e).getUTCDay()===4),t,2)}function Gm(e){return e.getUTCDay()}function Km(e,t){return ne(Nn.count(ze(e)-1,e),t,2)}function Xm(e,t){return ne(e.getUTCFullYear()%100,t,2)}function Zm(e,t){return e=xf(e),ne(e.getUTCFullYear()%100,t,2)}function Qm(e,t){return ne(e.getUTCFullYear()%1e4,t,4)}function Jm(e,t){var n=e.getUTCDay();return e=n>=4||n===0?kt(e):kt.ceil(e),ne(e.getUTCFullYear()%1e4,t,4)}function eg(){return"+0000"}function Al(){return"%"}function Dl(e){return+e}function zl(e){return Math.floor(+e/1e3)}var At,_f,wf;tg({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function tg(e){return At=tm(e),_f=At.format,At.parse,wf=At.utcFormat,At.utcParse,At}function ng(e){return new Date(e)}function rg(e){return e instanceof Date?+e:+new Date(+e)}function Oo(e,t,n,r,a,i,s,o,l,u){var c=uo(),f=c.invert,h=c.domain,p=u(".%L"),d=u(":%S"),v=u("%I:%M"),x=u("%I %p"),m=u("%a %d"),b=u("%b %d"),_=u("%B"),M=u("%Y");function y(w){return(l(w)<w?p:o(w)<w?d:s(w)<w?v:i(w)<w?x:r(w)<w?a(w)<w?m:b:n(w)<w?_:M)(w)}return c.invert=function(w){return new Date(f(w))},c.domain=function(w){return arguments.length?h(Array.from(w,rg)):h().map(ng)},c.ticks=function(w){var T=h();return e(T[0],T[T.length-1],w??10)},c.tickFormat=function(w,T){return T==null?y:u(T)},c.nice=function(w){var T=h();return(!w||typeof w.range!="function")&&(w=t(T[0],T[T.length-1],w??10)),w?h(tf(T,w)):c},c.copy=function(){return jn(c,Oo(e,t,n,r,a,i,s,o,l,u))},c}function Sf(){return Ee.apply(Oo(vf,mf,De,Hn,St,Pt,Wn,Fn,Ae,_f).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Tf(){return Ee.apply(Oo(df,pf,ze,Un,Ot,Kt,Bn,In,Ae,wf).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Xr(){var e=0,t=1,n,r,a,i,s=xe,o=!1,l;function u(f){return f==null||isNaN(f=+f)?l:s(a===0?.5:(f=(i(f)-n)*a,o?Math.max(0,Math.min(1,f)):f))}u.domain=function(f){return arguments.length?([e,t]=f,n=i(e=+e),r=i(t=+t),a=n===r?0:1/(r-n),u):[e,t]},u.clamp=function(f){return arguments.length?(o=!!f,u):o},u.interpolator=function(f){return arguments.length?(s=f,u):s};function c(f){return function(h){var p,d;return arguments.length?([p,d]=h,s=f(p,d),u):[s(0),s(1)]}}return u.range=c(Et),u.rangeRound=c(zn),u.unknown=function(f){return arguments.length?(l=f,u):l},function(f){return i=f,n=f(e),r=f(t),a=n===r?0:1/(r-n),u}}function ft(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Of(){var e=ct(Xr()(xe));return e.copy=function(){return ft(e,Of())},Je.apply(e,arguments)}function kf(){var e=po(Xr()).domain([1,10]);return e.copy=function(){return ft(e,kf()).base(e.base())},Je.apply(e,arguments)}function Mf(){var e=mo(Xr());return e.copy=function(){return ft(e,Mf()).constant(e.constant())},Je.apply(e,arguments)}function ko(){var e=yo(Xr());return e.copy=function(){return ft(e,ko()).exponent(e.exponent())},Je.apply(e,arguments)}function ig(){return ko.apply(null,arguments).exponent(.5)}function $f(){var e=[],t=xe;function n(r){if(r!=null&&!isNaN(r=+r))return t((An(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let a of r)a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(at),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,a)=>t(a/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(a,i)=>Ep(e,i/r))},n.copy=function(){return $f(t).domain(e)},Je.apply(n,arguments)}function Zr(){var e=0,t=.5,n=1,r=1,a,i,s,o,l,u=xe,c,f=!1,h;function p(v){return isNaN(v=+v)?h:(v=.5+((v=+c(v))-i)*(r*v<r*i?o:l),u(f?Math.max(0,Math.min(1,v)):v))}p.domain=function(v){return arguments.length?([e,t,n]=v,a=c(e=+e),i=c(t=+t),s=c(n=+n),o=a===i?0:.5/(i-a),l=i===s?0:.5/(s-i),r=i<a?-1:1,p):[e,t,n]},p.clamp=function(v){return arguments.length?(f=!!v,p):f},p.interpolator=function(v){return arguments.length?(u=v,p):u};function d(v){return function(x){var m,b,_;return arguments.length?([m,b,_]=x,u=Xc(v,[m,b,_]),p):[u(0),u(.5),u(1)]}}return p.range=d(Et),p.rangeRound=d(zn),p.unknown=function(v){return arguments.length?(h=v,p):h},function(v){return c=v,a=v(e),i=v(t),s=v(n),o=a===i?0:.5/(i-a),l=i===s?0:.5/(s-i),r=i<a?-1:1,p}}function Cf(){var e=ct(Zr()(xe));return e.copy=function(){return ft(e,Cf())},Je.apply(e,arguments)}function Ef(){var e=po(Zr()).domain([.1,1,10]);return e.copy=function(){return ft(e,Ef()).base(e.base())},Je.apply(e,arguments)}function Pf(){var e=mo(Zr());return e.copy=function(){return ft(e,Pf()).constant(e.constant())},Je.apply(e,arguments)}function Mo(){var e=yo(Zr());return e.copy=function(){return ft(e,Mo()).exponent(e.exponent())},Je.apply(e,arguments)}function ag(){return Mo.apply(null,arguments).exponent(.5)}const og=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Ur,scaleDiverging:Cf,scaleDivergingLog:Ef,scaleDivergingPow:Mo,scaleDivergingSqrt:ag,scaleDivergingSymlog:Pf,scaleIdentity:ef,scaleImplicit:ua,scaleLinear:ho,scaleLog:vo,scaleOrdinal:Hr,scalePoint:mc,scalePow:Kr,scaleQuantile:xo,scaleQuantize:_o,scaleRadial:bo,scaleSequential:Of,scaleSequentialLog:kf,scaleSequentialPow:ko,scaleSequentialQuantile:$f,scaleSequentialSqrt:ig,scaleSequentialSymlog:Mf,scaleSqrt:nf,scaleSymlog:go,scaleThreshold:wo,scaleTime:Sf,scaleUtc:Tf,tickFormat:Jc},Symbol.toStringTag,{value:"Module"}));function sg(e,t){t.domain&&("nice"in e||"quantiles"in e||"padding"in e,e.domain(t.domain))}function lg(e,t){t.range&&("padding"in e,e.range(t.range))}function ug(e,t){"align"in e&&"align"in t&&typeof t.align<"u"&&e.align(t.align)}function cg(e,t){"base"in e&&"base"in t&&typeof t.base<"u"&&e.base(t.base)}function fg(e,t){"clamp"in e&&"clamp"in t&&typeof t.clamp<"u"&&e.clamp(t.clamp)}function hg(e,t){"constant"in e&&"constant"in t&&typeof t.constant<"u"&&e.constant(t.constant)}function dg(e,t){"exponent"in e&&"exponent"in t&&typeof t.exponent<"u"&&e.exponent(t.exponent)}const pg=Object.freeze(Object.defineProperty({__proto__:null,interpolate:Et,interpolateArray:Kp,interpolateBasis:Cc,interpolateBasisClosed:Ec,interpolateCubehelix:Gc,interpolateCubehelixLong:Kc,interpolateDate:Ac,interpolateDiscrete:Qp,interpolateHcl:qc,interpolateHclLong:Yc,interpolateHsl:Wc,interpolateHslLong:Bc,interpolateHue:Jp,interpolateLab:Hc,interpolateNumber:Re,interpolateNumberArray:lo,interpolateObject:Dc,interpolateRgb:xr,interpolateRgbBasis:Vp,interpolateRgbBasisClosed:Gp,interpolateRound:zn,interpolateString:zc,interpolateTransformCss:nv,interpolateTransformSvg:rv,interpolateZoom:sv,piecewise:Xc,quantize:lv},Symbol.toStringTag,{value:"Module"}));var jl={lab:Hc,hcl:qc,"hcl-long":Yc,hsl:Wc,"hsl-long":Bc,cubehelix:Gc,"cubehelix-long":Kc,rgb:xr};function vg(e){switch(e){case"lab":case"hcl":case"hcl-long":case"hsl":case"hsl-long":case"cubehelix":case"cubehelix-long":case"rgb":return jl[e]}var t=e.type,n=e.gamma,r=jl[t];return typeof n>"u"?r:r.gamma(n)}function mg(e,t){if("interpolate"in t&&"interpolate"in e&&typeof t.interpolate<"u"){var n=vg(t.interpolate);e.interpolate(n)}}const gg=Object.freeze(Object.defineProperty({__proto__:null,timeDay:Pt,timeDays:Dv,timeFriday:of,timeFridays:Hv,timeHour:Wn,timeHours:Lv,timeInterval:se,timeMillisecond:Ut,timeMilliseconds:Sl,timeMinute:Fn,timeMinutes:Nv,timeMonday:Pn,timeMondays:Fv,timeMonth:Hn,timeMonths:Zv,timeSaturday:sf,timeSaturdays:Uv,timeSecond:Ae,timeSeconds:Ol,timeSunday:St,timeSundays:kl,timeThursday:Tt,timeThursdays:Bv,timeTickInterval:mf,timeTicks:vf,timeTuesday:rf,timeTuesdays:Iv,timeWednesday:af,timeWednesdays:Wv,timeWeek:St,timeWeeks:kl,timeYear:De,timeYears:Jv,unixDay:To,unixDays:jv,utcDay:Kt,utcDays:zv,utcFriday:cf,utcFridays:Kv,utcHour:Bn,utcHours:Av,utcMillisecond:Ut,utcMilliseconds:Sl,utcMinute:In,utcMinutes:Rv,utcMonday:Nn,utcMondays:qv,utcMonth:Un,utcMonths:Qv,utcSaturday:ff,utcSaturdays:Xv,utcSecond:Ae,utcSeconds:Ol,utcSunday:Ot,utcSundays:Ml,utcThursday:kt,utcThursdays:Gv,utcTickInterval:pf,utcTicks:df,utcTuesday:lf,utcTuesdays:Yv,utcWednesday:uf,utcWednesdays:Vv,utcWeek:Ot,utcWeeks:Ml,utcYear:ze,utcYears:em},Symbol.toStringTag,{value:"Module"}));var yg=new Date(Date.UTC(2020,1,2,3,4,5)),bg="%Y-%m-%d %H:%M";function Nf(e){var t=e.tickFormat(1,bg)(yg);return t==="2020-02-02 03:04"}var Fl={day:Pt,hour:Wn,minute:Fn,month:Hn,second:Ae,week:St,year:De},Il={day:Kt,hour:Bn,minute:In,month:Un,second:Ae,week:Ot,year:ze};function xg(e,t){if("nice"in t&&typeof t.nice<"u"&&"nice"in e){var n=t.nice;if(typeof n=="boolean")n&&e.nice();else if(typeof n=="number")e.nice(n);else{var r=e,a=Nf(r);if(typeof n=="string")r.nice(a?Il[n]:Fl[n]);else{var i=n.interval,s=n.step,o=(a?Il[i]:Fl[i]).every(s);o!=null&&r.nice(o)}}}}function _g(e,t){"padding"in e&&"padding"in t&&typeof t.padding<"u"&&e.padding(t.padding),"paddingInner"in e&&"paddingInner"in t&&typeof t.paddingInner<"u"&&e.paddingInner(t.paddingInner),"paddingOuter"in e&&"paddingOuter"in t&&typeof t.paddingOuter<"u"&&e.paddingOuter(t.paddingOuter)}function wg(e,t){if(t.reverse){var n=e.range().slice().reverse();"padding"in e,e.range(n)}}function Sg(e,t){"round"in t&&typeof t.round<"u"&&(t.round&&"interpolate"in t&&typeof t.interpolate<"u"?console.warn("[visx/scale/applyRound] ignoring round: scale config contains round and interpolate. only applying interpolate. config:",t):"round"in e?e.round(t.round):"interpolate"in e&&t.round&&e.interpolate(zn))}function Tg(e,t){"unknown"in e&&"unknown"in t&&typeof t.unknown<"u"&&e.unknown(t.unknown)}function Og(e,t){if("zero"in t&&t.zero===!0){var n=e.domain(),r=n[0],a=n[1],i=a<r,s=i?[a,r]:[r,a],o=s[0],l=s[1],u=[Math.min(0,o),Math.max(0,l)];e.domain(i?u.reverse():u)}}var Rf=["domain","nice","zero","interpolate","round","range","reverse","align","base","clamp","constant","exponent","padding","unknown"],kg={domain:sg,nice:xg,zero:Og,interpolate:mg,round:Sg,align:ug,base:cg,clamp:fg,constant:hg,exponent:dg,padding:_g,range:lg,reverse:wg,unknown:Tg};function _e(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=new Set(t),a=Rf.filter(function(i){return r.has(i)});return function(s,o){return typeof o<"u"&&a.forEach(function(l){kg[l](s,o)}),s}}var Mg=_e("domain","range","reverse","align","padding","round");function qn(e){return Mg(Ur(),e)}var $g=_e("domain","range","reverse","align","padding","round");function Lf(e){return $g(mc(),e)}var Cg=_e("domain","range","reverse","clamp","interpolate","nice","round","zero");function qt(e){return Cg(ho(),e)}var Eg=_e("domain","range","clamp","nice","round","unknown");function Pg(e){return Eg(bo(),e)}var Ng=_e("domain","range","reverse","clamp","interpolate","nice","round");function Af(e){return Ng(Sf(),e)}var Rg=_e("domain","range","reverse","clamp","interpolate","nice","round");function Df(e){return Rg(Tf(),e)}var Lg=_e("domain","range","reverse","base","clamp","interpolate","nice","round");function zf(e){return Lg(vo(),e)}var Ag=_e("domain","range","reverse","clamp","exponent","interpolate","nice","round","zero");function jf(e){return Ag(Kr(),e)}var Dg=_e("domain","range","reverse","unknown");function Qr(e){return Dg(Hr(),e)}var zg=_e("domain","range","reverse","nice","zero");function Ff(e){return zg(_o(),e)}var jg=_e("domain","range","reverse");function If(e){return jg(xo(),e)}var Fg=_e("domain","range","reverse","clamp","constant","nice","zero","round");function Wf(e){return Fg(go(),e)}var Ig=_e("domain","range","reverse");function Bf(e){return Ig(wo(),e)}var Wg=_e("domain","range","reverse","clamp","interpolate","nice","round","zero");function Hf(e){return Wg(nf(),e)}function vn(e){if(typeof e<"u"&&"type"in e)switch(e.type){case"linear":return qt(e);case"log":return zf(e);case"pow":return jf(e);case"sqrt":return Hf(e);case"symlog":return Wf(e);case"time":return Af(e);case"utc":return Df(e);case"quantile":return If(e);case"quantize":return Ff(e);case"threshold":return Bf(e);case"ordinal":return Qr(e);case"point":return Lf(e);case"band":return qn(e)}return qt(e)}var Bg=_e.apply(void 0,Rf);function Hg(e,t){return Bg(e.copy(),t)}function Ug(e){return"paddingInner"in e?"band":"padding"in e?"point":"quantiles"in e?"quantile":"base"in e?"log":"exponent"in e?e.exponent()===.5?"sqrt":"pow":"constant"in e?"symlog":"clamp"in e?e.ticks()[0]instanceof Date?Nf(e)?"utc":"time":"linear":"nice"in e?"quantize":"invertExtent"in e?"threshold":"ordinal"}function Jr(e){if((typeof e=="function"||typeof e=="object"&&e)&&"valueOf"in e){var t=e.valueOf();if(typeof t=="number")return t}return e}function ei(e,t){var n=e;return"ticks"in n?n.ticks(t):n.domain().filter(function(r,a,i){return t==null||i.length<=t||a%Math.round((i.length-1)/t)===0})}function Uf(e){return e==null?void 0:e.toString()}var qg=new Set(["linear","pow","quantize","sqrt","symlog"]);function ga(e){return qg.has(e.type)}const Yg=Object.freeze(Object.defineProperty({__proto__:null,coerceNumber:Jr,createScale:vn,getTicks:ei,inferScaleType:Ug,scaleBand:qn,scaleCanBeZeroed:ga,scaleLinear:qt,scaleLog:zf,scaleOrdinal:Qr,scalePoint:Lf,scalePower:jf,scaleQuantile:If,scaleQuantize:Ff,scaleRadial:Pg,scaleSqrt:Hf,scaleSymlog:Wf,scaleThreshold:Bf,scaleTime:Af,scaleUtc:Df,toString:Uf,updateScale:Hg},Symbol.toStringTag,{value:"Module"}));var Vg=["children","id","from","to","x1","y1","x2","y2","fromOffset","fromOpacity","toOffset","toOpacity","rotate","transform","vertical"];function ya(){return ya=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},ya.apply(this,arguments)}function Gg(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function Rn(e){var t=e.children,n=e.id,r=e.from,a=e.to,i=e.x1,s=e.y1,o=e.x2,l=e.y2,u=e.fromOffset,c=u===void 0?"0%":u,f=e.fromOpacity,h=f===void 0?1:f,p=e.toOffset,d=p===void 0?"100%":p,v=e.toOpacity,x=v===void 0?1:v,m=e.rotate,b=e.transform,_=e.vertical,M=_===void 0?!0:_,y=Gg(e,Vg),w=i,T=o,$=s,k=l;return M&&!w&&!T&&!$&&!k&&(w="0",T="0",$="0",k="1"),g.createElement("defs",null,g.createElement("linearGradient",ya({id:n,x1:w,y1:$,x2:T,y2:k,gradientTransform:m?"rotate("+m+")":b},y),!!t&&t,!t&&g.createElement("stop",{offset:c,stopColor:r,stopOpacity:h}),!t&&g.createElement("stop",{offset:d,stopColor:a,stopOpacity:x})))}Rn.propTypes={id:S.string.isRequired,from:S.string,to:S.string,x1:S.oneOfType([S.string,S.number]),x2:S.oneOfType([S.string,S.number]),y1:S.oneOfType([S.string,S.number]),y2:S.oneOfType([S.string,S.number]),fromOffset:S.oneOfType([S.string,S.number]),fromOpacity:S.oneOfType([S.string,S.number]),toOffset:S.oneOfType([S.string,S.number]),toOpacity:S.oneOfType([S.string,S.number]),rotate:S.oneOfType([S.string,S.number]),transform:S.string,children:S.node,vertical:S.bool};var Kg=qf;function qf(e,t,n){e instanceof RegExp&&(e=Wl(e,n)),t instanceof RegExp&&(t=Wl(t,n));var r=Yf(e,t,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+e.length,r[1]),post:n.slice(r[1]+t.length)}}function Wl(e,t){var n=t.match(e);return n?n[0]:null}qf.range=Yf;function Yf(e,t,n){var r,a,i,s,o,l=n.indexOf(e),u=n.indexOf(t,l+1),c=l;if(l>=0&&u>0){for(r=[],i=n.length;c>=0&&!o;)c==l?(r.push(c),l=n.indexOf(e,c+1)):r.length==1?o=[r.pop(),u]:(a=r.pop(),a<i&&(i=a,s=u),u=n.indexOf(t,c+1)),c=l<u&&l>=0?l:u;r.length&&(o=[i,s])}return o}var Xg=Vf;function Vf(e,t,n){e instanceof RegExp&&(e=Bl(e,n)),t instanceof RegExp&&(t=Bl(t,n));var r=Gf(e,t,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+e.length,r[1]),post:n.slice(r[1]+t.length)}}function Bl(e,t){var n=t.match(e);return n?n[0]:null}Vf.range=Gf;function Gf(e,t,n){var r,a,i,s,o,l=n.indexOf(e),u=n.indexOf(t,l+1),c=l;if(l>=0&&u>0){if(e===t)return[l,u];for(r=[],i=n.length;c>=0&&!o;)c==l?(r.push(c),l=n.indexOf(e,c+1)):r.length==1?o=[r.pop(),u]:(a=r.pop(),a<i&&(i=a,s=u),u=n.indexOf(t,c+1)),c=l<u&&l>=0?l:u;r.length&&(o=[i,s])}return o}var Zg=Xg,Qg=Kf;function Kf(e,t,n){var r=e;return Jg(e,t).reduce(function(a,i){return a.replace(i.functionIdentifier+"("+i.matches.body+")",e0(i.matches.body,i.functionIdentifier,n,r,t))},e)}function Jg(e,t){var n=[],r=typeof t=="string"?new RegExp("\\b("+t+")\\("):t;do{var a=r.exec(e);if(!a)return n;if(a[1]===void 0)throw new Error("Missing the first couple of parenthesis to get the function identifier in "+t);var i=a[1],s=a.index,o=Zg("(",")",e.substring(s));if(!o||o.start!==a[0].length-1)throw new SyntaxError(i+"(): missing closing ')' in the value '"+e+"'");n.push({matches:o,functionIdentifier:i}),e=o.post}while(r.test(e));return n}function e0(e,t,n,r,a){return n(Kf(e,a,n),t,r)}var ye=function(e){this.value=e};ye.math={isDegree:!0,acos:function(e){return ye.math.isDegree?180/Math.PI*Math.acos(e):Math.acos(e)},add:function(e,t){return e+t},asin:function(e){return ye.math.isDegree?180/Math.PI*Math.asin(e):Math.asin(e)},atan:function(e){return ye.math.isDegree?180/Math.PI*Math.atan(e):Math.atan(e)},acosh:function(e){return Math.log(e+Math.sqrt(e*e-1))},asinh:function(e){return Math.log(e+Math.sqrt(e*e+1))},atanh:function(e){return Math.log((1+e)/(1-e))},C:function(e,t){var n=1,r=e-t,a=t;a<r&&(a=r,r=t);for(var i=a+1;i<=e;i++)n*=i;return n/ye.math.fact(r)},changeSign:function(e){return-e},cos:function(e){return ye.math.isDegree&&(e=ye.math.toRadian(e)),Math.cos(e)},cosh:function(e){return(Math.pow(Math.E,e)+Math.pow(Math.E,-1*e))/2},div:function(e,t){return e/t},fact:function(e){if(e%1!==0)return"NaN";for(var t=1,n=2;n<=e;n++)t*=n;return t},inverse:function(e){return 1/e},log:function(e){return Math.log(e)/Math.log(10)},mod:function(e,t){return e%t},mul:function(e,t){return e*t},P:function(e,t){for(var n=1,r=Math.floor(e)-Math.floor(t)+1;r<=Math.floor(e);r++)n*=r;return n},Pi:function(e,t,n){for(var r=1,a=e;a<=t;a++)r*=Number(n.postfixEval({n:a}));return r},pow10x:function(e){for(var t=1;e--;)t*=10;return t},sigma:function(e,t,n){for(var r=0,a=e;a<=t;a++)r+=Number(n.postfixEval({n:a}));return r},sin:function(e){return ye.math.isDegree&&(e=ye.math.toRadian(e)),Math.sin(e)},sinh:function(e){return(Math.pow(Math.E,e)-Math.pow(Math.E,-1*e))/2},sub:function(e,t){return e-t},tan:function(e){return ye.math.isDegree&&(e=ye.math.toRadian(e)),Math.tan(e)},tanh:function(e){return ye.sinha(e)/ye.cosha(e)},toRadian:function(e){return e*Math.PI/180},and:function(e,t){return e&t}};ye.Exception=function(e){this.message=e};var t0=ye,G=t0;function ge(e,t){for(var n=0;n<e.length;n++)e[n]+=t;return e}var ot=[{token:"sin",show:"sin",type:0,value:G.math.sin},{token:"cos",show:"cos",type:0,value:G.math.cos},{token:"tan",show:"tan",type:0,value:G.math.tan},{token:"pi",show:"π",type:3,value:"PI"},{token:"(",show:"(",type:4,value:"("},{token:")",show:")",type:5,value:")"},{token:"P",show:"P",type:10,value:G.math.P},{token:"C",show:"C",type:10,value:G.math.C},{token:" ",show:" ",type:14,value:" ".anchor},{token:"asin",show:"asin",type:0,value:G.math.asin},{token:"acos",show:"acos",type:0,value:G.math.acos},{token:"atan",show:"atan",type:0,value:G.math.atan},{token:"7",show:"7",type:1,value:"7"},{token:"8",show:"8",type:1,value:"8"},{token:"9",show:"9",type:1,value:"9"},{token:"int",show:"Int",type:0,value:Math.floor},{token:"cosh",show:"cosh",type:0,value:G.math.cosh},{token:"acosh",show:"acosh",type:0,value:G.math.acosh},{token:"ln",show:" ln",type:0,value:Math.log},{token:"^",show:"^",type:10,value:Math.pow},{token:"root",show:"root",type:0,value:Math.sqrt},{token:"4",show:"4",type:1,value:"4"},{token:"5",show:"5",type:1,value:"5"},{token:"6",show:"6",type:1,value:"6"},{token:"/",show:"÷",type:2,value:G.math.div},{token:"!",show:"!",type:7,value:G.math.fact},{token:"tanh",show:"tanh",type:0,value:G.math.tanh},{token:"atanh",show:"atanh",type:0,value:G.math.atanh},{token:"Mod",show:" Mod ",type:2,value:G.math.mod},{token:"1",show:"1",type:1,value:"1"},{token:"2",show:"2",type:1,value:"2"},{token:"3",show:"3",type:1,value:"3"},{token:"*",show:"×",type:2,value:G.math.mul},{token:"sinh",show:"sinh",type:0,value:G.math.sinh},{token:"asinh",show:"asinh",type:0,value:G.math.asinh},{token:"e",show:"e",type:3,value:"E"},{token:"log",show:" log",type:0,value:G.math.log},{token:"0",show:"0",type:1,value:"0"},{token:".",show:".",type:6,value:"."},{token:"+",show:"+",type:9,value:G.math.add},{token:"-",show:"-",type:9,value:G.math.sub},{token:",",show:",",type:11,value:","},{token:"Sigma",show:"Σ",type:12,value:G.math.sigma},{token:"n",show:"n",type:13,value:"n"},{token:"Pi",show:"Π",type:12,value:G.math.Pi},{token:"pow",show:"pow",type:8,value:Math.pow,numberOfArguments:2},{token:"&",show:"&",type:9,value:G.math.and}],ba={0:11,1:0,2:3,3:0,4:0,5:0,6:0,7:11,8:11,9:1,10:10,11:0,12:11,13:0,14:-1,15:11};for(var lr=0;lr<ot.length;lr++)ot[lr].precedence=ba[ot[lr].type];var Be={0:!0,1:!0,3:!0,4:!0,6:!0,8:!0,9:!0,12:!0,13:!0,14:!0,15:!0},Dt={0:!0,1:!0,2:!0,3:!0,4:!0,5:!0,6:!0,7:!0,8:!0,9:!0,10:!0,11:!0,12:!0,13:!0,15:!0},n0={0:!0,3:!0,4:!0,8:!0,12:!0,13:!0,15:!0},Ne={},sn={0:!0,1:!0,3:!0,4:!0,6:!0,8:!0,12:!0,13:!0,15:!0},r0={1:!0},be=[[],["1","2","3","7","8","9","4","5","6","+","-","*","/","(",")","^","!","P","C","e","0",".",",","n"," ","&"],["pi","ln","Pi"],["sin","cos","tan","Del","int","Mod","log","pow"],["asin","acos","atan","cosh","root","tanh","sinh"],["acosh","atanh","asinh","Sigma"]];function i0(e,t,n,r){for(var a=0;a<r;a++)if(e[n+a]!==t[a])return!1;return!0}G.tokenTypes={FUNCTION_WITH_ONE_ARG:0,NUMBER:1,BINARY_OPERATOR_HIGH_PRECENDENCE:2,CONSTANT:3,OPENING_PARENTHESIS:4,CLOSING_PARENTHESIS:5,DECIMAL:6,POSTFIX_FUNCTION_WITH_ONE_ARG:7,FUNCTION_WITH_N_ARGS:8,BINARY_OPERATOR_LOW_PRECENDENCE:9,BINARY_OPERATOR_PERMUTATION:10,COMMA:11,EVALUATED_FUNCTION:12,EVALUATED_FUNCTION_PARAMETER:13,SPACE:14};G.addToken=function(e){for(var t=0;t<e.length;t++){var n=e[t].token.length,r=-1;e[t].type===G.tokenTypes.FUNCTION_WITH_N_ARGS&&e[t].numberOfArguments===void 0&&(e[t].numberOfArguments=2),be[n]=be[n]||[];for(var a=0;a<be[n].length;a++)if(e[t].token===be[n][a]){r=Xf(be[n][a],ot);break}r===-1?(ot.push(e[t]),e[t].precedence=ba[e[t].type],be.length<=e[t].token.length&&(be[e[t].token.length]=[]),be[e[t].token.length].push(e[t].token)):(ot[r]=e[t],e[t].precedence=ba[e[t].type])}};function Xf(e,t){for(var n=0;n<t.length;n++)if(t[n].token===e)return n;return-1}function a0(e){for(var t=[],n=e.length,r,a,i,s=0;s<n;s++)if(!(s<n-1&&e[s]===" "&&e[s+1]===" ")){for(r="",a=e.length-s>be.length-2?be.length-1:e.length-s;a>0;a--)if(be[a]!==void 0)for(i=0;i<be[a].length;i++)i0(e,be[a][i],s,a)&&(r=be[a][i],i=be[a].length,a=0);if(s+=r.length-1,r==="")throw new G.Exception("Can't understand after "+e.slice(s));t.push(ot[Xf(r,ot)])}return t}var o0={value:G.math.changeSign,type:0,pre:21,show:"-"},ur={value:")",show:")",type:5,pre:0},ln={value:"(",type:4,pre:0,show:"("};G.lex=function(e,t){var n=[ln],r=[],a=e,i=Be,s=0,o=Ne,l="",u;typeof t<"u"&&G.addToken(t);var c={},f=a0(a);for(u=0;u<f.length;u++){var h=f[u];if(h.type===14){if(u>0&&u<f.length-1&&f[u+1].type===1&&(f[u-1].type===1||f[u-1].type===6))throw new G.Exception("Unexpected Space");continue}var p=h.token,d=h.type,v=h.value,x=h.precedence,m=h.show,b=n[n.length-1],_;for(_=r.length;_--&&r[_]===0;)if([0,2,3,4,5,9,11,12,13].indexOf(d)!==-1){if(i[d]!==!0)throw new G.Exception(p+" is not allowed after "+l);n.push(ur),i=Dt,o=sn,r.pop()}if(i[d]!==!0)throw new G.Exception(p+" is not allowed after "+l);if(o[d]===!0&&(d=2,v=G.math.mul,m="×",x=3,u=u-1),c={value:v,type:d,pre:x,show:m,numberOfArguments:h.numberOfArguments},d===0)i=Be,o=Ne,ge(r,2),n.push(c),f[u+1].type!==4&&(n.push(ln),r.push(2));else if(d===1)b.type===1?(b.value+=v,ge(r,1)):n.push(c),i=Dt,o=n0;else if(d===2)i=Be,o=Ne,ge(r,2),n.push(c);else if(d===3)n.push(c),i=Dt,o=sn;else if(d===4)ge(r,1),s++,i=Be,o=Ne,n.push(c);else if(d===5){if(!s)throw new G.Exception("Closing parenthesis are more than opening one, wait What!!!");s--,i=Dt,o=sn,n.push(c),ge(r,1)}else if(d===6){if(b.hasDec)throw new G.Exception("Two decimals are not allowed in one number");b.type!==1&&(b={value:0,type:1,pre:0},n.push(b)),i=r0,ge(r,1),o=Ne,b.value+=v,b.hasDec=!0}else d===7&&(i=Dt,o=sn,ge(r,1),n.push(c));d===8?(i=Be,o=Ne,ge(r,h.numberOfArguments+2),n.push(c),f[u+1].type!==4&&(n.push(ln),r.push(h.numberOfArguments+2))):d===9?(b.type===9?b.value===G.math.add?(b.value=v,b.show=m,ge(r,1)):b.value===G.math.sub&&m==="-"&&(b.value=G.math.add,b.show="+",ge(r,1)):b.type!==5&&b.type!==7&&b.type!==1&&b.type!==3&&b.type!==13?p==="-"&&(i=Be,o=Ne,ge(r,2).push(2),n.push(o0),n.push(ln)):(n.push(c),ge(r,2)),i=Be,o=Ne):d===10?(i=Be,o=Ne,ge(r,2),n.push(c)):d===11?(i=Be,o=Ne,n.push(c)):d===12?(i=Be,o=Ne,ge(r,6),n.push(c),f[u+1].type!==4&&(n.push(ln),r.push(6))):d===13&&(i=Dt,o=sn,n.push(c)),ge(r,-1),l=p}for(_=r.length;_--;)n.push(ur);if(i[5]!==!0)throw new G.Exception("complete the expression");for(;s--;)n.push(ur);return n.push(ur),new G(n)};var s0=G,xa=s0;xa.prototype.toPostfix=function(){for(var e=[],t,n,r,a,i,s=[{value:"(",type:4,pre:0}],o=this.value,l=1;l<o.length;l++)if(o[l].type===1||o[l].type===3||o[l].type===13)o[l].type===1&&(o[l].value=Number(o[l].value)),e.push(o[l]);else if(o[l].type===4)s.push(o[l]);else if(o[l].type===5)for(;(n=s.pop()).type!==4;)e.push(n);else if(o[l].type===11){for(;(n=s.pop()).type!==4;)e.push(n);s.push(n)}else{t=o[l],a=t.pre,i=s[s.length-1],r=i.pre;var u=i.value=="Math.pow"&&t.value=="Math.pow";if(a>r)s.push(t);else{for(;r>=a&&!u||u&&a<r;)n=s.pop(),i=s[s.length-1],e.push(n),r=i.pre,u=t.value=="Math.pow"&&i.value=="Math.pow";s.push(t)}}return new xa(e)};var l0=xa,gn=l0;gn.prototype.postfixEval=function(e){e=e||{},e.PI=Math.PI,e.E=Math.E;for(var t=[],n,r,a,i=this.value,s=typeof e.n<"u",o=0;o<i.length;o++)if(i[o].type===1)t.push({value:i[o].value,type:1});else if(i[o].type===3)t.push({value:e[i[o].value],type:1});else if(i[o].type===0)typeof t[t.length-1].type>"u"?t[t.length-1].value.push(i[o]):t[t.length-1].value=i[o].value(t[t.length-1].value);else if(i[o].type===7)typeof t[t.length-1].type>"u"?t[t.length-1].value.push(i[o]):t[t.length-1].value=i[o].value(t[t.length-1].value);else if(i[o].type===8){for(var l=[],u=0;u<i[o].numberOfArguments;u++)l.push(t.pop().value);t.push({type:1,value:i[o].value.apply(i[o],l.reverse())})}else i[o].type===10?(n=t.pop(),r=t.pop(),typeof r.type>"u"?(r.value=r.concat(n),r.value.push(i[o]),t.push(r)):typeof n.type>"u"?(n.unshift(r),n.push(i[o]),t.push(n)):t.push({type:1,value:i[o].value(r.value,n.value)})):i[o].type===2||i[o].type===9?(n=t.pop(),r=t.pop(),typeof r.type>"u"?(r=r.concat(n),r.push(i[o]),t.push(r)):typeof n.type>"u"?(n.unshift(r),n.push(i[o]),t.push(n)):t.push({type:1,value:i[o].value(r.value,n.value)})):i[o].type===12?(n=t.pop(),typeof n.type<"u"&&(n=[n]),r=t.pop(),a=t.pop(),t.push({type:1,value:i[o].value(a.value,r.value,new gn(n))})):i[o].type===13&&(s?t.push({value:e[i[o].value],type:3}):t.push([i[o]]));if(t.length>1)throw new gn.Exception("Uncaught Syntax error");return t[0].value>1e15?"Infinity":parseFloat(t[0].value.toFixed(15))};gn.eval=function(e,t,n){return typeof t>"u"?this.lex(e).toPostfix().postfixEval():typeof n>"u"?typeof t.length<"u"?this.lex(e,t).toPostfix().postfixEval():this.lex(e).toPostfix().postfixEval(t):this.lex(e,t).toPostfix().postfixEval(n)};var u0=gn,Zf=u0;Zf.prototype.formulaEval=function(){for(var e,t,n,r=[],a=this.value,i=0;i<a.length;i++)a[i].type===1||a[i].type===3?r.push({value:a[i].type===3?a[i].show:a[i].value,type:1}):a[i].type===13?r.push({value:a[i].show,type:1}):a[i].type===0?r[r.length-1]={value:a[i].show+(a[i].show!="-"?"(":"")+r[r.length-1].value+(a[i].show!="-"?")":""),type:0}:a[i].type===7?r[r.length-1]={value:(r[r.length-1].type!=1?"(":"")+r[r.length-1].value+(r[r.length-1].type!=1?")":"")+a[i].show,type:7}:a[i].type===10?(e=r.pop(),t=r.pop(),a[i].show==="P"||a[i].show==="C"?r.push({value:"<sup>"+t.value+"</sup>"+a[i].show+"<sub>"+e.value+"</sub>",type:10}):r.push({value:(t.type!=1?"(":"")+t.value+(t.type!=1?")":"")+"<sup>"+e.value+"</sup>",type:1})):a[i].type===2||a[i].type===9?(e=r.pop(),t=r.pop(),r.push({value:(t.type!=1?"(":"")+t.value+(t.type!=1?")":"")+a[i].show+(e.type!=1?"(":"")+e.value+(e.type!=1?")":""),type:a[i].type})):a[i].type===12&&(e=r.pop(),t=r.pop(),n=r.pop(),r.push({value:a[i].show+"("+n.value+","+t.value+","+e.value+")",type:12}));return r[0].value};var c0=Zf,f0=Kg,h0=Qg,d0=c0,p0=100,v0=/(\+|\-|\*|\\|[^a-z]|)(\s*)(\()/g,Ri,m0=g0;function g0(e,t){Ri=0,t=Math.pow(10,t===void 0?5:t),e=e.replace(/\n+/g," ");function n(a,i,s){if(Ri++>p0)throw Ri=0,new Error("Call stack overflow for "+s);if(a==="")throw new Error(i+"(): '"+s+"' must contain a non-whitespace string");a=r(a,s);var o=y0(a);if(o.length>1||a.indexOf("var(")>-1)return i+"("+a+")";var l=o[0]||"";l==="%"&&(a=a.replace(/\b[0-9\.]+%/g,function(f){return parseFloat(f.slice(0,-1))*.01}));var u=a.replace(new RegExp(l,"gi"),""),c;try{c=d0.eval(u)}catch{return i+"("+a+")"}return l==="%"&&(c*=100),(i.length||l==="%")&&(c=Math.round(c*t)/t),c+=l,c}function r(a,i){a=a.replace(/((?:\-[a-z]+\-)?calc)/g,"");for(var s="",o=a,l;l=v0.exec(o);){l[0].index>0&&(s+=o.substring(0,l[0].index));var u=f0("(",")",o.substring([0].index));if(u.body==="")throw new Error("'"+a+"' must contain a non-whitespace string");var c=n(u.body,"",i);s+=u.pre+c,o=u.post}return s+o}return h0(e,/((?:\-[a-z]+\-)?calc)\(/,n)}function y0(e){for(var t=[],n=[],r=/[\.0-9]([%a-z]+)/gi,a=r.exec(e);a;)!a||!a[1]||(n.indexOf(a[1].toLowerCase())===-1&&(t.push(a[1]),n.push(a[1].toLowerCase())),a=r.exec(e));return t}const Li=Yt(m0);var b0=typeof tr=="object"&&tr&&tr.Object===Object&&tr,x0=b0,_0=x0,w0=typeof self=="object"&&self&&self.Object===Object&&self,S0=_0||w0||Function("return this")(),ti=S0,T0=ti,O0=T0.Symbol,Qf=O0,Hl=Qf,Jf=Object.prototype,k0=Jf.hasOwnProperty,M0=Jf.toString,un=Hl?Hl.toStringTag:void 0;function $0(e){var t=k0.call(e,un),n=e[un];try{e[un]=void 0;var r=!0}catch{}var a=M0.call(e);return r&&(t?e[un]=n:delete e[un]),a}var C0=$0,E0=Object.prototype,P0=E0.toString;function N0(e){return P0.call(e)}var R0=N0,Ul=Qf,L0=C0,A0=R0,D0="[object Null]",z0="[object Undefined]",ql=Ul?Ul.toStringTag:void 0;function j0(e){return e==null?e===void 0?z0:D0:ql&&ql in Object(e)?L0(e):A0(e)}var eh=j0;function F0(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ni=F0,I0=eh,W0=ni,B0="[object AsyncFunction]",H0="[object Function]",U0="[object GeneratorFunction]",q0="[object Proxy]";function Y0(e){if(!W0(e))return!1;var t=I0(e);return t==H0||t==U0||t==B0||t==q0}var V0=Y0,G0=ti,K0=G0["__core-js_shared__"],X0=K0,Ai=X0,Yl=function(){var e=/[^.]+$/.exec(Ai&&Ai.keys&&Ai.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Z0(e){return!!Yl&&Yl in e}var Q0=Z0,J0=Function.prototype,ey=J0.toString;function ty(e){if(e!=null){try{return ey.call(e)}catch{}try{return e+""}catch{}}return""}var ny=ty,ry=V0,iy=Q0,ay=ni,oy=ny,sy=/[\\^$.*+?()[\]{}|]/g,ly=/^\[object .+?Constructor\]$/,uy=Function.prototype,cy=Object.prototype,fy=uy.toString,hy=cy.hasOwnProperty,dy=RegExp("^"+fy.call(hy).replace(sy,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function py(e){if(!ay(e)||iy(e))return!1;var t=ry(e)?dy:ly;return t.test(oy(e))}var vy=py;function my(e,t){return e==null?void 0:e[t]}var gy=my,yy=vy,by=gy;function xy(e,t){var n=by(e,t);return yy(n)?n:void 0}var th=xy,_y=th,wy=_y(Object,"create"),ri=wy,Vl=ri;function Sy(){this.__data__=Vl?Vl(null):{},this.size=0}var Ty=Sy;function Oy(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var ky=Oy,My=ri,$y="__lodash_hash_undefined__",Cy=Object.prototype,Ey=Cy.hasOwnProperty;function Py(e){var t=this.__data__;if(My){var n=t[e];return n===$y?void 0:n}return Ey.call(t,e)?t[e]:void 0}var Ny=Py,Ry=ri,Ly=Object.prototype,Ay=Ly.hasOwnProperty;function Dy(e){var t=this.__data__;return Ry?t[e]!==void 0:Ay.call(t,e)}var zy=Dy,jy=ri,Fy="__lodash_hash_undefined__";function Iy(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=jy&&t===void 0?Fy:t,this}var Wy=Iy,By=Ty,Hy=ky,Uy=Ny,qy=zy,Yy=Wy;function Xt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Xt.prototype.clear=By;Xt.prototype.delete=Hy;Xt.prototype.get=Uy;Xt.prototype.has=qy;Xt.prototype.set=Yy;var Vy=Xt;function Gy(){this.__data__=[],this.size=0}var Ky=Gy;function Xy(e,t){return e===t||e!==e&&t!==t}var Zy=Xy,Qy=Zy;function Jy(e,t){for(var n=e.length;n--;)if(Qy(e[n][0],t))return n;return-1}var ii=Jy,eb=ii,tb=Array.prototype,nb=tb.splice;function rb(e){var t=this.__data__,n=eb(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():nb.call(t,n,1),--this.size,!0}var ib=rb,ab=ii;function ob(e){var t=this.__data__,n=ab(t,e);return n<0?void 0:t[n][1]}var sb=ob,lb=ii;function ub(e){return lb(this.__data__,e)>-1}var cb=ub,fb=ii;function hb(e,t){var n=this.__data__,r=fb(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var db=hb,pb=Ky,vb=ib,mb=sb,gb=cb,yb=db;function Zt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Zt.prototype.clear=pb;Zt.prototype.delete=vb;Zt.prototype.get=mb;Zt.prototype.has=gb;Zt.prototype.set=yb;var bb=Zt,xb=th,_b=ti,wb=xb(_b,"Map"),Sb=wb,Gl=Vy,Tb=bb,Ob=Sb;function kb(){this.size=0,this.__data__={hash:new Gl,map:new(Ob||Tb),string:new Gl}}var Mb=kb;function $b(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Cb=$b,Eb=Cb;function Pb(e,t){var n=e.__data__;return Eb(t)?n[typeof t=="string"?"string":"hash"]:n.map}var ai=Pb,Nb=ai;function Rb(e){var t=Nb(this,e).delete(e);return this.size-=t?1:0,t}var Lb=Rb,Ab=ai;function Db(e){return Ab(this,e).get(e)}var zb=Db,jb=ai;function Fb(e){return jb(this,e).has(e)}var Ib=Fb,Wb=ai;function Bb(e,t){var n=Wb(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var Hb=Bb,Ub=Mb,qb=Lb,Yb=zb,Vb=Ib,Gb=Hb;function Qt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Qt.prototype.clear=Ub;Qt.prototype.delete=qb;Qt.prototype.get=Yb;Qt.prototype.has=Vb;Qt.prototype.set=Gb;var Kb=Qt,nh=Kb,Xb="Expected a function";function $o(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Xb);var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],i=n.cache;if(i.has(a))return i.get(a);var s=e.apply(this,r);return n.cache=i.set(a,s)||i,s};return n.cache=new($o.Cache||nh),n}$o.Cache=nh;var Zb=$o;const Qb=Yt(Zb);var Kl="__react_svg_text_measurement_id";function Jb(e,t){try{var n=document.getElementById(Kl);if(!n){var r=document.createElementNS("http://www.w3.org/2000/svg","svg");r.setAttribute("aria-hidden","true"),r.style.width="0",r.style.height="0",r.style.position="absolute",r.style.top="-100%",r.style.left="-100%",n=document.createElementNS("http://www.w3.org/2000/svg","text"),n.setAttribute("id",Kl),r.appendChild(n),document.body.appendChild(r)}return Object.assign(n.style,t),n.textContent=e,n.getComputedTextLength()}catch{return null}}const Xl=Qb(Jb,function(e,t){return e+"_"+JSON.stringify(t)});var e1=["verticalAnchor","scaleToFit","angle","width","lineHeight","capHeight","children","style"];function t1(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function Di(e){return typeof e=="number"}function Zl(e){return typeof e=="number"&&Number.isFinite(e)||typeof e=="string"}function n1(e){var t=e.verticalAnchor,n=t===void 0?"end":t,r=e.scaleToFit,a=r===void 0?!1:r,i=e.angle,s=e.width,o=e.lineHeight,l=o===void 0?"1em":o,u=e.capHeight,c=u===void 0?"0.71em":u,f=e.children,h=e.style,p=t1(e,e1),d=p.x,v=d===void 0?0:d,x=p.y,m=x===void 0?0:x,b=!Zl(v)||!Zl(m),_=g.useMemo(function(){var k=f==null?[]:f.toString().split(/(?:(?!\u00A0+)\s+)/);return{wordsWithWidth:k.map(function(C){return{word:C,wordWidth:Xl(C,h)||0}}),spaceWidth:Xl(" ",h)||0}},[f,h]),M=_.wordsWithWidth,y=_.spaceWidth,w=g.useMemo(function(){return b?[]:s||a?M.reduce(function(k,C){var P=C.word,N=C.wordWidth,L=k[k.length-1];if(L&&(s==null||a||(L.width||0)+N+y<s))L.words.push(P),L.width=L.width||0,L.width+=N+y;else{var I={words:[P],width:N};k.push(I)}return k},[]):[{words:f==null?[]:f.toString().split(/(?:(?!\u00A0+)\s+)/)}]},[b,s,a,f,M,y]),T=g.useMemo(function(){var k=b?"":Li(n==="start"?"calc("+c+")":n==="middle"?"calc("+(w.length-1)/2+" * -"+l+" + ("+c+" / 2))":"calc("+(w.length-1)+" * -"+l+")");return k},[b,n,c,w.length,l]),$=g.useMemo(function(){var k=[];if(b)return"";if(Di(v)&&Di(m)&&Di(s)&&a&&w.length>0){var C=w[0].width||1,P=a==="shrink-only"?Math.min(s/C,1):s/C,N=P,L=v-P*v,I=m-N*m;k.push("matrix("+P+", 0, 0, "+N+", "+L+", "+I+")")}return i&&k.push("rotate("+i+", "+v+", "+m+")"),k.length>0?k.join(" "):""},[b,v,m,s,a,w,i]);return{wordsByLines:w,startDy:T,transform:$}}var r1=["dx","dy","textAnchor","innerRef","innerTextRef","verticalAnchor","angle","lineHeight","scaleToFit","capHeight","width"];function _a(){return _a=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},_a.apply(this,arguments)}function i1(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}var a1={overflow:"visible"};function rh(e){var t=e.dx,n=t===void 0?0:t,r=e.dy,a=r===void 0?0:r,i=e.textAnchor,s=i===void 0?"start":i,o=e.innerRef,l=e.innerTextRef;e.verticalAnchor,e.angle;var u=e.lineHeight,c=u===void 0?"1em":u;e.scaleToFit,e.capHeight,e.width;var f=i1(e,r1),h=f.x,p=h===void 0?0:h,d=f.fontSize,v=n1(e),x=v.wordsByLines,m=v.startDy,b=v.transform;return g.createElement("svg",{ref:o,x:n,y:a,fontSize:d,style:a1},x.length>0?g.createElement("text",_a({ref:l,transform:b},f,{textAnchor:s}),x.map(function(_,M){return g.createElement("tspan",{key:M,x:p,dy:M===0?m:c},_.words.join(" "))})):null)}var Oe={top:"top",left:"left",right:"right",bottom:"bottom"};function o1(e){var t=e.labelOffset,n=e.labelProps,r=e.orientation,a=e.range,i=e.tickLabelFontSize,s=e.tickLength,o=r===Oe.left||r===Oe.top?-1:1,l,u,c;if(r===Oe.top||r===Oe.bottom){var f=r===Oe.bottom&&typeof n.fontSize=="number"?n.fontSize:0;l=(Number(a[0])+Number(a[a.length-1]))/2,u=o*(s+t+i+f)}else l=o*((Number(a[0])+Number(a[a.length-1]))/2),u=-(s+t),c="rotate("+o*90+")";return{x:l,y:u,transform:c}}function yn(){return yn=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},yn.apply(this,arguments)}function s1(e){var t=e.hideTicks,n=e.horizontal,r=e.orientation,a=e.tickClassName,i=e.tickComponent,s=e.tickLabelProps,o=e.tickStroke,l=o===void 0?"#222":o,u=e.tickTransform,c=e.ticks,f=e.strokeWidth,h=e.tickLineProps;return c.map(function(p){var d,v=p.value,x=p.index,m=p.from,b=p.to,_=p.formattedValue,M=(d=s[x])!=null?d:{},y=Math.max(10,typeof M.fontSize=="number"&&M.fontSize||0),w=b.y+(n&&r!==Oe.top?y:0);return g.createElement(Qe,{key:"visx-tick-"+v+"-"+x,className:me("visx-axis-tick",a),transform:u},!t&&g.createElement(sc,yn({from:m,to:b,stroke:l,strokeWidth:f,strokeLinecap:"square"},h)),i?i(yn({},M,{x:b.x,y:w,formattedValue:_})):g.createElement(rh,yn({x:b.x,y:w},M),_))})}function bn(){return bn=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},bn.apply(this,arguments)}var Ql={textAnchor:"middle",fontFamily:"Arial",fontSize:10,fill:"#222"};function l1(e){var t=e.axisFromPoint,n=e.axisLineClassName,r=e.axisToPoint,a=e.hideAxisLine,i=e.hideTicks,s=e.horizontal,o=e.label,l=o===void 0?"":o,u=e.labelClassName,c=e.labelOffset,f=c===void 0?14:c,h=e.labelProps,p=e.orientation,d=p===void 0?Oe.bottom:p,v=e.scale,x=e.stroke,m=x===void 0?"#222":x,b=e.strokeDasharray,_=e.strokeWidth,M=_===void 0?1:_,y=e.tickClassName,w=e.tickComponent,T=e.tickLineProps,$=e.tickLabelProps,k=e.tickLength,C=k===void 0?8:k,P=e.tickStroke,N=P===void 0?"#222":P,L=e.tickTransform,I=e.ticks,X=e.ticksComponent,U=X===void 0?s1:X,Z=bn({},Ql,h),J=bn({},Ql,typeof $=="object"?$:null),K=I.map(function(A){var B=A.value,W=A.index;return typeof $=="function"?$(B,W,I):J}),E=Math.max.apply(Math,[10].concat(K.map(function(A){return typeof A.fontSize=="number"?A.fontSize:0})));return g.createElement(g.Fragment,null,U({hideTicks:i,horizontal:s,orientation:d,scale:v,tickClassName:y,tickComponent:w,tickLabelProps:K,tickStroke:N,tickTransform:L,ticks:I,strokeWidth:M,tickLineProps:T}),!a&&g.createElement(sc,{className:me("visx-axis-line",n),from:t,to:r,stroke:m,strokeWidth:M,strokeDasharray:b}),l&&g.createElement(rh,bn({className:me("visx-axis-label",u)},o1({labelOffset:f,labelProps:Z,orientation:d,range:v.range(),tickLabelFontSize:E,tickLength:C}),Z),l))}function u1(e,t){t===void 0&&(t="center");var n=e;if(t!=="start"&&"bandwidth"in n){var r=n.bandwidth();return t==="center"&&(r/=2),n.round()&&(r=Math.round(r)),function(a){var i=n(a);return typeof i=="number"?i+r:i}}return e}function c1(e){var t=e;return"tickFormat"in t?t.tickFormat():Uf}var qe=function(){function e(n){var r=n.x,a=r===void 0?0:r,i=n.y,s=i===void 0?0:i;this.x=0,this.y=0,this.x=a,this.y=s}var t=e.prototype;return t.value=function(){return{x:this.x,y:this.y}},t.toArray=function(){return[this.x,this.y]},e}();function f1(e,t){return new qe({x:e.x+t.x,y:e.y+t.y})}function h1(e,t){return new qe({x:e.x-t.x,y:e.y-t.y})}const d1=Object.freeze(Object.defineProperty({__proto__:null,Point:qe,subtractPoints:h1,sumPoints:f1},Symbol.toStringTag,{value:"Module"}));function cr(e,t){var n=e.x,r=e.y;return new qe(t?{x:n,y:r}:{x:r,y:n})}function wa(){return wa=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},wa.apply(this,arguments)}var zi=0;function p1(e){return e===void 0&&(e=zi),typeof e=="number"?{start:e,end:e}:wa({start:zi,end:zi},e)}var v1=["children","axisClassName","hideAxisLine","hideTicks","hideZero","innerRef","left","numTicks","orientation","rangePadding","scale","tickFormat","tickLength","tickValues","top"];function Sa(){return Sa=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},Sa.apply(this,arguments)}function m1(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function Co(e){var t=e.children,n=t===void 0?l1:t,r=e.axisClassName,a=e.hideAxisLine,i=a===void 0?!1:a,s=e.hideTicks,o=s===void 0?!1:s,l=e.hideZero,u=l===void 0?!1:l,c=e.innerRef,f=e.left,h=f===void 0?0:f,p=e.numTicks,d=p===void 0?10:p,v=e.orientation,x=v===void 0?Oe.bottom:v,m=e.rangePadding,b=m===void 0?0:m,_=e.scale,M=e.tickFormat,y=e.tickLength,w=y===void 0?8:y,T=e.tickValues,$=e.top,k=$===void 0?0:$,C=m1(e,v1),P=M??c1(_),N=x===Oe.left,L=x===Oe.top,I=L||x===Oe.bottom,X=u1(_),U=N||L?-1:1,Z=_.range(),J=p1(b),K=cr({x:Number(Z[0])+.5-J.start,y:0},I),E=cr({x:Number(Z[Z.length-1])+.5+J.end,y:0},I),A=(T??ei(_,d)).filter(function(W){return!u||W!==0&&W!=="0"}).map(function(W,j){return{value:W,index:j}}),B=A.map(function(W){var j=W.value,F=W.index,q=Jr(X(j));return{value:j,index:F,from:cr({x:q,y:0},I),to:cr({x:q,y:w*U},I),formattedValue:P(j,F,A)}});return g.createElement(Qe,{className:me("visx-axis",r),innerRef:c,top:k,left:h},n(Sa({},C,{axisFromPoint:K,axisToPoint:E,hideAxisLine:i,hideTicks:o,hideZero:u,horizontal:I,numTicks:d,orientation:x,rangePadding:b,scale:_,tickFormat:P,tickLength:w,tickPosition:X,tickSign:U,ticks:B})))}var g1=["axisClassName","labelOffset","tickLength","tickLabelProps"];function Sr(){return Sr=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},Sr.apply(this,arguments)}function y1(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}var b1={dx:"-0.25em",dy:"0.25em",fill:"#222",fontFamily:"Arial",fontSize:10,textAnchor:"end"};function ih(e){var t=e.axisClassName,n=e.labelOffset,r=n===void 0?36:n,a=e.tickLength,i=a===void 0?8:a,s=e.tickLabelProps,o=y1(e,g1),l=typeof s=="function"?s:Sr({},b1,s);return g.createElement(Co,Sr({axisClassName:me("visx-axis-left",t),labelOffset:r,orientation:Oe.left,tickLabelProps:l,tickLength:i},o))}var x1=["axisClassName","labelOffset","tickLength","tickLabelProps"];function Tr(){return Tr=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},Tr.apply(this,arguments)}function _1(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}var w1={dy:"0.25em",fill:"#222",fontFamily:"Arial",fontSize:10,textAnchor:"middle"};function Eo(e){var t=e.axisClassName,n=e.labelOffset,r=n===void 0?8:n,a=e.tickLength,i=a===void 0?8:a,s=e.tickLabelProps,o=_1(e,x1),l=typeof s=="function"?s:Tr({},w1,s);return g.createElement(Co,Tr({axisClassName:me("visx-axis-bottom",t),labelOffset:r,orientation:Oe.bottom,tickLabelProps:l,tickLength:i},o))}var oi={};oi.__esModule=!0;var ah=oi.default=M1,S1=oh(g),T1=oh(Ln),O1=["from","to","fill","className","innerRef"];function oh(e){return e&&e.__esModule?e:{default:e}}function Ta(){return Ta=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},Ta.apply(this,arguments)}function k1(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function M1(e){var t=e.from,n=t===void 0?{x:0,y:0}:t,r=e.to,a=r===void 0?{x:1,y:1}:r,i=e.fill,s=i===void 0?"transparent":i,o=e.className,l=e.innerRef,u=k1(e,O1),c=n.x===a.x||n.y===a.y;return S1.default.createElement("line",Ta({ref:l,className:(0,T1.default)("visx-line",o),x1:n.x,y1:n.y,x2:a.x,y2:a.y,fill:s,shapeRendering:c?"crispEdges":"auto"},u))}function sh(e){return"bandwidth"in e?e.bandwidth():0}var $1=["top","left","scale","width","stroke","strokeWidth","strokeDasharray","className","children","numTicks","lineStyle","offset","tickValues"];function Oa(){return Oa=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},Oa.apply(this,arguments)}function C1(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function lh(e){var t=e.top,n=t===void 0?0:t,r=e.left,a=r===void 0?0:r,i=e.scale,s=e.width,o=e.stroke,l=o===void 0?"#eaf0f6":o,u=e.strokeWidth,c=u===void 0?1:u,f=e.strokeDasharray,h=e.className,p=e.children,d=e.numTicks,v=d===void 0?10:d,x=e.lineStyle,m=e.offset,b=e.tickValues,_=C1(e,$1),M=b??ei(i,v),y=(m??0)+sh(i)/2,w=M.map(function(T,$){var k,C=((k=Jr(i(T)))!=null?k:0)+y;return{index:$,from:new qe({x:0,y:C}),to:new qe({x:s,y:C})}});return g.createElement(Qe,{className:me("visx-rows",h),top:n,left:a},p?p({lines:w}):w.map(function(T){var $=T.from,k=T.to,C=T.index;return g.createElement(ah,Oa({key:"row-line-"+C,from:$,to:k,stroke:l,strokeWidth:c,strokeDasharray:f,style:x},_))}))}lh.propTypes={tickValues:S.array,width:S.number.isRequired};var E1=["top","left","scale","height","stroke","strokeWidth","strokeDasharray","className","numTicks","lineStyle","offset","tickValues","children"];function ka(){return ka=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},ka.apply(this,arguments)}function P1(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function uh(e){var t=e.top,n=t===void 0?0:t,r=e.left,a=r===void 0?0:r,i=e.scale,s=e.height,o=e.stroke,l=o===void 0?"#eaf0f6":o,u=e.strokeWidth,c=u===void 0?1:u,f=e.strokeDasharray,h=e.className,p=e.numTicks,d=p===void 0?10:p,v=e.lineStyle,x=e.offset,m=e.tickValues,b=e.children,_=P1(e,E1),M=m??ei(i,d),y=(x??0)+sh(i)/2,w=M.map(function(T,$){var k,C=((k=Jr(i(T)))!=null?k:0)+y;return{index:$,from:new qe({x:C,y:0}),to:new qe({x:C,y:s})}});return g.createElement(Qe,{className:me("visx-columns",h),top:n,left:a},b?b({lines:w}):w.map(function(T){var $=T.from,k=T.to,C=T.index;return g.createElement(ah,ka({key:"column-line-"+C,from:$,to:k,stroke:l,strokeWidth:c,strokeDasharray:f,style:v},_))}))}uh.propTypes={tickValues:S.array,height:S.number.isRequired};var ht={};const Po=Ct(tp);var No={};No.__esModule=!0;No.default=N1;function N1(e,t){e(t)}var Mt={};Mt.__esModule=!0;Mt.STACK_ORDER_NAMES=Mt.STACK_ORDERS=void 0;Mt.default=L1;var cn=Po,Or={ascending:cn.stackOrderAscending,descending:cn.stackOrderDescending,insideout:cn.stackOrderInsideOut,none:cn.stackOrderNone,reverse:cn.stackOrderReverse};Mt.STACK_ORDERS=Or;var R1=Object.keys(Or);Mt.STACK_ORDER_NAMES=R1;function L1(e){return e&&Or[e]||Or.none}var $t={};$t.__esModule=!0;$t.STACK_OFFSET_NAMES=$t.STACK_OFFSETS=void 0;$t.default=D1;var fn=Po,kr={expand:fn.stackOffsetExpand,diverging:fn.stackOffsetDiverging,none:fn.stackOffsetNone,silhouette:fn.stackOffsetSilhouette,wiggle:fn.stackOffsetWiggle};$t.STACK_OFFSETS=kr;var A1=Object.keys(kr);$t.STACK_OFFSET_NAMES=A1;function D1(e){return e&&kr[e]||kr.none}ht.__esModule=!0;ht.arc=F1;ht.area=I1;ht.line=W1;ht.pie=B1;ht.radialLine=H1;ht.stack=U1;var Jt=Po,oe=Ro(No),z1=Ro(Mt),j1=Ro($t);function Ro(e){return e&&e.__esModule?e:{default:e}}function F1(e){var t=e===void 0?{}:e,n=t.innerRadius,r=t.outerRadius,a=t.cornerRadius,i=t.startAngle,s=t.endAngle,o=t.padAngle,l=t.padRadius,u=(0,Jt.arc)();return n!=null&&(0,oe.default)(u.innerRadius,n),r!=null&&(0,oe.default)(u.outerRadius,r),a!=null&&(0,oe.default)(u.cornerRadius,a),i!=null&&(0,oe.default)(u.startAngle,i),s!=null&&(0,oe.default)(u.endAngle,s),o!=null&&(0,oe.default)(u.padAngle,o),l!=null&&(0,oe.default)(u.padRadius,l),u}function I1(e){var t=e===void 0?{}:e,n=t.x,r=t.x0,a=t.x1,i=t.y,s=t.y0,o=t.y1,l=t.defined,u=t.curve,c=(0,Jt.area)();return n&&(0,oe.default)(c.x,n),r&&(0,oe.default)(c.x0,r),a&&(0,oe.default)(c.x1,a),i&&(0,oe.default)(c.y,i),s&&(0,oe.default)(c.y0,s),o&&(0,oe.default)(c.y1,o),l&&c.defined(l),u&&c.curve(u),c}function W1(e){var t=e===void 0?{}:e,n=t.x,r=t.y,a=t.defined,i=t.curve,s=(0,Jt.line)();return n&&(0,oe.default)(s.x,n),r&&(0,oe.default)(s.y,r),a&&s.defined(a),i&&s.curve(i),s}function B1(e){var t=e===void 0?{}:e,n=t.startAngle,r=t.endAngle,a=t.padAngle,i=t.value,s=t.sort,o=t.sortValues,l=(0,Jt.pie)();return(s===null||s!=null)&&l.sort(s),(o===null||o!=null)&&l.sortValues(o),i!=null&&l.value(i),a!=null&&(0,oe.default)(l.padAngle,a),n!=null&&(0,oe.default)(l.startAngle,n),r!=null&&(0,oe.default)(l.endAngle,r),l}function H1(e){var t=e===void 0?{}:e,n=t.angle,r=t.radius,a=t.defined,i=t.curve,s=(0,Jt.radialLine)();return n&&(0,oe.default)(s.angle,n),r&&(0,oe.default)(s.radius,r),a&&s.defined(a),i&&s.curve(i),s}function U1(e){var t=e.keys,n=e.value,r=e.order,a=e.offset,i=(0,Jt.stack)();return t&&i.keys(t),n&&(0,oe.default)(i.value,n),r&&i.order((0,z1.default)(r)),a&&i.offset((0,j1.default)(a)),i}let xn=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"");const q1={barFillColor1:"string",barFillColor2:"string",barFillColorHover:"string",chartData:"ChartDataObject[]",chartHeight:"number",chartWidth:"number",barSize:"number",yAxis:"ChartAxis",xAxis:"ChartAxis",yMaxValue:"number",yTickFormat:"(i: number) => string"};function Lo(e){const{barFillColor1:t=de.colors.blue200,barFillColor2:n="#007DB880",barFillColorHover:r=de.colors.blue300,chartData:a=[],chartHeight:i=0,chartWidth:s=0,barSize:o,yAxis:l={tickValues:"value",tickCount:3},xAxis:u={tickValues:"label"},yMaxValue:c,yTickFormat:f}=e,h={top:30,bottom:70,left:50,right:30},p=s-h.left-h.right,d=i-h.top-h.bottom,v=T=>T[u.tickValues],x=T=>T[l.tickValues],m=qn({range:[0,p],round:!0,domain:a.map(v),padding:.4}),b=qt({range:[d,0],round:!0,domain:[0,c||Math.max(...a.map(x))]}),_=(T,$)=>k=>T($(k)),M=_(m,v),y=_(b,x),w=xn();return D.createElement("svg",{width:s,height:i,className:"sps-chart-wrapper"},D.createElement(lh,{scale:b,left:h.left,width:p,numTicks:l.tickCount,stroke:de.colors.gray400,strokeOpacity:.2}),D.createElement(Rn,{id:w,from:t,to:n}),a.map((T,$)=>{const k=d-y(T),C=xn();return D.createElement(kn,{key:$},D.createElement(lc,{id:C,top:!0,radius:4,x:M(T)+h.left+(o?(m.bandwidth()-o)/2:0),y:d-k,height:k,width:o||m.bandwidth(),fill:`url(#${w})`,onMouseEnter:P=>{const N=P.target;N.style.fill=r},onMouseLeave:P=>{const N=P.target;N.style.fill=""}}),D.createElement(ih,{scale:b,left:h.left,hideTicks:!0,numTicks:l.tickCount,tickFormat:f||void 0,stroke:de.colors.gray300,tickLabelProps:()=>({textAnchor:"end",fontSize:"12px",fill:de.colors.gray400,fontWeight:"200"})}),D.createElement(Eo,{top:d,scale:m,left:h.left,hideTicks:!0,hideAxisLine:!0,stroke:de.colors.gray300,tickLabelProps:()=>({textAnchor:"middle",fontSize:"12px",fontWeight:"200",fill:de.colors.gray400,width:m.bandwidth()+m.bandwidth()/2,lineHeight:"15px",verticalAnchor:"start"})}),D.createElement(On.SpsTooltip,{for:C},T.label))}))}Object.assign(Lo,{props:q1,displayName:"SpsBarChart"});const ch={general:{label:"General Usage",description:({NavigateTo:e,Link:t})=>D.createElement(D.Fragment,null,D.createElement("p",null,"Use Bar Charts to visualize the comparison of a dataset across multiple categories or subjects. When using bar charts, the dataset should attempt to provide a clear answer to a clear question (i.e. avoid comparing multiple or unrelated datasets in a single chart)."),D.createElement("p",null,"Bar Charts should not be used when the visualization of the data is too complex or the number of categories too numerous to be easily understood at a glance. In these cases consider the use of more general lists of content such as a"," ",D.createElement(e,{to:"Tables"},"Table"),"."),D.createElement("h5",null,"Color"),D.createElement("p",null,"The number of colors used should be directly related to the number of comparisons being made. When comparing categories across a single data set, only one color should be used. When comparing multiple categories across multiple series of data, use the appropriate number of colors to the number of categories. For more details on color usage visit the"," ",D.createElement(t,{to:"/style-and-layout/colors"},"Colors")," section."),D.createElement("h5",null,"Interaction"),D.createElement("p",null,"Charts should include interactivity on hover to give users insight to specifics of the data. Tooltips can be used to display expanded definitions or additional related data points for the selected category."))},horizontal:{label:"Horizontal Bar Chart",description:rt.code`
|
34
|
-
<p>In Horizontal Bar Charts categories are listed vertically on the Y-axis and with data points are plotted horizontally on the X-axis.</p>
|
35
|
-
`,examples:{vertical:{react:rt.code`
|
36
|
-
import { SpsHorizontalBarChart } from "@spscommerce/ds-react-charts";
|
37
|
-
function DemoComponent() {
|
38
|
-
const data = [
|
39
|
-
{ value: 69, label: "Aktie Sports" },
|
40
|
-
{ value: 69, label: "Dicks Sporting Goods" },
|
41
|
-
{ value: 64, label: "FGL Sports" },
|
42
|
-
{ value: 62, label: "Foot Asylum" },
|
43
|
-
{ value: 55, label: "Hervis" },
|
44
|
-
{ value: 51, label: "Lovell Rugby" },
|
45
|
-
{ value: 48, label: "Modells Sporting Goods" },
|
46
|
-
{ value: 44, label: "Perry Sport" },
|
47
|
-
{ value: 44, label: "Sportman Warhouse Australia" },
|
48
|
-
{ value: 44, label: "Perry Sport 2" },
|
49
|
-
]
|
50
|
-
|
51
|
-
xTickFormat = (i) => \`\${i}\${i !== 0 ? "%" : ""}\`
|
52
|
-
|
53
|
-
return (
|
54
|
-
<SpsHorizontalBarChart
|
55
|
-
chartData={data}
|
56
|
-
chartHeight={523}
|
57
|
-
chartWidth={838}
|
58
|
-
barFillColor1 = "#32BE6F"
|
59
|
-
barFillColor2 = "#32BE6F80"
|
60
|
-
barFillColorHover = "#289858"
|
61
|
-
yAxis={{
|
62
|
-
tickValues: 'label',
|
63
|
-
}}
|
64
|
-
xAxis={{
|
65
|
-
tickValues: 'value',
|
66
|
-
tickCount: 10
|
67
|
-
}}
|
68
|
-
marginLeft={135}
|
69
|
-
xMaxValue={100}
|
70
|
-
barSize={20}
|
71
|
-
xTickFormat={xTickFormat}
|
72
|
-
/>
|
73
|
-
)
|
74
|
-
}
|
75
|
-
`}}},vertical:{label:"Vertical Bar Chart",description:rt.code`
|
76
|
-
<p>In Vertical Bar Charts data points are plotted vertically on the Y-axis and with categories being listed horizontally on the X-axis.</p>
|
77
|
-
<p>If the categories become too crowded along the X-axis, opt for a Horizontal Bar Chart instead.</p>
|
78
|
-
`,examples:{vertical:{react:rt.code`
|
79
|
-
import { SpsBarChart } from "@spscommerce/ds-react-charts";
|
80
|
-
function DemoComponent() {
|
81
|
-
const data = [
|
82
|
-
{ value: 112, label: "Aktie Sports" },
|
83
|
-
{ value: 100, label: "Dicks Sporting Goods" },
|
84
|
-
{ value: 90, label: "FGL Sports" },
|
85
|
-
{ value: 82, label: "Foot Asylum" },
|
86
|
-
{ value: 76, label: "Hervis" },
|
87
|
-
{ value: 64, label: "Lovell Rugby" },
|
88
|
-
{ value: 64, label: "Modells Sporting Goods" },
|
89
|
-
]
|
90
|
-
|
91
|
-
return (
|
92
|
-
<SpsBarChart
|
93
|
-
chartData={data}
|
94
|
-
chartHeight={364}
|
95
|
-
chartWidth={838}
|
96
|
-
barFillColor1 = "#9B4B87"
|
97
|
-
barFillColor2 = "#9B4B8780"
|
98
|
-
barFillColorHover = "#7C3C6C"
|
99
|
-
yAxis={{
|
100
|
-
tickValues: 'value',
|
101
|
-
tickCount: 5,
|
102
|
-
}}
|
103
|
-
xAxis={{
|
104
|
-
tickValues: 'label',
|
105
|
-
}}
|
106
|
-
yMaxValue={125}
|
107
|
-
barSize={45}
|
108
|
-
/>
|
109
|
-
)
|
110
|
-
}
|
111
|
-
`}}}},Y1={barFillColor1:"string",barFillColor2:"string",barFillColorHover:"string",chartData:"ChartDataObject[]",chartHeight:"number",chartWidth:"number",barSize:"number",yAxis:"ChartAxis",xAxis:"ChartAxis",marginLeft:"number",xMaxValue:"number",xTickFormat:"(i: number) => string"};function Ao(e){const{barFillColor1:t=de.colors.blue200,barFillColor2:n="#007DB880",barFillColorHover:r=de.colors.blue300,chartData:a=[],chartHeight:i=0,chartWidth:s=0,barSize:o,yAxis:l={tickValues:"label"},xAxis:u={tickValues:"value",tickCount:3},marginLeft:c=30,xMaxValue:f,xTickFormat:h}=e,p={top:30,bottom:30,left:c,right:30},d=s-p.left-p.right,v=i-p.top-p.bottom,x=k=>k[u.tickValues],m=k=>k[l.tickValues],b=qn({range:[0,v],round:!0,domain:a.map(m),padding:.4}),_=qt({range:[0,d],round:!0,domain:[0,f||Math.max(...a.map(x))]}),M=(k,C)=>P=>k(C(P)),y=M(_,x),w=M(b,m),T=xn(),$=xn();return D.createElement("svg",{width:s,height:i,className:"sps-chart-wrapper"},D.createElement(uh,{scale:_,left:p.left,height:v,stroke:de.colors.gray400,strokeOpacity:.2}),D.createElement(Rn,{id:$,from:"#D2D4D580",to:"#D2D4D5",vertical:!1}),D.createElement(Rn,{id:T,from:n,to:t,vertical:!1}),a.map((k,C)=>{const P=y(k),N=xn();return D.createElement(kn,{key:C},D.createElement("rect",{x:p.left,y:w(k)+(o?(b.bandwidth()-o)/2:0),height:o||b.bandwidth(),width:d,fill:`url(#${$})`}),D.createElement(lc,{id:N,right:!0,radius:4,x:p.left,y:w(k)+(o?(b.bandwidth()-o)/2:0),height:o||b.bandwidth(),width:P,fill:`url(#${T})`,onMouseEnter:L=>{const I=L.target;I.style.fill=r},onMouseLeave:L=>{const I=L.target;I.style.fill=""}}),D.createElement(ih,{scale:b,left:p.left,hideTicks:!0,hideAxisLine:!0,stroke:de.colors.gray300,tickLabelProps:()=>({textAnchor:"end",fontSize:"12px",fill:de.colors.gray400,fontWeight:"200",width:p.left,verticalAnchor:"middle"})}),D.createElement(Eo,{top:v,scale:_,left:p.left,hideTicks:!0,numTicks:u.tickCount,tickFormat:h||void 0,stroke:de.colors.gray300,tickLabelProps:()=>({textAnchor:"middle",fontSize:"12px",fontWeight:"200",fill:de.colors.gray400})}),D.createElement(On.SpsTooltip,{for:N},k.label))}))}Object.assign(Ao,{props:Y1,displayName:"SpsHorizontalBarChart"});function fh(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=fh(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Jl(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=fh(e))&&(r&&(r+=" "),r+=t);return r}var V1=["flexDirection","alignItems","margin","display","children"];function Ma(){return Ma=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},Ma.apply(this,arguments)}function G1(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function hh(e){var t=e.flexDirection,n=t===void 0?"row":t,r=e.alignItems,a=r===void 0?"center":r,i=e.margin,s=i===void 0?"0":i,o=e.display,l=o===void 0?"flex":o,u=e.children,c=G1(e,V1);return g.createElement("div",Ma({className:"visx-legend-item",style:{display:l,alignItems:a,flexDirection:n,margin:s}},c),u)}hh.propTypes={alignItems:S.string,margin:S.oneOfType([S.string,S.number]),children:S.node,display:S.string};var K1=["flex","label","margin","align","children"];function $a(){return $a=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},$a.apply(this,arguments)}function X1(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function dh(e){var t=e.flex,n=t===void 0?"1":t,r=e.label,a=e.margin,i=a===void 0?"5px 0":a,s=e.align,o=s===void 0?"left":s,l=e.children,u=X1(e,K1);return g.createElement("div",$a({className:"visx-legend-label",style:{justifyContent:o,display:"flex",flex:n,margin:i}},u),l||r)}dh.propTypes={align:S.string,label:S.node,flex:S.oneOfType([S.string,S.number]),margin:S.oneOfType([S.string,S.number]),children:S.node};function Ca(){return Ca=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},Ca.apply(this,arguments)}function Do(e){var t=e.fill,n=e.width,r=e.height,a=e.style;return g.createElement("div",{style:Ca({width:n,height:r,background:t},a)})}Do.propTypes={fill:S.string,width:S.oneOfType([S.string,S.number]),height:S.oneOfType([S.string,S.number])};function ph(e){var t=e.fill,n=e.width,r=e.height,a=e.style,i=typeof n=="string"||typeof n>"u"?0:n,s=typeof r=="string"||typeof r>"u"?0:r,o=Math.max(i,s),l=o/2;return g.createElement("svg",{width:o,height:o},g.createElement(Qe,{top:l,left:l},g.createElement("circle",{r:l,fill:t,style:a})))}ph.propTypes={fill:S.string,width:S.oneOfType([S.string,S.number]),height:S.oneOfType([S.string,S.number])};function vh(e){var t=e.fill,n=e.width,r=e.height,a=e.style,i=typeof r=="string"||typeof r>"u"?0:r,s=typeof(a==null?void 0:a.strokeWidth)=="number"?a==null?void 0:a.strokeWidth:2;return g.createElement("svg",{width:n,height:r},g.createElement(Qe,{top:i/2-s/2},g.createElement("line",{x1:0,x2:n,y1:0,y2:0,stroke:t,strokeWidth:s,style:a})))}vh.propTypes={fill:S.string,width:S.oneOfType([S.string,S.number]),height:S.oneOfType([S.string,S.number])};function _n(){return _n=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},_n.apply(this,arguments)}var ji=function(){};function Z1(e){var t=e.shape,n=t===void 0?"rect":t,r=e.fill,a=r===void 0?ji:r,i=e.size,s=i===void 0?ji:i,o=e.width,l=e.height,u=e.label,c=e.item,f=e.itemIndex,h=e.shapeStyle,p=h===void 0?ji:h,d={width:o,height:l,item:c,itemIndex:f,label:u,fill:a(_n({},u)),size:s(_n({},u)),style:p(_n({},u))};return typeof n=="string"?n==="circle"?g.createElement(ph,d):n==="line"?g.createElement(vh,d):g.createElement(Do,d):g.isValidElement(n)?g.cloneElement(n,d):n?g.createElement(n,d):null}function Mr(){return Mr=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},Mr.apply(this,arguments)}function mh(e){var t=e.shape,n=t===void 0?Do:t,r=e.width,a=e.height,i=e.margin,s=e.label,o=e.item,l=e.itemIndex,u=e.fill,c=e.size,f=e.shapeStyle;return g.createElement("div",{className:"visx-legend-shape",style:{display:"flex",width:c?c(Mr({},s)):r,height:c?c(Mr({},s)):a,margin:i}},Z1({shape:n,item:o,itemIndex:l,label:s,width:r,height:a,fill:u,shapeStyle:f}))}mh.propTypes={itemIndex:S.number.isRequired,margin:S.oneOfType([S.string,S.number]),width:S.oneOfType([S.string,S.number]),height:S.oneOfType([S.string,S.number])};function gh(e){return e&&typeof e=="object"&&"value"in e&&typeof e.value<"u"?e.value:e}function eu(e){return String(gh(e))}function Q1(e){var t=e.scale,n=e.labelFormat;return function(r,a){return{datum:r,index:a,text:""+n(r,a),value:t(r)}}}var J1=["className","style","scale","shape","domain","fill","size","labelFormat","labelTransform","shapeWidth","shapeHeight","shapeMargin","shapeStyle","labelAlign","labelFlex","labelMargin","itemMargin","direction","itemDirection","legendLabelProps","children"];function wn(){return wn=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},wn.apply(this,arguments)}function ex(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}var tx={display:"flex"};function yh(e){var t=e.className,n=e.style,r=n===void 0?tx:n,a=e.scale,i=e.shape,s=e.domain,o=e.fill,l=o===void 0?eu:o,u=e.size,c=u===void 0?eu:u,f=e.labelFormat,h=f===void 0?gh:f,p=e.labelTransform,d=p===void 0?Q1:p,v=e.shapeWidth,x=v===void 0?15:v,m=e.shapeHeight,b=m===void 0?15:m,_=e.shapeMargin,M=_===void 0?"2px 4px 2px 0":_,y=e.shapeStyle,w=e.labelAlign,T=w===void 0?"left":w,$=e.labelFlex,k=$===void 0?"1":$,C=e.labelMargin,P=C===void 0?"0 4px":C,N=e.itemMargin,L=N===void 0?"0":N,I=e.direction,X=I===void 0?"column":I,U=e.itemDirection,Z=U===void 0?"row":U,J=e.legendLabelProps,K=e.children,E=ex(e,J1),A=s||("domain"in a?a.domain():[]),B=d({scale:a,labelFormat:h}),W=A.map(B);return K?g.createElement(g.Fragment,null,K(W)):g.createElement("div",{className:me("visx-legend",t),style:wn({},r,{flexDirection:X})},W.map(function(j,F){return g.createElement(hh,wn({key:"legend-"+j.text+"-"+F,margin:L,flexDirection:Z},E),g.createElement(mh,{shape:i,height:b,width:x,margin:M,item:A[F],itemIndex:F,label:j,fill:l,size:c,shapeStyle:y}),g.createElement(dh,wn({label:j.text,flex:k,margin:P,align:T},J)))}))}yh.propTypes={children:S.func,className:S.string,domain:S.array,shapeWidth:S.oneOfType([S.string,S.number]),shapeHeight:S.oneOfType([S.string,S.number]),shapeMargin:S.oneOfType([S.string,S.number]),labelAlign:S.string,labelFlex:S.oneOfType([S.string,S.number]),labelMargin:S.oneOfType([S.string,S.number]),itemMargin:S.oneOfType([S.string,S.number]),fill:S.func,size:S.func,shapeStyle:S.func};function bh(e){return g.createElement(yh,e)}const nx={chartData:"ChartDataProps[]",chartHeight:"number",chartWidth:"number",milestones:"MilestonesType[]",useAbsoluteLegend:"boolean",barTooltip:"(props: BarTooltipProps) => JSX.Element"};function zo(e){const t=On.useElementId(),{chartData:n=[],chartHeight:r=0,chartWidth:a=0,milestones:i,barTooltip:s,useAbsoluteLegend:o}=e,l={top:25,bottom:40,left:30,right:30};function u(T,$){const k=parseInt(T.slice(1,3),16),C=parseInt(T.slice(3,5),16),P=parseInt(T.slice(5,7),16);return`rgba(${k}, ${C}, ${P}, ${$})`}const c=n.map(T=>T.color),f=n.map(T=>T.label),h=n.map(T=>T.value),p=h.reduce((T,$)=>T+$,0),d=h.map(T=>Math.round(T/p*100*10)/10),v=qt({domain:[0,100],nice:!0}),x=[n.reduce((T,$)=>Object.assign(T,{[$.label]:$.value}),{})],m=[n.reduce((T,$,k)=>Object.assign(T,{[$.label]:d[k]}),{})],b=qn({domain:x,padding:.2}),_=Qr({domain:f.map(T=>`${T}: ${(o?x:m)[0][T]}%`),range:[...c]}),M=a-l.left-l.right,y=r-l.top-l.bottom;v.rangeRound([0,M]),b.rangeRound([y,0]);const w=T=>`${T}%`;return D.createElement("div",{style:{width:a},className:"position-relative"},D.createElement(bh,{className:"fs-12 lh-18 gray600",scale:_,direction:"row",shape:"rect",shapeWidth:30,shapeHeight:4,shapeMargin:"0 5px 0 0",shapeStyle:()=>({borderRadius:"2px"}),labelMargin:"0",itemMargin:"0 10px 0 10px",style:{display:"flex",justifyContent:"center",fontSize:"16px"}}),i&&!(i!=null&&i.every(T=>T===void 0))&&D.createElement("div",{className:"position-absolute",style:{top:"26px",width:`${a-l.left-l.right}px`,margin:`0 ${l.left}px`,height:"12px"}},i.map(T=>D.createElement("i",{key:`${t.current}_${T.label}`,className:Jl("sps-icon sps-icon-chevron-down fs-14 position-absolute",T.color),style:{left:`calc(${T.value}% - 5px)`}}))),D.createElement("svg",{width:a,height:r},D.createElement(kn,{top:l.top,left:l.left},D.createElement(_p,{data:m,keys:f,height:y,y:()=>"",xScale:v,yScale:b,color:_},T=>T.map($=>$.bars.map(k=>{let C=0;k.x===0||T.length-1===$.index?C=k.width-1.5:C=k.width-3,C<0&&(C=0);const P=`${t.current}_${k.key}`,N=k.key?k.key.toUpperCase():"",L=x[0][$.key]?x[0][$.key].toLocaleString():"";return D.createElement(kn,{key:`barstack-horizontal-${$.index}-${k.index}`},D.createElement(Rn,{id:`gradient-${$.index}`,vertical:!1,from:u(k.color,.5),to:k.color}),D.createElement("rect",{id:P,x:k.x!==0?k.x+1.5:k.x,y:k.y,width:C,height:20,fill:`url(#gradient-${$.index})`},s&&D.createElement(On.SpsTooltip,{for:P},D.createElement(s,{label:N,absoluteValue:L,relativeValue:m[0][$.key]}))))}))),D.createElement(Eo,{top:y+6,tickFormat:w,scale:v,stroke:de.colors.gray400,tickStroke:de.colors.gray400,tickLength:4,tickLineProps:{y1:-11,y2:5},tickLabelProps:()=>({fill:de.colors.gray400,fontSize:12,textAnchor:"middle"})}))),i&&!i.every(T=>T===void 0)&&D.createElement("footer",{className:"fs-12 lh-18 gray600 d-flex justify-content-center"},i.map(T=>D.createElement("span",{key:`${t.current}_${T.label}`,className:"d-flex align-items-center ml-3"},D.createElement("i",{className:Jl("sps-icon sps-icon-chevron-down fs-14 mr-1",T.color)}),T.label,":",D.createElement("span",{className:"sps-text-semibold gray600 ml-1"},T.value,"%")))))}Object.assign(zo,{props:nx,displayName:"SpsStackedHorizontalBarChart"});const xh={basic:{label:"Basic",description:rt.code`
|
112
|
-
<p>Stacked horizontal bar chart example.</p>
|
113
|
-
`,examples:{basic:{react:rt.code`
|
114
|
-
import { SpsStackedHorizontalBarChart } from "@spscommerce/ds-react-charts";
|
115
|
-
function DemoComponent() {
|
116
|
-
const data = [
|
117
|
-
{label: 'Label 1', value: 0.9, color: '#6c5efb'},
|
118
|
-
{label: 'Label 2', value: 7, color: '#ff9632'},
|
119
|
-
{label: 'Label 3', value: 15, color: '#a44afe'},
|
120
|
-
{label: 'Label 4', value: 0, color: '#32be6f'},
|
121
|
-
{label: 'Label 5', value: 10, color: '#a5a9ab'}
|
122
|
-
];
|
123
|
-
|
124
|
-
const BarTooltip = ({ label, absoluteValue, relativeValue }) => (
|
125
|
-
<>
|
126
|
-
<div className="font-weight-bold">{label}</div>
|
127
|
-
<div>Percentage: {relativeValue}%</div>
|
128
|
-
<div>Count: {absoluteValue}</div>
|
129
|
-
</>
|
130
|
-
)
|
131
|
-
|
132
|
-
return (
|
133
|
-
<SpsStackedHorizontalBarChart
|
134
|
-
chartData={data}
|
135
|
-
chartHeight={100}
|
136
|
-
chartWidth={800}
|
137
|
-
barTooltip={BarTooltip}
|
138
|
-
/>
|
139
|
-
)
|
140
|
-
}
|
141
|
-
`},vertical:{react:rt.code`
|
142
|
-
import { SpsStackedHorizontalBarChart } from "@spscommerce/ds-react-charts";
|
143
|
-
function DemoComponent() {
|
144
|
-
const chartData = [
|
145
|
-
{label: 'Label 1', value: 10, color: '#6c5efb'},
|
146
|
-
{label: 'Label 2', value: 7, color: '#ff9632'},
|
147
|
-
{label: 'Label 3', value: 35, color: '#a44afe'},
|
148
|
-
{label: 'Label 4', value: 29, color: '#32be6f'},
|
149
|
-
{label: 'Label 5', value: 19, color: '#a5a9ab'}
|
150
|
-
];
|
151
|
-
|
152
|
-
const milestonesData = [
|
153
|
-
{label: 'Current Total', value: 81, color: StackedBarChartMilestone.GREEN},
|
154
|
-
{label: 'Current Target', value: 67, color: StackedBarChartMilestone.GRAY},
|
155
|
-
{label: 'Goal', value: 99, color: StackedBarChartMilestone.RED}
|
156
|
-
]
|
157
|
-
|
158
|
-
return (
|
159
|
-
<SpsStackedHorizontalBarChart
|
160
|
-
chartData={chartData}
|
161
|
-
chartHeight={100}
|
162
|
-
chartWidth={800}
|
163
|
-
milestones={milestonesData}
|
164
|
-
/>
|
165
|
-
)
|
166
|
-
}
|
167
|
-
`}}}};function Ea(e,t,n){var r,a,i,s,o;t==null&&(t=100);function l(){var c=Date.now()-s;c<t&&c>=0?r=setTimeout(l,t-c):(r=null,n||(o=e.apply(i,a),i=a=null))}var u=function(){i=this,a=arguments,s=Date.now();var c=n&&!r;return r||(r=setTimeout(l,t)),c&&(o=e.apply(i,a),i=a=null),o};return u.clear=function(){r&&(clearTimeout(r),r=null)},u.flush=function(){r&&(o=e.apply(i,a),i=a=null,clearTimeout(r),r=null)},u}Ea.debounce=Ea;var rx=Ea;const tu=Yt(rx);function ix(e){let{debounce:t,scroll:n,polyfill:r,offsetSize:a}=e===void 0?{debounce:0,scroll:!1,offsetSize:!1}:e;const i=r||(typeof window>"u"?class{}:window.ResizeObserver);if(!i)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[s,o]=g.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),l=g.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:s}),u=t?typeof t=="number"?t:t.scroll:null,c=t?typeof t=="number"?t:t.resize:null,f=g.useRef(!1);g.useEffect(()=>(f.current=!0,()=>void(f.current=!1)));const[h,p,d]=g.useMemo(()=>{const b=()=>{if(!l.current.element)return;const{left:_,top:M,width:y,height:w,bottom:T,right:$,x:k,y:C}=l.current.element.getBoundingClientRect(),P={left:_,top:M,width:y,height:w,bottom:T,right:$,x:k,y:C};l.current.element instanceof HTMLElement&&a&&(P.height=l.current.element.offsetHeight,P.width=l.current.element.offsetWidth),Object.freeze(P),f.current&&!lx(l.current.lastBounds,P)&&o(l.current.lastBounds=P)};return[b,c?tu(b,c):b,u?tu(b,u):b]},[o,a,u,c]);function v(){l.current.scrollContainers&&(l.current.scrollContainers.forEach(b=>b.removeEventListener("scroll",d,!0)),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null)}function x(){l.current.element&&(l.current.resizeObserver=new i(d),l.current.resizeObserver.observe(l.current.element),n&&l.current.scrollContainers&&l.current.scrollContainers.forEach(b=>b.addEventListener("scroll",d,{capture:!0,passive:!0})))}const m=b=>{!b||b===l.current.element||(v(),l.current.element=b,l.current.scrollContainers=_h(b),x())};return ox(d,!!n),ax(p),g.useEffect(()=>{v(),x()},[n,d,p]),g.useEffect(()=>v,[]),[m,s,h]}function ax(e){g.useEffect(()=>{const t=e;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[e])}function ox(e,t){g.useEffect(()=>{if(t){const n=e;return window.addEventListener("scroll",n,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",n,!0)}},[e,t])}function _h(e){const t=[];if(!e||e===document.body)return t;const{overflow:n,overflowX:r,overflowY:a}=window.getComputedStyle(e);return[n,r,a].some(i=>i==="auto"||i==="scroll")&&t.push(e),[...t,..._h(e.parentElement)]}const sx=["x","y","top","bottom","left","right","width","height"],lx=(e,t)=>sx.every(n=>e[n]===t[n]),wh=Ct(d1);function ux(e){return!!e&&e instanceof Element}function cx(e){return!!e&&(e instanceof SVGElement||"ownerSVGElement"in e)}function fx(e){return!!e&&"createSVGPoint"in e}function hx(e){return!!e&&"getScreenCTM"in e}function dx(e){return!!e&&"changedTouches"in e}function px(e){return!!e&&"clientX"in e}function vx(e){return!!e&&(e instanceof Event||"nativeEvent"in e&&e.nativeEvent instanceof Event)}function Sn(){return Sn=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},Sn.apply(this,arguments)}var Fi={x:0,y:0};function mx(e){if(!e)return Sn({},Fi);if(dx(e))return e.changedTouches.length>0?{x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY}:Sn({},Fi);if(px(e))return{x:e.clientX,y:e.clientY};var t=e==null?void 0:e.target,n=t&&"getBoundingClientRect"in t?t.getBoundingClientRect():null;return n?{x:n.x+n.width/2,y:n.y+n.height/2}:Sn({},Fi)}function nu(e,t){if(!e||!t)return null;var n=mx(t),r=cx(e)?e.ownerSVGElement:e,a=hx(r)?r.getScreenCTM():null;if(fx(r)&&a){var i=r.createSVGPoint();return i.x=n.x,i.y=n.y,i=i.matrixTransform(a.inverse()),new qe({x:i.x,y:i.y})}var s=e.getBoundingClientRect();return new qe({x:n.x-s.left-e.clientLeft,y:n.y-s.top-e.clientTop})}function gx(e,t){if(ux(e)&&t)return nu(e,t);if(vx(e)){var n=e,r=n.target;if(r)return nu(r,n)}return null}var Ye=g.createContext({});function Pa(e){var t,n=e;return n&&"bandwidth"in n&&(t=n==null?void 0:n.bandwidth())!=null?t:0}function Se(e){return e!=null&&typeof e=="number"&&!Number.isNaN(e)&&Number.isFinite(e)}const Sh=Ct(sp),Th=Ct(Yg);var yx=["AxisComponent"];function $r(){return $r=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},$r.apply(this,arguments)}function bx(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function xx(e){var t,n,r,a,i,s,o,l=e.AxisComponent,u=bx(e,yx),c=g.useContext(Ye),f=c.theme,h=c.xScale,p=c.yScale,d=c.margin,v=c.width,x=c.height,m=u.orientation,b=g.useMemo(function(){var $,k,C,P;return m==="left"||m==="right"?f==null||($=f.axisStyles)==null||(k=$.y)==null?void 0:k[m]:f==null||(C=f.axisStyles)==null||(P=C.x)==null?void 0:P[m]},[f,m]),_=u.tickLabelProps,M=g.useMemo(function(){return _||b?function($,k,C){return $r({},b==null?void 0:b.tickLabel,{width:m==="left"||m==="right"?d==null?void 0:d[m]:void 0},typeof _=="function"?_($,k,C):_)}:void 0},[_,b,m,d]),y=m==="bottom"?(x??0)-((t=d==null?void 0:d.bottom)!=null?t:0):m==="top"&&(n=d==null?void 0:d.top)!=null?n:0,w=m==="left"?(r=d==null?void 0:d.left)!=null?r:0:m==="right"?(v??0)-((a=d==null?void 0:d.right)!=null?a:0):0,T=m==="left"||m==="right"?p:h;return T?g.createElement(l,$r({top:y,left:w,labelProps:b==null?void 0:b.axisLabel,stroke:b==null||(i=b.axisLine)==null?void 0:i.stroke,strokeWidth:b==null||(s=b.axisLine)==null?void 0:s.strokeWidth,tickLength:b==null?void 0:b.tickLength,tickStroke:b==null||(o=b.tickLine)==null?void 0:o.stroke},u,{tickLabelProps:M,scale:T})):null}var si={};si.__esModule=!0;si.default=_x;function _x(e){return"bandwidth"in e?e.bandwidth():0}var wx=Oh,ru=Yn(jr),iu=Yn(g),Sx=Yn(Ln),Tx=Yn(oi),Ox=Sh,au=wh,ou=Th,kx=Yn(si),Mx=["top","left","scale","width","stroke","strokeWidth","strokeDasharray","className","children","numTicks","lineStyle","offset","tickValues"];function Yn(e){return e&&e.__esModule?e:{default:e}}function Na(){return Na=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},Na.apply(this,arguments)}function $x(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function Oh(e){var t=e.top,n=t===void 0?0:t,r=e.left,a=r===void 0?0:r,i=e.scale,s=e.width,o=e.stroke,l=o===void 0?"#eaf0f6":o,u=e.strokeWidth,c=u===void 0?1:u,f=e.strokeDasharray,h=e.className,p=e.children,d=e.numTicks,v=d===void 0?10:d,x=e.lineStyle,m=e.offset,b=e.tickValues,_=$x(e,Mx),M=b??(0,ou.getTicks)(i,v),y=(m??0)+(0,kx.default)(i)/2,w=M.map(function(T,$){var k,C=((k=(0,ou.coerceNumber)(i(T)))!=null?k:0)+y;return{index:$,from:new au.Point({x:0,y:C}),to:new au.Point({x:s,y:C})}});return iu.default.createElement(Ox.Group,{className:(0,Sx.default)("visx-rows",h),top:n,left:a},p?p({lines:w}):w.map(function(T){var $=T.from,k=T.to,C=T.index;return iu.default.createElement(Tx.default,Na({key:"row-line-"+C,from:$,to:k,stroke:l,strokeWidth:c,strokeDasharray:f,style:x},_))}))}Oh.propTypes={tickValues:ru.default.array,width:ru.default.number.isRequired};var Cx=kh,su=Vn(jr),lu=Vn(g),Ex=Vn(Ln),Px=Vn(oi),Nx=Sh,uu=wh,cu=Th,Rx=Vn(si),Lx=["top","left","scale","height","stroke","strokeWidth","strokeDasharray","className","numTicks","lineStyle","offset","tickValues","children"];function Vn(e){return e&&e.__esModule?e:{default:e}}function Ra(){return Ra=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},Ra.apply(this,arguments)}function Ax(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function kh(e){var t=e.top,n=t===void 0?0:t,r=e.left,a=r===void 0?0:r,i=e.scale,s=e.height,o=e.stroke,l=o===void 0?"#eaf0f6":o,u=e.strokeWidth,c=u===void 0?1:u,f=e.strokeDasharray,h=e.className,p=e.numTicks,d=p===void 0?10:p,v=e.lineStyle,x=e.offset,m=e.tickValues,b=e.children,_=Ax(e,Lx),M=m??(0,cu.getTicks)(i,d),y=(x??0)+(0,Rx.default)(i)/2,w=M.map(function(T,$){var k,C=((k=(0,cu.coerceNumber)(i(T)))!=null?k:0)+y;return{index:$,from:new uu.Point({x:C,y:0}),to:new uu.Point({x:C,y:s})}});return lu.default.createElement(Nx.Group,{className:(0,Ex.default)("visx-columns",h),top:n,left:a},b?b({lines:w}):w.map(function(T){var $=T.from,k=T.to,C=T.index;return lu.default.createElement(Px.default,Ra({key:"column-line-"+C,from:$,to:k,stroke:l,strokeWidth:c,strokeDasharray:f,style:v},_))}))}kh.propTypes={tickValues:su.default.array,height:su.default.number.isRequired};var Dx=["rows","columns","GridRowsComponent","GridColumnsComponent"];function Cr(){return Cr=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},Cr.apply(this,arguments)}function zx(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function Mh(e){var t=e.rows,n=t===void 0?!0:t,r=e.columns,a=r===void 0?!0:r,i=e.GridRowsComponent,s=e.GridColumnsComponent,o=zx(e,Dx),l=g.useContext(Ye),u=l.theme,c=l.xScale,f=l.yScale,h=l.margin,p=l.innerWidth,d=l.innerHeight,v=u==null?void 0:u.gridStyles;return g.createElement(g.Fragment,null,n&&f&&p!=null&&g.createElement(i,Cr({left:h==null?void 0:h.left,lineStyle:v,width:p,scale:f},o)),a&&c&&d!=null&&g.createElement(s,Cr({top:h==null?void 0:h.top,lineStyle:v,height:d,scale:c},o)))}Mh.propTypes={rows:S.bool,columns:S.bool};function La(){return La=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},La.apply(this,arguments)}function fu(e){return g.createElement(xx,La({AxisComponent:Co},e))}function Aa(){return Aa=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},Aa.apply(this,arguments)}function jx(e){return g.createElement(Mh,Aa({GridRowsComponent:wx,GridColumnsComponent:Cx},e))}var Fx=["tooltipOpen"];function Ix(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function Er(){return Er=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},Er.apply(this,arguments)}function Wx(e){var t=g.useState(Er({tooltipOpen:!1},e)),n=t[0],r=t[1],a=g.useCallback(function(s){return r(typeof s=="function"?function(o){o.tooltipOpen;var l=Ix(o,Fx);return Er({},s(l),{tooltipOpen:!0})}:{tooltipOpen:!0,tooltipLeft:s.tooltipLeft,tooltipTop:s.tooltipTop,tooltipData:s.tooltipData})},[r]),i=g.useCallback(function(){return r({tooltipOpen:!1,tooltipLeft:void 0,tooltipTop:void 0,tooltipData:void 0})},[r]);return{tooltipOpen:n.tooltipOpen,tooltipLeft:n.tooltipLeft,tooltipTop:n.tooltipTop,tooltipData:n.tooltipData,updateTooltip:r,showTooltip:a,hideTooltip:i}}function Bx(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Da(e,t)}function Da(e,t){return Da=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},Da(e,t)}var $h=function(e){Bx(t,e);function t(){return e.apply(this,arguments)||this}var n=t.prototype;return n.componentWillUnmount=function(){this.node&&document.body&&(document.body.removeChild(this.node),delete this.node)},n.render=function(){return!this.node&&typeof document<"u"&&(this.node=document.createElement("div"),this.props.zIndex!=null&&(this.node.style.zIndex=""+this.props.zIndex),document.body.append(this.node)),this.node?Tu.createPortal(this.props.children,this.node):null},t}(g.PureComponent);$h.propTypes={zIndex:S.oneOfType([S.number,S.string])};var Hx=["className","top","left","offsetLeft","offsetTop","style","children","unstyled","applyPositionStyle"];function Pr(){return Pr=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},Pr.apply(this,arguments)}function Ux(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}var jo={position:"absolute",backgroundColor:"white",color:"#666666",padding:".3rem .5rem",borderRadius:"3px",fontSize:"14px",boxShadow:"0 1px 2px rgba(33,33,33,0.2)",lineHeight:"1em",pointerEvents:"none"},li=g.forwardRef(function(e,t){var n=e.className,r=e.top,a=e.left,i=e.offsetLeft,s=i===void 0?10:i,o=e.offsetTop,l=o===void 0?10:o,u=e.style,c=u===void 0?jo:u,f=e.children,h=e.unstyled,p=h===void 0?!1:h,d=e.applyPositionStyle,v=d===void 0?!1:d,x=Ux(e,Hx);return g.createElement("div",Pr({ref:t,className:me("visx-tooltip",n),style:Pr({top:r==null||l==null?r:r+l,left:a==null||s==null?a:a+s},v&&{position:"absolute"},!p&&c)},x),f)});li.propTypes={children:S.node,className:S.string,left:S.number,offsetLeft:S.number,offsetTop:S.number,top:S.number,applyPositionStyle:S.bool,unstyled:S.bool};li.displayName="Tooltip";function za(){return za=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},za.apply(this,arguments)}function qx(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Yx(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ja(e,t)}function ja(e,t){return ja=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},ja(e,t)}var hu={top:0,right:0,bottom:0,left:0,width:0,height:0};function Vx(e){var t;return t=function(n){Yx(r,n);function r(i){var s;return s=n.call(this,i)||this,s.state={rect:void 0,parentRect:void 0},s.nodeRef=g.createRef(),s.getRects=s.getRects.bind(qx(s)),s}var a=r.prototype;return a.componentDidMount=function(){var s,o=this;this.node=(s=this.nodeRef)!=null&&s.current?this.nodeRef.current:Tu.findDOMNode(this),this.setState(function(){return o.getRects()})},a.getRects=function(){if(!this.node)return this.state;var s=this.node,o=s.parentNode,l=s.getBoundingClientRect?s.getBoundingClientRect():hu,u=o!=null&&o.getBoundingClientRect?o.getBoundingClientRect():hu;return{rect:l,parentRect:u}},a.render=function(){return g.createElement(e,za({nodeRef:this.nodeRef,getRects:this.getRects},this.state,this.props))},r}(g.PureComponent),t.displayName="withBoundingRects("+(e.displayName||"")+")",t}var Ch=g.createContext({isFlippedVertically:!1,isFlippedHorizontally:!1}),Gx=Ch.Provider;Ch.Consumer;var Kx=["children","getRects","left","offsetLeft","offsetTop","parentRect","rect","style","top","unstyled","nodeRef"];function Nr(){return Nr=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},Nr.apply(this,arguments)}function Xx(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function Eh(e){var t=e.children;e.getRects;var n=e.left,r=n===void 0?0:n,a=e.offsetLeft,i=a===void 0?10:a,s=e.offsetTop,o=s===void 0?10:s,l=e.parentRect,u=e.rect,c=e.style,f=c===void 0?jo:c,h=e.top,p=h===void 0?0:h,d=e.unstyled,v=d===void 0?!1:d,x=e.nodeRef,m=Xx(e,Kx),b,_=!1,M=!1;if(u&&l){var y=r,w=p;if(l.width){var T=y+i+u.width-l.width,$=u.width-y-i;_=T>0&&T>$}else{var k=y+i+u.width-window.innerWidth,C=u.width-y-i;_=k>0&&k>C}if(l.height){var P=w+o+u.height-l.height,N=u.height-w-o;M=P>0&&P>N}else M=w+o+u.height>window.innerHeight;y=_?y-u.width-i:y+i,w=M?w-u.height-o:w+o,y=Math.round(y),w=Math.round(w),b="translate("+y+"px, "+w+"px)"}return g.createElement(li,Nr({ref:x,style:Nr({left:0,top:0,transform:b},!v&&f)},m),g.createElement(Gx,{value:{isFlippedVertically:!M,isFlippedHorizontally:!_}},t))}Eh.propTypes={nodeRef:S.oneOfType([S.string,S.func,S.object])};const Zx=Vx(Eh);var Qx=["detectBounds","zIndex"],Jx=["left","top","detectBounds","zIndex"];function Fa(){return Fa=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},Fa.apply(this,arguments)}function du(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function e_(e){var t=e===void 0?{}:e,n=t.detectBounds,r=n===void 0?!0:n,a=t.zIndex,i=du(t,Qx),s=ix(i),o=s[0],l=s[1],u=s[2],c=g.useState(!1),f=c[0],h=c[1];g.useEffect(function(){h(!1)},[]);var p=g.useMemo(function(){return function(d){var v=d.left,x=v===void 0?0:v,m=d.top,b=m===void 0?0:m,_=d.detectBounds,M=d.zIndex,y=du(d,Jx),w=_??r,T=M??a,$=w?Zx:li,k=f?0:window.scrollX,C=f?0:window.scrollY,P=x+(l.left||0)+k,N=b+(l.top||0)+C;return g.createElement($h,{zIndex:T},g.createElement($,Fa({left:P,top:N},y)))}},[r,a,l.left,l.top,f]);return{containerRef:o,containerBounds:l,forceRefreshBounds:u,TooltipInPortal:p}}var Gn=g.createContext(null),t_=["debounce","detectBounds","horizontalCrosshairStyle","glyphStyle","renderTooltip","renderGlyph","resizeObserverPolyfill","scroll","showDatumGlyph","showHorizontalCrosshair","showSeriesGlyphs","showVerticalCrosshair","snapTooltipToDatumX","snapTooltipToDatumY","verticalCrosshairStyle","zIndex"],n_=["x","y"];function pu(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function Ve(){return Ve=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},Ve.apply(this,arguments)}var Ii={position:"absolute",pointerEvents:"none",fontSize:0,lineHeight:0},r_={position:"absolute",left:0,top:0,opacity:0,width:0,height:0,pointerEvents:"none"};function Ph(e){var t=g.useContext(Ye)||{},n=t.theme;return g.createElement("circle",Ve({cx:e.x,cy:e.y,r:e.size,fill:e.color,stroke:n==null?void 0:n.backgroundColor,strokeWidth:1.5,paintOrder:"fill"},e.glyphStyle))}Ph.propTypes={isNearestDatum:S.bool.isRequired};function i_(e){return g.createElement(Ph,e)}function Nh(e){var t,n,r,a,i,s,o,l,u,c,f,h,p,d=e.debounce,v=e.detectBounds,x=e.horizontalCrosshairStyle,m=e.glyphStyle,b=e.renderTooltip,_=e.renderGlyph,M=_===void 0?i_:_,y=e.resizeObserverPolyfill,w=e.scroll,T=w===void 0?!0:w,$=e.showDatumGlyph,k=$===void 0?!1:$,C=e.showHorizontalCrosshair,P=C===void 0?!1:C,N=e.showSeriesGlyphs,L=N===void 0?!1:N,I=e.showVerticalCrosshair,X=I===void 0?!1:I,U=e.snapTooltipToDatumX,Z=U===void 0?!1:U,J=e.snapTooltipToDatumY,K=J===void 0?!1:J,E=e.verticalCrosshairStyle,A=e.zIndex,B=pu(e,t_),W=g.useContext(Ye)||{},j=W.colorScale,F=W.theme,q=W.innerHeight,Y=W.innerWidth,V=W.margin,R=W.xScale,z=W.yScale,H=W.dataRegistry,O=W.resizeObserverPolyfill,Q=g.useContext(Gn),te=e_({debounce:d,detectBounds:v,polyfill:O||y,scroll:T,zIndex:A}),le=te.containerRef,ue=te.TooltipInPortal,je=te.forceRefreshBounds,Xn=g.useCallback(function(ke){var Ie;le((Ie=ke==null?void 0:ke.parentElement)!=null?Ie:null)},[le]),as=Q!=null&&Q.tooltipOpen?b(Ve({},Q,{colorScale:j})):null,Lt=(Q==null?void 0:Q.tooltipOpen)&&as!=null,os=g.useRef(!1);g.useEffect(function(){Lt&&!os.current&&je(),os.current=Lt},[Lt,je]);var Zn=Q==null?void 0:Q.tooltipLeft,Qn=Q==null?void 0:Q.tooltipTop,ss=R?Pa(R):0,ls=z?Pa(z):0,ci=g.useCallback(function(ke,Ie){var dt,pt,Pe=H==null?void 0:H.get(ke),tn=Pe==null?void 0:Pe.xAccessor,Jn=Pe==null?void 0:Pe.yAccessor,hi=R&&tn?(dt=Number(R(tn(Ie)))+ss/2)!=null?dt:0:void 0,er=z&&Jn?(pt=Number(z(Jn(Ie)))+ls/2)!=null?pt:0:void 0;return{left:hi,top:er}},[H,ss,ls,R,z]),Fe=Q==null||(t=Q.tooltipData)==null?void 0:t.nearestDatum,en=(n=Fe==null?void 0:Fe.key)!=null?n:"";if(Lt&&Fe&&(Z||K)){var us=ci(en,Fe.datum),cs=us.left,fs=us.top;Zn=Z&&Se(cs)?cs:Zn,Qn=K&&Se(fs)?fs:Qn}var fi=[];if(Lt&&(k||L)){var hs,ds=Number((hs=m==null?void 0:m.radius)!=null?hs:4);if(L){var ps,vs;Object.values((ps=Q==null||(vs=Q.tooltipData)==null?void 0:vs.datumByKey)!=null?ps:{}).forEach(function(ke){var Ie,dt,pt,Pe=ke.key,tn=ke.datum,Jn=ke.index,hi=(Ie=(dt=j==null?void 0:j(Pe))!=null?dt:F==null||(pt=F.htmlLabel)==null?void 0:pt.color)!=null?Ie:"#222",er=ci(Pe,tn),Os=er.left,ks=er.top;!Se(Os)||!Se(ks)||fi.push({key:Pe,color:hi,datum:tn,index:Jn,size:ds,x:Os,y:ks,glyphStyle:m,isNearestDatum:Fe?Fe.key===Pe:!1})})}else if(Fe){var ms=ci(en,Fe.datum),gs=ms.left,ys=ms.top;if(Se(gs)&&Se(ys)){var bs,xs,_s,ws,Ss,Ts,Zh=(bs=(xs=(_s=(ws=en&&(j==null?void 0:j(en)))!=null?ws:null)!=null?_s:F==null||(Ss=F.gridStyles)==null?void 0:Ss.stroke)!=null?xs:F==null||(Ts=F.htmlLabel)==null?void 0:Ts.color)!=null?bs:"#222";fi.push({key:en,color:Zh,datum:Fe.datum,index:Fe.index,size:ds,x:gs,y:ys,glyphStyle:m,isNearestDatum:!0})}}}return g.createElement(g.Fragment,null,g.createElement("svg",{ref:Xn,style:r_}),Lt&&g.createElement(g.Fragment,null,X&&g.createElement(ue,{className:"visx-crosshair visx-crosshair-vertical",left:Zn,top:V==null?void 0:V.top,offsetLeft:0,offsetTop:0,detectBounds:!1,style:Ii},g.createElement("svg",{width:"1",height:q,overflow:"visible"},g.createElement("line",Ve({x1:0,x2:0,y1:0,y2:q,strokeWidth:1.5,stroke:(r=(a=F==null||(i=F.gridStyles)==null?void 0:i.stroke)!=null?a:F==null||(s=F.htmlLabel)==null?void 0:s.color)!=null?r:"#222"},E)))),P&&g.createElement(ue,{className:"visx-crosshair visx-crosshair-horizontal",left:V==null?void 0:V.left,top:Qn,offsetLeft:0,offsetTop:0,detectBounds:!1,style:Ii},g.createElement("svg",{width:Y,height:"1",overflow:"visible"},g.createElement("line",Ve({x1:0,x2:Y,y1:0,y2:0,strokeWidth:1.5,stroke:(o=(l=F==null||(u=F.gridStyles)==null?void 0:u.stroke)!=null?l:F==null||(c=F.htmlLabel)==null?void 0:c.color)!=null?o:"#222"},x)))),fi.map(function(ke,Ie){var dt=ke.x,pt=ke.y,Pe=pu(ke,n_);return g.createElement(ue,{key:Ie,className:"visx-tooltip-glyph",left:dt,top:pt,offsetLeft:0,offsetTop:0,detectBounds:!1,style:Ii},g.createElement("svg",{overflow:"visible"},M(Ve({x:0,y:0},Pe))))}),g.createElement(ue,Ve({left:Zn,top:Qn,style:Ve({},jo,{background:(f=F==null?void 0:F.backgroundColor)!=null?f:"white",boxShadow:"0 1px 2px "+(F!=null&&(h=F.htmlLabel)!=null&&h.color?(F==null||(p=F.htmlLabel)==null?void 0:p.color)+"55":"#22222255")},F==null?void 0:F.htmlLabel)},B),as)))}Nh.propTypes={renderTooltip:S.func.isRequired,renderGlyph:S.func,snapTooltipToDatumX:S.bool,snapTooltipToDatumY:S.bool,showVerticalCrosshair:S.bool,showHorizontalCrosshair:S.bool,showDatumGlyph:S.bool,showSeriesGlyphs:S.bool};function Rh(e){var t=g.useContext(Gn);return t!=null&&t.tooltipOpen?g.createElement(Nh,e):null}Rh.propTypes={renderTooltip:S.func.isRequired,renderGlyph:S.func,snapTooltipToDatumX:S.bool,snapTooltipToDatumY:S.bool,showVerticalCrosshair:S.bool,showHorizontalCrosshair:S.bool,showDatumGlyph:S.bool,showSeriesGlyphs:S.bool};var Fo={},a_=ti,o_=function(){return a_.Date.now()},s_=o_,l_=/\s/;function u_(e){for(var t=e.length;t--&&l_.test(e.charAt(t)););return t}var c_=u_,f_=c_,h_=/^\s+/;function d_(e){return e&&e.slice(0,f_(e)+1).replace(h_,"")}var p_=d_;function v_(e){return e!=null&&typeof e=="object"}var m_=v_,g_=eh,y_=m_,b_="[object Symbol]";function x_(e){return typeof e=="symbol"||y_(e)&&g_(e)==b_}var __=x_,w_=p_,vu=ni,S_=__,mu=NaN,T_=/^[-+]0x[0-9a-f]+$/i,O_=/^0b[01]+$/i,k_=/^0o[0-7]+$/i,M_=parseInt;function $_(e){if(typeof e=="number")return e;if(S_(e))return mu;if(vu(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=vu(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=w_(e);var n=O_.test(e);return n||k_.test(e)?M_(e.slice(2),n?2:8):T_.test(e)?mu:+e}var C_=$_,E_=ni,Wi=s_,gu=C_,P_="Expected a function",N_=Math.max,R_=Math.min;function L_(e,t,n){var r,a,i,s,o,l,u=0,c=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(P_);t=gu(t)||0,E_(n)&&(c=!!n.leading,f="maxWait"in n,i=f?N_(gu(n.maxWait)||0,t):i,h="trailing"in n?!!n.trailing:h);function p(w){var T=r,$=a;return r=a=void 0,u=w,s=e.apply($,T),s}function d(w){return u=w,o=setTimeout(m,t),c?p(w):s}function v(w){var T=w-l,$=w-u,k=t-T;return f?R_(k,i-$):k}function x(w){var T=w-l,$=w-u;return l===void 0||T>=t||T<0||f&&$>=i}function m(){var w=Wi();if(x(w))return b(w);o=setTimeout(m,v(w))}function b(w){return o=void 0,h&&r?p(w):(r=a=void 0,s)}function _(){o!==void 0&&clearTimeout(o),u=0,r=l=a=o=void 0}function M(){return o===void 0?s:b(Wi())}function y(){var w=Wi(),T=x(w);if(r=arguments,a=this,l=w,T){if(o===void 0)return d(l);if(f)return clearTimeout(o),o=setTimeout(m,t),p(l)}return o===void 0&&(o=setTimeout(m,t)),s}return y.cancel=_,y.flush=M,y}var Lh=L_;const A_=Yt(Lh);Fo.__esModule=!0;Fo.default=F_;var D_=z_(Lh),hn=g;function z_(e){return e&&e.__esModule?e:{default:e}}function Rr(){return Rr=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},Rr.apply(this,arguments)}var j_=[],yu={width:0,height:0,top:0,left:0};function F_(e){var t=e===void 0?{}:e,n=t.initialSize,r=n===void 0?yu:n,a=t.debounceTime,i=a===void 0?300:a,s=t.ignoreDimensions,o=s===void 0?j_:s,l=t.enableDebounceLeadingCall,u=l===void 0?!0:l,c=t.resizeObserverPolyfill,f=(0,hn.useRef)(null),h=(0,hn.useRef)(0),p=(0,hn.useState)(Rr({},yu,r)),d=p[0],v=p[1],x=(0,hn.useMemo)(function(){var m=Array.isArray(o)?o:[o];return(0,D_.default)(function(b){v(function(_){var M=Object.keys(_),y=M.filter(function(T){return _[T]!==b[T]}),w=y.every(function(T){return m.includes(T)});return w?_:b})},i,{leading:u})},[i,u,o]);return(0,hn.useEffect)(function(){var m=c||window.ResizeObserver,b=new m(function(_){_.forEach(function(M){var y,w=(y=M==null?void 0:M.contentRect)!=null?y:{},T=w.left,$=w.top,k=w.width,C=w.height;h.current=window.requestAnimationFrame(function(){x({width:k,height:C,top:$,left:T})})})});return f.current&&b.observe(f.current),function(){window.cancelAnimationFrame(h.current),b.disconnect(),x.cancel()}},[x,c]),Rr({parentRef:f,resize:x},d)}var I_=Ah,bu=Io(jr),W_=Io(g),B_=Io(Fo),H_=["className","children","debounceTime","ignoreDimensions","initialSize","parentSizeStyles","enableDebounceLeadingCall","resizeObserverPolyfill"],U_=["parentRef","resize"];function Io(e){return e&&e.__esModule?e:{default:e}}function Lr(){return Lr=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},Lr.apply(this,arguments)}function xu(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}var q_={width:"100%",height:"100%"};function Ah(e){var t=e.className,n=e.children,r=e.debounceTime,a=e.ignoreDimensions,i=e.initialSize,s=e.parentSizeStyles,o=s===void 0?q_:s,l=e.enableDebounceLeadingCall,u=l===void 0?!0:l,c=e.resizeObserverPolyfill,f=xu(e,H_),h=(0,B_.default)({initialSize:i,debounceTime:r,ignoreDimensions:a,enableDebounceLeadingCall:u,resizeObserverPolyfill:c}),p=h.parentRef,d=h.resize,v=xu(h,U_);return W_.default.createElement("div",Lr({style:o,ref:p,className:t},f),n(Lr({},v,{ref:p.current,resize:d})))}Ah.propTypes={className:bu.default.string,children:bu.default.func.isRequired};var Dh=g.createContext(null);function nt(e,t,n){var r=g.useContext(Dh),a=g.useRef();a.current=n;var i=g.useCallback(function(s,o,l){r&&r.emit(s,{event:o,svgPoint:gx(o),source:l})},[r]);return g.useEffect(function(){if(r&&e&&t){var s=function(l){var u;(!a.current||l!=null&&l.source&&(u=a.current)!=null&&u.includes(l.source))&&t(l)};return r.on(e,s),function(){return r==null?void 0:r.off(e,s)}}},[r,e,t]),r?i:null}function Y_(e){return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r&&r.push(n)||e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&r.splice(r.indexOf(n)>>>0,1)},emit:function(t,n){(e.get(t)||[]).slice().map(function(r){r(n)}),(e.get("*")||[]).slice().map(function(r){r(t,n)})}}}function V_(e){var t=e.children,n=g.useMemo(function(){return Y_()},[]);return g.createElement(Dh.Provider,{value:n},t)}function Ia(){return Ia=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},Ia.apply(this,arguments)}function zh(e){var t=e.hideTooltipDebounceMs,n=t===void 0?400:t,r=e.children,a=Wx(void 0),i=a.tooltipOpen,s=a.tooltipLeft,o=a.tooltipTop,l=a.tooltipData,u=a.updateTooltip,c=a.hideTooltip,f=g.useRef(null);function h(){f.current&&(f.current.cancel(),f.current=null)}g.useEffect(function(){return h},[]);var p=g.useRef(function(x){var m=x.svgPoint,b=x.index,_=x.key,M=x.datum,y=x.distanceX,w=x.distanceY;h();var T=Se(y)?y:1/0,$=Se(w)?w:1/0,k=Math.sqrt(Math.pow(T,2)+Math.pow($,2));u(function(C){var P,N,L,I=C.tooltipData,X=I!=null&&I.nearestDatum&&Se(I.nearestDatum.distance)?I.nearestDatum.distance:1/0;return{tooltipOpen:!0,tooltipLeft:m==null?void 0:m.x,tooltipTop:m==null?void 0:m.y,tooltipData:{nearestDatum:((P=I==null||(N=I.nearestDatum)==null?void 0:N.key)!=null?P:"")!==_&&X<k?I==null?void 0:I.nearestDatum:{key:_,index:b,datum:M,distance:k},datumByKey:Ia({},I==null?void 0:I.datumByKey,(L={},L[_]={datum:M,index:b,key:_},L))}}})}),d=g.useCallback(function(){f.current=A_(c,n),f.current()},[c,n]),v=g.useMemo(function(){return{tooltipOpen:i,tooltipLeft:s,tooltipTop:o,tooltipData:l,updateTooltip:u,showTooltip:p.current,hideTooltip:d}},[d,l,s,i,o,u]);return g.createElement(Gn.Provider,{value:v},r)}zh.propTypes={hideTooltipDebounceMs:S.number,children:S.node.isRequired};const G_=Ct(og);var Kn={},Wo={};Wo.__esModule=!0;Wo.default=K_;function K_(e,t){t.domain&&("nice"in e||"quantiles"in e||"padding"in e,e.domain(t.domain))}var Bo={};Bo.__esModule=!0;Bo.default=X_;function X_(e,t){t.range&&("padding"in e,e.range(t.range))}var Ho={};Ho.__esModule=!0;Ho.default=Z_;function Z_(e,t){"align"in e&&"align"in t&&typeof t.align<"u"&&e.align(t.align)}var Uo={};Uo.__esModule=!0;Uo.default=Q_;function Q_(e,t){"base"in e&&"base"in t&&typeof t.base<"u"&&e.base(t.base)}var qo={};qo.__esModule=!0;qo.default=J_;function J_(e,t){"clamp"in e&&"clamp"in t&&typeof t.clamp<"u"&&e.clamp(t.clamp)}var Yo={};Yo.__esModule=!0;Yo.default=ew;function ew(e,t){"constant"in e&&"constant"in t&&typeof t.constant<"u"&&e.constant(t.constant)}var Vo={};Vo.__esModule=!0;Vo.default=tw;function tw(e,t){"exponent"in e&&"exponent"in t&&typeof t.exponent<"u"&&e.exponent(t.exponent)}var Go={},Ko={};const jh=Ct(pg);Ko.__esModule=!0;Ko.default=nw;var et=jh,_u={lab:et.interpolateLab,hcl:et.interpolateHcl,"hcl-long":et.interpolateHclLong,hsl:et.interpolateHsl,"hsl-long":et.interpolateHslLong,cubehelix:et.interpolateCubehelix,"cubehelix-long":et.interpolateCubehelixLong,rgb:et.interpolateRgb};function nw(e){switch(e){case"lab":case"hcl":case"hcl-long":case"hsl":case"hsl-long":case"cubehelix":case"cubehelix-long":case"rgb":return _u[e]}var t=e.type,n=e.gamma,r=_u[t];return typeof n>"u"?r:r.gamma(n)}Go.__esModule=!0;Go.default=aw;var rw=iw(Ko);function iw(e){return e&&e.__esModule?e:{default:e}}function aw(e,t){if("interpolate"in t&&"interpolate"in e&&typeof t.interpolate<"u"){var n=(0,rw.default)(t.interpolate);e.interpolate(n)}}var Xo={};const ow=Ct(gg);var Zo={};Zo.__esModule=!0;Zo.default=uw;var sw=new Date(Date.UTC(2020,1,2,3,4,5)),lw="%Y-%m-%d %H:%M";function uw(e){var t=e.tickFormat(1,lw)(sw);return t==="2020-02-02 03:04"}Xo.__esModule=!0;Xo.default=hw;var we=ow,cw=fw(Zo);function fw(e){return e&&e.__esModule?e:{default:e}}var wu={day:we.timeDay,hour:we.timeHour,minute:we.timeMinute,month:we.timeMonth,second:we.timeSecond,week:we.timeWeek,year:we.timeYear},Su={day:we.utcDay,hour:we.utcHour,minute:we.utcMinute,month:we.utcMonth,second:we.utcSecond,week:we.utcWeek,year:we.utcYear};function hw(e,t){if("nice"in t&&typeof t.nice<"u"&&"nice"in e){var n=t.nice;if(typeof n=="boolean")n&&e.nice();else if(typeof n=="number")e.nice(n);else{var r=e,a=(0,cw.default)(r);if(typeof n=="string")r.nice(a?Su[n]:wu[n]);else{var i=n.interval,s=n.step,o=(a?Su[i]:wu[i]).every(s);o!=null&&r.nice(o)}}}}var Qo={};Qo.__esModule=!0;Qo.default=dw;function dw(e,t){"padding"in e&&"padding"in t&&typeof t.padding<"u"&&e.padding(t.padding),"paddingInner"in e&&"paddingInner"in t&&typeof t.paddingInner<"u"&&e.paddingInner(t.paddingInner),"paddingOuter"in e&&"paddingOuter"in t&&typeof t.paddingOuter<"u"&&e.paddingOuter(t.paddingOuter)}var Jo={};Jo.__esModule=!0;Jo.default=pw;function pw(e,t){if(t.reverse){var n=e.range().slice().reverse();"padding"in e,e.range(n)}}var es={};es.__esModule=!0;es.default=mw;var vw=jh;function mw(e,t){"round"in t&&typeof t.round<"u"&&(t.round&&"interpolate"in t&&typeof t.interpolate<"u"?console.warn("[visx/scale/applyRound] ignoring round: scale config contains round and interpolate. only applying interpolate. config:",t):"round"in e?e.round(t.round):"interpolate"in e&&t.round&&e.interpolate(vw.interpolateRound))}var ts={};ts.__esModule=!0;ts.default=gw;function gw(e,t){"unknown"in e&&"unknown"in t&&typeof t.unknown<"u"&&e.unknown(t.unknown)}var ns={};ns.__esModule=!0;ns.default=yw;function yw(e,t){if("zero"in t&&t.zero===!0){var n=e.domain(),r=n[0],a=n[1],i=a<r,s=i?[a,r]:[r,a],o=s[0],l=s[1],u=[Math.min(0,o),Math.max(0,l)];e.domain(i?u.reverse():u)}}Kn.__esModule=!0;Kn.ALL_OPERATORS=void 0;Kn.default=Lw;var bw=Te(Wo),xw=Te(Bo),_w=Te(Ho),ww=Te(Uo),Sw=Te(qo),Tw=Te(Yo),Ow=Te(Vo),kw=Te(Go),Mw=Te(Xo),$w=Te(Qo),Cw=Te(Jo),Ew=Te(es),Pw=Te(ts),Nw=Te(ns);function Te(e){return e&&e.__esModule?e:{default:e}}var Fh=["domain","nice","zero","interpolate","round","range","reverse","align","base","clamp","constant","exponent","padding","unknown"];Kn.ALL_OPERATORS=Fh;var Rw={domain:bw.default,nice:Mw.default,zero:Nw.default,interpolate:kw.default,round:Ew.default,align:_w.default,base:ww.default,clamp:Sw.default,constant:Tw.default,exponent:Ow.default,padding:$w.default,range:xw.default,reverse:Cw.default,unknown:Pw.default};function Lw(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=new Set(t),a=Fh.filter(function(i){return r.has(i)});return function(s,o){return typeof o<"u"&&a.forEach(function(l){Rw[l](s,o)}),s}}var Aw=Iw,Dw=G_,zw=jw(Kn);function jw(e){return e&&e.__esModule?e:{default:e}}var Fw=(0,zw.default)("domain","range","reverse","unknown");function Iw(e){return Fw((0,Dw.scaleOrdinal)(),e)}var tt={red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e8f7ff","#ccedff","#a3daff","#72c3fc","#4dadf7","#329af0","#228ae6","#1c7cd6","#1b6ec2","#1862ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"],gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"]},mn=tt.gray,Bi=mn[7],Ww=[tt.cyan[9],tt.cyan[3],tt.yellow[5],tt.red[4],tt.grape[8],tt.grape[5],tt.pink[9]];function ae(){return ae=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},ae.apply(this,arguments)}var Hi={fontFamily:"-apple-system,BlinkMacSystemFont,Roboto,Helvetica Neue,sans-serif",fontWeight:700,fontSize:12,textAnchor:"middle",pointerEvents:"none",letterSpacing:.4};function Bw(e){var t,n,r,a,i,s,o=ae({},Hi,{fill:Bi,stroke:"none"},e.svgLabelBig),l=ae({},Hi,{fontWeight:200,fontSize:11,fill:Bi,stroke:"none"},e.svgLabelSmall),u=ae({color:(t=(n=(r=(a=e.htmlLabel)==null?void 0:a.color)!=null?r:(i=e.svgLabelBig)==null?void 0:i.fill)!=null?n:(s=e.svgLabelSmall)==null?void 0:s.fill)!=null?t:Bi},Hi,e.htmlLabel);return{backgroundColor:e.backgroundColor,colors:[].concat(e.colors),htmlLabel:ae({},u),svgLabelSmall:ae({},l),svgLabelBig:ae({},o),gridStyles:ae({stroke:e.gridColor,strokeWidth:1},e.gridStyles),axisStyles:{x:{top:{axisLabel:ae({},o,{dy:"-0.25em"}),axisLine:ae({stroke:e.gridColorDark,strokeWidth:2},e.xAxisLineStyles),tickLabel:ae({},l,{dy:"-0.25em"}),tickLength:e.tickLength,tickLine:ae({strokeWidth:1,stroke:e.gridColor},e.xTickLineStyles)},bottom:{axisLabel:ae({},o,{dy:"-0.25em"}),axisLine:ae({stroke:e.gridColorDark,strokeWidth:2},e.xAxisLineStyles),tickLabel:ae({},l,{dy:"0.125em"}),tickLength:e.tickLength,tickLine:ae({strokeWidth:1,stroke:e.gridColor},e.xTickLineStyles)}},y:{left:{axisLabel:ae({},o,{dx:"-1.25em"}),axisLine:ae({stroke:e.gridColor,strokeWidth:1},e.yAxisLineStyles),tickLabel:ae({},l,{textAnchor:"end",dx:"-0.25em",dy:"0.25em"}),tickLength:e.tickLength,tickLine:ae({strokeWidth:1,stroke:e.gridColor},e.yTickLineStyles)},right:{axisLabel:ae({},o,{dx:"1.25em"}),axisLine:ae({stroke:e.gridColor,strokeWidth:1},e.yAxisLineStyles),tickLabel:ae({},l,{textAnchor:"start",dx:"0.25em",dy:"0.25em"}),tickLength:e.tickLength,tickLine:ae({strokeWidth:1,stroke:e.gridColor},e.yTickLineStyles)}}}}}const Hw=Bw({backgroundColor:"#fff",colors:Ww,tickLength:4,svgLabelSmall:{fill:mn[7]},svgLabelBig:{fill:mn[9]},gridColor:mn[5],gridColorDark:mn[9]});var Uw=g.createContext(Hw),qw=function(){function e(){this.registry={},this.registryKeys=[]}var t=e.prototype;return t.registerData=function(r){var a=this,i=Array.isArray(r)?r:[r];i.forEach(function(s){s.key in a.registry&&a.registry[s.key]!=null&&console.debug("Overriding data registry key",s.key),a.registry[s.key]=s,a.registryKeys=Object.keys(a.registry)})},t.unregisterData=function(r){var a=this,i=Array.isArray(r)?r:[r];i.forEach(function(s){delete a.registry[s],a.registryKeys=Object.keys(a.registry)})},t.entries=function(){return Object.values(this.registry)},t.get=function(r){return this.registry[r]},t.keys=function(){return this.registryKeys},e}();function Yw(){var e=g.useState(Math.random()),t=e[1],n=g.useMemo(function(){return new qw},[]);return g.useMemo(function(){return{registerData:function(){n.registerData.apply(n,arguments),t(Math.random())},unregisterData:function(){n.unregisterData.apply(n,arguments),t(Math.random())},entries:function(){return n.entries()},get:function(a){return n.get(a)},keys:function(){return n.keys()}}},[n])}var Ui={width:0,height:0,margin:{top:0,right:0,bottom:0,left:0}};function Vw(e){var t=g.useState({width:(e==null?void 0:e.width)==null?Ui.width:e.width,height:(e==null?void 0:e.height)==null?Ui.height:e.height,margin:(e==null?void 0:e.margin)==null?Ui.margin:e.margin}),n=t[0],r=t[1],a=g.useCallback(function(i){(i.width!==n.width||i.height!==n.height||i.margin.left!==n.margin.left||i.margin.right!==n.margin.right||i.margin.top!==n.margin.top||i.margin.bottom!==n.margin.bottom)&&r(i)},[n.width,n.height,n.margin.left,n.margin.right,n.margin.bottom,n.margin.top]);return[n,a]}function Wa(e){return(e==null?void 0:e.type)==="band"||(e==null?void 0:e.type)==="ordinal"||(e==null?void 0:e.type)==="point"}function jt(){return jt=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},jt.apply(this,arguments)}function Gw(e){var t=e.dataRegistry,n=e.xRange,r=e.xScaleConfig,a=e.yRange,i=e.yScaleConfig,s=t.keys(),o=n[0],l=n[1],u=a[0],c=a[1],f=g.useMemo(function(){var p=s.map(function(m){return t.get(m)}),d=p.reduce(function(m,b){return b?m.concat(b.data.map(function(_){return b.xAccessor(_)})):m},[]);if(d.length!==0){var v=Wa(r)?d:Ys(d),x=ga(r)?vn(jt({range:[o,l],domain:v,zero:!0},r)):vn(jt({range:[o,l],domain:v},r));return p.forEach(function(m){m!=null&&m.xScale&&(x=m.xScale(x))}),x}},[t,r,s,o,l]),h=g.useMemo(function(){var p=s.map(function(m){return t.get(m)}),d=p.reduce(function(m,b){return b?m.concat(b.data.map(function(_){return b.yAccessor(_)})):m},[]);if(d.length!==0){var v=Wa(i)?d:Ys(d),x=ga(i)?vn(jt({range:[u,c],domain:v,zero:!0},i)):vn(jt({range:[u,c],domain:v},i));return p.forEach(function(m){m!=null&&m.yScale&&(x=m.yScale(x))}),x}},[t,i,s,u,c]);return{xScale:f,yScale:h}}function Ih(e){var t=e.initialDimensions,n=e.theme,r=e.xScale,a=e.yScale,i=e.children,s=e.horizontal,o=s===void 0?"auto":s,l=e.resizeObserverPolyfill,u=g.useContext(Uw),c=n||u,f=Vw(t),h=f[0],p=h.width,d=h.height,v=h.margin,x=f[1],m=Math.max(0,p-v.left-v.right),b=Math.max(0,d-v.top-v.bottom),_=Yw(),M=Gw({dataRegistry:_,xScaleConfig:r,yScaleConfig:a,xRange:[v.left,Math.max(0,p-v.right)],yRange:[Math.max(0,d-v.bottom),v.top]}),y=M.xScale,w=M.yScale,T=_.keys(),$=g.useMemo(function(){return Aw({domain:T,range:c.colors})},[T,c.colors]),k=o==="auto"?Wa(a)||a.type==="time"||a.type==="utc":o,C=g.useMemo(function(){return{dataRegistry:_,registerData:_.registerData,unregisterData:_.unregisterData,xScale:y,yScale:w,colorScale:$,theme:c,width:p,height:d,margin:v,innerWidth:m,innerHeight:b,setDimensions:x,horizontal:k,resizeObserverPolyfill:l}},[$,_,d,k,b,m,v,x,c,p,y,w,l]);return g.createElement(Ye.Provider,{value:C},i)}Ih.propTypes={children:S.node.isRequired,horizontal:S.oneOfType([S.bool,S.oneOf(["auto"])])};function Wh(e){var t=e.source,n=e.onPointerOut,r=n===void 0?!0:n,a=e.onPointerMove,i=a===void 0?!0:a,s=e.onPointerUp,o=s===void 0?!0:s,l=e.onPointerDown,u=l===void 0?!0:l,c=e.onFocus,f=c===void 0?!1:c,h=e.onBlur,p=h===void 0?!1:h,d=nt(),v=g.useCallback(function(y){return d==null?void 0:d("pointermove",y,t)},[d,t]),x=g.useCallback(function(y){return d==null?void 0:d("pointerout",y,t)},[d,t]),m=g.useCallback(function(y){return d==null?void 0:d("pointerup",y,t)},[d,t]),b=g.useCallback(function(y){return d==null?void 0:d("pointerdown",y,t)},[d,t]),_=g.useCallback(function(y){return d==null?void 0:d("focus",y,t)},[d,t]),M=g.useCallback(function(y){return d==null?void 0:d("blur",y,t)},[d,t]);return{onPointerMove:i?v:void 0,onFocus:f?_:void 0,onBlur:p?M:void 0,onPointerOut:r?x:void 0,onPointerUp:o?m:void 0,onPointerDown:u?b:void 0}}var Kw="GLYPHSERIES_EVENT_SOURCE",Xw="LINESERIES_EVENT_SOURCE",ui="XYCHART_EVENT_SOURCE";function Bh(e){return!!e&&("clientX"in e||"changedTouches"in e)}function Zw(e){return!!e&&!Bh(e)}function Hh(e){var t=e.scale,n=e.accessor,r=e.scaledValue,a=e.data,i=t,s,o;if("invert"in i&&typeof i.invert=="function"){var l=Br(n).left,u=Number(i.invert(r)),c=l(a,u),f=a[c-1],h=a[c];s=!f||Math.abs(u-n(f))>Math.abs(u-n(h))?h:f,o=s===f?c-1:c}else if("step"in i&&typeof i.step<"u"){var p=t.domain(),d=t.range().map(Number),v=[].concat(d).sort(function(w,T){return w-T}),x=pc(v[0],v[1],i.step()),m=Op(x,r),b=d[0]<d[1]?p:p.reverse(),_=b[m-1],M=a.findIndex(function(w){return String(n(w))===String(_)});s=a[M],o=M}else return console.warn("[visx/xychart/findNearestDatum] encountered incompatible scale type, bailing"),null;if(s==null||o==null)return null;var y=Math.abs(Number(i(n(s)))-r);return{datum:s,index:o,distance:y}}function Qw(e){var t=e.xScale,n=e.xAccessor,r=e.yScale,a=e.yAccessor,i=e.point,s=e.data;if(!i)return null;var o=Hh({scale:t,accessor:n,scaledValue:i.x,data:s});return o?{datum:o.datum,index:o.index,distanceX:o.distance,distanceY:Math.abs(Number(r(a(o.datum)))-i.y)}:null}function Jw(e){var t=e.yScale,n=e.yAccessor,r=e.xScale,a=e.xAccessor,i=e.point,s=e.data;if(!i)return null;var o=Hh({scale:t,accessor:n,scaledValue:i.y,data:s});return o?{datum:o.datum,index:o.index,distanceY:o.distance,distanceX:Math.abs(Number(r(a(o.datum)))-i.x)}:null}function Ba(){return Ba=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},Ba.apply(this,arguments)}var Ha="__POINTER_EVENTS_ALL",hr="__POINTER_EVENTS_NEAREST";function Uh(e){var t=e.dataKey,n=e.findNearestDatum,r=e.onBlur,a=e.onFocus,i=e.onPointerMove,s=e.onPointerOut,o=e.onPointerUp,l=e.onPointerDown,u=e.allowedSources,c=g.useContext(Ye),f=c.width,h=c.height,p=c.horizontal,d=c.dataRegistry,v=c.xScale,x=c.yScale,m=n||(p?Jw:Qw),b=g.useCallback(function(k){var C=k||{},P=C.svgPoint,N=C.event,L={},I=null,X=1/0;if(k&&N&&P&&f&&h&&v&&x){var U,Z=t===hr||t===Ha,J=Z?(U=d==null?void 0:d.keys())!=null?U:[]:Array.isArray(t)?t:[t];J.forEach(function(E){var A=d==null?void 0:d.get(E);if(A){var B=m({dataKey:E,data:A.data,height:h,point:P,width:f,xAccessor:A.xAccessor,xScale:v,yAccessor:A.yAccessor,yScale:x});if(B&&(L[E]=Ba({key:E,svgPoint:P,event:N},B),t===hr)){var W,j,F=Math.sqrt(((W=B.distanceX)!=null?W:Math.pow(1/0,2))+((j=B.distanceY)!=null?j:Math.pow(1/0,2)));I=F<X?L[E]:I,X=Math.min(X,F)}}});var K=t===hr?[I]:t===Ha||Array.isArray(t)?Object.values(L):[L[t]];return K.filter(function(E){return E})}return[]},[t,d,v,x,f,h,m]),_=g.useCallback(function(k){i&&b(k).forEach(function(C){return i(C)})},[b,i]),M=g.useCallback(function(k){o&&b(k).forEach(function(C){return o(C)})},[b,o]),y=g.useCallback(function(k){l&&b(k).forEach(function(C){return l(C)})},[b,l]),w=g.useCallback(function(k){a&&b(k).forEach(function(C){return a(C)})},[b,a]),T=g.useCallback(function(k){var C=k==null?void 0:k.event;C&&Bh(C)&&s&&s(C)},[s]),$=g.useCallback(function(k){var C=k==null?void 0:k.event;C&&Zw(C)&&r&&r(C)},[r]);nt("pointermove",i?_:void 0,u),nt("pointerout",s?T:void 0,u),nt("pointerup",o?M:void 0,u),nt("pointerdown",l?y:void 0,u),nt("focus",a?w:void 0,u),nt("blur",r?$:void 0,u)}function Ar(){return Ar=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},Ar.apply(this,arguments)}var eS={top:50,right:50,bottom:50,left:50},tS=[ui];function Ft(e){var t=e.accessibilityLabel,n=t===void 0?"XYChart":t,r=e.captureEvents,a=r===void 0?!0:r,i=e.children,s=e.height,o=e.horizontal,l=e.margin,u=l===void 0?eS:l,c=e.onPointerMove,f=e.onPointerOut,h=e.onPointerUp,p=e.onPointerDown,d=e.pointerEventsDataKey,v=d===void 0?"nearest":d,x=e.theme,m=e.width,b=e.xScale,_=e.yScale,M=e.resizeObserverPolyfill,y=g.useContext(Ye),w=y.setDimensions,T=y.resizeObserverPolyfill,$=g.useContext(Gn),k=nt();g.useEffect(function(){w&&m!=null&&s!=null&&m>0&&s>0&&w({width:m,height:s,margin:u})},[w,m,s,u]);var C=Wh({source:ui});return Uh({dataKey:v==="nearest"?hr:Ha,onPointerMove:c,onPointerOut:f,onPointerUp:h,onPointerDown:p,allowedSources:tS}),w?m==null||s==null?g.createElement(I_,{resizeObserverPolyfill:T},function(P){return g.createElement(Ft,Ar({},e,{width:e.width==null?P.width:e.width,height:e.height==null?P.height:e.height}))}):$==null?g.createElement(zh,null,g.createElement(Ft,e)):k==null?g.createElement(V_,null,g.createElement(Ft,e)):m<=0||s<=0?(process.env.NODE_ENV==="development"&&console.info("XYChart has a zero width or height, bailing",{width:m,height:s}),null):g.createElement("svg",{width:m,height:s,"aria-label":n},i,a&&g.createElement("rect",Ar({x:u.left,y:u.top,width:m-u.left-u.right,height:s-u.top-u.bottom,fill:"transparent"},C))):!b||!_?(console.warn("[@visx/xychart] XYChart: When no DataProvider is available in context, you must pass xScale & yScale config to XYChart."),null):g.createElement(Ih,{xScale:b,yScale:_,theme:x,initialDimensions:{width:m,height:s,margin:u},horizontal:o,resizeObserverPolyfill:M},g.createElement(Ft,e))}Ft.propTypes={accessibilityLabel:S.string,captureEvents:S.bool,width:S.number,height:S.number,children:S.node.isRequired,horizontal:S.oneOfType([S.bool,S.oneOf(["auto"])]),onPointerMove:S.func,onPointerOut:S.func,onPointerUp:S.func,onPointerDown:S.func,pointerEventsDataKey:S.oneOf(["all","nearest"])};var nS=sS,qi=qh(g),rS=qh(Ln),iS=ht,aS=["children","data","x","y","fill","className","curve","innerRef","defined"];function qh(e){return e&&e.__esModule?e:{default:e}}function Ua(){return Ua=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},Ua.apply(this,arguments)}function oS(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function sS(e){var t=e.children,n=e.data,r=n===void 0?[]:n,a=e.x,i=e.y,s=e.fill,o=s===void 0?"transparent":s,l=e.className,u=e.curve,c=e.innerRef,f=e.defined,h=f===void 0?function(){return!0}:f,p=oS(e,aS),d=(0,iS.line)({x:a,y:i,defined:h,curve:u});return t?qi.default.createElement(qi.default.Fragment,null,t({path:d})):qi.default.createElement("path",Ua({ref:c,className:(0,rS.default)("visx-linepath",l),d:d(r)||"",fill:o,strokeLinecap:"round"},p))}function qa(){return qa=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},qa.apply(this,arguments)}function Yh(e){function t(n){var r=n.dataKey,a=n.data,i=n.xAccessor,s=n.yAccessor,o=g.useContext(Ye),l=o.xScale,u=o.yScale,c=o.dataRegistry;g.useEffect(function(){return c&&c.registerData({key:r,data:a,xAccessor:i,yAccessor:s}),function(){return c==null?void 0:c.unregisterData(r)}},[c,r,a,i,s]);var f=c==null?void 0:c.get(r);if(!l||!u||!f)return null;var h=e;return g.createElement(h,qa({},n,{xScale:l,yScale:u,data:f.data,xAccessor:f.xAccessor,yAccessor:f.yAccessor}))}return t}function Dr(e,t,n){return n===void 0&&(n="center"),function(r){var a=e(t(r));if(Se(a)){var i=(n==="start"?0:Pa(e))/(n==="center"?2:1);return a+i}return NaN}}function Vh(e){var t,n=e.dataKey,r=e.enableEvents,a=e.findNearestDatum,i=e.onBlur,s=e.onFocus,o=e.onPointerMove,l=e.onPointerOut,u=e.onPointerUp,c=e.onPointerDown,f=e.source,h=e.allowedSources,p=(t=g.useContext(Gn))!=null?t:{},d=p.showTooltip,v=p.hideTooltip,x=g.useCallback(function(y){d(y),o&&o(y)},[d,o]),m=g.useCallback(function(y){d(y),s&&s(y)},[d,s]),b=g.useCallback(function(y){v(),y&&l&&l(y)},[v,l]),_=g.useCallback(function(y){v(),y&&i&&i(y)},[v,i]),M=g.useCallback(function(y){d(y),c&&c(y)},[d,c]);return Uh({dataKey:n,findNearestDatum:a,onBlur:r?_:void 0,onFocus:r?m:void 0,onPointerMove:r?x:void 0,onPointerOut:r?b:void 0,onPointerUp:r?u:void 0,onPointerDown:r?M:void 0,allowedSources:h}),Wh({source:f,onBlur:!!i&&r,onFocus:!!s&&r,onPointerMove:!!o&&r,onPointerOut:!!l&&r,onPointerUp:!!u&&r,onPointerDown:!!c&&r})}function Ya(){return Ya=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},Ya.apply(this,arguments)}function rs(e){var t,n,r,a=e.colorAccessor,i=e.data,s=e.dataKey,o=e.onBlur,l=e.onFocus,u=e.onPointerMove,c=e.onPointerOut,f=e.onPointerUp,h=e.onPointerDown,p=e.enableEvents,d=p===void 0?!0:p,v=e.renderGlyphs,x=e.size,m=x===void 0?8:x,b=e.xAccessor,_=e.xScale,M=e.yAccessor,y=e.yScale,w=g.useContext(Ye),T=w.colorScale,$=w.theme,k=w.horizontal,C=g.useMemo(function(){return Dr(_,b)},[_,b]),P=g.useMemo(function(){return Dr(y,M)},[y,M]),N=(t=(n=T==null?void 0:T(s))!=null?n:$==null||(r=$.colors)==null?void 0:r[0])!=null?t:"#222",L=Kw+"-"+s,I=Vh({dataKey:s,enableEvents:d,onBlur:o,onFocus:l,onPointerMove:u,onPointerOut:c,onPointerUp:f,onPointerDown:h,source:L,allowedSources:[ui,L]}),X=g.useMemo(function(){return i.map(function(U,Z){var J,K=C(U);if(!Se(K))return null;var E=P(U);return Se(E)?{key:""+Z,x:K,y:E,color:(J=a==null?void 0:a(U,Z))!=null?J:N,size:typeof m=="function"?m(U):m,datum:U}:null}).filter(function(U){return U})},[N,a,i,C,P,m]);return g.createElement(g.Fragment,null,v(Ya({glyphs:X,xScale:_,yScale:y,horizontal:k},I)))}rs.propTypes={colorAccessor:S.func,size:S.oneOfType([S.number,S.func]),renderGlyphs:S.func.isRequired};const lS=Yh(rs);function Gh(e){var t=e.key,n=e.color,r=e.x,a=e.y,i=e.size,s=e.onBlur,o=e.onFocus,l=e.onPointerMove,u=e.onPointerOut,c=e.onPointerUp;return g.createElement("circle",{className:"visx-circle-glyph",key:t,tabIndex:s||o?0:void 0,fill:n,r:i/2,cx:r,cy:a,onBlur:s,onFocus:o,onPointerMove:l,onPointerOut:u,onPointerUp:c})}var uS=["renderGlyph"];function zr(){return zr=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},zr.apply(this,arguments)}function cS(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function fS(e){var t=e.renderGlyph,n=t===void 0?Gh:t,r=cS(e,uS),a=g.useCallback(function(i){var s=i.glyphs,o=i.onPointerMove,l=i.onPointerOut,u=i.onPointerUp,c=i.onFocus,f=i.onBlur;return s.map(function(h){return g.createElement(g.Fragment,{key:h.key},n(zr({},h,{onPointerMove:o,onPointerOut:l,onPointerUp:u,onFocus:c,onBlur:f})))})},[n]);return g.createElement(lS,zr({},r,{renderGlyphs:a}))}var hS=["colorAccessor","curve","data","dataKey","onBlur","onFocus","onPointerMove","onPointerOut","onPointerUp","onPointerDown","enableEvents","xAccessor","xScale","yAccessor","yScale","PathComponent"];function Tn(){return Tn=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},Tn.apply(this,arguments)}function dS(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function Kh(e){var t,n,r,a=e.colorAccessor,i=e.curve,s=e.data,o=e.dataKey,l=e.onBlur,u=e.onFocus,c=e.onPointerMove,f=e.onPointerOut,h=e.onPointerUp,p=e.onPointerDown,d=e.enableEvents,v=d===void 0?!0:d,x=e.xAccessor,m=e.xScale,b=e.yAccessor,_=e.yScale,M=e.PathComponent,y=M===void 0?"path":M,w=dS(e,hS),T=g.useContext(Ye),$=T.colorScale,k=T.theme,C=g.useMemo(function(){return Dr(m,x)},[m,x]),P=g.useMemo(function(){return Dr(_,b)},[_,b]),N=g.useCallback(function(J){return Se(m(x(J)))&&Se(_(b(J)))},[m,x,_,b]),L=(t=(n=$==null?void 0:$(o))!=null?n:k==null||(r=k.colors)==null?void 0:r[0])!=null?t:"#222",I=Xw+"-"+o,X=Vh({dataKey:o,enableEvents:v,onBlur:l,onFocus:u,onPointerMove:c,onPointerOut:f,onPointerUp:h,onPointerDown:p,source:I,allowedSources:[ui,I]}),U=!!(u||l),Z=g.useCallback(function(J){var K=J.glyphs;return U?K.map(function(E){return g.createElement(g.Fragment,{key:E.key},Gh(Tn({},E,{color:"transparent",onFocus:X.onFocus,onBlur:X.onBlur})))}):null},[U,X.onFocus,X.onBlur]);return g.createElement(g.Fragment,null,g.createElement(nS,Tn({x:C,y:P,defined:N,curve:i},w),function(J){var K,E=J.path;return g.createElement(y,Tn({stroke:(K=a==null?void 0:a(o))!=null?K:L,strokeWidth:2,fill:"transparent",strokeLinecap:"round"},w,{d:E(s)||""},X))}),U&&g.createElement(rs,{dataKey:o,data:s,xAccessor:x,yAccessor:b,xScale:m,yScale:_,renderGlyphs:Z}))}Kh.propTypes={colorAccessor:S.func};const pS=Yh(Kh);function vS(e){return g.createElement(pS,e)}const mS={lines:"LinesChartProps[]",barTooltip:"(props: LineTooltipProps) => JSX.Element",grid:"GridProps",labels:"Array<string>",xAxis:"CommonProps<AxisScale>",xScale:"ScaleConfig<AxisScaleOutput, any, any>",yAxis:"CommonProps<AxisScale>",yScale:"ScaleConfig<AxisScaleOutput, any, any>"};function is(e){const t=On.useElementId(),{lines:n=[],xScale:r,yScale:a,xAxis:i,yAxis:s,grid:o,labels:l,barTooltip:u}=e,c={xAccessor:p=>p.x,yAccessor:p=>p.y},f=p=>l[p],h=Qr({domain:n.map(p=>p.name),range:n.map(p=>fr.colors[p.color])});return D.createElement(D.Fragment,null,D.createElement(bh,{className:"fs-12 lh-18 gray600",scale:h,direction:"row",shape:"rect",shapeWidth:30,shapeHeight:4,shapeMargin:"0 5px 0 0",shapeStyle:()=>({borderRadius:"2px"}),labelMargin:"0",itemMargin:"0 10px 0 10px",style:{display:"flex",justifyContent:"center",fontSize:"16px"}}),D.createElement(Ft,{height:300,xScale:r,yScale:a},D.createElement(fu,{strokeWidth:"1",orientation:"bottom",tickFormat:f,...i}),D.createElement(fu,{orientation:"left",...s}),D.createElement(jx,{...o}),n.map((p,d)=>D.createElement(D.Fragment,{key:`${t.current}${d}`},D.createElement(fS,{dataKey:p.name,colorAccessor:()=>fr.colors[p.color],data:[p.data],...c}),D.createElement(vS,{dataKey:p.name,stroke:fr.colors[p.color],strokeDasharray:p.strokeDashArray?"4,3":"",data:p.data,...c}))),D.createElement(Rh,{snapTooltipToDatumX:!0,snapTooltipToDatumY:!0,className:"bg-dark white",renderTooltip:({tooltipData:p})=>{var d,v,x;return D.createElement(D.Fragment,null,u&&D.createElement(u,{yAxisName:(d=p==null?void 0:p.nearestDatum)==null?void 0:d.key,xLineName:l[c.xAccessor((v=p==null?void 0:p.nearestDatum)==null?void 0:v.datum)],value:c.yAccessor((x=p==null?void 0:p.nearestDatum)==null?void 0:x.datum)}))}})))}Object.assign(is,{props:mS,displayName:"SpsLineChart"});const Xh={basic:{label:"Basic",description:()=>D.createElement(D.Fragment,null,D.createElement("p",null,"Line chart example."),D.createElement("p",null,D.createElement("code",null,"<grid>")," allows override grid property. Optional. Type of ",D.createElement("code",null,"GridProps")," which comes from",D.createElement("code",null,"@visx/xychart/lib/components/grid/Grid")," package, which is a peer dependency of our React components."),D.createElement("p",null,D.createElement("code",null,"<xAxis>")," and ",D.createElement("code",null,"<yAxis>")," allow override X/Y axes property. Optional. Type of",D.createElement("code",null,"CommonProps<AxisScale>")," which comes from",D.createElement("code",null,"@visx/axis/lib/types")," package, which is a peer dependency of our React components."),D.createElement("p",null,D.createElement("code",null,"<xScale>")," and ",D.createElement("code",null,"<yScale>")," allow override scale configuration for X/Y axes. Type of",D.createElement("code",null,"ScaleConfig<AxisScaleOutput, any, any>")," comes from",D.createElement("code",null,"@visx/scale")," and ",D.createElement("code",null,"@visx/axis")," packages, which is a peer dependency of our React components.")),examples:{basic:{react:rt.code`
|
168
|
-
import { SpsLineChart } from "@spscommerce/ds-react-charts";
|
169
|
-
function DemoComponent() {
|
170
|
-
const lines = [
|
171
|
-
{
|
172
|
-
data: [
|
173
|
-
{ x: 0, y: 30 },
|
174
|
-
{ x: 1, y: 45 },
|
175
|
-
{ x: 2, y: 85 },
|
176
|
-
{ x: 3, y: 20 },
|
177
|
-
{ x: 4, y: 10 },
|
178
|
-
{ x: 5, y: 90 },
|
179
|
-
{ x: 6, y: 30 },
|
180
|
-
{ x: 7, y: 100 },
|
181
|
-
{ x: 8, y: 70 },
|
182
|
-
{ x: 9, y: 50 },
|
183
|
-
],
|
184
|
-
color: LineChartColors.ORANGE,
|
185
|
-
name: "Line 1",
|
186
|
-
strokeDashArray: true,
|
187
|
-
},
|
188
|
-
{
|
189
|
-
data: [
|
190
|
-
{ x: 0, y: 10 },
|
191
|
-
{ x: 1, y: 30 },
|
192
|
-
{ x: 2, y: 70 },
|
193
|
-
{ x: 3, y: 70 },
|
194
|
-
{ x: 4, y: 40 },
|
195
|
-
{ x: 5, y: 90 },
|
196
|
-
{ x: 6, y: 80 },
|
197
|
-
{ x: 7, y: 80 },
|
198
|
-
{ x: 8, y: 100 },
|
199
|
-
{ x: 9, y: 30 },
|
200
|
-
],
|
201
|
-
color: LineChartColors.GREEN,
|
202
|
-
name: "Line 2",
|
203
|
-
},
|
204
|
-
{
|
205
|
-
data: [
|
206
|
-
{ x: 0, y: 15 },
|
207
|
-
{ x: 1, y: 40 },
|
208
|
-
{ x: 2, y: 80 },
|
209
|
-
{ x: 3, y: 40 },
|
210
|
-
{ x: 4, y: 100 },
|
211
|
-
{ x: 5, y: 40 },
|
212
|
-
{ x: 6, y: 50 },
|
213
|
-
{ x: 7, y: 10 },
|
214
|
-
{ x: 8, y: 0 },
|
215
|
-
{ x: 9, y: 20 },
|
216
|
-
],
|
217
|
-
color: LineChartColors.GREEN,
|
218
|
-
name: "Line 3",
|
219
|
-
},
|
220
|
-
];
|
221
|
-
const lineChartLabels = [
|
222
|
-
'PRE', 'W1', 'W2', 'W3', 'W4', 'W5', 'W6', 'W7', 'W8', 'W9'
|
223
|
-
];
|
224
|
-
const BarTooltip = ({ yAxisName, xLineName, value }) => (
|
225
|
-
<div className="font-weight-bold">{xLineName} <br /> {yAxisName}: {value}</div>
|
226
|
-
);
|
227
|
-
|
228
|
-
return (
|
229
|
-
<SpsLineChart
|
230
|
-
barTooltip={ BarTooltip }
|
231
|
-
grid={{ rows: false }}
|
232
|
-
labels={ lineChartLabels }
|
233
|
-
lines={lines}
|
234
|
-
xScale={{ type: 'linear' }}
|
235
|
-
yScale={{ type: 'linear' }}
|
236
|
-
/>
|
237
|
-
)
|
238
|
-
}
|
239
|
-
`}}}},gS={"Bar Chart":{description:()=>D.createElement("p",null,"Bar Charts are a data visualization used to compare sets of data to more easily analyze questions or identify gaps oriented toward user goals. ",D.createElement("br",null),"Each chart should focus on answering a single question about the dataset."),components:[Lo,Ao],examples:ch},"Line Chart":{components:[is],examples:Xh},"Stacked Horizontal Bar Chart":{components:[zo],examples:xh}};exports.MANIFEST=gS;exports.SpsBarChart=Lo;exports.SpsBarChartExamples=ch;exports.SpsHorizontalBarChart=Ao;exports.SpsLineChart=is;exports.SpsLineChartExamples=Xh;exports.SpsStackedHorizontalBarChart=zo;exports.SpsStackedHorizontalBarChartExamples=xh;
|