Commit 625086b0 authored by p x's avatar p x
Browse files

init

parent 5e9d2300
Pipeline #3100 failed with stages
in 0 seconds
define(["exports","./Transforms-3ac41eb6","./Matrix2-fc7e9822","./RuntimeError-c581ca93","./ComponentDatatype-4a60b8d6","./defaultValue-94c3e563","./GeometryAttribute-a441ff32","./GeometryAttributes-7df9bef6","./GeometryOffsetAttribute-ec11b721","./VertexFormat-e46f29d6"],(function(e,t,n,a,r,o,i,m,s,u){"use strict";const y=new n.Cartesian3;function f(e){e=o.defaultValue(e,o.defaultValue.EMPTY_OBJECT);const t=e.minimum,r=e.maximum;if(a.Check.typeOf.object("min",t),a.Check.typeOf.object("max",r),o.defined(e.offsetAttribute)&&e.offsetAttribute===s.GeometryOffsetAttribute.TOP)throw new a.DeveloperError("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");const i=o.defaultValue(e.vertexFormat,u.VertexFormat.DEFAULT);this._minimum=n.Cartesian3.clone(t),this._maximum=n.Cartesian3.clone(r),this._vertexFormat=i,this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxGeometry"}f.fromDimensions=function(e){e=o.defaultValue(e,o.defaultValue.EMPTY_OBJECT);const t=e.dimensions;a.Check.typeOf.object("dimensions",t),a.Check.typeOf.number.greaterThanOrEquals("dimensions.x",t.x,0),a.Check.typeOf.number.greaterThanOrEquals("dimensions.y",t.y,0),a.Check.typeOf.number.greaterThanOrEquals("dimensions.z",t.z,0);const r=n.Cartesian3.multiplyByScalar(t,.5,new n.Cartesian3);return new f({minimum:n.Cartesian3.negate(r,new n.Cartesian3),maximum:r,vertexFormat:e.vertexFormat,offsetAttribute:e.offsetAttribute})},f.fromAxisAlignedBoundingBox=function(e){return a.Check.typeOf.object("boundingBox",e),new f({minimum:e.minimum,maximum:e.maximum})},f.packedLength=2*n.Cartesian3.packedLength+u.VertexFormat.packedLength+1,f.pack=function(e,t,r){return a.Check.typeOf.object("value",e),a.Check.defined("array",t),r=o.defaultValue(r,0),n.Cartesian3.pack(e._minimum,t,r),n.Cartesian3.pack(e._maximum,t,r+n.Cartesian3.packedLength),u.VertexFormat.pack(e._vertexFormat,t,r+2*n.Cartesian3.packedLength),t[r+2*n.Cartesian3.packedLength+u.VertexFormat.packedLength]=o.defaultValue(e._offsetAttribute,-1),t};const c=new n.Cartesian3,p=new n.Cartesian3,x=new u.VertexFormat,l={minimum:c,maximum:p,vertexFormat:x,offsetAttribute:void 0};let b;f.unpack=function(e,t,r){a.Check.defined("array",e),t=o.defaultValue(t,0);const i=n.Cartesian3.unpack(e,t,c),m=n.Cartesian3.unpack(e,t+n.Cartesian3.packedLength,p),s=u.VertexFormat.unpack(e,t+2*n.Cartesian3.packedLength,x),y=e[t+2*n.Cartesian3.packedLength+u.VertexFormat.packedLength];return o.defined(r)?(r._minimum=n.Cartesian3.clone(i,r._minimum),r._maximum=n.Cartesian3.clone(m,r._maximum),r._vertexFormat=u.VertexFormat.clone(s,r._vertexFormat),r._offsetAttribute=-1===y?void 0:y,r):(l.offsetAttribute=-1===y?void 0:y,new f(l))},f.createGeometry=function(e){const a=e._minimum,u=e._maximum,f=e._vertexFormat;if(n.Cartesian3.equals(a,u))return;const c=new m.GeometryAttributes;let p,x;if(f.position&&(f.st||f.normal||f.tangent||f.bitangent)){if(f.position&&(x=new Float64Array(72),x[0]=a.x,x[1]=a.y,x[2]=u.z,x[3]=u.x,x[4]=a.y,x[5]=u.z,x[6]=u.x,x[7]=u.y,x[8]=u.z,x[9]=a.x,x[10]=u.y,x[11]=u.z,x[12]=a.x,x[13]=a.y,x[14]=a.z,x[15]=u.x,x[16]=a.y,x[17]=a.z,x[18]=u.x,x[19]=u.y,x[20]=a.z,x[21]=a.x,x[22]=u.y,x[23]=a.z,x[24]=u.x,x[25]=a.y,x[26]=a.z,x[27]=u.x,x[28]=u.y,x[29]=a.z,x[30]=u.x,x[31]=u.y,x[32]=u.z,x[33]=u.x,x[34]=a.y,x[35]=u.z,x[36]=a.x,x[37]=a.y,x[38]=a.z,x[39]=a.x,x[40]=u.y,x[41]=a.z,x[42]=a.x,x[43]=u.y,x[44]=u.z,x[45]=a.x,x[46]=a.y,x[47]=u.z,x[48]=a.x,x[49]=u.y,x[50]=a.z,x[51]=u.x,x[52]=u.y,x[53]=a.z,x[54]=u.x,x[55]=u.y,x[56]=u.z,x[57]=a.x,x[58]=u.y,x[59]=u.z,x[60]=a.x,x[61]=a.y,x[62]=a.z,x[63]=u.x,x[64]=a.y,x[65]=a.z,x[66]=u.x,x[67]=a.y,x[68]=u.z,x[69]=a.x,x[70]=a.y,x[71]=u.z,c.position=new i.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:x})),f.normal){const e=new Float32Array(72);e[0]=0,e[1]=0,e[2]=1,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=1,e[9]=0,e[10]=0,e[11]=1,e[12]=0,e[13]=0,e[14]=-1,e[15]=0,e[16]=0,e[17]=-1,e[18]=0,e[19]=0,e[20]=-1,e[21]=0,e[22]=0,e[23]=-1,e[24]=1,e[25]=0,e[26]=0,e[27]=1,e[28]=0,e[29]=0,e[30]=1,e[31]=0,e[32]=0,e[33]=1,e[34]=0,e[35]=0,e[36]=-1,e[37]=0,e[38]=0,e[39]=-1,e[40]=0,e[41]=0,e[42]=-1,e[43]=0,e[44]=0,e[45]=-1,e[46]=0,e[47]=0,e[48]=0,e[49]=1,e[50]=0,e[51]=0,e[52]=1,e[53]=0,e[54]=0,e[55]=1,e[56]=0,e[57]=0,e[58]=1,e[59]=0,e[60]=0,e[61]=-1,e[62]=0,e[63]=0,e[64]=-1,e[65]=0,e[66]=0,e[67]=-1,e[68]=0,e[69]=0,e[70]=-1,e[71]=0,c.normal=new i.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e})}if(f.st){const e=new Float32Array(48);e[0]=0,e[1]=0,e[2]=1,e[3]=0,e[4]=1,e[5]=1,e[6]=0,e[7]=1,e[8]=1,e[9]=0,e[10]=0,e[11]=0,e[12]=0,e[13]=1,e[14]=1,e[15]=1,e[16]=0,e[17]=0,e[18]=1,e[19]=0,e[20]=1,e[21]=1,e[22]=0,e[23]=1,e[24]=1,e[25]=0,e[26]=0,e[27]=0,e[28]=0,e[29]=1,e[30]=1,e[31]=1,e[32]=1,e[33]=0,e[34]=0,e[35]=0,e[36]=0,e[37]=1,e[38]=1,e[39]=1,e[40]=0,e[41]=0,e[42]=1,e[43]=0,e[44]=1,e[45]=1,e[46]=0,e[47]=1,c.st=new i.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:e})}if(f.tangent){const e=new Float32Array(72);e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e[6]=1,e[7]=0,e[8]=0,e[9]=1,e[10]=0,e[11]=0,e[12]=-1,e[13]=0,e[14]=0,e[15]=-1,e[16]=0,e[17]=0,e[18]=-1,e[19]=0,e[20]=0,e[21]=-1,e[22]=0,e[23]=0,e[24]=0,e[25]=1,e[26]=0,e[27]=0,e[28]=1,e[29]=0,e[30]=0,e[31]=1,e[32]=0,e[33]=0,e[34]=1,e[35]=0,e[36]=0,e[37]=-1,e[38]=0,e[39]=0,e[40]=-1,e[41]=0,e[42]=0,e[43]=-1,e[44]=0,e[45]=0,e[46]=-1,e[47]=0,e[48]=-1,e[49]=0,e[50]=0,e[51]=-1,e[52]=0,e[53]=0,e[54]=-1,e[55]=0,e[56]=0,e[57]=-1,e[58]=0,e[59]=0,e[60]=1,e[61]=0,e[62]=0,e[63]=1,e[64]=0,e[65]=0,e[66]=1,e[67]=0,e[68]=0,e[69]=1,e[70]=0,e[71]=0,c.tangent=new i.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e})}if(f.bitangent){const e=new Float32Array(72);e[0]=0,e[1]=1,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=1,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=1,e[14]=0,e[15]=0,e[16]=1,e[17]=0,e[18]=0,e[19]=1,e[20]=0,e[21]=0,e[22]=1,e[23]=0,e[24]=0,e[25]=0,e[26]=1,e[27]=0,e[28]=0,e[29]=1,e[30]=0,e[31]=0,e[32]=1,e[33]=0,e[34]=0,e[35]=1,e[36]=0,e[37]=0,e[38]=1,e[39]=0,e[40]=0,e[41]=1,e[42]=0,e[43]=0,e[44]=1,e[45]=0,e[46]=0,e[47]=1,e[48]=0,e[49]=0,e[50]=1,e[51]=0,e[52]=0,e[53]=1,e[54]=0,e[55]=0,e[56]=1,e[57]=0,e[58]=0,e[59]=1,e[60]=0,e[61]=0,e[62]=1,e[63]=0,e[64]=0,e[65]=1,e[66]=0,e[67]=0,e[68]=1,e[69]=0,e[70]=0,e[71]=1,c.bitangent=new i.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e})}p=new Uint16Array(36),p[0]=0,p[1]=1,p[2]=2,p[3]=0,p[4]=2,p[5]=3,p[6]=6,p[7]=5,p[8]=4,p[9]=7,p[10]=6,p[11]=4,p[12]=8,p[13]=9,p[14]=10,p[15]=8,p[16]=10,p[17]=11,p[18]=14,p[19]=13,p[20]=12,p[21]=15,p[22]=14,p[23]=12,p[24]=18,p[25]=17,p[26]=16,p[27]=19,p[28]=18,p[29]=16,p[30]=20,p[31]=21,p[32]=22,p[33]=20,p[34]=22,p[35]=23}else x=new Float64Array(24),x[0]=a.x,x[1]=a.y,x[2]=a.z,x[3]=u.x,x[4]=a.y,x[5]=a.z,x[6]=u.x,x[7]=u.y,x[8]=a.z,x[9]=a.x,x[10]=u.y,x[11]=a.z,x[12]=a.x,x[13]=a.y,x[14]=u.z,x[15]=u.x,x[16]=a.y,x[17]=u.z,x[18]=u.x,x[19]=u.y,x[20]=u.z,x[21]=a.x,x[22]=u.y,x[23]=u.z,c.position=new i.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:x}),p=new Uint16Array(36),p[0]=4,p[1]=5,p[2]=6,p[3]=4,p[4]=6,p[5]=7,p[6]=1,p[7]=0,p[8]=3,p[9]=1,p[10]=3,p[11]=2,p[12]=1,p[13]=6,p[14]=5,p[15]=1,p[16]=2,p[17]=6,p[18]=2,p[19]=3,p[20]=7,p[21]=2,p[22]=7,p[23]=6,p[24]=3,p[25]=0,p[26]=4,p[27]=3,p[28]=4,p[29]=7,p[30]=0,p[31]=1,p[32]=5,p[33]=0,p[34]=5,p[35]=4;const l=n.Cartesian3.subtract(u,a,y),b=.5*n.Cartesian3.magnitude(l);if(o.defined(e._offsetAttribute)){const t=x.length,n=e._offsetAttribute===s.GeometryOffsetAttribute.NONE?0:1,a=new Uint8Array(t/3).fill(n);c.applyOffset=new i.GeometryAttribute({componentDatatype:r.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:a})}return new i.Geometry({attributes:c,indices:p,primitiveType:i.PrimitiveType.TRIANGLES,boundingSphere:new t.BoundingSphere(n.Cartesian3.ZERO,b),offsetAttribute:e._offsetAttribute})},f.getUnitBox=function(){return o.defined(b)||(b=f.createGeometry(f.fromDimensions({dimensions:new n.Cartesian3(1,1,1),vertexFormat:u.VertexFormat.POSITION_ONLY}))),b},e.BoxGeometry=f}));
\ No newline at end of file
define(["exports","./RuntimeError-c581ca93","./defaultValue-94c3e563","./Transforms-3ac41eb6","./ComponentDatatype-4a60b8d6"],(function(e,r,t,o,f){"use strict";function s(e,r,t){return t<0&&(t+=1),t>1&&(t-=1),6*t<1?e+6*(r-e)*t:2*t<1?r:3*t<2?e+(r-e)*(2/3-t)*6:e}function n(e,r,o,f){this.red=t.defaultValue(e,1),this.green=t.defaultValue(r,1),this.blue=t.defaultValue(o,1),this.alpha=t.defaultValue(f,1)}let l,C,a;n.fromCartesian4=function(e,o){return r.Check.typeOf.object("cartesian",e),t.defined(o)?(o.red=e.x,o.green=e.y,o.blue=e.z,o.alpha=e.w,o):new n(e.x,e.y,e.z,e.w)},n.fromBytes=function(e,r,o,f,s){return e=n.byteToFloat(t.defaultValue(e,255)),r=n.byteToFloat(t.defaultValue(r,255)),o=n.byteToFloat(t.defaultValue(o,255)),f=n.byteToFloat(t.defaultValue(f,255)),t.defined(s)?(s.red=e,s.green=r,s.blue=o,s.alpha=f,s):new n(e,r,o,f)},n.fromAlpha=function(e,o,f){return r.Check.typeOf.object("color",e),r.Check.typeOf.number("alpha",o),t.defined(f)?(f.red=e.red,f.green=e.green,f.blue=e.blue,f.alpha=o,f):new n(e.red,e.green,e.blue,o)},o.FeatureDetection.supportsTypedArrays()&&(l=new ArrayBuffer(4),C=new Uint32Array(l),a=new Uint8Array(l)),n.fromRgba=function(e,r){return C[0]=e,n.fromBytes(a[0],a[1],a[2],a[3],r)},n.fromHsl=function(e,r,o,f,l){e=t.defaultValue(e,0)%1,r=t.defaultValue(r,0),o=t.defaultValue(o,0),f=t.defaultValue(f,1);let C=o,a=o,i=o;if(0!==r){let t;t=o<.5?o*(1+r):o+r-o*r;const f=2*o-t;C=s(f,t,e+1/3),a=s(f,t,e),i=s(f,t,e-1/3)}return t.defined(l)?(l.red=C,l.green=a,l.blue=i,l.alpha=f,l):new n(C,a,i,f)},n.fromRandom=function(e,o){e=t.defaultValue(e,t.defaultValue.EMPTY_OBJECT);let s=e.red;if(!t.defined(s)){const o=t.defaultValue(e.minimumRed,0),n=t.defaultValue(e.maximumRed,1);r.Check.typeOf.number.lessThanOrEquals("minimumRed",o,n),s=o+f.CesiumMath.nextRandomNumber()*(n-o)}let l=e.green;if(!t.defined(l)){const o=t.defaultValue(e.minimumGreen,0),s=t.defaultValue(e.maximumGreen,1);r.Check.typeOf.number.lessThanOrEquals("minimumGreen",o,s),l=o+f.CesiumMath.nextRandomNumber()*(s-o)}let C=e.blue;if(!t.defined(C)){const o=t.defaultValue(e.minimumBlue,0),s=t.defaultValue(e.maximumBlue,1);r.Check.typeOf.number.lessThanOrEquals("minimumBlue",o,s),C=o+f.CesiumMath.nextRandomNumber()*(s-o)}let a=e.alpha;if(!t.defined(a)){const o=t.defaultValue(e.minimumAlpha,0),s=t.defaultValue(e.maximumAlpha,1);r.Check.typeOf.number.lessThanOrEquals("minumumAlpha",o,s),a=o+f.CesiumMath.nextRandomNumber()*(s-o)}return t.defined(o)?(o.red=s,o.green=l,o.blue=C,o.alpha=a,o):new n(s,l,C,a)};const i=/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])?$/i,c=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/i,u=/^rgba?\(\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)(?:\s*,\s*([0-9.]+))?\s*\)$/i,O=/^hsla?\(\s*([0-9.]+)\s*,\s*([0-9.]+%)\s*,\s*([0-9.]+%)(?:\s*,\s*([0-9.]+))?\s*\)$/i;n.fromCssColorString=function(e,o){r.Check.typeOf.string("color",e),t.defined(o)||(o=new n),e=e.replace(/\s/g,"");const f=n[e.toUpperCase()];if(t.defined(f))return n.clone(f,o),o;let s=i.exec(e);return null!==s?(o.red=parseInt(s[1],16)/15,o.green=parseInt(s[2],16)/15,o.blue=parseInt(s[3],16)/15,o.alpha=parseInt(t.defaultValue(s[4],"f"),16)/15,o):(s=c.exec(e),null!==s?(o.red=parseInt(s[1],16)/255,o.green=parseInt(s[2],16)/255,o.blue=parseInt(s[3],16)/255,o.alpha=parseInt(t.defaultValue(s[4],"ff"),16)/255,o):(s=u.exec(e),null!==s?(o.red=parseFloat(s[1])/("%"===s[1].substr(-1)?100:255),o.green=parseFloat(s[2])/("%"===s[2].substr(-1)?100:255),o.blue=parseFloat(s[3])/("%"===s[3].substr(-1)?100:255),o.alpha=parseFloat(t.defaultValue(s[4],"1.0")),o):(s=O.exec(e),null!==s?n.fromHsl(parseFloat(s[1])/360,parseFloat(s[2])/100,parseFloat(s[3])/100,parseFloat(t.defaultValue(s[4],"1.0")),o):(o=void 0,o))))},n.packedLength=4,n.pack=function(e,o,f){return r.Check.typeOf.object("value",e),r.Check.defined("array",o),f=t.defaultValue(f,0),o[f++]=e.red,o[f++]=e.green,o[f++]=e.blue,o[f]=e.alpha,o},n.unpack=function(e,o,f){return r.Check.defined("array",e),o=t.defaultValue(o,0),t.defined(f)||(f=new n),f.red=e[o++],f.green=e[o++],f.blue=e[o++],f.alpha=e[o],f},n.byteToFloat=function(e){return e/255},n.floatToByte=function(e){return 1===e?255:256*e|0},n.clone=function(e,r){if(t.defined(e))return t.defined(r)?(r.red=e.red,r.green=e.green,r.blue=e.blue,r.alpha=e.alpha,r):new n(e.red,e.green,e.blue,e.alpha)},n.equals=function(e,r){return e===r||t.defined(e)&&t.defined(r)&&e.red===r.red&&e.green===r.green&&e.blue===r.blue&&e.alpha===r.alpha},n.equalsArray=function(e,r,t){return e.red===r[t]&&e.green===r[t+1]&&e.blue===r[t+2]&&e.alpha===r[t+3]},n.prototype.clone=function(e){return n.clone(this,e)},n.prototype.equals=function(e){return n.equals(this,e)},n.prototype.equalsEpsilon=function(e,r){return this===e||t.defined(e)&&Math.abs(this.red-e.red)<=r&&Math.abs(this.green-e.green)<=r&&Math.abs(this.blue-e.blue)<=r&&Math.abs(this.alpha-e.alpha)<=r},n.prototype.toString=function(){return`(${this.red}, ${this.green}, ${this.blue}, ${this.alpha})`},n.prototype.toCssColorString=function(){const e=n.floatToByte(this.red),r=n.floatToByte(this.green),t=n.floatToByte(this.blue);return 1===this.alpha?`rgb(${e},${r},${t})`:`rgba(${e},${r},${t},${this.alpha})`},n.prototype.toCssHexString=function(){let e=n.floatToByte(this.red).toString(16);e.length<2&&(e=`0${e}`);let r=n.floatToByte(this.green).toString(16);r.length<2&&(r=`0${r}`);let t=n.floatToByte(this.blue).toString(16);if(t.length<2&&(t=`0${t}`),this.alpha<1){let o=n.floatToByte(this.alpha).toString(16);return o.length<2&&(o=`0${o}`),`#${e}${r}${t}${o}`}return`#${e}${r}${t}`},n.prototype.toBytes=function(e){const r=n.floatToByte(this.red),o=n.floatToByte(this.green),f=n.floatToByte(this.blue),s=n.floatToByte(this.alpha);return t.defined(e)?(e[0]=r,e[1]=o,e[2]=f,e[3]=s,e):[r,o,f,s]},n.prototype.toRgba=function(){return a[0]=n.floatToByte(this.red),a[1]=n.floatToByte(this.green),a[2]=n.floatToByte(this.blue),a[3]=n.floatToByte(this.alpha),C[0]},n.prototype.brighten=function(e,t){return r.Check.typeOf.number("magnitude",e),r.Check.typeOf.number.greaterThanOrEquals("magnitude",e,0),r.Check.typeOf.object("result",t),e=1-e,t.red=1-(1-this.red)*e,t.green=1-(1-this.green)*e,t.blue=1-(1-this.blue)*e,t.alpha=this.alpha,t},n.prototype.darken=function(e,t){return r.Check.typeOf.number("magnitude",e),r.Check.typeOf.number.greaterThanOrEquals("magnitude",e,0),r.Check.typeOf.object("result",t),e=1-e,t.red=this.red*e,t.green=this.green*e,t.blue=this.blue*e,t.alpha=this.alpha,t},n.prototype.withAlpha=function(e,r){return n.fromAlpha(this,e,r)},n.add=function(e,t,o){return r.Check.typeOf.object("left",e),r.Check.typeOf.object("right",t),r.Check.typeOf.object("result",o),o.red=e.red+t.red,o.green=e.green+t.green,o.blue=e.blue+t.blue,o.alpha=e.alpha+t.alpha,o},n.subtract=function(e,t,o){return r.Check.typeOf.object("left",e),r.Check.typeOf.object("right",t),r.Check.typeOf.object("result",o),o.red=e.red-t.red,o.green=e.green-t.green,o.blue=e.blue-t.blue,o.alpha=e.alpha-t.alpha,o},n.multiply=function(e,t,o){return r.Check.typeOf.object("left",e),r.Check.typeOf.object("right",t),r.Check.typeOf.object("result",o),o.red=e.red*t.red,o.green=e.green*t.green,o.blue=e.blue*t.blue,o.alpha=e.alpha*t.alpha,o},n.divide=function(e,t,o){return r.Check.typeOf.object("left",e),r.Check.typeOf.object("right",t),r.Check.typeOf.object("result",o),o.red=e.red/t.red,o.green=e.green/t.green,o.blue=e.blue/t.blue,o.alpha=e.alpha/t.alpha,o},n.mod=function(e,t,o){return r.Check.typeOf.object("left",e),r.Check.typeOf.object("right",t),r.Check.typeOf.object("result",o),o.red=e.red%t.red,o.green=e.green%t.green,o.blue=e.blue%t.blue,o.alpha=e.alpha%t.alpha,o},n.lerp=function(e,t,o,s){return r.Check.typeOf.object("start",e),r.Check.typeOf.object("end",t),r.Check.typeOf.number("t",o),r.Check.typeOf.object("result",s),s.red=f.CesiumMath.lerp(e.red,t.red,o),s.green=f.CesiumMath.lerp(e.green,t.green,o),s.blue=f.CesiumMath.lerp(e.blue,t.blue,o),s.alpha=f.CesiumMath.lerp(e.alpha,t.alpha,o),s},n.multiplyByScalar=function(e,t,o){return r.Check.typeOf.object("color",e),r.Check.typeOf.number("scalar",t),r.Check.typeOf.object("result",o),o.red=e.red*t,o.green=e.green*t,o.blue=e.blue*t,o.alpha=e.alpha*t,o},n.divideByScalar=function(e,t,o){return r.Check.typeOf.object("color",e),r.Check.typeOf.number("scalar",t),r.Check.typeOf.object("result",o),o.red=e.red/t,o.green=e.green/t,o.blue=e.blue/t,o.alpha=e.alpha/t,o},n.ALICEBLUE=Object.freeze(n.fromCssColorString("#F0F8FF")),n.ANTIQUEWHITE=Object.freeze(n.fromCssColorString("#FAEBD7")),n.AQUA=Object.freeze(n.fromCssColorString("#00FFFF")),n.AQUAMARINE=Object.freeze(n.fromCssColorString("#7FFFD4")),n.AZURE=Object.freeze(n.fromCssColorString("#F0FFFF")),n.BEIGE=Object.freeze(n.fromCssColorString("#F5F5DC")),n.BISQUE=Object.freeze(n.fromCssColorString("#FFE4C4")),n.BLACK=Object.freeze(n.fromCssColorString("#000000")),n.BLANCHEDALMOND=Object.freeze(n.fromCssColorString("#FFEBCD")),n.BLUE=Object.freeze(n.fromCssColorString("#0000FF")),n.BLUEVIOLET=Object.freeze(n.fromCssColorString("#8A2BE2")),n.BROWN=Object.freeze(n.fromCssColorString("#A52A2A")),n.BURLYWOOD=Object.freeze(n.fromCssColorString("#DEB887")),n.CADETBLUE=Object.freeze(n.fromCssColorString("#5F9EA0")),n.CHARTREUSE=Object.freeze(n.fromCssColorString("#7FFF00")),n.CHOCOLATE=Object.freeze(n.fromCssColorString("#D2691E")),n.CORAL=Object.freeze(n.fromCssColorString("#FF7F50")),n.CORNFLOWERBLUE=Object.freeze(n.fromCssColorString("#6495ED")),n.CORNSILK=Object.freeze(n.fromCssColorString("#FFF8DC")),n.CRIMSON=Object.freeze(n.fromCssColorString("#DC143C")),n.CYAN=Object.freeze(n.fromCssColorString("#00FFFF")),n.DARKBLUE=Object.freeze(n.fromCssColorString("#00008B")),n.DARKCYAN=Object.freeze(n.fromCssColorString("#008B8B")),n.DARKGOLDENROD=Object.freeze(n.fromCssColorString("#B8860B")),n.DARKGRAY=Object.freeze(n.fromCssColorString("#A9A9A9")),n.DARKGREEN=Object.freeze(n.fromCssColorString("#006400")),n.DARKGREY=n.DARKGRAY,n.DARKKHAKI=Object.freeze(n.fromCssColorString("#BDB76B")),n.DARKMAGENTA=Object.freeze(n.fromCssColorString("#8B008B")),n.DARKOLIVEGREEN=Object.freeze(n.fromCssColorString("#556B2F")),n.DARKORANGE=Object.freeze(n.fromCssColorString("#FF8C00")),n.DARKORCHID=Object.freeze(n.fromCssColorString("#9932CC")),n.DARKRED=Object.freeze(n.fromCssColorString("#8B0000")),n.DARKSALMON=Object.freeze(n.fromCssColorString("#E9967A")),n.DARKSEAGREEN=Object.freeze(n.fromCssColorString("#8FBC8F")),n.DARKSLATEBLUE=Object.freeze(n.fromCssColorString("#483D8B")),n.DARKSLATEGRAY=Object.freeze(n.fromCssColorString("#2F4F4F")),n.DARKSLATEGREY=n.DARKSLATEGRAY,n.DARKTURQUOISE=Object.freeze(n.fromCssColorString("#00CED1")),n.DARKVIOLET=Object.freeze(n.fromCssColorString("#9400D3")),n.DEEPPINK=Object.freeze(n.fromCssColorString("#FF1493")),n.DEEPSKYBLUE=Object.freeze(n.fromCssColorString("#00BFFF")),n.DIMGRAY=Object.freeze(n.fromCssColorString("#696969")),n.DIMGREY=n.DIMGRAY,n.DODGERBLUE=Object.freeze(n.fromCssColorString("#1E90FF")),n.FIREBRICK=Object.freeze(n.fromCssColorString("#B22222")),n.FLORALWHITE=Object.freeze(n.fromCssColorString("#FFFAF0")),n.FORESTGREEN=Object.freeze(n.fromCssColorString("#228B22")),n.FUCHSIA=Object.freeze(n.fromCssColorString("#FF00FF")),n.GAINSBORO=Object.freeze(n.fromCssColorString("#DCDCDC")),n.GHOSTWHITE=Object.freeze(n.fromCssColorString("#F8F8FF")),n.GOLD=Object.freeze(n.fromCssColorString("#FFD700")),n.GOLDENROD=Object.freeze(n.fromCssColorString("#DAA520")),n.GRAY=Object.freeze(n.fromCssColorString("#808080")),n.GREEN=Object.freeze(n.fromCssColorString("#008000")),n.GREENYELLOW=Object.freeze(n.fromCssColorString("#ADFF2F")),n.GREY=n.GRAY,n.HONEYDEW=Object.freeze(n.fromCssColorString("#F0FFF0")),n.HOTPINK=Object.freeze(n.fromCssColorString("#FF69B4")),n.INDIANRED=Object.freeze(n.fromCssColorString("#CD5C5C")),n.INDIGO=Object.freeze(n.fromCssColorString("#4B0082")),n.IVORY=Object.freeze(n.fromCssColorString("#FFFFF0")),n.KHAKI=Object.freeze(n.fromCssColorString("#F0E68C")),n.LAVENDER=Object.freeze(n.fromCssColorString("#E6E6FA")),n.LAVENDAR_BLUSH=Object.freeze(n.fromCssColorString("#FFF0F5")),n.LAWNGREEN=Object.freeze(n.fromCssColorString("#7CFC00")),n.LEMONCHIFFON=Object.freeze(n.fromCssColorString("#FFFACD")),n.LIGHTBLUE=Object.freeze(n.fromCssColorString("#ADD8E6")),n.LIGHTCORAL=Object.freeze(n.fromCssColorString("#F08080")),n.LIGHTCYAN=Object.freeze(n.fromCssColorString("#E0FFFF")),n.LIGHTGOLDENRODYELLOW=Object.freeze(n.fromCssColorString("#FAFAD2")),n.LIGHTGRAY=Object.freeze(n.fromCssColorString("#D3D3D3")),n.LIGHTGREEN=Object.freeze(n.fromCssColorString("#90EE90")),n.LIGHTGREY=n.LIGHTGRAY,n.LIGHTPINK=Object.freeze(n.fromCssColorString("#FFB6C1")),n.LIGHTSEAGREEN=Object.freeze(n.fromCssColorString("#20B2AA")),n.LIGHTSKYBLUE=Object.freeze(n.fromCssColorString("#87CEFA")),n.LIGHTSLATEGRAY=Object.freeze(n.fromCssColorString("#778899")),n.LIGHTSLATEGREY=n.LIGHTSLATEGRAY,n.LIGHTSTEELBLUE=Object.freeze(n.fromCssColorString("#B0C4DE")),n.LIGHTYELLOW=Object.freeze(n.fromCssColorString("#FFFFE0")),n.LIME=Object.freeze(n.fromCssColorString("#00FF00")),n.LIMEGREEN=Object.freeze(n.fromCssColorString("#32CD32")),n.LINEN=Object.freeze(n.fromCssColorString("#FAF0E6")),n.MAGENTA=Object.freeze(n.fromCssColorString("#FF00FF")),n.MAROON=Object.freeze(n.fromCssColorString("#800000")),n.MEDIUMAQUAMARINE=Object.freeze(n.fromCssColorString("#66CDAA")),n.MEDIUMBLUE=Object.freeze(n.fromCssColorString("#0000CD")),n.MEDIUMORCHID=Object.freeze(n.fromCssColorString("#BA55D3")),n.MEDIUMPURPLE=Object.freeze(n.fromCssColorString("#9370DB")),n.MEDIUMSEAGREEN=Object.freeze(n.fromCssColorString("#3CB371")),n.MEDIUMSLATEBLUE=Object.freeze(n.fromCssColorString("#7B68EE")),n.MEDIUMSPRINGGREEN=Object.freeze(n.fromCssColorString("#00FA9A")),n.MEDIUMTURQUOISE=Object.freeze(n.fromCssColorString("#48D1CC")),n.MEDIUMVIOLETRED=Object.freeze(n.fromCssColorString("#C71585")),n.MIDNIGHTBLUE=Object.freeze(n.fromCssColorString("#191970")),n.MINTCREAM=Object.freeze(n.fromCssColorString("#F5FFFA")),n.MISTYROSE=Object.freeze(n.fromCssColorString("#FFE4E1")),n.MOCCASIN=Object.freeze(n.fromCssColorString("#FFE4B5")),n.NAVAJOWHITE=Object.freeze(n.fromCssColorString("#FFDEAD")),n.NAVY=Object.freeze(n.fromCssColorString("#000080")),n.OLDLACE=Object.freeze(n.fromCssColorString("#FDF5E6")),n.OLIVE=Object.freeze(n.fromCssColorString("#808000")),n.OLIVEDRAB=Object.freeze(n.fromCssColorString("#6B8E23")),n.ORANGE=Object.freeze(n.fromCssColorString("#FFA500")),n.ORANGERED=Object.freeze(n.fromCssColorString("#FF4500")),n.ORCHID=Object.freeze(n.fromCssColorString("#DA70D6")),n.PALEGOLDENROD=Object.freeze(n.fromCssColorString("#EEE8AA")),n.PALEGREEN=Object.freeze(n.fromCssColorString("#98FB98")),n.PALETURQUOISE=Object.freeze(n.fromCssColorString("#AFEEEE")),n.PALEVIOLETRED=Object.freeze(n.fromCssColorString("#DB7093")),n.PAPAYAWHIP=Object.freeze(n.fromCssColorString("#FFEFD5")),n.PEACHPUFF=Object.freeze(n.fromCssColorString("#FFDAB9")),n.PERU=Object.freeze(n.fromCssColorString("#CD853F")),n.PINK=Object.freeze(n.fromCssColorString("#FFC0CB")),n.PLUM=Object.freeze(n.fromCssColorString("#DDA0DD")),n.POWDERBLUE=Object.freeze(n.fromCssColorString("#B0E0E6")),n.PURPLE=Object.freeze(n.fromCssColorString("#800080")),n.RED=Object.freeze(n.fromCssColorString("#FF0000")),n.ROSYBROWN=Object.freeze(n.fromCssColorString("#BC8F8F")),n.ROYALBLUE=Object.freeze(n.fromCssColorString("#4169E1")),n.SADDLEBROWN=Object.freeze(n.fromCssColorString("#8B4513")),n.SALMON=Object.freeze(n.fromCssColorString("#FA8072")),n.SANDYBROWN=Object.freeze(n.fromCssColorString("#F4A460")),n.SEAGREEN=Object.freeze(n.fromCssColorString("#2E8B57")),n.SEASHELL=Object.freeze(n.fromCssColorString("#FFF5EE")),n.SIENNA=Object.freeze(n.fromCssColorString("#A0522D")),n.SILVER=Object.freeze(n.fromCssColorString("#C0C0C0")),n.SKYBLUE=Object.freeze(n.fromCssColorString("#87CEEB")),n.SLATEBLUE=Object.freeze(n.fromCssColorString("#6A5ACD")),n.SLATEGRAY=Object.freeze(n.fromCssColorString("#708090")),n.SLATEGREY=n.SLATEGRAY,n.SNOW=Object.freeze(n.fromCssColorString("#FFFAFA")),n.SPRINGGREEN=Object.freeze(n.fromCssColorString("#00FF7F")),n.STEELBLUE=Object.freeze(n.fromCssColorString("#4682B4")),n.TAN=Object.freeze(n.fromCssColorString("#D2B48C")),n.TEAL=Object.freeze(n.fromCssColorString("#008080")),n.THISTLE=Object.freeze(n.fromCssColorString("#D8BFD8")),n.TOMATO=Object.freeze(n.fromCssColorString("#FF6347")),n.TURQUOISE=Object.freeze(n.fromCssColorString("#40E0D0")),n.VIOLET=Object.freeze(n.fromCssColorString("#EE82EE")),n.WHEAT=Object.freeze(n.fromCssColorString("#F5DEB3")),n.WHITE=Object.freeze(n.fromCssColorString("#FFFFFF")),n.WHITESMOKE=Object.freeze(n.fromCssColorString("#F5F5F5")),n.YELLOW=Object.freeze(n.fromCssColorString("#FFFF00")),n.YELLOWGREEN=Object.freeze(n.fromCssColorString("#9ACD32")),n.TRANSPARENT=Object.freeze(new n(0,0,0,0)),e.Color=n}));
\ No newline at end of file
define(["exports","./RuntimeError-c581ca93","./defaultValue-94c3e563","./WebGLConstants-7dccdc96"],(function(e,r,t,n){"use strict";var i=function(e){void 0==e&&(e=(new Date).getTime()),this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,e.constructor==Array?this.init_by_array(e,e.length):this.init_seed(e)};i.prototype.init_seed=function(e){for(this.mt[0]=e>>>0,this.mti=1;this.mti<this.N;this.mti++){e=this.mt[this.mti-1]^this.mt[this.mti-1]>>>30;this.mt[this.mti]=(1812433253*((4294901760&e)>>>16)<<16)+1812433253*(65535&e)+this.mti,this.mt[this.mti]>>>=0}},i.prototype.init_by_array=function(e,r){var t,n,i;for(this.init_seed(19650218),t=1,n=0,i=this.N>r?this.N:r;i;i--){var o=this.mt[t-1]^this.mt[t-1]>>>30;this.mt[t]=(this.mt[t]^(1664525*((4294901760&o)>>>16)<<16)+1664525*(65535&o))+e[n]+n,this.mt[t]>>>=0,t++,n++,t>=this.N&&(this.mt[0]=this.mt[this.N-1],t=1),n>=r&&(n=0)}for(i=this.N-1;i;i--){o=this.mt[t-1]^this.mt[t-1]>>>30;this.mt[t]=(this.mt[t]^(1566083941*((4294901760&o)>>>16)<<16)+1566083941*(65535&o))-t,this.mt[t]>>>=0,t++,t>=this.N&&(this.mt[0]=this.mt[this.N-1],t=1)}this.mt[0]=2147483648},i.prototype.random_int=function(){var e,r=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var t;for(this.mti==this.N+1&&this.init_seed(5489),t=0;t<this.N-this.M;t++)e=this.mt[t]&this.UPPER_MASK|this.mt[t+1]&this.LOWER_MASK,this.mt[t]=this.mt[t+this.M]^e>>>1^r[1&e];for(;t<this.N-1;t++)e=this.mt[t]&this.UPPER_MASK|this.mt[t+1]&this.LOWER_MASK,this.mt[t]=this.mt[t+(this.M-this.N)]^e>>>1^r[1&e];e=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^e>>>1^r[1&e],this.mti=0}return e=this.mt[this.mti++],e^=e>>>11,e^=e<<7&2636928640,e^=e<<15&4022730752,e^=e>>>18,e>>>0},i.prototype.random_int31=function(){return this.random_int()>>>1},i.prototype.random_incl=function(){return this.random_int()*(1/4294967295)},i.prototype.random=function(){return this.random_int()*(1/4294967296)},i.prototype.random_excl=function(){return(this.random_int()+.5)*(1/4294967296)},i.prototype.random_long=function(){var e=this.random_int()>>>5,r=this.random_int()>>>6;return(67108864*e+r)*(1/9007199254740992)};var o=i;const a={EPSILON1:.1,EPSILON2:.01,EPSILON3:.001,EPSILON4:1e-4,EPSILON5:1e-5,EPSILON6:1e-6,EPSILON7:1e-7,EPSILON8:1e-8,EPSILON9:1e-9,EPSILON10:1e-10,EPSILON11:1e-11,EPSILON12:1e-12,EPSILON13:1e-13,EPSILON14:1e-14,EPSILON15:1e-15,EPSILON16:1e-16,EPSILON17:1e-17,EPSILON18:1e-18,EPSILON19:1e-19,EPSILON20:1e-20,EPSILON21:1e-21,GRAVITATIONALPARAMETER:3986004418e5,SOLAR_RADIUS:6955e5,LUNAR_RADIUS:1737400,SIXTY_FOUR_KILOBYTES:65536,FOUR_GIGABYTES:4294967296};a.sign=t.defaultValue(Math.sign,(function(e){return e=+e,0===e||e!==e?e:e>0?1:-1})),a.signNotZero=function(e){return e<0?-1:1},a.toSNorm=function(e,r){return r=t.defaultValue(r,255),Math.round((.5*a.clamp(e,-1,1)+.5)*r)},a.fromSNorm=function(e,r){return r=t.defaultValue(r,255),a.clamp(e,0,r)/r*2-1},a.normalize=function(e,r,t){return t=Math.max(t-r,0),0===t?0:a.clamp((e-r)/t,0,1)},a.sinh=t.defaultValue(Math.sinh,(function(e){return(Math.exp(e)-Math.exp(-e))/2})),a.cosh=t.defaultValue(Math.cosh,(function(e){return(Math.exp(e)+Math.exp(-e))/2})),a.lerp=function(e,r,t){return(1-t)*e+t*r},a.PI=Math.PI,a.ONE_OVER_PI=1/Math.PI,a.PI_OVER_TWO=Math.PI/2,a.PI_OVER_THREE=Math.PI/3,a.PI_OVER_FOUR=Math.PI/4,a.PI_OVER_SIX=Math.PI/6,a.THREE_PI_OVER_TWO=3*Math.PI/2,a.TWO_PI=2*Math.PI,a.ONE_OVER_TWO_PI=1/(2*Math.PI),a.RADIANS_PER_DEGREE=Math.PI/180,a.DEGREES_PER_RADIAN=180/Math.PI,a.RADIANS_PER_ARCSECOND=a.RADIANS_PER_DEGREE/3600,a.toRadians=function(e){if(!t.defined(e))throw new r.DeveloperError("degrees is required.");return e*a.RADIANS_PER_DEGREE},a.toDegrees=function(e){if(!t.defined(e))throw new r.DeveloperError("radians is required.");return e*a.DEGREES_PER_RADIAN},a.convertLongitudeRange=function(e){if(!t.defined(e))throw new r.DeveloperError("angle is required.");const n=a.TWO_PI,i=e-Math.floor(e/n)*n;return i<-Math.PI?i+n:i>=Math.PI?i-n:i},a.clampToLatitudeRange=function(e){if(!t.defined(e))throw new r.DeveloperError("angle is required.");return a.clamp(e,-1*a.PI_OVER_TWO,a.PI_OVER_TWO)},a.negativePiToPi=function(e){if(!t.defined(e))throw new r.DeveloperError("angle is required.");return e>=-a.PI&&e<=a.PI?e:a.zeroToTwoPi(e+a.PI)-a.PI},a.zeroToTwoPi=function(e){if(!t.defined(e))throw new r.DeveloperError("angle is required.");if(e>=0&&e<=a.TWO_PI)return e;const n=a.mod(e,a.TWO_PI);return Math.abs(n)<a.EPSILON14&&Math.abs(e)>a.EPSILON14?a.TWO_PI:n},a.mod=function(e,n){if(!t.defined(e))throw new r.DeveloperError("m is required.");if(!t.defined(n))throw new r.DeveloperError("n is required.");if(0===n)throw new r.DeveloperError("divisor cannot be 0.");return a.sign(e)===a.sign(n)&&Math.abs(e)<Math.abs(n)?e:(e%n+n)%n},a.equalsEpsilon=function(e,n,i,o){if(!t.defined(e))throw new r.DeveloperError("left is required.");if(!t.defined(n))throw new r.DeveloperError("right is required.");i=t.defaultValue(i,0),o=t.defaultValue(o,i);const a=Math.abs(e-n);return a<=o||a<=i*Math.max(Math.abs(e),Math.abs(n))},a.lessThan=function(e,n,i){if(!t.defined(e))throw new r.DeveloperError("first is required.");if(!t.defined(n))throw new r.DeveloperError("second is required.");if(!t.defined(i))throw new r.DeveloperError("absoluteEpsilon is required.");return e-n<-i},a.lessThanOrEquals=function(e,n,i){if(!t.defined(e))throw new r.DeveloperError("first is required.");if(!t.defined(n))throw new r.DeveloperError("second is required.");if(!t.defined(i))throw new r.DeveloperError("absoluteEpsilon is required.");return e-n<i},a.greaterThan=function(e,n,i){if(!t.defined(e))throw new r.DeveloperError("first is required.");if(!t.defined(n))throw new r.DeveloperError("second is required.");if(!t.defined(i))throw new r.DeveloperError("absoluteEpsilon is required.");return e-n>i},a.greaterThanOrEquals=function(e,n,i){if(!t.defined(e))throw new r.DeveloperError("first is required.");if(!t.defined(n))throw new r.DeveloperError("second is required.");if(!t.defined(i))throw new r.DeveloperError("absoluteEpsilon is required.");return e-n>-i};const s=[1];a.factorial=function(e){if("number"!==typeof e||e<0)throw new r.DeveloperError("A number greater than or equal to 0 is required.");const t=s.length;if(e>=t){let r=s[t-1];for(let n=t;n<=e;n++){const e=r*n;s.push(e),r=e}}return s[e]},a.incrementWrap=function(e,n,i){if(i=t.defaultValue(i,0),!t.defined(e))throw new r.DeveloperError("n is required.");if(n<=i)throw new r.DeveloperError("maximumValue must be greater than minimumValue.");return++e,e>n&&(e=i),e},a.isPowerOfTwo=function(e){if("number"!==typeof e||e<0||e>4294967295)throw new r.DeveloperError("A number between 0 and (2^32)-1 is required.");return 0!==e&&0===(e&e-1)},a.nextPowerOfTwo=function(e){if("number"!==typeof e||e<0||e>2147483648)throw new r.DeveloperError("A number between 0 and 2^31 is required.");return--e,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e,e},a.previousPowerOfTwo=function(e){if("number"!==typeof e||e<0||e>4294967295)throw new r.DeveloperError("A number between 0 and (2^32)-1 is required.");return e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,e|=e>>32,e=(e>>>0)-(e>>>1),e},a.clamp=function(e,t,n){return r.Check.typeOf.number("value",e),r.Check.typeOf.number("min",t),r.Check.typeOf.number("max",n),e<t?t:e>n?n:e};let u=new o;a.setRandomNumberSeed=function(e){if(!t.defined(e))throw new r.DeveloperError("seed is required.");u=new o(e)},a.nextRandomNumber=function(){return u.random()},a.randomBetween=function(e,r){return a.nextRandomNumber()*(r-e)+e},a.acosClamped=function(e){if(!t.defined(e))throw new r.DeveloperError("value is required.");return Math.acos(a.clamp(e,-1,1))},a.asinClamped=function(e){if(!t.defined(e))throw new r.DeveloperError("value is required.");return Math.asin(a.clamp(e,-1,1))},a.chordLength=function(e,n){if(!t.defined(e))throw new r.DeveloperError("angle is required.");if(!t.defined(n))throw new r.DeveloperError("radius is required.");return 2*n*Math.sin(.5*e)},a.logBase=function(e,n){if(!t.defined(e))throw new r.DeveloperError("number is required.");if(!t.defined(n))throw new r.DeveloperError("base is required.");return Math.log(e)/Math.log(n)},a.cbrt=t.defaultValue(Math.cbrt,(function(e){const r=Math.pow(Math.abs(e),1/3);return e<0?-r:r})),a.log2=t.defaultValue(Math.log2,(function(e){return Math.log(e)*Math.LOG2E})),a.fog=function(e,r){const t=e*r;return 1-Math.exp(-t*t)},a.fastApproximateAtan=function(e){return r.Check.typeOf.number("x",e),e*(-.1784*Math.abs(e)-.0663*e*e+1.0301)},a.fastApproximateAtan2=function(e,t){let n;r.Check.typeOf.number("x",e),r.Check.typeOf.number("y",t);let i=Math.abs(e);n=Math.abs(t);const o=Math.max(i,n);n=Math.min(i,n);const s=n/o;if(isNaN(s))throw new r.DeveloperError("either x or y must be nonzero");return i=a.fastApproximateAtan(s),i=Math.abs(t)>Math.abs(e)?a.PI_OVER_TWO-i:i,i=e<0?a.PI-i:i,i=t<0?-i:i,i};const E={BYTE:n.WebGLConstants.BYTE,UNSIGNED_BYTE:n.WebGLConstants.UNSIGNED_BYTE,SHORT:n.WebGLConstants.SHORT,UNSIGNED_SHORT:n.WebGLConstants.UNSIGNED_SHORT,INT:n.WebGLConstants.INT,UNSIGNED_INT:n.WebGLConstants.UNSIGNED_INT,FLOAT:n.WebGLConstants.FLOAT,DOUBLE:n.WebGLConstants.DOUBLE,getSizeInBytes:function(e){if(!t.defined(e))throw new r.DeveloperError("value is required.");switch(e){case E.BYTE:return Int8Array.BYTES_PER_ELEMENT;case E.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case E.SHORT:return Int16Array.BYTES_PER_ELEMENT;case E.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case E.INT:return Int32Array.BYTES_PER_ELEMENT;case E.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case E.FLOAT:return Float32Array.BYTES_PER_ELEMENT;case E.DOUBLE:return Float64Array.BYTES_PER_ELEMENT;default:throw new r.DeveloperError("componentDatatype is not a valid value.")}},fromTypedArray:function(e){if(e instanceof Int8Array)return E.BYTE;if(e instanceof Uint8Array)return E.UNSIGNED_BYTE;if(e instanceof Int16Array)return E.SHORT;if(e instanceof Uint16Array)return E.UNSIGNED_SHORT;if(e instanceof Int32Array)return E.INT;if(e instanceof Uint32Array)return E.UNSIGNED_INT;if(e instanceof Float32Array)return E.FLOAT;if(e instanceof Float64Array)return E.DOUBLE;throw new r.DeveloperError("array must be an Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, or Float64Array.")},validate:function(e){return t.defined(e)&&(e===E.BYTE||e===E.UNSIGNED_BYTE||e===E.SHORT||e===E.UNSIGNED_SHORT||e===E.INT||e===E.UNSIGNED_INT||e===E.FLOAT||e===E.DOUBLE)},createTypedArray:function(e,n){if(!t.defined(e))throw new r.DeveloperError("componentDatatype is required.");if(!t.defined(n))throw new r.DeveloperError("valuesOrLength is required.");switch(e){case E.BYTE:return new Int8Array(n);case E.UNSIGNED_BYTE:return new Uint8Array(n);case E.SHORT:return new Int16Array(n);case E.UNSIGNED_SHORT:return new Uint16Array(n);case E.INT:return new Int32Array(n);case E.UNSIGNED_INT:return new Uint32Array(n);case E.FLOAT:return new Float32Array(n);case E.DOUBLE:return new Float64Array(n);default:throw new r.DeveloperError("componentDatatype is not a valid value.")}},createArrayBufferView:function(e,n,i,o){if(!t.defined(e))throw new r.DeveloperError("componentDatatype is required.");if(!t.defined(n))throw new r.DeveloperError("buffer is required.");switch(i=t.defaultValue(i,0),o=t.defaultValue(o,(n.byteLength-i)/E.getSizeInBytes(e)),e){case E.BYTE:return new Int8Array(n,i,o);case E.UNSIGNED_BYTE:return new Uint8Array(n,i,o);case E.SHORT:return new Int16Array(n,i,o);case E.UNSIGNED_SHORT:return new Uint16Array(n,i,o);case E.INT:return new Int32Array(n,i,o);case E.UNSIGNED_INT:return new Uint32Array(n,i,o);case E.FLOAT:return new Float32Array(n,i,o);case E.DOUBLE:return new Float64Array(n,i,o);default:throw new r.DeveloperError("componentDatatype is not a valid value.")}},fromName:function(e){switch(e){case"BYTE":return E.BYTE;case"UNSIGNED_BYTE":return E.UNSIGNED_BYTE;case"SHORT":return E.SHORT;case"UNSIGNED_SHORT":return E.UNSIGNED_SHORT;case"INT":return E.INT;case"UNSIGNED_INT":return E.UNSIGNED_INT;case"FLOAT":return E.FLOAT;case"DOUBLE":return E.DOUBLE;default:throw new r.DeveloperError("name is not a valid value.")}}};var h=Object.freeze(E);e.CesiumMath=a,e.ComponentDatatype=h}));
\ No newline at end of file
define(["exports","./Matrix2-fc7e9822","./RuntimeError-c581ca93","./OrientedBoundingBox-1e0d2855"],(function(n,e,t,i){"use strict";const r={},a=new e.Cartesian3,o=new e.Cartesian3,u=new e.Cartesian3,s=new e.Cartesian3,c=new i.OrientedBoundingBox;function d(n,t,i,r,o){const u=e.Cartesian3.subtract(n,t,a),s=e.Cartesian3.dot(i,u),c=e.Cartesian3.dot(r,u);return e.Cartesian2.fromElements(s,c,o)}r.validOutline=function(n){t.Check.defined("positions",n);const r=i.OrientedBoundingBox.fromPoints(n,c),a=r.halfAxes,d=e.Matrix3.getColumn(a,0,o),C=e.Matrix3.getColumn(a,1,u),l=e.Matrix3.getColumn(a,2,s),m=e.Cartesian3.magnitude(d),f=e.Cartesian3.magnitude(C),g=e.Cartesian3.magnitude(l);return!(0===m&&(0===f||0===g)||0===f&&0===g)},r.computeProjectTo2DArguments=function(n,r,a,d){t.Check.defined("positions",n),t.Check.defined("centerResult",r),t.Check.defined("planeAxis1Result",a),t.Check.defined("planeAxis2Result",d);const C=i.OrientedBoundingBox.fromPoints(n,c),l=C.halfAxes,m=e.Matrix3.getColumn(l,0,o),f=e.Matrix3.getColumn(l,1,u),g=e.Matrix3.getColumn(l,2,s),x=e.Cartesian3.magnitude(m),h=e.Cartesian3.magnitude(f),B=e.Cartesian3.magnitude(g),M=Math.min(x,h,B);if(0===x&&(0===h||0===B)||0===h&&0===B)return!1;let P,p;return M!==h&&M!==B||(P=m),M===x?P=f:M===B&&(p=f),M!==x&&M!==h||(p=g),e.Cartesian3.normalize(P,a),e.Cartesian3.normalize(p,d),e.Cartesian3.clone(C.center,r),!0},r.createProjectPointsTo2DFunction=function(n,e,t){return function(i){const r=new Array(i.length);for(let a=0;a<i.length;a++)r[a]=d(i[a],n,e,t);return r}},r.createProjectPointTo2DFunction=function(n,e,t){return function(i,r){return d(i,n,e,t,r)}},n.CoplanarPolygonGeometryLibrary=r}));
\ No newline at end of file
define(["exports","./Matrix2-fc7e9822","./PolylineVolumeGeometryLibrary-5ddfb558","./defaultValue-94c3e563","./ComponentDatatype-4a60b8d6","./PolylinePipeline-0e310844","./Transforms-3ac41eb6"],(function(a,e,n,t,r,i,s){"use strict";const o={},l=new e.Cartesian3,C=new e.Cartesian3,c=new e.Cartesian3,y=new e.Cartesian3,u=[new e.Cartesian3,new e.Cartesian3],d=new e.Cartesian3,p=new e.Cartesian3,m=new e.Cartesian3,g=new e.Cartesian3,f=new e.Cartesian3,h=new e.Cartesian3,w=new e.Cartesian3,x=new e.Cartesian3,z=new e.Cartesian3,P=new e.Cartesian3,A=new s.Quaternion,B=new e.Matrix3;function E(a,t,i,o,c){const y=e.Cartesian3.angleBetween(e.Cartesian3.subtract(t,a,l),e.Cartesian3.subtract(i,a,C)),u=o===n.CornerType.BEVELED?1:Math.ceil(y/r.CesiumMath.toRadians(5))+1,d=3*u,p=new Array(d);let m;p[d-3]=i.x,p[d-2]=i.y,p[d-1]=i.z,m=c?e.Matrix3.fromQuaternion(s.Quaternion.fromAxisAngle(e.Cartesian3.negate(a,l),y/u,A),B):e.Matrix3.fromQuaternion(s.Quaternion.fromAxisAngle(a,y/u,A),B);let g=0;t=e.Cartesian3.clone(t,l);for(let n=0;n<u;n++)t=e.Matrix3.multiplyByVector(m,t,t),p[g++]=t.x,p[g++]=t.y,p[g++]=t.z;return p}function S(a){let t=d,r=p,i=m,s=a[1];r=e.Cartesian3.fromArray(a[1],s.length-3,r),i=e.Cartesian3.fromArray(a[0],0,i),t=e.Cartesian3.midpoint(r,i,t);const o=E(t,r,i,n.CornerType.ROUNDED,!1),l=a.length-1,C=a[l-1];s=a[l],r=e.Cartesian3.fromArray(C,C.length-3,r),i=e.Cartesian3.fromArray(s,0,i),t=e.Cartesian3.midpoint(r,i,t);const c=E(t,r,i,n.CornerType.ROUNDED,!1);return[o,c]}function b(a,n,t,r){let i=l;return r||(n=e.Cartesian3.negate(n,n)),i=e.Cartesian3.add(a,n,i),[i.x,i.y,i.z,t.x,t.y,t.z]}function D(a,n,t,r){const i=new Array(a.length),s=new Array(a.length),o=e.Cartesian3.multiplyByScalar(n,t,l),u=e.Cartesian3.negate(o,C);let d=0,p=a.length-1;for(let l=0;l<a.length;l+=3){const n=e.Cartesian3.fromArray(a,l,c),t=e.Cartesian3.add(n,u,y);i[d++]=t.x,i[d++]=t.y,i[d++]=t.z;const r=e.Cartesian3.add(n,o,y);s[p--]=r.z,s[p--]=r.y,s[p--]=r.x}return r.push(i,s),r}o.addAttribute=function(a,e,n,r){const i=e.x,s=e.y,o=e.z;t.defined(n)&&(a[n]=i,a[n+1]=s,a[n+2]=o),t.defined(r)&&(a[r]=o,a[r-1]=s,a[r-2]=i)};const M=new e.Cartesian3,T=new e.Cartesian3;o.computePositions=function(a){const t=a.granularity,s=a.positions,o=a.ellipsoid,C=a.width/2,c=a.cornerType,y=a.saveAttributes;let A=d,B=p,N=m,L=g,V=f,O=h,R=w,Q=x,U=z,G=P,v=[];const I=y?[]:void 0,q=y?[]:void 0;let j,k=s[0],F=s[1];B=e.Cartesian3.normalize(e.Cartesian3.subtract(F,k,B),B),A=o.geodeticSurfaceNormal(k,A),L=e.Cartesian3.normalize(e.Cartesian3.cross(A,B,L),L),y&&(I.push(L.x,L.y,L.z),q.push(A.x,A.y,A.z)),R=e.Cartesian3.clone(k,R),k=F,N=e.Cartesian3.negate(B,N);const H=[];let J;const K=s.length;for(J=1;J<K-1;J++){A=o.geodeticSurfaceNormal(k,A),F=s[J+1],B=e.Cartesian3.normalize(e.Cartesian3.subtract(F,k,B),B),V=e.Cartesian3.normalize(e.Cartesian3.add(B,N,V),V);const a=e.Cartesian3.multiplyByScalar(A,e.Cartesian3.dot(B,A),M);e.Cartesian3.subtract(B,a,a),e.Cartesian3.normalize(a,a);const d=e.Cartesian3.multiplyByScalar(A,e.Cartesian3.dot(N,A),T);e.Cartesian3.subtract(N,d,d),e.Cartesian3.normalize(d,d);const p=!r.CesiumMath.equalsEpsilon(Math.abs(e.Cartesian3.dot(a,d)),1,r.CesiumMath.EPSILON7);if(p){V=e.Cartesian3.cross(V,A,V),V=e.Cartesian3.cross(A,V,V),V=e.Cartesian3.normalize(V,V);const a=C/Math.max(.25,e.Cartesian3.magnitude(e.Cartesian3.cross(V,N,l))),r=n.PolylineVolumeGeometryLibrary.angleIsGreaterThanPi(B,N,k,o);V=e.Cartesian3.multiplyByScalar(V,a,V),r?(Q=e.Cartesian3.add(k,V,Q),G=e.Cartesian3.add(Q,e.Cartesian3.multiplyByScalar(L,C,G),G),U=e.Cartesian3.add(Q,e.Cartesian3.multiplyByScalar(L,2*C,U),U),u[0]=e.Cartesian3.clone(R,u[0]),u[1]=e.Cartesian3.clone(G,u[1]),j=i.PolylinePipeline.generateArc({positions:u,granularity:t,ellipsoid:o}),v=D(j,L,C,v),y&&(I.push(L.x,L.y,L.z),q.push(A.x,A.y,A.z)),O=e.Cartesian3.clone(U,O),L=e.Cartesian3.normalize(e.Cartesian3.cross(A,B,L),L),U=e.Cartesian3.add(Q,e.Cartesian3.multiplyByScalar(L,2*C,U),U),R=e.Cartesian3.add(Q,e.Cartesian3.multiplyByScalar(L,C,R),R),c===n.CornerType.ROUNDED||c===n.CornerType.BEVELED?H.push({leftPositions:E(Q,O,U,c,r)}):H.push({leftPositions:b(k,e.Cartesian3.negate(V,V),U,r)})):(U=e.Cartesian3.add(k,V,U),G=e.Cartesian3.add(U,e.Cartesian3.negate(e.Cartesian3.multiplyByScalar(L,C,G),G),G),Q=e.Cartesian3.add(U,e.Cartesian3.negate(e.Cartesian3.multiplyByScalar(L,2*C,Q),Q),Q),u[0]=e.Cartesian3.clone(R,u[0]),u[1]=e.Cartesian3.clone(G,u[1]),j=i.PolylinePipeline.generateArc({positions:u,granularity:t,ellipsoid:o}),v=D(j,L,C,v),y&&(I.push(L.x,L.y,L.z),q.push(A.x,A.y,A.z)),O=e.Cartesian3.clone(Q,O),L=e.Cartesian3.normalize(e.Cartesian3.cross(A,B,L),L),Q=e.Cartesian3.add(U,e.Cartesian3.negate(e.Cartesian3.multiplyByScalar(L,2*C,Q),Q),Q),R=e.Cartesian3.add(U,e.Cartesian3.negate(e.Cartesian3.multiplyByScalar(L,C,R),R),R),c===n.CornerType.ROUNDED||c===n.CornerType.BEVELED?H.push({rightPositions:E(U,O,Q,c,r)}):H.push({rightPositions:b(k,V,Q,r)})),N=e.Cartesian3.negate(B,N)}k=F}let W;return A=o.geodeticSurfaceNormal(k,A),u[0]=e.Cartesian3.clone(R,u[0]),u[1]=e.Cartesian3.clone(k,u[1]),j=i.PolylinePipeline.generateArc({positions:u,granularity:t,ellipsoid:o}),v=D(j,L,C,v),y&&(I.push(L.x,L.y,L.z),q.push(A.x,A.y,A.z)),c===n.CornerType.ROUNDED&&(W=S(v)),{positions:v,corners:H,lefts:I,normals:q,endPositions:W}},a.CorridorGeometryLibrary=o}));
\ No newline at end of file
define(["exports","./Transforms-3ac41eb6","./Matrix2-fc7e9822","./ComponentDatatype-4a60b8d6","./CylinderGeometryLibrary-7b029c87","./defaultValue-94c3e563","./RuntimeError-c581ca93","./GeometryAttribute-a441ff32","./GeometryAttributes-7df9bef6","./GeometryOffsetAttribute-ec11b721","./IndexDatatype-db156785","./VertexFormat-e46f29d6"],(function(t,e,r,o,n,a,i,s,u,f,m,d){"use strict";const l=new r.Cartesian2,p=new r.Cartesian3,c=new r.Cartesian3,y=new r.Cartesian3,b=new r.Cartesian3;function A(t){t=a.defaultValue(t,a.defaultValue.EMPTY_OBJECT);const e=t.length,r=t.topRadius,o=t.bottomRadius,n=a.defaultValue(t.vertexFormat,d.VertexFormat.DEFAULT),s=a.defaultValue(t.slices,128);if(!a.defined(e))throw new i.DeveloperError("options.length must be defined.");if(!a.defined(r))throw new i.DeveloperError("options.topRadius must be defined.");if(!a.defined(o))throw new i.DeveloperError("options.bottomRadius must be defined.");if(s<3)throw new i.DeveloperError("options.slices must be greater than or equal to 3.");if(a.defined(t.offsetAttribute)&&t.offsetAttribute===f.GeometryOffsetAttribute.TOP)throw new i.DeveloperError("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._length=e,this._topRadius=r,this._bottomRadius=o,this._vertexFormat=d.VertexFormat.clone(n),this._slices=s,this._offsetAttribute=t.offsetAttribute,this._workerName="createCylinderGeometry"}A.packedLength=d.VertexFormat.packedLength+5,A.pack=function(t,e,r){if(!a.defined(t))throw new i.DeveloperError("value is required");if(!a.defined(e))throw new i.DeveloperError("array is required");return r=a.defaultValue(r,0),d.VertexFormat.pack(t._vertexFormat,e,r),r+=d.VertexFormat.packedLength,e[r++]=t._length,e[r++]=t._topRadius,e[r++]=t._bottomRadius,e[r++]=t._slices,e[r]=a.defaultValue(t._offsetAttribute,-1),e};const h=new d.VertexFormat,w={vertexFormat:h,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0};let g;A.unpack=function(t,e,r){if(!a.defined(t))throw new i.DeveloperError("array is required");e=a.defaultValue(e,0);const o=d.VertexFormat.unpack(t,e,h);e+=d.VertexFormat.packedLength;const n=t[e++],s=t[e++],u=t[e++],f=t[e++],m=t[e];return a.defined(r)?(r._vertexFormat=d.VertexFormat.clone(o,r._vertexFormat),r._length=n,r._topRadius=s,r._bottomRadius=u,r._slices=f,r._offsetAttribute=-1===m?void 0:m,r):(w.length=n,w.topRadius=s,w.bottomRadius=u,w.slices=f,w.offsetAttribute=-1===m?void 0:m,new A(w))},A.createGeometry=function(t){let i=t._length;const d=t._topRadius,A=t._bottomRadius,h=t._vertexFormat,w=t._slices;if(i<=0||d<0||A<0||0===d&&0===A)return;const g=w+w,v=w+g,x=g+g,_=n.CylinderGeometryLibrary.computePositions(i,d,A,w,!0),F=h.st?new Float32Array(2*x):void 0,C=h.normal?new Float32Array(3*x):void 0,D=h.tangent?new Float32Array(3*x):void 0,G=h.bitangent?new Float32Array(3*x):void 0;let R;const O=h.normal||h.tangent||h.bitangent;if(O){const t=h.tangent||h.bitangent;let e=0,n=0,a=0;const s=Math.atan2(A-d,i),u=p;u.z=Math.sin(s);const f=Math.cos(s);let m=y,l=c;for(R=0;R<w;R++){const i=R/w*o.CesiumMath.TWO_PI,s=f*Math.cos(i),d=f*Math.sin(i);O&&(u.x=s,u.y=d,t&&(m=r.Cartesian3.normalize(r.Cartesian3.cross(r.Cartesian3.UNIT_Z,u,m),m)),h.normal&&(C[e++]=u.x,C[e++]=u.y,C[e++]=u.z,C[e++]=u.x,C[e++]=u.y,C[e++]=u.z),h.tangent&&(D[n++]=m.x,D[n++]=m.y,D[n++]=m.z,D[n++]=m.x,D[n++]=m.y,D[n++]=m.z),h.bitangent&&(l=r.Cartesian3.normalize(r.Cartesian3.cross(u,m,l),l),G[a++]=l.x,G[a++]=l.y,G[a++]=l.z,G[a++]=l.x,G[a++]=l.y,G[a++]=l.z))}for(R=0;R<w;R++)h.normal&&(C[e++]=0,C[e++]=0,C[e++]=-1),h.tangent&&(D[n++]=1,D[n++]=0,D[n++]=0),h.bitangent&&(G[a++]=0,G[a++]=-1,G[a++]=0);for(R=0;R<w;R++)h.normal&&(C[e++]=0,C[e++]=0,C[e++]=1),h.tangent&&(D[n++]=1,D[n++]=0,D[n++]=0),h.bitangent&&(G[a++]=0,G[a++]=1,G[a++]=0)}const V=12*w-12,E=m.IndexDatatype.createTypedArray(x,V);let T=0,L=0;for(R=0;R<w-1;R++)E[T++]=L,E[T++]=L+2,E[T++]=L+3,E[T++]=L,E[T++]=L+3,E[T++]=L+1,L+=2;for(E[T++]=g-2,E[T++]=0,E[T++]=1,E[T++]=g-2,E[T++]=1,E[T++]=g-1,R=1;R<w-1;R++)E[T++]=g+R+1,E[T++]=g+R,E[T++]=g;for(R=1;R<w-1;R++)E[T++]=v,E[T++]=v+R,E[T++]=v+R+1;let P=0;if(h.st){const t=Math.max(d,A);for(R=0;R<x;R++){const e=r.Cartesian3.fromArray(_,3*R,b);F[P++]=(e.x+t)/(2*t),F[P++]=(e.y+t)/(2*t)}}const M=new u.GeometryAttributes;h.position&&(M.position=new s.GeometryAttribute({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:_})),h.normal&&(M.normal=new s.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:C})),h.tangent&&(M.tangent=new s.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:D})),h.bitangent&&(M.bitangent=new s.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:G})),h.st&&(M.st=new s.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:F})),l.x=.5*i,l.y=Math.max(A,d);const k=new e.BoundingSphere(r.Cartesian3.ZERO,r.Cartesian2.magnitude(l));if(a.defined(t._offsetAttribute)){i=_.length;const e=t._offsetAttribute===f.GeometryOffsetAttribute.NONE?0:1,r=new Uint8Array(i/3).fill(e);M.applyOffset=new s.GeometryAttribute({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:r})}return new s.Geometry({attributes:M,indices:E,primitiveType:s.PrimitiveType.TRIANGLES,boundingSphere:k,offsetAttribute:t._offsetAttribute})},A.getUnitCylinder=function(){return a.defined(g)||(g=A.createGeometry(new A({topRadius:1,bottomRadius:1,length:1,vertexFormat:d.VertexFormat.POSITION_ONLY}))),g},t.CylinderGeometry=A}));
\ No newline at end of file
define(["exports","./ComponentDatatype-4a60b8d6"],(function(t,n){"use strict";const o={computePositions:function(t,o,e,s,r){const i=.5*t,a=-i,c=s+s,u=r?2*c:c,y=new Float64Array(3*u);let f,m=0,p=0;const d=r?3*c:0,h=r?3*(c+s):3*s;for(f=0;f<s;f++){const t=f/s*n.CesiumMath.TWO_PI,c=Math.cos(t),u=Math.sin(t),l=c*e,C=u*e,M=c*o,b=u*o;y[p+d]=l,y[p+d+1]=C,y[p+d+2]=a,y[p+h]=M,y[p+h+1]=b,y[p+h+2]=i,p+=3,r&&(y[m++]=l,y[m++]=C,y[m++]=a,y[m++]=M,y[m++]=b,y[m++]=i)}return y}};t.CylinderGeometryLibrary=o}));
\ No newline at end of file
define(["exports","./Transforms-3ac41eb6","./Matrix2-fc7e9822","./RuntimeError-c581ca93","./ComponentDatatype-4a60b8d6","./defaultValue-94c3e563","./EllipseGeometryLibrary-d3fe9678","./GeometryAttribute-a441ff32","./GeometryAttributes-7df9bef6","./GeometryInstance-97bd792f","./GeometryOffsetAttribute-ec11b721","./GeometryPipeline-a88e5bfc","./IndexDatatype-db156785","./VertexFormat-e46f29d6"],(function(t,e,r,i,n,o,a,s,l,u,m,c,p,y){"use strict";const d=new r.Cartesian3,f=new r.Cartesian3,h=new r.Cartesian3,A=new r.Cartesian3,x=new r.Cartesian2,g=new r.Matrix3,b=new r.Matrix3,_=new e.Quaternion,C=new r.Cartesian3,w=new r.Cartesian3,M=new r.Cartesian3,E=new r.Cartographic,I=new r.Cartesian3,T=new r.Cartesian2,G=new r.Cartesian2;function v(t,i,u){const c=i.vertexFormat,p=i.center,y=i.semiMajorAxis,A=i.semiMinorAxis,v=i.ellipsoid,N=i.stRotation,P=u?t.length/3*2:t.length/3,V=i.shadowVolume,D=c.st?new Float32Array(2*P):void 0,F=c.normal?new Float32Array(3*P):void 0,O=c.tangent?new Float32Array(3*P):void 0,S=c.bitangent?new Float32Array(3*P):void 0,L=V?new Float32Array(3*P):void 0;let R=0,j=C,k=w,z=M;const B=new e.GeographicProjection(v),Y=B.project(v.cartesianToCartographic(p,E),I),H=v.scaleToGeodeticSurface(p,d);v.geodeticSurfaceNormal(H,H);let U=g,Q=b;if(0!==N){let t=e.Quaternion.fromAxisAngle(H,N,_);U=r.Matrix3.fromQuaternion(t,U),t=e.Quaternion.fromAxisAngle(H,-N,_),Q=r.Matrix3.fromQuaternion(t,Q)}else U=r.Matrix3.clone(r.Matrix3.IDENTITY,U),Q=r.Matrix3.clone(r.Matrix3.IDENTITY,Q);const W=r.Cartesian2.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,T),q=r.Cartesian2.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,G);let J=t.length;const Z=u?J:0,K=Z/3*2;for(let e=0;e<J;e+=3){const i=e+1,n=e+2,o=r.Cartesian3.fromArray(t,e,d);if(c.st){const t=r.Matrix3.multiplyByVector(U,o,f),e=B.project(v.cartesianToCartographic(t,E),h);r.Cartesian3.subtract(e,Y,e),x.x=(e.x+y)/(2*y),x.y=(e.y+A)/(2*A),W.x=Math.min(x.x,W.x),W.y=Math.min(x.y,W.y),q.x=Math.max(x.x,q.x),q.y=Math.max(x.y,q.y),u&&(D[R+K]=x.x,D[R+1+K]=x.y),D[R++]=x.x,D[R++]=x.y}(c.normal||c.tangent||c.bitangent||V)&&(j=v.geodeticSurfaceNormal(o,j),V&&(L[e+Z]=-j.x,L[i+Z]=-j.y,L[n+Z]=-j.z),(c.normal||c.tangent||c.bitangent)&&((c.tangent||c.bitangent)&&(k=r.Cartesian3.normalize(r.Cartesian3.cross(r.Cartesian3.UNIT_Z,j,k),k),r.Matrix3.multiplyByVector(Q,k,k)),c.normal&&(F[e]=j.x,F[i]=j.y,F[n]=j.z,u&&(F[e+Z]=-j.x,F[i+Z]=-j.y,F[n+Z]=-j.z)),c.tangent&&(O[e]=k.x,O[i]=k.y,O[n]=k.z,u&&(O[e+Z]=-k.x,O[i+Z]=-k.y,O[n+Z]=-k.z)),c.bitangent&&(z=r.Cartesian3.normalize(r.Cartesian3.cross(j,k,z),z),S[e]=z.x,S[i]=z.y,S[n]=z.z,u&&(S[e+Z]=z.x,S[i+Z]=z.y,S[n+Z]=z.z))))}if(c.st){J=D.length;for(let t=0;t<J;t+=2)D[t]=(D[t]-W.x)/(q.x-W.x),D[t+1]=(D[t+1]-W.y)/(q.y-W.y)}const X=new l.GeometryAttributes;if(c.position){const e=a.EllipseGeometryLibrary.raisePositionsToHeight(t,i,u);X.position=new s.GeometryAttribute({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:e})}if(c.st&&(X.st=new s.GeometryAttribute({componentDatatype:n.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:D})),c.normal&&(X.normal=new s.GeometryAttribute({componentDatatype:n.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:F})),c.tangent&&(X.tangent=new s.GeometryAttribute({componentDatatype:n.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:O})),c.bitangent&&(X.bitangent=new s.GeometryAttribute({componentDatatype:n.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:S})),V&&(X.extrudeDirection=new s.GeometryAttribute({componentDatatype:n.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:L})),u&&o.defined(i.offsetAttribute)){let t=new Uint8Array(P);if(i.offsetAttribute===m.GeometryOffsetAttribute.TOP)t=t.fill(1,0,P/2);else{const e=i.offsetAttribute===m.GeometryOffsetAttribute.NONE?0:1;t=t.fill(e)}X.applyOffset=new s.GeometryAttribute({componentDatatype:n.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:t})}return X}function N(t){const e=new Array(t*(t+1)*12-6);let r,i,n,o,a,s=0;for(r=0,n=1,o=0;o<3;o++)e[s++]=n++,e[s++]=r,e[s++]=n;for(o=2;o<t+1;++o){for(n=o*(o+1)-1,r=(o-1)*o-1,e[s++]=n++,e[s++]=r,e[s++]=n,i=2*o,a=0;a<i-1;++a)e[s++]=n,e[s++]=r++,e[s++]=r,e[s++]=n++,e[s++]=r,e[s++]=n;e[s++]=n++,e[s++]=r,e[s++]=n}for(i=2*t,++n,++r,o=0;o<i-1;++o)e[s++]=n,e[s++]=r++,e[s++]=r,e[s++]=n++,e[s++]=r,e[s++]=n;for(e[s++]=n,e[s++]=r++,e[s++]=r,e[s++]=n++,e[s++]=r++,e[s++]=r,++r,o=t-1;o>1;--o){for(e[s++]=r++,e[s++]=r,e[s++]=n,i=2*o,a=0;a<i-1;++a)e[s++]=n,e[s++]=r++,e[s++]=r,e[s++]=n++,e[s++]=r,e[s++]=n;e[s++]=r++,e[s++]=r++,e[s++]=n++}for(o=0;o<3;o++)e[s++]=r++,e[s++]=r,e[s++]=n;return e}let P=new r.Cartesian3;function V(t){const i=t.center;P=r.Cartesian3.multiplyByScalar(t.ellipsoid.geodeticSurfaceNormal(i,P),t.height,P),P=r.Cartesian3.add(i,P,P);const n=new e.BoundingSphere(P,t.semiMajorAxis),o=a.EllipseGeometryLibrary.computeEllipsePositions(t,!0,!1),s=o.positions,l=o.numPts,u=v(s,t,!1);let m=N(l);return m=p.IndexDatatype.createTypedArray(s.length/3,m),{boundingSphere:n,attributes:u,indices:m}}function D(t,i){const a=i.vertexFormat,u=i.center,c=i.semiMajorAxis,p=i.semiMinorAxis,y=i.ellipsoid,b=i.height,v=i.extrudedHeight,N=i.stRotation,P=t.length/3*2,V=new Float64Array(3*P),D=a.st?new Float32Array(2*P):void 0,F=a.normal?new Float32Array(3*P):void 0,O=a.tangent?new Float32Array(3*P):void 0,S=a.bitangent?new Float32Array(3*P):void 0,L=i.shadowVolume,R=L?new Float32Array(3*P):void 0;let j=0,k=C,z=w,B=M;const Y=new e.GeographicProjection(y),H=Y.project(y.cartesianToCartographic(u,E),I),U=y.scaleToGeodeticSurface(u,d);y.geodeticSurfaceNormal(U,U);const Q=e.Quaternion.fromAxisAngle(U,N,_),W=r.Matrix3.fromQuaternion(Q,g),q=r.Cartesian2.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,T),J=r.Cartesian2.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,G);let Z=t.length;const K=Z/3*2;for(let e=0;e<Z;e+=3){const i=e+1,n=e+2;let o,s=r.Cartesian3.fromArray(t,e,d);if(a.st){const t=r.Matrix3.multiplyByVector(W,s,f),e=Y.project(y.cartesianToCartographic(t,E),h);r.Cartesian3.subtract(e,H,e),x.x=(e.x+c)/(2*c),x.y=(e.y+p)/(2*p),q.x=Math.min(x.x,q.x),q.y=Math.min(x.y,q.y),J.x=Math.max(x.x,J.x),J.y=Math.max(x.y,J.y),D[j+K]=x.x,D[j+1+K]=x.y,D[j++]=x.x,D[j++]=x.y}s=y.scaleToGeodeticSurface(s,s),o=r.Cartesian3.clone(s,f),k=y.geodeticSurfaceNormal(s,k),L&&(R[e+Z]=-k.x,R[i+Z]=-k.y,R[n+Z]=-k.z);let l=r.Cartesian3.multiplyByScalar(k,b,A);if(s=r.Cartesian3.add(s,l,s),l=r.Cartesian3.multiplyByScalar(k,v,l),o=r.Cartesian3.add(o,l,o),a.position&&(V[e+Z]=o.x,V[i+Z]=o.y,V[n+Z]=o.z,V[e]=s.x,V[i]=s.y,V[n]=s.z),a.normal||a.tangent||a.bitangent){B=r.Cartesian3.clone(k,B);const l=r.Cartesian3.fromArray(t,(e+3)%Z,A);r.Cartesian3.subtract(l,s,l);const u=r.Cartesian3.subtract(o,s,h);k=r.Cartesian3.normalize(r.Cartesian3.cross(u,l,k),k),a.normal&&(F[e]=k.x,F[i]=k.y,F[n]=k.z,F[e+Z]=k.x,F[i+Z]=k.y,F[n+Z]=k.z),a.tangent&&(z=r.Cartesian3.normalize(r.Cartesian3.cross(B,k,z),z),O[e]=z.x,O[i]=z.y,O[n]=z.z,O[e+Z]=z.x,O[e+1+Z]=z.y,O[e+2+Z]=z.z),a.bitangent&&(S[e]=B.x,S[i]=B.y,S[n]=B.z,S[e+Z]=B.x,S[i+Z]=B.y,S[n+Z]=B.z)}}if(a.st){Z=D.length;for(let t=0;t<Z;t+=2)D[t]=(D[t]-q.x)/(J.x-q.x),D[t+1]=(D[t+1]-q.y)/(J.y-q.y)}const X=new l.GeometryAttributes;if(a.position&&(X.position=new s.GeometryAttribute({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:V})),a.st&&(X.st=new s.GeometryAttribute({componentDatatype:n.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:D})),a.normal&&(X.normal=new s.GeometryAttribute({componentDatatype:n.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:F})),a.tangent&&(X.tangent=new s.GeometryAttribute({componentDatatype:n.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:O})),a.bitangent&&(X.bitangent=new s.GeometryAttribute({componentDatatype:n.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:S})),L&&(X.extrudeDirection=new s.GeometryAttribute({componentDatatype:n.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:R})),o.defined(i.offsetAttribute)){let t=new Uint8Array(P);if(i.offsetAttribute===m.GeometryOffsetAttribute.TOP)t=t.fill(1,0,P/2);else{const e=i.offsetAttribute===m.GeometryOffsetAttribute.NONE?0:1;t=t.fill(e)}X.applyOffset=new s.GeometryAttribute({componentDatatype:n.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:t})}return X}function F(t){const e=t.length/3,r=p.IndexDatatype.createTypedArray(e,6*e);let i=0;for(let n=0;n<e;n++){const t=n,o=n+e,a=(t+1)%e,s=a+e;r[i++]=t,r[i++]=o,r[i++]=a,r[i++]=a,r[i++]=o,r[i++]=s}return r}const O=new e.BoundingSphere,S=new e.BoundingSphere;function L(t){const i=t.center,n=t.ellipsoid,o=t.semiMajorAxis;let l=r.Cartesian3.multiplyByScalar(n.geodeticSurfaceNormal(i,d),t.height,d);O.center=r.Cartesian3.add(i,l,O.center),O.radius=o,l=r.Cartesian3.multiplyByScalar(n.geodeticSurfaceNormal(i,l),t.extrudedHeight,l),S.center=r.Cartesian3.add(i,l,S.center),S.radius=o;const m=a.EllipseGeometryLibrary.computeEllipsePositions(t,!0,!0),y=m.positions,f=m.numPts,h=m.outerPositions,A=e.BoundingSphere.union(O,S),x=v(y,t,!0);let g=N(f);const b=g.length;g.length=2*b;const _=y.length/3;for(let e=0;e<b;e+=3)g[e+b]=g[e+2]+_,g[e+1+b]=g[e+1]+_,g[e+2+b]=g[e]+_;const C=p.IndexDatatype.createTypedArray(2*_/3,g),w=new s.Geometry({attributes:x,indices:C,primitiveType:s.PrimitiveType.TRIANGLES}),M=D(h,t);g=F(h);const E=p.IndexDatatype.createTypedArray(2*h.length/3,g),I=new s.Geometry({attributes:M,indices:E,primitiveType:s.PrimitiveType.TRIANGLES}),T=c.GeometryPipeline.combineInstances([new u.GeometryInstance({geometry:w}),new u.GeometryInstance({geometry:I})]);return{boundingSphere:A,attributes:T[0].attributes,indices:T[0].indices}}function R(t,e,i,o,s,l,u){const m=a.EllipseGeometryLibrary.computeEllipsePositions({center:t,semiMajorAxis:e,semiMinorAxis:i,rotation:o,granularity:s},!1,!0),c=m.outerPositions,p=c.length/3,y=new Array(p);for(let n=0;n<p;++n)y[n]=r.Cartesian3.fromArray(c,3*n);const d=r.Rectangle.fromCartesianArray(y,l,u);return d.width>n.CesiumMath.PI&&(d.north=d.north>0?n.CesiumMath.PI_OVER_TWO-n.CesiumMath.EPSILON7:d.north,d.south=d.south<0?n.CesiumMath.EPSILON7-n.CesiumMath.PI_OVER_TWO:d.south,d.east=n.CesiumMath.PI,d.west=-n.CesiumMath.PI),d}function j(t){t=o.defaultValue(t,o.defaultValue.EMPTY_OBJECT);const e=t.center,a=o.defaultValue(t.ellipsoid,r.Ellipsoid.WGS84),s=t.semiMajorAxis,l=t.semiMinorAxis,u=o.defaultValue(t.granularity,n.CesiumMath.RADIANS_PER_DEGREE),m=o.defaultValue(t.vertexFormat,y.VertexFormat.DEFAULT);if(i.Check.defined("options.center",e),i.Check.typeOf.number("options.semiMajorAxis",s),i.Check.typeOf.number("options.semiMinorAxis",l),s<l)throw new i.DeveloperError("semiMajorAxis must be greater than or equal to the semiMinorAxis.");if(u<=0)throw new i.DeveloperError("granularity must be greater than zero.");const c=o.defaultValue(t.height,0),p=o.defaultValue(t.extrudedHeight,c);this._center=r.Cartesian3.clone(e),this._semiMajorAxis=s,this._semiMinorAxis=l,this._ellipsoid=r.Ellipsoid.clone(a),this._rotation=o.defaultValue(t.rotation,0),this._stRotation=o.defaultValue(t.stRotation,0),this._height=Math.max(p,c),this._granularity=u,this._vertexFormat=y.VertexFormat.clone(m),this._extrudedHeight=Math.min(p,c),this._shadowVolume=o.defaultValue(t.shadowVolume,!1),this._workerName="createEllipseGeometry",this._offsetAttribute=t.offsetAttribute,this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0}j.packedLength=r.Cartesian3.packedLength+r.Ellipsoid.packedLength+y.VertexFormat.packedLength+9,j.pack=function(t,e,n){return i.Check.defined("value",t),i.Check.defined("array",e),n=o.defaultValue(n,0),r.Cartesian3.pack(t._center,e,n),n+=r.Cartesian3.packedLength,r.Ellipsoid.pack(t._ellipsoid,e,n),n+=r.Ellipsoid.packedLength,y.VertexFormat.pack(t._vertexFormat,e,n),n+=y.VertexFormat.packedLength,e[n++]=t._semiMajorAxis,e[n++]=t._semiMinorAxis,e[n++]=t._rotation,e[n++]=t._stRotation,e[n++]=t._height,e[n++]=t._granularity,e[n++]=t._extrudedHeight,e[n++]=t._shadowVolume?1:0,e[n]=o.defaultValue(t._offsetAttribute,-1),e};const k=new r.Cartesian3,z=new r.Ellipsoid,B=new y.VertexFormat,Y={center:k,ellipsoid:z,vertexFormat:B,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,stRotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};function H(t){const e=-t._stRotation;if(0===e)return[0,0,0,1,1,0];const i=a.EllipseGeometryLibrary.computeEllipsePositions({center:t._center,semiMajorAxis:t._semiMajorAxis,semiMinorAxis:t._semiMinorAxis,rotation:t._rotation,granularity:t._granularity},!1,!0),n=i.outerPositions,o=n.length/3,l=new Array(o);for(let a=0;a<o;++a)l[a]=r.Cartesian3.fromArray(n,3*a);const u=t._ellipsoid,m=t.rectangle;return s.Geometry._textureCoordinateRotationPoints(l,e,u,m)}j.unpack=function(t,e,n){i.Check.defined("array",t),e=o.defaultValue(e,0);const a=r.Cartesian3.unpack(t,e,k);e+=r.Cartesian3.packedLength;const s=r.Ellipsoid.unpack(t,e,z);e+=r.Ellipsoid.packedLength;const l=y.VertexFormat.unpack(t,e,B);e+=y.VertexFormat.packedLength;const u=t[e++],m=t[e++],c=t[e++],p=t[e++],d=t[e++],f=t[e++],h=t[e++],A=1===t[e++],x=t[e];return o.defined(n)?(n._center=r.Cartesian3.clone(a,n._center),n._ellipsoid=r.Ellipsoid.clone(s,n._ellipsoid),n._vertexFormat=y.VertexFormat.clone(l,n._vertexFormat),n._semiMajorAxis=u,n._semiMinorAxis=m,n._rotation=c,n._stRotation=p,n._height=d,n._granularity=f,n._extrudedHeight=h,n._shadowVolume=A,n._offsetAttribute=-1===x?void 0:x,n):(Y.height=d,Y.extrudedHeight=h,Y.granularity=f,Y.stRotation=p,Y.rotation=c,Y.semiMajorAxis=u,Y.semiMinorAxis=m,Y.shadowVolume=A,Y.offsetAttribute=-1===x?void 0:x,new j(Y))},j.computeRectangle=function(t,e){t=o.defaultValue(t,o.defaultValue.EMPTY_OBJECT);const a=t.center,s=o.defaultValue(t.ellipsoid,r.Ellipsoid.WGS84),l=t.semiMajorAxis,u=t.semiMinorAxis,m=o.defaultValue(t.granularity,n.CesiumMath.RADIANS_PER_DEGREE),c=o.defaultValue(t.rotation,0);if(i.Check.defined("options.center",a),i.Check.typeOf.number("options.semiMajorAxis",l),i.Check.typeOf.number("options.semiMinorAxis",u),l<u)throw new i.DeveloperError("semiMajorAxis must be greater than or equal to the semiMinorAxis.");if(m<=0)throw new i.DeveloperError("granularity must be greater than zero.");return R(a,l,u,c,m,s,e)},j.createGeometry=function(t){if(t._semiMajorAxis<=0||t._semiMinorAxis<=0)return;const e=t._height,r=t._extrudedHeight,i=!n.CesiumMath.equalsEpsilon(e,r,0,n.CesiumMath.EPSILON2);t._center=t._ellipsoid.scaleToGeodeticSurface(t._center,t._center);const a={center:t._center,semiMajorAxis:t._semiMajorAxis,semiMinorAxis:t._semiMinorAxis,ellipsoid:t._ellipsoid,rotation:t._rotation,height:e,granularity:t._granularity,vertexFormat:t._vertexFormat,stRotation:t._stRotation};let l;if(i)a.extrudedHeight=r,a.shadowVolume=t._shadowVolume,a.offsetAttribute=t._offsetAttribute,l=L(a);else if(l=V(a),o.defined(t._offsetAttribute)){const e=l.attributes.position.values.length,r=t._offsetAttribute===m.GeometryOffsetAttribute.NONE?0:1,i=new Uint8Array(e/3).fill(r);l.attributes.applyOffset=new s.GeometryAttribute({componentDatatype:n.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:i})}return new s.Geometry({attributes:l.attributes,indices:l.indices,primitiveType:s.PrimitiveType.TRIANGLES,boundingSphere:l.boundingSphere,offsetAttribute:t._offsetAttribute})},j.createShadowVolume=function(t,e,r){const i=t._granularity,n=t._ellipsoid,o=e(i,n),a=r(i,n);return new j({center:t._center,semiMajorAxis:t._semiMajorAxis,semiMinorAxis:t._semiMinorAxis,ellipsoid:n,rotation:t._rotation,stRotation:t._stRotation,granularity:i,extrudedHeight:o,height:a,vertexFormat:y.VertexFormat.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(j.prototype,{rectangle:{get:function(){return o.defined(this._rectangle)||(this._rectangle=R(this._center,this._semiMajorAxis,this._semiMinorAxis,this._rotation,this._granularity,this._ellipsoid)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return o.defined(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=H(this)),this._textureCoordinateRotationPoints}}}),t.EllipseGeometry=j}));
\ No newline at end of file
define(["exports","./Matrix2-fc7e9822","./ComponentDatatype-4a60b8d6","./Transforms-3ac41eb6"],(function(t,a,e,n){"use strict";const i={},r=new a.Cartesian3,s=new a.Cartesian3,o=new n.Quaternion,l=new a.Matrix3;function c(t,e,i,c,C,y,u,m,h,x){const M=t+e;a.Cartesian3.multiplyByScalar(c,Math.cos(M),r),a.Cartesian3.multiplyByScalar(i,Math.sin(M),s),a.Cartesian3.add(r,s,r);let f=Math.cos(t);f*=f;let z=Math.sin(t);z*=z;const _=y/Math.sqrt(u*f+C*z),d=_/m;return n.Quaternion.fromAxisAngle(r,d,o),a.Matrix3.fromQuaternion(o,l),a.Matrix3.multiplyByVector(l,h,x),a.Cartesian3.normalize(x,x),a.Cartesian3.multiplyByScalar(x,m,x),x}const C=new a.Cartesian3,y=new a.Cartesian3,u=new a.Cartesian3,m=new a.Cartesian3;i.raisePositionsToHeight=function(t,e,n){const i=e.ellipsoid,r=e.height,s=e.extrudedHeight,o=n?t.length/3*2:t.length/3,l=new Float64Array(3*o),c=t.length,h=n?c:0;for(let x=0;x<c;x+=3){const e=x+1,o=x+2,c=a.Cartesian3.fromArray(t,x,C);i.scaleToGeodeticSurface(c,c);const M=a.Cartesian3.clone(c,y),f=i.geodeticSurfaceNormal(c,m),z=a.Cartesian3.multiplyByScalar(f,r,u);a.Cartesian3.add(c,z,c),n&&(a.Cartesian3.multiplyByScalar(f,s,z),a.Cartesian3.add(M,z,M),l[x+h]=M.x,l[e+h]=M.y,l[o+h]=M.z),l[x]=c.x,l[e]=c.y,l[o]=c.z}return l};const h=new a.Cartesian3,x=new a.Cartesian3,M=new a.Cartesian3;i.computeEllipsePositions=function(t,n,i){const r=t.semiMinorAxis,s=t.semiMajorAxis,o=t.rotation,l=t.center,m=8*t.granularity,f=r*r,z=s*s,_=s*r,d=a.Cartesian3.magnitude(l),p=a.Cartesian3.normalize(l,h);let O=a.Cartesian3.cross(a.Cartesian3.UNIT_Z,l,x);O=a.Cartesian3.normalize(O,O);const w=a.Cartesian3.cross(p,O,M);let P=1+Math.ceil(e.CesiumMath.PI_OVER_TWO/m);const T=e.CesiumMath.PI_OVER_TWO/(P-1);let I=e.CesiumMath.PI_OVER_TWO-P*T;I<0&&(P-=Math.ceil(Math.abs(I)/T));const g=P*(P+2)*2,E=n?new Array(3*g):void 0;let V=0,A=C,R=y;const W=4*P*3;let S=W-1,B=0;const b=i?new Array(W):void 0;let Q,v,G,H,N;for(I=e.CesiumMath.PI_OVER_TWO,A=c(I,o,w,O,f,_,z,d,p,A),n&&(E[V++]=A.x,E[V++]=A.y,E[V++]=A.z),i&&(b[S--]=A.z,b[S--]=A.y,b[S--]=A.x),I=e.CesiumMath.PI_OVER_TWO-T,Q=1;Q<P+1;++Q){if(A=c(I,o,w,O,f,_,z,d,p,A),R=c(Math.PI-I,o,w,O,f,_,z,d,p,R),n){for(E[V++]=A.x,E[V++]=A.y,E[V++]=A.z,G=2*Q+2,v=1;v<G-1;++v)H=v/(G-1),N=a.Cartesian3.lerp(A,R,H,u),E[V++]=N.x,E[V++]=N.y,E[V++]=N.z;E[V++]=R.x,E[V++]=R.y,E[V++]=R.z}i&&(b[S--]=A.z,b[S--]=A.y,b[S--]=A.x,b[B++]=R.x,b[B++]=R.y,b[B++]=R.z),I=e.CesiumMath.PI_OVER_TWO-(Q+1)*T}for(Q=P;Q>1;--Q){if(I=e.CesiumMath.PI_OVER_TWO-(Q-1)*T,A=c(-I,o,w,O,f,_,z,d,p,A),R=c(I+Math.PI,o,w,O,f,_,z,d,p,R),n){for(E[V++]=A.x,E[V++]=A.y,E[V++]=A.z,G=2*(Q-1)+2,v=1;v<G-1;++v)H=v/(G-1),N=a.Cartesian3.lerp(A,R,H,u),E[V++]=N.x,E[V++]=N.y,E[V++]=N.z;E[V++]=R.x,E[V++]=R.y,E[V++]=R.z}i&&(b[S--]=A.z,b[S--]=A.y,b[S--]=A.x,b[B++]=R.x,b[B++]=R.y,b[B++]=R.z)}I=e.CesiumMath.PI_OVER_TWO,A=c(-I,o,w,O,f,_,z,d,p,A);const j={};return n&&(E[V++]=A.x,E[V++]=A.y,E[V++]=A.z,j.positions=E,j.numPts=P),i&&(b[S--]=A.z,b[S--]=A.y,b[S--]=A.x,j.outerPositions=b),j},t.EllipseGeometryLibrary=i}));
\ No newline at end of file
define(["exports","./Transforms-3ac41eb6","./Matrix2-fc7e9822","./ComponentDatatype-4a60b8d6","./defaultValue-94c3e563","./RuntimeError-c581ca93","./EllipseGeometryLibrary-d3fe9678","./GeometryAttribute-a441ff32","./GeometryAttributes-7df9bef6","./GeometryOffsetAttribute-ec11b721","./IndexDatatype-db156785"],(function(e,t,i,r,n,o,a,s,l,u,d){"use strict";const f=new i.Cartesian3;let c=new i.Cartesian3;function p(e){const n=e.center;c=i.Cartesian3.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(n,c),e.height,c),c=i.Cartesian3.add(n,c,c);const o=new t.BoundingSphere(c,e.semiMajorAxis),u=a.EllipseGeometryLibrary.computeEllipsePositions(e,!1,!0).outerPositions,f=new l.GeometryAttributes({position:new s.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:a.EllipseGeometryLibrary.raisePositionsToHeight(u,e,!1)})}),p=u.length/3,m=d.IndexDatatype.createTypedArray(p,2*p);let h=0;for(let t=0;t<p;++t)m[h++]=t,m[h++]=(t+1)%p;return{boundingSphere:o,attributes:f,indices:m}}const m=new t.BoundingSphere,h=new t.BoundingSphere;function y(e){const o=e.center,c=e.ellipsoid,p=e.semiMajorAxis;let y=i.Cartesian3.multiplyByScalar(c.geodeticSurfaceNormal(o,f),e.height,f);m.center=i.Cartesian3.add(o,y,m.center),m.radius=p,y=i.Cartesian3.multiplyByScalar(c.geodeticSurfaceNormal(o,y),e.extrudedHeight,y),h.center=i.Cartesian3.add(o,y,h.center),h.radius=p;let b=a.EllipseGeometryLibrary.computeEllipsePositions(e,!1,!0).outerPositions;const A=new l.GeometryAttributes({position:new s.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:a.EllipseGeometryLibrary.raisePositionsToHeight(b,e,!0)})});b=A.position.values;const _=t.BoundingSphere.union(m,h);let g=b.length/3;if(n.defined(e.offsetAttribute)){let t=new Uint8Array(g);if(e.offsetAttribute===u.GeometryOffsetAttribute.TOP)t=t.fill(1,0,g/2);else{const i=e.offsetAttribute===u.GeometryOffsetAttribute.NONE?0:1;t=t.fill(i)}A.applyOffset=new s.GeometryAttribute({componentDatatype:r.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:t})}let E=n.defaultValue(e.numberOfVerticalLines,16);E=r.CesiumMath.clamp(E,0,g/2);const x=d.IndexDatatype.createTypedArray(g,2*g+2*E);g/=2;let M,w,v=0;for(M=0;M<g;++M)x[v++]=M,x[v++]=(M+1)%g,x[v++]=M+g,x[v++]=(M+1)%g+g;if(E>0){const e=Math.min(E,g);w=Math.round(g/e);const t=Math.min(w*E,g);for(M=0;M<t;M+=w)x[v++]=M,x[v++]=M+g}return{boundingSphere:_,attributes:A,indices:x}}function b(e){e=n.defaultValue(e,n.defaultValue.EMPTY_OBJECT);const t=e.center,a=n.defaultValue(e.ellipsoid,i.Ellipsoid.WGS84),s=e.semiMajorAxis,l=e.semiMinorAxis,u=n.defaultValue(e.granularity,r.CesiumMath.RADIANS_PER_DEGREE);if(!n.defined(t))throw new o.DeveloperError("center is required.");if(!n.defined(s))throw new o.DeveloperError("semiMajorAxis is required.");if(!n.defined(l))throw new o.DeveloperError("semiMinorAxis is required.");if(s<l)throw new o.DeveloperError("semiMajorAxis must be greater than or equal to the semiMinorAxis.");if(u<=0)throw new o.DeveloperError("granularity must be greater than zero.");const d=n.defaultValue(e.height,0),f=n.defaultValue(e.extrudedHeight,d);this._center=i.Cartesian3.clone(t),this._semiMajorAxis=s,this._semiMinorAxis=l,this._ellipsoid=i.Ellipsoid.clone(a),this._rotation=n.defaultValue(e.rotation,0),this._height=Math.max(f,d),this._granularity=u,this._extrudedHeight=Math.min(f,d),this._numberOfVerticalLines=Math.max(n.defaultValue(e.numberOfVerticalLines,16),0),this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipseOutlineGeometry"}b.packedLength=i.Cartesian3.packedLength+i.Ellipsoid.packedLength+8,b.pack=function(e,t,r){if(!n.defined(e))throw new o.DeveloperError("value is required");if(!n.defined(t))throw new o.DeveloperError("array is required");return r=n.defaultValue(r,0),i.Cartesian3.pack(e._center,t,r),r+=i.Cartesian3.packedLength,i.Ellipsoid.pack(e._ellipsoid,t,r),r+=i.Ellipsoid.packedLength,t[r++]=e._semiMajorAxis,t[r++]=e._semiMinorAxis,t[r++]=e._rotation,t[r++]=e._height,t[r++]=e._granularity,t[r++]=e._extrudedHeight,t[r++]=e._numberOfVerticalLines,t[r]=n.defaultValue(e._offsetAttribute,-1),t};const A=new i.Cartesian3,_=new i.Ellipsoid,g={center:A,ellipsoid:_,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};b.unpack=function(e,t,r){if(!n.defined(e))throw new o.DeveloperError("array is required");t=n.defaultValue(t,0);const a=i.Cartesian3.unpack(e,t,A);t+=i.Cartesian3.packedLength;const s=i.Ellipsoid.unpack(e,t,_);t+=i.Ellipsoid.packedLength;const l=e[t++],u=e[t++],d=e[t++],f=e[t++],c=e[t++],p=e[t++],m=e[t++],h=e[t];return n.defined(r)?(r._center=i.Cartesian3.clone(a,r._center),r._ellipsoid=i.Ellipsoid.clone(s,r._ellipsoid),r._semiMajorAxis=l,r._semiMinorAxis=u,r._rotation=d,r._height=f,r._granularity=c,r._extrudedHeight=p,r._numberOfVerticalLines=m,r._offsetAttribute=-1===h?void 0:h,r):(g.height=f,g.extrudedHeight=p,g.granularity=c,g.rotation=d,g.semiMajorAxis=l,g.semiMinorAxis=u,g.numberOfVerticalLines=m,g.offsetAttribute=-1===h?void 0:h,new b(g))},b.createGeometry=function(e){if(e._semiMajorAxis<=0||e._semiMinorAxis<=0)return;const t=e._height,i=e._extrudedHeight,o=!r.CesiumMath.equalsEpsilon(t,i,0,r.CesiumMath.EPSILON2);e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center);const a={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:t,granularity:e._granularity,numberOfVerticalLines:e._numberOfVerticalLines};let l;if(o)a.extrudedHeight=i,a.offsetAttribute=e._offsetAttribute,l=y(a);else if(l=p(a),n.defined(e._offsetAttribute)){const t=l.attributes.position.values.length,i=e._offsetAttribute===u.GeometryOffsetAttribute.NONE?0:1,n=new Uint8Array(t/3).fill(i);l.attributes.applyOffset=new s.GeometryAttribute({componentDatatype:r.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:n})}return new s.Geometry({attributes:l.attributes,indices:l.indices,primitiveType:s.PrimitiveType.LINES,boundingSphere:l.boundingSphere,offsetAttribute:e._offsetAttribute})},e.EllipseOutlineGeometry=b}));
\ No newline at end of file
define(["exports","./Matrix2-fc7e9822","./RuntimeError-c581ca93","./defaultValue-94c3e563","./ComponentDatatype-4a60b8d6"],(function(t,a,i,e,n){"use strict";function s(t){const a=t._uSquared,i=t._ellipsoid.maximumRadius,e=t._ellipsoid.minimumRadius,n=(i-e)/i,s=Math.cos(t._startHeading),h=Math.sin(t._startHeading),o=(1-n)*Math.tan(t._start.latitude),r=1/Math.sqrt(1+o*o),d=r*o,c=Math.atan2(o,s),u=r*h,l=u*u,M=1-l,g=Math.sqrt(M),_=a/4,p=_*_,f=p*_,m=p*p,C=1+_-3*p/4+5*f/4-175*m/64,H=1-_+15*p/8-35*f/8,v=1-3*_+35*p/4,O=1-5*_,q=C*c-H*Math.sin(2*c)*_/2-v*Math.sin(4*c)*p/16-O*Math.sin(6*c)*f/48-5*Math.sin(8*c)*m/512,S=t._constants;S.a=i,S.b=e,S.f=n,S.cosineHeading=s,S.sineHeading=h,S.tanU=o,S.cosineU=r,S.sineU=d,S.sigma=c,S.sineAlpha=u,S.sineSquaredAlpha=l,S.cosineSquaredAlpha=M,S.cosineAlpha=g,S.u2Over4=_,S.u4Over16=p,S.u6Over64=f,S.u8Over256=m,S.a0=C,S.a1=H,S.a2=v,S.a3=O,S.distanceRatio=q}function h(t,a){return t*a*(4+t*(4-3*a))/16}function o(t,a,i,e,n,s,o){const r=h(t,i);return(1-r)*t*a*(e+r*n*(o+r*s*(2*o*o-1)))}function r(t,a,i,e,s,h,r){const d=(a-i)/a,c=h-e,u=Math.atan((1-d)*Math.tan(s)),l=Math.atan((1-d)*Math.tan(r)),M=Math.cos(u),g=Math.sin(u),_=Math.cos(l),p=Math.sin(l),f=M*_,m=M*p,C=g*p,H=g*_;let v,O,q,S,b,U=c,k=n.CesiumMath.TWO_PI,w=Math.cos(U),A=Math.sin(U);do{w=Math.cos(U),A=Math.sin(U);const t=m-H*w;let a;q=Math.sqrt(_*_*A*A+t*t),O=C+f*w,v=Math.atan2(q,O),0===q?(a=0,S=1):(a=f*A/q,S=1-a*a),k=U,b=O-2*C/S,isFinite(b)||(b=0),U=c+o(d,a,S,v,q,O,b)}while(Math.abs(U-k)>n.CesiumMath.EPSILON12);const R=S*(a*a-i*i)/(i*i),y=1+R*(4096+R*(R*(320-175*R)-768))/16384,E=R*(256+R*(R*(74-47*R)-128))/1024,P=b*b,x=E*q*(b+E*(O*(2*P-1)-E*b*(4*q*q-3)*(4*P-3)/6)/4),D=i*y*(v-x),T=Math.atan2(_*A,m-H*w),I=Math.atan2(M*A,m*w-H);t._distance=D,t._startHeading=T,t._endHeading=I,t._uSquared=R}const d=new a.Cartesian3,c=new a.Cartesian3;function u(t,e,n,h){const o=a.Cartesian3.normalize(h.cartographicToCartesian(e,c),d),u=a.Cartesian3.normalize(h.cartographicToCartesian(n,c),c);i.Check.typeOf.number.greaterThanOrEquals("value",Math.abs(Math.abs(a.Cartesian3.angleBetween(o,u))-Math.PI),.0125),r(t,h.maximumRadius,h.minimumRadius,e.longitude,e.latitude,n.longitude,n.latitude),t._start=a.Cartographic.clone(e,t._start),t._end=a.Cartographic.clone(n,t._end),t._start.height=0,t._end.height=0,s(t)}function l(t,i,n){const s=e.defaultValue(n,a.Ellipsoid.WGS84);this._ellipsoid=s,this._start=new a.Cartographic,this._end=new a.Cartographic,this._constants={},this._startHeading=void 0,this._endHeading=void 0,this._distance=void 0,this._uSquared=void 0,e.defined(t)&&e.defined(i)&&u(this,t,i,s)}Object.defineProperties(l.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return i.Check.defined("distance",this._distance),this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},startHeading:{get:function(){return i.Check.defined("distance",this._distance),this._startHeading}},endHeading:{get:function(){return i.Check.defined("distance",this._distance),this._endHeading}}}),l.prototype.setEndPoints=function(t,a){i.Check.defined("start",t),i.Check.defined("end",a),u(this,t,a,this._ellipsoid)},l.prototype.interpolateUsingFraction=function(t,a){return this.interpolateUsingSurfaceDistance(this._distance*t,a)},l.prototype.interpolateUsingSurfaceDistance=function(t,n){i.Check.defined("distance",this._distance);const s=this._constants,h=s.distanceRatio+t/s.b,r=Math.cos(2*h),d=Math.cos(4*h),c=Math.cos(6*h),u=Math.sin(2*h),l=Math.sin(4*h),M=Math.sin(6*h),g=Math.sin(8*h),_=h*h,p=h*_,f=s.u8Over256,m=s.u2Over4,C=s.u6Over64,H=s.u4Over16;let v=2*p*f*r/3+h*(1-m+7*H/4-15*C/4+579*f/64-(H-15*C/4+187*f/16)*r-(5*C/4-115*f/16)*d-29*f*c/16)+(m/2-H+71*C/32-85*f/16)*u+(5*H/16-5*C/4+383*f/96)*l-_*((C-11*f/2)*u+5*f*l/2)+(29*C/96-29*f/16)*M+539*f*g/1536;const O=Math.asin(Math.sin(v)*s.cosineAlpha),q=Math.atan(s.a/s.b*Math.tan(O));v-=s.sigma;const S=Math.cos(2*s.sigma+v),b=Math.sin(v),U=Math.cos(v),k=s.cosineU*U,w=s.sineU*b,A=Math.atan2(b*s.sineHeading,k-w*s.cosineHeading),R=A-o(s.f,s.sineAlpha,s.cosineSquaredAlpha,v,b,U,S);return e.defined(n)?(n.longitude=this._start.longitude+R,n.latitude=q,n.height=0,n):new a.Cartographic(this._start.longitude+R,q,0)},t.EllipsoidGeodesic=l}));
\ No newline at end of file
define(["exports","./Transforms-3ac41eb6","./Matrix2-fc7e9822","./ComponentDatatype-4a60b8d6","./defaultValue-94c3e563","./RuntimeError-c581ca93","./GeometryAttribute-a441ff32","./GeometryAttributes-7df9bef6","./GeometryOffsetAttribute-ec11b721","./IndexDatatype-db156785","./VertexFormat-e46f29d6"],(function(t,e,a,n,i,r,o,s,m,u,l){"use strict";const c=new a.Cartesian3,f=new a.Cartesian3,d=new a.Cartesian3,p=new a.Cartesian3,C=new a.Cartesian3,y=new a.Cartesian3(1,1,1),h=Math.cos,_=Math.sin;function x(t){t=i.defaultValue(t,i.defaultValue.EMPTY_OBJECT);const e=i.defaultValue(t.radii,y),o=i.defaultValue(t.innerRadii,e),s=i.defaultValue(t.minimumClock,0),m=i.defaultValue(t.maximumClock,n.CesiumMath.TWO_PI),u=i.defaultValue(t.minimumCone,0),c=i.defaultValue(t.maximumCone,n.CesiumMath.PI),f=Math.round(i.defaultValue(t.stackPartitions,64)),d=Math.round(i.defaultValue(t.slicePartitions,64)),p=i.defaultValue(t.vertexFormat,l.VertexFormat.DEFAULT);if(d<3)throw new r.DeveloperError("options.slicePartitions cannot be less than three.");if(f<3)throw new r.DeveloperError("options.stackPartitions cannot be less than three.");this._radii=a.Cartesian3.clone(e),this._innerRadii=a.Cartesian3.clone(o),this._minimumClock=s,this._maximumClock=m,this._minimumCone=u,this._maximumCone=c,this._stackPartitions=f,this._slicePartitions=d,this._vertexFormat=l.VertexFormat.clone(p),this._offsetAttribute=t.offsetAttribute,this._workerName="createEllipsoidGeometry"}x.packedLength=2*a.Cartesian3.packedLength+l.VertexFormat.packedLength+7,x.pack=function(t,e,n){if(!i.defined(t))throw new r.DeveloperError("value is required");if(!i.defined(e))throw new r.DeveloperError("array is required");return n=i.defaultValue(n,0),a.Cartesian3.pack(t._radii,e,n),n+=a.Cartesian3.packedLength,a.Cartesian3.pack(t._innerRadii,e,n),n+=a.Cartesian3.packedLength,l.VertexFormat.pack(t._vertexFormat,e,n),n+=l.VertexFormat.packedLength,e[n++]=t._minimumClock,e[n++]=t._maximumClock,e[n++]=t._minimumCone,e[n++]=t._maximumCone,e[n++]=t._stackPartitions,e[n++]=t._slicePartitions,e[n]=i.defaultValue(t._offsetAttribute,-1),e};const A=new a.Cartesian3,b=new a.Cartesian3,w=new l.VertexFormat,k={radii:A,innerRadii:b,vertexFormat:w,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,offsetAttribute:void 0};let v;x.unpack=function(t,e,n){if(!i.defined(t))throw new r.DeveloperError("array is required");e=i.defaultValue(e,0);const o=a.Cartesian3.unpack(t,e,A);e+=a.Cartesian3.packedLength;const s=a.Cartesian3.unpack(t,e,b);e+=a.Cartesian3.packedLength;const m=l.VertexFormat.unpack(t,e,w);e+=l.VertexFormat.packedLength;const u=t[e++],c=t[e++],f=t[e++],d=t[e++],p=t[e++],C=t[e++],y=t[e];return i.defined(n)?(n._radii=a.Cartesian3.clone(o,n._radii),n._innerRadii=a.Cartesian3.clone(s,n._innerRadii),n._vertexFormat=l.VertexFormat.clone(m,n._vertexFormat),n._minimumClock=u,n._maximumClock=c,n._minimumCone=f,n._maximumCone=d,n._stackPartitions=p,n._slicePartitions=C,n._offsetAttribute=-1===y?void 0:y,n):(k.minimumClock=u,k.maximumClock=c,k.minimumCone=f,k.maximumCone=d,k.stackPartitions=p,k.slicePartitions=C,k.offsetAttribute=-1===y?void 0:y,new x(k))},x.createGeometry=function(t){const r=t._radii;if(r.x<=0||r.y<=0||r.z<=0)return;const l=t._innerRadii;if(l.x<=0||l.y<=0||l.z<=0)return;const y=t._minimumClock,x=t._maximumClock,A=t._minimumCone,b=t._maximumCone,w=t._vertexFormat;let k,v,P=t._slicePartitions+1,g=t._stackPartitions+1;P=Math.round(P*Math.abs(x-y)/n.CesiumMath.TWO_PI),g=Math.round(g*Math.abs(b-A)/n.CesiumMath.PI),P<2&&(P=2),g<2&&(g=2);let F=0;const V=[A],D=[y];for(k=0;k<g;k++)V.push(A+k*(b-A)/(g-1));for(V.push(b),v=0;v<P;v++)D.push(y+v*(x-y)/(P-1));D.push(x);const E=V.length,M=D.length;let T=0,G=1;const L=l.x!==r.x||l.y!==r.y||l.z!==r.z;let O=!1,I=!1,z=!1;L&&(G=2,A>0&&(O=!0,T+=P-1),b<Math.PI&&(I=!0,T+=P-1),(x-y)%n.CesiumMath.TWO_PI?(z=!0,T+=2*(g-1)+1):T+=1);const N=M*E*G,R=new Float64Array(3*N),U=new Array(N).fill(!1),S=new Array(N).fill(!1),B=P*g*G,W=6*(B+T+1-(P+g)*G),q=u.IndexDatatype.createTypedArray(B,W),Y=w.normal?new Float32Array(3*N):void 0,J=w.tangent?new Float32Array(3*N):void 0,X=w.bitangent?new Float32Array(3*N):void 0,Z=w.st?new Float32Array(2*N):void 0,j=new Array(E),H=new Array(E);for(k=0;k<E;k++)j[k]=_(V[k]),H[k]=h(V[k]);const K=new Array(M),Q=new Array(M);for(v=0;v<M;v++)Q[v]=h(D[v]),K[v]=_(D[v]);for(k=0;k<E;k++)for(v=0;v<M;v++)R[F++]=r.x*j[k]*Q[v],R[F++]=r.y*j[k]*K[v],R[F++]=r.z*H[k];let $,tt,et,at,nt=N/2;if(L)for(k=0;k<E;k++)for(v=0;v<M;v++)R[F++]=l.x*j[k]*Q[v],R[F++]=l.y*j[k]*K[v],R[F++]=l.z*H[k],U[nt]=!0,k>0&&k!==E-1&&0!==v&&v!==M-1&&(S[nt]=!0),nt++;for(F=0,k=1;k<E-2;k++)for($=k*M,tt=(k+1)*M,v=1;v<M-2;v++)q[F++]=tt+v,q[F++]=tt+v+1,q[F++]=$+v+1,q[F++]=tt+v,q[F++]=$+v+1,q[F++]=$+v;if(L){const t=E*M;for(k=1;k<E-2;k++)for($=t+k*M,tt=t+(k+1)*M,v=1;v<M-2;v++)q[F++]=tt+v,q[F++]=$+v,q[F++]=$+v+1,q[F++]=tt+v,q[F++]=$+v+1,q[F++]=tt+v+1}if(L){if(O)for(at=E*M,k=1;k<M-2;k++)q[F++]=k,q[F++]=k+1,q[F++]=at+k+1,q[F++]=k,q[F++]=at+k+1,q[F++]=at+k;if(I)for(et=E*M-M,at=E*M*G-M,k=1;k<M-2;k++)q[F++]=et+k+1,q[F++]=et+k,q[F++]=at+k,q[F++]=et+k+1,q[F++]=at+k,q[F++]=at+k+1}if(z){for(k=1;k<E-2;k++)at=M*E+M*k,et=M*k,q[F++]=at,q[F++]=et+M,q[F++]=et,q[F++]=at,q[F++]=at+M,q[F++]=et+M;for(k=1;k<E-2;k++)at=M*E+M*(k+1)-1,et=M*(k+1)-1,q[F++]=et+M,q[F++]=at,q[F++]=et,q[F++]=et+M,q[F++]=at+M,q[F++]=at}const it=new s.GeometryAttributes;w.position&&(it.position=new o.GeometryAttribute({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:R}));let rt=0,ot=0,st=0,mt=0;const ut=N/2;let lt;const ct=a.Ellipsoid.fromCartesian3(r),ft=a.Ellipsoid.fromCartesian3(l);if(w.st||w.normal||w.tangent||w.bitangent){for(k=0;k<N;k++){lt=U[k]?ft:ct;const t=a.Cartesian3.fromArray(R,3*k,c),e=lt.geodeticSurfaceNormal(t,f);if(S[k]&&a.Cartesian3.negate(e,e),w.st){const t=a.Cartesian2.negate(e,C);Z[rt++]=Math.atan2(t.y,t.x)/n.CesiumMath.TWO_PI+.5,Z[rt++]=Math.asin(e.z)/Math.PI+.5}if(w.normal&&(Y[ot++]=e.x,Y[ot++]=e.y,Y[ot++]=e.z),w.tangent||w.bitangent){const t=d;let n,i=0;if(U[k]&&(i=ut),n=!O&&k>=i&&k<i+2*M?a.Cartesian3.UNIT_X:a.Cartesian3.UNIT_Z,a.Cartesian3.cross(n,e,t),a.Cartesian3.normalize(t,t),w.tangent&&(J[st++]=t.x,J[st++]=t.y,J[st++]=t.z),w.bitangent){const n=a.Cartesian3.cross(e,t,p);a.Cartesian3.normalize(n,n),X[mt++]=n.x,X[mt++]=n.y,X[mt++]=n.z}}}w.st&&(it.st=new o.GeometryAttribute({componentDatatype:n.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:Z})),w.normal&&(it.normal=new o.GeometryAttribute({componentDatatype:n.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:Y})),w.tangent&&(it.tangent=new o.GeometryAttribute({componentDatatype:n.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:J})),w.bitangent&&(it.bitangent=new o.GeometryAttribute({componentDatatype:n.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:X}))}if(i.defined(t._offsetAttribute)){const e=R.length,a=t._offsetAttribute===m.GeometryOffsetAttribute.NONE?0:1,i=new Uint8Array(e/3).fill(a);it.applyOffset=new o.GeometryAttribute({componentDatatype:n.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:i})}return new o.Geometry({attributes:it,indices:q,primitiveType:o.PrimitiveType.TRIANGLES,boundingSphere:e.BoundingSphere.fromEllipsoid(ct),offsetAttribute:t._offsetAttribute})},x.getUnitEllipsoid=function(){return i.defined(v)||(v=x.createGeometry(new x({radii:new a.Cartesian3(1,1,1),vertexFormat:l.VertexFormat.POSITION_ONLY}))),v},t.EllipsoidGeometry=x}));
\ No newline at end of file
define(["exports","./Transforms-3ac41eb6","./Matrix2-fc7e9822","./ComponentDatatype-4a60b8d6","./defaultValue-94c3e563","./RuntimeError-c581ca93","./GeometryAttribute-a441ff32","./GeometryAttributes-7df9bef6","./GeometryOffsetAttribute-ec11b721","./IndexDatatype-db156785"],(function(t,e,i,r,o,n,a,s,u,m){"use strict";const f=new i.Cartesian3(1,1,1),l=Math.cos,d=Math.sin;function c(t){t=o.defaultValue(t,o.defaultValue.EMPTY_OBJECT);const e=o.defaultValue(t.radii,f),a=o.defaultValue(t.innerRadii,e),s=o.defaultValue(t.minimumClock,0),m=o.defaultValue(t.maximumClock,r.CesiumMath.TWO_PI),l=o.defaultValue(t.minimumCone,0),d=o.defaultValue(t.maximumCone,r.CesiumMath.PI),c=Math.round(o.defaultValue(t.stackPartitions,10)),p=Math.round(o.defaultValue(t.slicePartitions,8)),C=Math.round(o.defaultValue(t.subdivisions,128));if(c<1)throw new n.DeveloperError("options.stackPartitions cannot be less than 1");if(p<0)throw new n.DeveloperError("options.slicePartitions cannot be less than 0");if(C<0)throw new n.DeveloperError("options.subdivisions must be greater than or equal to zero.");if(o.defined(t.offsetAttribute)&&t.offsetAttribute===u.GeometryOffsetAttribute.TOP)throw new n.DeveloperError("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._radii=i.Cartesian3.clone(e),this._innerRadii=i.Cartesian3.clone(a),this._minimumClock=s,this._maximumClock=m,this._minimumCone=l,this._maximumCone=d,this._stackPartitions=c,this._slicePartitions=p,this._subdivisions=C,this._offsetAttribute=t.offsetAttribute,this._workerName="createEllipsoidOutlineGeometry"}c.packedLength=2*i.Cartesian3.packedLength+8,c.pack=function(t,e,r){if(!o.defined(t))throw new n.DeveloperError("value is required");if(!o.defined(e))throw new n.DeveloperError("array is required");return r=o.defaultValue(r,0),i.Cartesian3.pack(t._radii,e,r),r+=i.Cartesian3.packedLength,i.Cartesian3.pack(t._innerRadii,e,r),r+=i.Cartesian3.packedLength,e[r++]=t._minimumClock,e[r++]=t._maximumClock,e[r++]=t._minimumCone,e[r++]=t._maximumCone,e[r++]=t._stackPartitions,e[r++]=t._slicePartitions,e[r++]=t._subdivisions,e[r]=o.defaultValue(t._offsetAttribute,-1),e};const p=new i.Cartesian3,C=new i.Cartesian3,h={radii:p,innerRadii:C,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0,offsetAttribute:void 0};c.unpack=function(t,e,r){if(!o.defined(t))throw new n.DeveloperError("array is required");e=o.defaultValue(e,0);const a=i.Cartesian3.unpack(t,e,p);e+=i.Cartesian3.packedLength;const s=i.Cartesian3.unpack(t,e,C);e+=i.Cartesian3.packedLength;const u=t[e++],m=t[e++],f=t[e++],l=t[e++],d=t[e++],_=t[e++],b=t[e++],y=t[e];return o.defined(r)?(r._radii=i.Cartesian3.clone(a,r._radii),r._innerRadii=i.Cartesian3.clone(s,r._innerRadii),r._minimumClock=u,r._maximumClock=m,r._minimumCone=f,r._maximumCone=l,r._stackPartitions=d,r._slicePartitions=_,r._subdivisions=b,r._offsetAttribute=-1===y?void 0:y,r):(h.minimumClock=u,h.maximumClock=m,h.minimumCone=f,h.maximumCone=l,h.stackPartitions=d,h.slicePartitions=_,h.subdivisions=b,h.offsetAttribute=-1===y?void 0:y,new c(h))},c.createGeometry=function(t){const n=t._radii;if(n.x<=0||n.y<=0||n.z<=0)return;const f=t._innerRadii;if(f.x<=0||f.y<=0||f.z<=0)return;const c=t._minimumClock,p=t._maximumClock,C=t._minimumCone,h=t._maximumCone,_=t._subdivisions,b=i.Ellipsoid.fromCartesian3(n);let y=t._slicePartitions+1,k=t._stackPartitions+1;y=Math.round(y*Math.abs(p-c)/r.CesiumMath.TWO_PI),k=Math.round(k*Math.abs(h-C)/r.CesiumMath.PI),y<2&&(y=2),k<2&&(k=2);let A=0,v=1;const w=f.x!==n.x||f.y!==n.y||f.z!==n.z;let P=!1,x=!1;w&&(v=2,C>0&&(P=!0,A+=y),h<Math.PI&&(x=!0,A+=y));const E=_*v*(k+y),D=new Float64Array(3*E),M=2*(E+A-(y+k)*v),g=m.IndexDatatype.createTypedArray(E,M);let V,G,O,T,z=0;const I=new Array(k),L=new Array(k);for(V=0;V<k;V++)T=C+V*(h-C)/(k-1),I[V]=d(T),L[V]=l(T);const R=new Array(_),N=new Array(_);for(V=0;V<_;V++)O=c+V*(p-c)/(_-1),R[V]=d(O),N[V]=l(O);for(V=0;V<k;V++)for(G=0;G<_;G++)D[z++]=n.x*I[V]*N[G],D[z++]=n.y*I[V]*R[G],D[z++]=n.z*L[V];if(w)for(V=0;V<k;V++)for(G=0;G<_;G++)D[z++]=f.x*I[V]*N[G],D[z++]=f.y*I[V]*R[G],D[z++]=f.z*L[V];for(I.length=_,L.length=_,V=0;V<_;V++)T=C+V*(h-C)/(_-1),I[V]=d(T),L[V]=l(T);for(R.length=y,N.length=y,V=0;V<y;V++)O=c+V*(p-c)/(y-1),R[V]=d(O),N[V]=l(O);for(V=0;V<_;V++)for(G=0;G<y;G++)D[z++]=n.x*I[V]*N[G],D[z++]=n.y*I[V]*R[G],D[z++]=n.z*L[V];if(w)for(V=0;V<_;V++)for(G=0;G<y;G++)D[z++]=f.x*I[V]*N[G],D[z++]=f.y*I[V]*R[G],D[z++]=f.z*L[V];for(z=0,V=0;V<k*v;V++){const t=V*_;for(G=0;G<_-1;G++)g[z++]=t+G,g[z++]=t+G+1}let q=k*_*v;for(V=0;V<y;V++)for(G=0;G<_-1;G++)g[z++]=q+V+G*y,g[z++]=q+V+(G+1)*y;if(w)for(q=k*_*v+y*_,V=0;V<y;V++)for(G=0;G<_-1;G++)g[z++]=q+V+G*y,g[z++]=q+V+(G+1)*y;if(w){let t=k*_*v,e=t+_*y;if(P)for(V=0;V<y;V++)g[z++]=t+V,g[z++]=e+V;if(x)for(t+=_*y-y,e+=_*y-y,V=0;V<y;V++)g[z++]=t+V,g[z++]=e+V}const B=new s.GeometryAttributes({position:new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:D})});if(o.defined(t._offsetAttribute)){const e=D.length,i=t._offsetAttribute===u.GeometryOffsetAttribute.NONE?0:1,o=new Uint8Array(e/3).fill(i);B.applyOffset=new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:o})}return new a.Geometry({attributes:B,indices:g,primitiveType:a.PrimitiveType.LINES,boundingSphere:e.BoundingSphere.fromEllipsoid(b),offsetAttribute:t._offsetAttribute})},t.EllipsoidOutlineGeometry=c}));
\ No newline at end of file
define(["exports","./Matrix2-fc7e9822","./RuntimeError-c581ca93","./defaultValue-94c3e563","./ComponentDatatype-4a60b8d6"],(function(t,i,e,a,n){"use strict";function s(t,i,e){if(0===t)return i*e;const a=t*t,n=a*a,s=n*a,h=s*a,u=h*a,o=u*a,d=e,r=Math.sin(2*d),c=Math.sin(4*d),l=Math.sin(6*d),M=Math.sin(8*d),m=Math.sin(10*d),_=Math.sin(12*d);return i*((1-a/4-3*n/64-5*s/256-175*h/16384-441*u/65536-4851*o/1048576)*d-(3*a/8+3*n/32+45*s/1024+105*h/4096+2205*u/131072+6237*o/524288)*r+(15*n/256+45*s/1024+525*h/16384+1575*u/65536+155925*o/8388608)*c-(35*s/3072+175*h/12288+3675*u/262144+13475*o/1048576)*l+(315*h/131072+2205*u/524288+43659*o/8388608)*M-(693*u/1310720+6237*o/5242880)*m+1001*o/8388608*_)}function h(t,i,e){const a=t/e;if(0===i)return a;const n=a*a,s=n*a,h=s*a,u=i,o=u*u,d=o*o,r=d*o,c=r*o,l=c*o,M=l*o,m=Math.sin(2*a),_=Math.cos(2*a),g=Math.sin(4*a),p=Math.cos(4*a),f=Math.sin(6*a),C=Math.cos(6*a),P=Math.sin(8*a),E=Math.cos(8*a),O=Math.sin(10*a),y=Math.cos(10*a),I=Math.sin(12*a);return a+a*o/4+7*a*d/64+15*a*r/256+579*a*c/16384+1515*a*l/65536+16837*a*M/1048576+(3*a*d/16+45*a*r/256-a*(32*n-561)*c/4096-a*(232*n-1677)*l/16384+a*(399985-90560*n+512*h)*M/5242880)*_+(21*a*r/256+483*a*c/4096-a*(224*n-1969)*l/16384-a*(33152*n-112599)*M/1048576)*p+(151*a*c/4096+4681*a*l/65536+1479*a*M/16384-453*s*M/32768)*C+(1097*a*l/65536+42783*a*M/1048576)*E+8011*a*M/1048576*y+(3*o/8+3*d/16+213*r/2048-3*n*r/64+255*c/4096-33*n*c/512+20861*l/524288-33*n*l/512+h*l/1024+28273*M/1048576-471*n*M/8192+9*h*M/4096)*m+(21*d/256+21*r/256+533*c/8192-21*n*c/512+197*l/4096-315*n*l/4096+584039*M/16777216-12517*n*M/131072+7*h*M/2048)*g+(151*r/6144+151*c/4096+5019*l/131072-453*n*l/16384+26965*M/786432-8607*n*M/131072)*f+(1097*c/131072+1097*l/65536+225797*M/10485760-1097*n*M/65536)*P+(8011*l/2621440+8011*M/1048576)*O+293393*M/251658240*I}function u(t,i){if(0===t)return Math.log(Math.tan(.5*(n.CesiumMath.PI_OVER_TWO+i)));const e=t*Math.sin(i);return Math.log(Math.tan(.5*(n.CesiumMath.PI_OVER_TWO+i)))-t/2*Math.log((1+e)/(1-e))}function o(t,i,e,a,s){const h=u(t._ellipticity,e),o=u(t._ellipticity,s);return Math.atan2(n.CesiumMath.negativePiToPi(a-i),o-h)}function d(t,i,e,a,h,u,o){const d=t._heading,r=u-a;let c=0;if(n.CesiumMath.equalsEpsilon(Math.abs(d),n.CesiumMath.PI_OVER_TWO,n.CesiumMath.EPSILON8))if(i===e)c=i*Math.cos(h)*n.CesiumMath.negativePiToPi(r);else{const e=Math.sin(h);c=i*Math.cos(h)*n.CesiumMath.negativePiToPi(r)/Math.sqrt(1-t._ellipticitySquared*e*e)}else{const e=s(t._ellipticity,i,h),a=s(t._ellipticity,i,o);c=(a-e)/Math.cos(d)}return Math.abs(c)}const r=new i.Cartesian3,c=new i.Cartesian3;function l(t,a,n,s){const h=i.Cartesian3.normalize(s.cartographicToCartesian(a,c),r),u=i.Cartesian3.normalize(s.cartographicToCartesian(n,c),c);e.Check.typeOf.number.greaterThanOrEquals("value",Math.abs(Math.abs(i.Cartesian3.angleBetween(h,u))-Math.PI),.0125);const l=s.maximumRadius,M=s.minimumRadius,m=l*l,_=M*M;t._ellipticitySquared=(m-_)/m,t._ellipticity=Math.sqrt(t._ellipticitySquared),t._start=i.Cartographic.clone(a,t._start),t._start.height=0,t._end=i.Cartographic.clone(n,t._end),t._end.height=0,t._heading=o(t,a.longitude,a.latitude,n.longitude,n.latitude),t._distance=d(t,s.maximumRadius,s.minimumRadius,a.longitude,a.latitude,n.longitude,n.latitude)}function M(t,e,o,d,r,c){if(0===o)return i.Cartographic.clone(t,c);const l=r*r;let M,m,_;if(Math.abs(n.CesiumMath.PI_OVER_TWO-Math.abs(e))>n.CesiumMath.EPSILON8){const i=s(r,d,t.latitude),a=o*Math.cos(e),c=i+a;m=h(c,r,d);const l=u(r,t.latitude),g=u(r,m);_=Math.tan(e)*(g-l),M=n.CesiumMath.negativePiToPi(t.longitude+_)}else{let i;if(m=t.latitude,0===r)i=d*Math.cos(t.latitude);else{const e=Math.sin(t.latitude);i=d*Math.cos(t.latitude)/Math.sqrt(1-l*e*e)}_=o/i,M=e>0?n.CesiumMath.negativePiToPi(t.longitude+_):n.CesiumMath.negativePiToPi(t.longitude-_)}return a.defined(c)?(c.longitude=M,c.latitude=m,c.height=0,c):new i.Cartographic(M,m,0)}function m(t,e,n){const s=a.defaultValue(n,i.Ellipsoid.WGS84);this._ellipsoid=s,this._start=new i.Cartographic,this._end=new i.Cartographic,this._heading=void 0,this._distance=void 0,this._ellipticity=void 0,this._ellipticitySquared=void 0,a.defined(t)&&a.defined(e)&&l(this,t,e,s)}Object.defineProperties(m.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return e.Check.defined("distance",this._distance),this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},heading:{get:function(){return e.Check.defined("distance",this._distance),this._heading}}}),m.fromStartHeadingDistance=function(t,s,h,u,o){e.Check.defined("start",t),e.Check.defined("heading",s),e.Check.defined("distance",h),e.Check.typeOf.number.greaterThan("distance",h,0);const d=a.defaultValue(u,i.Ellipsoid.WGS84),r=d.maximumRadius,c=d.minimumRadius,l=r*r,_=c*c,g=Math.sqrt((l-_)/l);s=n.CesiumMath.negativePiToPi(s);const p=M(t,s,h,d.maximumRadius,g);return!a.defined(o)||a.defined(u)&&!u.equals(o.ellipsoid)?new m(t,p,d):(o.setEndPoints(t,p),o)},m.prototype.setEndPoints=function(t,i){e.Check.defined("start",t),e.Check.defined("end",i),l(this,t,i,this._ellipsoid)},m.prototype.interpolateUsingFraction=function(t,i){return this.interpolateUsingSurfaceDistance(t*this._distance,i)},m.prototype.interpolateUsingSurfaceDistance=function(t,i){if(e.Check.typeOf.number("distance",t),!a.defined(this._distance)||0===this._distance)throw new e.DeveloperError("EllipsoidRhumbLine must have distinct start and end set.");return M(this._start,this._heading,t,this._ellipsoid.maximumRadius,this._ellipticity,i)},m.prototype.findIntersectionWithLongitude=function(t,s){if(e.Check.typeOf.number("intersectionLongitude",t),!a.defined(this._distance)||0===this._distance)throw new e.DeveloperError("EllipsoidRhumbLine must have distinct start and end set.");const h=this._ellipticity,u=this._heading,o=Math.abs(u),d=this._start;if(t=n.CesiumMath.negativePiToPi(t),n.CesiumMath.equalsEpsilon(Math.abs(t),Math.PI,n.CesiumMath.EPSILON14)&&(t=n.CesiumMath.sign(d.longitude)*Math.PI),a.defined(s)||(s=new i.Cartographic),Math.abs(n.CesiumMath.PI_OVER_TWO-o)<=n.CesiumMath.EPSILON8)return s.longitude=t,s.latitude=d.latitude,s.height=0,s;if(n.CesiumMath.equalsEpsilon(Math.abs(n.CesiumMath.PI_OVER_TWO-o),n.CesiumMath.PI_OVER_TWO,n.CesiumMath.EPSILON8)){if(n.CesiumMath.equalsEpsilon(t,d.longitude,n.CesiumMath.EPSILON12))return;return s.longitude=t,s.latitude=n.CesiumMath.PI_OVER_TWO*n.CesiumMath.sign(n.CesiumMath.PI_OVER_TWO-u),s.height=0,s}const r=d.latitude,c=h*Math.sin(r),l=Math.tan(.5*(n.CesiumMath.PI_OVER_TWO+r))*Math.exp((t-d.longitude)/Math.tan(u)),M=(1+c)/(1-c);let m,_=d.latitude;do{m=_;const t=h*Math.sin(m),i=(1+t)/(1-t);_=2*Math.atan(l*Math.pow(i/M,h/2))-n.CesiumMath.PI_OVER_TWO}while(!n.CesiumMath.equalsEpsilon(_,m,n.CesiumMath.EPSILON12));return s.longitude=t,s.latitude=_,s.height=0,s},m.prototype.findIntersectionWithLatitude=function(t,s){if(e.Check.typeOf.number("intersectionLatitude",t),!a.defined(this._distance)||0===this._distance)throw new e.DeveloperError("EllipsoidRhumbLine must have distinct start and end set.");const h=this._ellipticity,o=this._heading,d=this._start;if(n.CesiumMath.equalsEpsilon(Math.abs(o),n.CesiumMath.PI_OVER_TWO,n.CesiumMath.EPSILON8))return;const r=u(h,d.latitude),c=u(h,t),l=Math.tan(o)*(c-r),M=n.CesiumMath.negativePiToPi(d.longitude+l);return a.defined(s)?(s.longitude=M,s.latitude=t,s.height=0,s):new i.Cartographic(M,t,0)},t.EllipsoidRhumbLine=m}));
\ No newline at end of file
define(["exports","./AxisAlignedBoundingBox-7a3018c0","./Matrix2-fc7e9822","./RuntimeError-c581ca93","./defaultValue-94c3e563","./IntersectionTests-68fbc42d","./Plane-e20fba8c","./Transforms-3ac41eb6"],(function(e,t,n,i,o,r,s,a){"use strict";const c=new n.Cartesian4;function l(e,t){if(i.Check.defined("origin",e),t=o.defaultValue(t,n.Ellipsoid.WGS84),e=t.scaleToGeodeticSurface(e),!o.defined(e))throw new i.DeveloperError("origin must not be at the center of the ellipsoid.");const r=a.Transforms.eastNorthUpToFixedFrame(e,t);this._ellipsoid=t,this._origin=e,this._xAxis=n.Cartesian3.fromCartesian4(n.Matrix4.getColumn(r,0,c)),this._yAxis=n.Cartesian3.fromCartesian4(n.Matrix4.getColumn(r,1,c));const l=n.Cartesian3.fromCartesian4(n.Matrix4.getColumn(r,2,c));this._plane=s.Plane.fromPointNormal(e,l)}Object.defineProperties(l.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},origin:{get:function(){return this._origin}},plane:{get:function(){return this._plane}},xAxis:{get:function(){return this._xAxis}},yAxis:{get:function(){return this._yAxis}},zAxis:{get:function(){return this._plane.normal}}});const d=new t.AxisAlignedBoundingBox;l.fromPoints=function(e,n){i.Check.defined("cartesians",e);const o=t.AxisAlignedBoundingBox.fromPoints(e,d);return new l(o.center,n)};const f=new r.Ray,p=new n.Cartesian3;l.prototype.projectPointOntoPlane=function(e,t){i.Check.defined("cartesian",e);const s=f;s.origin=e,n.Cartesian3.normalize(e,s.direction);let a=r.IntersectionTests.rayPlane(s,this._plane,p);if(o.defined(a)||(n.Cartesian3.negate(s.direction,s.direction),a=r.IntersectionTests.rayPlane(s,this._plane,p)),o.defined(a)){const e=n.Cartesian3.subtract(a,this._origin,a),i=n.Cartesian3.dot(this._xAxis,e),r=n.Cartesian3.dot(this._yAxis,e);return o.defined(t)?(t.x=i,t.y=r,t):new n.Cartesian2(i,r)}},l.prototype.projectPointsOntoPlane=function(e,t){i.Check.defined("cartesians",e),o.defined(t)||(t=[]);let n=0;const r=e.length;for(let i=0;i<r;i++){const r=this.projectPointOntoPlane(e[i],t[n]);o.defined(r)&&(t[n]=r,n++)}return t.length=n,t},l.prototype.projectPointToNearestOnPlane=function(e,t){i.Check.defined("cartesian",e),o.defined(t)||(t=new n.Cartesian2);const s=f;s.origin=e,n.Cartesian3.clone(this._plane.normal,s.direction);let a=r.IntersectionTests.rayPlane(s,this._plane,p);o.defined(a)||(n.Cartesian3.negate(s.direction,s.direction),a=r.IntersectionTests.rayPlane(s,this._plane,p));const c=n.Cartesian3.subtract(a,this._origin,a),l=n.Cartesian3.dot(this._xAxis,c),d=n.Cartesian3.dot(this._yAxis,c);return t.x=l,t.y=d,t},l.prototype.projectPointsToNearestOnPlane=function(e,t){i.Check.defined("cartesians",e),o.defined(t)||(t=[]);const n=e.length;t.length=n;for(let i=0;i<n;i++)t[i]=this.projectPointToNearestOnPlane(e[i],t[i]);return t};const h=new n.Cartesian3;l.prototype.projectPointOntoEllipsoid=function(e,t){i.Check.defined("cartesian",e),o.defined(t)||(t=new n.Cartesian3);const r=this._ellipsoid,s=this._origin,a=this._xAxis,c=this._yAxis,l=h;return n.Cartesian3.multiplyByScalar(a,e.x,l),t=n.Cartesian3.add(s,l,t),n.Cartesian3.multiplyByScalar(c,e.y,l),n.Cartesian3.add(t,l,t),r.scaleToGeocentricSurface(t,t),t},l.prototype.projectPointsOntoEllipsoid=function(e,t){i.Check.defined("cartesians",e);const n=e.length;o.defined(t)?t.length=n:t=new Array(n);for(let i=0;i<n;++i)t[i]=this.projectPointOntoEllipsoid(e[i],t[i]);return t},e.EllipsoidTangentPlane=l}));
\ No newline at end of file
define(["exports","./Matrix2-fc7e9822","./RuntimeError-c581ca93","./defaultValue-94c3e563"],(function(e,n,t,i){"use strict";function o(){this.high=n.Cartesian3.clone(n.Cartesian3.ZERO),this.low=n.Cartesian3.clone(n.Cartesian3.ZERO)}o.encode=function(e,n){let o;return t.Check.typeOf.number("value",e),i.defined(n)||(n={high:0,low:0}),e>=0?(o=65536*Math.floor(e/65536),n.high=o,n.low=e-o):(o=65536*Math.floor(-e/65536),n.high=-o,n.low=e+o),n};const r={high:0,low:0};o.fromCartesian=function(e,n){t.Check.typeOf.object("cartesian",e),i.defined(n)||(n=new o);const h=n.high,a=n.low;return o.encode(e.x,r),h.x=r.high,a.x=r.low,o.encode(e.y,r),h.y=r.high,a.y=r.low,o.encode(e.z,r),h.z=r.high,a.z=r.low,n};const h=new o;o.writeElements=function(e,n,i){t.Check.defined("cartesianArray",n),t.Check.typeOf.number("index",i),t.Check.typeOf.number.greaterThanOrEquals("index",i,0),o.fromCartesian(e,h);const r=h.high,a=h.low;n[i]=r.x,n[i+1]=r.y,n[i+2]=r.z,n[i+3]=a.x,n[i+4]=a.y,n[i+5]=a.z},e.EncodedCartesian3=o}));
\ No newline at end of file
define(["exports","./Transforms-3ac41eb6","./Matrix2-fc7e9822","./RuntimeError-c581ca93","./ComponentDatatype-4a60b8d6","./defaultValue-94c3e563","./GeometryAttribute-a441ff32","./GeometryAttributes-7df9bef6","./Plane-e20fba8c","./VertexFormat-e46f29d6"],(function(e,t,r,i,n,a,o,s,f,u){"use strict";function d(e){this.planes=a.defaultValue(e,[])}const l=[new r.Cartesian3,new r.Cartesian3,new r.Cartesian3];r.Cartesian3.clone(r.Cartesian3.UNIT_X,l[0]),r.Cartesian3.clone(r.Cartesian3.UNIT_Y,l[1]),r.Cartesian3.clone(r.Cartesian3.UNIT_Z,l[2]);const h=new r.Cartesian3,p=new r.Cartesian3,c=new f.Plane(new r.Cartesian3(1,0,0),0);function m(e){e=a.defaultValue(e,a.defaultValue.EMPTY_OBJECT),this.left=e.left,this._left=void 0,this.right=e.right,this._right=void 0,this.top=e.top,this._top=void 0,this.bottom=e.bottom,this._bottom=void 0,this.near=a.defaultValue(e.near,1),this._near=this.near,this.far=a.defaultValue(e.far,5e8),this._far=this.far,this._cullingVolume=new d,this._orthographicMatrix=new r.Matrix4}function C(e){if(!a.defined(e.right)||!a.defined(e.left)||!a.defined(e.top)||!a.defined(e.bottom)||!a.defined(e.near)||!a.defined(e.far))throw new i.DeveloperError("right, left, top, bottom, near, or far parameters are not set.");if(e.top!==e._top||e.bottom!==e._bottom||e.left!==e._left||e.right!==e._right||e.near!==e._near||e.far!==e._far){if(e.left>e.right)throw new i.DeveloperError("right must be greater than left.");if(e.bottom>e.top)throw new i.DeveloperError("top must be greater than bottom.");if(e.near<=0||e.near>e.far)throw new i.DeveloperError("near must be greater than zero and less than far.");e._left=e.left,e._right=e.right,e._top=e.top,e._bottom=e.bottom,e._near=e.near,e._far=e.far,e._orthographicMatrix=r.Matrix4.computeOrthographicOffCenter(e.left,e.right,e.bottom,e.top,e.near,e.far,e._orthographicMatrix)}}d.fromBoundingSphere=function(e,t){if(!a.defined(e))throw new i.DeveloperError("boundingSphere is required.");a.defined(t)||(t=new d);const n=l.length,o=t.planes;o.length=2*n;const s=e.center,f=e.radius;let u=0;for(let i=0;i<n;++i){const e=l[i];let t=o[u],n=o[u+1];a.defined(t)||(t=o[u]=new r.Cartesian4),a.defined(n)||(n=o[u+1]=new r.Cartesian4),r.Cartesian3.multiplyByScalar(e,-f,h),r.Cartesian3.add(s,h,h),t.x=e.x,t.y=e.y,t.z=e.z,t.w=-r.Cartesian3.dot(e,h),r.Cartesian3.multiplyByScalar(e,f,h),r.Cartesian3.add(s,h,h),n.x=-e.x,n.y=-e.y,n.z=-e.z,n.w=-r.Cartesian3.dot(r.Cartesian3.negate(e,p),h),u+=2}return t},d.prototype.computeVisibility=function(e){if(!a.defined(e))throw new i.DeveloperError("boundingVolume is required.");const r=this.planes;let n=!1;for(let i=0,a=r.length;i<a;++i){const a=e.intersectPlane(f.Plane.fromCartesian4(r[i],c));if(a===t.Intersect.OUTSIDE)return t.Intersect.OUTSIDE;a===t.Intersect.INTERSECTING&&(n=!0)}return n?t.Intersect.INTERSECTING:t.Intersect.INSIDE},d.prototype.computeVisibilityWithPlaneMask=function(e,r){if(!a.defined(e))throw new i.DeveloperError("boundingVolume is required.");if(!a.defined(r))throw new i.DeveloperError("parentPlaneMask is required.");if(r===d.MASK_OUTSIDE||r===d.MASK_INSIDE)return r;let n=d.MASK_INSIDE;const o=this.planes;for(let i=0,a=o.length;i<a;++i){const a=i<31?1<<i:0;if(i<31&&0===(r&a))continue;const s=e.intersectPlane(f.Plane.fromCartesian4(o[i],c));if(s===t.Intersect.OUTSIDE)return d.MASK_OUTSIDE;s===t.Intersect.INTERSECTING&&(n|=a)}return n},d.MASK_OUTSIDE=4294967295,d.MASK_INSIDE=0,d.MASK_INDETERMINATE=2147483647,Object.defineProperties(m.prototype,{projectionMatrix:{get:function(){return C(this),this._orthographicMatrix}}});const w=new r.Cartesian3,_=new r.Cartesian3,y=new r.Cartesian3,g=new r.Cartesian3;function v(e){e=a.defaultValue(e,a.defaultValue.EMPTY_OBJECT),this._offCenterFrustum=new m,this.width=e.width,this._width=void 0,this.aspectRatio=e.aspectRatio,this._aspectRatio=void 0,this.near=a.defaultValue(e.near,1),this._near=this.near,this.far=a.defaultValue(e.far,5e8),this._far=this.far}function x(e){if(!a.defined(e.width)||!a.defined(e.aspectRatio)||!a.defined(e.near)||!a.defined(e.far))throw new i.DeveloperError("width, aspectRatio, near, or far parameters are not set.");const t=e._offCenterFrustum;if(e.width!==e._width||e.aspectRatio!==e._aspectRatio||e.near!==e._near||e.far!==e._far){if(e.aspectRatio<0)throw new i.DeveloperError("aspectRatio must be positive.");if(e.near<0||e.near>e.far)throw new i.DeveloperError("near must be greater than zero and less than far.");e._aspectRatio=e.aspectRatio,e._width=e.width,e._near=e.near,e._far=e.far;const r=1/e.aspectRatio;t.right=.5*e.width,t.left=-t.right,t.top=r*t.right,t.bottom=-t.top,t.near=e.near,t.far=e.far}}function b(e){e=a.defaultValue(e,a.defaultValue.EMPTY_OBJECT),this.left=e.left,this._left=void 0,this.right=e.right,this._right=void 0,this.top=e.top,this._top=void 0,this.bottom=e.bottom,this._bottom=void 0,this.near=a.defaultValue(e.near,1),this._near=this.near,this.far=a.defaultValue(e.far,5e8),this._far=this.far,this._cullingVolume=new d,this._perspectiveMatrix=new r.Matrix4,this._infinitePerspective=new r.Matrix4}function E(e){if(!a.defined(e.right)||!a.defined(e.left)||!a.defined(e.top)||!a.defined(e.bottom)||!a.defined(e.near)||!a.defined(e.far))throw new i.DeveloperError("right, left, top, bottom, near, or far parameters are not set.");const t=e.top,n=e.bottom,o=e.right,s=e.left,f=e.near,u=e.far;if(t!==e._top||n!==e._bottom||s!==e._left||o!==e._right||f!==e._near||u!==e._far){if(e.near<=0||e.near>e.far)throw new i.DeveloperError("near must be greater than zero and less than far.");e._left=s,e._right=o,e._top=t,e._bottom=n,e._near=f,e._far=u,e._perspectiveMatrix=r.Matrix4.computePerspectiveOffCenter(s,o,n,t,f,u,e._perspectiveMatrix),e._infinitePerspective=r.Matrix4.computeInfinitePerspectiveOffCenter(s,o,n,t,f,e._infinitePerspective)}}m.prototype.computeCullingVolume=function(e,t,n){if(!a.defined(e))throw new i.DeveloperError("position is required.");if(!a.defined(t))throw new i.DeveloperError("direction is required.");if(!a.defined(n))throw new i.DeveloperError("up is required.");const o=this._cullingVolume.planes,s=this.top,f=this.bottom,u=this.right,d=this.left,l=this.near,h=this.far,p=r.Cartesian3.cross(t,n,w);r.Cartesian3.normalize(p,p);const c=_;r.Cartesian3.multiplyByScalar(t,l,c),r.Cartesian3.add(e,c,c);const m=y;r.Cartesian3.multiplyByScalar(p,d,m),r.Cartesian3.add(c,m,m);let C=o[0];return a.defined(C)||(C=o[0]=new r.Cartesian4),C.x=p.x,C.y=p.y,C.z=p.z,C.w=-r.Cartesian3.dot(p,m),r.Cartesian3.multiplyByScalar(p,u,m),r.Cartesian3.add(c,m,m),C=o[1],a.defined(C)||(C=o[1]=new r.Cartesian4),C.x=-p.x,C.y=-p.y,C.z=-p.z,C.w=-r.Cartesian3.dot(r.Cartesian3.negate(p,g),m),r.Cartesian3.multiplyByScalar(n,f,m),r.Cartesian3.add(c,m,m),C=o[2],a.defined(C)||(C=o[2]=new r.Cartesian4),C.x=n.x,C.y=n.y,C.z=n.z,C.w=-r.Cartesian3.dot(n,m),r.Cartesian3.multiplyByScalar(n,s,m),r.Cartesian3.add(c,m,m),C=o[3],a.defined(C)||(C=o[3]=new r.Cartesian4),C.x=-n.x,C.y=-n.y,C.z=-n.z,C.w=-r.Cartesian3.dot(r.Cartesian3.negate(n,g),m),C=o[4],a.defined(C)||(C=o[4]=new r.Cartesian4),C.x=t.x,C.y=t.y,C.z=t.z,C.w=-r.Cartesian3.dot(t,c),r.Cartesian3.multiplyByScalar(t,h,m),r.Cartesian3.add(e,m,m),C=o[5],a.defined(C)||(C=o[5]=new r.Cartesian4),C.x=-t.x,C.y=-t.y,C.z=-t.z,C.w=-r.Cartesian3.dot(r.Cartesian3.negate(t,g),m),this._cullingVolume},m.prototype.getPixelDimensions=function(e,t,r,n,o){if(C(this),!a.defined(e)||!a.defined(t))throw new i.DeveloperError("Both drawingBufferWidth and drawingBufferHeight are required.");if(e<=0)throw new i.DeveloperError("drawingBufferWidth must be greater than zero.");if(t<=0)throw new i.DeveloperError("drawingBufferHeight must be greater than zero.");if(!a.defined(r))throw new i.DeveloperError("distance is required.");if(!a.defined(n))throw new i.DeveloperError("pixelRatio is required.");if(n<=0)throw new i.DeveloperError("pixelRatio must be greater than zero.");if(!a.defined(o))throw new i.DeveloperError("A result object is required.");const s=this.right-this.left,f=this.top-this.bottom,u=n*s/e,d=n*f/t;return o.x=u,o.y=d,o},m.prototype.clone=function(e){return a.defined(e)||(e=new m),e.left=this.left,e.right=this.right,e.top=this.top,e.bottom=this.bottom,e.near=this.near,e.far=this.far,e._left=void 0,e._right=void 0,e._top=void 0,e._bottom=void 0,e._near=void 0,e._far=void 0,e},m.prototype.equals=function(e){return a.defined(e)&&e instanceof m&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far},m.prototype.equalsEpsilon=function(e,t,r){return e===this||a.defined(e)&&e instanceof m&&n.CesiumMath.equalsEpsilon(this.right,e.right,t,r)&&n.CesiumMath.equalsEpsilon(this.left,e.left,t,r)&&n.CesiumMath.equalsEpsilon(this.top,e.top,t,r)&&n.CesiumMath.equalsEpsilon(this.bottom,e.bottom,t,r)&&n.CesiumMath.equalsEpsilon(this.near,e.near,t,r)&&n.CesiumMath.equalsEpsilon(this.far,e.far,t,r)},v.packedLength=4,v.pack=function(e,t,r){return i.Check.typeOf.object("value",e),i.Check.defined("array",t),r=a.defaultValue(r,0),t[r++]=e.width,t[r++]=e.aspectRatio,t[r++]=e.near,t[r]=e.far,t},v.unpack=function(e,t,r){return i.Check.defined("array",e),t=a.defaultValue(t,0),a.defined(r)||(r=new v),r.width=e[t++],r.aspectRatio=e[t++],r.near=e[t++],r.far=e[t],r},Object.defineProperties(v.prototype,{projectionMatrix:{get:function(){return x(this),this._offCenterFrustum.projectionMatrix}}}),v.prototype.computeCullingVolume=function(e,t,r){return x(this),this._offCenterFrustum.computeCullingVolume(e,t,r)},v.prototype.getPixelDimensions=function(e,t,r,i,n){return x(this),this._offCenterFrustum.getPixelDimensions(e,t,r,i,n)},v.prototype.clone=function(e){return a.defined(e)||(e=new v),e.aspectRatio=this.aspectRatio,e.width=this.width,e.near=this.near,e.far=this.far,e._aspectRatio=void 0,e._width=void 0,e._near=void 0,e._far=void 0,this._offCenterFrustum.clone(e._offCenterFrustum),e},v.prototype.equals=function(e){return!!(a.defined(e)&&e instanceof v)&&(x(this),x(e),this.width===e.width&&this.aspectRatio===e.aspectRatio&&this._offCenterFrustum.equals(e._offCenterFrustum))},v.prototype.equalsEpsilon=function(e,t,r){return!!(a.defined(e)&&e instanceof v)&&(x(this),x(e),n.CesiumMath.equalsEpsilon(this.width,e.width,t,r)&&n.CesiumMath.equalsEpsilon(this.aspectRatio,e.aspectRatio,t,r)&&this._offCenterFrustum.equalsEpsilon(e._offCenterFrustum,t,r))},Object.defineProperties(b.prototype,{projectionMatrix:{get:function(){return E(this),this._perspectiveMatrix}},infiniteProjectionMatrix:{get:function(){return E(this),this._infinitePerspective}}});const M=new r.Cartesian3,D=new r.Cartesian3,V=new r.Cartesian3,F=new r.Cartesian3;function O(e){e=a.defaultValue(e,a.defaultValue.EMPTY_OBJECT),this._offCenterFrustum=new b,this.fov=e.fov,this._fov=void 0,this._fovy=void 0,this._sseDenominator=void 0,this.aspectRatio=e.aspectRatio,this._aspectRatio=void 0,this.near=a.defaultValue(e.near,1),this._near=this.near,this.far=a.defaultValue(e.far,5e8),this._far=this.far,this.xOffset=a.defaultValue(e.xOffset,0),this._xOffset=this.xOffset,this.yOffset=a.defaultValue(e.yOffset,0),this._yOffset=this.yOffset}function z(e){if(!a.defined(e.fov)||!a.defined(e.aspectRatio)||!a.defined(e.near)||!a.defined(e.far))throw new i.DeveloperError("fov, aspectRatio, near, or far parameters are not set.");const t=e._offCenterFrustum;if(e.fov!==e._fov||e.aspectRatio!==e._aspectRatio||e.near!==e._near||e.far!==e._far||e.xOffset!==e._xOffset||e.yOffset!==e._yOffset){if(e.fov<0||e.fov>=Math.PI)throw new i.DeveloperError("fov must be in the range [0, PI).");if(e.aspectRatio<0)throw new i.DeveloperError("aspectRatio must be positive.");if(e.near<0||e.near>e.far)throw new i.DeveloperError("near must be greater than zero and less than far.");e._aspectRatio=e.aspectRatio,e._fov=e.fov,e._fovy=e.aspectRatio<=1?e.fov:2*Math.atan(Math.tan(.5*e.fov)/e.aspectRatio),e._near=e.near,e._far=e.far,e._sseDenominator=2*Math.tan(.5*e._fovy),e._xOffset=e.xOffset,e._yOffset=e.yOffset,t.top=e.near*Math.tan(.5*e._fovy),t.bottom=-t.top,t.right=e.aspectRatio*t.top,t.left=-t.right,t.near=e.near,t.far=e.far,t.right+=e.xOffset,t.left+=e.xOffset,t.top+=e.yOffset,t.bottom+=e.yOffset}}b.prototype.computeCullingVolume=function(e,t,n){if(!a.defined(e))throw new i.DeveloperError("position is required.");if(!a.defined(t))throw new i.DeveloperError("direction is required.");if(!a.defined(n))throw new i.DeveloperError("up is required.");const o=this._cullingVolume.planes,s=this.top,f=this.bottom,u=this.right,d=this.left,l=this.near,h=this.far,p=r.Cartesian3.cross(t,n,M),c=D;r.Cartesian3.multiplyByScalar(t,l,c),r.Cartesian3.add(e,c,c);const m=V;r.Cartesian3.multiplyByScalar(t,h,m),r.Cartesian3.add(e,m,m);const C=F;r.Cartesian3.multiplyByScalar(p,d,C),r.Cartesian3.add(c,C,C),r.Cartesian3.subtract(C,e,C),r.Cartesian3.normalize(C,C),r.Cartesian3.cross(C,n,C),r.Cartesian3.normalize(C,C);let w=o[0];return a.defined(w)||(w=o[0]=new r.Cartesian4),w.x=C.x,w.y=C.y,w.z=C.z,w.w=-r.Cartesian3.dot(C,e),r.Cartesian3.multiplyByScalar(p,u,C),r.Cartesian3.add(c,C,C),r.Cartesian3.subtract(C,e,C),r.Cartesian3.cross(n,C,C),r.Cartesian3.normalize(C,C),w=o[1],a.defined(w)||(w=o[1]=new r.Cartesian4),w.x=C.x,w.y=C.y,w.z=C.z,w.w=-r.Cartesian3.dot(C,e),r.Cartesian3.multiplyByScalar(n,f,C),r.Cartesian3.add(c,C,C),r.Cartesian3.subtract(C,e,C),r.Cartesian3.cross(p,C,C),r.Cartesian3.normalize(C,C),w=o[2],a.defined(w)||(w=o[2]=new r.Cartesian4),w.x=C.x,w.y=C.y,w.z=C.z,w.w=-r.Cartesian3.dot(C,e),r.Cartesian3.multiplyByScalar(n,s,C),r.Cartesian3.add(c,C,C),r.Cartesian3.subtract(C,e,C),r.Cartesian3.cross(C,p,C),r.Cartesian3.normalize(C,C),w=o[3],a.defined(w)||(w=o[3]=new r.Cartesian4),w.x=C.x,w.y=C.y,w.z=C.z,w.w=-r.Cartesian3.dot(C,e),w=o[4],a.defined(w)||(w=o[4]=new r.Cartesian4),w.x=t.x,w.y=t.y,w.z=t.z,w.w=-r.Cartesian3.dot(t,c),r.Cartesian3.negate(t,C),w=o[5],a.defined(w)||(w=o[5]=new r.Cartesian4),w.x=C.x,w.y=C.y,w.z=C.z,w.w=-r.Cartesian3.dot(C,m),this._cullingVolume},b.prototype.getPixelDimensions=function(e,t,r,n,o){if(E(this),!a.defined(e)||!a.defined(t))throw new i.DeveloperError("Both drawingBufferWidth and drawingBufferHeight are required.");if(e<=0)throw new i.DeveloperError("drawingBufferWidth must be greater than zero.");if(t<=0)throw new i.DeveloperError("drawingBufferHeight must be greater than zero.");if(!a.defined(r))throw new i.DeveloperError("distance is required.");if(!a.defined(n))throw new i.DeveloperError("pixelRatio is required");if(n<=0)throw new i.DeveloperError("pixelRatio must be greater than zero.");if(!a.defined(o))throw new i.DeveloperError("A result object is required.");const s=1/this.near;let f=this.top*s;const u=2*n*r*f/t;f=this.right*s;const d=2*n*r*f/e;return o.x=d,o.y=u,o},b.prototype.clone=function(e){return a.defined(e)||(e=new b),e.right=this.right,e.left=this.left,e.top=this.top,e.bottom=this.bottom,e.near=this.near,e.far=this.far,e._left=void 0,e._right=void 0,e._top=void 0,e._bottom=void 0,e._near=void 0,e._far=void 0,e},b.prototype.equals=function(e){return a.defined(e)&&e instanceof b&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far},b.prototype.equalsEpsilon=function(e,t,r){return e===this||a.defined(e)&&e instanceof b&&n.CesiumMath.equalsEpsilon(this.right,e.right,t,r)&&n.CesiumMath.equalsEpsilon(this.left,e.left,t,r)&&n.CesiumMath.equalsEpsilon(this.top,e.top,t,r)&&n.CesiumMath.equalsEpsilon(this.bottom,e.bottom,t,r)&&n.CesiumMath.equalsEpsilon(this.near,e.near,t,r)&&n.CesiumMath.equalsEpsilon(this.far,e.far,t,r)},O.packedLength=6,O.pack=function(e,t,r){return i.Check.typeOf.object("value",e),i.Check.defined("array",t),r=a.defaultValue(r,0),t[r++]=e.fov,t[r++]=e.aspectRatio,t[r++]=e.near,t[r++]=e.far,t[r++]=e.xOffset,t[r]=e.yOffset,t},O.unpack=function(e,t,r){return i.Check.defined("array",e),t=a.defaultValue(t,0),a.defined(r)||(r=new O),r.fov=e[t++],r.aspectRatio=e[t++],r.near=e[t++],r.far=e[t++],r.xOffset=e[t++],r.yOffset=e[t],r},Object.defineProperties(O.prototype,{projectionMatrix:{get:function(){return z(this),this._offCenterFrustum.projectionMatrix}},infiniteProjectionMatrix:{get:function(){return z(this),this._offCenterFrustum.infiniteProjectionMatrix}},fovy:{get:function(){return z(this),this._fovy}},sseDenominator:{get:function(){return z(this),this._sseDenominator}}}),O.prototype.computeCullingVolume=function(e,t,r){return z(this),this._offCenterFrustum.computeCullingVolume(e,t,r)},O.prototype.getPixelDimensions=function(e,t,r,i,n){return z(this),this._offCenterFrustum.getPixelDimensions(e,t,r,i,n)},O.prototype.clone=function(e){return a.defined(e)||(e=new O),e.aspectRatio=this.aspectRatio,e.fov=this.fov,e.near=this.near,e.far=this.far,e._aspectRatio=void 0,e._fov=void 0,e._near=void 0,e._far=void 0,this._offCenterFrustum.clone(e._offCenterFrustum),e},O.prototype.equals=function(e){return!!(a.defined(e)&&e instanceof O)&&(z(this),z(e),this.fov===e.fov&&this.aspectRatio===e.aspectRatio&&this._offCenterFrustum.equals(e._offCenterFrustum))},O.prototype.equalsEpsilon=function(e,t,r){return!!(a.defined(e)&&e instanceof O)&&(z(this),z(e),n.CesiumMath.equalsEpsilon(this.fov,e.fov,t,r)&&n.CesiumMath.equalsEpsilon(this.aspectRatio,e.aspectRatio,t,r)&&this._offCenterFrustum.equalsEpsilon(e._offCenterFrustum,t,r))};const R=0,k=1;function P(e){i.Check.typeOf.object("options",e),i.Check.typeOf.object("options.frustum",e.frustum),i.Check.typeOf.object("options.origin",e.origin),i.Check.typeOf.object("options.orientation",e.orientation);const n=e.frustum,o=e.orientation,s=e.origin,f=a.defaultValue(e.vertexFormat,u.VertexFormat.DEFAULT),d=a.defaultValue(e._drawNearPlane,!0);let l,h;n instanceof O?(l=R,h=O.packedLength):n instanceof v&&(l=k,h=v.packedLength),this._frustumType=l,this._frustum=n.clone(),this._origin=r.Cartesian3.clone(s),this._orientation=t.Quaternion.clone(o),this._drawNearPlane=d,this._vertexFormat=f,this._workerName="createFrustumGeometry",this.packedLength=2+h+r.Cartesian3.packedLength+t.Quaternion.packedLength+u.VertexFormat.packedLength}P.pack=function(e,n,o){i.Check.typeOf.object("value",e),i.Check.defined("array",n),o=a.defaultValue(o,0);const s=e._frustumType,f=e._frustum;return n[o++]=s,s===R?(O.pack(f,n,o),o+=O.packedLength):(v.pack(f,n,o),o+=v.packedLength),r.Cartesian3.pack(e._origin,n,o),o+=r.Cartesian3.packedLength,t.Quaternion.pack(e._orientation,n,o),o+=t.Quaternion.packedLength,u.VertexFormat.pack(e._vertexFormat,n,o),o+=u.VertexFormat.packedLength,n[o]=e._drawNearPlane?1:0,n};const q=new O,S=new v,T=new t.Quaternion,A=new r.Cartesian3,I=new u.VertexFormat;function B(e,t,r,i,n,o,s,f){const u=e/3*2;for(let d=0;d<4;++d)a.defined(t)&&(t[e]=o.x,t[e+1]=o.y,t[e+2]=o.z),a.defined(r)&&(r[e]=s.x,r[e+1]=s.y,r[e+2]=s.z),a.defined(i)&&(i[e]=f.x,i[e+1]=f.y,i[e+2]=f.z),e+=3;n[u]=0,n[u+1]=0,n[u+2]=1,n[u+3]=0,n[u+4]=1,n[u+5]=1,n[u+6]=0,n[u+7]=1}P.unpack=function(e,n,o){i.Check.defined("array",e),n=a.defaultValue(n,0);const s=e[n++];let f;s===R?(f=O.unpack(e,n,q),n+=O.packedLength):(f=v.unpack(e,n,S),n+=v.packedLength);const d=r.Cartesian3.unpack(e,n,A);n+=r.Cartesian3.packedLength;const l=t.Quaternion.unpack(e,n,T);n+=t.Quaternion.packedLength;const h=u.VertexFormat.unpack(e,n,I);n+=u.VertexFormat.packedLength;const p=1===e[n];if(!a.defined(o))return new P({frustum:f,origin:d,orientation:l,vertexFormat:h,_drawNearPlane:p});const c=s===o._frustumType?o._frustum:void 0;return o._frustum=f.clone(c),o._frustumType=s,o._origin=r.Cartesian3.clone(d,o._origin),o._orientation=t.Quaternion.clone(l,o._orientation),o._vertexFormat=u.VertexFormat.clone(h,o._vertexFormat),o._drawNearPlane=p,o};const L=new r.Matrix3,N=new r.Matrix4,j=new r.Matrix4,G=new r.Cartesian3,U=new r.Cartesian3,Q=new r.Cartesian3,K=new r.Cartesian3,W=new r.Cartesian3,Y=new r.Cartesian3,H=new Array(3),J=new Array(4);J[0]=new r.Cartesian4(-1,-1,1,1),J[1]=new r.Cartesian4(1,-1,1,1),J[2]=new r.Cartesian4(1,1,1,1),J[3]=new r.Cartesian4(-1,1,1,1);const X=new Array(4);for(let Z=0;Z<4;++Z)X[Z]=new r.Cartesian4;P._computeNearFarPlanes=function(e,t,i,n,o,s,f,u){const d=r.Matrix3.fromQuaternion(t,L);let l=a.defaultValue(s,G),h=a.defaultValue(f,U),p=a.defaultValue(u,Q);l=r.Matrix3.getColumn(d,0,l),h=r.Matrix3.getColumn(d,1,h),p=r.Matrix3.getColumn(d,2,p),r.Cartesian3.normalize(l,l),r.Cartesian3.normalize(h,h),r.Cartesian3.normalize(p,p),r.Cartesian3.negate(l,l);const c=r.Matrix4.computeView(e,p,h,l,N);let m,C;if(i===R){const e=n.projectionMatrix,t=r.Matrix4.multiply(e,c,j);C=r.Matrix4.inverse(t,j)}else m=r.Matrix4.inverseTransformation(c,j);a.defined(C)?(H[0]=n.near,H[1]=n.far):(H[0]=0,H[1]=n.near,H[2]=n.far);for(let w=0;w<2;++w)for(let t=0;t<4;++t){let i=r.Cartesian4.clone(J[t],X[t]);if(a.defined(C)){i=r.Matrix4.multiplyByVector(C,i,i);const t=1/i.w;r.Cartesian3.multiplyByScalar(i,t,i),r.Cartesian3.subtract(i,e,i),r.Cartesian3.normalize(i,i);const n=r.Cartesian3.dot(p,i);r.Cartesian3.multiplyByScalar(i,H[w]/n,i),r.Cartesian3.add(i,e,i)}else{a.defined(n._offCenterFrustum)&&(n=n._offCenterFrustum);const e=H[w],t=H[w+1];i.x=.5*(i.x*(n.right-n.left)+n.left+n.right),i.y=.5*(i.y*(n.top-n.bottom)+n.bottom+n.top),i.z=.5*(i.z*(e-t)-e-t),i.w=1,r.Matrix4.multiplyByVector(m,i,i)}o[12*w+3*t]=i.x,o[12*w+3*t+1]=i.y,o[12*w+3*t+2]=i.z}},P.createGeometry=function(e){const i=e._frustumType,f=e._frustum,u=e._origin,d=e._orientation,l=e._drawNearPlane,h=e._vertexFormat,p=l?6:5;let c=new Float64Array(72);P._computeNearFarPlanes(u,d,i,f,c);let m=24;c[m]=c[12],c[m+1]=c[13],c[m+2]=c[14],c[m+3]=c[0],c[m+4]=c[1],c[m+5]=c[2],c[m+6]=c[9],c[m+7]=c[10],c[m+8]=c[11],c[m+9]=c[21],c[m+10]=c[22],c[m+11]=c[23],m+=12,c[m]=c[15],c[m+1]=c[16],c[m+2]=c[17],c[m+3]=c[3],c[m+4]=c[4],c[m+5]=c[5],c[m+6]=c[0],c[m+7]=c[1],c[m+8]=c[2],c[m+9]=c[12],c[m+10]=c[13],c[m+11]=c[14],m+=12,c[m]=c[3],c[m+1]=c[4],c[m+2]=c[5],c[m+3]=c[15],c[m+4]=c[16],c[m+5]=c[17],c[m+6]=c[18],c[m+7]=c[19],c[m+8]=c[20],c[m+9]=c[6],c[m+10]=c[7],c[m+11]=c[8],m+=12,c[m]=c[6],c[m+1]=c[7],c[m+2]=c[8],c[m+3]=c[18],c[m+4]=c[19],c[m+5]=c[20],c[m+6]=c[21],c[m+7]=c[22],c[m+8]=c[23],c[m+9]=c[9],c[m+10]=c[10],c[m+11]=c[11],l||(c=c.subarray(12));const C=new s.GeometryAttributes({position:new o.GeometryAttribute({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:c})});if(a.defined(h.normal)||a.defined(h.tangent)||a.defined(h.bitangent)||a.defined(h.st)){const e=a.defined(h.normal)?new Float32Array(12*p):void 0,t=a.defined(h.tangent)?new Float32Array(12*p):void 0,i=a.defined(h.bitangent)?new Float32Array(12*p):void 0,s=a.defined(h.st)?new Float32Array(8*p):void 0,f=G,u=U,d=Q,c=r.Cartesian3.negate(f,K),w=r.Cartesian3.negate(u,W),_=r.Cartesian3.negate(d,Y);m=0,l&&(B(m,e,t,i,s,_,f,u),m+=12),B(m,e,t,i,s,d,c,u),m+=12,B(m,e,t,i,s,c,_,u),m+=12,B(m,e,t,i,s,w,_,c),m+=12,B(m,e,t,i,s,f,d,u),m+=12,B(m,e,t,i,s,u,d,c),a.defined(e)&&(C.normal=new o.GeometryAttribute({componentDatatype:n.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e})),a.defined(t)&&(C.tangent=new o.GeometryAttribute({componentDatatype:n.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:t})),a.defined(i)&&(C.bitangent=new o.GeometryAttribute({componentDatatype:n.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:i})),a.defined(s)&&(C.st=new o.GeometryAttribute({componentDatatype:n.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:s}))}const w=new Uint16Array(6*p);for(let t=0;t<p;++t){const e=6*t,r=4*t;w[e]=r,w[e+1]=r+1,w[e+2]=r+2,w[e+3]=r,w[e+4]=r+2,w[e+5]=r+3}return new o.Geometry({attributes:C,indices:w,primitiveType:o.PrimitiveType.TRIANGLES,boundingSphere:t.BoundingSphere.fromVertices(c)})},e.FrustumGeometry=P,e.OrthographicFrustum=v,e.PerspectiveFrustum=O}));
\ No newline at end of file
define(["exports","./Matrix2-fc7e9822","./RuntimeError-c581ca93","./defaultValue-94c3e563","./WebGLConstants-7dccdc96","./Transforms-3ac41eb6"],(function(t,e,r,n,i,a){"use strict";const o={NONE:0,TRIANGLES:1,LINES:2,POLYLINES:3};var s=Object.freeze(o);const u={POINTS:i.WebGLConstants.POINTS,LINES:i.WebGLConstants.LINES,LINE_LOOP:i.WebGLConstants.LINE_LOOP,LINE_STRIP:i.WebGLConstants.LINE_STRIP,TRIANGLES:i.WebGLConstants.TRIANGLES,TRIANGLE_STRIP:i.WebGLConstants.TRIANGLE_STRIP,TRIANGLE_FAN:i.WebGLConstants.TRIANGLE_FAN,isLines:function(t){return t===u.LINES||t===u.LINE_LOOP||t===u.LINE_STRIP},isTriangles:function(t){return t===u.TRIANGLES||t===u.TRIANGLE_STRIP||t===u.TRIANGLE_FAN},validate:function(t){return t===u.POINTS||t===u.LINES||t===u.LINE_LOOP||t===u.LINE_STRIP||t===u.TRIANGLES||t===u.TRIANGLE_STRIP||t===u.TRIANGLE_FAN}};var c=Object.freeze(u);function I(t){t=n.defaultValue(t,n.defaultValue.EMPTY_OBJECT),r.Check.typeOf.object("options.attributes",t.attributes),this.attributes=t.attributes,this.indices=t.indices,this.primitiveType=n.defaultValue(t.primitiveType,c.TRIANGLES),this.boundingSphere=t.boundingSphere,this.geometryType=n.defaultValue(t.geometryType,s.NONE),this.boundingSphereCV=t.boundingSphereCV,this.offsetAttribute=t.offsetAttribute}I.computeNumberOfVertices=function(t){r.Check.typeOf.object("geometry",t);let e=-1;for(const i in t.attributes)if(t.attributes.hasOwnProperty(i)&&n.defined(t.attributes[i])&&n.defined(t.attributes[i].values)){const n=t.attributes[i],a=n.values.length/n.componentsPerAttribute;if(e!==a&&-1!==e)throw new r.DeveloperError("All attribute lists must have the same number of attributes.");e=a}return e};const p=new e.Cartographic,l=new e.Cartesian3,N=new e.Matrix4,f=[new e.Cartographic,new e.Cartographic,new e.Cartographic],m=[new e.Cartesian2,new e.Cartesian2,new e.Cartesian2],T=[new e.Cartesian2,new e.Cartesian2,new e.Cartesian2],b=new e.Cartesian3,E=new a.Quaternion,L=new e.Matrix4,h=new e.Matrix2;function d(t){if(t=n.defaultValue(t,n.defaultValue.EMPTY_OBJECT),!n.defined(t.componentDatatype))throw new r.DeveloperError("options.componentDatatype is required.");if(!n.defined(t.componentsPerAttribute))throw new r.DeveloperError("options.componentsPerAttribute is required.");if(t.componentsPerAttribute<1||t.componentsPerAttribute>4)throw new r.DeveloperError("options.componentsPerAttribute must be between 1 and 4.");if(!n.defined(t.values))throw new r.DeveloperError("options.values is required.");this.componentDatatype=t.componentDatatype,this.componentsPerAttribute=t.componentsPerAttribute,this.normalize=n.defaultValue(t.normalize,!1),this.values=t.values}I._textureCoordinateRotationPoints=function(t,r,n,i){let o;const s=e.Rectangle.center(i,p),u=e.Cartographic.toCartesian(s,n,l),c=a.Transforms.eastNorthUpToFixedFrame(u,n,N),I=e.Matrix4.inverse(c,N),d=m,y=f;y[0].longitude=i.west,y[0].latitude=i.south,y[1].longitude=i.west,y[1].latitude=i.north,y[2].longitude=i.east,y[2].latitude=i.south;let A=b;for(o=0;o<3;o++)e.Cartographic.toCartesian(y[o],n,A),A=e.Matrix4.multiplyByPointAsVector(I,A,A),d[o].x=A.x,d[o].y=A.y;const C=a.Quaternion.fromAxisAngle(e.Cartesian3.UNIT_Z,-r,E),P=e.Matrix3.fromQuaternion(C,L),w=t.length;let x=Number.POSITIVE_INFINITY,S=Number.POSITIVE_INFINITY,G=Number.NEGATIVE_INFINITY,R=Number.NEGATIVE_INFINITY;for(o=0;o<w;o++)A=e.Matrix4.multiplyByPointAsVector(I,t[o],A),A=e.Matrix3.multiplyByVector(P,A,A),x=Math.min(x,A.x),S=Math.min(S,A.y),G=Math.max(G,A.x),R=Math.max(R,A.y);const O=e.Matrix2.fromRotation(r,h),_=T;_[0].x=x,_[0].y=S,_[1].x=x,_[1].y=R,_[2].x=G,_[2].y=S;const g=d[0],v=d[2].x-g.x,V=d[1].y-g.y;for(o=0;o<3;o++){const t=_[o];e.Matrix2.multiplyByVector(O,t,t),t.x=(t.x-g.x)/v,t.y=(t.y-g.y)/V}const M=_[0],F=_[1],D=_[2],W=new Array(6);return e.Cartesian2.pack(M,W),e.Cartesian2.pack(F,W,2),e.Cartesian2.pack(D,W,4),W},t.Geometry=I,t.GeometryAttribute=d,t.GeometryType=s,t.PrimitiveType=c}));
\ No newline at end of file
define(["exports","./defaultValue-94c3e563"],(function(t,e){"use strict";function i(t){t=e.defaultValue(t,e.defaultValue.EMPTY_OBJECT),this.position=t.position,this.normal=t.normal,this.st=t.st,this.bitangent=t.bitangent,this.tangent=t.tangent,this.color=t.color}t.GeometryAttributes=i}));
\ No newline at end of file
define(["exports","./defaultValue-94c3e563","./RuntimeError-c581ca93","./Matrix2-fc7e9822"],(function(e,t,i,r){"use strict";function o(e){if(e=t.defaultValue(e,t.defaultValue.EMPTY_OBJECT),!t.defined(e.geometry))throw new i.DeveloperError("options.geometry is required.");this.geometry=e.geometry,this.modelMatrix=r.Matrix4.clone(t.defaultValue(e.modelMatrix,r.Matrix4.IDENTITY)),this.id=e.id,this.pickPrimitive=e.pickPrimitive,this.attributes=t.defaultValue(e.attributes,{}),this.westHemisphereGeometry=void 0,this.eastHemisphereGeometry=void 0}e.GeometryInstance=o}));
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment