define(["exports","./when-422ea0ae","./Cartesian2-bd414876","./Cartesian3-e0307675","./Matrix4-4c545f70","./Check-741c5f3c","./defaultValue-81eec7ed","./Resource-8ae1a924","./RuntimeError-26acdd3b","./Math-e73894ab"],(function(e,t,n,r,a,s,i,o,u,l){"use strict";let d;const c={requestFullscreen:void 0,exitFullscreen:void 0,fullscreenEnabled:void 0,fullscreenElement:void 0,fullscreenchange:void 0,fullscreenerror:void 0},f={};let p,m,h,y,w,x,C,_,S,E,g,M,O,D,A,T,P;function R(e){const t=e.split(".");for(let e=0,n=t.length;e0&&n.height>0,e.resolve(q._result)},n.onerror=function(){q._result=!1,e.resolve(q._result)},n.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",e.promise},Object.defineProperties(q,{initialized:{get:function(){return i.defined(q._result)}}});const v=[];"undefined"!=typeof ArrayBuffer&&(v.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),"undefined"!=typeof Uint8ClampedArray&&v.push(Uint8ClampedArray),"undefined"!=typeof Uint8ClampedArray&&v.push(Uint8ClampedArray),"undefined"!=typeof BigInt64Array&&v.push(BigInt64Array),"undefined"!=typeof BigUint64Array&&v.push(BigUint64Array));const $={isChrome:I,chromeVersion:function(){return I()&&h},isSafari:N,safariVersion:function(){return N()&&w},isWebkit:U,webkitVersion:function(){return U()&&C},isInternetExplorer:F,internetExplorerVersion:function(){return F()&&S},isEdge:b,edgeVersion:function(){return b()&&g},isFirefox:z,firefoxVersion:function(){return z()&&O},isWindows:function(){return i.defined(D)||(D=/Windows/i.test(p.appVersion)),D},hardwareConcurrency:i.defaultValue(p.hardwareConcurrency,3),supportsPointerEvents:function(){return i.defined(A)||(A=!z()&&"undefined"!=typeof PointerEvent&&(!i.defined(p.pointerEnabled)||p.pointerEnabled)),A},supportsImageRenderingPixelated:W,supportsWebP:q,imageRenderingValue:function(){return W()?T:void 0},typedArrayTypes:v};function B(e,t,n,r){this.x=i.defaultValue(e,0),this.y=i.defaultValue(t,0),this.z=i.defaultValue(n,0),this.w=i.defaultValue(r,0)}$.supportsBasis=function(e){return $.supportsWebAssembly()&&e.context.supportsBasis},$.supportsFullscreen=function(){return f.supportsFullscreen()},$.supportsTypedArrays=function(){return"undefined"!=typeof ArrayBuffer},$.supportsBigInt64Array=function(){return"undefined"!=typeof BigInt64Array},$.supportsBigUint64Array=function(){return"undefined"!=typeof BigUint64Array},$.supportsBigInt=function(){return"undefined"!=typeof BigInt},$.supportsWebWorkers=function(){return"undefined"!=typeof Worker},$.supportsWebAssembly=function(){return"undefined"!=typeof WebAssembly&&!$.isEdge()};let V=new r.Cartesian3;B.fromAxisAngle=function(e,t,n){const a=t/2,s=Math.sin(a);V=r.Cartesian3.normalize(e,V);const o=V.x*s,u=V.y*s,l=V.z*s,d=Math.cos(a);return i.defined(n)?(n.x=o,n.y=u,n.z=l,n.w=d,n):new B(o,u,l,d)};const L=[1,2,0],k=new Array(3);B.fromRotationMatrix=function(e,t){let n,r,s,o,u;const l=e[a.Matrix3.COLUMN0ROW0],d=e[a.Matrix3.COLUMN1ROW1],c=e[a.Matrix3.COLUMN2ROW2],f=l+d+c;if(f>0)n=Math.sqrt(f+1),u=.5*n,n=.5/n,r=(e[a.Matrix3.COLUMN1ROW2]-e[a.Matrix3.COLUMN2ROW1])*n,s=(e[a.Matrix3.COLUMN2ROW0]-e[a.Matrix3.COLUMN0ROW2])*n,o=(e[a.Matrix3.COLUMN0ROW1]-e[a.Matrix3.COLUMN1ROW0])*n;else{const t=L;let i=0;d>l&&(i=1),c>l&&c>d&&(i=2);const f=t[i],p=t[f];n=Math.sqrt(e[a.Matrix3.getElementIndex(i,i)]-e[a.Matrix3.getElementIndex(f,f)]-e[a.Matrix3.getElementIndex(p,p)]+1);const m=k;m[i]=.5*n,n=.5/n,u=(e[a.Matrix3.getElementIndex(p,f)]-e[a.Matrix3.getElementIndex(f,p)])*n,m[f]=(e[a.Matrix3.getElementIndex(f,i)]+e[a.Matrix3.getElementIndex(i,f)])*n,m[p]=(e[a.Matrix3.getElementIndex(p,i)]+e[a.Matrix3.getElementIndex(i,p)])*n,r=-m[0],s=-m[1],o=-m[2]}return i.defined(t)?(t.x=r,t.y=s,t.z=o,t.w=u,t):new B(r,s,o,u)};const Y=new B;let j=new B,G=new B,Z=new B;B.fromHeadingPitchRoll=function(e,t){return Z=B.fromAxisAngle(r.Cartesian3.UNIT_X,e.roll,Y),G=B.fromAxisAngle(r.Cartesian3.UNIT_Y,-e.pitch,t),t=B.multiply(G,Z,G),j=B.fromAxisAngle(r.Cartesian3.UNIT_Z,-e.heading,Y),B.multiply(j,t,t)};const J=new r.Cartesian3,X=new r.Cartesian3,H=new B,Q=new B,K=new B;B.packedLength=4,B.pack=function(e,t,n){return n=i.defaultValue(n,0),t[n++]=e.x,t[n++]=e.y,t[n++]=e.z,t[n]=e.w,t},B.unpack=function(e,t,n){return t=i.defaultValue(t,0),i.defined(n)||(n=new B),n.x=e[t],n.y=e[t+1],n.z=e[t+2],n.w=e[t+3],n},B.packedInterpolationLength=3,B.convertPackedArrayForInterpolation=function(e,t,n,r){B.unpack(e,4*n,K),B.conjugate(K,K);for(let a=0,s=n-t+1;a0))return r;i=r-1}return~(i+1)}function he(e,t,n,r,a){this.xPoleWander=e,this.yPoleWander=t,this.xPoleOffset=n,this.yPoleOffset=r,this.ut1MinusUtc=a}function ye(e,t,n,r,a,s,i,o){this.year=e,this.month=t,this.day=n,this.hour=r,this.minute=a,this.second=s,this.millisecond=i,this.isLeapSecond=o}function we(e){return e%4==0&&e%100!=0||e%400==0}function xe(e,t){this.julianDate=e,this.offset=t}de[7]=le/136,ce[7]=8*le/17,B.fastSlerp=function(e,t,n,r){let a,s=B.dot(e,t);s>=0?a=1:(a=-1,s=-s);const i=s-1,o=1-n,u=n*n,l=o*o;for(let e=7;e>=0;--e)fe[e]=(de[e]*u-ce[e])*i,pe[e]=(de[e]*l-ce[e])*i;const d=a*n*(1+fe[0]*(1+fe[1]*(1+fe[2]*(1+fe[3]*(1+fe[4]*(1+fe[5]*(1+fe[6]*(1+fe[7])))))))),c=o*(1+pe[0]*(1+pe[1]*(1+pe[2]*(1+pe[3]*(1+pe[4]*(1+pe[5]*(1+pe[6]*(1+pe[7])))))))),f=B.multiplyByScalar(e,c,ue);return B.multiplyByScalar(t,d,r),B.add(f,r,r)},B.fastSquad=function(e,t,n,r,a,s){const i=B.fastSlerp(e,t,a,ie),o=B.fastSlerp(n,r,a,oe);return B.fastSlerp(i,o,2*a*(1-a),s)},B.equals=function(e,t){return e===t||i.defined(e)&&i.defined(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.w===t.w},B.equalsEpsilon=function(e,t,n){return n=i.defaultValue(n,0),e===t||i.defined(e)&&i.defined(t)&&Math.abs(e.x-t.x)<=n&&Math.abs(e.y-t.y)<=n&&Math.abs(e.z-t.z)<=n&&Math.abs(e.w-t.w)<=n},B.ZERO=Object.freeze(new B(0,0,0,0)),B.IDENTITY=Object.freeze(new B(0,0,0,1)),B.prototype.clone=function(e){return B.clone(this,e)},B.prototype.equals=function(e){return B.equals(this,e)},B.prototype.equalsEpsilon=function(e,t){return B.equalsEpsilon(this,e,t)},B.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z}, ${this.w})`};var Ce=Object.freeze({SECONDS_PER_MILLISECOND:.001,SECONDS_PER_MINUTE:60,MINUTES_PER_HOUR:60,HOURS_PER_DAY:24,SECONDS_PER_HOUR:3600,MINUTES_PER_DAY:1440,SECONDS_PER_DAY:86400,DAYS_PER_JULIAN_CENTURY:36525,PICOSECOND:1e-9,MODIFIED_JULIAN_DATE_DIFFERENCE:2400000.5});var _e=Object.freeze({UTC:0,TAI:1});const Se=new ye,Ee=[31,28,31,30,31,30,31,31,30,31,30,31];function ge(e,t){return qe.compare(e.julianDate,t.julianDate)}const Me=new xe;function Oe(e){Me.julianDate=e;const t=qe.leapSeconds;let n=me(t,Me,ge);n<0&&(n=~n),n>=t.length&&(n=t.length-1);let r=t[n].offset;if(n>0){qe.secondsDifference(t[n].julianDate,e)>r&&(n--,r=t[n].offset)}qe.addSeconds(e,r,e)}function De(e,t){Me.julianDate=e;const n=qe.leapSeconds;let r=me(n,Me,ge);if(r<0&&(r=~r),0===r)return qe.addSeconds(e,-n[0].offset,t);if(r>=n.length)return qe.addSeconds(e,-n[r-1].offset,t);const a=qe.secondsDifference(n[r].julianDate,e);return 0===a?qe.addSeconds(e,-n[r].offset,t):a<=1?void 0:qe.addSeconds(e,-n[--r].offset,t)}function Ae(e,t,n){const r=t/Ce.SECONDS_PER_DAY|0;return e+=r,(t-=Ce.SECONDS_PER_DAY*r)<0&&(e--,t+=Ce.SECONDS_PER_DAY),n.dayNumber=e,n.secondsOfDay=t,n}function Te(e,t,n,r,a,s,i){const o=(t-14)/12|0,u=e+4800+o;let l=(1461*u/4|0)+(367*(t-2-12*o)/12|0)-(3*((u+100)/100|0)/4|0)+n-32075;(r-=12)<0&&(r+=24);const d=s+(r*Ce.SECONDS_PER_HOUR+a*Ce.SECONDS_PER_MINUTE+i*Ce.SECONDS_PER_MILLISECOND);return d>=43200&&(l-=1),[l,d]}const Pe=/^(\d{4})$/,Re=/^(\d{4})-(\d{2})$/,Ie=/^(\d{4})-?(\d{3})$/,Ne=/^(\d{4})-?W(\d{2})-?(\d{1})?$/,Ue=/^(\d{4})-?(\d{2})-?(\d{2})$/,Fe=/([Z+\-])?(\d{2})?:?(\d{2})?$/,be=/^(\d{2})(\.\d+)?/.source+Fe.source,ze=/^(\d{2}):?(\d{2})(\.\d+)?/.source+Fe.source,We=/^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source+Fe.source;function qe(e,t,n){this.dayNumber=void 0,this.secondsOfDay=void 0,e=i.defaultValue(e,0),t=i.defaultValue(t,0),n=i.defaultValue(n,_e.UTC);const r=0|e;Ae(r,t+=(e-r)*Ce.SECONDS_PER_DAY,this),n===_e.UTC&&Oe(this)}qe.fromGregorianDate=function(e,t){const n=Te(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond);return i.defined(t)?(Ae(n[0],n[1],t),Oe(t),t):new qe(n[0],n[1],_e.UTC)},qe.fromDate=function(e,t){const n=Te(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds());return i.defined(t)?(Ae(n[0],n[1],t),Oe(t),t):new qe(n[0],n[1],_e.UTC)},qe.fromIso8601=function(e,t){let n,r=(e=e.replace(",",".")).split("T"),a=1,s=1,o=0,u=0,l=0,d=0;const c=r[0],f=r[1];let p,m,h;if(r=c.match(Ue),null!==r)n=+r[1],a=+r[2],s=+r[3];else if(r=c.match(Re),null!==r)n=+r[1],a=+r[2];else if(r=c.match(Pe),null!==r)n=+r[1];else{let e;if(r=c.match(Ie),null!==r)n=+r[1],e=+r[2],m=we(n);else if(r=c.match(Ne),null!==r){n=+r[1];e=7*+r[2]+(+r[3]||0)-new Date(Date.UTC(n,0,4)).getUTCDay()-3}p=new Date(Date.UTC(n,0,1)),p.setUTCDate(e),a=p.getUTCMonth()+1,s=p.getUTCDate()}if(m=we(n),i.defined(f)){r=f.match(We),null!==r?(o=+r[1],u=+r[2],l=+r[3],d=1e3*+(r[4]||0),h=5):(r=f.match(ze),null!==r?(o=+r[1],u=+r[2],l=60*+(r[3]||0),h=4):(r=f.match(be),null!==r&&(o=+r[1],u=60*+(r[2]||0),h=3)));const e=r[h],t=+r[h+1],i=+(r[h+2]||0);switch(e){case"+":o-=t,u-=i;break;case"-":o+=t,u+=i;break;case"Z":break;default:u+=new Date(Date.UTC(n,a-1,s,o,u)).getTimezoneOffset()}}const y=60===l;for(y&&l--;u>=60;)u-=60,o++;for(;o>=24;)o-=24,s++;for(p=m&&2===a?29:Ee[a-1];s>p;)s-=p,a++,a>12&&(a-=12,n++),p=m&&2===a?29:Ee[a-1];for(;u<0;)u+=60,o--;for(;o<0;)o+=24,s--;for(;s<1;)a--,a<1&&(a+=12,n--),p=m&&2===a?29:Ee[a-1],s+=p;const w=Te(n,a,s,o,u,l,d);return i.defined(t)?(Ae(w[0],w[1],t),Oe(t)):t=new qe(w[0],w[1],_e.UTC),y&&qe.addSeconds(t,1,t),t},qe.now=function(e){return qe.fromDate(new Date,e)};const ve=new qe(0,0,_e.TAI);function $e(e){if(e=i.defaultValue(e,i.defaultValue.EMPTY_OBJECT),this._dates=void 0,this._samples=void 0,this._dateColumn=-1,this._xPoleWanderRadiansColumn=-1,this._yPoleWanderRadiansColumn=-1,this._ut1MinusUtcSecondsColumn=-1,this._xCelestialPoleOffsetRadiansColumn=-1,this._yCelestialPoleOffsetRadiansColumn=-1,this._taiMinusUtcSecondsColumn=-1,this._columnCount=0,this._lastIndex=-1,this._downloadPromise=void 0,this._dataError=void 0,this._addNewLeapSeconds=i.defaultValue(e.addNewLeapSeconds,!0),i.defined(e.data))Ve(this,e.data);else if(i.defined(e.url)){const t=o.Resource.createIfNeeded(e.url),n=this;this._downloadPromise=t.fetchJson().then((function(e){Ve(n,e)})).otherwise((function(){n._dataError=`An error occurred while retrieving the EOP data from the URL ${t.url}.`}))}else Ve(this,{columnNames:["dateIso8601","modifiedJulianDateUtc","xPoleWanderRadians","yPoleWanderRadians","ut1MinusUtcSeconds","lengthOfDayCorrectionSeconds","xCelestialPoleOffsetRadians","yCelestialPoleOffsetRadians","taiMinusUtcSeconds"],samples:[]})}function Be(e,t){return qe.compare(e.julianDate,t)}function Ve(e,t){if(!i.defined(t.columnNames))return void(e._dataError="Error in loaded EOP data: The columnNames property is required.");if(!i.defined(t.samples))return void(e._dataError="Error in loaded EOP data: The samples property is required.");const n=t.columnNames.indexOf("modifiedJulianDateUtc"),r=t.columnNames.indexOf("xPoleWanderRadians"),a=t.columnNames.indexOf("yPoleWanderRadians"),s=t.columnNames.indexOf("ut1MinusUtcSeconds"),o=t.columnNames.indexOf("xCelestialPoleOffsetRadians"),u=t.columnNames.indexOf("yCelestialPoleOffsetRadians"),l=t.columnNames.indexOf("taiMinusUtcSeconds");if(n<0||r<0||a<0||s<0||o<0||u<0||l<0)return void(e._dataError="Error in loaded EOP data: The columnNames property must include modifiedJulianDateUtc, xPoleWanderRadians, yPoleWanderRadians, ut1MinusUtcSeconds, xCelestialPoleOffsetRadians, yCelestialPoleOffsetRadians, and taiMinusUtcSeconds columns");const d=e._samples=t.samples,c=e._dates=[];let f;e._dateColumn=n,e._xPoleWanderRadiansColumn=r,e._yPoleWanderRadiansColumn=a,e._ut1MinusUtcSecondsColumn=s,e._xCelestialPoleOffsetRadiansColumn=o,e._yCelestialPoleOffsetRadiansColumn=u,e._taiMinusUtcSecondsColumn=l,e._columnCount=t.columnNames.length,e._lastIndex=void 0;const p=e._addNewLeapSeconds;for(let t=0,r=d.length;tt.length-1)return i.xPoleWander=0,i.yPoleWander=0,i.xPoleOffset=0,i.yPoleOffset=0,i.ut1MinusUtc=0,i;const u=t[a],l=t[s];if(u.equals(l)||r.equals(u))return Le(e,n,a,o,i),i;if(r.equals(l))return Le(e,n,s,o,i),i;const d=qe.secondsDifference(r,u)/qe.secondsDifference(l,u),c=a*o,f=s*o;let p=n[c+e._ut1MinusUtcSecondsColumn],m=n[f+e._ut1MinusUtcSecondsColumn];const h=m-p;if(h>.5||h<-.5){const t=n[c+e._taiMinusUtcSecondsColumn],a=n[f+e._taiMinusUtcSecondsColumn];t!==a&&(l.equals(r)?p=m:m-=a-t)}return i.xPoleWander=ke(d,n[c+e._xPoleWanderRadiansColumn],n[f+e._xPoleWanderRadiansColumn]),i.yPoleWander=ke(d,n[c+e._yPoleWanderRadiansColumn],n[f+e._yPoleWanderRadiansColumn]),i.xPoleOffset=ke(d,n[c+e._xCelestialPoleOffsetRadiansColumn],n[f+e._xCelestialPoleOffsetRadiansColumn]),i.yPoleOffset=ke(d,n[c+e._yCelestialPoleOffsetRadiansColumn],n[f+e._yCelestialPoleOffsetRadiansColumn]),i.ut1MinusUtc=ke(d,p,m),i}function je(e,t,n){this.heading=i.defaultValue(e,0),this.pitch=i.defaultValue(t,0),this.roll=i.defaultValue(n,0)}qe.toGregorianDate=function(e,t){let n=!1,r=De(e,ve);i.defined(r)||(qe.addSeconds(e,-1,ve),r=De(ve,ve),n=!0);let a=r.dayNumber;const s=r.secondsOfDay;s>=43200&&(a+=1);let o=a+68569|0;const u=4*o/146097|0;o=o-((146097*u+3)/4|0)|0;const l=4e3*(o+1)/1461001|0;o=o-(1461*l/4|0)+31|0;const d=80*o/2447|0,c=o-(2447*d/80|0)|0;o=d/11|0;const f=d+2-12*o|0,p=100*(u-49)+l+o|0;let m=s/Ce.SECONDS_PER_HOUR|0,h=s-m*Ce.SECONDS_PER_HOUR;const y=h/Ce.SECONDS_PER_MINUTE|0;h-=y*Ce.SECONDS_PER_MINUTE;let w=0|h;const x=(h-w)/Ce.SECONDS_PER_MILLISECOND;return m+=12,m>23&&(m-=24),n&&(w+=1),i.defined(t)?(t.year=p,t.month=f,t.day=c,t.hour=m,t.minute=y,t.second=w,t.millisecond=x,t.isLeapSecond=n,t):new ye(p,f,c,m,y,w,x,n)},qe.toDate=function(e){const t=qe.toGregorianDate(e,Se);let n=t.second;return t.isLeapSecond&&(n-=1),new Date(Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,n,t.millisecond))},qe.toIso8601=function(e,t){const n=qe.toGregorianDate(e,Se);let r=n.year,a=n.month,s=n.day,o=n.hour;const u=n.minute,l=n.second,d=n.millisecond;let c;return 1e4===r&&1===a&&1===s&&0===o&&0===u&&0===l&&0===d&&(r=9999,a=12,s=31,o=24),i.defined(t)||0===d?i.defined(t)&&0!==t?(c=(.01*d).toFixed(t).replace(".","").slice(0,t),`${r.toString().padStart(4,"0")}-${a.toString().padStart(2,"0")}-${s.toString().padStart(2,"0")}T${o.toString().padStart(2,"0")}:${u.toString().padStart(2,"0")}:${l.toString().padStart(2,"0")}.${c}Z`):`${r.toString().padStart(4,"0")}-${a.toString().padStart(2,"0")}-${s.toString().padStart(2,"0")}T${o.toString().padStart(2,"0")}:${u.toString().padStart(2,"0")}:${l.toString().padStart(2,"0")}Z`:(c=(.01*d).toString().replace(".",""),`${r.toString().padStart(4,"0")}-${a.toString().padStart(2,"0")}-${s.toString().padStart(2,"0")}T${o.toString().padStart(2,"0")}:${u.toString().padStart(2,"0")}:${l.toString().padStart(2,"0")}.${c}Z`)},qe.clone=function(e,t){if(i.defined(e))return i.defined(t)?(t.dayNumber=e.dayNumber,t.secondsOfDay=e.secondsOfDay,t):new qe(e.dayNumber,e.secondsOfDay,_e.TAI)},qe.compare=function(e,t){const n=e.dayNumber-t.dayNumber;return 0!==n?n:e.secondsOfDay-t.secondsOfDay},qe.equals=function(e,t){return e===t||i.defined(e)&&i.defined(t)&&e.dayNumber===t.dayNumber&&e.secondsOfDay===t.secondsOfDay},qe.equalsEpsilon=function(e,t,n){return n=i.defaultValue(n,0),e===t||i.defined(e)&&i.defined(t)&&Math.abs(qe.secondsDifference(e,t))<=n},qe.totalDays=function(e){return e.dayNumber+e.secondsOfDay/Ce.SECONDS_PER_DAY},qe.secondsDifference=function(e,t){return(e.dayNumber-t.dayNumber)*Ce.SECONDS_PER_DAY+(e.secondsOfDay-t.secondsOfDay)},qe.daysDifference=function(e,t){return e.dayNumber-t.dayNumber+(e.secondsOfDay-t.secondsOfDay)/Ce.SECONDS_PER_DAY},qe.computeTaiMinusUtc=function(e){Me.julianDate=e;const t=qe.leapSeconds;let n=me(t,Me,ge);return n<0&&(n=~n,--n,n<0&&(n=0)),t[n].offset},qe.addSeconds=function(e,t,n){return Ae(e.dayNumber,e.secondsOfDay+t,n)},qe.addMinutes=function(e,t,n){const r=e.secondsOfDay+t*Ce.SECONDS_PER_MINUTE;return Ae(e.dayNumber,r,n)},qe.addHours=function(e,t,n){const r=e.secondsOfDay+t*Ce.SECONDS_PER_HOUR;return Ae(e.dayNumber,r,n)},qe.addDays=function(e,t,n){return Ae(e.dayNumber+t,e.secondsOfDay,n)},qe.lessThan=function(e,t){return qe.compare(e,t)<0},qe.lessThanOrEquals=function(e,t){return qe.compare(e,t)<=0},qe.greaterThan=function(e,t){return qe.compare(e,t)>0},qe.greaterThanOrEquals=function(e,t){return qe.compare(e,t)>=0},qe.prototype.clone=function(e){return qe.clone(this,e)},qe.prototype.equals=function(e){return qe.equals(this,e)},qe.prototype.equalsEpsilon=function(e,t){return qe.equalsEpsilon(this,e,t)},qe.prototype.toString=function(){return qe.toIso8601(this)},qe.leapSeconds=[new xe(new qe(2441317,43210,_e.TAI),10),new xe(new qe(2441499,43211,_e.TAI),11),new xe(new qe(2441683,43212,_e.TAI),12),new xe(new qe(2442048,43213,_e.TAI),13),new xe(new qe(2442413,43214,_e.TAI),14),new xe(new qe(2442778,43215,_e.TAI),15),new xe(new qe(2443144,43216,_e.TAI),16),new xe(new qe(2443509,43217,_e.TAI),17),new xe(new qe(2443874,43218,_e.TAI),18),new xe(new qe(2444239,43219,_e.TAI),19),new xe(new qe(2444786,43220,_e.TAI),20),new xe(new qe(2445151,43221,_e.TAI),21),new xe(new qe(2445516,43222,_e.TAI),22),new xe(new qe(2446247,43223,_e.TAI),23),new xe(new qe(2447161,43224,_e.TAI),24),new xe(new qe(2447892,43225,_e.TAI),25),new xe(new qe(2448257,43226,_e.TAI),26),new xe(new qe(2448804,43227,_e.TAI),27),new xe(new qe(2449169,43228,_e.TAI),28),new xe(new qe(2449534,43229,_e.TAI),29),new xe(new qe(2450083,43230,_e.TAI),30),new xe(new qe(2450630,43231,_e.TAI),31),new xe(new qe(2451179,43232,_e.TAI),32),new xe(new qe(2453736,43233,_e.TAI),33),new xe(new qe(2454832,43234,_e.TAI),34),new xe(new qe(2456109,43235,_e.TAI),35),new xe(new qe(2457204,43236,_e.TAI),36),new xe(new qe(2457754,43237,_e.TAI),37)],$e.NONE=Object.freeze({getPromiseToLoad:function(){return t.when.resolve()},compute:function(e,t){return i.defined(t)?(t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0):t=new he(0,0,0,0,0),t}}),$e.prototype.getPromiseToLoad=function(){return t.when(this._downloadPromise)},$e.prototype.compute=function(e,t){if(!i.defined(this._samples)){if(i.defined(this._dataError))throw new u.RuntimeError(this._dataError);return}if(i.defined(t)||(t=new he(0,0,0,0,0)),0===this._samples.length)return t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0,t;const n=this._dates,r=this._lastIndex;let a=0,s=0;if(i.defined(r)){const o=n[r],u=n[r+1],l=qe.lessThanOrEquals(o,e),d=!i.defined(u),c=d||qe.greaterThanOrEquals(u,e);if(l&&c)return a=r,!d&&u.equals(e)&&++a,s=a+1,Ye(this,n,this._samples,e,a,s,t),t}let o=me(n,e,qe.compare,this._dateColumn);return o>=0?(o=this._totalSamples&&(u=this._totalSamples-1);const l=o/this._samplesPerXysFile|0,d=u/this._samplesPerXysFile|0,c=[];for(let e=l;e<=d;++e)c.push(it(this,e));return t.when.all(c)},rt.prototype.computeXysRadians=function(e,t,n){const r=st(this,e,t);if(r<0)return;const a=r/this._stepSizeDays|0;if(a>=this._totalSamples)return;const s=this._interpolationOrder;let o=a-(s/2|0);o<0&&(o=0);let u=o+s;u>=this._totalSamples&&(u=this._totalSamples-1,o=u-s,o<0&&(o=0));let l=!1;const d=this._samples;if(i.defined(d[3*o])||(it(this,o/this._samplesPerXysFile|0),l=!0),i.defined(d[3*u])||(it(this,u/this._samplesPerXysFile|0),l=!0),l)return;i.defined(n)?(n.x=0,n.y=0,n.s=0):n=new nt(0,0,0);const c=r-o*this._stepSizeDays,f=this._work,p=this._denominators,m=this._coef,h=this._xTable;let y,w;for(y=0;y<=s;++y)f[y]=c-h[y];for(y=0;y<=s;++y){for(m[y]=1,w=0;w<=s;++w)w!==y&&(m[y]*=f[w]);m[y]*=p[y];let e=3*(o+y);n.x+=m[y]*d[e++],n.y+=m[y]*d[e++],n.s+=m[y]*d[e]}return n};const ot={},ut={up:{south:"east",north:"west",west:"south",east:"north"},down:{south:"west",north:"east",west:"north",east:"south"},south:{up:"west",down:"east",west:"down",east:"up"},north:{up:"east",down:"west",west:"up",east:"down"},west:{up:"north",down:"south",north:"down",south:"up"},east:{up:"south",down:"north",north:"up",south:"down"}},lt={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},dt={},ct={east:new r.Cartesian3,north:new r.Cartesian3,up:new r.Cartesian3,west:new r.Cartesian3,south:new r.Cartesian3,down:new r.Cartesian3};let ft=new r.Cartesian3,pt=new r.Cartesian3,mt=new r.Cartesian3;ot.localFrameToFixedFrameGenerator=function(e,t){if(!ut.hasOwnProperty(e)||!ut[e].hasOwnProperty(t))throw new s.DeveloperError("firstAxis and secondAxis must be east, north, up, west, south or down.");const o=ut[e][t];let u;const d=e+t;return i.defined(dt[d])?u=dt[d]:(u=function(s,u,d){if(i.defined(d)||(d=new a.Matrix4),r.Cartesian3.equalsEpsilon(s,r.Cartesian3.ZERO,l.CesiumMath.EPSILON14))r.Cartesian3.unpack(lt[e],0,ft),r.Cartesian3.unpack(lt[t],0,pt),r.Cartesian3.unpack(lt[o],0,mt);else if(l.CesiumMath.equalsEpsilon(s.x,0,l.CesiumMath.EPSILON14)&&l.CesiumMath.equalsEpsilon(s.y,0,l.CesiumMath.EPSILON14)){const n=l.CesiumMath.sign(s.z);r.Cartesian3.unpack(lt[e],0,ft),"east"!==e&&"west"!==e&&r.Cartesian3.multiplyByScalar(ft,n,ft),r.Cartesian3.unpack(lt[t],0,pt),"east"!==t&&"west"!==t&&r.Cartesian3.multiplyByScalar(pt,n,pt),r.Cartesian3.unpack(lt[o],0,mt),"east"!==o&&"west"!==o&&r.Cartesian3.multiplyByScalar(mt,n,mt)}else{(u=i.defaultValue(u,n.Ellipsoid.WGS84)).geodeticSurfaceNormal(s,ct.up);const a=ct.up,l=ct.east;l.x=-s.y,l.y=s.x,l.z=0,r.Cartesian3.normalize(l,ct.east),r.Cartesian3.cross(a,l,ct.north),r.Cartesian3.multiplyByScalar(ct.up,-1,ct.down),r.Cartesian3.multiplyByScalar(ct.east,-1,ct.west),r.Cartesian3.multiplyByScalar(ct.north,-1,ct.south),ft=ct[e],pt=ct[t],mt=ct[o]}return d[0]=ft.x,d[1]=ft.y,d[2]=ft.z,d[3]=0,d[4]=pt.x,d[5]=pt.y,d[6]=pt.z,d[7]=0,d[8]=mt.x,d[9]=mt.y,d[10]=mt.z,d[11]=0,d[12]=s.x,d[13]=s.y,d[14]=s.z,d[15]=1,d},dt[d]=u),u},ot.eastNorthUpToFixedFrame=ot.localFrameToFixedFrameGenerator("east","north"),ot.northEastDownToFixedFrame=ot.localFrameToFixedFrameGenerator("north","east"),ot.northUpEastToFixedFrame=ot.localFrameToFixedFrameGenerator("north","up"),ot.northWestUpToFixedFrame=ot.localFrameToFixedFrameGenerator("north","west");const ht=new B,yt=new r.Cartesian3(1,1,1),wt=new a.Matrix4;ot.headingPitchRollToFixedFrame=function(e,t,n,s,o){s=i.defaultValue(s,ot.eastNorthUpToFixedFrame);const u=B.fromHeadingPitchRoll(t,ht),l=a.Matrix4.fromTranslationQuaternionRotationScale(r.Cartesian3.ZERO,u,yt,wt);return o=s(e,n,o),a.Matrix4.multiply(o,l,o)};const xt=new a.Matrix4,Ct=new a.Matrix3;ot.headingPitchRollQuaternion=function(e,t,n,r,s){const i=ot.headingPitchRollToFixedFrame(e,t,n,r,xt),o=a.Matrix4.getMatrix3(i,Ct);return B.fromRotationMatrix(o,s)};const _t=new r.Cartesian3(1,1,1),St=new r.Cartesian3,Et=new a.Matrix4,gt=new a.Matrix4,Mt=new a.Matrix3,Ot=new B;ot.fixedFrameToHeadingPitchRoll=function(e,t,s,o){t=i.defaultValue(t,n.Ellipsoid.WGS84),s=i.defaultValue(s,ot.eastNorthUpToFixedFrame),i.defined(o)||(o=new je);const u=a.Matrix4.getTranslation(e,St);if(r.Cartesian3.equals(u,r.Cartesian3.ZERO))return o.heading=0,o.pitch=0,o.roll=0,o;let l=a.Matrix4.inverseTransformation(s(u,t,Et),Et),d=a.Matrix4.setScale(e,_t,gt);d=a.Matrix4.setTranslation(d,r.Cartesian3.ZERO,d),l=a.Matrix4.multiply(l,d,l);let c=B.fromRotationMatrix(a.Matrix4.getMatrix3(l,Mt),Ot);return c=B.normalize(c,c),je.fromQuaternion(c,o)};const Dt=l.CesiumMath.TWO_PI/86400;let At=new qe;ot.computeTemeToPseudoFixedMatrix=function(e,t){At=qe.addSeconds(e,-qe.computeTaiMinusUtc(e),At);const n=At.dayNumber,r=At.secondsOfDay;let s;const o=n-2451545;s=r>=43200?(o+.5)/Ce.DAYS_PER_JULIAN_CENTURY:(o-.5)/Ce.DAYS_PER_JULIAN_CENTURY;const u=(24110.54841+s*(8640184.812866+s*(.093104+-62e-7*s)))*Dt%l.CesiumMath.TWO_PI+(72921158553e-15+11772758384668e-32*(n-2451545.5))*((r+.5*Ce.SECONDS_PER_DAY)%Ce.SECONDS_PER_DAY),d=Math.cos(u),c=Math.sin(u);return i.defined(t)?(t[0]=d,t[1]=-c,t[2]=0,t[3]=c,t[4]=d,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new a.Matrix3(d,c,0,-c,d,0,0,0,1)},ot.iau2006XysData=new rt,ot.earthOrientationParameters=$e.NONE;const Tt=32.184;ot.preloadIcrfFixed=function(e){const n=e.start.dayNumber,r=e.start.secondsOfDay+Tt,a=e.stop.dayNumber,s=e.stop.secondsOfDay+Tt,i=ot.iau2006XysData.preload(n,r,a,s),o=ot.earthOrientationParameters.getPromiseToLoad();return t.when.all([i,o])},ot.computeIcrfToFixedMatrix=function(e,t){i.defined(t)||(t=new a.Matrix3);const n=ot.computeFixedToIcrfMatrix(e,t);if(i.defined(n))return a.Matrix3.transpose(n,t)};const Pt=new nt(0,0,0),Rt=new he(0,0,0,0,0,0),It=new a.Matrix3,Nt=new a.Matrix3;ot.computeFixedToIcrfMatrix=function(e,t){i.defined(t)||(t=new a.Matrix3);const n=ot.earthOrientationParameters.compute(e,Rt);if(!i.defined(n))return;const r=e.dayNumber,s=e.secondsOfDay+Tt,o=ot.iau2006XysData.computeXysRadians(r,s,Pt);if(!i.defined(o))return;const u=o.x+n.xPoleOffset,d=o.y+n.yPoleOffset,c=1/(1+Math.sqrt(1-u*u-d*d)),f=It;f[0]=1-c*u*u,f[3]=-c*u*d,f[6]=u,f[1]=-c*u*d,f[4]=1-c*d*d,f[7]=d,f[2]=-u,f[5]=-d,f[8]=1-c*(u*u+d*d);const p=a.Matrix3.fromRotationZ(-o.s,Nt),m=a.Matrix3.multiply(f,p,It),h=e.dayNumber-2451545,y=(e.secondsOfDay-qe.computeTaiMinusUtc(e)+n.ut1MinusUtc)/Ce.SECONDS_PER_DAY;let w=.779057273264+y+.00273781191135448*(h+y);w=w%1*l.CesiumMath.TWO_PI;const x=a.Matrix3.fromRotationZ(w,Nt),C=a.Matrix3.multiply(m,x,It),_=Math.cos(n.xPoleWander),S=Math.cos(n.yPoleWander),E=Math.sin(n.xPoleWander),g=Math.sin(n.yPoleWander);let M=r-2451545+s/Ce.SECONDS_PER_DAY;M/=36525;const O=-47e-6*M*l.CesiumMath.RADIANS_PER_DEGREE/3600,D=Math.cos(O),A=Math.sin(O),T=Nt;return T[0]=_*D,T[1]=_*A,T[2]=E,T[3]=-S*A+g*E*D,T[4]=S*D+g*E*A,T[5]=-g*_,T[6]=-g*A-S*E*D,T[7]=g*D-S*E*A,T[8]=S*_,a.Matrix3.multiply(C,T,t)};const Ut=new a.Cartesian4;ot.pointToWindowCoordinates=function(e,t,n,r){return(r=ot.pointToGLWindowCoordinates(e,t,n,r)).y=2*t[5]-r.y,r},ot.pointToGLWindowCoordinates=function(e,t,r,s){i.defined(s)||(s=new n.Cartesian2);const o=Ut;return a.Matrix4.multiplyByVector(e,a.Cartesian4.fromElements(r.x,r.y,r.z,1,o),o),a.Cartesian4.multiplyByScalar(o,1/o.w,o),a.Matrix4.multiplyByVector(t,o,o),n.Cartesian2.fromCartesian4(o,s)};const Ft=new r.Cartesian3,bt=new r.Cartesian3,zt=new r.Cartesian3;ot.rotationMatrixFromPositionVelocity=function(e,t,s,o){const u=i.defaultValue(s,n.Ellipsoid.WGS84).geodeticSurfaceNormal(e,Ft);let d=r.Cartesian3.cross(t,u,bt);r.Cartesian3.equalsEpsilon(d,r.Cartesian3.ZERO,l.CesiumMath.EPSILON6)&&(d=r.Cartesian3.clone(r.Cartesian3.UNIT_X,d));const c=r.Cartesian3.cross(d,t,zt);return r.Cartesian3.normalize(c,c),r.Cartesian3.cross(t,c,d),r.Cartesian3.negate(d,d),r.Cartesian3.normalize(d,d),i.defined(o)||(o=new a.Matrix3),o[0]=t.x,o[1]=t.y,o[2]=t.z,o[3]=d.x,o[4]=d.y,o[5]=d.z,o[6]=c.x,o[7]=c.y,o[8]=c.z,o};const Wt=new a.Matrix4(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),qt=new n.Cartographic,vt=new r.Cartesian3,$t=new r.Cartesian3,Bt=new a.Matrix3,Vt=new a.Matrix4,Lt=new a.Matrix4;ot.basisTo2D=function(e,t,n){const s=a.Matrix4.getTranslation(t,$t),i=e.ellipsoid,o=i.cartesianToCartographic(s,qt),u=e.project(o,vt);r.Cartesian3.fromElements(u.z,u.x,u.y,u);const l=ot.eastNorthUpToFixedFrame(s,i,Vt),d=a.Matrix4.inverseTransformation(l,Lt),c=a.Matrix4.getMatrix3(t,Bt),f=a.Matrix4.multiplyByMatrix3(d,c,n);return a.Matrix4.multiply(Wt,f,n),a.Matrix4.setTranslation(n,u,n),n},ot.wgs84To2DModelMatrix=function(e,t,n){const s=e.ellipsoid,i=ot.eastNorthUpToFixedFrame(t,s,Vt),o=a.Matrix4.inverseTransformation(i,Lt),u=s.cartesianToCartographic(t,qt),l=e.project(u,vt);r.Cartesian3.fromElements(l.z,l.x,l.y,l);const d=a.Matrix4.fromTranslation(l,Vt);return a.Matrix4.multiply(Wt,o,n),a.Matrix4.multiply(d,n,n),n},e.FeatureDetection=$,e.Quaternion=B,e.Transforms=ot,e.buildModuleUrl=tt}));