Files
monisuo/monisuo-admin/dist/assets/dashboard-CnaOJdkw.js
2026-03-22 23:32:23 +08:00

316 lines
210 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import{$ as e,At as t,B as n,Ct as r,D as i,Dt as a,H as o,I as s,L as c,Mt as l,Ot as u,P as d,Q as f,S as p,T as m,Tt as h,V as g,W as _,_ as v,b as y,bt as b,d as x,ft as S,g as C,jt as w,k as T,lt as E,mt as D,nt as O,q as ee,r as te,v as ne,vt as re,w as k,wt as ie,x as A,y as ae,z as j}from"./vue.runtime.esm-bundler-DQjudA8G.js";import{a as oe,i as se,n as ce,r as le,t as ue}from"./SelectContent-Bb2H68dj.js";import{t as de}from"./utils-BB02OBq2.js";import{n as fe}from"./lib-Cz3jviUu.js";import{b as pe}from"./dist-t_U6YImb.js";import{t as me}from"./createContext-BefgL9WT.js";import"./Teleport-CLYBkdRb.js";import{t as he}from"./Primitive-jhoGcsVx.js";import{t as ge}from"./useId-C1k6kJxi.js";import{n as _e,t as ve}from"./AvatarImage-BMo9jZco.js";import{t as ye}from"./AvatarFallback-DRYGIWWm.js";import{i as be,n as xe,r as Se,t as Ce}from"./TabsTrigger-CSBrc3A_.js";import{t as we}from"./Button-2mdP_ygs.js";import{r as Te}from"./global-layout-BuXj6D-T.js";import{t as Ee}from"./Card-Cv6HQPiQ.js";import{t as De}from"./CardContent-cvoMlP3H.js";import{n as Oe,r as ke,t as Ae}from"./CardHeader-JyQWjCMQ.js";var je=!1;function Me(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function Ne(e){var t=document.createElement(`style`);return t.setAttribute(`data-emotion`,e.key),e.nonce!==void 0&&t.setAttribute(`nonce`,e.nonce),t.appendChild(document.createTextNode(``)),t.setAttribute(`data-s`,``),t}var Pe=function(){function e(e){var t=this;this._insertTag=function(e){var n=t.tags.length===0?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling;t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=e.speedy===void 0?!je:e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(Ne(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=Me(t);try{n.insertRule(e,n.cssRules.length)}catch{}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){return e.parentNode?.removeChild(e)}),this.tags=[],this.ctr=0},e}(),M=`-ms-`,Fe=`-moz-`,N=`-webkit-`,Ie=`comm`,Le=`rule`,Re=`decl`,ze=`@import`,Be=`@keyframes`,Ve=`@layer`,He=Math.abs,Ue=String.fromCharCode,We=Object.assign;function Ge(e,t){return F(e,0)^45?(((t<<2^F(e,0))<<2^F(e,1))<<2^F(e,2))<<2^F(e,3):0}function Ke(e){return e.trim()}function qe(e,t){return(e=t.exec(e))?e[0]:e}function P(e,t,n){return e.replace(t,n)}function Je(e,t){return e.indexOf(t)}function F(e,t){return e.charCodeAt(t)|0}function Ye(e,t,n){return e.slice(t,n)}function Xe(e){return e.length}function Ze(e){return e.length}function Qe(e,t){return t.push(e),e}function $e(e,t){return e.map(t).join(``)}var et=1,tt=1,nt=0,I=0,L=0,rt=``;function it(e,t,n,r,i,a,o){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:et,column:tt,length:o,return:``}}function at(e,t){return We(it(``,null,null,``,null,null,0),e,{length:-e.length},t)}function ot(){return L}function st(){return L=I>0?F(rt,--I):0,tt--,L===10&&(tt=1,et--),L}function R(){return L=I<nt?F(rt,I++):0,tt++,L===10&&(tt=1,et++),L}function ct(){return F(rt,I)}function lt(){return I}function ut(e,t){return Ye(rt,e,t)}function dt(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function ft(e){return et=tt=1,nt=Xe(rt=e),I=0,[]}function pt(e){return rt=``,e}function mt(e){return Ke(ut(I-1,_t(e===91?e+2:e===40?e+1:e)))}function ht(e){for(;(L=ct())&&L<33;)R();return dt(e)>2||dt(L)>3?``:` `}function gt(e,t){for(;--t&&R()&&!(L<48||L>102||L>57&&L<65||L>70&&L<97););return ut(e,lt()+(t<6&&ct()==32&&R()==32))}function _t(e){for(;R();)switch(L){case e:return I;case 34:case 39:e!==34&&e!==39&&_t(L);break;case 40:e===41&&_t(e);break;case 92:R();break}return I}function vt(e,t){for(;R()&&e+L!==57&&!(e+L===84&&ct()===47););return`/*`+ut(t,I-1)+`*`+Ue(e===47?e:R())}function yt(e){for(;!dt(ct());)R();return ut(e,I)}function bt(e){return pt(xt(``,null,null,null,[``],e=ft(e),0,[0],e))}function xt(e,t,n,r,i,a,o,s,c){for(var l=0,u=0,d=o,f=0,p=0,m=0,h=1,g=1,_=1,v=0,y=``,b=i,x=a,S=r,C=y;g;)switch(m=v,v=R()){case 40:if(m!=108&&F(C,d-1)==58){Je(C+=P(mt(v),`&`,`&\f`),`&\f`)!=-1&&(_=-1);break}case 34:case 39:case 91:C+=mt(v);break;case 9:case 10:case 13:case 32:C+=ht(m);break;case 92:C+=gt(lt()-1,7);continue;case 47:switch(ct()){case 42:case 47:Qe(Ct(vt(R(),lt()),t,n),c);break;default:C+=`/`}break;case 123*h:s[l++]=Xe(C)*_;case 125*h:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:_==-1&&(C=P(C,/\f/g,``)),p>0&&Xe(C)-d&&Qe(p>32?wt(C+`;`,r,n,d-1):wt(P(C,` `,``)+`;`,r,n,d-2),c);break;case 59:C+=`;`;default:if(Qe(S=St(C,t,n,l,u,i,s,y,b=[],x=[],d),a),v===123)if(u===0)xt(C,t,S,S,b,a,d,s,x);else switch(f===99&&F(C,3)===110?100:f){case 100:case 108:case 109:case 115:xt(e,S,S,r&&Qe(St(e,S,S,0,0,i,s,y,i,b=[],d),x),i,x,d,s,r?b:x);break;default:xt(C,S,S,S,[``],x,0,s,x)}}l=u=p=0,h=_=1,y=C=``,d=o;break;case 58:d=1+Xe(C),p=m;default:if(h<1){if(v==123)--h;else if(v==125&&h++==0&&st()==125)continue}switch(C+=Ue(v),v*h){case 38:_=u>0?1:(C+=`\f`,-1);break;case 44:s[l++]=(Xe(C)-1)*_,_=1;break;case 64:ct()===45&&(C+=mt(R())),f=ct(),u=d=Xe(y=C+=yt(lt())),v++;break;case 45:m===45&&Xe(C)==2&&(h=0)}}return a}function St(e,t,n,r,i,a,o,s,c,l,u){for(var d=i-1,f=i===0?a:[``],p=Ze(f),m=0,h=0,g=0;m<r;++m)for(var _=0,v=Ye(e,d+1,d=He(h=o[m])),y=e;_<p;++_)(y=Ke(h>0?f[_]+` `+v:P(v,/&\f/g,f[_])))&&(c[g++]=y);return it(e,t,n,i===0?Le:s,c,l,u)}function Ct(e,t,n){return it(e,t,n,Ie,Ue(ot()),Ye(e,2,-2),0)}function wt(e,t,n,r){return it(e,t,n,Re,Ye(e,0,r),Ye(e,r+1,-1),r)}function Tt(e,t){for(var n=``,r=Ze(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||``;return n}function Et(e,t,n,r){switch(e.type){case Ve:if(e.children.length)break;case ze:case Re:return e.return=e.return||e.value;case Ie:return``;case Be:return e.return=e.value+`{`+Tt(e.children,r)+`}`;case Le:e.value=e.props.join(`,`)}return Xe(n=Tt(e.children,r))?e.return=e.value+`{`+n+`}`:``}function Dt(e){var t=Ze(e);return function(n,r,i,a){for(var o=``,s=0;s<t;s++)o+=e[s](n,r,i,a)||``;return o}}function Ot(e){return function(t){t.root||(t=t.return)&&e(t)}}function kt(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var At=function(e,t,n){for(var r=0,i=0;r=i,i=ct(),r===38&&i===12&&(t[n]=1),!dt(i);)R();return ut(e,I)},jt=function(e,t){var n=-1,r=44;do switch(dt(r)){case 0:r===38&&ct()===12&&(t[n]=1),e[n]+=At(I-1,t,n);break;case 2:e[n]+=mt(r);break;case 4:if(r===44){e[++n]=ct()===58?`&\f`:``,t[n]=e[n].length;break}default:e[n]+=Ue(r)}while(r=R());return e},Mt=function(e,t){return pt(jt(ft(e),t))},Nt=new WeakMap,Pt=function(e){if(!(e.type!==`rule`||!e.parent||e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;n.type!==`rule`;)if(n=n.parent,!n)return;if(!(e.props.length===1&&t.charCodeAt(0)!==58&&!Nt.get(n))&&!r){Nt.set(e,!0);for(var i=[],a=Mt(t,i),o=n.props,s=0,c=0;s<a.length;s++)for(var l=0;l<o.length;l++,c++)e.props[c]=i[s]?a[s].replace(/&\f/g,o[l]):o[l]+` `+a[s]}}},Ft=function(e){if(e.type===`decl`){var t=e.value;t.charCodeAt(0)===108&&t.charCodeAt(2)===98&&(e.return=``,e.value=``)}};function It(e,t){switch(Ge(e,t)){case 5103:return N+`print-`+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return N+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return N+e+Fe+e+M+e+e;case 6828:case 4268:return N+e+M+e+e;case 6165:return N+e+M+`flex-`+e+e;case 5187:return N+e+P(e,/(\w+).+(:[^]+)/,N+`box-$1$2`+M+`flex-$1$2`)+e;case 5443:return N+e+M+`flex-item-`+P(e,/flex-|-self/,``)+e;case 4675:return N+e+M+`flex-line-pack`+P(e,/align-content|flex-|-self/,``)+e;case 5548:return N+e+M+P(e,`shrink`,`negative`)+e;case 5292:return N+e+M+P(e,`basis`,`preferred-size`)+e;case 6060:return N+`box-`+P(e,`-grow`,``)+N+e+M+P(e,`grow`,`positive`)+e;case 4554:return N+P(e,/([^-])(transform)/g,`$1`+N+`$2`)+e;case 6187:return P(P(P(e,/(zoom-|grab)/,N+`$1`),/(image-set)/,N+`$1`),e,``)+e;case 5495:case 3959:return P(e,/(image-set\([^]*)/,N+"$1$`$1");case 4968:return P(P(e,/(.+:)(flex-)?(.*)/,N+`box-pack:$3`+M+`flex-pack:$3`),/s.+-b[^;]+/,`justify`)+N+e+e;case 4095:case 3583:case 4068:case 2532:return P(e,/(.+)-inline(.+)/,N+`$1$2`)+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Xe(e)-1-t>6)switch(F(e,t+1)){case 109:if(F(e,t+4)!==45)break;case 102:return P(e,/(.+:)(.+)-([^]+)/,`$1`+N+`$2-$3$1`+Fe+(F(e,t+3)==108?`$3`:`$2-$3`))+e;case 115:return~Je(e,`stretch`)?It(P(e,`stretch`,`fill-available`),t)+e:e}break;case 4949:if(F(e,t+1)!==115)break;case 6444:switch(F(e,Xe(e)-3-(~Je(e,`!important`)&&10))){case 107:return P(e,`:`,`:`+N)+e;case 101:return P(e,/(.+:)([^;!]+)(;|!.+)?/,`$1`+N+(F(e,14)===45?`inline-`:``)+`box$3$1`+N+`$2$3$1`+M+`$2box$3`)+e}break;case 5936:switch(F(e,t+11)){case 114:return N+e+M+P(e,/[svh]\w+-[tblr]{2}/,`tb`)+e;case 108:return N+e+M+P(e,/[svh]\w+-[tblr]{2}/,`tb-rl`)+e;case 45:return N+e+M+P(e,/[svh]\w+-[tblr]{2}/,`lr`)+e}return N+e+M+e+e}return e}var Lt=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Re:e.return=It(e.value,e.length);break;case Be:return Tt([at(e,{value:P(e.value,`@`,`@`+N)})],r);case Le:if(e.length)return $e(e.props,function(t){switch(qe(t,/(::plac\w+|:read-\w+)/)){case`:read-only`:case`:read-write`:return Tt([at(e,{props:[P(t,/:(read-\w+)/,`:`+Fe+`$1`)]})],r);case`::placeholder`:return Tt([at(e,{props:[P(t,/:(plac\w+)/,`:`+N+`input-$1`)]}),at(e,{props:[P(t,/:(plac\w+)/,`:`+Fe+`$1`)]}),at(e,{props:[P(t,/:(plac\w+)/,M+`input-$1`)]})],r)}return``})}}],Rt=function(e){var t=e.key;if(t===`css`){var n=document.querySelectorAll(`style[data-emotion]:not([data-s])`);Array.prototype.forEach.call(n,function(e){e.getAttribute(`data-emotion`).indexOf(` `)!==-1&&(document.head.appendChild(e),e.setAttribute(`data-s`,``))})}var r=e.stylisPlugins||Lt,i={},a,o=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll(`style[data-emotion^="`+t+` "]`),function(e){for(var t=e.getAttribute(`data-emotion`).split(` `),n=1;n<t.length;n++)i[t[n]]=!0;o.push(e)});var s,c=[Pt,Ft],l,u=[Et,Ot(function(e){l.insert(e)})],d=Dt(c.concat(r,u)),f=function(e){return Tt(bt(e),d)};s=function(e,t,n,r){l=n,f(e?e+`{`+t.styles+`}`:t.styles),r&&(p.inserted[t.name]=!0)};var p={key:t,sheet:new Pe({key:t,container:a,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:i,registered:{},insert:s};return p.sheet.hydrate(o),p};function zt(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Bt={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Vt=!1,Ht=/[A-Z]|^ms/g,Ut=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Wt=function(e){return e.charCodeAt(1)===45},Gt=function(e){return e!=null&&typeof e!=`boolean`},Kt=kt(function(e){return Wt(e)?e:e.replace(Ht,`-$&`).toLowerCase()}),qt=function(e,t){switch(e){case`animation`:case`animationName`:if(typeof t==`string`)return t.replace(Ut,function(e,t,n){return Qt={name:t,styles:n,next:Qt},t})}return Bt[e]!==1&&!Wt(e)&&typeof t==`number`&&t!==0?t+`px`:t},Jt=`Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.`;function Yt(e,t,n){if(n==null)return``;var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case`boolean`:return``;case`object`:var i=n;if(i.anim===1)return Qt={name:i.name,styles:i.styles,next:Qt},i.name;var a=n;if(a.styles!==void 0){var o=a.next;if(o!==void 0)for(;o!==void 0;)Qt={name:o.name,styles:o.styles,next:Qt},o=o.next;return a.styles+`;`}return Xt(e,t,n);case`function`:if(e!==void 0){var s=Qt,c=n(e);return Qt=s,Yt(e,t,c)}break}var l=n;if(t==null)return l;var u=t[l];return u===void 0?l:u}function Xt(e,t,n){var r=``;if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Yt(e,t,n[i])+`;`;else for(var a in n){var o=n[a];if(typeof o!=`object`){var s=o;t!=null&&t[s]!==void 0?r+=a+`{`+t[s]+`}`:Gt(s)&&(r+=Kt(a)+`:`+qt(a,s)+`;`)}else{if(a===`NO_COMPONENT_SELECTOR`&&Vt)throw Error(Jt);if(Array.isArray(o)&&typeof o[0]==`string`&&(t==null||t[o[0]]===void 0))for(var c=0;c<o.length;c++)Gt(o[c])&&(r+=Kt(a)+`:`+qt(a,o[c])+`;`);else{var l=Yt(e,t,o);switch(a){case`animation`:case`animationName`:r+=Kt(a)+`:`+l+`;`;break;default:r+=a+`{`+l+`}`}}}}return r}var Zt=/label:\s*([^\s;{]+)\s*(;|$)/g,Qt;function $t(e,t,n){if(e.length===1&&typeof e[0]==`object`&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i=``;Qt=void 0;var a=e[0];a==null||a.raw===void 0?(r=!1,i+=Yt(n,t,a)):i+=a[0];for(var o=1;o<e.length;o++)i+=Yt(n,t,e[o]),r&&(i+=a[o]);Zt.lastIndex=0;for(var s=``,c;(c=Zt.exec(i))!==null;)s+=`-`+c[1];return{name:zt(i)+s,styles:i,next:Qt}}var en=!0;function tn(e,t,n){var r=``;return n.split(` `).forEach(function(n){e[n]===void 0?n&&(r+=n+` `):t.push(e[n]+`;`)}),r}var nn=function(e,t,n){var r=e.key+`-`+t.name;(n===!1||en===!1)&&e.registered[r]===void 0&&(e.registered[r]=t.styles)},rn=function(e,t,n){nn(e,t,n);var r=e.key+`-`+t.name;if(e.inserted[t.name]===void 0){var i=t;do e.insert(t===i?`.`+r:``,i,e.sheet,!0),i=i.next;while(i!==void 0)}};function an(e,t){if(e.inserted[t.name]===void 0)return e.insert(``,t,e.sheet,!0)}function on(e,t,n){var r=[],i=tn(e,r,n);return r.length<2?n:i+t(r)}var sn=function(e){var t=Rt(e);t.sheet.speedy=function(e){this.isSpeedy=e},t.compat=!0;var n=function(){var e=$t([...arguments],t.registered,void 0);return rn(t,e,!1),t.key+`-`+e.name};return{css:n,cx:function(){var e=[...arguments];return on(t.registered,n,cn(e))},injectGlobal:function(){an(t,$t([...arguments],t.registered))},keyframes:function(){var e=$t([...arguments],t.registered),n=`animation-`+e.name;return an(t,{name:e.name,styles:`@keyframes `+n+`{`+e.styles+`}`}),n},hydrate:function(e){e.forEach(function(e){t.inserted[e]=!0})},flush:function(){t.registered={},t.inserted={},t.sheet.flush()},sheet:t.sheet,cache:t,getRegisteredStyles:tn.bind(null,t.registered),merge:on.bind(null,t.registered,n)}},cn=function e(t){for(var n=``,r=0;r<t.length;r++){var i=t[r];if(i!=null){var a=void 0;switch(typeof i){case`boolean`:break;case`object`:if(Array.isArray(i))a=e(i);else for(var o in a=``,i)i[o]&&o&&(a&&(a+=` `),a+=o);break;default:a=i}a&&(n&&(n+=` `),n+=a)}}return n},ln=sn({key:`css`});ln.flush,ln.hydrate,ln.cx,ln.merge,ln.getRegisteredStyles;var un=ln.injectGlobal;ln.keyframes;var z=ln.css;ln.sheet,ln.cache;function dn(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function fn(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function pn(e){let t,n,r;e.length===2?(t=e===dn||e===fn?e:mn,n=e,r=e):(t=dn,n=(t,n)=>dn(e(t),n),r=(t,n)=>e(t)-n);function i(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<0?i=t+1:a=t}while(i<a)}return i}function a(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<=0?i=t+1:a=t}while(i<a)}return i}function o(e,t,n=0,a=e.length){let o=i(e,t,n,a-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o}return{left:i,center:o,right:a}}function mn(){return 0}function hn(e){return e===null?NaN:+e}var gn=pn(dn),_n=gn.right,vn=gn.left;pn(hn).center;function yn(e,t){let n,r;if(t===void 0)for(let t of e)t!=null&&(n===void 0?t>=t&&(n=r=t):(n>t&&(n=t),r<t&&(r=t)));else{let i=-1;for(let a of e)(a=t(a,++i,e))!=null&&(n===void 0?a>=a&&(n=r=a):(n>a&&(n=a),r<a&&(r=a)))}return[n,r]}var bn=class extends Map{constructor(e,t=wn){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),e!=null)for(let[t,n]of e)this.set(t,n)}get(e){return super.get(xn(this,e))}has(e){return super.has(xn(this,e))}set(e,t){return super.set(Sn(this,e),t)}delete(e){return super.delete(Cn(this,e))}};function xn({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):n}function Sn({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function Cn({_intern:e,_key:t},n){let r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function wn(e){return typeof e==`object`&&e?e.valueOf():e}var Tn=Math.sqrt(50),En=Math.sqrt(10),Dn=Math.sqrt(2);function On(e,t,n){let r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/10**i,o=a>=Tn?10:a>=En?5:a>=Dn?2:1,s,c,l;return i<0?(l=10**-i/o,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=10**i*o,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=n&&n<2?On(e,t,n*2):[s,c,l]}function kn(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];let r=t<e,[i,a,o]=r?On(t,e,n):On(e,t,n);if(!(a>=i))return[];let s=a-i+1,c=Array(s);if(r)if(o<0)for(let e=0;e<s;++e)c[e]=(a-e)/-o;else for(let e=0;e<s;++e)c[e]=(a-e)*o;else if(o<0)for(let e=0;e<s;++e)c[e]=(i+e)/-o;else for(let e=0;e<s;++e)c[e]=(i+e)*o;return c}function An(e,t,n){return t=+t,e=+e,n=+n,On(e,t,n)[2]}function jn(e,t,n){t=+t,e=+e,n=+n;let r=t<e,i=r?An(t,e,n):An(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function Mn(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n<t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function Nn(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n>t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function Pn(e,t,n=hn){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,i=(r-1)*t,a=Math.floor(i),o=+n(e[a],a,e);return o+(+n(e[a+1],a+1,e)-o)*(i-a)}}function Fn(e,t){let n=0,r=0;if(t===void 0)for(let t of e)t!=null&&(t=+t)>=t&&(++n,r+=t);else{let i=-1;for(let a of e)(a=t(a,++i,e))!=null&&(a=+a)>=a&&(++n,r+=a)}if(n)return r/n}function*In(e){for(let t of e)yield*t}function Ln(e){return Array.from(In(e))}function Rn(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=Array(i);++r<i;)a[r]=e+r*n;return a}function zn(e,t){let n=0;if(t===void 0)for(let t of e)(t=+t)&&(n+=t);else{let r=-1;for(let i of e)(i=+t(i,++r,e))&&(n+=i)}return n}function Bn(e,t,n){var r=n||{},i=r.noTrailing,a=i===void 0?!1:i,o=r.noLeading,s=o===void 0?!1:o,c=r.debounceMode,l=c===void 0?void 0:c,u,d=!1,f=0;function p(){u&&clearTimeout(u)}function m(e){var t=(e||{}).upcomingOnly,n=t===void 0?!1:t;p(),d=!n}function h(){var n=[...arguments],r=this,i=Date.now()-f;if(d)return;function o(){f=Date.now(),t.apply(r,n)}function c(){u=void 0}!s&&l&&!u&&o(),p(),l===void 0&&i>e?s?(f=Date.now(),a||(u=setTimeout(l?c:o,e))):o():a!==!0&&(u=setTimeout(l?c:o,l===void 0?e-i:e))}return h.cancel=m,h}var Vn;(function(e){e.Left=`left`,e.Right=`right`,e.Auto=`auto`})(Vn||={});var Hn=e=>typeof e==`number`,Un=e=>typeof e==`function`,Wn=e=>typeof e==`string`,Gn=e=>Array.isArray(e),Kn=e=>e instanceof Object,qn=e=>e.constructor.name!==`Function`&&e.constructor.name!==`Object`,Jn=e=>Kn(e)&&!Gn(e)&&!Un(e)&&!qn(e),Yn=(e,t,n=[],r=new Set)=>{if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;if(r.has(e))return!0;r.add(e);for(let i=0;i<e.length;i++)if(!Yn(e[i],t[i],n,r))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(typeof e==`object`&&e&&t!==null){if(typeof t!=`object`)return!1;if(e===t)return!0;let i=Object.keys(e).filter(e=>!n.includes(e)),a=Object.keys(t).filter(e=>!n.includes(e));if(i.length!==a.length)return!1;if(r.has(e))return!0;r.add(e);for(let a of i)if(!Yn(e[a],t[a],n,r))return!1;return!0}return e===t},Xn=e=>e.flat(),Zn=(e,t=new Map)=>{if(typeof e!=`object`||!e)return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof Array){let n=[];t.set(e,n);for(let r of e)n.push(t.has(r)?t.get(r):Zn(r,t));return n}if(qn(e))return e;if(e instanceof Object){let n={};t.set(e,n);let r=e;return Object.keys(e).reduce((e,n)=>(e[n]=t.has(r[n])?t.get(r[n]):Zn(r[n],t),e),n),n}return e},Qn=(e,t,n=new Map)=>{if(!e||!t||e===t)return e;let r=qn(e)?e:Zn(e);return n.has(t)?n.get(t):(n.set(t,r),Object.keys(t).forEach(i=>{i===`__proto__`||i===`constructor`||(Jn(e[i])&&Jn(t[i])?r[i]=Qn(e[i],t[i],n):qn(t)?r[i]=t:r[i]=Zn(t[i]))}),r)},$n=(e,t,n)=>Bn(t,e,n);function er(e,t,n){return Un(t)?t(e,n):t}function tr(e,t,n){return er(e,t,n)}function B(e,t,n){return er(e,t,n)}function nr(e){return e.filter(e=>e&&!Hn(e))}function rr(e,t,n){return Math.min(Math.max(e,t),n)}function ir(e,...t){if(!e)return[void 0,void 0];if(Gn(t)){let n=0,r=0;return e.forEach((e,i)=>{let a=0,o=0;for(let n of t){let t=B(e,n,i)||0;t>=0?a+=t:o+=t}a>r&&(r=a),o<n&&(n=o)}),[n,r]}}function ar(e,t,...n){let r=[],i=0,a=0;for(let o of n){let n=B(e,o,t)||0;n>=0?r.push(i+=n):r.push(a+=n)}return r}function or(e,t,n,r){let i=e.map((e,n)=>B(e,t,n)||0),a=n.map((t,n)=>{let i=Fn(e,(e,n)=>B(e,t,n)||0);return i===0&&Array.isArray(r)?r[n]:i<0}),o=n.map(()=>[]);return e.forEach((e,t)=>{let r=i[t],a=i[t];n.forEach((n,i)=>{let s=B(e,n,t)||0;s>=0?o[i].push([r,r+=s]):o[i].push([a,a+=s])})}),o.forEach((e,t)=>{e.isMostlyNegative=a[t]}),o}function sr(e,...t){if(e)return Nn(e,(e,n)=>Nn(t,t=>B(e,t,n)))}function cr(e,...t){if(e)return Mn(e,(e,n)=>Mn(t,t=>B(e,t,n)))}function lr(e,...t){return[sr(e,...t),cr(e,...t)]}function ur(e,t,n,r=Vn.Auto){if(e.length<=1)return e[0];let i=e.map((e,t)=>[e,t]).sort(([e,t],[r,i])=>B(e,n,t)-B(r,n,i)),a=i.map(([e,t])=>B(e,n,t)),o=r===Vn.Right?vn(a,t,0,e.length-1):_n(a,t,1,e.length);return r===Vn.Right?i[o][0]:r===Vn.Left?i[o-1][0]:t-a[o-1]>a[o]-t?i[o][0]:i[o-1][0]}function dr(e,t,n,r=!1){if(!n)return[];let i=e.filter((e,r)=>{let i=B(e,n,r);return i>=t[0]&&i<=t[1]});if(r){if(i.length===0)return[ur(e,t[0],n,Vn.Left),ur(e,t[1],n,Vn.Right)].filter(Boolean);let r=i[0],a=i[i.length-1],o=e.findIndex(e=>e===r),s=e.findIndex(e=>e===a),c=Math.max(0,o-1),l=Math.min(e.length-1,s+1);return e.slice(c,l+1)}return i}var fr={value:()=>{}};function pr(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+``)||r in n||/[\s.]/.test(r))throw Error(`illegal type: `+r);n[r]=[]}return new mr(n)}function mr(e){this._=e}function hr(e,t){return e.trim().split(/^|\s+/).map(function(e){var n=``,r=e.indexOf(`.`);if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw Error(`unknown type: `+e);return{type:e,name:n}})}mr.prototype=pr.prototype={constructor:mr,on:function(e,t){var n=this._,r=hr(e+``,n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(e=r[a]).type)&&(i=gr(n[i],e.name)))return i;return}if(t!=null&&typeof t!=`function`)throw Error(`invalid callback: `+t);for(;++a<o;)if(i=(e=r[a]).type)n[i]=_r(n[i],e.name,t);else if(t==null)for(i in n)n[i]=_r(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new mr(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function gr(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function _r(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=fr,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var vr=0,yr=0,br=0,xr=1e3,Sr,Cr,wr=0,Tr=0,Er=0,Dr=typeof performance==`object`&&performance.now?performance:Date,Or=typeof window==`object`&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function kr(){return Tr||=(Or(Ar),Dr.now()+Er)}function Ar(){Tr=0}function jr(){this._call=this._time=this._next=null}jr.prototype=Mr.prototype={constructor:jr,restart:function(e,t,n){if(typeof e!=`function`)throw TypeError(`callback is not a function`);n=(n==null?kr():+n)+(t==null?0:+t),!this._next&&Cr!==this&&(Cr?Cr._next=this:Sr=this,Cr=this),this._call=e,this._time=n,Lr()},stop:function(){this._call&&(this._call=null,this._time=1/0,Lr())}};function Mr(e,t,n){var r=new jr;return r.restart(e,t,n),r}function Nr(){kr(),++vr;for(var e=Sr,t;e;)(t=Tr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--vr}function Pr(){Tr=(wr=Dr.now())+Er,vr=yr=0;try{Nr()}finally{vr=0,Ir(),Tr=0}}function Fr(){var e=Dr.now(),t=e-wr;t>xr&&(Er-=t,wr=e)}function Ir(){for(var e,t=Sr,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Sr=n);Cr=e,Lr(r)}function Lr(e){vr||(yr&&=clearTimeout(yr),e-Tr>24?(e<1/0&&(yr=setTimeout(Pr,e-Dr.now()-Er)),br&&=clearInterval(br)):(br||=(wr=Dr.now(),setInterval(Fr,xr)),vr=1,Or(Pr)))}function Rr(e,t,n){var r=new jr;return t=t==null?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}var zr={svg:`http://www.w3.org/2000/svg`,xhtml:`http://www.w3.org/1999/xhtml`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`};function Br(e){var t=e+=``,n=t.indexOf(`:`);return n>=0&&(t=e.slice(0,n))!==`xmlns`&&(e=e.slice(n+1)),zr.hasOwnProperty(t)?{space:zr[t],local:e}:e}function Vr(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===`http://www.w3.org/1999/xhtml`&&t.documentElement.namespaceURI===`http://www.w3.org/1999/xhtml`?t.createElement(e):t.createElementNS(n,e)}}function Hr(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Ur(e){var t=Br(e);return(t.local?Hr:Vr)(t)}function Wr(){}function Gr(e){return e==null?Wr:function(){return this.querySelector(e)}}function Kr(e){typeof e!=`function`&&(e=Gr(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=Array(o),c,l,u=0;u<o;++u)(c=a[u])&&(l=e.call(c,c.__data__,u,a))&&(`__data__`in c&&(l.__data__=c.__data__),s[u]=l);return new V(r,this._parents)}function qr(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Jr(){return[]}function Yr(e){return e==null?Jr:function(){return this.querySelectorAll(e)}}function Xr(e){return function(){return qr(e.apply(this,arguments))}}function Zr(e){e=typeof e==`function`?Xr(e):Yr(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var o=t[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&(r.push(e.call(c,c.__data__,l,o)),i.push(c));return new V(r,i)}function Qr(e){return function(){return this.matches(e)}}function $r(e){return function(t){return t.matches(e)}}var ei=Array.prototype.find;function ti(e){return function(){return ei.call(this.children,e)}}function ni(){return this.firstElementChild}function ri(e){return this.select(e==null?ni:ti(typeof e==`function`?e:$r(e)))}var ii=Array.prototype.filter;function ai(){return Array.from(this.children)}function oi(e){return function(){return ii.call(this.children,e)}}function si(e){return this.selectAll(e==null?ai:oi(typeof e==`function`?e:$r(e)))}function ci(e){typeof e!=`function`&&(e=Qr(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new V(r,this._parents)}function li(e){return Array(e.length)}function ui(){return new V(this._enter||this._groups.map(li),this._parents)}function di(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}di.prototype={constructor:di,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function fi(e){return function(){return e}}function pi(e,t,n,r,i,a){for(var o=0,s,c=t.length,l=a.length;o<l;++o)(s=t[o])?(s.__data__=a[o],r[o]=s):n[o]=new di(e,a[o]);for(;o<c;++o)(s=t[o])&&(i[o]=s)}function mi(e,t,n,r,i,a,o){var s,c,l=new Map,u=t.length,d=a.length,f=Array(u),p;for(s=0;s<u;++s)(c=t[s])&&(f[s]=p=o.call(c,c.__data__,s,t)+``,l.has(p)?i[s]=c:l.set(p,c));for(s=0;s<d;++s)p=o.call(e,a[s],s,a)+``,(c=l.get(p))?(r[s]=c,c.__data__=a[s],l.delete(p)):n[s]=new di(e,a[s]);for(s=0;s<u;++s)(c=t[s])&&l.get(f[s])===c&&(i[s]=c)}function hi(e){return e.__data__}function gi(e,t){if(!arguments.length)return Array.from(this,hi);var n=t?mi:pi,r=this._parents,i=this._groups;typeof e!=`function`&&(e=fi(e));for(var a=i.length,o=Array(a),s=Array(a),c=Array(a),l=0;l<a;++l){var u=r[l],d=i[l],f=d.length,p=_i(e.call(u,u&&u.__data__,l,r)),m=p.length,h=s[l]=Array(m),g=o[l]=Array(m);n(u,d,h,g,c[l]=Array(f),p,t);for(var _=0,v=0,y,b;_<m;++_)if(y=h[_]){for(_>=v&&(v=_+1);!(b=g[v])&&++v<m;);y._next=b||null}}return o=new V(o,r),o._enter=s,o._exit=c,o}function _i(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function vi(){return new V(this._exit||this._groups.map(li),this._parents)}function yi(e,t,n){var r=this.enter(),i=this,a=this.exit();return typeof e==`function`?(r=e(r),r&&=r.selection()):r=r.append(e+``),t!=null&&(i=t(i),i&&=i.selection()),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function bi(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,o=Math.min(i,a),s=Array(i),c=0;c<o;++c)for(var l=n[c],u=r[c],d=l.length,f=s[c]=Array(d),p,m=0;m<d;++m)(p=l[m]||u[m])&&(f[m]=p);for(;c<i;++c)s[c]=n[c];return new V(s,this._parents)}function xi(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,a=r[i],o;--i>=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function Si(e){e||=Ci;function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}for(var n=this._groups,r=n.length,i=Array(r),a=0;a<r;++a){for(var o=n[a],s=o.length,c=i[a]=Array(s),l,u=0;u<s;++u)(l=o[u])&&(c[u]=l);c.sort(t)}return new V(i,this._parents).order()}function Ci(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function wi(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Ti(){return Array.from(this)}function Ei(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}function Di(){let e=0;for(let t of this)++e;return e}function Oi(){return!this.node()}function ki(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],a=0,o=i.length,s;a<o;++a)(s=i[a])&&e.call(s,s.__data__,a,i);return this}function Ai(e){return function(){this.removeAttribute(e)}}function ji(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Mi(e,t){return function(){this.setAttribute(e,t)}}function Ni(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Pi(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Fi(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function Ii(e,t){var n=Br(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?ji:Ai:typeof t==`function`?n.local?Fi:Pi:n.local?Ni:Mi)(n,t))}function Li(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Ri(e){return function(){this.style.removeProperty(e)}}function zi(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Bi(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Vi(e,t,n){return arguments.length>1?this.each((t==null?Ri:typeof t==`function`?Bi:zi)(e,t,n??``)):Hi(this.node(),e)}function Hi(e,t){return e.style.getPropertyValue(t)||Li(e).getComputedStyle(e,null).getPropertyValue(t)}function Ui(e){return function(){delete this[e]}}function Wi(e,t){return function(){this[e]=t}}function Gi(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Ki(e,t){return arguments.length>1?this.each((t==null?Ui:typeof t==`function`?Gi:Wi)(e,t)):this.node()[e]}function qi(e){return e.trim().split(/^|\s+/)}function Ji(e){return e.classList||new Yi(e)}function Yi(e){this._node=e,this._names=qi(e.getAttribute(`class`)||``)}Yi.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute(`class`,this._names.join(` `)))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute(`class`,this._names.join(` `)))},contains:function(e){return this._names.indexOf(e)>=0}};function Xi(e,t){for(var n=Ji(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function Zi(e,t){for(var n=Ji(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function Qi(e){return function(){Xi(this,e)}}function $i(e){return function(){Zi(this,e)}}function ea(e,t){return function(){(t.apply(this,arguments)?Xi:Zi)(this,e)}}function ta(e,t){var n=qi(e+``);if(arguments.length<2){for(var r=Ji(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t==`function`?ea:t?Qi:$i)(n,t))}function na(){this.textContent=``}function ra(e){return function(){this.textContent=e}}function ia(e){return function(){this.textContent=e.apply(this,arguments)??``}}function aa(e){return arguments.length?this.each(e==null?na:(typeof e==`function`?ia:ra)(e)):this.node().textContent}function oa(){this.innerHTML=``}function sa(e){return function(){this.innerHTML=e}}function ca(e){return function(){this.innerHTML=e.apply(this,arguments)??``}}function la(e){return arguments.length?this.each(e==null?oa:(typeof e==`function`?ca:sa)(e)):this.node().innerHTML}function ua(){this.nextSibling&&this.parentNode.appendChild(this)}function da(){return this.each(ua)}function fa(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function pa(){return this.each(fa)}function ma(e){var t=typeof e==`function`?e:Ur(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function ha(){return null}function ga(e,t){var n=typeof e==`function`?e:Ur(e),r=t==null?ha:typeof t==`function`?t:Gr(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function _a(){var e=this.parentNode;e&&e.removeChild(this)}function va(){return this.each(_a)}function ya(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function ba(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function xa(e){return this.select(e?ba:ya)}function Sa(e){return arguments.length?this.property(`__data__`,e):this.node().__data__}function Ca(e){return function(t){e.call(this,t,this.__data__)}}function wa(e){return e.trim().split(/^|\s+/).map(function(e){var t=``,n=e.indexOf(`.`);return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}function Ta(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function Ea(e,t,n){return function(){var r=this.__on,i,a=Ca(t);if(r){for(var o=0,s=r.length;o<s;++o)if((i=r[o]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(i):this.__on=[i]}}function Da(e,t,n){var r=wa(e+``),i,a=r.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,l=s.length,u;c<l;++c)for(i=0,u=s[c];i<a;++i)if((o=r[i]).type===u.type&&o.name===u.name)return u.value}return}for(s=t?Ea:Ta,i=0;i<a;++i)this.each(s(r[i],t,n));return this}function Oa(e,t,n){var r=Li(e),i=r.CustomEvent;typeof i==`function`?i=new i(t,n):(i=r.document.createEvent(`Event`),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function ka(e,t){return function(){return Oa(this,e,t)}}function Aa(e,t){return function(){return Oa(this,e,t.apply(this,arguments))}}function ja(e,t){return this.each((typeof t==`function`?Aa:ka)(e,t))}function*Ma(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length,o;i<a;++i)(o=r[i])&&(yield o)}var Na=[null];function V(e,t){this._groups=e,this._parents=t}function Pa(){return new V([[document.documentElement]],Na)}function Fa(){return this}V.prototype=Pa.prototype={constructor:V,select:Kr,selectAll:Zr,selectChild:ri,selectChildren:si,filter:ci,data:gi,enter:ui,exit:vi,join:yi,merge:bi,selection:Fa,order:xi,sort:Si,call:wi,nodes:Ti,node:Ei,size:Di,empty:Oi,each:ki,attr:Ii,style:Vi,property:Ki,classed:ta,text:aa,html:la,raise:da,lower:pa,append:ma,insert:ga,remove:va,clone:xa,datum:Sa,on:Da,dispatch:ja,[Symbol.iterator]:Ma};function H(e){return typeof e==`string`?new V([[document.querySelector(e)]],[document.documentElement]):new V([[e]],Na)}function Ia(e){let t;for(;t=e.sourceEvent;)e=t;return e}function La(e,t){if(e=Ia(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}var Ra;(function(e){e[e.SVG=0]=`SVG`,e[e.HTML=1]=`HTML`})(Ra||={});var za;(function(e){e.Fit=`fit`,e.Extend=`extend`,e.FitWidth=`fit_width`})(za||={});var Ba=[],Va=function(){return Ba.some(function(e){return e.activeTargets.length>0})},Ha=function(){return Ba.some(function(e){return e.skippedTargets.length>0})},Ua=`ResizeObserver loop completed with undelivered notifications.`,Wa=function(){var e;typeof ErrorEvent==`function`?e=new ErrorEvent(`error`,{message:Ua}):(e=document.createEvent(`Event`),e.initEvent(`error`,!1,!1),e.message=Ua),window.dispatchEvent(e)},Ga;(function(e){e.BORDER_BOX=`border-box`,e.CONTENT_BOX=`content-box`,e.DEVICE_PIXEL_CONTENT_BOX=`device-pixel-content-box`})(Ga||={});var Ka=function(e){return Object.freeze(e)},qa=function(){function e(e,t){this.inlineSize=e,this.blockSize=t,Ka(this)}return e}(),Ja=function(){function e(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Ka(this)}return e.prototype.toJSON=function(){var e=this;return{x:e.x,y:e.y,top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),Ya=function(e){return e instanceof SVGElement&&`getBBox`in e},Xa=function(e){if(Ya(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e,a=i.offsetWidth,o=i.offsetHeight;return!(a||o||e.getClientRects().length)},Za=function(e){if(e instanceof Element)return!0;var t=e?.ownerDocument?.defaultView;return!!(t&&e instanceof t.Element)},Qa=function(e){switch(e.tagName){case`INPUT`:if(e.type!==`image`)break;case`VIDEO`:case`AUDIO`:case`EMBED`:case`OBJECT`:case`CANVAS`:case`IFRAME`:case`IMG`:return!0}return!1},$a=typeof window<`u`?window:{},eo=new WeakMap,to=/auto|scroll/,no=/^tb|vertical/,ro=/msie|trident/i.test($a.navigator&&$a.navigator.userAgent),io=function(e){return parseFloat(e||`0`)},ao=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new qa((n?t:e)||0,(n?e:t)||0)},oo=Ka({devicePixelContentBoxSize:ao(),borderBoxSize:ao(),contentBoxSize:ao(),contentRect:new Ja(0,0,0,0)}),so=function(e,t){if(t===void 0&&(t=!1),eo.has(e)&&!t)return eo.get(e);if(Xa(e))return eo.set(e,oo),oo;var n=getComputedStyle(e),r=Ya(e)&&e.ownerSVGElement&&e.getBBox(),i=!ro&&n.boxSizing===`border-box`,a=no.test(n.writingMode||``),o=!r&&to.test(n.overflowY||``),s=!r&&to.test(n.overflowX||``),c=r?0:io(n.paddingTop),l=r?0:io(n.paddingRight),u=r?0:io(n.paddingBottom),d=r?0:io(n.paddingLeft),f=r?0:io(n.borderTopWidth),p=r?0:io(n.borderRightWidth),m=r?0:io(n.borderBottomWidth),h=r?0:io(n.borderLeftWidth),g=d+l,_=c+u,v=h+p,y=f+m,b=s?e.offsetHeight-y-e.clientHeight:0,x=o?e.offsetWidth-v-e.clientWidth:0,S=i?g+v:0,C=i?_+y:0,w=r?r.width:io(n.width)-S-x,T=r?r.height:io(n.height)-C-b,E=w+g+x+v,D=T+_+b+y,O=Ka({devicePixelContentBoxSize:ao(Math.round(w*devicePixelRatio),Math.round(T*devicePixelRatio),a),borderBoxSize:ao(E,D,a),contentBoxSize:ao(w,T,a),contentRect:new Ja(d,c,w,T)});return eo.set(e,O),O},co=function(e,t,n){var r=so(e,n),i=r.borderBoxSize,a=r.contentBoxSize,o=r.devicePixelContentBoxSize;switch(t){case Ga.DEVICE_PIXEL_CONTENT_BOX:return o;case Ga.BORDER_BOX:return i;default:return a}},lo=function(){function e(e){var t=so(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=Ka([t.borderBoxSize]),this.contentBoxSize=Ka([t.contentBoxSize]),this.devicePixelContentBoxSize=Ka([t.devicePixelContentBoxSize])}return e}(),uo=function(e){if(Xa(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},fo=function(){var e=1/0,t=[];Ba.forEach(function(n){if(n.activeTargets.length!==0){var r=[];n.activeTargets.forEach(function(t){var n=new lo(t.target),i=uo(t.target);r.push(n),t.lastReportedSize=co(t.target,t.observedBox),i<e&&(e=i)}),t.push(function(){n.callback.call(n.observer,r,n.observer)}),n.activeTargets.splice(0,n.activeTargets.length)}});for(var n=0,r=t;n<r.length;n++){var i=r[n];i()}return e},po=function(e){Ba.forEach(function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach(function(n){n.isActive()&&(uo(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))})})},mo=function(){var e=0;for(po(e);Va();)e=fo(),po(e);return Ha()&&Wa(),e>0},ho,go=[],_o=function(){return go.splice(0).forEach(function(e){return e()})},vo=function(e){if(!ho){var t=0,n=document.createTextNode(``);new MutationObserver(function(){return _o()}).observe(n,{characterData:!0}),ho=function(){n.textContent=`${t?t--:t++}`}}go.push(e),ho()},yo=function(e){vo(function(){requestAnimationFrame(e)})},bo=0,xo=function(){return!!bo},So=250,Co={attributes:!0,characterData:!0,childList:!0,subtree:!0},wo=[`resize`,`load`,`transitionend`,`animationend`,`animationstart`,`animationiteration`,`keyup`,`keydown`,`mouseup`,`mousedown`,`mouseover`,`mouseout`,`blur`,`focus`],To=function(e){return e===void 0&&(e=0),Date.now()+e},Eo=!1,Do=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(e===void 0&&(e=So),!Eo){Eo=!0;var n=To(e);yo(function(){var r=!1;try{r=mo()}finally{if(Eo=!1,e=n-To(),!xo())return;r?t.run(1e3):e>0?t.run(e):t.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,Co)};document.body?t():$a.addEventListener(`DOMContentLoaded`,t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),wo.forEach(function(t){return $a.addEventListener(t,e.listener,!0)}))},e.prototype.stop=function(){var e=this;this.stopped||=(this.observer&&this.observer.disconnect(),wo.forEach(function(t){return $a.removeEventListener(t,e.listener,!0)}),!0)},e}()),Oo=function(e){!bo&&e>0&&Do.start(),bo+=e,!bo&&Do.stop()},ko=function(e){return!Ya(e)&&!Qa(e)&&getComputedStyle(e).display===`inline`},Ao=function(){function e(e,t){this.target=e,this.observedBox=t||Ga.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e=co(this.target,this.observedBox,!0);return ko(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},e}(),jo=function(){function e(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t}return e}(),Mo=new WeakMap,No=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},Po=function(){function e(){}return e.connect=function(e,t){var n=new jo(e,t);Mo.set(e,n)},e.observe=function(e,t,n){var r=Mo.get(e),i=r.observationTargets.length===0;No(r.observationTargets,t)<0&&(i&&Ba.push(r),r.observationTargets.push(new Ao(t,n&&n.box)),Oo(1),Do.schedule())},e.unobserve=function(e,t){var n=Mo.get(e),r=No(n.observationTargets,t),i=n.observationTargets.length===1;r>=0&&(i&&Ba.splice(Ba.indexOf(n),1),n.observationTargets.splice(r,1),Oo(-1))},e.disconnect=function(e){var t=this,n=Mo.get(e);n.observationTargets.slice().forEach(function(n){return t.unobserve(e,n.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e}(),Fo=function(){function e(e){if(arguments.length===0)throw TypeError(`Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.`);if(typeof e!=`function`)throw TypeError(`Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.`);Po.connect(this,e)}return e.prototype.observe=function(e,t){if(arguments.length===0)throw TypeError(`Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.`);if(!Za(e))throw TypeError(`Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element`);Po.observe(this,e,t)},e.prototype.unobserve=function(e){if(arguments.length===0)throw TypeError(`Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.`);if(!Za(e))throw TypeError(`Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element`);Po.unobserve(this,e)},e.prototype.disconnect=function(){Po.disconnect(this)},e.toString=function(){return`function ResizeObserver () { [polyfill code] }`},e}(),Io=globalThis.ResizeObserver||Fo,Lo={duration:void 0,margin:{top:0,bottom:0,left:0,right:0},padding:{top:0,bottom:0,left:0,right:0},sizing:za.Fit,width:void 0,height:void 0,svgDefs:void 0,ariaLabel:void 0},Ro=class e{constructor(t){this._defaultConfig=Lo,this._isFirstRender=!0,this._renderAnimationFrameId=null,this._container=t;let n=H(this._container);n.attr(`role`,`figure`),this.svg=n.append(`svg`).style(`display`,`block`).attr(`xmlns`,`http://www.w3.org/2000/svg`).attr(`height`,e.DEFAULT_CONTAINER_HEIGHT).attr(`aria-hidden`,!0),this._svgDefs=this.svg.append(`defs`),this._svgDefsExternal=this.svg.append(`defs`),this.element=this.svg.node()}updateContainer(e){this.prevConfig=this.config,this.config=Qn(this._defaultConfig,e),e?.svgDefs!==this.prevConfig?.svgDefs&&(this._svgDefsExternal.selectAll(`*`).remove(),this._svgDefsExternal.html(e.svgDefs))}_preRender(){}_render(e){let{config:t}=this;H(this._container).attr(`aria-label`,t.ariaLabel),this._isFirstRender=!1}render(e=this.config.duration){let t=this.config.width||this.containerWidth,n=this.config.height||this.containerHeight;this.svg.attr(`width`,t).attr(`height`,n),this._resizeObserver||this._setUpResizeObserver(),cancelAnimationFrame(this._renderAnimationFrameId),this._renderAnimationFrameId=requestAnimationFrame(()=>{this._preRender(),this._render(e)})}get containerWidth(){return this.config.width?this.element.clientWidth:this._container.clientWidth||this._container.getBoundingClientRect().width}get containerHeight(){return this.config.height?this.element.clientHeight:this._container.clientHeight||this._container.getBoundingClientRect().height||e.DEFAULT_CONTAINER_HEIGHT}get width(){return rr(this.containerWidth-this.config.margin.left-this.config.margin.right,0,1/0)}get height(){return rr(this.containerHeight-this.config.margin.top-this.config.margin.bottom,0,1/0)}_removeAllChildren(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild)}_onResize(){let{config:e}=this;(e.sizing===za.Fit||e.sizing===za.FitWidth)&&this.render(0)}_setUpResizeObserver(){if(this._resizeObserver)return;let e=this._container.getBoundingClientRect();this._containerSize={width:e.width,height:e.height},this._resizeObserver=new Io((e,t)=>{cancelAnimationFrame(this._resizeObserverAnimationFrameId),this._resizeObserverAnimationFrameId=requestAnimationFrame(()=>{let e=this._container.getBoundingClientRect(),t={width:e.width,height:e.height};!Yn(this._containerSize,t)&&t.width&&t.height&&(this._containerSize=t,this._onResize())})}),this._resizeObserver.observe(this._container)}destroy(){var e;cancelAnimationFrame(this._renderAnimationFrameId),cancelAnimationFrame(this._resizeObserverAnimationFrameId),(e=this._resizeObserver)==null||e.disconnect(),this.svg.remove()}};Ro.DEFAULT_CONTAINER_HEIGHT=300;function zo(){let e=()=>Math.floor((1+crypto.getRandomValues(new Uint32Array(1))[0])*65536).toString(16).substring(1);return`${e()+e()}-${e()}-${e()}-${e()}-${e()}${e()}${e()}`}var Bo=new WeakMap;function Vo(e,t){if(!Wn(e))return``;let n=e.substr(4,e.length-5),r=Bo.get(t);if(r||(r=new Map,Bo.set(t,r)),r.has(n))return r.get(n);let i=getComputedStyle(t).getPropertyValue(n);return r.set(n,i),i}function Ho(e,t,n=0){let[r,i,a,o]=[e.x+n,e.y+e.height-2*n,e.x+e.width-2*n,e.y+n],[s,c,l,u]=[t.x+n,t.y+t.height-2*n,t.x+t.width-2*n,t.y+n];return!(i<u||c<o||a<s||l<r)}function Uo(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Wo(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Go(){}var Ko=.7,qo=1/Ko,Jo=`\\s*([+-]?\\d+)\\s*`,Yo=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,Xo=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,Zo=/^#([0-9a-f]{3,8})$/,Qo=RegExp(`^rgb\\(${Jo},${Jo},${Jo}\\)$`),$o=RegExp(`^rgb\\(${Xo},${Xo},${Xo}\\)$`),es=RegExp(`^rgba\\(${Jo},${Jo},${Jo},${Yo}\\)$`),ts=RegExp(`^rgba\\(${Xo},${Xo},${Xo},${Yo}\\)$`),ns=RegExp(`^hsl\\(${Yo},${Xo},${Xo}\\)$`),rs=RegExp(`^hsla\\(${Yo},${Xo},${Xo},${Yo}\\)$`),is={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};Uo(Go,ls,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:as,formatHex:as,formatHex8:os,formatHsl:ss,formatRgb:cs,toString:cs});function as(){return this.rgb().formatHex()}function os(){return this.rgb().formatHex8()}function ss(){return xs(this).formatHsl()}function cs(){return this.rgb().formatRgb()}function ls(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=Zo.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?us(t):n===3?new U(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?ds(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?ds(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=Qo.exec(e))?new U(t[1],t[2],t[3],1):(t=$o.exec(e))?new U(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=es.exec(e))?ds(t[1],t[2],t[3],t[4]):(t=ts.exec(e))?ds(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=ns.exec(e))?bs(t[1],t[2]/100,t[3]/100,1):(t=rs.exec(e))?bs(t[1],t[2]/100,t[3]/100,t[4]):is.hasOwnProperty(e)?us(is[e]):e===`transparent`?new U(NaN,NaN,NaN,0):null}function us(e){return new U(e>>16&255,e>>8&255,e&255,1)}function ds(e,t,n,r){return r<=0&&(e=t=n=NaN),new U(e,t,n,r)}function fs(e){return e instanceof Go||(e=ls(e)),e?(e=e.rgb(),new U(e.r,e.g,e.b,e.opacity)):new U}function ps(e,t,n,r){return arguments.length===1?fs(e):new U(e,t,n,r??1)}function U(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Uo(U,ps,Wo(Go,{brighter(e){return e=e==null?qo:qo**+e,new U(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ko:Ko**+e,new U(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new U(vs(this.r),vs(this.g),vs(this.b),_s(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:ms,formatHex:ms,formatHex8:hs,formatRgb:gs,toString:gs}));function ms(){return`#${ys(this.r)}${ys(this.g)}${ys(this.b)}`}function hs(){return`#${ys(this.r)}${ys(this.g)}${ys(this.b)}${ys((isNaN(this.opacity)?1:this.opacity)*255)}`}function gs(){let e=_s(this.opacity);return`${e===1?`rgb(`:`rgba(`}${vs(this.r)}, ${vs(this.g)}, ${vs(this.b)}${e===1?`)`:`, ${e})`}`}function _s(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function vs(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ys(e){return e=vs(e),(e<16?`0`:``)+e.toString(16)}function bs(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Cs(e,t,n,r)}function xs(e){if(e instanceof Cs)return new Cs(e.h,e.s,e.l,e.opacity);if(e instanceof Go||(e=ls(e)),!e)return new Cs;if(e instanceof Cs)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new Cs(o,s,c,e.opacity)}function Ss(e,t,n,r){return arguments.length===1?xs(e):new Cs(e,t,n,r??1)}function Cs(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Uo(Cs,Ss,Wo(Go,{brighter(e){return e=e==null?qo:qo**+e,new Cs(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ko:Ko**+e,new Cs(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,i=2*n-r;return new U(Es(e>=240?e-240:e+120,i,r),Es(e,i,r),Es(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Cs(ws(this.h),Ts(this.s),Ts(this.l),_s(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(){let e=_s(this.opacity);return`${e===1?`hsl(`:`hsla(`}${ws(this.h)}, ${Ts(this.s)*100}%, ${Ts(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function ws(e){return e=(e||0)%360,e<0?e+360:e}function Ts(e){return Math.max(0,Math.min(1,e||0))}function Es(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var Ds=(globalThis==null?void 0:globalThis.UNOVIS_COLORS)||[`#4D8CFD`,`#FF6B7E`,`#F4B83E`,`#A6CC74`,`#00C19A`,`#6859BE`],Os=(globalThis==null?void 0:globalThis.UNOVIS_COLORS_DARK)||[`#4D8CFD`,`#FF6B7E`,`#FFC16D`,`#A6CC74`,`#00C19A`,`#7887E0`],ks=e=>`--vis-${Hn(e)?`color${e%Ds.length}`:e}`;function As(e,t=.4){let n=Ss(e);return n.l*=1+t,n.formatHex()}function js(e,t=.4,n=.6){let r=Ss(e);return r.s*=1-n,r.l*=1-t,r.formatHex()}var Ms=[{id:`stripes-diagonal`,svg:`<path d="M-1,1 l2,-2 M0,10 l10,-10 M9,11 l2,-2" stroke="#000"/>`},{id:`dots`,svg:`<path d="m0-1.5a1 1 0 010 3m10-3a1 1 0 000 3M5 3.5a1 1 0 010 3 1 1 0 010-3M0 8.5 a1 1 0 010 3m10-3a1 1 0 000 3" fill"#000"/>`},{id:`stripes-vertical`,svg:`<path d="M 5,-1 L5,11" stroke="#000"/>`},{id:`crosshatch`,svg:`<path d="M0 0L10 10ZM10 0L0 10Z" stroke="#000"/>`},{id:`waves`,svg:`<path d="M0 4Q2.5 1 5 4 7.5 7 10 4v2Q7.5 9 5 6 2.5 3 0 6Z" fill="#000"/>`},{id:`circles`,svg:`<circle cx="5" cy="5" r="3" stroke="#000" fill="#fff"/>`}],Ns=[{id:`circle`,marker:`<circle cx="5" cy="5" r="5"/>`,dashArray:[]},{id:`triangle`,marker:`<path d="M5,0 L10,9 L0,9Z">`,dashArray:[9,1]},{id:`diamond`,marker:`<path d="M 0 5 L5 0 L 10 5 L 5 10 L 0 5Z">`,dashArray:[2]},{id:`arrow`,marker:`<path d="M4 0 0 0 6 5 0 10 4 10 10 5Z">`,dashArray:[2,3,8,3]},{id:`square`,marker:`<rect x="1" y="1" width="8" height="8"/>`,dashArray:[6]},{id:`star`,marker:`<path d="m2 9 3-9 3 9L0 3h10Z"/>`,dashArray:[1,6]}];function Ps(e){return`vis-${`pattern-${e.svg?`fill`:`marker`}`}-${e.id}`}var Fs=e=>`<mask id="${Ps(e)}">
<pattern id="${e.id}" viewBox="0 0 10 10" width="10" height="10" patternUnits="userSpaceOnUse">
<rect width="100%" height="100%" fill="#fff"/>
${e.svg}
</pattern>
<rect x="-50%" y="-50%" width="200%" height="200%" fill="url(#${e.id})"/>
</mask>`,Is=(e,t)=>`<marker id="${Ps(e)}"
fill="var(${ks(t)})"
markerUnits="userSpaceOnUse"
refX="5"
refY="5"
markerWidth="10"
markerHeight="10">
${e.marker}
</marker>`;function Ls(){let e=Ms.map(Fs).concat(Ns.map(Is)).join(``),t=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);t.setAttribute(`height`,`100%`),t.setAttribute(`width`,`100%`),t.style.position=`fixed`,t.style.zIndex=`-99999999`,t.innerHTML=`<defs>${e}</defs>`,document.body.appendChild(t)}typeof window<`u`&&Ls(),globalThis!=null&&globalThis.UNOVIS_ICON_FONT_FAMILY;var Rs=(globalThis==null?void 0:globalThis.UNOVIS_FONT_W2H_RATIO_DEFAULT)||.5,zs=(globalThis==null?void 0:globalThis.UNOVIS_TEXT_SEPARATOR_DEFAULT)||[` `,`-`,`.`,`,`],Bs=(globalThis==null?void 0:globalThis.UNOVIS_TEXT_HYPHEN_CHARACTER_DEFAULT)||`-`,Vs=(globalThis==null?void 0:globalThis.UNOVIS_TEXT_DEFAULT)||{text:``,fontSize:12,fontFamily:`var(--vis-font-family)`,lineHeight:1.25,marginTop:0,marginBottom:0};un`
:root {
label: vis-root-styles;
--vis-font-family: Inter, Arial, "Helvetica Neue", Helvetica, sans-serif;
--vis-font-wh-ratio: ${Rs};
--vis-color-main: var(${ks(0)});
--vis-color-main-light: ${As(Ds[0])};
--vis-color-main-dark: ${js(Ds[0])};
--vis-color-grey: #2a2a2a;
${Ds.map((e,t)=>`${ks(t)}: ${e};`)}
${Os.map((e,t)=>`--vis-dark-color${t}: ${e};`)}
${Ms.map((e,t)=>`
--${Ps(e)}: url(#${Ps(e)});
--vis-pattern-fill${t}: var(--${Ps(e)});
`)}
${Ns.map((e,t)=>`
--${Ps(e)}: url(#${Ps(e)});
--vis-pattern-marker${t}: var(--${Ps(e)});
--vis-pattern-dasharray${t}: ${e.dashArray?.join(` `)};
`)}
body.theme-dark {
${Ds.map((e,t)=>`${ks(t)}: var(--vis-dark-color${t});`)}
}
body.theme-patterns {
${Ms.map((e,t)=>`path[style*="fill: var(${ks(t)})"] {
mask: var(--vis-pattern-fill${t});
}`)}
${Ns.map((e,t)=>`
path[stroke="var(${ks(t)})"]:not([style*="fill"]),
path[style*="stroke: var(${ks(t)})"]:not([style*="fill"]) {
marker: var(--vis-pattern-marker${t});
stroke-dasharray: var(--vis-pattern-dasharray${t});
}
`)}
}
`;function Hs(e=window==null?void 0:window.document.body){return e?+Vo(`var(--vis-font-wh-ratio)`,e):Rs}var Us=pr(`start`,`end`,`cancel`,`interrupt`),Ws=[];function Gs(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;Ys(e,n,{name:t,index:r,group:i,on:Us,tween:Ws,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function Ks(e,t){var n=Js(e,t);if(n.state>0)throw Error(`too late; already scheduled`);return n}function qs(e,t){var n=Js(e,t);if(n.state>3)throw Error(`too late; already running`);return n}function Js(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw Error(`transition not found`);return n}function Ys(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=Mr(a,0,n.time);function a(e){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=e&&o(e-n.delay)}function o(a){var l,u,d,f;if(n.state!==1)return c();for(l in r)if(f=r[l],f.name===n.name){if(f.state===3)return Rr(o);f.state===4?(f.state=6,f.timer.stop(),f.on.call(`interrupt`,e,e.__data__,f.index,f.group),delete r[l]):+l<t&&(f.state=6,f.timer.stop(),f.on.call(`cancel`,e,e.__data__,f.index,f.group),delete r[l])}if(Rr(function(){n.state===3&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(a))}),n.state=2,n.on.call(`start`,e,e.__data__,n.index,n.group),n.state===2){for(n.state=3,i=Array(d=n.tween.length),l=0,u=-1;l<d;++l)(f=n.tween[l].value.call(e,e.__data__,n.index,n.group))&&(i[++u]=f);i.length=u+1}}function s(t){for(var r=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(c),n.state=5,1),a=-1,o=i.length;++a<o;)i[a].call(e,r);n.state===5&&(n.on.call(`end`,e,e.__data__,n.index,n.group),c())}function c(){for(var i in n.state=6,n.timer.stop(),delete r[t],r)return;delete e.__transition}}function Xs(e,t){var n=e.__transition,r,i,a=!0,o;if(n){for(o in t=t==null?null:t+``,n){if((r=n[o]).name!==t){a=!1;continue}i=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?`interrupt`:`cancel`,e,e.__data__,r.index,r.group),delete n[o]}a&&delete e.__transition}}function Zs(e){return this.each(function(){Xs(this,e)})}var Qs=e=>()=>e;function $s(e,t){return function(n){return e+n*t}}function ec(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function tc(e){return(e=+e)==1?nc:function(t,n){return n-t?ec(t,n,e):Qs(isNaN(t)?n:t)}}function nc(e,t){var n=t-e;return n?$s(e,n):Qs(isNaN(e)?t:e)}var rc=(function e(t){var n=tc(t);function r(e,t){var r=n((e=ps(e)).r,(t=ps(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=nc(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function ic(e,t){t||=[];var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function ac(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function oc(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o;for(o=0;o<r;++o)i[o]=hc(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(e){for(o=0;o<r;++o)a[o]=i[o](e);return a}}function sc(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function cc(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function lc(e,t){var n={},r={},i;for(i in(typeof e!=`object`||!e)&&(e={}),(typeof t!=`object`||!t)&&(t={}),t)i in e?n[i]=hc(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}var uc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,dc=new RegExp(uc.source,`g`);function fc(e){return function(){return e}}function pc(e){return function(t){return e(t)+``}}function mc(e,t){var n=uc.lastIndex=dc.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=uc.exec(e))&&(i=dc.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:cc(r,i)})),n=dc.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?pc(c[0].x):fc(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}function hc(e,t){var n=typeof t,r;return t==null||n===`boolean`?Qs(t):(n===`number`?cc:n===`string`?(r=ls(t))?(t=r,rc):mc:t instanceof ls?rc:t instanceof Date?sc:ac(t)?ic:Array.isArray(t)?oc:typeof t.valueOf!=`function`&&typeof t.toString!=`function`||isNaN(t)?lc:cc)(e,t)}function gc(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var _c=180/Math.PI,vc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function yc(e,t,n,r,i,a){var o,s,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),e*r<t*n&&(e=-e,t=-t,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*_c,skewX:Math.atan(c)*_c,scaleX:o,scaleY:s}}var bc;function xc(e){let t=new(typeof DOMMatrix==`function`?DOMMatrix:WebKitCSSMatrix)(e+``);return t.isIdentity?vc:yc(t.a,t.b,t.c,t.d,t.e,t.f)}function Sc(e){return e==null||(bc||=document.createElementNS(`http://www.w3.org/2000/svg`,`g`),bc.setAttribute(`transform`,e),!(e=bc.transform.baseVal.consolidate()))?vc:(e=e.matrix,yc(e.a,e.b,e.c,e.d,e.e,e.f))}function Cc(e,t,n,r){function i(e){return e.length?e.pop()+` `:``}function a(e,r,i,a,o,s){if(e!==i||r!==a){var c=o.push(`translate(`,null,t,null,n);s.push({i:c-4,x:cc(e,i)},{i:c-2,x:cc(r,a)})}else (i||a)&&o.push(`translate(`+i+t+a+n)}function o(e,t,n,a){e===t?t&&n.push(i(n)+`rotate(`+t+r):(e-t>180?t+=360:t-e>180&&(e+=360),a.push({i:n.push(i(n)+`rotate(`,null,r)-2,x:cc(e,t)}))}function s(e,t,n,a){e===t?t&&n.push(i(n)+`skewX(`+t+r):a.push({i:n.push(i(n)+`skewX(`,null,r)-2,x:cc(e,t)})}function c(e,t,n,r,a,o){if(e!==n||t!==r){var s=a.push(i(a)+`scale(`,null,`,`,null,`)`);o.push({i:s-4,x:cc(e,n)},{i:s-2,x:cc(t,r)})}else (n!==1||r!==1)&&a.push(i(a)+`scale(`+n+`,`+r+`)`)}return function(t,n){var r=[],i=[];return t=e(t),n=e(n),a(t.translateX,t.translateY,n.translateX,n.translateY,r,i),o(t.rotate,n.rotate,r,i),s(t.skewX,n.skewX,r,i),c(t.scaleX,t.scaleY,n.scaleX,n.scaleY,r,i),t=n=null,function(e){for(var t=-1,n=i.length,a;++t<n;)r[(a=i[t]).i]=a.x(e);return r.join(``)}}}var wc=Cc(xc,`px, `,`px)`,`deg)`),Tc=Cc(Sc,`, `,`)`,`)`);function Ec(e,t){t===void 0&&(t=e,e=hc);for(var n=0,r=t.length-1,i=t[0],a=Array(r<0?0:r);n<r;)a[n]=e(i,i=t[++n]);return function(e){var t=Math.max(0,Math.min(r-1,Math.floor(e*=r)));return a[t](e-t)}}function Dc(e,t){var n,r;return function(){var i=qs(this,e),a=i.tween;if(a!==n){r=n=a;for(var o=0,s=r.length;o<s;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function Oc(e,t,n){var r,i;if(typeof n!=`function`)throw Error();return function(){var a=qs(this,e),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:t,value:n},c=0,l=i.length;c<l;++c)if(i[c].name===t){i[c]=s;break}c===l&&i.push(s)}a.tween=i}}function kc(e,t){var n=this._id;if(e+=``,arguments.length<2){for(var r=Js(this.node(),n).tween,i=0,a=r.length,o;i<a;++i)if((o=r[i]).name===e)return o.value;return null}return this.each((t==null?Dc:Oc)(n,e,t))}function Ac(e,t,n){var r=e._id;return e.each(function(){var e=qs(this,r);(e.value||={})[t]=n.apply(this,arguments)}),function(e){return Js(e,r).value[t]}}function jc(e,t){var n;return(typeof t==`number`?cc:t instanceof ls?rc:(n=ls(t))?(t=n,rc):mc)(e,t)}function Mc(e){return function(){this.removeAttribute(e)}}function Nc(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Pc(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttribute(e);return o===i?null:o===r?a:a=t(r=o,n)}}function Fc(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===r?a:a=t(r=o,n)}}function Ic(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function Lc(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function Rc(e,t){var n=Br(e),r=n===`transform`?Tc:jc;return this.attrTween(e,typeof t==`function`?(n.local?Lc:Ic)(n,r,Ac(this,`attr.`+e,t)):t==null?(n.local?Nc:Mc)(n):(n.local?Fc:Pc)(n,r,t))}function zc(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Bc(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Vc(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&Bc(e,i)),n}return i._value=t,i}function Hc(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&zc(e,i)),n}return i._value=t,i}function Uc(e,t){var n=`attr.`+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!=`function`)throw Error();var r=Br(e);return this.tween(n,(r.local?Vc:Hc)(r,t))}function Wc(e,t){return function(){Ks(this,e).delay=+t.apply(this,arguments)}}function Gc(e,t){return t=+t,function(){Ks(this,e).delay=t}}function Kc(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?Wc:Gc)(t,e)):Js(this.node(),t).delay}function qc(e,t){return function(){qs(this,e).duration=+t.apply(this,arguments)}}function Jc(e,t){return t=+t,function(){qs(this,e).duration=t}}function Yc(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?qc:Jc)(t,e)):Js(this.node(),t).duration}function Xc(e,t){if(typeof t!=`function`)throw Error();return function(){qs(this,e).ease=t}}function Zc(e){var t=this._id;return arguments.length?this.each(Xc(t,e)):Js(this.node(),t).ease}function Qc(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!=`function`)throw Error();qs(this,e).ease=n}}function $c(e){if(typeof e!=`function`)throw Error();return this.each(Qc(this._id,e))}function el(e){typeof e!=`function`&&(e=Qr(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new kl(r,this._parents,this._name,this._id)}function tl(e){if(e._id!==this._id)throw Error();for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),o=Array(r),s=0;s<a;++s)for(var c=t[s],l=n[s],u=c.length,d=o[s]=Array(u),f,p=0;p<u;++p)(f=c[p]||l[p])&&(d[p]=f);for(;s<r;++s)o[s]=t[s];return new kl(o,this._parents,this._name,this._id)}function nl(e){return(e+``).trim().split(/^|\s+/).every(function(e){var t=e.indexOf(`.`);return t>=0&&(e=e.slice(0,t)),!e||e===`start`})}function rl(e,t,n){var r,i,a=nl(t)?Ks:qs;return function(){var o=a(this,e),s=o.on;s!==r&&(i=(r=s).copy()).on(t,n),o.on=i}}function il(e,t){var n=this._id;return arguments.length<2?Js(this.node(),n).on.on(e):this.each(rl(n,e,t))}function al(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function ol(){return this.on(`end.remove`,al(this._id))}function sl(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=Gr(e));for(var r=this._groups,i=r.length,a=Array(i),o=0;o<i;++o)for(var s=r[o],c=s.length,l=a[o]=Array(c),u,d,f=0;f<c;++f)(u=s[f])&&(d=e.call(u,u.__data__,f,s))&&(`__data__`in u&&(d.__data__=u.__data__),l[f]=d,Gs(l[f],t,n,f,l,Js(u,n)));return new kl(a,this._parents,t,n)}function cl(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=Yr(e));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c=r[s],l=c.length,u,d=0;d<l;++d)if(u=c[d]){for(var f=e.call(u,u.__data__,d,c),p,m=Js(u,n),h=0,g=f.length;h<g;++h)(p=f[h])&&Gs(p,t,n,h,f,m);a.push(f),o.push(u)}return new kl(a,o,t,n)}var ll=Pa.prototype.constructor;function ul(){return new ll(this._groups,this._parents)}function dl(e,t){var n,r,i;return function(){var a=Hi(this,e),o=(this.style.removeProperty(e),Hi(this,e));return a===o?null:a===n&&o===r?i:i=t(n=a,r=o)}}function fl(e){return function(){this.style.removeProperty(e)}}function pl(e,t,n){var r,i=n+``,a;return function(){var o=Hi(this,e);return o===i?null:o===r?a:a=t(r=o,n)}}function ml(e,t,n){var r,i,a;return function(){var o=Hi(this,e),s=n(this),c=s+``;return s??(c=s=(this.style.removeProperty(e),Hi(this,e))),o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s))}}function hl(e,t){var n,r,i,a=`style.`+t,o=`end.`+a,s;return function(){var c=qs(this,e),l=c.on,u=c.value[a]==null?s||=fl(t):void 0;(l!==n||i!==u)&&(r=(n=l).copy()).on(o,i=u),c.on=r}}function gl(e,t,n){var r=(e+=``)==`transform`?wc:jc;return t==null?this.styleTween(e,dl(e,r)).on(`end.style.`+e,fl(e)):typeof t==`function`?this.styleTween(e,ml(e,r,Ac(this,`style.`+e,t))).each(hl(this._id,e)):this.styleTween(e,pl(e,r,t),n).on(`end.style.`+e,null)}function _l(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function vl(e,t,n){var r,i;function a(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&_l(e,a,n)),r}return a._value=t,a}function yl(e,t,n){var r=`style.`+(e+=``);if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!=`function`)throw Error();return this.tween(r,vl(e,t,n??``))}function bl(e){return function(){this.textContent=e}}function xl(e){return function(){this.textContent=e(this)??``}}function Sl(e){return this.tween(`text`,typeof e==`function`?xl(Ac(this,`text`,e)):bl(e==null?``:e+``))}function Cl(e){return function(t){this.textContent=e.call(this,t)}}function wl(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&Cl(r)),t}return r._value=e,r}function Tl(e){var t=`text`;if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!=`function`)throw Error();return this.tween(t,wl(e))}function El(){for(var e=this._name,t=this._id,n=jl(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)if(c=o[l]){var u=Js(c,t);Gs(c,e,n,l,o,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new kl(r,this._parents,e,n)}function Dl(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var s={value:o},c={value:function(){--i===0&&a()}};n.each(function(){var n=qs(this,r),i=n.on;i!==e&&(t=(e=i).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),n.on=t}),i===0&&a()})}var Ol=0;function kl(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Al(e){return Pa().transition(e)}function jl(){return++Ol}var Ml=Pa.prototype;kl.prototype=Al.prototype={constructor:kl,select:sl,selectAll:cl,selectChild:Ml.selectChild,selectChildren:Ml.selectChildren,filter:el,merge:tl,selection:ul,transition:El,call:Ml.call,nodes:Ml.nodes,node:Ml.node,size:Ml.size,empty:Ml.empty,each:Ml.each,on:il,attr:Rc,attrTween:Uc,style:gl,styleTween:yl,text:Sl,textTween:Tl,remove:ol,tween:kc,delay:Kc,duration:Yc,ease:Zc,easeVarying:$c,end:Dl,[Symbol.iterator]:Ml[Symbol.iterator]};var Nl=e=>+e;function Pl(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Fl={time:null,delay:0,duration:250,ease:Pl};function Il(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw Error(`transition ${t} not found`);return n}function Ll(e){var t,n;e instanceof kl?(t=e._id,e=e._name):(t=jl(),(n=Fl).time=kr(),e=e==null?null:e+``);for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&Gs(c,e,t,l,o,n||Il(c,t));return new kl(r,this._parents,e,t)}Pa.prototype.interrupt=Zs,Pa.prototype.transition=Ll;function W(e,t,n){if(e.nodes().forEach(e=>Xs(e)),t){let r=e.transition().duration(t);return n&&r.ease(n),r}else return e}var Rl=class{constructor(e){this.data=e}get data(){return this._data}set data(e){this._data=e}},G;(function(e){e.X=`x`,e.Y=`y`})(G||={});function zl(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Bl(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}var Vl=Symbol(`implicit`);function Hl(){var e=new bn,t=[],n=[],r=Vl;function i(i){let a=e.get(i);if(a===void 0){if(r!==Vl)return r;e.set(i,a=t.push(i)-1)}return n[a%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new bn;for(let r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return Hl(t,n).unknown(r)},zl.apply(i,arguments),i}function Ul(){var e=Hl().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,o,s=!1,c=0,l=0,u=.5;delete e.unknown;function d(){var e=t().length,d=i<r,f=d?i:r,p=d?r:i;a=(p-f)/Math.max(1,e-c+l*2),s&&(a=Math.floor(a)),f+=(p-f-a*(e-c))*u,o=a*(1-c),s&&(f=Math.round(f),o=Math.round(o));var m=Rn(e).map(function(e){return f+a*e});return n(d?m.reverse():m)}return e.domain=function(e){return arguments.length?(t(e),d()):t()},e.range=function(e){return arguments.length?([r,i]=e,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(e){return[r,i]=e,r=+r,i=+i,s=!0,d()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(e){return arguments.length?(s=!!e,d()):s},e.padding=function(e){return arguments.length?(c=Math.min(1,l=+e),d()):c},e.paddingInner=function(e){return arguments.length?(c=Math.min(1,e),d()):c},e.paddingOuter=function(e){return arguments.length?(l=+e,d()):l},e.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},e.copy=function(){return Ul(t(),[r,i]).round(s).paddingInner(c).paddingOuter(l).align(u)},zl.apply(d(),arguments)}function Wl(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Wl(t())},e}function Gl(){return Wl(Ul.apply(null,arguments).paddingInner(1))}function Kl(e){return function(){return e}}function ql(e){return+e}var Jl=[0,1];function K(e){return e}function Yl(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:Kl(isNaN(t)?NaN:.5)}function Xl(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}function Zl(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=Yl(i,r),a=n(o,a)):(r=Yl(r,i),a=n(a,o)),function(e){return a(r(e))}}function Ql(e,t,n){var r=Math.min(e.length,t.length)-1,i=Array(r),a=Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=Yl(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(t){var n=_n(e,t,1,r)-1;return a[n](i[n](t))}}function $l(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function eu(){var e=Jl,t=Jl,n=hc,r,i,a,o=K,s,c,l;function u(){var n=Math.min(e.length,t.length);return o!==K&&(o=Xl(e[0],e[n-1])),s=n>2?Ql:Zl,c=l=null,d}function d(i){return i==null||isNaN(i=+i)?a:(c||=s(e.map(r),t,n))(r(o(i)))}return d.invert=function(n){return o(i((l||=s(t,e.map(r),cc))(n)))},d.domain=function(t){return arguments.length?(e=Array.from(t,ql),u()):e.slice()},d.range=function(e){return arguments.length?(t=Array.from(e),u()):t.slice()},d.rangeRound=function(e){return t=Array.from(e),n=gc,u()},d.clamp=function(e){return arguments.length?(o=e?!0:K,u()):o!==K},d.interpolate=function(e){return arguments.length?(n=e,u()):n},d.unknown=function(e){return arguments.length?(a=e,d):a},function(e,t){return r=e,i=t,u()}}function tu(){return eu()(K,K)}function nu(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(`en`).replace(/,/g,``):e.toString(10)}function ru(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 iu(e){return e=ru(Math.abs(e)),e?e[1]:NaN}function au(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function ou(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var su=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function cu(e){if(!(t=su.exec(e)))throw Error(`invalid format: `+e);var t;return new lu({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]})}cu.prototype=lu.prototype;function lu(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+``}lu.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 uu(e){out:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case`.`:r=i=n;break;case`0`:r===0&&(r=n),i=n;break;default:if(!+e[n])break out;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var du;function fu(e,t){var n=ru(e,t);if(!n)return e+``;var r=n[0],i=n[1],a=i-(du=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+Array(a-o+1).join(`0`):a>0?r.slice(0,a)+`.`+r.slice(a):`0.`+Array(1-a).join(`0`)+ru(e,Math.max(0,t+a-1))[0]}function pu(e,t){var n=ru(e,t);if(!n)return e+``;var r=n[0],i=n[1];return i<0?`0.`+Array(-i).join(`0`)+r:r.length>i+1?r.slice(0,i+1)+`.`+r.slice(i+1):r+Array(i-r.length+2).join(`0`)}var mu={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+``,d:nu,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)=>pu(e*100,t),r:pu,s:fu,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function hu(e){return e}var gu=Array.prototype.map,_u=[`y`,`z`,`a`,`f`,`p`,`n`,`µ`,`m`,``,`k`,`M`,`G`,`T`,`P`,`E`,`Z`,`Y`];function vu(e){var t=e.grouping===void 0||e.thousands===void 0?hu:au(gu.call(e.grouping,Number),e.thousands+``),n=e.currency===void 0?``:e.currency[0]+``,r=e.currency===void 0?``:e.currency[1]+``,i=e.decimal===void 0?`.`:e.decimal+``,a=e.numerals===void 0?hu:ou(gu.call(e.numerals,String)),o=e.percent===void 0?`%`:e.percent+``,s=e.minus===void 0?``:e.minus+``,c=e.nan===void 0?`NaN`:e.nan+``;function l(e){e=cu(e);var l=e.fill,u=e.align,d=e.sign,f=e.symbol,p=e.zero,m=e.width,h=e.comma,g=e.precision,_=e.trim,v=e.type;v===`n`?(h=!0,v=`g`):mu[v]||(g===void 0&&(g=12),_=!0,v=`g`),(p||l===`0`&&u===`=`)&&(p=!0,l=`0`,u=`=`);var y=f===`$`?n:f===`#`&&/[boxX]/.test(v)?`0`+v.toLowerCase():``,b=f===`$`?r:/[%p]/.test(v)?o:``,x=mu[v],S=/[defgprs%]/.test(v);g=g===void 0?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g));function C(e){var n=y,r=b,o,f,C;if(v===`c`)r=x(e)+r,e=``;else{e=+e;var w=e<0||1/e<0;if(e=isNaN(e)?c:x(Math.abs(e),g),_&&(e=uu(e)),w&&+e==0&&d!==`+`&&(w=!1),n=(w?d===`(`?d:s:d===`-`||d===`(`?``:d)+n,r=(v===`s`?_u[8+du/3]:``)+r+(w&&d===`(`?`)`:``),S){for(o=-1,f=e.length;++o<f;)if(C=e.charCodeAt(o),48>C||C>57){r=(C===46?i+e.slice(o+1):e.slice(o))+r,e=e.slice(0,o);break}}}h&&!p&&(e=t(e,1/0));var T=n.length+e.length+r.length,E=T<m?Array(m-T+1).join(l):``;switch(h&&p&&(e=t(E+e,E.length?m-r.length:1/0),E=``),u){case`<`:e=n+e+r+E;break;case`=`:e=n+E+e+r;break;case`^`:e=E.slice(0,T=E.length>>1)+n+e+r+E.slice(T);break;default:e=E+n+e+r;break}return a(e)}return C.toString=function(){return e+``},C}function u(e,t){var n=l((e=cu(e),e.type=`f`,e)),r=Math.max(-8,Math.min(8,Math.floor(iu(t)/3)))*3,i=10**-r,a=_u[8+r/3];return function(e){return n(i*e)+a}}return{format:l,formatPrefix:u}}var yu,bu,xu;Su({thousands:`,`,grouping:[3],currency:[`$`,``]});function Su(e){return yu=vu(e),bu=yu.format,xu=yu.formatPrefix,yu}function Cu(e){return Math.max(0,-iu(Math.abs(e)))}function wu(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(iu(t)/3)))*3-iu(Math.abs(e)))}function Tu(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,iu(t)-iu(e))+1}function Eu(e,t,n,r){var i=jn(e,t,n),a;switch(r=cu(r??`,f`),r.type){case`s`:var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=wu(i,o))&&(r.precision=a),xu(r,o);case``:case`e`:case`g`:case`p`:case`r`:r.precision==null&&!isNaN(a=Tu(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type===`e`));break;case`f`:case`%`:r.precision==null&&!isNaN(a=Cu(i))&&(r.precision=a-(r.type===`%`)*2);break}return bu(r)}function Du(e){var t=e.domain;return e.ticks=function(e){var n=t();return kn(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return Eu(r[0],r[r.length-1],e??10,n)},e.nice=function(n){n??=10;var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],c,l,u=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);u-- >0;){if(l=An(o,s,n),l===c)return r[i]=o,r[a]=s,t(r);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function Ou(){var e=tu();return e.copy=function(){return $l(e,Ou())},zl.apply(e,arguments),Du(e)}function ku(e){var t;function n(e){return e==null||isNaN(e=+e)?t:e}return n.invert=n,n.domain=n.range=function(t){return arguments.length?(e=Array.from(t,ql),n):e.slice()},n.unknown=function(e){return arguments.length?(t=e,n):t},n.copy=function(){return ku(e).unknown(t)},e=arguments.length?Array.from(e,ql):[0,1],Du(n)}function Au(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a<i&&(o=n,n=r,r=o,o=i,i=a,a=o),e[n]=t.floor(i),e[r]=t.ceil(a),e}function ju(e){return Math.log(e)}function Mu(e){return Math.exp(e)}function Nu(e){return-Math.log(-e)}function Pu(e){return-Math.exp(-e)}function Fu(e){return isFinite(e)?+(`1e`+e):e<0?0:e}function Iu(e){return e===10?Fu:e===Math.E?Math.exp:t=>e**+t}function Lu(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 Ru(e){return(t,n)=>-e(-t,n)}function zu(e){let t=e(ju,Mu),n=t.domain,r=10,i,a;function o(){return i=Lu(r),a=Iu(r),n()[0]<0?(i=Ru(i),a=Ru(a),e(Nu,Pu)):e(ju,Mu),t}return t.base=function(e){return arguments.length?(r=+e,o()):r},t.domain=function(e){return arguments.length?(n(e),o()):n()},t.ticks=e=>{let t=n(),o=t[0],s=t[t.length-1],c=s<o;c&&([o,s]=[s,o]);let l=i(o),u=i(s),d,f,p=e==null?10:+e,m=[];if(!(r%1)&&u-l<p){if(l=Math.floor(l),u=Math.ceil(u),o>0){for(;l<=u;++l)for(d=1;d<r;++d)if(f=l<0?d/a(-l):d*a(l),!(f<o)){if(f>s)break;m.push(f)}}else for(;l<=u;++l)for(d=r-1;d>=1;--d)if(f=l>0?d/a(-l):d*a(l),!(f<o)){if(f>s)break;m.push(f)}m.length*2<p&&(m=kn(o,s,p))}else m=kn(l,u,Math.min(u-l,p)).map(a);return c?m.reverse():m},t.tickFormat=(e,n)=>{if(e??=10,n??=r===10?`s`:`,`,typeof n!=`function`&&(!(r%1)&&(n=cu(n)).precision==null&&(n.trim=!0),n=bu(n)),e===1/0)return n;let o=Math.max(1,r*e/t.ticks().length);return e=>{let t=e/a(Math.round(i(e)));return t*r<r-.5&&(t*=r),t<=o?n(e):``}},t.nice=()=>n(Au(n(),{floor:e=>a(Math.floor(i(e))),ceil:e=>a(Math.ceil(i(e)))})),t}function Bu(){let e=zu(eu()).domain([1,10]);return e.copy=()=>$l(e,Bu()).base(e.base()),zl.apply(e,arguments),e}function Vu(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Hu(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Uu(e){var t=1,n=e(Vu(t),Hu(t));return n.constant=function(n){return arguments.length?e(Vu(t=+n),Hu(t)):t},Du(n)}function Wu(){var e=Uu(eu());return e.copy=function(){return $l(e,Wu()).constant(e.constant())},zl.apply(e,arguments)}function Gu(e){return function(t){return t<0?-((-t)**+e):t**+e}}function Ku(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function qu(e){return e<0?-e*e:e*e}function Ju(e){var t=e(K,K),n=1;function r(){return n===1?e(K,K):n===.5?e(Ku,qu):e(Gu(n),Gu(1/n))}return t.exponent=function(e){return arguments.length?(n=+e,r()):n},Du(t)}function Yu(){var e=Ju(eu());return e.copy=function(){return $l(e,Yu()).exponent(e.exponent())},zl.apply(e,arguments),e}function Xu(){return Yu.apply(null,arguments).exponent(.5)}function Zu(){var e=[],t=[],n=[],r;function i(){var r=0,i=Math.max(1,t.length);for(n=Array(i-1);++r<i;)n[r-1]=Pn(e,r/i);return a}function a(e){return e==null||isNaN(e=+e)?r:t[_n(n,e)]}return a.invertExtent=function(r){var i=t.indexOf(r);return i<0?[NaN,NaN]:[i>0?n[i-1]:e[0],i<n.length?n[i]:e[e.length-1]]},a.domain=function(t){if(!arguments.length)return e.slice();e=[];for(let n of t)n!=null&&!isNaN(n=+n)&&e.push(n);return e.sort(dn),i()},a.range=function(e){return arguments.length?(t=Array.from(e),i()):t.slice()},a.unknown=function(e){return arguments.length?(r=e,a):r},a.quantiles=function(){return n.slice()},a.copy=function(){return Zu().domain(e).range(t).unknown(r)},zl.apply(a,arguments)}function Qu(){var e=0,t=1,n=1,r=[.5],i=[0,1],a;function o(e){return e!=null&&e<=e?i[_n(r,e,0,n)]:a}function s(){var i=-1;for(r=Array(n);++i<n;)r[i]=((i+1)*t-(i-n)*e)/(n+1);return o}return o.domain=function(n){return arguments.length?([e,t]=n,e=+e,t=+t,s()):[e,t]},o.range=function(e){return arguments.length?(n=(i=Array.from(e)).length-1,s()):i.slice()},o.invertExtent=function(a){var o=i.indexOf(a);return o<0?[NaN,NaN]:o<1?[e,r[0]]:o>=n?[r[n-1],t]:[r[o-1],r[o]]},o.unknown=function(e){return arguments.length&&(a=e),o},o.thresholds=function(){return r.slice()},o.copy=function(){return Qu().domain([e,t]).range(i).unknown(a)},zl.apply(Du(o),arguments)}function $u(){var e=[.5],t=[0,1],n,r=1;function i(i){return i!=null&&i<=i?t[_n(e,i,0,r)]:n}return i.domain=function(n){return arguments.length?(e=Array.from(n),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(n){return arguments.length?(t=Array.from(n),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(n){var r=t.indexOf(n);return[e[r-1],e[r]]},i.unknown=function(e){return arguments.length?(n=e,i):n},i.copy=function(){return $u().domain(e).range(t).unknown(n)},zl.apply(i,arguments)}var ed=new Date,td=new Date;function q(e,t,n,r){function i(t){return e(t=arguments.length===0?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{let t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),n==null?1:Math.floor(n)),e),i.range=(n,r,a)=>{let o=[];if(n=i.ceil(n),a=a==null?1:Math.floor(a),!(n<r)||!(a>0))return o;let s;do o.push(s=new Date(+n)),t(n,a),e(n);while(s<n&&n<r);return o},i.filter=n=>q(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(i.count=(t,r)=>(ed.setTime(+t),td.setTime(+r),e(ed),e(td),Math.floor(n(ed,td))),i.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i)),i}var nd=q(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);nd.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?q(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):nd),nd.range;var rd=1e3,id=rd*60,ad=id*60,od=ad*24,sd=od*7,cd=od*30,ld=od*365,ud=q(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*rd)},(e,t)=>(t-e)/rd,e=>e.getUTCSeconds());ud.range;var dd=q(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*rd)},(e,t)=>{e.setTime(+e+t*id)},(e,t)=>(t-e)/id,e=>e.getMinutes());dd.range;var fd=q(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*id)},(e,t)=>(t-e)/id,e=>e.getUTCMinutes());fd.range;var pd=q(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*rd-e.getMinutes()*id)},(e,t)=>{e.setTime(+e+t*ad)},(e,t)=>(t-e)/ad,e=>e.getHours());pd.range;var md=q(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ad)},(e,t)=>(t-e)/ad,e=>e.getUTCHours());md.range;var hd=q(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*id)/od,e=>e.getDate()-1);hd.range;var gd=q(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/od,e=>e.getUTCDate()-1);gd.range;var _d=q(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/od,e=>Math.floor(e/od));_d.range;function vd(e){return q(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+t*7)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*id)/sd)}var yd=vd(0),bd=vd(1),xd=vd(2),Sd=vd(3),Cd=vd(4),wd=vd(5),Td=vd(6);yd.range,bd.range,xd.range,Sd.range,Cd.range,wd.range,Td.range;function Ed(e){return q(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t*7)},(e,t)=>(t-e)/sd)}var Dd=Ed(0),Od=Ed(1),kd=Ed(2),Ad=Ed(3),jd=Ed(4),Md=Ed(5),Nd=Ed(6);Dd.range,Od.range,kd.range,Ad.range,jd.range,Md.range,Nd.range;var Pd=q(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());Pd.range;var Fd=q(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());Fd.range;var Id=q(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());Id.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:q(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)}),Id.range;var Ld=q(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());Ld.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:q(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)}),Ld.range;function Rd(e,t,n,r,i,a){let o=[[ud,1,rd],[ud,5,5*rd],[ud,15,15*rd],[ud,30,30*rd],[a,1,id],[a,5,5*id],[a,15,15*id],[a,30,30*id],[i,1,ad],[i,3,3*ad],[i,6,6*ad],[i,12,12*ad],[r,1,od],[r,2,2*od],[n,1,sd],[t,1,cd],[t,3,3*cd],[e,1,ld]];function s(e,t,n){let r=t<e;r&&([e,t]=[t,e]);let i=n&&typeof n.range==`function`?n:c(e,t,n),a=i?i.range(e,+t+1):[];return r?a.reverse():a}function c(t,n,r){let i=Math.abs(n-t)/r,a=pn(([,,e])=>e).right(o,i);if(a===o.length)return e.every(jn(t/ld,n/ld,r));if(a===0)return nd.every(Math.max(jn(t,n,r),1));let[s,c]=o[i/o[a-1][2]<o[a][2]/i?a-1:a];return s.every(c)}return[s,c]}var[zd,Bd]=Rd(Ld,Fd,Dd,_d,md,fd),[Vd,Hd]=Rd(Id,Pd,yd,hd,pd,dd);function Ud(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 Wd(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 Gd(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function Kd(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,c=e.shortMonths,l=Zd(i),u=Qd(i),d=Zd(a),f=Qd(a),p=Zd(o),m=Qd(o),h=Zd(s),g=Qd(s),_=Zd(c),v=Qd(c),y={a:k,A:ie,b:A,B:ae,c:null,d:bf,e:bf,f:Tf,g:If,G:Rf,H:xf,I:Sf,j:Cf,L:wf,m:Ef,M:Df,p:j,q:oe,Q:sp,s:cp,S:Of,u:kf,U:Af,V:Mf,w:Nf,W:Pf,x:null,X:null,y:Ff,Y:Lf,Z:zf,"%":op},b={a:se,A:ce,b:le,B:ue,c:null,d:Bf,e:Bf,f:Gf,g:np,G:ip,H:Vf,I:Hf,j:Uf,L:Wf,m:Kf,M:qf,p:de,q:fe,Q:sp,s:cp,S:Jf,u:Yf,U:Xf,V:Qf,w:$f,W:ep,x:null,X:null,y:tp,Y:rp,Z:ap,"%":op},x={a:E,A:D,b:O,B:ee,c:te,d:uf,e:uf,f:gf,g:of,G:af,H:ff,I:ff,j:df,L:hf,m:lf,M:pf,p:T,q:cf,Q:vf,s:yf,S:mf,u:ef,U:tf,V:nf,w:$d,W:rf,x:ne,X:re,y:of,Y:af,Z:sf,"%":_f};y.x=S(n,y),y.X=S(r,y),y.c=S(t,y),b.x=S(n,b),b.X=S(r,b),b.c=S(t,b);function S(e,t){return function(n){var r=[],i=-1,a=0,o=e.length,s,c,l;for(n instanceof Date||(n=new Date(+n));++i<o;)e.charCodeAt(i)===37&&(r.push(e.slice(a,i)),(c=qd[s=e.charAt(++i)])==null?c=s===`e`?` `:`0`:s=e.charAt(++i),(l=t[s])&&(s=l(n,c)),r.push(s),a=i+1);return r.push(e.slice(a,i)),r.join(``)}}function C(e,t){return function(n){var r=Gd(1900,void 0,1),i=w(r,e,n+=``,0),a,o;if(i!=n.length)return null;if(`Q`in r)return new Date(r.Q);if(`s`in r)return new Date(r.s*1e3+(`L`in r?r.L:0));if(t&&!(`Z`in r)&&(r.Z=0),`p`in r&&(r.H=r.H%12+r.p*12),r.m===void 0&&(r.m=`q`in r?r.q:0),`V`in r){if(r.V<1||r.V>53)return null;`w`in r||(r.w=1),`Z`in r?(a=Wd(Gd(r.y,0,1)),o=a.getUTCDay(),a=o>4||o===0?Od.ceil(a):Od(a),a=gd.offset(a,(r.V-1)*7),r.y=a.getUTCFullYear(),r.m=a.getUTCMonth(),r.d=a.getUTCDate()+(r.w+6)%7):(a=Ud(Gd(r.y,0,1)),o=a.getDay(),a=o>4||o===0?bd.ceil(a):bd(a),a=hd.offset(a,(r.V-1)*7),r.y=a.getFullYear(),r.m=a.getMonth(),r.d=a.getDate()+(r.w+6)%7)}else (`W`in r||`U`in r)&&(`w`in r||(r.w=`u`in r?r.u%7:`W`in r?1:0),o=`Z`in r?Wd(Gd(r.y,0,1)).getUTCDay():Ud(Gd(r.y,0,1)).getDay(),r.m=0,r.d=`W`in r?(r.w+6)%7+r.W*7-(o+5)%7:r.w+r.U*7-(o+6)%7);return`Z`in r?(r.H+=r.Z/100|0,r.M+=r.Z%100,Wd(r)):Ud(r)}}function w(e,t,n,r){for(var i=0,a=t.length,o=n.length,s,c;i<a;){if(r>=o)return-1;if(s=t.charCodeAt(i++),s===37){if(s=t.charAt(i++),c=x[s in qd?t.charAt(i++):s],!c||(r=c(e,n,r))<0)return-1}else if(s!=n.charCodeAt(r++))return-1}return r}function T(e,t,n){var r=l.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1}function E(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1}function D(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1}function O(e,t,n){var r=_.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1}function ee(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1}function te(e,n,r){return w(e,t,n,r)}function ne(e,t,r){return w(e,n,t,r)}function re(e,t,n){return w(e,r,t,n)}function k(e){return o[e.getDay()]}function ie(e){return a[e.getDay()]}function A(e){return c[e.getMonth()]}function ae(e){return s[e.getMonth()]}function j(e){return i[+(e.getHours()>=12)]}function oe(e){return 1+~~(e.getMonth()/3)}function se(e){return o[e.getUTCDay()]}function ce(e){return a[e.getUTCDay()]}function le(e){return c[e.getUTCMonth()]}function ue(e){return s[e.getUTCMonth()]}function de(e){return i[+(e.getUTCHours()>=12)]}function fe(e){return 1+~~(e.getUTCMonth()/3)}return{format:function(e){var t=S(e+=``,y);return t.toString=function(){return e},t},parse:function(e){var t=C(e+=``,!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+=``,b);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e+=``,!0);return t.toString=function(){return e},t}}}var qd={"-":``,_:` `,0:`0`},J=/^\s*\d+/,Jd=/^%/,Yd=/[\\^$*+?|[\]().{}]/g;function Y(e,t,n){var r=e<0?`-`:``,i=(r?-e:e)+``,a=i.length;return r+(a<n?Array(n-a+1).join(t)+i:i)}function Xd(e){return e.replace(Yd,`\\$&`)}function Zd(e){return RegExp(`^(?:`+e.map(Xd).join(`|`)+`)`,`i`)}function Qd(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function $d(e,t,n){var r=J.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function ef(e,t,n){var r=J.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function tf(e,t,n){var r=J.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function nf(e,t,n){var r=J.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function rf(e,t,n){var r=J.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function af(e,t,n){var r=J.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function of(e,t,n){var r=J.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function sf(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 cf(e,t,n){var r=J.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function lf(e,t,n){var r=J.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function uf(e,t,n){var r=J.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function df(e,t,n){var r=J.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function ff(e,t,n){var r=J.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function pf(e,t,n){var r=J.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function mf(e,t,n){var r=J.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function hf(e,t,n){var r=J.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function gf(e,t,n){var r=J.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function _f(e,t,n){var r=Jd.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function vf(e,t,n){var r=J.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function yf(e,t,n){var r=J.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function bf(e,t){return Y(e.getDate(),t,2)}function xf(e,t){return Y(e.getHours(),t,2)}function Sf(e,t){return Y(e.getHours()%12||12,t,2)}function Cf(e,t){return Y(1+hd.count(Id(e),e),t,3)}function wf(e,t){return Y(e.getMilliseconds(),t,3)}function Tf(e,t){return wf(e,t)+`000`}function Ef(e,t){return Y(e.getMonth()+1,t,2)}function Df(e,t){return Y(e.getMinutes(),t,2)}function Of(e,t){return Y(e.getSeconds(),t,2)}function kf(e){var t=e.getDay();return t===0?7:t}function Af(e,t){return Y(yd.count(Id(e)-1,e),t,2)}function jf(e){var t=e.getDay();return t>=4||t===0?Cd(e):Cd.ceil(e)}function Mf(e,t){return e=jf(e),Y(Cd.count(Id(e),e)+(Id(e).getDay()===4),t,2)}function Nf(e){return e.getDay()}function Pf(e,t){return Y(bd.count(Id(e)-1,e),t,2)}function Ff(e,t){return Y(e.getFullYear()%100,t,2)}function If(e,t){return e=jf(e),Y(e.getFullYear()%100,t,2)}function Lf(e,t){return Y(e.getFullYear()%1e4,t,4)}function Rf(e,t){var n=e.getDay();return e=n>=4||n===0?Cd(e):Cd.ceil(e),Y(e.getFullYear()%1e4,t,4)}function zf(e){var t=e.getTimezoneOffset();return(t>0?`-`:(t*=-1,`+`))+Y(t/60|0,`0`,2)+Y(t%60,`0`,2)}function Bf(e,t){return Y(e.getUTCDate(),t,2)}function Vf(e,t){return Y(e.getUTCHours(),t,2)}function Hf(e,t){return Y(e.getUTCHours()%12||12,t,2)}function Uf(e,t){return Y(1+gd.count(Ld(e),e),t,3)}function Wf(e,t){return Y(e.getUTCMilliseconds(),t,3)}function Gf(e,t){return Wf(e,t)+`000`}function Kf(e,t){return Y(e.getUTCMonth()+1,t,2)}function qf(e,t){return Y(e.getUTCMinutes(),t,2)}function Jf(e,t){return Y(e.getUTCSeconds(),t,2)}function Yf(e){var t=e.getUTCDay();return t===0?7:t}function Xf(e,t){return Y(Dd.count(Ld(e)-1,e),t,2)}function Zf(e){var t=e.getUTCDay();return t>=4||t===0?jd(e):jd.ceil(e)}function Qf(e,t){return e=Zf(e),Y(jd.count(Ld(e),e)+(Ld(e).getUTCDay()===4),t,2)}function $f(e){return e.getUTCDay()}function ep(e,t){return Y(Od.count(Ld(e)-1,e),t,2)}function tp(e,t){return Y(e.getUTCFullYear()%100,t,2)}function np(e,t){return e=Zf(e),Y(e.getUTCFullYear()%100,t,2)}function rp(e,t){return Y(e.getUTCFullYear()%1e4,t,4)}function ip(e,t){var n=e.getUTCDay();return e=n>=4||n===0?jd(e):jd.ceil(e),Y(e.getUTCFullYear()%1e4,t,4)}function ap(){return`+0000`}function op(){return`%`}function sp(e){return+e}function cp(e){return Math.floor(e/1e3)}var lp,up,dp;fp({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 fp(e){return lp=Kd(e),up=lp.format,lp.parse,dp=lp.utcFormat,lp.utcParse,lp}function pp(e){return new Date(e)}function mp(e){return e instanceof Date?+e:+new Date(+e)}function hp(e,t,n,r,i,a,o,s,c,l){var u=tu(),d=u.invert,f=u.domain,p=l(`.%L`),m=l(`:%S`),h=l(`%I:%M`),g=l(`%I %p`),_=l(`%a %d`),v=l(`%b %d`),y=l(`%B`),b=l(`%Y`);function x(e){return(c(e)<e?p:s(e)<e?m:o(e)<e?h:a(e)<e?g:r(e)<e?i(e)<e?_:v:n(e)<e?y:b)(e)}return u.invert=function(e){return new Date(d(e))},u.domain=function(e){return arguments.length?f(Array.from(e,mp)):f().map(pp)},u.ticks=function(t){var n=f();return e(n[0],n[n.length-1],t??10)},u.tickFormat=function(e,t){return t==null?x:l(t)},u.nice=function(e){var n=f();return(!e||typeof e.range!=`function`)&&(e=t(n[0],n[n.length-1],e??10)),e?f(Au(n,e)):u},u.copy=function(){return $l(u,hp(e,t,n,r,i,a,o,s,c,l))},u}function gp(){return zl.apply(hp(Vd,Hd,Id,Pd,yd,hd,pd,dd,ud,up).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function _p(){return zl.apply(hp(zd,Bd,Ld,Fd,Dd,gd,md,fd,ud,dp).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function vp(){var e=0,t=1,n,r,i,a,o=K,s=!1,c;function l(e){return e==null||isNaN(e=+e)?c:o(i===0?.5:(e=(a(e)-n)*i,s?Math.max(0,Math.min(1,e)):e))}l.domain=function(o){return arguments.length?([e,t]=o,n=a(e=+e),r=a(t=+t),i=n===r?0:1/(r-n),l):[e,t]},l.clamp=function(e){return arguments.length?(s=!!e,l):s},l.interpolator=function(e){return arguments.length?(o=e,l):o};function u(e){return function(t){var n,r;return arguments.length?([n,r]=t,o=e(n,r),l):[o(0),o(1)]}}return l.range=u(hc),l.rangeRound=u(gc),l.unknown=function(e){return arguments.length?(c=e,l):c},function(o){return a=o,n=o(e),r=o(t),i=n===r?0:1/(r-n),l}}function yp(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function bp(){var e=Du(vp()(K));return e.copy=function(){return yp(e,bp())},Bl.apply(e,arguments)}function xp(){var e=0,t=.5,n=1,r=1,i,a,o,s,c,l=K,u,d=!1,f;function p(e){return isNaN(e=+e)?f:(e=.5+((e=+u(e))-a)*(r*e<r*a?s:c),l(d?Math.max(0,Math.min(1,e)):e))}p.domain=function(l){return arguments.length?([e,t,n]=l,i=u(e=+e),a=u(t=+t),o=u(n=+n),s=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),r=a<i?-1:1,p):[e,t,n]},p.clamp=function(e){return arguments.length?(d=!!e,p):d},p.interpolator=function(e){return arguments.length?(l=e,p):l};function m(e){return function(t){var n,r,i;return arguments.length?([n,r,i]=t,l=Ec(e,[n,r,i]),p):[l(0),l(.5),l(1)]}}return p.range=m(hc),p.rangeRound=m(gc),p.unknown=function(e){return arguments.length?(f=e,p):f},function(l){return u=l,i=l(e),a=l(t),o=l(n),s=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),r=a<i?-1:1,p}}function Sp(){var e=Du(xp()(K));return e.copy=function(){return yp(e,Sp())},Bl.apply(e,arguments)}var Cp={scaleLinear:Ou,scalePow:Yu,scaleSqrt:Xu,scaleLog:Bu,scaleSymlog:Wu,scaleIdentity:ku,scaleTime:gp,scaleUtc:_p,scaleSequential:bp,scaleDiverging:Sp,scaleQuantize:Qu,scaleQuantile:Zu,scaleThreshold:$u,scaleOrdinal:Hl,scaleBand:Ul,scalePoint:Gl},X;(function(e){e.X=`x`,e.Y=`y`})(X||={});var wp;(function(e){e.West=`west`,e.East=`east`,e.North=`north`,e.South=`south`})(wp||={});var Tp=Object.assign(Object.assign({},Lo),{components:[],tooltip:void 0,crosshair:void 0,annotations:void 0,xAxis:void 0,yAxis:void 0,autoMargin:!0,xScale:void 0,xDomain:void 0,xDomainMinConstraint:void 0,xDomainMaxConstraint:void 0,xRange:void 0,yScale:void 0,yDomain:void 0,yDomainMinConstraint:void 0,yDomainMaxConstraint:void 0,yRange:void 0,yDirection:wp.North,preventEmptyDomain:null,scaleByDomain:!1,clipPathExtend:2}),Ep=class extends Ro{constructor(e,t,n){var r;super(e),this._defaultConfig=Tp,this.datamodel=new Rl,this.config=this._defaultConfig,this._clipPathId=zo(),this._axisMargin={top:0,bottom:0,left:0,right:0},this._firstRender=!0,this._clipPath=this.svg.append(`clipPath`).attr(`id`,this._clipPathId),this._clipPath.append(`rect`);let i=`saturate`,a=window.location.href.replace(window.location.hash,``);this.svg.attr(`class`,z`
--highlight-filter-id: url(${a}#${i}); // defining a css variable
`),this._svgDefs.append(`filter`).attr(`id`,i).attr(`filterUnits`,`objectBoundingBox`).html(`<feColorMatrix type="saturate" in="SourceGraphic" values="1.35"/>`),t&&this.updateContainer(t,!0),n&&this.setData(n,!0),(this.config.xAxis||this.config.yAxis||this.components?.some(e=>e.datamodel.data))&&this.render(),(r=document.fonts)==null||r.ready.then(()=>{this._firstRender||this._renderAxes(0)})}get components(){return this.config.components}get width(){let e=this._getMargin();return rr(this.containerWidth-e.left-e.right,0,1/0)}get height(){let e=this._getMargin();return rr(this.containerHeight-e.top-e.bottom,0,1/0)}setData(e,t){var n,r,i,a,o;let{components:s,config:c}=this;e&&(this.datamodel.data=e,s.forEach(t=>{t.setData(e)}),(n=c.crosshair)==null||n.setData(e),(r=c.xAxis)==null||r.setData(e),(i=c.yAxis)==null||i.setData(e),Yn(this.datamodel.data,e)||((a=c.tooltip)==null||a.hide(),(o=c.crosshair)==null||o.hide()),t||this.render())}updateContainer(e,t){super.updateContainer(e),this._removeAllChildren(),this.setData(this.datamodel.data,!0),e.xAxis&&(this.config.xAxis.config.type=G.X,this.element.appendChild(e.xAxis.element)),e.yAxis&&(this.config.yAxis.config.type=G.Y,this.element.appendChild(e.yAxis.element));for(let e of this.components)this.element.appendChild(e.element);let n=e.tooltip;n&&(n.hasContainer()||n.setContainer(this._container),n.setComponents(this.components));let r=e.crosshair;r&&(r.setContainer(this.svg),r.tooltip=n,this.element.appendChild(r.element));let i=e.annotations;i&&this.element.appendChild(i.element),this.element.appendChild(this._clipPath.node()),this.element.appendChild(this._svgDefs.node()),this.element.appendChild(this._svgDefsExternal.node()),t||this.render()}updateComponents(e,t){let{config:n}=this;this.components.forEach((t,n)=>{e[n]&&t.setConfig(e[n])}),this._updateScales(...this.components,n.xAxis,n.yAxis,n.crosshair),t||this.render()}update(e,t,n){n&&(this.datamodel.data=n),e&&this.updateContainer(e,!0),t&&this.updateComponents(t,!0),this.render()}_preRender(){let{config:e}=this;super._preRender(),e.autoMargin&&this._setAutoMargin();let t=nr([...this.components,e.xAxis,e.yAxis,e.crosshair,e.annotations]),n=this._getMargin();for(let e of t)e.setSize(this.width,this.height,this.containerWidth,this.containerHeight),e.setContainerMargin(n);this._updateScales(...this.components,e.xAxis,e.yAxis,e.crosshair)}_render(e){var t,n,r,i;let{config:a}=this;super._render();let o=this._getMargin();for(let t of this.components)t.g.attr(`transform`,`translate(${o.left},${o.top})`).style(`clip-path`,t.clippable?`url(#${this._clipPathId})`:null).style(`-webkit-clip-path`,t.clippable?`url(#${this._clipPathId})`:null),t.render(e);this._renderAxes(this._firstRender?0:e);let s=a.clipPathExtend;this._clipPath.select(`rect`).attr(`x`,-s).attr(`y`,-s).attr(`width`,this.width+2*s).attr(`height`,this.height+2*s),(t=a.tooltip)==null||t.update();let c=a.crosshair;if(c){let e=this.components.filter(e=>!e.stacked).map(e=>e.config.y),t=this.components.filter(e=>e.stacked).map(e=>e.config.y),n=this.components.find(e=>e.config.baseline)?.config?.baseline;c.accessors={x:this.components[0]?.config.x,y:Xn(e),yStacked:Xn(t),baseline:n},c.g.attr(`transform`,`translate(${o.left},${o.top})`).style(`clip-path`,`url(#${this._clipPathId})`).style(`-webkit-clip-path`,`url(#${this._clipPathId})`),c.render()}(n=a.annotations)==null||n.g.attr(`transform`,`translate(${o.left},${o.top})`),(r=a.annotations)==null||r.render(),this._firstRender=!1,(i=a.onRenderComplete)==null||i.call(a,this.svg.node(),o,this._getBleed(this.components),this.containerWidth,this.containerHeight,this.width,this.height)}_updateScales(...e){let t=nr(e||this.components);this._setScales(...t),this._updateScalesDomain(...t),this._updateScalesRange(...t)}_setScales(...e){let{config:t}=this;e&&(t.xScale&&e.forEach(e=>e.setScale(X.X,t.xScale)),t.yScale&&e.forEach(e=>e.setScale(X.Y,t.yScale)))}_updateScalesDomain(...e){let{config:t}=this;if(!e)return;let n=e.filter(e=>!e.config.excludeFromDomainCalculation);Object.values(X).forEach(r=>{let[i,a]=yn(Ln(n.map(e=>e.getDataExtent(r,t.scaleByDomain)))),o=r===X.Y?t.yDomain:t.xDomain,s=r===X.Y?t.yDomainMinConstraint:t.xDomainMinConstraint,c=r===X.Y?t.yDomainMaxConstraint:t.xDomainMaxConstraint,l=o?.[0]??i??0,u=o?.[1]??a??1,d=[rr(l,s?.[0]??-1/0,s?.[1]??1/0),rr(u,c?.[0]??-1/0,c?.[1]??1/0)];if(d[0]===d[1]){let e=n.some(e=>e.datamodel.data?.length>0);(t.preventEmptyDomain||t.preventEmptyDomain===null&&(!e||r===X.Y))&&(d[1]=d[0]+1)}e.forEach(e=>e.setScaleDomain(r,d))})}_updateScalesRange(...e){let{config:t}=this;if(!e)return;let n=t.yDirection===wp.South,r=[t.padding.left??0,this.width-(t.padding.right??0)],i=[this.height-(t.padding.bottom??0),t.padding.top??0];n&&i.reverse();for(let n of e)n.setSize(this.width,this.height,this.containerWidth,this.containerHeight),n.setScaleRange(X.X,t.xRange??r),n.setScaleRange(X.Y,t.yRange??i);let a=this._getBleed(e);for(let t of e)t.setScaleRange(X.X,[r[0]+a.left,r[1]-a.right]),t.setScaleRange(X.Y,n?[i[0]+a.top,i[1]-a.bottom]:[i[0]-a.bottom,i[1]+a.top])}_renderAxes(e){let{config:{xAxis:t,yAxis:n}}=this,r=this._getMargin();nr([t,n]).forEach(t=>{let n=t.getOffset(r);t.g.attr(`transform`,`translate(${n.left},${n.top})`),t.render(e)})}_setAutoMargin(){let{config:{xAxis:e,yAxis:t}}=this,n=nr([...this.components,e,t]);this._setScales(...n),this._updateScalesDomain(...n);let r=this._firstRender?2:1;for(let i=0;i<r;i+=1){let r={top:0,bottom:0,left:0,right:0};this._updateScalesRange(...n),nr([e,t]).forEach(e=>{e.preRender();let t=e.getRequiredMargin();r.top<t.top&&(r.top=t.top),r.bottom<t.bottom&&(r.bottom=t.bottom),r.left<t.left&&(r.left=t.left),r.right<t.right&&(r.right=t.right)}),this._axisMargin=r}}_getMargin(){let{config:{margin:e}}=this;return{top:e.top+this._axisMargin.top,bottom:e.bottom+this._axisMargin.bottom,left:e.left+this._axisMargin.left,right:e.right+this._axisMargin.right}}_getBleed(e){return e.map(e=>e.bleed).reduce((e,t)=>{for(let n of Object.keys(e)){let r=n;e[r]<t[r]&&(e[r]=t[r])}return e},{top:0,bottom:0,left:0,right:0})}destroy(){let{components:e,config:{tooltip:t,crosshair:n,annotations:r,xAxis:i,yAxis:a}}=this;super.destroy();for(let t of e)t?.destroy();t?.destroy(),n?.destroy(),r?.destroy(),i?.destroy(),a?.destroy()}},Dp={duration:600,events:{},attributes:{}},Op=class{constructor(e=Ra.SVG){this.type=Ra.SVG,this.datamodel=new Rl,this.sizing=za.Fit,this.events={},this._defaultConfig=Dp,this._width=400,this._height=200,this._containerWidth=void 0,this._containerHeight=void 0,this._containerMargin={top:0,bottom:0,left:0,right:0},this._setUpComponentEventsThrottled=$n(this._setUpComponentEvents,500),this._setCustomAttributesThrottled=$n(this._setCustomAttributes,500),e===Ra.SVG?this.element=document.createElementNS(`http://www.w3.org/2000/svg`,`g`):this.element=document.createElement(`div`),this.uid=zo(),this.g=H(this.element);let t=this.constructor?.selectors?.root;t&&this.g.attr(`class`,t)}setContainerMargin(e){this._containerMargin=e}setConfig(e){this.prevConfig=this.config,this.config=Qn(this._defaultConfig,e)}setData(e){this.datamodel.data=e}setSize(e,t,n,r){isFinite(e)&&(this._width=e),isFinite(t)&&(this._height=t),isFinite(n)&&(this._containerWidth=n),isFinite(r)&&(this._containerHeight=r)}render(e=this.config.duration){this._render(e);let t=`animating`;e&&(this.g.attr(t,``),this.g.transition(t).duration(e).on(`end interrupt`,()=>{this.g.attr(t,null)})),this._setUpComponentEventsThrottled(),this._setCustomAttributesThrottled()}get bleed(){return{top:0,bottom:0,left:0,right:0}}_render(e=this.config.duration){}_setCustomAttributes(){let e=this.config.attributes;Object.keys(e).forEach(t=>{Object.keys(e[t]).forEach(n=>{this.g.selectAll(`.${t}`).attr(n,e[t][n])})})}_setUpComponentEvents(){this._bindEvents(this.events),this._bindEvents(this.config.events,`.user`)}_bindEvents(e=this.events,t=``){Object.keys(e).forEach(n=>{Object.keys(e[n]).forEach(r=>{let i=this.g.selectAll(`.${n}`);i.on(r+t,(t,a)=>{let o=i.nodes(),s=o.indexOf(t.currentTarget),c=e[n][r];return c?.(a,t,s,o)})})})}destroy(){var e;(e=this.g)==null||e.remove(),this.element=void 0}isDestroyed(){return!this.element}},kp=class extends Rl{constructor(e){super(e)}get data(){return this._data??[]}set data(e){Array.isArray(e)&&(this._data=e)}},Ap=Object.assign(Object.assign({},Dp),{x:void 0,y:void 0,id:(e,t)=>e.id??`${t}`,color:e=>e.color,xScale:void 0,yScale:void 0,excludeFromDomainCalculation:!1}),jp=class extends Op{constructor(){super(...arguments),this.datamodel=new kp,this.clippable=!0,this.stacked=!1,this._defaultConfig=Ap,this._xScale=Cp.scaleLinear(),this._yScale=Cp.scaleLinear()}get xScale(){return this.config.xScale||this._xScale}get yScale(){return this.config.yScale||this._yScale}setConfig(e){this.config?.xScale&&(e.xScale=this.config.xScale),this.config?.yScale&&(e.yScale=this.config.yScale),super.setConfig(e)}setScaleDomain(e,t){var n,r;e===X.X&&((n=this._xScale)==null||n.domain(t)),e===X.Y&&((r=this._yScale)==null||r.domain(t))}setScaleRange(e,t){var n,r;e===X.X&&((n=this._xScale)==null||n.range(t)),e===X.Y&&((r=this._yScale)==null||r.range(t))}setScale(e,t){t&&e===X.X&&(this._xScale=t),t&&e===X.Y&&(this._yScale=t)}getDataExtent(e,t){let{config:n,datamodel:r}=this;switch(e){case X.X:return this.getXDataExtent();case X.Y:return this.getYDataExtent(t);default:return lr(r.data,n[e])}}getXDataExtent(){let{config:e,datamodel:t}=this;return lr(t.data,e.x)}getYDataExtent(e){let{config:t,datamodel:n}=this,r=this.xScale.domain();return lr(e?dr(n.data,r,t.x,!0):n.data,...Gn(t.y)?t.y:[t.y])}},Z;(function(e){e.Top=`top`,e.Bottom=`bottom`,e.Left=`left`,e.Right=`right`,e.Center=`center`,e.Auto=`auto`})(Z||={});var Mp;(function(e){e.Absolute=`absolute`,e.Fixed=`fixed`})(Mp||={});var Np;(function(e){e.Inside=`inside`,e.Outside=`outside`,e.Center=`center`})(Np||={});var Pp;(function(e){e.Horizontal=`horizontal`,e.Vertical=`vertical`})(Pp||={});var Fp={components:[],container:void 0,followCursor:!0,allowHover:!1,horizontalPlacement:Z.Auto,horizontalShift:0,verticalPlacement:Z.Top,verticalShift:0,attributes:{},triggers:{},className:void 0,showDelay:void 0,hideDelay:void 0},Ip=w({hidden:()=>Hp,nonInteractive:()=>Up,positionFixed:()=>Bp,root:()=>Lp,show:()=>Vp,tooltip:()=>Rp,variables:()=>zp}),Lp=z`
label: tooltip;
display: inline-block;
left: 0;
bottom: 0;
min-width: max-content;
position: absolute;
opacity: 0;
transition: opacity;
transition-duration: var(--vis-tooltip-transition-duration);
z-index: 999999;
padding: var(--vis-tooltip-padding);
color: var(--vis-tooltip-text-color);
border-radius: var(--vis-tooltip-border-radius);
box-shadow: var(--vis-tooltip-box-shadow);
border: solid 1px var(--vis-tooltip-border-color);
background-color: var(--vis-tooltip-background-color);
backdrop-filter: var(--vis-tooltip-backdrop-filter);
`,Rp=Lp,zp=un`
:root {
--vis-tooltip-background-color: rgba(255, 255, 255, 0.95);
--vis-tooltip-border-color: #e5e9f7;
--vis-tooltip-text-color: #000;
--vis-tooltip-shadow-color: rgba(172, 179, 184, 0.35);
--vis-tooltip-backdrop-filter: none;
--vis-tooltip-padding: 10px 15px;
--vis-tooltip-border-radius: 5px;
--vis-tooltip-transition-duration: 300ms;
--vis-tooltip-box-shadow: none;
--vis-dark-tooltip-background-color: rgba(30,30,30, 0.95);
--vis-dark-tooltip-text-color: #e5e9f7;
--vis-dark-tooltip-border-color: var(--vis-color-grey);
--vis-dark-tooltip-shadow-color: rgba(0,0,0, 0.95);
}
body.theme-dark ${`.${Lp}`} {
--vis-tooltip-background-color: var(--vis-dark-tooltip-background-color);
--vis-tooltip-text-color: var(--vis-dark-tooltip-text-color);
--vis-tooltip-border-color: var(--vis-dark-tooltip-border-color);
--vis-tooltip-shadow-color: var(--vis-dark-tooltip-shadow-color);
}
body.theme-dark {
--vis-tooltip-background-color: rgba(30,30,30, 0.95);
--vis-tooltip-text-color: #e5e9f7;
--vis-tooltip-border-color: var(--vis-color-grey);
--vis-tooltip-shadow-color: rgba(0,0,0, 0.95);
}
`,Bp=z`
bottom: unset;
position: fixed;
`,Vp=z`
opacity: 1;
`,Hp=z`
display: none;
`,Up=z`
label: non-interactive;
pointer-events: none;
user-select: none;
`,Wp=class{constructor(e={}){this._defaultConfig=Fp,this.config=this._defaultConfig,this._setUpEventsThrottled=$n(this._setUpEvents,500),this._setContainerPositionThrottled=$n(this._setContainerPosition,500),this._isShown=!1,this.element=document.createElement(`div`),this.div=H(this.element).attr(`class`,Lp).classed(Vp,!1).classed(Hp,!0),this.setConfig(e),this.components=this.config.components,this._mutationObserver=new MutationObserver(()=>{this._isShown&&(!this.config.followCursor&&this._hoveredElement?this.placeByElement(this._hoveredElement):this._position&&this.place({x:this._position[0],y:this._position[1]}))}),this._mutationObserver.observe(this.div.node(),{childList:!0,subtree:!0})}setConfig(e){this.prevConfig=this.config,this.config=Qn(this._defaultConfig,e),this.prevConfig.horizontalPlacement!==this.config.horizontalPlacement&&this.overrideHorizontalPlacement(void 0),this.config.container&&this.config.container!==this.prevConfig?.container&&this.setContainer(this.config.container),this._setUpAttributes()}setContainer(e){var t;(t=this.element.parentNode)==null||t.removeChild(this.element),this._container=e,this._container.appendChild(this.element),this._setContainerPositionThrottled()}getContainer(){return this._container}hasContainer(){return!!this._container&&this._container.isConnected}setComponents(e){this.components=e}update(){this._container&&this._setUpEventsThrottled()}show(e,t){this.render(e),this.place(t)}_hide(){this.div.classed(Vp,!1).on(`transitionend`,()=>{this.div.classed(Hp,!this._isShown)}),this._isShown=!1}hide(){window.clearTimeout(this._showDelayTimeoutId),this.config.hideDelay?(window.clearTimeout(this._hideDelayTimeoutId),this._hideDelayTimeoutId=setTimeout(()=>this._hide(),this.config.hideDelay)):this._hide()}_display(){window.clearTimeout(this._hideDelayTimeoutId),this.div.classed(Hp,!1).classed(Vp,!0),this._isShown=!0}display(){this._isShown||(this.config.showDelay?(window.clearTimeout(this._showDelayTimeoutId),this._showDelayTimeoutId=setTimeout(()=>{this._display(),this.place({x:this._position[0],y:this._position[1]})},this.config.showDelay)):this._display())}place(e){if(this._position=[e.x,e.y],!this.hasContainer()){console.warn(`Unovis | Tooltip: Container was not set or is not initialized yet`);return}let{config:t}=this,n=this.element.offsetWidth,r=this.element.offsetHeight,i=this._overriddenHorizontalPlacement||(t.horizontalPlacement===Z.Auto?Z.Center:t.horizontalPlacement),a=t.verticalPlacement===Z.Auto?e.y-r<0?Z.Bottom:Z.Top:t.verticalPlacement,o=i===Z.Left?-n-5-t.horizontalShift:i===Z.Center?-n/2:5+t.horizontalShift,s=a===Z.Bottom?5+t.verticalShift:a===Z.Center?-r/2:-5-t.verticalShift-r,[c,l]=this._constraintPosToContainer(e.x+o,e.y+s,n,r);this._applyPosition(c,l,r)}placeByElement(e){let{config:t}=this;this._hoveredElement=e;let n=this.element.offsetWidth,r=this.element.offsetHeight,i=this.isContainerBody(),a=i?window.innerWidth:this._container.scrollWidth,o=e.getBoundingClientRect(),s=i?[o.x,o.y]:La({clientX:o.x,clientY:o.y,pageX:o.x,pageY:o.y},this._container),c=this._overriddenHorizontalPlacement||(t.horizontalPlacement===Z.Auto?s[0]-n<0?Z.Right:s[0]+n>a?Z.Left:Z.Center:t.horizontalPlacement),l=0;switch(c){case Z.Left:l=-n-5-t.horizontalShift;break;case Z.Right:l=o.width+5+t.horizontalShift;break;case Z.Center:default:l=(-n+o.width)/2;break}let u=t.verticalPlacement===Z.Auto?c===Z.Center?s[1]-r<0?Z.Bottom:Z.Top:Z.Center:t.verticalPlacement,d=-r;switch(u){case Z.Center:d+=(r+o.height)/2;break;case Z.Bottom:d+=r+o.height+5+t.verticalShift;break;case Z.Top:default:d+=-5-t.verticalShift;break}let[f,p]=this._constraintPosToContainer(s[0]+l,s[1]+d,n,r);this._applyPosition(f,p,r)}isContainerBody(){return this._container===document.body}overrideHorizontalPlacement(e){this._overriddenHorizontalPlacement=e}render(e){let{config:t,prevConfig:n}=this;e instanceof HTMLElement?this.div.select(`:first-child`).node()!==e&&this.div.html(``).append(()=>e):e!==null&&this.div.html(e||``),this.div.classed(t.className??``,!!t.className).classed(Up,!t.allowHover),n?.className&&n.className!==t.className&&this.div.classed(n.className,!1),this.display()}_applyPosition(e,t,n){let r=this.isContainerBody(),i=r?window.innerHeight:this._container.scrollHeight;this.div.classed(Bp,r).style(`top`,r?`${t}px`:`unset`).style(`bottom`,r?`unset`:`${i-t-n}px`).style(`left`,`${e}px`)}_constraintPosToContainer(e,t,n,r){let i=this.isContainerBody(),a=i?window.innerHeight:this._container.scrollHeight,o=i?window.innerWidth:this._container.scrollWidth,s=e>o-n-10?o-n-10:e<10?10:e,c=t>a-r-10?a-r-10:t<10?10:t;return[o<n?0:s,a<r?0:c]}_setContainerPosition(){this._container!==document.body&&getComputedStyle(this._container)?.position===`static`&&(this._container.style.position=`relative`)}_setUpEvents(){let{config:e}=this;this.components.forEach(e=>{let t=H(e.element);t.on(`mousemove.tooltip`,e=>{let{config:n}=this,r=e.composedPath&&e.composedPath()||e.path||[e.target];for(let i of Object.keys(n.triggers)){let a=n.triggers[i];if(!a)continue;let o=t.selectAll(`.${i}`).nodes();for(let s of r){if(s===t.node())break;if(s.classList.contains(i)){let t=o.indexOf(s),r=a(H(s).datum(),t,o),[i,c]=this.isContainerBody()?[e.clientX,e.clientY]:La(e,this._container);r===null?this.hide():(this.render(r),n.followCursor?this.place({x:i,y:c}):this.placeByElement(s)),e.stopPropagation();return}}}this._isShown&&this.hide()}).on(`mouseleave.tooltip`,e=>{e.stopPropagation(),this.hide()})}),e.allowHover?this.div.on(`mouseenter.tooltip`,this._display.bind(this)).on(`mouseleave.tooltip`,this.hide.bind(this)):this.div.on(`mouseenter.tooltip`,null).on(`mouseleave.tooltip`,null)}_setUpAttributes(){let e=this.config.attributes;e&&Object.keys(e).forEach(t=>{this.div.attr(t,e[t])})}destroy(){var e;this._mutationObserver.disconnect(),window.clearTimeout(this._hideDelayTimeoutId),window.clearTimeout(this._showDelayTimeoutId),(e=this.div)==null||e.remove()}};Wp.selectors=Ip;function Q(e){return function(){return e}}var Gp=Math.PI;Gp/2,2*Gp;var Kp=Math.PI,qp=2*Kp,Jp=1e-6,Yp=qp-Jp;function Xp(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function Zp(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return Xp;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var Qp=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?Xp:Zp(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>Jp)if(!(Math.abs(u*s-c*l)>Jp)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((Kp-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>Jp&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>Jp||Math.abs(this._y1-l)>Jp)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%qp+qp),d>Yp?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>Jp&&this._append`A${n},${n},0,${+(d>=Kp)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};function $p(){return new Qp}$p.prototype=Qp.prototype;function em(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new Qp(t)}Array.prototype.slice;function tm(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function nm(e){this._context=e}nm.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 rm(e){return new nm(e)}function im(e){return e[0]}function am(e){return e[1]}function om(e,t){var n=Q(!0),r=null,i=rm,a=null,o=em(s);e=typeof e==`function`?e:e===void 0?im:Q(e),t=typeof t==`function`?t:t===void 0?am:Q(t);function s(s){var c,l=(s=tm(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:Q(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:Q(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:Q(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}function sm(e,t,n){var r=null,i=Q(!0),a=null,o=rm,s=null,c=em(l);e=typeof e==`function`?e:e===void 0?im:Q(+e),t=typeof t==`function`?t:Q(t===void 0?0:+t),n=typeof n==`function`?n:n===void 0?am:Q(+n);function l(l){var u,d,f,p=(l=tm(l)).length,m,h=!1,g,_=Array(p),v=Array(p);for(a??(s=o(g=c())),u=0;u<=p;++u){if(!(u<p&&i(m=l[u],u,l))===h)if(h=!h)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(_[f],v[f]);s.lineEnd(),s.areaEnd()}h&&(_[u]=+e(m,u,l),v[u]=+t(m,u,l),s.point(r?+r(m,u,l):_[u],n?+n(m,u,l):v[u]))}if(g)return s=null,g+``||null}function u(){return om().defined(i).curve(o).context(a)}return l.x=function(t){return arguments.length?(e=typeof t==`function`?t:Q(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e=typeof t==`function`?t:Q(+t),l):e},l.x1=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:Q(+e),l):r},l.y=function(e){return arguments.length?(t=typeof e==`function`?e:Q(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t=typeof e==`function`?e:Q(+e),l):t},l.y1=function(e){return arguments.length?(n=e==null?null:typeof e==`function`?e:Q(+e),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(e){return arguments.length?(i=typeof e==`function`?e:Q(!!e),l):i},l.curve=function(e){return arguments.length?(o=e,a!=null&&(s=o(a)),l):o},l.context=function(e){return arguments.length?(e==null?a=s=null:s=o(a=e),l):a},l}function cm(){}function lm(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 um(e){this._context=e}um.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:lm(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:lm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function dm(e){return new um(e)}function fm(e){this._context=e}fm.prototype={areaStart:cm,areaEnd:cm,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:lm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function pm(e){return new fm(e)}function mm(e){this._context=e}mm.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:lm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function hm(e){return new mm(e)}function gm(e,t){this._basis=new um(e),this._beta=t}gm.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],i=t[0],a=e[n]-r,o=t[n]-i,s=-1,c;++s<=n;)c=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(r+c*a),this._beta*t[s]+(1-this._beta)*(i+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var _m=(function e(t){function n(e){return t===1?new um(e):new gm(e,t)}return n.beta=function(t){return e(+t)},n})(.85);function vm(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 ym(e,t){this._context=e,this._k=(1-t)/6}ym.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:vm(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:vm(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}};var bm=(function e(t){function n(e){return new ym(e,t)}return n.tension=function(t){return e(+t)},n})(0);function xm(e,t){this._context=e,this._k=(1-t)/6}xm.prototype={areaStart:cm,areaEnd:cm,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:vm(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}};var Sm=(function e(t){function n(e){return new xm(e,t)}return n.tension=function(t){return e(+t)},n})(0);function Cm(e,t){this._context=e,this._k=(1-t)/6}Cm.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:vm(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}};var wm=(function e(t){function n(e){return new Cm(e,t)}return n.tension=function(t){return e(+t)},n})(0);function Tm(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>1e-12){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>1e-12){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*l+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*l+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function Em(e,t){this._context=e,this._alpha=t}Em.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=(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:Tm(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}};var Dm=(function e(t){function n(e){return t?new Em(e,t):new ym(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function Om(e,t){this._context=e,this._alpha=t}Om.prototype={areaStart:cm,areaEnd:cm,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=(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:Tm(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}};var km=(function e(t){function n(e){return t?new Om(e,t):new xm(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function Am(e,t){this._context=e,this._alpha=t}Am.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=(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:Tm(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}};var jm=(function e(t){function n(e){return t?new Am(e,t):new Cm(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function Mm(e){this._context=e}Mm.prototype={areaStart:cm,areaEnd:cm,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 Nm(e){return new Mm(e)}function Pm(e){return e<0?-1:1}function Fm(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(Pm(a)+Pm(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Im(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Lm(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function Rm(e){this._context=e}Rm.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:Lm(this,this._t0,Im(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,Lm(this,Im(this,n=Fm(this,e,t)),n);break;default:Lm(this,this._t0,n=Fm(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function zm(e){this._context=new Bm(e)}(zm.prototype=Object.create(Rm.prototype)).point=function(e,t){Rm.prototype.point.call(this,t,e)};function Bm(e){this._context=e}Bm.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function Vm(e){return new Rm(e)}function Hm(e){return new zm(e)}function Um(e){this._context=e}Um.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=Wm(e),i=Wm(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(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 Wm(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function Gm(e){return new Um(e)}function Km(e,t){this._context=e,this._t=t}Km.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 qm(e){return new Km(e,.5)}function Jm(e){return new Km(e,0)}function Ym(e){return new Km(e,1)}function Xm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Zm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Xm(Object(n),!0).forEach(function(t){$m(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xm(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Qm(e){"@babel/helpers - typeof";return Qm=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Qm(e)}function $m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eh(){return eh=Object.assign||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},eh.apply(this,arguments)}function th(e,t){if(e){if(typeof e==`string`)return nh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nh(e,t)}}function nh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function rh(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=th(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,s=e},f:function(){try{!a&&n.return!=null&&n.return()}finally{if(o)throw s}}}}function ih(e,t){var n=[],r=[];function i(e,t){if(e.length===1)n.push(e[0]),r.push(e[0]);else{for(var a=Array(e.length-1),o=0;o<a.length;o++)o===0&&n.push(e[0]),o===a.length-1&&r.push(e[o+1]),a[o]=[(1-t)*e[o][0]+t*e[o+1][0],(1-t)*e[o][1]+t*e[o+1][1]];i(a,t)}}return e.length&&i(e,t),{left:n,right:r.reverse()}}function ah(e){var t={};return e.length===4&&(t.x2=e[2][0],t.y2=e[2][1]),e.length>=3&&(t.x1=e[1][0],t.y1=e[1][1]),t.x=e[e.length-1][0],t.y=e[e.length-1][1],e.length===4?t.type=`C`:e.length===3?t.type=`Q`:t.type=`L`,t}function oh(e,t){t||=2;for(var n=[],r=e,i=1/t,a=0;a<t-1;a++){var o=i/(1-i*a),s=ih(r,o);n.push(s.left),r=s.right}return n.push(r),n}function sh(e,t,n){var r=[[e.x,e.y]];return t.x1!=null&&r.push([t.x1,t.y1]),t.x2!=null&&r.push([t.x2,t.y2]),r.push([t.x,t.y]),oh(r,n).map(ah)}var ch=/[MLCSTQAHVZmlcstqahv]|-?[\d.e+-]+/g,lh={M:[`x`,`y`],L:[`x`,`y`],H:[`x`],V:[`y`],C:[`x1`,`y1`,`x2`,`y2`,`x`,`y`],S:[`x2`,`y2`,`x`,`y`],Q:[`x1`,`y1`,`x`,`y`],T:[`x`,`y`],A:[`rx`,`ry`,`xAxisRotation`,`largeArcFlag`,`sweepFlag`,`x`,`y`],Z:[]};Object.keys(lh).forEach(function(e){lh[e.toLowerCase()]=lh[e]});function uh(e,t){for(var n=Array(e),r=0;r<e;r++)n[r]=t;return n}function dh(e){return`${e.type}${lh[e.type].map(function(t){return e[t]}).join(`,`)}`}function fh(e,t){var n={x1:`x`,y1:`y`,x2:`x`,y2:`y`},r=[`xAxisRotation`,`largeArcFlag`,`sweepFlag`];if(e.type!==t.type&&t.type.toUpperCase()!==`M`){var i={};Object.keys(t).forEach(function(a){var o=t[a],s=e[a];s===void 0&&(r.includes(a)?s=o:(s===void 0&&n[a]&&(s=e[n[a]]),s===void 0&&(s=0))),i[a]=s}),i.type=t.type,e=i}return e}function ph(e,t,n){var r=[];if(t.type===`L`||t.type===`Q`||t.type===`C`)r=r.concat(sh(e,t,n));else{var i=eh({},e);i.type===`M`&&(i.type=`L`),r=r.concat(uh(n-1).map(function(){return i})),r.push(t)}return r}function mh(e,t,n){var r=e.length-1,i=t.length-1,a=r/i,o=uh(i).reduce(function(t,r,i){var o=Math.floor(a*i);if(n&&o<e.length-1&&n(e[o],e[o+1])){var s=a*i%1<.5;t[o]&&(s?o>0?--o:o<e.length-1&&(o+=1):o<e.length-1?o+=1:o>0&&--o)}return t[o]=(t[o]||0)+1,t},[]).reduce(function(t,n,r){if(r===e.length-1){var i=uh(n,eh({},e[e.length-1]));return i[0].type===`M`&&i.forEach(function(e){e.type=`L`}),t.concat(i)}return t.concat(ph(e[r],e[r+1],n))},[]);return o.unshift(e[0]),o}function hh(e){for(var t=(e||``).match(ch)||[],n=[],r,i,a=0;a<t.length;++a)if(r=lh[t[a]],r){i={type:t[a]};for(var o=0;o<r.length;++o)i[r[o]]=+t[a+o+1];a+=r.length,n.push(i)}return n}function gh(e,t,n){var r=e==null?[]:e.slice(),i=t==null?[]:t.slice(),a=Qm(n)===`object`?n:{excludeSegment:n,snapEndsToInput:!0},o=a.excludeSegment,s=a.snapEndsToInput;if(!r.length&&!i.length)return function(){return[]};var c=(r.length===0||r[r.length-1].type===`Z`)&&(i.length===0||i[i.length-1].type===`Z`);r.length>0&&r[r.length-1].type===`Z`&&r.pop(),i.length>0&&i[i.length-1].type===`Z`&&i.pop(),r.length?i.length||i.push(r[0]):r.push(i[0]),Math.abs(i.length-r.length)!==0&&(i.length>r.length?r=mh(r,i,o):i.length<r.length&&(i=mh(i,r,o))),r=r.map(function(e,t){return fh(e,i[t])});var l=r.map(function(e){return Zm({},e)});return c&&(l.push({type:`Z`}),r.push({type:`Z`})),function(e){if(e===1&&s)return t??[];if(e===0)return r;for(var n=0;n<l.length;++n){var a=r[n],o=i[n],c=l[n],u=rh(lh[c.type]),d;try{for(u.s();!(d=u.n()).done;){var f=d.value;c[f]=(1-e)*a[f]+e*o[f],(f===`largeArcFlag`||f===`sweepFlag`)&&(c[f]=Math.round(c[f]))}}catch(e){u.e(e)}finally{u.f()}}return l}}function _h(e,t,n){var r=hh(e),i=hh(t),a=Qm(n)===`object`?n:{excludeSegment:n,snapEndsToInput:!0},o=a.excludeSegment,s=a.snapEndsToInput;if(!r.length&&!i.length)return function(){return``};var c=gh(r,i,{excludeSegment:o,snapEndsToInput:s});return function(e){if(e===1&&s)return t??``;var n=c(e),r=``,i=rh(n),a;try{for(i.s();!(a=i.n()).done;){var o=a.value;r+=dh(o)}}catch(e){i.e(e)}finally{i.f()}return r}}function vh(e,t,n,r){return Array.isArray(t)&&isFinite(n)?t[n%t.length]:tr(e,t,n)||(Hn(n)&&!r?`var(${ks(n)})`:null)}var $;(function(e){e.Basis=`basis`,e.BasisClosed=`basisClosed`,e.BasisOpen=`basisOpen`,e.Bundle=`bundle`,e.Cardinal=`cardinal`,e.CardinalClosed=`cardinalClosed`,e.CardinalOpen=`cardinalOpen`,e.CatmullRom=`catmullRom`,e.CatmullRomClosed=`catmullRomClosed`,e.CatmullRomOpen=`catmullRomOpen`,e.Linear=`linear`,e.LinearClosed=`linearClosed`,e.MonotoneX=`monotoneX`,e.MonotoneY=`monotoneY`,e.Natural=`natural`,e.Step=`step`,e.StepAfter=`stepAfter`,e.StepBefore=`stepBefore`})($||={});var yh={[$.Basis]:dm,[$.BasisClosed]:pm,[$.BasisOpen]:hm,[$.Bundle]:_m,[$.Cardinal]:bm,[$.CardinalClosed]:Sm,[$.CardinalOpen]:wm,[$.CatmullRom]:Dm,[$.CatmullRomClosed]:km,[$.CatmullRomOpen]:jm,[$.Linear]:rm,[$.LinearClosed]:Nm,[$.MonotoneX]:Vm,[$.MonotoneY]:Hm,[$.Natural]:Gm,[$.Step]:qm,[$.StepAfter]:Ym,[$.StepBefore]:Jm},bh=Object.assign(Object.assign({},Ap),{curveType:$.MonotoneX,lineWidth:2,lineDashArray:void 0,fallbackValue:void 0,highlightOnHover:!1,cursor:null,interpolateMissingData:!1}),xh=w({dim:()=>Dh,globalStyles:()=>Sh,interpolatedPath:()=>Oh,line:()=>wh,linePath:()=>Th,lineSelectionHelper:()=>Eh,root:()=>Ch}),Sh=un`
:root {
--vis-line-cursor: default;
--vis-line-stroke-dasharray: none;
--vis-line-stroke-dashoffset: 0;
--vis-line-gapfill-stroke-dasharray: 2 3;
--vis-line-gapfill-stroke-opacity: 0.8;
--vis-line-gapfill-stroke-dashoffset: 0;
}
`,Ch=z`
label: line-component;
`,wh=z`
label: line;
transition: opacity 200ms;
cursor: var(--vis-line-cursor);
`,Th=z`
label: linePath;
fill: none;
stroke-dasharray: var(--vis-line-stroke-dasharray);
stroke-dashoffset: var(--vis-line-stroke-dashoffset);
`,Eh=z`
label: lineSelectionHelper;
fill: none;
stroke: rgba(0, 0, 0, 0);
stroke-width: 8px;
`,Dh=z`
opacity: 0.2;
`,Oh=z`
label: interpolated-path;
fill: none;
stroke-dasharray: var(--vis-line-gapfill-stroke-dasharray);
stroke-dashoffset: var(--vis-line-gapfill-stroke-dashoffset);
stroke-opacity: var(--vis-line-gapfill-stroke-opacity);
`,kh=class e extends jp{constructor(t){super(),this._defaultConfig=bh,this.config=this._defaultConfig,this.curve=yh[$.MonotoneX],this.events={[e.selectors.line]:{mouseover:this._highlight.bind(this),mouseleave:this._resetHighlight.bind(this)}},t&&this.setConfig(t)}get bleed(){let{config:{lineWidth:e}}=this,t=this.yScale.domain(),n=(this.yScale.range()[0]>this.yScale.range()[1]?wp.North:wp.South)===wp.South,r=e>3,i=e>=10;return{top:!i&&(!n&&t[1]===0||n&&t[0]===0)?0:e/2,bottom:!i&&(!n&&t[0]===0||n&&t[1]===0)?0:e/2,left:r?e/2:0,right:r?e/2:0}}_render(e){super._render(e);let{config:t,datamodel:{data:n}}=this,r=Hn(e)?e:t.duration;this.curve=yh[t.curveType],this.lineGen=om().x(e=>e.x).y(e=>e.y).defined(e=>e.defined).curve(this.curve);let i=Gn(t.y)?t.y:[t.y],a=n.map((e,n)=>this.xScale(B(e,t.x,n))),o=i.map(e=>{let r=n.map((n,r)=>{let i=B(n,e,r),o=(Hn(i)||i===null)&&isFinite(i)?i:t.fallbackValue,s=t.interpolateMissingData?(Hn(i)||i===null)&&isFinite(i):isFinite(o);return{x:a[r],y:this.yScale(o??0),defined:s,value:o}}),i=r.reduce((e,t)=>t.defined||e,!1),o=!1;return{values:r,defined:i,gaps:r.reduce((e,n,i)=>{!n.defined&&isFinite(t.fallbackValue)&&e.push(Object.assign(Object.assign({},n),{defined:!0})),!n.defined&&!o&&(o=!0);let a=i>0&&!r[i-1].defined||i<r.length-1&&!r[i+1].defined;return n.defined&&a&&(o||e.push(Object.assign(Object.assign({},n),{defined:!1})),e.push(n),o=!1),e},[]),visible:i&&r.some(e=>e.value!==null)}}),s=this.g.selectAll(`.${wh}`).data(o),c=s.enter().append(`g`).attr(`class`,wh);c.append(`path`).attr(`class`,Th).attr(`stroke`,(e,r)=>vh(n,t.color,r)).attr(`stroke-opacity`,0).attr(`stroke-width`,t.lineWidth),c.append(`path`).attr(`class`,Eh).attr(`d`,this._emptyPath()),c.append(`path`).attr(`class`,Oh).attr(`d`,this._emptyPath()).style(`opacity`,0);let l=c.merge(s);l.style(`cursor`,(e,r)=>tr(n,t.cursor,r)),l.each((e,i,a)=>{let o=H(a[i]),s=o.select(`.${Th}`),c=o.select(`.${Eh}`),l=o.select(`.${Oh}`),u=e.visible,d=er(n,t.lineDashArray,i),f=W(s,r).attr(`stroke`,vh(n,t.color,i)).attr(`stroke-width`,t.lineWidth).attr(`stroke-opacity`,u?1:0).style(`stroke-dasharray`,d?.join(` `)??null),p=e.values.some(e=>!e.defined),m=this.lineGen(e.values);if(r&&!p){let e=s.attr(`d`)||this._emptyPath(),t=m||this._emptyPath();f.attrTween(`d`,()=>_h(e,t))}else e.visible&&f.attr(`d`,m);c.attr(`d`,m).attr(`visibility`,u?null:`hidden`),p&&t.interpolateMissingData?W(l,r).attr(`d`,this.lineGen(e.gaps)).attr(`stroke`,vh(n,t.color,i)).attr(`stroke-width`,t.lineWidth-1).style(`opacity`,1):l.transition().duration(r).style(`opacity`,0)}),W(s.exit(),r).style(`opacity`,0).remove()}_emptyPath(){let e=this.xScale.range(),t=this.yScale.range();return`M${e[0]},${t[0]} L${e[1]},${t[0]}`}_highlight(e){let{config:t}=this;t.highlightOnHover&&this.g.selectAll(`.${wh}`).classed(Dh,t=>t!==e)}_resetHighlight(){let{config:e}=this;e.highlightOnHover&&this.g.selectAll(`.${wh}`).classed(Dh,!1)}};kh.selectors=xh;function Ah(e){return e}var jh=1,Mh=2,Nh=3,Ph=4,Fh=1e-6;function Ih(e){return`translate(`+e+`,0)`}function Lh(e){return`translate(0,`+e+`)`}function Rh(e){return t=>+e(t)}function zh(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function Bh(){return!this.__axis}function Vh(e,t){var n=[],r=null,i=null,a=6,o=6,s=3,c=typeof window<`u`&&window.devicePixelRatio>1?0:.5,l=e===jh||e===Ph?-1:1,u=e===Ph||e===Mh?`x`:`y`,d=e===jh||e===Nh?Ih:Lh;function f(f){var p=r??(t.ticks?t.ticks.apply(t,n):t.domain()),m=i??(t.tickFormat?t.tickFormat.apply(t,n):Ah),h=Math.max(a,0)+s,g=t.range(),_=+g[0]+c,v=+g[g.length-1]+c,y=(t.bandwidth?zh:Rh)(t.copy(),c),b=f.selection?f.selection():f,x=b.selectAll(`.domain`).data([null]),S=b.selectAll(`.tick`).data(p,t).order(),C=S.exit(),w=S.enter().append(`g`).attr(`class`,`tick`),T=S.select(`line`),E=S.select(`text`);x=x.merge(x.enter().insert(`path`,`.tick`).attr(`class`,`domain`).attr(`stroke`,`currentColor`)),S=S.merge(w),T=T.merge(w.append(`line`).attr(`stroke`,`currentColor`).attr(u+`2`,l*a)),E=E.merge(w.append(`text`).attr(`fill`,`currentColor`).attr(u,l*h).attr(`dy`,e===jh?`0em`:e===Nh?`0.71em`:`0.32em`)),f!==b&&(x=x.transition(f),S=S.transition(f),T=T.transition(f),E=E.transition(f),C=C.transition(f).attr(`opacity`,Fh).attr(`transform`,function(e){return isFinite(e=y(e))?d(e+c):this.getAttribute(`transform`)}),w.attr(`opacity`,Fh).attr(`transform`,function(e){var t=this.parentNode.__axis;return d((t&&isFinite(t=t(e))?t:y(e))+c)})),C.remove(),x.attr(`d`,e===Ph||e===Mh?o?`M`+l*o+`,`+_+`H`+c+`V`+v+`H`+l*o:`M`+c+`,`+_+`V`+v:o?`M`+_+`,`+l*o+`V`+c+`H`+v+`V`+l*o:`M`+_+`,`+c+`H`+v),S.attr(`opacity`,1).attr(`transform`,function(e){return d(y(e)+c)}),T.attr(u+`2`,l*a),E.attr(u,l*h).text(m),b.filter(Bh).attr(`fill`,`none`).attr(`font-size`,10).attr(`font-family`,`sans-serif`).attr(`text-anchor`,e===Mh?`start`:e===Ph?`end`:`middle`),b.each(function(){this.__axis=y})}return f.scale=function(e){return arguments.length?(t=e,f):t},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(e){return arguments.length?(n=e==null?[]:Array.from(e),f):n.slice()},f.tickValues=function(e){return arguments.length?(r=e==null?null:Array.from(e),f):r&&r.slice()},f.tickFormat=function(e){return arguments.length?(i=e,f):i},f.tickSize=function(e){return arguments.length?(a=o=+e,f):a},f.tickSizeInner=function(e){return arguments.length?(a=+e,f):a},f.tickSizeOuter=function(e){return arguments.length?(o=+e,f):o},f.tickPadding=function(e){return arguments.length?(s=+e,f):s},f.offset=function(e){return arguments.length?(c=+e,f):c},f}function Hh(e){return Vh(jh,e)}function Uh(e){return Vh(Mh,e)}function Wh(e){return Vh(Nh,e)}function Gh(e){return Vh(Ph,e)}var Kh;(function(e){e.Start=`start`,e.Middle=`middle`,e.End=`end`})(Kh||={});var qh;(function(e){e.Top=`top`,e.Middle=`middle`,e.Bottom=`bottom`})(qh||={});var Jh;(function(e){e.Wrap=`wrap`,e.Trim=`trim`})(Jh||={});var Yh;(function(e){e.Left=`left`,e.Center=`center`,e.Right=`right`})(Yh||={});var Xh=t(((e,t)=>{(function(e){if(typeof n!=`function`){var n=function(e){return e};n.nonNative=!0}let r=n(`plaintext`),i=n(`html`),a=n(`comment`),o=/<(\w*)>/g,s=/<\/?([^\s\/>]+)/;function c(e,t,n){e||=``,t||=[],n||=``;let r=u(t,n);return d(e,r)}function l(e,t){e||=[],t||=``;let n=u(e,t);return function(e){return d(e||``,n)}}c.init_streaming_mode=l;function u(e,t){return e=f(e),{allowable_tags:e,tag_replacement:t,state:r,tag_buffer:``,depth:0,in_quote_char:``}}function d(e,t){if(typeof e!=`string`)throw TypeError(`'html' parameter must be a string`);let n=t.allowable_tags,o=t.tag_replacement,s=t.state,c=t.tag_buffer,l=t.depth,u=t.in_quote_char,d=``;for(let t=0,f=e.length;t<f;t++){let f=e[t];if(s===r)switch(f){case`<`:s=i,c+=f;break;default:d+=f;break}else if(s===i)switch(f){case`<`:if(u)break;l++;break;case`>`:if(u)break;if(l){l--;break}u=``,s=r,c+=`>`,n.has(p(c))?d+=c:d+=o,c=``;break;case`"`:case`'`:f===u?u=``:u||=f,c+=f;break;case`-`:c===`<!-`&&(s=a),c+=f;break;case` `:case`
`:if(c===`<`){s=r,d+=`< `,c=``;break}c+=f;break;default:c+=f;break}else if(s===a)switch(f){case`>`:c.slice(-2)==`--`&&(s=r),c=``;break;default:c+=f;break}}return t.state=s,t.tag_buffer=c,t.depth=l,t.in_quote_char=u,d}function f(e){let t=new Set;if(typeof e==`string`){let n;for(;n=o.exec(e);)t.add(n[1])}else !n.nonNative&&typeof e[n.iterator]==`function`?t=new Set(e):typeof e.forEach==`function`&&e.forEach(t.add,t);return t}function p(e){let t=s.exec(e);return t?t[1].toLowerCase():null}typeof define==`function`&&define.amd?define(function(){return c}):typeof t==`object`&&t.exports?t.exports=c:e.striptags=c})(e)}));function Zh(e){switch(e){case Yh.Center:return`middle`;case Yh.Right:return`end`;case Yh.Left:default:return`start`}}var Qh=l(Xh(),1),$h=e=>{switch(e){case Yh.Left:return`start`;case Yh.Right:return`end`;case Yh.Center:return`middle`;default:return null}};function eg(e){return e.replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function tg(e){return e.match(/[A-Z]{2,}(?=[A-Z][a-z0-9]*|\b)|[A-Z]?[a-z0-9]*|[A-Z]|[0-9]+/g)?.filter(Boolean).map(e=>e.toLowerCase()).join(`-`)}function ng(e){return e.replace(/['"]/g,`&#39;`).replace(/\u0000/g,`\\0`).replace(/\n/g,`\\n`).replace(/\r/g,`\\r`).replace(/\v/g,`\\v`).replace(/\t/g,`\\t`).replace(/\f/g,`\\f`)}function rg(e,t=15){return e?e.length>t?`${e.substr(e.length-t,t)}`:e:``}function ig(e,t=15){if(!e)return``;let n=Math.floor((t-3)/2);return e.length>t?`${e.substr(0,n)}${e.substr(-n,n)}`:e}function ag(e,t=15){return e?e.length>t?`${e.substr(0,t)}`:e:``}function og(e,t=15,n=Kh.Middle){if(!e)return``;let r=ag(e,t);return n===Kh.Start?r=rg(e,t):n===Kh.Middle&&(r=ig(e,t)),r}function sg(e,t=[` `]){let n=[e];for(let e=0;e<t.length;e++){let r=t[e];n.forEach((e,t)=>{let i=e.split(r),a=i.map((e,t)=>`${e}${t===i.length-1?``:r}`);n[t]=a}),n=Xn(n)}return n}function cg(e,t,n=[` `,`-`,`.`,`,`]){let r=e.text();if(!r)return;let i=sg(r,Gn(n)?n:[n]),a=parseFloat(e.attr(`x`))||0;e.text(``);let o=e.append(`tspan`).attr(`x`,a),s=`${i[0]}`;o.text(s),i.forEach((n,r)=>{if(r===0)return;let i=`${s}${n}`;o.text(i),o.node().getComputedTextLength()>t?(o.text(s.trim()),o=e.append(`tspan`).attr(`x`,a).attr(`dy`,`1.2em`).text(n),s=n):s+=n})}function lg(e,t,n,r,i,a){t===void 0&&(t=50),n===void 0&&(n=Kh.Middle),r===void 0&&(r=!0),i===void 0&&(i=+window.getComputedStyle(e.node())?.fontSize||0),a===void 0&&(a=Hs());let o=e.text()||``,s=o.length,c=r?i*s*a:e.node().getComputedTextLength(),l=Math.ceil(s*t/(1.1*c));return l<s?(e.text(og(o,l,n)),!0):!1}function ug(e,t,n=Hs()){return e.length*t*n||0}function dg(e,t,n){let r=`http://www.w3.org/2000/svg`,i=document.createElementNS(r,`svg`),a=document.createElementNS(r,`text`);a.textContent=e,a.setAttribute(`font-size`,`${n}`),a.setAttribute(`font-family`,t),i.appendChild(a),document.body.appendChild(i);let o=a.getComputedTextLength();return document.body.removeChild(i),o}function fg(e,t=void 0,n=!0,r=zs,i=!1){let a=`${e.text}`;if(!a)return[];let o=e.fontSize??Vs.fontSize,s=e.fontFamily??Vs.fontFamily,c=e.fontWidthToHeightRatio??Vs.fontWidthToHeightRatio,l=Array.isArray(r)?r:[r];return a.split(`
`).map(e=>{let r=[];if(!t)return[e];let a=sg(e,l),u=``;for(let e=0;e<a.length;e+=1)if((n?ug(u+a[e],o,c):dg(u+a[e],s,o))<t||e===0?u+=a[e]:(r.push(u.trim()),u=a[e]),i)for(;u.trim().length>2&&(n?ug(u,o,c):dg(u,s,o))>t;){let e=u.trim().length-2;for(;e>0;){let i=`${u.substring(0,e)}${Bs}`;if((n?ug(i,o,c):dg(i,s,o))<=t||e===1){r.push(i.trim()),u=u.substring(e);break}e--}}return u&&r.push(u.trim()),r}).flat()}function pg(e,t=void 0,n=void 0,r=!0,i=zs,a=!1){let o=Array.isArray(e)?e.map(e=>Qn(Vs,e)):[Qn(Vs,e)],s=o.map(e=>fg(e,t,r,i,a)),c=o[0],l=-c.fontSize*(c.lineHeight-1),u=[];return o.forEach((e,i)=>{let a=s[i],o=i>0?u[i-1]:void 0,c=o?o.marginBottom:0,d=e.marginTop;l+=Math.max(c,d);let f=e.fontSize*e.lineHeight,p=0;for(let i=0;i<a.length;i+=1){let o=a[i];l+=f;let s=`${o}`,c=r?ug(s,e.fontSize,e.fontWidthToHeightRatio):dg(s,e.fontFamily,e.fontSize);if(p=Math.max(c,p),n&&l+f>n&&i!==a.length-1){o.charAt(o.length-1)===Bs&&(o=o.substr(0,a[i].length-1)),c<t?a[i]=s:a[i]=`${a[i].substr(0,a[i].length-2)}`,a=a.slice(0,i+1);break}}u.push(Object.assign(Object.assign({},e),{_lines:a,_estimatedHeight:l-(o?._estimatedHeight||0),_maxWidth:Math.max(p,o?._maxWidth??0)}))}),u}function mg(e,t=0,n,r){return e.map((i,a)=>{let o=a>0?e[a-1]:void 0,s=o?o.marginBottom/o.fontSize:0,c=i.marginTop/i.fontSize,l=Math.max(s,c),u={fontSize:i.fontSize,fontFamily:i.fontFamily,fontWeight:i.fontWeight,fill:i.color,y:a===0&&n};return`<tspan xmlns="http://www.w3.org/2000/svg" ${Object.entries(u).filter(([e,t])=>t).map(([e,t])=>`${tg(e)}="${ng(t.toString())}"`).join(` `)}>${i._lines.map((e,n)=>{let o;return o=a===0&&n===0?l:n===0?l+i.lineHeight:i.lineHeight,`<tspan x="${t}" dy="${o}em" dominant-baseline="${r??`auto`}">${e.length?e:`\xA0`}</tspan>`}).join(``)}</tspan>`})}function hg(e){return zn(e,e=>e._estimatedHeight)}var gg=[`text`,`tspan`,`textPath`,`altGlyph`,`altGlyphDef`,`altGlyphItem`,`glyphRef`,`textRef`,`textArea`];function _g(e,t,n,r){let i=pg(t,n.width,void 0,n.fastMode,n.separator,n.wordBreak),a=n.x??+e.getAttribute(`x`),o=n.y??+e.getAttribute(`y`),s=a??0,c=o??0;if(n.textAlign&&e.setAttribute(`text-anchor`,Zh(n.textAlign)),n.verticalAlign&&n.verticalAlign!==qh.Top){let e=hg(i),t=n.verticalAlign===qh.Middle?-e/2:n.verticalAlign===qh.Bottom?-e:0;c+=t}n.textRotationAngle?e.setAttribute(`transform`,`rotate(${n.textRotationAngle===0||n.textRotationAngle?n.textRotationAngle:0} ${s} ${c})`):e.removeAttribute(`transform`);let l=new DOMParser;e.textContent=``,i.forEach(t=>{let n=(0,Qh.default)(mg([t],s,c,r).join(``),gg),i=l.parseFromString(n,`image/svg+xml`).firstChild;e.appendChild(i)})}var vg=Object.assign(Object.assign({},Ap),{position:void 0,type:void 0,label:void 0,labelFontSize:null,labelTextFitMode:Jh.Wrap,labelTextTrimType:Kh.Middle,gridLine:!0,tickLine:!0,domainLine:!0,numTicks:void 0,minMaxTicksOnly:!1,minMaxTicksOnlyWhenWidthIsLess:250,minMaxTicksOnlyShowGridLines:!1,tickTextWidth:void 0,tickTextSeparator:void 0,tickTextForceWordBreak:!1,tickTextTrimType:Kh.Middle,tickTextFitMode:Jh.Wrap,tickTextFontSize:null,tickTextAlign:void 0,tickTextColor:null,tickTextAngle:void 0,labelMargin:8,labelColor:null,tickFormat:void 0,tickValues:void 0,fullSize:!0,tickPadding:8,tickTextHideOverlapping:void 0});function yg(e,t){let n=Object.entries(e);return Object.fromEntries(n.map(([e])=>[eg(e.replace(t??`--vis-`,``)),e]))}function bg(e,t){un({":root":e,[`body.theme-dark .${t}`]:Object.keys(e).filter(e=>e.includes(`--vis-dark`)).map(e=>({[e.replace(`--vis-dark`,`--vis`)]:`var(${e})`}))})}var xg=w({axis:()=>Dg,cssVarDefaults:()=>Cg,grid:()=>Og,hideDomain:()=>Eg,hideTickLine:()=>Tg,label:()=>jg,root:()=>Sg,tick:()=>kg,tickLabel:()=>Mg,tickLabelHideable:()=>Ng,tickTextExiting:()=>Ag,variables:()=>wg}),Sg=z`
label: axis-component;
`,Cg={"--vis-axis-tick-color":`#e8e9ef`,"--vis-axis-grid-color":`#e8e9ef`,"--vis-axis-grid-line-width":`1px`,"--vis-axis-grid-line-dasharray":`none`,"--vis-axis-label-font-size":`14px`,"--vis-axis-label-color":`#6c778c`,"--vis-axis-label-weight":`500`,"--vis-axis-tick-label-color":`#6c778c`,"--vis-axis-tick-label-font-size":`12px`,"--vis-axis-tick-label-weight":`500`,"--vis-axis-tick-label-cursor":`default`,"--vis-axis-tick-label-text-decoration":`none`,"--vis-axis-tick-line-width":`1px`,"--vis-axis-tick-label-hide-transition":`opacity 400ms ease-in-out`,"--vis-dark-axis-tick-color":`#6c778c`,"--vis-dark-axis-tick-label-color":`#e8e9ef`,"--vis-dark-axis-grid-color":`#6c778c`,"--vis-dark-axis-label-color":`#fefefe`},wg=yg(Cg);bg(Cg,Sg);var Tg=z`
label: hide-tick-line;
`,Eg=z`
label: hide-domain;
`,Dg=z`
label: axis;
user-select: none;
.domain {
stroke: var(--vis-axis-domain-color, var(--vis-axis-tick-color));
stroke-width: var(--vis-axis-domain-line-width, var(--vis-axis-grid-line-width));
stroke-dasharray: var(--vis-axis-domain-line-dasharray, var(--vis-axis-grid-line-dasharray));
}
&${`.${Tg}`} {
.tick > line {
opacity: 0;
}
}
&${`.${Eg}`} {
.domain {
opacity: 0;
}
}
`,Og=z`
label: grid;
.domain {
opacity: 0;
}
line {
stroke: var(--vis-axis-grid-color);
stroke-width: var(--vis-axis-grid-line-width);
stroke-dasharray: var(--vis-axis-grid-line-dasharray);
}
`,kg=z`
label: tick;
stroke: none;
font-size: var(--vis-axis-tick-label-font-size);
font-weight: var(--vis-axis-tick-label-weight);
line {
stroke: var(--vis-axis-tick-color);
stroke-width: var(--vis-axis-tick-line-width);
}
text {
fill: var(--vis-axis-tick-label-color);
cursor: var(--vis-axis-tick-label-cursor);
font-family: var(--vis-axis-font-family, var(--vis-font-family));
text-decoration: var(--vis-axis-tick-label-text-decoration);
stroke: none;
}
`,Ag=z`
label: tick-text-exiting;
`,jg=z`
label: label;
fill: var(--vis-axis-label-color);
font-size: var(--vis-axis-label-font-size);
font-weight: var(--vis-axis-label-weight);
font-family: var(--vis-axis-font-family, var(--vis-font-family));
text-anchor: middle;
`,Mg=z`
label: tick-label;
`,Ng=z`
label: tick-label-hideable;
opacity: 0;
transition: var(--vis-axis-tick-label-hide-transition);
`,Pg=class extends jp{constructor(e){super(),this._defaultConfig=vg,this.config=this._defaultConfig,this._defaultNumTicks=3,this.events={},e&&this.setConfig(e),this.axisGroup=this.g.append(`g`),this.gridGroup=this.g.append(`g`).attr(`class`,Og)}preRender(){let{config:e}=this,t=this.g.append(`g`).attr(`opacity`,0);this._renderAxis(t,0),this._axisRawBBox=t.node().getBBox(),e.tickTextAlign&&this._alignTickLabels(),this._renderAxisLabel(t),this._axisSizeBBox=this._getAxisSize(t),this._requiredMargin=this._getRequiredMargin(this._axisSizeBBox),t.remove()}getPosition(){let{config:{type:e,position:t}}=this;return t??(e===G.X?Z.Bottom:Z.Left)}_getAxisSize(e){return e.node().getBBox()}_getRequiredMargin(e=this._axisSizeBBox){let{config:{type:t,position:n}}=this;switch(t){case G.X:{let t=this._axisSizeBBox.x+this._axisSizeBBox.width,r=this._axisSizeBBox.x<0?Math.abs(this._axisSizeBBox.x):0,i=t-this._width>1?t-this._width:0;switch(n){case Z.Top:return{top:e.height,left:r,right:i};case Z.Bottom:default:return{bottom:e.height,left:r,right:i}}}case G.Y:{let t=e.height>this._height?(e.height-this._height)/2:0,r=t,i=t;switch(n){case Z.Right:return{right:e.width,top:r,bottom:i};case Z.Left:default:return{left:e.width,top:r,bottom:i}}}}}getRequiredMargin(){return this._requiredMargin}getOffset(e){let{config:{type:t,position:n}}=this;switch(t){case G.X:switch(n){case Z.Top:return{top:e.top,left:e.left};case Z.Bottom:default:return{top:e.top+this._height,left:e.left}}case G.Y:switch(n){case Z.Right:return{top:e.top,left:e.left+this._width};case Z.Left:default:return{top:e.top,left:e.left}}}}_render(e=this.config.duration,t=this.axisGroup){let{config:n}=this;if(this._renderAxis(t,e),this._renderAxisLabel(t),n.gridLine){let t=this._buildGrid();this.gridGroup.selectAll(`*`).interrupt(),W(this.gridGroup,e).call(t).style(`opacity`,1)}else W(this.gridGroup,e).style(`opacity`,0);n.tickTextAlign&&this._alignTickLabels(),this._resolveTickLabelOverlap(t)}_buildAxis(){let{config:{type:e,position:t,tickPadding:n}}=this,r=this._getNumTicks();switch(e){case G.X:switch(t){case Z.Top:return Hh(this.xScale).ticks(r).tickPadding(n);case Z.Bottom:default:return Wh(this.xScale).ticks(r).tickPadding(n)}case G.Y:switch(t){case Z.Right:return Uh(this.yScale).ticks(r).tickPadding(n);case Z.Left:default:return Gh(this.yScale).ticks(r).tickPadding(n)}}}_buildGrid(){let{config:e}=this,t;switch(e.type){case G.X:switch(e.position){case Z.Top:t=Hh(this.xScale);break;case Z.Bottom:default:t=Wh(this.xScale);break}t.tickSize(-this._height);break;case G.Y:switch(e.position){case Z.Right:t=Uh(this.yScale);break;case Z.Left:default:t=Gh(this.yScale);break}t.tickSize(-this._width)}t.tickSizeOuter(0).tickFormat(()=>``);let n=this._getNumTicks()*2,r=t.scale(),i=r.domain(),a=e.tickValues?this._getConfiguredTickValues():this._shouldRenderMinMaxTicksOnly()?(()=>{if(!e.minMaxTicksOnlyShowGridLines)return i;let t=r.ticks(n);if(t.length<2)return i;let a=t[1]-+t[0],o=i[1];return o-+t[t.length-1]>a/2?[...t,o]:t})():r.ticks(n);return t.tickValues(a),t}_renderAxis(e=this.axisGroup,t=this.config.duration){let{config:n}=this,r=this._buildAxis(),i=r.scale(),a=n.tickValues?this._getConfiguredTickValues():this._shouldRenderMinMaxTicksOnly()?i.domain():i.ticks(this._getNumTicks()),o=a.length;r.tickValues(a),e.selectAll(`*`).interrupt();let s=W(e,t).call(r);e.selectAll(`text`).attr(`dy`,null).attr(`y`,null),s.on(`end`,()=>{this._resolveTickLabelOverlap(e)}),e.selectAll(`g.tick`).classed(kg,!0).style(`font-size`,n.tickTextFontSize);let c=e.selectAll(`g.tick > text`).filter(e=>a.some(t=>Yn(e,t))).classed(Mg,!0).classed(Ng,!!n.tickTextHideOverlapping).style(`fill`,n.tickTextColor);e.selectAll(`g.tick > text`).filter(e=>!a.some(t=>Yn(e,t))).classed(Ag,!0),c.nodes().forEach(e=>Xs(e));let l=r.tickSize(),u=this.getPosition(),d=n.tickTextWidth||(n.type===G.X?this._containerWidth/(o+1):this._containerWidth/5);if(c.each((e,t,r)=>{let i=n.tickFormat?.call(n,e,t,a)??`${e}`,o=r[t];if(!this._tickTextStyleCached){let e=getComputedStyle(o);this._tickTextStyleCached={fontSize:Number.parseFloat(e.fontSize),fontFamily:e.fontFamily,fontWidthToHeightRatio:Hs()}}let[s,c]=this._getTickTextOffset(u,l,this._tickTextStyleCached.fontSize),f={verticalAlign:n.type===G.X?qh.Top:qh.Middle,width:d,textRotationAngle:n.tickTextAngle,separator:n.tickTextSeparator,wordBreak:n.tickTextForceWordBreak,x:s,y:c};n.tickTextFitMode===Jh.Trim&&(lg(H(o).text(i),d,n.tickTextTrimType,!0,this._tickTextStyleCached.fontSize,.58),i=H(o).text()),_g(o,Object.assign({text:i},this._tickTextStyleCached),f,n.type===G.X?`central`:`hanging`)}),e.classed(Dg,!0).classed(Tg,!n.tickLine).classed(Eg,!n.domainLine),n.fullSize){let n=this._getFullDomainPath(0);W(e.select(`.domain`),t).attr(`d`,n)}}_resolveTickLabelOverlap(e=this.axisGroup){let{config:t}=this,n=e.selectAll(`g.tick > text:not(.${Ag})`);if(!t.tickTextHideOverlapping){n.style(`opacity`,null);return}cancelAnimationFrame(this._collideTickLabelsAnimFrameId),this._collideTickLabelsAnimFrameId=requestAnimationFrame(()=>{this._collideTickLabels(n)})}_collideTickLabels(e){e.each((e,t,n)=>{let r=n[t];r._visible=!0});for(let t=0;t<3;t+=1)e.each((e,t,n)=>{let r=n[t];if(!r._visible)return;let i=r.getBoundingClientRect();for(let e=t+1;e<n.length;e+=1){if(t===e)continue;let r=n[e];if(r._visible&&Ho(i,r.getBoundingClientRect(),-5)){r._visible=!1;break}}});e.each((e,t,n)=>{let r=n[t];H(r).style(`opacity`,r._visible?1:0)})}_getNumTicks(){let{config:{type:e,numTicks:t}}=this;if(t)return t;if(e===G.X){let e=this.xScale.range(),t=e[1]-e[0];return Math.floor(t/175)}if(e===G.Y){let e=this.yScale.range();return Math.abs(e[0]-e[1])**.85/25}return this._defaultNumTicks}_getConfiguredTickValues(){let{config:e}=this,t=(e.type===G.X?this.xScale:this.yScale)?.domain();return e.tickValues?e.tickValues.filter(e=>e>=t[0]&&e<=t[1]):null}_shouldRenderMinMaxTicksOnly(){let{config:e}=this;return e.minMaxTicksOnly||e.type===G.X&&this._width<e.minMaxTicksOnlyWhenWidthIsLess}_getFullDomainPath(e=0){let{config:{type:t}}=this;switch(t){case G.X:return`M0.5, ${e} V0.5 H${this._width+.5} V${e}`;case G.Y:return`M${-e}, ${this._height+.5} H0.5 V0.5 H${-e}`}}_renderAxisLabel(e=this.axisGroup){let{type:t,label:n,labelMargin:r,labelFontSize:i,labelTextFitMode:a}=this.config;if(e.selectAll(`.${jg}`).remove(),!n)return;let o=this.getPosition(),{width:s,height:c}=this._axisRawBBox??e.node().getBBox(),l=t===G.Y?-90:0,u=e.append(`text`).attr(`class`,jg).attr(`dy`,`${this._getLabelDY()}em`).style(`font-size`,i).style(`fill`,this.config.labelColor);u.text(n);let d=!1;if(a===Jh.Wrap){let e=t===G.Y?this._height:this._width;u.node().getComputedTextLength()>e&&(cg(u,e),d=!0)}let f=s,p=c;if(a===Jh.Wrap){let e=u.node().getBBox();f=e.width,p=e.height}else{let e=t===G.X?f:p,n=getComputedStyle(u.node()),r=Number.parseFloat(n.fontSize);lg(u,e,this.config.labelTextTrimType,!0,r);let i=u.node().getBBox();f=i.width,p=i.height}let m=t===G.X?this._width/2:t===G.Y&&a===Jh.Wrap&&d?o===Z.Left?-s-p/2-10:s:(-1)**(o===Z.Left)*s,h=t===G.Y?this._height/2:t===G.X&&a===Jh.Wrap?o===Z.Top?-c-p/2:c:(-1)**(o===Z.Top)*c,g=t===G.X?0:(-1)**(o===Z.Left)*r,_=t===G.X?(-1)**(o===Z.Top)*r:0;u.attr(`transform`,`translate(${m+g},${h+_}) rotate(${l})`)}_getLabelDY(){let{type:e,position:t}=this.config;switch(e){case G.X:switch(t){case Z.Top:return 0;case Z.Bottom:default:return .75}case G.Y:switch(t){case Z.Right:return .75;case Z.Left:default:return-.25}}}_getTickTextOffset(e,t,n){let{config:r}=this,i=(r.tickTextAngle??0)/180*Math.PI,a=t+r.tickPadding;if(r.type===G.X){let t=e===Z.Bottom?1:-1;return[t*a*Math.sin(i),t*(a+n/2)*Math.cos(i)]}else{let t=e===Z.Right?1:-1;return[t*a*Math.cos(i),t*a*Math.sin(i)]}}_alignTickLabels(){let{config:{type:e,tickTextAlign:t,tickTextAngle:n,position:r}}=this,i=this.g.selectAll(`g.tick > text`),a=$h(t),o=e===G.X?0:this._getYTickTextTranslate(t,r),s=n?`translate(${o},0) rotate(${n})`:`translate(${o},0)`;i.attr(`transform`,s).attr(`text-anchor`,a)}_getYTickTextTranslate(e,t=Z.Left){let n=this.config.tickPadding+1,r=(this._axisRawBBox?.width??this.axisGroup.node()?.getBBox().width??0)-n;switch(e){case Yh.Left:return t===Z.Left?r*-1:0;case Yh.Right:return t===Z.Left?0:r;case Yh.Center:return t===Z.Left?r*-.5:r*.5;default:return 0}}};Pg.selectors=xg;var Fg=Object.assign(Object.assign({},Ap),{yStacked:void 0,baseline:null,duration:100,tooltip:void 0,template:(e,t,n,r)=>``,hideWhenFarFromPointer:!0,hideWhenFarFromPointerDistance:100,snapToData:!0,getCircles:void 0,color:void 0,strokeColor:void 0,strokeWidth:void 0,onCrosshairMove:void 0,forceShowAt:void 0,skipRangeCheck:!1}),Ig=w({circle:()=>Bg,globalStyles:()=>Lg,line:()=>zg,root:()=>Rg}),Lg=un`
:root {
--vis-crosshair-line-stroke-color: #888;
--vis-crosshair-line-stroke-width: 1px;
--vis-crosshair-line-stroke-opacity: 1;
--vis-crosshair-circle-stroke-color: #fff;
--vis-crosshair-circle-stroke-width: 1px;
--vis-crosshair-circle-stroke-opacity: 0.75;
}
`,Rg=z`
label: crosshair-component;
`,zg=z`
stroke: var(--vis-crosshair-line-stroke-color);
stroke-width: var(--vis-crosshair-line-stroke-width);
stroke-opacity: var(--vis-crosshair-line-stroke-opacity);
pointer-events: none;
`,Bg=z`
stroke: var(--vis-crosshair-circle-stroke-color);
stroke-width: var(--vis-crosshair-circle-stroke-width);
stroke-opacity: var(--vis-crosshair-circle-stroke-opacity);
pointer-events: none;
`,Vg=class extends jp{constructor(e){super(),this.clippable=!0,this._defaultConfig=Fg,this.config=this._defaultConfig,this._xPx=void 0,this._yPx=void 0,this._mouseEvent=void 0,this._animFrameId=null,this._accessors={x:void 0,y:void 0,yStacked:void 0,baseline:void 0},e&&this.setConfig(e),this.g.style(`opacity`,0),this.line=this.g.append(`line`).attr(`class`,zg)}set accessors(e){this._accessors=e}get accessors(){let{config:e}=this,t=!!(e.x||e.y||e.yStacked),n=t?e.x:this._accessors.x,r=t?e.y:this._accessors.y;return{x:n,y:r?Gn(r)?r:[r]:void 0,yStacked:t?e.yStacked:this._accessors.yStacked,baseline:e.baseline??this._accessors.baseline}}_isContainerInViewport(){if(!this.container?.node())return!1;let e=this.container.node().getBoundingClientRect(),t=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight,r=Math.max(0,Math.min(e.right,t)-Math.max(e.left,0)),i=Math.max(0,Math.min(e.bottom,n)-Math.max(e.top,0)),a=e.width*e.height,o=r*i;return a>0&&o/a>=.35}setContainer(e){this.container!==e&&(this.container=e,this.container.on(`mousemove.crosshair`,this._onMouseMove.bind(this)),this.container.on(`mouseout.crosshair`,this._onMouseOut.bind(this)),this.container.on(`wheel.crosshair`,this._onWheel.bind(this)))}_render(e){var t;let{config:n,datamodel:r}=this,i=Hn(e)?e:n.duration,a=n.forceShowAt!==void 0,o=a?this.xScale(n.forceShowAt):this._xPx,s=this.xScale.invert(o),c=r.data?.length&&this.accessors.x?r.data.indexOf(ur(r.data,s,this.accessors.x,Vn.Left)):void 0,l,u;n.snapToData&&(!this.accessors.y&&!this.accessors.yStacked&&r.data?.length&&console.warn(`Unovis | Crosshair: Y accessors have not been configured. Please check if they're present in the configuration object`),!r.data?.length&&this._mouseEvent&&console.warn(`Unovis | Crosshair: No data to snap to. Make sure the data has been passed to the container or to the crosshair itself`),l=ur(r.data,s,this.accessors.x),u=r.data.indexOf(l));let d=this.xScale.range(),f=this.yScale.range(),p=n.snapToData&&l?rr(Math.round(this.xScale(B(l,this.accessors.x,u))),0,this._width):rr(o,d[0],d[1]),m=o>=d[0]&&o<=d[1],h=this._yPx>=Math.min(f[0],f[1])&&this._yPx<=Math.max(f[0],f[1]),g=n.skipRangeCheck?!!this._xPx:this._xPx?m&&h:m;n.hideWhenFarFromPointer&&Math.abs(p-+o)>=n.hideWhenFarFromPointerDistance&&(g=!1);let _=n.tooltip??this.tooltip;if(g&&_&&this._isContainerInViewport()){let e=_.getContainer()||this.container.node(),t=_.isContainerBody(),n=this.accessors.x?B(l,this.accessors.x,u):void 0;if(a){let e=this.container.node().getBoundingClientRect(),r=[(t?o+e.left:o)+this._containerMargin.left,this._height/2+(t?e.top:0)];this._showTooltip(l,n,r,c)}else if(this._mouseEvent){let r=t?[this._mouseEvent.clientX,this._mouseEvent.clientY]:La(this._mouseEvent,e);this._showTooltip(l,n,r,c)}}else this._hideTooltip();if(this._mouseEvent&&=((t=n.onCrosshairMove)==null||t.call(n,g?this.xScale.invert(this._xPx):void 0,l,u,this._mouseEvent),void 0),W(this.g,i).style(`opacity`,g?1:0),!isFinite(o))return;this.line.attr(`y1`,0).attr(`y2`,this._height),W(this.line,i,Nl).attr(`x1`,p).attr(`x2`,p);let v=Un(n.getCircles)?n.getCircles(s,r.data,this.yScale,c):this.getCircleData(l,u),y=this.g.selectAll(`circle`).data(v,(e,t)=>e.id??t);W(y.enter().append(`circle`).attr(`class`,Bg).attr(`r`,0).attr(`cx`,p).attr(`cy`,e=>e.y).style(`fill`,e=>e.color).style(`stroke`,e=>e.strokeColor).style(`stroke-width`,e=>e.strokeWidth).merge(y),i,Nl).attr(`cx`,p).attr(`cy`,e=>e.y).attr(`r`,4).style(`opacity`,e=>e.opacity).style(`fill`,e=>e.color).style(`stroke`,e=>e.strokeColor).style(`stroke-width`,e=>e.strokeWidth),y.exit().remove()}hide(e){window.cancelAnimationFrame(this._animFrameId),this._animFrameId=window.requestAnimationFrame(()=>{var t,n;this._xPx=void 0,this._yPx=void 0,this._mouseEvent=void 0,(n=(t=this.config).onCrosshairMove)==null||n.call(t,void 0,void 0,void 0,e),this._render()})}_onMouseMove(e){let{datamodel:t,element:n}=this;!this.accessors.x&&t.data?.length&&console.warn(`Unovis | Crosshair: X accessor function has not been configured. Please check if it's present in the configuration object`);let[r,i]=La(e,n);this._xPx=r,this._yPx=i,this._mouseEvent=e,window.cancelAnimationFrame(this._animFrameId),this._animFrameId=window.requestAnimationFrame(()=>{this._render()})}_onMouseOut(e){(!e||!this.container?.node().contains(e.relatedTarget))&&this.hide(e)}_onWheel(e){this.hide(e)}_showTooltip(e,t,n,r){let{config:i,datamodel:a}=this,o=i.tooltip??this.tooltip;if(!o||!n)return;let[s,c]=n,l=i.template(e,t,a.data,r);if(o.config.followCursor=!0,!o.config.horizontalPlacement||o.config.horizontalPlacement===Z.Auto){let e=o.isContainerBody()?s-this.container.node().getBoundingClientRect().left:s;o.overrideHorizontalPlacement(e>this._containerWidth/2?Z.Left:Z.Right)}l&&o.show(l,{x:s,y:c})}_hideTooltip(){let{config:e}=this;(e.tooltip??this.tooltip)?.hide()}getYDataExtent(){return[void 0,void 0]}getCircleData(e,t){let{config:n}=this;if(n.snapToData&&e){let r=this.accessors.y??[],i=this.accessors.yStacked??[],a=B(e,this.accessors.baseline,t)||0,o=ar(e,t,...i).map((t,r)=>({y:this.yScale(t+a),opacity:Hn(B(e,i[r],r))?1:0,color:vh(e,n.color,r),strokeColor:n.strokeColor?vh(e,n.strokeColor,r):void 0,strokeWidth:n.strokeWidth?B(e,n.strokeWidth,r):void 0})),s=r.map((r,i)=>{let a=B(e,r,t);return{y:this.yScale(a),opacity:Hn(a)?1:0,color:vh(e,n.color,o.length+i),strokeColor:n.strokeColor?vh(e,n.strokeColor,i):void 0,strokeWidth:n.strokeWidth?B(e,n.strokeWidth,i):void 0}});return o.concat(s)}return[]}};Vg.selectors=Ig;var Hg=Object.assign(Object.assign({},Ap),{color:void 0,curveType:$.MonotoneX,baseline:()=>0,opacity:1,cursor:null,line:!1,lineColor:void 0,lineWidth:2,lineDashArray:void 0,minHeight1Px:!1,minHeight:void 0,stackMinHeight:!1}),Ug=w({area:()=>Kg,areaLinePath:()=>qg,globalStyles:()=>Gg,root:()=>Wg}),Wg=z`
label: area-component;
`,Gg=un`
:root {
--vis-area-cursor: default;
--vis-area-fill-opacity: 1;
--vis-area-stroke-color: none;
--vis-area-stroke-width: 0px;
--vis-area-stroke-dasharray: none;
--vis-area-stroke-opacity: 1;
--vis-area-hover-fill-opacity: none;
--vis-area-hover-stroke-width: none;
/* Dark Theme */
--vis-dark-area-stroke-color: none;
}
body.theme-dark ${`.${Wg}`} {
--vis-area-stroke-color: var(--vis-dark-area-stroke-color);
}
`,Kg=z`
label: area;
cursor: var(--vis-area-cursor);
fill-opacity: var(--vis-area-fill-opacity);
stroke-width: var(--vis-area-stroke-width);
stroke-dasharray: var(--vis-area-stroke-dasharray);
stroke: var(--vis-area-stroke-color);
stroke-opacity: var(--vis-area-stroke-opacity);
&:hover {
fill-opacity: var(--vis-area-hover-fill-opacity);
stroke-width: var(--vis-area-hover-stroke-width);
}
`,qg=z`
label: areaLinePath;
fill: none;
stroke-dasharray: var(--vis-line-stroke-dasharray);
stroke-dashoffset: var(--vis-line-stroke-dashoffset);
`,Jg=class e extends jp{constructor(t){super(),this._defaultConfig=Hg,this.config=this._defaultConfig,this.stacked=!0,this.events={[e.selectors.area]:{}},t&&this.setConfig(t),this.stacked=Array.isArray(this.config.y)}get bleed(){let{config:{line:e,lineWidth:t}}=this;if(!e)return{top:0,bottom:0,left:0,right:0};let n=this.yScale.domain(),r=(this.yScale.range()[0]>this.yScale.range()[1]?wp.North:wp.South)===wp.South,i=t>3,a=t>=10;return{top:!a&&(!r&&n[1]===0||r&&n[0]===0)?0:t/2,bottom:!a&&(!r&&n[0]===0||r&&n[1]===0)?0:t/2,left:i?t/2:0,right:i?t/2:0}}_render(e){super._render(e);let{config:t,datamodel:{data:n}}=this,r=Hn(e)?e:t.duration,i=yh[t.curveType];this._areaGen=sm().x(e=>e.x).y0(e=>e.y0).y1(e=>e.y1).curve(i);let a=Gn(t.y)?t.y:[t.y],o=n.map((e,n)=>this.xScale(B(e,t.x,n))),s=or(n,t.baseline,a,this._prevNegative);this._prevNegative=s.map(e=>!!e.isMostlyNegative);let c=[],l=s.map(e=>e.map((e,n)=>{let r=o[n],i=this.yScale(e[0]),a=this.yScale(e[1]),s=a>i,l=t.stackMinHeight&&c[n]||0,u=s?i+l:i-l,d=s?a+l:a-l,f=0;return(t.minHeight||t.minHeight1Px)&&Math.abs(d-u)<(t.minHeight??1)&&(f=(t.minHeight??1)-Math.abs(d-u),t.stackMinHeight&&(c[n]=l+f)),{x:r,y0:u,y1:s?d+f:d-f}})),u=l.length-1,d=[...l].reverse(),f=this.g.selectAll(`.${Kg}`).data(d),p=W(f.enter().append(`path`).attr(`class`,Kg).attr(`d`,e=>this._areaGen(e)||this._emptyPath()).style(`opacity`,0).style(`fill`,(e,r)=>vh(n,t.color,u-r)).merge(f),r).style(`opacity`,(e,r)=>e.some(e=>e.y0-e.y1!==0)?B(n,t.opacity,u-r):0).style(`fill`,(e,r)=>vh(n,t.color,u-r)).style(`cursor`,(e,r)=>tr(n,t.cursor,u-r));r?p.attrTween(`d`,(e,t,n)=>_h(H(n[t]).attr(`d`),this._areaGen(e)||this._emptyPath())):p.attr(`d`,e=>this._areaGen(e)||this._emptyPath()),W(f.exit(),r).style(`opacity`,0).remove(),t.line&&this._renderLines(r,l)}_renderLines(e,t){let{config:n,datamodel:{data:r}}=this,i=t.length-1,a=[...t].reverse(),o=n.lineColor??n.color,s=this.g.selectAll(`.${qg}`).data(a),c=this.g.selectAll(`.${Kg}`).nodes(),l=W(s.enter().insert(`path`,(e,t)=>c[t+1]).attr(`class`,qg).attr(`stroke`,(e,t)=>vh(r,o,i-t)).attr(`stroke-width`,n.lineWidth).attr(`stroke-opacity`,0).merge(s),e).attr(`stroke`,(e,t)=>vh(r,o,i-t)).attr(`stroke-width`,n.lineWidth).attr(`stroke-opacity`,1).attr(`cursor`,(e,t)=>tr(r,n.cursor,i-t)).style(`stroke-dasharray`,(e,t)=>er(r,n.lineDashArray,t)?.join(` `)??null),u=yh[n.curveType];this._lineGen=om().x(e=>e.x).y(e=>e.y1).curve(u),e?l.attrTween(`d`,(e,t,n)=>_h(H(n[t]).attr(`d`)||this._emptyLinePath(),this._lineGen(e)||this._emptyLinePath())):l.attr(`d`,e=>this._lineGen(e)||this._emptyLinePath()),W(s.exit(),e).style(`opacity`,0).remove()}getYDataExtent(e){let{config:t,datamodel:n}=this,r=Gn(t.y)?t.y:[t.y],i=this.xScale.domain();return ir(e?dr(n.data,i,t.x,!0):n.data,t.baseline,...r)}_emptyPath(){let e=this.xScale.range(),t=this.yScale.domain(),n=this.yScale((t[0]+t[1])/2),r=n;return this._areaGen([{y0:n,y1:r,x:e[0]},{y0:n,y1:r,x:e[1]}])}_emptyLinePath(){let e=this.xScale.range(),t=this.yScale.range();return`M${e[0]},${t[0]} L${e[1]},${t[0]}`}};Jg.selectors=Ug;var Yg=Symbol(`componentAccessorKey`),Xg=Symbol(`tooltipAccessorKey`),Zg=Symbol(`crosshairAccessorKey`),Qg=Symbol(`axisAccessorKey`),$g=Symbol(`annotationsAccessorKey`);function e_(e,t){return Yn(e,t)}function t_(e){let t=m(),n=t.attrs;return C(()=>{let r={},i=t?.vnode.props??{};return Object.keys(i).forEach(t=>{r[ie(t)]=e[ie(t)]}),{...r,...n}})}var n_=k({__name:`index`,props:{components:{},xScale:{type:[Object,Function]},xDomain:{},xDomainMinConstraint:{},xDomainMaxConstraint:{},xRange:{},yScale:{type:[Object,Function]},yDomain:{},yDomainMinConstraint:{},yDomainMaxConstraint:{},yRange:{},yDirection:{},xAxis:{},yAxis:{},autoMargin:{type:Boolean},tooltip:{},crosshair:{},preventEmptyDomain:{type:[Boolean,null]},scaleByDomain:{type:Boolean},annotations:{},clipPathExtend:{},duration:{},margin:{},padding:{},sizing:{},width:{},height:{},svgDefs:{},ariaLabel:{},data:{}},setup(t,{expose:r}){let i=t,{data:a}=b(i),l=t_(i),u=D(),d=S({components:[],annotations:void 0,crosshair:void 0,tooltip:void 0,xAxis:void 0,yAxis:void 0}),p=D();return f(a,()=>{u.value&&u.value.setData(a.value,!0)}),e(()=>{var e;d.components.map(e=>e.config),(e=u.value)==null||e.updateContainer({...re(l.value),...re(d)})}),s(()=>{p.value&&(u.value=new Ep(p.value,{...re(d)},a.value))}),c(()=>u.value?.destroy()),n(Yg,{data:a,update:e=>d.components=[...d.components,e],destroy:()=>d.components=d.components?.filter(e=>!e.isDestroyed())}),n(Qg,{data:a,update:e=>d[`${e.config.type}Axis`]=e,destroy:e=>{d[`${e}Axis`]=void 0}}),n(Zg,{data:a,update:e=>d.crosshair=e,destroy:()=>{d.crosshair=void 0}}),n(Xg,{data:a,update:e=>d.tooltip=e,destroy:()=>{d.tooltip=void 0}}),n($g,{data:a,update:e=>d.annotations=e,destroy:()=>{d.annotations=void 0}}),r({component:u}),(e,t)=>(j(),y(`div`,{"data-vis-xy-container":``,ref_key:`elRef`,ref:p,class:`unovis-xy-container`},[o(e.$slots,`default`)],512))}}),r_={"data-vis-component":``};Jg.selectors;var i_=k({__name:`index`,props:{color:{type:[Function,String,Array,null]},curveType:{},baseline:{type:[Function,Number,null]},opacity:{type:[Function,Number,null]},cursor:{type:[Function,String,null]},minHeight1Px:{type:Boolean},minHeight:{},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(e,{expose:t}){let n=T(Yg),r=e,i=C(()=>n.data.value??r.data),a=t_(r),o=D();return s(()=>{d(()=>{var e;o.value=new Jg(a.value),(e=o.value)==null||e.setData(i.value),n.update(o.value)})}),c(()=>{var e;(e=o.value)==null||e.destroy(),n.destroy()}),f(a,(e,t)=>{var n;e_(e,t)||(n=o.value)==null||n.setConfig(a.value)}),f(i,()=>{var e;(e=o.value)==null||e.setData(i.value)}),t({component:o}),(e,t)=>(j(),y(`div`,r_))}}),a_={"data-vis-axis":``};Pg.selectors;var o_=k({__name:`index`,props:{position:{},type:{},fullSize:{type:Boolean},label:{},labelFontSize:{},labelMargin:{},labelTextFitMode:{},labelTextTrimType:{},labelColor:{},gridLine:{type:Boolean},tickLine:{type:Boolean},domainLine:{type:Boolean},minMaxTicksOnly:{type:Boolean},minMaxTicksOnlyShowGridLines:{type:Boolean},minMaxTicksOnlyWhenWidthIsLess:{},tickFormat:{type:Function},tickValues:{},numTicks:{},tickTextFitMode:{},tickTextWidth:{},tickTextSeparator:{},tickTextForceWordBreak:{type:Boolean},tickTextTrimType:{},tickTextFontSize:{},tickTextAlign:{},tickTextColor:{},tickTextAngle:{},tickTextHideOverlapping:{type:Boolean},tickPadding:{},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},color:{type:[Function,String,Array,null]},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(e,{expose:t}){let n=T(Qg),r=e,i=C(()=>n.data.value??r.data),a=t_(r),o=D();return s(()=>{d(()=>{var e;o.value=new Pg(a.value),(e=o.value)==null||e.setData(i.value),n.update(o.value)})}),c(()=>{var e;(e=o.value)==null||e.destroy(),n.destroy(r.type)}),f(a,(e,t)=>{var n;e_(e,t)||(n=o.value)==null||n.setConfig(a.value)}),f(i,()=>{var e;(e=o.value)==null||e.setData(i.value)}),t({component:o}),(e,t)=>(j(),y(`div`,a_))}}),s_={"data-vis-crosshair":``};Vg.selectors;var c_=k({__name:`index`,props:{data:{}},setup(e,{expose:t}){let n=T(Zg),r=e,i=C(()=>n.data.value??r.data),a=t_(r),o=D();return s(()=>{d(()=>{var e;o.value=new Vg(a.value),(e=o.value)==null||e.setData(i.value),n.update(o.value)})}),c(()=>{var e;(e=o.value)==null||e.destroy(),n.destroy()}),f(a,(e,t)=>{var n;e_(e,t)||(n=o.value)==null||n.setConfig(a.value)}),f(i,()=>{var e;(e=o.value)==null||e.setData(i.value)}),t({component:o}),(e,t)=>(j(),y(`div`,s_))}}),l_={"data-vis-component":``};kh.selectors;var u_=k({__name:`index`,props:{color:{type:[Function,String,Array,null]},curveType:{},lineWidth:{},lineDashArray:{type:[Function,Array,null]},fallbackValue:{},highlightOnHover:{type:Boolean},cursor:{type:[Function,String,null]},interpolateMissingData:{type:Boolean},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(e,{expose:t}){let n=T(Yg),r=e,i=C(()=>n.data.value??r.data),a=t_(r),o=D();return s(()=>{d(()=>{var e;o.value=new kh(a.value),(e=o.value)==null||e.setData(i.value),n.update(o.value)})}),c(()=>{var e;(e=o.value)==null||e.destroy(),n.destroy()}),f(a,(e,t)=>{var n;e_(e,t)||(n=o.value)==null||n.setConfig(a.value)}),f(i,()=>{var e;(e=o.value)==null||e.setData(i.value)}),t({component:o}),(e,t)=>(j(),y(`div`,l_))}}),d_={"data-vis-tooltip":``};Wp.selectors;var f_=k({__name:`index`,props:{components:{},container:{},followCursor:{type:Boolean},allowHover:{type:Boolean},horizontalPlacement:{},horizontalShift:{},verticalPlacement:{},verticalShift:{},triggers:{},attributes:{},className:{},hideDelay:{},showDelay:{},data:{}},setup(e,{expose:t}){let n=T(Xg),r=t_(e),i=D();return s(()=>{d(()=>{i.value=new Wp(r.value),n.update(i.value)})}),c(()=>{var e;(e=i.value)==null||e.destroy(),n.destroy()}),f(r,(e,t)=>{var n;e_(e,t)||(n=i.value)==null||n.setConfig(r.value)}),t({component:i}),(e,t)=>(j(),y(`div`,d_))}}),p_=k({__name:`ChartStyle`,props:{id:{}},setup(e){let{config:t}=O_(),n=C(()=>Object.entries(t.value).filter(([,e])=>e.theme||e.color));return(t,i)=>n.value.length?(j(),ne(r(he),{key:0,as:`style`},{default:O(()=>[A(u(Object.entries(r(D_)).map(([t,r])=>`
${r} [data-chart=${e.id}] {
${n.value.map(([e,n])=>{let r=n.theme?.[t]||n.color;return r?` --color-${e}: ${r};`:null}).join(`
`)}
}
`).join(`
`)),1)]),_:1})):ae(``,!0)}}),m_=[`data-chart`],h_=k({__name:`ChartContainer`,props:{id:{},class:{type:[Boolean,null,String,Object,Array]},config:{},cursor:{type:Boolean}},setup(e){let t=e,{config:n}=b(t),i=ge(),s=C(()=>`chart-${t.id||i.replace(/:/g,``)}`);return k_({id:i,config:n}),(c,l)=>(j(),y(`div`,{"data-slot":`chart`,"data-chart":s.value,class:h(r(de)(`[&_.tick_text]:!fill-muted-foreground [&_.tick_line]:!stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex flex-col aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden [&_[data-vis-xy-container]]:h-full [&_[data-vis-single-container]]:h-full h-full [&_[data-vis-xy-container]]:w-full [&_[data-vis-single-container]]:w-full w-full `,t.class)),style:a({"--vis-tooltip-padding":`0px`,"--vis-tooltip-background-color":`transparent`,"--vis-tooltip-border-color":`transparent`,"--vis-tooltip-text-color":`none`,"--vis-tooltip-shadow-color":`none`,"--vis-tooltip-backdrop-filter":`none`,"--vis-crosshair-circle-stroke-color":`#0000`,"--vis-crosshair-line-stroke-width":e.cursor?`1px`:`0px`,"--vis-font-family":`var(--font-sans)`})},[o(c.$slots,`default`,{id:r(i),config:r(n)}),p(p_,{id:s.value},null,8,[`id`])],14,m_))}}),g_=k({__name:`ChartLegendContent`,props:{hideIcon:{type:Boolean},nameKey:{},verticalAlign:{default:`bottom`},class:{type:[Boolean,null,String,Object,Array]}},setup(e){let t=e,{id:n,config:i}=O_(),o=C(()=>Object.entries(i.value).map(([e])=>({key:t.nameKey||e,itemConfig:i.value[e]}))),c=D(``);return s(()=>{c.value=`[data-chart="chart-${n}"]>[data-vis-xy-container]`}),(n,i)=>c.value?(j(),y(`div`,{key:0,class:h(r(de)(`flex items-center justify-center gap-4`,e.verticalAlign===`top`?`pb-3`:`pt-3`,t.class))},[(j(!0),y(x,null,g(o.value,({key:e,itemConfig:t})=>(j(),y(`div`,{key:e,class:h(r(de)(`[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3`))},[t?.icon?(j(),ne(_(t.icon),{key:0})):(j(),y(`div`,{key:1,class:`h-2 w-2 shrink-0 rounded-[2px]`,style:a({backgroundColor:t.color})},null,4)),A(` `+u(t?.label),1)],2))),128))],2)):ae(``,!0)}}),__={key:0,class:`font-medium`},v_={class:`grid gap-1.5`},y_={class:`grid gap-1.5`},b_={key:0,class:`font-medium`},x_={class:`text-muted-foreground`},S_={key:0,class:`text-foreground font-mono font-medium tabular-nums`},C_=k({__name:`ChartTooltipContent`,props:{hideLabel:{type:Boolean},hideIndicator:{type:Boolean},indicator:{default:`dot`},nameKey:{},labelKey:{},labelFormatter:{},payload:{default:()=>({})},config:{default:()=>({})},class:{type:[Boolean,null,String,Object,Array]},color:{},x:{}},setup(e){let t=e,n=C(()=>Object.entries(t.payload).map(([e,n])=>({key:e,value:n,itemConfig:t.config[e],indicatorColor:t.config[e]?.color??t.payload.fill})).filter(e=>e.itemConfig)),i=C(()=>Object.keys(t.payload).length===1&&t.indicator!==`dot`),s=C(()=>t.hideLabel?null:t.labelFormatter&&t.x!==void 0?t.labelFormatter(t.x):t.labelKey?t.config[t.labelKey]?.label||t.payload[t.labelKey]:t.x);return(c,l)=>(j(),y(`div`,{class:h(r(de)(`border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl`,t.class))},[o(c.$slots,`default`,{},()=>[!i.value&&s.value?(j(),y(`div`,__,u(s.value),1)):ae(``,!0),v(`div`,v_,[(j(!0),y(x,null,g(n.value,({value:t,itemConfig:n,indicatorColor:o,key:c})=>(j(),y(`div`,{key:c,class:h(r(de)(`[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5`,e.indicator===`dot`&&`items-center`))},[n?.icon?(j(),ne(_(n.icon),{key:0})):e.hideIndicator?ae(``,!0):(j(),y(`div`,{key:1,class:h(r(de)(`shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)`,{"h-2.5 w-2.5":e.indicator===`dot`,"w-1":e.indicator===`line`,"w-0 border-[1.5px] border-dashed bg-transparent":e.indicator===`dashed`,"my-0.5":i.value&&e.indicator===`dashed`})),style:a({"--color-bg":o,"--color-border":o})},null,6)),v(`div`,{class:h(r(de)(`flex flex-1 justify-between leading-none`,i.value?`items-end`:`items-center`))},[v(`div`,y_,[i.value?(j(),y(`div`,b_,u(s.value),1)):ae(``,!0),v(`span`,x_,u(n?.label||t),1)]),t?(j(),y(`span`,S_,u(t.toLocaleString()),1)):ae(``,!0)],2)],2))),128))])])],2))}}),w_=new Map;function T_(e){return JSON.stringify(e,Object.keys(e).sort())}function E_(e,t,n){if(!pe)return;let r=ee();return(a,o)=>{let s=`data`in a?a.data:a,c=`${r}-${T_(s)}`,l=w_.get(c);if(l)return l;let u=i(t,{...n,payload:s,config:e,x:o}),d=document.createElement(`div`);return te(u,d),w_.set(c,d.innerHTML),d.innerHTML}}var D_={light:``,dark:`.dark`},[O_,k_]=me(`Chart`),A_={class:`grid flex-1 gap-1`},j_=`
<linearGradient id="fillDesktop" x1="0" y1="0" x2="0" y2="1">
<stop
offset="5%"
stop-color="var(--color-desktop)"
stop-opacity="0.8"
/>
<stop
offset="95%"
stop-color="var(--color-desktop)"
stop-opacity="0.1"
/>
</linearGradient>
<linearGradient id="fillMobile" x1="0" y1="0" x2="0" y2="1">
<stop
offset="5%"
stop-color="var(--color-mobile)"
stop-opacity="0.8"
/>
<stop
offset="95%"
stop-color="var(--color-mobile)"
stop-opacity="0.1"
/>
</linearGradient>
`,M_=k({__name:`overview-chart`,setup(e){let t=[{date:new Date(`2024-04-01`),desktop:222,mobile:150},{date:new Date(`2024-04-02`),desktop:97,mobile:180},{date:new Date(`2024-04-03`),desktop:167,mobile:120},{date:new Date(`2024-04-04`),desktop:242,mobile:260},{date:new Date(`2024-04-05`),desktop:373,mobile:290},{date:new Date(`2024-04-06`),desktop:301,mobile:340},{date:new Date(`2024-04-07`),desktop:245,mobile:180},{date:new Date(`2024-04-08`),desktop:409,mobile:320},{date:new Date(`2024-04-09`),desktop:59,mobile:110},{date:new Date(`2024-04-10`),desktop:261,mobile:190},{date:new Date(`2024-04-11`),desktop:327,mobile:350},{date:new Date(`2024-04-12`),desktop:292,mobile:210},{date:new Date(`2024-04-13`),desktop:342,mobile:380},{date:new Date(`2024-04-14`),desktop:137,mobile:220},{date:new Date(`2024-04-15`),desktop:120,mobile:170},{date:new Date(`2024-04-16`),desktop:138,mobile:190},{date:new Date(`2024-04-17`),desktop:446,mobile:360},{date:new Date(`2024-04-18`),desktop:364,mobile:410},{date:new Date(`2024-04-19`),desktop:243,mobile:180},{date:new Date(`2024-04-20`),desktop:89,mobile:150},{date:new Date(`2024-04-21`),desktop:137,mobile:200},{date:new Date(`2024-04-22`),desktop:224,mobile:170},{date:new Date(`2024-04-23`),desktop:138,mobile:230},{date:new Date(`2024-04-24`),desktop:387,mobile:290},{date:new Date(`2024-04-25`),desktop:215,mobile:250},{date:new Date(`2024-04-26`),desktop:75,mobile:130},{date:new Date(`2024-04-27`),desktop:383,mobile:420},{date:new Date(`2024-04-28`),desktop:122,mobile:180},{date:new Date(`2024-04-29`),desktop:315,mobile:240},{date:new Date(`2024-04-30`),desktop:454,mobile:380},{date:new Date(`2024-05-01`),desktop:165,mobile:220},{date:new Date(`2024-05-02`),desktop:293,mobile:310},{date:new Date(`2024-05-03`),desktop:247,mobile:190},{date:new Date(`2024-05-04`),desktop:385,mobile:420},{date:new Date(`2024-05-05`),desktop:481,mobile:390},{date:new Date(`2024-05-06`),desktop:498,mobile:520},{date:new Date(`2024-05-07`),desktop:388,mobile:300},{date:new Date(`2024-05-08`),desktop:149,mobile:210},{date:new Date(`2024-05-09`),desktop:227,mobile:180},{date:new Date(`2024-05-10`),desktop:293,mobile:330},{date:new Date(`2024-05-11`),desktop:335,mobile:270},{date:new Date(`2024-05-12`),desktop:197,mobile:240},{date:new Date(`2024-05-13`),desktop:197,mobile:160},{date:new Date(`2024-05-14`),desktop:448,mobile:490},{date:new Date(`2024-05-15`),desktop:473,mobile:380},{date:new Date(`2024-05-16`),desktop:338,mobile:400},{date:new Date(`2024-05-17`),desktop:499,mobile:420},{date:new Date(`2024-05-18`),desktop:315,mobile:350},{date:new Date(`2024-05-19`),desktop:235,mobile:180},{date:new Date(`2024-05-20`),desktop:177,mobile:230},{date:new Date(`2024-05-21`),desktop:82,mobile:140},{date:new Date(`2024-05-22`),desktop:81,mobile:120},{date:new Date(`2024-05-23`),desktop:252,mobile:290},{date:new Date(`2024-05-24`),desktop:294,mobile:220},{date:new Date(`2024-05-25`),desktop:201,mobile:250},{date:new Date(`2024-05-26`),desktop:213,mobile:170},{date:new Date(`2024-05-27`),desktop:420,mobile:460},{date:new Date(`2024-05-28`),desktop:233,mobile:190},{date:new Date(`2024-05-29`),desktop:78,mobile:130},{date:new Date(`2024-05-30`),desktop:340,mobile:280},{date:new Date(`2024-05-31`),desktop:178,mobile:230},{date:new Date(`2024-06-01`),desktop:178,mobile:200},{date:new Date(`2024-06-02`),desktop:470,mobile:410},{date:new Date(`2024-06-03`),desktop:103,mobile:160},{date:new Date(`2024-06-04`),desktop:439,mobile:380},{date:new Date(`2024-06-05`),desktop:88,mobile:140},{date:new Date(`2024-06-06`),desktop:294,mobile:250},{date:new Date(`2024-06-07`),desktop:323,mobile:370},{date:new Date(`2024-06-08`),desktop:385,mobile:320},{date:new Date(`2024-06-09`),desktop:438,mobile:480},{date:new Date(`2024-06-10`),desktop:155,mobile:200},{date:new Date(`2024-06-11`),desktop:92,mobile:150},{date:new Date(`2024-06-12`),desktop:492,mobile:420},{date:new Date(`2024-06-13`),desktop:81,mobile:130},{date:new Date(`2024-06-14`),desktop:426,mobile:380},{date:new Date(`2024-06-15`),desktop:307,mobile:350},{date:new Date(`2024-06-16`),desktop:371,mobile:310},{date:new Date(`2024-06-17`),desktop:475,mobile:520},{date:new Date(`2024-06-18`),desktop:107,mobile:170},{date:new Date(`2024-06-19`),desktop:341,mobile:290},{date:new Date(`2024-06-20`),desktop:408,mobile:450},{date:new Date(`2024-06-21`),desktop:169,mobile:210},{date:new Date(`2024-06-22`),desktop:317,mobile:270},{date:new Date(`2024-06-23`),desktop:480,mobile:530},{date:new Date(`2024-06-24`),desktop:132,mobile:180},{date:new Date(`2024-06-25`),desktop:141,mobile:190},{date:new Date(`2024-06-26`),desktop:434,mobile:380},{date:new Date(`2024-06-27`),desktop:448,mobile:490},{date:new Date(`2024-06-28`),desktop:149,mobile:200},{date:new Date(`2024-06-29`),desktop:103,mobile:160},{date:new Date(`2024-06-30`),desktop:446,mobile:400}],n={mobile:{label:`Mobile`,color:`var(--chart-2)`},desktop:{label:`Desktop`,color:`var(--chart-1)`}},i=D(`90d`),a=C(()=>t.filter(e=>{let t=new Date(e.date),n=new Date(`2024-06-30`),r=90;i.value===`30d`?r=30:i.value===`7d`&&(r=7);let a=new Date(n);return a.setDate(a.getDate()-r),t>=a}));return(e,t)=>(j(),ne(r(Ee),{class:`pt-0`},{default:O(()=>[p(r(Ae),{class:`flex items-center gap-2 space-y-0 border-b py-5 sm:flex-row`},{default:O(()=>[v(`div`,A_,[p(r(Oe),null,{default:O(()=>[...t[1]||=[A(`Area Chart - Interactive`,-1)]]),_:1}),p(r(ke),null,{default:O(()=>[...t[2]||=[A(` Showing total visitors for the last 3 months `,-1)]]),_:1})]),p(r(oe),{modelValue:r(i),"onUpdate:modelValue":t[0]||=e=>E(i)?i.value=e:null},{default:O(()=>[p(r(le),{class:`hidden w-[160px] rounded-lg sm:ml-auto sm:flex`,"aria-label":`Select a value`},{default:O(()=>[p(r(ce),{placeholder:`Last 3 months`})]),_:1}),p(r(ue),{class:`rounded-xl`},{default:O(()=>[p(r(se),{value:`90d`,class:`rounded-lg`},{default:O(()=>[...t[3]||=[A(` Last 3 months `,-1)]]),_:1}),p(r(se),{value:`30d`,class:`rounded-lg`},{default:O(()=>[...t[4]||=[A(` Last 30 days `,-1)]]),_:1}),p(r(se),{value:`7d`,class:`rounded-lg`},{default:O(()=>[...t[5]||=[A(` Last 7 days `,-1)]]),_:1})]),_:1})]),_:1},8,[`modelValue`])]),_:1}),p(r(De),{class:`px-2 pt-4 sm:px-6 sm:pt-6 pb-4`},{default:O(()=>[p(r(h_),{config:n,class:`aspect-auto h-[250px] w-full`,cursor:!1},{default:O(()=>[p(r(n_),{data:r(a),"svg-defs":j_,margin:{left:-40},"y-domain":[0,1200]},{default:O(()=>[p(r(i_),{x:e=>e.date,y:[e=>e.mobile,e=>e.desktop],color:(e,t)=>[`url(#fillMobile)`,`url(#fillDesktop)`][t],opacity:.6},null,8,[`x`,`y`,`color`]),p(r(u_),{x:e=>e.date,y:[e=>e.mobile,e=>e.mobile+e.desktop],color:(e,t)=>[n.mobile.color,n.desktop.color][t],"line-width":1},null,8,[`x`,`y`,`color`]),p(r(o_),{type:`x`,x:e=>e.date,"tick-line":!1,"domain-line":!1,"grid-line":!1,"num-ticks":6,"tick-format":(e,t)=>new Date(e).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`})},null,8,[`x`,`tick-format`]),p(r(o_),{type:`y`,"num-ticks":3,"tick-line":!1,"domain-line":!1}),p(r(f_)),p(r(c_),{template:r(E_)(n,r(C_),{labelFormatter:e=>new Date(e).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`})}),color:(e,t)=>[n.mobile.color,n.desktop.color][t%2]},null,8,[`template`,`color`])]),_:1},8,[`data`]),p(r(g_))]),_:1})]),_:1})]),_:1}))}}),N_={class:`space-y-8`},P_={class:`flex flex-wrap items-center justify-between flex-1`},F_={class:`space-y-1`},I_={class:`text-sm font-medium leading-none`},L_={class:`text-sm text-muted-foreground`},R_={class:`font-medium`},z_=k({__name:`recent-sales`,setup(e){let t=D([{avatar:``,name:`Olivia Martin`,email:`olivia.martin@email.com`,amount:`$1,999.00`},{avatar:``,name:`Jackson Lee`,email:`jackson.lee@email.com`,amount:`$39.00`},{avatar:``,name:`Isabella Nguyen`,email:`isabella.nguyen@email.com`,amount:`$299.00`},{avatar:``,name:`William Kim`,email:`will@email.com`,amount:`$99.00`},{avatar:``,name:`Sofia Davis`,email:`sofia.davis@email.com`,amount:`$39.00`}]);return(e,n)=>(j(),y(`div`,N_,[(j(!0),y(x,null,g(r(t),e=>(j(),y(`div`,{key:e.name,class:`flex items-center gap-4`},[p(r(_e),{"class-name":`h-9 w-9`},{default:O(()=>[p(r(ve),{src:e.avatar,alt:`Avatar`},null,8,[`src`]),p(r(ye),null,{default:O(()=>[A(u(e.name[0].toUpperCase()),1)]),_:2},1024)]),_:2},1024),v(`div`,P_,[v(`div`,F_,[v(`p`,I_,u(e.name),1),v(`p`,L_,u(e.email),1)]),v(`div`,R_,u(e.amount),1)])]))),128))]))}}),B_={class:`grid gap-4 sm:grid-cols-2 lg:grid-cols-4`},V_={class:`grid grid-cols-1 gap-4 lg:grid-cols-7`},H_=k({__name:`overview-content`,setup(e){return(e,t)=>{let n=Oe,r=Ae,i=De,a=Ee,o=ke;return j(),y(x,null,[v(`div`,B_,[p(a,null,{default:O(()=>[p(r,{class:`flex flex-row items-center justify-between pb-2 space-y-0`},{default:O(()=>[p(n,{class:`text-sm font-medium`},{default:O(()=>[...t[0]||=[A(` Total Revenue `,-1)]]),_:1}),t[1]||=v(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,class:`size-4 text-muted-foreground`},[v(`path`,{d:`M12 2v20M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6`})],-1)]),_:1}),p(i,null,{default:O(()=>[...t[2]||=[v(`div`,{class:`text-2xl font-bold`},` $45,231.89 `,-1),v(`p`,{class:`text-xs text-muted-foreground`},` +20.1% from last month `,-1)]]),_:1})]),_:1}),p(a,null,{default:O(()=>[p(r,{class:`flex flex-row items-center justify-between pb-2 space-y-0`},{default:O(()=>[p(n,{class:`text-sm font-medium`},{default:O(()=>[...t[3]||=[A(` Subscriptions `,-1)]]),_:1}),t[4]||=v(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,class:`size-4 text-muted-foreground`},[v(`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`}),v(`circle`,{cx:`9`,cy:`7`,r:`4`}),v(`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75`})],-1)]),_:1}),p(i,null,{default:O(()=>[...t[5]||=[v(`div`,{class:`text-2xl font-bold`},` +2350 `,-1),v(`p`,{class:`text-xs text-muted-foreground`},` +180.1% from last month `,-1)]]),_:1})]),_:1}),p(a,null,{default:O(()=>[p(r,{class:`flex flex-row items-center justify-between pb-2 space-y-0`},{default:O(()=>[p(n,{class:`text-sm font-medium`},{default:O(()=>[...t[6]||=[A(` Sales `,-1)]]),_:1}),t[7]||=v(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,class:`size-4 text-muted-foreground`},[v(`rect`,{width:`20`,height:`14`,x:`2`,y:`5`,rx:`2`}),v(`path`,{d:`M2 10h20`})],-1)]),_:1}),p(i,null,{default:O(()=>[...t[8]||=[v(`div`,{class:`text-2xl font-bold`},` +12,234 `,-1),v(`p`,{class:`text-xs text-muted-foreground`},` +19% from last month `,-1)]]),_:1})]),_:1}),p(a,null,{default:O(()=>[p(r,{class:`flex flex-row items-center justify-between pb-2 space-y-0`},{default:O(()=>[p(n,{class:`text-sm font-medium`},{default:O(()=>[...t[9]||=[A(` Active Now `,-1)]]),_:1}),t[10]||=v(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,class:`size-4 text-muted-foreground`},[v(`path`,{d:`M22 12h-4l-3 9L9 3l-3 9H2`})],-1)]),_:1}),p(i,null,{default:O(()=>[...t[11]||=[v(`div`,{class:`text-2xl font-bold`},` +573 `,-1),v(`p`,{class:`text-xs text-muted-foreground`},` +201 since last hour `,-1)]]),_:1})]),_:1})]),v(`div`,V_,[p(M_,{class:`col-span-1 lg:col-span-4`}),p(a,{class:`col-span-1 lg:col-span-3`},{default:O(()=>[p(r,null,{default:O(()=>[p(n,null,{default:O(()=>[...t[12]||=[A(`Recent Sales`,-1)]]),_:1}),p(o,null,{default:O(()=>[...t[13]||=[A(` You made 265 sales this month. `,-1)]]),_:1})]),_:1}),p(i,null,{default:O(()=>[p(z_)]),_:1})]),_:1})])],64)}}}),U_=k({__name:`index`,setup(e){let t=D([{name:`Overview`,value:`overview`},{name:`Analytics`,value:`analytics`,disabled:!0},{name:`Reports`,value:`reports`,disabled:!0},{name:`Notifications`,value:`notifications`,disabled:!0}]),n=D(t.value[0].value);return(e,i)=>{let a=Ce,o=xe,s=Se,c=be;return j(),ne(r(Te),{title:`workspace`,description:`workspace description`,sticky:``},{actions:O(()=>[p(r(we),{onClick:i[0]||=()=>r(fe)(`hello`,{position:`top-center`})},{default:O(()=>[A(u(e.$t(`download`)),1)]),_:1})]),default:O(()=>[p(c,{"default-value":r(n),class:`w-full`},{default:O(()=>[p(o,null,{default:O(()=>[(j(!0),y(x,null,g(r(t),e=>(j(),ne(a,{key:e.value,value:e.value,disabled:e.disabled},{default:O(()=>[A(u(e.name),1)]),_:2},1032,[`value`,`disabled`]))),128))]),_:1}),p(s,{value:`overview`,class:`space-y-4`},{default:O(()=>[p(H_)]),_:1})]),_:1},8,[`default-value`])]),_:1})}}});export{U_ as default};