import{b as e,l as t,n,o as r,r as i,t as a,v as o,x as s,y as c}from"./src-BkCVz_TJ.mjs";import{i as l,n as u,r as d,t as f}from"./defaultLocale-BljHASC9.mjs";import{t as p}from"./init-L1KCVOHH.mjs";function m(e,t){t||=[];var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function h(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function g(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o;for(o=0;o<r;++o)i[o]=y(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(e){for(o=0;o<r;++o)a[o]=i[o](e);return a}}function _(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function v(e,t){var n={},r={},i;for(i in(typeof e!=`object`||!e)&&(e={}),(typeof t!=`object`||!t)&&(t={}),t)i in e?n[i]=y(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}function y(e,o){var s=typeof o,c;return o==null||s===`boolean`?r(o):(s===`number`?n:s===`string`?(c=t(o))?(o=c,i):a:o instanceof t?i:o instanceof Date?_:h(o)?m:Array.isArray(o)?g:typeof o.valueOf!=`function`&&typeof o.toString!=`function`||isNaN(o)?v:n)(e,o)}function b(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function x(e){return Math.max(0,-l(Math.abs(e)))}function S(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(l(t)/3)))*3-l(Math.abs(e)))}function C(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,l(t)-l(e))+1}function w(e){return function(){return e}}function T(e){return+e}var E=[0,1];function D(e){return e}function O(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:w(isNaN(t)?NaN:.5)}function k(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}function A(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=O(i,r),a=n(o,a)):(r=O(r,i),a=n(a,o)),function(e){return a(r(e))}}function j(e,t,n){var r=Math.min(e.length,t.length)-1,i=Array(r),a=Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=O(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(t){var n=s(e,t,1,r)-1;return a[n](i[n](t))}}function M(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function N(){var e=E,t=E,r=y,i,a,o,s=D,c,l,u;function d(){var n=Math.min(e.length,t.length);return s!==D&&(s=k(e[0],e[n-1])),c=n>2?j:A,l=u=null,f}function f(n){return n==null||isNaN(n=+n)?o:(l||=c(e.map(i),t,r))(i(s(n)))}return f.invert=function(r){return s(a((u||=c(t,e.map(i),n))(r)))},f.domain=function(t){return arguments.length?(e=Array.from(t,T),d()):e.slice()},f.range=function(e){return arguments.length?(t=Array.from(e),d()):t.slice()},f.rangeRound=function(e){return t=Array.from(e),r=b,d()},f.clamp=function(e){return arguments.length?(s=e?!0:D,d()):s!==D},f.interpolate=function(e){return arguments.length?(r=e,d()):r},f.unknown=function(e){return arguments.length?(o=e,f):o},function(e,t){return i=e,a=t,d()}}function P(){return N()(D,D)}function F(e,t,n,r){var i=c(e,t,n),a;switch(r=d(r??`,f`),r.type){case`s`:var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=S(i,o))&&(r.precision=a),u(r,o);case``:case`e`:case`g`:case`p`:case`r`:r.precision==null&&!isNaN(a=C(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type===`e`));break;case`f`:case`%`:r.precision==null&&!isNaN(a=x(i))&&(r.precision=a-(r.type===`%`)*2);break}return f(r)}function I(t){var n=t.domain;return t.ticks=function(t){var r=n();return e(r[0],r[r.length-1],t??10)},t.tickFormat=function(e,t){var r=n();return F(r[0],r[r.length-1],e??10,t)},t.nice=function(e){e??=10;var r=n(),i=0,a=r.length-1,s=r[i],c=r[a],l,u,d=10;for(c<s&&(u=s,s=c,c=u,u=i,i=a,a=u);d-- >0;){if(u=o(s,c,e),u===l)return r[i]=s,r[a]=c,n(r);if(u>0)s=Math.floor(s/u)*u,c=Math.ceil(c/u)*u;else if(u<0)s=Math.ceil(s*u)/u,c=Math.floor(c*u)/u;else break;l=u}return t},t}function L(){var e=P();return e.copy=function(){return M(e,L())},p.apply(e,arguments),I(e)}export{P as n,M as r,L as t};
//# sourceMappingURL=linear-gA98NGf7.mjs.map