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