text: /**
   * Cesium - https://github.com/AnalyticalGraphicsInc/cesium
   *
   * Copyright 2011-2014 Cesium Contributors
   *
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   *
   * http://www.apache.org/licenses/LICENSE-2.0
   *
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
   *
   * Columbus View (Pat. Pend.)
   *
   * Portions licensed separately.
   * See https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md for full licensing details.
   */
  /**
  @license
  mersenne-twister.js - https://gist.github.com/banksean/300494
  
     Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
     All rights reserved.
  
     Redistribution and use in source and binary forms, with or without
     modification, are permitted provided that the following conditions
     are met:
  
       1. Redistributions of source code must retain the above copyright
          notice, this list of conditions and the following disclaimer.
  
       2. Redistributions in binary form must reproduce the above copyright
          notice, this list of conditions and the following disclaimer in the
          documentation and/or other materials provided with the distribution.
  
       3. The names of its contributors may not be used to endorse or promote
          products derived from this software without specific prior written
          permission.
  
     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
     "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
     LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
     A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
     CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
     EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
     PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
     LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
     NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
     SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
  
  !function(){define("Core/defined",[],function(){"use strict";var t=function(t){return void 0!==t};return t}),define("Core/freezeObject",["./defined"],function(t){"use strict";var e=Object.freeze;return t(e)||(e=function(t){return t}),e}),define("Core/defaultValue",["./freezeObject"],function(t){"use strict";var e=function(t,e){return void 0!==t?t:e};return e.EMPTY_OBJECT=t({}),e}),define("Core/DeveloperError",["./defined"],function(t){"use strict";var e=function(t){this.name="DeveloperError",this.message=t;var e;try{throw new Error}catch(n){e=n.stack}this.stack=e};return e.prototype.toString=function(){var e=this.name+": "+this.message;return t(this.stack)&&(e+="\n"+this.stack.toString()),e},e.throwInstantiationError=function(){throw new e("This function defines an interface and should not be called directly.")},e}),define("ThirdParty/mersenne-twister",[],function(){var t=function(t){void 0==t&&(t=(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,this.init_genrand(t)};return t.prototype.init_genrand=function(t){for(this.mt[0]=t>>>0,this.mti=1;this.mti<this.N;this.mti++){var t=this.mt[this.mti-1]^this.mt[this.mti-1]>>>30;this.mt[this.mti]=(1812433253*((4294901760&t)>>>16)<<16)+1812433253*(65535&t)+this.mti,this.mt[this.mti]>>>=0}},t.prototype.genrand_int32=function(){var t,e=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var n;for(this.mti==this.N+1&&this.init_genrand(5489),n=0;n<this.N-this.M;n++)t=this.mt[n]&this.UPPER_MASK|this.mt[n+1]&this.LOWER_MASK,this.mt[n]=this.mt[n+this.M]^t>>>1^e[1&t];for(;n<this.N-1;n++)t=this.mt[n]&this.UPPER_MASK|this.mt[n+1]&this.LOWER_MASK,this.mt[n]=this.mt[n+(this.M-this.N)]^t>>>1^e[1&t];t=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^t>>>1^e[1&t],this.mti=0}return t=this.mt[this.mti++],t^=t>>>11,t^=2636928640&t<<7,t^=4022730752&t<<15,t^=t>>>18,t>>>0},t.prototype.random=function(){return this.genrand_int32()*(1/4294967296)},t}),define("Core/Math",["../ThirdParty/mersenne-twister","./defaultValue","./defined","./DeveloperError"],function(t,e){"use strict";var n={};n.EPSILON1=.1,n.EPSILON2=.01,n.EPSILON3=.001,n.EPSILON4=1e-4,n.EPSILON5=1e-5,n.EPSILON6=1e-6,n.EPSILON7=1e-7,n.EPSILON8=1e-8,n.EPSILON9=1e-9,n.EPSILON10=1e-10,n.EPSILON11=1e-11,n.EPSILON12=1e-12,n.EPSILON13=1e-13,n.EPSILON14=1e-14,n.EPSILON15=1e-15,n.EPSILON16=1e-16,n.EPSILON17=1e-17,n.EPSILON18=1e-18,n.EPSILON19=1e-19,n.EPSILON20=1e-20,n.GRAVITATIONALPARAMETER=3986004418e5,n.SOLAR_RADIUS=6955e5,n.LUNAR_RADIUS=1737400,n.SIXTY_FOUR_KILOBYTES=65536,n.sign=function(t){return t>0?1:0>t?-1:0},n.sinh=function(t){var e=Math.pow(Math.E,t),n=Math.pow(Math.E,-1*t);return.5*(e-n)},n.cosh=function(t){var e=Math.pow(Math.E,t),n=Math.pow(Math.E,-1*t);return.5*(e+n)},n.lerp=function(t,e,n){return(1-n)*t+n*e},n.PI=Math.PI,n.ONE_OVER_PI=1/Math.PI,n.PI_OVER_TWO=.5*Math.PI,n.PI_OVER_THREE=Math.PI/3,n.PI_OVER_FOUR=Math.PI/4,n.PI_OVER_SIX=Math.PI/6,n.THREE_PI_OVER_TWO=.5*3*Math.PI,n.TWO_PI=2*Math.PI,n.ONE_OVER_TWO_PI=1/(2*Math.PI),n.RADIANS_PER_DEGREE=Math.PI/180,n.DEGREES_PER_RADIAN=180/Math.PI,n.RADIANS_PER_ARCSECOND=n.RADIANS_PER_DEGREE/3600,n.toRadians=function(t){return t*n.RADIANS_PER_DEGREE},n.toDegrees=function(t){return t*n.DEGREES_PER_RADIAN},n.convertLongitudeRange=function(t){var e=n.TWO_PI,r=t-Math.floor(t/e)*e;return r<-Math.PI?r+e:r>=Math.PI?r-e:r},n.negativePiToPi=function(t){for(var e=n.EPSILON10,r=n.PI,a=n.TWO_PI;-(r+e)>t;)t+=a;if(-r>t)return-r;for(;t>r+e;)t-=a;return t>r?r:t},n.zeroToTwoPi=function(t){var e=t%n.TWO_PI;return 0>e?(e+n.TWO_PI)%n.TWO_PI:e},n.equalsEpsilon=function(t,n,r){return r=e(r,0),Math.abs(t-n)<=r};var r=[1];n.factorial=function(t){var e=r.length;if(t>=e)for(var n=r[e-1],a=e;t>=a;a++)r.push(n*a);return r[t]},n.incrementWrap=function(t,n,r){return r=e(r,0),++t,t>n&&(t=r),t},n.isPowerOfTwo=function(t){return 0!==t&&0===(t&t-1)},n.nextPowerOfTwo=function(t){return--t,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,++t,t},n.clamp=function(t,e,n){return e>t?e:t>n?n:t};var a=new t;return n.setRandomNumberSeed=function(e){a=new t(e)},n.nextRandomNumber=function(){return a.random()},n.acosClamped=function(t){return Math.acos(n.clamp(t,-1,1))},n.asinClamped=function(t){return Math.asin(n.clamp(t,-1,1))},n}),define("Core/Cartesian3",["./defaultValue","./defined","./DeveloperError","./freezeObject","./Math"],function(t,e,n,r,a){"use strict";var i=function(e,n,r){this.x=t(e,0),this.y=t(n,0),this.z=t(r,0)};i.fromSpherical=function(n,r){e(r)||(r=new i);var a=n.clock,o=n.cone,u=t(n.magnitude,1),s=u*Math.sin(o);return r.x=s*Math.cos(a),r.y=s*Math.sin(a),r.z=u*Math.cos(o),r},i.fromElements=function(t,n,r,a){return e(a)?(a.x=t,a.y=n,a.z=r,a):new i(t,n,r)},i.clone=function(t,n){return e(t)?e(n)?(n.x=t.x,n.y=t.y,n.z=t.z,n):new i(t.x,t.y,t.z):void 0},i.fromCartesian4=i.clone,i.packedLength=3,i.pack=function(e,n,r){r=t(r,0),n[r++]=e.x,n[r++]=e.y,n[r]=e.z},i.unpack=function(n,r,a){return r=t(r,0),e(a)||(a=new i),a.x=n[r++],a.y=n[r++],a.z=n[r],a},i.fromArray=i.unpack,i.getMaximumComponent=function(t){return Math.max(t.x,t.y,t.z)},i.getMinimumComponent=function(t){return Math.min(t.x,t.y,t.z)},i.getMinimumByComponent=function(t,e,n){return n.x=Math.min(t.x,e.x),n.y=Math.min(t.y,e.y),n.z=Math.min(t.z,e.z),n},i.getMaximumByComponent=function(t,e,n){return n.x=Math.max(t.x,e.x),n.y=Math.max(t.y,e.y),n.z=Math.max(t.z,e.z),n},i.magnitudeSquared=function(t){return t.x*t.x+t.y*t.y+t.z*t.z},i.magnitude=function(t){return Math.sqrt(i.magnitudeSquared(t))};var o=new i;i.distance=function(t,e){return i.subtract(t,e,o),i.magnitude(o)},i.normalize=function(t,e){var n=i.magnitude(t);return e.x=t.x/n,e.y=t.y/n,e.z=t.z/n,e},i.dot=function(t,e){return t.x*e.x+t.y*e.y+t.z*e.z},i.multiplyComponents=function(t,e,n){return n.x=t.x*e.x,n.y=t.y*e.y,n.z=t.z*e.z,n},i.add=function(t,e,n){return n.x=t.x+e.x,n.y=t.y+e.y,n.z=t.z+e.z,n},i.subtract=function(t,e,n){return n.x=t.x-e.x,n.y=t.y-e.y,n.z=t.z-e.z,n},i.multiplyByScalar=function(t,e,n){return n.x=t.x*e,n.y=t.y*e,n.z=t.z*e,n},i.divideByScalar=function(t,e,n){return n.x=t.x/e,n.y=t.y/e,n.z=t.z/e,n},i.negate=function(t,e){return e.x=-t.x,e.y=-t.y,e.z=-t.z,e},i.abs=function(t,e){return e.x=Math.abs(t.x),e.y=Math.abs(t.y),e.z=Math.abs(t.z),e};var u=new i;i.lerp=function(t,e,n,r){return i.multiplyByScalar(e,n,u),r=i.multiplyByScalar(t,1-n,r),i.add(u,r,r)};var s=new i,c=new i;i.angleBetween=function(t,e){i.normalize(t,s),i.normalize(e,c);var n=i.dot(s,c),r=i.magnitude(i.cross(s,c,s));return Math.atan2(r,n)};var l=new i;i.mostOrthogonalAxis=function(t,e){var n=i.normalize(t,l);return i.abs(n,n),e=n.x<=n.y?n.x<=n.z?i.clone(i.UNIT_X,e):i.clone(i.UNIT_Z,e):n.y<=n.z?i.clone(i.UNIT_Y,e):i.clone(i.UNIT_Z,e)},i.equals=function(t,n){return t===n||e(t)&&e(n)&&t.x===n.x&&t.y===n.y&&t.z===n.z},i.equalsEpsilon=function(t,n,r){return t===n||e(t)&&e(n)&&Math.abs(t.x-n.x)<=r&&Math.abs(t.y-n.y)<=r&&Math.abs(t.z-n.z)<=r},i.cross=function(t,e,n){var r=t.x,a=t.y,i=t.z,o=e.x,u=e.y,s=e.z,c=a*s-i*u,l=i*o-r*s,h=r*u-a*o;return n.x=c,n.y=l,n.z=h,n},i.fromDegrees=function(t,e,n,r,o){var u=a.toRadians(t),s=a.toRadians(e);return i.fromRadians(u,s,n,r,o)};var h=new i,f=new i,d=new i(40680631590769,40680631590769,40408299984661.445);return i.fromRadians=function(n,r,a,o,u){a=t(a,0);var s=e(o)?o.radiiSquared:d,c=Math.cos(r);h.x=c*Math.cos(n),h.y=c*Math.sin(n),h.z=Math.sin(r),h=i.normalize(h,h),i.multiplyComponents(s,h,f);var l=Math.sqrt(i.dot(h,f));return f=i.divideByScalar(f,l,f),h=i.multiplyByScalar(h,a,h),e(u)||(u=new i),i.add(f,h,u)},i.fromDegreesArray=function(t,e,n){for(var r=new Array(t.length),o=0;o<t.length;o++)r[o]=a.toRadians(t[o]);return i.fromRadiansArray(r,e,n)},i.fromRadiansArray=function(t,n,r){var a=t.length;e(r)?r.length=a/2:r=new Array(a/2);for(var o=0;a>o;o+=2){var u=t[o],s=t[o+1];r[o/2]=i.fromRadians(u,s,0,n,r[o/2])}return r},i.fromDegreesArrayHeights=function(t,e,n){for(var r=new Array(t.length),o=0;o<t.length;o+=3)r[o]=a.toRadians(t[o]),r[o+1]=a.toRadians(t[o+1]),r[o+2]=t[o+2];return i.fromRadiansArrayHeights(r,e,n)},i.fromRadiansArrayHeights=function(t,n,r){var a=t.length;e(r)?r.length=a/3:r=new Array(a/3);for(var o=0;a>o;o+=3){var u=t[o],s=t[o+1],c=t[o+2];r[o/3]=i.fromRadians(u,s,c,n,r[o/3])}return r},i.ZERO=r(new i(0,0,0)),i.UNIT_X=r(new i(1,0,0)),i.UNIT_Y=r(new i(0,1,0)),i.UNIT_Z=r(new i(0,0,1)),i.prototype.clone=function(t){return i.clone(this,t)},i.prototype.equals=function(t){return i.equals(this,t)},i.prototype.equalsEpsilon=function(t,e){return i.equalsEpsilon(this,t,e)},i.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},i}),define("Core/Cartographic",["./defaultValue","./defined","./DeveloperError","./freezeObject","./Math"],function(t,e,n,r,a){"use strict";var i=function(e,n,r){this.longitude=t(e,0),this.latitude=t(n,0),this.height=t(r,0)};return i.fromRadians=function(n,r,a,o){return a=t(a,0),e(o)?(o.longitude=n,o.latitude=r,o.height=a,o):new i(n,r,a)},i.fromDegrees=function(t,e,n,r){return t=a.toRadians(t),e=a.toRadians(e),i.fromRadians(t,e,n,r)},i.clone=function(t,n){return e(t)?e(n)?(n.longitude=t.longitude,n.latitude=t.latitude,n.height=t.height,n):new i(t.longitude,t.latitude,t.height):void 0},i.equals=function(t,n){return t===n||e(t)&&e(n)&&t.longitude===n.longitude&&t.latitude===n.latitude&&t.height===n.height},i.equalsEpsilon=function(t,n,r){return t===n||e(t)&&e(n)&&Math.abs(t.longitude-n.longitude)<=r&&Math.abs(t.latitude-n.latitude)<=r&&Math.abs(t.height-n.height)<=r},i.toString=function(t){return"("+t.longitude+", "+t.latitude+", "+t.height+")"},i.ZERO=r(new i(0,0,0)),i.prototype.clone=function(t){return i.clone(this,t)},i.prototype.equals=function(t){return i.equals(this,t)},i.prototype.equalsEpsilon=function(t,e){return i.equalsEpsilon(this,t,e)},i.prototype.toString=function(){return i.toString(this)},i}),define("Core/defineProperties",["./defined"],function(t){"use strict";var e=function(){try{return"x"in Object.defineProperty({},"x",{})}catch(t){return!1}}(),n=Object.defineProperties;return e&&t(n)||(n=function(t){return t}),n}),define("Core/Ellipsoid",["./Cartesian3","./Cartographic","./defaultValue","./defined","./defineProperties","./DeveloperError","./freezeObject","./Math"],function(t,e,n,r,a,i,o,u){"use strict";var s=function(e,r,a){e=n(e,0),r=n(r,0),a=n(a,0),this._radii=new t(e,r,a),this._radiiSquared=new t(e*e,r*r,a*a),this._radiiToTheFourth=new t(e*e*e*e,r*r*r*r,a*a*a*a),this._oneOverRadii=new t(0===e?0:1/e,0===r?0:1/r,0===a?0:1/a),this._oneOverRadiiSquared=new t(0===e?0:1/(e*e),0===r?0:1/(r*r),0===a?0:1/(a*a)),this._minimumRadius=Math.min(e,r,a),this._maximumRadius=Math.max(e,r,a),this._centerToleranceSquared=u.EPSILON1};a(s.prototype,{radii:{get:function(){return this._radii}},radiiSquared:{get:function(){return this._radiiSquared}},radiiToTheFourth:{get:function(){return this._radiiToTheFourth}},oneOverRadii:{get:function(){return this._oneOverRadii}},oneOverRadiiSquared:{get:function(){return this._oneOverRadiiSquared}},minimumRadius:{get:function(){return this._minimumRadius}},maximumRadius:{get:function(){return this._maximumRadius}}}),s.clone=function(e,n){if(!r(e))return void 0;var a=e._radii;return r(n)?(t.clone(a,n._radii),t.clone(e._radiiSquared,n._radiiSquared),t.clone(e._radiiToTheFourth,n._radiiToTheFourth),t.clone(e._oneOverRadii,n._oneOverRadii),t.clone(e._oneOverRadiiSquared,n._oneOverRadiiSquared),n._minimumRadius=e._minimumRadius,n._maximumRadius=e._maximumRadius,n._centerToleranceSquared=e._centerToleranceSquared,n):new s(a.x,a.y,a.z)},s.fromCartesian3=function(t){return r(t)?new s(t.x,t.y,t.z):new s},s.WGS84=o(new s(6378137,6378137,6356752.314245179)),s.UNIT_SPHERE=o(new s(1,1,1)),s.MOON=o(new s(u.LUNAR_RADIUS,u.LUNAR_RADIUS,u.LUNAR_RADIUS)),s.prototype.clone=function(t){return s.clone(this,t)},s.prototype.geocentricSurfaceNormal=t.normalize,s.prototype.geodeticSurfaceNormalCartographic=function(e,n){var a=e.longitude,i=e.latitude,o=Math.cos(i),u=o*Math.cos(a),s=o*Math.sin(a),c=Math.sin(i);return r(n)||(n=new t),n.x=u,n.y=s,n.z=c,t.normalize(n,n)},s.prototype.geodeticSurfaceNormal=function(e,n){return r(n)||(n=new t),n=t.multiplyComponents(e,this._oneOverRadiiSquared,n),t.normalize(n,n)};var c=new t,l=new t;s.prototype.cartographicToCartesian=function(e,n){var a=c,i=l;this.geodeticSurfaceNormalCartographic(e,a),t.multiplyComponents(this._radiiSquared,a,i);var o=Math.sqrt(t.dot(a,i));return t.divideByScalar(i,o,i),t.multiplyByScalar(a,e.height,a),r(n)||(n=new t),t.add(i,a,n)},s.prototype.cartographicArrayToCartesianArray=function(t,e){var n=t.length;r(e)?e.length=n:e=new Array(n);for(var a=0;n>a;a++)e[a]=this.cartographicToCartesian(t[a],e[a]);return e};var h=new t,f=new t,d=new t;s.prototype.cartesianToCartographic=function(n,a){var i=this.scaleToGeodeticSurface(n,f);if(!r(i))return void 0;var o=this.geodeticSurfaceNormal(i,h),s=t.subtract(n,i,d),c=Math.atan2(o.y,o.x),l=Math.asin(o.z),m=u.sign(t.dot(s,n))*t.magnitude(s);return r(a)?(a.longitude=c,a.latitude=l,a.height=m,a):new e(c,l,m)},s.prototype.cartesianArrayToCartographicArray=function(t,e){var n=t.length;r(e)?e.length=n:e=new Array(n);for(var a=0;n>a;++a)e[a]=this.cartesianToCartographic(t[a],e[a]);return e};var m=new t,y=new t;return s.prototype.scaleToGeodeticSurface=function(e,n){var a=e.x,i=e.y,o=e.z,s=this._oneOverRadii,c=s.x,l=s.y,h=s.z,f=a*a*c*c,d=i*i*l*l,p=o*o*h*h,w=f+d+p,v=Math.sqrt(1/w),x=t.multiplyByScalar(e,v,m);if(w<this._centerToleranceSquared)return isFinite(v)?t.clone(x,n):void 0;var g=this._oneOverRadiiSquared,E=g.x,M=g.y,S=g.z,z=y;z.x=2*x.x*E,z.y=2*x.y*M,z.z=2*x.z*S;var O,T,N,_,I,b,R,A,P,C,L,U=(1-v)*t.magnitude(e)/(.5*t.magnitude(z)),q=0;do{U-=q,N=1/(1+U*E),_=1/(1+U*M),I=1/(1+U*S),b=N*N,R=_*_,A=I*I,P=b*N,C=R*_,L=A*I,O=f*b+d*R+p*A-1,T=f*P*E+d*C*M+p*L*S;var D=-2*T;q=O/D}while(Math.abs(O)>u.EPSILON12);return r(n)?(n.x=a*N,n.y=i*_,n.z=o*I,n):new t(a*N,i*_,o*I)},s.prototype.scaleToGeocentricSurface=function(e,n){r(n)||(n=new t);var a=e.x,i=e.y,o=e.z,u=this._oneOverRadiiSquared,s=1/Math.sqrt(a*a*u.x+i*i*u.y+o*o*u.z);return t.multiplyByScalar(e,s,n)},s.prototype.transformPositionToScaledSpace=function(e,n){return r(n)||(n=new t),t.multiplyComponents(e,this._oneOverRadii,n)},s.prototype.transformPositionFromScaledSpace=function(e,n){return r(n)||(n=new t),t.multiplyComponents(e,this._radii,n)},s.prototype.equals=function(e){return this===e||r(e)&&t.equals(this._radii,e._radii)},s.prototype.toString=function(){return this._radii.toString()},s}),define("Core/GeographicProjection",["./Cartesian3","./Cartographic","./defaultValue","./defined","./defineProperties","./DeveloperError","./Ellipsoid"],function(t,e,n,r,a,i,o){"use strict";var u=function(t){this._ellipsoid=n(t,o.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis};return a(u.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),u.prototype.project=function(e,n){var a=this._semimajorAxis,i=e.longitude*a,o=e.latitude*a,u=e.height;return r(n)?(n.x=i,n.y=o,n.z=u,n):new t(i,o,u)},u.prototype.unproject=function(t,n){var a=this._oneOverSemimajorAxis,i=t.x*a,o=t.y*a,u=t.z;return r(n)?(n.longitude=i,n.latitude=o,n.height=u,n):new e(i,o,u)},u}),define("Core/Intersect",[],function(){"use strict";var t={OUTSIDE:-1,INTERSECTING:0,INSIDE:1};return t}),define("Core/Interval",["./defaultValue"],function(t){"use strict";var e=function(e,n){this.start=t(e,0),this.stop=t(n,0)};return e}),define("Core/Cartesian4",["./defaultValue","./defined","./DeveloperError","./freezeObject"],function(t,e,n,r){"use strict";var a=function(e,n,r,a){this.x=t(e,0),this.y=t(n,0),this.z=t(r,0),this.w=t(a,0)};a.fromElements=function(t,n,r,i,o){return e(o)?(o.x=t,o.y=n,o.z=r,o.w=i,o):new a(t,n,r,i)},a.fromColor=function(t,n){return e(n)?(n.x=t.red,n.y=t.green,n.z=t.blue,n.w=t.alpha,n):new a(t.red,t.green,t.blue,t.alpha)},a.clone=function(t,n){return e(t)?e(n)?(n.x=t.x,n.y=t.y,n.z=t.z,n.w=t.w,n):new a(t.x,t.y,t.z,t.w):void 0},a.packedLength=4,a.pack=function(e,n,r){r=t(r,0),n[r++]=e.x,n[r++]=e.y,n[r++]=e.z,n[r]=e.w},a.unpack=function(n,r,i){return r=t(r,0),e(i)||(i=new a),i.x=n[r++],i.y=n[r++],i.z=n[r++],i.w=n[r],i},a.fromArray=a.unpack,a.getMaximumComponent=function(t){return Math.max(t.x,t.y,t.z,t.w)},a.getMinimumComponent=function(t){return Math.min(t.x,t.y,t.z,t.w)},a.getMinimumByComponent=function(t,e,n){return n.x=Math.min(t.x,e.x),n.y=Math.min(t.y,e.y),n.z=Math.min(t.z,e.z),n.w=Math.min(t.w,e.w),n},a.getMaximumByComponent=function(t,e,n){return n.x=Math.max(t.x,e.x),n.y=Math.max(t.y,e.y),n.z=Math.max(t.z,e.z),n.w=Math.max(t.w,e.w),n},a.magnitudeSquared=function(t){return t.x*t.x+t.y*t.y+t.z*t.z+t.w*t.w},a.magnitude=function(t){return Math.sqrt(a.magnitudeSquared(t))};var i=new a;a.distance=function(t,e){return a.subtract(t,e,i),a.magnitude(i)},a.normalize=function(t,e){var n=a.magnitude(t);return e.x=t.x/n,e.y=t.y/n,e.z=t.z/n,e.w=t.w/n,e},a.dot=function(t,e){return t.x*e.x+t.y*e.y+t.z*e.z+t.w*e.w},a.multiplyComponents=function(t,e,n){return n.x=t.x*e.x,n.y=t.y*e.y,n.z=t.z*e.z,n.w=t.w*e.w,n},a.add=function(t,e,n){return n.x=t.x+e.x,n.y=t.y+e.y,n.z=t.z+e.z,n.w=t.w+e.w,n},a.subtract=function(t,e,n){return n.x=t.x-e.x,n.y=t.y-e.y,n.z=t.z-e.z,n.w=t.w-e.w,n},a.multiplyByScalar=function(t,e,n){return n.x=t.x*e,n.y=t.y*e,n.z=t.z*e,n.w=t.w*e,n},a.divideByScalar=function(t,e,n){return n.x=t.x/e,n.y=t.y/e,n.z=t.z/e,n.w=t.w/e,n},a.negate=function(t,e){return e.x=-t.x,e.y=-t.y,e.z=-t.z,e.w=-t.w,e},a.abs=function(t,e){return e.x=Math.abs(t.x),e.y=Math.abs(t.y),e.z=Math.abs(t.z),e.w=Math.abs(t.w),e};var o=new a;a.lerp=function(t,e,n,r){return a.multiplyByScalar(e,n,o),r=a.multiplyByScalar(t,1-n,r),a.add(o,r,r)};var u=new a;return a.mostOrthogonalAxis=function(t,e){var n=a.normalize(t,u);return a.abs(n,n),e=n.x<=n.y?n.x<=n.z?n.x<=n.w?a.clone(a.UNIT_X,e):a.clone(a.UNIT_W,e):n.z<=n.w?a.clone(a.UNIT_Z,e):a.clone(a.UNIT_W,e):n.y<=n.z?n.y<=n.w?a.clone(a.UNIT_Y,e):a.clone(a.UNIT_W,e):n.z<=n.w?a.clone(a.UNIT_Z,e):a.clone(a.UNIT_W,e)},a.equals=function(t,n){return t===n||e(t)&&e(n)&&t.x===n.x&&t.y===n.y&&t.z===n.z&&t.w===n.w},a.equalsEpsilon=function(t,n,r){return t===n||e(t)&&e(n)&&Math.abs(t.x-n.x)<=r&&Math.abs(t.y-n.y)<=r&&Math.abs(t.z-n.z)<=r&&Math.abs(t.w-n.w)<=r},a.ZERO=r(new a(0,0,0,0)),a.UNIT_X=r(new a(1,0,0,0)),a.UNIT_Y=r(new a(0,1,0,0)),a.UNIT_Z=r(new a(0,0,1,0)),a.UNIT_W=r(new a(0,0,0,1)),a.prototype.clone=function(t){return a.clone(this,t)},a.prototype.equals=function(t){return a.equals(this,t)},a.prototype.equalsEpsilon=function(t,e){return a.equalsEpsilon(this,t,e)},a.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+", "+this.w+")"},a}),define("Core/Matrix3",["./Cartesian3","./defaultValue","./defined","./DeveloperError","./freezeObject","./Math"],function(t,e,n,r,a,i){"use strict";function o(t){for(var e=0,n=0;9>n;++n){var r=t[n];e+=r*r}return Math.sqrt(e)}function u(t){for(var e=0,n=0;3>n;++n){var r=t[c.getElementIndex(d[n],f[n])];e+=2*r*r}return Math.sqrt(e)}function s(t,e){for(var n=i.EPSILON15,r=0,a=1,o=0;3>o;++o){var u=Math.abs(t[c.getElementIndex(d[o],f[o])]);u>r&&(a=o,r=u)}var s=1,l=0,h=f[a],m=d[a];if(Math.abs(t[c.getElementIndex(m,h)])>n){var y,p=t[c.getElementIndex(m,m)],w=t[c.getElementIndex(h,h)],v=t[c.getElementIndex(m,h)],x=(p-w)/2/v;y=0>x?-1/(-x+Math.sqrt(1+x*x)):1/(x+Math.sqrt(1+x*x)),s=1/Math.sqrt(1+y*y),l=y*s}return e=c.clone(c.IDENTITY,e),e[c.getElementIndex(h,h)]=e[c.getElementIndex(m,m)]=s,e[c.getElementIndex(m,h)]=l,e[c.getElementIndex(h,m)]=-l,e}var c=function(t,n,r,a,i,o,u,s,c){this[0]=e(t,0),this[1]=e(a,0),this[2]=e(u,0),this[3]=e(n,0),this[4]=e(i,0),this[5]=e(s,0),this[6]=e(r,0),this[7]=e(o,0),this[8]=e(c,0)};c.clone=function(t,e){return n(t)?n(e)?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e):new c(t[0],t[3],t[6],t[1],t[4],t[7],t[2],t[5],t[8]):void 0},c.fromArray=function(t,r,a){return r=e(r,0),n(a)||(a=new c),a[0]=t[r],a[1]=t[r+1],a[2]=t[r+2],a[3]=t[r+3],a[4]=t[r+4],a[5]=t[r+5],a[6]=t[r+6],a[7]=t[r+7],a[8]=t[r+8],a[9]=t[r+9],a},c.fromColumnMajorArray=function(t,e){return c.clone(t,e)},c.fromRowMajorArray=function(t,e){return n(e)?(e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],e):new c(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8])},c.fromQuaternion=function(t,e){var r=t.x*t.x,a=t.x*t.y,i=t.x*t.z,o=t.x*t.w,u=t.y*t.y,s=t.y*t.z,l=t.y*t.w,h=t.z*t.z,f=t.z*t.w,d=t.w*t.w,m=r-u-h+d,y=2*(a-f),p=2*(i+l),w=2*(a+f),v=-r+u-h+d,x=2*(s-o),g=2*(i-l),E=2*(s+o),M=-r-u+h+d;return n(e)?(e[0]=m,e[1]=w,e[2]=g,e[3]=y,e[4]=v,e[5]=E,e[6]=p,e[7]=x,e[8]=M,e):new c(m,y,p,w,v,x,g,E,M)},c.fromScale=function(t,e){return n(e)?(e[0]=t.x,e[1]=0,e[2]=0,e[3]=0,e[4]=t.y,e[5]=0,e[6]=0,e[7]=0,e[8]=t.z,e):new c(t.x,0,0,0,t.y,0,0,0,t.z)},c.fromUniformScale=function(t,e){return n(e)?(e[0]=t,e[1]=0,e[2]=0,e[3]=0,e[4]=t,e[5]=0,e[6]=0,e[7]=0,e[8]=t,e):new c(t,0,0,0,t,0,0,0,t)},c.fromRotationX=function(t,e){var r=Math.cos(t),a=Math.sin(t);return n(e)?(e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=r,e[5]=a,e[6]=0,e[7]=-a,e[8]=r,e):new c(1,0,0,0,r,-a,0,a,r)},c.fromRotationY=function(t,e){var r=Math.cos(t),a=Math.sin(t);return n(e)?(e[0]=r,e[1]=0,e[2]=-a,e[3]=0,e[4]=1,e[5]=0,e[6]=a,e[7]=0,e[8]=r,e):new c(r,0,a,0,1,0,-a,0,r)},c.fromRotationZ=function(t,e){var r=Math.cos(t),a=Math.sin(t);return n(e)?(e[0]=r,e[1]=a,e[2]=0,e[3]=-a,e[4]=r,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e):new c(r,-a,0,a,r,0,0,0,1)},c.toArray=function(t,e){return n(e)?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e):[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},c.getElementIndex=function(t,e){return 3*t+e},c.getColumn=function(e,r,a){var i=3*r,o=e[i],u=e[i+1],s=e[i+2];return n(a)?(a.x=o,a.y=u,a.z=s,a):new t(o,u,s)},c.setColumn=function(t,e,n,r){r=c.clone(t,r);var a=3*e;return r[a]=n.x,r[a+1]=n.y,r[a+2]=n.z,r},c.getRow=function(e,r,a){var i=e[r],o=e[r+3],u=e[r+6];return n(a)?(a.x=i,a.y=o,a.z=u,a):new t(i,o,u)},c.setRow=function(t,e,n,r){return r=c.clone(t,r),r[e]=n.x,r[e+3]=n.y,r[e+6]=n.z,r};var l=new t;c.getScale=function(e,r){return n(r)||(r=new t),r.x=t.magnitude(t.fromElements(e[0],e[1],e[2],l)),r.y=t.magnitude(t.fromElements(e[3],e[4],e[5],l)),r.z=t.magnitude(t.fromElements(e[6],e[7],e[8],l)),r};var h=new t;c.getMaximumScale=function(e){return c.getScale(e,h),t.getMaximumComponent(h)},c.multiply=function(t,e,r){var a=t[0]*e[0]+t[3]*e[1]+t[6]*e[2],i=t[1]*e[0]+t[4]*e[1]+t[7]*e[2],o=t[2]*e[0]+t[5]*e[1]+t[8]*e[2],u=t[0]*e[3]+t[3]*e[4]+t[6]*e[5],s=t[1]*e[3]+t[4]*e[4]+t[7]*e[5],l=t[2]*e[3]+t[5]*e[4]+t[8]*e[5],h=t[0]*e[6]+t[3]*e[7]+t[6]*e[8],f=t[1]*e[6]+t[4]*e[7]+t[7]*e[8],d=t[2]*e[6]+t[5]*e[7]+t[8]*e[8];return n(r)?(r[0]=a,r[1]=i,r[2]=o,r[3]=u,r[4]=s,r[5]=l,r[6]=h,r[7]=f,r[8]=d,r):new c(a,u,h,i,s,f,o,l,d)},c.multiplyByVector=function(e,r,a){var i=r.x,o=r.y,u=r.z,s=e[0]*i+e[3]*o+e[6]*u,c=e[1]*i+e[4]*o+e[7]*u,l=e[2]*i+e[5]*o+e[8]*u;return n(a)?(a.x=s,a.y=c,a.z=l,a):new t(s,c,l)},c.multiplyByScalar=function(t,e,r){return n(r)?(r[0]=t[0]*e,r[1]=t[1]*e,r[2]=t[2]*e,r[3]=t[3]*e,r[4]=t[4]*e,r[5]=t[5]*e,r[6]=t[6]*e,r[7]=t[7]*e,r[8]=t[8]*e,r):new c(t[0]*e,t[3]*e,t[6]*e,t[1]*e,t[4]*e,t[7]*e,t[2]*e,t[5]*e,t[8]*e)},c.negate=function(t,e){return n(e)?(e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e[4]=-t[4],e[5]=-t[5],e[6]=-t[6],e[7]=-t[7],e[8]=-t[8],e):new c(-t[0],-t[3],-t[6],-t[1],-t[4],-t[7],-t[2],-t[5],-t[8])},c.transpose=function(t,e){var r=t[0],a=t[3],i=t[6],o=t[1],u=t[4],s=t[7],l=t[2],h=t[5],f=t[8];return n(e)?(e[0]=r,e[1]=a,e[2]=i,e[3]=o,e[4]=u,e[5]=s,e[6]=l,e[7]=h,e[8]=f,e):new c(r,o,l,a,u,h,i,s,f)};var f=[1,0,0],d=[2,2,1],m=new c,y=new c;return c.getEigenDecomposition=function(t,e){var r=i.EPSILON20,a=10,l=0,h=0;n(e)||(e={});for(var f=e.unitary=c.clone(c.IDENTITY,e.unitary),d=e.diagonal=c.clone(t,e.diagonal),p=r*o(d);a>h&&u(d)>p;)s(d,m),c.transpose(m,y),c.multiply(d,m,d),c.multiply(y,d,d),c.multiply(f,m,f),++l>2&&(++h,l=0);return e},c.abs=function(t,e){return n(e)?(e[0]=Math.abs(t[0]),e[1]=Math.abs(t[1]),e[2]=Math.abs(t[2]),e[3]=Math.abs(t[3]),e[4]=Math.abs(t[4]),e[5]=Math.abs(t[5]),e[6]=Math.abs(t[6]),e[7]=Math.abs(t[7]),e[8]=Math.abs(t[8]),e):new c(Math.abs(t[0]),Math.abs(t[3]),Math.abs(t[6]),Math.abs(t[1]),Math.abs(t[4]),Math.abs(t[7]),Math.abs(t[2]),Math.abs(t[5]),Math.abs(t[8]))},c.determinant=function(t){var e=t[0],n=t[3],r=t[6],a=t[1],i=t[4],o=t[7],u=t[2],s=t[5],c=t[8];return e*(i*c-s*o)+a*(s*r-n*c)+u*(n*o-i*r)},c.inverse=function(t,e){var a=t[0],o=t[1],u=t[2],s=t[3],l=t[4],h=t[5],f=t[6],d=t[7],m=t[8],y=c.determinant(t);if(Math.abs(y)<=i.EPSILON15)throw new r("matrix is not invertible");n(e)||(e=new c),e[0]=l*m-d*h,e[1]=d*u-o*m,e[2]=o*h-l*u,e[3]=f*h-s*m,e[4]=a*m-f*u,e[5]=s*u-a*h,e[6]=s*d-f*l,e[7]=f*o-a*d,e[8]=a*l-s*o;var p=1/y;return c.multiplyByScalar(e,p,e)},c.equals=function(t,e){return t===e||n(t)&&n(e)&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]},c.equalsEpsilon=function(t,e,r){return t===e||n(t)&&n(e)&&Math.abs(t[0]-e[0])<=r&&Math.abs(t[1]-e[1])<=r&&Math.abs(t[2]-e[2])<=r&&Math.abs(t[3]-e[3])<=r&&Math.abs(t[4]-e[4])<=r&&Math.abs(t[5]-e[5])<=r&&Math.abs(t[6]-e[6])<=r&&Math.abs(t[7]-e[7])<=r&&Math.abs(t[8]-e[8])<=r},c.IDENTITY=a(new c(1,0,0,0,1,0,0,0,1)),c.COLUMN0ROW0=0,c.COLUMN0ROW1=1,c.COLUMN0ROW2=2,c.COLUMN1ROW0=3,c.COLUMN1ROW1=4,c.COLUMN1ROW2=5,c.COLUMN2ROW0=6,c.COLUMN2ROW1=7,c.COLUMN2ROW2=8,c.prototype.clone=function(t){return c.clone(this,t)},c.prototype.equals=function(t){return c.equals(this,t)},c.prototype.equalsEpsilon=function(t,e){return c.equalsEpsilon(this,t,e)},c.prototype.toString=function(){return"("+this[0]+", "+this[3]+", "+this[6]+")\n"+"("+this[1]+", "+this[4]+", "+this[7]+")\n"+"("+this[2]+", "+this[5]+", "+this[8]+")"},c}),define("Core/RuntimeError",["./defined"],function(t){"use strict";var e=function(t){this.name="RuntimeError",this.message=t;var e;try{throw new Error}catch(n){e=n.stack}this.stack=e};return e.prototype.toString=function(){var e=this.name+": "+this.message;return t(this.stack)&&(e+="\n"+this.stack.toString()),e},e}),define("Core/Matrix4",["./Cartesian3","./Cartesian4","./defaultValue","./defined","./DeveloperError","./freezeObject","./Math","./Matrix3","./RuntimeError"],function(t,e,n,r,a,i,o,u,s){"use strict";var c=function(t,e,r,a,i,o,u,s,c,l,h,f,d,m,y,p){this[0]=n(t,0),this[1]=n(i,0),this[2]=n(c,0),this[3]=n(d,0),this[4]=n(e,0),this[5]=n(o,0),this[6]=n(l,0),this[7]=n(m,0),this[8]=n(r,0),this[9]=n(u,0),this[10]=n(h,0),this[11]=n(y,0),this[12]=n(a,0),this[13]=n(s,0),this[14]=n(f,0),this[15]=n(p,0)};c.packedLength=16,c.pack=function(t,e,r){r=n(r,0),e[r++]=t[0],e[r++]=t[1],e[r++]=t[2],e[r++]=t[3],e[r++]=t[4],e[r++]=t[5],e[r++]=t[6],e[r++]=t[7],e[r++]=t[8],e[r++]=t[9],e[r++]=t[10],e[r++]=t[11],e[r++]=t[12],e[r++]=t[13],e[r++]=t[14],e[r]=t[15]},c.unpack=function(t,e,a){return e=n(e,0),r(a)||(a=new c),a[0]=t[e++],a[1]=t[e++],a[2]=t[e++],a[3]=t[e++],a[4]=t[e++],a[5]=t[e++],a[6]=t[e++],a[7]=t[e++],a[8]=t[e++],a[9]=t[e++],a[10]=t[e++],a[11]=t[e++],a[12]=t[e++],a[13]=t[e++],a[14]=t[e++],a[15]=t[e],a},c.clone=function(t,e){return r(t)?r(e)?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e):new c(t[0],t[4],t[8],t[12],t[1],t[5],t[9],t[13],t[2],t[6],t[10],t[14],t[3],t[7],t[11],t[15]):void 0},c.fromArray=c.unpack,c.fromColumnMajorArray=function(t,e){return c.clone(t,e)},c.fromRowMajorArray=function(t,e){return r(e)?(e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15],e):new c(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},c.fromRotationTranslation=function(t,e,n){return r(n)?(n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=0,n[4]=t[3],n[5]=t[4],n[6]=t[5],n[7]=0,n[8]=t[6],n[9]=t[7],n[10]=t[8],n[11]=0,n[12]=e.x,n[13]=e.y,n[14]=e.z,n[15]=1,n):new c(t[0],t[3],t[6],e.x,t[1],t[4],t[7],e.y,t[2],t[5],t[8],e.z,0,0,0,1)},new u,c.fromTranslationQuaternionRotationScale=function(t,e,n,a){r(a)||(a=new c);var i=n.x,o=n.y,u=n.z,s=e.x*e.x,l=e.x*e.y,h=e.x*e.z,f=e.x*e.w,d=e.y*e.y,m=e.y*e.z,y=e.y*e.w,p=e.z*e.z,w=e.z*e.w,v=e.w*e.w,x=s-d-p+v,g=2*(l-w),E=2*(h+y),M=2*(l+w),S=-s+d-p+v,z=2*(m-f),O=2*(h-y),T=2*(m+f),N=-s-d+p+v;return a[0]=x*i,a[1]=M*i,a[2]=O*i,a[3]=0,a[4]=g*o,a[5]=S*o,a[6]=T*o,a[7]=0,a[8]=E*u,a[9]=z*u,a[10]=N*u,a[11]=0,a[12]=t.x,a[13]=t.y,a[14]=t.z,a[15]=1,a},c.fromTranslation=function(t,e){return c.fromRotationTranslation(u.IDENTITY,t,e)},c.fromScale=function(t,e){return r(e)?(e[0]=t.x,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t.y,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t.z,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e):new c(t.x,0,0,0,0,t.y,0,0,0,0,t.z,0,0,0,0,1)},c.fromUniformScale=function(t,e){return r(e)?(e[0]=t,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e):new c(t,0,0,0,0,t,0,0,0,0,t,0,0,0,0,1)};var l=new t,h=new t,f=new t;c.fromCamera=function(e,n){var a=e.eye,i=e.target,o=e.up;t.normalize(t.subtract(i,a,l),l),t.normalize(t.cross(l,o,h),h),t.normalize(t.cross(h,l,f),f);var u=h.x,s=h.y,d=h.z,m=l.x,y=l.y,p=l.z,w=f.x,v=f.y,x=f.z,g=a.x,E=a.y,M=a.z,S=u*-g+s*-E+d*-M,z=w*-g+v*-E+x*-M,O=m*g+y*E+p*M;return r(n)?(n[0]=u,n[1]=w,n[2]=-m,n[3]=0,n[4]=s,n[5]=v,n[6]=-y,n[7]=0,n[8]=d,n[9]=x,n[10]=-p,n[11]=0,n[12]=S,n[13]=z,n[14]=O,n[15]=1,n):new c(u,s,d,S,w,v,x,z,-m,-y,-p,O,0,0,0,1)},c.computePerspectiveFieldOfView=function(t,e,n,a,i){var o=Math.tan(.5*t),u=1/o,s=u/e,l=(a+n)/(n-a),h=2*a*n/(n-a);return r(i)?(i[0]=s,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=u,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=l,i[11]=-1,i[12]=0,i[13]=0,i[14]=h,i[15]=0,i):new c(s,0,0,0,0,u,0,0,0,0,l,h,0,0,-1,0)},c.computeOrthographicOffCenter=function(t,e,n,a,i,o,u){var s=1/(e-t),l=1/(a-n),h=1/(o-i),f=-(e+t)*s,d=-(a+n)*l,m=-(o+i)*h;return s*=2,l*=2,h*=-2,r(u)?(u[0]=s,u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=l,u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[10]=h,u[11]=0,u[12]=f,u[13]=d,u[14]=m,u[15]=1,u):new c(s,0,0,f,0,l,0,d,0,0,h,m,0,0,0,1)},c.computePerspectiveOffCenter=function(t,e,n,a,i,o,u){var s=2*i/(e-t),l=2*i/(a-n),h=(e+t)/(e-t),f=(a+n)/(a-n),d=-(o+i)/(o-i),m=-1,y=-2*o*i/(o-i);return r(u)?(u[0]=s,u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=l,u[6]=0,u[7]=0,u[8]=h,u[9]=f,u[10]=d,u[11]=m,u[12]=0,u[13]=0,u[14]=y,u[15]=0,u):new c(s,0,h,0,0,l,f,0,0,0,d,y,0,0,m,0)},c.computeInfinitePerspectiveOffCenter=function(t,e,n,a,i,o){var u=2*i/(e-t),s=2*i/(a-n),l=(e+t)/(e-t),h=(a+n)/(a-n),f=-1,d=-1,m=-2*i;return r(o)?(o[0]=u,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=s,o[6]=0,o[7]=0,o[8]=l,o[9]=h,o[10]=f,o[11]=d,o[12]=0,o[13]=0,o[14]=m,o[15]=0,o):new c(u,0,l,0,0,s,h,0,0,0,f,m,0,0,d,0)},c.computeViewportTransformation=function(t,e,a,i){t=n(t,n.EMPTY_OBJECT);var o=n(t.x,0),u=n(t.y,0),s=n(t.width,0),l=n(t.height,0);e=n(e,0),a=n(a,1);var h=.5*s,f=.5*l,d=.5*(a-e),m=h,y=f,p=d,w=o+h,v=u+f,x=e+d,g=1;return r(i)?(i[0]=m,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=y,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=p,i[11]=0,i[12]=w,i[13]=v,i[14]=x,i[15]=g,i):new c(m,0,0,w,0,y,0,v,0,0,p,x,0,0,0,g)},c.toArray=function(t,e){return r(e)?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e):[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]},c.getElementIndex=function(t,e){return 4*t+e},c.getColumn=function(t,n,a){var i=4*n,o=t[i],u=t[i+1],s=t[i+2],c=t[i+3];return r(a)?(a.x=o,a.y=u,a.z=s,a.w=c,a):new e(o,u,s,c)},c.setColumn=function(t,e,n,r){r=c.clone(t,r);var a=4*e;return r[a]=n.x,r[a+1]=n.y,r[a+2]=n.z,r[a+3]=n.w,r},c.getRow=function(t,n,a){var i=t[n],o=t[n+4],u=t[n+8],s=t[n+12];return r(a)?(a.x=i,a.y=o,a.z=u,a.w=s,a):new e(i,o,u,s)},c.setRow=function(t,e,n,r){return r=c.clone(t,r),r[e]=n.x,r[e+4]=n.y,r[e+8]=n.z,r[e+12]=n.w,r};var d=new t;c.getScale=function(e,n){return r(n)||(n=new t),n.x=t.magnitude(t.fromElements(e[0],e[1],e[2],d)),n.y=t.magnitude(t.fromElements(e[4],e[5],e[6],d)),n.z=t.magnitude(t.fromElements(e[8],e[9],e[10],d)),n
  };var m=new t;c.getMaximumScale=function(e){return c.getScale(e,m),t.getMaximumComponent(m)},c.multiply=function(t,e,n){var a=t[0],i=t[1],o=t[2],u=t[3],s=t[4],l=t[5],h=t[6],f=t[7],d=t[8],m=t[9],y=t[10],p=t[11],w=t[12],v=t[13],x=t[14],g=t[15],E=e[0],M=e[1],S=e[2],z=e[3],O=e[4],T=e[5],N=e[6],_=e[7],I=e[8],b=e[9],R=e[10],A=e[11],P=e[12],C=e[13],L=e[14],U=e[15],q=a*E+s*M+d*S+w*z,D=i*E+l*M+m*S+v*z,B=o*E+h*M+y*S+x*z,F=u*E+f*M+p*S+g*z,W=a*O+s*T+d*N+w*_,G=i*O+l*T+m*N+v*_,V=o*O+h*T+y*N+x*_,Y=u*O+f*T+p*N+g*_,k=a*I+s*b+d*R+w*A,j=i*I+l*b+m*R+v*A,H=o*I+h*b+y*R+x*A,Z=u*I+f*b+p*R+g*A,X=a*P+s*C+d*L+w*U,K=i*P+l*C+m*L+v*U,J=o*P+h*C+y*L+x*U,Q=u*P+f*C+p*L+g*U;return r(n)?(n[0]=q,n[1]=D,n[2]=B,n[3]=F,n[4]=W,n[5]=G,n[6]=V,n[7]=Y,n[8]=k,n[9]=j,n[10]=H,n[11]=Z,n[12]=X,n[13]=K,n[14]=J,n[15]=Q,n):new c(q,W,k,X,D,G,j,K,B,V,H,J,F,Y,Z,Q)},c.multiplyTransformation=function(t,e,n){var a=t[0],i=t[1],o=t[2],u=t[4],s=t[5],l=t[6],h=t[8],f=t[9],d=t[10],m=t[12],y=t[13],p=t[14],w=e[0],v=e[1],x=e[2],g=e[4],E=e[5],M=e[6],S=e[8],z=e[9],O=e[10],T=e[12],N=e[13],_=e[14],I=a*w+u*v+h*x,b=i*w+s*v+f*x,R=o*w+l*v+d*x,A=a*g+u*E+h*M,P=i*g+s*E+f*M,C=o*g+l*E+d*M,L=a*S+u*z+h*O,U=i*S+s*z+f*O,q=o*S+l*z+d*O,D=a*T+u*N+h*_+m,B=i*T+s*N+f*_+y,F=o*T+l*N+d*_+p;return r(n)?(n[0]=I,n[1]=b,n[2]=R,n[3]=0,n[4]=A,n[5]=P,n[6]=C,n[7]=0,n[8]=L,n[9]=U,n[10]=q,n[11]=0,n[12]=D,n[13]=B,n[14]=F,n[15]=1,n):new c(I,A,L,D,b,P,U,B,R,C,q,F,0,0,0,1)},c.multiplyByTranslation=function(t,e,n){var a=e.x,i=e.y,o=e.z,u=a*t[0]+i*t[4]+o*t[8]+t[12],s=a*t[1]+i*t[5]+o*t[9]+t[13],l=a*t[2]+i*t[6]+o*t[10]+t[14];return r(n)?(n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n[9]=t[9],n[10]=t[10],n[11]=t[11],n[12]=u,n[13]=s,n[14]=l,n[15]=t[15],n):new c(t[0],t[4],t[8],u,t[1],t[5],t[9],s,t[2],t[6],t[10],l,t[3],t[7],t[11],t[15])};var y=new t;return c.multiplyByUniformScale=function(t,e,n){return y.x=e,y.y=e,y.z=e,c.multiplyByScale(t,y,n)},c.multiplyByScale=function(t,e,n){var a=e.x,i=e.y,o=e.z;return 1===a&&1===i&&1===o?c.clone(t,n):r(n)?(n[0]=a*t[0],n[1]=a*t[1],n[2]=a*t[2],n[3]=0,n[4]=i*t[4],n[5]=i*t[5],n[6]=i*t[6],n[7]=0,n[8]=o*t[8],n[9]=o*t[9],n[10]=o*t[10],n[11]=0,n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=1,n):new c(a*t[0],i*t[4],o*t[8],t[12],a*t[1],i*t[5],o*t[9],t[13],a*t[2],i*t[6],o*t[10],t[14],0,0,0,1)},c.multiplyByVector=function(t,n,a){var i=n.x,o=n.y,u=n.z,s=n.w,c=t[0]*i+t[4]*o+t[8]*u+t[12]*s,l=t[1]*i+t[5]*o+t[9]*u+t[13]*s,h=t[2]*i+t[6]*o+t[10]*u+t[14]*s,f=t[3]*i+t[7]*o+t[11]*u+t[15]*s;return r(a)?(a.x=c,a.y=l,a.z=h,a.w=f,a):new e(c,l,h,f)},c.multiplyByPointAsVector=function(e,n,a){var i=n.x,o=n.y,u=n.z,s=e[0]*i+e[4]*o+e[8]*u,c=e[1]*i+e[5]*o+e[9]*u,l=e[2]*i+e[6]*o+e[10]*u;return r(a)?(a.x=s,a.y=c,a.z=l,a):new t(s,c,l)},c.multiplyByPoint=function(e,n,a){var i=n.x,o=n.y,u=n.z,s=e[0]*i+e[4]*o+e[8]*u+e[12],c=e[1]*i+e[5]*o+e[9]*u+e[13],l=e[2]*i+e[6]*o+e[10]*u+e[14];return r(a)?(a.x=s,a.y=c,a.z=l,a):new t(s,c,l)},c.multiplyByScalar=function(t,e,n){return r(n)?(n[0]=t[0]*e,n[1]=t[1]*e,n[2]=t[2]*e,n[3]=t[3]*e,n[4]=t[4]*e,n[5]=t[5]*e,n[6]=t[6]*e,n[7]=t[7]*e,n[8]=t[8]*e,n[9]=t[9]*e,n[10]=t[10]*e,n[11]=t[11]*e,n[12]=t[12]*e,n[13]=t[13]*e,n[14]=t[14]*e,n[15]=t[15]*e,n):new c(t[0]*e,t[4]*e,t[8]*e,t[12]*e,t[1]*e,t[5]*e,t[9]*e,t[13]*e,t[2]*e,t[6]*e,t[10]*e,t[14]*e,t[3]*e,t[7]*e,t[11]*e,t[15]*e)},c.negate=function(t,e){return r(e)?(e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e[4]=-t[4],e[5]=-t[5],e[6]=-t[6],e[7]=-t[7],e[8]=-t[8],e[9]=-t[9],e[10]=-t[10],e[11]=-t[11],e[12]=-t[12],e[13]=-t[13],e[14]=-t[14],e[15]=-t[15],e):new c(-t[0],-t[4],-t[8],-t[12],-t[1],-t[5],-t[9],-t[13],-t[2],-t[6],-t[10],-t[14],-t[3],-t[7],-t[11],-t[15])},c.transpose=function(t,e){if(!r(e))return new c(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]);var n=t[1],a=t[2],i=t[3],o=t[6],u=t[7],s=t[11];return e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=n,e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=a,e[9]=o,e[10]=t[10],e[11]=t[14],e[12]=i,e[13]=u,e[14]=s,e[15]=t[15],e},c.abs=function(t,e){return r(e)?(e[0]=Math.abs(t[0]),e[1]=Math.abs(t[1]),e[2]=Math.abs(t[2]),e[3]=Math.abs(t[3]),e[4]=Math.abs(t[4]),e[5]=Math.abs(t[5]),e[6]=Math.abs(t[6]),e[7]=Math.abs(t[7]),e[8]=Math.abs(t[8]),e[9]=Math.abs(t[9]),e[10]=Math.abs(t[10]),e[11]=Math.abs(t[11]),e[12]=Math.abs(t[12]),e[13]=Math.abs(t[13]),e[14]=Math.abs(t[14]),e[15]=Math.abs(t[15]),e):new c(Math.abs(t[0]),Math.abs(t[4]),Math.abs(t[8]),Math.abs(t[12]),Math.abs(t[1]),Math.abs(t[5]),Math.abs(t[9]),Math.abs(t[13]),Math.abs(t[2]),Math.abs(t[6]),Math.abs(t[10]),Math.abs(t[14]),Math.abs(t[3]),Math.abs(t[7]),Math.abs(t[11]),Math.abs(t[15]))},c.equals=function(t,e){return t===e||r(t)&&r(e)&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]},c.equalsEpsilon=function(t,e,n){return t===e||r(t)&&r(e)&&Math.abs(t[0]-e[0])<=n&&Math.abs(t[1]-e[1])<=n&&Math.abs(t[2]-e[2])<=n&&Math.abs(t[3]-e[3])<=n&&Math.abs(t[4]-e[4])<=n&&Math.abs(t[5]-e[5])<=n&&Math.abs(t[6]-e[6])<=n&&Math.abs(t[7]-e[7])<=n&&Math.abs(t[8]-e[8])<=n&&Math.abs(t[9]-e[9])<=n&&Math.abs(t[10]-e[10])<=n&&Math.abs(t[11]-e[11])<=n&&Math.abs(t[12]-e[12])<=n&&Math.abs(t[13]-e[13])<=n&&Math.abs(t[14]-e[14])<=n&&Math.abs(t[15]-e[15])<=n},c.getTranslation=function(e,n){return r(n)?(n.x=e[12],n.y=e[13],n.z=e[14],n):new t(e[12],e[13],e[14])},c.getRotation=function(t,e){return r(e)?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e):new u(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10])},c.inverse=function(t,e){var n=t[0],a=t[4],i=t[8],u=t[12],l=t[1],h=t[5],f=t[9],d=t[13],m=t[2],y=t[6],p=t[10],w=t[14],v=t[3],x=t[7],g=t[11],E=t[15],M=p*E,S=w*g,z=y*E,O=w*x,T=y*g,N=p*x,_=m*E,I=w*v,b=m*g,R=p*v,A=m*x,P=y*v,C=M*h+O*f+T*d-(S*h+z*f+N*d),L=S*l+_*f+R*d-(M*l+I*f+b*d),U=z*l+I*h+A*d-(O*l+_*h+P*d),q=N*l+b*h+P*f-(T*l+R*h+A*f),D=S*a+z*i+N*u-(M*a+O*i+T*u),B=M*n+I*i+b*u-(S*n+_*i+R*u),F=O*n+_*a+P*u-(z*n+I*a+A*u),W=T*n+R*a+A*i-(N*n+b*a+P*i);M=i*d,S=u*f,z=a*d,O=u*h,T=a*f,N=i*h,_=n*d,I=u*l,b=n*f,R=i*l,A=n*h,P=a*l;var G=M*x+O*g+T*E-(S*x+z*g+N*E),V=S*v+_*g+R*E-(M*v+I*g+b*E),Y=z*v+I*x+A*E-(O*v+_*x+P*E),k=N*v+b*x+P*g-(T*v+R*x+A*g),j=z*p+N*w+S*y-(T*w+M*y+O*p),H=b*w+M*m+I*p-(_*p+R*w+S*m),Z=_*y+P*w+O*m-(A*w+z*m+I*y),X=A*p+T*m+R*y-(b*y+P*p+N*m),K=n*C+a*L+i*U+u*q;if(Math.abs(K)<o.EPSILON20)throw new s("matrix is not invertible because its determinate is zero.");return K=1/K,r(e)?(e[0]=C*K,e[1]=L*K,e[2]=U*K,e[3]=q*K,e[4]=D*K,e[5]=B*K,e[6]=F*K,e[7]=W*K,e[8]=G*K,e[9]=V*K,e[10]=Y*K,e[11]=k*K,e[12]=j*K,e[13]=H*K,e[14]=Z*K,e[15]=X*K,e):new c(C*K,D*K,G*K,j*K,L*K,B*K,V*K,H*K,U*K,F*K,Y*K,Z*K,q*K,W*K,k*K,X*K)},c.inverseTransformation=function(t,e){var n=t[0],a=t[1],i=t[2],o=t[4],u=t[5],s=t[6],l=t[8],h=t[9],f=t[10],d=t[12],m=t[13],y=t[14],p=-n*d-a*m-i*y,w=-o*d-u*m-s*y,v=-l*d-h*m-f*y;return r(e)?(e[0]=n,e[1]=o,e[2]=l,e[3]=0,e[4]=a,e[5]=u,e[6]=h,e[7]=0,e[8]=i,e[9]=s,e[10]=f,e[11]=0,e[12]=p,e[13]=w,e[14]=v,e[15]=1,e):new c(n,a,i,p,o,u,s,w,l,h,f,v,0,0,0,1)},c.IDENTITY=i(new c(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)),c.COLUMN0ROW0=0,c.COLUMN0ROW1=1,c.COLUMN0ROW2=2,c.COLUMN0ROW3=3,c.COLUMN1ROW0=4,c.COLUMN1ROW1=5,c.COLUMN1ROW2=6,c.COLUMN1ROW3=7,c.COLUMN2ROW0=8,c.COLUMN2ROW1=9,c.COLUMN2ROW2=10,c.COLUMN2ROW3=11,c.COLUMN3ROW0=12,c.COLUMN3ROW1=13,c.COLUMN3ROW2=14,c.COLUMN3ROW3=15,c.prototype.clone=function(t){return c.clone(this,t)},c.prototype.equals=function(t){return c.equals(this,t)},c.prototype.equalsEpsilon=function(t,e){return c.equalsEpsilon(this,t,e)},c.prototype.toString=function(){return"("+this[0]+", "+this[4]+", "+this[8]+", "+this[12]+")\n"+"("+this[1]+", "+this[5]+", "+this[9]+", "+this[13]+")\n"+"("+this[2]+", "+this[6]+", "+this[10]+", "+this[14]+")\n"+"("+this[3]+", "+this[7]+", "+this[11]+", "+this[15]+")"},c}),define("Core/Rectangle",["./Cartographic","./defaultValue","./defined","./DeveloperError","./Ellipsoid","./freezeObject","./Math"],function(t,e,n,r,a,i,o){"use strict";var u=function(t,n,r,a){this.west=e(t,0),this.south=e(n,0),this.east=e(r,0),this.north=e(a,0)};u.fromDegrees=function(t,r,a,i,s){return t=o.toRadians(e(t,0)),r=o.toRadians(e(r,0)),a=o.toRadians(e(a,0)),i=o.toRadians(e(i,0)),n(s)?(s.west=t,s.south=r,s.east=a,s.north=i,s):new u(t,r,a,i)},u.fromCartographicArray=function(t,e){for(var r=Number.MAX_VALUE,a=-Number.MAX_VALUE,i=Number.MAX_VALUE,o=-Number.MAX_VALUE,s=0,c=t.length;c>s;s++){var l=t[s];r=Math.min(r,l.longitude),a=Math.max(a,l.longitude),i=Math.min(i,l.latitude),o=Math.max(o,l.latitude)}return n(e)?(e.west=r,e.south=i,e.east=a,e.north=o,e):new u(r,i,a,o)},u.packedLength=4,u.pack=function(t,n,r){r=e(r,0),n[r++]=t.west,n[r++]=t.south,n[r++]=t.east,n[r]=t.north},u.unpack=function(t,r,a){return r=e(r,0),n(a)||(a=new u),a.west=t[r++],a.south=t[r++],a.east=t[r++],a.north=t[r],a},u.clone=function(t,e){return n(t)?n(e)?(e.west=t.west,e.south=t.south,e.east=t.east,e.north=t.north,e):new u(t.west,t.south,t.east,t.north):void 0},u.prototype.clone=function(t){return u.clone(this,t)},u.prototype.equals=function(t){return u.equals(this,t)},u.equals=function(t,e){return t===e||n(t)&&n(e)&&t.west===e.west&&t.south===e.south&&t.east===e.east&&t.north===e.north},u.prototype.equalsEpsilon=function(t,e){return n(t)&&Math.abs(this.west-t.west)<=e&&Math.abs(this.south-t.south)<=e&&Math.abs(this.east-t.east)<=e&&Math.abs(this.north-t.north)<=e},u.validate=function(){},u.getSouthwest=function(e,r){return n(r)?(r.longitude=e.west,r.latitude=e.south,r.height=0,r):new t(e.west,e.south)},u.getNorthwest=function(e,r){return n(r)?(r.longitude=e.west,r.latitude=e.north,r.height=0,r):new t(e.west,e.north)},u.getNortheast=function(e,r){return n(r)?(r.longitude=e.east,r.latitude=e.north,r.height=0,r):new t(e.east,e.north)},u.getSoutheast=function(e,r){return n(r)?(r.longitude=e.east,r.latitude=e.south,r.height=0,r):new t(e.east,e.south)},u.getCenter=function(e,r){return n(r)?(r.longitude=.5*(e.west+e.east),r.latitude=.5*(e.south+e.north),r.height=0,r):new t(.5*(e.west+e.east),.5*(e.south+e.north))},u.intersectWith=function(t,e,r){var a=Math.max(t.west,e.west),i=Math.max(t.south,e.south),o=Math.min(t.east,e.east),s=Math.min(t.north,e.north);return n(r)?(r.west=a,r.south=i,r.east=o,r.north=s,r):new u(a,i,o,s)},u.contains=function(t,e){return e.longitude>=t.west&&e.longitude<=t.east&&e.latitude>=t.south&&e.latitude<=t.north},u.isEmpty=function(t){return t.west>=t.east||t.south>=t.north};var s=new t;return u.subsample=function(t,r,i,u){r=e(r,a.WGS84),i=e(i,0),n(u)||(u=[]);var c=0,l=t.north,h=t.south,f=t.east,d=t.west,m=s;m.height=i,m.longitude=d,m.latitude=l,u[c]=r.cartographicToCartesian(m,u[c]),c++,m.longitude=f,u[c]=r.cartographicToCartesian(m,u[c]),c++,m.latitude=h,u[c]=r.cartographicToCartesian(m,u[c]),c++,m.longitude=d,u[c]=r.cartographicToCartesian(m,u[c]),c++,m.latitude=0>l?l:h>0?h:0;for(var y=1;8>y;++y){var p=-Math.PI+y*o.PI_OVER_TWO;p>d&&f>p&&(m.longitude=p,u[c]=r.cartographicToCartesian(m,u[c]),c++)}return 0===m.latitude&&(m.longitude=d,u[c]=r.cartographicToCartesian(m,u[c]),c++,m.longitude=f,u[c]=r.cartographicToCartesian(m,u[c]),c++),u.length=c,u},u.MAX_VALUE=i(new u(-Math.PI,-o.PI_OVER_TWO,Math.PI,o.PI_OVER_TWO)),u}),define("Core/BoundingSphere",["./Cartesian3","./Cartographic","./defaultValue","./defined","./DeveloperError","./Ellipsoid","./GeographicProjection","./Intersect","./Interval","./Matrix4","./Rectangle"],function(t,e,n,r,a,i,o,u,s,c,l){"use strict";var h=function(e,r){this.center=t.clone(n(e,t.ZERO)),this.radius=n(r,0)},f=new t,d=new t,m=new t,y=new t,p=new t,w=new t,v=new t,x=new t,g=new t,E=new t,M=new t,S=new t;h.fromPoints=function(e,n){if(r(n)||(n=new h),!r(e)||0===e.length)return n.center=t.clone(t.ZERO,n.center),n.radius=0,n;for(var a=t.clone(e[0],v),i=t.clone(a,f),o=t.clone(a,d),u=t.clone(a,m),s=t.clone(a,y),c=t.clone(a,p),l=t.clone(a,w),z=e.length,O=1;z>O;O++){t.clone(e[O],a);var T=a.x,N=a.y,_=a.z;T<i.x&&t.clone(a,i),T>s.x&&t.clone(a,s),N<o.y&&t.clone(a,o),N>c.y&&t.clone(a,c),_<u.z&&t.clone(a,u),_>l.z&&t.clone(a,l)}var I=t.magnitudeSquared(t.subtract(s,i,x)),b=t.magnitudeSquared(t.subtract(c,o,x)),R=t.magnitudeSquared(t.subtract(l,u,x)),A=i,P=s,C=I;b>C&&(C=b,A=o,P=c),R>C&&(C=R,A=u,P=l);var L=g;L.x=.5*(A.x+P.x),L.y=.5*(A.y+P.y),L.z=.5*(A.z+P.z);var U=t.magnitudeSquared(t.subtract(P,L,x)),q=Math.sqrt(U),D=E;D.x=i.x,D.y=o.y,D.z=u.z;var B=M;B.x=s.x,B.y=c.y,B.z=l.z;var F=t.multiplyByScalar(t.add(D,B,x),.5,S),W=0;for(O=0;z>O;O++){t.clone(e[O],a);var G=t.magnitude(t.subtract(a,F,x));G>W&&(W=G);var V=t.magnitudeSquared(t.subtract(a,L,x));if(V>U){var Y=Math.sqrt(V);q=.5*(q+Y),U=q*q;var k=Y-q;L.x=(q*L.x+k*a.x)/Y,L.y=(q*L.y+k*a.y)/Y,L.z=(q*L.z+k*a.z)/Y}}return W>q?(t.clone(L,n.center),n.radius=q):(t.clone(F,n.center),n.radius=W),n};var z=new o,O=new t,T=new t,N=new e,_=new e;h.fromRectangle2D=function(t,e,n){return h.fromRectangleWithHeights2D(t,e,0,0,n)},h.fromRectangleWithHeights2D=function(e,a,i,o,u){if(r(u)||(u=new h),!r(e))return u.center=t.clone(t.ZERO,u.center),u.radius=0,u;a=n(a,z),l.getSouthwest(e,N),N.height=i,l.getNortheast(e,_),_.height=o;var s=a.project(N,O),c=a.project(_,T),f=c.x-s.x,d=c.y-s.y,m=c.z-s.z;u.radius=.5*Math.sqrt(f*f+d*d+m*m);var y=u.center;return y.x=s.x+.5*f,y.y=s.y+.5*d,y.z=s.z+.5*m,u};var I=[];h.fromRectangle3D=function(t,e,a,o){e=n(e,i.WGS84),a=n(a,0);var u;return r(t)&&(u=l.subsample(t,e,a,I)),h.fromPoints(u,o)},h.fromVertices=function(e,a,i,o){if(r(o)||(o=new h),!r(e)||0===e.length)return o.center=t.clone(t.ZERO,o.center),o.radius=0,o;a=n(a,t.ZERO),i=n(i,3);var u=v;u.x=e[0]+a.x,u.y=e[1]+a.y,u.z=e[2]+a.z;for(var s=t.clone(u,f),c=t.clone(u,d),l=t.clone(u,m),z=t.clone(u,y),O=t.clone(u,p),T=t.clone(u,w),N=e.length,_=0;N>_;_+=i){var I=e[_]+a.x,b=e[_+1]+a.y,R=e[_+2]+a.z;u.x=I,u.y=b,u.z=R,I<s.x&&t.clone(u,s),I>z.x&&t.clone(u,z),b<c.y&&t.clone(u,c),b>O.y&&t.clone(u,O),R<l.z&&t.clone(u,l),R>T.z&&t.clone(u,T)}var A=t.magnitudeSquared(t.subtract(z,s,x)),P=t.magnitudeSquared(t.subtract(O,c,x)),C=t.magnitudeSquared(t.subtract(T,l,x)),L=s,U=z,q=A;P>q&&(q=P,L=c,U=O),C>q&&(q=C,L=l,U=T);var D=g;D.x=.5*(L.x+U.x),D.y=.5*(L.y+U.y),D.z=.5*(L.z+U.z);var B=t.magnitudeSquared(t.subtract(U,D,x)),F=Math.sqrt(B),W=E;W.x=s.x,W.y=c.y,W.z=l.z;var G=M;G.x=z.x,G.y=O.y,G.z=T.z;var V=t.multiplyByScalar(t.add(W,G,x),.5,S),Y=0;for(_=0;N>_;_+=i){u.x=e[_]+a.x,u.y=e[_+1]+a.y,u.z=e[_+2]+a.z;var k=t.magnitude(t.subtract(u,V,x));k>Y&&(Y=k);var j=t.magnitudeSquared(t.subtract(u,D,x));if(j>B){var H=Math.sqrt(j);F=.5*(F+H),B=F*F;var Z=H-F;D.x=(F*D.x+Z*u.x)/H,D.y=(F*D.y+Z*u.y)/H,D.z=(F*D.z+Z*u.z)/H}}return Y>F?(t.clone(D,o.center),o.radius=F):(t.clone(V,o.center),o.radius=Y),o},h.fromCornerPoints=function(e,n,a){r(a)||(a=new h);var i=a.center;return t.add(e,n,i),t.multiplyByScalar(i,.5,i),a.radius=t.distance(i,n),a},h.fromEllipsoid=function(e,n){return r(n)||(n=new h),t.clone(t.ZERO,n.center),n.radius=e.maximumRadius,n},h.clone=function(e,n){return r(e)?r(n)?(n.center=t.clone(e.center,n.center),n.radius=e.radius,n):new h(e.center,e.radius):void 0},h.packedLength=4,h.pack=function(t,e,r){r=n(r,0);var a=t.center;e[r++]=a.x,e[r++]=a.y,e[r++]=a.z,e[r]=t.radius},h.unpack=function(t,e,a){e=n(e,0),r(a)||(a=new h);var i=a.center;return i.x=t[e++],i.y=t[e++],i.z=t[e++],a.radius=t[e],a};var b=new t,R=new t;h.union=function(e,n,a){r(a)||(a=new h);var i=e.center,o=n.center;t.add(i,o,R);var u=t.multiplyByScalar(R,.5,R),s=t.magnitude(t.subtract(i,u,b))+e.radius,c=t.magnitude(t.subtract(o,u,b))+n.radius;return a.radius=Math.max(s,c),t.clone(u,a.center),a};var A=new t;h.expand=function(e,n,r){r=h.clone(e,r);var a=t.magnitude(t.subtract(n,r.center,A));return a>r.radius&&(r.radius=a),r},h.intersect=function(e,n){var r=e.center,a=e.radius,i=t.dot(n,r)+n.w;return-a>i?u.OUTSIDE:a>i?u.INTERSECTING:u.INSIDE},h.transform=function(t,e,n){return r(n)||(n=new h),n.center=c.multiplyByPoint(e,t.center,n.center),n.radius=c.getMaximumScale(e)*t.radius,n};var P=new t;h.distanceSquaredTo=function(e,n){var r=t.subtract(e.center,n,P);return t.magnitudeSquared(r)-e.radius*e.radius},h.transformWithoutScale=function(t,e,n){return r(n)||(n=new h),n.center=c.multiplyByPoint(e,t.center,n.center),n.radius=t.radius,n};var C=new t;h.getPlaneDistances=function(e,n,a,i){r(i)||(i=new s);var o=t.subtract(e.center,n,C),u=t.multiplyByScalar(a,t.dot(a,o),C),c=t.magnitude(u);return i.start=c-e.radius,i.stop=c+e.radius,i};for(var L=new t,U=new t,q=new t,D=new t,B=new t,F=new e,W=new Array(8),G=0;8>G;++G)W[G]=new t;var V=new o;return h.projectTo2D=function(e,r,a){r=n(r,V);var i=r.ellipsoid,o=e.center,u=e.radius,s=i.geodeticSurfaceNormal(o,L),c=t.cross(t.UNIT_Z,s,U);t.normalize(c,c);var l=t.cross(s,c,q);t.normalize(l,l),t.multiplyByScalar(s,u,s),t.multiplyByScalar(l,u,l),t.multiplyByScalar(c,u,c);var f=t.negate(l,B),d=t.negate(c,D),m=W,y=m[0];t.add(s,l,y),t.add(y,c,y),y=m[1],t.add(s,l,y),t.add(y,d,y),y=m[2],t.add(s,f,y),t.add(y,d,y),y=m[3],t.add(s,f,y),t.add(y,c,y),t.negate(s,s),y=m[4],t.add(s,l,y),t.add(y,c,y),y=m[5],t.add(s,l,y),t.add(y,d,y),y=m[6],t.add(s,f,y),t.add(y,d,y),y=m[7],t.add(s,f,y),t.add(y,c,y);for(var p=m.length,w=0;p>w;++w){var v=m[w];t.add(o,v,v);var x=i.cartesianToCartographic(v,F);r.project(x,v)}a=h.fromPoints(m,a),o=a.center;var g=o.x,E=o.y,M=o.z;return o.x=M,o.y=g,o.z=E,a},h.equals=function(e,n){return e===n||r(e)&&r(n)&&t.equals(e.center,n.center)&&e.radius===n.radius},h.prototype.intersect=function(t){return h.intersect(this,t)},h.prototype.equals=function(t){return h.equals(this,t)},h.prototype.clone=function(t){return h.clone(this,t)},h}),define("Core/Cartesian2",["./defaultValue","./defined","./DeveloperError","./freezeObject","./Math"],function(t,e,n,r,a){"use strict";var i=function(e,n){this.x=t(e,0),this.y=t(n,0)};i.fromElements=function(t,n,r){return e(r)?(r.x=t,r.y=n,r):new i(t,n)},i.clone=function(t,n){return e(t)?e(n)?(n.x=t.x,n.y=t.y,n):new i(t.x,t.y):void 0},i.fromCartesian3=i.clone,i.fromCartesian4=i.clone,i.packedLength=2,i.pack=function(e,n,r){r=t(r,0),n[r++]=e.x,n[r]=e.y},i.unpack=function(n,r,a){return r=t(r,0),e(a)||(a=new i),a.x=n[r++],a.y=n[r],a},i.fromArray=i.unpack,i.getMaximumComponent=function(t){return Math.max(t.x,t.y)},i.getMinimumComponent=function(t){return Math.min(t.x,t.y)},i.getMinimumByComponent=function(t,e,n){return n.x=Math.min(t.x,e.x),n.y=Math.min(t.y,e.y),n},i.getMaximumByComponent=function(t,e,n){return n.x=Math.max(t.x,e.x),n.y=Math.max(t.y,e.y),n},i.magnitudeSquared=function(t){return t.x*t.x+t.y*t.y},i.magnitude=function(t){return Math.sqrt(i.magnitudeSquared(t))};var o=new i;i.distance=function(t,e){return i.subtract(t,e,o),i.magnitude(o)},i.normalize=function(t,e){var n=i.magnitude(t);return e.x=t.x/n,e.y=t.y/n,e},i.dot=function(t,e){return t.x*e.x+t.y*e.y},i.multiplyComponents=function(t,e,n){return n.x=t.x*e.x,n.y=t.y*e.y,n},i.add=function(t,e,n){return n.x=t.x+e.x,n.y=t.y+e.y,n},i.subtract=function(t,e,n){return n.x=t.x-e.x,n.y=t.y-e.y,n},i.multiplyByScalar=function(t,e,n){return n.x=t.x*e,n.y=t.y*e,n},i.divideByScalar=function(t,e,n){return n.x=t.x/e,n.y=t.y/e,n},i.negate=function(t,e){return e.x=-t.x,e.y=-t.y,e},i.abs=function(t,e){return e.x=Math.abs(t.x),e.y=Math.abs(t.y),e};var u=new i;i.lerp=function(t,e,n,r){return i.multiplyByScalar(e,n,u),r=i.multiplyByScalar(t,1-n,r),i.add(u,r,r)};var s=new i,c=new i;i.angleBetween=function(t,e){return i.normalize(t,s),i.normalize(e,c),a.acosClamped(i.dot(s,c))};var l=new i;return i.mostOrthogonalAxis=function(t,e){var n=i.normalize(t,l);return i.abs(n,n),e=n.x<=n.y?i.clone(i.UNIT_X,e):i.clone(i.UNIT_Y,e)},i.equals=function(t,n){return t===n||e(t)&&e(n)&&t.x===n.x&&t.y===n.y},i.equalsEpsilon=function(t,n,r){return t===n||e(t)&&e(n)&&Math.abs(t.x-n.x)<=r&&Math.abs(t.y-n.y)<=r},i.ZERO=r(new i(0,0)),i.UNIT_X=r(new i(1,0)),i.UNIT_Y=r(new i(0,1)),i.prototype.clone=function(t){return i.clone(this,t)},i.prototype.equals=function(t){return i.equals(this,t)},i.prototype.equalsEpsilon=function(t,e){return i.equalsEpsilon(this,t,e)},i.prototype.toString=function(){return"("+this.x+", "+this.y+")"},i}),define("Core/Fullscreen",["./defined","./defineProperties"],function(t,e){"use strict";var n,r={requestFullscreen:void 0,exitFullscreen:void 0,fullscreenEnabled:void 0,fullscreenElement:void 0,fullscreenchange:void 0,fullscreenerror:void 0},a={};return e(a,{element:{get:function(){return a.supportsFullscreen()?document[r.fullscreenElement]:void 0}},changeEventName:{get:function(){return a.supportsFullscreen()?r.fullscreenchange:void 0}},errorEventName:{get:function(){return a.supportsFullscreen()?r.fullscreenerror:void 0}},enabled:{get:function(){return a.supportsFullscreen()?document[r.fullscreenEnabled]:void 0}},fullscreen:{get:function(){return a.supportsFullscreen()?null!==a.element:void 0}}}),a.supportsFullscreen=function(){if(t(n))return n;n=!1;var e=document.body;if("function"==typeof e.requestFullscreen)return r.requestFullscreen="requestFullscreen",r.exitFullscreen="exitFullscreen",r.fullscreenEnabled="fullscreenEnabled",r.fullscreenElement="fullscreenElement",r.fullscreenchange="fullscreenchange",r.fullscreenerror="fullscreenerror",n=!0;for(var a,i=["webkit","moz","o","ms","khtml"],o=0,u=i.length;u>o;++o){var s=i[o];a=s+"RequestFullscreen","function"==typeof e[a]?(r.requestFullscreen=a,n=!0):(a=s+"RequestFullScreen","function"==typeof e[a]&&(r.requestFullscreen=a,n=!0)),a=s+"ExitFullscreen","function"==typeof document[a]?r.exitFullscreen=a:(a=s+"CancelFullScreen","function"==typeof document[a]&&(r.exitFullscreen=a)),a=s+"FullscreenEnabled",t(document[a])?r.fullscreenEnabled=a:(a=s+"FullScreenEnabled",t(document[a])&&(r.fullscreenEnabled=a)),a=s+"FullscreenElement",t(document[a])?r.fullscreenElement=a:(a=s+"FullScreenElement",t(document[a])&&(r.fullscreenElement=a)),a=s+"fullscreenchange",t(document["on"+a])&&("ms"===s&&(a="MSFullscreenChange"),r.fullscreenchange=a),a=s+"fullscreenerror",t(document["on"+a])&&("ms"===s&&(a="MSFullscreenError"),r.fullscreenerror=a)}return n},a.requestFullscreen=function(t){a.supportsFullscreen()&&t[r.requestFullscreen]()},a.exitFullscreen=function(){a.supportsFullscreen()&&document[r.exitFullscreen]()},a}),define("Core/FeatureDetection",["./defaultValue","./defined","./Fullscreen"],function(t,e,n){"use strict";function r(t){for(var e=t.split("."),n=0,r=e.length;r>n;++n)e[n]=parseInt(e[n],10);return e}function a(){if(!e(f)){var t=/ Chrome\/([\.0-9]+)/.exec(navigator.userAgent);null===t?f=!1:(f=!0,d=r(t[1]))}return f}function i(){return a()&&d}function o(){if(!e(m))if(a()||!/ Safari\/[\.0-9]+/.test(navigator.userAgent))m=!1;else{var t=/ Version\/([\.0-9]+)/.exec(navigator.userAgent);null===t?m=!1:(m=!0,y=r(t[1]))}return m}function u(){return o()&&y}function s(){if(!e(p)){var t=/ AppleWebKit\/([\.0-9]+)(\+?)/.exec(navigator.userAgent);null===t?p=!1:(p=!0,w=r(t[1]),w.isNightly=!!t[2])}return p}function c(){return s()&&w}function l(){if(!e(v)){var t;"Microsoft Internet Explorer"===navigator.appName?(t=/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(navigator.userAgent),null!==t&&(v=!0,x=r(t[1]))):"Netscape"===navigator.appName?(t=/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(navigator.userAgent),null!==t&&(v=!0,x=r(t[1]))):v=!1}return v}function h(){return l()&&x}var f,d,m,y,p,w,v,x,g={isChrome:a,chromeVersion:i,isSafari:o,safariVersion:u,isWebkit:s,webkitVersion:c,isInternetExplorer:l,internetExplorerVersion:h,hardwareConcurrency:t(navigator.hardwareConcurrency,3)};return g.supportsFullscreen=function(){return n.supportsFullscreen()},g.supportsTypedArrays=function(){return"undefined"!=typeof ArrayBuffer},g}),define("Core/ComponentDatatype",["./defaultValue","./defined","./DeveloperError","./FeatureDetection"],function(t,e,n,r){"use strict";if(!r.supportsTypedArrays())return{};var a={BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,FLOAT:5126,DOUBLE:5130};return a.getSizeInBytes=function(t){switch(t){case a.BYTE:return Int8Array.BYTES_PER_ELEMENT;case a.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case a.SHORT:return Int16Array.BYTES_PER_ELEMENT;case a.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case a.FLOAT:return Float32Array.BYTES_PER_ELEMENT;case a.DOUBLE:return Float64Array.BYTES_PER_ELEMENT;default:throw new n("componentDatatype is not a valid value.")}},a.fromTypedArray=function(t){return t instanceof Int8Array?a.BYTE:t instanceof Uint8Array?a.UNSIGNED_BYTE:t instanceof Int16Array?a.SHORT:t instanceof Uint16Array?a.UNSIGNED_SHORT:t instanceof Float32Array?a.FLOAT:t instanceof Float64Array?a.DOUBLE:void 0},a.validate=function(t){return e(t)&&(t===a.BYTE||t===a.UNSIGNED_BYTE||t===a.SHORT||t===a.UNSIGNED_SHORT||t===a.FLOAT||t===a.DOUBLE)},a.createTypedArray=function(t,e){switch(t){case a.BYTE:return new Int8Array(e);case a.UNSIGNED_BYTE:return new Uint8Array(e);case a.SHORT:return new Int16Array(e);case a.UNSIGNED_SHORT:return new Uint16Array(e);case a.FLOAT:return new Float32Array(e);case a.DOUBLE:return new Float64Array(e);default:throw new n("componentDatatype is not a valid value.")}},a.createArrayBufferView=function(e,r,i,o){switch(i=t(i,0),o=t(o,(r.byteLength-i)/a.getSizeInBytes(e)),e){case a.BYTE:return new Int8Array(r,i,o);case a.UNSIGNED_BYTE:return new Uint8Array(r,i,o);case a.SHORT:return new Int16Array(r,i,o);case a.UNSIGNED_SHORT:return new Uint16Array(r,i,o);case a.FLOAT:return new Float32Array(r,i,o);case a.DOUBLE:return new Float64Array(r,i,o);default:throw new n("componentDatatype is not a valid value.")}},a}),define("Core/Geometry",["./defaultValue","./defined","./DeveloperError"],function(t,e,n){"use strict";var r=function(e){e=t(e,t.EMPTY_OBJECT),this.attributes=e.attributes,this.indices=e.indices,this.primitiveType=e.primitiveType,this.boundingSphere=e.boundingSphere};return r.computeNumberOfVertices=function(t){var r=-1;for(var a in t.attributes)if(t.attributes.hasOwnProperty(a)&&e(t.attributes[a])&&e(t.attributes[a].values)){var i=t.attributes[a],o=i.values.length/i.componentsPerAttribute;if(r!==o&&-1!==r)throw new n("All attribute lists must have the same number of attributes.");r=o}return r},r}),define("Core/GeometryAttribute",["./defaultValue","./defined","./DeveloperError"],function(t){"use strict";var e=function(e){e=t(e,t.EMPTY_OBJECT),this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=t(e.normalize,!1),this.values=e.values};return e}),define("Core/GeometryAttributes",["./defaultValue"],function(t){"use strict";var e=function(e){e=t(e,t.EMPTY_OBJECT),this.position=e.position,this.normal=e.normal,this.st=e.st,this.binormal=e.binormal,this.tangent=e.tangent,this.color=e.color};return e}),define("Core/IndexDatatype",["./defined","./DeveloperError","./Math"],function(t,e,n){"use strict";var r={UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123,UNSIGNED_INT:5125};return r.getSizeInBytes=function(t){switch(t){case r.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case r.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case r.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT}},r.validate=function(e){return t(e)&&(e===r.UNSIGNED_BYTE||e===r.UNSIGNED_SHORT||e===r.UNSIGNED_INT)},r.createTypedArray=function(t,e){return t>n.SIXTY_FOUR_KILOBYTES?new Uint32Array(e):new Uint16Array(e)},r}),define("Core/PrimitiveType",[],function(){"use strict";var t={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,validate:function(e){return e===t.POINTS||e===t.LINES||e===t.LINE_LOOP||e===t.LINE_STRIP||e===t.TRIANGLES||e===t.TRIANGLE_STRIP||e===t.TRIANGLE_FAN}};return t}),define("Core/VertexFormat",["./defaultValue","./freezeObject"],function(t,e){"use strict";var n=function(e){e=t(e,t.EMPTY_OBJECT),this.position=t(e.position,!1),this.normal=t(e.normal,!1),this.st=t(e.st,!1),this.binormal=t(e.binormal,!1),this.tangent=t(e.tangent,!1)};return n.POSITION_ONLY=e(new n({position:!0})),n.POSITION_AND_NORMAL=e(new n({position:!0,normal:!0})),n.POSITION_NORMAL_AND_ST=e(new n({position:!0,normal:!0,st:!0})),n.POSITION_AND_ST=e(new n({position:!0,st:!0})),n.ALL=e(new n({position:!0,normal:!0,st:!0,binormal:!0,tangent:!0})),n.DEFAULT=n.POSITION_NORMAL_AND_ST,n}),define("Core/EllipsoidGeometry",["./BoundingSphere","./Cartesian2","./Cartesian3","./ComponentDatatype","./defaultValue","./DeveloperError","./Ellipsoid","./Geometry","./GeometryAttribute","./GeometryAttributes","./IndexDatatype","./Math","./PrimitiveType","./VertexFormat"],function(t,e,n,r,a,i,o,u,s,c,l,h,f,d){"use strict";var m=new n,y=new n,p=new n,w=new n,v=new n,x=new n(1,1,1),g=Math.cos,E=Math.sin,M=function(t){t=a(t,a.EMPTY_OBJECT);var e=a(t.radii,x),r=a(t.stackPartitions,64),i=a(t.slicePartitions,64),o=a(t.vertexFormat,d.DEFAULT);this._radii=n.clone(e),this._stackPartitions=r,this._slicePartitions=i,this._vertexFormat=o,this._workerName="createEllipsoidGeometry"};return M.createGeometry=function(a){var i,d,x=a._radii,M=o.fromCartesian3(x),S=a._vertexFormat,z=a._slicePartitions+1,O=a._stackPartitions+1,T=O*z,N=new Float64Array(3*T),_=6*(z-1)*(O-1),I=l.createTypedArray(T,_),b=S.normal?new Float32Array(3*T):void 0,R=S.tangent?new Float32Array(3*T):void 0,A=S.binormal?new Float32Array(3*T):void 0,P=S.st?new Float32Array(2*T):void 0,C=new Array(z),L=new Array(z),U=0;for(i=0;z>i;i++){var q=h.TWO_PI*i/(z-1);C[i]=g(q),L[i]=E(q),N[U++]=0,N[U++]=0,N[U++]=x.z}for(i=1;O-1>i;i++){var D=Math.PI*i/(O-1),B=E(D),F=x.x*B,W=x.y*B,G=x.z*g(D);for(d=0;z>d;d++)N[U++]=C[d]*F,N[U++]=L[d]*W,N[U++]=G}for(i=0;z>i;i++)N[U++]=0,N[U++]=0,N[U++]=-x.z;var V=new c;S.position&&(V.position=new s({componentDatatype:r.DOUBLE,componentsPerAttribute:3,values:N}));var Y=0,k=0,j=0,H=0;if(S.st||S.normal||S.tangent||S.binormal){for(i=0;T>i;i++){var Z=n.fromArray(N,3*i,m),X=M.geodeticSurfaceNormal(Z,y);if(S.st){var K=e.negate(X,v);e.magnitude(K)<h.EPSILON6&&(U=3*(i+z*Math.floor(.5*O)),U>N.length&&(U=3*(i-z*Math.floor(.5*O))),n.fromArray(N,U,K),M.geodeticSurfaceNormal(K,K),e.negate(K,K)),P[Y++]=Math.atan2(K.y,K.x)/h.TWO_PI+.5,P[Y++]=Math.asin(X.z)/Math.PI+.5}if(S.normal&&(b[k++]=X.x,b[k++]=X.y,b[k++]=X.z),S.tangent||S.binormal){var J=p;if(z>i||i>T-z-1?(n.cross(n.UNIT_X,X,J),n.normalize(J,J)):(n.cross(n.UNIT_Z,X,J),n.normalize(J,J)),S.tangent&&(R[j++]=J.x,R[j++]=J.y,R[j++]=J.z),S.binormal){var Q=n.cross(X,J,w);n.normalize(Q,Q),A[H++]=Q.x,A[H++]=Q.y,A[H++]=Q.z}}}S.st&&(V.st=new s({componentDatatype:r.FLOAT,componentsPerAttribute:2,values:P})),S.normal&&(V.normal=new s({componentDatatype:r.FLOAT,componentsPerAttribute:3,values:b})),S.tangent&&(V.tangent=new s({componentDatatype:r.FLOAT,componentsPerAttribute:3,values:R})),S.binormal&&(V.binormal=new s({componentDatatype:r.FLOAT,componentsPerAttribute:3,values:A}))}for(U=0,i=0;O>i;i++){var $=i*z,te=(i+1)*z;for(d=0;z-1>d;d++)I[U++]=te+d,I[U++]=te+d+1,I[U++]=$+d+1,I[U++]=te+d,I[U++]=$+d+1,I[U++]=$+d}return new u({attributes:V,indices:I,primitiveType:f.TRIANGLES,boundingSphere:t.fromEllipsoid(M)})},M}),define("Workers/createEllipsoidGeometry",["../Core/EllipsoidGeometry"],function(t){"use strict";return t.createGeometry})}();