!function(e){"object"==typeof module&&"object"==typeof module.exports?e(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","../../Validation","./tools","esri/geometry/geometryEngineAsync"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=e("../../Validation"),r=e("./tools"),s=e("esri/geometry/geometryEngineAsync"),e=(i.prototype.execute=function(e){var t=o.validation.exists("geometry",e.geometry),i=o.validation.exists("point",e.point),n=o.validation.number("proximity",e.proximity),e=o.validation.number("maxVertices",e.maxVertices),e=s.nearestVertices(t,i,n,e);return r.inline(e,function(e){for(var t=[],i=0,n=e;i<n.length;i++){var o=n[i],r={};r.point=o.coordinate,r.distance=o.distance,r.side=o.isRightSide?"right":"left",r.index=o.vertexIndex,r.empty=o.isEmpty,t.push(r)}return{results:t}})},i.action="gcx:wf:arcgis::NearestVerticesEngineTask",i.suite="gcx:wf:builtin",i);function i(){}t.NearestVerticesEngineTask=e});