define(["./when-cbf8cd21","./Check-35e1a91d","./Math-e66fad2a","./Cartesian2-44433f55","./Matrix3-146a3f23","./Transforms-fc4c03e8","./RuntimeError-f4c64df1","./WebGLConstants-95ceb4e9","./ComponentDatatype-7ee14e67","./GeometryAttribute-dee5e12d","./EncodedCartesian3-86f19ac2","./IntersectionTests-caa0ba1a","./Plane-e04c899a","./WebMercatorProjection-c689ba4a","./arrayRemoveDuplicates-b817241d","./ArcType-2b58731c","./EllipsoidRhumbLine-862a2df4","./EllipsoidGeodesic-7779e55a","./GeographicTilingScheme-835dd561"],function(G,a,Ha,Ba,C,Ga,e,n,ja,Va,Fa,j,i,t,V,F,q,T,r){"use strict";var u=new Ba.Cartesian3,c=new Ba.Cartesian3,p=new Ba.Cartographic,d=new Ba.Cartesian3,h=new Ba.Cartesian3,o=new Ga.BoundingSphere,g=new r.GeographicTilingScheme,m=[new Ba.Cartographic,new Ba.Cartographic,new Ba.Cartographic,new Ba.Cartographic],f=new Ba.Cartesian2,qa={};function w(a){Ba.Cartographic.fromRadians(a.east,a.north,0,m[0]),Ba.Cartographic.fromRadians(a.west,a.north,0,m[1]),Ba.Cartographic.fromRadians(a.east,a.south,0,m[2]),Ba.Cartographic.fromRadians(a.west,a.south,0,m[3]);for(var e=0,n=0,t=0,r=0,i=qa._terrainHeightsMaxLevel,s=0;s<=i;++s){for(var o=!1,l=0;l<4;++l){var u=m[l];if(g.positionToTileXY(u,s,f),0===l)t=f.x,r=f.y;else if(t!==f.x||r!==f.y){o=!0;break}}if(o)break;e=t,n=r}if(0!==s)return{x:e,y:n,level:i<s?i:s-1}}qa.initialize=function(){var a=qa._initPromise;return G.defined(a)?a:(a=Ga.Resource.fetchJson(Ga.buildModuleUrl("Assets/approximateTerrainHeights.json")).then(function(a){qa._terrainHeights=a}),qa._initPromise=a)},qa.getMinimumMaximumHeights=function(a,e){e=G.defaultValue(e,Ba.Ellipsoid.WGS84);var n,t,r,i,s=w(a),o=qa._defaultMinTerrainHeight,l=qa._defaultMaxTerrainHeight;return G.defined(s)&&(n=s.level+"-"+s.x+"-"+s.y,t=qa._terrainHeights[n],G.defined(t)&&(o=t[0],l=t[1]),e.cartographicToCartesian(Ba.Rectangle.northeast(a,p),u),e.cartographicToCartesian(Ba.Rectangle.southwest(a,p),c),Ba.Cartesian3.midpoint(c,u,d),r=e.scaleToGeodeticSurface(d,h),o=G.defined(r)?(i=Ba.Cartesian3.distance(d,r),Math.min(o,-i)):qa._defaultMinTerrainHeight),{minimumTerrainHeight:o=Math.max(qa._defaultMinTerrainHeight,o),maximumTerrainHeight:l}},qa.getBoundingSphere=function(a,e){e=G.defaultValue(e,Ba.Ellipsoid.WGS84);var n,t,r=w(a),i=qa._defaultMaxTerrainHeight;G.defined(r)&&(n=r.level+"-"+r.x+"-"+r.y,t=qa._terrainHeights[n],G.defined(t)&&(i=t[1]));var s=Ga.BoundingSphere.fromRectangle3D(a,e,0);return Ga.BoundingSphere.fromRectangle3D(a,e,i,o),Ga.BoundingSphere.union(s,o,s)},qa._terrainHeightsMaxLevel=6,qa._defaultMaxTerrainHeight=9e3,qa._defaultMinTerrainHeight=-1e5,qa._terrainHeights=void 0,qa._initPromise=void 0,Object.defineProperties(qa,{initialized:{get:function(){return G.defined(qa._terrainHeights)}}});var W=[C.GeographicProjection,t.WebMercatorProjection],s=W.length,Wa=Math.cos(Ha.CesiumMath.toRadians(30)),y=Math.cos(Ha.CesiumMath.toRadians(150)),U=0,Y=1e3;function v(a){var e=(a=G.defaultValue(a,G.defaultValue.EMPTY_OBJECT)).positions;this.width=G.defaultValue(a.width,1),this._positions=e,this.granularity=G.defaultValue(a.granularity,9999),this.loop=G.defaultValue(a.loop,!1),this.arcType=G.defaultValue(a.arcType,F.ArcType.GEODESIC),this._ellipsoid=Ba.Ellipsoid.WGS84,this._projectionIndex=0,this._workerName="createGroundPolylineGeometry",this._scene3DOnly=!1}Object.defineProperties(v.prototype,{packedLength:{get:function(){return 1+3*this._positions.length+1+1+1+Ba.Ellipsoid.packedLength+1+1}}}),v.setProjectionAndEllipsoid=function(a,e){for(var n=0,t=0;t<s;t++)if(e instanceof W[t]){n=t;break}a._projectionIndex=n,a._ellipsoid=e.ellipsoid};var E=new Ba.Cartesian3,M=new Ba.Cartesian3,k=new Ba.Cartesian3;function Z(a,e,n,t,r){var i=X(t,a,0,E),s=X(t,a,n,M),o=X(t,e,0,k),l=Ua(s,i,M),u=Ua(o,i,k);return Ba.Cartesian3.cross(u,l,r),Ba.Cartesian3.normalize(r,r)}var S=new Ba.Cartographic,_=new Ba.Cartesian3,P=new Ba.Cartesian3,O=new Ba.Cartesian3;function Q(a,e,n,t,r,i,s,o,l,u,C){if(0!==r){var c;i===F.ArcType.GEODESIC?c=new T.EllipsoidGeodesic(a,e,s):i===F.ArcType.RHUMB&&(c=new q.EllipsoidRhumbLine(a,e,s));var p=c.surfaceDistance;if(!(p<r))for(var d=Z(a,e,t,s,O),h=Math.ceil(p/r),g=p/h,m=g,f=h-1,w=o.length,y=0;y<f;y++){var v=c.interpolateUsingSurfaceDistance(m,S),E=X(s,v,n,_),M=X(s,v,t,P);Ba.Cartesian3.pack(d,o,w),Ba.Cartesian3.pack(E,l,w),Ba.Cartesian3.pack(M,u,w),C.push(v.latitude),C.push(v.longitude),w+=3,m+=g}}}var l=new Ba.Cartographic;function X(a,e,n,t){return Ba.Cartographic.clone(e,l),l.height=n,Ba.Cartographic.toCartesian(l,a,t)}function Ua(a,e,n){return Ba.Cartesian3.subtract(a,e,n),Ba.Cartesian3.normalize(n,n),n}function A(a,e,n,t){return t=Ua(a,e,t),t=Ba.Cartesian3.cross(t,n,t),t=Ba.Cartesian3.normalize(t,t),t=Ba.Cartesian3.cross(n,t,t)}v.pack=function(a,e,n){var t=G.defaultValue(n,0),r=a._positions,i=r.length;e[t++]=i;for(var s=0;s<i;++s){var o=r[s];Ba.Cartesian3.pack(o,e,t),t+=3}return e[t++]=a.granularity,e[t++]=a.loop?1:0,e[t++]=a.arcType,Ba.Ellipsoid.pack(a._ellipsoid,e,t),t+=Ba.Ellipsoid.packedLength,e[t++]=a._projectionIndex,e[t++]=a._scene3DOnly?1:0,e},v.unpack=function(a,e,n){for(var t=G.defaultValue(e,0),r=a[t++],i=new Array(r),s=0;s<r;s++)i[s]=Ba.Cartesian3.unpack(a,t),t+=3;var o=a[t++],l=1===a[t++],u=a[t++],C=Ba.Ellipsoid.unpack(a,t);t+=Ba.Ellipsoid.packedLength;var c=a[t++],p=1===a[t++];return G.defined(n)||(n=new v({positions:i})),n._positions=i,n.granularity=o,n.loop=l,n.arcType=u,n._ellipsoid=C,n._projectionIndex=c,n._scene3DOnly=p,n};var b=new Ba.Cartesian3,x=new Ba.Cartesian3,I=new Ba.Cartesian3,L=new Ba.Cartesian3;function J(a,e,n,t,r){var i=Ua(n,e,L),s=A(a,e,i,b),o=A(t,e,i,x);if(Ha.CesiumMath.equalsEpsilon(Ba.Cartesian3.dot(s,o),-1,Ha.CesiumMath.EPSILON5))return r=Ba.Cartesian3.cross(i,s,r),r=Ba.Cartesian3.normalize(r,r);r=Ba.Cartesian3.add(o,s,r),r=Ba.Cartesian3.normalize(r,r);var l=Ba.Cartesian3.cross(i,r,I);return Ba.Cartesian3.dot(o,l)<0&&(r=Ba.Cartesian3.negate(r,r)),r}var K=i.Plane.fromPointNormal(Ba.Cartesian3.ZERO,Ba.Cartesian3.UNIT_Y),$=new Ba.Cartesian3,aa=new Ba.Cartesian3,ea=new Ba.Cartesian3,na=new Ba.Cartesian3,ta=new Ba.Cartesian3,ra=new Ba.Cartesian3,ia=new Ba.Cartographic,sa=new Ba.Cartographic,oa=new Ba.Cartographic;v.createGeometry=function(a){var e,n,t,r,i,s=!a._scene3DOnly,o=a.loop,l=a._ellipsoid,u=a.granularity,C=a.arcType,c=new W[a._projectionIndex](l),p=U,d=Y,h=a._positions,g=h.length;2===g&&(o=!1);for(var m,f,w,y=new q.EllipsoidRhumbLine(void 0,void 0,l),v=[h[0]],E=0;E<g-1;E++)n=h[E],t=h[E+1],m=j.IntersectionTests.lineSegmentPlane(n,t,K,ra),!G.defined(m)||Ba.Cartesian3.equalsEpsilon(m,n,Ha.CesiumMath.EPSILON7)||Ba.Cartesian3.equalsEpsilon(m,t,Ha.CesiumMath.EPSILON7)||(a.arcType===F.ArcType.GEODESIC?v.push(Ba.Cartesian3.clone(m)):a.arcType===F.ArcType.RHUMB&&(w=l.cartesianToCartographic(m,ia).longitude,r=l.cartesianToCartographic(n,ia),i=l.cartesianToCartographic(t,sa),y.setEndPoints(r,i),f=y.findIntersectionWithLongitude(w,oa),m=l.cartographicToCartesian(f,ra),!G.defined(m)||Ba.Cartesian3.equalsEpsilon(m,n,Ha.CesiumMath.EPSILON7)||Ba.Cartesian3.equalsEpsilon(m,t,Ha.CesiumMath.EPSILON7)||v.push(Ba.Cartesian3.clone(m)))),v.push(t);o&&(n=h[g-1],t=h[0],m=j.IntersectionTests.lineSegmentPlane(n,t,K,ra),!G.defined(m)||Ba.Cartesian3.equalsEpsilon(m,n,Ha.CesiumMath.EPSILON7)||Ba.Cartesian3.equalsEpsilon(m,t,Ha.CesiumMath.EPSILON7)||(a.arcType===F.ArcType.GEODESIC?v.push(Ba.Cartesian3.clone(m)):a.arcType===F.ArcType.RHUMB&&(w=l.cartesianToCartographic(m,ia).longitude,r=l.cartesianToCartographic(n,ia),i=l.cartesianToCartographic(t,sa),y.setEndPoints(r,i),f=y.findIntersectionWithLongitude(w,oa),m=l.cartographicToCartesian(f,ra),!G.defined(m)||Ba.Cartesian3.equalsEpsilon(m,n,Ha.CesiumMath.EPSILON7)||Ba.Cartesian3.equalsEpsilon(m,t,Ha.CesiumMath.EPSILON7)||v.push(Ba.Cartesian3.clone(m)))));var M=v.length,T=new Array(M);for(E=0;E<M;E++){var k=Ba.Cartographic.fromCartesian(v[E],l);k.height=0,T[E]=k}if(!((M=(T=V.arrayRemoveDuplicates(T,Ba.Cartographic.equalsEpsilon)).length)<2)){var S=[],_=[],P=[],O=[],A=$,b=aa,x=ea,I=na,L=ta,N=T[0],R=T[1];for(A=X(l,T[M-1],p,A),I=X(l,R,p,I),b=X(l,N,p,b),x=X(l,N,d,x),L=o?J(A,b,x,I,L):Z(N,R,d,l,L),Ba.Cartesian3.pack(L,_,0),Ba.Cartesian3.pack(b,P,0),Ba.Cartesian3.pack(x,O,0),S.push(N.latitude),S.push(N.longitude),Q(N,R,p,d,u,C,l,_,P,O,S),E=1;E<M-1;++E){A=Ba.Cartesian3.clone(b,A),b=Ba.Cartesian3.clone(I,b);var D=T[E];X(l,D,d,x),X(l,T[E+1],p,I),J(A,b,x,I,L),e=_.length,Ba.Cartesian3.pack(L,_,e),Ba.Cartesian3.pack(b,P,e),Ba.Cartesian3.pack(x,O,e),S.push(D.latitude),S.push(D.longitude),Q(T[E],T[E+1],p,d,u,C,l,_,P,O,S)}var z,H=T[M-1],B=T[M-2],b=X(l,H,p,b),x=X(l,H,d,x);if(L=o?(z=T[0],J(A=X(l,B,p,A),b,x,I=X(l,z,p,I),L)):Z(B,H,d,l,L),e=_.length,Ba.Cartesian3.pack(L,_,e),Ba.Cartesian3.pack(b,P,e),Ba.Cartesian3.pack(x,O,e),S.push(H.latitude),S.push(H.longitude),o){for(Q(H,N,p,d,u,C,l,_,P,O,S),e=_.length,E=0;E<3;++E)_[e+E]=_[E],P[e+E]=P[E],O[e+E]=O[E];S.push(N.latitude),S.push(N.longitude)}return function(a,e,n,t,r,i,s){var o,l,u,C,c,p,d=e._ellipsoid,h=n.length/3-1,g=8*h,m=4*g,f=36*h,w=new(65535<g?Uint32Array:Uint16Array)(f),y=new Float64Array(3*g),v=new Float32Array(m),E=new Float32Array(m),M=new Float32Array(m),T=new Float32Array(m),k=new Float32Array(m);s&&(u=new Float32Array(m),C=new Float32Array(m),c=new Float32Array(m),p=new Float32Array(2*g));var S=i.length/2,_=0,P=Ja;P.height=0;var O=Ka;O.height=0;var A=$a,b=ae;if(s)for(l=0,o=1;o<S;o++)P.latitude=i[l],P.longitude=i[l+1],O.latitude=i[l+2],O.longitude=i[l+3],A=e.project(P,A),b=e.project(O,b),_+=Ba.Cartesian3.distance(A,b),l+=2;var x=t.length/3;b=Ba.Cartesian3.unpack(t,0,b);var I,L=0;for(l=3,o=1;o<x;o++)A=Ba.Cartesian3.clone(b,A),b=Ba.Cartesian3.unpack(t,l,b),L+=Ba.Cartesian3.distance(A,b),l+=3;l=3;var N=0,R=0,D=0,z=0,H=!1,B=Ba.Cartesian3.unpack(n,0,ne),G=Ba.Cartesian3.unpack(t,0,ae),j=Ba.Cartesian3.unpack(r,0,re);{var V;a&&(V=Ba.Cartesian3.unpack(n,n.length-6,ee),Ya(j,V,B,G)&&(j=Ba.Cartesian3.negate(j,j)))}var F,q,W,U,Y,Z,Q,X=0,J=0,K=0;for(o=0;o<h;o++){var $,aa,ea=Ba.Cartesian3.clone(B,ee),na=Ba.Cartesian3.clone(G,$a),ta=Ba.Cartesian3.clone(j,te);H&&(ta=Ba.Cartesian3.negate(ta,ta)),B=Ba.Cartesian3.unpack(n,l,ne),G=Ba.Cartesian3.unpack(t,l,ae),j=Ba.Cartesian3.unpack(r,l,re),H=Ya(j,ea,B,G),P.latitude=i[N],P.longitude=i[N+1],O.latitude=i[N+2],O.longitude=i[N+3],s&&($=function(a,e){var n=Math.abs(a.longitude),t=Math.abs(e.longitude);{if(Ha.CesiumMath.equalsEpsilon(n,Ha.CesiumMath.PI,Ha.CesiumMath.EPSILON11)){var r=Ha.CesiumMath.sign(e.longitude);return a.longitude=r*(n-Ha.CesiumMath.EPSILON11),1}if(Ha.CesiumMath.equalsEpsilon(t,Ha.CesiumMath.PI,Ha.CesiumMath.EPSILON11)){var i=Ha.CesiumMath.sign(a.longitude);return e.longitude=i*(t-Ha.CesiumMath.EPSILON11),2}}return 0}(P,O),F=e.project(P,ce),(aa=Ua(q=e.project(O,pe),F,Te)).y=Math.abs(aa.y),W=de,U=he,0===$||Ba.Cartesian3.dot(aa,Ba.Cartesian3.UNIT_Y)>Wa?(W=Za(e,P,ta,F,de),U=Za(e,O,j,q,he)):1===$?(U=Za(e,O,j,q,he),W.x=0,W.y=Ha.CesiumMath.sign(P.longitude-Math.abs(O.longitude)),W.z=0):(W=Za(e,P,ta,F,de),U.x=0,U.y=Ha.CesiumMath.sign(P.longitude-O.longitude),U.z=0));var ra=Ba.Cartesian3.distance(na,G),ia=Fa.EncodedCartesian3.fromCartesian(ea,Ee),sa=Ba.Cartesian3.subtract(B,ea,ge),oa=Ba.Cartesian3.normalize(sa,we),la=Ba.Cartesian3.subtract(na,ea,me);la=Ba.Cartesian3.normalize(la,la);var ua=Ba.Cartesian3.cross(oa,la,we);ua=Ba.Cartesian3.normalize(ua,ua);var Ca=Ba.Cartesian3.cross(la,ta,ye);Ca=Ba.Cartesian3.normalize(Ca,Ca);var ca=Ba.Cartesian3.subtract(G,B,fe);ca=Ba.Cartesian3.normalize(ca,ca);var pa=Ba.Cartesian3.cross(j,ca,ve);pa=Ba.Cartesian3.normalize(pa,pa);var da,ha=ra/L,ga=X/L,ma=0,fa=0,wa=0;for(s&&(ma=Ba.Cartesian3.distance(F,q),Y=Fa.EncodedCartesian3.fromCartesian(F,Me),Z=Ba.Cartesian3.subtract(q,F,Te),da=(Q=Ba.Cartesian3.normalize(Z,ke)).x,Q.x=Q.y,Q.y=-da,fa=ma/_,wa=J/_),I=0;I<8;I++){var ya=z+4*I,va=R+2*I,Ea=ya+3,Ma=I<4?1:-1,Ta=2===I||3===I||6===I||7===I?1:-1;Ba.Cartesian3.pack(ia.high,v,ya),v[Ea]=sa.x,Ba.Cartesian3.pack(ia.low,E,ya),E[Ea]=sa.y,Ba.Cartesian3.pack(Ca,M,ya),M[Ea]=sa.z,Ba.Cartesian3.pack(pa,T,ya),T[Ea]=ha*Ma,Ba.Cartesian3.pack(ua,k,ya);var ka=ga*Ta;0===ka&&Ta<0&&(ka=9),k[Ea]=ka,s&&(u[ya]=Y.high.x,u[ya+1]=Y.high.y,u[ya+2]=Y.low.x,u[ya+3]=Y.low.y,c[ya]=-W.y,c[ya+1]=W.x,c[ya+2]=U.y,c[ya+3]=-U.x,C[ya]=Z.x,C[ya+1]=Z.y,C[ya+2]=Q.x,C[ya+3]=Q.y,p[va]=fa*Ma,0===(ka=wa*Ta)&&Ta<0&&(ka=9),p[va+1]=ka)}var Sa=ue,_a=Ce,Pa=oe,Oa=le,Aa=Ba.Rectangle.fromCartographicArray(ie,se),ba=qa.getMinimumMaximumHeights(Aa,d),xa=ba.minimumTerrainHeight,Ia=ba.maximumTerrainHeight;K+=xa,K+=Ia,Qa(ea,na,xa,Ia,Sa,Pa),Qa(B,G,xa,Ia,_a,Oa);var La=Ba.Cartesian3.multiplyByScalar(ua,Ha.CesiumMath.EPSILON5,Se);Ba.Cartesian3.add(Sa,La,Sa),Ba.Cartesian3.add(_a,La,_a),Ba.Cartesian3.add(Pa,La,Pa),Ba.Cartesian3.add(Oa,La,Oa),Xa(Sa,_a),Xa(Pa,Oa),Ba.Cartesian3.pack(Sa,y,D),Ba.Cartesian3.pack(_a,y,D+3),Ba.Cartesian3.pack(Oa,y,D+6),Ba.Cartesian3.pack(Pa,y,D+9),La=Ba.Cartesian3.multiplyByScalar(ua,-2*Ha.CesiumMath.EPSILON5,Se),Ba.Cartesian3.add(Sa,La,Sa),Ba.Cartesian3.add(_a,La,_a),Ba.Cartesian3.add(Pa,La,Pa),Ba.Cartesian3.add(Oa,La,Oa),Xa(Sa,_a),Xa(Pa,Oa),Ba.Cartesian3.pack(Sa,y,D+12),Ba.Cartesian3.pack(_a,y,D+15),Ba.Cartesian3.pack(Oa,y,D+18),Ba.Cartesian3.pack(Pa,y,D+21),N+=2,l+=3,R+=16,D+=24,z+=32,X+=ra,J+=ma}var Na=l=0;for(o=0;o<h;o++){for(I=0;I<Oe;I++)w[l+I]=Pe[I]+Na;Na+=8,l+=Oe}var Ra=_e;Ga.BoundingSphere.fromVertices(n,Ba.Cartesian3.ZERO,3,Ra[0]),Ga.BoundingSphere.fromVertices(t,Ba.Cartesian3.ZERO,3,Ra[1]);var Da=Ga.BoundingSphere.fromBoundingSpheres(Ra);Da.radius+=K/(2*h);var za={position:new Va.GeometryAttribute({componentDatatype:ja.ComponentDatatype.DOUBLE,componentsPerAttribute:3,normalize:!1,values:y}),startHiAndForwardOffsetX:Ae(v),startLoAndForwardOffsetY:Ae(E),startNormalAndForwardOffsetZ:Ae(M),endNormalAndTextureCoordinateNormalizationX:Ae(T),rightNormalAndTextureCoordinateNormalizationY:Ae(k)};s&&(za.startHiLo2D=Ae(u),za.offsetAndRight2D=Ae(C),za.startEndNormals2D=Ae(c),za.texcoordNormalization2D=new Va.GeometryAttribute({componentDatatype:ja.ComponentDatatype.FLOAT,componentsPerAttribute:2,normalize:!1,values:p}));return new Va.Geometry({attributes:za,indices:w,boundingSphere:Da})}(o,c,P,O,_,S,s)}};var N=new Ba.Cartesian3,R=new C.Matrix3,D=new Ga.Quaternion;function Ya(a,e,n,t){var r=Ua(n,e,N),i=Ba.Cartesian3.dot(r,a);if(Wa<i||i<y){var s=Ua(t,n,L),o=i<y?Ha.CesiumMath.PI_OVER_TWO:-Ha.CesiumMath.PI_OVER_TWO,l=Ga.Quaternion.fromAxisAngle(s,o,D),u=C.Matrix3.fromQuaternion(l,R);return C.Matrix3.multiplyByVector(u,a,a),!0}return!1}var z=new Ba.Cartographic,H=new Ba.Cartesian3,B=new Ba.Cartesian3;function Za(a,e,n,t,r){var i=Ba.Cartographic.toCartesian(e,a._ellipsoid,H),s=Ba.Cartesian3.add(i,n,B),o=!1,l=a._ellipsoid,u=l.cartesianToCartographic(s,z);Math.abs(e.longitude-u.longitude)>Ha.CesiumMath.PI_OVER_TWO&&(o=!0,s=Ba.Cartesian3.subtract(i,n,B),u=l.cartesianToCartographic(s,z)),u.height=0;var C=a.project(u,r);return(r=Ba.Cartesian3.subtract(C,t,r)).z=0,r=Ba.Cartesian3.normalize(r,r),o&&Ba.Cartesian3.negate(r,r),r}var la=new Ba.Cartesian3,ua=new Ba.Cartesian3;function Qa(a,e,n,t,r,i){var s=Ba.Cartesian3.subtract(e,a,la);Ba.Cartesian3.normalize(s,s);var o=n-U,l=Ba.Cartesian3.multiplyByScalar(s,o,ua);Ba.Cartesian3.add(a,l,r);var u=t-Y,l=Ba.Cartesian3.multiplyByScalar(s,u,ua);Ba.Cartesian3.add(e,l,i)}var Ca=new Ba.Cartesian3;function Xa(a,e){var n=i.Plane.getPointDistance(K,a),t=i.Plane.getPointDistance(K,e),r=Ca;Ha.CesiumMath.equalsEpsilon(n,0,Ha.CesiumMath.EPSILON2)?(r=Ua(e,a,r),Ba.Cartesian3.multiplyByScalar(r,Ha.CesiumMath.EPSILON2,r),Ba.Cartesian3.add(a,r,a)):Ha.CesiumMath.equalsEpsilon(t,0,Ha.CesiumMath.EPSILON2)&&(r=Ua(a,e,r),Ba.Cartesian3.multiplyByScalar(r,Ha.CesiumMath.EPSILON2,r),Ba.Cartesian3.add(e,r,e))}var Ja=new Ba.Cartographic,Ka=new Ba.Cartographic,$a=new Ba.Cartesian3,ae=new Ba.Cartesian3,ee=new Ba.Cartesian3,ne=new Ba.Cartesian3,te=new Ba.Cartesian3,re=new Ba.Cartesian3,ie=[Ja,Ka],se=new Ba.Rectangle,oe=new Ba.Cartesian3,le=new Ba.Cartesian3,ue=new Ba.Cartesian3,Ce=new Ba.Cartesian3,ce=new Ba.Cartesian3,pe=new Ba.Cartesian3,de=new Ba.Cartesian3,he=new Ba.Cartesian3,ge=new Ba.Cartesian3,me=new Ba.Cartesian3,fe=new Ba.Cartesian3,we=new Ba.Cartesian3,ye=new Ba.Cartesian3,ve=new Ba.Cartesian3,Ee=new Fa.EncodedCartesian3,Me=new Fa.EncodedCartesian3,Te=new Ba.Cartesian3,ke=new Ba.Cartesian3,Se=new Ba.Cartesian3,_e=[new Ga.BoundingSphere,new Ga.BoundingSphere],Pe=[0,2,1,0,3,2,0,7,3,0,4,7,0,5,4,0,1,5,5,7,4,5,6,7,5,2,6,5,1,2,3,6,2,3,7,6],Oe=Pe.length;function Ae(a){return new Va.GeometryAttribute({componentDatatype:ja.ComponentDatatype.FLOAT,componentsPerAttribute:4,normalize:!1,values:a})}return v._projectNormal=Za,function(a,e){return qa.initialize().then(function(){return G.defined(e)&&(a=v.unpack(a,e)),v.createGeometry(a)})}});