import{r as t}from"./d3-color-Cvz4NH3r.js";const n=t=>()=>t;function r(t){return 1==(t=+t)?e:function(r,e){return e-r?function(t,n,r){return t=Math.pow(t,r),n=Math.pow(n,r)-t,r=1/r,function(e){return Math.pow(t+e*n,r)}}(r,e,t):n(isNaN(r)?e:r)}}function e(t,r){var e=r-t;return e?function(t,n){return function(r){return t+r*n}}(t,e):n(isNaN(t)?r:t)}const a=function n(a){var u=r(a);function o(n,r){var a=u((n=t(n)).r,(r=t(r)).r),o=u(n.g,r.g),s=u(n.b,r.b),i=e(n.opacity,r.opacity);return function(t){return n.r=a(t),n.g=o(t),n.b=s(t),n.opacity=i(t),n+""}}return o.gamma=n,o}(1);function u(t,n){return t=+t,n=+n,function(r){return t*(1-r)+n*r}}var o=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,s=new RegExp(o.source,"g");function i(t,n){var r,e,a,i=o.lastIndex=s.lastIndex=0,c=-1,l=[],f=[];for(t+="",n+="";(r=o.exec(t))&&(e=s.exec(n));)(a=e.index)>i&&(a=n.slice(i,a),l[c]?l[c]+=a:l[++c]=a),(r=r[0])===(e=e[0])?l[c]?l[c]+=e:l[++c]=e:(l[++c]=null,f.push({i:c,x:u(r,e)})),i=s.lastIndex;return i<n.length&&(a=n.slice(i),l[c]?l[c]+=a:l[++c]=a),l.length<2?f[0]?function(t){return function(n){return t(n)+""}}(f[0].x):function(t){return function(){return t}}(n):(n=f.length,function(t){for(var r,e=0;e<n;++e)l[(r=f[e]).i]=r.x(t);return l.join("")})}var c,l=180/Math.PI,f={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function h(t,n,r,e,a,u){var o,s,i;return(o=Math.sqrt(t*t+n*n))&&(t/=o,n/=o),(i=t*r+n*e)&&(r-=t*i,e-=n*i),(s=Math.sqrt(r*r+e*e))&&(r/=s,e/=s,i/=s),t*e<n*r&&(t=-t,n=-n,i=-i,o=-o),{translateX:a,translateY:u,rotate:Math.atan2(n,t)*l,skewX:Math.atan(i)*l,scaleX:o,scaleY:s}}function p(t,n,r,e){function a(t){return t.length?t.pop()+" ":""}return function(o,s){var i=[],c=[];return o=t(o),s=t(s),function(t,e,a,o,s,i){if(t!==a||e!==o){var c=s.push("translate(",null,n,null,r);i.push({i:c-4,x:u(t,a)},{i:c-2,x:u(e,o)})}else(a||o)&&s.push("translate("+a+n+o+r)}(o.translateX,o.translateY,s.translateX,s.translateY,i,c),function(t,n,r,o){t!==n?(t-n>180?n+=360:n-t>180&&(t+=360),o.push({i:r.push(a(r)+"rotate(",null,e)-2,x:u(t,n)})):n&&r.push(a(r)+"rotate("+n+e)}(o.rotate,s.rotate,i,c),function(t,n,r,o){t!==n?o.push({i:r.push(a(r)+"skewX(",null,e)-2,x:u(t,n)}):n&&r.push(a(r)+"skewX("+n+e)}(o.skewX,s.skewX,i,c),function(t,n,r,e,o,s){if(t!==r||n!==e){var i=o.push(a(o)+"scale(",null,",",null,")");s.push({i:i-4,x:u(t,r)},{i:i-2,x:u(n,e)})}else 1===r&&1===e||o.push(a(o)+"scale("+r+","+e+")")}(o.scaleX,o.scaleY,s.scaleX,s.scaleY,i,c),o=s=null,function(t){for(var n,r=-1,e=c.length;++r<e;)i[(n=c[r]).i]=n.x(t);return i.join("")}}}var x=p((function(t){const n=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return n.isIdentity?f:h(n.a,n.b,n.c,n.d,n.e,n.f)}),"px, ","px)","deg)"),M=p((function(t){return null==t?f:(c||(c=document.createElementNS("http://www.w3.org/2000/svg","g")),c.setAttribute("transform",t),(t=c.transform.baseVal.consolidate())?h((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):f)}),", ",")",")");function g(t){return((t=Math.exp(t))+1/t)/2}const v=function t(n,r,e){function a(t,a){var u,o,s=t[0],i=t[1],c=t[2],l=a[0],f=a[1],h=a[2],p=l-s,x=f-i,M=p*p+x*x;if(M<1e-12)o=Math.log(h/c)/n,u=function(t){return[s+t*p,i+t*x,c*Math.exp(n*t*o)]};else{var v=Math.sqrt(M),d=(h*h-c*c+e*M)/(2*c*r*v),w=(h*h-c*c-e*M)/(2*h*r*v),X=Math.log(Math.sqrt(d*d+1)-d),m=Math.log(Math.sqrt(w*w+1)-w);o=(m-X)/n,u=function(t){var e,a=t*o,u=g(X),l=c/(r*v)*(u*(e=n*a+X,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(X));return[s+l*p,i+l*x,c*u/g(n*a+X)]}}return u.duration=1e3*o*n/Math.SQRT2,u}return a.rho=function(n){var r=Math.max(.001,+n),e=r*r;return t(r,e,e*e)},a}(Math.SQRT2,2,4);export{a,i as b,M as c,x as d,v as e,u as i};
