define(["exports","./arrayRemoveDuplicates-74caa2f4","./Cartographic-1d953166","./when-d186add7","./Math-7f5f2992","./PolylinePipeline-cea0bf86","./GeometryAttribute-95780fd1","./FeatureDetection-4281d393"],(function(e,t,r,i,n,o,a,s){"use strict";var h={};function l(e,t){return n.e.equalsEpsilon(e.latitude,t.latitude,n.e.EPSILON10)&&n.e.equalsEpsilon(e.longitude,t.longitude,n.e.EPSILON10)}var g=new r.t$1,u=new r.t$1;var c=new Array(2),m=new Array(2),p={positions:void 0,height:void 0,granularity:void 0,ellipsoid:void 0};function y(e,t){for(var i=new Array(e.length),n=0;n<e.length;n+=3){var o=new r.t(e[n],e[n+1],e[n+2]);s.y.multiplyByPoint(t,o,o),i[n]=o.x,i[n+1]=o.y,i[n+2]=o.z}return i}h.computePositions=function(e,h,v,A,d,f,w){var P=function(e,n,o,a){var s=(n=t.D(n,r.t.equalsEpsilon)).length;if(!(s<2)){var h=i.e(a),c=i.e(o),m=!0,p=new Array(s),y=new Array(s),v=new Array(s),A=n[0];p[0]=A;var d=e.cartesianToCartographic(A,g);c&&(d.height=o[0]),m=m&&0==d.height,y[0]=d.height,v[0]=h?a[0]:0;for(var f=1,w=1;w<s;++w){var P=n[w],F=e.cartesianToCartographic(P,u);c&&(F.height=o[w]),m=m&&0==F.height,l(d,F)?d.height<F.height&&(y[f-1]=F.height):(p[f]=P,y[f]=F.height,v[f]=h?a[w]:0,r.t$1.clone(F,d),++f)}if(!(m||f<2))return p.length=f,y.length=f,v.length=f,{positions:p,topHeights:y,bottomHeights:v}}}(e,h,v,A);if(i.e(P)){var F=a.m.eastNorthUpToFixedFrame(P.positions[0],e,new s.y),b=s.y.inverse(F,new s.y);h=P.positions,v=P.topHeights,A=P.bottomHeights;var C,D,E,x,H=h.length,q=H-2,L=n.e.chordLength(d,e.maximumRadius),N=p;if(N.minDistance=L,N.ellipsoid=e,f){var O,T=0;for(O=0;O<H-1;O++)T+=o.m.numberOfPoints(h[O],h[O+1],L)+1;C=new Float64Array(3*T),D=new Float64Array(3*T),i.e(w)&&(E=new Float64Array(3*T),x=new Float64Array(3*T));var $=c,I=m;N.positions=$,N.height=I;var R=0;for(O=0;O<H-1;O++){$[0]=h[O],$[1]=h[O+1],I[0]=v[O],I[1]=v[O+1];var S=o.m.generateArc(N);C.set(S,R),i.e(w)&&E.set(y(S,b),R),I[0]=A[O],I[1]=A[O+1],D.set(o.m.generateArc(N),R),i.e(w)&&x.set(y(o.m.generateArc(N),b),R),R+=S.length}}else N.positions=h,N.height=v,C=new Float64Array(o.m.generateArc(N)),i.e(w)&&(E=new Float64Array(y(o.m.generateArc(N)))),N.height=A,D=new Float64Array(o.m.generateArc(N)),i.e(w)&&(x=new Float64Array(y(o.m.generateArc(N))));var z={pos:{bottomPositions:D,topPositions:C,numCorners:q}};return i.e(w)&&(z.localPos={bottomPositions:x,topPositions:E,numCorners:q}),z}},e.D=h}));
