/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import{create as e}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{euclideanHorizontalDistance as t,euclideanHorizontalDistanceBetweenPoints as n,euclideanHorizontalLength as i}from"./euclideanLengthMeasurementUtils.js";import{loadGeodesicLengthMeasurementUtils as o}from"./geodesicLengthMeasurementUtils.js";function s(e){return{autoLength2D:t=>e.geodesicLength(t)??i(t),autoDistanceBetweenPoints2D:(t,i)=>e.geodesicDistanceBetweenPoints(t,i)??n(t,i),autoDistance2D:(n,i,o)=>(r[0]=n[0],r[1]=n[1],r[2]=3===n.length?n[2]:0,a[0]=i[0],a[1]=i[1],a[2]=3===i.length?i[2]:0,e.geodesicDistance(r,a,o)??t(r,a,o))}}async function c(){return s(await o())}const r=e(),a=e();export{c as loadAutomaticLengthMeasurementUtils};
