import{a as c}from"./defaultLocale-DEOAvdte.js";function e(r,t){return r==null||t==null?NaN:r<t?-1:r>t?1:r>=t?0:NaN}function N(r,t){return r==null||t==null?NaN:t<r?-1:t>r?1:t>=r?0:NaN}function g(r){let t,l,f;r.length===2?(t=r===e||r===N?r:x,l=r,f=r):(t=e,l=(n,u)=>e(r(n),u),f=(n,u)=>r(n)-u);function o(n,u,a=0,h=n.length){if(a<h){if(t(u,u)!==0)return h;do{let i=a+h>>>1;l(n[i],u)<0?a=i+1:h=i}while(a<h)}return a}function M(n,u,a=0,h=n.length){if(a<h){if(t(u,u)!==0)return h;do{let i=a+h>>>1;l(n[i],u)<=0?a=i+1:h=i}while(a<h)}return a}function s(n,u,a=0,h=n.length){let i=o(n,u,a,h-1);return i>a&&f(n[i-1],u)>-f(n[i],u)?i-1:i}return{left:o,center:s,right:M}}function x(){return 0}var b=Math.sqrt(50),p=Math.sqrt(10),q=Math.sqrt(2);function m(r,t,l){let f=(t-r)/Math.max(0,l),o=Math.floor(Math.log10(f)),M=f/10**o,s=M>=b?10:M>=p?5:M>=q?2:1,n,u,a;return o<0?(a=10**-o/s,n=Math.round(r*a),u=Math.round(t*a),n/a<r&&++n,u/a>t&&--u,a=-a):(a=10**o*s,n=Math.round(r/a),u=Math.round(t/a),n*a<r&&++n,u*a>t&&--u),u<n&&.5<=l&&l<2?m(r,t,l*2):[n,u,a]}function w(r,t,l){if(t=+t,r=+r,l=+l,!(l>0))return[];if(r===t)return[r];let f=t<r,[o,M,s]=f?m(t,r,l):m(r,t,l);if(!(M>=o))return[];let n=M-o+1,u=Array(n);if(f)if(s<0)for(let a=0;a<n;++a)u[a]=(M-a)/-s;else for(let a=0;a<n;++a)u[a]=(M-a)*s;else if(s<0)for(let a=0;a<n;++a)u[a]=(o+a)/-s;else for(let a=0;a<n;++a)u[a]=(o+a)*s;return u}function d(r,t,l){return t=+t,r=+r,l=+l,m(r,t,l)[2]}function v(r,t,l){t=+t,r=+r,l=+l;let f=t<r,o=f?d(t,r,l):d(r,t,l);return(f?-1:1)*(o<0?1/-o:o)}function y(r){return Math.max(0,-c(Math.abs(r)))}function A(r,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(c(t)/3)))*3-c(Math.abs(r)))}function j(r,t){return r=Math.abs(r),t=Math.abs(t)-r,Math.max(0,c(t)-c(r))+1}export{v as a,e as c,d as i,A as n,w as o,y as r,g as s,j as t};
