import{w as on,c as S}from"./path-Cxj8E94P.chunk.mjs";import{aM as an,aN as E,aO as I,aP as rn,aQ as f,aI as un,aR as k,aS as O,aT as cn,aU as y,aV as sn,aW as yn,aX as ln}from"./mermaid.core-DIdKAxpj.chunk.mjs";function en(i){return i.innerRadius}function fn(i){return i.outerRadius}function pn(i){return i.startAngle}function gn(i){return i.endAngle}function xn(i){return i&&i.padAngle}function mn(i,v,X,M,d,T,_,a){var B=X-i,s=M-v,n=_-d,g=a-T,r=g*B-n*s;if(!(r*r<f))return r=(n*(v-T)-g*(i-d))/r,[i+r*B,v+r*s]}function F(i,v,X,M,d,T,_){var a=i-X,B=v-M,s=(_?T:-T)/k(a*a+B*B),n=s*B,g=-s*a,r=i+n,o=v+g,l=X+n,e=M+g,q=(r+l)/2,u=(o+e)/2,x=l-r,p=e-o,R=x*x+p*p,V=d-T,A=r*e-l*o,K=(p<0?-1:1)*k(ln(0,V*V*R-A*A)),N=(A*p-x*K)/R,P=(-A*x-p*K)/R,U=(A*p+x*K)/R,m=(-A*x+p*K)/R,h=N-q,t=P-u,c=U-q,D=m-u;return h*h+t*t>c*c+D*D&&(N=U,P=m),{cx:N,cy:P,x01:-n,y01:-g,x11:N*(d/V-1),y11:P*(d/V-1)}}function dn(){var i=en,v=fn,X=S(0),M=null,d=pn,T=gn,_=xn,a=null,B=on(s);function s(){var n,g,r=+i.apply(this,arguments),o=+v.apply(this,arguments),l=d.apply(this,arguments)-rn,e=T.apply(this,arguments)-rn,q=cn(e-l),u=e>l;if(a||(a=n=B()),o<r&&(g=o,o=r,r=g),!(o>f))a.moveTo(0,0);else if(q>un-f)a.moveTo(o*E(l),o*I(l)),a.arc(0,0,o,l,e,!u),r>f&&(a.moveTo(r*E(e),r*I(e)),a.arc(0,0,r,e,l,u));else{var x=l,p=e,R=l,V=e,A=q,K=q,N=_.apply(this,arguments)/2,P=N>f&&(M?+M.apply(this,arguments):k(r*r+o*o)),U=O(cn(o-r)/2,+X.apply(this,arguments)),m=U,h=U,t,c;if(P>f){var D=sn(P/r*I(N)),L=sn(P/o*I(N));(A-=D*2)>f?(D*=u?1:-1,R+=D,V-=D):(A=0,R=V=(l+e)/2),(K-=L*2)>f?(L*=u?1:-1,x+=L,p-=L):(K=0,x=p=(l+e)/2)}var W=o*E(x),b=o*I(x),Y=r*E(V),Z=r*I(V);if(U>f){var $=o*E(p),C=o*I(p),G=r*E(R),H=r*I(R),Q;if(q<an)if(Q=mn(W,b,G,H,$,C,Y,Z)){var J=W-Q[0],w=b-Q[1],j=$-Q[0],z=C-Q[1],nn=1/I(yn((J*j+w*z)/(k(J*J+w*w)*k(j*j+z*z)))/2),tn=k(Q[0]*Q[0]+Q[1]*Q[1]);m=O(U,(r-tn)/(nn-1)),h=O(U,(o-tn)/(nn+1))}else m=h=0}K>f?h>f?(t=F(G,H,W,b,o,h,u),c=F($,C,Y,Z,o,h,u),a.moveTo(t.cx+t.x01,t.cy+t.y01),h<U?a.arc(t.cx,t.cy,h,y(t.y01,t.x01),y(c.y01,c.x01),!u):(a.arc(t.cx,t.cy,h,y(t.y01,t.x01),y(t.y11,t.x11),!u),a.arc(0,0,o,y(t.cy+t.y11,t.cx+t.x11),y(c.cy+c.y11,c.cx+c.x11),!u),a.arc(c.cx,c.cy,h,y(c.y11,c.x11),y(c.y01,c.x01),!u))):(a.moveTo(W,b),a.arc(0,0,o,x,p,!u)):a.moveTo(W,b),!(r>f)||!(A>f)?a.lineTo(Y,Z):m>f?(t=F(Y,Z,$,C,r,-m,u),c=F(W,b,G,H,r,-m,u),a.lineTo(t.cx+t.x01,t.cy+t.y01),m<U?a.arc(t.cx,t.cy,m,y(t.y01,t.x01),y(c.y01,c.x01),!u):(a.arc(t.cx,t.cy,m,y(t.y01,t.x01),y(t.y11,t.x11),!u),a.arc(0,0,r,y(t.cy+t.y11,t.cx+t.x11),y(c.cy+c.y11,c.cx+c.x11),u),a.arc(c.cx,c.cy,m,y(c.y11,c.x11),y(c.y01,c.x01),!u))):a.arc(0,0,r,V,R,u)}if(a.closePath(),n)return a=null,n+""||null}return s.centroid=function(){var n=(+i.apply(this,arguments)+ +v.apply(this,arguments))/2,g=(+d.apply(this,arguments)+ +T.apply(this,arguments))/2-an/2;return[E(g)*n,I(g)*n]},s.innerRadius=function(n){return arguments.length?(i=typeof n=="function"?n:S(+n),s):i},s.outerRadius=function(n){return arguments.length?(v=typeof n=="function"?n:S(+n),s):v},s.cornerRadius=function(n){return arguments.length?(X=typeof n=="function"?n:S(+n),s):X},s.padRadius=function(n){return arguments.length?(M=n==null?null:typeof n=="function"?n:S(+n),s):M},s.startAngle=function(n){return arguments.length?(d=typeof n=="function"?n:S(+n),s):d},s.endAngle=function(n){return arguments.length?(T=typeof n=="function"?n:S(+n),s):T},s.padAngle=function(n){return arguments.length?(_=typeof n=="function"?n:S(+n),s):_},s.context=function(n){return arguments.length?(a=n!=null?n:null,s):a},s}export{dn as a};
