define(["exports","./Check-3aa71481","./when-515d5295","./Math-5e38123d"],(function(t,e,n,r){"use strict";function a(t,e,r){this.x=n.e(t,0),this.y=n.e(e,0),this.z=n.e(r,0)}a.fromSpherical=function(t,r){e.n.typeOf.object("spherical",t),n.t(r)||(r=new a);var i=t.clock,o=t.cone,u=n.e(t.magnitude,1),f=u*Math.sin(o);return r.x=f*Math.cos(i),r.y=f*Math.sin(i),r.z=u*Math.cos(o),r},a.fromElements=function(t,e,r,i){return n.t(i)?(i.x=t,i.y=e,i.z=r,i):new a(t,e,r)},a.clone=function(t,e){if(n.t(t))return n.t(e)?(e.x=t.x,e.y=t.y,e.z=t.z,e):new a(t.x,t.y,t.z)},a.fromCartesian4=a.clone,a.packedLength=3,a.pack=function(t,r,a){return e.n.typeOf.object("value",t),e.n.defined("array",r),a=n.e(a,0),r[a++]=t.x,r[a++]=t.y,r[a]=t.z,r},a.unpack=function(t,r,i){return e.n.defined("array",t),r=n.e(r,0),n.t(i)||(i=new a),i.x=t[r++],i.y=t[r++],i.z=t[r],i},a.packArray=function(t,r){e.n.defined("array",t);var i=t.length;n.t(r)?r.length=3*i:r=new Array(3*i);for(var o=0;or.n.EPSILON12);return n.t(f)?(f.x=c*S,f.y=l*E,f.z=s*N,f):new a(c*S,l*E,s*N)}function b(t,e,r){this.longitude=n.e(t,0),this.latitude=n.e(e,0),this.height=n.e(r,0)}b.fromRadians=function(t,r,a,i){return e.n.typeOf.number("longitude",t),e.n.typeOf.number("latitude",r),a=n.e(a,0),n.t(i)?(i.longitude=t,i.latitude=r,i.height=a,i):new b(t,r,a)},b.fromDegrees=function(t,n,a,i){return e.n.typeOf.number("longitude",t),e.n.typeOf.number("latitude",n),t=r.n.toRadians(t),n=r.n.toRadians(n),b.fromRadians(t,n,a,i)};var g=new a,O=new a,z=new a,x=new a(1/6378137,1/6378137,1/6356752.314245179),w=new a(1/6378137,1/6378137,1/6378137),j=new a(1/40680631590769,1/40680631590769,1/40408299984661.445),v=new a(1/40680631590769,1/40680631590769,1/40680631590769),q=r.n.EPSILON1;b.fromCartesian=function(t,e,i){var o=n.t(e)?e.oneOverRadii:w,u=n.t(e)?e.oneOverRadiiSquared:v,f=n.t(e)?e._centerToleranceSquared:q;r.n.equalsEpsilon(r.n.Radius,6356752.314245179,r.n.EPSILON10)&&(o=n.t(e)?e.oneOverRadii:x,u=n.t(e)?e.oneOverRadiiSquared:j);var c=m(t,o,u,f,O);if(n.t(c)){var l=a.multiplyComponents(c,u,g);l=a.normalize(l,l);var s=a.subtract(t,c,z),y=Math.atan2(l.y,l.x),d=Math.asin(l.z),h=r.n.sign(a.dot(s,t))*a.magnitude(s);return n.t(i)?(i.longitude=y,i.latitude=d,i.height=h,i):new b(y,d,h)}},b.toCartesian=function(t,n,r){return e.n.defined("cartographic",t),a.fromRadians(t.longitude,t.latitude,t.height,n,r)},b.sphericalDistance=function(t,n,a,i){if(e.n.defined("longitudeA",t),e.n.defined("longitudeB",a),e.n.defined("latitudeA",n),e.n.defined("latitudeB",i),t===a&&n===i)return 0;var o=r.n.toRadians(n),u=r.n.toRadians(i),f=r.n.toRadians(t),c=r.n.toRadians(a),l=f*f+o*o,s=c*c+u*u,y=(l+s-((f-c)*(f-c)+(o-u)*(o-u)))/(2*Math.sqrt(l)*Math.sqrt(s));return y=r.n.clamp(y,-1,1),Math.acos(y)*r.n.Radius},b.clone=function(t,e){if(n.t(t))return n.t(e)?(e.longitude=t.longitude,e.latitude=t.latitude,e.height=t.height,e):new b(t.longitude,t.latitude,t.height)},b.equals=function(t,e){return t===e||n.t(t)&&n.t(e)&&t.longitude===e.longitude&&t.latitude===e.latitude&&t.height===e.height},b.equalsEpsilon=function(t,r,a){return e.n.typeOf.number("epsilon",a),t===r||n.t(t)&&n.t(r)&&Math.abs(t.longitude-r.longitude)<=a&&Math.abs(t.latitude-r.latitude)<=a&&Math.abs(t.height-r.height)<=a},b.ZERO=Object.freeze(new b(0,0,0)),b.prototype.clone=function(t){return b.clone(this,t)},b.prototype.equals=function(t){return b.equals(this,t)},b.prototype.equalsEpsilon=function(t,e){return b.equalsEpsilon(this,t,e)},b.prototype.toString=function(){return"("+this.longitude+", "+this.latitude+", "+this.height+")"},t.a=a,t.b=m,t.i=b}));