import{validation}from"../../Validation.js";import{inline,isAbortable,schedulePromiseCancellation}from"./tools.js";import GeometryService from"@arcgis/core/tasks/GeometryService";class UnionServiceTask{execute(e,i){var n=validation.string("url",e.url,validation.never),o=validation.array("geometry1",e.geometry1,validation.never),e=validation.array("geometry2",e.geometry2,[]);const r=new GeometryService(n);n=isAbortable(i.cancellationToken)?{signal:i.cancellationToken.signal}:void 0,n=r.union([...o,...e],n);return schedulePromiseCancellation(i,n),inline(n,function(e){return{geometry:e}})}}UnionServiceTask.action="gcx:wf:arcgis::UnionServiceTask",UnionServiceTask.suite="gcx:wf:builtin";export{UnionServiceTask};