/*
All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
*/
import{GeometryCursor as t}from"../../../geometry/GeometryCursor.js";import{collectMultipath as e}from"../../../geometry/geometryCursorCollectUtils.js";import{SimpleEffectCursor as o}from"../CIMEffects.js";import{getEffectOperator as r}from"../CIMOperators.js";import{getEffectsInflateSize as s}from"../CIMSymbolHelper.js";const n=96/72;class l{static executeEffects(t,e,l,c){const f=n,m=s(t);let p=new o(e);for(const o of t){const t=r(o);t&&(p=t.execute(p,o,f,l,m,c))}return p}static applyEffects(n,l){if(!n)return l;const c=s(n);let f,m=new o(t.fromJSONCIM(l));for(const t of n){const e=r(t);e&&(m=e.execute(m,t,1,null,c,!1))}const p=[];let u=null;for(;f=m.next();)p.push(...e(f)),u=f.geometryType;return 0===p.length||null===u?null:"esriGeometryPolygon"===u?{rings:p}:{paths:p}}}export{l as CIMEffectHelper};
