(function(f,x){typeof exports=="object"&&typeof module<"u"?x(exports):typeof define=="function"&&define.amd?define(["exports"],x):(f=typeof globalThis<"u"?globalThis:f||self,x(f["catenary-curve"]={}))})(this,function(f){"use strict";function R(t,e,n,r,u,c){const i=[[e.x,t*Math.cosh((e.x-r)/t)+u]],s=n.x-e.x,o=c-1;for(let l=0;l1e-6&&se.x,s=i?e:t,o=i?t:e;if(b(s,o).01){const M=o.x-s.x,v=o.y-s.y,h=-T(M,v,n,c),C=(h*Math.log((n+v)/(n-v))-M)*.5,L=h*Math.cosh(C/h),O=s.x-C,j=s.y-L,w=R(h,s,o,O,j,u);return i&&w.reverse(),p(w)}const a=(s.x+o.x)*.5,D=(s.y+o.y+n)*.5;return d([[s.x,s.y],[a,D],[o.x,o.y]])}return d([[s.x,s.y],[o.x,o.y]])}f.drawResult=q,f.drawResultCurve=g,f.drawResultLine=m,f.getCatenaryCurve=S,Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})});