import{validation}from"../../Validation.js";import{inline}from"./tools.js";import{nearestVertices}from"@arcgis/core/geometry/geometryEngineAsync";class NearestVerticesEngineTask{execute(e){var i=validation.exists("geometry",e.geometry),t=validation.exists("point",e.point),s=validation.number("proximity",e.proximity),e=validation.number("maxVertices",e.maxVertices),e=nearestVertices(i,t,s,e);return inline(e,function(e){const i=[];for(const t of e){const s={};s.point=t.coordinate,s.distance=t.distance,s.side=t.isRightSide?"right":"left",s.index=t.vertexIndex,s.empty=t.isEmpty,i.push(s)}return{results:i}})}}NearestVerticesEngineTask.action="gcx:wf:arcgis::NearestVerticesEngineTask",NearestVerticesEngineTask.suite="gcx:wf:builtin";export{NearestVerticesEngineTask};