/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
import{areaUnitFromSpatialReference as r,convertUnit as t,getMetersPerUnitForSR as n}from"../../core/units.js";import{supportsCurves as o,findSlicesByArea as s,recursiveSliceEqualArea as a,sliceIntoStrips as e}from"./gx/operatorPolygonSlicer.js";import{getSpatialReference as i,fromSpatialReference as u,fromPolygon as c,toPolygon as f}from"./support/apiConverter.js";function m(o,a,e,f={}){const{transform:m,unit:l}=f,p=i(o);if(e&&l){if(p.isGeographic)throw new Error("Unable to convert from an angular area unit to a linear area unit.");const o=r(p);o!==l&&(o?e=t(e,l,o):(e=t(e,l,"square-meters"),e=Math.sqrt(e),e/=n(p),e**=2))}return s(c(o),u(p),a,e,m?.transform??null)}function l(r,t,n={}){const{transform:o}=n,s=i(r);return a(c(r),u(s),t,o?.transform??null).map(r=>f(r,s))}function p(r,t,n={}){const{transform:o}=n,s=i(r);return e(c(r),u(s),t,o?.transform??null).map(r=>f(r,s))}const g=o();export{m as findSlicesByArea,l as recursiveSliceEqualArea,p as sliceIntoStrips,g as supportsCurves};
