/** * @license * Cesium - https://github.com/CesiumGS/cesium * Version 1.140.0 * * Copyright 2011-2022 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/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ import{a as o}from"./chunk-XXWWJ3QU.js";import{a as p}from"./chunk-N6SIW7ZL.js";import{a as O,b as r}from"./chunk-K35RPNUR.js";import{e as a}from"./chunk-RTRJ3LVQ.js";var Ee=new o,Ce=new o;function Te(n,e,t,i,u){if(!a(n))throw new O("cartesian is required.");if(!a(e))throw new O("oneOverRadii is required.");if(!a(t))throw new O("oneOverRadiiSquared is required.");if(!a(i))throw new O("centerToleranceSquared is required.");let c=n.x,d=n.y,y=n.z,R=e.x,A=e.y,S=e.z,w=c*c*R*R,_=d*d*A*A,j=y*y*S*S,M=w+_+j,E=Math.sqrt(1/M),P=o.multiplyByScalar(n,E,Ee);if(Mp.EPSILON12);return a(u)?(u.x=c*C,u.y=d*T,u.z=y*v,u):new o(c*C,d*T,y*v)}var B=Te;function f(n,e,t){this.longitude=n??0,this.latitude=e??0,this.height=t??0}f.fromRadians=function(n,e,t,i){return r.typeOf.number("longitude",n),r.typeOf.number("latitude",e),t=t??0,a(i)?(i.longitude=n,i.latitude=e,i.height=t,i):new f(n,e,t)};f.fromDegrees=function(n,e,t,i){return r.typeOf.number("longitude",n),r.typeOf.number("latitude",e),n=p.toRadians(n),e=p.toRadians(e),f.fromRadians(n,e,t,i)};var ve=new o,Fe=new o,Me=new o;f._ellipsoidOneOverRadii=new o(1/6378137,1/6378137,1/6356752314245179e-9);f._ellipsoidOneOverRadiiSquared=new o(1/(6378137*6378137),1/(6378137*6378137),1/(6356752314245179e-9*6356752314245179e-9));f._ellipsoidCenterToleranceSquared=p.EPSILON1;f.fromCartesian=function(n,e,t){let i=a(e)?e.oneOverRadii:f._ellipsoidOneOverRadii,u=a(e)?e.oneOverRadiiSquared:f._ellipsoidOneOverRadiiSquared,c=a(e)?e._centerToleranceSquared:f._ellipsoidCenterToleranceSquared,d=B(n,i,u,c,Fe);if(!a(d))return;let y=o.multiplyComponents(d,u,ve);y=o.normalize(y,y);let R=o.subtract(n,d,Me),A=Math.atan2(y.y,y.x),S=Math.asin(y.z),w=p.sign(o.dot(R,n))*o.magnitude(R);return a(t)?(t.longitude=A,t.latitude=S,t.height=w,t):new f(A,S,w)};f.toCartesian=function(n,e,t){return r.defined("cartographic",n),o.fromRadians(n.longitude,n.latitude,n.height,e,t)};f.clone=function(n,e){if(a(n))return a(e)?(e.longitude=n.longitude,e.latitude=n.latitude,e.height=n.height,e):new f(n.longitude,n.latitude,n.height)};f.equals=function(n,e){return n===e||a(n)&&a(e)&&n.longitude===e.longitude&&n.latitude===e.latitude&&n.height===e.height};f.equalsEpsilon=function(n,e,t){return t=t??0,n===e||a(n)&&a(e)&&Math.abs(n.longitude-e.longitude)<=t&&Math.abs(n.latitude-e.latitude)<=t&&Math.abs(n.height-e.height)<=t};f.ZERO=Object.freeze(new f(0,0,0));f.prototype.clone=function(n){return f.clone(this,n)};f.prototype.equals=function(n){return f.equals(this,n)};f.prototype.equalsEpsilon=function(n,e){return f.equalsEpsilon(this,n,e)};f.prototype.toString=function(){return`(${this.longitude}, ${this.latitude}, ${this.height})`};var N=f;var l=class n{constructor(e,t){this.x=e??0,this.y=t??0}static fromElements(e,t,i){return a(i)?(i.x=e,i.y=t,i):new n(e,t)}static clone(e,t){if(a(e))return a(t)?(t.x=e.x,t.y=e.y,t):new n(e.x,e.y)}static pack(e,t,i){return r.typeOf.object("value",e),r.defined("array",t),i=i??0,t[i++]=e.x,t[i]=e.y,t}static unpack(e,t,i){return r.defined("array",e),t=t??0,a(i)||(i=new n),i.x=e[t++],i.y=e[t],i}static packArray(e,t){r.defined("array",e);let i=e.length,u=i*2;if(!a(t))t=new Array(u);else{if(!Array.isArray(t)&&t.length!==u)throw new O("If result is a typed array, it must have exactly array.length * 2 elements");t.length!==u&&(t.length=u)}for(let c=0;c=this._radii.z-e))return t};var We=new o;s.prototype.getLocalCurvature=function(n,e){r.typeOf.object("surfacePosition",n),a(e)||(e=new ne);let t=this.getSurfaceNormalIntersectionWithZAxis(n,0,We),i=o.distance(n,t),u=this.minimumRadius*i/this.maximumRadius**2,c=i*u**2;return ne.fromElements(1/i,1/c,e)};var Ue=[.14887433898163,.43339539412925,.67940956829902,.86506336668898,.97390652851717,0],Ve=[.29552422471475,.26926671930999,.21908636251598,.14945134915058,.066671344308684,0];function Oe(n,e,t){r.typeOf.number("a",n),r.typeOf.number("b",e),r.typeOf.func("func",t);let i=.5*(e+n),u=.5*(e-n),c=0;for(let d=0;d<5;d++){let y=u*Ue[d];c+=Ve[d]*(t(i+y)+t(i-y))}return c*=u,c}s.prototype.surfaceArea=function(n){r.typeOf.object("rectangle",n);let e=n.west,t=n.east,i=n.south,u=n.north;for(;t{let e=new Image;e.onload=function(){h._result=e.width>0&&e.height>0,n(h._result)},e.onerror=function(){h._result=!1,n(h._result)},e.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA"})),h._promise};Object.defineProperties(h,{initialized:{get:function(){return a(h._result)}}});var F=[];typeof ArrayBuffer<"u"&&(F.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),typeof Uint8ClampedArray<"u"&&F.push(Uint8ClampedArray),typeof Uint8ClampedArray<"u"&&F.push(Uint8ClampedArray),typeof BigInt64Array<"u"&&F.push(BigInt64Array),typeof BigUint64Array<"u"&&F.push(BigUint64Array));var x={isChrome:ue,chromeVersion:Le,isSafari:we,safariVersion:$e,isWebkit:qe,webkitVersion:De,isEdge:G,edgeVersion:Ze,isFirefox:X,firefoxVersion:Ye,isWindows:Ge,isIPadOrIOS:Xe,hardwareConcurrency:b.hardwareConcurrency??3,supportsPointerEvents:Qe,supportsImageRenderingPixelated:_e,supportsWebP:h,imageRenderingValue:He,typedArrayTypes:F};x.supportsBasis=function(n){return x.supportsWebAssembly()&&n.context.supportsBasis};x.supportsFullscreen=function(){return be.supportsFullscreen()};x.supportsTypedArrays=function(){return typeof ArrayBuffer<"u"};x.supportsBigInt64Array=function(){return typeof BigInt64Array<"u"};x.supportsBigUint64Array=function(){return typeof BigUint64Array<"u"};x.supportsBigInt=function(){return typeof BigInt<"u"};x.supportsWebWorkers=function(){return typeof Worker<"u"};x.supportsWebAssembly=function(){return typeof WebAssembly<"u"};x.supportsWebgl2=function(n){return r.defined("scene",n),n.context.webgl2};x.supportsEsmWebWorkers=function(){return!X()||parseInt(ce)>=114};var Tt=x;export{N as a,ne as b,wt as c,Tt as d};