import Bluebird from"../../deps/bluebird_fork.js";import{validation}from"../../Validation.js";import{inline}from"./tools.js";import{relate}from"@arcgis/core/geometry/geometryEngineAsync";class RelateEngineTask{execute(e){const i=validation.exists("geometry1",e.geometry1),n=validation.exists("geometry2",e.geometry2),t=validation.array("relations",e.relations,validation.never);e=t.map(function(e){return relate(i,n,e)});return inline(Bluebird.all(e),function(e){return{incident:0<=e.indexOf(!0),incidents:e}})}}RelateEngineTask.action="gcx:wf:arcgis::RelateEngineTask",RelateEngineTask.suite="gcx:wf:builtin";export{RelateEngineTask};