import{n as f}from"./src-C042FyXq.js";var i={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4},b={arrow_point:9,arrow_cross:12.5,arrow_circle:12.5};function x(e,l){if(e===void 0||l===void 0)return{angle:0,deltaX:0,deltaY:0};e=a(e),l=a(l);let[s,t]=[e.x,e.y],[n,y]=[l.x,l.y],h=n-s,c=y-t;return{angle:Math.atan(c/h),deltaX:h,deltaY:c}}f(x,"calculateDeltaAndAngle");var a=f(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),u=f(e=>({x:f(function(l,s,t){let n=0,y=a(t[0]).x<a(t[t.length-1]).x?"left":"right";if(s===0&&Object.hasOwn(i,e.arrowTypeStart)){let{angle:r,deltaX:w}=x(t[0],t[1]);n=i[e.arrowTypeStart]*Math.cos(r)*(w>=0?1:-1)}else if(s===t.length-1&&Object.hasOwn(i,e.arrowTypeEnd)){let{angle:r,deltaX:w}=x(t[t.length-1],t[t.length-2]);n=i[e.arrowTypeEnd]*Math.cos(r)*(w>=0?1:-1)}let h=Math.abs(a(l).x-a(t[t.length-1]).x),c=Math.abs(a(l).y-a(t[t.length-1]).y),g=Math.abs(a(l).x-a(t[0]).x),M=Math.abs(a(l).y-a(t[0]).y),p=i[e.arrowTypeStart],d=i[e.arrowTypeEnd];if(h<d&&h>0&&c<d){let r=d+1-h;r*=y==="right"?-1:1,n-=r}if(g<p&&g>0&&M<p){let r=p+1-g;r*=y==="right"?-1:1,n+=r}return a(l).x+n},"x"),y:f(function(l,s,t){let n=0,y=a(t[0]).y<a(t[t.length-1]).y?"down":"up";if(s===0&&Object.hasOwn(i,e.arrowTypeStart)){let{angle:r,deltaY:w}=x(t[0],t[1]);n=i[e.arrowTypeStart]*Math.abs(Math.sin(r))*(w>=0?1:-1)}else if(s===t.length-1&&Object.hasOwn(i,e.arrowTypeEnd)){let{angle:r,deltaY:w}=x(t[t.length-1],t[t.length-2]);n=i[e.arrowTypeEnd]*Math.abs(Math.sin(r))*(w>=0?1:-1)}let h=Math.abs(a(l).y-a(t[t.length-1]).y),c=Math.abs(a(l).x-a(t[t.length-1]).x),g=Math.abs(a(l).y-a(t[0]).y),M=Math.abs(a(l).x-a(t[0]).x),p=i[e.arrowTypeStart],d=i[e.arrowTypeEnd];if(h<d&&h>0&&c<d){let r=d+1-h;r*=y==="up"?-1:1,n-=r}if(g<p&&g>0&&M<p){let r=p+1-g;r*=y==="up"?-1:1,n+=r}return a(l).y+n},"y")}),"getLineFunctionsWithOffset");export{i as n,b as r,u as t};
