import{M as tn,N as rn,O as d,P as ln,Q as X,R as I,S as _,T as un,V as N,W as an,X as $,Y as f,Z as sn,$ as fn,a0 as on}from"./NewEditor-BRnn5ufh.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[o]="ef5b3c76-cbe5-472d-8d9b-7901a69b8251",s._sentryDebugIdIdentifier="sentry-dbid-ef5b3c76-cbe5-472d-8d9b-7901a69b8251")}catch{}})();function cn(s){return s.innerRadius}function yn(s){return s.outerRadius}function dn(s){return s.startAngle}function gn(s){return s.endAngle}function pn(s){return s&&s.padAngle}function mn(s,o,D,P,v,b,Q,r){var O=D-s,i=P-o,n=Q-v,p=r-b,u=p*O-n*i;if(!(u*u<d))return u=(n*(o-b)-p*(s-v))/u,[s+u*O,o+u*i]}function F(s,o,D,P,v,b,Q){var r=s-D,O=o-P,i=(Q?b:-b)/$(r*r+O*O),n=i*O,p=-i*r,u=s+n,t=o+p,c=D+n,y=P+p,V=(u+c)/2,l=(t+y)/2,m=c-u,g=y-t,R=m*m+g*g,A=v-b,T=u*y-c*t,S=(g<0?-1:1)*$(on(0,A*A*R-T*T)),q=(T*g-m*S)/R,M=(-T*m-g*S)/R,w=(T*g+m*S)/R,x=(-T*m+g*S)/R,h=q-V,e=M-l,a=w-V,W=x-l;return h*h+e*e>a*a+W*W&&(q=w,M=x),{cx:q,cy:M,x01:-n,y01:-p,x11:q*(v/A-1),y11:M*(v/A-1)}}function hn(){var s=cn,o=yn,D=N(0),P=null,v=dn,b=gn,Q=pn,r=null,O=tn(i);function i(){var n,p,u=+s.apply(this,arguments),t=+o.apply(this,arguments),c=v.apply(this,arguments)-rn,y=b.apply(this,arguments)-rn,V=un(y-c),l=y>c;if(r||(r=n=O()),t<u&&(p=t,t=u,u=p),!(t>d))r.moveTo(0,0);else if(V>ln-d)r.moveTo(t*X(c),t*I(c)),r.arc(0,0,t,c,y,!l),u>d&&(r.moveTo(u*X(y),u*I(y)),r.arc(0,0,u,y,c,l));else{var m=c,g=y,R=c,A=y,T=V,S=V,q=Q.apply(this,arguments)/2,M=q>d&&(P?+P.apply(this,arguments):$(u*u+t*t)),w=_(un(t-u)/2,+D.apply(this,arguments)),x=w,h=w,e,a;if(M>d){var W=sn(M/u*I(q)),j=sn(M/t*I(q));(T-=W*2)>d?(W*=l?1:-1,R+=W,A-=W):(T=0,R=A=(c+y)/2),(S-=j*2)>d?(j*=l?1:-1,m+=j,g-=j):(S=0,m=g=(c+y)/2)}var Y=t*X(m),Z=t*I(m),k=u*X(A),z=u*I(A);if(w>d){var B=t*X(g),C=t*I(g),G=u*X(R),H=u*I(R),E;if(V<an)if(E=mn(Y,Z,G,H,B,C,k,z)){var J=Y-E[0],K=Z-E[1],L=B-E[0],U=C-E[1],nn=1/I(fn((J*L+K*U)/($(J*J+K*K)*$(L*L+U*U)))/2),en=$(E[0]*E[0]+E[1]*E[1]);x=_(w,(u-en)/(nn-1)),h=_(w,(t-en)/(nn+1))}else x=h=0}S>d?h>d?(e=F(G,H,Y,Z,t,h,l),a=F(B,C,k,z,t,h,l),r.moveTo(e.cx+e.x01,e.cy+e.y01),h<w?r.arc(e.cx,e.cy,h,f(e.y01,e.x01),f(a.y01,a.x01),!l):(r.arc(e.cx,e.cy,h,f(e.y01,e.x01),f(e.y11,e.x11),!l),r.arc(0,0,t,f(e.cy+e.y11,e.cx+e.x11),f(a.cy+a.y11,a.cx+a.x11),!l),r.arc(a.cx,a.cy,h,f(a.y11,a.x11),f(a.y01,a.x01),!l))):(r.moveTo(Y,Z),r.arc(0,0,t,m,g,!l)):r.moveTo(Y,Z),!(u>d)||!(T>d)?r.lineTo(k,z):x>d?(e=F(k,z,B,C,u,-x,l),a=F(Y,Z,G,H,u,-x,l),r.lineTo(e.cx+e.x01,e.cy+e.y01),x<w?r.arc(e.cx,e.cy,x,f(e.y01,e.x01),f(a.y01,a.x01),!l):(r.arc(e.cx,e.cy,x,f(e.y01,e.x01),f(e.y11,e.x11),!l),r.arc(0,0,u,f(e.cy+e.y11,e.cx+e.x11),f(a.cy+a.y11,a.cx+a.x11),l),r.arc(a.cx,a.cy,x,f(a.y11,a.x11),f(a.y01,a.x01),!l))):r.arc(0,0,u,A,R,l)}if(r.closePath(),n)return r=null,n+""||null}return i.centroid=function(){var n=(+s.apply(this,arguments)+ +o.apply(this,arguments))/2,p=(+v.apply(this,arguments)+ +b.apply(this,arguments))/2-an/2;return[X(p)*n,I(p)*n]},i.innerRadius=function(n){return arguments.length?(s=typeof n=="function"?n:N(+n),i):s},i.outerRadius=function(n){return arguments.length?(o=typeof n=="function"?n:N(+n),i):o},i.cornerRadius=function(n){return arguments.length?(D=typeof n=="function"?n:N(+n),i):D},i.padRadius=function(n){return arguments.length?(P=n==null?null:typeof n=="function"?n:N(+n),i):P},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:N(+n),i):v},i.endAngle=function(n){return arguments.length?(b=typeof n=="function"?n:N(+n),i):b},i.padAngle=function(n){return arguments.length?(Q=typeof n=="function"?n:N(+n),i):Q},i.context=function(n){return arguments.length?(r=n??null,i):r},i}export{hn as d};
//# sourceMappingURL=arc-B6Eg25HN.js.map
