// All material copyright Esri, All Rights Reserved, unless otherwise specified. // See https://js.arcgis.com/4.30/esri/copyright.txt for details. //>>built define(["exports","../geometryCursorCollectUtils","./coordsUtils"],function(r,H,x){function B(a,e){if(!a?.length)return null;const b=[],f=[],c=e?[Infinity,-Infinity,Infinity,-Infinity,Infinity,-Infinity]:[Infinity,-Infinity,Infinity,-Infinity];for(let k=0,d=a.length;k{let g=k[2]-d[2];0===g&&e&&(g=k[4]-d[4]);return g});f.length&&(b[0]=f[0][0],b[1]=f[0][1],e&&(b[2]=f[0][3]),b[0]c[1]||b[1]c[3]||e&&(b[2]c[5]))&& (b.length=0);if(!b.length)if(a=a[0]&&a[0].length?C(a[0],e):null)b[0]=a[0],b[1]=a[1],e&&2b[1]&&(b[1]= u);tb[3]&&(b[3]=t);e&&(wb[5]&&(b[5]=w))}0{let h=d[2]-g[2];0===h&&e&&(h=d[4]-g[4]);return h});c.length&&(f[0]=c[0][0],f[1]=c[0][1],e&&(f[2]=c[0][3]),f[0]k[1]||f[1]k[3]||e&&(f[2]k[5]))&&(f.length=0);if(!f.length)if(a.reset(),a.nextPath(),a=a.pathSize?G(a):null)f[0]=a[0],f[1]=a[1],e&&2e[1]&&(e[1]=p);me[3]&&(e[3]=m)}0e)return(a=F(a))?[a[0],a[1]]:null;const b=[0,0];a.reset();if(!a.nextPath()||!a.nextPoint())return null;const f=[a.x,a.y];for(a.reset();a.nextPath();)a:{let h=void 0;var c=b,k=f,d=a;if(!c||!d||3>d.pathSize)break a;d.nextPoint();var g=d.x;const l=d.y;d.nextPoint();let p=d.x-g,m=d.y-l,n=0,q=0;for(;d.nextPoint();)n=d.x-g,q=d.y-l,h=.5*L*(n*m- q*p),c[0]+=h*(p+n),c[1]+=h*(m+q),p=n,m=q;d=d.getCurrentRingArea();g=[g,l];g[0]-=k[0];g[1]-=k[1];g[0]*=d;g[1]*=d;c[0]+=g[0];c[1]+=g[1]}b[0]*=1/e;b[1]*=1/e;b[0]+=f[0];b[1]+=f[1];return b};Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})});