function M(e,i){return e==null||i==null?NaN:e<i?-1:e>i?1:e>=i?0:NaN}function a(e,i){return e==null||i==null?NaN:i<e?-1:i>e?1:i>=e?0:NaN}function N(e){let i,r,l;e.length!==2?(i=M,r=(c,f)=>M(e(c),f),l=(c,f)=>e(c)-f):(i=e===M||e===a?e:w,r=e,l=e);function u(c,f,n=0,d=c.length){if(n<d){if(i(f,f)!==0)return d;do{const h=n+d>>>1;r(c[h],f)<0?n=h+1:d=h}while(n<d)}return n}function t(c,f,n=0,d=c.length){if(n<d){if(i(f,f)!==0)return d;do{const h=n+d>>>1;r(c[h],f)<=0?n=h+1:d=h}while(n<d)}return n}function g(c,f,n=0,d=c.length){const h=u(c,f,n,d-1);return h>n&&l(c[h-1],f)>-l(c[h],f)?h-1:h}return{left:u,center:g,right:t}}function w(){return 0}function k(e){return e===null?NaN:+e}const q=N(M),v=q.right;N(k).center;const z=v,y=Math.sqrt(50),A=Math.sqrt(10),S=Math.sqrt(2);function o(e,i,r){const l=(i-e)/Math.max(0,r),u=Math.floor(Math.log10(l)),t=l/Math.pow(10,u),g=t>=y?10:t>=A?5:t>=S?2:1;let c,f,n;return u<0?(n=Math.pow(10,-u)/g,c=Math.round(e*n),f=Math.round(i*n),c/n<e&&++c,f/n>i&&--f,n=-n):(n=Math.pow(10,u)*g,c=Math.round(e/n),f=Math.round(i/n),c*n<e&&++c,f*n>i&&--f),f<c&&.5<=r&&r<2?o(e,i,r*2):[c,f,n]}function B(e,i,r){if(i=+i,e=+e,r=+r,!(r>0))return[];if(e===i)return[e];const l=i<e,[u,t,g]=l?o(i,e,r):o(e,i,r);if(!(t>=u))return[];const c=t-u+1,f=new Array(c);if(l)if(g<0)for(let n=0;n<c;++n)f[n]=(t-n)/-g;else for(let n=0;n<c;++n)f[n]=(t-n)*g;else if(g<0)for(let n=0;n<c;++n)f[n]=(u+n)/-g;else for(let n=0;n<c;++n)f[n]=(u+n)*g;return f}function m(e,i,r){return i=+i,e=+e,r=+r,o(e,i,r)[2]}function I(e,i,r){i=+i,e=+e,r=+r;const l=i<e,u=l?m(i,e,r):m(e,i,r);return(l?-1:1)*(u<0?1/-u:u)}function R(e,i){let r;if(i===void 0)for(const l of e)l!=null&&(r<l||r===void 0&&l>=l)&&(r=l);else{let l=-1;for(let u of e)(u=i(u,++l,e))!=null&&(r<u||r===void 0&&u>=u)&&(r=u)}return r}function j(e,i,r){e=+e,i=+i,r=(u=arguments.length)<2?(i=e,e=0,1):u<3?1:+r;for(var l=-1,u=Math.max(0,Math.ceil((i-e)/r))|0,t=new Array(u);++l<u;)t[l]=e+l*r;return t}export{B as a,z as b,m as c,R as m,j as r,I as t};
