/* COPYRIGHT Esri - https://js.arcgis.com/5.0.18/LICENSE.txt */
import{readOffsetDistance as e,makeFeatureFromGroupPart as t}from"./support/builderUtils.js";import{modeBasedOffset as s}from"./support/offsetUtils.js";import{convertRadialToPolylines as o}from"./support/shapeUtils.js";import{isRadial as r,isPolyline as i,maxDigitizingDisplayEdits as a}from"../support/executorUtils.js";import p from"../../../../geometry/Polyline.js";import{getPaths as l,pathHasCurves as n}from"../../../../geometry/support/curves/curveUtils.js";function m({templatePart:m,shape:f,edits:c,relationships:u,mode:h,xyTolerance:d,associationFeaturesByTemplate:g}){let j=[];if(r(f))j=o(f);else{if(!i(f))return;j=[f]}const y=e(m.builderConfig);for(const e of j){const o=e.clone();for(const e of l(o)){let r=new p({spatialReference:o.spatialReference,...n(e)?{curvePaths:[e]}:{paths:[e]},hasZ:o.hasZ,hasM:o.hasM});r&&y&&(r=s(r,y,h,d)),r&&t({templatePart:m,shape:r,edits:c,relationships:u,mode:h,associationFeaturesByTemplate:g})}if("digitizing"===h&&c.length>a)break}}const f=!1;export{m as execute,f as isAsync};
