import{aU as q,aV as N,aW as w,aX as V,aY as d}from"./mermaid.core-DrJfu-9d.chunk.mjs";import{i as j}from"./init-CLzSasj9.chunk.mjs";import{e as M,f as D,a as B,b as F}from"./defaultLocale-0_YM-Ssk.chunk.mjs";function g(t,n){return t==null||n==null?NaN:tn?1:t>=n?0:NaN}function O(t,n){return t==null||n==null?NaN:nt?1:n>=t?0:NaN}function x(t){let n,u,e;t.length!==2?(n=g,u=(i,c)=>g(t(i),c),e=(i,c)=>t(i)-c):(n=t===g||t===O?t:R,u=t,e=t);function a(i,c,r=0,h=i.length){if(r>>1;u(i[l],c)<0?r=l+1:h=l}while(r>>1;u(i[l],c)<=0?r=l+1:h=l}while(rr&&e(i[l-1],c)>-e(i[l],c)?l-1:l}return{left:a,center:o,right:f}}function R(){return 0}function S(t){return t===null?NaN:+t}const T=x(g),U=T.right;x(S).center;const W=Math.sqrt(50),X=Math.sqrt(10),Y=Math.sqrt(2);function p(t,n,u){const e=(n-t)/Math.max(0,u),a=Math.floor(Math.log10(e)),f=e/Math.pow(10,a),o=f>=W?10:f>=X?5:f>=Y?2:1;let i,c,r;return a<0?(r=Math.pow(10,-a)/o,i=Math.round(t*r),c=Math.round(n*r),i/rn&&--c,r=-r):(r=Math.pow(10,a)*o,i=Math.round(t/r),c=Math.round(n/r),i*rn&&--c),c0))return[];if(t===n)return[t];const e=n=a))return[];const i=f-a+1,c=new Array(i);if(e)if(o<0)for(let r=0;rn&&(u=t,t=n,n=u),function(e){return Math.max(t,Math.min(n,e))}}function tt(t,n,u){var e=t[0],a=t[1],f=n[0],o=n[1];return a2?nt:tt,c=r=null,l}function l(s){return s==null||isNaN(s=+s)?f:(c||(c=i(t.map(e),n,u)))(e(o(s)))}return l.invert=function(s){return o(a((r||(r=i(n,t.map(e),N)))(s)))},l.domain=function(s){return arguments.length?(t=Array.from(s,_),h()):t.slice()},l.range=function(s){return arguments.length?(n=Array.from(s),h()):n.slice()},l.rangeRound=function(s){return n=Array.from(s),u=K,h()},l.clamp=function(s){return arguments.length?(o=s?!0:m,h()):o!==m},l.interpolate=function(s){return arguments.length?(u=s,h()):u},l.unknown=function(s){return arguments.length?(f=s,l):f},function(s,k){return e=s,a=k,h()}}function ut(){return rt()(m,m)}function at(t,n,u,e){var a=C(t,n,u),f;switch(e=D(e??",f"),e.type){case"s":{var o=Math.max(Math.abs(t),Math.abs(n));return e.precision==null&&!isNaN(f=P(a,o))&&(e.precision=f),B(e,o)}case"":case"e":case"g":case"p":case"r":{e.precision==null&&!isNaN(f=Q(a,Math.max(Math.abs(t),Math.abs(n))))&&(e.precision=f-(e.type==="e"));break}case"f":case"%":{e.precision==null&&!isNaN(f=L(a))&&(e.precision=f-(e.type==="%")*2);break}}return F(e)}function ot(t){var n=t.domain;return t.ticks=function(u){var e=n();return z(e[0],e[e.length-1],u??10)},t.tickFormat=function(u,e){var a=n();return at(a[0],a[a.length-1],u??10,e)},t.nice=function(u){u==null&&(u=10);var e=n(),a=0,f=e.length-1,o=e[a],i=e[f],c,r,h=10;for(i0;){if(r=v(o,i,u),r===c)return e[a]=o,e[f]=i,n(e);if(r>0)o=Math.floor(o/r)*r,i=Math.ceil(i/r)*r;else if(r<0)o=Math.ceil(o*r)/r,i=Math.floor(i*r)/r;else break;c=r}return t},t}function it(){var t=ut();return t.copy=function(){return et(t,it())},j.apply(t,arguments),ot(t)}export{et as a,x as b,ut as c,it as l,C as t}; //# sourceMappingURL=linear-BgvCSYiQ.chunk.mjs.map