import{Ct as e,Dt as t,E as n,Et as r,I as i,J as a,L as o,N as s,Ot as c,P as l,Q as u,R as d,S as f,V as p,W as m,Y as h,_ as g,at as _,b as v,bt as y,ct as b,g as x,gt as S,h as C,j as w,l as T,m as E,mt as ee,r as te,ut as D,v as O,w as ne,wt as k,x as A,xt as re,y as j,yt as M,z as ie}from"./vue.runtime.esm-bundler-DS0mm12S.js";import{v as ae}from"./dist-3yfE1dPa.js";import{a as oe,i as se,n as ce,r as le,t as ue}from"./SelectValue-BbKWf16W.js";import{n as de}from"./lib-CC9cpJ8Y.js";import{R as fe}from"./index-axPHP3AB.js";import{O as pe,_ as me}from"./Teleport-f0-_cFyq.js";import{i as he,n as ge}from"./button-xrpYa8G4.js";import{n as _e,t as ve}from"./AvatarImage-Da9BQozn.js";import{t as ye}from"./AvatarFallback-Bq_U7jEu.js";import{i as be,n as xe,r as Se,t as Ce}from"./TabsTrigger-YBRNpb_0.js";import{t as we}from"./Card-C4ypPl9R.js";import{t as Te}from"./CardContent-CjpRZuCW.js";import{n as Ee,r as De,t as Oe}from"./CardTitle-CmtJJ__x.js";import{r as ke}from"./global-layout-DVspC3_O.js";var Ae=!1;function je(e){if(e.sheet)return e.sheet;for(var t=0;t0?I(nt,--L):0,et--,R===10&&(et=1,$e--),R}function z(){return R=L2||ut(R)>3?``:` `}function ht(e,t){for(;--t&&z()&&!(R<48||R>102||R>57&&R<65||R>70&&R<97););return lt(e,ct()+(t<6&&st()==32&&z()==32))}function gt(e){for(;z();)switch(R){case e:return L;case 34:case 39:e!==34&&e!==39&>(R);break;case 40:e===41&>(e);break;case 92:z();break}return L}function _t(e,t){for(;z()&&e+R!==57&&!(e+R===84&&st()===47););return`/*`+lt(t,L-1)+`*`+He(e===47?e:z())}function vt(e){for(;!ut(st());)z();return lt(e,L)}function yt(e){return ft(bt(``,null,null,null,[``],e=dt(e),0,[0],e))}function bt(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=z()){case 40:if(m!=108&&I(C,d-1)==58){qe(C+=F(pt(v),`&`,`&\f`),`&\f`)!=-1&&(_=-1);break}case 34:case 39:case 91:C+=pt(v);break;case 9:case 10:case 13:case 32:C+=mt(m);break;case 92:C+=ht(ct()-1,7);continue;case 47:switch(st()){case 42:case 47:Ze(St(_t(z(),ct()),t,n),c);break;default:C+=`/`}break;case 123*h:s[l++]=Ye(C)*_;case 125*h:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:_==-1&&(C=F(C,/\f/g,``)),p>0&&Ye(C)-d&&Ze(p>32?Ct(C+`;`,r,n,d-1):Ct(F(C,` `,``)+`;`,r,n,d-2),c);break;case 59:C+=`;`;default:if(Ze(S=xt(C,t,n,l,u,i,s,y,b=[],x=[],d),a),v===123)if(u===0)bt(C,t,S,S,b,a,d,s,x);else switch(f===99&&I(C,3)===110?100:f){case 100:case 108:case 109:case 115:bt(e,S,S,r&&Ze(xt(e,S,S,0,0,i,s,y,i,b=[],d),x),i,x,d,s,r?b:x);break;default:bt(C,S,S,S,[``],x,0,s,x)}}l=u=p=0,h=_=1,y=C=``,d=o;break;case 58:d=1+Ye(C),p=m;default:if(h<1){if(v==123)--h;else if(v==125&&h++==0&&ot()==125)continue}switch(C+=He(v),v*h){case 38:_=u>0?1:(C+=`\f`,-1);break;case 44:s[l++]=(Ye(C)-1)*_,_=1;break;case 64:st()===45&&(C+=pt(z())),f=st(),u=d=Ye(y=C+=vt(ct())),v++;break;case 45:m===45&&Ye(C)==2&&(h=0)}}return a}function xt(e,t,n,r,i,a,o,s,c,l,u){for(var d=i-1,f=i===0?a:[``],p=Xe(f),m=0,h=0,g=0;m0?f[_]+` `+v:F(v,/&\f/g,f[_])))&&(c[g++]=y);return rt(e,t,n,i===0?Ie:s,c,l,u)}function St(e,t,n){return rt(e,t,n,Fe,He(at()),Je(e,2,-2),0)}function Ct(e,t,n,r){return rt(e,t,n,Le,Je(e,0,r),Je(e,r+1,-1),r)}function wt(e,t){for(var n=``,r=Xe(e),i=0;i6)switch(I(e,t+1)){case 109:if(I(e,t+4)!==45)break;case 102:return F(e,/(.+:)(.+)-([^]+)/,`$1`+P+`$2-$3$1`+Pe+(I(e,t+3)==108?`$3`:`$2-$3`))+e;case 115:return~qe(e,`stretch`)?Ft(F(e,`stretch`,`fill-available`),t)+e:e}break;case 4949:if(I(e,t+1)!==115)break;case 6444:switch(I(e,Ye(e)-3-(~qe(e,`!important`)&&10))){case 107:return F(e,`:`,`:`+P)+e;case 101:return F(e,/(.+:)([^;!]+)(;|!.+)?/,`$1`+P+(I(e,14)===45?`inline-`:``)+`box$3$1`+P+`$2$3$1`+N+`$2box$3`)+e}break;case 5936:switch(I(e,t+11)){case 114:return P+e+N+F(e,/[svh]\w+-[tblr]{2}/,`tb`)+e;case 108:return P+e+N+F(e,/[svh]\w+-[tblr]{2}/,`tb-rl`)+e;case 45:return P+e+N+F(e,/[svh]\w+-[tblr]{2}/,`lr`)+e}return P+e+N+e+e}return e}var It=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Le:e.return=Ft(e.value,e.length);break;case ze:return wt([it(e,{value:F(e.value,`@`,`@`+P)})],r);case Ie:if(e.length)return Qe(e.props,function(t){switch(Ke(t,/(::plac\w+|:read-\w+)/)){case`:read-only`:case`:read-write`:return wt([it(e,{props:[F(t,/:(read-\w+)/,`:`+Pe+`$1`)]})],r);case`::placeholder`:return wt([it(e,{props:[F(t,/:(plac\w+)/,`:`+P+`input-$1`)]}),it(e,{props:[F(t,/:(plac\w+)/,`:`+Pe+`$1`)]}),it(e,{props:[F(t,/:(plac\w+)/,N+`input-$1`)]})],r)}return``})}}],Lt=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||It,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=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 zt={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},Bt=!1,Vt=/[A-Z]|^ms/g,Ht=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ut=function(e){return e.charCodeAt(1)===45},Wt=function(e){return e!=null&&typeof e!=`boolean`},Gt=Ot(function(e){return Ut(e)?e:e.replace(Vt,`-$&`).toLowerCase()}),Kt=function(e,t){switch(e){case`animation`:case`animationName`:if(typeof t==`string`)return t.replace(Ht,function(e,t,n){return Zt={name:t,styles:n,next:Zt},t})}return zt[e]!==1&&!Ut(e)&&typeof t==`number`&&t!==0?t+`px`:t},qt=`Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.`;function Jt(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 Zt={name:i.name,styles:i.styles,next:Zt},i.name;var a=n;if(a.styles!==void 0){var o=a.next;if(o!==void 0)for(;o!==void 0;)Zt={name:o.name,styles:o.styles,next:Zt},o=o.next;return a.styles+`;`}return Yt(e,t,n);case`function`:if(e!==void 0){var s=Zt,c=n(e);return Zt=s,Jt(e,t,c)}break}var l=n;if(t==null)return l;var u=t[l];return u===void 0?l:u}function Yt(e,t,n){var r=``;if(Array.isArray(n))for(var i=0;it?1:e>=t?0:NaN}function dn(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function fn(e){let t,n,r;e.length===2?(t=e===un||e===dn?e:pn,n=e,r=e):(t=un,n=(t,n)=>un(e(t),n),r=(t,n)=>e(t)-n);function i(e,r,i=0,a=e.length){if(i>>1;n(e[t],r)<0?i=t+1:a=t}while(i>>1;n(e[t],r)<=0?i=t+1:a=t}while(in&&r(e[o-1],t)>-r(e[o],t)?o-1:o}return{left:i,center:o,right:a}}function pn(){return 0}function mn(e){return e===null?NaN:+e}var hn=fn(un),gn=hn.right,_n=hn.left;fn(mn).center;function vn(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=a&&(n=r=a):(n>a&&(n=a),r=wn?10:a>=Tn?5:a>=En?2:1,s,c,l;return i<0?(l=10**-i/o,s=Math.round(e*l),c=Math.round(t*l),s/lt&&--c,l=-l):(l=10**i*o,s=Math.round(e/l),c=Math.round(t/l),s*lt&&--c),c0))return[];if(e===t)return[e];let r=t=i))return[];let s=a-i+1,c=Array(s);if(r)if(o<0)for(let e=0;e=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n=i)&&(n=i)}return n}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,n=mn){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 Pn(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*Fn(e){for(let t of e)yield*t}function In(e){return Array.from(Fn(e))}function Ln(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);++re?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 Bn;(function(e){e.Left=`left`,e.Right=`right`,e.Auto=`auto`})(Bn||={});var Vn=e=>typeof e==`number`,Hn=e=>typeof e==`function`,Un=e=>typeof e==`string`,Wn=e=>Array.isArray(e),Gn=e=>e instanceof Object,Kn=e=>e.constructor.name!==`Function`&&e.constructor.name!==`Object`,qn=e=>Gn(e)&&!Wn(e)&&!Hn(e)&&!Kn(e),Jn=(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!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(!Jn(e[a],t[a],n,r))return!1;return!0}return e===t},Yn=e=>e.flat(),Xn=(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):Xn(r,t));return n}if(Kn(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]):Xn(r[n],t),e),n),n}return e},Zn=(e,t,n=new Map)=>{if(!e||!t||e===t)return e;let r=Kn(e)?e:Xn(e);return n.has(t)?n.get(t):(n.set(t,r),Object.keys(t).forEach(i=>{i===`__proto__`||i===`constructor`||(qn(e[i])&&qn(t[i])?r[i]=Zn(e[i],t[i],n):Kn(t)?r[i]=t:r[i]=Xn(t[i]))}),r)},Qn=(e,t,n)=>zn(t,e,n);function $n(e,t,n){return Hn(t)?t(e,n):t}function er(e,t,n){return $n(e,t,n)}function V(e,t,n){return $n(e,t,n)}function tr(e){return e.filter(e=>e&&!Vn(e))}function nr(e,t,n){return Math.min(Math.max(e,t),n)}function rr(e,...t){if(!e)return[void 0,void 0];if(Wn(t)){let n=0,r=0;return e.forEach((e,i)=>{let a=0,o=0;for(let n of t){let t=V(e,n,i)||0;t>=0?a+=t:o+=t}a>r&&(r=a),o=0?r.push(i+=n):r.push(a+=n)}return r}function ar(e,t,n,r){let i=e.map((e,n)=>V(e,t,n)||0),a=n.map((t,n)=>{let i=Pn(e,(e,n)=>V(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=V(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 or(e,...t){if(e)return Mn(e,(e,n)=>Mn(t,t=>V(e,t,n)))}function sr(e,...t){if(e)return jn(e,(e,n)=>jn(t,t=>V(e,t,n)))}function cr(e,...t){return[or(e,...t),sr(e,...t)]}function lr(e,t,n,r=Bn.Auto){if(e.length<=1)return e[0];let i=e.map((e,t)=>[e,t]).sort(([e,t],[r,i])=>V(e,n,t)-V(r,n,i)),a=i.map(([e,t])=>V(e,n,t)),o=r===Bn.Right?_n(a,t,0,e.length-1):gn(a,t,1,e.length);return r===Bn.Right?i[o][0]:r===Bn.Left?i[o-1][0]:t-a[o-1]>a[o]-t?i[o][0]:i[o-1][0]}function ur(e,t,n,r=!1){if(!n)return[];let i=e.filter((e,r)=>{let i=V(e,n,r);return i>=t[0]&&i<=t[1]});if(r){if(i.length===0)return[lr(e,t[0],n,Bn.Left),lr(e,t[1],n,Bn.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 dr={value:()=>{}};function fr(){for(var e=0,t=arguments.length,n={},r;e=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}})}pr.prototype=fr.prototype={constructor:pr,on:function(e,t){var n=this._,r=mr(e+``,n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a0)for(var n=Array(i),r=0,i,a;r=0&&e._call.call(void 0,t),e=e._next;--_r}function Nr(){wr=(Cr=Er.now())+Tr,_r=vr=0;try{Mr()}finally{_r=0,Fr(),wr=0}}function Pr(){var e=Er.now(),t=e-Cr;t>br&&(Tr-=t,Cr=e)}function Fr(){for(var e,t=xr,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:xr=n);Sr=e,Ir(r)}function Ir(e){_r||(vr&&=clearTimeout(vr),e-wr>24?(e<1/0&&(vr=setTimeout(Nr,e-Er.now()-Tr)),yr&&=clearInterval(yr)):(yr||=(Cr=Er.now(),setInterval(Pr,br)),_r=1,Dr(Nr)))}function Lr(e,t,n){var r=new Ar;return t=t==null?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}var Rr={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 zr(e){var t=e+=``,n=t.indexOf(`:`);return n>=0&&(t=e.slice(0,n))!==`xmlns`&&(e=e.slice(n+1)),Rr.hasOwnProperty(t)?{space:Rr[t],local:e}:e}function Br(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 Vr(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Hr(e){var t=zr(e);return(t.local?Vr:Br)(t)}function Ur(){}function Wr(e){return e==null?Ur:function(){return this.querySelector(e)}}function Gr(e){typeof e!=`function`&&(e=Wr(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i=v&&(v=_+1);!(b=g[v])&&++v=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function xi(e){e||=Si;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;at?1:e>=t?0:NaN}function Ci(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function wi(){return Array.from(this)}function Ti(){for(var e=this._groups,t=0,n=e.length;t1?this.each((t==null?Li:typeof t==`function`?zi:Ri)(e,t,n??``)):Vi(this.node(),e)}function Vi(e,t){return e.style.getPropertyValue(t)||Ii(e).getComputedStyle(e,null).getPropertyValue(t)}function Hi(e){return function(){delete this[e]}}function Ui(e,t){return function(){this[e]=t}}function Wi(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Gi(e,t){return arguments.length>1?this.each((t==null?Hi:typeof t==`function`?Wi:Ui)(e,t)):this.node()[e]}function Ki(e){return e.trim().split(/^|\s+/)}function qi(e){return e.classList||new Ji(e)}function Ji(e){this._node=e,this._names=Ki(e.getAttribute(`class`)||``)}Ji.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 Yi(e,t){for(var n=qi(e),r=-1,i=t.length;++r=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}function wa(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n0})},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,ee=T+_+b+y,te=Ka({devicePixelContentBoxSize:ao(Math.round(w*devicePixelRatio),Math.round(T*devicePixelRatio),a),borderBoxSize:ao(E,ee,a),contentBoxSize:ao(w,T,a),contentRect:new Ja(d,c,w,T)});return eo.set(e,te),te},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),ie?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=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=Fa(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=Zn(this._defaultConfig,e),e?.svgDefs!==this.prevConfig?.svgDefs&&(this._svgDefsExternal.selectAll(`*`).remove(),this._svgDefsExternal.html(e.svgDefs))}_preRender(){}_render(e){let{config:t}=this;Fa(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 nr(this.containerWidth-this.config.margin.left-this.config.margin.right,0,1/0)}get height(){return nr(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};!Jn(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(!Un(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>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+(n0&&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-${Vn(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:``},{id:`dots`,svg:``},{id:`stripes-vertical`,svg:``},{id:`crosshatch`,svg:``},{id:`waves`,svg:``},{id:`circles`,svg:``}],Ns=[{id:`circle`,marker:``,dashArray:[]},{id:`triangle`,marker:``,dashArray:[9,1]},{id:`diamond`,marker:``,dashArray:[2]},{id:`arrow`,marker:``,dashArray:[2,3,8,3]},{id:`square`,marker:``,dashArray:[6]},{id:`star`,marker:``,dashArray:[1,6]}];function Ps(e){return`vis-${`pattern-${e.svg?`fill`:`marker`}`}-${e.id}`}var Fs=e=>` ${e.svg} `,Is=(e,t)=>` ${e.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=`${e}`,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};ln` :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=fr(`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=jr(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 Lr(o);f.state===4?(f.state=6,f.timer.stop(),f.on.call(`interrupt`,e,e.__data__,f.index,f.group),delete r[l]):+l2&&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;in&&(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 n180?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=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=Wr(e));for(var r=this._groups,i=r.length,a=Array(i),o=0;o+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=Or(),e=e==null?null:e+``);for(var r=this._groups,i=r.length,a=0;aXs(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 yn,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 yn;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=it&&(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 i2?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;n0&&(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;++oC||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>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=An(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 On(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(s0;){if(l=kn(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 ae**+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=s0){for(;l<=u;++l)for(d=1;ds)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),!(fs)break;m.push(f)}m.length*2{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*rn(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);++r0?n[i-1]:e[0],i=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[gn(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(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),!(n0))return o;let s;do o.push(s=new Date(+n)),t(n,a),e(n);while(sq(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=te).right(o,i);if(a===o.length)return e.every(An(t/ld,n/ld,r));if(a===0)return nd.every(Math.max(An(t,n,r),1));let[s,c]=o[i/o[a-1][2]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=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 ee(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 te(e,t,n){var r=_.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1}function D(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 O(e,n,r){return w(e,t,n,r)}function ne(e,t,r){return w(e,n,t,r)}function k(e,t,n){return w(e,r,t,n)}function A(e){return o[e.getDay()]}function re(e){return a[e.getDay()]}function j(e){return c[e.getMonth()]}function M(e){return s[e.getMonth()]}function ie(e){return i[+(e.getHours()>=12)]}function ae(e){return 1+~~(e.getMonth()/3)}function oe(e){return o[e.getUTCDay()]}function se(e){return a[e.getUTCDay()]}function ce(e){return c[e.getUTCMonth()]}function le(e){return s[e.getUTCMonth()]}function ue(e){return i[+(e.getUTCHours()>=12)]}function de(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[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)`),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 nr(this.containerWidth-e.left-e.right,0,1/0)}get height(){let e=this._getMargin();return nr(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),Jn(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=tr([...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:Yn(e),yStacked:Yn(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=tr(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]=vn(In(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=[nr(l,s?.[0]??-1/0,s?.[1]??1/0),nr(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();tr([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=tr([...this.components,e,t]);this._setScales(...n),this._updateScalesDomain(...n);let r=this._firstRender?2:1;for(let i=0;i{e.preRender();let t=e.getRequiredMargin();r.tope.bleed).reduce((e,t)=>{for(let n of Object.keys(e)){let r=n;e[r]{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 cr(r.data,n[e])}}getXDataExtent(){let{config:e,datamodel:t}=this;return cr(t.data,e.x)}getYDataExtent(e){let{config:t,datamodel:n}=this,r=this.xScale.domain();return cr(e?ur(n.data,r,t.x,!0):n.data,...Wn(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=t({hidden:()=>Hp,nonInteractive:()=>Up,positionFixed:()=>Bp,root:()=>Lp,show:()=>Vp,tooltip:()=>Rp,variables:()=>zp}),Lp=B` 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=ln` :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=B` bottom: unset; position: fixed; `,Vp=B` opacity: 1; `,Hp=B` display: none; `,Up=B` label: non-interactive; pointer-events: none; user-select: none; `,Wp=class{constructor(e={}){this._defaultConfig=Fp,this.config=this._defaultConfig,this._setUpEventsThrottled=Qn(this._setUpEvents,500),this._setContainerPositionThrottled=Qn(this._setContainerPosition,500),this._isShown=!1,this.element=document.createElement(`div`),this.div=Fa(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=Zn(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{let t=Fa(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(Fa(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=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;tJp)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=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=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t=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;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=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=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;a0?--o:o0&&--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;a0&&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.lengthDh,globalStyles:()=>Sh,interpolatedPath:()=>Oh,line:()=>wh,linePath:()=>Th,lineSelectionHelper:()=>Eh,root:()=>Ch}),Sh=ln` :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=B` label: line-component; `,wh=B` label: line; transition: opacity 200ms; cursor: var(--vis-line-cursor); `,Th=B` label: linePath; fill: none; stroke-dasharray: var(--vis-line-stroke-dasharray); stroke-dashoffset: var(--vis-line-stroke-dashoffset); `,Eh=B` label: lineSelectionHelper; fill: none; stroke: rgba(0, 0, 0, 0); stroke-width: 8px; `,Dh=B` opacity: 0.2; `,Oh=B` 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=Vn(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=Wn(t.y)?t.y:[t.y],a=n.map((e,n)=>this.xScale(V(e,t.x,n))),o=i.map(e=>{let r=n.map((n,r)=>{let i=V(n,e,r),o=(Vn(i)||i===null)&&isFinite(i)?i:t.fallbackValue,s=t.interpolateMissingData?(Vn(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||ie.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)=>er(n,t.cursor,r)),l.each((e,i,a)=>{let o=Fa(a[i]),s=o.select(`.${Th}`),c=o.select(`.${Eh}`),l=o.select(`.${Oh}`),u=e.visible,d=$n(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=r(((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`: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===``: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=c(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,`'`).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{let i=e.split(r),a=i.map((e,t)=>`${e}${t===i.length-1?``:r}`);n[t]=a}),n=Yn(n)}return n}function cg(e,t,n=[` `,`-`,`.`,`,`]){let r=e.text();if(!r)return;let i=sg(r,Wn(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{let r=[];if(!t)return[e];let a=sg(e,l),u=``;for(let e=0;e2&&(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=>Zn(Vs,e)):[Zn(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;in&&i!==a.length-1){o.charAt(o.length-1)===Bs&&(o=o.substr(0,a[i].length-1)),c{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`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,`${e.length?e:`\xA0`}`}).join(``)}`})}function hg(e){return Rn(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){ln({":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=t({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=B` 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=B` label: hide-tick-line; `,Eg=B` label: hide-domain; `,Dg=B` 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=B` 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=B` 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=B` label: tick-text-exiting; `,jg=B` 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=B` label: tick-label; `,Ng=B` 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=>Jn(e,t))).classed(Mg,!0).classed(Ng,!!n.tickTextHideOverlapping).style(`fill`,n.tickTextColor);e.selectAll(`g.tick > text`).filter(e=>!a.some(t=>Jn(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(Fa(o).text(i),d,n.tickTextTrimType,!0,this._tickTextStyleCached.fontSize,.58),i=Fa(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{let r=n[t];Fa(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._widthe&&(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=t({circle:()=>Bg,globalStyles:()=>Lg,line:()=>zg,root:()=>Rg}),Lg=ln` :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=B` label: crosshair-component; `,zg=B` 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=B` 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?Wn(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=Vn(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(lr(r.data,s,this.accessors.x,Bn.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=lr(r.data,s,this.accessors.x),u=r.data.indexOf(l));let d=this.xScale.range(),f=this.yScale.range(),p=n.snapToData&&l?nr(Math.round(this.xScale(V(l,this.accessors.x,u))),0,this._width):nr(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?V(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=Hn(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=V(e,this.accessors.baseline,t)||0,o=ir(e,t,...i).map((t,r)=>({y:this.yScale(t+a),opacity:Vn(V(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?V(e,n.strokeWidth,r):void 0})),s=r.map((r,i)=>{let a=V(e,r,t);return{y:this.yScale(a),opacity:Vn(a)?1:0,color:vh(e,n.color,o.length+i),strokeColor:n.strokeColor?vh(e,n.strokeColor,i):void 0,strokeWidth:n.strokeWidth?V(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=t({area:()=>Kg,areaLinePath:()=>qg,globalStyles:()=>Gg,root:()=>Wg}),Wg=B` label: area-component; `,Gg=ln` :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=B` 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=B` 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=Vn(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=Wn(t.y)?t.y:[t.y],o=n.map((e,n)=>this.xScale(V(e,t.x,n))),s=ar(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)?V(n,t.opacity,u-r):0).style(`fill`,(e,r)=>vh(n,t.color,u-r)).style(`cursor`,(e,r)=>er(n,t.cursor,u-r));r?p.attrTween(`d`,(e,t,n)=>_h(Fa(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)=>er(r,n.cursor,i-t)).style(`stroke-dasharray`,(e,t)=>$n(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(Fa(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=Wn(t.y)?t.y:[t.y],i=this.xScale.domain();return rr(e?ur(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 Jn(e,t)}function t_(e){let t=f(),n=t.attrs;return E(()=>{let r={},i=t?.vnode.props??{};return Object.keys(i).forEach(t=>{r[y(t)]=e[y(t)]}),{...r,...n}})}var n_=A({__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(e,{expose:t}){let n=e,{data:r}=S(n),c=t_(n),u=D(),d=b({components:[],annotations:void 0,crosshair:void 0,tooltip:void 0,xAxis:void 0,yAxis:void 0}),f=D();return a(r,()=>{u.value&&u.value.setData(r.value,!0)}),h(()=>{var e;d.components.map(e=>e.config),(e=u.value)==null||e.updateContainer({...ee(c.value),...ee(d)})}),s(()=>{f.value&&(u.value=new Ep(f.value,{...ee(d)},r.value))}),l(()=>u.value?.destroy()),o(Yg,{data:r,update:e=>d.components=[...d.components,e],destroy:()=>d.components=d.components?.filter(e=>!e.isDestroyed())}),o(Qg,{data:r,update:e=>d[`${e.config.type}Axis`]=e,destroy:e=>{d[`${e}Axis`]=void 0}}),o(Zg,{data:r,update:e=>d.crosshair=e,destroy:()=>{d.crosshair=void 0}}),o(Xg,{data:r,update:e=>d.tooltip=e,destroy:()=>{d.tooltip=void 0}}),o($g,{data:r,update:e=>d.annotations=e,destroy:()=>{d.annotations=void 0}}),t({component:u}),(e,t)=>(i(),O(`div`,{"data-vis-xy-container":``,ref_key:`elRef`,ref:f,class:`unovis-xy-container`},[ie(e.$slots,`default`)],512))}}),r_={"data-vis-component":``};Jg.selectors;var i_=A({__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 r=n(Yg),o=e,c=E(()=>r.data.value??o.data),u=t_(o),d=D();return s(()=>{w(()=>{var e;d.value=new Jg(u.value),(e=d.value)==null||e.setData(c.value),r.update(d.value)})}),l(()=>{var e;(e=d.value)==null||e.destroy(),r.destroy()}),a(u,(e,t)=>{var n;e_(e,t)||(n=d.value)==null||n.setConfig(u.value)}),a(c,()=>{var e;(e=d.value)==null||e.setData(c.value)}),t({component:d}),(e,t)=>(i(),O(`div`,r_))}}),a_={"data-vis-axis":``};Pg.selectors;var o_=A({__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 r=n(Qg),o=e,c=E(()=>r.data.value??o.data),u=t_(o),d=D();return s(()=>{w(()=>{var e;d.value=new Pg(u.value),(e=d.value)==null||e.setData(c.value),r.update(d.value)})}),l(()=>{var e;(e=d.value)==null||e.destroy(),r.destroy(o.type)}),a(u,(e,t)=>{var n;e_(e,t)||(n=d.value)==null||n.setConfig(u.value)}),a(c,()=>{var e;(e=d.value)==null||e.setData(c.value)}),t({component:d}),(e,t)=>(i(),O(`div`,a_))}}),s_={"data-vis-crosshair":``};Vg.selectors;var c_=A({__name:`index`,props:{data:{}},setup(e,{expose:t}){let r=n(Zg),o=e,c=E(()=>r.data.value??o.data),u=t_(o),d=D();return s(()=>{w(()=>{var e;d.value=new Vg(u.value),(e=d.value)==null||e.setData(c.value),r.update(d.value)})}),l(()=>{var e;(e=d.value)==null||e.destroy(),r.destroy()}),a(u,(e,t)=>{var n;e_(e,t)||(n=d.value)==null||n.setConfig(u.value)}),a(c,()=>{var e;(e=d.value)==null||e.setData(c.value)}),t({component:d}),(e,t)=>(i(),O(`div`,s_))}}),l_={"data-vis-component":``};kh.selectors;var u_=A({__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 r=n(Yg),o=e,c=E(()=>r.data.value??o.data),u=t_(o),d=D();return s(()=>{w(()=>{var e;d.value=new kh(u.value),(e=d.value)==null||e.setData(c.value),r.update(d.value)})}),l(()=>{var e;(e=d.value)==null||e.destroy(),r.destroy()}),a(u,(e,t)=>{var n;e_(e,t)||(n=d.value)==null||n.setConfig(u.value)}),a(c,()=>{var e;(e=d.value)==null||e.setData(c.value)}),t({component:d}),(e,t)=>(i(),O(`div`,l_))}}),d_={"data-vis-tooltip":``};Wp.selectors;var f_=A({__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 r=n(Xg),o=t_(e),c=D();return s(()=>{w(()=>{c.value=new Wp(o.value),r.update(c.value)})}),l(()=>{var e;(e=c.value)==null||e.destroy(),r.destroy()}),a(o,(e,t)=>{var n;e_(e,t)||(n=c.value)==null||n.setConfig(o.value)}),t({component:c}),(e,t)=>(i(),O(`div`,d_))}}),p_=A({__name:`ChartStyle`,props:{id:{}},setup(e){let{config:t}=O_(),n=E(()=>Object.entries(t.value).filter(([,e])=>e.theme||e.color));return(t,r)=>n.value.length?(i(),x(M(he),{key:0,as:`style`},{default:u(()=>[j(k(Object.entries(M(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})):g(``,!0)}}),m_=[`data-chart`],h_=A({__name:`ChartContainer`,props:{id:{},class:{type:[Boolean,null,String,Object,Array]},config:{},cursor:{type:Boolean}},setup(t){let n=t,{config:r}=S(n),a=me(),o=E(()=>`chart-${n.id||a.replace(/:/g,``)}`);return k_({id:a,config:r}),(s,c)=>(i(),O(`div`,{"data-slot":`chart`,"data-chart":o.value,class:re(M(fe)(`[&_.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 `,n.class)),style:e({"--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":t.cursor?`1px`:`0px`,"--vis-font-family":`var(--font-sans)`})},[ie(s.$slots,`default`,{id:M(a),config:M(r)}),v(p_,{id:o.value},null,8,[`id`])],14,m_))}}),g_=A({__name:`ChartLegendContent`,props:{hideIcon:{type:Boolean},nameKey:{},verticalAlign:{default:`bottom`},class:{type:[Boolean,null,String,Object,Array]}},setup(t){let n=t,{id:r,config:a}=O_(),o=E(()=>Object.entries(a.value).map(([e])=>({key:n.nameKey||e,itemConfig:a.value[e]}))),c=D(``);return s(()=>{c.value=`[data-chart="chart-${r}"]>[data-vis-xy-container]`}),(r,a)=>c.value?(i(),O(`div`,{key:0,class:re(M(fe)(`flex items-center justify-center gap-4`,t.verticalAlign===`top`?`pb-3`:`pt-3`,n.class))},[(i(!0),O(T,null,d(o.value,({key:t,itemConfig:n})=>(i(),O(`div`,{key:t,class:re(M(fe)(`[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3`))},[n?.icon?(i(),x(p(n.icon),{key:0})):(i(),O(`div`,{key:1,class:`h-2 w-2 shrink-0 rounded-[2px]`,style:e({backgroundColor:n.color})},null,4)),j(` `+k(n?.label),1)],2))),128))],2)):g(``,!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_=A({__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(t){let n=t,r=E(()=>Object.entries(n.payload).map(([e,t])=>({key:e,value:t,itemConfig:n.config[e],indicatorColor:n.config[e]?.color??n.payload.fill})).filter(e=>e.itemConfig)),a=E(()=>Object.keys(n.payload).length===1&&n.indicator!==`dot`),o=E(()=>n.hideLabel?null:n.labelFormatter&&n.x!==void 0?n.labelFormatter(n.x):n.labelKey?n.config[n.labelKey]?.label||n.payload[n.labelKey]:n.x);return(s,c)=>(i(),O(`div`,{class:re(M(fe)(`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`,n.class))},[ie(s.$slots,`default`,{},()=>[!a.value&&o.value?(i(),O(`div`,__,k(o.value),1)):g(``,!0),C(`div`,v_,[(i(!0),O(T,null,d(r.value,({value:n,itemConfig:r,indicatorColor:s,key:c})=>(i(),O(`div`,{key:c,class:re(M(fe)(`[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5`,t.indicator===`dot`&&`items-center`))},[r?.icon?(i(),x(p(r.icon),{key:0})):t.hideIndicator?g(``,!0):(i(),O(`div`,{key:1,class:re(M(fe)(`shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)`,{"h-2.5 w-2.5":t.indicator===`dot`,"w-1":t.indicator===`line`,"w-0 border-[1.5px] border-dashed bg-transparent":t.indicator===`dashed`,"my-0.5":a.value&&t.indicator===`dashed`})),style:e({"--color-bg":s,"--color-border":s})},null,6)),C(`div`,{class:re(M(fe)(`flex flex-1 justify-between leading-none`,a.value?`items-end`:`items-center`))},[C(`div`,y_,[a.value?(i(),O(`div`,b_,k(o.value),1)):g(``,!0),C(`span`,x_,k(r?.label||n),1)]),n?(i(),O(`span`,S_,k(n.toLocaleString()),1)):g(``,!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(!ae)return;let r=m();return(i,a)=>{let o=`data`in i?i.data:i,s=`${r}-${T_(o)}`,c=w_.get(s);if(c)return c;let l=ne(t,{...n,payload:o,config:e,x:a}),u=document.createElement(`div`);return te(l,u),w_.set(s,u.innerHTML),u.innerHTML}}var D_={light:``,dark:`.dark`},[O_,k_]=pe(`Chart`),A_={class:`grid flex-1 gap-1`},j_=` `,M_=A({__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)`}},r=D(`90d`),a=E(()=>t.filter(e=>{let t=new Date(e.date),n=new Date(`2024-06-30`),i=90;r.value===`30d`?i=30:r.value===`7d`&&(i=7);let a=new Date(n);return a.setDate(a.getDate()-i),t>=a}));return(e,t)=>(i(),x(M(we),{class:`pt-0`},{default:u(()=>[v(M(De),{class:`flex items-center gap-2 space-y-0 border-b py-5 sm:flex-row`},{default:u(()=>[C(`div`,A_,[v(M(Oe),null,{default:u(()=>[...t[1]||=[j(`Area Chart - Interactive`,-1)]]),_:1}),v(M(Ee),null,{default:u(()=>[...t[2]||=[j(` Showing total visitors for the last 3 months `,-1)]]),_:1})]),v(M(oe),{modelValue:M(r),"onUpdate:modelValue":t[0]||=e=>_(r)?r.value=e:null},{default:u(()=>[v(M(ce),{class:`hidden w-[160px] rounded-lg sm:ml-auto sm:flex`,"aria-label":`Select a value`},{default:u(()=>[v(M(ue),{placeholder:`Last 3 months`})]),_:1}),v(M(se),{class:`rounded-xl`},{default:u(()=>[v(M(le),{value:`90d`,class:`rounded-lg`},{default:u(()=>[...t[3]||=[j(` Last 3 months `,-1)]]),_:1}),v(M(le),{value:`30d`,class:`rounded-lg`},{default:u(()=>[...t[4]||=[j(` Last 30 days `,-1)]]),_:1}),v(M(le),{value:`7d`,class:`rounded-lg`},{default:u(()=>[...t[5]||=[j(` Last 7 days `,-1)]]),_:1})]),_:1})]),_:1},8,[`modelValue`])]),_:1}),v(M(Te),{class:`px-2 pt-4 sm:px-6 sm:pt-6 pb-4`},{default:u(()=>[v(M(h_),{config:n,class:`aspect-auto h-[250px] w-full`,cursor:!1},{default:u(()=>[v(M(n_),{data:M(a),"svg-defs":j_,margin:{left:-40},"y-domain":[0,1200]},{default:u(()=>[v(M(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`]),v(M(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`]),v(M(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`]),v(M(o_),{type:`y`,"num-ticks":3,"tick-line":!1,"domain-line":!1}),v(M(f_)),v(M(c_),{template:M(E_)(n,M(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`]),v(M(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_=A({__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)=>(i(),O(`div`,N_,[(i(!0),O(T,null,d(M(t),e=>(i(),O(`div`,{key:e.name,class:`flex items-center gap-4`},[v(M(_e),{"class-name":`h-9 w-9`},{default:u(()=>[v(M(ve),{src:e.avatar,alt:`Avatar`},null,8,[`src`]),v(M(ye),null,{default:u(()=>[j(k(e.name[0].toUpperCase()),1)]),_:2},1024)]),_:2},1024),C(`div`,P_,[C(`div`,F_,[C(`p`,I_,k(e.name),1),C(`p`,L_,k(e.email),1)]),C(`div`,R_,k(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_=A({__name:`overview-content`,setup(e){return(e,t)=>{let n=Oe,r=De,a=Te,o=we,s=Ee;return i(),O(T,null,[C(`div`,B_,[v(o,null,{default:u(()=>[v(r,{class:`flex flex-row items-center justify-between pb-2 space-y-0`},{default:u(()=>[v(n,{class:`text-sm font-medium`},{default:u(()=>[...t[0]||=[j(` Total Revenue `,-1)]]),_:1}),t[1]||=C(`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`},[C(`path`,{d:`M12 2v20M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6`})],-1)]),_:1}),v(a,null,{default:u(()=>[...t[2]||=[C(`div`,{class:`text-2xl font-bold`},` $45,231.89 `,-1),C(`p`,{class:`text-xs text-muted-foreground`},` +20.1% from last month `,-1)]]),_:1})]),_:1}),v(o,null,{default:u(()=>[v(r,{class:`flex flex-row items-center justify-between pb-2 space-y-0`},{default:u(()=>[v(n,{class:`text-sm font-medium`},{default:u(()=>[...t[3]||=[j(` Subscriptions `,-1)]]),_:1}),t[4]||=C(`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`},[C(`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`}),C(`circle`,{cx:`9`,cy:`7`,r:`4`}),C(`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75`})],-1)]),_:1}),v(a,null,{default:u(()=>[...t[5]||=[C(`div`,{class:`text-2xl font-bold`},` +2350 `,-1),C(`p`,{class:`text-xs text-muted-foreground`},` +180.1% from last month `,-1)]]),_:1})]),_:1}),v(o,null,{default:u(()=>[v(r,{class:`flex flex-row items-center justify-between pb-2 space-y-0`},{default:u(()=>[v(n,{class:`text-sm font-medium`},{default:u(()=>[...t[6]||=[j(` Sales `,-1)]]),_:1}),t[7]||=C(`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`},[C(`rect`,{width:`20`,height:`14`,x:`2`,y:`5`,rx:`2`}),C(`path`,{d:`M2 10h20`})],-1)]),_:1}),v(a,null,{default:u(()=>[...t[8]||=[C(`div`,{class:`text-2xl font-bold`},` +12,234 `,-1),C(`p`,{class:`text-xs text-muted-foreground`},` +19% from last month `,-1)]]),_:1})]),_:1}),v(o,null,{default:u(()=>[v(r,{class:`flex flex-row items-center justify-between pb-2 space-y-0`},{default:u(()=>[v(n,{class:`text-sm font-medium`},{default:u(()=>[...t[9]||=[j(` Active Now `,-1)]]),_:1}),t[10]||=C(`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`},[C(`path`,{d:`M22 12h-4l-3 9L9 3l-3 9H2`})],-1)]),_:1}),v(a,null,{default:u(()=>[...t[11]||=[C(`div`,{class:`text-2xl font-bold`},` +573 `,-1),C(`p`,{class:`text-xs text-muted-foreground`},` +201 since last hour `,-1)]]),_:1})]),_:1})]),C(`div`,V_,[v(M_,{class:`col-span-1 lg:col-span-4`}),v(o,{class:`col-span-1 lg:col-span-3`},{default:u(()=>[v(r,null,{default:u(()=>[v(n,null,{default:u(()=>[...t[12]||=[j(`Recent Sales`,-1)]]),_:1}),v(s,null,{default:u(()=>[...t[13]||=[j(` You made 265 sales this month. `,-1)]]),_:1})]),_:1}),v(a,null,{default:u(()=>[v(z_)]),_:1})]),_:1})])],64)}}}),U_=A({__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,r)=>{let a=Ce,o=xe,s=Se,c=be;return i(),x(M(ke),{title:`workspace`,description:`workspace description`,sticky:``},{actions:u(()=>[v(M(ge),{onClick:r[0]||=()=>M(de)(`hello`,{position:`top-center`})},{default:u(()=>[j(k(e.$t(`download`)),1)]),_:1})]),default:u(()=>[v(c,{"default-value":M(n),class:`w-full`},{default:u(()=>[v(o,null,{default:u(()=>[(i(!0),O(T,null,d(M(t),e=>(i(),x(a,{key:e.value,value:e.value,disabled:e.disabled},{default:u(()=>[j(k(e.name),1)]),_:2},1032,[`value`,`disabled`]))),128))]),_:1}),v(s,{value:`overview`,class:`space-y-4`},{default:u(()=>[v(H_)]),_:1})]),_:1},8,[`default-value`])]),_:1})}}});export{U_ as default};