mars3d-cesium
Advanced tools
Comparing version 1.116.0 to 1.116.1
@@ -1,1 +0,1 @@ | ||
(function(){"use strict";const{Array:te,Object:m,Number:ne,Math:A,Error:v,Uint8Array:w,Uint16Array:nt,Uint32Array:se,Int32Array:st,Map:re,DataView:W,Promise:M,TextEncoder:ae,crypto:B,postMessage:K,TransformStream:b,ReadableStream:Ve,WritableStream:xe,CompressionStream:rt,DecompressionStream:at}=self,j=void 0,N="undefined",O="function";class oe{constructor(e){return class extends b{constructor(n,s){const r=new e(s);super({transform(a,o){o.enqueue(r.append(a))},flush(a){const o=r.flush();o&&a.enqueue(o)}})}}}}const ie=[];for(let t=0;256>t;t++){let e=t;for(let n=0;8>n;n++)1&e?e=e>>>1^3988292384:e>>>=1;ie[t]=e}class G{constructor(e){this.crc=e||-1}append(e){let n=0|this.crc;for(let s=0,r=0|e.length;r>s;s++)n=n>>>8^ie[255&(n^e[s])];this.crc=n}get(){return~this.crc}}class ce extends b{constructor(){let e;const n=new G;super({transform(s,r){n.append(s),r.enqueue(s)},flush(){const s=new w(4);new W(s.buffer).setUint32(0,n.get()),e.value=s}}),e=this}}const _={concat(t,e){if(t.length===0||e.length===0)return t.concat(e);const n=t[t.length-1],s=_.getPartial(n);return s===32?t.concat(e):_._shiftRight(e,s,0|n,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(e===0)return 0;const n=t[e-1];return 32*(e-1)+_.getPartial(n)},clamp(t,e){if(32*t.length<e)return t;const n=(t=t.slice(0,A.ceil(e/32))).length;return e&=31,n>0&&e&&(t[n-1]=_.partial(e,t[n-1]&2147483648>>e-1,1)),t},partial:(t,e,n)=>t===32?e:(n?0|e:e<<32-t)+1099511627776*t,getPartial:t=>A.round(t/1099511627776)||32,_shiftRight(t,e,n,s){for(s===void 0&&(s=[]);e>=32;e-=32)s.push(n),n=0;if(e===0)return s.concat(t);for(let o=0;o<t.length;o++)s.push(n|t[o]>>>e),n=t[o]<<32-e;const r=t.length?t[t.length-1]:0,a=_.getPartial(r);return s.push(_.partial(e+a&31,e+a>32?n:s.pop(),1)),s}},L={bytes:{fromBits(t){const e=_.bitLength(t)/8,n=new w(e);let s;for(let r=0;e>r;r++)!(3&r)&&(s=t[r/4]),n[r]=s>>>24,s<<=8;return n},toBits(t){const e=[];let n,s=0;for(n=0;n<t.length;n++)s=s<<8|t[n],(3&n)==3&&(e.push(s),s=0);return 3&n&&e.push(_.partial(8*(3&n),s)),e}}},Ee=class{constructor(t){const e=this;e.blockSize=512,e._init=[1732584193,4023233417,2562383102,271733878,3285377520],e._key=[1518500249,1859775393,2400959708,3395469782],t?(e._h=t._h.slice(0),e._buffer=t._buffer.slice(0),e._length=t._length):e.reset()}reset(){const t=this;return t._h=t._init.slice(0),t._buffer=[],t._length=0,t}update(t){const e=this;typeof t=="string"&&(t=L.utf8String.toBits(t));const n=e._buffer=_.concat(e._buffer,t),s=e._length,r=e._length=s+_.bitLength(t);if(r>9007199254740991)throw new v("Cannot hash more than 2^53 - 1 bits");const a=new se(n);let o=0;for(let l=e.blockSize+s-(e.blockSize+s&e.blockSize-1);r>=l;l+=e.blockSize)e._block(a.subarray(16*o,16*(o+1))),o+=1;return n.splice(0,16*o),e}finalize(){const t=this;let e=t._buffer;const n=t._h;e=_.concat(e,[_.partial(1,1)]);for(let s=e.length+2;15&s;s++)e.push(0);for(e.push(A.floor(t._length/4294967296)),e.push(0|t._length);e.length;)t._block(e.splice(0,16));return t.reset(),n}_f(t,e,n,s){return t>19?t>39?t>59?t>79?void 0:e^n^s:e&n|e&s|n&s:e^n^s:e&n|~e&s}_S(t,e){return e<<t|e>>>32-t}_block(t){const e=this,n=e._h,s=te(80);for(let c=0;16>c;c++)s[c]=t[c];let r=n[0],a=n[1],o=n[2],l=n[3],u=n[4];for(let c=0;79>=c;c++){16>c||(s[c]=e._S(1,s[c-3]^s[c-8]^s[c-14]^s[c-16]));const i=e._S(5,r)+e._f(c,a,o,l)+u+s[c]+e._key[A.floor(c/20)]|0;u=l,l=o,o=e._S(30,a),a=r,r=i}n[0]=n[0]+r|0,n[1]=n[1]+a|0,n[2]=n[2]+o|0,n[3]=n[3]+l|0,n[4]=n[4]+u|0}},Ue={getRandomValues(t){const e=new se(t.buffer),n=s=>{let r=987654321;const a=4294967295;return()=>(r=36969*(65535&r)+(r>>16)&a,(((r<<16)+(s=18e3*(65535&s)+(s>>16)&a)&a)/4294967296+.5)*(A.random()>.5?1:-1))};for(let s,r=0;r<t.length;r+=4){const a=n(4294967296*(s||A.random()));s=987654071*a(),e[r/4]=4294967296*a()|0}return t}},H={importKey:t=>new H.hmacSha1(L.bytes.toBits(t)),pbkdf2(t,e,n,s){if(n=n||1e4,0>s||0>n)throw new v("invalid params to pbkdf2");const r=1+(s>>5)<<2;let a,o,l,u,c;const i=new ArrayBuffer(r),f=new W(i);let h=0;const p=_;for(e=L.bytes.toBits(e),c=1;(r||1)>h;c++){for(a=o=t.encrypt(p.concat(e,[c])),l=1;n>l;l++)for(o=t.encrypt(o),u=0;u<o.length;u++)a[u]^=o[u];for(l=0;(r||1)>h&&l<a.length;l++)f.setInt32(h,a[l]),h+=4}return i.slice(0,s/8)},hmacSha1:class{constructor(t){const e=this,n=e._hash=Ee,s=[[],[]];e._baseHash=[new n,new n];const r=e._baseHash[0].blockSize/32;t.length>r&&(t=new n().update(t).finalize());for(let a=0;r>a;a++)s[0][a]=909522486^t[a],s[1][a]=1549556828^t[a];e._baseHash[0].update(s[0]),e._baseHash[1].update(s[1]),e._resultHash=new n(e._baseHash[0])}reset(){const t=this;t._resultHash=new t._hash(t._baseHash[0]),t._updated=!1}update(t){this._updated=!0,this._resultHash.update(t)}digest(){const t=this,e=t._resultHash.finalize(),n=new t._hash(t._baseHash[1]).update(e).finalize();return t.reset(),n}encrypt(t){if(this._updated)throw new v("encrypt on already updated hmac called!");return this.update(t),this.digest(t)}}},We=typeof B!=N&&typeof B.getRandomValues==O,le="Invalid password",ue="Invalid signature",he="zipjs-abort-check-password";function fe(t){return We?B.getRandomValues(t):Ue.getRandomValues(t)}const P=16,pe={name:"PBKDF2"},Me=m.assign({hash:{name:"HMAC"}},pe),X=m.assign({iterations:1e3,hash:{name:"SHA-1"}},pe),Ne=["deriveBits"],T=[8,12,16],V=[16,24,32],q=10,Oe=[0,0,0,0],F=typeof B!=N,x=F&&B.subtle,de=F&&typeof x!=N,z=L.bytes,Le=class{constructor(t){const e=this;e._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],e._tables[0][0][0]||e._precompute();const n=e._tables[0][4],s=e._tables[1],r=t.length;let a,o,l,u=1;if(r!==4&&r!==6&&r!==8)throw new v("invalid aes key size");for(e._key=[o=t.slice(0),l=[]],a=r;4*r+28>a;a++){let c=o[a-1];(a%r==0||r===8&&a%r==4)&&(c=n[c>>>24]<<24^n[c>>16&255]<<16^n[c>>8&255]<<8^n[255&c],a%r==0&&(c=c<<8^c>>>24^u<<24,u=u<<1^283*(u>>7))),o[a]=o[a-r]^c}for(let c=0;a;c++,a--){const i=o[3&c?a:a-4];l[c]=4>=a||4>c?i:s[0][n[i>>>24]]^s[1][n[i>>16&255]]^s[2][n[i>>8&255]]^s[3][n[255&i]]}}encrypt(t){return this._crypt(t,0)}decrypt(t){return this._crypt(t,1)}_precompute(){const t=this._tables[0],e=this._tables[1],n=t[4],s=e[4],r=[],a=[];let o,l,u,c;for(let i=0;256>i;i++)a[(r[i]=i<<1^283*(i>>7))^i]=i;for(let i=o=0;!n[i];i^=l||1,o=a[o]||1){let f=o^o<<1^o<<2^o<<3^o<<4;f=f>>8^255&f^99,n[i]=f,s[f]=i,c=r[u=r[l=r[i]]];let h=16843009*c^65537*u^257*l^16843008*i,p=257*r[f]^16843008*f;for(let d=0;4>d;d++)t[d][i]=p=p<<24^p>>>8,e[d][f]=h=h<<24^h>>>8}for(let i=0;5>i;i++)t[i]=t[i].slice(0),e[i]=e[i].slice(0)}_crypt(t,e){if(t.length!==4)throw new v("invalid aes block size");const n=this._key[e],s=n.length/4-2,r=[0,0,0,0],a=this._tables[e],o=a[0],l=a[1],u=a[2],c=a[3],i=a[4];let f,h,p,d=t[0]^n[0],g=t[e?3:1]^n[1],y=t[2]^n[2],S=t[e?1:3]^n[3],I=4;for(let C=0;s>C;C++)f=o[d>>>24]^l[g>>16&255]^u[y>>8&255]^c[255&S]^n[I],h=o[g>>>24]^l[y>>16&255]^u[S>>8&255]^c[255&d]^n[I+1],p=o[y>>>24]^l[S>>16&255]^u[d>>8&255]^c[255&g]^n[I+2],S=o[S>>>24]^l[d>>16&255]^u[g>>8&255]^c[255&y]^n[I+3],I+=4,d=f,g=h,y=p;for(let C=0;4>C;C++)r[e?3&-C:C]=i[d>>>24]<<24^i[g>>16&255]<<16^i[y>>8&255]<<8^i[255&S]^n[I++],f=d,d=g,g=y,y=S,S=f;return r}},Fe=class{constructor(t,e){this._prf=t,this._initIv=e,this._iv=e}reset(){this._iv=this._initIv}update(t){return this.calculate(this._prf,t,this._iv)}incWord(t){if((t>>24&255)==255){let e=t>>16&255,n=t>>8&255,s=255&t;e===255?(e=0,n===255?(n=0,s===255?s=0:++s):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=s}else t+=1<<24;return t}incCounter(t){(t[0]=this.incWord(t[0]))===0&&(t[1]=this.incWord(t[1]))}calculate(t,e,n){let s;if(!(s=e.length))return[];const r=_.bitLength(e);for(let a=0;s>a;a+=4){this.incCounter(n);const o=t.encrypt(n);e[a]^=o[0],e[a+1]^=o[1],e[a+2]^=o[2],e[a+3]^=o[3]}return _.clamp(e,r)}},je=H.hmacSha1;let ge=F&&de&&typeof x.importKey==O,we=F&&de&&typeof x.deriveBits==O;class Ge extends b{constructor({password:e,rawPassword:n,signed:s,encryptionStrength:r,checkPasswordOnly:a}){super({start(){m.assign(this,{ready:new M(o=>this.resolveReady=o),password:_e(e,n),signed:s,strength:r-1,pending:new w})},async transform(o,l){const u=this,{password:c,strength:i,resolveReady:f,ready:h}=u;c?(await(async(d,g,y,S)=>{const I=await me(d,g,y,k(S,0,T[g])),C=k(S,T[g]);if(I[0]!=C[0]||I[1]!=C[1])throw new v(le)})(u,i,c,k(o,0,T[i]+2)),o=k(o,T[i]+2),a?l.error(new v(he)):f()):await h;const p=new w(o.length-q-(o.length-q)%P);l.enqueue(ye(u,o,p,0,q,!0))},async flush(o){const{signed:l,ctr:u,hmac:c,pending:i,ready:f}=this;if(c&&u){await f;const h=k(i,0,i.length-q),p=k(i,i.length-q);let d=new w;if(h.length){const g=U(z,h);c.update(g);const y=u.update(g);d=E(z,y)}if(l){const g=k(E(z,c.digest()),0,q);for(let y=0;q>y;y++)if(g[y]!=p[y])throw new v(ue)}o.enqueue(d)}}})}}class Xe extends b{constructor({password:e,rawPassword:n,encryptionStrength:s}){let r;super({start(){m.assign(this,{ready:new M(a=>this.resolveReady=a),password:_e(e,n),strength:s-1,pending:new w})},async transform(a,o){const l=this,{password:u,strength:c,resolveReady:i,ready:f}=l;let h=new w;u?(h=await(async(d,g,y)=>{const S=fe(new w(T[g]));return J(S,await me(d,g,y,S))})(l,c,u),i()):await f;const p=new w(h.length+a.length-a.length%P);p.set(h,0),o.enqueue(ye(l,a,p,h.length,0))},async flush(a){const{ctr:o,hmac:l,pending:u,ready:c}=this;if(l&&o){await c;let i=new w;if(u.length){const f=o.update(U(z,u));l.update(f),i=E(z,f)}r.signature=E(z,l.digest()).slice(0,q),a.enqueue(J(i,r.signature))}}}),r=this}}function ye(t,e,n,s,r,a){const{ctr:o,hmac:l,pending:u}=t,c=e.length-r;let i;for(u.length&&(e=J(u,e),n=((f,h)=>{if(h&&h>f.length){const p=f;(f=new w(h)).set(p,0)}return f})(n,c-c%P)),i=0;c-P>=i;i+=P){const f=U(z,k(e,i,i+P));a&&l.update(f);const h=o.update(f);a||l.update(h),n.set(E(z,h),i+s)}return t.pending=k(e,i),n}async function me(t,e,n,s){t.password=null;const r=await(async(i,f,h,p,d)=>{if(!ge)return H.importKey(f);try{return await x.importKey("raw",f,h,!1,d)}catch{return ge=!1,H.importKey(f)}})(0,n,Me,0,Ne),a=await(async(i,f,h)=>{if(!we)return H.pbkdf2(f,i.salt,X.iterations,h);try{return await x.deriveBits(i,f,h)}catch{return we=!1,H.pbkdf2(f,i.salt,X.iterations,h)}})(m.assign({salt:s},X),r,8*(2*V[e]+2)),o=new w(a),l=U(z,k(o,0,V[e])),u=U(z,k(o,V[e],2*V[e])),c=k(o,2*V[e]);return m.assign(t,{keys:{key:l,authentication:u,passwordVerification:c},ctr:new Fe(new Le(l),te.from(Oe)),hmac:new je(u)}),c}function _e(t,e){return e===j?(n=>{if(typeof ae==N){const s=new w((n=unescape(encodeURIComponent(n))).length);for(let r=0;r<s.length;r++)s[r]=n.charCodeAt(r);return s}return new ae().encode(n)})(t):e}function J(t,e){let n=t;return t.length+e.length&&(n=new w(t.length+e.length),n.set(t,0),n.set(e,t.length)),n}function k(t,e,n){return t.subarray(e,n)}function E(t,e){return t.fromBits(e)}function U(t,e){return t.toBits(e)}class Je extends b{constructor({password:e,passwordVerification:n,checkPasswordOnly:s}){super({start(){m.assign(this,{password:e,passwordVerification:n}),ve(this,e)},transform(r,a){const o=this;if(o.password){const l=be(o,r.subarray(0,12));if(o.password=null,l[11]!=o.passwordVerification)throw new v(le);r=r.subarray(12)}s?a.error(new v(he)):a.enqueue(be(o,r))}})}}class Qe extends b{constructor({password:e,passwordVerification:n}){super({start(){m.assign(this,{password:e,passwordVerification:n}),ve(this,e)},transform(s,r){const a=this;let o,l;if(a.password){a.password=null;const u=fe(new w(12));u[11]=a.passwordVerification,o=new w(s.length+u.length),o.set(Se(a,u),0),l=12}else o=new w(s.length),l=0;o.set(Se(a,s),l),r.enqueue(o)}})}}function be(t,e){const n=new w(e.length);for(let s=0;s<e.length;s++)n[s]=ke(t)^e[s],Q(t,n[s]);return n}function Se(t,e){const n=new w(e.length);for(let s=0;s<e.length;s++)n[s]=ke(t)^e[s],Q(t,e[s]);return n}function ve(t,e){const n=[305419896,591751049,878082192];m.assign(t,{keys:n,crcKey0:new G(n[0]),crcKey2:new G(n[2])});for(let s=0;s<e.length;s++)Q(t,e.charCodeAt(s))}function Q(t,e){let[n,s,r]=t.keys;t.crcKey0.append([e]),n=~t.crcKey0.get(),s=De(A.imul(De(s+ze(n)),134775813)+1),t.crcKey2.append([s>>>24]),r=~t.crcKey2.get(),t.keys=[n,s,r]}function ke(t){const e=2|t.keys[2];return ze(A.imul(e,1^e)>>>8)}function ze(t){return 255&t}function De(t){return 4294967295&t}const Ce="deflate-raw";class Ye extends b{constructor(e,{chunkSize:n,CompressionStream:s,CompressionStreamNative:r}){super({});const{compressed:a,encrypted:o,useCompressionStream:l,zipCrypto:u,signed:c,level:i}=e,f=this;let h,p,d=Ie(super.readable);o&&!u||!c||(h=new ce,d=D(d,h)),a&&(d=qe(d,l,{level:i,chunkSize:n},r,s)),o&&(u?d=D(d,new Qe(e)):(p=new Xe(e),d=D(d,p))),Ae(f,d,()=>{let g;o&&!u&&(g=p.signature),o&&!u||!c||(g=new W(h.value.buffer).getUint32(0)),f.signature=g})}}class Ze extends b{constructor(e,{chunkSize:n,DecompressionStream:s,DecompressionStreamNative:r}){super({});const{zipCrypto:a,encrypted:o,signed:l,signature:u,compressed:c,useCompressionStream:i}=e;let f,h,p=Ie(super.readable);o&&(a?p=D(p,new Je(e)):(h=new Ge(e),p=D(p,h))),c&&(p=qe(p,i,{chunkSize:n},r,s)),o&&!a||!l||(f=new ce,p=D(p,f)),Ae(this,p,()=>{if((!o||a)&&l){const d=new W(f.value.buffer);if(u!=d.getUint32(0,!1))throw new v(ue)}})}}function Ie(t){return D(t,new b({transform(e,n){e&&e.length&&n.enqueue(e)}}))}function Ae(t,e,n){e=D(e,new b({flush:n})),m.defineProperty(t,"readable",{get:()=>e})}function qe(t,e,n,s,r){try{t=D(t,new(e&&s?s:r)(Ce,n))}catch{if(!e)return t;try{t=D(t,new r(Ce,n))}catch{return t}}return t}function D(t,e){return t.pipeThrough(e)}const Re="data",He="close";class $e extends b{constructor(e,n){super({});const s=this,{codecType:r}=e;let a;r.startsWith("deflate")?a=Ye:r.startsWith("inflate")&&(a=Ze);let o=0,l=0;const u=new a(e,n),c=super.readable,i=new b({transform(h,p){h&&h.length&&(l+=h.length,p.enqueue(h))},flush(){m.assign(s,{inputSize:l})}}),f=new b({transform(h,p){h&&h.length&&(o+=h.length,p.enqueue(h))},flush(){const{signature:h}=u;m.assign(s,{signature:h,outputSize:o,inputSize:l})}});m.defineProperty(s,"readable",{get:()=>c.pipeThrough(i).pipeThrough(u).pipeThrough(f)})}}class et extends b{constructor(e){let n;super({transform:function s(r,a){if(n){const o=new w(n.length+r.length);o.set(n),o.set(r,n.length),r=o,n=null}r.length>e?(a.enqueue(r.slice(0,e)),s(r.slice(e),a)):n=r},flush(s){n&&n.length&&s.enqueue(n)}})}}const Y=new re,Z=new re;let $,R=0,Pe=!0;async function tt(t){try{const{options:e,scripts:n,config:s}=t;if(n&&n.length)try{Pe?importScripts.apply(j,n):await Be(n)}catch{Pe=!1,await Be(n)}self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new oe(self.Deflate)),self.Inflate&&(s.DecompressionStream=new oe(self.Inflate));const r={highWaterMark:1},a=t.readable||new Ve({async pull(h){const p=new M(y=>Y.set(R,y));ee({type:"pull",messageId:R}),R=(R+1)%ne.MAX_SAFE_INTEGER;const{value:d,done:g}=await p;h.enqueue(d),g&&h.close()}},r),o=t.writable||new xe({async write(h){let p;const d=new M(g=>p=g);Z.set(R,p),ee({type:Re,value:h,messageId:R}),R=(R+1)%ne.MAX_SAFE_INTEGER,await d}},r),l=new $e(e,s);$=new AbortController;const{signal:u}=$;await a.pipeThrough(l).pipeThrough(new et(s.chunkSize)).pipeTo(o,{signal:u,preventClose:!0,preventAbort:!0});try{await o.getWriter().close()}catch{}const{signature:c,inputSize:i,outputSize:f}=l;ee({type:He,result:{signature:c,inputSize:i,outputSize:f}})}catch(e){Ke(e)}}async function Be(t){for(const e of t)await import(e)}function ee(t){let{value:e}=t;if(e)if(e.length)try{e=new w(e),t.value=e.buffer,K(t,[t.value])}catch{K(t)}else K(t);else K(t)}function Ke(t=new v("Unknown error")){const{message:e,stack:n,code:s,name:r}=t;K({error:{message:e,stack:n,code:s,name:r}})}function Te(t,e,n){return class{constructor(r){const a=this;var o,l;o=r,l="level",(typeof m.hasOwn===O?m.hasOwn(o,l):o.hasOwnProperty(l))&&r.level===j&&delete r.level,a.codec=new t(m.assign({},e,r)),n(a.codec,u=>{if(a.pendingData){const c=a.pendingData;a.pendingData=new w(c.length+u.length);const{pendingData:i}=a;i.set(c,0),i.set(u,c.length)}else a.pendingData=new w(u)})}append(r){return this.codec.push(r),s(this)}flush(){return this.codec.push(new w,!0),s(this)}};function s(r){if(r.pendingData){const a=r.pendingData;return r.pendingData=null,a}return new w}}addEventListener("message",({data:t})=>{const{type:e,messageId:n,value:s,done:r}=t;try{if(e=="start"&&tt(t),e==Re){const a=Y.get(n);Y.delete(n),a({value:new w(s),done:r})}if(e=="ack"){const a=Z.get(n);Z.delete(n),a()}e==He&&$.abort()}catch(a){Ke(a)}}),self.initCodec=()=>{const{Deflate:t,Inflate:e}=((n,s={},r)=>({Deflate:Te(n.Deflate,s.deflate,r),Inflate:Te(n.Inflate,s.inflate,r)}))(pako,{deflate:{raw:!0},inflate:{raw:!0}},(n,s)=>n.onData=s);self.Deflate=t,self.Inflate=e}})(); | ||
(function(){"use strict";const{Array:G,Object:y,Math:k,Error:m,Uint8Array:p,Uint16Array:ve,Uint32Array:M,Int32Array:ze,DataView:j,TextEncoder:x,crypto:b,postMessage:A}=globalThis,F=[];for(let n=0;256>n;n++){let e=n;for(let t=0;8>t;t++)1&e?e=e>>>1^3988292384:e>>>=1;F[n]=e}class R{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let s=0,a=0|e.length;a>s;s++)t=t>>>8^F[255&(t^e[s])];this.crc=t}get(){return~this.crc}}const u={concat(n,e){if(n.length===0||e.length===0)return n.concat(e);const t=n[n.length-1],s=u.getPartial(t);return s===32?n.concat(e):u._shiftRight(e,s,0|t,n.slice(0,n.length-1))},bitLength(n){const e=n.length;if(e===0)return 0;const t=n[e-1];return 32*(e-1)+u.getPartial(t)},clamp(n,e){if(32*n.length<e)return n;const t=(n=n.slice(0,k.ceil(e/32))).length;return e&=31,t>0&&e&&(n[t-1]=u.partial(e,n[t-1]&2147483648>>e-1,1)),n},partial:(n,e,t)=>n===32?e:(t?0|e:e<<32-n)+1099511627776*n,getPartial:n=>k.round(n/1099511627776)||32,_shiftRight(n,e,t,s){for(s===void 0&&(s=[]);e>=32;e-=32)s.push(t),t=0;if(e===0)return s.concat(n);for(let i=0;i<n.length;i++)s.push(t|n[i]>>>e),t=n[i]<<32-e;const a=n.length?n[n.length-1]:0,r=u.getPartial(a);return s.push(u.partial(e+r&31,e+r>32?t:s.pop(),1)),s}},W={bytes:{fromBits(n){const e=u.bitLength(n)/8,t=new p(e);let s;for(let a=0;e>a;a++)!(3&a)&&(s=n[a/4]),t[a]=s>>>24,s<<=8;return t},toBits(n){const e=[];let t,s=0;for(t=0;t<n.length;t++)s=s<<8|n[t],(3&t)==3&&(e.push(s),s=0);return 3&t&&e.push(u.partial(8*(3&t),s)),e}}},O={sha1:function(n){n?(this._h=n._h.slice(0),this._buffer=n._buffer.slice(0),this._length=n._length):this.reset()}};O.sha1.prototype={blockSize:512,reset:function(){const n=this;return n._h=this._init.slice(0),n._buffer=[],n._length=0,n},update:function(n){const e=this;typeof n=="string"&&(n=W.utf8String.toBits(n));const t=e._buffer=u.concat(e._buffer,n),s=e._length,a=e._length=s+u.bitLength(n);if(a>9007199254740991)throw new m("Cannot hash more than 2^53 - 1 bits");const r=new M(t);let i=0;for(let c=e.blockSize+s-(e.blockSize+s&e.blockSize-1);a>=c;c+=e.blockSize)e._block(r.subarray(16*i,16*(i+1))),i+=1;return t.splice(0,16*i),e},finalize:function(){const n=this;let e=n._buffer;const t=n._h;e=u.concat(e,[u.partial(1,1)]);for(let s=e.length+2;15&s;s++)e.push(0);for(e.push(k.floor(n._length/4294967296)),e.push(0|n._length);e.length;)n._block(e.splice(0,16));return n.reset(),t},_init:[1732584193,4023233417,2562383102,271733878,3285377520],_key:[1518500249,1859775393,2400959708,3395469782],_f:(n,e,t,s)=>n>19?n>39?n>59?n>79?void 0:e^t^s:e&t|e&s|t&s:e^t^s:e&t|~e&s,_S:(n,e)=>e<<n|e>>>32-n,_block:function(n){const e=this,t=e._h,s=G(80);for(let o=0;16>o;o++)s[o]=n[o];let a=t[0],r=t[1],i=t[2],c=t[3],l=t[4];for(let o=0;79>=o;o++){16>o||(s[o]=e._S(1,s[o-3]^s[o-8]^s[o-14]^s[o-16]));const h=e._S(5,a)+e._f(o,r,i,c)+l+s[o]+e._key[k.floor(o/20)]|0;l=c,c=i,i=e._S(30,r),r=a,a=h}t[0]=t[0]+a|0,t[1]=t[1]+r|0,t[2]=t[2]+i|0,t[3]=t[3]+c|0,t[4]=t[4]+l|0}};const de={getRandomValues(n){const e=new M(n.buffer),t=s=>{let a=987654321;const r=4294967295;return()=>(a=36969*(65535&a)+(a>>16)&r,(((a<<16)+(s=18e3*(65535&s)+(s>>16)&r)&r)/4294967296+.5)*(k.random()>.5?1:-1))};for(let s,a=0;a<n.length;a+=4){const r=t(4294967296*(s||k.random()));s=987654071*r(),e[a/4]=4294967296*r()|0}return n}},T={importKey:n=>new T.hmacSha1(W.bytes.toBits(n)),pbkdf2(n,e,t,s){if(t=t||1e4,0>s||0>t)throw new m("invalid params to pbkdf2");const a=1+(s>>5)<<2;let r,i,c,l,o;const h=new ArrayBuffer(a),d=new j(h);let w=0;const z=u;for(e=W.bytes.toBits(e),o=1;(a||1)>w;o++){for(r=i=n.encrypt(z.concat(e,[o])),c=1;t>c;c++)for(i=n.encrypt(i),l=0;l<i.length;l++)r[l]^=i[l];for(c=0;(a||1)>w&&c<r.length;c++)d.setInt32(w,r[c]),w+=4}return h.slice(0,s/8)},hmacSha1:class{constructor(n){const e=this,t=e._hash=O.sha1,s=[[],[]],a=t.prototype.blockSize/32;e._baseHash=[new t,new t],n.length>a&&(n=t.hash(n));for(let r=0;a>r;r++)s[0][r]=909522486^n[r],s[1][r]=1549556828^n[r];e._baseHash[0].update(s[0]),e._baseHash[1].update(s[1]),e._resultHash=new t(e._baseHash[0])}reset(){const n=this;n._resultHash=new n._hash(n._baseHash[0]),n._updated=!1}update(n){this._updated=!0,this._resultHash.update(n)}digest(){const n=this,e=n._resultHash.finalize(),t=new n._hash(n._baseHash[1]).update(e).finalize();return n.reset(),t}encrypt(n){if(this._updated)throw new m("encrypt on already updated hmac called!");return this.update(n),this.digest(n)}}},q="Invalid pasword",D=16,J={name:"PBKDF2"},ue=y.assign({hash:{name:"HMAC"}},J),N=y.assign({iterations:1e3,hash:{name:"SHA-1"}},J),fe=["deriveBits"],H=[8,12,16],K=[16,24,32],v=10,Q=[0,0,0,0],U=b!==void 0,X=U&&b.subtle!==void 0,_=W.bytes,Y=class{constructor(n){const e=this;e._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],e._tables[0][0][0]||e._precompute();const t=e._tables[0][4],s=e._tables[1],a=n.length;let r,i,c,l=1;if(a!==4&&a!==6&&a!==8)throw new m("invalid aes key size");for(e._key=[i=n.slice(0),c=[]],r=a;4*a+28>r;r++){let o=i[r-1];(r%a==0||a===8&&r%a==4)&&(o=t[o>>>24]<<24^t[o>>16&255]<<16^t[o>>8&255]<<8^t[255&o],r%a==0&&(o=o<<8^o>>>24^l<<24,l=l<<1^283*(l>>7))),i[r]=i[r-a]^o}for(let o=0;r;o++,r--){const h=i[3&o?r:r-4];c[o]=4>=r||4>o?h:s[0][t[h>>>24]]^s[1][t[h>>16&255]]^s[2][t[h>>8&255]]^s[3][t[255&h]]}}encrypt(n){return this._crypt(n,0)}decrypt(n){return this._crypt(n,1)}_precompute(){const n=this._tables[0],e=this._tables[1],t=n[4],s=e[4],a=[],r=[];let i,c,l,o;for(let h=0;256>h;h++)r[(a[h]=h<<1^283*(h>>7))^h]=h;for(let h=i=0;!t[h];h^=c||1,i=r[i]||1){let d=i^i<<1^i<<2^i<<3^i<<4;d=d>>8^255&d^99,t[h]=d,s[d]=h,o=a[l=a[c=a[h]]];let w=16843009*o^65537*l^257*c^16843008*h,z=257*a[d]^16843008*d;for(let g=0;4>g;g++)n[g][h]=z=z<<24^z>>>8,e[g][d]=w=w<<24^w>>>8}for(let h=0;5>h;h++)n[h]=n[h].slice(0),e[h]=e[h].slice(0)}_crypt(n,e){if(n.length!==4)throw new m("invalid aes block size");const t=this._key[e],s=t.length/4-2,a=[0,0,0,0],r=this._tables[e],i=r[0],c=r[1],l=r[2],o=r[3],h=r[4];let d,w,z,g=n[0]^t[0],C=n[e?3:1]^t[1],S=n[2]^t[2],B=n[e?1:3]^t[3],V=4;for(let I=0;s>I;I++)d=i[g>>>24]^c[C>>16&255]^l[S>>8&255]^o[255&B]^t[V],w=i[C>>>24]^c[S>>16&255]^l[B>>8&255]^o[255&g]^t[V+1],z=i[S>>>24]^c[B>>16&255]^l[g>>8&255]^o[255&C]^t[V+2],B=i[B>>>24]^c[g>>16&255]^l[C>>8&255]^o[255&S]^t[V+3],V+=4,g=d,C=w,S=z;for(let I=0;4>I;I++)a[e?3&-I:I]=h[g>>>24]<<24^h[C>>16&255]<<16^h[S>>8&255]<<8^h[255&B]^t[V++],d=g,g=C,C=S,S=B,B=d;return a}},Z=class{constructor(n,e){this._prf=n,this._initIv=e,this._iv=e}reset(){this._iv=this._initIv}update(n){return this.calculate(this._prf,n,this._iv)}incWord(n){if((n>>24&255)==255){let e=n>>16&255,t=n>>8&255,s=255&n;e===255?(e=0,t===255?(t=0,s===255?s=0:++s):++t):++e,n=0,n+=e<<16,n+=t<<8,n+=s}else n+=1<<24;return n}incCounter(n){(n[0]=this.incWord(n[0]))===0&&(n[1]=this.incWord(n[1]))}calculate(n,e,t){let s;if(!(s=e.length))return[];const a=u.bitLength(e);for(let r=0;s>r;r+=4){this.incCounter(t);const i=n.encrypt(t);e[r]^=i[0],e[r+1]^=i[1],e[r+2]^=i[2],e[r+3]^=i[3]}return u.clamp(e,a)}},$=T.hmacSha1;class ge{constructor(e,t,s){y.assign(this,{password:e,signed:t,strength:s-1,pendingInput:new p(0)})}async append(e){const t=this;if(t.password){const s=f(e,0,H[t.strength]+2);await(async(a,r,i)=>{await te(a,i,f(r,0,H[a.strength]));const c=f(r,H[a.strength]),l=a.keys.passwordVerification;if(l[0]!=c[0]||l[1]!=c[1])throw new m(q)})(t,s,t.password),t.password=null,t.aesCtrGladman=new Z(new Y(t.keys.key),G.from(Q)),t.hmac=new $(t.keys.authentication),e=f(e,H[t.strength]+2)}return ee(t,e,new p(e.length-v-(e.length-v)%D),0,v,!0)}flush(){const e=this,t=e.pendingInput,s=f(t,0,t.length-v),a=f(t,t.length-v);let r=new p(0);if(s.length){const c=_.toBits(s);e.hmac.update(c);const l=e.aesCtrGladman.update(c);r=_.fromBits(l)}let i=!0;if(e.signed){const c=f(_.fromBits(e.hmac.digest()),0,v);for(let l=0;v>l;l++)c[l]!=a[l]&&(i=!1)}return{valid:i,data:r}}}class we{constructor(e,t){y.assign(this,{password:e,strength:t-1,pendingInput:new p(0)})}async append(e){const t=this;let s=new p(0);t.password&&(s=await(async(r,i)=>{const c=(l=new p(H[r.strength]),U&&typeof b.getRandomValues=="function"?b.getRandomValues(l):de.getRandomValues(l));var l;return await te(r,i,c),L(c,r.keys.passwordVerification)})(t,t.password),t.password=null,t.aesCtrGladman=new Z(new Y(t.keys.key),G.from(Q)),t.hmac=new $(t.keys.authentication));const a=new p(s.length+e.length-e.length%D);return a.set(s,0),ee(t,e,a,s.length,0)}flush(){const e=this;let t=new p(0);if(e.pendingInput.length){const a=e.aesCtrGladman.update(_.toBits(e.pendingInput));e.hmac.update(a),t=_.fromBits(a)}const s=f(_.fromBits(e.hmac.digest()),0,v);return{data:L(t,s),signature:s}}}function ee(n,e,t,s,a,r){const i=e.length-a;let c;for(n.pendingInput.length&&(e=L(n.pendingInput,e),t=((l,o)=>{if(o&&o>l.length){const h=l;(l=new p(o)).set(h,0)}return l})(t,i-i%D)),c=0;i-D>=c;c+=D){const l=_.toBits(f(e,c,c+D));r&&n.hmac.update(l);const o=n.aesCtrGladman.update(l);r||n.hmac.update(o),t.set(_.fromBits(o),c+s)}return n.pendingInput=f(e,c),t}async function te(n,e,t){const s=(c=>{if(x===void 0){const l=new p((c=unescape(encodeURIComponent(c))).length);for(let o=0;o<l.length;o++)l[o]=c.charCodeAt(o);return l}return new x().encode(c)})(e),a=await((c,l,o,h,d)=>U&&X&&typeof b.subtle.importKey=="function"?b.subtle.importKey("raw",l,o,!1,d):T.importKey(l))(0,s,ue,0,fe),r=await(async(c,l,o)=>U&&X&&typeof b.subtle.deriveBits=="function"?await b.subtle.deriveBits(c,l,o):T.pbkdf2(l,c.salt,N.iterations,o))(y.assign({salt:t},N),a,8*(2*K[n.strength]+2)),i=new p(r);n.keys={key:_.toBits(f(i,0,K[n.strength])),authentication:_.toBits(f(i,K[n.strength],2*K[n.strength])),passwordVerification:f(i,2*K[n.strength])}}function L(n,e){let t=n;return n.length+e.length&&(t=new p(n.length+e.length),t.set(n,0),t.set(e,n.length)),t}function f(n,e,t){return n.subarray(e,t)}class ye{constructor(e,t){y.assign(this,{password:e,passwordVerification:t}),ae(this,e)}append(e){const t=this;if(t.password){const s=ne(t,e.subarray(0,12));if(t.password=null,s[11]!=t.passwordVerification)throw new m(q);e=e.subarray(12)}return ne(t,e)}flush(){return{valid:!0,data:new p(0)}}}class _e{constructor(e,t){y.assign(this,{password:e,passwordVerification:t}),ae(this,e)}append(e){const t=this;let s,a;if(t.password){t.password=null;const r=b.getRandomValues(new p(12));r[11]=t.passwordVerification,s=new p(e.length+r.length),s.set(se(t,r),0),a=12}else s=new p(e.length),a=0;return s.set(se(t,e),a),s}flush(){return{data:new p(0)}}}function ne(n,e){const t=new p(e.length);for(let s=0;s<e.length;s++)t[s]=re(n)^e[s],P(n,t[s]);return t}function se(n,e){const t=new p(e.length);for(let s=0;s<e.length;s++)t[s]=re(n)^e[s],P(n,e[s]);return t}function ae(n,e){n.keys=[305419896,591751049,878082192],n.crcKey0=new R(n.keys[0]),n.crcKey2=new R(n.keys[2]);for(let t=0;t<e.length;t++)P(n,e.charCodeAt(t))}function P(n,e){n.crcKey0.append([e]),n.keys[0]=~n.crcKey0.get(),n.keys[1]=ce(n.keys[1]+ie(n.keys[0])),n.keys[1]=ce(k.imul(n.keys[1],134775813)+1),n.crcKey2.append([n.keys[1]>>>24]),n.keys[2]=~n.crcKey2.get()}function re(n){const e=2|n.keys[2];return ie(k.imul(e,1^e)>>>8)}function ie(n){return 255&n}function ce(n){return 4294967295&n}const oe="deflate",le="inflate",he="Invalid signature";class me{constructor(e,{signature:t,password:s,signed:a,compressed:r,zipCrypto:i,passwordVerification:c,encryptionStrength:l},{chunkSize:o}){const h=!!s;y.assign(this,{signature:t,encrypted:h,signed:a,compressed:r,inflate:r&&new e({chunkSize:o}),crc32:a&&new R,zipCrypto:i,decrypt:h&&i?new ye(s,c):new ge(s,a,l)})}async append(e){const t=this;return t.encrypted&&e.length&&(e=await t.decrypt.append(e)),t.compressed&&e.length&&(e=await t.inflate.append(e)),(!t.encrypted||t.zipCrypto)&&t.signed&&e.length&&t.crc32.append(e),e}async flush(){const e=this;let t,s=new p(0);if(e.encrypted){const a=e.decrypt.flush();if(!a.valid)throw new m(he);s=a.data}if((!e.encrypted||e.zipCrypto)&&e.signed){const a=new j(new p(4).buffer);if(t=e.crc32.get(),a.setUint32(0,t),e.signature!=a.getUint32(0,!1))throw new m(he)}return e.compressed&&(s=await e.inflate.append(s)||new p(0),await e.inflate.flush()),{data:s,signature:t}}}class be{constructor(e,{encrypted:t,signed:s,compressed:a,level:r,zipCrypto:i,password:c,passwordVerification:l,encryptionStrength:o},{chunkSize:h}){y.assign(this,{encrypted:t,signed:s,compressed:a,deflate:a&&new e({level:r||5,chunkSize:h}),crc32:s&&new R,zipCrypto:i,encrypt:t&&i?new _e(c,l):new we(c,o)})}async append(e){const t=this;let s=e;return t.compressed&&e.length&&(s=await t.deflate.append(e)),t.encrypted&&s.length&&(s=await t.encrypt.append(s)),(!t.encrypted||t.zipCrypto)&&t.signed&&e.length&&t.crc32.append(e),s}async flush(){const e=this;let t,s=new p(0);if(e.compressed&&(s=await e.deflate.flush()||new p(0)),e.encrypted){s=await e.encrypt.append(s);const a=e.encrypt.flush();t=a.signature;const r=new p(s.length+a.data.length);r.set(s,0),r.set(a.data,s.length),s=r}return e.encrypted&&!e.zipCrypto||!e.signed||(t=e.crc32.get()),{data:s,signature:t}}}const ke={init(n){n.scripts&&n.scripts.length&&importScripts.apply(void 0,n.scripts);const e=n.options;let t;self.initCodec&&self.initCodec(),e.codecType.startsWith(oe)?t=self.Deflate:e.codecType.startsWith(le)&&(t=self.Inflate),E=((s,a,r)=>a.codecType.startsWith(oe)?new be(s,a,r):a.codecType.startsWith(le)?new me(s,a,r):void 0)(t,e,n.config)},append:async n=>({data:await E.append(n.data)}),flush:()=>E.flush()};let E;function pe(n,e,t){return class{constructor(a){const r=this;r.codec=new n(y.assign({},e,a)),t(r.codec,i=>{if(r.pendingData){const c=r.pendingData;r.pendingData=new p(c.length+i.length),r.pendingData.set(c,0),r.pendingData.set(i,c.length)}else r.pendingData=new p(i)})}append(a){return this.codec.push(a),s(this)}flush(){return this.codec.push(new p(0),!0),s(this)}};function s(a){if(a.pendingData){const r=a.pendingData;return a.pendingData=null,r}return new p(0)}}addEventListener("message",async n=>{const e=n.data,t=e.type,s=ke[t];if(s)try{e.data&&(e.data=new p(e.data));const a=await s(e)||{};if(a.type=t,a.data)try{a.data=a.data.buffer,A(a,[a.data])}catch{A(a)}else A(a)}catch(a){A({type:t,error:{message:a.message,stack:a.stack}})}}),self.initCodec=()=>{const{Deflate:n,Inflate:e}=((t,s={},a)=>({Deflate:pe(t.Deflate,s.deflate,a),Inflate:pe(t.Inflate,s.inflate,a)}))(pako,{deflate:{raw:!0},inflate:{raw:!0}},(t,s)=>t.onData=s);self.Deflate=n,self.Inflate=e}})(); |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.116 | ||
* Version 1.116.1 | ||
* | ||
@@ -26,2 +26,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
import{a as e}from"./chunk-ACKL3UCP.js";import{a as r}from"./chunk-4PZYNNSN.js";import"./chunk-TM5U646E.js";import"./chunk-EJXUGS5C.js";import"./chunk-BMTOWA7K.js";import"./chunk-W2YTVRCC.js";import"./chunk-LGFQRF3V.js";import"./chunk-AHZBRYZA.js";import"./chunk-TWAPNO4J.js";import"./chunk-FSXLPWHR.js";import"./chunk-37KLWU3W.js";import"./chunk-HTNJJ6YO.js";import"./chunk-63E276CT.js";import"./chunk-NRW2R4YV.js";import"./chunk-NSILPUHD.js";import"./chunk-M7WODBAD.js";import"./chunk-J26GWQSN.js";import"./chunk-PYB3IV2X.js";import"./chunk-H7FFK4U5.js";import"./chunk-YEUII2A5.js";import"./chunk-4353PD6R.js";import"./chunk-2S4UUFD6.js";import"./chunk-42VHSORI.js";function n(o,t){let m=e.unpackCombineGeometryParameters(o),i=e.combineGeometry(m);return e.packCombineGeometryResults(i,t)}var c=r(n);export{c as default}; | ||
import{a as e}from"./chunk-2ORNL2GN.js";import{a as r}from"./chunk-F3CCIWXX.js";import"./chunk-WEQDXQHF.js";import"./chunk-CKVHMDPC.js";import"./chunk-JAMWPWOV.js";import"./chunk-IQ7DLQQP.js";import"./chunk-QC62DG5W.js";import"./chunk-R6IH5WM5.js";import"./chunk-ROROM35N.js";import"./chunk-F5TB5EI7.js";import"./chunk-VAPKZ5PR.js";import"./chunk-DXGEUDM7.js";import"./chunk-5IUHFVP3.js";import"./chunk-OE3P25NW.js";import"./chunk-HIT4T4MS.js";import"./chunk-3KRBUMEX.js";import"./chunk-PQ6NV4GA.js";import"./chunk-74I3QBVP.js";import"./chunk-BLVYEJBC.js";import"./chunk-A6PYE4JS.js";import"./chunk-T23IKWCM.js";import"./chunk-HJ33TVGP.js";import"./chunk-WL4PTXMO.js";function n(o,t){let m=e.unpackCombineGeometryParameters(o),i=e.combineGeometry(m);return e.packCombineGeometryResults(i,t)}var c=r(n);export{c as default}; |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.116 | ||
* Version 1.116.1 | ||
* | ||
@@ -26,2 +26,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
import{a as r}from"./chunk-KODO46B4.js";import"./chunk-TXIAMGDC.js";import"./chunk-TK2AA6M2.js";import"./chunk-FSXLPWHR.js";import"./chunk-37KLWU3W.js";import"./chunk-HTNJJ6YO.js";import"./chunk-63E276CT.js";import"./chunk-NRW2R4YV.js";import"./chunk-NSILPUHD.js";import"./chunk-M7WODBAD.js";import"./chunk-J26GWQSN.js";import"./chunk-PYB3IV2X.js";import"./chunk-H7FFK4U5.js";import"./chunk-YEUII2A5.js";import"./chunk-4353PD6R.js";import"./chunk-2S4UUFD6.js";import{e as o}from"./chunk-42VHSORI.js";function i(e,t){return o(t)&&(e=r.unpack(e,t)),r.createGeometry(e)}var a=i;export{a as default}; | ||
import{a as r}from"./chunk-237DLL5B.js";import"./chunk-XJCFZEZW.js";import"./chunk-64WQCGAE.js";import"./chunk-F5TB5EI7.js";import"./chunk-VAPKZ5PR.js";import"./chunk-DXGEUDM7.js";import"./chunk-5IUHFVP3.js";import"./chunk-OE3P25NW.js";import"./chunk-HIT4T4MS.js";import"./chunk-3KRBUMEX.js";import"./chunk-PQ6NV4GA.js";import"./chunk-74I3QBVP.js";import"./chunk-BLVYEJBC.js";import"./chunk-A6PYE4JS.js";import"./chunk-T23IKWCM.js";import"./chunk-HJ33TVGP.js";import{e as o}from"./chunk-WL4PTXMO.js";function i(e,t){return o(t)&&(e=r.unpack(e,t)),r.createGeometry(e)}var a=i;export{a as default}; |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.116 | ||
* Version 1.116.1 | ||
* | ||
@@ -26,2 +26,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
import{a as d}from"./chunk-TXIAMGDC.js";import{a as l}from"./chunk-FSXLPWHR.js";import{b as O,c as h,d as p}from"./chunk-37KLWU3W.js";import{d as A}from"./chunk-HTNJJ6YO.js";import"./chunk-63E276CT.js";import"./chunk-NRW2R4YV.js";import"./chunk-NSILPUHD.js";import{a}from"./chunk-M7WODBAD.js";import{a as m}from"./chunk-J26GWQSN.js";import"./chunk-PYB3IV2X.js";import"./chunk-H7FFK4U5.js";import"./chunk-YEUII2A5.js";import{a as u}from"./chunk-4353PD6R.js";import{a as b,b as r}from"./chunk-2S4UUFD6.js";import{e as c}from"./chunk-42VHSORI.js";var g=new m;function f(e){e=u(e,u.EMPTY_OBJECT);let t=e.minimum,n=e.maximum;if(r.typeOf.object("min",t),r.typeOf.object("max",n),c(e.offsetAttribute)&&e.offsetAttribute===d.TOP)throw new b("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._min=m.clone(t),this._max=m.clone(n),this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxOutlineGeometry"}f.fromDimensions=function(e){e=u(e,u.EMPTY_OBJECT);let t=e.dimensions;r.typeOf.object("dimensions",t),r.typeOf.number.greaterThanOrEquals("dimensions.x",t.x,0),r.typeOf.number.greaterThanOrEquals("dimensions.y",t.y,0),r.typeOf.number.greaterThanOrEquals("dimensions.z",t.z,0);let n=m.multiplyByScalar(t,.5,new m);return new f({minimum:m.negate(n,new m),maximum:n,offsetAttribute:e.offsetAttribute})};f.fromAxisAlignedBoundingBox=function(e){return r.typeOf.object("boundindBox",e),new f({minimum:e.minimum,maximum:e.maximum})};f.packedLength=2*m.packedLength+1;f.pack=function(e,t,n){return r.typeOf.object("value",e),r.defined("array",t),n=u(n,0),m.pack(e._min,t,n),m.pack(e._max,t,n+m.packedLength),t[n+m.packedLength*2]=u(e._offsetAttribute,-1),t};var w=new m,x=new m,_={minimum:w,maximum:x,offsetAttribute:void 0};f.unpack=function(e,t,n){r.defined("array",e),t=u(t,0);let s=m.unpack(e,t,w),o=m.unpack(e,t+m.packedLength,x),i=e[t+m.packedLength*2];return c(n)?(n._min=m.clone(s,n._min),n._max=m.clone(o,n._max),n._offsetAttribute=i===-1?void 0:i,n):(_.offsetAttribute=i===-1?void 0:i,new f(_))};f.createGeometry=function(e){let t=e._min,n=e._max;if(m.equals(t,n))return;let s=new l,o=new Uint16Array(12*2),i=new Float64Array(8*3);i[0]=t.x,i[1]=t.y,i[2]=t.z,i[3]=n.x,i[4]=t.y,i[5]=t.z,i[6]=n.x,i[7]=n.y,i[8]=t.z,i[9]=t.x,i[10]=n.y,i[11]=t.z,i[12]=t.x,i[13]=t.y,i[14]=n.z,i[15]=n.x,i[16]=t.y,i[17]=n.z,i[18]=n.x,i[19]=n.y,i[20]=n.z,i[21]=t.x,i[22]=n.y,i[23]=n.z,s.position=new p({componentDatatype:a.DOUBLE,componentsPerAttribute:3,values:i}),o[0]=4,o[1]=5,o[2]=5,o[3]=6,o[4]=6,o[5]=7,o[6]=7,o[7]=4,o[8]=0,o[9]=1,o[10]=1,o[11]=2,o[12]=2,o[13]=3,o[14]=3,o[15]=0,o[16]=0,o[17]=4,o[18]=1,o[19]=5,o[20]=2,o[21]=6,o[22]=3,o[23]=7;let k=m.subtract(n,t,g),E=m.magnitude(k)*.5;if(c(e._offsetAttribute)){let T=i.length,B=e._offsetAttribute===d.NONE?0:1,z=new Uint8Array(T/3).fill(B);s.applyOffset=new p({componentDatatype:a.UNSIGNED_BYTE,componentsPerAttribute:1,values:z})}return new h({attributes:s,indices:o,primitiveType:O.LINES,boundingSphere:new A(m.ZERO,E),offsetAttribute:e._offsetAttribute})};var y=f;function L(e,t){return c(t)&&(e=y.unpack(e,t)),y.createGeometry(e)}var R=L;export{R as default}; | ||
import{a as d}from"./chunk-XJCFZEZW.js";import{a as l}from"./chunk-F5TB5EI7.js";import{b as O,c as h,d as p}from"./chunk-VAPKZ5PR.js";import{d as A}from"./chunk-DXGEUDM7.js";import"./chunk-5IUHFVP3.js";import"./chunk-OE3P25NW.js";import"./chunk-HIT4T4MS.js";import{a}from"./chunk-3KRBUMEX.js";import{a as m}from"./chunk-PQ6NV4GA.js";import"./chunk-74I3QBVP.js";import"./chunk-BLVYEJBC.js";import"./chunk-A6PYE4JS.js";import{a as u}from"./chunk-T23IKWCM.js";import{a as b,b as r}from"./chunk-HJ33TVGP.js";import{e as c}from"./chunk-WL4PTXMO.js";var g=new m;function f(e){e=u(e,u.EMPTY_OBJECT);let t=e.minimum,n=e.maximum;if(r.typeOf.object("min",t),r.typeOf.object("max",n),c(e.offsetAttribute)&&e.offsetAttribute===d.TOP)throw new b("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._min=m.clone(t),this._max=m.clone(n),this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxOutlineGeometry"}f.fromDimensions=function(e){e=u(e,u.EMPTY_OBJECT);let t=e.dimensions;r.typeOf.object("dimensions",t),r.typeOf.number.greaterThanOrEquals("dimensions.x",t.x,0),r.typeOf.number.greaterThanOrEquals("dimensions.y",t.y,0),r.typeOf.number.greaterThanOrEquals("dimensions.z",t.z,0);let n=m.multiplyByScalar(t,.5,new m);return new f({minimum:m.negate(n,new m),maximum:n,offsetAttribute:e.offsetAttribute})};f.fromAxisAlignedBoundingBox=function(e){return r.typeOf.object("boundindBox",e),new f({minimum:e.minimum,maximum:e.maximum})};f.packedLength=2*m.packedLength+1;f.pack=function(e,t,n){return r.typeOf.object("value",e),r.defined("array",t),n=u(n,0),m.pack(e._min,t,n),m.pack(e._max,t,n+m.packedLength),t[n+m.packedLength*2]=u(e._offsetAttribute,-1),t};var w=new m,x=new m,_={minimum:w,maximum:x,offsetAttribute:void 0};f.unpack=function(e,t,n){r.defined("array",e),t=u(t,0);let s=m.unpack(e,t,w),o=m.unpack(e,t+m.packedLength,x),i=e[t+m.packedLength*2];return c(n)?(n._min=m.clone(s,n._min),n._max=m.clone(o,n._max),n._offsetAttribute=i===-1?void 0:i,n):(_.offsetAttribute=i===-1?void 0:i,new f(_))};f.createGeometry=function(e){let t=e._min,n=e._max;if(m.equals(t,n))return;let s=new l,o=new Uint16Array(12*2),i=new Float64Array(8*3);i[0]=t.x,i[1]=t.y,i[2]=t.z,i[3]=n.x,i[4]=t.y,i[5]=t.z,i[6]=n.x,i[7]=n.y,i[8]=t.z,i[9]=t.x,i[10]=n.y,i[11]=t.z,i[12]=t.x,i[13]=t.y,i[14]=n.z,i[15]=n.x,i[16]=t.y,i[17]=n.z,i[18]=n.x,i[19]=n.y,i[20]=n.z,i[21]=t.x,i[22]=n.y,i[23]=n.z,s.position=new p({componentDatatype:a.DOUBLE,componentsPerAttribute:3,values:i}),o[0]=4,o[1]=5,o[2]=5,o[3]=6,o[4]=6,o[5]=7,o[6]=7,o[7]=4,o[8]=0,o[9]=1,o[10]=1,o[11]=2,o[12]=2,o[13]=3,o[14]=3,o[15]=0,o[16]=0,o[17]=4,o[18]=1,o[19]=5,o[20]=2,o[21]=6,o[22]=3,o[23]=7;let k=m.subtract(n,t,g),E=m.magnitude(k)*.5;if(c(e._offsetAttribute)){let T=i.length,B=e._offsetAttribute===d.NONE?0:1,z=new Uint8Array(T/3).fill(B);s.applyOffset=new p({componentDatatype:a.UNSIGNED_BYTE,componentsPerAttribute:1,values:z})}return new h({attributes:s,indices:o,primitiveType:O.LINES,boundingSphere:new A(m.ZERO,E),offsetAttribute:e._offsetAttribute})};var y=f;function L(e,t){return c(t)&&(e=y.unpack(e,t)),y.createGeometry(e)}var R=L;export{R as default}; |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.116 | ||
* Version 1.116.1 | ||
* | ||
@@ -26,2 +26,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
import{a as s}from"./chunk-5J7YBBQK.js";import"./chunk-4LWXONMT.js";import"./chunk-ZZAO5JE6.js";import"./chunk-EJXUGS5C.js";import"./chunk-BMTOWA7K.js";import"./chunk-W2YTVRCC.js";import"./chunk-TXIAMGDC.js";import{a as d}from"./chunk-TK2AA6M2.js";import"./chunk-LGFQRF3V.js";import"./chunk-AHZBRYZA.js";import"./chunk-TWAPNO4J.js";import"./chunk-FSXLPWHR.js";import"./chunk-37KLWU3W.js";import"./chunk-HTNJJ6YO.js";import"./chunk-63E276CT.js";import"./chunk-NRW2R4YV.js";import"./chunk-NSILPUHD.js";import"./chunk-M7WODBAD.js";import{a as l,d as a}from"./chunk-J26GWQSN.js";import"./chunk-PYB3IV2X.js";import"./chunk-H7FFK4U5.js";import"./chunk-YEUII2A5.js";import{a as c}from"./chunk-4353PD6R.js";import{b as p}from"./chunk-2S4UUFD6.js";import{e as m}from"./chunk-42VHSORI.js";function n(e){e=c(e,c.EMPTY_OBJECT);let r=e.radius;p.typeOf.number("radius",r);let o={center:e.center,semiMajorAxis:r,semiMinorAxis:r,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,vertexFormat:e.vertexFormat,stRotation:e.stRotation,shadowVolume:e.shadowVolume};this._ellipseGeometry=new s(o),this._workerName="createCircleGeometry"}n.packedLength=s.packedLength;n.pack=function(e,r,o){return p.typeOf.object("value",e),s.pack(e._ellipseGeometry,r,o)};var x=new s({center:new l,semiMajorAxis:1,semiMinorAxis:1}),t={center:new l,radius:void 0,ellipsoid:a.clone(a.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,vertexFormat:new d,stRotation:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0,shadowVolume:void 0};n.unpack=function(e,r,o){let i=s.unpack(e,r,x);return t.center=l.clone(i._center,t.center),t.ellipsoid=a.clone(i._ellipsoid,t.ellipsoid),t.height=i._height,t.extrudedHeight=i._extrudedHeight,t.granularity=i._granularity,t.vertexFormat=d.clone(i._vertexFormat,t.vertexFormat),t.stRotation=i._stRotation,t.shadowVolume=i._shadowVolume,m(o)?(t.semiMajorAxis=i._semiMajorAxis,t.semiMinorAxis=i._semiMinorAxis,o._ellipseGeometry=new s(t),o):(t.radius=i._semiMajorAxis,new n(t))};n.createGeometry=function(e){return s.createGeometry(e._ellipseGeometry)};n.createShadowVolume=function(e,r,o){let i=e._ellipseGeometry._granularity,u=e._ellipseGeometry._ellipsoid,h=r(i,u),f=o(i,u);return new n({center:e._ellipseGeometry._center,radius:e._ellipseGeometry._semiMajorAxis,ellipsoid:u,stRotation:e._ellipseGeometry._stRotation,granularity:i,extrudedHeight:h,height:f,vertexFormat:d.POSITION_ONLY,shadowVolume:!0})};Object.defineProperties(n.prototype,{rectangle:{get:function(){return this._ellipseGeometry.rectangle}},textureCoordinateRotationPoints:{get:function(){return this._ellipseGeometry.textureCoordinateRotationPoints}}});var _=n;function g(e,r){return m(r)&&(e=_.unpack(e,r)),e._ellipseGeometry._center=l.clone(e._ellipseGeometry._center),e._ellipseGeometry._ellipsoid=a.clone(e._ellipseGeometry._ellipsoid),_.createGeometry(e)}var E=g;export{E as default}; | ||
import{a as s}from"./chunk-67GRNFJC.js";import"./chunk-4LGF3GFD.js";import"./chunk-CFX77L57.js";import"./chunk-CKVHMDPC.js";import"./chunk-JAMWPWOV.js";import"./chunk-IQ7DLQQP.js";import"./chunk-XJCFZEZW.js";import{a as d}from"./chunk-64WQCGAE.js";import"./chunk-QC62DG5W.js";import"./chunk-R6IH5WM5.js";import"./chunk-ROROM35N.js";import"./chunk-F5TB5EI7.js";import"./chunk-VAPKZ5PR.js";import"./chunk-DXGEUDM7.js";import"./chunk-5IUHFVP3.js";import"./chunk-OE3P25NW.js";import"./chunk-HIT4T4MS.js";import"./chunk-3KRBUMEX.js";import{a as l,d as a}from"./chunk-PQ6NV4GA.js";import"./chunk-74I3QBVP.js";import"./chunk-BLVYEJBC.js";import"./chunk-A6PYE4JS.js";import{a as c}from"./chunk-T23IKWCM.js";import{b as p}from"./chunk-HJ33TVGP.js";import{e as m}from"./chunk-WL4PTXMO.js";function n(e){e=c(e,c.EMPTY_OBJECT);let r=e.radius;p.typeOf.number("radius",r);let o={center:e.center,semiMajorAxis:r,semiMinorAxis:r,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,vertexFormat:e.vertexFormat,stRotation:e.stRotation,shadowVolume:e.shadowVolume};this._ellipseGeometry=new s(o),this._workerName="createCircleGeometry"}n.packedLength=s.packedLength;n.pack=function(e,r,o){return p.typeOf.object("value",e),s.pack(e._ellipseGeometry,r,o)};var x=new s({center:new l,semiMajorAxis:1,semiMinorAxis:1}),t={center:new l,radius:void 0,ellipsoid:a.clone(a.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,vertexFormat:new d,stRotation:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0,shadowVolume:void 0};n.unpack=function(e,r,o){let i=s.unpack(e,r,x);return t.center=l.clone(i._center,t.center),t.ellipsoid=a.clone(i._ellipsoid,t.ellipsoid),t.height=i._height,t.extrudedHeight=i._extrudedHeight,t.granularity=i._granularity,t.vertexFormat=d.clone(i._vertexFormat,t.vertexFormat),t.stRotation=i._stRotation,t.shadowVolume=i._shadowVolume,m(o)?(t.semiMajorAxis=i._semiMajorAxis,t.semiMinorAxis=i._semiMinorAxis,o._ellipseGeometry=new s(t),o):(t.radius=i._semiMajorAxis,new n(t))};n.createGeometry=function(e){return s.createGeometry(e._ellipseGeometry)};n.createShadowVolume=function(e,r,o){let i=e._ellipseGeometry._granularity,u=e._ellipseGeometry._ellipsoid,h=r(i,u),f=o(i,u);return new n({center:e._ellipseGeometry._center,radius:e._ellipseGeometry._semiMajorAxis,ellipsoid:u,stRotation:e._ellipseGeometry._stRotation,granularity:i,extrudedHeight:h,height:f,vertexFormat:d.POSITION_ONLY,shadowVolume:!0})};Object.defineProperties(n.prototype,{rectangle:{get:function(){return this._ellipseGeometry.rectangle}},textureCoordinateRotationPoints:{get:function(){return this._ellipseGeometry.textureCoordinateRotationPoints}}});var _=n;function g(e,r){return m(r)&&(e=_.unpack(e,r)),e._ellipseGeometry._center=l.clone(e._ellipseGeometry._center),e._ellipseGeometry._ellipsoid=a.clone(e._ellipseGeometry._ellipsoid),_.createGeometry(e)}var E=g;export{E as default}; |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.116 | ||
* Version 1.116.1 | ||
* | ||
@@ -26,2 +26,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
import{a as n}from"./chunk-I2MF4BQC.js";import"./chunk-4LWXONMT.js";import"./chunk-TXIAMGDC.js";import"./chunk-TWAPNO4J.js";import"./chunk-FSXLPWHR.js";import"./chunk-37KLWU3W.js";import"./chunk-HTNJJ6YO.js";import"./chunk-63E276CT.js";import"./chunk-NRW2R4YV.js";import"./chunk-NSILPUHD.js";import"./chunk-M7WODBAD.js";import{a as o,d as s}from"./chunk-J26GWQSN.js";import"./chunk-PYB3IV2X.js";import"./chunk-H7FFK4U5.js";import"./chunk-YEUII2A5.js";import{a as u}from"./chunk-4353PD6R.js";import{b as d}from"./chunk-2S4UUFD6.js";import{e as a}from"./chunk-42VHSORI.js";function m(e){e=u(e,u.EMPTY_OBJECT);let r=e.radius;d.typeOf.number("radius",r);let l={center:e.center,semiMajorAxis:r,semiMinorAxis:r,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,numberOfVerticalLines:e.numberOfVerticalLines};this._ellipseGeometry=new n(l),this._workerName="createCircleOutlineGeometry"}m.packedLength=n.packedLength;m.pack=function(e,r,l){return d.typeOf.object("value",e),n.pack(e._ellipseGeometry,r,l)};var p=new n({center:new o,semiMajorAxis:1,semiMinorAxis:1}),i={center:new o,radius:void 0,ellipsoid:s.clone(s.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,numberOfVerticalLines:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0};m.unpack=function(e,r,l){let t=n.unpack(e,r,p);return i.center=o.clone(t._center,i.center),i.ellipsoid=s.clone(t._ellipsoid,i.ellipsoid),i.height=t._height,i.extrudedHeight=t._extrudedHeight,i.granularity=t._granularity,i.numberOfVerticalLines=t._numberOfVerticalLines,a(l)?(i.semiMajorAxis=t._semiMajorAxis,i.semiMinorAxis=t._semiMinorAxis,l._ellipseGeometry=new n(i),l):(i.radius=t._semiMajorAxis,new m(i))};m.createGeometry=function(e){return n.createGeometry(e._ellipseGeometry)};var c=m;function f(e,r){return a(r)&&(e=c.unpack(e,r)),e._ellipseGeometry._center=o.clone(e._ellipseGeometry._center),e._ellipseGeometry._ellipsoid=s.clone(e._ellipseGeometry._ellipsoid),c.createGeometry(e)}var E=f;export{E as default}; | ||
import{a as n}from"./chunk-P7P53TVD.js";import"./chunk-4LGF3GFD.js";import"./chunk-XJCFZEZW.js";import"./chunk-ROROM35N.js";import"./chunk-F5TB5EI7.js";import"./chunk-VAPKZ5PR.js";import"./chunk-DXGEUDM7.js";import"./chunk-5IUHFVP3.js";import"./chunk-OE3P25NW.js";import"./chunk-HIT4T4MS.js";import"./chunk-3KRBUMEX.js";import{a as o,d as s}from"./chunk-PQ6NV4GA.js";import"./chunk-74I3QBVP.js";import"./chunk-BLVYEJBC.js";import"./chunk-A6PYE4JS.js";import{a as u}from"./chunk-T23IKWCM.js";import{b as d}from"./chunk-HJ33TVGP.js";import{e as a}from"./chunk-WL4PTXMO.js";function m(e){e=u(e,u.EMPTY_OBJECT);let r=e.radius;d.typeOf.number("radius",r);let l={center:e.center,semiMajorAxis:r,semiMinorAxis:r,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,numberOfVerticalLines:e.numberOfVerticalLines};this._ellipseGeometry=new n(l),this._workerName="createCircleOutlineGeometry"}m.packedLength=n.packedLength;m.pack=function(e,r,l){return d.typeOf.object("value",e),n.pack(e._ellipseGeometry,r,l)};var p=new n({center:new o,semiMajorAxis:1,semiMinorAxis:1}),i={center:new o,radius:void 0,ellipsoid:s.clone(s.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,numberOfVerticalLines:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0};m.unpack=function(e,r,l){let t=n.unpack(e,r,p);return i.center=o.clone(t._center,i.center),i.ellipsoid=s.clone(t._ellipsoid,i.ellipsoid),i.height=t._height,i.extrudedHeight=t._extrudedHeight,i.granularity=t._granularity,i.numberOfVerticalLines=t._numberOfVerticalLines,a(l)?(i.semiMajorAxis=t._semiMajorAxis,i.semiMinorAxis=t._semiMinorAxis,l._ellipseGeometry=new n(i),l):(i.radius=t._semiMajorAxis,new m(i))};m.createGeometry=function(e){return n.createGeometry(e._ellipseGeometry)};var c=m;function f(e,r){return a(r)&&(e=c.unpack(e,r)),e._ellipseGeometry._center=o.clone(e._ellipseGeometry._center),e._ellipseGeometry._ellipsoid=s.clone(e._ellipseGeometry._ellipsoid),c.createGeometry(e)}var E=f;export{E as default}; |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.116 | ||
* Version 1.116.1 | ||
* | ||
@@ -26,2 +26,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
import{a as et}from"./chunk-AEWBPSCB.js";import{a as U}from"./chunk-PB7S64VP.js";import"./chunk-XORBV237.js";import{a as y}from"./chunk-4NDMMWOM.js";import"./chunk-7VY24AS3.js";import{a as I}from"./chunk-ZZAO5JE6.js";import{a as $}from"./chunk-EJXUGS5C.js";import"./chunk-BMTOWA7K.js";import"./chunk-W2YTVRCC.js";import{a as u}from"./chunk-TK2AA6M2.js";import"./chunk-YPW76GEP.js";import"./chunk-GKRM7KEL.js";import{b as ot}from"./chunk-4NVG6N2Q.js";import{a as tt}from"./chunk-5CBMSEPD.js";import"./chunk-2DF4CAYN.js";import"./chunk-LGFQRF3V.js";import"./chunk-AHZBRYZA.js";import{a as J}from"./chunk-TWAPNO4J.js";import{a as X}from"./chunk-FSXLPWHR.js";import{b as K,c as Y,d as z}from"./chunk-37KLWU3W.js";import{d as Z,e as Q}from"./chunk-HTNJJ6YO.js";import"./chunk-63E276CT.js";import"./chunk-NRW2R4YV.js";import"./chunk-NSILPUHD.js";import{a as N}from"./chunk-M7WODBAD.js";import{a as i,c as x,d as m,e as P}from"./chunk-J26GWQSN.js";import{a as q}from"./chunk-PYB3IV2X.js";import"./chunk-H7FFK4U5.js";import"./chunk-YEUII2A5.js";import{a as f}from"./chunk-4353PD6R.js";import{b as B}from"./chunk-2S4UUFD6.js";import{e as g}from"./chunk-42VHSORI.js";var st=new i,at=new et,pt=new x,lt=new x,mt=new i,ft=new i,ut=new i,V=new i,yt=new i,ht=new i,nt=new Q,dt=new P,gt=new P,Pt=new i;function wt(e,t,o,a,h,A,r,n,p){let b=e.positions,c=ot.triangulate(e.positions2D,e.holes);c.length<3&&(c=[0,1,2]);let w=J.createTypedArray(b.length,c.length);w.set(c);let S=dt;if(a!==0){let d=Q.fromAxisAngle(r,a,nt);if(S=P.fromQuaternion(d,S),t.tangent||t.bitangent){d=Q.fromAxisAngle(r,-a,nt);let G=P.fromQuaternion(d,gt);n=i.normalize(P.multiplyByVector(G,n,n),n),t.bitangent&&(p=i.normalize(i.cross(r,n,p),p))}}else S=P.clone(P.IDENTITY,S);let j=lt;t.st&&(j.x=o.x,j.y=o.y);let k=b.length,C=k*3,L=new Float64Array(C),T=t.normal?new Float32Array(C):void 0,D=t.tangent?new Float32Array(C):void 0,R=t.bitangent?new Float32Array(C):void 0,H=t.st?new Float32Array(k*2):void 0,M=0,F=0,l=0,O=0,s=0;for(let d=0;d<k;d++){let G=b[d];if(L[M++]=G.x,L[M++]=G.y,L[M++]=G.z,t.st)if(g(h)&&h.positions.length===k)H[s++]=h.positions[d].x,H[s++]=h.positions[d].y;else{let it=P.multiplyByVector(S,G,st),v=A(it,pt);x.subtract(v,j,v);let rt=q.clamp(v.x/o.width,0,1),ct=q.clamp(v.y/o.height,0,1);H[s++]=rt,H[s++]=ct}t.normal&&(T[F++]=r.x,T[F++]=r.y,T[F++]=r.z),t.tangent&&(D[O++]=n.x,D[O++]=n.y,D[O++]=n.z),t.bitangent&&(R[l++]=p.x,R[l++]=p.y,R[l++]=p.z)}let _=new X;return t.position&&(_.position=new z({componentDatatype:N.DOUBLE,componentsPerAttribute:3,values:L})),t.normal&&(_.normal=new z({componentDatatype:N.FLOAT,componentsPerAttribute:3,values:T})),t.tangent&&(_.tangent=new z({componentDatatype:N.FLOAT,componentsPerAttribute:3,values:D})),t.bitangent&&(_.bitangent=new z({componentDatatype:N.FLOAT,componentsPerAttribute:3,values:R})),t.st&&(_.st=new z({componentDatatype:N.FLOAT,componentsPerAttribute:2,values:H})),new Y({attributes:_,indices:w,primitiveType:K.TRIANGLES})}function E(e){e=f(e,f.EMPTY_OBJECT);let t=e.polygonHierarchy,o=e.textureCoordinates;B.defined("options.polygonHierarchy",t);let a=f(e.vertexFormat,u.DEFAULT);this._vertexFormat=u.clone(a),this._polygonHierarchy=t,this._stRotation=f(e.stRotation,0),this._ellipsoid=m.clone(f(e.ellipsoid,m.WGS84)),this._workerName="createCoplanarPolygonGeometry",this._textureCoordinates=o,this.packedLength=y.computeHierarchyPackedLength(t,i)+u.packedLength+m.packedLength+(g(o)?y.computeHierarchyPackedLength(o,x):1)+2}E.fromPositions=function(e){e=f(e,f.EMPTY_OBJECT),B.defined("options.positions",e.positions);let t={polygonHierarchy:{positions:e.positions},vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid,textureCoordinates:e.textureCoordinates};return new E(t)};E.pack=function(e,t,o){return B.typeOf.object("value",e),B.defined("array",t),o=f(o,0),o=y.packPolygonHierarchy(e._polygonHierarchy,t,o,i),m.pack(e._ellipsoid,t,o),o+=m.packedLength,u.pack(e._vertexFormat,t,o),o+=u.packedLength,t[o++]=e._stRotation,g(e._textureCoordinates)?o=y.packPolygonHierarchy(e._textureCoordinates,t,o,x):t[o++]=-1,t[o++]=e.packedLength,t};var _t=m.clone(m.UNIT_SPHERE),At=new u,bt={polygonHierarchy:{}};E.unpack=function(e,t,o){B.defined("array",e),t=f(t,0);let a=y.unpackPolygonHierarchy(e,t,i);t=a.startingIndex,delete a.startingIndex;let h=m.unpack(e,t,_t);t+=m.packedLength;let A=u.unpack(e,t,At);t+=u.packedLength;let r=e[t++],n=e[t]===-1?void 0:y.unpackPolygonHierarchy(e,t,x);g(n)?(t=n.startingIndex,delete n.startingIndex):t++;let p=e[t++];return g(o)||(o=new E(bt)),o._polygonHierarchy=a,o._ellipsoid=m.clone(h,o._ellipsoid),o._vertexFormat=u.clone(A,o._vertexFormat),o._stRotation=r,o._textureCoordinates=n,o.packedLength=p,o};E.createGeometry=function(e){let t=e._vertexFormat,o=e._polygonHierarchy,a=e._stRotation,h=e._textureCoordinates,A=g(h),r=o.positions;if(r=tt(r,i.equalsEpsilon,!0),r.length<3)return;let n=mt,p=ft,b=ut,c=yt,w=ht;if(!U.computeProjectTo2DArguments(r,V,c,w))return;if(n=i.cross(c,w,n),n=i.normalize(n,n),!i.equalsEpsilon(V,i.ZERO,q.EPSILON6)){let s=e._ellipsoid.geodeticSurfaceNormal(V,Pt);i.dot(n,s)<0&&(n=i.negate(n,n),c=i.negate(c,c))}let j=U.createProjectPointsTo2DFunction(V,c,w),k=U.createProjectPointTo2DFunction(V,c,w);t.tangent&&(p=i.clone(c,p)),t.bitangent&&(b=i.clone(w,b));let C=y.polygonsFromHierarchy(o,A,j,!1),L=C.hierarchy,T=C.polygons,D=function(s){return s},R=A?y.polygonsFromHierarchy(h,!0,D,!1).polygons:void 0;if(L.length===0)return;r=L[0].outerRing;let H=Z.fromPoints(r),M=y.computeBoundingRectangle(n,k,r,a,at),F=[];for(let s=0;s<T.length;s++){let _=new I({geometry:wt(T[s],t,M,a,A?R[s]:void 0,k,n,p,b)});F.push(_)}let l=$.combineInstances(F)[0];l.attributes.position.values=new Float64Array(l.attributes.position.values),l.indices=J.createTypedArray(l.attributes.position.values.length/3,l.indices);let O=l.attributes;return t.position||delete O.position,new Y({attributes:O,indices:l.indices,primitiveType:l.primitiveType,boundingSphere:H})};var W=E;function kt(e,t){return g(t)&&(e=W.unpack(e,t)),W.createGeometry(e)}var Xt=kt;export{Xt as default}; | ||
import{a as et}from"./chunk-MXURYLN3.js";import{a as U}from"./chunk-PIKYR5KK.js";import"./chunk-3HMIEL3B.js";import{a as y}from"./chunk-HIZ44UXA.js";import"./chunk-VAZSO7QM.js";import{a as I}from"./chunk-CFX77L57.js";import{a as $}from"./chunk-CKVHMDPC.js";import"./chunk-JAMWPWOV.js";import"./chunk-IQ7DLQQP.js";import{a as u}from"./chunk-64WQCGAE.js";import"./chunk-7E5ZATSO.js";import"./chunk-XOMW5SDY.js";import{b as ot}from"./chunk-ZK4DC2CW.js";import{a as tt}from"./chunk-OBENGMDT.js";import"./chunk-LH3GDPJ4.js";import"./chunk-QC62DG5W.js";import"./chunk-R6IH5WM5.js";import{a as J}from"./chunk-ROROM35N.js";import{a as X}from"./chunk-F5TB5EI7.js";import{b as K,c as Y,d as z}from"./chunk-VAPKZ5PR.js";import{d as Z,e as Q}from"./chunk-DXGEUDM7.js";import"./chunk-5IUHFVP3.js";import"./chunk-OE3P25NW.js";import"./chunk-HIT4T4MS.js";import{a as N}from"./chunk-3KRBUMEX.js";import{a as i,c as x,d as m,e as P}from"./chunk-PQ6NV4GA.js";import{a as q}from"./chunk-74I3QBVP.js";import"./chunk-BLVYEJBC.js";import"./chunk-A6PYE4JS.js";import{a as f}from"./chunk-T23IKWCM.js";import{b as B}from"./chunk-HJ33TVGP.js";import{e as g}from"./chunk-WL4PTXMO.js";var st=new i,at=new et,pt=new x,lt=new x,mt=new i,ft=new i,ut=new i,V=new i,yt=new i,ht=new i,nt=new Q,dt=new P,gt=new P,Pt=new i;function wt(e,t,o,a,h,A,r,n,p){let b=e.positions,c=ot.triangulate(e.positions2D,e.holes);c.length<3&&(c=[0,1,2]);let w=J.createTypedArray(b.length,c.length);w.set(c);let S=dt;if(a!==0){let d=Q.fromAxisAngle(r,a,nt);if(S=P.fromQuaternion(d,S),t.tangent||t.bitangent){d=Q.fromAxisAngle(r,-a,nt);let G=P.fromQuaternion(d,gt);n=i.normalize(P.multiplyByVector(G,n,n),n),t.bitangent&&(p=i.normalize(i.cross(r,n,p),p))}}else S=P.clone(P.IDENTITY,S);let j=lt;t.st&&(j.x=o.x,j.y=o.y);let k=b.length,C=k*3,L=new Float64Array(C),T=t.normal?new Float32Array(C):void 0,D=t.tangent?new Float32Array(C):void 0,R=t.bitangent?new Float32Array(C):void 0,H=t.st?new Float32Array(k*2):void 0,M=0,F=0,l=0,O=0,s=0;for(let d=0;d<k;d++){let G=b[d];if(L[M++]=G.x,L[M++]=G.y,L[M++]=G.z,t.st)if(g(h)&&h.positions.length===k)H[s++]=h.positions[d].x,H[s++]=h.positions[d].y;else{let it=P.multiplyByVector(S,G,st),v=A(it,pt);x.subtract(v,j,v);let rt=q.clamp(v.x/o.width,0,1),ct=q.clamp(v.y/o.height,0,1);H[s++]=rt,H[s++]=ct}t.normal&&(T[F++]=r.x,T[F++]=r.y,T[F++]=r.z),t.tangent&&(D[O++]=n.x,D[O++]=n.y,D[O++]=n.z),t.bitangent&&(R[l++]=p.x,R[l++]=p.y,R[l++]=p.z)}let _=new X;return t.position&&(_.position=new z({componentDatatype:N.DOUBLE,componentsPerAttribute:3,values:L})),t.normal&&(_.normal=new z({componentDatatype:N.FLOAT,componentsPerAttribute:3,values:T})),t.tangent&&(_.tangent=new z({componentDatatype:N.FLOAT,componentsPerAttribute:3,values:D})),t.bitangent&&(_.bitangent=new z({componentDatatype:N.FLOAT,componentsPerAttribute:3,values:R})),t.st&&(_.st=new z({componentDatatype:N.FLOAT,componentsPerAttribute:2,values:H})),new Y({attributes:_,indices:w,primitiveType:K.TRIANGLES})}function E(e){e=f(e,f.EMPTY_OBJECT);let t=e.polygonHierarchy,o=e.textureCoordinates;B.defined("options.polygonHierarchy",t);let a=f(e.vertexFormat,u.DEFAULT);this._vertexFormat=u.clone(a),this._polygonHierarchy=t,this._stRotation=f(e.stRotation,0),this._ellipsoid=m.clone(f(e.ellipsoid,m.WGS84)),this._workerName="createCoplanarPolygonGeometry",this._textureCoordinates=o,this.packedLength=y.computeHierarchyPackedLength(t,i)+u.packedLength+m.packedLength+(g(o)?y.computeHierarchyPackedLength(o,x):1)+2}E.fromPositions=function(e){e=f(e,f.EMPTY_OBJECT),B.defined("options.positions",e.positions);let t={polygonHierarchy:{positions:e.positions},vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid,textureCoordinates:e.textureCoordinates};return new E(t)};E.pack=function(e,t,o){return B.typeOf.object("value",e),B.defined("array",t),o=f(o,0),o=y.packPolygonHierarchy(e._polygonHierarchy,t,o,i),m.pack(e._ellipsoid,t,o),o+=m.packedLength,u.pack(e._vertexFormat,t,o),o+=u.packedLength,t[o++]=e._stRotation,g(e._textureCoordinates)?o=y.packPolygonHierarchy(e._textureCoordinates,t,o,x):t[o++]=-1,t[o++]=e.packedLength,t};var _t=m.clone(m.UNIT_SPHERE),At=new u,bt={polygonHierarchy:{}};E.unpack=function(e,t,o){B.defined("array",e),t=f(t,0);let a=y.unpackPolygonHierarchy(e,t,i);t=a.startingIndex,delete a.startingIndex;let h=m.unpack(e,t,_t);t+=m.packedLength;let A=u.unpack(e,t,At);t+=u.packedLength;let r=e[t++],n=e[t]===-1?void 0:y.unpackPolygonHierarchy(e,t,x);g(n)?(t=n.startingIndex,delete n.startingIndex):t++;let p=e[t++];return g(o)||(o=new E(bt)),o._polygonHierarchy=a,o._ellipsoid=m.clone(h,o._ellipsoid),o._vertexFormat=u.clone(A,o._vertexFormat),o._stRotation=r,o._textureCoordinates=n,o.packedLength=p,o};E.createGeometry=function(e){let t=e._vertexFormat,o=e._polygonHierarchy,a=e._stRotation,h=e._textureCoordinates,A=g(h),r=o.positions;if(r=tt(r,i.equalsEpsilon,!0),r.length<3)return;let n=mt,p=ft,b=ut,c=yt,w=ht;if(!U.computeProjectTo2DArguments(r,V,c,w))return;if(n=i.cross(c,w,n),n=i.normalize(n,n),!i.equalsEpsilon(V,i.ZERO,q.EPSILON6)){let s=e._ellipsoid.geodeticSurfaceNormal(V,Pt);i.dot(n,s)<0&&(n=i.negate(n,n),c=i.negate(c,c))}let j=U.createProjectPointsTo2DFunction(V,c,w),k=U.createProjectPointTo2DFunction(V,c,w);t.tangent&&(p=i.clone(c,p)),t.bitangent&&(b=i.clone(w,b));let C=y.polygonsFromHierarchy(o,A,j,!1),L=C.hierarchy,T=C.polygons,D=function(s){return s},R=A?y.polygonsFromHierarchy(h,!0,D,!1).polygons:void 0;if(L.length===0)return;r=L[0].outerRing;let H=Z.fromPoints(r),M=y.computeBoundingRectangle(n,k,r,a,at),F=[];for(let s=0;s<T.length;s++){let _=new I({geometry:wt(T[s],t,M,a,A?R[s]:void 0,k,n,p,b)});F.push(_)}let l=$.combineInstances(F)[0];l.attributes.position.values=new Float64Array(l.attributes.position.values),l.indices=J.createTypedArray(l.attributes.position.values.length/3,l.indices);let O=l.attributes;return t.position||delete O.position,new Y({attributes:O,indices:l.indices,primitiveType:l.primitiveType,boundingSphere:H})};var W=E;function kt(e,t){return g(t)&&(e=W.unpack(e,t)),W.createGeometry(e)}var Xt=kt;export{Xt as default}; |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.116 | ||
* Version 1.116.1 | ||
* | ||
@@ -26,2 +26,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
import{a as T}from"./chunk-PB7S64VP.js";import"./chunk-XORBV237.js";import{a as f}from"./chunk-4NDMMWOM.js";import"./chunk-7VY24AS3.js";import{a as G}from"./chunk-ZZAO5JE6.js";import{a as C}from"./chunk-EJXUGS5C.js";import"./chunk-BMTOWA7K.js";import"./chunk-W2YTVRCC.js";import"./chunk-YPW76GEP.js";import"./chunk-GKRM7KEL.js";import"./chunk-4NVG6N2Q.js";import{a as L}from"./chunk-5CBMSEPD.js";import"./chunk-2DF4CAYN.js";import"./chunk-LGFQRF3V.js";import"./chunk-AHZBRYZA.js";import{a as w}from"./chunk-TWAPNO4J.js";import{a as O}from"./chunk-FSXLPWHR.js";import{b,c as d,d as k}from"./chunk-37KLWU3W.js";import{d as P}from"./chunk-HTNJJ6YO.js";import"./chunk-63E276CT.js";import"./chunk-NRW2R4YV.js";import"./chunk-NSILPUHD.js";import{a as H}from"./chunk-M7WODBAD.js";import{a as l,d as g}from"./chunk-J26GWQSN.js";import"./chunk-PYB3IV2X.js";import"./chunk-H7FFK4U5.js";import"./chunk-YEUII2A5.js";import{a as c}from"./chunk-4353PD6R.js";import{b as a}from"./chunk-2S4UUFD6.js";import{e as u}from"./chunk-42VHSORI.js";function E(o){let e=o.length,t=new Float64Array(e*3),r=w.createTypedArray(e,e*2),i=0,s=0;for(let n=0;n<e;n++){let p=o[n];t[i++]=p.x,t[i++]=p.y,t[i++]=p.z,r[s++]=n,r[s++]=(n+1)%e}let y=new O({position:new k({componentDatatype:H.DOUBLE,componentsPerAttribute:3,values:t})});return new d({attributes:y,indices:r,primitiveType:b.LINES})}function m(o){o=c(o,c.EMPTY_OBJECT);let e=o.polygonHierarchy;a.defined("options.polygonHierarchy",e),this._polygonHierarchy=e,this._workerName="createCoplanarPolygonOutlineGeometry",this.packedLength=f.computeHierarchyPackedLength(e,l)+1}m.fromPositions=function(o){o=c(o,c.EMPTY_OBJECT),a.defined("options.positions",o.positions);let e={polygonHierarchy:{positions:o.positions}};return new m(e)};m.pack=function(o,e,t){return a.typeOf.object("value",o),a.defined("array",e),t=c(t,0),t=f.packPolygonHierarchy(o._polygonHierarchy,e,t,l),e[t]=o.packedLength,e};var v={polygonHierarchy:{}};m.unpack=function(o,e,t){a.defined("array",o),e=c(e,0);let r=f.unpackPolygonHierarchy(o,e,l);e=r.startingIndex,delete r.startingIndex;let i=o[e];return u(t)||(t=new m(v)),t._polygonHierarchy=r,t.packedLength=i,t};m.createGeometry=function(o){let e=o._polygonHierarchy,t=e.positions;if(t=L(t,l.equalsEpsilon,!0),t.length<3||!T.validOutline(t))return;let i=f.polygonOutlinesFromHierarchy(e,!1);if(i.length===0)return;let s=[];for(let p=0;p<i.length;p++){let _=new G({geometry:E(i[p])});s.push(_)}let y=C.combineInstances(s)[0],n=P.fromPoints(e.positions);return new d({attributes:y.attributes,indices:y.indices,primitiveType:y.primitiveType,boundingSphere:n})};var h=m;function A(o,e){return u(e)&&(o=h.unpack(o,e)),o._ellipsoid=g.clone(o._ellipsoid),h.createGeometry(o)}var Z=A;export{Z as default}; | ||
import{a as T}from"./chunk-PIKYR5KK.js";import"./chunk-3HMIEL3B.js";import{a as f}from"./chunk-HIZ44UXA.js";import"./chunk-VAZSO7QM.js";import{a as G}from"./chunk-CFX77L57.js";import{a as C}from"./chunk-CKVHMDPC.js";import"./chunk-JAMWPWOV.js";import"./chunk-IQ7DLQQP.js";import"./chunk-7E5ZATSO.js";import"./chunk-XOMW5SDY.js";import"./chunk-ZK4DC2CW.js";import{a as L}from"./chunk-OBENGMDT.js";import"./chunk-LH3GDPJ4.js";import"./chunk-QC62DG5W.js";import"./chunk-R6IH5WM5.js";import{a as w}from"./chunk-ROROM35N.js";import{a as O}from"./chunk-F5TB5EI7.js";import{b,c as d,d as k}from"./chunk-VAPKZ5PR.js";import{d as P}from"./chunk-DXGEUDM7.js";import"./chunk-5IUHFVP3.js";import"./chunk-OE3P25NW.js";import"./chunk-HIT4T4MS.js";import{a as H}from"./chunk-3KRBUMEX.js";import{a as l,d as g}from"./chunk-PQ6NV4GA.js";import"./chunk-74I3QBVP.js";import"./chunk-BLVYEJBC.js";import"./chunk-A6PYE4JS.js";import{a as c}from"./chunk-T23IKWCM.js";import{b as a}from"./chunk-HJ33TVGP.js";import{e as u}from"./chunk-WL4PTXMO.js";function E(o){let e=o.length,t=new Float64Array(e*3),r=w.createTypedArray(e,e*2),i=0,s=0;for(let n=0;n<e;n++){let p=o[n];t[i++]=p.x,t[i++]=p.y,t[i++]=p.z,r[s++]=n,r[s++]=(n+1)%e}let y=new O({position:new k({componentDatatype:H.DOUBLE,componentsPerAttribute:3,values:t})});return new d({attributes:y,indices:r,primitiveType:b.LINES})}function m(o){o=c(o,c.EMPTY_OBJECT);let e=o.polygonHierarchy;a.defined("options.polygonHierarchy",e),this._polygonHierarchy=e,this._workerName="createCoplanarPolygonOutlineGeometry",this.packedLength=f.computeHierarchyPackedLength(e,l)+1}m.fromPositions=function(o){o=c(o,c.EMPTY_OBJECT),a.defined("options.positions",o.positions);let e={polygonHierarchy:{positions:o.positions}};return new m(e)};m.pack=function(o,e,t){return a.typeOf.object("value",o),a.defined("array",e),t=c(t,0),t=f.packPolygonHierarchy(o._polygonHierarchy,e,t,l),e[t]=o.packedLength,e};var v={polygonHierarchy:{}};m.unpack=function(o,e,t){a.defined("array",o),e=c(e,0);let r=f.unpackPolygonHierarchy(o,e,l);e=r.startingIndex,delete r.startingIndex;let i=o[e];return u(t)||(t=new m(v)),t._polygonHierarchy=r,t.packedLength=i,t};m.createGeometry=function(o){let e=o._polygonHierarchy,t=e.positions;if(t=L(t,l.equalsEpsilon,!0),t.length<3||!T.validOutline(t))return;let i=f.polygonOutlinesFromHierarchy(e,!1);if(i.length===0)return;let s=[];for(let p=0;p<i.length;p++){let _=new G({geometry:E(i[p])});s.push(_)}let y=C.combineInstances(s)[0],n=P.fromPoints(e.positions);return new d({attributes:y.attributes,indices:y.indices,primitiveType:y.primitiveType,boundingSphere:n})};var h=m;function A(o,e){return u(e)&&(o=h.unpack(o,e)),o._ellipsoid=g.clone(o._ellipsoid),h.createGeometry(o)}var Z=A;export{Z as default}; |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.116 | ||
* Version 1.116.1 | ||
* | ||
@@ -26,2 +26,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
import{a as M}from"./chunk-U2CMUMOR.js";import{a as ht}from"./chunk-FCEVC3JZ.js";import"./chunk-2QAZKO32.js";import"./chunk-M5A47EM2.js";import{a as _t}from"./chunk-TXIAMGDC.js";import{a as J}from"./chunk-TK2AA6M2.js";import"./chunk-YPW76GEP.js";import"./chunk-GKRM7KEL.js";import{b as yt}from"./chunk-4NVG6N2Q.js";import{a as Pt}from"./chunk-5CBMSEPD.js";import"./chunk-2DF4CAYN.js";import"./chunk-LGFQRF3V.js";import"./chunk-AHZBRYZA.js";import{a as Nt}from"./chunk-TWAPNO4J.js";import{a as Ct}from"./chunk-FSXLPWHR.js";import{b as Mt,c as Vt,d as x}from"./chunk-37KLWU3W.js";import{d as St}from"./chunk-HTNJJ6YO.js";import"./chunk-63E276CT.js";import"./chunk-NRW2R4YV.js";import{c as Et}from"./chunk-NSILPUHD.js";import{a as F}from"./chunk-M7WODBAD.js";import{a as o,b as bt,d as I}from"./chunk-J26GWQSN.js";import{a as st}from"./chunk-PYB3IV2X.js";import"./chunk-H7FFK4U5.js";import"./chunk-YEUII2A5.js";import{a as B}from"./chunk-4353PD6R.js";import{b as it}from"./chunk-2S4UUFD6.js";import{e as X}from"./chunk-42VHSORI.js";var zt=new o,kt=new o,wt=new o,Tt=new o,jt=new o,Ht=new o,at=new o,ft=new o;function Ut(t,e){for(let i=0;i<t.length;i++)t[i]=e.scaleToGeodeticSurface(t[i],t[i]);return t}function Z(t,e,i,l,d,f){let h=t.normals,O=t.tangents,g=t.bitangents,r=o.normalize(o.cross(i,e,at),at);f.normal&&M.addAttribute(h,e,l,d),f.tangent&&M.addAttribute(O,r,l,d),f.bitangent&&M.addAttribute(g,i,l,d)}function Bt(t,e,i){let l=t.positions,d=t.corners,f=t.endPositions,h=t.lefts,O=t.normals,g=new Ct,r,a=0,s=0,n,A=0,u;for(n=0;n<l.length;n+=2)u=l[n].length-3,a+=u,A+=u*2,s+=l[n+1].length-3;for(a+=3,s+=3,n=0;n<d.length;n++){r=d[n];let c=d[n].leftPositions;X(c)?(u=c.length,a+=u,A+=u):(u=d[n].rightPositions.length,s+=u,A+=u)}let b=X(f),p;b&&(p=f[0].length-3,a+=p,s+=p,p/=3,A+=p*6);let R=a+s,m=new Float64Array(R),C=e.normal?new Float32Array(R):void 0,D=e.tangent?new Float32Array(R):void 0,lt=e.bitangent?new Float32Array(R):void 0,z={normals:C,tangents:D,bitangents:lt},y=0,E=R-1,S,V,H,G,P=zt,w=kt,nt,ot,mt=p/2,_=Nt.createTypedArray(R/3,A),T=0;if(b){ot=wt,nt=Tt;let c=f[0];for(P=o.fromArray(O,0,P),w=o.fromArray(h,0,w),n=0;n<mt;n++)ot=o.fromArray(c,(mt-1-n)*3,ot),nt=o.fromArray(c,(mt+n)*3,nt),M.addAttribute(m,nt,y),M.addAttribute(m,ot,void 0,E),Z(z,P,w,y,E,e),V=y/3,G=V+1,S=(E-2)/3,H=S-1,_[T++]=S,_[T++]=V,_[T++]=H,_[T++]=H,_[T++]=V,_[T++]=G,y+=3,E-=3}let At=0,ut=0,rt=l[At++],q=l[At++];m.set(rt,y),m.set(q,E-q.length+1),w=o.fromArray(h,ut,w);let ct,dt;for(u=q.length-3,n=0;n<u;n+=3)ct=i.geodeticSurfaceNormal(o.fromArray(rt,n,at),at),dt=i.geodeticSurfaceNormal(o.fromArray(q,u-n,ft),ft),P=o.normalize(o.add(ct,dt,P),P),Z(z,P,w,y,E,e),V=y/3,G=V+1,S=(E-2)/3,H=S-1,_[T++]=S,_[T++]=V,_[T++]=H,_[T++]=H,_[T++]=V,_[T++]=G,y+=3,E-=3;for(ct=i.geodeticSurfaceNormal(o.fromArray(rt,u,at),at),dt=i.geodeticSurfaceNormal(o.fromArray(q,u,ft),ft),P=o.normalize(o.add(ct,dt,P),P),ut+=3,n=0;n<d.length;n++){let c;r=d[n];let $=r.leftPositions,v=r.rightPositions,L,U,N=Ht,k=wt,Y=Tt;if(P=o.fromArray(O,ut,P),X($)){for(Z(z,P,w,void 0,E,e),E-=3,L=G,U=H,c=0;c<$.length/3;c++)N=o.fromArray($,c*3,N),_[T++]=L,_[T++]=U-c-1,_[T++]=U-c,M.addAttribute(m,N,void 0,E),k=o.fromArray(m,(U-c-1)*3,k),Y=o.fromArray(m,L*3,Y),w=o.normalize(o.subtract(k,Y,w),w),Z(z,P,w,void 0,E,e),E-=3;N=o.fromArray(m,L*3,N),k=o.subtract(o.fromArray(m,U*3,k),N,k),Y=o.subtract(o.fromArray(m,(U-c)*3,Y),N,Y),w=o.normalize(o.add(k,Y,w),w),Z(z,P,w,y,void 0,e),y+=3}else{for(Z(z,P,w,y,void 0,e),y+=3,L=H,U=G,c=0;c<v.length/3;c++)N=o.fromArray(v,c*3,N),_[T++]=L,_[T++]=U+c,_[T++]=U+c+1,M.addAttribute(m,N,y),k=o.fromArray(m,L*3,k),Y=o.fromArray(m,(U+c)*3,Y),w=o.normalize(o.subtract(k,Y,w),w),Z(z,P,w,y,void 0,e),y+=3;N=o.fromArray(m,L*3,N),k=o.subtract(o.fromArray(m,(U+c)*3,k),N,k),Y=o.subtract(o.fromArray(m,U*3,Y),N,Y),w=o.normalize(o.negate(o.add(Y,k,w),w),w),Z(z,P,w,void 0,E,e),E-=3}for(rt=l[At++],q=l[At++],rt.splice(0,3),q.splice(q.length-3,3),m.set(rt,y),m.set(q,E-q.length+1),u=q.length-3,ut+=3,w=o.fromArray(h,ut,w),c=0;c<q.length;c+=3)ct=i.geodeticSurfaceNormal(o.fromArray(rt,c,at),at),dt=i.geodeticSurfaceNormal(o.fromArray(q,u-c,ft),ft),P=o.normalize(o.add(ct,dt,P),P),Z(z,P,w,y,E,e),G=y/3,V=G-1,H=(E-2)/3,S=H+1,_[T++]=S,_[T++]=V,_[T++]=H,_[T++]=H,_[T++]=V,_[T++]=G,y+=3,E-=3;y-=3,E+=3}if(P=o.fromArray(O,O.length-3,P),Z(z,P,w,y,E,e),b){y+=3,E-=3,ot=wt,nt=Tt;let c=f[1];for(n=0;n<mt;n++)ot=o.fromArray(c,(p-n-1)*3,ot),nt=o.fromArray(c,n*3,nt),M.addAttribute(m,ot,void 0,E),M.addAttribute(m,nt,y),Z(z,P,w,y,E,e),G=y/3,V=G-1,H=(E-2)/3,S=H+1,_[T++]=S,_[T++]=V,_[T++]=H,_[T++]=H,_[T++]=V,_[T++]=G,y+=3,E-=3}if(g.position=new x({componentDatatype:F.DOUBLE,componentsPerAttribute:3,values:m}),e.st){let c=new Float32Array(R/3*2),$,v,L=0;if(b){a/=3,s/=3;let U=Math.PI/(p+1);v=1/(a-p+1),$=1/(s-p+1);let N,k=p/2;for(n=k+1;n<p+1;n++)N=st.PI_OVER_TWO+U*n,c[L++]=$*(1+Math.cos(N)),c[L++]=.5*(1+Math.sin(N));for(n=1;n<s-p+1;n++)c[L++]=n*$,c[L++]=0;for(n=p;n>k;n--)N=st.PI_OVER_TWO-n*U,c[L++]=1-$*(1+Math.cos(N)),c[L++]=.5*(1+Math.sin(N));for(n=k;n>0;n--)N=st.PI_OVER_TWO-U*n,c[L++]=1-v*(1+Math.cos(N)),c[L++]=.5*(1+Math.sin(N));for(n=a-p;n>0;n--)c[L++]=n*v,c[L++]=1;for(n=1;n<k+1;n++)N=st.PI_OVER_TWO+U*n,c[L++]=v*(1+Math.cos(N)),c[L++]=.5*(1+Math.sin(N))}else{for(a/=3,s/=3,v=1/(a-1),$=1/(s-1),n=0;n<s;n++)c[L++]=n*$,c[L++]=0;for(n=a;n>0;n--)c[L++]=(n-1)*v,c[L++]=1}g.st=new x({componentDatatype:F.FLOAT,componentsPerAttribute:2,values:c})}return e.normal&&(g.normal=new x({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:z.normals})),e.tangent&&(g.tangent=new x({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:z.tangents})),e.bitangent&&(g.bitangent=new x({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:z.bitangents})),{attributes:g,indices:_}}function qt(t,e){if(!e.normal&&!e.tangent&&!e.bitangent&&!e.st)return t;let i=t.position.values,l,d;(e.normal||e.bitangent)&&(l=t.normal.values,d=t.bitangent.values);let f=t.position.values.length/18,h=f*3,O=f*2,g=h*2,r;if(e.normal||e.bitangent||e.tangent){let a=e.normal?new Float32Array(h*6):void 0,s=e.tangent?new Float32Array(h*6):void 0,n=e.bitangent?new Float32Array(h*6):void 0,A=zt,u=kt,b=wt,p=Tt,R=jt,m=Ht,C=g;for(r=0;r<h;r+=3){let D=C+g;A=o.fromArray(i,r,A),u=o.fromArray(i,r+h,u),b=o.fromArray(i,(r+3)%h,b),u=o.subtract(u,A,u),b=o.subtract(b,A,b),p=o.normalize(o.cross(u,b,p),p),e.normal&&(M.addAttribute(a,p,D),M.addAttribute(a,p,D+3),M.addAttribute(a,p,C),M.addAttribute(a,p,C+3)),(e.tangent||e.bitangent)&&(m=o.fromArray(l,r,m),e.bitangent&&(M.addAttribute(n,m,D),M.addAttribute(n,m,D+3),M.addAttribute(n,m,C),M.addAttribute(n,m,C+3)),e.tangent&&(R=o.normalize(o.cross(m,p,R),R),M.addAttribute(s,R,D),M.addAttribute(s,R,D+3),M.addAttribute(s,R,C),M.addAttribute(s,R,C+3))),C+=6}if(e.normal){for(a.set(l),r=0;r<h;r+=3)a[r+h]=-l[r],a[r+h+1]=-l[r+1],a[r+h+2]=-l[r+2];t.normal.values=a}else t.normal=void 0;if(e.bitangent?(n.set(d),n.set(d,h),t.bitangent.values=n):t.bitangent=void 0,e.tangent){let D=t.tangent.values;s.set(D),s.set(D,h),t.tangent.values=s}}if(e.st){let a=t.st.values,s=new Float32Array(O*6);s.set(a),s.set(a,O);let n=O*2;for(let A=0;A<2;A++){for(s[n++]=a[0],s[n++]=a[1],r=2;r<O;r+=2){let u=a[r],b=a[r+1];s[n++]=u,s[n++]=b,s[n++]=u,s[n++]=b}s[n++]=a[0],s[n++]=a[1]}t.st.values=s}return t}function Ot(t,e,i){i[e++]=t[0],i[e++]=t[1],i[e++]=t[2];for(let l=3;l<t.length;l+=3){let d=t[l],f=t[l+1],h=t[l+2];i[e++]=d,i[e++]=f,i[e++]=h,i[e++]=d,i[e++]=f,i[e++]=h}return i[e++]=t[0],i[e++]=t[1],i[e++]=t[2],i}function Gt(t,e){let i=new J({position:e.position,normal:e.normal||e.bitangent||t.shadowVolume,tangent:e.tangent,bitangent:e.normal||e.bitangent,st:e.st}),l=t.ellipsoid,d=M.computePositions(t),f=Bt(d,i,l),h=t.height,O=t.extrudedHeight,g=f.attributes,r=f.indices,a=g.position.values,s=a.length,n=new Float64Array(s*6),A=new Float64Array(s);A.set(a);let u=new Float64Array(s*4);a=yt.scaleToGeodeticHeight(a,h,l),u=Ot(a,0,u),A=yt.scaleToGeodeticHeight(A,O,l),u=Ot(A,s*2,u),n.set(a),n.set(A,s),n.set(u,s*2),g.position.values=n,g=qt(g,e);let b,p=s/3;if(t.shadowVolume){let S=g.normal.values;s=S.length;let V=new Float32Array(s*6);for(b=0;b<s;b++)S[b]=-S[b];V.set(S,s),V=Ot(S,s*4,V),g.extrudeDirection=new x({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:V}),e.normal||(g.normal=void 0)}if(X(t.offsetAttribute)){let S=new Uint8Array(p*6);if(t.offsetAttribute===_t.TOP)S=S.fill(1,0,p).fill(1,p*2,p*4);else{let V=t.offsetAttribute===_t.NONE?0:1;S=S.fill(V)}g.applyOffset=new x({componentDatatype:F.UNSIGNED_BYTE,componentsPerAttribute:1,values:S})}let R=r.length,m=p+p,C=Nt.createTypedArray(n.length/3,R*2+m*3);C.set(r);let D=R;for(b=0;b<R;b+=3){let S=r[b],V=r[b+1],H=r[b+2];C[D++]=H+p,C[D++]=V+p,C[D++]=S+p}let lt,z,y,E;for(b=0;b<m;b+=2)lt=b+m,z=lt+m,y=lt+1,E=z+1,C[D++]=lt,C[D++]=z,C[D++]=y,C[D++]=y,C[D++]=z,C[D++]=E;return{attributes:g,indices:C}}var Dt=new o,gt=new o,Q=new bt;function Rt(t,e,i,l,d,f){let h=o.subtract(e,t,Dt);o.normalize(h,h);let O=i.geodeticSurfaceNormal(t,gt),g=o.cross(h,O,Dt);o.multiplyByScalar(g,l,g);let r=d.latitude,a=d.longitude,s=f.latitude,n=f.longitude;o.add(t,g,gt),i.cartesianToCartographic(gt,Q);let A=Q.latitude,u=Q.longitude;r=Math.min(r,A),a=Math.min(a,u),s=Math.max(s,A),n=Math.max(n,u),o.subtract(t,g,gt),i.cartesianToCartographic(gt,Q),A=Q.latitude,u=Q.longitude,r=Math.min(r,A),a=Math.min(a,u),s=Math.max(s,A),n=Math.max(n,u),d.latitude=r,d.longitude=a,f.latitude=s,f.longitude=n}var K=new o,pt=new o,W=new bt,j=new bt;function Yt(t,e,i,l,d){t=Ut(t,e);let f=Pt(t,o.equalsEpsilon),h=f.length;if(h<2||i<=0)return new Et;let O=i*.5;W.latitude=Number.POSITIVE_INFINITY,W.longitude=Number.POSITIVE_INFINITY,j.latitude=Number.NEGATIVE_INFINITY,j.longitude=Number.NEGATIVE_INFINITY;let g,r;if(l===ht.ROUNDED){let n=f[0];o.subtract(n,f[1],K),o.normalize(K,K),o.multiplyByScalar(K,O,K),o.add(n,K,pt),e.cartesianToCartographic(pt,Q),g=Q.latitude,r=Q.longitude,W.latitude=Math.min(W.latitude,g),W.longitude=Math.min(W.longitude,r),j.latitude=Math.max(j.latitude,g),j.longitude=Math.max(j.longitude,r)}for(let n=0;n<h-1;++n)Rt(f[n],f[n+1],e,O,W,j);let a=f[h-1];o.subtract(a,f[h-2],K),o.normalize(K,K),o.multiplyByScalar(K,O,K),o.add(a,K,pt),Rt(a,pt,e,O,W,j),l===ht.ROUNDED&&(e.cartesianToCartographic(pt,Q),g=Q.latitude,r=Q.longitude,W.latitude=Math.min(W.latitude,g),W.longitude=Math.min(W.longitude,r),j.latitude=Math.max(j.latitude,g),j.longitude=Math.max(j.longitude,r));let s=X(d)?d:new Et;return s.north=j.latitude,s.south=W.latitude,s.east=j.longitude,s.west=W.longitude,s}function et(t){t=B(t,B.EMPTY_OBJECT);let e=t.positions,i=t.width;it.defined("options.positions",e),it.defined("options.width",i);let l=B(t.height,0),d=B(t.extrudedHeight,l);this._positions=e,this._ellipsoid=I.clone(B(t.ellipsoid,I.WGS84)),this._vertexFormat=J.clone(B(t.vertexFormat,J.DEFAULT)),this._width=i,this._height=Math.max(l,d),this._extrudedHeight=Math.min(l,d),this._cornerType=B(t.cornerType,ht.ROUNDED),this._granularity=B(t.granularity,st.RADIANS_PER_DEGREE),this._shadowVolume=B(t.shadowVolume,!1),this._workerName="createCorridorGeometry",this._offsetAttribute=t.offsetAttribute,this._rectangle=void 0,this.packedLength=1+e.length*o.packedLength+I.packedLength+J.packedLength+7}et.pack=function(t,e,i){it.defined("value",t),it.defined("array",e),i=B(i,0);let l=t._positions,d=l.length;e[i++]=d;for(let f=0;f<d;++f,i+=o.packedLength)o.pack(l[f],e,i);return I.pack(t._ellipsoid,e,i),i+=I.packedLength,J.pack(t._vertexFormat,e,i),i+=J.packedLength,e[i++]=t._width,e[i++]=t._height,e[i++]=t._extrudedHeight,e[i++]=t._cornerType,e[i++]=t._granularity,e[i++]=t._shadowVolume?1:0,e[i]=B(t._offsetAttribute,-1),e};var It=I.clone(I.UNIT_SPHERE),Wt=new J,tt={positions:void 0,ellipsoid:It,vertexFormat:Wt,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,shadowVolume:void 0,offsetAttribute:void 0};et.unpack=function(t,e,i){it.defined("array",t),e=B(e,0);let l=t[e++],d=new Array(l);for(let u=0;u<l;++u,e+=o.packedLength)d[u]=o.unpack(t,e);let f=I.unpack(t,e,It);e+=I.packedLength;let h=J.unpack(t,e,Wt);e+=J.packedLength;let O=t[e++],g=t[e++],r=t[e++],a=t[e++],s=t[e++],n=t[e++]===1,A=t[e];return X(i)?(i._positions=d,i._ellipsoid=I.clone(f,i._ellipsoid),i._vertexFormat=J.clone(h,i._vertexFormat),i._width=O,i._height=g,i._extrudedHeight=r,i._cornerType=a,i._granularity=s,i._shadowVolume=n,i._offsetAttribute=A===-1?void 0:A,i):(tt.positions=d,tt.width=O,tt.height=g,tt.extrudedHeight=r,tt.cornerType=a,tt.granularity=s,tt.shadowVolume=n,tt.offsetAttribute=A===-1?void 0:A,new et(tt))};et.computeRectangle=function(t,e){t=B(t,B.EMPTY_OBJECT);let i=t.positions,l=t.width;it.defined("options.positions",i),it.defined("options.width",l);let d=B(t.ellipsoid,I.WGS84),f=B(t.cornerType,ht.ROUNDED);return Yt(i,d,l,f,e)};et.createGeometry=function(t){let e=t._positions,i=t._width,l=t._ellipsoid;e=Ut(e,l);let d=Pt(e,o.equalsEpsilon);if(d.length<2||i<=0)return;let f=t._height,h=t._extrudedHeight,O=!st.equalsEpsilon(f,h,0,st.EPSILON2),g=t._vertexFormat,r={ellipsoid:l,positions:d,width:i,cornerType:t._cornerType,granularity:t._granularity,saveAttributes:!0},a;if(O)r.height=f,r.extrudedHeight=h,r.shadowVolume=t._shadowVolume,r.offsetAttribute=t._offsetAttribute,a=Gt(r,g);else{let A=M.computePositions(r);if(a=Bt(A,g,l),a.attributes.position.values=yt.scaleToGeodeticHeight(a.attributes.position.values,f,l),X(t._offsetAttribute)){let u=t._offsetAttribute===_t.NONE?0:1,b=a.attributes.position.values.length,p=new Uint8Array(b/3).fill(u);a.attributes.applyOffset=new x({componentDatatype:F.UNSIGNED_BYTE,componentsPerAttribute:1,values:p})}}let s=a.attributes,n=St.fromVertices(s.position.values,void 0,3);return g.position||(a.attributes.position.values=void 0),new Vt({attributes:s,indices:a.indices,primitiveType:Mt.TRIANGLES,boundingSphere:n,offsetAttribute:t._offsetAttribute})};et.createShadowVolume=function(t,e,i){let l=t._granularity,d=t._ellipsoid,f=e(l,d),h=i(l,d);return new et({positions:t._positions,width:t._width,cornerType:t._cornerType,ellipsoid:d,granularity:l,extrudedHeight:f,height:h,vertexFormat:J.POSITION_ONLY,shadowVolume:!0})};Object.defineProperties(et.prototype,{rectangle:{get:function(){return X(this._rectangle)||(this._rectangle=Yt(this._positions,this._ellipsoid,this._width,this._cornerType)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return[0,0,0,1,1,0]}}});var Lt=et;function Jt(t,e){return X(e)&&(t=Lt.unpack(t,e)),t._ellipsoid=I.clone(t._ellipsoid),Lt.createGeometry(t)}var Ae=Jt;export{Ae as default}; | ||
import{a as M}from"./chunk-JQJMH7TX.js";import{a as ht}from"./chunk-PIHOEFW3.js";import"./chunk-IZNUAC5V.js";import"./chunk-3CPQXNZI.js";import{a as _t}from"./chunk-XJCFZEZW.js";import{a as J}from"./chunk-64WQCGAE.js";import"./chunk-7E5ZATSO.js";import"./chunk-XOMW5SDY.js";import{b as yt}from"./chunk-ZK4DC2CW.js";import{a as Pt}from"./chunk-OBENGMDT.js";import"./chunk-LH3GDPJ4.js";import"./chunk-QC62DG5W.js";import"./chunk-R6IH5WM5.js";import{a as Nt}from"./chunk-ROROM35N.js";import{a as Ct}from"./chunk-F5TB5EI7.js";import{b as Mt,c as Vt,d as x}from"./chunk-VAPKZ5PR.js";import{d as St}from"./chunk-DXGEUDM7.js";import"./chunk-5IUHFVP3.js";import"./chunk-OE3P25NW.js";import{c as Et}from"./chunk-HIT4T4MS.js";import{a as F}from"./chunk-3KRBUMEX.js";import{a as o,b as bt,d as I}from"./chunk-PQ6NV4GA.js";import{a as st}from"./chunk-74I3QBVP.js";import"./chunk-BLVYEJBC.js";import"./chunk-A6PYE4JS.js";import{a as B}from"./chunk-T23IKWCM.js";import{b as it}from"./chunk-HJ33TVGP.js";import{e as X}from"./chunk-WL4PTXMO.js";var zt=new o,kt=new o,wt=new o,Tt=new o,jt=new o,Ht=new o,at=new o,ft=new o;function Ut(t,e){for(let i=0;i<t.length;i++)t[i]=e.scaleToGeodeticSurface(t[i],t[i]);return t}function Z(t,e,i,l,d,f){let h=t.normals,O=t.tangents,g=t.bitangents,r=o.normalize(o.cross(i,e,at),at);f.normal&&M.addAttribute(h,e,l,d),f.tangent&&M.addAttribute(O,r,l,d),f.bitangent&&M.addAttribute(g,i,l,d)}function Bt(t,e,i){let l=t.positions,d=t.corners,f=t.endPositions,h=t.lefts,O=t.normals,g=new Ct,r,a=0,s=0,n,A=0,u;for(n=0;n<l.length;n+=2)u=l[n].length-3,a+=u,A+=u*2,s+=l[n+1].length-3;for(a+=3,s+=3,n=0;n<d.length;n++){r=d[n];let c=d[n].leftPositions;X(c)?(u=c.length,a+=u,A+=u):(u=d[n].rightPositions.length,s+=u,A+=u)}let b=X(f),p;b&&(p=f[0].length-3,a+=p,s+=p,p/=3,A+=p*6);let R=a+s,m=new Float64Array(R),C=e.normal?new Float32Array(R):void 0,D=e.tangent?new Float32Array(R):void 0,lt=e.bitangent?new Float32Array(R):void 0,z={normals:C,tangents:D,bitangents:lt},y=0,E=R-1,S,V,H,G,P=zt,w=kt,nt,ot,mt=p/2,_=Nt.createTypedArray(R/3,A),T=0;if(b){ot=wt,nt=Tt;let c=f[0];for(P=o.fromArray(O,0,P),w=o.fromArray(h,0,w),n=0;n<mt;n++)ot=o.fromArray(c,(mt-1-n)*3,ot),nt=o.fromArray(c,(mt+n)*3,nt),M.addAttribute(m,nt,y),M.addAttribute(m,ot,void 0,E),Z(z,P,w,y,E,e),V=y/3,G=V+1,S=(E-2)/3,H=S-1,_[T++]=S,_[T++]=V,_[T++]=H,_[T++]=H,_[T++]=V,_[T++]=G,y+=3,E-=3}let At=0,ut=0,rt=l[At++],q=l[At++];m.set(rt,y),m.set(q,E-q.length+1),w=o.fromArray(h,ut,w);let ct,dt;for(u=q.length-3,n=0;n<u;n+=3)ct=i.geodeticSurfaceNormal(o.fromArray(rt,n,at),at),dt=i.geodeticSurfaceNormal(o.fromArray(q,u-n,ft),ft),P=o.normalize(o.add(ct,dt,P),P),Z(z,P,w,y,E,e),V=y/3,G=V+1,S=(E-2)/3,H=S-1,_[T++]=S,_[T++]=V,_[T++]=H,_[T++]=H,_[T++]=V,_[T++]=G,y+=3,E-=3;for(ct=i.geodeticSurfaceNormal(o.fromArray(rt,u,at),at),dt=i.geodeticSurfaceNormal(o.fromArray(q,u,ft),ft),P=o.normalize(o.add(ct,dt,P),P),ut+=3,n=0;n<d.length;n++){let c;r=d[n];let $=r.leftPositions,v=r.rightPositions,L,U,N=Ht,k=wt,Y=Tt;if(P=o.fromArray(O,ut,P),X($)){for(Z(z,P,w,void 0,E,e),E-=3,L=G,U=H,c=0;c<$.length/3;c++)N=o.fromArray($,c*3,N),_[T++]=L,_[T++]=U-c-1,_[T++]=U-c,M.addAttribute(m,N,void 0,E),k=o.fromArray(m,(U-c-1)*3,k),Y=o.fromArray(m,L*3,Y),w=o.normalize(o.subtract(k,Y,w),w),Z(z,P,w,void 0,E,e),E-=3;N=o.fromArray(m,L*3,N),k=o.subtract(o.fromArray(m,U*3,k),N,k),Y=o.subtract(o.fromArray(m,(U-c)*3,Y),N,Y),w=o.normalize(o.add(k,Y,w),w),Z(z,P,w,y,void 0,e),y+=3}else{for(Z(z,P,w,y,void 0,e),y+=3,L=H,U=G,c=0;c<v.length/3;c++)N=o.fromArray(v,c*3,N),_[T++]=L,_[T++]=U+c,_[T++]=U+c+1,M.addAttribute(m,N,y),k=o.fromArray(m,L*3,k),Y=o.fromArray(m,(U+c)*3,Y),w=o.normalize(o.subtract(k,Y,w),w),Z(z,P,w,y,void 0,e),y+=3;N=o.fromArray(m,L*3,N),k=o.subtract(o.fromArray(m,(U+c)*3,k),N,k),Y=o.subtract(o.fromArray(m,U*3,Y),N,Y),w=o.normalize(o.negate(o.add(Y,k,w),w),w),Z(z,P,w,void 0,E,e),E-=3}for(rt=l[At++],q=l[At++],rt.splice(0,3),q.splice(q.length-3,3),m.set(rt,y),m.set(q,E-q.length+1),u=q.length-3,ut+=3,w=o.fromArray(h,ut,w),c=0;c<q.length;c+=3)ct=i.geodeticSurfaceNormal(o.fromArray(rt,c,at),at),dt=i.geodeticSurfaceNormal(o.fromArray(q,u-c,ft),ft),P=o.normalize(o.add(ct,dt,P),P),Z(z,P,w,y,E,e),G=y/3,V=G-1,H=(E-2)/3,S=H+1,_[T++]=S,_[T++]=V,_[T++]=H,_[T++]=H,_[T++]=V,_[T++]=G,y+=3,E-=3;y-=3,E+=3}if(P=o.fromArray(O,O.length-3,P),Z(z,P,w,y,E,e),b){y+=3,E-=3,ot=wt,nt=Tt;let c=f[1];for(n=0;n<mt;n++)ot=o.fromArray(c,(p-n-1)*3,ot),nt=o.fromArray(c,n*3,nt),M.addAttribute(m,ot,void 0,E),M.addAttribute(m,nt,y),Z(z,P,w,y,E,e),G=y/3,V=G-1,H=(E-2)/3,S=H+1,_[T++]=S,_[T++]=V,_[T++]=H,_[T++]=H,_[T++]=V,_[T++]=G,y+=3,E-=3}if(g.position=new x({componentDatatype:F.DOUBLE,componentsPerAttribute:3,values:m}),e.st){let c=new Float32Array(R/3*2),$,v,L=0;if(b){a/=3,s/=3;let U=Math.PI/(p+1);v=1/(a-p+1),$=1/(s-p+1);let N,k=p/2;for(n=k+1;n<p+1;n++)N=st.PI_OVER_TWO+U*n,c[L++]=$*(1+Math.cos(N)),c[L++]=.5*(1+Math.sin(N));for(n=1;n<s-p+1;n++)c[L++]=n*$,c[L++]=0;for(n=p;n>k;n--)N=st.PI_OVER_TWO-n*U,c[L++]=1-$*(1+Math.cos(N)),c[L++]=.5*(1+Math.sin(N));for(n=k;n>0;n--)N=st.PI_OVER_TWO-U*n,c[L++]=1-v*(1+Math.cos(N)),c[L++]=.5*(1+Math.sin(N));for(n=a-p;n>0;n--)c[L++]=n*v,c[L++]=1;for(n=1;n<k+1;n++)N=st.PI_OVER_TWO+U*n,c[L++]=v*(1+Math.cos(N)),c[L++]=.5*(1+Math.sin(N))}else{for(a/=3,s/=3,v=1/(a-1),$=1/(s-1),n=0;n<s;n++)c[L++]=n*$,c[L++]=0;for(n=a;n>0;n--)c[L++]=(n-1)*v,c[L++]=1}g.st=new x({componentDatatype:F.FLOAT,componentsPerAttribute:2,values:c})}return e.normal&&(g.normal=new x({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:z.normals})),e.tangent&&(g.tangent=new x({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:z.tangents})),e.bitangent&&(g.bitangent=new x({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:z.bitangents})),{attributes:g,indices:_}}function qt(t,e){if(!e.normal&&!e.tangent&&!e.bitangent&&!e.st)return t;let i=t.position.values,l,d;(e.normal||e.bitangent)&&(l=t.normal.values,d=t.bitangent.values);let f=t.position.values.length/18,h=f*3,O=f*2,g=h*2,r;if(e.normal||e.bitangent||e.tangent){let a=e.normal?new Float32Array(h*6):void 0,s=e.tangent?new Float32Array(h*6):void 0,n=e.bitangent?new Float32Array(h*6):void 0,A=zt,u=kt,b=wt,p=Tt,R=jt,m=Ht,C=g;for(r=0;r<h;r+=3){let D=C+g;A=o.fromArray(i,r,A),u=o.fromArray(i,r+h,u),b=o.fromArray(i,(r+3)%h,b),u=o.subtract(u,A,u),b=o.subtract(b,A,b),p=o.normalize(o.cross(u,b,p),p),e.normal&&(M.addAttribute(a,p,D),M.addAttribute(a,p,D+3),M.addAttribute(a,p,C),M.addAttribute(a,p,C+3)),(e.tangent||e.bitangent)&&(m=o.fromArray(l,r,m),e.bitangent&&(M.addAttribute(n,m,D),M.addAttribute(n,m,D+3),M.addAttribute(n,m,C),M.addAttribute(n,m,C+3)),e.tangent&&(R=o.normalize(o.cross(m,p,R),R),M.addAttribute(s,R,D),M.addAttribute(s,R,D+3),M.addAttribute(s,R,C),M.addAttribute(s,R,C+3))),C+=6}if(e.normal){for(a.set(l),r=0;r<h;r+=3)a[r+h]=-l[r],a[r+h+1]=-l[r+1],a[r+h+2]=-l[r+2];t.normal.values=a}else t.normal=void 0;if(e.bitangent?(n.set(d),n.set(d,h),t.bitangent.values=n):t.bitangent=void 0,e.tangent){let D=t.tangent.values;s.set(D),s.set(D,h),t.tangent.values=s}}if(e.st){let a=t.st.values,s=new Float32Array(O*6);s.set(a),s.set(a,O);let n=O*2;for(let A=0;A<2;A++){for(s[n++]=a[0],s[n++]=a[1],r=2;r<O;r+=2){let u=a[r],b=a[r+1];s[n++]=u,s[n++]=b,s[n++]=u,s[n++]=b}s[n++]=a[0],s[n++]=a[1]}t.st.values=s}return t}function Ot(t,e,i){i[e++]=t[0],i[e++]=t[1],i[e++]=t[2];for(let l=3;l<t.length;l+=3){let d=t[l],f=t[l+1],h=t[l+2];i[e++]=d,i[e++]=f,i[e++]=h,i[e++]=d,i[e++]=f,i[e++]=h}return i[e++]=t[0],i[e++]=t[1],i[e++]=t[2],i}function Gt(t,e){let i=new J({position:e.position,normal:e.normal||e.bitangent||t.shadowVolume,tangent:e.tangent,bitangent:e.normal||e.bitangent,st:e.st}),l=t.ellipsoid,d=M.computePositions(t),f=Bt(d,i,l),h=t.height,O=t.extrudedHeight,g=f.attributes,r=f.indices,a=g.position.values,s=a.length,n=new Float64Array(s*6),A=new Float64Array(s);A.set(a);let u=new Float64Array(s*4);a=yt.scaleToGeodeticHeight(a,h,l),u=Ot(a,0,u),A=yt.scaleToGeodeticHeight(A,O,l),u=Ot(A,s*2,u),n.set(a),n.set(A,s),n.set(u,s*2),g.position.values=n,g=qt(g,e);let b,p=s/3;if(t.shadowVolume){let S=g.normal.values;s=S.length;let V=new Float32Array(s*6);for(b=0;b<s;b++)S[b]=-S[b];V.set(S,s),V=Ot(S,s*4,V),g.extrudeDirection=new x({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:V}),e.normal||(g.normal=void 0)}if(X(t.offsetAttribute)){let S=new Uint8Array(p*6);if(t.offsetAttribute===_t.TOP)S=S.fill(1,0,p).fill(1,p*2,p*4);else{let V=t.offsetAttribute===_t.NONE?0:1;S=S.fill(V)}g.applyOffset=new x({componentDatatype:F.UNSIGNED_BYTE,componentsPerAttribute:1,values:S})}let R=r.length,m=p+p,C=Nt.createTypedArray(n.length/3,R*2+m*3);C.set(r);let D=R;for(b=0;b<R;b+=3){let S=r[b],V=r[b+1],H=r[b+2];C[D++]=H+p,C[D++]=V+p,C[D++]=S+p}let lt,z,y,E;for(b=0;b<m;b+=2)lt=b+m,z=lt+m,y=lt+1,E=z+1,C[D++]=lt,C[D++]=z,C[D++]=y,C[D++]=y,C[D++]=z,C[D++]=E;return{attributes:g,indices:C}}var Dt=new o,gt=new o,Q=new bt;function Rt(t,e,i,l,d,f){let h=o.subtract(e,t,Dt);o.normalize(h,h);let O=i.geodeticSurfaceNormal(t,gt),g=o.cross(h,O,Dt);o.multiplyByScalar(g,l,g);let r=d.latitude,a=d.longitude,s=f.latitude,n=f.longitude;o.add(t,g,gt),i.cartesianToCartographic(gt,Q);let A=Q.latitude,u=Q.longitude;r=Math.min(r,A),a=Math.min(a,u),s=Math.max(s,A),n=Math.max(n,u),o.subtract(t,g,gt),i.cartesianToCartographic(gt,Q),A=Q.latitude,u=Q.longitude,r=Math.min(r,A),a=Math.min(a,u),s=Math.max(s,A),n=Math.max(n,u),d.latitude=r,d.longitude=a,f.latitude=s,f.longitude=n}var K=new o,pt=new o,W=new bt,j=new bt;function Yt(t,e,i,l,d){t=Ut(t,e);let f=Pt(t,o.equalsEpsilon),h=f.length;if(h<2||i<=0)return new Et;let O=i*.5;W.latitude=Number.POSITIVE_INFINITY,W.longitude=Number.POSITIVE_INFINITY,j.latitude=Number.NEGATIVE_INFINITY,j.longitude=Number.NEGATIVE_INFINITY;let g,r;if(l===ht.ROUNDED){let n=f[0];o.subtract(n,f[1],K),o.normalize(K,K),o.multiplyByScalar(K,O,K),o.add(n,K,pt),e.cartesianToCartographic(pt,Q),g=Q.latitude,r=Q.longitude,W.latitude=Math.min(W.latitude,g),W.longitude=Math.min(W.longitude,r),j.latitude=Math.max(j.latitude,g),j.longitude=Math.max(j.longitude,r)}for(let n=0;n<h-1;++n)Rt(f[n],f[n+1],e,O,W,j);let a=f[h-1];o.subtract(a,f[h-2],K),o.normalize(K,K),o.multiplyByScalar(K,O,K),o.add(a,K,pt),Rt(a,pt,e,O,W,j),l===ht.ROUNDED&&(e.cartesianToCartographic(pt,Q),g=Q.latitude,r=Q.longitude,W.latitude=Math.min(W.latitude,g),W.longitude=Math.min(W.longitude,r),j.latitude=Math.max(j.latitude,g),j.longitude=Math.max(j.longitude,r));let s=X(d)?d:new Et;return s.north=j.latitude,s.south=W.latitude,s.east=j.longitude,s.west=W.longitude,s}function et(t){t=B(t,B.EMPTY_OBJECT);let e=t.positions,i=t.width;it.defined("options.positions",e),it.defined("options.width",i);let l=B(t.height,0),d=B(t.extrudedHeight,l);this._positions=e,this._ellipsoid=I.clone(B(t.ellipsoid,I.WGS84)),this._vertexFormat=J.clone(B(t.vertexFormat,J.DEFAULT)),this._width=i,this._height=Math.max(l,d),this._extrudedHeight=Math.min(l,d),this._cornerType=B(t.cornerType,ht.ROUNDED),this._granularity=B(t.granularity,st.RADIANS_PER_DEGREE),this._shadowVolume=B(t.shadowVolume,!1),this._workerName="createCorridorGeometry",this._offsetAttribute=t.offsetAttribute,this._rectangle=void 0,this.packedLength=1+e.length*o.packedLength+I.packedLength+J.packedLength+7}et.pack=function(t,e,i){it.defined("value",t),it.defined("array",e),i=B(i,0);let l=t._positions,d=l.length;e[i++]=d;for(let f=0;f<d;++f,i+=o.packedLength)o.pack(l[f],e,i);return I.pack(t._ellipsoid,e,i),i+=I.packedLength,J.pack(t._vertexFormat,e,i),i+=J.packedLength,e[i++]=t._width,e[i++]=t._height,e[i++]=t._extrudedHeight,e[i++]=t._cornerType,e[i++]=t._granularity,e[i++]=t._shadowVolume?1:0,e[i]=B(t._offsetAttribute,-1),e};var It=I.clone(I.UNIT_SPHERE),Wt=new J,tt={positions:void 0,ellipsoid:It,vertexFormat:Wt,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,shadowVolume:void 0,offsetAttribute:void 0};et.unpack=function(t,e,i){it.defined("array",t),e=B(e,0);let l=t[e++],d=new Array(l);for(let u=0;u<l;++u,e+=o.packedLength)d[u]=o.unpack(t,e);let f=I.unpack(t,e,It);e+=I.packedLength;let h=J.unpack(t,e,Wt);e+=J.packedLength;let O=t[e++],g=t[e++],r=t[e++],a=t[e++],s=t[e++],n=t[e++]===1,A=t[e];return X(i)?(i._positions=d,i._ellipsoid=I.clone(f,i._ellipsoid),i._vertexFormat=J.clone(h,i._vertexFormat),i._width=O,i._height=g,i._extrudedHeight=r,i._cornerType=a,i._granularity=s,i._shadowVolume=n,i._offsetAttribute=A===-1?void 0:A,i):(tt.positions=d,tt.width=O,tt.height=g,tt.extrudedHeight=r,tt.cornerType=a,tt.granularity=s,tt.shadowVolume=n,tt.offsetAttribute=A===-1?void 0:A,new et(tt))};et.computeRectangle=function(t,e){t=B(t,B.EMPTY_OBJECT);let i=t.positions,l=t.width;it.defined("options.positions",i),it.defined("options.width",l);let d=B(t.ellipsoid,I.WGS84),f=B(t.cornerType,ht.ROUNDED);return Yt(i,d,l,f,e)};et.createGeometry=function(t){let e=t._positions,i=t._width,l=t._ellipsoid;e=Ut(e,l);let d=Pt(e,o.equalsEpsilon);if(d.length<2||i<=0)return;let f=t._height,h=t._extrudedHeight,O=!st.equalsEpsilon(f,h,0,st.EPSILON2),g=t._vertexFormat,r={ellipsoid:l,positions:d,width:i,cornerType:t._cornerType,granularity:t._granularity,saveAttributes:!0},a;if(O)r.height=f,r.extrudedHeight=h,r.shadowVolume=t._shadowVolume,r.offsetAttribute=t._offsetAttribute,a=Gt(r,g);else{let A=M.computePositions(r);if(a=Bt(A,g,l),a.attributes.position.values=yt.scaleToGeodeticHeight(a.attributes.position.values,f,l),X(t._offsetAttribute)){let u=t._offsetAttribute===_t.NONE?0:1,b=a.attributes.position.values.length,p=new Uint8Array(b/3).fill(u);a.attributes.applyOffset=new x({componentDatatype:F.UNSIGNED_BYTE,componentsPerAttribute:1,values:p})}}let s=a.attributes,n=St.fromVertices(s.position.values,void 0,3);return g.position||(a.attributes.position.values=void 0),new Vt({attributes:s,indices:a.indices,primitiveType:Mt.TRIANGLES,boundingSphere:n,offsetAttribute:t._offsetAttribute})};et.createShadowVolume=function(t,e,i){let l=t._granularity,d=t._ellipsoid,f=e(l,d),h=i(l,d);return new et({positions:t._positions,width:t._width,cornerType:t._cornerType,ellipsoid:d,granularity:l,extrudedHeight:f,height:h,vertexFormat:J.POSITION_ONLY,shadowVolume:!0})};Object.defineProperties(et.prototype,{rectangle:{get:function(){return X(this._rectangle)||(this._rectangle=Yt(this._positions,this._ellipsoid,this._width,this._cornerType)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return[0,0,0,1,1,0]}}});var Lt=et;function Jt(t,e){return X(e)&&(t=Lt.unpack(t,e)),t._ellipsoid=I.clone(t._ellipsoid),Lt.createGeometry(t)}var Ae=Jt;export{Ae as default}; |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.116 | ||
* Version 1.116.1 | ||
* | ||
@@ -26,2 +26,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
import{a as S}from"./chunk-U2CMUMOR.js";import{a as Q}from"./chunk-FCEVC3JZ.js";import"./chunk-2QAZKO32.js";import"./chunk-M5A47EM2.js";import{a as W}from"./chunk-TXIAMGDC.js";import"./chunk-YPW76GEP.js";import"./chunk-GKRM7KEL.js";import{b as K}from"./chunk-4NVG6N2Q.js";import{a as it}from"./chunk-5CBMSEPD.js";import"./chunk-2DF4CAYN.js";import"./chunk-LGFQRF3V.js";import"./chunk-AHZBRYZA.js";import{a as Z}from"./chunk-TWAPNO4J.js";import{a as et}from"./chunk-FSXLPWHR.js";import{b as I,c as tt,d as J}from"./chunk-37KLWU3W.js";import{d as x}from"./chunk-HTNJJ6YO.js";import"./chunk-63E276CT.js";import"./chunk-NRW2R4YV.js";import"./chunk-NSILPUHD.js";import{a as z}from"./chunk-M7WODBAD.js";import{a as A,d as P}from"./chunk-J26GWQSN.js";import{a as q}from"./chunk-PYB3IV2X.js";import"./chunk-H7FFK4U5.js";import"./chunk-YEUII2A5.js";import{a as H}from"./chunk-4353PD6R.js";import{b as M}from"./chunk-2S4UUFD6.js";import{e as C}from"./chunk-42VHSORI.js";var ot=new A,nt=new A,rt=new A;function ft(t,i){for(let e=0;e<t.length;e++)t[e]=i.scaleToGeodeticSurface(t[e],t[e]);return t}function st(t,i){let e=[],l=t.positions,h=t.corners,m=t.endPositions,D=new et,y,u=0,p=0,o,g=0,d;for(o=0;o<l.length;o+=2)d=l[o].length-3,u+=d,g+=d/3*4,p+=l[o+1].length-3;for(u+=3,p+=3,o=0;o<h.length;o++){y=h[o];let c=h[o].leftPositions;C(c)?(d=c.length,u+=d,g+=d/3*2):(d=h[o].rightPositions.length,p+=d,g+=d/3*2)}let _=C(m),w;_&&(w=m[0].length-3,u+=w,p+=w,w/=3,g+=w*4);let T=u+p,b=new Float64Array(T),n=0,s=T-1,a,E,L,k,U,O,j=w/2,r=Z.createTypedArray(T/3,g+4),f=0;if(r[f++]=n/3,r[f++]=(s-2)/3,_){e.push(n/3),O=ot,U=nt;let c=m[0];for(o=0;o<j;o++)O=A.fromArray(c,(j-1-o)*3,O),U=A.fromArray(c,(j+o)*3,U),S.addAttribute(b,U,n),S.addAttribute(b,O,void 0,s),E=n/3,k=E+1,a=(s-2)/3,L=a-1,r[f++]=a,r[f++]=L,r[f++]=E,r[f++]=k,n+=3,s-=3}let G=0,F=l[G++],N=l[G++];for(b.set(F,n),b.set(N,s-N.length+1),d=N.length-3,e.push(n/3,(s-2)/3),o=0;o<d;o+=3)E=n/3,k=E+1,a=(s-2)/3,L=a-1,r[f++]=a,r[f++]=L,r[f++]=E,r[f++]=k,n+=3,s-=3;for(o=0;o<h.length;o++){let c;y=h[o];let Y=y.leftPositions,X=y.rightPositions,v,B=rt;if(C(Y)){for(s-=3,v=L,e.push(k),c=0;c<Y.length/3;c++)B=A.fromArray(Y,c*3,B),r[f++]=v-c-1,r[f++]=v-c,S.addAttribute(b,B,void 0,s),s-=3;e.push(v-Math.floor(Y.length/6)),i===Q.BEVELED&&e.push((s-2)/3+1),n+=3}else{for(n+=3,v=k,e.push(L),c=0;c<X.length/3;c++)B=A.fromArray(X,c*3,B),r[f++]=v+c,r[f++]=v+c+1,S.addAttribute(b,B,n),n+=3;e.push(v+Math.floor(X.length/6)),i===Q.BEVELED&&e.push(n/3-1),s-=3}for(F=l[G++],N=l[G++],F.splice(0,3),N.splice(N.length-3,3),b.set(F,n),b.set(N,s-N.length+1),d=N.length-3,c=0;c<N.length;c+=3)k=n/3,E=k-1,L=(s-2)/3,a=L+1,r[f++]=a,r[f++]=L,r[f++]=E,r[f++]=k,n+=3,s-=3;n-=3,s+=3,e.push(n/3,(s-2)/3)}if(_){n+=3,s-=3,O=ot,U=nt;let c=m[1];for(o=0;o<j;o++)O=A.fromArray(c,(w-o-1)*3,O),U=A.fromArray(c,o*3,U),S.addAttribute(b,O,void 0,s),S.addAttribute(b,U,n),k=n/3,E=k-1,L=(s-2)/3,a=L+1,r[f++]=a,r[f++]=L,r[f++]=E,r[f++]=k,n+=3,s-=3;e.push(n/3)}else e.push(n/3,(s-2)/3);return r[f++]=n/3,r[f++]=(s-2)/3,D.position=new J({componentDatatype:z.DOUBLE,componentsPerAttribute:3,values:b}),{attributes:D,indices:r,wallIndices:e}}function ct(t){let i=t.ellipsoid,e=S.computePositions(t),l=st(e,t.cornerType),h=l.wallIndices,m=t.height,D=t.extrudedHeight,y=l.attributes,u=l.indices,p=y.position.values,o=p.length,g=new Float64Array(o);g.set(p);let d=new Float64Array(o*2);if(p=K.scaleToGeodeticHeight(p,m,i),g=K.scaleToGeodeticHeight(g,D,i),d.set(p),d.set(g,o),y.position.values=d,o/=3,C(t.offsetAttribute)){let a=new Uint8Array(o*2);if(t.offsetAttribute===W.TOP)a=a.fill(1,0,o);else{let E=t.offsetAttribute===W.NONE?0:1;a=a.fill(E)}y.applyOffset=new J({componentDatatype:z.UNSIGNED_BYTE,componentsPerAttribute:1,values:a})}let _,w=u.length,T=Z.createTypedArray(d.length/3,(w+h.length)*2);T.set(u);let b=w;for(_=0;_<w;_+=2){let a=u[_],E=u[_+1];T[b++]=a+o,T[b++]=E+o}let n,s;for(_=0;_<h.length;_++)n=h[_],s=n+o,T[b++]=n,T[b++]=s;return{attributes:y,indices:T}}function V(t){t=H(t,H.EMPTY_OBJECT);let i=t.positions,e=t.width;M.typeOf.object("options.positions",i),M.typeOf.number("options.width",e);let l=H(t.height,0),h=H(t.extrudedHeight,l);this._positions=i,this._ellipsoid=P.clone(H(t.ellipsoid,P.WGS84)),this._width=e,this._height=Math.max(l,h),this._extrudedHeight=Math.min(l,h),this._cornerType=H(t.cornerType,Q.ROUNDED),this._granularity=H(t.granularity,q.RADIANS_PER_DEGREE),this._offsetAttribute=t.offsetAttribute,this._workerName="createCorridorOutlineGeometry",this.packedLength=1+i.length*A.packedLength+P.packedLength+6}V.pack=function(t,i,e){M.typeOf.object("value",t),M.typeOf.object("array",i),e=H(e,0);let l=t._positions,h=l.length;i[e++]=h;for(let m=0;m<h;++m,e+=A.packedLength)A.pack(l[m],i,e);return P.pack(t._ellipsoid,i,e),e+=P.packedLength,i[e++]=t._width,i[e++]=t._height,i[e++]=t._extrudedHeight,i[e++]=t._cornerType,i[e++]=t._granularity,i[e]=H(t._offsetAttribute,-1),i};var lt=P.clone(P.UNIT_SPHERE),R={positions:void 0,ellipsoid:lt,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,offsetAttribute:void 0};V.unpack=function(t,i,e){M.typeOf.object("array",t),i=H(i,0);let l=t[i++],h=new Array(l);for(let d=0;d<l;++d,i+=A.packedLength)h[d]=A.unpack(t,i);let m=P.unpack(t,i,lt);i+=P.packedLength;let D=t[i++],y=t[i++],u=t[i++],p=t[i++],o=t[i++],g=t[i];return C(e)?(e._positions=h,e._ellipsoid=P.clone(m,e._ellipsoid),e._width=D,e._height=y,e._extrudedHeight=u,e._cornerType=p,e._granularity=o,e._offsetAttribute=g===-1?void 0:g,e):(R.positions=h,R.width=D,R.height=y,R.extrudedHeight=u,R.cornerType=p,R.granularity=o,R.offsetAttribute=g===-1?void 0:g,new V(R))};V.createGeometry=function(t){let i=t._positions,e=t._width,l=t._ellipsoid;i=ft(i,l);let h=it(i,A.equalsEpsilon);if(h.length<2||e<=0)return;let m=t._height,D=t._extrudedHeight,y=!q.equalsEpsilon(m,D,0,q.EPSILON2),u={ellipsoid:l,positions:h,width:e,cornerType:t._cornerType,granularity:t._granularity,saveAttributes:!1},p;if(y)u.height=m,u.extrudedHeight=D,u.offsetAttribute=t._offsetAttribute,p=ct(u);else{let d=S.computePositions(u);if(p=st(d,u.cornerType),p.attributes.position.values=K.scaleToGeodeticHeight(p.attributes.position.values,m,l),C(t._offsetAttribute)){let _=p.attributes.position.values.length,w=t._offsetAttribute===W.NONE?0:1,T=new Uint8Array(_/3).fill(w);p.attributes.applyOffset=new J({componentDatatype:z.UNSIGNED_BYTE,componentsPerAttribute:1,values:T})}}let o=p.attributes,g=x.fromVertices(o.position.values,void 0,3);return new tt({attributes:o,indices:p.indices,primitiveType:I.LINES,boundingSphere:g,offsetAttribute:t._offsetAttribute})};var $=V;function ht(t,i){return C(i)&&(t=$.unpack(t,i)),t._ellipsoid=P.clone(t._ellipsoid),$.createGeometry(t)}var Ot=ht;export{Ot as default}; | ||
import{a as S}from"./chunk-JQJMH7TX.js";import{a as Q}from"./chunk-PIHOEFW3.js";import"./chunk-IZNUAC5V.js";import"./chunk-3CPQXNZI.js";import{a as W}from"./chunk-XJCFZEZW.js";import"./chunk-7E5ZATSO.js";import"./chunk-XOMW5SDY.js";import{b as K}from"./chunk-ZK4DC2CW.js";import{a as it}from"./chunk-OBENGMDT.js";import"./chunk-LH3GDPJ4.js";import"./chunk-QC62DG5W.js";import"./chunk-R6IH5WM5.js";import{a as Z}from"./chunk-ROROM35N.js";import{a as et}from"./chunk-F5TB5EI7.js";import{b as I,c as tt,d as J}from"./chunk-VAPKZ5PR.js";import{d as x}from"./chunk-DXGEUDM7.js";import"./chunk-5IUHFVP3.js";import"./chunk-OE3P25NW.js";import"./chunk-HIT4T4MS.js";import{a as z}from"./chunk-3KRBUMEX.js";import{a as A,d as P}from"./chunk-PQ6NV4GA.js";import{a as q}from"./chunk-74I3QBVP.js";import"./chunk-BLVYEJBC.js";import"./chunk-A6PYE4JS.js";import{a as H}from"./chunk-T23IKWCM.js";import{b as M}from"./chunk-HJ33TVGP.js";import{e as C}from"./chunk-WL4PTXMO.js";var ot=new A,nt=new A,rt=new A;function ft(t,i){for(let e=0;e<t.length;e++)t[e]=i.scaleToGeodeticSurface(t[e],t[e]);return t}function st(t,i){let e=[],l=t.positions,h=t.corners,m=t.endPositions,D=new et,y,u=0,p=0,o,g=0,d;for(o=0;o<l.length;o+=2)d=l[o].length-3,u+=d,g+=d/3*4,p+=l[o+1].length-3;for(u+=3,p+=3,o=0;o<h.length;o++){y=h[o];let c=h[o].leftPositions;C(c)?(d=c.length,u+=d,g+=d/3*2):(d=h[o].rightPositions.length,p+=d,g+=d/3*2)}let _=C(m),w;_&&(w=m[0].length-3,u+=w,p+=w,w/=3,g+=w*4);let T=u+p,b=new Float64Array(T),n=0,s=T-1,a,E,L,k,U,O,j=w/2,r=Z.createTypedArray(T/3,g+4),f=0;if(r[f++]=n/3,r[f++]=(s-2)/3,_){e.push(n/3),O=ot,U=nt;let c=m[0];for(o=0;o<j;o++)O=A.fromArray(c,(j-1-o)*3,O),U=A.fromArray(c,(j+o)*3,U),S.addAttribute(b,U,n),S.addAttribute(b,O,void 0,s),E=n/3,k=E+1,a=(s-2)/3,L=a-1,r[f++]=a,r[f++]=L,r[f++]=E,r[f++]=k,n+=3,s-=3}let G=0,F=l[G++],N=l[G++];for(b.set(F,n),b.set(N,s-N.length+1),d=N.length-3,e.push(n/3,(s-2)/3),o=0;o<d;o+=3)E=n/3,k=E+1,a=(s-2)/3,L=a-1,r[f++]=a,r[f++]=L,r[f++]=E,r[f++]=k,n+=3,s-=3;for(o=0;o<h.length;o++){let c;y=h[o];let Y=y.leftPositions,X=y.rightPositions,v,B=rt;if(C(Y)){for(s-=3,v=L,e.push(k),c=0;c<Y.length/3;c++)B=A.fromArray(Y,c*3,B),r[f++]=v-c-1,r[f++]=v-c,S.addAttribute(b,B,void 0,s),s-=3;e.push(v-Math.floor(Y.length/6)),i===Q.BEVELED&&e.push((s-2)/3+1),n+=3}else{for(n+=3,v=k,e.push(L),c=0;c<X.length/3;c++)B=A.fromArray(X,c*3,B),r[f++]=v+c,r[f++]=v+c+1,S.addAttribute(b,B,n),n+=3;e.push(v+Math.floor(X.length/6)),i===Q.BEVELED&&e.push(n/3-1),s-=3}for(F=l[G++],N=l[G++],F.splice(0,3),N.splice(N.length-3,3),b.set(F,n),b.set(N,s-N.length+1),d=N.length-3,c=0;c<N.length;c+=3)k=n/3,E=k-1,L=(s-2)/3,a=L+1,r[f++]=a,r[f++]=L,r[f++]=E,r[f++]=k,n+=3,s-=3;n-=3,s+=3,e.push(n/3,(s-2)/3)}if(_){n+=3,s-=3,O=ot,U=nt;let c=m[1];for(o=0;o<j;o++)O=A.fromArray(c,(w-o-1)*3,O),U=A.fromArray(c,o*3,U),S.addAttribute(b,O,void 0,s),S.addAttribute(b,U,n),k=n/3,E=k-1,L=(s-2)/3,a=L+1,r[f++]=a,r[f++]=L,r[f++]=E,r[f++]=k,n+=3,s-=3;e.push(n/3)}else e.push(n/3,(s-2)/3);return r[f++]=n/3,r[f++]=(s-2)/3,D.position=new J({componentDatatype:z.DOUBLE,componentsPerAttribute:3,values:b}),{attributes:D,indices:r,wallIndices:e}}function ct(t){let i=t.ellipsoid,e=S.computePositions(t),l=st(e,t.cornerType),h=l.wallIndices,m=t.height,D=t.extrudedHeight,y=l.attributes,u=l.indices,p=y.position.values,o=p.length,g=new Float64Array(o);g.set(p);let d=new Float64Array(o*2);if(p=K.scaleToGeodeticHeight(p,m,i),g=K.scaleToGeodeticHeight(g,D,i),d.set(p),d.set(g,o),y.position.values=d,o/=3,C(t.offsetAttribute)){let a=new Uint8Array(o*2);if(t.offsetAttribute===W.TOP)a=a.fill(1,0,o);else{let E=t.offsetAttribute===W.NONE?0:1;a=a.fill(E)}y.applyOffset=new J({componentDatatype:z.UNSIGNED_BYTE,componentsPerAttribute:1,values:a})}let _,w=u.length,T=Z.createTypedArray(d.length/3,(w+h.length)*2);T.set(u);let b=w;for(_=0;_<w;_+=2){let a=u[_],E=u[_+1];T[b++]=a+o,T[b++]=E+o}let n,s;for(_=0;_<h.length;_++)n=h[_],s=n+o,T[b++]=n,T[b++]=s;return{attributes:y,indices:T}}function V(t){t=H(t,H.EMPTY_OBJECT);let i=t.positions,e=t.width;M.typeOf.object("options.positions",i),M.typeOf.number("options.width",e);let l=H(t.height,0),h=H(t.extrudedHeight,l);this._positions=i,this._ellipsoid=P.clone(H(t.ellipsoid,P.WGS84)),this._width=e,this._height=Math.max(l,h),this._extrudedHeight=Math.min(l,h),this._cornerType=H(t.cornerType,Q.ROUNDED),this._granularity=H(t.granularity,q.RADIANS_PER_DEGREE),this._offsetAttribute=t.offsetAttribute,this._workerName="createCorridorOutlineGeometry",this.packedLength=1+i.length*A.packedLength+P.packedLength+6}V.pack=function(t,i,e){M.typeOf.object("value",t),M.typeOf.object("array",i),e=H(e,0);let l=t._positions,h=l.length;i[e++]=h;for(let m=0;m<h;++m,e+=A.packedLength)A.pack(l[m],i,e);return P.pack(t._ellipsoid,i,e),e+=P.packedLength,i[e++]=t._width,i[e++]=t._height,i[e++]=t._extrudedHeight,i[e++]=t._cornerType,i[e++]=t._granularity,i[e]=H(t._offsetAttribute,-1),i};var lt=P.clone(P.UNIT_SPHERE),R={positions:void 0,ellipsoid:lt,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,offsetAttribute:void 0};V.unpack=function(t,i,e){M.typeOf.object("array",t),i=H(i,0);let l=t[i++],h=new Array(l);for(let d=0;d<l;++d,i+=A.packedLength)h[d]=A.unpack(t,i);let m=P.unpack(t,i,lt);i+=P.packedLength;let D=t[i++],y=t[i++],u=t[i++],p=t[i++],o=t[i++],g=t[i];return C(e)?(e._positions=h,e._ellipsoid=P.clone(m,e._ellipsoid),e._width=D,e._height=y,e._extrudedHeight=u,e._cornerType=p,e._granularity=o,e._offsetAttribute=g===-1?void 0:g,e):(R.positions=h,R.width=D,R.height=y,R.extrudedHeight=u,R.cornerType=p,R.granularity=o,R.offsetAttribute=g===-1?void 0:g,new V(R))};V.createGeometry=function(t){let i=t._positions,e=t._width,l=t._ellipsoid;i=ft(i,l);let h=it(i,A.equalsEpsilon);if(h.length<2||e<=0)return;let m=t._height,D=t._extrudedHeight,y=!q.equalsEpsilon(m,D,0,q.EPSILON2),u={ellipsoid:l,positions:h,width:e,cornerType:t._cornerType,granularity:t._granularity,saveAttributes:!1},p;if(y)u.height=m,u.extrudedHeight=D,u.offsetAttribute=t._offsetAttribute,p=ct(u);else{let d=S.computePositions(u);if(p=st(d,u.cornerType),p.attributes.position.values=K.scaleToGeodeticHeight(p.attributes.position.values,m,l),C(t._offsetAttribute)){let _=p.attributes.position.values.length,w=t._offsetAttribute===W.NONE?0:1,T=new Uint8Array(_/3).fill(w);p.attributes.applyOffset=new J({componentDatatype:z.UNSIGNED_BYTE,componentsPerAttribute:1,values:T})}}let o=p.attributes,g=x.fromVertices(o.position.values,void 0,3);return new tt({attributes:o,indices:p.indices,primitiveType:I.LINES,boundingSphere:g,offsetAttribute:t._offsetAttribute})};var $=V;function ht(t,i){return C(i)&&(t=$.unpack(t,i)),t._ellipsoid=P.clone(t._ellipsoid),$.createGeometry(t)}var Ot=ht;export{Ot as default}; |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.116 | ||
* Version 1.116.1 | ||
* | ||
@@ -26,2 +26,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
import{a as r}from"./chunk-GW444G3T.js";import"./chunk-OXKDIHB6.js";import"./chunk-TXIAMGDC.js";import"./chunk-TK2AA6M2.js";import"./chunk-TWAPNO4J.js";import"./chunk-FSXLPWHR.js";import"./chunk-37KLWU3W.js";import"./chunk-HTNJJ6YO.js";import"./chunk-63E276CT.js";import"./chunk-NRW2R4YV.js";import"./chunk-NSILPUHD.js";import"./chunk-M7WODBAD.js";import"./chunk-J26GWQSN.js";import"./chunk-PYB3IV2X.js";import"./chunk-H7FFK4U5.js";import"./chunk-YEUII2A5.js";import"./chunk-4353PD6R.js";import"./chunk-2S4UUFD6.js";import{e as o}from"./chunk-42VHSORI.js";function i(e,t){return o(t)&&(e=r.unpack(e,t)),r.createGeometry(e)}var a=i;export{a as default}; | ||
import{a as r}from"./chunk-J365QEX5.js";import"./chunk-UMIT4LUH.js";import"./chunk-XJCFZEZW.js";import"./chunk-64WQCGAE.js";import"./chunk-ROROM35N.js";import"./chunk-F5TB5EI7.js";import"./chunk-VAPKZ5PR.js";import"./chunk-DXGEUDM7.js";import"./chunk-5IUHFVP3.js";import"./chunk-OE3P25NW.js";import"./chunk-HIT4T4MS.js";import"./chunk-3KRBUMEX.js";import"./chunk-PQ6NV4GA.js";import"./chunk-74I3QBVP.js";import"./chunk-BLVYEJBC.js";import"./chunk-A6PYE4JS.js";import"./chunk-T23IKWCM.js";import"./chunk-HJ33TVGP.js";import{e as o}from"./chunk-WL4PTXMO.js";function i(e,t){return o(t)&&(e=r.unpack(e,t)),r.createGeometry(e)}var a=i;export{a as default}; |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.116 | ||
* Version 1.116.1 | ||
* | ||
@@ -26,2 +26,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
import{a as M}from"./chunk-OXKDIHB6.js";import{a as V}from"./chunk-TXIAMGDC.js";import{a as N}from"./chunk-TWAPNO4J.js";import{a as k}from"./chunk-FSXLPWHR.js";import{b as D,c as P,d as L}from"./chunk-37KLWU3W.js";import{d as y}from"./chunk-HTNJJ6YO.js";import"./chunk-63E276CT.js";import"./chunk-NRW2R4YV.js";import"./chunk-NSILPUHD.js";import{a as A}from"./chunk-M7WODBAD.js";import{a as S,c as R}from"./chunk-J26GWQSN.js";import"./chunk-PYB3IV2X.js";import"./chunk-H7FFK4U5.js";import"./chunk-YEUII2A5.js";import{a as c}from"./chunk-4353PD6R.js";import{a as T,b as m}from"./chunk-2S4UUFD6.js";import{e as d}from"./chunk-42VHSORI.js";var w=new R;function a(t){t=c(t,c.EMPTY_OBJECT);let e=t.length,i=t.topRadius,f=t.bottomRadius,o=c(t.slices,128),r=Math.max(c(t.numberOfVerticalLines,16),0);if(m.typeOf.number("options.positions",e),m.typeOf.number("options.topRadius",i),m.typeOf.number("options.bottomRadius",f),m.typeOf.number.greaterThanOrEquals("options.slices",o,3),d(t.offsetAttribute)&&t.offsetAttribute===V.TOP)throw new T("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._length=e,this._topRadius=i,this._bottomRadius=f,this._slices=o,this._numberOfVerticalLines=r,this._offsetAttribute=t.offsetAttribute,this._workerName="createCylinderOutlineGeometry"}a.packedLength=6;a.pack=function(t,e,i){return m.typeOf.object("value",t),m.defined("array",e),i=c(i,0),e[i++]=t._length,e[i++]=t._topRadius,e[i++]=t._bottomRadius,e[i++]=t._slices,e[i++]=t._numberOfVerticalLines,e[i]=c(t._offsetAttribute,-1),e};var b={length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};a.unpack=function(t,e,i){m.defined("array",t),e=c(e,0);let f=t[e++],o=t[e++],r=t[e++],h=t[e++],l=t[e++],p=t[e];return d(i)?(i._length=f,i._topRadius=o,i._bottomRadius=r,i._slices=h,i._numberOfVerticalLines=l,i._offsetAttribute=p===-1?void 0:p,i):(b.length=f,b.topRadius=o,b.bottomRadius=r,b.slices=h,b.numberOfVerticalLines=l,b.offsetAttribute=p===-1?void 0:p,new a(b))};a.createGeometry=function(t){let e=t._length,i=t._topRadius,f=t._bottomRadius,o=t._slices,r=t._numberOfVerticalLines;if(e<=0||i<0||f<0||i===0&&f===0)return;let h=o*2,l=M.computePositions(e,i,f,o,!1),p=o*2,E;if(r>0){let O=Math.min(r,o);E=Math.round(o/O),p+=O}let s=N.createTypedArray(h,p*2),u=0,n;for(n=0;n<o-1;n++)s[u++]=n,s[u++]=n+1,s[u++]=n+o,s[u++]=n+1+o;if(s[u++]=o-1,s[u++]=0,s[u++]=o+o-1,s[u++]=o,r>0)for(n=0;n<o;n+=E)s[u++]=n,s[u++]=n+o;let _=new k;_.position=new L({componentDatatype:A.DOUBLE,componentsPerAttribute:3,values:l}),w.x=e*.5,w.y=Math.max(f,i);let g=new y(S.ZERO,R.magnitude(w));if(d(t._offsetAttribute)){e=l.length;let O=t._offsetAttribute===V.NONE?0:1,B=new Uint8Array(e/3).fill(O);_.applyOffset=new L({componentDatatype:A.UNSIGNED_BYTE,componentsPerAttribute:1,values:B})}return new P({attributes:_,indices:s,primitiveType:D.LINES,boundingSphere:g,offsetAttribute:t._offsetAttribute})};var C=a;function G(t,e){return d(e)&&(t=C.unpack(t,e)),C.createGeometry(t)}var et=G;export{et as default}; | ||
import{a as M}from"./chunk-UMIT4LUH.js";import{a as V}from"./chunk-XJCFZEZW.js";import{a as N}from"./chunk-ROROM35N.js";import{a as k}from"./chunk-F5TB5EI7.js";import{b as D,c as P,d as L}from"./chunk-VAPKZ5PR.js";import{d as y}from"./chunk-DXGEUDM7.js";import"./chunk-5IUHFVP3.js";import"./chunk-OE3P25NW.js";import"./chunk-HIT4T4MS.js";import{a as A}from"./chunk-3KRBUMEX.js";import{a as S,c as R}from"./chunk-PQ6NV4GA.js";import"./chunk-74I3QBVP.js";import"./chunk-BLVYEJBC.js";import"./chunk-A6PYE4JS.js";import{a as c}from"./chunk-T23IKWCM.js";import{a as T,b as m}from"./chunk-HJ33TVGP.js";import{e as d}from"./chunk-WL4PTXMO.js";var w=new R;function a(t){t=c(t,c.EMPTY_OBJECT);let e=t.length,i=t.topRadius,f=t.bottomRadius,o=c(t.slices,128),r=Math.max(c(t.numberOfVerticalLines,16),0);if(m.typeOf.number("options.positions",e),m.typeOf.number("options.topRadius",i),m.typeOf.number("options.bottomRadius",f),m.typeOf.number.greaterThanOrEquals("options.slices",o,3),d(t.offsetAttribute)&&t.offsetAttribute===V.TOP)throw new T("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._length=e,this._topRadius=i,this._bottomRadius=f,this._slices=o,this._numberOfVerticalLines=r,this._offsetAttribute=t.offsetAttribute,this._workerName="createCylinderOutlineGeometry"}a.packedLength=6;a.pack=function(t,e,i){return m.typeOf.object("value",t),m.defined("array",e),i=c(i,0),e[i++]=t._length,e[i++]=t._topRadius,e[i++]=t._bottomRadius,e[i++]=t._slices,e[i++]=t._numberOfVerticalLines,e[i]=c(t._offsetAttribute,-1),e};var b={length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};a.unpack=function(t,e,i){m.defined("array",t),e=c(e,0);let f=t[e++],o=t[e++],r=t[e++],h=t[e++],l=t[e++],p=t[e];return d(i)?(i._length=f,i._topRadius=o,i._bottomRadius=r,i._slices=h,i._numberOfVerticalLines=l,i._offsetAttribute=p===-1?void 0:p,i):(b.length=f,b.topRadius=o,b.bottomRadius=r,b.slices=h,b.numberOfVerticalLines=l,b.offsetAttribute=p===-1?void 0:p,new a(b))};a.createGeometry=function(t){let e=t._length,i=t._topRadius,f=t._bottomRadius,o=t._slices,r=t._numberOfVerticalLines;if(e<=0||i<0||f<0||i===0&&f===0)return;let h=o*2,l=M.computePositions(e,i,f,o,!1),p=o*2,E;if(r>0){let O=Math.min(r,o);E=Math.round(o/O),p+=O}let s=N.createTypedArray(h,p*2),u=0,n;for(n=0;n<o-1;n++)s[u++]=n,s[u++]=n+1,s[u++]=n+o,s[u++]=n+1+o;if(s[u++]=o-1,s[u++]=0,s[u++]=o+o-1,s[u++]=o,r>0)for(n=0;n<o;n+=E)s[u++]=n,s[u++]=n+o;let _=new k;_.position=new L({componentDatatype:A.DOUBLE,componentsPerAttribute:3,values:l}),w.x=e*.5,w.y=Math.max(f,i);let g=new y(S.ZERO,R.magnitude(w));if(d(t._offsetAttribute)){e=l.length;let O=t._offsetAttribute===V.NONE?0:1,B=new Uint8Array(e/3).fill(O);_.applyOffset=new L({componentDatatype:A.UNSIGNED_BYTE,componentsPerAttribute:1,values:B})}return new P({attributes:_,indices:s,primitiveType:D.LINES,boundingSphere:g,offsetAttribute:t._offsetAttribute})};var C=a;function G(t,e){return d(e)&&(t=C.unpack(t,e)),C.createGeometry(t)}var et=G;export{et as default}; |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.116 | ||
* Version 1.116.1 | ||
* | ||
@@ -26,2 +26,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
import{a as o}from"./chunk-5J7YBBQK.js";import"./chunk-4LWXONMT.js";import"./chunk-ZZAO5JE6.js";import"./chunk-EJXUGS5C.js";import"./chunk-BMTOWA7K.js";import"./chunk-W2YTVRCC.js";import"./chunk-TXIAMGDC.js";import"./chunk-TK2AA6M2.js";import"./chunk-LGFQRF3V.js";import"./chunk-AHZBRYZA.js";import"./chunk-TWAPNO4J.js";import"./chunk-FSXLPWHR.js";import"./chunk-37KLWU3W.js";import"./chunk-HTNJJ6YO.js";import"./chunk-63E276CT.js";import"./chunk-NRW2R4YV.js";import"./chunk-NSILPUHD.js";import"./chunk-M7WODBAD.js";import{a as t,d as c}from"./chunk-J26GWQSN.js";import"./chunk-PYB3IV2X.js";import"./chunk-H7FFK4U5.js";import"./chunk-YEUII2A5.js";import"./chunk-4353PD6R.js";import"./chunk-2S4UUFD6.js";import{e as n}from"./chunk-42VHSORI.js";function a(r,i){return n(i)&&(r=o.unpack(r,i)),r._center=t.clone(r._center),r._ellipsoid=c.clone(r._ellipsoid),o.createGeometry(r)}var u=a;export{u as default}; | ||
import{a as o}from"./chunk-67GRNFJC.js";import"./chunk-4LGF3GFD.js";import"./chunk-CFX77L57.js";import"./chunk-CKVHMDPC.js";import"./chunk-JAMWPWOV.js";import"./chunk-IQ7DLQQP.js";import"./chunk-XJCFZEZW.js";import"./chunk-64WQCGAE.js";import"./chunk-QC62DG5W.js";import"./chunk-R6IH5WM5.js";import"./chunk-ROROM35N.js";import"./chunk-F5TB5EI7.js";import"./chunk-VAPKZ5PR.js";import"./chunk-DXGEUDM7.js";import"./chunk-5IUHFVP3.js";import"./chunk-OE3P25NW.js";import"./chunk-HIT4T4MS.js";import"./chunk-3KRBUMEX.js";import{a as t,d as c}from"./chunk-PQ6NV4GA.js";import"./chunk-74I3QBVP.js";import"./chunk-BLVYEJBC.js";import"./chunk-A6PYE4JS.js";import"./chunk-T23IKWCM.js";import"./chunk-HJ33TVGP.js";import{e as n}from"./chunk-WL4PTXMO.js";function a(r,i){return n(i)&&(r=o.unpack(r,i)),r._center=t.clone(r._center),r._ellipsoid=c.clone(r._ellipsoid),o.createGeometry(r)}var u=a;export{u as default}; |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.116 | ||
* Version 1.116.1 | ||
* | ||
@@ -26,2 +26,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
import{a as i}from"./chunk-I2MF4BQC.js";import"./chunk-4LWXONMT.js";import"./chunk-TXIAMGDC.js";import"./chunk-TWAPNO4J.js";import"./chunk-FSXLPWHR.js";import"./chunk-37KLWU3W.js";import"./chunk-HTNJJ6YO.js";import"./chunk-63E276CT.js";import"./chunk-NRW2R4YV.js";import"./chunk-NSILPUHD.js";import"./chunk-M7WODBAD.js";import{a as t,d as c}from"./chunk-J26GWQSN.js";import"./chunk-PYB3IV2X.js";import"./chunk-H7FFK4U5.js";import"./chunk-YEUII2A5.js";import"./chunk-4353PD6R.js";import"./chunk-2S4UUFD6.js";import{e as o}from"./chunk-42VHSORI.js";function a(r,n){return o(n)&&(r=i.unpack(r,n)),r._center=t.clone(r._center),r._ellipsoid=c.clone(r._ellipsoid),i.createGeometry(r)}var p=a;export{p as default}; | ||
import{a as i}from"./chunk-P7P53TVD.js";import"./chunk-4LGF3GFD.js";import"./chunk-XJCFZEZW.js";import"./chunk-ROROM35N.js";import"./chunk-F5TB5EI7.js";import"./chunk-VAPKZ5PR.js";import"./chunk-DXGEUDM7.js";import"./chunk-5IUHFVP3.js";import"./chunk-OE3P25NW.js";import"./chunk-HIT4T4MS.js";import"./chunk-3KRBUMEX.js";import{a as t,d as c}from"./chunk-PQ6NV4GA.js";import"./chunk-74I3QBVP.js";import"./chunk-BLVYEJBC.js";import"./chunk-A6PYE4JS.js";import"./chunk-T23IKWCM.js";import"./chunk-HJ33TVGP.js";import{e as o}from"./chunk-WL4PTXMO.js";function a(r,n){return o(n)&&(r=i.unpack(r,n)),r._center=t.clone(r._center),r._ellipsoid=c.clone(r._ellipsoid),i.createGeometry(r)}var p=a;export{p as default}; |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.116 | ||
* Version 1.116.1 | ||
* | ||
@@ -26,2 +26,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
import{a as e}from"./chunk-DTEVYUV6.js";import"./chunk-TXIAMGDC.js";import"./chunk-TK2AA6M2.js";import"./chunk-TWAPNO4J.js";import"./chunk-FSXLPWHR.js";import"./chunk-37KLWU3W.js";import"./chunk-HTNJJ6YO.js";import"./chunk-63E276CT.js";import"./chunk-NRW2R4YV.js";import"./chunk-NSILPUHD.js";import"./chunk-M7WODBAD.js";import"./chunk-J26GWQSN.js";import"./chunk-PYB3IV2X.js";import"./chunk-H7FFK4U5.js";import"./chunk-YEUII2A5.js";import"./chunk-4353PD6R.js";import"./chunk-2S4UUFD6.js";import{e as o}from"./chunk-42VHSORI.js";function i(r,t){return o(t)&&(r=e.unpack(r,t)),e.createGeometry(r)}var a=i;export{a as default}; | ||
import{a as e}from"./chunk-KOBAXN2X.js";import"./chunk-XJCFZEZW.js";import"./chunk-64WQCGAE.js";import"./chunk-ROROM35N.js";import"./chunk-F5TB5EI7.js";import"./chunk-VAPKZ5PR.js";import"./chunk-DXGEUDM7.js";import"./chunk-5IUHFVP3.js";import"./chunk-OE3P25NW.js";import"./chunk-HIT4T4MS.js";import"./chunk-3KRBUMEX.js";import"./chunk-PQ6NV4GA.js";import"./chunk-74I3QBVP.js";import"./chunk-BLVYEJBC.js";import"./chunk-A6PYE4JS.js";import"./chunk-T23IKWCM.js";import"./chunk-HJ33TVGP.js";import{e as o}from"./chunk-WL4PTXMO.js";function i(r,t){return o(t)&&(r=e.unpack(r,t)),e.createGeometry(r)}var a=i;export{a as default}; |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.116 | ||
* Version 1.116.1 | ||
* | ||
@@ -26,2 +26,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
import{a as t}from"./chunk-B7XFA4YC.js";import"./chunk-TXIAMGDC.js";import"./chunk-TWAPNO4J.js";import"./chunk-FSXLPWHR.js";import"./chunk-37KLWU3W.js";import"./chunk-HTNJJ6YO.js";import"./chunk-63E276CT.js";import"./chunk-NRW2R4YV.js";import"./chunk-NSILPUHD.js";import"./chunk-M7WODBAD.js";import"./chunk-J26GWQSN.js";import"./chunk-PYB3IV2X.js";import"./chunk-H7FFK4U5.js";import"./chunk-YEUII2A5.js";import"./chunk-4353PD6R.js";import"./chunk-2S4UUFD6.js";import{e as n}from"./chunk-42VHSORI.js";function u(r,e){return n(r.buffer,e)&&(r=t.unpack(r,e)),t.createGeometry(r)}var a=u;export{a as default}; | ||
import{a as t}from"./chunk-E4SFEH5X.js";import"./chunk-XJCFZEZW.js";import"./chunk-ROROM35N.js";import"./chunk-F5TB5EI7.js";import"./chunk-VAPKZ5PR.js";import"./chunk-DXGEUDM7.js";import"./chunk-5IUHFVP3.js";import"./chunk-OE3P25NW.js";import"./chunk-HIT4T4MS.js";import"./chunk-3KRBUMEX.js";import"./chunk-PQ6NV4GA.js";import"./chunk-74I3QBVP.js";import"./chunk-BLVYEJBC.js";import"./chunk-A6PYE4JS.js";import"./chunk-T23IKWCM.js";import"./chunk-HJ33TVGP.js";import{e as n}from"./chunk-WL4PTXMO.js";function u(r,e){return n(r.buffer,e)&&(r=t.unpack(r,e)),t.createGeometry(r)}var a=u;export{a as default}; |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.116 | ||
* Version 1.116.1 | ||
* | ||
@@ -26,2 +26,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
import{c as r}from"./chunk-TFV4LXCD.js";import"./chunk-TK2AA6M2.js";import"./chunk-AHZBRYZA.js";import"./chunk-FSXLPWHR.js";import"./chunk-37KLWU3W.js";import"./chunk-HTNJJ6YO.js";import"./chunk-63E276CT.js";import"./chunk-NRW2R4YV.js";import"./chunk-NSILPUHD.js";import"./chunk-M7WODBAD.js";import"./chunk-J26GWQSN.js";import"./chunk-PYB3IV2X.js";import"./chunk-H7FFK4U5.js";import"./chunk-YEUII2A5.js";import"./chunk-4353PD6R.js";import"./chunk-2S4UUFD6.js";import{e as o}from"./chunk-42VHSORI.js";function i(e,t){return o(t)&&(e=r.unpack(e,t)),r.createGeometry(e)}var a=i;export{a as default}; | ||
import{c as r}from"./chunk-3RH3LXP7.js";import"./chunk-64WQCGAE.js";import"./chunk-R6IH5WM5.js";import"./chunk-F5TB5EI7.js";import"./chunk-VAPKZ5PR.js";import"./chunk-DXGEUDM7.js";import"./chunk-5IUHFVP3.js";import"./chunk-OE3P25NW.js";import"./chunk-HIT4T4MS.js";import"./chunk-3KRBUMEX.js";import"./chunk-PQ6NV4GA.js";import"./chunk-74I3QBVP.js";import"./chunk-BLVYEJBC.js";import"./chunk-A6PYE4JS.js";import"./chunk-T23IKWCM.js";import"./chunk-HJ33TVGP.js";import{e as o}from"./chunk-WL4PTXMO.js";function i(e,t){return o(t)&&(e=r.unpack(e,t)),r.createGeometry(e)}var a=i;export{a as default}; |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.116 | ||
* Version 1.116.1 | ||
* | ||
@@ -26,2 +26,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
import{a as k,b as _,c as j}from"./chunk-TFV4LXCD.js";import"./chunk-TK2AA6M2.js";import"./chunk-AHZBRYZA.js";import{a as A}from"./chunk-FSXLPWHR.js";import{b as N,c as g,d as F}from"./chunk-37KLWU3W.js";import{d as T,e as s}from"./chunk-HTNJJ6YO.js";import"./chunk-63E276CT.js";import"./chunk-NRW2R4YV.js";import"./chunk-NSILPUHD.js";import{a as b}from"./chunk-M7WODBAD.js";import{a}from"./chunk-J26GWQSN.js";import"./chunk-PYB3IV2X.js";import"./chunk-H7FFK4U5.js";import"./chunk-YEUII2A5.js";import{a as d}from"./chunk-4353PD6R.js";import{b as h}from"./chunk-2S4UUFD6.js";import{e as w}from"./chunk-42VHSORI.js";var L=0,C=1;function l(e){h.typeOf.object("options",e),h.typeOf.object("options.frustum",e.frustum),h.typeOf.object("options.origin",e.origin),h.typeOf.object("options.orientation",e.orientation);let t=e.frustum,o=e.orientation,u=e.origin,c=d(e._drawNearPlane,!0),m,p;t instanceof _?(m=L,p=_.packedLength):t instanceof k&&(m=C,p=k.packedLength),this._frustumType=m,this._frustum=t.clone(),this._origin=a.clone(u),this._orientation=s.clone(o),this._drawNearPlane=c,this._workerName="createFrustumOutlineGeometry",this.packedLength=2+p+a.packedLength+s.packedLength}l.pack=function(e,t,o){h.typeOf.object("value",e),h.defined("array",t),o=d(o,0);let u=e._frustumType,c=e._frustum;return t[o++]=u,u===L?(_.pack(c,t,o),o+=_.packedLength):(k.pack(c,t,o),o+=k.packedLength),a.pack(e._origin,t,o),o+=a.packedLength,s.pack(e._orientation,t,o),o+=s.packedLength,t[o]=e._drawNearPlane?1:0,t};var E=new _,G=new k,R=new s,S=new a;l.unpack=function(e,t,o){h.defined("array",e),t=d(t,0);let u=e[t++],c;u===L?(c=_.unpack(e,t,E),t+=_.packedLength):(c=k.unpack(e,t,G),t+=k.packedLength);let m=a.unpack(e,t,S);t+=a.packedLength;let p=s.unpack(e,t,R);t+=s.packedLength;let P=e[t]===1;if(!w(o))return new l({frustum:c,origin:m,orientation:p,_drawNearPlane:P});let n=u===o._frustumType?o._frustum:void 0;return o._frustum=c.clone(n),o._frustumType=u,o._origin=a.clone(m,o._origin),o._orientation=s.clone(p,o._orientation),o._drawNearPlane=P,o};l.createGeometry=function(e){let t=e._frustumType,o=e._frustum,u=e._origin,c=e._orientation,m=e._drawNearPlane,p=new Float64Array(3*4*2);j._computeNearFarPlanes(u,c,t,o,p);let P=new A({position:new F({componentDatatype:b.DOUBLE,componentsPerAttribute:3,values:p})}),n,r,y=m?2:1,i=new Uint16Array(8*(y+1)),f=m?0:1;for(;f<2;++f)n=m?f*8:0,r=f*4,i[n]=r,i[n+1]=r+1,i[n+2]=r+1,i[n+3]=r+2,i[n+4]=r+2,i[n+5]=r+3,i[n+6]=r+3,i[n+7]=r;for(f=0;f<2;++f)n=(y+f)*8,r=f*4,i[n]=r,i[n+1]=r+4,i[n+2]=r+1,i[n+3]=r+5,i[n+4]=r+2,i[n+5]=r+6,i[n+6]=r+3,i[n+7]=r+7;return new g({attributes:P,indices:i,primitiveType:N.LINES,boundingSphere:T.fromVertices(p)})};var O=l;function D(e,t){return w(t)&&(e=O.unpack(e,t)),O.createGeometry(e)}var I=D;export{I as default}; | ||
import{a as k,b as _,c as j}from"./chunk-3RH3LXP7.js";import"./chunk-64WQCGAE.js";import"./chunk-R6IH5WM5.js";import{a as A}from"./chunk-F5TB5EI7.js";import{b as N,c as g,d as F}from"./chunk-VAPKZ5PR.js";import{d as T,e as s}from"./chunk-DXGEUDM7.js";import"./chunk-5IUHFVP3.js";import"./chunk-OE3P25NW.js";import"./chunk-HIT4T4MS.js";import{a as b}from"./chunk-3KRBUMEX.js";import{a}from"./chunk-PQ6NV4GA.js";import"./chunk-74I3QBVP.js";import"./chunk-BLVYEJBC.js";import"./chunk-A6PYE4JS.js";import{a as d}from"./chunk-T23IKWCM.js";import{b as h}from"./chunk-HJ33TVGP.js";import{e as w}from"./chunk-WL4PTXMO.js";var L=0,C=1;function l(e){h.typeOf.object("options",e),h.typeOf.object("options.frustum",e.frustum),h.typeOf.object("options.origin",e.origin),h.typeOf.object("options.orientation",e.orientation);let t=e.frustum,o=e.orientation,u=e.origin,c=d(e._drawNearPlane,!0),m,p;t instanceof _?(m=L,p=_.packedLength):t instanceof k&&(m=C,p=k.packedLength),this._frustumType=m,this._frustum=t.clone(),this._origin=a.clone(u),this._orientation=s.clone(o),this._drawNearPlane=c,this._workerName="createFrustumOutlineGeometry",this.packedLength=2+p+a.packedLength+s.packedLength}l.pack=function(e,t,o){h.typeOf.object("value",e),h.defined("array",t),o=d(o,0);let u=e._frustumType,c=e._frustum;return t[o++]=u,u===L?(_.pack(c,t,o),o+=_.packedLength):(k.pack(c,t,o),o+=k.packedLength),a.pack(e._origin,t,o),o+=a.packedLength,s.pack(e._orientation,t,o),o+=s.packedLength,t[o]=e._drawNearPlane?1:0,t};var E=new _,G=new k,R=new s,S=new a;l.unpack=function(e,t,o){h.defined("array",e),t=d(t,0);let u=e[t++],c;u===L?(c=_.unpack(e,t,E),t+=_.packedLength):(c=k.unpack(e,t,G),t+=k.packedLength);let m=a.unpack(e,t,S);t+=a.packedLength;let p=s.unpack(e,t,R);t+=s.packedLength;let P=e[t]===1;if(!w(o))return new l({frustum:c,origin:m,orientation:p,_drawNearPlane:P});let n=u===o._frustumType?o._frustum:void 0;return o._frustum=c.clone(n),o._frustumType=u,o._origin=a.clone(m,o._origin),o._orientation=s.clone(p,o._orientation),o._drawNearPlane=P,o};l.createGeometry=function(e){let t=e._frustumType,o=e._frustum,u=e._origin,c=e._orientation,m=e._drawNearPlane,p=new Float64Array(3*4*2);j._computeNearFarPlanes(u,c,t,o,p);let P=new A({position:new F({componentDatatype:b.DOUBLE,componentsPerAttribute:3,values:p})}),n,r,y=m?2:1,i=new Uint16Array(8*(y+1)),f=m?0:1;for(;f<2;++f)n=m?f*8:0,r=f*4,i[n]=r,i[n+1]=r+1,i[n+2]=r+1,i[n+3]=r+2,i[n+4]=r+2,i[n+5]=r+3,i[n+6]=r+3,i[n+7]=r;for(f=0;f<2;++f)n=(y+f)*8,r=f*4,i[n]=r,i[n+1]=r+4,i[n+2]=r+1,i[n+3]=r+5,i[n+4]=r+2,i[n+5]=r+6,i[n+6]=r+3,i[n+7]=r+7;return new g({attributes:P,indices:i,primitiveType:N.LINES,boundingSphere:T.fromVertices(p)})};var O=l;function D(e,t){return w(t)&&(e=O.unpack(e,t)),O.createGeometry(e)}var I=D;export{I as default}; |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.116 | ||
* Version 1.116.1 | ||
* | ||
@@ -26,2 +26,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
import{a as d}from"./chunk-ACKL3UCP.js";import{a as w}from"./chunk-4PZYNNSN.js";import"./chunk-TM5U646E.js";import"./chunk-EJXUGS5C.js";import"./chunk-BMTOWA7K.js";import"./chunk-W2YTVRCC.js";import"./chunk-LGFQRF3V.js";import"./chunk-AHZBRYZA.js";import"./chunk-TWAPNO4J.js";import"./chunk-FSXLPWHR.js";import"./chunk-37KLWU3W.js";import"./chunk-HTNJJ6YO.js";import"./chunk-63E276CT.js";import"./chunk-NRW2R4YV.js";import"./chunk-NSILPUHD.js";import"./chunk-M7WODBAD.js";import"./chunk-J26GWQSN.js";import"./chunk-PYB3IV2X.js";import"./chunk-H7FFK4U5.js";import"./chunk-YEUII2A5.js";import{a as k}from"./chunk-4353PD6R.js";import{a as y}from"./chunk-2S4UUFD6.js";import{a,b as p,e as r}from"./chunk-42VHSORI.js";var b=p({"./combineGeometry.js":()=>import("./combineGeometry.js"),"./createBoxGeometry.js":()=>import("./createBoxGeometry.js"),"./createBoxOutlineGeometry.js":()=>import("./createBoxOutlineGeometry.js"),"./createCircleGeometry.js":()=>import("./createCircleGeometry.js"),"./createCircleOutlineGeometry.js":()=>import("./createCircleOutlineGeometry.js"),"./createCoplanarPolygonGeometry.js":()=>import("./createCoplanarPolygonGeometry.js"),"./createCoplanarPolygonOutlineGeometry.js":()=>import("./createCoplanarPolygonOutlineGeometry.js"),"./createCorridorGeometry.js":()=>import("./createCorridorGeometry.js"),"./createCorridorOutlineGeometry.js":()=>import("./createCorridorOutlineGeometry.js"),"./createCylinderGeometry.js":()=>import("./createCylinderGeometry.js"),"./createCylinderOutlineGeometry.js":()=>import("./createCylinderOutlineGeometry.js"),"./createEllipseGeometry.js":()=>import("./createEllipseGeometry.js"),"./createEllipseOutlineGeometry.js":()=>import("./createEllipseOutlineGeometry.js"),"./createEllipsoidGeometry.js":()=>import("./createEllipsoidGeometry.js"),"./createEllipsoidOutlineGeometry.js":()=>import("./createEllipsoidOutlineGeometry.js"),"./createFrustumGeometry.js":()=>import("./createFrustumGeometry.js"),"./createFrustumOutlineGeometry.js":()=>import("./createFrustumOutlineGeometry.js"),"./createGeometry.js":()=>import("./createGeometry.js"),"./createGroundPolylineGeometry.js":()=>import("./createGroundPolylineGeometry.js"),"./createPlaneGeometry.js":()=>import("./createPlaneGeometry.js"),"./createPlaneOutlineGeometry.js":()=>import("./createPlaneOutlineGeometry.js"),"./createPolygonGeometry.js":()=>import("./createPolygonGeometry.js"),"./createPolygonOutlineGeometry.js":()=>import("./createPolygonOutlineGeometry.js"),"./createPolylineGeometry.js":()=>import("./createPolylineGeometry.js"),"./createPolylineVolumeGeometry.js":()=>import("./createPolylineVolumeGeometry.js"),"./createPolylineVolumeOutlineGeometry.js":()=>import("./createPolylineVolumeOutlineGeometry.js"),"./createRectangleGeometry.js":()=>import("./createRectangleGeometry.js"),"./createRectangleOutlineGeometry.js":()=>import("./createRectangleOutlineGeometry.js"),"./createSimplePolylineGeometry.js":()=>import("./createSimplePolylineGeometry.js"),"./createSphereGeometry.js":()=>import("./createSphereGeometry.js"),"./createSphereOutlineGeometry.js":()=>import("./createSphereOutlineGeometry.js"),"./createTaskProcessorWorker.js":()=>import("./createTaskProcessorWorker.js"),"./createVectorTileClampedPolylines.js":()=>import("./createVectorTileClampedPolylines.js"),"./createVectorTileGeometries.js":()=>import("./createVectorTileGeometries.js"),"./createVectorTilePoints.js":()=>import("./createVectorTilePoints.js"),"./createVectorTilePolygons.js":()=>import("./createVectorTilePolygons.js"),"./createVectorTilePolylines.js":()=>import("./createVectorTilePolylines.js"),"./createVerticesFromGoogleEarthEnterpriseBuffer.js":()=>import("./createVerticesFromGoogleEarthEnterpriseBuffer.js"),"./createVerticesFromHeightmap.js":()=>import("./createVerticesFromHeightmap.js"),"./createVerticesFromQuantizedTerrainMesh.js":()=>import("./createVerticesFromQuantizedTerrainMesh.js"),"./createWallGeometry.js":()=>import("./createWallGeometry.js"),"./createWallOutlineGeometry.js":()=>import("./createWallOutlineGeometry.js"),"./decodeDraco.js":()=>import("./decodeDraco.js"),"./decodeGoogleEarthEnterprisePacket.js":()=>import("./decodeGoogleEarthEnterprisePacket.js"),"./decodeI3S.js":()=>import("./decodeI3S.js"),"./transcodeKTX2.js":()=>import("./transcodeKTX2.js"),"./transferTypedArrayTest.js":()=>import("./transferTypedArrayTest.js"),"./upsampleQuantizedTerrainMesh.js":()=>import("./upsampleQuantizedTerrainMesh.js")});var f={};async function h(s,t){let e=k(f[t],f[s]);return r(e)?e:r(t)?(typeof exports=="object"?e=a(t):e=(await import(t)).default,f[t]=e,e):(typeof exports=="object"?e=a(`Workers/${s}`):e=(r(t)?await import(t):await b(`./${s}.js`)).default,f[s]=e,e)}async function x(s,t){let e=s.subTasks,n=e.length,u=new Array(n);for(let o=0;o<n;o++){let i=e[o],m=i.geometry,l=i.moduleName,c=i.modulePath;if(r(l)&&r(c))throw new y("Must only set moduleName or modulePath");r(l)||r(c)?u[o]=h(l,c).then(g=>g(m,i.offset)):u[o]=m}return Promise.all(u).then(function(o){return d.packCreateGeometryResults(o,t)})}var P=w(x);export{P as default}; | ||
import{a as d}from"./chunk-2ORNL2GN.js";import{a as w}from"./chunk-F3CCIWXX.js";import"./chunk-WEQDXQHF.js";import"./chunk-CKVHMDPC.js";import"./chunk-JAMWPWOV.js";import"./chunk-IQ7DLQQP.js";import"./chunk-QC62DG5W.js";import"./chunk-R6IH5WM5.js";import"./chunk-ROROM35N.js";import"./chunk-F5TB5EI7.js";import"./chunk-VAPKZ5PR.js";import"./chunk-DXGEUDM7.js";import"./chunk-5IUHFVP3.js";import"./chunk-OE3P25NW.js";import"./chunk-HIT4T4MS.js";import"./chunk-3KRBUMEX.js";import"./chunk-PQ6NV4GA.js";import"./chunk-74I3QBVP.js";import"./chunk-BLVYEJBC.js";import"./chunk-A6PYE4JS.js";import{a as k}from"./chunk-T23IKWCM.js";import{a as y}from"./chunk-HJ33TVGP.js";import{a,b as p,e as r}from"./chunk-WL4PTXMO.js";var b=p({"./combineGeometry.js":()=>import("./combineGeometry.js"),"./createBoxGeometry.js":()=>import("./createBoxGeometry.js"),"./createBoxOutlineGeometry.js":()=>import("./createBoxOutlineGeometry.js"),"./createCircleGeometry.js":()=>import("./createCircleGeometry.js"),"./createCircleOutlineGeometry.js":()=>import("./createCircleOutlineGeometry.js"),"./createCoplanarPolygonGeometry.js":()=>import("./createCoplanarPolygonGeometry.js"),"./createCoplanarPolygonOutlineGeometry.js":()=>import("./createCoplanarPolygonOutlineGeometry.js"),"./createCorridorGeometry.js":()=>import("./createCorridorGeometry.js"),"./createCorridorOutlineGeometry.js":()=>import("./createCorridorOutlineGeometry.js"),"./createCylinderGeometry.js":()=>import("./createCylinderGeometry.js"),"./createCylinderOutlineGeometry.js":()=>import("./createCylinderOutlineGeometry.js"),"./createEllipseGeometry.js":()=>import("./createEllipseGeometry.js"),"./createEllipseOutlineGeometry.js":()=>import("./createEllipseOutlineGeometry.js"),"./createEllipsoidGeometry.js":()=>import("./createEllipsoidGeometry.js"),"./createEllipsoidOutlineGeometry.js":()=>import("./createEllipsoidOutlineGeometry.js"),"./createFrustumGeometry.js":()=>import("./createFrustumGeometry.js"),"./createFrustumOutlineGeometry.js":()=>import("./createFrustumOutlineGeometry.js"),"./createGeometry.js":()=>import("./createGeometry.js"),"./createGroundPolylineGeometry.js":()=>import("./createGroundPolylineGeometry.js"),"./createPlaneGeometry.js":()=>import("./createPlaneGeometry.js"),"./createPlaneOutlineGeometry.js":()=>import("./createPlaneOutlineGeometry.js"),"./createPolygonGeometry.js":()=>import("./createPolygonGeometry.js"),"./createPolygonOutlineGeometry.js":()=>import("./createPolygonOutlineGeometry.js"),"./createPolylineGeometry.js":()=>import("./createPolylineGeometry.js"),"./createPolylineVolumeGeometry.js":()=>import("./createPolylineVolumeGeometry.js"),"./createPolylineVolumeOutlineGeometry.js":()=>import("./createPolylineVolumeOutlineGeometry.js"),"./createRectangleGeometry.js":()=>import("./createRectangleGeometry.js"),"./createRectangleOutlineGeometry.js":()=>import("./createRectangleOutlineGeometry.js"),"./createSimplePolylineGeometry.js":()=>import("./createSimplePolylineGeometry.js"),"./createSphereGeometry.js":()=>import("./createSphereGeometry.js"),"./createSphereOutlineGeometry.js":()=>import("./createSphereOutlineGeometry.js"),"./createTaskProcessorWorker.js":()=>import("./createTaskProcessorWorker.js"),"./createVectorTileClampedPolylines.js":()=>import("./createVectorTileClampedPolylines.js"),"./createVectorTileGeometries.js":()=>import("./createVectorTileGeometries.js"),"./createVectorTilePoints.js":()=>import("./createVectorTilePoints.js"),"./createVectorTilePolygons.js":()=>import("./createVectorTilePolygons.js"),"./createVectorTilePolylines.js":()=>import("./createVectorTilePolylines.js"),"./createVerticesFromGoogleEarthEnterpriseBuffer.js":()=>import("./createVerticesFromGoogleEarthEnterpriseBuffer.js"),"./createVerticesFromHeightmap.js":()=>import("./createVerticesFromHeightmap.js"),"./createVerticesFromQuantizedTerrainMesh.js":()=>import("./createVerticesFromQuantizedTerrainMesh.js"),"./createWallGeometry.js":()=>import("./createWallGeometry.js"),"./createWallOutlineGeometry.js":()=>import("./createWallOutlineGeometry.js"),"./decodeDraco.js":()=>import("./decodeDraco.js"),"./decodeGoogleEarthEnterprisePacket.js":()=>import("./decodeGoogleEarthEnterprisePacket.js"),"./decodeI3S.js":()=>import("./decodeI3S.js"),"./transcodeKTX2.js":()=>import("./transcodeKTX2.js"),"./transferTypedArrayTest.js":()=>import("./transferTypedArrayTest.js"),"./upsampleQuantizedTerrainMesh.js":()=>import("./upsampleQuantizedTerrainMesh.js")});var f={};async function h(s,t){let e=k(f[t],f[s]);return r(e)?e:r(t)?(typeof exports=="object"?e=a(t):e=(await import(t)).default,f[t]=e,e):(typeof exports=="object"?e=a(`Workers/${s}`):e=(r(t)?await import(t):await b(`./${s}.js`)).default,f[s]=e,e)}async function x(s,t){let e=s.subTasks,n=e.length,u=new Array(n);for(let o=0;o<n;o++){let i=e[o],m=i.geometry,l=i.moduleName,c=i.modulePath;if(r(l)&&r(c))throw new y("Must only set moduleName or modulePath");r(l)||r(c)?u[o]=h(l,c).then(g=>g(m,i.offset)):u[o]=m}return Promise.all(u).then(function(o){return d.packCreateGeometryResults(o,t)})}var P=w(x);export{P as default}; |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.116 | ||
* Version 1.116.1 | ||
* | ||
@@ -26,2 +26,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
import{a as _e}from"./chunk-TM5U646E.js";import{a as Z}from"./chunk-7VY24AS3.js";import{a as _t}from"./chunk-W2YTVRCC.js";import{a as Oe}from"./chunk-M5A47EM2.js";import{a as Le}from"./chunk-5CBMSEPD.js";import{a as te}from"./chunk-2DF4CAYN.js";import{b as Qt}from"./chunk-LGFQRF3V.js";import{a as jt}from"./chunk-AHZBRYZA.js";import{c as Ce,d as zt}from"./chunk-37KLWU3W.js";import{a as bt,d as U,e as Kt,f as xe,g as Ne}from"./chunk-HTNJJ6YO.js";import"./chunk-63E276CT.js";import"./chunk-NRW2R4YV.js";import{c as G}from"./chunk-NSILPUHD.js";import{a as Bt}from"./chunk-M7WODBAD.js";import{a as t,b as u,c as Pt,d as z,e as vt}from"./chunk-J26GWQSN.js";import{a as p}from"./chunk-PYB3IV2X.js";import"./chunk-H7FFK4U5.js";import"./chunk-YEUII2A5.js";import{a as O}from"./chunk-4353PD6R.js";import{a as St,b as et}from"./chunk-2S4UUFD6.js";import{e as g}from"./chunk-42VHSORI.js";function rt(e){e=O(e,O.EMPTY_OBJECT),this._ellipsoid=O(e.ellipsoid,z.WGS84),this._rectangle=O(e.rectangle,G.MAX_VALUE),this._projection=new bt(this._ellipsoid),this._numberOfLevelZeroTilesX=O(e.numberOfLevelZeroTilesX,2),this._numberOfLevelZeroTilesY=O(e.numberOfLevelZeroTilesY,1)}Object.defineProperties(rt.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}});rt.prototype.getNumberOfXTilesAtLevel=function(e){return this._numberOfLevelZeroTilesX<<e};rt.prototype.getNumberOfYTilesAtLevel=function(e){return this._numberOfLevelZeroTilesY<<e};rt.prototype.rectangleToNativeRectangle=function(e,i){et.defined("rectangle",e);let r=p.toDegrees(e.west),n=p.toDegrees(e.south),o=p.toDegrees(e.east),a=p.toDegrees(e.north);return g(i)?(i.west=r,i.south=n,i.east=o,i.north=a,i):new G(r,n,o,a)};rt.prototype.tileXYToNativeRectangle=function(e,i,r,n){let o=this.tileXYToRectangle(e,i,r,n);return o.west=p.toDegrees(o.west),o.south=p.toDegrees(o.south),o.east=p.toDegrees(o.east),o.north=p.toDegrees(o.north),o};rt.prototype.tileXYToRectangle=function(e,i,r,n){let o=this._rectangle,a=this.getNumberOfXTilesAtLevel(r),c=this.getNumberOfYTilesAtLevel(r),l=o.width/a,s=e*l+o.west,d=(e+1)*l+o.west,h=o.height/c,N=o.north-i*h,S=o.north-(i+1)*h;return g(n)||(n=new G(s,S,d,N)),n.west=s,n.south=S,n.east=d,n.north=N,n};rt.prototype.positionToTileXY=function(e,i,r){let n=this._rectangle;if(!G.contains(n,e))return;let o=this.getNumberOfXTilesAtLevel(i),a=this.getNumberOfYTilesAtLevel(i),c=n.width/o,l=n.height/a,s=e.longitude;n.east<n.west&&(s+=p.TWO_PI);let d=(s-n.west)/c|0;d>=o&&(d=o-1);let h=(n.north-e.latitude)/l|0;return h>=a&&(h=a-1),g(r)?(r.x=d,r.y=h,r):new Pt(d,h)};var De=rt;var Ie=new t,He=new t,ke=new u,ee=new t,hn=new t,ye=new U,pn=new De,Lt=[new u,new u,new u,new u],Ot=new Pt,w={};w.initialize=function(){let e=w._initPromise;return g(e)||(e=xe.fetchJson(Ne("Assets/approximateTerrainHeights.json")).then(function(i){w._terrainHeights=i}),w._initPromise=e),e};w.getMinimumMaximumHeights=function(e,i){if(et.defined("rectangle",e),!g(w._terrainHeights))throw new St("You must call ApproximateTerrainHeights.initialize and wait for the promise to resolve before using this function");i=O(i,z.WGS84);let r=Ae(e),n=w._defaultMinTerrainHeight,o=w._defaultMaxTerrainHeight;if(g(r)){let a=`${r.level}-${r.x}-${r.y}`,c=w._terrainHeights[a];g(c)&&(n=c[0],o=c[1]),i.cartographicToCartesian(G.northeast(e,ke),Ie),i.cartographicToCartesian(G.southwest(e,ke),He),t.midpoint(He,Ie,ee);let l=i.scaleToGeodeticSurface(ee,hn);if(g(l)){let s=t.distance(ee,l);n=Math.min(n,-s)}else n=w._defaultMinTerrainHeight}return n=Math.max(w._defaultMinTerrainHeight,n),{minimumTerrainHeight:n,maximumTerrainHeight:o}};w.getBoundingSphere=function(e,i){if(et.defined("rectangle",e),!g(w._terrainHeights))throw new St("You must call ApproximateTerrainHeights.initialize and wait for the promise to resolve before using this function");i=O(i,z.WGS84);let r=Ae(e),n=w._defaultMaxTerrainHeight;if(g(r)){let a=`${r.level}-${r.x}-${r.y}`,c=w._terrainHeights[a];g(c)&&(n=c[1])}let o=U.fromRectangle3D(e,i,0);return U.fromRectangle3D(e,i,n,ye),U.union(o,ye,o)};function Ae(e){u.fromRadians(e.east,e.north,0,Lt[0]),u.fromRadians(e.west,e.north,0,Lt[1]),u.fromRadians(e.east,e.south,0,Lt[2]),u.fromRadians(e.west,e.south,0,Lt[3]);let i=0,r=0,n=0,o=0,a=w._terrainHeightsMaxLevel,c;for(c=0;c<=a;++c){let l=!1;for(let s=0;s<4;++s){let d=Lt[s];if(pn.positionToTileXY(d,c,Ot),s===0)n=Ot.x,o=Ot.y;else if(n!==Ot.x||o!==Ot.y){l=!0;break}}if(l)break;i=n,r=o}if(c!==0)return{x:i,y:r,level:c>a?a:c-1}}w._terrainHeightsMaxLevel=6;w._defaultMaxTerrainHeight=9e3;w._defaultMinTerrainHeight=-1e5;w._terrainHeights=void 0;w._initPromise=void 0;Object.defineProperties(w,{initialized:{get:function(){return g(w._terrainHeights)}}});var Xt=w;var le=[bt,_e],dn=le.length,Ke=Math.cos(p.toRadians(30)),Me=Math.cos(p.toRadians(150)),Qe=0,tn=1e3;function ct(e){e=O(e,O.EMPTY_OBJECT);let i=e.positions;if(!g(i)||i.length<2)throw new St("At least two positions are required.");if(g(e.arcType)&&e.arcType!==Z.GEODESIC&&e.arcType!==Z.RHUMB)throw new St("Valid options for arcType are ArcType.GEODESIC and ArcType.RHUMB.");this.width=O(e.width,1),this._positions=i,this.granularity=O(e.granularity,9999),this.loop=O(e.loop,!1),this.arcType=O(e.arcType,Z.GEODESIC),this._ellipsoid=z.WGS84,this._projectionIndex=0,this._workerName="createGroundPolylineGeometry",this._scene3DOnly=!1}Object.defineProperties(ct.prototype,{packedLength:{get:function(){return 1+this._positions.length*3+1+1+1+z.packedLength+1+1}}});ct.setProjectionAndEllipsoid=function(e,i){let r=0;for(let n=0;n<dn;n++)if(i instanceof le[n]){r=n;break}e._projectionIndex=r,e._ellipsoid=i.ellipsoid};var fn=new t,Re=new t,Pe=new t;function se(e,i,r,n,o){let a=P(n,e,0,fn),c=P(n,e,r,Re),l=P(n,i,0,Pe),s=nt(c,a,Re),d=nt(l,a,Pe);return t.cross(d,s,o),t.normalize(o,o)}var mn=new u,gn=new t,un=new t,wn=new t;function ne(e,i,r,n,o,a,c,l,s,d,h){if(o===0)return;let N;a===Z.GEODESIC?N=new Oe(e,i,c):a===Z.RHUMB&&(N=new te(e,i,c));let S=N.surfaceDistance;if(S<o)return;let R=se(e,i,n,c,wn),D=Math.ceil(S/o),I=S/D,j=I,W=D-1,f=l.length;for(let X=0;X<W;X++){let v=N.interpolateUsingSurfaceDistance(j,mn),y=P(c,v,r,gn),H=P(c,v,n,un);t.pack(R,l,f),t.pack(y,s,f),t.pack(H,d,f),h.push(v.latitude),h.push(v.longitude),f+=3,j+=I}}var oe=new u;function P(e,i,r,n){return u.clone(i,oe),oe.height=r,u.toCartesian(oe,e,n)}ct.pack=function(e,i,r){et.typeOf.object("value",e),et.defined("array",i);let n=O(r,0),o=e._positions,a=o.length;i[n++]=a;for(let c=0;c<a;++c){let l=o[c];t.pack(l,i,n),n+=3}return i[n++]=e.granularity,i[n++]=e.loop?1:0,i[n++]=e.arcType,z.pack(e._ellipsoid,i,n),n+=z.packedLength,i[n++]=e._projectionIndex,i[n++]=e._scene3DOnly?1:0,i};ct.unpack=function(e,i,r){et.defined("array",e);let n=O(i,0),o=e[n++],a=new Array(o);for(let S=0;S<o;S++)a[S]=t.unpack(e,n),n+=3;let c=e[n++],l=e[n++]===1,s=e[n++],d=z.unpack(e,n);n+=z.packedLength;let h=e[n++],N=e[n++]===1;return g(r)||(r=new ct({positions:a})),r._positions=a,r.granularity=c,r.loop=l,r.arcType=s,r._ellipsoid=d,r._projectionIndex=h,r._scene3DOnly=N,r};function nt(e,i,r){return t.subtract(e,i,r),t.normalize(r,r),r}function be(e,i,r,n){return n=nt(e,i,n),n=t.cross(n,r,n),n=t.normalize(n,n),n=t.cross(r,n,n),n}var Sn=new t,Tn=new t,En=new t,en=new t,xn=0,Nn=-1;function ie(e,i,r,n,o){let a=nt(r,i,en),c=be(e,i,a,Sn),l=be(n,i,a,Tn);if(p.equalsEpsilon(t.dot(c,l),Nn,p.EPSILON5))return o=t.cross(a,c,o),o=t.normalize(o,o),o;o=t.add(l,c,o),o=t.normalize(o,o);let s=t.cross(a,o,En);return t.dot(l,s)<xn&&(o=t.negate(o,o)),o}var Ut=jt.fromPointNormal(t.ZERO,t.UNIT_Y),Cn=new t,_n=new t,Ln=new t,On=new t,Dn=new t,Yt=new t,Ft=new u,ve=new u,Be=new u;ct.createGeometry=function(e){let i=!e._scene3DOnly,r=e.loop,n=e._ellipsoid,o=e.granularity,a=e.arcType,c=new le[e._projectionIndex](n),l=Qe,s=tn,d,h,N=e._positions,S=N.length;S===2&&(r=!1);let R,D,I,j,W=new te(void 0,void 0,n),f,X,v,y=[N[0]];for(h=0;h<S-1;h++)R=N[h],D=N[h+1],f=Qt.lineSegmentPlane(R,D,Ut,Yt),g(f)&&!t.equalsEpsilon(f,R,p.EPSILON7)&&!t.equalsEpsilon(f,D,p.EPSILON7)&&(e.arcType===Z.GEODESIC?y.push(t.clone(f)):e.arcType===Z.RHUMB&&(v=n.cartesianToCartographic(f,Ft).longitude,I=n.cartesianToCartographic(R,Ft),j=n.cartesianToCartographic(D,ve),W.setEndPoints(I,j),X=W.findIntersectionWithLongitude(v,Be),f=n.cartographicToCartesian(X,Yt),g(f)&&!t.equalsEpsilon(f,R,p.EPSILON7)&&!t.equalsEpsilon(f,D,p.EPSILON7)&&y.push(t.clone(f)))),y.push(D);r&&(R=N[S-1],D=N[0],f=Qt.lineSegmentPlane(R,D,Ut,Yt),g(f)&&!t.equalsEpsilon(f,R,p.EPSILON7)&&!t.equalsEpsilon(f,D,p.EPSILON7)&&(e.arcType===Z.GEODESIC?y.push(t.clone(f)):e.arcType===Z.RHUMB&&(v=n.cartesianToCartographic(f,Ft).longitude,I=n.cartesianToCartographic(R,Ft),j=n.cartesianToCartographic(D,ve),W.setEndPoints(I,j),X=W.findIntersectionWithLongitude(v,Be),f=n.cartographicToCartesian(X,Yt),g(f)&&!t.equalsEpsilon(f,R,p.EPSILON7)&&!t.equalsEpsilon(f,D,p.EPSILON7)&&y.push(t.clone(f)))));let H=y.length,C=new Array(H);for(h=0;h<H;h++){let F=u.fromCartesian(y[h],n);F.height=0,C[h]=F}if(C=Le(C,u.equalsEpsilon),H=C.length,H<2)return;let k=[],b=[],B=[],E=[],x=Cn,L=_n,_=Ln,Y=On,A=Dn,m=C[0],V=C[1],It=C[H-1];for(x=P(n,It,l,x),Y=P(n,V,l,Y),L=P(n,m,l,L),_=P(n,m,s,_),r?A=ie(x,L,_,Y,A):A=se(m,V,s,n,A),t.pack(A,b,0),t.pack(L,B,0),t.pack(_,E,0),k.push(m.latitude),k.push(m.longitude),ne(m,V,l,s,o,a,n,b,B,E,k),h=1;h<H-1;++h){x=t.clone(L,x),L=t.clone(Y,L);let F=C[h];P(n,F,s,_),P(n,C[h+1],l,Y),ie(x,L,_,Y,A),d=b.length,t.pack(A,b,d),t.pack(L,B,d),t.pack(_,E,d),k.push(F.latitude),k.push(F.longitude),ne(C[h],C[h+1],l,s,o,a,n,b,B,E,k)}let M=C[H-1],Tt=C[H-2];if(L=P(n,M,l,L),_=P(n,M,s,_),r){let F=C[0];x=P(n,Tt,l,x),Y=P(n,F,l,Y),A=ie(x,L,_,Y,A)}else A=se(Tt,M,s,n,A);if(d=b.length,t.pack(A,b,d),t.pack(L,B,d),t.pack(_,E,d),k.push(M.latitude),k.push(M.longitude),r){for(ne(M,m,l,s,o,a,n,b,B,E,k),d=b.length,h=0;h<3;++h)b[d+h]=b[h],B[d+h]=B[h],E[d+h]=E[h];k.push(m.latitude),k.push(m.longitude)}return Qn(r,c,B,E,b,k,i)};var In=new t,Hn=new vt,kn=new Kt;function ze(e,i,r,n){let o=nt(r,i,In),a=t.dot(o,e);if(a>Ke||a<Me){let c=nt(n,r,en),l=a<Me?p.PI_OVER_TWO:-p.PI_OVER_TWO,s=Kt.fromAxisAngle(c,l,kn),d=vt.fromQuaternion(s,Hn);return vt.multiplyByVector(d,e,e),!0}return!1}var je=new u,yn=new t,Xe=new t;function Dt(e,i,r,n,o){let a=u.toCartesian(i,e._ellipsoid,yn),c=t.add(a,r,Xe),l=!1,s=e._ellipsoid,d=s.cartesianToCartographic(c,je);Math.abs(i.longitude-d.longitude)>p.PI_OVER_TWO&&(l=!0,c=t.subtract(a,r,Xe),d=s.cartesianToCartographic(c,je)),d.height=0;let h=e.project(d,o);return o=t.subtract(h,n,o),o.z=0,o=t.normalize(o,o),l&&t.negate(o,o),o}var An=new t,Ye=new t;function Fe(e,i,r,n,o,a){let c=t.subtract(i,e,An);t.normalize(c,c);let l=r-Qe,s=t.multiplyByScalar(c,l,Ye);t.add(e,s,o);let d=n-tn;s=t.multiplyByScalar(c,d,Ye),t.add(i,s,a)}var Mn=new t;function Gt(e,i){let r=jt.getPointDistance(Ut,e),n=jt.getPointDistance(Ut,i),o=Mn;p.equalsEpsilon(r,0,p.EPSILON2)?(o=nt(i,e,o),t.multiplyByScalar(o,p.EPSILON2,o),t.add(e,o,e)):p.equalsEpsilon(n,0,p.EPSILON2)&&(o=nt(e,i,o),t.multiplyByScalar(o,p.EPSILON2,o),t.add(i,o,i))}function Rn(e,i){let r=Math.abs(e.longitude),n=Math.abs(i.longitude);if(p.equalsEpsilon(r,p.PI,p.EPSILON11)){let o=p.sign(i.longitude);return e.longitude=o*(r-p.EPSILON11),1}else if(p.equalsEpsilon(n,p.PI,p.EPSILON11)){let o=p.sign(e.longitude);return i.longitude=o*(n-p.EPSILON11),2}return 0}var nn=new u,on=new u,Ge=new t,re=new t,Ue=new t,We=new t,Pn=new t,qe=new t,bn=[nn,on],vn=new G,Bn=new t,zn=new t,jn=new t,Xn=new t,Yn=new t,Fn=new t,ae=new t,ce=new t,Gn=new t,Un=new t,Wn=new t,Ze=new t,qn=new t,Zn=new t,Vn=new _t,$n=new _t,Ve=new t,Jn=new t,$e=new t,Kn=[new U,new U],rn=[0,2,1,0,3,2,0,7,3,0,4,7,0,5,4,0,1,5,5,7,4,5,6,7,5,2,6,5,1,2,3,6,2,3,7,6],Je=rn.length;function Qn(e,i,r,n,o,a,c){let l,s,d=i._ellipsoid,h=r.length/3-1,N=h*8,S=N*4,R=h*36,D=N>65535?new Uint32Array(R):new Uint16Array(R),I=new Float64Array(N*3),j=new Float32Array(S),W=new Float32Array(S),f=new Float32Array(S),X=new Float32Array(S),v=new Float32Array(S),y,H,C,k;c&&(y=new Float32Array(S),H=new Float32Array(S),C=new Float32Array(S),k=new Float32Array(N*2));let b=a.length/2,B=0,E=nn;E.height=0;let x=on;x.height=0;let L=Ge,_=re;if(c)for(s=0,l=1;l<b;l++)E.latitude=a[s],E.longitude=a[s+1],x.latitude=a[s+2],x.longitude=a[s+3],L=i.project(E,L),_=i.project(x,_),B+=t.distance(L,_),s+=2;let Y=n.length/3;_=t.unpack(n,0,_);let A=0;for(s=3,l=1;l<Y;l++)L=t.clone(_,L),_=t.unpack(n,s,_),A+=t.distance(L,_),s+=3;let m;s=3;let V=0,It=0,M=0,Tt=0,F=!1,st=t.unpack(r,0,We),lt=t.unpack(n,0,re),q=t.unpack(o,0,qe);if(e){let ht=t.unpack(r,r.length-6,Ue);ze(q,ht,st,lt)&&(q=t.negate(q,q))}let pe=0,de=0,Wt=0;for(l=0;l<h;l++){let ht=t.clone(st,Ue),Zt=t.clone(lt,Ge),mt=t.clone(q,Pn);F&&(mt=t.negate(mt,mt)),st=t.unpack(r,s,We),lt=t.unpack(n,s,re),q=t.unpack(o,s,qe),F=ze(q,ht,st,lt),E.latitude=a[V],E.longitude=a[V+1],x.latitude=a[V+2],x.longitude=a[V+3];let pt,gt,ot,it;if(c){let T=Rn(E,x);pt=i.project(E,Yn),gt=i.project(x,Fn);let wt=nt(gt,pt,Ve);wt.y=Math.abs(wt.y),ot=ae,it=ce,T===0||t.dot(wt,t.UNIT_Y)>Ke?(ot=Dt(i,E,mt,pt,ae),it=Dt(i,x,q,gt,ce)):T===1?(it=Dt(i,x,q,gt,ce),ot.x=0,ot.y=p.sign(E.longitude-Math.abs(x.longitude)),ot.z=0):(ot=Dt(i,E,mt,pt,ae),it.x=0,it.y=p.sign(E.longitude-x.longitude),it.z=0)}let ge=t.distance(Zt,lt),ue=_t.fromCartesian(ht,Vn),Ht=t.subtract(st,ht,Gn),an=t.normalize(Ht,Ze),xt=t.subtract(Zt,ht,Un);xt=t.normalize(xt,xt);let ut=t.cross(an,xt,Ze);ut=t.normalize(ut,ut);let kt=t.cross(xt,mt,qn);kt=t.normalize(kt,kt);let yt=t.subtract(lt,st,Wn);yt=t.normalize(yt,yt);let At=t.cross(q,yt,Zn);At=t.normalize(At,At);let cn=ge/A,sn=pe/A,Vt=0,Nt,Mt,dt,we=0,Se=0;if(c){Vt=t.distance(pt,gt),Nt=_t.fromCartesian(pt,$n),Mt=t.subtract(gt,pt,Ve),dt=t.normalize(Mt,Jn);let T=dt.x;dt.x=dt.y,dt.y=-T,we=Vt/B,Se=de/B}for(m=0;m<8;m++){let T=Tt+m*4,wt=It+m*2,Ct=T+3,Ee=m<4?1:-1,Rt=m===2||m===3||m===6||m===7?1:-1;t.pack(ue.high,j,T),j[Ct]=Ht.x,t.pack(ue.low,W,T),W[Ct]=Ht.y,t.pack(kt,f,T),f[Ct]=Ht.z,t.pack(At,X,T),X[Ct]=cn*Ee,t.pack(ut,v,T);let ft=sn*Rt;ft===0&&Rt<0&&(ft=9),v[Ct]=ft,c&&(y[T]=Nt.high.x,y[T+1]=Nt.high.y,y[T+2]=Nt.low.x,y[T+3]=Nt.low.y,C[T]=-ot.y,C[T+1]=ot.x,C[T+2]=it.y,C[T+3]=-it.x,H[T]=Mt.x,H[T+1]=Mt.y,H[T+2]=dt.x,H[T+3]=dt.y,k[wt]=we*Ee,ft=Se*Rt,ft===0&&Rt<0&&(ft=9),k[wt+1]=ft)}let $=jn,J=Xn,K=Bn,Q=zn,ln=G.fromCartographicArray(bn,vn),Te=Xt.getMinimumMaximumHeights(ln,d),$t=Te.minimumTerrainHeight,Jt=Te.maximumTerrainHeight;Wt+=Math.abs($t),Wt+=Math.abs(Jt),Fe(ht,Zt,$t,Jt,$,K),Fe(st,lt,$t,Jt,J,Q);let tt=t.multiplyByScalar(ut,p.EPSILON5,$e);t.add($,tt,$),t.add(J,tt,J),t.add(K,tt,K),t.add(Q,tt,Q),Gt($,J),Gt(K,Q),t.pack($,I,M),t.pack(J,I,M+3),t.pack(Q,I,M+6),t.pack(K,I,M+9),tt=t.multiplyByScalar(ut,-2*p.EPSILON5,$e),t.add($,tt,$),t.add(J,tt,J),t.add(K,tt,K),t.add(Q,tt,Q),Gt($,J),Gt(K,Q),t.pack($,I,M+12),t.pack(J,I,M+15),t.pack(Q,I,M+18),t.pack(K,I,M+21),V+=2,s+=3,It+=16,M+=24,Tt+=32,pe+=ge,de+=Vt}s=0;let fe=0;for(l=0;l<h;l++){for(m=0;m<Je;m++)D[s+m]=rn[m]+fe;fe+=8,s+=Je}let qt=Kn;U.fromVertices(r,t.ZERO,3,qt[0]),U.fromVertices(n,t.ZERO,3,qt[1]);let me=U.fromBoundingSpheres(qt);me.radius+=Wt/(h*2);let Et={position:new zt({componentDatatype:Bt.DOUBLE,componentsPerAttribute:3,normalize:!1,values:I}),startHiAndForwardOffsetX:at(j),startLoAndForwardOffsetY:at(W),startNormalAndForwardOffsetZ:at(f),endNormalAndTextureCoordinateNormalizationX:at(X),rightNormalAndTextureCoordinateNormalizationY:at(v)};return c&&(Et.startHiLo2D=at(y),Et.offsetAndRight2D=at(H),Et.startEndNormals2D=at(C),Et.texcoordNormalization2D=new zt({componentDatatype:Bt.FLOAT,componentsPerAttribute:2,normalize:!1,values:k})),new Ce({attributes:Et,indices:D,boundingSphere:me})}function at(e){return new zt({componentDatatype:Bt.FLOAT,componentsPerAttribute:4,normalize:!1,values:e})}ct._projectNormal=Dt;var he=ct;function to(e,i){return Xt.initialize().then(function(){return g(i)&&(e=he.unpack(e,i)),he.createGeometry(e)})}var ti=to;export{ti as default}; | ||
import{a as _e}from"./chunk-WEQDXQHF.js";import{a as Z}from"./chunk-VAZSO7QM.js";import{a as _t}from"./chunk-IQ7DLQQP.js";import{a as Oe}from"./chunk-3CPQXNZI.js";import{a as Le}from"./chunk-OBENGMDT.js";import{a as te}from"./chunk-LH3GDPJ4.js";import{b as Qt}from"./chunk-QC62DG5W.js";import{a as jt}from"./chunk-R6IH5WM5.js";import{c as Ce,d as zt}from"./chunk-VAPKZ5PR.js";import{a as bt,d as U,e as Kt,f as xe,g as Ne}from"./chunk-DXGEUDM7.js";import"./chunk-5IUHFVP3.js";import"./chunk-OE3P25NW.js";import{c as G}from"./chunk-HIT4T4MS.js";import{a as Bt}from"./chunk-3KRBUMEX.js";import{a as t,b as u,c as Pt,d as z,e as vt}from"./chunk-PQ6NV4GA.js";import{a as p}from"./chunk-74I3QBVP.js";import"./chunk-BLVYEJBC.js";import"./chunk-A6PYE4JS.js";import{a as O}from"./chunk-T23IKWCM.js";import{a as St,b as et}from"./chunk-HJ33TVGP.js";import{e as g}from"./chunk-WL4PTXMO.js";function rt(e){e=O(e,O.EMPTY_OBJECT),this._ellipsoid=O(e.ellipsoid,z.WGS84),this._rectangle=O(e.rectangle,G.MAX_VALUE),this._projection=new bt(this._ellipsoid),this._numberOfLevelZeroTilesX=O(e.numberOfLevelZeroTilesX,2),this._numberOfLevelZeroTilesY=O(e.numberOfLevelZeroTilesY,1)}Object.defineProperties(rt.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}});rt.prototype.getNumberOfXTilesAtLevel=function(e){return this._numberOfLevelZeroTilesX<<e};rt.prototype.getNumberOfYTilesAtLevel=function(e){return this._numberOfLevelZeroTilesY<<e};rt.prototype.rectangleToNativeRectangle=function(e,i){et.defined("rectangle",e);let r=p.toDegrees(e.west),n=p.toDegrees(e.south),o=p.toDegrees(e.east),a=p.toDegrees(e.north);return g(i)?(i.west=r,i.south=n,i.east=o,i.north=a,i):new G(r,n,o,a)};rt.prototype.tileXYToNativeRectangle=function(e,i,r,n){let o=this.tileXYToRectangle(e,i,r,n);return o.west=p.toDegrees(o.west),o.south=p.toDegrees(o.south),o.east=p.toDegrees(o.east),o.north=p.toDegrees(o.north),o};rt.prototype.tileXYToRectangle=function(e,i,r,n){let o=this._rectangle,a=this.getNumberOfXTilesAtLevel(r),c=this.getNumberOfYTilesAtLevel(r),l=o.width/a,s=e*l+o.west,d=(e+1)*l+o.west,h=o.height/c,N=o.north-i*h,S=o.north-(i+1)*h;return g(n)||(n=new G(s,S,d,N)),n.west=s,n.south=S,n.east=d,n.north=N,n};rt.prototype.positionToTileXY=function(e,i,r){let n=this._rectangle;if(!G.contains(n,e))return;let o=this.getNumberOfXTilesAtLevel(i),a=this.getNumberOfYTilesAtLevel(i),c=n.width/o,l=n.height/a,s=e.longitude;n.east<n.west&&(s+=p.TWO_PI);let d=(s-n.west)/c|0;d>=o&&(d=o-1);let h=(n.north-e.latitude)/l|0;return h>=a&&(h=a-1),g(r)?(r.x=d,r.y=h,r):new Pt(d,h)};var De=rt;var Ie=new t,He=new t,ke=new u,ee=new t,hn=new t,ye=new U,pn=new De,Lt=[new u,new u,new u,new u],Ot=new Pt,w={};w.initialize=function(){let e=w._initPromise;return g(e)||(e=xe.fetchJson(Ne("Assets/approximateTerrainHeights.json")).then(function(i){w._terrainHeights=i}),w._initPromise=e),e};w.getMinimumMaximumHeights=function(e,i){if(et.defined("rectangle",e),!g(w._terrainHeights))throw new St("You must call ApproximateTerrainHeights.initialize and wait for the promise to resolve before using this function");i=O(i,z.WGS84);let r=Ae(e),n=w._defaultMinTerrainHeight,o=w._defaultMaxTerrainHeight;if(g(r)){let a=`${r.level}-${r.x}-${r.y}`,c=w._terrainHeights[a];g(c)&&(n=c[0],o=c[1]),i.cartographicToCartesian(G.northeast(e,ke),Ie),i.cartographicToCartesian(G.southwest(e,ke),He),t.midpoint(He,Ie,ee);let l=i.scaleToGeodeticSurface(ee,hn);if(g(l)){let s=t.distance(ee,l);n=Math.min(n,-s)}else n=w._defaultMinTerrainHeight}return n=Math.max(w._defaultMinTerrainHeight,n),{minimumTerrainHeight:n,maximumTerrainHeight:o}};w.getBoundingSphere=function(e,i){if(et.defined("rectangle",e),!g(w._terrainHeights))throw new St("You must call ApproximateTerrainHeights.initialize and wait for the promise to resolve before using this function");i=O(i,z.WGS84);let r=Ae(e),n=w._defaultMaxTerrainHeight;if(g(r)){let a=`${r.level}-${r.x}-${r.y}`,c=w._terrainHeights[a];g(c)&&(n=c[1])}let o=U.fromRectangle3D(e,i,0);return U.fromRectangle3D(e,i,n,ye),U.union(o,ye,o)};function Ae(e){u.fromRadians(e.east,e.north,0,Lt[0]),u.fromRadians(e.west,e.north,0,Lt[1]),u.fromRadians(e.east,e.south,0,Lt[2]),u.fromRadians(e.west,e.south,0,Lt[3]);let i=0,r=0,n=0,o=0,a=w._terrainHeightsMaxLevel,c;for(c=0;c<=a;++c){let l=!1;for(let s=0;s<4;++s){let d=Lt[s];if(pn.positionToTileXY(d,c,Ot),s===0)n=Ot.x,o=Ot.y;else if(n!==Ot.x||o!==Ot.y){l=!0;break}}if(l)break;i=n,r=o}if(c!==0)return{x:i,y:r,level:c>a?a:c-1}}w._terrainHeightsMaxLevel=6;w._defaultMaxTerrainHeight=9e3;w._defaultMinTerrainHeight=-1e5;w._terrainHeights=void 0;w._initPromise=void 0;Object.defineProperties(w,{initialized:{get:function(){return g(w._terrainHeights)}}});var Xt=w;var le=[bt,_e],dn=le.length,Ke=Math.cos(p.toRadians(30)),Me=Math.cos(p.toRadians(150)),Qe=0,tn=1e3;function ct(e){e=O(e,O.EMPTY_OBJECT);let i=e.positions;if(!g(i)||i.length<2)throw new St("At least two positions are required.");if(g(e.arcType)&&e.arcType!==Z.GEODESIC&&e.arcType!==Z.RHUMB)throw new St("Valid options for arcType are ArcType.GEODESIC and ArcType.RHUMB.");this.width=O(e.width,1),this._positions=i,this.granularity=O(e.granularity,9999),this.loop=O(e.loop,!1),this.arcType=O(e.arcType,Z.GEODESIC),this._ellipsoid=z.WGS84,this._projectionIndex=0,this._workerName="createGroundPolylineGeometry",this._scene3DOnly=!1}Object.defineProperties(ct.prototype,{packedLength:{get:function(){return 1+this._positions.length*3+1+1+1+z.packedLength+1+1}}});ct.setProjectionAndEllipsoid=function(e,i){let r=0;for(let n=0;n<dn;n++)if(i instanceof le[n]){r=n;break}e._projectionIndex=r,e._ellipsoid=i.ellipsoid};var fn=new t,Re=new t,Pe=new t;function se(e,i,r,n,o){let a=P(n,e,0,fn),c=P(n,e,r,Re),l=P(n,i,0,Pe),s=nt(c,a,Re),d=nt(l,a,Pe);return t.cross(d,s,o),t.normalize(o,o)}var mn=new u,gn=new t,un=new t,wn=new t;function ne(e,i,r,n,o,a,c,l,s,d,h){if(o===0)return;let N;a===Z.GEODESIC?N=new Oe(e,i,c):a===Z.RHUMB&&(N=new te(e,i,c));let S=N.surfaceDistance;if(S<o)return;let R=se(e,i,n,c,wn),D=Math.ceil(S/o),I=S/D,j=I,W=D-1,f=l.length;for(let X=0;X<W;X++){let v=N.interpolateUsingSurfaceDistance(j,mn),y=P(c,v,r,gn),H=P(c,v,n,un);t.pack(R,l,f),t.pack(y,s,f),t.pack(H,d,f),h.push(v.latitude),h.push(v.longitude),f+=3,j+=I}}var oe=new u;function P(e,i,r,n){return u.clone(i,oe),oe.height=r,u.toCartesian(oe,e,n)}ct.pack=function(e,i,r){et.typeOf.object("value",e),et.defined("array",i);let n=O(r,0),o=e._positions,a=o.length;i[n++]=a;for(let c=0;c<a;++c){let l=o[c];t.pack(l,i,n),n+=3}return i[n++]=e.granularity,i[n++]=e.loop?1:0,i[n++]=e.arcType,z.pack(e._ellipsoid,i,n),n+=z.packedLength,i[n++]=e._projectionIndex,i[n++]=e._scene3DOnly?1:0,i};ct.unpack=function(e,i,r){et.defined("array",e);let n=O(i,0),o=e[n++],a=new Array(o);for(let S=0;S<o;S++)a[S]=t.unpack(e,n),n+=3;let c=e[n++],l=e[n++]===1,s=e[n++],d=z.unpack(e,n);n+=z.packedLength;let h=e[n++],N=e[n++]===1;return g(r)||(r=new ct({positions:a})),r._positions=a,r.granularity=c,r.loop=l,r.arcType=s,r._ellipsoid=d,r._projectionIndex=h,r._scene3DOnly=N,r};function nt(e,i,r){return t.subtract(e,i,r),t.normalize(r,r),r}function be(e,i,r,n){return n=nt(e,i,n),n=t.cross(n,r,n),n=t.normalize(n,n),n=t.cross(r,n,n),n}var Sn=new t,Tn=new t,En=new t,en=new t,xn=0,Nn=-1;function ie(e,i,r,n,o){let a=nt(r,i,en),c=be(e,i,a,Sn),l=be(n,i,a,Tn);if(p.equalsEpsilon(t.dot(c,l),Nn,p.EPSILON5))return o=t.cross(a,c,o),o=t.normalize(o,o),o;o=t.add(l,c,o),o=t.normalize(o,o);let s=t.cross(a,o,En);return t.dot(l,s)<xn&&(o=t.negate(o,o)),o}var Ut=jt.fromPointNormal(t.ZERO,t.UNIT_Y),Cn=new t,_n=new t,Ln=new t,On=new t,Dn=new t,Yt=new t,Ft=new u,ve=new u,Be=new u;ct.createGeometry=function(e){let i=!e._scene3DOnly,r=e.loop,n=e._ellipsoid,o=e.granularity,a=e.arcType,c=new le[e._projectionIndex](n),l=Qe,s=tn,d,h,N=e._positions,S=N.length;S===2&&(r=!1);let R,D,I,j,W=new te(void 0,void 0,n),f,X,v,y=[N[0]];for(h=0;h<S-1;h++)R=N[h],D=N[h+1],f=Qt.lineSegmentPlane(R,D,Ut,Yt),g(f)&&!t.equalsEpsilon(f,R,p.EPSILON7)&&!t.equalsEpsilon(f,D,p.EPSILON7)&&(e.arcType===Z.GEODESIC?y.push(t.clone(f)):e.arcType===Z.RHUMB&&(v=n.cartesianToCartographic(f,Ft).longitude,I=n.cartesianToCartographic(R,Ft),j=n.cartesianToCartographic(D,ve),W.setEndPoints(I,j),X=W.findIntersectionWithLongitude(v,Be),f=n.cartographicToCartesian(X,Yt),g(f)&&!t.equalsEpsilon(f,R,p.EPSILON7)&&!t.equalsEpsilon(f,D,p.EPSILON7)&&y.push(t.clone(f)))),y.push(D);r&&(R=N[S-1],D=N[0],f=Qt.lineSegmentPlane(R,D,Ut,Yt),g(f)&&!t.equalsEpsilon(f,R,p.EPSILON7)&&!t.equalsEpsilon(f,D,p.EPSILON7)&&(e.arcType===Z.GEODESIC?y.push(t.clone(f)):e.arcType===Z.RHUMB&&(v=n.cartesianToCartographic(f,Ft).longitude,I=n.cartesianToCartographic(R,Ft),j=n.cartesianToCartographic(D,ve),W.setEndPoints(I,j),X=W.findIntersectionWithLongitude(v,Be),f=n.cartographicToCartesian(X,Yt),g(f)&&!t.equalsEpsilon(f,R,p.EPSILON7)&&!t.equalsEpsilon(f,D,p.EPSILON7)&&y.push(t.clone(f)))));let H=y.length,C=new Array(H);for(h=0;h<H;h++){let F=u.fromCartesian(y[h],n);F.height=0,C[h]=F}if(C=Le(C,u.equalsEpsilon),H=C.length,H<2)return;let k=[],b=[],B=[],E=[],x=Cn,L=_n,_=Ln,Y=On,A=Dn,m=C[0],V=C[1],It=C[H-1];for(x=P(n,It,l,x),Y=P(n,V,l,Y),L=P(n,m,l,L),_=P(n,m,s,_),r?A=ie(x,L,_,Y,A):A=se(m,V,s,n,A),t.pack(A,b,0),t.pack(L,B,0),t.pack(_,E,0),k.push(m.latitude),k.push(m.longitude),ne(m,V,l,s,o,a,n,b,B,E,k),h=1;h<H-1;++h){x=t.clone(L,x),L=t.clone(Y,L);let F=C[h];P(n,F,s,_),P(n,C[h+1],l,Y),ie(x,L,_,Y,A),d=b.length,t.pack(A,b,d),t.pack(L,B,d),t.pack(_,E,d),k.push(F.latitude),k.push(F.longitude),ne(C[h],C[h+1],l,s,o,a,n,b,B,E,k)}let M=C[H-1],Tt=C[H-2];if(L=P(n,M,l,L),_=P(n,M,s,_),r){let F=C[0];x=P(n,Tt,l,x),Y=P(n,F,l,Y),A=ie(x,L,_,Y,A)}else A=se(Tt,M,s,n,A);if(d=b.length,t.pack(A,b,d),t.pack(L,B,d),t.pack(_,E,d),k.push(M.latitude),k.push(M.longitude),r){for(ne(M,m,l,s,o,a,n,b,B,E,k),d=b.length,h=0;h<3;++h)b[d+h]=b[h],B[d+h]=B[h],E[d+h]=E[h];k.push(m.latitude),k.push(m.longitude)}return Qn(r,c,B,E,b,k,i)};var In=new t,Hn=new vt,kn=new Kt;function ze(e,i,r,n){let o=nt(r,i,In),a=t.dot(o,e);if(a>Ke||a<Me){let c=nt(n,r,en),l=a<Me?p.PI_OVER_TWO:-p.PI_OVER_TWO,s=Kt.fromAxisAngle(c,l,kn),d=vt.fromQuaternion(s,Hn);return vt.multiplyByVector(d,e,e),!0}return!1}var je=new u,yn=new t,Xe=new t;function Dt(e,i,r,n,o){let a=u.toCartesian(i,e._ellipsoid,yn),c=t.add(a,r,Xe),l=!1,s=e._ellipsoid,d=s.cartesianToCartographic(c,je);Math.abs(i.longitude-d.longitude)>p.PI_OVER_TWO&&(l=!0,c=t.subtract(a,r,Xe),d=s.cartesianToCartographic(c,je)),d.height=0;let h=e.project(d,o);return o=t.subtract(h,n,o),o.z=0,o=t.normalize(o,o),l&&t.negate(o,o),o}var An=new t,Ye=new t;function Fe(e,i,r,n,o,a){let c=t.subtract(i,e,An);t.normalize(c,c);let l=r-Qe,s=t.multiplyByScalar(c,l,Ye);t.add(e,s,o);let d=n-tn;s=t.multiplyByScalar(c,d,Ye),t.add(i,s,a)}var Mn=new t;function Gt(e,i){let r=jt.getPointDistance(Ut,e),n=jt.getPointDistance(Ut,i),o=Mn;p.equalsEpsilon(r,0,p.EPSILON2)?(o=nt(i,e,o),t.multiplyByScalar(o,p.EPSILON2,o),t.add(e,o,e)):p.equalsEpsilon(n,0,p.EPSILON2)&&(o=nt(e,i,o),t.multiplyByScalar(o,p.EPSILON2,o),t.add(i,o,i))}function Rn(e,i){let r=Math.abs(e.longitude),n=Math.abs(i.longitude);if(p.equalsEpsilon(r,p.PI,p.EPSILON11)){let o=p.sign(i.longitude);return e.longitude=o*(r-p.EPSILON11),1}else if(p.equalsEpsilon(n,p.PI,p.EPSILON11)){let o=p.sign(e.longitude);return i.longitude=o*(n-p.EPSILON11),2}return 0}var nn=new u,on=new u,Ge=new t,re=new t,Ue=new t,We=new t,Pn=new t,qe=new t,bn=[nn,on],vn=new G,Bn=new t,zn=new t,jn=new t,Xn=new t,Yn=new t,Fn=new t,ae=new t,ce=new t,Gn=new t,Un=new t,Wn=new t,Ze=new t,qn=new t,Zn=new t,Vn=new _t,$n=new _t,Ve=new t,Jn=new t,$e=new t,Kn=[new U,new U],rn=[0,2,1,0,3,2,0,7,3,0,4,7,0,5,4,0,1,5,5,7,4,5,6,7,5,2,6,5,1,2,3,6,2,3,7,6],Je=rn.length;function Qn(e,i,r,n,o,a,c){let l,s,d=i._ellipsoid,h=r.length/3-1,N=h*8,S=N*4,R=h*36,D=N>65535?new Uint32Array(R):new Uint16Array(R),I=new Float64Array(N*3),j=new Float32Array(S),W=new Float32Array(S),f=new Float32Array(S),X=new Float32Array(S),v=new Float32Array(S),y,H,C,k;c&&(y=new Float32Array(S),H=new Float32Array(S),C=new Float32Array(S),k=new Float32Array(N*2));let b=a.length/2,B=0,E=nn;E.height=0;let x=on;x.height=0;let L=Ge,_=re;if(c)for(s=0,l=1;l<b;l++)E.latitude=a[s],E.longitude=a[s+1],x.latitude=a[s+2],x.longitude=a[s+3],L=i.project(E,L),_=i.project(x,_),B+=t.distance(L,_),s+=2;let Y=n.length/3;_=t.unpack(n,0,_);let A=0;for(s=3,l=1;l<Y;l++)L=t.clone(_,L),_=t.unpack(n,s,_),A+=t.distance(L,_),s+=3;let m;s=3;let V=0,It=0,M=0,Tt=0,F=!1,st=t.unpack(r,0,We),lt=t.unpack(n,0,re),q=t.unpack(o,0,qe);if(e){let ht=t.unpack(r,r.length-6,Ue);ze(q,ht,st,lt)&&(q=t.negate(q,q))}let pe=0,de=0,Wt=0;for(l=0;l<h;l++){let ht=t.clone(st,Ue),Zt=t.clone(lt,Ge),mt=t.clone(q,Pn);F&&(mt=t.negate(mt,mt)),st=t.unpack(r,s,We),lt=t.unpack(n,s,re),q=t.unpack(o,s,qe),F=ze(q,ht,st,lt),E.latitude=a[V],E.longitude=a[V+1],x.latitude=a[V+2],x.longitude=a[V+3];let pt,gt,ot,it;if(c){let T=Rn(E,x);pt=i.project(E,Yn),gt=i.project(x,Fn);let wt=nt(gt,pt,Ve);wt.y=Math.abs(wt.y),ot=ae,it=ce,T===0||t.dot(wt,t.UNIT_Y)>Ke?(ot=Dt(i,E,mt,pt,ae),it=Dt(i,x,q,gt,ce)):T===1?(it=Dt(i,x,q,gt,ce),ot.x=0,ot.y=p.sign(E.longitude-Math.abs(x.longitude)),ot.z=0):(ot=Dt(i,E,mt,pt,ae),it.x=0,it.y=p.sign(E.longitude-x.longitude),it.z=0)}let ge=t.distance(Zt,lt),ue=_t.fromCartesian(ht,Vn),Ht=t.subtract(st,ht,Gn),an=t.normalize(Ht,Ze),xt=t.subtract(Zt,ht,Un);xt=t.normalize(xt,xt);let ut=t.cross(an,xt,Ze);ut=t.normalize(ut,ut);let kt=t.cross(xt,mt,qn);kt=t.normalize(kt,kt);let yt=t.subtract(lt,st,Wn);yt=t.normalize(yt,yt);let At=t.cross(q,yt,Zn);At=t.normalize(At,At);let cn=ge/A,sn=pe/A,Vt=0,Nt,Mt,dt,we=0,Se=0;if(c){Vt=t.distance(pt,gt),Nt=_t.fromCartesian(pt,$n),Mt=t.subtract(gt,pt,Ve),dt=t.normalize(Mt,Jn);let T=dt.x;dt.x=dt.y,dt.y=-T,we=Vt/B,Se=de/B}for(m=0;m<8;m++){let T=Tt+m*4,wt=It+m*2,Ct=T+3,Ee=m<4?1:-1,Rt=m===2||m===3||m===6||m===7?1:-1;t.pack(ue.high,j,T),j[Ct]=Ht.x,t.pack(ue.low,W,T),W[Ct]=Ht.y,t.pack(kt,f,T),f[Ct]=Ht.z,t.pack(At,X,T),X[Ct]=cn*Ee,t.pack(ut,v,T);let ft=sn*Rt;ft===0&&Rt<0&&(ft=9),v[Ct]=ft,c&&(y[T]=Nt.high.x,y[T+1]=Nt.high.y,y[T+2]=Nt.low.x,y[T+3]=Nt.low.y,C[T]=-ot.y,C[T+1]=ot.x,C[T+2]=it.y,C[T+3]=-it.x,H[T]=Mt.x,H[T+1]=Mt.y,H[T+2]=dt.x,H[T+3]=dt.y,k[wt]=we*Ee,ft=Se*Rt,ft===0&&Rt<0&&(ft=9),k[wt+1]=ft)}let $=jn,J=Xn,K=Bn,Q=zn,ln=G.fromCartographicArray(bn,vn),Te=Xt.getMinimumMaximumHeights(ln,d),$t=Te.minimumTerrainHeight,Jt=Te.maximumTerrainHeight;Wt+=Math.abs($t),Wt+=Math.abs(Jt),Fe(ht,Zt,$t,Jt,$,K),Fe(st,lt,$t,Jt,J,Q);let tt=t.multiplyByScalar(ut,p.EPSILON5,$e);t.add($,tt,$),t.add(J,tt,J),t.add(K,tt,K),t.add(Q,tt,Q),Gt($,J),Gt(K,Q),t.pack($,I,M),t.pack(J,I,M+3),t.pack(Q,I,M+6),t.pack(K,I,M+9),tt=t.multiplyByScalar(ut,-2*p.EPSILON5,$e),t.add($,tt,$),t.add(J,tt,J),t.add(K,tt,K),t.add(Q,tt,Q),Gt($,J),Gt(K,Q),t.pack($,I,M+12),t.pack(J,I,M+15),t.pack(Q,I,M+18),t.pack(K,I,M+21),V+=2,s+=3,It+=16,M+=24,Tt+=32,pe+=ge,de+=Vt}s=0;let fe=0;for(l=0;l<h;l++){for(m=0;m<Je;m++)D[s+m]=rn[m]+fe;fe+=8,s+=Je}let qt=Kn;U.fromVertices(r,t.ZERO,3,qt[0]),U.fromVertices(n,t.ZERO,3,qt[1]);let me=U.fromBoundingSpheres(qt);me.radius+=Wt/(h*2);let Et={position:new zt({componentDatatype:Bt.DOUBLE,componentsPerAttribute:3,normalize:!1,values:I}),startHiAndForwardOffsetX:at(j),startLoAndForwardOffsetY:at(W),startNormalAndForwardOffsetZ:at(f),endNormalAndTextureCoordinateNormalizationX:at(X),rightNormalAndTextureCoordinateNormalizationY:at(v)};return c&&(Et.startHiLo2D=at(y),Et.offsetAndRight2D=at(H),Et.startEndNormals2D=at(C),Et.texcoordNormalization2D=new zt({componentDatatype:Bt.FLOAT,componentsPerAttribute:2,normalize:!1,values:k})),new Ce({attributes:Et,indices:D,boundingSphere:me})}function at(e){return new zt({componentDatatype:Bt.FLOAT,componentsPerAttribute:4,normalize:!1,values:e})}ct._projectNormal=Dt;var he=ct;function to(e,i){return Xt.initialize().then(function(){return g(i)&&(e=he.unpack(e,i)),he.createGeometry(e)})}var ti=to;export{ti as default}; |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.116 | ||
* Version 1.116.1 | ||
* | ||
@@ -26,2 +26,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
import{a as m}from"./chunk-TK2AA6M2.js";import{a as b}from"./chunk-FSXLPWHR.js";import{b as v,c as x,d as p}from"./chunk-37KLWU3W.js";import{d as A}from"./chunk-HTNJJ6YO.js";import"./chunk-63E276CT.js";import"./chunk-NRW2R4YV.js";import"./chunk-NSILPUHD.js";import{a as c}from"./chunk-M7WODBAD.js";import{a as y}from"./chunk-J26GWQSN.js";import"./chunk-PYB3IV2X.js";import"./chunk-H7FFK4U5.js";import"./chunk-YEUII2A5.js";import{a as i}from"./chunk-4353PD6R.js";import{b as u}from"./chunk-2S4UUFD6.js";import{e as f}from"./chunk-42VHSORI.js";function s(r){r=i(r,i.EMPTY_OBJECT);let e=i(r.vertexFormat,m.DEFAULT);this._vertexFormat=e,this._workerName="createPlaneGeometry"}s.packedLength=m.packedLength;s.pack=function(r,e,o){return u.typeOf.object("value",r),u.defined("array",e),o=i(o,0),m.pack(r._vertexFormat,e,o),e};var d=new m,P={vertexFormat:d};s.unpack=function(r,e,o){u.defined("array",r),e=i(e,0);let a=m.unpack(r,e,d);return f(o)?(o._vertexFormat=m.clone(a,o._vertexFormat),o):new s(P)};var F=new y(-.5,-.5,0),l=new y(.5,.5,0);s.createGeometry=function(r){let e=r._vertexFormat,o=new b,a,n;if(e.position){if(n=new Float64Array(4*3),n[0]=F.x,n[1]=F.y,n[2]=0,n[3]=l.x,n[4]=F.y,n[5]=0,n[6]=l.x,n[7]=l.y,n[8]=0,n[9]=F.x,n[10]=l.y,n[11]=0,o.position=new p({componentDatatype:c.DOUBLE,componentsPerAttribute:3,values:n}),e.normal){let t=new Float32Array(12);t[0]=0,t[1]=0,t[2]=1,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=1,t[9]=0,t[10]=0,t[11]=1,o.normal=new p({componentDatatype:c.FLOAT,componentsPerAttribute:3,values:t})}if(e.st){let t=new Float32Array(8);t[0]=0,t[1]=0,t[2]=1,t[3]=0,t[4]=1,t[5]=1,t[6]=0,t[7]=1,o.st=new p({componentDatatype:c.FLOAT,componentsPerAttribute:2,values:t})}if(e.tangent){let t=new Float32Array(12);t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t[6]=1,t[7]=0,t[8]=0,t[9]=1,t[10]=0,t[11]=0,o.tangent=new p({componentDatatype:c.FLOAT,componentsPerAttribute:3,values:t})}if(e.bitangent){let t=new Float32Array(12);t[0]=0,t[1]=1,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=1,t[8]=0,t[9]=0,t[10]=1,t[11]=0,o.bitangent=new p({componentDatatype:c.FLOAT,componentsPerAttribute:3,values:t})}a=new Uint16Array(2*3),a[0]=0,a[1]=1,a[2]=2,a[3]=0,a[4]=2,a[5]=3}return new x({attributes:o,indices:a,primitiveType:v.TRIANGLES,boundingSphere:new A(y.ZERO,Math.sqrt(2))})};var w=s;function h(r,e){return f(e)&&(r=w.unpack(r,e)),w.createGeometry(r)}var M=h;export{M as default}; | ||
import{a as m}from"./chunk-64WQCGAE.js";import{a as b}from"./chunk-F5TB5EI7.js";import{b as v,c as x,d as p}from"./chunk-VAPKZ5PR.js";import{d as A}from"./chunk-DXGEUDM7.js";import"./chunk-5IUHFVP3.js";import"./chunk-OE3P25NW.js";import"./chunk-HIT4T4MS.js";import{a as c}from"./chunk-3KRBUMEX.js";import{a as y}from"./chunk-PQ6NV4GA.js";import"./chunk-74I3QBVP.js";import"./chunk-BLVYEJBC.js";import"./chunk-A6PYE4JS.js";import{a as i}from"./chunk-T23IKWCM.js";import{b as u}from"./chunk-HJ33TVGP.js";import{e as f}from"./chunk-WL4PTXMO.js";function s(r){r=i(r,i.EMPTY_OBJECT);let e=i(r.vertexFormat,m.DEFAULT);this._vertexFormat=e,this._workerName="createPlaneGeometry"}s.packedLength=m.packedLength;s.pack=function(r,e,o){return u.typeOf.object("value",r),u.defined("array",e),o=i(o,0),m.pack(r._vertexFormat,e,o),e};var d=new m,P={vertexFormat:d};s.unpack=function(r,e,o){u.defined("array",r),e=i(e,0);let a=m.unpack(r,e,d);return f(o)?(o._vertexFormat=m.clone(a,o._vertexFormat),o):new s(P)};var F=new y(-.5,-.5,0),l=new y(.5,.5,0);s.createGeometry=function(r){let e=r._vertexFormat,o=new b,a,n;if(e.position){if(n=new Float64Array(4*3),n[0]=F.x,n[1]=F.y,n[2]=0,n[3]=l.x,n[4]=F.y,n[5]=0,n[6]=l.x,n[7]=l.y,n[8]=0,n[9]=F.x,n[10]=l.y,n[11]=0,o.position=new p({componentDatatype:c.DOUBLE,componentsPerAttribute:3,values:n}),e.normal){let t=new Float32Array(12);t[0]=0,t[1]=0,t[2]=1,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=1,t[9]=0,t[10]=0,t[11]=1,o.normal=new p({componentDatatype:c.FLOAT,componentsPerAttribute:3,values:t})}if(e.st){let t=new Float32Array(8);t[0]=0,t[1]=0,t[2]=1,t[3]=0,t[4]=1,t[5]=1,t[6]=0,t[7]=1,o.st=new p({componentDatatype:c.FLOAT,componentsPerAttribute:2,values:t})}if(e.tangent){let t=new Float32Array(12);t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t[6]=1,t[7]=0,t[8]=0,t[9]=1,t[10]=0,t[11]=0,o.tangent=new p({componentDatatype:c.FLOAT,componentsPerAttribute:3,values:t})}if(e.bitangent){let t=new Float32Array(12);t[0]=0,t[1]=1,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=1,t[8]=0,t[9]=0,t[10]=1,t[11]=0,o.bitangent=new p({componentDatatype:c.FLOAT,componentsPerAttribute:3,values:t})}a=new Uint16Array(2*3),a[0]=0,a[1]=1,a[2]=2,a[3]=0,a[4]=2,a[5]=3}return new x({attributes:o,indices:a,primitiveType:v.TRIANGLES,boundingSphere:new A(y.ZERO,Math.sqrt(2))})};var w=s;function h(r,e){return f(e)&&(r=w.unpack(r,e)),w.createGeometry(r)}var M=h;export{M as default}; |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.116 | ||
* Version 1.116.1 | ||
* | ||
@@ -26,2 +26,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
import{a as l}from"./chunk-FSXLPWHR.js";import{b as d,c as y,d as s}from"./chunk-37KLWU3W.js";import{d as c}from"./chunk-HTNJJ6YO.js";import"./chunk-63E276CT.js";import"./chunk-NRW2R4YV.js";import"./chunk-NSILPUHD.js";import{a as f}from"./chunk-M7WODBAD.js";import{a}from"./chunk-J26GWQSN.js";import"./chunk-PYB3IV2X.js";import"./chunk-H7FFK4U5.js";import"./chunk-YEUII2A5.js";import"./chunk-4353PD6R.js";import{b as m}from"./chunk-2S4UUFD6.js";import{e as i}from"./chunk-42VHSORI.js";function o(){this._workerName="createPlaneOutlineGeometry"}o.packedLength=0;o.pack=function(r,e){return m.defined("value",r),m.defined("array",e),e};o.unpack=function(r,e,t){return m.defined("array",r),i(t)?t:new o};var n=new a(-.5,-.5,0),p=new a(.5,.5,0);o.createGeometry=function(){let r=new l,e=new Uint16Array(4*2),t=new Float64Array(4*3);return t[0]=n.x,t[1]=n.y,t[2]=n.z,t[3]=p.x,t[4]=n.y,t[5]=n.z,t[6]=p.x,t[7]=p.y,t[8]=n.z,t[9]=n.x,t[10]=p.y,t[11]=n.z,r.position=new s({componentDatatype:f.DOUBLE,componentsPerAttribute:3,values:t}),e[0]=0,e[1]=1,e[2]=1,e[3]=2,e[4]=2,e[5]=3,e[6]=3,e[7]=0,new y({attributes:r,indices:e,primitiveType:d.LINES,boundingSphere:new c(a.ZERO,Math.sqrt(2))})};var u=o;function w(r,e){return i(e)&&(r=u.unpack(r,e)),u.createGeometry(r)}var D=w;export{D as default}; | ||
import{a as l}from"./chunk-F5TB5EI7.js";import{b as d,c as y,d as s}from"./chunk-VAPKZ5PR.js";import{d as c}from"./chunk-DXGEUDM7.js";import"./chunk-5IUHFVP3.js";import"./chunk-OE3P25NW.js";import"./chunk-HIT4T4MS.js";import{a as f}from"./chunk-3KRBUMEX.js";import{a}from"./chunk-PQ6NV4GA.js";import"./chunk-74I3QBVP.js";import"./chunk-BLVYEJBC.js";import"./chunk-A6PYE4JS.js";import"./chunk-T23IKWCM.js";import{b as m}from"./chunk-HJ33TVGP.js";import{e as i}from"./chunk-WL4PTXMO.js";function o(){this._workerName="createPlaneOutlineGeometry"}o.packedLength=0;o.pack=function(r,e){return m.defined("value",r),m.defined("array",e),e};o.unpack=function(r,e,t){return m.defined("array",r),i(t)?t:new o};var n=new a(-.5,-.5,0),p=new a(.5,.5,0);o.createGeometry=function(){let r=new l,e=new Uint16Array(4*2),t=new Float64Array(4*3);return t[0]=n.x,t[1]=n.y,t[2]=n.z,t[3]=p.x,t[4]=n.y,t[5]=n.z,t[6]=p.x,t[7]=p.y,t[8]=n.z,t[9]=n.x,t[10]=p.y,t[11]=n.z,r.position=new s({componentDatatype:f.DOUBLE,componentsPerAttribute:3,values:t}),e[0]=0,e[1]=1,e[2]=1,e[3]=2,e[4]=2,e[5]=3,e[6]=3,e[7]=0,new y({attributes:r,indices:e,primitiveType:d.LINES,boundingSphere:new c(a.ZERO,Math.sqrt(2))})};var u=o;function w(r,e){return i(e)&&(r=u.unpack(r,e)),u.createGeometry(r)}var D=w;export{D as default}; |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.116 | ||
* Version 1.116.1 | ||
* | ||
@@ -26,2 +26,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
import{a as dt}from"./chunk-AEWBPSCB.js";import{a as F}from"./chunk-4NDMMWOM.js";import{a as at}from"./chunk-7VY24AS3.js";import{a as st}from"./chunk-ZZAO5JE6.js";import{a as bt}from"./chunk-EJXUGS5C.js";import"./chunk-BMTOWA7K.js";import"./chunk-W2YTVRCC.js";import{a as ht}from"./chunk-TXIAMGDC.js";import{a as Q}from"./chunk-TK2AA6M2.js";import{a as K}from"./chunk-YPW76GEP.js";import"./chunk-GKRM7KEL.js";import{a as gt,b as nt}from"./chunk-4NVG6N2Q.js";import"./chunk-5CBMSEPD.js";import"./chunk-2DF4CAYN.js";import{a as wt,b as yt}from"./chunk-LGFQRF3V.js";import"./chunk-AHZBRYZA.js";import{a as lt}from"./chunk-TWAPNO4J.js";import"./chunk-FSXLPWHR.js";import{c as mt,d as tt}from"./chunk-37KLWU3W.js";import{d as Tt,e as ct}from"./chunk-HTNJJ6YO.js";import"./chunk-63E276CT.js";import"./chunk-NRW2R4YV.js";import{c as _t}from"./chunk-NSILPUHD.js";import{a as $}from"./chunk-M7WODBAD.js";import{a as c,b as ot,c as O,d as V,e as W}from"./chunk-J26GWQSN.js";import{a as l}from"./chunk-PYB3IV2X.js";import"./chunk-H7FFK4U5.js";import"./chunk-YEUII2A5.js";import{a as L}from"./chunk-4353PD6R.js";import{a as ut,b as q}from"./chunk-2S4UUFD6.js";import{e as P}from"./chunk-42VHSORI.js";function b(t,e){this.position=t,P(this.position)||(this.position=new O),this.tangentPlane=e,P(this.tangentPlane)||(this.tangentPlane=b.NORTH_POLE_TANGENT_PLANE)}Object.defineProperties(b.prototype,{ellipsoid:{get:function(){return this.tangentPlane.ellipsoid}},x:{get:function(){return this.position.x}},y:{get:function(){return this.position.y}},conformalLatitude:{get:function(){let t=O.magnitude(this.position),e=2*this.ellipsoid.maximumRadius;return this.tangentPlane.plane.normal.z*(l.PI_OVER_TWO-2*Math.atan2(t,e))}},longitude:{get:function(){let t=l.PI_OVER_TWO+Math.atan2(this.y,this.x);return t>Math.PI&&(t-=l.TWO_PI),t}}});var it=new ot,Rt=new c;b.prototype.getLatitude=function(t){P(t)||(t=V.WGS84),it.latitude=this.conformalLatitude,it.longitude=this.longitude,it.height=0;let e=this.ellipsoid.cartographicToCartesian(it,Rt);return t.cartesianToCartographic(e,it),it.latitude};var It=new wt,Lt=new c,Ft=new c;b.fromCartesian=function(t,e){q.defined("cartesian",t);let o=l.signNotZero(t.z),n=b.NORTH_POLE_TANGENT_PLANE,s=b.SOUTH_POLE;o<0&&(n=b.SOUTH_POLE_TANGENT_PLANE,s=b.NORTH_POLE);let i=It;i.origin=n.ellipsoid.scaleToGeocentricSurface(t,i.origin),i.direction=c.subtract(i.origin,s,Lt),c.normalize(i.direction,i.direction);let r=yt.rayPlane(i,n.plane,Ft),f=c.subtract(r,s,r),d=c.dot(n.xAxis,f),p=o*c.dot(n.yAxis,f);return P(e)?(e.position=new O(d,p),e.tangentPlane=n,e):new b(new O(d,p),n)};b.fromCartesianArray=function(t,e){q.defined("cartesians",t);let o=t.length;P(e)?e.length=o:e=new Array(o);for(let n=0;n<o;n++)e[n]=b.fromCartesian(t[n],e[n]);return e};b.clone=function(t,e){if(P(t))return P(e)?(e.position=t.position,e.tangentPlane=t.tangentPlane,e):new b(t.position,t.tangentPlane)};b.HALF_UNIT_SPHERE=Object.freeze(new V(.5,.5,.5));b.NORTH_POLE=Object.freeze(new c(0,0,.5));b.SOUTH_POLE=Object.freeze(new c(0,0,-.5));b.NORTH_POLE_TANGENT_PLANE=Object.freeze(new K(b.NORTH_POLE,b.HALF_UNIT_SPHERE));b.SOUTH_POLE_TANGENT_PLANE=Object.freeze(new K(b.SOUTH_POLE,b.HALF_UNIT_SPHERE));var D=b;var vt=new ot,Ot=new ot;function St(t,e,o,n){let i=n.cartesianToCartographic(t,vt).height,r=n.cartesianToCartographic(e,Ot);r.height=i,n.cartographicToCartesian(r,e);let f=n.cartesianToCartographic(o,Ot);f.height=i-100,n.cartographicToCartesian(f,o)}var Et=new dt,Vt=new c,Bt=new c,Mt=new c,jt=new c,kt=new c,zt=new c,ft=new c,Z=new c,rt=new c,Dt=new O,Wt=new O,Ut=new c,At=new ct,Gt=new W,Yt=new W;function pt(t){let e=t.vertexFormat,o=t.geometry,n=t.shadowVolume,s=o.attributes.position.values,i=P(o.attributes.st)?o.attributes.st.values:void 0,r=s.length,f=t.wall,d=t.top||f,p=t.bottom||f;if(e.st||e.normal||e.tangent||e.bitangent||n){let w=t.boundingRectangle,a=t.rotationAxis,H=t.projectTo2d,x=t.ellipsoid,j=t.stRotation,C=t.perPositionHeight,R=Dt;R.x=w.x,R.y=w.y;let B=e.st?new Float32Array(2*(r/3)):void 0,u;e.normal&&(C&&d&&!f?u=o.attributes.normal.values:u=new Float32Array(r));let E=e.tangent?new Float32Array(r):void 0,A=e.bitangent?new Float32Array(r):void 0,v=n?new Float32Array(r):void 0,T=0,y=0,_=Bt,h=Mt,g=jt,k=!0,Y=Gt,J=Yt;if(j!==0){let M=ct.fromAxisAngle(a,j,At);Y=W.fromQuaternion(M,Y),M=ct.fromAxisAngle(a,-j,At),J=W.fromQuaternion(M,J)}else Y=W.clone(W.IDENTITY,Y),J=W.clone(W.IDENTITY,J);let m=0,I=0;d&&p&&(m=r/2,I=r/3,r/=2);for(let M=0;M<r;M+=3){let z=c.fromArray(s,M,Ut);if(e.st&&!P(i)){let N=W.multiplyByVector(Y,z,Vt);N=x.scaleToGeodeticSurface(N,N);let S=H([N],Wt)[0];O.subtract(S,R,S);let X=l.clamp(S.x/w.width,0,1),et=l.clamp(S.y/w.height,0,1);p&&(B[T+I]=X,B[T+1+I]=et),d&&(B[T]=X,B[T+1]=et),T+=2}if(e.normal||e.tangent||e.bitangent||n){let N=y+1,S=y+2;if(f){if(M+3<r){let X=c.fromArray(s,M+3,kt);if(k){let et=c.fromArray(s,M+r,zt);C&&St(z,X,et,x),c.subtract(X,z,X),c.subtract(et,z,et),_=c.normalize(c.cross(et,X,_),_),k=!1}c.equalsEpsilon(X,z,l.EPSILON10)&&(k=!0)}(e.tangent||e.bitangent)&&(g=x.geodeticSurfaceNormal(z,g),e.tangent&&(h=c.normalize(c.cross(g,_,h),h)))}else _=x.geodeticSurfaceNormal(z,_),(e.tangent||e.bitangent)&&(C&&(ft=c.fromArray(u,y,ft),Z=c.cross(c.UNIT_Z,ft,Z),Z=c.normalize(W.multiplyByVector(J,Z,Z),Z),e.bitangent&&(rt=c.normalize(c.cross(ft,Z,rt),rt))),h=c.cross(c.UNIT_Z,_,h),h=c.normalize(W.multiplyByVector(J,h,h),h),e.bitangent&&(g=c.normalize(c.cross(_,h,g),g)));e.normal&&(t.wall?(u[y+m]=_.x,u[N+m]=_.y,u[S+m]=_.z):p&&(u[y+m]=-_.x,u[N+m]=-_.y,u[S+m]=-_.z),(d&&!C||f)&&(u[y]=_.x,u[N]=_.y,u[S]=_.z)),n&&(f&&(_=x.geodeticSurfaceNormal(z,_)),v[y+m]=-_.x,v[N+m]=-_.y,v[S+m]=-_.z),e.tangent&&(t.wall?(E[y+m]=h.x,E[N+m]=h.y,E[S+m]=h.z):p&&(E[y+m]=-h.x,E[N+m]=-h.y,E[S+m]=-h.z),d&&(C?(E[y]=Z.x,E[N]=Z.y,E[S]=Z.z):(E[y]=h.x,E[N]=h.y,E[S]=h.z))),e.bitangent&&(p&&(A[y+m]=g.x,A[N+m]=g.y,A[S+m]=g.z),d&&(C?(A[y]=rt.x,A[N]=rt.y,A[S]=rt.z):(A[y]=g.x,A[N]=g.y,A[S]=g.z))),y+=3}}e.st&&!P(i)&&(o.attributes.st=new tt({componentDatatype:$.FLOAT,componentsPerAttribute:2,values:B})),e.normal&&(o.attributes.normal=new tt({componentDatatype:$.FLOAT,componentsPerAttribute:3,values:u})),e.tangent&&(o.attributes.tangent=new tt({componentDatatype:$.FLOAT,componentsPerAttribute:3,values:E})),e.bitangent&&(o.attributes.bitangent=new tt({componentDatatype:$.FLOAT,componentsPerAttribute:3,values:A})),n&&(o.attributes.extrudeDirection=new tt({componentDatatype:$.FLOAT,componentsPerAttribute:3,values:v}))}if(t.extrude&&P(t.offsetAttribute)){let w=s.length/3,a=new Uint8Array(w);if(t.offsetAttribute===ht.TOP)d&&p||f?a=a.fill(1,0,w/2):d&&(a=a.fill(1));else{let H=t.offsetAttribute===ht.NONE?0:1;a=a.fill(H)}o.attributes.applyOffset=new tt({componentDatatype:$.UNSIGNED_BYTE,componentsPerAttribute:1,values:a})}return o}var Ht=[];function qt(t,e,o,n,s,i,r,f,d,p){let w={walls:[]},a;if(r||f){let u=F.createGeometryFromPositions(t,e,o,n,i,d,p),E=u.attributes.position.values,A=u.indices,v,T;if(r&&f){let y=E.concat(E);v=y.length/3,T=lt.createTypedArray(v,A.length*2),T.set(A);let _=A.length,h=v/2;for(a=0;a<_;a+=3){let g=T[a]+h,k=T[a+1]+h,Y=T[a+2]+h;T[a+_]=Y,T[a+1+_]=k,T[a+2+_]=g}if(u.attributes.position.values=y,i&&d.normal){let g=u.attributes.normal.values;u.attributes.normal.values=new Float32Array(y.length),u.attributes.normal.values.set(g)}if(d.st&&P(o)){let g=u.attributes.st.values;u.attributes.st.values=new Float32Array(v*2),u.attributes.st.values=g.concat(g)}u.indices=T}else if(f){for(v=E.length/3,T=lt.createTypedArray(v,A.length),a=0;a<A.length;a+=3)T[a]=A[a+2],T[a+1]=A[a+1],T[a+2]=A[a];u.indices=T}w.topAndBottom=new st({geometry:u})}let H=s.outerRing,x=K.fromPoints(H,t),j=x.projectPointsOntoPlane(H,Ht),C=nt.computeWindingOrder2D(j);C===gt.CLOCKWISE&&(H=H.slice().reverse());let R=F.computeWallGeometry(H,o,t,n,i,p);w.walls.push(new st({geometry:R}));let B=s.holes;for(a=0;a<B.length;a++){let u=B[a];j=x.projectPointsOntoPlane(u,Ht),C=nt.computeWindingOrder2D(j),C===gt.COUNTER_CLOCKWISE&&(u=u.slice().reverse()),R=F.computeWallGeometry(u,o,t,n,i,p),w.walls.push(new st({geometry:R}))}return w}function G(t){if(q.typeOf.object("options",t),q.typeOf.object("options.polygonHierarchy",t.polygonHierarchy),P(t.perPositionHeight)&&t.perPositionHeight&&P(t.height))throw new ut("Cannot use both options.perPositionHeight and options.height");if(P(t.arcType)&&t.arcType!==at.GEODESIC&&t.arcType!==at.RHUMB)throw new ut("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");let e=t.polygonHierarchy,o=L(t.vertexFormat,Q.DEFAULT),n=L(t.ellipsoid,V.WGS84),s=L(t.granularity,l.RADIANS_PER_DEGREE),i=L(t.stRotation,0),r=t.textureCoordinates,f=L(t.perPositionHeight,!1),d=f&&P(t.extrudedHeight),p=L(t.height,0),w=L(t.extrudedHeight,p);if(!d){let a=Math.max(p,w);w=Math.min(p,w),p=a}this._vertexFormat=Q.clone(o),this._ellipsoid=V.clone(n),this._granularity=s,this._stRotation=i,this._height=p,this._extrudedHeight=w,this._closeTop=L(t.closeTop,!0),this._closeBottom=L(t.closeBottom,!0),this._polygonHierarchy=e,this._perPositionHeight=f,this._perPositionHeightExtrude=d,this._shadowVolume=L(t.shadowVolume,!1),this._workerName="createPolygonGeometry",this._offsetAttribute=t.offsetAttribute,this._arcType=L(t.arcType,at.GEODESIC),this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0,this._textureCoordinates=r,this.packedLength=F.computeHierarchyPackedLength(e,c)+V.packedLength+Q.packedLength+(r?F.computeHierarchyPackedLength(r,O):1)+12}G.fromPositions=function(t){t=L(t,L.EMPTY_OBJECT),q.defined("options.positions",t.positions);let e={polygonHierarchy:{positions:t.positions},height:t.height,extrudedHeight:t.extrudedHeight,vertexFormat:t.vertexFormat,stRotation:t.stRotation,ellipsoid:t.ellipsoid,granularity:t.granularity,perPositionHeight:t.perPositionHeight,closeTop:t.closeTop,closeBottom:t.closeBottom,offsetAttribute:t.offsetAttribute,arcType:t.arcType,textureCoordinates:t.textureCoordinates};return new G(e)};G.pack=function(t,e,o){return q.typeOf.object("value",t),q.defined("array",e),o=L(o,0),o=F.packPolygonHierarchy(t._polygonHierarchy,e,o,c),V.pack(t._ellipsoid,e,o),o+=V.packedLength,Q.pack(t._vertexFormat,e,o),o+=Q.packedLength,e[o++]=t._height,e[o++]=t._extrudedHeight,e[o++]=t._granularity,e[o++]=t._stRotation,e[o++]=t._perPositionHeightExtrude?1:0,e[o++]=t._perPositionHeight?1:0,e[o++]=t._closeTop?1:0,e[o++]=t._closeBottom?1:0,e[o++]=t._shadowVolume?1:0,e[o++]=L(t._offsetAttribute,-1),e[o++]=t._arcType,P(t._textureCoordinates)?o=F.packPolygonHierarchy(t._textureCoordinates,e,o,O):e[o++]=-1,e[o++]=t.packedLength,e};var Qt=V.clone(V.UNIT_SPHERE),Zt=new Q,Kt={polygonHierarchy:{}};G.unpack=function(t,e,o){q.defined("array",t),e=L(e,0);let n=F.unpackPolygonHierarchy(t,e,c);e=n.startingIndex,delete n.startingIndex;let s=V.unpack(t,e,Qt);e+=V.packedLength;let i=Q.unpack(t,e,Zt);e+=Q.packedLength;let r=t[e++],f=t[e++],d=t[e++],p=t[e++],w=t[e++]===1,a=t[e++]===1,H=t[e++]===1,x=t[e++]===1,j=t[e++]===1,C=t[e++],R=t[e++],B=t[e]===-1?void 0:F.unpackPolygonHierarchy(t,e,O);P(B)?(e=B.startingIndex,delete B.startingIndex):e++;let u=t[e++];return P(o)||(o=new G(Kt)),o._polygonHierarchy=n,o._ellipsoid=V.clone(s,o._ellipsoid),o._vertexFormat=Q.clone(i,o._vertexFormat),o._height=r,o._extrudedHeight=f,o._granularity=d,o._stRotation=p,o._perPositionHeightExtrude=w,o._perPositionHeight=a,o._closeTop=H,o._closeBottom=x,o._shadowVolume=j,o._offsetAttribute=C===-1?void 0:C,o._arcType=R,o._textureCoordinates=B,o.packedLength=u,o};var Jt=new O,Xt=new O,$t=new D;function xt(t,e,o,n,s,i){let r=t.longitude,f=r>=0?r:r+l.TWO_PI;s.westOverIdl=Math.min(s.westOverIdl,f),s.eastOverIdl=Math.max(s.eastOverIdl,f),i.west=Math.min(i.west,r),i.east=Math.max(i.east,r);let d=t.getLatitude(o),p=d;if(i.south=Math.min(i.south,d),i.north=Math.max(i.north,d),n!==at.RHUMB){let H=O.subtract(e.position,t.position,Jt),x=O.dot(e.position,H)/O.dot(H,H);if(x>0&&x<1){let j=O.add(e.position,O.multiplyByScalar(H,-x,H),Xt),C=D.clone(e,$t);C.position=j;let R=C.getLatitude(o);i.south=Math.min(i.south,R),i.north=Math.max(i.north,R),Math.abs(d)>Math.abs(R)&&(p=R)}}let w=e.x*t.y-t.x*e.y,a=Math.sign(w);a!==0&&(a*=O.angleBetween(e.position,t.position)),p>=0&&(s.northAngle+=a),p<=0&&(s.southAngle+=a)}var Ct=new D,te=new D,U={northAngle:0,southAngle:0,westOverIdl:0,eastOverIdl:0};G.computeRectangleFromPositions=function(t,e,o,n){if(q.defined("positions",t),P(n)||(n=new _t),t.length<3)return n;n.west=Number.POSITIVE_INFINITY,n.east=Number.NEGATIVE_INFINITY,n.south=Number.POSITIVE_INFINITY,n.north=Number.NEGATIVE_INFINITY,U.northAngle=0,U.southAngle=0,U.westOverIdl=Number.POSITIVE_INFINITY,U.eastOverIdl=Number.NEGATIVE_INFINITY;let s=t.length,i=D.fromCartesian(t[0],te);for(let r=1;r<s;r++){let f=D.fromCartesian(t[r],Ct);xt(f,i,e,o,U,n),i=D.clone(f,i)}return xt(D.fromCartesian(t[0],Ct),i,e,o,U,n),n.east-n.west>U.eastOverIdl-U.westOverIdl&&(n.west=U.westOverIdl,n.east=U.eastOverIdl,n.east>l.PI&&(n.east=n.east-l.TWO_PI),n.west>l.PI&&(n.west=n.west-l.TWO_PI)),l.equalsEpsilon(Math.abs(U.northAngle),l.TWO_PI,l.EPSILON10)&&(n.north=l.PI_OVER_TWO,n.east=l.PI,n.west=-l.PI),l.equalsEpsilon(Math.abs(U.southAngle),l.TWO_PI,l.EPSILON10)&&(n.south=-l.PI_OVER_TWO,n.east=l.PI,n.west=-l.PI),n};var ee=new D;function oe(t,e,o){return t.height>=l.PI||t.width>=l.PI?D.fromCartesian(e[0],ee).tangentPlane:K.fromPoints(e,o)}var Nt=new ot;function ne(t,e,o){return(n,s)=>{if(t.height>=l.PI||t.width>=l.PI){if(t.south<0&&t.north>0){P(s)||(s=[]);for(let r=0;r<n.length;++r){let f=o.cartesianToCartographic(n[r],Nt);s[r]=new O(f.longitude/l.PI,f.latitude/l.PI_OVER_TWO)}return s.length=n.length,s}return D.fromCartesianArray(n,s)}return K.fromPoints(e,o).projectPointsOntoPlane(n,s)}}function ie(t,e,o){if(t.height>=l.PI||t.width>=l.PI)return(s,i)=>{if(t.south<0&&t.north>0){let r=o.cartesianToCartographic(s,Nt);return P(i)||(i=new O),i.x=r.longitude/l.PI,i.y=r.latitude/l.PI_OVER_TWO,i}return D.fromCartesian(s,i)};let n=K.fromPoints(e,o);return(s,i)=>n.projectPointsOntoPlane(s,i)}function re(t,e,o,n){return(s,i)=>!n&&(t.height>=l.PI_OVER_TWO||t.width>=2*l.PI_OVER_THREE)?F.splitPolygonsOnEquator(s,e,o,i):s}function se(t,e,o,n){if(e.height>=l.PI||e.width>=l.PI)return dt.fromRectangle(e,void 0,Et);let s=t,i=K.fromPoints(s,o);return F.computeBoundingRectangle(i.plane.normal,i.projectPointOntoPlane.bind(i),s,n,Et)}G.createGeometry=function(t){let e=t._vertexFormat,o=t._ellipsoid,n=t._granularity,s=t._stRotation,i=t._polygonHierarchy,r=t._perPositionHeight,f=t._closeTop,d=t._closeBottom,p=t._arcType,w=t._textureCoordinates,a=P(w),H=i.positions;if(H.length<3)return;let x=t.rectangle,j=F.polygonsFromHierarchy(i,a,ne(x,H,o),!r,o,re(x,o,p,r)),C=j.hierarchy,R=j.polygons,B=function(m){return m},u=a?F.polygonsFromHierarchy(w,!0,B,!1,o).polygons:void 0;if(C.length===0)return;let E=C[0].outerRing,A=se(E,x,o,s),v=[],T=t._height,y=t._extrudedHeight,_=t._perPositionHeightExtrude||!l.equalsEpsilon(T,y,0,l.EPSILON2),h={perPositionHeight:r,vertexFormat:e,geometry:void 0,rotationAxis:oe(x,E,o).plane.normal,projectTo2d:ie(x,E,o),boundingRectangle:A,ellipsoid:o,stRotation:s,textureCoordinates:void 0,bottom:!1,top:!0,wall:!1,extrude:!1,arcType:p},g;if(_)for(h.extrude=!0,h.top=f,h.bottom=d,h.shadowVolume=t._shadowVolume,h.offsetAttribute=t._offsetAttribute,g=0;g<R.length;g++){let m=qt(o,R[g],a?u[g]:void 0,n,C[g],r,f,d,e,p),I;f&&d?(I=m.topAndBottom,h.geometry=F.scaleToGeodeticHeightExtruded(I.geometry,T,y,o,r)):f?(I=m.topAndBottom,I.geometry.attributes.position.values=nt.scaleToGeodeticHeight(I.geometry.attributes.position.values,T,o,!r),h.geometry=I.geometry):d&&(I=m.topAndBottom,I.geometry.attributes.position.values=nt.scaleToGeodeticHeight(I.geometry.attributes.position.values,y,o,!0),h.geometry=I.geometry),(f||d)&&(h.wall=!1,I.geometry=pt(h),v.push(I));let M=m.walls;h.wall=!0;for(let z=0;z<M.length;z++){let N=M[z];h.geometry=F.scaleToGeodeticHeightExtruded(N.geometry,T,y,o,r),N.geometry=pt(h),v.push(N)}}else for(g=0;g<R.length;g++){let m=new st({geometry:F.createGeometryFromPositions(o,R[g],a?u[g]:void 0,n,r,e,p)});if(m.geometry.attributes.position.values=nt.scaleToGeodeticHeight(m.geometry.attributes.position.values,T,o,!r),h.geometry=m.geometry,m.geometry=pt(h),P(t._offsetAttribute)){let I=m.geometry.attributes.position.values.length,M=t._offsetAttribute===ht.NONE?0:1,z=new Uint8Array(I/3).fill(M);m.geometry.attributes.applyOffset=new tt({componentDatatype:$.UNSIGNED_BYTE,componentsPerAttribute:1,values:z})}v.push(m)}let k=bt.combineInstances(v)[0];k.attributes.position.values=new Float64Array(k.attributes.position.values),k.indices=lt.createTypedArray(k.attributes.position.values.length/3,k.indices);let Y=k.attributes,J=Tt.fromVertices(Y.position.values);return e.position||delete Y.position,new mt({attributes:Y,indices:k.indices,primitiveType:k.primitiveType,boundingSphere:J,offsetAttribute:t._offsetAttribute})};G.createShadowVolume=function(t,e,o){let n=t._granularity,s=t._ellipsoid,i=e(n,s),r=o(n,s);return new G({polygonHierarchy:t._polygonHierarchy,ellipsoid:s,stRotation:t._stRotation,granularity:n,perPositionHeight:!1,extrudedHeight:i,height:r,vertexFormat:Q.POSITION_ONLY,shadowVolume:!0,arcType:t._arcType})};function ae(t){let e=-t._stRotation;if(e===0)return[0,0,0,1,1,0];let o=t._ellipsoid,n=t._polygonHierarchy.positions,s=t.rectangle;return mt._textureCoordinateRotationPoints(n,e,o,s)}Object.defineProperties(G.prototype,{rectangle:{get:function(){if(!P(this._rectangle)){let t=this._polygonHierarchy.positions;this._rectangle=G.computeRectangleFromPositions(t,this._ellipsoid,this._arcType)}return this._rectangle}},textureCoordinateRotationPoints:{get:function(){return P(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=ae(this)),this._textureCoordinateRotationPoints}}});var Pt=G;function ce(t,e){return P(e)&&(t=Pt.unpack(t,e)),t._ellipsoid=V.clone(t._ellipsoid),Pt.createGeometry(t)}var Xe=ce;export{Xe as default}; | ||
import{a as dt}from"./chunk-MXURYLN3.js";import{a as F}from"./chunk-HIZ44UXA.js";import{a as at}from"./chunk-VAZSO7QM.js";import{a as st}from"./chunk-CFX77L57.js";import{a as bt}from"./chunk-CKVHMDPC.js";import"./chunk-JAMWPWOV.js";import"./chunk-IQ7DLQQP.js";import{a as ht}from"./chunk-XJCFZEZW.js";import{a as Q}from"./chunk-64WQCGAE.js";import{a as K}from"./chunk-7E5ZATSO.js";import"./chunk-XOMW5SDY.js";import{a as gt,b as nt}from"./chunk-ZK4DC2CW.js";import"./chunk-OBENGMDT.js";import"./chunk-LH3GDPJ4.js";import{a as wt,b as yt}from"./chunk-QC62DG5W.js";import"./chunk-R6IH5WM5.js";import{a as lt}from"./chunk-ROROM35N.js";import"./chunk-F5TB5EI7.js";import{c as mt,d as tt}from"./chunk-VAPKZ5PR.js";import{d as Tt,e as ct}from"./chunk-DXGEUDM7.js";import"./chunk-5IUHFVP3.js";import"./chunk-OE3P25NW.js";import{c as _t}from"./chunk-HIT4T4MS.js";import{a as $}from"./chunk-3KRBUMEX.js";import{a as c,b as ot,c as O,d as V,e as W}from"./chunk-PQ6NV4GA.js";import{a as l}from"./chunk-74I3QBVP.js";import"./chunk-BLVYEJBC.js";import"./chunk-A6PYE4JS.js";import{a as L}from"./chunk-T23IKWCM.js";import{a as ut,b as q}from"./chunk-HJ33TVGP.js";import{e as P}from"./chunk-WL4PTXMO.js";function b(t,e){this.position=t,P(this.position)||(this.position=new O),this.tangentPlane=e,P(this.tangentPlane)||(this.tangentPlane=b.NORTH_POLE_TANGENT_PLANE)}Object.defineProperties(b.prototype,{ellipsoid:{get:function(){return this.tangentPlane.ellipsoid}},x:{get:function(){return this.position.x}},y:{get:function(){return this.position.y}},conformalLatitude:{get:function(){let t=O.magnitude(this.position),e=2*this.ellipsoid.maximumRadius;return this.tangentPlane.plane.normal.z*(l.PI_OVER_TWO-2*Math.atan2(t,e))}},longitude:{get:function(){let t=l.PI_OVER_TWO+Math.atan2(this.y,this.x);return t>Math.PI&&(t-=l.TWO_PI),t}}});var it=new ot,Rt=new c;b.prototype.getLatitude=function(t){P(t)||(t=V.WGS84),it.latitude=this.conformalLatitude,it.longitude=this.longitude,it.height=0;let e=this.ellipsoid.cartographicToCartesian(it,Rt);return t.cartesianToCartographic(e,it),it.latitude};var It=new wt,Lt=new c,Ft=new c;b.fromCartesian=function(t,e){q.defined("cartesian",t);let o=l.signNotZero(t.z),n=b.NORTH_POLE_TANGENT_PLANE,s=b.SOUTH_POLE;o<0&&(n=b.SOUTH_POLE_TANGENT_PLANE,s=b.NORTH_POLE);let i=It;i.origin=n.ellipsoid.scaleToGeocentricSurface(t,i.origin),i.direction=c.subtract(i.origin,s,Lt),c.normalize(i.direction,i.direction);let r=yt.rayPlane(i,n.plane,Ft),f=c.subtract(r,s,r),d=c.dot(n.xAxis,f),p=o*c.dot(n.yAxis,f);return P(e)?(e.position=new O(d,p),e.tangentPlane=n,e):new b(new O(d,p),n)};b.fromCartesianArray=function(t,e){q.defined("cartesians",t);let o=t.length;P(e)?e.length=o:e=new Array(o);for(let n=0;n<o;n++)e[n]=b.fromCartesian(t[n],e[n]);return e};b.clone=function(t,e){if(P(t))return P(e)?(e.position=t.position,e.tangentPlane=t.tangentPlane,e):new b(t.position,t.tangentPlane)};b.HALF_UNIT_SPHERE=Object.freeze(new V(.5,.5,.5));b.NORTH_POLE=Object.freeze(new c(0,0,.5));b.SOUTH_POLE=Object.freeze(new c(0,0,-.5));b.NORTH_POLE_TANGENT_PLANE=Object.freeze(new K(b.NORTH_POLE,b.HALF_UNIT_SPHERE));b.SOUTH_POLE_TANGENT_PLANE=Object.freeze(new K(b.SOUTH_POLE,b.HALF_UNIT_SPHERE));var D=b;var vt=new ot,Ot=new ot;function St(t,e,o,n){let i=n.cartesianToCartographic(t,vt).height,r=n.cartesianToCartographic(e,Ot);r.height=i,n.cartographicToCartesian(r,e);let f=n.cartesianToCartographic(o,Ot);f.height=i-100,n.cartographicToCartesian(f,o)}var Et=new dt,Vt=new c,Bt=new c,Mt=new c,jt=new c,kt=new c,zt=new c,ft=new c,Z=new c,rt=new c,Dt=new O,Wt=new O,Ut=new c,At=new ct,Gt=new W,Yt=new W;function pt(t){let e=t.vertexFormat,o=t.geometry,n=t.shadowVolume,s=o.attributes.position.values,i=P(o.attributes.st)?o.attributes.st.values:void 0,r=s.length,f=t.wall,d=t.top||f,p=t.bottom||f;if(e.st||e.normal||e.tangent||e.bitangent||n){let w=t.boundingRectangle,a=t.rotationAxis,H=t.projectTo2d,x=t.ellipsoid,j=t.stRotation,C=t.perPositionHeight,R=Dt;R.x=w.x,R.y=w.y;let B=e.st?new Float32Array(2*(r/3)):void 0,u;e.normal&&(C&&d&&!f?u=o.attributes.normal.values:u=new Float32Array(r));let E=e.tangent?new Float32Array(r):void 0,A=e.bitangent?new Float32Array(r):void 0,v=n?new Float32Array(r):void 0,T=0,y=0,_=Bt,h=Mt,g=jt,k=!0,Y=Gt,J=Yt;if(j!==0){let M=ct.fromAxisAngle(a,j,At);Y=W.fromQuaternion(M,Y),M=ct.fromAxisAngle(a,-j,At),J=W.fromQuaternion(M,J)}else Y=W.clone(W.IDENTITY,Y),J=W.clone(W.IDENTITY,J);let m=0,I=0;d&&p&&(m=r/2,I=r/3,r/=2);for(let M=0;M<r;M+=3){let z=c.fromArray(s,M,Ut);if(e.st&&!P(i)){let N=W.multiplyByVector(Y,z,Vt);N=x.scaleToGeodeticSurface(N,N);let S=H([N],Wt)[0];O.subtract(S,R,S);let X=l.clamp(S.x/w.width,0,1),et=l.clamp(S.y/w.height,0,1);p&&(B[T+I]=X,B[T+1+I]=et),d&&(B[T]=X,B[T+1]=et),T+=2}if(e.normal||e.tangent||e.bitangent||n){let N=y+1,S=y+2;if(f){if(M+3<r){let X=c.fromArray(s,M+3,kt);if(k){let et=c.fromArray(s,M+r,zt);C&&St(z,X,et,x),c.subtract(X,z,X),c.subtract(et,z,et),_=c.normalize(c.cross(et,X,_),_),k=!1}c.equalsEpsilon(X,z,l.EPSILON10)&&(k=!0)}(e.tangent||e.bitangent)&&(g=x.geodeticSurfaceNormal(z,g),e.tangent&&(h=c.normalize(c.cross(g,_,h),h)))}else _=x.geodeticSurfaceNormal(z,_),(e.tangent||e.bitangent)&&(C&&(ft=c.fromArray(u,y,ft),Z=c.cross(c.UNIT_Z,ft,Z),Z=c.normalize(W.multiplyByVector(J,Z,Z),Z),e.bitangent&&(rt=c.normalize(c.cross(ft,Z,rt),rt))),h=c.cross(c.UNIT_Z,_,h),h=c.normalize(W.multiplyByVector(J,h,h),h),e.bitangent&&(g=c.normalize(c.cross(_,h,g),g)));e.normal&&(t.wall?(u[y+m]=_.x,u[N+m]=_.y,u[S+m]=_.z):p&&(u[y+m]=-_.x,u[N+m]=-_.y,u[S+m]=-_.z),(d&&!C||f)&&(u[y]=_.x,u[N]=_.y,u[S]=_.z)),n&&(f&&(_=x.geodeticSurfaceNormal(z,_)),v[y+m]=-_.x,v[N+m]=-_.y,v[S+m]=-_.z),e.tangent&&(t.wall?(E[y+m]=h.x,E[N+m]=h.y,E[S+m]=h.z):p&&(E[y+m]=-h.x,E[N+m]=-h.y,E[S+m]=-h.z),d&&(C?(E[y]=Z.x,E[N]=Z.y,E[S]=Z.z):(E[y]=h.x,E[N]=h.y,E[S]=h.z))),e.bitangent&&(p&&(A[y+m]=g.x,A[N+m]=g.y,A[S+m]=g.z),d&&(C?(A[y]=rt.x,A[N]=rt.y,A[S]=rt.z):(A[y]=g.x,A[N]=g.y,A[S]=g.z))),y+=3}}e.st&&!P(i)&&(o.attributes.st=new tt({componentDatatype:$.FLOAT,componentsPerAttribute:2,values:B})),e.normal&&(o.attributes.normal=new tt({componentDatatype:$.FLOAT,componentsPerAttribute:3,values:u})),e.tangent&&(o.attributes.tangent=new tt({componentDatatype:$.FLOAT,componentsPerAttribute:3,values:E})),e.bitangent&&(o.attributes.bitangent=new tt({componentDatatype:$.FLOAT,componentsPerAttribute:3,values:A})),n&&(o.attributes.extrudeDirection=new tt({componentDatatype:$.FLOAT,componentsPerAttribute:3,values:v}))}if(t.extrude&&P(t.offsetAttribute)){let w=s.length/3,a=new Uint8Array(w);if(t.offsetAttribute===ht.TOP)d&&p||f?a=a.fill(1,0,w/2):d&&(a=a.fill(1));else{let H=t.offsetAttribute===ht.NONE?0:1;a=a.fill(H)}o.attributes.applyOffset=new tt({componentDatatype:$.UNSIGNED_BYTE,componentsPerAttribute:1,values:a})}return o}var Ht=[];function qt(t,e,o,n,s,i,r,f,d,p){let w={walls:[]},a;if(r||f){let u=F.createGeometryFromPositions(t,e,o,n,i,d,p),E=u.attributes.position.values,A=u.indices,v,T;if(r&&f){let y=E.concat(E);v=y.length/3,T=lt.createTypedArray(v,A.length*2),T.set(A);let _=A.length,h=v/2;for(a=0;a<_;a+=3){let g=T[a]+h,k=T[a+1]+h,Y=T[a+2]+h;T[a+_]=Y,T[a+1+_]=k,T[a+2+_]=g}if(u.attributes.position.values=y,i&&d.normal){let g=u.attributes.normal.values;u.attributes.normal.values=new Float32Array(y.length),u.attributes.normal.values.set(g)}if(d.st&&P(o)){let g=u.attributes.st.values;u.attributes.st.values=new Float32Array(v*2),u.attributes.st.values=g.concat(g)}u.indices=T}else if(f){for(v=E.length/3,T=lt.createTypedArray(v,A.length),a=0;a<A.length;a+=3)T[a]=A[a+2],T[a+1]=A[a+1],T[a+2]=A[a];u.indices=T}w.topAndBottom=new st({geometry:u})}let H=s.outerRing,x=K.fromPoints(H,t),j=x.projectPointsOntoPlane(H,Ht),C=nt.computeWindingOrder2D(j);C===gt.CLOCKWISE&&(H=H.slice().reverse());let R=F.computeWallGeometry(H,o,t,n,i,p);w.walls.push(new st({geometry:R}));let B=s.holes;for(a=0;a<B.length;a++){let u=B[a];j=x.projectPointsOntoPlane(u,Ht),C=nt.computeWindingOrder2D(j),C===gt.COUNTER_CLOCKWISE&&(u=u.slice().reverse()),R=F.computeWallGeometry(u,o,t,n,i,p),w.walls.push(new st({geometry:R}))}return w}function G(t){if(q.typeOf.object("options",t),q.typeOf.object("options.polygonHierarchy",t.polygonHierarchy),P(t.perPositionHeight)&&t.perPositionHeight&&P(t.height))throw new ut("Cannot use both options.perPositionHeight and options.height");if(P(t.arcType)&&t.arcType!==at.GEODESIC&&t.arcType!==at.RHUMB)throw new ut("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");let e=t.polygonHierarchy,o=L(t.vertexFormat,Q.DEFAULT),n=L(t.ellipsoid,V.WGS84),s=L(t.granularity,l.RADIANS_PER_DEGREE),i=L(t.stRotation,0),r=t.textureCoordinates,f=L(t.perPositionHeight,!1),d=f&&P(t.extrudedHeight),p=L(t.height,0),w=L(t.extrudedHeight,p);if(!d){let a=Math.max(p,w);w=Math.min(p,w),p=a}this._vertexFormat=Q.clone(o),this._ellipsoid=V.clone(n),this._granularity=s,this._stRotation=i,this._height=p,this._extrudedHeight=w,this._closeTop=L(t.closeTop,!0),this._closeBottom=L(t.closeBottom,!0),this._polygonHierarchy=e,this._perPositionHeight=f,this._perPositionHeightExtrude=d,this._shadowVolume=L(t.shadowVolume,!1),this._workerName="createPolygonGeometry",this._offsetAttribute=t.offsetAttribute,this._arcType=L(t.arcType,at.GEODESIC),this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0,this._textureCoordinates=r,this.packedLength=F.computeHierarchyPackedLength(e,c)+V.packedLength+Q.packedLength+(r?F.computeHierarchyPackedLength(r,O):1)+12}G.fromPositions=function(t){t=L(t,L.EMPTY_OBJECT),q.defined("options.positions",t.positions);let e={polygonHierarchy:{positions:t.positions},height:t.height,extrudedHeight:t.extrudedHeight,vertexFormat:t.vertexFormat,stRotation:t.stRotation,ellipsoid:t.ellipsoid,granularity:t.granularity,perPositionHeight:t.perPositionHeight,closeTop:t.closeTop,closeBottom:t.closeBottom,offsetAttribute:t.offsetAttribute,arcType:t.arcType,textureCoordinates:t.textureCoordinates};return new G(e)};G.pack=function(t,e,o){return q.typeOf.object("value",t),q.defined("array",e),o=L(o,0),o=F.packPolygonHierarchy(t._polygonHierarchy,e,o,c),V.pack(t._ellipsoid,e,o),o+=V.packedLength,Q.pack(t._vertexFormat,e,o),o+=Q.packedLength,e[o++]=t._height,e[o++]=t._extrudedHeight,e[o++]=t._granularity,e[o++]=t._stRotation,e[o++]=t._perPositionHeightExtrude?1:0,e[o++]=t._perPositionHeight?1:0,e[o++]=t._closeTop?1:0,e[o++]=t._closeBottom?1:0,e[o++]=t._shadowVolume?1:0,e[o++]=L(t._offsetAttribute,-1),e[o++]=t._arcType,P(t._textureCoordinates)?o=F.packPolygonHierarchy(t._textureCoordinates,e,o,O):e[o++]=-1,e[o++]=t.packedLength,e};var Qt=V.clone(V.UNIT_SPHERE),Zt=new Q,Kt={polygonHierarchy:{}};G.unpack=function(t,e,o){q.defined("array",t),e=L(e,0);let n=F.unpackPolygonHierarchy(t,e,c);e=n.startingIndex,delete n.startingIndex;let s=V.unpack(t,e,Qt);e+=V.packedLength;let i=Q.unpack(t,e,Zt);e+=Q.packedLength;let r=t[e++],f=t[e++],d=t[e++],p=t[e++],w=t[e++]===1,a=t[e++]===1,H=t[e++]===1,x=t[e++]===1,j=t[e++]===1,C=t[e++],R=t[e++],B=t[e]===-1?void 0:F.unpackPolygonHierarchy(t,e,O);P(B)?(e=B.startingIndex,delete B.startingIndex):e++;let u=t[e++];return P(o)||(o=new G(Kt)),o._polygonHierarchy=n,o._ellipsoid=V.clone(s,o._ellipsoid),o._vertexFormat=Q.clone(i,o._vertexFormat),o._height=r,o._extrudedHeight=f,o._granularity=d,o._stRotation=p,o._perPositionHeightExtrude=w,o._perPositionHeight=a,o._closeTop=H,o._closeBottom=x,o._shadowVolume=j,o._offsetAttribute=C===-1?void 0:C,o._arcType=R,o._textureCoordinates=B,o.packedLength=u,o};var Jt=new O,Xt=new O,$t=new D;function xt(t,e,o,n,s,i){let r=t.longitude,f=r>=0?r:r+l.TWO_PI;s.westOverIdl=Math.min(s.westOverIdl,f),s.eastOverIdl=Math.max(s.eastOverIdl,f),i.west=Math.min(i.west,r),i.east=Math.max(i.east,r);let d=t.getLatitude(o),p=d;if(i.south=Math.min(i.south,d),i.north=Math.max(i.north,d),n!==at.RHUMB){let H=O.subtract(e.position,t.position,Jt),x=O.dot(e.position,H)/O.dot(H,H);if(x>0&&x<1){let j=O.add(e.position,O.multiplyByScalar(H,-x,H),Xt),C=D.clone(e,$t);C.position=j;let R=C.getLatitude(o);i.south=Math.min(i.south,R),i.north=Math.max(i.north,R),Math.abs(d)>Math.abs(R)&&(p=R)}}let w=e.x*t.y-t.x*e.y,a=Math.sign(w);a!==0&&(a*=O.angleBetween(e.position,t.position)),p>=0&&(s.northAngle+=a),p<=0&&(s.southAngle+=a)}var Ct=new D,te=new D,U={northAngle:0,southAngle:0,westOverIdl:0,eastOverIdl:0};G.computeRectangleFromPositions=function(t,e,o,n){if(q.defined("positions",t),P(n)||(n=new _t),t.length<3)return n;n.west=Number.POSITIVE_INFINITY,n.east=Number.NEGATIVE_INFINITY,n.south=Number.POSITIVE_INFINITY,n.north=Number.NEGATIVE_INFINITY,U.northAngle=0,U.southAngle=0,U.westOverIdl=Number.POSITIVE_INFINITY,U.eastOverIdl=Number.NEGATIVE_INFINITY;let s=t.length,i=D.fromCartesian(t[0],te);for(let r=1;r<s;r++){let f=D.fromCartesian(t[r],Ct);xt(f,i,e,o,U,n),i=D.clone(f,i)}return xt(D.fromCartesian(t[0],Ct),i,e,o,U,n),n.east-n.west>U.eastOverIdl-U.westOverIdl&&(n.west=U.westOverIdl,n.east=U.eastOverIdl,n.east>l.PI&&(n.east=n.east-l.TWO_PI),n.west>l.PI&&(n.west=n.west-l.TWO_PI)),l.equalsEpsilon(Math.abs(U.northAngle),l.TWO_PI,l.EPSILON10)&&(n.north=l.PI_OVER_TWO,n.east=l.PI,n.west=-l.PI),l.equalsEpsilon(Math.abs(U.southAngle),l.TWO_PI,l.EPSILON10)&&(n.south=-l.PI_OVER_TWO,n.east=l.PI,n.west=-l.PI),n};var ee=new D;function oe(t,e,o){return t.height>=l.PI||t.width>=l.PI?D.fromCartesian(e[0],ee).tangentPlane:K.fromPoints(e,o)}var Nt=new ot;function ne(t,e,o){return(n,s)=>{if(t.height>=l.PI||t.width>=l.PI){if(t.south<0&&t.north>0){P(s)||(s=[]);for(let r=0;r<n.length;++r){let f=o.cartesianToCartographic(n[r],Nt);s[r]=new O(f.longitude/l.PI,f.latitude/l.PI_OVER_TWO)}return s.length=n.length,s}return D.fromCartesianArray(n,s)}return K.fromPoints(e,o).projectPointsOntoPlane(n,s)}}function ie(t,e,o){if(t.height>=l.PI||t.width>=l.PI)return(s,i)=>{if(t.south<0&&t.north>0){let r=o.cartesianToCartographic(s,Nt);return P(i)||(i=new O),i.x=r.longitude/l.PI,i.y=r.latitude/l.PI_OVER_TWO,i}return D.fromCartesian(s,i)};let n=K.fromPoints(e,o);return(s,i)=>n.projectPointsOntoPlane(s,i)}function re(t,e,o,n){return(s,i)=>!n&&(t.height>=l.PI_OVER_TWO||t.width>=2*l.PI_OVER_THREE)?F.splitPolygonsOnEquator(s,e,o,i):s}function se(t,e,o,n){if(e.height>=l.PI||e.width>=l.PI)return dt.fromRectangle(e,void 0,Et);let s=t,i=K.fromPoints(s,o);return F.computeBoundingRectangle(i.plane.normal,i.projectPointOntoPlane.bind(i),s,n,Et)}G.createGeometry=function(t){let e=t._vertexFormat,o=t._ellipsoid,n=t._granularity,s=t._stRotation,i=t._polygonHierarchy,r=t._perPositionHeight,f=t._closeTop,d=t._closeBottom,p=t._arcType,w=t._textureCoordinates,a=P(w),H=i.positions;if(H.length<3)return;let x=t.rectangle,j=F.polygonsFromHierarchy(i,a,ne(x,H,o),!r,o,re(x,o,p,r)),C=j.hierarchy,R=j.polygons,B=function(m){return m},u=a?F.polygonsFromHierarchy(w,!0,B,!1,o).polygons:void 0;if(C.length===0)return;let E=C[0].outerRing,A=se(E,x,o,s),v=[],T=t._height,y=t._extrudedHeight,_=t._perPositionHeightExtrude||!l.equalsEpsilon(T,y,0,l.EPSILON2),h={perPositionHeight:r,vertexFormat:e,geometry:void 0,rotationAxis:oe(x,E,o).plane.normal,projectTo2d:ie(x,E,o),boundingRectangle:A,ellipsoid:o,stRotation:s,textureCoordinates:void 0,bottom:!1,top:!0,wall:!1,extrude:!1,arcType:p},g;if(_)for(h.extrude=!0,h.top=f,h.bottom=d,h.shadowVolume=t._shadowVolume,h.offsetAttribute=t._offsetAttribute,g=0;g<R.length;g++){let m=qt(o,R[g],a?u[g]:void 0,n,C[g],r,f,d,e,p),I;f&&d?(I=m.topAndBottom,h.geometry=F.scaleToGeodeticHeightExtruded(I.geometry,T,y,o,r)):f?(I=m.topAndBottom,I.geometry.attributes.position.values=nt.scaleToGeodeticHeight(I.geometry.attributes.position.values,T,o,!r),h.geometry=I.geometry):d&&(I=m.topAndBottom,I.geometry.attributes.position.values=nt.scaleToGeodeticHeight(I.geometry.attributes.position.values,y,o,!0),h.geometry=I.geometry),(f||d)&&(h.wall=!1,I.geometry=pt(h),v.push(I));let M=m.walls;h.wall=!0;for(let z=0;z<M.length;z++){let N=M[z];h.geometry=F.scaleToGeodeticHeightExtruded(N.geometry,T,y,o,r),N.geometry=pt(h),v.push(N)}}else for(g=0;g<R.length;g++){let m=new st({geometry:F.createGeometryFromPositions(o,R[g],a?u[g]:void 0,n,r,e,p)});if(m.geometry.attributes.position.values=nt.scaleToGeodeticHeight(m.geometry.attributes.position.values,T,o,!r),h.geometry=m.geometry,m.geometry=pt(h),P(t._offsetAttribute)){let I=m.geometry.attributes.position.values.length,M=t._offsetAttribute===ht.NONE?0:1,z=new Uint8Array(I/3).fill(M);m.geometry.attributes.applyOffset=new tt({componentDatatype:$.UNSIGNED_BYTE,componentsPerAttribute:1,values:z})}v.push(m)}let k=bt.combineInstances(v)[0];k.attributes.position.values=new Float64Array(k.attributes.position.values),k.indices=lt.createTypedArray(k.attributes.position.values.length/3,k.indices);let Y=k.attributes,J=Tt.fromVertices(Y.position.values);return e.position||delete Y.position,new mt({attributes:Y,indices:k.indices,primitiveType:k.primitiveType,boundingSphere:J,offsetAttribute:t._offsetAttribute})};G.createShadowVolume=function(t,e,o){let n=t._granularity,s=t._ellipsoid,i=e(n,s),r=o(n,s);return new G({polygonHierarchy:t._polygonHierarchy,ellipsoid:s,stRotation:t._stRotation,granularity:n,perPositionHeight:!1,extrudedHeight:i,height:r,vertexFormat:Q.POSITION_ONLY,shadowVolume:!0,arcType:t._arcType})};function ae(t){let e=-t._stRotation;if(e===0)return[0,0,0,1,1,0];let o=t._ellipsoid,n=t._polygonHierarchy.positions,s=t.rectangle;return mt._textureCoordinateRotationPoints(n,e,o,s)}Object.defineProperties(G.prototype,{rectangle:{get:function(){if(!P(this._rectangle)){let t=this._polygonHierarchy.positions;this._rectangle=G.computeRectangleFromPositions(t,this._ellipsoid,this._arcType)}return this._rectangle}},textureCoordinateRotationPoints:{get:function(){return P(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=ae(this)),this._textureCoordinateRotationPoints}}});var Pt=G;function ce(t,e){return P(e)&&(t=Pt.unpack(t,e)),t._ellipsoid=V.clone(t._ellipsoid),Pt.createGeometry(t)}var Xe=ce;export{Xe as default}; |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.116 | ||
* Version 1.116.1 | ||
* | ||
@@ -26,2 +26,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
import{a}from"./chunk-4NDMMWOM.js";import{a as b}from"./chunk-7VY24AS3.js";import{a as W}from"./chunk-ZZAO5JE6.js";import{a as V}from"./chunk-EJXUGS5C.js";import"./chunk-BMTOWA7K.js";import"./chunk-W2YTVRCC.js";import{a as D}from"./chunk-TXIAMGDC.js";import{a as F}from"./chunk-YPW76GEP.js";import"./chunk-GKRM7KEL.js";import{a as j,b as k}from"./chunk-4NVG6N2Q.js";import"./chunk-5CBMSEPD.js";import"./chunk-2DF4CAYN.js";import"./chunk-LGFQRF3V.js";import"./chunk-AHZBRYZA.js";import{a as M}from"./chunk-TWAPNO4J.js";import{a as B}from"./chunk-FSXLPWHR.js";import{b as U,c as C,d as S}from"./chunk-37KLWU3W.js";import{d as z}from"./chunk-HTNJJ6YO.js";import"./chunk-63E276CT.js";import"./chunk-NRW2R4YV.js";import"./chunk-NSILPUHD.js";import{a as w}from"./chunk-M7WODBAD.js";import{a as v,d as y}from"./chunk-J26GWQSN.js";import{a as T}from"./chunk-PYB3IV2X.js";import"./chunk-H7FFK4U5.js";import"./chunk-YEUII2A5.js";import{a as P}from"./chunk-4353PD6R.js";import{a as G,b as A}from"./chunk-2S4UUFD6.js";import{e as O}from"./chunk-42VHSORI.js";var Y=[],R=[];function K(e,t,r,H,l){let p=F.fromPoints(t,e).projectPointsOntoPlane(t,Y);k.computeWindingOrder2D(p)===j.CLOCKWISE&&(p.reverse(),t=t.slice().reverse());let n,i,o=t.length,c=0;if(H)for(n=new Float64Array(o*2*3),i=0;i<o;i++){let u=t[i],h=t[(i+1)%o];n[c++]=u.x,n[c++]=u.y,n[c++]=u.z,n[c++]=h.x,n[c++]=h.y,n[c++]=h.z}else{let u=0;if(l===b.GEODESIC)for(i=0;i<o;i++)u+=a.subdivideLineCount(t[i],t[(i+1)%o],r);else if(l===b.RHUMB)for(i=0;i<o;i++)u+=a.subdivideRhumbLineCount(e,t[i],t[(i+1)%o],r);for(n=new Float64Array(u*3),i=0;i<o;i++){let h;l===b.GEODESIC?h=a.subdivideLine(t[i],t[(i+1)%o],r,R):l===b.RHUMB&&(h=a.subdivideRhumbLine(e,t[i],t[(i+1)%o],r,R));let g=h.length;for(let d=0;d<g;++d)n[c++]=h[d]}}o=n.length/3;let f=o*2,m=M.createTypedArray(o,f);for(c=0,i=0;i<o-1;i++)m[c++]=i,m[c++]=i+1;return m[c++]=o-1,m[c++]=0,new W({geometry:new C({attributes:new B({position:new S({componentDatatype:w.DOUBLE,componentsPerAttribute:3,values:n})}),indices:m,primitiveType:U.LINES})})}function q(e,t,r,H,l){let p=F.fromPoints(t,e).projectPointsOntoPlane(t,Y);k.computeWindingOrder2D(p)===j.CLOCKWISE&&(p.reverse(),t=t.slice().reverse());let n,i,o=t.length,c=new Array(o),f=0;if(H)for(n=new Float64Array(o*2*3*2),i=0;i<o;++i){c[i]=f/3;let g=t[i],d=t[(i+1)%o];n[f++]=g.x,n[f++]=g.y,n[f++]=g.z,n[f++]=d.x,n[f++]=d.y,n[f++]=d.z}else{let g=0;if(l===b.GEODESIC)for(i=0;i<o;i++)g+=a.subdivideLineCount(t[i],t[(i+1)%o],r);else if(l===b.RHUMB)for(i=0;i<o;i++)g+=a.subdivideRhumbLineCount(e,t[i],t[(i+1)%o],r);for(n=new Float64Array(g*3*2),i=0;i<o;++i){c[i]=f/3;let d;l===b.GEODESIC?d=a.subdivideLine(t[i],t[(i+1)%o],r,R):l===b.RHUMB&&(d=a.subdivideRhumbLine(e,t[i],t[(i+1)%o],r,R));let E=d.length;for(let N=0;N<E;++N)n[f++]=d[N]}}o=n.length/(3*2);let m=c.length,u=(o*2+m)*2,h=M.createTypedArray(o+m,u);for(f=0,i=0;i<o;++i)h[f++]=i,h[f++]=(i+1)%o,h[f++]=i+o,h[f++]=(i+1)%o+o;for(i=0;i<m;i++){let g=c[i];h[f++]=g,h[f++]=g+o}return new W({geometry:new C({attributes:new B({position:new S({componentDatatype:w.DOUBLE,componentsPerAttribute:3,values:n})}),indices:h,primitiveType:U.LINES})})}function L(e){if(A.typeOf.object("options",e),A.typeOf.object("options.polygonHierarchy",e.polygonHierarchy),e.perPositionHeight&&O(e.height))throw new G("Cannot use both options.perPositionHeight and options.height");if(O(e.arcType)&&e.arcType!==b.GEODESIC&&e.arcType!==b.RHUMB)throw new G("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");let t=e.polygonHierarchy,r=P(e.ellipsoid,y.WGS84),H=P(e.granularity,T.RADIANS_PER_DEGREE),l=P(e.perPositionHeight,!1),_=l&&O(e.extrudedHeight),p=P(e.arcType,b.GEODESIC),s=P(e.height,0),n=P(e.extrudedHeight,s);if(!_){let i=Math.max(s,n);n=Math.min(s,n),s=i}this._ellipsoid=y.clone(r),this._granularity=H,this._height=s,this._extrudedHeight=n,this._arcType=p,this._polygonHierarchy=t,this._perPositionHeight=l,this._perPositionHeightExtrude=_,this._offsetAttribute=e.offsetAttribute,this._workerName="createPolygonOutlineGeometry",this.packedLength=a.computeHierarchyPackedLength(t,v)+y.packedLength+8}L.pack=function(e,t,r){return A.typeOf.object("value",e),A.defined("array",t),r=P(r,0),r=a.packPolygonHierarchy(e._polygonHierarchy,t,r,v),y.pack(e._ellipsoid,t,r),r+=y.packedLength,t[r++]=e._height,t[r++]=e._extrudedHeight,t[r++]=e._granularity,t[r++]=e._perPositionHeightExtrude?1:0,t[r++]=e._perPositionHeight?1:0,t[r++]=e._arcType,t[r++]=P(e._offsetAttribute,-1),t[r]=e.packedLength,t};var J=y.clone(y.UNIT_SPHERE),Q={polygonHierarchy:{}};L.unpack=function(e,t,r){A.defined("array",e),t=P(t,0);let H=a.unpackPolygonHierarchy(e,t,v);t=H.startingIndex,delete H.startingIndex;let l=y.unpack(e,t,J);t+=y.packedLength;let _=e[t++],p=e[t++],s=e[t++],n=e[t++]===1,i=e[t++]===1,o=e[t++],c=e[t++],f=e[t];return O(r)||(r=new L(Q)),r._polygonHierarchy=H,r._ellipsoid=y.clone(l,r._ellipsoid),r._height=_,r._extrudedHeight=p,r._granularity=s,r._perPositionHeight=i,r._perPositionHeightExtrude=n,r._arcType=o,r._offsetAttribute=c===-1?void 0:c,r.packedLength=f,r};L.fromPositions=function(e){e=P(e,P.EMPTY_OBJECT),A.defined("options.positions",e.positions);let t={polygonHierarchy:{positions:e.positions},height:e.height,extrudedHeight:e.extrudedHeight,ellipsoid:e.ellipsoid,granularity:e.granularity,perPositionHeight:e.perPositionHeight,arcType:e.arcType,offsetAttribute:e.offsetAttribute};return new L(t)};L.createGeometry=function(e){let t=e._ellipsoid,r=e._granularity,H=e._polygonHierarchy,l=e._perPositionHeight,_=e._arcType,p=a.polygonOutlinesFromHierarchy(H,!l,t);if(p.length===0)return;let s,n=[],i=T.chordLength(r,t.maximumRadius),o=e._height,c=e._extrudedHeight,f=e._perPositionHeightExtrude||!T.equalsEpsilon(o,c,0,T.EPSILON2),m,u;if(f)for(u=0;u<p.length;u++){if(s=q(t,p[u],i,l,_),s.geometry=a.scaleToGeodeticHeightExtruded(s.geometry,o,c,t,l),O(e._offsetAttribute)){let d=s.geometry.attributes.position.values.length/3,E=new Uint8Array(d);e._offsetAttribute===D.TOP?E=E.fill(1,0,d/2):(m=e._offsetAttribute===D.NONE?0:1,E=E.fill(m)),s.geometry.attributes.applyOffset=new S({componentDatatype:w.UNSIGNED_BYTE,componentsPerAttribute:1,values:E})}n.push(s)}else for(u=0;u<p.length;u++){if(s=K(t,p[u],i,l,_),s.geometry.attributes.position.values=k.scaleToGeodeticHeight(s.geometry.attributes.position.values,o,t,!l),O(e._offsetAttribute)){let d=s.geometry.attributes.position.values.length;m=e._offsetAttribute===D.NONE?0:1;let E=new Uint8Array(d/3).fill(m);s.geometry.attributes.applyOffset=new S({componentDatatype:w.UNSIGNED_BYTE,componentsPerAttribute:1,values:E})}n.push(s)}let h=V.combineInstances(n)[0],g=z.fromVertices(h.attributes.position.values);return new C({attributes:h.attributes,indices:h.indices,primitiveType:h.primitiveType,boundingSphere:g,offsetAttribute:e._offsetAttribute})};var x=L;function X(e,t){return O(t)&&(e=x.unpack(e,t)),e._ellipsoid=y.clone(e._ellipsoid),x.createGeometry(e)}var Oe=X;export{Oe as default}; | ||
import{a}from"./chunk-HIZ44UXA.js";import{a as b}from"./chunk-VAZSO7QM.js";import{a as W}from"./chunk-CFX77L57.js";import{a as V}from"./chunk-CKVHMDPC.js";import"./chunk-JAMWPWOV.js";import"./chunk-IQ7DLQQP.js";import{a as D}from"./chunk-XJCFZEZW.js";import{a as F}from"./chunk-7E5ZATSO.js";import"./chunk-XOMW5SDY.js";import{a as j,b as k}from"./chunk-ZK4DC2CW.js";import"./chunk-OBENGMDT.js";import"./chunk-LH3GDPJ4.js";import"./chunk-QC62DG5W.js";import"./chunk-R6IH5WM5.js";import{a as M}from"./chunk-ROROM35N.js";import{a as B}from"./chunk-F5TB5EI7.js";import{b as U,c as C,d as S}from"./chunk-VAPKZ5PR.js";import{d as z}from"./chunk-DXGEUDM7.js";import"./chunk-5IUHFVP3.js";import"./chunk-OE3P25NW.js";import"./chunk-HIT4T4MS.js";import{a as w}from"./chunk-3KRBUMEX.js";import{a as v,d as y}from"./chunk-PQ6NV4GA.js";import{a as T}from"./chunk-74I3QBVP.js";import"./chunk-BLVYEJBC.js";import"./chunk-A6PYE4JS.js";import{a as P}from"./chunk-T23IKWCM.js";import{a as G,b as A}from"./chunk-HJ33TVGP.js";import{e as O}from"./chunk-WL4PTXMO.js";var Y=[],R=[];function K(e,t,r,H,l){let p=F.fromPoints(t,e).projectPointsOntoPlane(t,Y);k.computeWindingOrder2D(p)===j.CLOCKWISE&&(p.reverse(),t=t.slice().reverse());let n,i,o=t.length,c=0;if(H)for(n=new Float64Array(o*2*3),i=0;i<o;i++){let u=t[i],h=t[(i+1)%o];n[c++]=u.x,n[c++]=u.y,n[c++]=u.z,n[c++]=h.x,n[c++]=h.y,n[c++]=h.z}else{let u=0;if(l===b.GEODESIC)for(i=0;i<o;i++)u+=a.subdivideLineCount(t[i],t[(i+1)%o],r);else if(l===b.RHUMB)for(i=0;i<o;i++)u+=a.subdivideRhumbLineCount(e,t[i],t[(i+1)%o],r);for(n=new Float64Array(u*3),i=0;i<o;i++){let h;l===b.GEODESIC?h=a.subdivideLine(t[i],t[(i+1)%o],r,R):l===b.RHUMB&&(h=a.subdivideRhumbLine(e,t[i],t[(i+1)%o],r,R));let g=h.length;for(let d=0;d<g;++d)n[c++]=h[d]}}o=n.length/3;let f=o*2,m=M.createTypedArray(o,f);for(c=0,i=0;i<o-1;i++)m[c++]=i,m[c++]=i+1;return m[c++]=o-1,m[c++]=0,new W({geometry:new C({attributes:new B({position:new S({componentDatatype:w.DOUBLE,componentsPerAttribute:3,values:n})}),indices:m,primitiveType:U.LINES})})}function q(e,t,r,H,l){let p=F.fromPoints(t,e).projectPointsOntoPlane(t,Y);k.computeWindingOrder2D(p)===j.CLOCKWISE&&(p.reverse(),t=t.slice().reverse());let n,i,o=t.length,c=new Array(o),f=0;if(H)for(n=new Float64Array(o*2*3*2),i=0;i<o;++i){c[i]=f/3;let g=t[i],d=t[(i+1)%o];n[f++]=g.x,n[f++]=g.y,n[f++]=g.z,n[f++]=d.x,n[f++]=d.y,n[f++]=d.z}else{let g=0;if(l===b.GEODESIC)for(i=0;i<o;i++)g+=a.subdivideLineCount(t[i],t[(i+1)%o],r);else if(l===b.RHUMB)for(i=0;i<o;i++)g+=a.subdivideRhumbLineCount(e,t[i],t[(i+1)%o],r);for(n=new Float64Array(g*3*2),i=0;i<o;++i){c[i]=f/3;let d;l===b.GEODESIC?d=a.subdivideLine(t[i],t[(i+1)%o],r,R):l===b.RHUMB&&(d=a.subdivideRhumbLine(e,t[i],t[(i+1)%o],r,R));let E=d.length;for(let N=0;N<E;++N)n[f++]=d[N]}}o=n.length/(3*2);let m=c.length,u=(o*2+m)*2,h=M.createTypedArray(o+m,u);for(f=0,i=0;i<o;++i)h[f++]=i,h[f++]=(i+1)%o,h[f++]=i+o,h[f++]=(i+1)%o+o;for(i=0;i<m;i++){let g=c[i];h[f++]=g,h[f++]=g+o}return new W({geometry:new C({attributes:new B({position:new S({componentDatatype:w.DOUBLE,componentsPerAttribute:3,values:n})}),indices:h,primitiveType:U.LINES})})}function L(e){if(A.typeOf.object("options",e),A.typeOf.object("options.polygonHierarchy",e.polygonHierarchy),e.perPositionHeight&&O(e.height))throw new G("Cannot use both options.perPositionHeight and options.height");if(O(e.arcType)&&e.arcType!==b.GEODESIC&&e.arcType!==b.RHUMB)throw new G("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");let t=e.polygonHierarchy,r=P(e.ellipsoid,y.WGS84),H=P(e.granularity,T.RADIANS_PER_DEGREE),l=P(e.perPositionHeight,!1),_=l&&O(e.extrudedHeight),p=P(e.arcType,b.GEODESIC),s=P(e.height,0),n=P(e.extrudedHeight,s);if(!_){let i=Math.max(s,n);n=Math.min(s,n),s=i}this._ellipsoid=y.clone(r),this._granularity=H,this._height=s,this._extrudedHeight=n,this._arcType=p,this._polygonHierarchy=t,this._perPositionHeight=l,this._perPositionHeightExtrude=_,this._offsetAttribute=e.offsetAttribute,this._workerName="createPolygonOutlineGeometry",this.packedLength=a.computeHierarchyPackedLength(t,v)+y.packedLength+8}L.pack=function(e,t,r){return A.typeOf.object("value",e),A.defined("array",t),r=P(r,0),r=a.packPolygonHierarchy(e._polygonHierarchy,t,r,v),y.pack(e._ellipsoid,t,r),r+=y.packedLength,t[r++]=e._height,t[r++]=e._extrudedHeight,t[r++]=e._granularity,t[r++]=e._perPositionHeightExtrude?1:0,t[r++]=e._perPositionHeight?1:0,t[r++]=e._arcType,t[r++]=P(e._offsetAttribute,-1),t[r]=e.packedLength,t};var J=y.clone(y.UNIT_SPHERE),Q={polygonHierarchy:{}};L.unpack=function(e,t,r){A.defined("array",e),t=P(t,0);let H=a.unpackPolygonHierarchy(e,t,v);t=H.startingIndex,delete H.startingIndex;let l=y.unpack(e,t,J);t+=y.packedLength;let _=e[t++],p=e[t++],s=e[t++],n=e[t++]===1,i=e[t++]===1,o=e[t++],c=e[t++],f=e[t];return O(r)||(r=new L(Q)),r._polygonHierarchy=H,r._ellipsoid=y.clone(l,r._ellipsoid),r._height=_,r._extrudedHeight=p,r._granularity=s,r._perPositionHeight=i,r._perPositionHeightExtrude=n,r._arcType=o,r._offsetAttribute=c===-1?void 0:c,r.packedLength=f,r};L.fromPositions=function(e){e=P(e,P.EMPTY_OBJECT),A.defined("options.positions",e.positions);let t={polygonHierarchy:{positions:e.positions},height:e.height,extrudedHeight:e.extrudedHeight,ellipsoid:e.ellipsoid,granularity:e.granularity,perPositionHeight:e.perPositionHeight,arcType:e.arcType,offsetAttribute:e.offsetAttribute};return new L(t)};L.createGeometry=function(e){let t=e._ellipsoid,r=e._granularity,H=e._polygonHierarchy,l=e._perPositionHeight,_=e._arcType,p=a.polygonOutlinesFromHierarchy(H,!l,t);if(p.length===0)return;let s,n=[],i=T.chordLength(r,t.maximumRadius),o=e._height,c=e._extrudedHeight,f=e._perPositionHeightExtrude||!T.equalsEpsilon(o,c,0,T.EPSILON2),m,u;if(f)for(u=0;u<p.length;u++){if(s=q(t,p[u],i,l,_),s.geometry=a.scaleToGeodeticHeightExtruded(s.geometry,o,c,t,l),O(e._offsetAttribute)){let d=s.geometry.attributes.position.values.length/3,E=new Uint8Array(d);e._offsetAttribute===D.TOP?E=E.fill(1,0,d/2):(m=e._offsetAttribute===D.NONE?0:1,E=E.fill(m)),s.geometry.attributes.applyOffset=new S({componentDatatype:w.UNSIGNED_BYTE,componentsPerAttribute:1,values:E})}n.push(s)}else for(u=0;u<p.length;u++){if(s=K(t,p[u],i,l,_),s.geometry.attributes.position.values=k.scaleToGeodeticHeight(s.geometry.attributes.position.values,o,t,!l),O(e._offsetAttribute)){let d=s.geometry.attributes.position.values.length;m=e._offsetAttribute===D.NONE?0:1;let E=new Uint8Array(d/3).fill(m);s.geometry.attributes.applyOffset=new S({componentDatatype:w.UNSIGNED_BYTE,componentsPerAttribute:1,values:E})}n.push(s)}let h=V.combineInstances(n)[0],g=z.fromVertices(h.attributes.position.values);return new C({attributes:h.attributes,indices:h.indices,primitiveType:h.primitiveType,boundingSphere:g,offsetAttribute:e._offsetAttribute})};var x=L;function X(e,t){return O(t)&&(e=x.unpack(e,t)),e._ellipsoid=y.clone(e._ellipsoid),x.createGeometry(e)}var Oe=X;export{Oe as default}; |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.116 | ||
* Version 1.116.1 | ||
* | ||
@@ -26,2 +26,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
import{a as m}from"./chunk-ZK2UTPA3.js";import{a as N}from"./chunk-7VY24AS3.js";import{a as U}from"./chunk-2QAZKO32.js";import"./chunk-M5A47EM2.js";import{a as k}from"./chunk-TK2AA6M2.js";import{a as le}from"./chunk-5CBMSEPD.js";import"./chunk-2DF4CAYN.js";import"./chunk-LGFQRF3V.js";import"./chunk-AHZBRYZA.js";import{a as se}from"./chunk-TWAPNO4J.js";import{a as ce}from"./chunk-FSXLPWHR.js";import{a as ne,b as re,c as ie,d as O}from"./chunk-37KLWU3W.js";import{d as oe}from"./chunk-HTNJJ6YO.js";import"./chunk-63E276CT.js";import"./chunk-NRW2R4YV.js";import"./chunk-NSILPUHD.js";import{a as x}from"./chunk-M7WODBAD.js";import{a as p,d as u}from"./chunk-J26GWQSN.js";import{a as J}from"./chunk-PYB3IV2X.js";import"./chunk-H7FFK4U5.js";import"./chunk-YEUII2A5.js";import{a as A}from"./chunk-4353PD6R.js";import{a as V}from"./chunk-2S4UUFD6.js";import{e as h}from"./chunk-42VHSORI.js";var me=[];function Ae(e,o,t,n,c){let s=me;s.length=c;let l,E=t.red,a=t.green,r=t.blue,w=t.alpha,b=n.red,i=n.green,f=n.blue,L=n.alpha;if(m.equals(t,n)){for(l=0;l<c;l++)s[l]=m.clone(t);return s}let M=(b-E)/c,W=(i-a)/c,z=(f-r)/c,B=(L-w)/c;for(l=0;l<c;l++)s[l]=new m(E+l*M,a+l*W,r+l*z,w+l*B);return s}function q(e){e=A(e,A.EMPTY_OBJECT);let o=e.positions,t=e.colors,n=A(e.width,1),c=A(e.colorsPerVertex,!1);if(!h(o)||o.length<2)throw new V("At least two positions are required.");if(typeof n!="number")throw new V("width must be a number");if(h(t)&&(c&&t.length<o.length||!c&&t.length<o.length-1))throw new V("colors has an invalid length.");this._positions=o,this._colors=t,this._width=n,this._colorsPerVertex=c,this._vertexFormat=k.clone(A(e.vertexFormat,k.DEFAULT)),this._arcType=A(e.arcType,N.GEODESIC),this._granularity=A(e.granularity,J.RADIANS_PER_DEGREE),this._ellipsoid=u.clone(A(e.ellipsoid,u.WGS84)),this._workerName="createPolylineGeometry";let s=1+o.length*p.packedLength;s+=h(t)?1+t.length*m.packedLength:1,this.packedLength=s+u.packedLength+k.packedLength+4}q.pack=function(e,o,t){if(!h(e))throw new V("value is required");if(!h(o))throw new V("array is required");t=A(t,0);let n,c=e._positions,s=c.length;for(o[t++]=s,n=0;n<s;++n,t+=p.packedLength)p.pack(c[n],o,t);let l=e._colors;for(s=h(l)?l.length:0,o[t++]=s,n=0;n<s;++n,t+=m.packedLength)m.pack(l[n],o,t);return u.pack(e._ellipsoid,o,t),t+=u.packedLength,k.pack(e._vertexFormat,o,t),t+=k.packedLength,o[t++]=e._width,o[t++]=e._colorsPerVertex?1:0,o[t++]=e._arcType,o[t]=e._granularity,o};var de=u.clone(u.UNIT_SPHERE),ue=new k,S={positions:void 0,colors:void 0,ellipsoid:de,vertexFormat:ue,width:void 0,colorsPerVertex:void 0,arcType:void 0,granularity:void 0};q.unpack=function(e,o,t){if(!h(e))throw new V("array is required");o=A(o,0);let n,c=e[o++],s=new Array(c);for(n=0;n<c;++n,o+=p.packedLength)s[n]=p.unpack(e,o);c=e[o++];let l=c>0?new Array(c):void 0;for(n=0;n<c;++n,o+=m.packedLength)l[n]=m.unpack(e,o);let E=u.unpack(e,o,de);o+=u.packedLength;let a=k.unpack(e,o,ue);o+=k.packedLength;let r=e[o++],w=e[o++]===1,b=e[o++],i=e[o];return h(t)?(t._positions=s,t._colors=l,t._ellipsoid=u.clone(E,t._ellipsoid),t._vertexFormat=k.clone(a,t._vertexFormat),t._width=r,t._colorsPerVertex=w,t._arcType=b,t._granularity=i,t):(S.positions=s,S.colors=l,S.width=r,S.colorsPerVertex=w,S.arcType=b,S.granularity=i,new q(S))};var pe=new p,ae=new p,fe=new p,he=new p;q.createGeometry=function(e){let o=e._width,t=e._vertexFormat,n=e._colors,c=e._colorsPerVertex,s=e._arcType,l=e._granularity,E=e._ellipsoid,a,r,w,b=[],i=le(e._positions,p.equalsEpsilon,!1,b);if(h(n)&&b.length>0){let d=0,P=b[0];n=n.filter(function(G,T){let g=!1;return c?g=T===P||T===0&&P===1:g=T+1===P,g?(d++,P=b[d],!1):!0})}let f=i.length;if(f<2||o<=0)return;if(s===N.GEODESIC||s===N.RHUMB){let d,P;s===N.GEODESIC?(d=J.chordLength(l,E.maximumRadius),P=U.numberOfPoints):(d=l,P=U.numberOfPointsRhumbLine);let G=U.extractHeights(i,E);if(h(n)){let T=1;for(a=0;a<f-1;++a)T+=P(i[a],i[a+1],d);let g=new Array(T),D=0;for(a=0;a<f-1;++a){let Z=i[a],$=i[a+1],I=n[a],ee=P(Z,$,d);if(c&&a<T){let _e=n[a+1],te=Ae(Z,$,I,_e,ee),Pe=te.length;for(r=0;r<Pe;++r)g[D++]=te[r]}else for(r=0;r<ee;++r)g[D++]=m.clone(I)}g[D]=m.clone(n[n.length-1]),n=g,me.length=0}s===N.GEODESIC?i=U.generateCartesianArc({positions:i,minDistance:d,ellipsoid:E,height:G}):i=U.generateCartesianRhumbArc({positions:i,granularity:d,ellipsoid:E,height:G})}f=i.length;let L=f*4-4,M=new Float64Array(L*3),W=new Float64Array(L*3),z=new Float64Array(L*3),B=new Float32Array(L*2),K=t.st?new Float32Array(L*2):void 0,y=h(n)?new Uint8Array(L*4):void 0,H=0,j=0,X=0,Y=0,_;for(r=0;r<f;++r){r===0?(_=pe,p.subtract(i[0],i[1],_),p.add(i[0],_,_)):_=i[r-1],p.clone(_,fe),p.clone(i[r],ae),r===f-1?(_=pe,p.subtract(i[f-1],i[f-2],_),p.add(i[f-1],_,_)):_=i[r+1],p.clone(_,he);let d,P;h(y)&&(r!==0&&!c?d=n[r-1]:d=n[r],r!==f-1&&(P=n[r]));let G=r===0?2:0,T=r===f-1?2:4;for(w=G;w<T;++w){p.pack(ae,M,H),p.pack(fe,W,H),p.pack(he,z,H),H+=3;let g=w-2<0?-1:1;if(B[j++]=2*(w%2)-1,B[j++]=g*o,t.st&&(K[X++]=r/(f-1),K[X++]=Math.max(B[j-2],0)),h(y)){let D=w<2?d:P;y[Y++]=m.floatToByte(D.red),y[Y++]=m.floatToByte(D.green),y[Y++]=m.floatToByte(D.blue),y[Y++]=m.floatToByte(D.alpha)}}}let v=new ce;v.position=new O({componentDatatype:x.DOUBLE,componentsPerAttribute:3,values:M}),v.prevPosition=new O({componentDatatype:x.DOUBLE,componentsPerAttribute:3,values:W}),v.nextPosition=new O({componentDatatype:x.DOUBLE,componentsPerAttribute:3,values:z}),v.expandAndWidth=new O({componentDatatype:x.FLOAT,componentsPerAttribute:2,values:B}),t.st&&(v.st=new O({componentDatatype:x.FLOAT,componentsPerAttribute:2,values:K})),h(y)&&(v.color=new O({componentDatatype:x.UNSIGNED_BYTE,componentsPerAttribute:4,values:y,normalize:!0}));let C=se.createTypedArray(L,f*6-6),F=0,R=0,we=f-1;for(r=0;r<we;++r)C[R++]=F,C[R++]=F+2,C[R++]=F+1,C[R++]=F+1,C[R++]=F+2,C[R++]=F+3,F+=4;return new ie({attributes:v,indices:C,primitiveType:re.TRIANGLES,boundingSphere:oe.fromPoints(i),geometryType:ne.POLYLINES})};var Q=q;function ge(e,o){return h(o)&&(e=Q.unpack(e,o)),e._ellipsoid=u.clone(e._ellipsoid),Q.createGeometry(e)}var He=ge;export{He as default}; | ||
import{a as m}from"./chunk-I7F5J7U6.js";import{a as N}from"./chunk-VAZSO7QM.js";import{a as U}from"./chunk-IZNUAC5V.js";import"./chunk-3CPQXNZI.js";import{a as k}from"./chunk-64WQCGAE.js";import{a as le}from"./chunk-OBENGMDT.js";import"./chunk-LH3GDPJ4.js";import"./chunk-QC62DG5W.js";import"./chunk-R6IH5WM5.js";import{a as se}from"./chunk-ROROM35N.js";import{a as ce}from"./chunk-F5TB5EI7.js";import{a as ne,b as re,c as ie,d as O}from"./chunk-VAPKZ5PR.js";import{d as oe}from"./chunk-DXGEUDM7.js";import"./chunk-5IUHFVP3.js";import"./chunk-OE3P25NW.js";import"./chunk-HIT4T4MS.js";import{a as x}from"./chunk-3KRBUMEX.js";import{a as p,d as u}from"./chunk-PQ6NV4GA.js";import{a as J}from"./chunk-74I3QBVP.js";import"./chunk-BLVYEJBC.js";import"./chunk-A6PYE4JS.js";import{a as A}from"./chunk-T23IKWCM.js";import{a as V}from"./chunk-HJ33TVGP.js";import{e as h}from"./chunk-WL4PTXMO.js";var me=[];function Ae(e,o,t,n,c){let s=me;s.length=c;let l,E=t.red,a=t.green,r=t.blue,w=t.alpha,b=n.red,i=n.green,f=n.blue,L=n.alpha;if(m.equals(t,n)){for(l=0;l<c;l++)s[l]=m.clone(t);return s}let M=(b-E)/c,W=(i-a)/c,z=(f-r)/c,B=(L-w)/c;for(l=0;l<c;l++)s[l]=new m(E+l*M,a+l*W,r+l*z,w+l*B);return s}function q(e){e=A(e,A.EMPTY_OBJECT);let o=e.positions,t=e.colors,n=A(e.width,1),c=A(e.colorsPerVertex,!1);if(!h(o)||o.length<2)throw new V("At least two positions are required.");if(typeof n!="number")throw new V("width must be a number");if(h(t)&&(c&&t.length<o.length||!c&&t.length<o.length-1))throw new V("colors has an invalid length.");this._positions=o,this._colors=t,this._width=n,this._colorsPerVertex=c,this._vertexFormat=k.clone(A(e.vertexFormat,k.DEFAULT)),this._arcType=A(e.arcType,N.GEODESIC),this._granularity=A(e.granularity,J.RADIANS_PER_DEGREE),this._ellipsoid=u.clone(A(e.ellipsoid,u.WGS84)),this._workerName="createPolylineGeometry";let s=1+o.length*p.packedLength;s+=h(t)?1+t.length*m.packedLength:1,this.packedLength=s+u.packedLength+k.packedLength+4}q.pack=function(e,o,t){if(!h(e))throw new V("value is required");if(!h(o))throw new V("array is required");t=A(t,0);let n,c=e._positions,s=c.length;for(o[t++]=s,n=0;n<s;++n,t+=p.packedLength)p.pack(c[n],o,t);let l=e._colors;for(s=h(l)?l.length:0,o[t++]=s,n=0;n<s;++n,t+=m.packedLength)m.pack(l[n],o,t);return u.pack(e._ellipsoid,o,t),t+=u.packedLength,k.pack(e._vertexFormat,o,t),t+=k.packedLength,o[t++]=e._width,o[t++]=e._colorsPerVertex?1:0,o[t++]=e._arcType,o[t]=e._granularity,o};var de=u.clone(u.UNIT_SPHERE),ue=new k,S={positions:void 0,colors:void 0,ellipsoid:de,vertexFormat:ue,width:void 0,colorsPerVertex:void 0,arcType:void 0,granularity:void 0};q.unpack=function(e,o,t){if(!h(e))throw new V("array is required");o=A(o,0);let n,c=e[o++],s=new Array(c);for(n=0;n<c;++n,o+=p.packedLength)s[n]=p.unpack(e,o);c=e[o++];let l=c>0?new Array(c):void 0;for(n=0;n<c;++n,o+=m.packedLength)l[n]=m.unpack(e,o);let E=u.unpack(e,o,de);o+=u.packedLength;let a=k.unpack(e,o,ue);o+=k.packedLength;let r=e[o++],w=e[o++]===1,b=e[o++],i=e[o];return h(t)?(t._positions=s,t._colors=l,t._ellipsoid=u.clone(E,t._ellipsoid),t._vertexFormat=k.clone(a,t._vertexFormat),t._width=r,t._colorsPerVertex=w,t._arcType=b,t._granularity=i,t):(S.positions=s,S.colors=l,S.width=r,S.colorsPerVertex=w,S.arcType=b,S.granularity=i,new q(S))};var pe=new p,ae=new p,fe=new p,he=new p;q.createGeometry=function(e){let o=e._width,t=e._vertexFormat,n=e._colors,c=e._colorsPerVertex,s=e._arcType,l=e._granularity,E=e._ellipsoid,a,r,w,b=[],i=le(e._positions,p.equalsEpsilon,!1,b);if(h(n)&&b.length>0){let d=0,P=b[0];n=n.filter(function(G,T){let g=!1;return c?g=T===P||T===0&&P===1:g=T+1===P,g?(d++,P=b[d],!1):!0})}let f=i.length;if(f<2||o<=0)return;if(s===N.GEODESIC||s===N.RHUMB){let d,P;s===N.GEODESIC?(d=J.chordLength(l,E.maximumRadius),P=U.numberOfPoints):(d=l,P=U.numberOfPointsRhumbLine);let G=U.extractHeights(i,E);if(h(n)){let T=1;for(a=0;a<f-1;++a)T+=P(i[a],i[a+1],d);let g=new Array(T),D=0;for(a=0;a<f-1;++a){let Z=i[a],$=i[a+1],I=n[a],ee=P(Z,$,d);if(c&&a<T){let _e=n[a+1],te=Ae(Z,$,I,_e,ee),Pe=te.length;for(r=0;r<Pe;++r)g[D++]=te[r]}else for(r=0;r<ee;++r)g[D++]=m.clone(I)}g[D]=m.clone(n[n.length-1]),n=g,me.length=0}s===N.GEODESIC?i=U.generateCartesianArc({positions:i,minDistance:d,ellipsoid:E,height:G}):i=U.generateCartesianRhumbArc({positions:i,granularity:d,ellipsoid:E,height:G})}f=i.length;let L=f*4-4,M=new Float64Array(L*3),W=new Float64Array(L*3),z=new Float64Array(L*3),B=new Float32Array(L*2),K=t.st?new Float32Array(L*2):void 0,y=h(n)?new Uint8Array(L*4):void 0,H=0,j=0,X=0,Y=0,_;for(r=0;r<f;++r){r===0?(_=pe,p.subtract(i[0],i[1],_),p.add(i[0],_,_)):_=i[r-1],p.clone(_,fe),p.clone(i[r],ae),r===f-1?(_=pe,p.subtract(i[f-1],i[f-2],_),p.add(i[f-1],_,_)):_=i[r+1],p.clone(_,he);let d,P;h(y)&&(r!==0&&!c?d=n[r-1]:d=n[r],r!==f-1&&(P=n[r]));let G=r===0?2:0,T=r===f-1?2:4;for(w=G;w<T;++w){p.pack(ae,M,H),p.pack(fe,W,H),p.pack(he,z,H),H+=3;let g=w-2<0?-1:1;if(B[j++]=2*(w%2)-1,B[j++]=g*o,t.st&&(K[X++]=r/(f-1),K[X++]=Math.max(B[j-2],0)),h(y)){let D=w<2?d:P;y[Y++]=m.floatToByte(D.red),y[Y++]=m.floatToByte(D.green),y[Y++]=m.floatToByte(D.blue),y[Y++]=m.floatToByte(D.alpha)}}}let v=new ce;v.position=new O({componentDatatype:x.DOUBLE,componentsPerAttribute:3,values:M}),v.prevPosition=new O({componentDatatype:x.DOUBLE,componentsPerAttribute:3,values:W}),v.nextPosition=new O({componentDatatype:x.DOUBLE,componentsPerAttribute:3,values:z}),v.expandAndWidth=new O({componentDatatype:x.FLOAT,componentsPerAttribute:2,values:B}),t.st&&(v.st=new O({componentDatatype:x.FLOAT,componentsPerAttribute:2,values:K})),h(y)&&(v.color=new O({componentDatatype:x.UNSIGNED_BYTE,componentsPerAttribute:4,values:y,normalize:!0}));let C=se.createTypedArray(L,f*6-6),F=0,R=0,we=f-1;for(r=0;r<we;++r)C[R++]=F,C[R++]=F+2,C[R++]=F+1,C[R++]=F+1,C[R++]=F+2,C[R++]=F+3,F+=4;return new ie({attributes:v,indices:C,primitiveType:re.TRIANGLES,boundingSphere:oe.fromPoints(i),geometryType:ne.POLYLINES})};var Q=q;function ge(e,o){return h(o)&&(e=Q.unpack(e,o)),e._ellipsoid=u.clone(e._ellipsoid),Q.createGeometry(e)}var He=ge;export{He as default}; |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.116 | ||
* Version 1.116.1 | ||
* | ||
@@ -26,2 +26,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
import{a as M}from"./chunk-AEWBPSCB.js";import{a as W}from"./chunk-EJXUGS5C.js";import"./chunk-BMTOWA7K.js";import"./chunk-W2YTVRCC.js";import{a as x,b as I,c as j}from"./chunk-FCEVC3JZ.js";import"./chunk-2QAZKO32.js";import"./chunk-M5A47EM2.js";import{a as g}from"./chunk-TK2AA6M2.js";import"./chunk-YPW76GEP.js";import"./chunk-GKRM7KEL.js";import{a as $,b as V}from"./chunk-4NVG6N2Q.js";import{a as Z}from"./chunk-5CBMSEPD.js";import"./chunk-2DF4CAYN.js";import"./chunk-LGFQRF3V.js";import"./chunk-AHZBRYZA.js";import{a as X}from"./chunk-TWAPNO4J.js";import{a as Q}from"./chunk-FSXLPWHR.js";import{b as Y,c as z,d as U}from"./chunk-37KLWU3W.js";import{d as K}from"./chunk-HTNJJ6YO.js";import"./chunk-63E276CT.js";import"./chunk-NRW2R4YV.js";import"./chunk-NSILPUHD.js";import{a as B}from"./chunk-M7WODBAD.js";import{a as T,c as C,d as f}from"./chunk-J26GWQSN.js";import{a as J}from"./chunk-PYB3IV2X.js";import"./chunk-H7FFK4U5.js";import"./chunk-YEUII2A5.js";import{a as k}from"./chunk-4353PD6R.js";import{a as D}from"./chunk-2S4UUFD6.js";import{e as _}from"./chunk-42VHSORI.js";function oe(t,e,n,o){let l=new Q;o.position&&(l.position=new U({componentDatatype:B.DOUBLE,componentsPerAttribute:3,values:t}));let i=e.length,u=t.length/3,L=(u-i*2)/(i*2),E=V.triangulate(e),G=(L-1)*i*6+E.length*2,r=X.createTypedArray(u,G),m,s,d,b,A,q,F=i*2,p=0;for(m=0;m<L-1;m++){for(s=0;s<i-1;s++)d=s*2+m*i*2,q=d+F,b=d+1,A=b+F,r[p++]=b,r[p++]=d,r[p++]=A,r[p++]=A,r[p++]=d,r[p++]=q;d=i*2-2+m*i*2,b=d+1,A=b+F,q=d+F,r[p++]=b,r[p++]=d,r[p++]=A,r[p++]=A,r[p++]=d,r[p++]=q}if(o.st||o.tangent||o.bitangent){let c=new Float32Array(u*2),S=1/(L-1),w=1/n.height,O=n.height/2,y,a,h=0;for(m=0;m<L;m++){for(y=m*S,a=w*(e[0].y+O),c[h++]=y,c[h++]=a,s=1;s<i;s++)a=w*(e[s].y+O),c[h++]=y,c[h++]=a,c[h++]=y,c[h++]=a;a=w*(e[0].y+O),c[h++]=y,c[h++]=a}for(s=0;s<i;s++)y=0,a=w*(e[s].y+O),c[h++]=y,c[h++]=a;for(s=0;s<i;s++)y=(L-1)*S,a=w*(e[s].y+O),c[h++]=y,c[h++]=a;l.st=new U({componentDatatype:B.FLOAT,componentsPerAttribute:2,values:new Float32Array(c)})}let N=u-i*2;for(m=0;m<E.length;m+=3){let c=E[m]+N,S=E[m+1]+N,w=E[m+2]+N;r[p++]=c,r[p++]=S,r[p++]=w,r[p++]=w+i,r[p++]=S+i,r[p++]=c+i}let P=new z({attributes:l,indices:r,boundingSphere:K.fromVertices(t),primitiveType:Y.TRIANGLES});if(o.normal&&(P=W.computeNormal(P)),o.tangent||o.bitangent){try{P=W.computeTangentAndBitangent(P)}catch{I("polyline-volume-tangent-bitangent","Unable to compute tangents and bitangents for polyline volume geometry")}o.tangent||(P.attributes.tangent=void 0),o.bitangent||(P.attributes.bitangent=void 0),o.st||(P.attributes.st=void 0)}return P}function R(t){t=k(t,k.EMPTY_OBJECT);let e=t.polylinePositions,n=t.shapePositions;if(!_(e))throw new D("options.polylinePositions is required.");if(!_(n))throw new D("options.shapePositions is required.");this._positions=e,this._shape=n,this._ellipsoid=f.clone(k(t.ellipsoid,f.WGS84)),this._cornerType=k(t.cornerType,x.ROUNDED),this._vertexFormat=g.clone(k(t.vertexFormat,g.DEFAULT)),this._granularity=k(t.granularity,J.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeGeometry";let o=1+e.length*T.packedLength;o+=1+n.length*C.packedLength,this.packedLength=o+f.packedLength+g.packedLength+2}R.pack=function(t,e,n){if(!_(t))throw new D("value is required");if(!_(e))throw new D("array is required");n=k(n,0);let o,l=t._positions,i=l.length;for(e[n++]=i,o=0;o<i;++o,n+=T.packedLength)T.pack(l[o],e,n);let u=t._shape;for(i=u.length,e[n++]=i,o=0;o<i;++o,n+=C.packedLength)C.pack(u[o],e,n);return f.pack(t._ellipsoid,e,n),n+=f.packedLength,g.pack(t._vertexFormat,e,n),n+=g.packedLength,e[n++]=t._cornerType,e[n]=t._granularity,e};var ee=f.clone(f.UNIT_SPHERE),te=new g,v={polylinePositions:void 0,shapePositions:void 0,ellipsoid:ee,vertexFormat:te,cornerType:void 0,granularity:void 0};R.unpack=function(t,e,n){if(!_(t))throw new D("array is required");e=k(e,0);let o,l=t[e++],i=new Array(l);for(o=0;o<l;++o,e+=T.packedLength)i[o]=T.unpack(t,e);l=t[e++];let u=new Array(l);for(o=0;o<l;++o,e+=C.packedLength)u[o]=C.unpack(t,e);let L=f.unpack(t,e,ee);e+=f.packedLength;let E=g.unpack(t,e,te);e+=g.packedLength;let G=t[e++],r=t[e];return _(n)?(n._positions=i,n._shape=u,n._ellipsoid=f.clone(L,n._ellipsoid),n._vertexFormat=g.clone(E,n._vertexFormat),n._cornerType=G,n._granularity=r,n):(v.polylinePositions=i,v.shapePositions=u,v.cornerType=G,v.granularity=r,new R(v))};var ne=new M;R.createGeometry=function(t){let e=t._positions,n=Z(e,T.equalsEpsilon),o=t._shape;if(o=j.removeDuplicatesFromShape(o),n.length<2||o.length<3)return;V.computeWindingOrder2D(o)===$.CLOCKWISE&&o.reverse();let l=M.fromPoints(o,ne),i=j.computePositions(n,o,l,t,!0);return oe(i,o,l,t._vertexFormat)};var H=R;function ie(t,e){return _(e)&&(t=H.unpack(t,e)),t._ellipsoid=f.clone(t._ellipsoid),H.createGeometry(t)}var Re=ie;export{Re as default}; | ||
import{a as M}from"./chunk-MXURYLN3.js";import{a as W}from"./chunk-CKVHMDPC.js";import"./chunk-JAMWPWOV.js";import"./chunk-IQ7DLQQP.js";import{a as x,b as I,c as j}from"./chunk-PIHOEFW3.js";import"./chunk-IZNUAC5V.js";import"./chunk-3CPQXNZI.js";import{a as g}from"./chunk-64WQCGAE.js";import"./chunk-7E5ZATSO.js";import"./chunk-XOMW5SDY.js";import{a as $,b as V}from"./chunk-ZK4DC2CW.js";import{a as Z}from"./chunk-OBENGMDT.js";import"./chunk-LH3GDPJ4.js";import"./chunk-QC62DG5W.js";import"./chunk-R6IH5WM5.js";import{a as X}from"./chunk-ROROM35N.js";import{a as Q}from"./chunk-F5TB5EI7.js";import{b as Y,c as z,d as U}from"./chunk-VAPKZ5PR.js";import{d as K}from"./chunk-DXGEUDM7.js";import"./chunk-5IUHFVP3.js";import"./chunk-OE3P25NW.js";import"./chunk-HIT4T4MS.js";import{a as B}from"./chunk-3KRBUMEX.js";import{a as T,c as C,d as f}from"./chunk-PQ6NV4GA.js";import{a as J}from"./chunk-74I3QBVP.js";import"./chunk-BLVYEJBC.js";import"./chunk-A6PYE4JS.js";import{a as k}from"./chunk-T23IKWCM.js";import{a as D}from"./chunk-HJ33TVGP.js";import{e as _}from"./chunk-WL4PTXMO.js";function oe(t,e,n,o){let l=new Q;o.position&&(l.position=new U({componentDatatype:B.DOUBLE,componentsPerAttribute:3,values:t}));let i=e.length,u=t.length/3,L=(u-i*2)/(i*2),E=V.triangulate(e),G=(L-1)*i*6+E.length*2,r=X.createTypedArray(u,G),m,s,d,b,A,q,F=i*2,p=0;for(m=0;m<L-1;m++){for(s=0;s<i-1;s++)d=s*2+m*i*2,q=d+F,b=d+1,A=b+F,r[p++]=b,r[p++]=d,r[p++]=A,r[p++]=A,r[p++]=d,r[p++]=q;d=i*2-2+m*i*2,b=d+1,A=b+F,q=d+F,r[p++]=b,r[p++]=d,r[p++]=A,r[p++]=A,r[p++]=d,r[p++]=q}if(o.st||o.tangent||o.bitangent){let c=new Float32Array(u*2),S=1/(L-1),w=1/n.height,O=n.height/2,y,a,h=0;for(m=0;m<L;m++){for(y=m*S,a=w*(e[0].y+O),c[h++]=y,c[h++]=a,s=1;s<i;s++)a=w*(e[s].y+O),c[h++]=y,c[h++]=a,c[h++]=y,c[h++]=a;a=w*(e[0].y+O),c[h++]=y,c[h++]=a}for(s=0;s<i;s++)y=0,a=w*(e[s].y+O),c[h++]=y,c[h++]=a;for(s=0;s<i;s++)y=(L-1)*S,a=w*(e[s].y+O),c[h++]=y,c[h++]=a;l.st=new U({componentDatatype:B.FLOAT,componentsPerAttribute:2,values:new Float32Array(c)})}let N=u-i*2;for(m=0;m<E.length;m+=3){let c=E[m]+N,S=E[m+1]+N,w=E[m+2]+N;r[p++]=c,r[p++]=S,r[p++]=w,r[p++]=w+i,r[p++]=S+i,r[p++]=c+i}let P=new z({attributes:l,indices:r,boundingSphere:K.fromVertices(t),primitiveType:Y.TRIANGLES});if(o.normal&&(P=W.computeNormal(P)),o.tangent||o.bitangent){try{P=W.computeTangentAndBitangent(P)}catch{I("polyline-volume-tangent-bitangent","Unable to compute tangents and bitangents for polyline volume geometry")}o.tangent||(P.attributes.tangent=void 0),o.bitangent||(P.attributes.bitangent=void 0),o.st||(P.attributes.st=void 0)}return P}function R(t){t=k(t,k.EMPTY_OBJECT);let e=t.polylinePositions,n=t.shapePositions;if(!_(e))throw new D("options.polylinePositions is required.");if(!_(n))throw new D("options.shapePositions is required.");this._positions=e,this._shape=n,this._ellipsoid=f.clone(k(t.ellipsoid,f.WGS84)),this._cornerType=k(t.cornerType,x.ROUNDED),this._vertexFormat=g.clone(k(t.vertexFormat,g.DEFAULT)),this._granularity=k(t.granularity,J.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeGeometry";let o=1+e.length*T.packedLength;o+=1+n.length*C.packedLength,this.packedLength=o+f.packedLength+g.packedLength+2}R.pack=function(t,e,n){if(!_(t))throw new D("value is required");if(!_(e))throw new D("array is required");n=k(n,0);let o,l=t._positions,i=l.length;for(e[n++]=i,o=0;o<i;++o,n+=T.packedLength)T.pack(l[o],e,n);let u=t._shape;for(i=u.length,e[n++]=i,o=0;o<i;++o,n+=C.packedLength)C.pack(u[o],e,n);return f.pack(t._ellipsoid,e,n),n+=f.packedLength,g.pack(t._vertexFormat,e,n),n+=g.packedLength,e[n++]=t._cornerType,e[n]=t._granularity,e};var ee=f.clone(f.UNIT_SPHERE),te=new g,v={polylinePositions:void 0,shapePositions:void 0,ellipsoid:ee,vertexFormat:te,cornerType:void 0,granularity:void 0};R.unpack=function(t,e,n){if(!_(t))throw new D("array is required");e=k(e,0);let o,l=t[e++],i=new Array(l);for(o=0;o<l;++o,e+=T.packedLength)i[o]=T.unpack(t,e);l=t[e++];let u=new Array(l);for(o=0;o<l;++o,e+=C.packedLength)u[o]=C.unpack(t,e);let L=f.unpack(t,e,ee);e+=f.packedLength;let E=g.unpack(t,e,te);e+=g.packedLength;let G=t[e++],r=t[e];return _(n)?(n._positions=i,n._shape=u,n._ellipsoid=f.clone(L,n._ellipsoid),n._vertexFormat=g.clone(E,n._vertexFormat),n._cornerType=G,n._granularity=r,n):(v.polylinePositions=i,v.shapePositions=u,v.cornerType=G,v.granularity=r,new R(v))};var ne=new M;R.createGeometry=function(t){let e=t._positions,n=Z(e,T.equalsEpsilon),o=t._shape;if(o=j.removeDuplicatesFromShape(o),n.length<2||o.length<3)return;V.computeWindingOrder2D(o)===$.CLOCKWISE&&o.reverse();let l=M.fromPoints(o,ne),i=j.computePositions(n,o,l,t,!0);return oe(i,o,l,t._vertexFormat)};var H=R;function ie(t,e){return _(e)&&(t=H.unpack(t,e)),t._ellipsoid=f.clone(t._ellipsoid),H.createGeometry(t)}var Re=ie;export{Re as default}; |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.116 | ||
* Version 1.116.1 | ||
* | ||
@@ -26,2 +26,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
import{a as w}from"./chunk-AEWBPSCB.js";import{a as N,c as E}from"./chunk-FCEVC3JZ.js";import"./chunk-2QAZKO32.js";import"./chunk-M5A47EM2.js";import"./chunk-YPW76GEP.js";import"./chunk-GKRM7KEL.js";import{a as G,b as v}from"./chunk-4NVG6N2Q.js";import{a as q}from"./chunk-5CBMSEPD.js";import"./chunk-2DF4CAYN.js";import"./chunk-LGFQRF3V.js";import"./chunk-AHZBRYZA.js";import{a as k}from"./chunk-TWAPNO4J.js";import{a as O}from"./chunk-FSXLPWHR.js";import{b as A,c as S,d as R}from"./chunk-37KLWU3W.js";import{d as C}from"./chunk-HTNJJ6YO.js";import"./chunk-63E276CT.js";import"./chunk-NRW2R4YV.js";import"./chunk-NSILPUHD.js";import{a as b}from"./chunk-M7WODBAD.js";import{a,c as _,d as s}from"./chunk-J26GWQSN.js";import{a as D}from"./chunk-PYB3IV2X.js";import"./chunk-H7FFK4U5.js";import"./chunk-YEUII2A5.js";import{a as d}from"./chunk-4353PD6R.js";import{a as y}from"./chunk-2S4UUFD6.js";import{e as u}from"./chunk-42VHSORI.js";function U(o,i){let t=new O;t.position=new R({componentDatatype:b.DOUBLE,componentsPerAttribute:3,values:o});let e=i.length,r=t.position.values.length/3,f=o.length/3/e,p=k.createTypedArray(r,2*e*(f+1)),m,n,l=0;m=0;let h=m*e;for(n=0;n<e-1;n++)p[l++]=n+h,p[l++]=n+h+1;for(p[l++]=e-1+h,p[l++]=h,m=f-1,h=m*e,n=0;n<e-1;n++)p[l++]=n+h,p[l++]=n+h+1;for(p[l++]=e-1+h,p[l++]=h,m=0;m<f-1;m++){let T=e*m,W=T+e;for(n=0;n<e;n++)p[l++]=n+T,p[l++]=n+W}return new S({attributes:t,indices:k.createTypedArray(r,p),boundingSphere:C.fromVertices(o),primitiveType:A.LINES})}function g(o){o=d(o,d.EMPTY_OBJECT);let i=o.polylinePositions,t=o.shapePositions;if(!u(i))throw new y("options.polylinePositions is required.");if(!u(t))throw new y("options.shapePositions is required.");this._positions=i,this._shape=t,this._ellipsoid=s.clone(d(o.ellipsoid,s.WGS84)),this._cornerType=d(o.cornerType,N.ROUNDED),this._granularity=d(o.granularity,D.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeOutlineGeometry";let e=1+i.length*a.packedLength;e+=1+t.length*_.packedLength,this.packedLength=e+s.packedLength+2}g.pack=function(o,i,t){if(!u(o))throw new y("value is required");if(!u(i))throw new y("array is required");t=d(t,0);let e,r=o._positions,c=r.length;for(i[t++]=c,e=0;e<c;++e,t+=a.packedLength)a.pack(r[e],i,t);let f=o._shape;for(c=f.length,i[t++]=c,e=0;e<c;++e,t+=_.packedLength)_.pack(f[e],i,t);return s.pack(o._ellipsoid,i,t),t+=s.packedLength,i[t++]=o._cornerType,i[t]=o._granularity,i};var B=s.clone(s.UNIT_SPHERE),P={polylinePositions:void 0,shapePositions:void 0,ellipsoid:B,height:void 0,cornerType:void 0,granularity:void 0};g.unpack=function(o,i,t){if(!u(o))throw new y("array is required");i=d(i,0);let e,r=o[i++],c=new Array(r);for(e=0;e<r;++e,i+=a.packedLength)c[e]=a.unpack(o,i);r=o[i++];let f=new Array(r);for(e=0;e<r;++e,i+=_.packedLength)f[e]=_.unpack(o,i);let p=s.unpack(o,i,B);i+=s.packedLength;let m=o[i++],n=o[i];return u(t)?(t._positions=c,t._shape=f,t._ellipsoid=s.clone(p,t._ellipsoid),t._cornerType=m,t._granularity=n,t):(P.polylinePositions=c,P.shapePositions=f,P.cornerType=m,P.granularity=n,new g(P))};var M=new w;g.createGeometry=function(o){let i=o._positions,t=q(i,a.equalsEpsilon),e=o._shape;if(e=E.removeDuplicatesFromShape(e),t.length<2||e.length<3)return;v.computeWindingOrder2D(e)===G.CLOCKWISE&&e.reverse();let r=w.fromPoints(e,M),c=E.computePositions(t,e,r,o,!1);return U(c,e)};var L=g;function j(o,i){return u(i)&&(o=L.unpack(o,i)),o._ellipsoid=s.clone(o._ellipsoid),L.createGeometry(o)}var he=j;export{he as default}; | ||
import{a as w}from"./chunk-MXURYLN3.js";import{a as N,c as E}from"./chunk-PIHOEFW3.js";import"./chunk-IZNUAC5V.js";import"./chunk-3CPQXNZI.js";import"./chunk-7E5ZATSO.js";import"./chunk-XOMW5SDY.js";import{a as G,b as v}from"./chunk-ZK4DC2CW.js";import{a as q}from"./chunk-OBENGMDT.js";import"./chunk-LH3GDPJ4.js";import"./chunk-QC62DG5W.js";import"./chunk-R6IH5WM5.js";import{a as k}from"./chunk-ROROM35N.js";import{a as O}from"./chunk-F5TB5EI7.js";import{b as A,c as S,d as R}from"./chunk-VAPKZ5PR.js";import{d as C}from"./chunk-DXGEUDM7.js";import"./chunk-5IUHFVP3.js";import"./chunk-OE3P25NW.js";import"./chunk-HIT4T4MS.js";import{a as b}from"./chunk-3KRBUMEX.js";import{a,c as _,d as s}from"./chunk-PQ6NV4GA.js";import{a as D}from"./chunk-74I3QBVP.js";import"./chunk-BLVYEJBC.js";import"./chunk-A6PYE4JS.js";import{a as d}from"./chunk-T23IKWCM.js";import{a as y}from"./chunk-HJ33TVGP.js";import{e as u}from"./chunk-WL4PTXMO.js";function U(o,i){let t=new O;t.position=new R({componentDatatype:b.DOUBLE,componentsPerAttribute:3,values:o});let e=i.length,r=t.position.values.length/3,f=o.length/3/e,p=k.createTypedArray(r,2*e*(f+1)),m,n,l=0;m=0;let h=m*e;for(n=0;n<e-1;n++)p[l++]=n+h,p[l++]=n+h+1;for(p[l++]=e-1+h,p[l++]=h,m=f-1,h=m*e,n=0;n<e-1;n++)p[l++]=n+h,p[l++]=n+h+1;for(p[l++]=e-1+h,p[l++]=h,m=0;m<f-1;m++){let T=e*m,W=T+e;for(n=0;n<e;n++)p[l++]=n+T,p[l++]=n+W}return new S({attributes:t,indices:k.createTypedArray(r,p),boundingSphere:C.fromVertices(o),primitiveType:A.LINES})}function g(o){o=d(o,d.EMPTY_OBJECT);let i=o.polylinePositions,t=o.shapePositions;if(!u(i))throw new y("options.polylinePositions is required.");if(!u(t))throw new y("options.shapePositions is required.");this._positions=i,this._shape=t,this._ellipsoid=s.clone(d(o.ellipsoid,s.WGS84)),this._cornerType=d(o.cornerType,N.ROUNDED),this._granularity=d(o.granularity,D.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeOutlineGeometry";let e=1+i.length*a.packedLength;e+=1+t.length*_.packedLength,this.packedLength=e+s.packedLength+2}g.pack=function(o,i,t){if(!u(o))throw new y("value is required");if(!u(i))throw new y("array is required");t=d(t,0);let e,r=o._positions,c=r.length;for(i[t++]=c,e=0;e<c;++e,t+=a.packedLength)a.pack(r[e],i,t);let f=o._shape;for(c=f.length,i[t++]=c,e=0;e<c;++e,t+=_.packedLength)_.pack(f[e],i,t);return s.pack(o._ellipsoid,i,t),t+=s.packedLength,i[t++]=o._cornerType,i[t]=o._granularity,i};var B=s.clone(s.UNIT_SPHERE),P={polylinePositions:void 0,shapePositions:void 0,ellipsoid:B,height:void 0,cornerType:void 0,granularity:void 0};g.unpack=function(o,i,t){if(!u(o))throw new y("array is required");i=d(i,0);let e,r=o[i++],c=new Array(r);for(e=0;e<r;++e,i+=a.packedLength)c[e]=a.unpack(o,i);r=o[i++];let f=new Array(r);for(e=0;e<r;++e,i+=_.packedLength)f[e]=_.unpack(o,i);let p=s.unpack(o,i,B);i+=s.packedLength;let m=o[i++],n=o[i];return u(t)?(t._positions=c,t._shape=f,t._ellipsoid=s.clone(p,t._ellipsoid),t._cornerType=m,t._granularity=n,t):(P.polylinePositions=c,P.shapePositions=f,P.cornerType=m,P.granularity=n,new g(P))};var M=new w;g.createGeometry=function(o){let i=o._positions,t=q(i,a.equalsEpsilon),e=o._shape;if(e=E.removeDuplicatesFromShape(e),t.length<2||e.length<3)return;v.computeWindingOrder2D(e)===G.CLOCKWISE&&e.reverse();let r=w.fromPoints(e,M),c=E.computePositions(t,e,r,o,!1);return U(c,e)};var L=g;function j(o,i){return u(i)&&(o=L.unpack(o,i)),o._ellipsoid=s.clone(o._ellipsoid),L.createGeometry(o)}var he=j;export{he as default}; |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.116 | ||
* Version 1.116.1 | ||
* | ||
@@ -26,2 +26,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
import{a as J}from"./chunk-I24DPSBO.js";import{a as Nt}from"./chunk-ZZAO5JE6.js";import{a as zt}from"./chunk-EJXUGS5C.js";import"./chunk-BMTOWA7K.js";import"./chunk-W2YTVRCC.js";import{a as ut}from"./chunk-TXIAMGDC.js";import{a as X}from"./chunk-TK2AA6M2.js";import{b as Rt}from"./chunk-4NVG6N2Q.js";import"./chunk-2DF4CAYN.js";import"./chunk-LGFQRF3V.js";import"./chunk-AHZBRYZA.js";import{a as yt}from"./chunk-TWAPNO4J.js";import{a as Vt}from"./chunk-FSXLPWHR.js";import{b as Mt,c as Pt,d as q}from"./chunk-37KLWU3W.js";import{d as st,e as Lt}from"./chunk-HTNJJ6YO.js";import"./chunk-63E276CT.js";import"./chunk-NRW2R4YV.js";import{c as S,d as At}from"./chunk-NSILPUHD.js";import{a as Y}from"./chunk-M7WODBAD.js";import{a as _,b as wt,c as G,d as H,e as ft}from"./chunk-J26GWQSN.js";import{a as W}from"./chunk-PYB3IV2X.js";import"./chunk-H7FFK4U5.js";import"./chunk-YEUII2A5.js";import{a as L}from"./chunk-4353PD6R.js";import{a as Et,b as lt}from"./chunk-2S4UUFD6.js";import{e as $}from"./chunk-42VHSORI.js";var Tt=new _,Bt=new _,Ut=new _,Yt=new _,qt=new S,Zt=new G,Kt=new st,$t=new st;function Xt(t,e){let n=new Pt({attributes:new Vt,primitiveType:Mt.TRIANGLES});return n.attributes.position=new q({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:e.positions}),t.normal&&(n.attributes.normal=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:e.normals})),t.tangent&&(n.attributes.tangent=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:e.tangents})),t.bitangent&&(n.attributes.bitangent=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:e.bitangents})),n}function Gt(t,e,n,r){let a=t.length,c=e.normal?new Float32Array(a):void 0,l=e.tangent?new Float32Array(a):void 0,u=e.bitangent?new Float32Array(a):void 0,p=0,d=Yt,o=Ut,i=Bt;if(e.normal||e.tangent||e.bitangent)for(let f=0;f<a;f+=3){let s=_.fromArray(t,f,Tt),h=p+1,g=p+2;i=n.geodeticSurfaceNormal(s,i),(e.tangent||e.bitangent)&&(_.cross(_.UNIT_Z,i,o),ft.multiplyByVector(r,o,o),_.normalize(o,o),e.bitangent&&_.normalize(_.cross(i,o,d),d)),e.normal&&(c[p]=i.x,c[h]=i.y,c[g]=i.z),e.tangent&&(l[p]=o.x,l[h]=o.y,l[g]=o.z),e.bitangent&&(u[p]=d.x,u[h]=d.y,u[g]=d.z),p+=3}return Xt(e,{positions:t,normals:c,tangents:l,bitangents:u})}var Ct=new _,jt=new _;function te(t,e,n){let r=t.length,a=e.normal?new Float32Array(r):void 0,c=e.tangent?new Float32Array(r):void 0,l=e.bitangent?new Float32Array(r):void 0,u=0,p=0,d=0,o=!0,i=Yt,f=Ut,s=Bt;if(e.normal||e.tangent||e.bitangent)for(let h=0;h<r;h+=6){let g=_.fromArray(t,h,Tt),A=_.fromArray(t,(h+6)%r,Ct);if(o){let b=_.fromArray(t,(h+3)%r,jt);_.subtract(A,g,A),_.subtract(b,g,b),s=_.normalize(_.cross(b,A,s),s),o=!1}_.equalsEpsilon(A,g,W.EPSILON10)&&(o=!0),(e.tangent||e.bitangent)&&(i=n.geodeticSurfaceNormal(g,i),e.tangent&&(f=_.normalize(_.cross(i,s,f),f))),e.normal&&(a[u++]=s.x,a[u++]=s.y,a[u++]=s.z,a[u++]=s.x,a[u++]=s.y,a[u++]=s.z),e.tangent&&(c[p++]=f.x,c[p++]=f.y,c[p++]=f.z,c[p++]=f.x,c[p++]=f.y,c[p++]=f.z),e.bitangent&&(l[d++]=i.x,l[d++]=i.y,l[d++]=i.z,l[d++]=i.x,l[d++]=i.y,l[d++]=i.z)}return Xt(e,{positions:t,normals:a,tangents:c,bitangents:l})}function It(t,e){let n=t._vertexFormat,r=t._ellipsoid,a=e.height,c=e.width,l=e.northCap,u=e.southCap,p=0,d=a,o=a,i=0;l&&(p=1,o-=1,i+=1),u&&(d-=1,o-=1,i+=1),i+=c*o;let f=n.position?new Float64Array(i*3):void 0,s=n.st?new Float32Array(i*2):void 0,h=0,g=0,A=Tt,b=Zt,z=Number.MAX_VALUE,F=Number.MAX_VALUE,j=-Number.MAX_VALUE,T=-Number.MAX_VALUE;for(let x=p;x<d;++x)for(let k=0;k<c;++k)J.computePosition(e,r,n.st,x,k,A,b),f[h++]=A.x,f[h++]=A.y,f[h++]=A.z,n.st&&(s[g++]=b.x,s[g++]=b.y,z=Math.min(z,b.x),F=Math.min(F,b.y),j=Math.max(j,b.x),T=Math.max(T,b.y));if(l&&(J.computePosition(e,r,n.st,0,0,A,b),f[h++]=A.x,f[h++]=A.y,f[h++]=A.z,n.st&&(s[g++]=b.x,s[g++]=b.y,z=b.x,F=b.y,j=b.x,T=b.y)),u&&(J.computePosition(e,r,n.st,a-1,0,A,b),f[h++]=A.x,f[h++]=A.y,f[h]=A.z,n.st&&(s[g++]=b.x,s[g]=b.y,z=Math.min(z,b.x),F=Math.min(F,b.y),j=Math.max(j,b.x),T=Math.max(T,b.y))),n.st&&(z<0||F<0||j>1||T>1))for(let x=0;x<s.length;x+=2)s[x]=(s[x]-z)/(j-z),s[x+1]=(s[x+1]-F)/(T-F);let m=Gt(f,n,r,e.tangentRotationMatrix),K=6*(c-1)*(o-1);l&&(K+=3*(c-1)),u&&(K+=3*(c-1));let P=yt.createTypedArray(i,K),D=0,N=0,O;for(O=0;O<o-1;++O){for(let x=0;x<c-1;++x){let k=D,M=k+c,I=M+1,rt=k+1;P[N++]=k,P[N++]=M,P[N++]=rt,P[N++]=rt,P[N++]=M,P[N++]=I,++D}++D}if(l||u){let x=i-1,k=i-1;l&&u&&(x=i-2);let M,I;if(D=0,l)for(O=0;O<c-1;O++)M=D,I=M+1,P[N++]=x,P[N++]=M,P[N++]=I,++D;if(u)for(D=(o-1)*c,O=0;O<c-1;O++)M=D,I=M+1,P[N++]=M,P[N++]=k,P[N++]=I,++D}return m.indices=P,n.st&&(m.attributes.st=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:s})),m}function ht(t,e,n,r,a){return t[e++]=r[n],t[e++]=r[n+1],t[e++]=r[n+2],t[e++]=a[n],t[e++]=a[n+1],t[e]=a[n+2],t}function pt(t,e,n,r){return t[e++]=r[n],t[e++]=r[n+1],t[e++]=r[n],t[e]=r[n+1],t}var Dt=new X;function ee(t,e){let n=t._shadowVolume,r=t._offsetAttribute,a=t._vertexFormat,c=t._extrudedHeight,l=t._surfaceHeight,u=t._ellipsoid,p=e.height,d=e.width,o;if(n){let R=X.clone(a,Dt);R.normal=!0,t._vertexFormat=R}let i=It(t,e);n&&(t._vertexFormat=a);let f=Rt.scaleToGeodeticHeight(i.attributes.position.values,l,u,!1);f=new Float64Array(f);let s=f.length,h=s*2,g=new Float64Array(h);g.set(f);let A=Rt.scaleToGeodeticHeight(i.attributes.position.values,c,u);g.set(A,s),i.attributes.position.values=g;let b=a.normal?new Float32Array(h):void 0,z=a.tangent?new Float32Array(h):void 0,F=a.bitangent?new Float32Array(h):void 0,j=a.st?new Float32Array(h/3*2):void 0,T,m;if(a.normal){for(m=i.attributes.normal.values,b.set(m),o=0;o<s;o++)m[o]=-m[o];b.set(m,s),i.attributes.normal.values=b}if(n){m=i.attributes.normal.values,a.normal||(i.attributes.normal=void 0);let R=new Float32Array(h);for(o=0;o<s;o++)m[o]=-m[o];R.set(m,s),i.attributes.extrudeDirection=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:R})}let K,P=$(r);if(P){let R=s/3*2,at=new Uint8Array(R);r===ut.TOP?at=at.fill(1,0,R/2):(K=r===ut.NONE?0:1,at=at.fill(K)),i.attributes.applyOffset=new q({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:at})}if(a.tangent){let R=i.attributes.tangent.values;for(z.set(R),o=0;o<s;o++)R[o]=-R[o];z.set(R,s),i.attributes.tangent.values=z}if(a.bitangent){let R=i.attributes.bitangent.values;F.set(R),F.set(R,s),i.attributes.bitangent.values=F}a.st&&(T=i.attributes.st.values,j.set(T),j.set(T,s/3*2),i.attributes.st.values=j);let D=i.indices,N=D.length,O=s/3,x=yt.createTypedArray(h/3,N*2);for(x.set(D),o=0;o<N;o+=3)x[o+N]=D[o+2]+O,x[o+1+N]=D[o+1]+O,x[o+2+N]=D[o]+O;i.indices=x;let k=e.northCap,M=e.southCap,I=p,rt=2,dt=0,xt=4,St=4;k&&(rt-=1,I-=1,dt+=1,xt-=2,St-=1),M&&(rt-=1,I-=1,dt+=1,xt-=2,St-=1),dt+=rt*d+2*I-xt;let gt=(dt+St)*2,C=new Float64Array(gt*3),E=n?new Float32Array(gt*3):void 0,Z=P?new Uint8Array(gt):void 0,V=a.st?new Float32Array(gt*2):void 0,et=r===ut.TOP;P&&!et&&(K=r===ut.ALL?1:0,Z=Z.fill(K));let v=0,B=0,y=0,U=0,nt=d*I,w;for(o=0;o<nt;o+=d)w=o*3,C=ht(C,v,w,f,A),v+=6,a.st&&(V=pt(V,B,o*2,T),B+=4),n&&(y+=3,E[y++]=m[w],E[y++]=m[w+1],E[y++]=m[w+2]),et&&(Z[U++]=1,U+=1);if(M){let R=k?nt+1:nt;for(w=R*3,o=0;o<2;o++)C=ht(C,v,w,f,A),v+=6,a.st&&(V=pt(V,B,R*2,T),B+=4),n&&(y+=3,E[y++]=m[w],E[y++]=m[w+1],E[y++]=m[w+2]),et&&(Z[U++]=1,U+=1)}else for(o=nt-d;o<nt;o++)w=o*3,C=ht(C,v,w,f,A),v+=6,a.st&&(V=pt(V,B,o*2,T),B+=4),n&&(y+=3,E[y++]=m[w],E[y++]=m[w+1],E[y++]=m[w+2]),et&&(Z[U++]=1,U+=1);for(o=nt-1;o>0;o-=d)w=o*3,C=ht(C,v,w,f,A),v+=6,a.st&&(V=pt(V,B,o*2,T),B+=4),n&&(y+=3,E[y++]=m[w],E[y++]=m[w+1],E[y++]=m[w+2]),et&&(Z[U++]=1,U+=1);if(k){let R=nt;for(w=R*3,o=0;o<2;o++)C=ht(C,v,w,f,A),v+=6,a.st&&(V=pt(V,B,R*2,T),B+=4),n&&(y+=3,E[y++]=m[w],E[y++]=m[w+1],E[y++]=m[w+2]),et&&(Z[U++]=1,U+=1)}else for(o=d-1;o>=0;o--)w=o*3,C=ht(C,v,w,f,A),v+=6,a.st&&(V=pt(V,B,o*2,T),B+=4),n&&(y+=3,E[y++]=m[w],E[y++]=m[w+1],E[y++]=m[w+2]),et&&(Z[U++]=1,U+=1);let ot=te(C,a,u);a.st&&(ot.attributes.st=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:V})),n&&(ot.attributes.extrudeDirection=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:E})),P&&(ot.attributes.applyOffset=new q({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:Z}));let it=yt.createTypedArray(gt,dt*6),mt,_t,kt,bt;s=C.length/3;let ct=0;for(o=0;o<s-1;o+=2){mt=o,bt=(mt+2)%s;let R=_.fromArray(C,mt*3,Ct),at=_.fromArray(C,bt*3,jt);_.equalsEpsilon(R,at,W.EPSILON10)||(_t=(mt+1)%s,kt=(_t+2)%s,it[ct++]=mt,it[ct++]=_t,it[ct++]=bt,it[ct++]=bt,it[ct++]=_t,it[ct++]=kt)}return ot.indices=it,ot=zt.combineInstances([new Nt({geometry:i}),new Nt({geometry:ot})]),ot[0]}var ne=[new _,new _,new _,new _],Wt=new wt,oe=new wt;function Ht(t,e,n,r,a){if(n===0)return S.clone(t,a);let c=J.computeOptions(t,e,n,0,qt,Wt),l=c.height,u=c.width,p=ne;return J.computePosition(c,r,!1,0,0,p[0]),J.computePosition(c,r,!1,0,u-1,p[1]),J.computePosition(c,r,!1,l-1,0,p[2]),J.computePosition(c,r,!1,l-1,u-1,p[3]),S.fromCartesianArray(p,r,a)}function Q(t){t=L(t,L.EMPTY_OBJECT);let e=t.rectangle;if(lt.typeOf.object("rectangle",e),S.validate(e),e.north<e.south)throw new Et("options.rectangle.north must be greater than or equal to options.rectangle.south");let n=L(t.height,0),r=L(t.extrudedHeight,n);this._rectangle=S.clone(e),this._granularity=L(t.granularity,W.RADIANS_PER_DEGREE),this._ellipsoid=H.clone(L(t.ellipsoid,H.WGS84)),this._surfaceHeight=Math.max(n,r),this._rotation=L(t.rotation,0),this._stRotation=L(t.stRotation,0),this._vertexFormat=X.clone(L(t.vertexFormat,X.DEFAULT)),this._extrudedHeight=Math.min(n,r),this._shadowVolume=L(t.shadowVolume,!1),this._workerName="createRectangleGeometry",this._offsetAttribute=t.offsetAttribute,this._rotatedRectangle=void 0,this._textureCoordinateRotationPoints=void 0}Q.packedLength=S.packedLength+H.packedLength+X.packedLength+7;Q.pack=function(t,e,n){return lt.typeOf.object("value",t),lt.defined("array",e),n=L(n,0),S.pack(t._rectangle,e,n),n+=S.packedLength,H.pack(t._ellipsoid,e,n),n+=H.packedLength,X.pack(t._vertexFormat,e,n),n+=X.packedLength,e[n++]=t._granularity,e[n++]=t._surfaceHeight,e[n++]=t._rotation,e[n++]=t._stRotation,e[n++]=t._extrudedHeight,e[n++]=t._shadowVolume?1:0,e[n]=L(t._offsetAttribute,-1),e};var Jt=new S,Qt=H.clone(H.UNIT_SPHERE),tt={rectangle:Jt,ellipsoid:Qt,vertexFormat:Dt,granularity:void 0,height:void 0,rotation:void 0,stRotation:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};Q.unpack=function(t,e,n){lt.defined("array",t),e=L(e,0);let r=S.unpack(t,e,Jt);e+=S.packedLength;let a=H.unpack(t,e,Qt);e+=H.packedLength;let c=X.unpack(t,e,Dt);e+=X.packedLength;let l=t[e++],u=t[e++],p=t[e++],d=t[e++],o=t[e++],i=t[e++]===1,f=t[e];return $(n)?(n._rectangle=S.clone(r,n._rectangle),n._ellipsoid=H.clone(a,n._ellipsoid),n._vertexFormat=X.clone(c,n._vertexFormat),n._granularity=l,n._surfaceHeight=u,n._rotation=p,n._stRotation=d,n._extrudedHeight=o,n._shadowVolume=i,n._offsetAttribute=f===-1?void 0:f,n):(tt.granularity=l,tt.height=u,tt.rotation=p,tt.stRotation=d,tt.extrudedHeight=o,tt.shadowVolume=i,tt.offsetAttribute=f===-1?void 0:f,new Q(tt))};Q.computeRectangle=function(t,e){t=L(t,L.EMPTY_OBJECT);let n=t.rectangle;if(lt.typeOf.object("rectangle",n),S.validate(n),n.north<n.south)throw new Et("options.rectangle.north must be greater than or equal to options.rectangle.south");let r=L(t.granularity,W.RADIANS_PER_DEGREE),a=L(t.ellipsoid,H.WGS84),c=L(t.rotation,0);return Ht(n,r,c,a,e)};var ie=new ft,Ft=new Lt,ae=new wt;Q.createGeometry=function(t){if(W.equalsEpsilon(t._rectangle.north,t._rectangle.south,W.EPSILON10)||W.equalsEpsilon(t._rectangle.east,t._rectangle.west,W.EPSILON10))return;let e=t._rectangle,n=t._ellipsoid,r=t._rotation,a=t._stRotation,c=t._vertexFormat,l=J.computeOptions(e,t._granularity,r,a,qt,Wt,oe),u=ie;if(a!==0||r!==0){let s=S.center(e,ae),h=n.geodeticSurfaceNormalCartographic(s,Ct);Lt.fromAxisAngle(h,-a,Ft),ft.fromQuaternion(Ft,u)}else ft.clone(ft.IDENTITY,u);let p=t._surfaceHeight,d=t._extrudedHeight,o=!W.equalsEpsilon(p,d,0,W.EPSILON2);l.lonScalar=1/t._rectangle.width,l.latScalar=1/t._rectangle.height,l.tangentRotationMatrix=u;let i,f;if(e=t._rectangle,o){i=ee(t,l);let s=st.fromRectangle3D(e,n,p,$t),h=st.fromRectangle3D(e,n,d,Kt);f=st.union(s,h)}else{if(i=It(t,l),i.attributes.position.values=Rt.scaleToGeodeticHeight(i.attributes.position.values,p,n,!1),$(t._offsetAttribute)){let s=i.attributes.position.values.length,h=t._offsetAttribute===ut.NONE?0:1,g=new Uint8Array(s/3).fill(h);i.attributes.applyOffset=new q({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:g})}f=st.fromRectangle3D(e,n,p)}return c.position||delete i.attributes.position,new Pt({attributes:i.attributes,indices:i.indices,primitiveType:i.primitiveType,boundingSphere:f,offsetAttribute:t._offsetAttribute})};Q.createShadowVolume=function(t,e,n){let r=t._granularity,a=t._ellipsoid,c=e(r,a),l=n(r,a);return new Q({rectangle:t._rectangle,rotation:t._rotation,ellipsoid:a,stRotation:t._stRotation,granularity:r,extrudedHeight:l,height:c,vertexFormat:X.POSITION_ONLY,shadowVolume:!0})};var vt=new S,se=[new G,new G,new G],re=new At,ce=new wt;function le(t){if(t._stRotation===0)return[0,0,0,1,1,0];let e=S.clone(t._rectangle,vt),n=t._granularity,r=t._ellipsoid,a=t._rotation-t._stRotation,c=Ht(e,n,a,r,vt),l=se;l[0].x=c.west,l[0].y=c.south,l[1].x=c.west,l[1].y=c.north,l[2].x=c.east,l[2].y=c.south;let u=t.rectangle,p=At.fromRotation(t._stRotation,re),d=S.center(u,ce);for(let h=0;h<3;++h){let g=l[h];g.x-=d.longitude,g.y-=d.latitude,At.multiplyByVector(p,g,g),g.x+=d.longitude,g.y+=d.latitude,g.x=(g.x-u.west)/u.width,g.y=(g.y-u.south)/u.height}let o=l[0],i=l[1],f=l[2],s=new Array(6);return G.pack(o,s),G.pack(i,s,2),G.pack(f,s,4),s}Object.defineProperties(Q.prototype,{rectangle:{get:function(){return $(this._rotatedRectangle)||(this._rotatedRectangle=Ht(this._rectangle,this._granularity,this._rotation,this._ellipsoid)),this._rotatedRectangle}},textureCoordinateRotationPoints:{get:function(){return $(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=le(this)),this._textureCoordinateRotationPoints}}});var Ot=Q;function fe(t,e){return $(e)&&(t=Ot.unpack(t,e)),t._ellipsoid=H.clone(t._ellipsoid),t._rectangle=S.clone(t._rectangle),Ot.createGeometry(t)}var Ye=fe;export{Ye as default}; | ||
import{a as J}from"./chunk-QTP5CMGP.js";import{a as Nt}from"./chunk-CFX77L57.js";import{a as zt}from"./chunk-CKVHMDPC.js";import"./chunk-JAMWPWOV.js";import"./chunk-IQ7DLQQP.js";import{a as ut}from"./chunk-XJCFZEZW.js";import{a as X}from"./chunk-64WQCGAE.js";import{b as Rt}from"./chunk-ZK4DC2CW.js";import"./chunk-LH3GDPJ4.js";import"./chunk-QC62DG5W.js";import"./chunk-R6IH5WM5.js";import{a as yt}from"./chunk-ROROM35N.js";import{a as Vt}from"./chunk-F5TB5EI7.js";import{b as Mt,c as Pt,d as q}from"./chunk-VAPKZ5PR.js";import{d as st,e as Lt}from"./chunk-DXGEUDM7.js";import"./chunk-5IUHFVP3.js";import"./chunk-OE3P25NW.js";import{c as S,d as At}from"./chunk-HIT4T4MS.js";import{a as Y}from"./chunk-3KRBUMEX.js";import{a as _,b as wt,c as G,d as H,e as ft}from"./chunk-PQ6NV4GA.js";import{a as W}from"./chunk-74I3QBVP.js";import"./chunk-BLVYEJBC.js";import"./chunk-A6PYE4JS.js";import{a as L}from"./chunk-T23IKWCM.js";import{a as Et,b as lt}from"./chunk-HJ33TVGP.js";import{e as $}from"./chunk-WL4PTXMO.js";var Tt=new _,Bt=new _,Ut=new _,Yt=new _,qt=new S,Zt=new G,Kt=new st,$t=new st;function Xt(t,e){let n=new Pt({attributes:new Vt,primitiveType:Mt.TRIANGLES});return n.attributes.position=new q({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:e.positions}),t.normal&&(n.attributes.normal=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:e.normals})),t.tangent&&(n.attributes.tangent=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:e.tangents})),t.bitangent&&(n.attributes.bitangent=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:e.bitangents})),n}function Gt(t,e,n,r){let a=t.length,c=e.normal?new Float32Array(a):void 0,l=e.tangent?new Float32Array(a):void 0,u=e.bitangent?new Float32Array(a):void 0,p=0,d=Yt,o=Ut,i=Bt;if(e.normal||e.tangent||e.bitangent)for(let f=0;f<a;f+=3){let s=_.fromArray(t,f,Tt),h=p+1,g=p+2;i=n.geodeticSurfaceNormal(s,i),(e.tangent||e.bitangent)&&(_.cross(_.UNIT_Z,i,o),ft.multiplyByVector(r,o,o),_.normalize(o,o),e.bitangent&&_.normalize(_.cross(i,o,d),d)),e.normal&&(c[p]=i.x,c[h]=i.y,c[g]=i.z),e.tangent&&(l[p]=o.x,l[h]=o.y,l[g]=o.z),e.bitangent&&(u[p]=d.x,u[h]=d.y,u[g]=d.z),p+=3}return Xt(e,{positions:t,normals:c,tangents:l,bitangents:u})}var Ct=new _,jt=new _;function te(t,e,n){let r=t.length,a=e.normal?new Float32Array(r):void 0,c=e.tangent?new Float32Array(r):void 0,l=e.bitangent?new Float32Array(r):void 0,u=0,p=0,d=0,o=!0,i=Yt,f=Ut,s=Bt;if(e.normal||e.tangent||e.bitangent)for(let h=0;h<r;h+=6){let g=_.fromArray(t,h,Tt),A=_.fromArray(t,(h+6)%r,Ct);if(o){let b=_.fromArray(t,(h+3)%r,jt);_.subtract(A,g,A),_.subtract(b,g,b),s=_.normalize(_.cross(b,A,s),s),o=!1}_.equalsEpsilon(A,g,W.EPSILON10)&&(o=!0),(e.tangent||e.bitangent)&&(i=n.geodeticSurfaceNormal(g,i),e.tangent&&(f=_.normalize(_.cross(i,s,f),f))),e.normal&&(a[u++]=s.x,a[u++]=s.y,a[u++]=s.z,a[u++]=s.x,a[u++]=s.y,a[u++]=s.z),e.tangent&&(c[p++]=f.x,c[p++]=f.y,c[p++]=f.z,c[p++]=f.x,c[p++]=f.y,c[p++]=f.z),e.bitangent&&(l[d++]=i.x,l[d++]=i.y,l[d++]=i.z,l[d++]=i.x,l[d++]=i.y,l[d++]=i.z)}return Xt(e,{positions:t,normals:a,tangents:c,bitangents:l})}function It(t,e){let n=t._vertexFormat,r=t._ellipsoid,a=e.height,c=e.width,l=e.northCap,u=e.southCap,p=0,d=a,o=a,i=0;l&&(p=1,o-=1,i+=1),u&&(d-=1,o-=1,i+=1),i+=c*o;let f=n.position?new Float64Array(i*3):void 0,s=n.st?new Float32Array(i*2):void 0,h=0,g=0,A=Tt,b=Zt,z=Number.MAX_VALUE,F=Number.MAX_VALUE,j=-Number.MAX_VALUE,T=-Number.MAX_VALUE;for(let x=p;x<d;++x)for(let k=0;k<c;++k)J.computePosition(e,r,n.st,x,k,A,b),f[h++]=A.x,f[h++]=A.y,f[h++]=A.z,n.st&&(s[g++]=b.x,s[g++]=b.y,z=Math.min(z,b.x),F=Math.min(F,b.y),j=Math.max(j,b.x),T=Math.max(T,b.y));if(l&&(J.computePosition(e,r,n.st,0,0,A,b),f[h++]=A.x,f[h++]=A.y,f[h++]=A.z,n.st&&(s[g++]=b.x,s[g++]=b.y,z=b.x,F=b.y,j=b.x,T=b.y)),u&&(J.computePosition(e,r,n.st,a-1,0,A,b),f[h++]=A.x,f[h++]=A.y,f[h]=A.z,n.st&&(s[g++]=b.x,s[g]=b.y,z=Math.min(z,b.x),F=Math.min(F,b.y),j=Math.max(j,b.x),T=Math.max(T,b.y))),n.st&&(z<0||F<0||j>1||T>1))for(let x=0;x<s.length;x+=2)s[x]=(s[x]-z)/(j-z),s[x+1]=(s[x+1]-F)/(T-F);let m=Gt(f,n,r,e.tangentRotationMatrix),K=6*(c-1)*(o-1);l&&(K+=3*(c-1)),u&&(K+=3*(c-1));let P=yt.createTypedArray(i,K),D=0,N=0,O;for(O=0;O<o-1;++O){for(let x=0;x<c-1;++x){let k=D,M=k+c,I=M+1,rt=k+1;P[N++]=k,P[N++]=M,P[N++]=rt,P[N++]=rt,P[N++]=M,P[N++]=I,++D}++D}if(l||u){let x=i-1,k=i-1;l&&u&&(x=i-2);let M,I;if(D=0,l)for(O=0;O<c-1;O++)M=D,I=M+1,P[N++]=x,P[N++]=M,P[N++]=I,++D;if(u)for(D=(o-1)*c,O=0;O<c-1;O++)M=D,I=M+1,P[N++]=M,P[N++]=k,P[N++]=I,++D}return m.indices=P,n.st&&(m.attributes.st=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:s})),m}function ht(t,e,n,r,a){return t[e++]=r[n],t[e++]=r[n+1],t[e++]=r[n+2],t[e++]=a[n],t[e++]=a[n+1],t[e]=a[n+2],t}function pt(t,e,n,r){return t[e++]=r[n],t[e++]=r[n+1],t[e++]=r[n],t[e]=r[n+1],t}var Dt=new X;function ee(t,e){let n=t._shadowVolume,r=t._offsetAttribute,a=t._vertexFormat,c=t._extrudedHeight,l=t._surfaceHeight,u=t._ellipsoid,p=e.height,d=e.width,o;if(n){let R=X.clone(a,Dt);R.normal=!0,t._vertexFormat=R}let i=It(t,e);n&&(t._vertexFormat=a);let f=Rt.scaleToGeodeticHeight(i.attributes.position.values,l,u,!1);f=new Float64Array(f);let s=f.length,h=s*2,g=new Float64Array(h);g.set(f);let A=Rt.scaleToGeodeticHeight(i.attributes.position.values,c,u);g.set(A,s),i.attributes.position.values=g;let b=a.normal?new Float32Array(h):void 0,z=a.tangent?new Float32Array(h):void 0,F=a.bitangent?new Float32Array(h):void 0,j=a.st?new Float32Array(h/3*2):void 0,T,m;if(a.normal){for(m=i.attributes.normal.values,b.set(m),o=0;o<s;o++)m[o]=-m[o];b.set(m,s),i.attributes.normal.values=b}if(n){m=i.attributes.normal.values,a.normal||(i.attributes.normal=void 0);let R=new Float32Array(h);for(o=0;o<s;o++)m[o]=-m[o];R.set(m,s),i.attributes.extrudeDirection=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:R})}let K,P=$(r);if(P){let R=s/3*2,at=new Uint8Array(R);r===ut.TOP?at=at.fill(1,0,R/2):(K=r===ut.NONE?0:1,at=at.fill(K)),i.attributes.applyOffset=new q({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:at})}if(a.tangent){let R=i.attributes.tangent.values;for(z.set(R),o=0;o<s;o++)R[o]=-R[o];z.set(R,s),i.attributes.tangent.values=z}if(a.bitangent){let R=i.attributes.bitangent.values;F.set(R),F.set(R,s),i.attributes.bitangent.values=F}a.st&&(T=i.attributes.st.values,j.set(T),j.set(T,s/3*2),i.attributes.st.values=j);let D=i.indices,N=D.length,O=s/3,x=yt.createTypedArray(h/3,N*2);for(x.set(D),o=0;o<N;o+=3)x[o+N]=D[o+2]+O,x[o+1+N]=D[o+1]+O,x[o+2+N]=D[o]+O;i.indices=x;let k=e.northCap,M=e.southCap,I=p,rt=2,dt=0,xt=4,St=4;k&&(rt-=1,I-=1,dt+=1,xt-=2,St-=1),M&&(rt-=1,I-=1,dt+=1,xt-=2,St-=1),dt+=rt*d+2*I-xt;let gt=(dt+St)*2,C=new Float64Array(gt*3),E=n?new Float32Array(gt*3):void 0,Z=P?new Uint8Array(gt):void 0,V=a.st?new Float32Array(gt*2):void 0,et=r===ut.TOP;P&&!et&&(K=r===ut.ALL?1:0,Z=Z.fill(K));let v=0,B=0,y=0,U=0,nt=d*I,w;for(o=0;o<nt;o+=d)w=o*3,C=ht(C,v,w,f,A),v+=6,a.st&&(V=pt(V,B,o*2,T),B+=4),n&&(y+=3,E[y++]=m[w],E[y++]=m[w+1],E[y++]=m[w+2]),et&&(Z[U++]=1,U+=1);if(M){let R=k?nt+1:nt;for(w=R*3,o=0;o<2;o++)C=ht(C,v,w,f,A),v+=6,a.st&&(V=pt(V,B,R*2,T),B+=4),n&&(y+=3,E[y++]=m[w],E[y++]=m[w+1],E[y++]=m[w+2]),et&&(Z[U++]=1,U+=1)}else for(o=nt-d;o<nt;o++)w=o*3,C=ht(C,v,w,f,A),v+=6,a.st&&(V=pt(V,B,o*2,T),B+=4),n&&(y+=3,E[y++]=m[w],E[y++]=m[w+1],E[y++]=m[w+2]),et&&(Z[U++]=1,U+=1);for(o=nt-1;o>0;o-=d)w=o*3,C=ht(C,v,w,f,A),v+=6,a.st&&(V=pt(V,B,o*2,T),B+=4),n&&(y+=3,E[y++]=m[w],E[y++]=m[w+1],E[y++]=m[w+2]),et&&(Z[U++]=1,U+=1);if(k){let R=nt;for(w=R*3,o=0;o<2;o++)C=ht(C,v,w,f,A),v+=6,a.st&&(V=pt(V,B,R*2,T),B+=4),n&&(y+=3,E[y++]=m[w],E[y++]=m[w+1],E[y++]=m[w+2]),et&&(Z[U++]=1,U+=1)}else for(o=d-1;o>=0;o--)w=o*3,C=ht(C,v,w,f,A),v+=6,a.st&&(V=pt(V,B,o*2,T),B+=4),n&&(y+=3,E[y++]=m[w],E[y++]=m[w+1],E[y++]=m[w+2]),et&&(Z[U++]=1,U+=1);let ot=te(C,a,u);a.st&&(ot.attributes.st=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:V})),n&&(ot.attributes.extrudeDirection=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:E})),P&&(ot.attributes.applyOffset=new q({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:Z}));let it=yt.createTypedArray(gt,dt*6),mt,_t,kt,bt;s=C.length/3;let ct=0;for(o=0;o<s-1;o+=2){mt=o,bt=(mt+2)%s;let R=_.fromArray(C,mt*3,Ct),at=_.fromArray(C,bt*3,jt);_.equalsEpsilon(R,at,W.EPSILON10)||(_t=(mt+1)%s,kt=(_t+2)%s,it[ct++]=mt,it[ct++]=_t,it[ct++]=bt,it[ct++]=bt,it[ct++]=_t,it[ct++]=kt)}return ot.indices=it,ot=zt.combineInstances([new Nt({geometry:i}),new Nt({geometry:ot})]),ot[0]}var ne=[new _,new _,new _,new _],Wt=new wt,oe=new wt;function Ht(t,e,n,r,a){if(n===0)return S.clone(t,a);let c=J.computeOptions(t,e,n,0,qt,Wt),l=c.height,u=c.width,p=ne;return J.computePosition(c,r,!1,0,0,p[0]),J.computePosition(c,r,!1,0,u-1,p[1]),J.computePosition(c,r,!1,l-1,0,p[2]),J.computePosition(c,r,!1,l-1,u-1,p[3]),S.fromCartesianArray(p,r,a)}function Q(t){t=L(t,L.EMPTY_OBJECT);let e=t.rectangle;if(lt.typeOf.object("rectangle",e),S.validate(e),e.north<e.south)throw new Et("options.rectangle.north must be greater than or equal to options.rectangle.south");let n=L(t.height,0),r=L(t.extrudedHeight,n);this._rectangle=S.clone(e),this._granularity=L(t.granularity,W.RADIANS_PER_DEGREE),this._ellipsoid=H.clone(L(t.ellipsoid,H.WGS84)),this._surfaceHeight=Math.max(n,r),this._rotation=L(t.rotation,0),this._stRotation=L(t.stRotation,0),this._vertexFormat=X.clone(L(t.vertexFormat,X.DEFAULT)),this._extrudedHeight=Math.min(n,r),this._shadowVolume=L(t.shadowVolume,!1),this._workerName="createRectangleGeometry",this._offsetAttribute=t.offsetAttribute,this._rotatedRectangle=void 0,this._textureCoordinateRotationPoints=void 0}Q.packedLength=S.packedLength+H.packedLength+X.packedLength+7;Q.pack=function(t,e,n){return lt.typeOf.object("value",t),lt.defined("array",e),n=L(n,0),S.pack(t._rectangle,e,n),n+=S.packedLength,H.pack(t._ellipsoid,e,n),n+=H.packedLength,X.pack(t._vertexFormat,e,n),n+=X.packedLength,e[n++]=t._granularity,e[n++]=t._surfaceHeight,e[n++]=t._rotation,e[n++]=t._stRotation,e[n++]=t._extrudedHeight,e[n++]=t._shadowVolume?1:0,e[n]=L(t._offsetAttribute,-1),e};var Jt=new S,Qt=H.clone(H.UNIT_SPHERE),tt={rectangle:Jt,ellipsoid:Qt,vertexFormat:Dt,granularity:void 0,height:void 0,rotation:void 0,stRotation:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};Q.unpack=function(t,e,n){lt.defined("array",t),e=L(e,0);let r=S.unpack(t,e,Jt);e+=S.packedLength;let a=H.unpack(t,e,Qt);e+=H.packedLength;let c=X.unpack(t,e,Dt);e+=X.packedLength;let l=t[e++],u=t[e++],p=t[e++],d=t[e++],o=t[e++],i=t[e++]===1,f=t[e];return $(n)?(n._rectangle=S.clone(r,n._rectangle),n._ellipsoid=H.clone(a,n._ellipsoid),n._vertexFormat=X.clone(c,n._vertexFormat),n._granularity=l,n._surfaceHeight=u,n._rotation=p,n._stRotation=d,n._extrudedHeight=o,n._shadowVolume=i,n._offsetAttribute=f===-1?void 0:f,n):(tt.granularity=l,tt.height=u,tt.rotation=p,tt.stRotation=d,tt.extrudedHeight=o,tt.shadowVolume=i,tt.offsetAttribute=f===-1?void 0:f,new Q(tt))};Q.computeRectangle=function(t,e){t=L(t,L.EMPTY_OBJECT);let n=t.rectangle;if(lt.typeOf.object("rectangle",n),S.validate(n),n.north<n.south)throw new Et("options.rectangle.north must be greater than or equal to options.rectangle.south");let r=L(t.granularity,W.RADIANS_PER_DEGREE),a=L(t.ellipsoid,H.WGS84),c=L(t.rotation,0);return Ht(n,r,c,a,e)};var ie=new ft,Ft=new Lt,ae=new wt;Q.createGeometry=function(t){if(W.equalsEpsilon(t._rectangle.north,t._rectangle.south,W.EPSILON10)||W.equalsEpsilon(t._rectangle.east,t._rectangle.west,W.EPSILON10))return;let e=t._rectangle,n=t._ellipsoid,r=t._rotation,a=t._stRotation,c=t._vertexFormat,l=J.computeOptions(e,t._granularity,r,a,qt,Wt,oe),u=ie;if(a!==0||r!==0){let s=S.center(e,ae),h=n.geodeticSurfaceNormalCartographic(s,Ct);Lt.fromAxisAngle(h,-a,Ft),ft.fromQuaternion(Ft,u)}else ft.clone(ft.IDENTITY,u);let p=t._surfaceHeight,d=t._extrudedHeight,o=!W.equalsEpsilon(p,d,0,W.EPSILON2);l.lonScalar=1/t._rectangle.width,l.latScalar=1/t._rectangle.height,l.tangentRotationMatrix=u;let i,f;if(e=t._rectangle,o){i=ee(t,l);let s=st.fromRectangle3D(e,n,p,$t),h=st.fromRectangle3D(e,n,d,Kt);f=st.union(s,h)}else{if(i=It(t,l),i.attributes.position.values=Rt.scaleToGeodeticHeight(i.attributes.position.values,p,n,!1),$(t._offsetAttribute)){let s=i.attributes.position.values.length,h=t._offsetAttribute===ut.NONE?0:1,g=new Uint8Array(s/3).fill(h);i.attributes.applyOffset=new q({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:g})}f=st.fromRectangle3D(e,n,p)}return c.position||delete i.attributes.position,new Pt({attributes:i.attributes,indices:i.indices,primitiveType:i.primitiveType,boundingSphere:f,offsetAttribute:t._offsetAttribute})};Q.createShadowVolume=function(t,e,n){let r=t._granularity,a=t._ellipsoid,c=e(r,a),l=n(r,a);return new Q({rectangle:t._rectangle,rotation:t._rotation,ellipsoid:a,stRotation:t._stRotation,granularity:r,extrudedHeight:l,height:c,vertexFormat:X.POSITION_ONLY,shadowVolume:!0})};var vt=new S,se=[new G,new G,new G],re=new At,ce=new wt;function le(t){if(t._stRotation===0)return[0,0,0,1,1,0];let e=S.clone(t._rectangle,vt),n=t._granularity,r=t._ellipsoid,a=t._rotation-t._stRotation,c=Ht(e,n,a,r,vt),l=se;l[0].x=c.west,l[0].y=c.south,l[1].x=c.west,l[1].y=c.north,l[2].x=c.east,l[2].y=c.south;let u=t.rectangle,p=At.fromRotation(t._stRotation,re),d=S.center(u,ce);for(let h=0;h<3;++h){let g=l[h];g.x-=d.longitude,g.y-=d.latitude,At.multiplyByVector(p,g,g),g.x+=d.longitude,g.y+=d.latitude,g.x=(g.x-u.west)/u.width,g.y=(g.y-u.south)/u.height}let o=l[0],i=l[1],f=l[2],s=new Array(6);return G.pack(o,s),G.pack(i,s,2),G.pack(f,s,4),s}Object.defineProperties(Q.prototype,{rectangle:{get:function(){return $(this._rotatedRectangle)||(this._rotatedRectangle=Ht(this._rectangle,this._granularity,this._rotation,this._ellipsoid)),this._rotatedRectangle}},textureCoordinateRotationPoints:{get:function(){return $(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=le(this)),this._textureCoordinateRotationPoints}}});var Ot=Q;function fe(t,e){return $(e)&&(t=Ot.unpack(t,e)),t._ellipsoid=H.clone(t._ellipsoid),t._rectangle=S.clone(t._rectangle),Ot.createGeometry(t)}var Ye=fe;export{Ye as default}; |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.116 | ||
* Version 1.116.1 | ||
* | ||
@@ -26,2 +26,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
import{a as C}from"./chunk-I24DPSBO.js";import{a as v}from"./chunk-TXIAMGDC.js";import{b as z}from"./chunk-4NVG6N2Q.js";import"./chunk-2DF4CAYN.js";import{a as O}from"./chunk-TWAPNO4J.js";import{a as Y}from"./chunk-FSXLPWHR.js";import{b as B,c as q,d as y}from"./chunk-37KLWU3W.js";import{d as R}from"./chunk-HTNJJ6YO.js";import"./chunk-63E276CT.js";import"./chunk-NRW2R4YV.js";import{c as b}from"./chunk-NSILPUHD.js";import{a as T}from"./chunk-M7WODBAD.js";import{a as U,b as M,d as w}from"./chunk-J26GWQSN.js";import{a as P}from"./chunk-PYB3IV2X.js";import"./chunk-H7FFK4U5.js";import"./chunk-YEUII2A5.js";import{a as E}from"./chunk-4353PD6R.js";import{a as N}from"./chunk-2S4UUFD6.js";import{e as S}from"./chunk-42VHSORI.js";var W=new R,j=new R,K=new U,Q=new b;function F(t,e){let i=t._ellipsoid,m=e.height,s=e.width,h=e.northCap,p=e.southCap,_=m,A=2,o=0,g=4;h&&(A-=1,_-=1,o+=1,g-=2),p&&(A-=1,_-=1,o+=1,g-=2),o+=A*s+2*_-g;let n=new Float64Array(o*3),l=0,f=0,a,r=K;if(h)C.computePosition(e,i,!1,f,0,r),n[l++]=r.x,n[l++]=r.y,n[l++]=r.z;else for(a=0;a<s;a++)C.computePosition(e,i,!1,f,a,r),n[l++]=r.x,n[l++]=r.y,n[l++]=r.z;for(a=s-1,f=1;f<m;f++)C.computePosition(e,i,!1,f,a,r),n[l++]=r.x,n[l++]=r.y,n[l++]=r.z;if(f=m-1,!p)for(a=s-2;a>=0;a--)C.computePosition(e,i,!1,f,a,r),n[l++]=r.x,n[l++]=r.y,n[l++]=r.z;for(a=0,f=m-2;f>0;f--)C.computePosition(e,i,!1,f,a,r),n[l++]=r.x,n[l++]=r.y,n[l++]=r.z;let u=n.length/3*2,c=O.createTypedArray(n.length/3,u),H=0;for(let D=0;D<n.length/3-1;D++)c[H++]=D,c[H++]=D+1;c[H++]=n.length/3-1,c[H++]=0;let d=new q({attributes:new Y,primitiveType:B.LINES});return d.attributes.position=new y({componentDatatype:T.DOUBLE,componentsPerAttribute:3,values:n}),d.indices=c,d}function X(t,e){let i=t._surfaceHeight,m=t._extrudedHeight,s=t._ellipsoid,h=F(t,e),p=e.height,_=e.width,A=z.scaleToGeodeticHeight(h.attributes.position.values,i,s,!1),o=A.length,g=new Float64Array(o*2);g.set(A);let n=z.scaleToGeodeticHeight(h.attributes.position.values,m,s);g.set(n,o),h.attributes.position.values=g;let l=e.northCap,f=e.southCap,a=4;l&&(a-=1),f&&(a-=1);let r=(g.length/3+a)*2,u=O.createTypedArray(g.length/3,r);o=g.length/6;let c=0;for(let d=0;d<o-1;d++)u[c++]=d,u[c++]=d+1,u[c++]=d+o,u[c++]=d+o+1;u[c++]=o-1,u[c++]=0,u[c++]=o+o-1,u[c++]=o,u[c++]=0,u[c++]=o;let H;if(l)H=p-1;else{let d=_-1;u[c++]=d,u[c++]=d+o,H=_+p-2}if(u[c++]=H,u[c++]=H+o,!f){let d=_+H-1;u[c++]=d,u[c]=d+o}return h.indices=u,h}function L(t){t=E(t,E.EMPTY_OBJECT);let e=t.rectangle,i=E(t.granularity,P.RADIANS_PER_DEGREE),m=E(t.ellipsoid,w.WGS84),s=E(t.rotation,0);if(!S(e))throw new N("rectangle is required.");if(b.validate(e),e.north<e.south)throw new N("options.rectangle.north must be greater than options.rectangle.south");let h=E(t.height,0),p=E(t.extrudedHeight,h);this._rectangle=b.clone(e),this._granularity=i,this._ellipsoid=m,this._surfaceHeight=Math.max(h,p),this._rotation=s,this._extrudedHeight=Math.min(h,p),this._offsetAttribute=t.offsetAttribute,this._workerName="createRectangleOutlineGeometry"}L.packedLength=b.packedLength+w.packedLength+5;L.pack=function(t,e,i){if(!S(t))throw new N("value is required");if(!S(e))throw new N("array is required");return i=E(i,0),b.pack(t._rectangle,e,i),i+=b.packedLength,w.pack(t._ellipsoid,e,i),i+=w.packedLength,e[i++]=t._granularity,e[i++]=t._surfaceHeight,e[i++]=t._rotation,e[i++]=t._extrudedHeight,e[i]=E(t._offsetAttribute,-1),e};var V=new b,J=w.clone(w.UNIT_SPHERE),k={rectangle:V,ellipsoid:J,granularity:void 0,height:void 0,rotation:void 0,extrudedHeight:void 0,offsetAttribute:void 0};L.unpack=function(t,e,i){if(!S(t))throw new N("array is required");e=E(e,0);let m=b.unpack(t,e,V);e+=b.packedLength;let s=w.unpack(t,e,J);e+=w.packedLength;let h=t[e++],p=t[e++],_=t[e++],A=t[e++],o=t[e];return S(i)?(i._rectangle=b.clone(m,i._rectangle),i._ellipsoid=w.clone(s,i._ellipsoid),i._surfaceHeight=p,i._rotation=_,i._extrudedHeight=A,i._offsetAttribute=o===-1?void 0:o,i):(k.granularity=h,k.height=p,k.rotation=_,k.extrudedHeight=A,k.offsetAttribute=o===-1?void 0:o,new L(k))};var Z=new M;L.createGeometry=function(t){let e=t._rectangle,i=t._ellipsoid,m=C.computeOptions(e,t._granularity,t._rotation,0,Q,Z),s,h;if(P.equalsEpsilon(e.north,e.south,P.EPSILON10)||P.equalsEpsilon(e.east,e.west,P.EPSILON10))return;let p=t._surfaceHeight,_=t._extrudedHeight,A=!P.equalsEpsilon(p,_,0,P.EPSILON2),o;if(A){if(s=X(t,m),S(t._offsetAttribute)){let l=s.attributes.position.values.length/3,f=new Uint8Array(l);t._offsetAttribute===v.TOP?f=f.fill(1,0,l/2):(o=t._offsetAttribute===v.NONE?0:1,f=f.fill(o)),s.attributes.applyOffset=new y({componentDatatype:T.UNSIGNED_BYTE,componentsPerAttribute:1,values:f})}let g=R.fromRectangle3D(e,i,p,j),n=R.fromRectangle3D(e,i,_,W);h=R.union(g,n)}else{if(s=F(t,m),s.attributes.position.values=z.scaleToGeodeticHeight(s.attributes.position.values,p,i,!1),S(t._offsetAttribute)){let g=s.attributes.position.values.length;o=t._offsetAttribute===v.NONE?0:1;let n=new Uint8Array(g/3).fill(o);s.attributes.applyOffset=new y({componentDatatype:T.UNSIGNED_BYTE,componentsPerAttribute:1,values:n})}h=R.fromRectangle3D(e,i,p)}return new q({attributes:s.attributes,indices:s.indices,primitiveType:B.LINES,boundingSphere:h,offsetAttribute:t._offsetAttribute})};var x=L;function $(t,e){return S(e)&&(t=x.unpack(t,e)),t._ellipsoid=w.clone(t._ellipsoid),t._rectangle=b.clone(t._rectangle),x.createGeometry(t)}var Et=$;export{Et as default}; | ||
import{a as C}from"./chunk-QTP5CMGP.js";import{a as v}from"./chunk-XJCFZEZW.js";import{b as z}from"./chunk-ZK4DC2CW.js";import"./chunk-LH3GDPJ4.js";import{a as O}from"./chunk-ROROM35N.js";import{a as Y}from"./chunk-F5TB5EI7.js";import{b as B,c as q,d as y}from"./chunk-VAPKZ5PR.js";import{d as R}from"./chunk-DXGEUDM7.js";import"./chunk-5IUHFVP3.js";import"./chunk-OE3P25NW.js";import{c as b}from"./chunk-HIT4T4MS.js";import{a as T}from"./chunk-3KRBUMEX.js";import{a as U,b as M,d as w}from"./chunk-PQ6NV4GA.js";import{a as P}from"./chunk-74I3QBVP.js";import"./chunk-BLVYEJBC.js";import"./chunk-A6PYE4JS.js";import{a as E}from"./chunk-T23IKWCM.js";import{a as N}from"./chunk-HJ33TVGP.js";import{e as S}from"./chunk-WL4PTXMO.js";var W=new R,j=new R,K=new U,Q=new b;function F(t,e){let i=t._ellipsoid,m=e.height,s=e.width,h=e.northCap,p=e.southCap,_=m,A=2,o=0,g=4;h&&(A-=1,_-=1,o+=1,g-=2),p&&(A-=1,_-=1,o+=1,g-=2),o+=A*s+2*_-g;let n=new Float64Array(o*3),l=0,f=0,a,r=K;if(h)C.computePosition(e,i,!1,f,0,r),n[l++]=r.x,n[l++]=r.y,n[l++]=r.z;else for(a=0;a<s;a++)C.computePosition(e,i,!1,f,a,r),n[l++]=r.x,n[l++]=r.y,n[l++]=r.z;for(a=s-1,f=1;f<m;f++)C.computePosition(e,i,!1,f,a,r),n[l++]=r.x,n[l++]=r.y,n[l++]=r.z;if(f=m-1,!p)for(a=s-2;a>=0;a--)C.computePosition(e,i,!1,f,a,r),n[l++]=r.x,n[l++]=r.y,n[l++]=r.z;for(a=0,f=m-2;f>0;f--)C.computePosition(e,i,!1,f,a,r),n[l++]=r.x,n[l++]=r.y,n[l++]=r.z;let u=n.length/3*2,c=O.createTypedArray(n.length/3,u),H=0;for(let D=0;D<n.length/3-1;D++)c[H++]=D,c[H++]=D+1;c[H++]=n.length/3-1,c[H++]=0;let d=new q({attributes:new Y,primitiveType:B.LINES});return d.attributes.position=new y({componentDatatype:T.DOUBLE,componentsPerAttribute:3,values:n}),d.indices=c,d}function X(t,e){let i=t._surfaceHeight,m=t._extrudedHeight,s=t._ellipsoid,h=F(t,e),p=e.height,_=e.width,A=z.scaleToGeodeticHeight(h.attributes.position.values,i,s,!1),o=A.length,g=new Float64Array(o*2);g.set(A);let n=z.scaleToGeodeticHeight(h.attributes.position.values,m,s);g.set(n,o),h.attributes.position.values=g;let l=e.northCap,f=e.southCap,a=4;l&&(a-=1),f&&(a-=1);let r=(g.length/3+a)*2,u=O.createTypedArray(g.length/3,r);o=g.length/6;let c=0;for(let d=0;d<o-1;d++)u[c++]=d,u[c++]=d+1,u[c++]=d+o,u[c++]=d+o+1;u[c++]=o-1,u[c++]=0,u[c++]=o+o-1,u[c++]=o,u[c++]=0,u[c++]=o;let H;if(l)H=p-1;else{let d=_-1;u[c++]=d,u[c++]=d+o,H=_+p-2}if(u[c++]=H,u[c++]=H+o,!f){let d=_+H-1;u[c++]=d,u[c]=d+o}return h.indices=u,h}function L(t){t=E(t,E.EMPTY_OBJECT);let e=t.rectangle,i=E(t.granularity,P.RADIANS_PER_DEGREE),m=E(t.ellipsoid,w.WGS84),s=E(t.rotation,0);if(!S(e))throw new N("rectangle is required.");if(b.validate(e),e.north<e.south)throw new N("options.rectangle.north must be greater than options.rectangle.south");let h=E(t.height,0),p=E(t.extrudedHeight,h);this._rectangle=b.clone(e),this._granularity=i,this._ellipsoid=m,this._surfaceHeight=Math.max(h,p),this._rotation=s,this._extrudedHeight=Math.min(h,p),this._offsetAttribute=t.offsetAttribute,this._workerName="createRectangleOutlineGeometry"}L.packedLength=b.packedLength+w.packedLength+5;L.pack=function(t,e,i){if(!S(t))throw new N("value is required");if(!S(e))throw new N("array is required");return i=E(i,0),b.pack(t._rectangle,e,i),i+=b.packedLength,w.pack(t._ellipsoid,e,i),i+=w.packedLength,e[i++]=t._granularity,e[i++]=t._surfaceHeight,e[i++]=t._rotation,e[i++]=t._extrudedHeight,e[i]=E(t._offsetAttribute,-1),e};var V=new b,J=w.clone(w.UNIT_SPHERE),k={rectangle:V,ellipsoid:J,granularity:void 0,height:void 0,rotation:void 0,extrudedHeight:void 0,offsetAttribute:void 0};L.unpack=function(t,e,i){if(!S(t))throw new N("array is required");e=E(e,0);let m=b.unpack(t,e,V);e+=b.packedLength;let s=w.unpack(t,e,J);e+=w.packedLength;let h=t[e++],p=t[e++],_=t[e++],A=t[e++],o=t[e];return S(i)?(i._rectangle=b.clone(m,i._rectangle),i._ellipsoid=w.clone(s,i._ellipsoid),i._surfaceHeight=p,i._rotation=_,i._extrudedHeight=A,i._offsetAttribute=o===-1?void 0:o,i):(k.granularity=h,k.height=p,k.rotation=_,k.extrudedHeight=A,k.offsetAttribute=o===-1?void 0:o,new L(k))};var Z=new M;L.createGeometry=function(t){let e=t._rectangle,i=t._ellipsoid,m=C.computeOptions(e,t._granularity,t._rotation,0,Q,Z),s,h;if(P.equalsEpsilon(e.north,e.south,P.EPSILON10)||P.equalsEpsilon(e.east,e.west,P.EPSILON10))return;let p=t._surfaceHeight,_=t._extrudedHeight,A=!P.equalsEpsilon(p,_,0,P.EPSILON2),o;if(A){if(s=X(t,m),S(t._offsetAttribute)){let l=s.attributes.position.values.length/3,f=new Uint8Array(l);t._offsetAttribute===v.TOP?f=f.fill(1,0,l/2):(o=t._offsetAttribute===v.NONE?0:1,f=f.fill(o)),s.attributes.applyOffset=new y({componentDatatype:T.UNSIGNED_BYTE,componentsPerAttribute:1,values:f})}let g=R.fromRectangle3D(e,i,p,j),n=R.fromRectangle3D(e,i,_,W);h=R.union(g,n)}else{if(s=F(t,m),s.attributes.position.values=z.scaleToGeodeticHeight(s.attributes.position.values,p,i,!1),S(t._offsetAttribute)){let g=s.attributes.position.values.length;o=t._offsetAttribute===v.NONE?0:1;let n=new Uint8Array(g/3).fill(o);s.attributes.applyOffset=new y({componentDatatype:T.UNSIGNED_BYTE,componentsPerAttribute:1,values:n})}h=R.fromRectangle3D(e,i,p)}return new q({attributes:s.attributes,indices:s.indices,primitiveType:B.LINES,boundingSphere:h,offsetAttribute:t._offsetAttribute})};var x=L;function $(t,e){return S(e)&&(t=x.unpack(t,e)),t._ellipsoid=w.clone(t._ellipsoid),t._rectangle=b.clone(t._rectangle),x.createGeometry(t)}var Et=$;export{Et as default}; |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.116 | ||
* Version 1.116.1 | ||
* | ||
@@ -26,2 +26,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
import{a as r}from"./chunk-ZK2UTPA3.js";import{a as L}from"./chunk-7VY24AS3.js";import{a as E}from"./chunk-2QAZKO32.js";import"./chunk-M5A47EM2.js";import"./chunk-2DF4CAYN.js";import"./chunk-LGFQRF3V.js";import"./chunk-AHZBRYZA.js";import{a as X}from"./chunk-TWAPNO4J.js";import{a as Q}from"./chunk-FSXLPWHR.js";import{b as j,c as K,d as Y}from"./chunk-37KLWU3W.js";import{d as W}from"./chunk-HTNJJ6YO.js";import"./chunk-63E276CT.js";import"./chunk-NRW2R4YV.js";import"./chunk-NSILPUHD.js";import{a as H}from"./chunk-M7WODBAD.js";import{a as k,d as b}from"./chunk-J26GWQSN.js";import{a as q}from"./chunk-PYB3IV2X.js";import"./chunk-H7FFK4U5.js";import"./chunk-YEUII2A5.js";import{a as w}from"./chunk-4353PD6R.js";import{a as D}from"./chunk-2S4UUFD6.js";import{e as u}from"./chunk-42VHSORI.js";function Z(t,e,o,i,s,c,p){let g=E.numberOfPoints(t,e,s),f,n=o.red,m=o.green,d=o.blue,T=o.alpha,l=i.red,h=i.green,y=i.blue,V=i.alpha;if(r.equals(o,i)){for(f=0;f<g;f++)c[p++]=r.floatToByte(n),c[p++]=r.floatToByte(m),c[p++]=r.floatToByte(d),c[p++]=r.floatToByte(T);return p}let M=(l-n)/g,C=(h-m)/g,G=(y-d)/g,_=(V-T)/g,a=p;for(f=0;f<g;f++)c[a++]=r.floatToByte(n+f*M),c[a++]=r.floatToByte(m+f*C),c[a++]=r.floatToByte(d+f*G),c[a++]=r.floatToByte(T+f*_);return a}function R(t){t=w(t,w.EMPTY_OBJECT);let e=t.positions,o=t.colors,i=w(t.colorsPerVertex,!1);if(!u(e)||e.length<2)throw new D("At least two positions are required.");if(u(o)&&(i&&o.length<e.length||!i&&o.length<e.length-1))throw new D("colors has an invalid length.");this._positions=e,this._colors=o,this._colorsPerVertex=i,this._arcType=w(t.arcType,L.GEODESIC),this._granularity=w(t.granularity,q.RADIANS_PER_DEGREE),this._ellipsoid=w(t.ellipsoid,b.WGS84),this._workerName="createSimplePolylineGeometry";let s=1+e.length*k.packedLength;s+=u(o)?1+o.length*r.packedLength:1,this.packedLength=s+b.packedLength+3}R.pack=function(t,e,o){if(!u(t))throw new D("value is required");if(!u(e))throw new D("array is required");o=w(o,0);let i,s=t._positions,c=s.length;for(e[o++]=c,i=0;i<c;++i,o+=k.packedLength)k.pack(s[i],e,o);let p=t._colors;for(c=u(p)?p.length:0,e[o++]=c,i=0;i<c;++i,o+=r.packedLength)r.pack(p[i],e,o);return b.pack(t._ellipsoid,e,o),o+=b.packedLength,e[o++]=t._colorsPerVertex?1:0,e[o++]=t._arcType,e[o]=t._granularity,e};R.unpack=function(t,e,o){if(!u(t))throw new D("array is required");e=w(e,0);let i,s=t[e++],c=new Array(s);for(i=0;i<s;++i,e+=k.packedLength)c[i]=k.unpack(t,e);s=t[e++];let p=s>0?new Array(s):void 0;for(i=0;i<s;++i,e+=r.packedLength)p[i]=r.unpack(t,e);let g=b.unpack(t,e);e+=b.packedLength;let f=t[e++]===1,n=t[e++],m=t[e];return u(o)?(o._positions=c,o._colors=p,o._ellipsoid=g,o._colorsPerVertex=f,o._arcType=n,o._granularity=m,o):new R({positions:c,colors:p,ellipsoid:g,colorsPerVertex:f,arcType:n,granularity:m})};var F=new Array(2),N=new Array(2),$={positions:F,height:N,ellipsoid:void 0,minDistance:void 0,granularity:void 0};R.createGeometry=function(t){let e=t._positions,o=t._colors,i=t._colorsPerVertex,s=t._arcType,c=t._granularity,p=t._ellipsoid,g=q.chordLength(c,p.maximumRadius),f=u(o)&&!i,n,m=e.length,d,T,l,h,y=0;if(s===L.GEODESIC||s===L.RHUMB){let _,a,P;s===L.GEODESIC?(_=q.chordLength(c,p.maximumRadius),a=E.numberOfPoints,P=E.generateArc):(_=c,a=E.numberOfPointsRhumbLine,P=E.generateRhumbArc);let v=E.extractHeights(e,p),B=$;if(s===L.GEODESIC?B.minDistance=g:B.granularity=c,B.ellipsoid=p,f){let A=0;for(n=0;n<m-1;n++)A+=a(e[n],e[n+1],_)+1;d=new Float64Array(A*3),l=new Uint8Array(A*4),B.positions=F,B.height=N;let S=0;for(n=0;n<m-1;++n){F[0]=e[n],F[1]=e[n+1],N[0]=v[n],N[1]=v[n+1];let O=P(B);if(u(o)){let z=O.length/3;h=o[n];for(let U=0;U<z;++U)l[S++]=r.floatToByte(h.red),l[S++]=r.floatToByte(h.green),l[S++]=r.floatToByte(h.blue),l[S++]=r.floatToByte(h.alpha)}d.set(O,y),y+=O.length}}else if(B.positions=e,B.height=v,d=new Float64Array(P(B)),u(o)){for(l=new Uint8Array(d.length/3*4),n=0;n<m-1;++n){let S=e[n],O=e[n+1],z=o[n],U=o[n+1];y=Z(S,O,z,U,g,l,y)}let A=o[m-1];l[y++]=r.floatToByte(A.red),l[y++]=r.floatToByte(A.green),l[y++]=r.floatToByte(A.blue),l[y++]=r.floatToByte(A.alpha)}}else{T=f?m*2-2:m,d=new Float64Array(T*3),l=u(o)?new Uint8Array(T*4):void 0;let _=0,a=0;for(n=0;n<m;++n){let P=e[n];if(f&&n>0&&(k.pack(P,d,_),_+=3,h=o[n-1],l[a++]=r.floatToByte(h.red),l[a++]=r.floatToByte(h.green),l[a++]=r.floatToByte(h.blue),l[a++]=r.floatToByte(h.alpha)),f&&n===m-1)break;k.pack(P,d,_),_+=3,u(o)&&(h=o[n],l[a++]=r.floatToByte(h.red),l[a++]=r.floatToByte(h.green),l[a++]=r.floatToByte(h.blue),l[a++]=r.floatToByte(h.alpha))}}let V=new Q;V.position=new Y({componentDatatype:H.DOUBLE,componentsPerAttribute:3,values:d}),u(o)&&(V.color=new Y({componentDatatype:H.UNSIGNED_BYTE,componentsPerAttribute:4,values:l,normalize:!0})),T=d.length/3;let M=(T-1)*2,C=X.createTypedArray(T,M),G=0;for(n=0;n<T-1;++n)C[G++]=n,C[G++]=n+1;return new K({attributes:V,indices:C,primitiveType:j.LINES,boundingSphere:W.fromPoints(e)})};var J=R;function x(t,e){return u(e)&&(t=J.unpack(t,e)),t._ellipsoid=b.clone(t._ellipsoid),J.createGeometry(t)}var _e=x;export{_e as default}; | ||
import{a as r}from"./chunk-I7F5J7U6.js";import{a as L}from"./chunk-VAZSO7QM.js";import{a as E}from"./chunk-IZNUAC5V.js";import"./chunk-3CPQXNZI.js";import"./chunk-LH3GDPJ4.js";import"./chunk-QC62DG5W.js";import"./chunk-R6IH5WM5.js";import{a as X}from"./chunk-ROROM35N.js";import{a as Q}from"./chunk-F5TB5EI7.js";import{b as j,c as K,d as Y}from"./chunk-VAPKZ5PR.js";import{d as W}from"./chunk-DXGEUDM7.js";import"./chunk-5IUHFVP3.js";import"./chunk-OE3P25NW.js";import"./chunk-HIT4T4MS.js";import{a as H}from"./chunk-3KRBUMEX.js";import{a as k,d as b}from"./chunk-PQ6NV4GA.js";import{a as q}from"./chunk-74I3QBVP.js";import"./chunk-BLVYEJBC.js";import"./chunk-A6PYE4JS.js";import{a as w}from"./chunk-T23IKWCM.js";import{a as D}from"./chunk-HJ33TVGP.js";import{e as u}from"./chunk-WL4PTXMO.js";function Z(t,e,o,i,s,c,p){let g=E.numberOfPoints(t,e,s),f,n=o.red,m=o.green,d=o.blue,T=o.alpha,l=i.red,h=i.green,y=i.blue,V=i.alpha;if(r.equals(o,i)){for(f=0;f<g;f++)c[p++]=r.floatToByte(n),c[p++]=r.floatToByte(m),c[p++]=r.floatToByte(d),c[p++]=r.floatToByte(T);return p}let M=(l-n)/g,C=(h-m)/g,G=(y-d)/g,_=(V-T)/g,a=p;for(f=0;f<g;f++)c[a++]=r.floatToByte(n+f*M),c[a++]=r.floatToByte(m+f*C),c[a++]=r.floatToByte(d+f*G),c[a++]=r.floatToByte(T+f*_);return a}function R(t){t=w(t,w.EMPTY_OBJECT);let e=t.positions,o=t.colors,i=w(t.colorsPerVertex,!1);if(!u(e)||e.length<2)throw new D("At least two positions are required.");if(u(o)&&(i&&o.length<e.length||!i&&o.length<e.length-1))throw new D("colors has an invalid length.");this._positions=e,this._colors=o,this._colorsPerVertex=i,this._arcType=w(t.arcType,L.GEODESIC),this._granularity=w(t.granularity,q.RADIANS_PER_DEGREE),this._ellipsoid=w(t.ellipsoid,b.WGS84),this._workerName="createSimplePolylineGeometry";let s=1+e.length*k.packedLength;s+=u(o)?1+o.length*r.packedLength:1,this.packedLength=s+b.packedLength+3}R.pack=function(t,e,o){if(!u(t))throw new D("value is required");if(!u(e))throw new D("array is required");o=w(o,0);let i,s=t._positions,c=s.length;for(e[o++]=c,i=0;i<c;++i,o+=k.packedLength)k.pack(s[i],e,o);let p=t._colors;for(c=u(p)?p.length:0,e[o++]=c,i=0;i<c;++i,o+=r.packedLength)r.pack(p[i],e,o);return b.pack(t._ellipsoid,e,o),o+=b.packedLength,e[o++]=t._colorsPerVertex?1:0,e[o++]=t._arcType,e[o]=t._granularity,e};R.unpack=function(t,e,o){if(!u(t))throw new D("array is required");e=w(e,0);let i,s=t[e++],c=new Array(s);for(i=0;i<s;++i,e+=k.packedLength)c[i]=k.unpack(t,e);s=t[e++];let p=s>0?new Array(s):void 0;for(i=0;i<s;++i,e+=r.packedLength)p[i]=r.unpack(t,e);let g=b.unpack(t,e);e+=b.packedLength;let f=t[e++]===1,n=t[e++],m=t[e];return u(o)?(o._positions=c,o._colors=p,o._ellipsoid=g,o._colorsPerVertex=f,o._arcType=n,o._granularity=m,o):new R({positions:c,colors:p,ellipsoid:g,colorsPerVertex:f,arcType:n,granularity:m})};var F=new Array(2),N=new Array(2),$={positions:F,height:N,ellipsoid:void 0,minDistance:void 0,granularity:void 0};R.createGeometry=function(t){let e=t._positions,o=t._colors,i=t._colorsPerVertex,s=t._arcType,c=t._granularity,p=t._ellipsoid,g=q.chordLength(c,p.maximumRadius),f=u(o)&&!i,n,m=e.length,d,T,l,h,y=0;if(s===L.GEODESIC||s===L.RHUMB){let _,a,P;s===L.GEODESIC?(_=q.chordLength(c,p.maximumRadius),a=E.numberOfPoints,P=E.generateArc):(_=c,a=E.numberOfPointsRhumbLine,P=E.generateRhumbArc);let v=E.extractHeights(e,p),B=$;if(s===L.GEODESIC?B.minDistance=g:B.granularity=c,B.ellipsoid=p,f){let A=0;for(n=0;n<m-1;n++)A+=a(e[n],e[n+1],_)+1;d=new Float64Array(A*3),l=new Uint8Array(A*4),B.positions=F,B.height=N;let S=0;for(n=0;n<m-1;++n){F[0]=e[n],F[1]=e[n+1],N[0]=v[n],N[1]=v[n+1];let O=P(B);if(u(o)){let z=O.length/3;h=o[n];for(let U=0;U<z;++U)l[S++]=r.floatToByte(h.red),l[S++]=r.floatToByte(h.green),l[S++]=r.floatToByte(h.blue),l[S++]=r.floatToByte(h.alpha)}d.set(O,y),y+=O.length}}else if(B.positions=e,B.height=v,d=new Float64Array(P(B)),u(o)){for(l=new Uint8Array(d.length/3*4),n=0;n<m-1;++n){let S=e[n],O=e[n+1],z=o[n],U=o[n+1];y=Z(S,O,z,U,g,l,y)}let A=o[m-1];l[y++]=r.floatToByte(A.red),l[y++]=r.floatToByte(A.green),l[y++]=r.floatToByte(A.blue),l[y++]=r.floatToByte(A.alpha)}}else{T=f?m*2-2:m,d=new Float64Array(T*3),l=u(o)?new Uint8Array(T*4):void 0;let _=0,a=0;for(n=0;n<m;++n){let P=e[n];if(f&&n>0&&(k.pack(P,d,_),_+=3,h=o[n-1],l[a++]=r.floatToByte(h.red),l[a++]=r.floatToByte(h.green),l[a++]=r.floatToByte(h.blue),l[a++]=r.floatToByte(h.alpha)),f&&n===m-1)break;k.pack(P,d,_),_+=3,u(o)&&(h=o[n],l[a++]=r.floatToByte(h.red),l[a++]=r.floatToByte(h.green),l[a++]=r.floatToByte(h.blue),l[a++]=r.floatToByte(h.alpha))}}let V=new Q;V.position=new Y({componentDatatype:H.DOUBLE,componentsPerAttribute:3,values:d}),u(o)&&(V.color=new Y({componentDatatype:H.UNSIGNED_BYTE,componentsPerAttribute:4,values:l,normalize:!0})),T=d.length/3;let M=(T-1)*2,C=X.createTypedArray(T,M),G=0;for(n=0;n<T-1;++n)C[G++]=n,C[G++]=n+1;return new K({attributes:V,indices:C,primitiveType:j.LINES,boundingSphere:W.fromPoints(e)})};var J=R;function x(t,e){return u(e)&&(t=J.unpack(t,e)),t._ellipsoid=b.clone(t._ellipsoid),J.createGeometry(t)}var _e=x;export{_e as default}; |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.116 | ||
* Version 1.116.1 | ||
* | ||
@@ -26,2 +26,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
import{a as r}from"./chunk-DTEVYUV6.js";import"./chunk-TXIAMGDC.js";import{a as m}from"./chunk-TK2AA6M2.js";import"./chunk-TWAPNO4J.js";import"./chunk-FSXLPWHR.js";import"./chunk-37KLWU3W.js";import"./chunk-HTNJJ6YO.js";import"./chunk-63E276CT.js";import"./chunk-NRW2R4YV.js";import"./chunk-NSILPUHD.js";import"./chunk-M7WODBAD.js";import{a as s}from"./chunk-J26GWQSN.js";import"./chunk-PYB3IV2X.js";import"./chunk-H7FFK4U5.js";import"./chunk-YEUII2A5.js";import{a as l}from"./chunk-4353PD6R.js";import{b as p}from"./chunk-2S4UUFD6.js";import{e as c}from"./chunk-42VHSORI.js";function n(e){let t=l(e.radius,1),o={radii:new s(t,t,t),stackPartitions:e.stackPartitions,slicePartitions:e.slicePartitions,vertexFormat:e.vertexFormat};this._ellipsoidGeometry=new r(o),this._workerName="createSphereGeometry"}n.packedLength=r.packedLength;n.pack=function(e,t,a){return p.typeOf.object("value",e),r.pack(e._ellipsoidGeometry,t,a)};var f=new r,i={radius:void 0,radii:new s,vertexFormat:new m,stackPartitions:void 0,slicePartitions:void 0};n.unpack=function(e,t,a){let o=r.unpack(e,t,f);return i.vertexFormat=m.clone(o._vertexFormat,i.vertexFormat),i.stackPartitions=o._stackPartitions,i.slicePartitions=o._slicePartitions,c(a)?(s.clone(o._radii,i.radii),a._ellipsoidGeometry=new r(i),a):(i.radius=o._radii.x,new n(i))};n.createGeometry=function(e){return r.createGeometry(e._ellipsoidGeometry)};var d=n;function u(e,t){return c(t)&&(e=d.unpack(e,t)),d.createGeometry(e)}var v=u;export{v as default}; | ||
import{a as r}from"./chunk-KOBAXN2X.js";import"./chunk-XJCFZEZW.js";import{a as m}from"./chunk-64WQCGAE.js";import"./chunk-ROROM35N.js";import"./chunk-F5TB5EI7.js";import"./chunk-VAPKZ5PR.js";import"./chunk-DXGEUDM7.js";import"./chunk-5IUHFVP3.js";import"./chunk-OE3P25NW.js";import"./chunk-HIT4T4MS.js";import"./chunk-3KRBUMEX.js";import{a as s}from"./chunk-PQ6NV4GA.js";import"./chunk-74I3QBVP.js";import"./chunk-BLVYEJBC.js";import"./chunk-A6PYE4JS.js";import{a as l}from"./chunk-T23IKWCM.js";import{b as p}from"./chunk-HJ33TVGP.js";import{e as c}from"./chunk-WL4PTXMO.js";function n(e){let t=l(e.radius,1),o={radii:new s(t,t,t),stackPartitions:e.stackPartitions,slicePartitions:e.slicePartitions,vertexFormat:e.vertexFormat};this._ellipsoidGeometry=new r(o),this._workerName="createSphereGeometry"}n.packedLength=r.packedLength;n.pack=function(e,t,a){return p.typeOf.object("value",e),r.pack(e._ellipsoidGeometry,t,a)};var f=new r,i={radius:void 0,radii:new s,vertexFormat:new m,stackPartitions:void 0,slicePartitions:void 0};n.unpack=function(e,t,a){let o=r.unpack(e,t,f);return i.vertexFormat=m.clone(o._vertexFormat,i.vertexFormat),i.stackPartitions=o._stackPartitions,i.slicePartitions=o._slicePartitions,c(a)?(s.clone(o._radii,i.radii),a._ellipsoidGeometry=new r(i),a):(i.radius=o._radii.x,new n(i))};n.createGeometry=function(e){return r.createGeometry(e._ellipsoidGeometry)};var d=n;function u(e,t){return c(t)&&(e=d.unpack(e,t)),d.createGeometry(e)}var v=u;export{v as default}; |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.116 | ||
* Version 1.116.1 | ||
* | ||
@@ -26,2 +26,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
import{a as t}from"./chunk-B7XFA4YC.js";import"./chunk-TXIAMGDC.js";import"./chunk-TWAPNO4J.js";import"./chunk-FSXLPWHR.js";import"./chunk-37KLWU3W.js";import"./chunk-HTNJJ6YO.js";import"./chunk-63E276CT.js";import"./chunk-NRW2R4YV.js";import"./chunk-NSILPUHD.js";import"./chunk-M7WODBAD.js";import{a as d}from"./chunk-J26GWQSN.js";import"./chunk-PYB3IV2X.js";import"./chunk-H7FFK4U5.js";import"./chunk-YEUII2A5.js";import{a as l}from"./chunk-4353PD6R.js";import{b as u}from"./chunk-2S4UUFD6.js";import{e as a}from"./chunk-42VHSORI.js";function s(i){let e=l(i.radius,1),r={radii:new d(e,e,e),stackPartitions:i.stackPartitions,slicePartitions:i.slicePartitions,subdivisions:i.subdivisions};this._ellipsoidGeometry=new t(r),this._workerName="createSphereOutlineGeometry"}s.packedLength=t.packedLength;s.pack=function(i,e,o){return u.typeOf.object("value",i),t.pack(i._ellipsoidGeometry,e,o)};var m=new t,n={radius:void 0,radii:new d,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0};s.unpack=function(i,e,o){let r=t.unpack(i,e,m);return n.stackPartitions=r._stackPartitions,n.slicePartitions=r._slicePartitions,n.subdivisions=r._subdivisions,a(o)?(d.clone(r._radii,n.radii),o._ellipsoidGeometry=new t(n),o):(n.radius=r._radii.x,new s(n))};s.createGeometry=function(i){return t.createGeometry(i._ellipsoidGeometry)};var c=s;function p(i,e){return a(e)&&(i=c.unpack(i,e)),c.createGeometry(i)}var w=p;export{w as default}; | ||
import{a as t}from"./chunk-E4SFEH5X.js";import"./chunk-XJCFZEZW.js";import"./chunk-ROROM35N.js";import"./chunk-F5TB5EI7.js";import"./chunk-VAPKZ5PR.js";import"./chunk-DXGEUDM7.js";import"./chunk-5IUHFVP3.js";import"./chunk-OE3P25NW.js";import"./chunk-HIT4T4MS.js";import"./chunk-3KRBUMEX.js";import{a as d}from"./chunk-PQ6NV4GA.js";import"./chunk-74I3QBVP.js";import"./chunk-BLVYEJBC.js";import"./chunk-A6PYE4JS.js";import{a as l}from"./chunk-T23IKWCM.js";import{b as u}from"./chunk-HJ33TVGP.js";import{e as a}from"./chunk-WL4PTXMO.js";function s(i){let e=l(i.radius,1),r={radii:new d(e,e,e),stackPartitions:i.stackPartitions,slicePartitions:i.slicePartitions,subdivisions:i.subdivisions};this._ellipsoidGeometry=new t(r),this._workerName="createSphereOutlineGeometry"}s.packedLength=t.packedLength;s.pack=function(i,e,o){return u.typeOf.object("value",i),t.pack(i._ellipsoidGeometry,e,o)};var m=new t,n={radius:void 0,radii:new d,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0};s.unpack=function(i,e,o){let r=t.unpack(i,e,m);return n.stackPartitions=r._stackPartitions,n.slicePartitions=r._slicePartitions,n.subdivisions=r._subdivisions,a(o)?(d.clone(r._radii,n.radii),o._ellipsoidGeometry=new t(n),o):(n.radius=r._radii.x,new s(n))};s.createGeometry=function(i){return t.createGeometry(i._ellipsoidGeometry)};var c=s;function p(i,e){return a(e)&&(i=c.unpack(i,e)),c.createGeometry(i)}var w=p;export{w as default}; |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.116 | ||
* Version 1.116.1 | ||
* | ||
@@ -26,2 +26,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
import{a}from"./chunk-4PZYNNSN.js";import"./chunk-42VHSORI.js";export{a as default}; | ||
import{a}from"./chunk-F3CCIWXX.js";import"./chunk-WL4PTXMO.js";export{a as default}; |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.116 | ||
* Version 1.116.1 | ||
* | ||
@@ -26,2 +26,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
import{a as J}from"./chunk-4PZYNNSN.js";import{a as Y}from"./chunk-BMTOWA7K.js";import{a as B}from"./chunk-TWAPNO4J.js";import{a as X}from"./chunk-NRW2R4YV.js";import{c as W}from"./chunk-NSILPUHD.js";import"./chunk-M7WODBAD.js";import{a as t,b as k,d as _}from"./chunk-J26GWQSN.js";import{a as v}from"./chunk-PYB3IV2X.js";import"./chunk-H7FFK4U5.js";import"./chunk-YEUII2A5.js";import"./chunk-4353PD6R.js";import"./chunk-2S4UUFD6.js";import"./chunk-42VHSORI.js";var V=32767,it=Math.cos(v.toRadians(150)),ct=new k,rt=new t;function at(e,o,c,i,s,A,h){let g=e.length,f=new Float64Array(g*3);for(let d=0;d<g;++d){let l=e[d],r=o[d],E=c[d],n=v.lerp(i.west,i.east,l/V),p=v.lerp(i.south,i.north,r/V),w=v.lerp(s,A,E/V),x=k.fromRadians(n,p,w,ct),P=h.cartographicToCartesian(x,rt);t.pack(P,f,d*3)}return f}function dt(e){let o=e.length,c=new Uint32Array(o+1),i=0;for(let s=0;s<o;++s)c[s]=i,i+=e[s];return c[o]=i,c}var lt=new k,ht=new k;function ft(e,o,c,i){let s=i.length,A=e.length,h=new Uint8Array(A),g=lt,f=ht,d=0;for(let r=0;r<s;r++){let E=i[r],n=E;for(let p=1;p<E;p++){let w=d+p,x=w-1;f.longitude=e[w],f.latitude=o[w],g.longitude=e[x],g.latitude=o[x],k.equals(f,g)&&(n--,h[x]=1)}i[r]=n,d+=E}let l=0;for(let r=0;r<A;r++)h[r]!==1&&(e[l]=e[r],o[l]=o[r],c[l]=c[r],l++)}function ot(e){let o=e*8,c=o*3,i=o*4;this.startEllipsoidNormals=new Float32Array(c),this.endEllipsoidNormals=new Float32Array(c),this.startPositionAndHeights=new Float32Array(i),this.startFaceNormalAndVertexCornerIds=new Float32Array(i),this.endPositionAndHeights=new Float32Array(i),this.endFaceNormalAndHalfWidths=new Float32Array(i),this.vertexBatchIds=new Uint16Array(o),this.indices=B.createTypedArray(o,36*e),this.vec3Offset=0,this.vec4Offset=0,this.batchIdOffset=0,this.indexOffset=0,this.volumeStartIndex=0}var Q=new t,pt=new t;function $(e,o,c,i,s){let A=t.subtract(c,o,pt),h=t.subtract(o,e,Q);return t.normalize(A,A),t.normalize(h,h),t.dot(A,h)<it&&(h=t.multiplyByScalar(h,-1,Q)),t.add(A,h,s),t.equals(s,t.ZERO)&&(s=t.subtract(e,o)),t.cross(s,i,s),t.cross(i,s,s),t.normalize(s,s),s}var st=[0,2,6,0,6,4,0,1,3,0,3,2,0,4,5,0,5,1,5,3,1,5,7,3,7,5,4,7,4,6,7,6,2,7,2,3],j=st.length,tt=new t,ut=new t,mt=new t,At=new t,Nt=new t;ot.prototype.addVolume=function(e,o,c,i,s,A,h,g,f,d){let l=t.add(o,f,tt),r=d.geodeticSurfaceNormal(l,ut);l=t.add(c,f,tt);let E=d.geodeticSurfaceNormal(l,At),n=$(e,o,c,r,mt),p=$(i,c,o,E,Nt),w=this.startEllipsoidNormals,x=this.endEllipsoidNormals,P=this.startPositionAndHeights,H=this.startFaceNormalAndVertexCornerIds,b=this.endPositionAndHeights,a=this.endFaceNormalAndHalfWidths,F=this.vertexBatchIds,m=this.batchIdOffset,I=this.vec3Offset,u=this.vec4Offset,N;for(N=0;N<8;N++)t.pack(r,w,I),t.pack(E,x,I),t.pack(o,P,u),P[u+3]=s,t.pack(c,b,u),b[u+3]=A,t.pack(n,H,u),H[u+3]=N,t.pack(p,a,u),a[u+3]=h,F[m++]=g,I+=3,u+=4;this.batchIdOffset=m,this.vec3Offset=I,this.vec4Offset=u;let C=this.indices,y=this.volumeStartIndex,z=this.indexOffset;for(N=0;N<j;N++)C[z+N]=st[N]+y;this.volumeStartIndex+=8,this.indexOffset+=j};var gt=new W,Et=new _,wt=new t,M=new t,It=new t,xt=new t,T=new t;function Pt(e,o){let c=new Uint16Array(e.positions),i=new Uint16Array(e.widths),s=new Uint32Array(e.counts),A=new Uint16Array(e.batchIds),h=gt,g=Et,f=wt,d=new Float64Array(e.packedBuffer),l=0,r=d[l++],E=d[l++];W.unpack(d,l,h),l+=W.packedLength,_.unpack(d,l,g),l+=_.packedLength,t.unpack(d,l,f);let n,p=c.length/3,w=c.subarray(0,p),x=c.subarray(p,2*p),P=c.subarray(2*p,3*p);Y.zigZagDeltaDecode(w,x,P),ft(w,x,P,s);let H=s.length,b=0;for(n=0;n<H;n++){let y=s[n];b+=y-1}let a=new ot(b),F=at(w,x,P,h,r,E,g,f);p=w.length;let m=new Float32Array(p*3);for(n=0;n<p;++n)m[n*3]=F[n*3]-f.x,m[n*3+1]=F[n*3+1]-f.y,m[n*3+2]=F[n*3+2]-f.z;let I=0,u=0;for(n=0;n<H;n++){let y=s[n]-1,z=i[n]*.5,et=A[n],q=I;for(let D=0;D<y;D++){let S=t.unpack(m,I,It),O=t.unpack(m,I+3,xt),G=P[u],Z=P[u+1];G=v.lerp(r,E,G/V),Z=v.lerp(r,E,Z/V),u++;let L=M,R=T;if(D===0){let U=q+y*3,K=t.unpack(m,U,M);if(t.equals(K,S))t.unpack(m,U-3,L);else{let nt=t.subtract(S,O,M);L=t.add(nt,S,M)}}else t.unpack(m,I-3,L);if(D===y-1){let U=t.unpack(m,q,T);if(t.equals(U,O))t.unpack(m,q+3,R);else{let K=t.subtract(O,S,T);R=t.add(K,O,T)}}else t.unpack(m,I+6,R);a.addVolume(L,S,O,R,G,Z,z,et,f,g),I+=3}I+=3,u++}let N=a.indices;o.push(a.startEllipsoidNormals.buffer),o.push(a.endEllipsoidNormals.buffer),o.push(a.startPositionAndHeights.buffer),o.push(a.startFaceNormalAndVertexCornerIds.buffer),o.push(a.endPositionAndHeights.buffer),o.push(a.endFaceNormalAndHalfWidths.buffer),o.push(a.vertexBatchIds.buffer),o.push(N.buffer);let C={indexDatatype:N.BYTES_PER_ELEMENT===2?B.UNSIGNED_SHORT:B.UNSIGNED_INT,startEllipsoidNormals:a.startEllipsoidNormals.buffer,endEllipsoidNormals:a.endEllipsoidNormals.buffer,startPositionAndHeights:a.startPositionAndHeights.buffer,startFaceNormalAndVertexCornerIds:a.startFaceNormalAndVertexCornerIds.buffer,endPositionAndHeights:a.endPositionAndHeights.buffer,endFaceNormalAndHalfWidths:a.endFaceNormalAndHalfWidths.buffer,vertexBatchIds:a.vertexBatchIds.buffer,indices:N.buffer};if(e.keepDecodedPositions){let y=dt(s);o.push(F.buffer,y.buffer),C=X(C,{decodedPositions:F.buffer,decodedPositionOffsets:y.buffer})}return C}var Vt=J(Pt);export{Vt as default}; | ||
import{a as J}from"./chunk-F3CCIWXX.js";import{a as Y}from"./chunk-JAMWPWOV.js";import{a as B}from"./chunk-ROROM35N.js";import{a as X}from"./chunk-OE3P25NW.js";import{c as W}from"./chunk-HIT4T4MS.js";import"./chunk-3KRBUMEX.js";import{a as t,b as k,d as _}from"./chunk-PQ6NV4GA.js";import{a as v}from"./chunk-74I3QBVP.js";import"./chunk-BLVYEJBC.js";import"./chunk-A6PYE4JS.js";import"./chunk-T23IKWCM.js";import"./chunk-HJ33TVGP.js";import"./chunk-WL4PTXMO.js";var V=32767,it=Math.cos(v.toRadians(150)),ct=new k,rt=new t;function at(e,o,c,i,s,A,h){let g=e.length,f=new Float64Array(g*3);for(let d=0;d<g;++d){let l=e[d],r=o[d],E=c[d],n=v.lerp(i.west,i.east,l/V),p=v.lerp(i.south,i.north,r/V),w=v.lerp(s,A,E/V),x=k.fromRadians(n,p,w,ct),P=h.cartographicToCartesian(x,rt);t.pack(P,f,d*3)}return f}function dt(e){let o=e.length,c=new Uint32Array(o+1),i=0;for(let s=0;s<o;++s)c[s]=i,i+=e[s];return c[o]=i,c}var lt=new k,ht=new k;function ft(e,o,c,i){let s=i.length,A=e.length,h=new Uint8Array(A),g=lt,f=ht,d=0;for(let r=0;r<s;r++){let E=i[r],n=E;for(let p=1;p<E;p++){let w=d+p,x=w-1;f.longitude=e[w],f.latitude=o[w],g.longitude=e[x],g.latitude=o[x],k.equals(f,g)&&(n--,h[x]=1)}i[r]=n,d+=E}let l=0;for(let r=0;r<A;r++)h[r]!==1&&(e[l]=e[r],o[l]=o[r],c[l]=c[r],l++)}function ot(e){let o=e*8,c=o*3,i=o*4;this.startEllipsoidNormals=new Float32Array(c),this.endEllipsoidNormals=new Float32Array(c),this.startPositionAndHeights=new Float32Array(i),this.startFaceNormalAndVertexCornerIds=new Float32Array(i),this.endPositionAndHeights=new Float32Array(i),this.endFaceNormalAndHalfWidths=new Float32Array(i),this.vertexBatchIds=new Uint16Array(o),this.indices=B.createTypedArray(o,36*e),this.vec3Offset=0,this.vec4Offset=0,this.batchIdOffset=0,this.indexOffset=0,this.volumeStartIndex=0}var Q=new t,pt=new t;function $(e,o,c,i,s){let A=t.subtract(c,o,pt),h=t.subtract(o,e,Q);return t.normalize(A,A),t.normalize(h,h),t.dot(A,h)<it&&(h=t.multiplyByScalar(h,-1,Q)),t.add(A,h,s),t.equals(s,t.ZERO)&&(s=t.subtract(e,o)),t.cross(s,i,s),t.cross(i,s,s),t.normalize(s,s),s}var st=[0,2,6,0,6,4,0,1,3,0,3,2,0,4,5,0,5,1,5,3,1,5,7,3,7,5,4,7,4,6,7,6,2,7,2,3],j=st.length,tt=new t,ut=new t,mt=new t,At=new t,Nt=new t;ot.prototype.addVolume=function(e,o,c,i,s,A,h,g,f,d){let l=t.add(o,f,tt),r=d.geodeticSurfaceNormal(l,ut);l=t.add(c,f,tt);let E=d.geodeticSurfaceNormal(l,At),n=$(e,o,c,r,mt),p=$(i,c,o,E,Nt),w=this.startEllipsoidNormals,x=this.endEllipsoidNormals,P=this.startPositionAndHeights,H=this.startFaceNormalAndVertexCornerIds,b=this.endPositionAndHeights,a=this.endFaceNormalAndHalfWidths,F=this.vertexBatchIds,m=this.batchIdOffset,I=this.vec3Offset,u=this.vec4Offset,N;for(N=0;N<8;N++)t.pack(r,w,I),t.pack(E,x,I),t.pack(o,P,u),P[u+3]=s,t.pack(c,b,u),b[u+3]=A,t.pack(n,H,u),H[u+3]=N,t.pack(p,a,u),a[u+3]=h,F[m++]=g,I+=3,u+=4;this.batchIdOffset=m,this.vec3Offset=I,this.vec4Offset=u;let C=this.indices,y=this.volumeStartIndex,z=this.indexOffset;for(N=0;N<j;N++)C[z+N]=st[N]+y;this.volumeStartIndex+=8,this.indexOffset+=j};var gt=new W,Et=new _,wt=new t,M=new t,It=new t,xt=new t,T=new t;function Pt(e,o){let c=new Uint16Array(e.positions),i=new Uint16Array(e.widths),s=new Uint32Array(e.counts),A=new Uint16Array(e.batchIds),h=gt,g=Et,f=wt,d=new Float64Array(e.packedBuffer),l=0,r=d[l++],E=d[l++];W.unpack(d,l,h),l+=W.packedLength,_.unpack(d,l,g),l+=_.packedLength,t.unpack(d,l,f);let n,p=c.length/3,w=c.subarray(0,p),x=c.subarray(p,2*p),P=c.subarray(2*p,3*p);Y.zigZagDeltaDecode(w,x,P),ft(w,x,P,s);let H=s.length,b=0;for(n=0;n<H;n++){let y=s[n];b+=y-1}let a=new ot(b),F=at(w,x,P,h,r,E,g,f);p=w.length;let m=new Float32Array(p*3);for(n=0;n<p;++n)m[n*3]=F[n*3]-f.x,m[n*3+1]=F[n*3+1]-f.y,m[n*3+2]=F[n*3+2]-f.z;let I=0,u=0;for(n=0;n<H;n++){let y=s[n]-1,z=i[n]*.5,et=A[n],q=I;for(let D=0;D<y;D++){let S=t.unpack(m,I,It),O=t.unpack(m,I+3,xt),G=P[u],Z=P[u+1];G=v.lerp(r,E,G/V),Z=v.lerp(r,E,Z/V),u++;let L=M,R=T;if(D===0){let U=q+y*3,K=t.unpack(m,U,M);if(t.equals(K,S))t.unpack(m,U-3,L);else{let nt=t.subtract(S,O,M);L=t.add(nt,S,M)}}else t.unpack(m,I-3,L);if(D===y-1){let U=t.unpack(m,q,T);if(t.equals(U,O))t.unpack(m,q+3,R);else{let K=t.subtract(O,S,T);R=t.add(K,O,T)}}else t.unpack(m,I+6,R);a.addVolume(L,S,O,R,G,Z,z,et,f,g),I+=3}I+=3,u++}let N=a.indices;o.push(a.startEllipsoidNormals.buffer),o.push(a.endEllipsoidNormals.buffer),o.push(a.startPositionAndHeights.buffer),o.push(a.startFaceNormalAndVertexCornerIds.buffer),o.push(a.endPositionAndHeights.buffer),o.push(a.endFaceNormalAndHalfWidths.buffer),o.push(a.vertexBatchIds.buffer),o.push(N.buffer);let C={indexDatatype:N.BYTES_PER_ELEMENT===2?B.UNSIGNED_SHORT:B.UNSIGNED_INT,startEllipsoidNormals:a.startEllipsoidNormals.buffer,endEllipsoidNormals:a.endEllipsoidNormals.buffer,startPositionAndHeights:a.startPositionAndHeights.buffer,startFaceNormalAndVertexCornerIds:a.startFaceNormalAndVertexCornerIds.buffer,endPositionAndHeights:a.endPositionAndHeights.buffer,endFaceNormalAndHalfWidths:a.endFaceNormalAndHalfWidths.buffer,vertexBatchIds:a.vertexBatchIds.buffer,indices:N.buffer};if(e.keepDecodedPositions){let y=dt(s);o.push(F.buffer,y.buffer),C=X(C,{decodedPositions:F.buffer,decodedPositionOffsets:y.buffer})}return C}var Vt=J(Pt);export{Vt as default}; |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.116 | ||
* Version 1.116.1 | ||
* | ||
@@ -26,2 +26,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
import{a as P}from"./chunk-ZK2UTPA3.js";import{a as z}from"./chunk-GW444G3T.js";import"./chunk-OXKDIHB6.js";import{a as H}from"./chunk-DTEVYUV6.js";import{a as Y}from"./chunk-4PZYNNSN.js";import{a as j}from"./chunk-KODO46B4.js";import"./chunk-TXIAMGDC.js";import"./chunk-TK2AA6M2.js";import{a as W}from"./chunk-TWAPNO4J.js";import"./chunk-FSXLPWHR.js";import"./chunk-37KLWU3W.js";import{d as E}from"./chunk-HTNJJ6YO.js";import"./chunk-63E276CT.js";import"./chunk-NRW2R4YV.js";import{b as d}from"./chunk-NSILPUHD.js";import"./chunk-M7WODBAD.js";import{a as o}from"./chunk-J26GWQSN.js";import"./chunk-PYB3IV2X.js";import"./chunk-H7FFK4U5.js";import"./chunk-YEUII2A5.js";import"./chunk-4353PD6R.js";import"./chunk-2S4UUFD6.js";import{e as l}from"./chunk-42VHSORI.js";function X(e){this.offset=e.offset,this.count=e.count,this.color=e.color,this.batchIds=e.batchIds}var J=X;var S=new o,$=d.packedLength+o.packedLength,ee=d.packedLength+2,ne=d.packedLength+o.packedLength,te=o.packedLength+1,u={modelMatrix:new d,boundingVolume:new E};function oe(e,c){let n=c*$,i=o.unpack(e,n,S);n+=o.packedLength;let r=d.unpack(e,n,u.modelMatrix);d.multiplyByScale(r,i,r);let t=u.boundingVolume;return o.clone(o.ZERO,t.center),t.radius=Math.sqrt(3),u}function ce(e,c){let n=c*ee,i=e[n++],r=e[n++],t=o.fromElements(i,i,r,S),s=d.unpack(e,n,u.modelMatrix);d.multiplyByScale(s,t,s);let h=u.boundingVolume;return o.clone(o.ZERO,h.center),h.radius=Math.sqrt(2),u}function se(e,c){let n=c*ne,i=o.unpack(e,n,S);n+=o.packedLength;let r=d.unpack(e,n,u.modelMatrix);d.multiplyByScale(r,i,r);let t=u.boundingVolume;return o.clone(o.ZERO,t.center),t.radius=1,u}function ie(e,c){let n=c*te,i=e[n++],r=o.unpack(e,n,S),t=d.fromTranslation(r,u.modelMatrix);d.multiplyByUniformScale(t,i,t);let s=u.boundingVolume;return o.clone(o.ZERO,s.center),s.radius=1,u}var de=new o;function R(e,c,n,i,r){if(!l(c))return;let t=n.length,s=i.attributes.position.values,h=i.indices,a=e.positions,x=e.vertexBatchIds,y=e.indices,I=e.batchIds,p=e.batchTableColors,T=e.batchedIndices,U=e.indexOffsets,v=e.indexCounts,L=e.boundingVolumes,F=e.modelMatrix,Z=e.center,V=e.positionOffset,B=e.batchIdIndex,O=e.indexOffset,D=e.batchedIndicesOffset;for(let w=0;w<t;++w){let C=r(c,w),k=C.modelMatrix;d.multiply(F,k,k);let M=n[w],A=s.length;for(let f=0;f<A;f+=3){let m=o.unpack(s,f,de);d.multiplyByPoint(k,m,m),o.subtract(m,Z,m),o.pack(m,a,V*3+f),x[B++]=M}let b=h.length;for(let f=0;f<b;++f)y[O+f]=h[f]+V;let g=w+D;T[g]=new J({offset:O,count:b,color:P.fromRgba(p[M]),batchIds:[M]}),I[g]=M,U[g]=O,v[g]=b,L[g]=E.transform(C.boundingVolume,k),V+=A/3,O+=b}e.positionOffset=V,e.batchIdIndex=B,e.indexOffset=O,e.batchedIndicesOffset+=t}var K=new o,Q=new d;function re(e){let c=new Float64Array(e),n=0;o.unpack(c,n,K),n+=o.packedLength,d.unpack(c,n,Q)}function le(e){let c=e.length,n=0;for(let i=0;i<c;++i)n+=P.packedLength+3+e[i].batchIds.length;return n}function ae(e,c,n){let i=n.length,r=2+i*E.packedLength+1+le(c),t=new Float64Array(r),s=0;t[s++]=e,t[s++]=i;for(let a=0;a<i;++a)E.pack(n[a],t,s),s+=E.packedLength;let h=c.length;t[s++]=h;for(let a=0;a<h;++a){let x=c[a];P.pack(x.color,t,s),s+=P.packedLength,t[s++]=x.offset,t[s++]=x.count;let y=x.batchIds,I=y.length;t[s++]=I;for(let p=0;p<I;++p)t[s++]=y[p]}return t}function fe(e,c){let n=l(e.boxes)?new Float32Array(e.boxes):void 0,i=l(e.boxBatchIds)?new Uint16Array(e.boxBatchIds):void 0,r=l(e.cylinders)?new Float32Array(e.cylinders):void 0,t=l(e.cylinderBatchIds)?new Uint16Array(e.cylinderBatchIds):void 0,s=l(e.ellipsoids)?new Float32Array(e.ellipsoids):void 0,h=l(e.ellipsoidBatchIds)?new Uint16Array(e.ellipsoidBatchIds):void 0,a=l(e.spheres)?new Float32Array(e.spheres):void 0,x=l(e.sphereBatchIds)?new Uint16Array(e.sphereBatchIds):void 0,y=l(n)?i.length:0,I=l(r)?t.length:0,p=l(s)?h.length:0,T=l(a)?x.length:0,U=j.getUnitBox(),v=z.getUnitCylinder(),L=H.getUnitEllipsoid(),F=U.attributes.position.values,Z=v.attributes.position.values,V=L.attributes.position.values,B=F.length*y;B+=Z.length*I,B+=V.length*(p+T);let O=U.indices,D=v.indices,w=L.indices,C=O.length*y;C+=D.length*I,C+=w.length*(p+T);let k=new Float32Array(B),M=new Uint16Array(B/3),A=W.createTypedArray(B/3,C),b=y+I+p+T,g=new Uint16Array(b),f=new Array(b),m=new Uint32Array(b),q=new Uint32Array(b),_=new Array(b);re(e.packedBuffer);let G={batchTableColors:new Uint32Array(e.batchTableColors),positions:k,vertexBatchIds:M,indices:A,batchIds:g,batchedIndices:f,indexOffsets:m,indexCounts:q,boundingVolumes:_,positionOffset:0,batchIdIndex:0,indexOffset:0,batchedIndicesOffset:0,modelMatrix:Q,center:K};R(G,n,i,U,oe),R(G,r,t,v,ce),R(G,s,h,L,se),R(G,a,x,L,ie);let N=ae(A.BYTES_PER_ELEMENT,f,_);return c.push(k.buffer,M.buffer,A.buffer),c.push(g.buffer,m.buffer,q.buffer),c.push(N.buffer),{positions:k.buffer,vertexBatchIds:M.buffer,indices:A.buffer,indexOffsets:m.buffer,indexCounts:q.buffer,batchIds:g.buffer,packedBuffer:N.buffer}}var Oe=Y(fe);export{Oe as default}; | ||
import{a as P}from"./chunk-I7F5J7U6.js";import{a as z}from"./chunk-J365QEX5.js";import"./chunk-UMIT4LUH.js";import{a as H}from"./chunk-KOBAXN2X.js";import{a as Y}from"./chunk-F3CCIWXX.js";import{a as j}from"./chunk-237DLL5B.js";import"./chunk-XJCFZEZW.js";import"./chunk-64WQCGAE.js";import{a as W}from"./chunk-ROROM35N.js";import"./chunk-F5TB5EI7.js";import"./chunk-VAPKZ5PR.js";import{d as E}from"./chunk-DXGEUDM7.js";import"./chunk-5IUHFVP3.js";import"./chunk-OE3P25NW.js";import{b as d}from"./chunk-HIT4T4MS.js";import"./chunk-3KRBUMEX.js";import{a as o}from"./chunk-PQ6NV4GA.js";import"./chunk-74I3QBVP.js";import"./chunk-BLVYEJBC.js";import"./chunk-A6PYE4JS.js";import"./chunk-T23IKWCM.js";import"./chunk-HJ33TVGP.js";import{e as l}from"./chunk-WL4PTXMO.js";function X(e){this.offset=e.offset,this.count=e.count,this.color=e.color,this.batchIds=e.batchIds}var J=X;var S=new o,$=d.packedLength+o.packedLength,ee=d.packedLength+2,ne=d.packedLength+o.packedLength,te=o.packedLength+1,u={modelMatrix:new d,boundingVolume:new E};function oe(e,c){let n=c*$,i=o.unpack(e,n,S);n+=o.packedLength;let r=d.unpack(e,n,u.modelMatrix);d.multiplyByScale(r,i,r);let t=u.boundingVolume;return o.clone(o.ZERO,t.center),t.radius=Math.sqrt(3),u}function ce(e,c){let n=c*ee,i=e[n++],r=e[n++],t=o.fromElements(i,i,r,S),s=d.unpack(e,n,u.modelMatrix);d.multiplyByScale(s,t,s);let h=u.boundingVolume;return o.clone(o.ZERO,h.center),h.radius=Math.sqrt(2),u}function se(e,c){let n=c*ne,i=o.unpack(e,n,S);n+=o.packedLength;let r=d.unpack(e,n,u.modelMatrix);d.multiplyByScale(r,i,r);let t=u.boundingVolume;return o.clone(o.ZERO,t.center),t.radius=1,u}function ie(e,c){let n=c*te,i=e[n++],r=o.unpack(e,n,S),t=d.fromTranslation(r,u.modelMatrix);d.multiplyByUniformScale(t,i,t);let s=u.boundingVolume;return o.clone(o.ZERO,s.center),s.radius=1,u}var de=new o;function R(e,c,n,i,r){if(!l(c))return;let t=n.length,s=i.attributes.position.values,h=i.indices,a=e.positions,x=e.vertexBatchIds,y=e.indices,I=e.batchIds,p=e.batchTableColors,T=e.batchedIndices,U=e.indexOffsets,v=e.indexCounts,L=e.boundingVolumes,F=e.modelMatrix,Z=e.center,V=e.positionOffset,B=e.batchIdIndex,O=e.indexOffset,D=e.batchedIndicesOffset;for(let w=0;w<t;++w){let C=r(c,w),k=C.modelMatrix;d.multiply(F,k,k);let M=n[w],A=s.length;for(let f=0;f<A;f+=3){let m=o.unpack(s,f,de);d.multiplyByPoint(k,m,m),o.subtract(m,Z,m),o.pack(m,a,V*3+f),x[B++]=M}let b=h.length;for(let f=0;f<b;++f)y[O+f]=h[f]+V;let g=w+D;T[g]=new J({offset:O,count:b,color:P.fromRgba(p[M]),batchIds:[M]}),I[g]=M,U[g]=O,v[g]=b,L[g]=E.transform(C.boundingVolume,k),V+=A/3,O+=b}e.positionOffset=V,e.batchIdIndex=B,e.indexOffset=O,e.batchedIndicesOffset+=t}var K=new o,Q=new d;function re(e){let c=new Float64Array(e),n=0;o.unpack(c,n,K),n+=o.packedLength,d.unpack(c,n,Q)}function le(e){let c=e.length,n=0;for(let i=0;i<c;++i)n+=P.packedLength+3+e[i].batchIds.length;return n}function ae(e,c,n){let i=n.length,r=2+i*E.packedLength+1+le(c),t=new Float64Array(r),s=0;t[s++]=e,t[s++]=i;for(let a=0;a<i;++a)E.pack(n[a],t,s),s+=E.packedLength;let h=c.length;t[s++]=h;for(let a=0;a<h;++a){let x=c[a];P.pack(x.color,t,s),s+=P.packedLength,t[s++]=x.offset,t[s++]=x.count;let y=x.batchIds,I=y.length;t[s++]=I;for(let p=0;p<I;++p)t[s++]=y[p]}return t}function fe(e,c){let n=l(e.boxes)?new Float32Array(e.boxes):void 0,i=l(e.boxBatchIds)?new Uint16Array(e.boxBatchIds):void 0,r=l(e.cylinders)?new Float32Array(e.cylinders):void 0,t=l(e.cylinderBatchIds)?new Uint16Array(e.cylinderBatchIds):void 0,s=l(e.ellipsoids)?new Float32Array(e.ellipsoids):void 0,h=l(e.ellipsoidBatchIds)?new Uint16Array(e.ellipsoidBatchIds):void 0,a=l(e.spheres)?new Float32Array(e.spheres):void 0,x=l(e.sphereBatchIds)?new Uint16Array(e.sphereBatchIds):void 0,y=l(n)?i.length:0,I=l(r)?t.length:0,p=l(s)?h.length:0,T=l(a)?x.length:0,U=j.getUnitBox(),v=z.getUnitCylinder(),L=H.getUnitEllipsoid(),F=U.attributes.position.values,Z=v.attributes.position.values,V=L.attributes.position.values,B=F.length*y;B+=Z.length*I,B+=V.length*(p+T);let O=U.indices,D=v.indices,w=L.indices,C=O.length*y;C+=D.length*I,C+=w.length*(p+T);let k=new Float32Array(B),M=new Uint16Array(B/3),A=W.createTypedArray(B/3,C),b=y+I+p+T,g=new Uint16Array(b),f=new Array(b),m=new Uint32Array(b),q=new Uint32Array(b),_=new Array(b);re(e.packedBuffer);let G={batchTableColors:new Uint32Array(e.batchTableColors),positions:k,vertexBatchIds:M,indices:A,batchIds:g,batchedIndices:f,indexOffsets:m,indexCounts:q,boundingVolumes:_,positionOffset:0,batchIdIndex:0,indexOffset:0,batchedIndicesOffset:0,modelMatrix:Q,center:K};R(G,n,i,U,oe),R(G,r,t,v,ce),R(G,s,h,L,se),R(G,a,x,L,ie);let N=ae(A.BYTES_PER_ELEMENT,f,_);return c.push(k.buffer,M.buffer,A.buffer),c.push(g.buffer,m.buffer,q.buffer),c.push(N.buffer),{positions:k.buffer,vertexBatchIds:M.buffer,indices:A.buffer,indexOffsets:m.buffer,indexCounts:q.buffer,batchIds:g.buffer,packedBuffer:N.buffer}}var Oe=Y(fe);export{Oe as default}; |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.116 | ||
* Version 1.116.1 | ||
* | ||
@@ -26,2 +26,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
import{a as x}from"./chunk-4PZYNNSN.js";import{a as w}from"./chunk-BMTOWA7K.js";import{c}from"./chunk-NSILPUHD.js";import"./chunk-M7WODBAD.js";import{a as h,b as l,d as p}from"./chunk-J26GWQSN.js";import{a as i}from"./chunk-PYB3IV2X.js";import"./chunk-H7FFK4U5.js";import"./chunk-YEUII2A5.js";import"./chunk-4353PD6R.js";import"./chunk-2S4UUFD6.js";import"./chunk-42VHSORI.js";var u=32767,F=new l,L=new h,b=new c,y=new p,a={min:void 0,max:void 0};function V(t){t=new Float64Array(t);let o=0;a.min=t[o++],a.max=t[o++],c.unpack(t,o,b),o+=c.packedLength,p.unpack(t,o,y)}function z(t,o){let s=new Uint16Array(t.positions);V(t.packedBuffer);let e=b,C=y,A=a.min,P=a.max,n=s.length/3,f=s.subarray(0,n),g=s.subarray(n,2*n),d=s.subarray(2*n,3*n);w.zigZagDeltaDecode(f,g,d);let m=new Float64Array(s.length);for(let r=0;r<n;++r){let k=f[r],E=g[r],H=d[r],M=i.lerp(e.west,e.east,k/u),R=i.lerp(e.south,e.north,E/u),T=i.lerp(A,P,H/u),v=l.fromRadians(M,R,T,F),D=C.cartographicToCartesian(v,L);h.pack(D,m,r*3)}return o.push(m.buffer),{positions:m.buffer}}var G=x(z);export{G as default}; | ||
import{a as x}from"./chunk-F3CCIWXX.js";import{a as w}from"./chunk-JAMWPWOV.js";import{c}from"./chunk-HIT4T4MS.js";import"./chunk-3KRBUMEX.js";import{a as h,b as l,d as p}from"./chunk-PQ6NV4GA.js";import{a as i}from"./chunk-74I3QBVP.js";import"./chunk-BLVYEJBC.js";import"./chunk-A6PYE4JS.js";import"./chunk-T23IKWCM.js";import"./chunk-HJ33TVGP.js";import"./chunk-WL4PTXMO.js";var u=32767,F=new l,L=new h,b=new c,y=new p,a={min:void 0,max:void 0};function V(t){t=new Float64Array(t);let o=0;a.min=t[o++],a.max=t[o++],c.unpack(t,o,b),o+=c.packedLength,p.unpack(t,o,y)}function z(t,o){let s=new Uint16Array(t.positions);V(t.packedBuffer);let e=b,C=y,A=a.min,P=a.max,n=s.length/3,f=s.subarray(0,n),g=s.subarray(n,2*n),d=s.subarray(2*n,3*n);w.zigZagDeltaDecode(f,g,d);let m=new Float64Array(s.length);for(let r=0;r<n;++r){let k=f[r],E=g[r],H=d[r],M=i.lerp(e.west,e.east,k/u),R=i.lerp(e.south,e.north,E/u),T=i.lerp(A,P,H/u),v=l.fromRadians(M,R,T,F),D=C.cartographicToCartesian(v,L);h.pack(D,m,r*3)}return o.push(m.buffer),{positions:m.buffer}}var G=x(z);export{G as default}; |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.116 | ||
* Version 1.116.1 | ||
* | ||
@@ -26,2 +26,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
import{a as R}from"./chunk-ZK2UTPA3.js";import{a as It}from"./chunk-4PZYNNSN.js";import{a as M}from"./chunk-XORBV237.js";import{a as bt}from"./chunk-BMTOWA7K.js";import"./chunk-YPW76GEP.js";import"./chunk-GKRM7KEL.js";import"./chunk-LGFQRF3V.js";import"./chunk-AHZBRYZA.js";import{a as W}from"./chunk-TWAPNO4J.js";import"./chunk-HTNJJ6YO.js";import"./chunk-63E276CT.js";import"./chunk-NRW2R4YV.js";import{c as z}from"./chunk-NSILPUHD.js";import"./chunk-M7WODBAD.js";import{a as o,b as nt,d as j}from"./chunk-J26GWQSN.js";import{a as et}from"./chunk-PYB3IV2X.js";import"./chunk-H7FFK4U5.js";import"./chunk-YEUII2A5.js";import"./chunk-4353PD6R.js";import"./chunk-2S4UUFD6.js";import{e as A}from"./chunk-42VHSORI.js";var kt=new o,Bt=new j,Nt=new z,E={min:void 0,max:void 0,indexBytesPerElement:void 0};function Pt(s){let u=new Float64Array(s),n=0;E.indexBytesPerElement=u[n++],E.min=u[n++],E.max=u[n++],o.unpack(u,n,kt),n+=o.packedLength,j.unpack(u,n,Bt),n+=j.packedLength,z.unpack(u,n,Nt)}function Tt(s){let u=s.length,n=0;for(let y=0;y<u;++y)n+=R.packedLength+3+s[y].batchIds.length;return n}function Ct(s,u,n){let y=u.length,O=2+y*M.packedLength+1+Tt(n),c=new Float64Array(O),i=0;c[i++]=s,c[i++]=y;for(let x=0;x<y;++x)M.pack(u[x],c,i),i+=M.packedLength;let V=n.length;c[i++]=V;for(let x=0;x<V;++x){let B=n[x];R.pack(B.color,c,i),i+=R.packedLength,c[i++]=B.offset,c[i++]=B.count;let P=B.batchIds,w=P.length;c[i++]=w;for(let h=0;h<w;++h)c[i++]=P[h]}return c}var yt=32767,wt=new o,Ht=new o,St=new o,Ut=new o,Ft=new o,Lt=new nt,Mt=new z;function Rt(s,u){Pt(s.packedBuffer);let n;E.indexBytesPerElement===2?n=new Uint16Array(s.indices):n=new Uint32Array(s.indices);let O=new Uint16Array(s.positions),c=new Uint32Array(s.counts),i=new Uint32Array(s.indexCounts),V=new Uint32Array(s.batchIds),x=new Uint32Array(s.batchTableColors),B=new Array(c.length),P=kt,w=Bt,h=Nt,ot=E.min,st=E.max,T=s.minimumHeights,C=s.maximumHeights;A(T)&&A(C)&&(T=new Float32Array(T),C=new Float32Array(C));let t,f,l,N=O.length/2,ct=O.subarray(0,N),it=O.subarray(N,2*N);bt.zigZagDeltaDecode(ct,it);let rt=new Float64Array(N*3);for(t=0;t<N;++t){let e=ct[t],p=it[t],L=et.lerp(h.west,h.east,e/yt),k=et.lerp(h.south,h.north,p/yt),b=nt.fromRadians(L,k,0,Lt),Y=w.cartographicToCartesian(b,wt);o.pack(Y,rt,t*3)}let H=c.length,at=new Array(H),Z=new Array(H),ft=0,lt=0;for(t=0;t<H;++t)at[t]=ft,Z[t]=lt,ft+=c[t],lt+=i[t];let S=new Float32Array(N*3*2),_=new Uint16Array(N*2),D=new Uint32Array(Z.length),G=new Uint32Array(i.length),r=[],g={};for(t=0;t<H;++t)l=x[t],A(g[l])?(g[l].positionLength+=c[t],g[l].indexLength+=i[t],g[l].batchIds.push(t)):g[l]={positionLength:c[t],indexLength:i[t],offset:0,indexOffset:0,batchIds:[t]};let a,dt=0,ht=0;for(l in g)if(g.hasOwnProperty(l)){a=g[l],a.offset=dt,a.indexOffset=ht;let e=a.positionLength*2,p=a.indexLength*2+a.positionLength*6;dt+=e,ht+=p,a.indexLength=p}let U=[];for(l in g)g.hasOwnProperty(l)&&(a=g[l],U.push({color:R.fromRgba(parseInt(l)),offset:a.indexOffset,count:a.indexLength,batchIds:a.batchIds}));for(t=0;t<H;++t){l=x[t],a=g[l];let e=a.offset,p=e*3,L=e,k=at[t],b=c[t],Y=V[t],mt=ot,gt=st;A(T)&&A(C)&&(mt=T[t],gt=C[t]);let q=Number.POSITIVE_INFINITY,J=Number.NEGATIVE_INFINITY,K=Number.POSITIVE_INFINITY,Q=Number.NEGATIVE_INFINITY;for(f=0;f<b;++f){let m=o.unpack(rt,k*3+f*3,wt);w.scaleToGeodeticSurface(m,m);let I=w.cartesianToCartographic(m,Lt),F=I.latitude,pt=I.longitude;q=Math.min(F,q),J=Math.max(F,J),K=Math.min(pt,K),Q=Math.max(pt,Q);let xt=w.geodeticSurfaceNormal(m,Ht),v=o.multiplyByScalar(xt,mt,St),$=o.add(m,v,Ut);v=o.multiplyByScalar(xt,gt,v);let tt=o.add(m,v,Ft);o.subtract(tt,P,tt),o.subtract($,P,$),o.pack(tt,S,p),o.pack($,S,p+3),_[L]=Y,_[L+1]=Y,p+=6,L+=2}h=Mt,h.west=K,h.east=Q,h.south=q,h.north=J,B[t]=M.fromRectangle(h,ot,st,w);let d=a.indexOffset,X=Z[t],Ot=i[t];for(D[t]=d,f=0;f<Ot;f+=3){let m=n[X+f]-k,I=n[X+f+1]-k,F=n[X+f+2]-k;r[d++]=m*2+e,r[d++]=I*2+e,r[d++]=F*2+e,r[d++]=F*2+1+e,r[d++]=I*2+1+e,r[d++]=m*2+1+e}for(f=0;f<b;++f){let m=f,I=(f+1)%b;r[d++]=m*2+1+e,r[d++]=I*2+e,r[d++]=m*2+e,r[d++]=m*2+1+e,r[d++]=I*2+1+e,r[d++]=I*2+e}a.offset+=b*2,a.indexOffset=d,G[t]=d-D[t]}r=W.createTypedArray(S.length/3,r);let At=U.length;for(let e=0;e<At;++e){let p=U[e].batchIds,L=0,k=p.length;for(let b=0;b<k;++b)L+=G[p[b]];U[e].count=L}let Et=r.BYTES_PER_ELEMENT===2?W.UNSIGNED_SHORT:W.UNSIGNED_INT,ut=Ct(Et,B,U);return u.push(S.buffer,r.buffer,D.buffer,G.buffer,_.buffer,ut.buffer),{positions:S.buffer,indices:r.buffer,indexOffsets:D.buffer,indexCounts:G.buffer,batchIds:_.buffer,packedBuffer:ut.buffer}}var Jt=It(Rt);export{Jt as default}; | ||
import{a as R}from"./chunk-I7F5J7U6.js";import{a as It}from"./chunk-F3CCIWXX.js";import{a as M}from"./chunk-3HMIEL3B.js";import{a as bt}from"./chunk-JAMWPWOV.js";import"./chunk-7E5ZATSO.js";import"./chunk-XOMW5SDY.js";import"./chunk-QC62DG5W.js";import"./chunk-R6IH5WM5.js";import{a as W}from"./chunk-ROROM35N.js";import"./chunk-DXGEUDM7.js";import"./chunk-5IUHFVP3.js";import"./chunk-OE3P25NW.js";import{c as z}from"./chunk-HIT4T4MS.js";import"./chunk-3KRBUMEX.js";import{a as o,b as nt,d as j}from"./chunk-PQ6NV4GA.js";import{a as et}from"./chunk-74I3QBVP.js";import"./chunk-BLVYEJBC.js";import"./chunk-A6PYE4JS.js";import"./chunk-T23IKWCM.js";import"./chunk-HJ33TVGP.js";import{e as A}from"./chunk-WL4PTXMO.js";var kt=new o,Bt=new j,Nt=new z,E={min:void 0,max:void 0,indexBytesPerElement:void 0};function Pt(s){let u=new Float64Array(s),n=0;E.indexBytesPerElement=u[n++],E.min=u[n++],E.max=u[n++],o.unpack(u,n,kt),n+=o.packedLength,j.unpack(u,n,Bt),n+=j.packedLength,z.unpack(u,n,Nt)}function Tt(s){let u=s.length,n=0;for(let y=0;y<u;++y)n+=R.packedLength+3+s[y].batchIds.length;return n}function Ct(s,u,n){let y=u.length,O=2+y*M.packedLength+1+Tt(n),c=new Float64Array(O),i=0;c[i++]=s,c[i++]=y;for(let x=0;x<y;++x)M.pack(u[x],c,i),i+=M.packedLength;let V=n.length;c[i++]=V;for(let x=0;x<V;++x){let B=n[x];R.pack(B.color,c,i),i+=R.packedLength,c[i++]=B.offset,c[i++]=B.count;let P=B.batchIds,w=P.length;c[i++]=w;for(let h=0;h<w;++h)c[i++]=P[h]}return c}var yt=32767,wt=new o,Ht=new o,St=new o,Ut=new o,Ft=new o,Lt=new nt,Mt=new z;function Rt(s,u){Pt(s.packedBuffer);let n;E.indexBytesPerElement===2?n=new Uint16Array(s.indices):n=new Uint32Array(s.indices);let O=new Uint16Array(s.positions),c=new Uint32Array(s.counts),i=new Uint32Array(s.indexCounts),V=new Uint32Array(s.batchIds),x=new Uint32Array(s.batchTableColors),B=new Array(c.length),P=kt,w=Bt,h=Nt,ot=E.min,st=E.max,T=s.minimumHeights,C=s.maximumHeights;A(T)&&A(C)&&(T=new Float32Array(T),C=new Float32Array(C));let t,f,l,N=O.length/2,ct=O.subarray(0,N),it=O.subarray(N,2*N);bt.zigZagDeltaDecode(ct,it);let rt=new Float64Array(N*3);for(t=0;t<N;++t){let e=ct[t],p=it[t],L=et.lerp(h.west,h.east,e/yt),k=et.lerp(h.south,h.north,p/yt),b=nt.fromRadians(L,k,0,Lt),Y=w.cartographicToCartesian(b,wt);o.pack(Y,rt,t*3)}let H=c.length,at=new Array(H),Z=new Array(H),ft=0,lt=0;for(t=0;t<H;++t)at[t]=ft,Z[t]=lt,ft+=c[t],lt+=i[t];let S=new Float32Array(N*3*2),_=new Uint16Array(N*2),D=new Uint32Array(Z.length),G=new Uint32Array(i.length),r=[],g={};for(t=0;t<H;++t)l=x[t],A(g[l])?(g[l].positionLength+=c[t],g[l].indexLength+=i[t],g[l].batchIds.push(t)):g[l]={positionLength:c[t],indexLength:i[t],offset:0,indexOffset:0,batchIds:[t]};let a,dt=0,ht=0;for(l in g)if(g.hasOwnProperty(l)){a=g[l],a.offset=dt,a.indexOffset=ht;let e=a.positionLength*2,p=a.indexLength*2+a.positionLength*6;dt+=e,ht+=p,a.indexLength=p}let U=[];for(l in g)g.hasOwnProperty(l)&&(a=g[l],U.push({color:R.fromRgba(parseInt(l)),offset:a.indexOffset,count:a.indexLength,batchIds:a.batchIds}));for(t=0;t<H;++t){l=x[t],a=g[l];let e=a.offset,p=e*3,L=e,k=at[t],b=c[t],Y=V[t],mt=ot,gt=st;A(T)&&A(C)&&(mt=T[t],gt=C[t]);let q=Number.POSITIVE_INFINITY,J=Number.NEGATIVE_INFINITY,K=Number.POSITIVE_INFINITY,Q=Number.NEGATIVE_INFINITY;for(f=0;f<b;++f){let m=o.unpack(rt,k*3+f*3,wt);w.scaleToGeodeticSurface(m,m);let I=w.cartesianToCartographic(m,Lt),F=I.latitude,pt=I.longitude;q=Math.min(F,q),J=Math.max(F,J),K=Math.min(pt,K),Q=Math.max(pt,Q);let xt=w.geodeticSurfaceNormal(m,Ht),v=o.multiplyByScalar(xt,mt,St),$=o.add(m,v,Ut);v=o.multiplyByScalar(xt,gt,v);let tt=o.add(m,v,Ft);o.subtract(tt,P,tt),o.subtract($,P,$),o.pack(tt,S,p),o.pack($,S,p+3),_[L]=Y,_[L+1]=Y,p+=6,L+=2}h=Mt,h.west=K,h.east=Q,h.south=q,h.north=J,B[t]=M.fromRectangle(h,ot,st,w);let d=a.indexOffset,X=Z[t],Ot=i[t];for(D[t]=d,f=0;f<Ot;f+=3){let m=n[X+f]-k,I=n[X+f+1]-k,F=n[X+f+2]-k;r[d++]=m*2+e,r[d++]=I*2+e,r[d++]=F*2+e,r[d++]=F*2+1+e,r[d++]=I*2+1+e,r[d++]=m*2+1+e}for(f=0;f<b;++f){let m=f,I=(f+1)%b;r[d++]=m*2+1+e,r[d++]=I*2+e,r[d++]=m*2+e,r[d++]=m*2+1+e,r[d++]=I*2+1+e,r[d++]=I*2+e}a.offset+=b*2,a.indexOffset=d,G[t]=d-D[t]}r=W.createTypedArray(S.length/3,r);let At=U.length;for(let e=0;e<At;++e){let p=U[e].batchIds,L=0,k=p.length;for(let b=0;b<k;++b)L+=G[p[b]];U[e].count=L}let Et=r.BYTES_PER_ELEMENT===2?W.UNSIGNED_SHORT:W.UNSIGNED_INT,ut=Ct(Et,B,U);return u.push(S.buffer,r.buffer,D.buffer,G.buffer,_.buffer,ut.buffer),{positions:S.buffer,indices:r.buffer,indexOffsets:D.buffer,indexCounts:G.buffer,batchIds:_.buffer,packedBuffer:ut.buffer}}var Jt=It(Rt);export{Jt as default}; |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.116 | ||
* Version 1.116.1 | ||
* | ||
@@ -26,2 +26,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
import{a as K}from"./chunk-4PZYNNSN.js";import{a as G}from"./chunk-BMTOWA7K.js";import{a as S}from"./chunk-TWAPNO4J.js";import{a as B}from"./chunk-NRW2R4YV.js";import{c as R}from"./chunk-NSILPUHD.js";import"./chunk-M7WODBAD.js";import{a as t,b as _,d as L}from"./chunk-J26GWQSN.js";import{a as F}from"./chunk-PYB3IV2X.js";import"./chunk-H7FFK4U5.js";import"./chunk-YEUII2A5.js";import"./chunk-4353PD6R.js";import"./chunk-2S4UUFD6.js";import"./chunk-42VHSORI.js";var O=32767,ct=new _,rt=new t;function it(n,o,p,m,s){let d=n.length/3,U=n.subarray(0,d),v=n.subarray(d,2*d),P=n.subarray(2*d,3*d);G.zigZagDeltaDecode(U,v,P);let D=new Float64Array(n.length);for(let u=0;u<d;++u){let e=U[u],A=v[u],l=P[u],k=F.lerp(o.west,o.east,e/O),I=F.lerp(o.south,o.north,A/O),E=F.lerp(p,m,l/O),g=_.fromRadians(k,I,E,ct),C=s.cartographicToCartesian(g,rt);t.pack(C,D,u*3)}return D}var Y=it;var X=new R,$=new L,j=new t,H={min:void 0,max:void 0};function at(n){n=new Float64Array(n);let o=0;H.min=n[o++],H.max=n[o++],R.unpack(n,o,X),o+=R.packedLength,L.unpack(n,o,$),o+=L.packedLength,t.unpack(n,o,j)}function ft(n){let o=n.length,p=new Uint32Array(o+1),m=0;for(let s=0;s<o;++s)p[s]=m,m+=n[s];return p[o]=m,p}var Z=new t,q=new t,J=new t,dt=new t,Q=new t;function ut(n,o){let p=new Uint16Array(n.positions),m=new Uint16Array(n.widths),s=new Uint32Array(n.counts),d=new Uint16Array(n.batchIds);at(n.packedBuffer);let U=X,v=$,P=j,D=H.min,u=H.max,e=Y(p,U,D,u,v),A=e.length/3,l=A*4-4,k=new Float32Array(l*3),I=new Float32Array(l*3),E=new Float32Array(l*3),g=new Float32Array(l*2),C=new Uint16Array(l),N=0,z=0,tt=0,r,h=0,M=s.length;for(r=0;r<M;++r){let a=s[r],nt=m[r],ot=d[r];for(let f=0;f<a;++f){let w;if(f===0){let c=t.unpack(e,h*3,Z),T=t.unpack(e,(h+1)*3,q);w=t.subtract(c,T,J),t.add(c,w,w)}else w=t.unpack(e,(h+f-1)*3,J);let W=t.unpack(e,(h+f)*3,dt),x;if(f===a-1){let c=t.unpack(e,(h+a-1)*3,Z),T=t.unpack(e,(h+a-2)*3,q);x=t.subtract(c,T,Q),t.add(c,x,x)}else x=t.unpack(e,(h+f+1)*3,Q);t.subtract(w,P,w),t.subtract(W,P,W),t.subtract(x,P,x);let et=f===0?2:0,st=f===a-1?2:4;for(let c=et;c<st;++c){t.pack(W,k,N),t.pack(w,I,N),t.pack(x,E,N),N+=3;let T=c-2<0?-1:1;g[z++]=2*(c%2)-1,g[z++]=T*nt,C[tt++]=ot}}h+=a}let i=S.createTypedArray(l,A*6-6),b=0,y=0;for(M=A-1,r=0;r<M;++r)i[y++]=b,i[y++]=b+2,i[y++]=b+1,i[y++]=b+1,i[y++]=b+2,i[y++]=b+3,b+=4;o.push(k.buffer,I.buffer,E.buffer),o.push(g.buffer,C.buffer,i.buffer);let V={indexDatatype:i.BYTES_PER_ELEMENT===2?S.UNSIGNED_SHORT:S.UNSIGNED_INT,currentPositions:k.buffer,previousPositions:I.buffer,nextPositions:E.buffer,expandAndWidth:g.buffer,batchIds:C.buffer,indices:i.buffer};if(n.keepDecodedPositions){let a=ft(s);o.push(e.buffer,a.buffer),V=B(V,{decodedPositions:e.buffer,decodedPositionOffsets:a.buffer})}return V}var It=K(ut);export{It as default}; | ||
import{a as K}from"./chunk-F3CCIWXX.js";import{a as G}from"./chunk-JAMWPWOV.js";import{a as S}from"./chunk-ROROM35N.js";import{a as B}from"./chunk-OE3P25NW.js";import{c as R}from"./chunk-HIT4T4MS.js";import"./chunk-3KRBUMEX.js";import{a as t,b as _,d as L}from"./chunk-PQ6NV4GA.js";import{a as F}from"./chunk-74I3QBVP.js";import"./chunk-BLVYEJBC.js";import"./chunk-A6PYE4JS.js";import"./chunk-T23IKWCM.js";import"./chunk-HJ33TVGP.js";import"./chunk-WL4PTXMO.js";var O=32767,ct=new _,rt=new t;function it(n,o,p,m,s){let d=n.length/3,U=n.subarray(0,d),v=n.subarray(d,2*d),P=n.subarray(2*d,3*d);G.zigZagDeltaDecode(U,v,P);let D=new Float64Array(n.length);for(let u=0;u<d;++u){let e=U[u],A=v[u],l=P[u],k=F.lerp(o.west,o.east,e/O),I=F.lerp(o.south,o.north,A/O),E=F.lerp(p,m,l/O),g=_.fromRadians(k,I,E,ct),C=s.cartographicToCartesian(g,rt);t.pack(C,D,u*3)}return D}var Y=it;var X=new R,$=new L,j=new t,H={min:void 0,max:void 0};function at(n){n=new Float64Array(n);let o=0;H.min=n[o++],H.max=n[o++],R.unpack(n,o,X),o+=R.packedLength,L.unpack(n,o,$),o+=L.packedLength,t.unpack(n,o,j)}function ft(n){let o=n.length,p=new Uint32Array(o+1),m=0;for(let s=0;s<o;++s)p[s]=m,m+=n[s];return p[o]=m,p}var Z=new t,q=new t,J=new t,dt=new t,Q=new t;function ut(n,o){let p=new Uint16Array(n.positions),m=new Uint16Array(n.widths),s=new Uint32Array(n.counts),d=new Uint16Array(n.batchIds);at(n.packedBuffer);let U=X,v=$,P=j,D=H.min,u=H.max,e=Y(p,U,D,u,v),A=e.length/3,l=A*4-4,k=new Float32Array(l*3),I=new Float32Array(l*3),E=new Float32Array(l*3),g=new Float32Array(l*2),C=new Uint16Array(l),N=0,z=0,tt=0,r,h=0,M=s.length;for(r=0;r<M;++r){let a=s[r],nt=m[r],ot=d[r];for(let f=0;f<a;++f){let w;if(f===0){let c=t.unpack(e,h*3,Z),T=t.unpack(e,(h+1)*3,q);w=t.subtract(c,T,J),t.add(c,w,w)}else w=t.unpack(e,(h+f-1)*3,J);let W=t.unpack(e,(h+f)*3,dt),x;if(f===a-1){let c=t.unpack(e,(h+a-1)*3,Z),T=t.unpack(e,(h+a-2)*3,q);x=t.subtract(c,T,Q),t.add(c,x,x)}else x=t.unpack(e,(h+f+1)*3,Q);t.subtract(w,P,w),t.subtract(W,P,W),t.subtract(x,P,x);let et=f===0?2:0,st=f===a-1?2:4;for(let c=et;c<st;++c){t.pack(W,k,N),t.pack(w,I,N),t.pack(x,E,N),N+=3;let T=c-2<0?-1:1;g[z++]=2*(c%2)-1,g[z++]=T*nt,C[tt++]=ot}}h+=a}let i=S.createTypedArray(l,A*6-6),b=0,y=0;for(M=A-1,r=0;r<M;++r)i[y++]=b,i[y++]=b+2,i[y++]=b+1,i[y++]=b+1,i[y++]=b+2,i[y++]=b+3,b+=4;o.push(k.buffer,I.buffer,E.buffer),o.push(g.buffer,C.buffer,i.buffer);let V={indexDatatype:i.BYTES_PER_ELEMENT===2?S.UNSIGNED_SHORT:S.UNSIGNED_INT,currentPositions:k.buffer,previousPositions:I.buffer,nextPositions:E.buffer,expandAndWidth:g.buffer,batchIds:C.buffer,indices:i.buffer};if(n.keepDecodedPositions){let a=ft(s);o.push(e.buffer,a.buffer),V=B(V,{decodedPositions:e.buffer,decodedPositionOffsets:a.buffer})}return V}var It=K(ut);export{It as default}; |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.116 | ||
* Version 1.116.1 | ||
* | ||
@@ -26,2 +26,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
import{a as Gt,b as Xt}from"./chunk-JDDR7LGD.js";import{a as kt}from"./chunk-4PZYNNSN.js";import{a as lt}from"./chunk-TM5U646E.js";import{a as Dt}from"./chunk-XORBV237.js";import"./chunk-BMTOWA7K.js";import"./chunk-YPW76GEP.js";import{a as qt}from"./chunk-GKRM7KEL.js";import"./chunk-LGFQRF3V.js";import"./chunk-AHZBRYZA.js";import{d as zt,h as Lt}from"./chunk-HTNJJ6YO.js";import"./chunk-63E276CT.js";import"./chunk-NRW2R4YV.js";import{b as $,c as Ot}from"./chunk-NSILPUHD.js";import"./chunk-M7WODBAD.js";import{a as P,b as N,c as wt,d as Ht}from"./chunk-J26GWQSN.js";import{a as r}from"./chunk-PYB3IV2X.js";import"./chunk-H7FFK4U5.js";import{a as Vt}from"./chunk-YEUII2A5.js";import{a as Ut}from"./chunk-4353PD6R.js";import"./chunk-2S4UUFD6.js";import{e as ht}from"./chunk-42VHSORI.js";var te=Uint16Array.BYTES_PER_ELEMENT,mt=Int32Array.BYTES_PER_ELEMENT,Pt=Uint32Array.BYTES_PER_ELEMENT,ee=Float32Array.BYTES_PER_ELEMENT,H=Float64Array.BYTES_PER_ELEMENT;function tt(n,l,e){e=Ut(e,r);let i=n.length;for(let c=0;c<i;++c)if(e.equalsEpsilon(n[c],l,r.EPSILON12))return c;return-1}function oe(n,l){n.ellipsoid=Ht.clone(n.ellipsoid),n.rectangle=Ot.clone(n.rectangle);let e=se(n.buffer,n.relativeToCenter,n.ellipsoid,n.rectangle,n.nativeRectangle,n.exaggeration,n.exaggerationRelativeHeight,n.skirtHeight,n.includeWebMercatorT,n.negativeAltitudeExponentBias,n.negativeElevationThreshold),i=e.vertices;l.push(i.buffer);let c=e.indices;return l.push(c.buffer),{vertices:i.buffer,indices:c.buffer,numberOfAttributes:e.encoding.stride,minimumHeight:e.minimumHeight,maximumHeight:e.maximumHeight,boundingSphere3D:e.boundingSphere3D,orientedBoundingBox:e.orientedBoundingBox,occludeePointInScaledSpace:e.occludeePointInScaledSpace,encoding:e.encoding,vertexCountWithoutSkirts:e.vertexCountWithoutSkirts,indexCountWithoutSkirts:e.indexCountWithoutSkirts,westIndicesSouthToNorth:e.westIndicesSouthToNorth,southIndicesEastToWest:e.southIndicesEastToWest,eastIndicesNorthToSouth:e.eastIndicesNorthToSouth,northIndicesWestToEast:e.northIndicesWestToEast}}var u=new N,G=new P,ne=new P,ie=new P,re=new $;function se(n,l,e,i,c,et,m,ot,T,nt,it){let I,h,E,f,x,p;ht(i)?(I=i.west,h=i.south,E=i.east,f=i.north,x=i.width,p=i.height):(I=r.toRadians(c.west),h=r.toRadians(c.south),E=r.toRadians(c.east),f=r.toRadians(c.north),x=r.toRadians(i.width),p=r.toRadians(i.height));let X=[h,f],A=[I,E],V=Lt.eastNorthUpToFixedFrame(l,e),j=$.inverseTransformation(V,re),O,Q;T&&(O=lt.geodeticLatitudeToMercatorAngle(h),Q=1/(lt.geodeticLatitudeToMercatorAngle(f)-O));let y=et!==1,a=new DataView(n),z=Number.POSITIVE_INFINITY,J=Number.NEGATIVE_INFINITY,b=ne;b.x=Number.POSITIVE_INFINITY,b.y=Number.POSITIVE_INFINITY,b.z=Number.POSITIVE_INFINITY;let M=ie;M.x=Number.NEGATIVE_INFINITY,M.y=Number.NEGATIVE_INFINITY,M.z=Number.NEGATIVE_INFINITY;let o=0,S=0,At=0,rt,L;for(L=0;L<4;++L){let t=o;rt=a.getUint32(t,!0),t+=Pt;let d=r.toRadians(a.getFloat64(t,!0)*180);t+=H,tt(A,d)===-1&&A.push(d);let Y=r.toRadians(a.getFloat64(t,!0)*180);t+=H,tt(X,Y)===-1&&X.push(Y),t+=2*H;let B=a.getInt32(t,!0);t+=mt,S+=B,B=a.getInt32(t,!0),At+=B*3,o+=rt+Pt}let yt=[],bt=[],g=new Array(S),R=new Array(S),_=new Array(S),C=T?new Array(S):[],F=y?new Array(S):[],v=new Array(At),k=[],st=[],ct=[],W=[],s=0,pt=0;for(o=0,L=0;L<4;++L){rt=a.getUint32(o,!0),o+=Pt;let t=o,d=r.toRadians(a.getFloat64(o,!0)*180);o+=H;let Y=r.toRadians(a.getFloat64(o,!0)*180);o+=H;let B=r.toRadians(a.getFloat64(o,!0)*180),Ft=B*.5;o+=H;let vt=r.toRadians(a.getFloat64(o,!0)*180),Wt=vt*.5;o+=H;let Yt=a.getInt32(o,!0);o+=mt;let Zt=a.getInt32(o,!0);o+=mt,o+=mt;let St=new Array(Yt);for(let U=0;U<Yt;++U){let Z=d+a.getUint8(o++)*B;u.longitude=Z;let D=Y+a.getUint8(o++)*vt;u.latitude=D;let w=a.getFloat32(o,!0);if(o+=ee,w!==0&&w<it&&(w*=-Math.pow(2,nt)),w*=6371010,u.height=w,tt(A,Z)!==-1||tt(X,D)!==-1){let dt=tt(yt,u,N);if(dt===-1)yt.push(N.clone(u)),bt.push(s);else{St[U]=bt[dt];continue}}St[U]=s,Math.abs(Z-I)<Ft?k.push({index:s,cartographic:N.clone(u)}):Math.abs(Z-E)<Ft?ct.push({index:s,cartographic:N.clone(u)}):Math.abs(D-h)<Wt?st.push({index:s,cartographic:N.clone(u)}):Math.abs(D-f)<Wt&&W.push({index:s,cartographic:N.clone(u)}),z=Math.min(w,z),J=Math.max(w,J),_[s]=w;let Nt=e.cartographicToCartesian(u);if(g[s]=Nt,T&&(C[s]=(lt.geodeticLatitudeToMercatorAngle(D)-O)*Q),y){let dt=e.geodeticSurfaceNormal(Nt);F[s]=dt}$.multiplyByPoint(j,Nt,G),P.minimumByComponent(G,b,b),P.maximumByComponent(G,M,M);let Tt=(Z-I)/(E-I);Tt=r.clamp(Tt,0,1);let Bt=(D-h)/(f-h);Bt=r.clamp(Bt,0,1),R[s]=new wt(Tt,Bt),++s}let $t=Zt*3;for(let U=0;U<$t;++U,++pt)v[pt]=St[a.getUint16(o,!0)],o+=te;if(rt!==o-t)throw new Vt("Invalid terrain tile.")}g.length=s,R.length=s,_.length=s,T&&(C.length=s),y&&(F.length=s);let Mt=s,jt=pt,K={hMin:z,lastBorderPoint:void 0,skirtHeight:ot,toENU:j,ellipsoid:e,minimum:b,maximum:M};k.sort(function(t,d){return d.cartographic.latitude-t.cartographic.latitude}),st.sort(function(t,d){return t.cartographic.longitude-d.cartographic.longitude}),ct.sort(function(t,d){return t.cartographic.latitude-d.cartographic.latitude}),W.sort(function(t,d){return d.cartographic.longitude-t.cartographic.longitude});let q=1e-5;if(gt(g,_,R,C,F,v,K,k,-q*x,!0,-q*p),gt(g,_,R,C,F,v,K,st,-q*p,!1),gt(g,_,R,C,F,v,K,ct,q*x,!0,q*p),gt(g,_,R,C,F,v,K,W,q*p,!1),k.length>0&&W.length>0){let t=k[0].index,d=Mt,Y=W[W.length-1].index,B=g.length-1;v.push(Y,B,d,d,t,Y)}S=g.length;let Qt=zt.fromPoints(g),Rt;ht(i)&&(Rt=Dt.fromRectangle(i,z,J,e));let Jt=new Gt(e).computeHorizonCullingPointPossiblyUnderEllipsoid(l,g,z),Kt=new qt(b,M,l),It=new Xt(l,Kt,K.hMin,J,V,!1,T,y,et,m),_t=new Float32Array(S*It.stride),Ct=0;for(let t=0;t<S;++t)Ct=It.encode(_t,Ct,g[t],R[t],_[t],void 0,C[t],F[t]);let at=k.map(function(t){return t.index}).reverse(),Et=st.map(function(t){return t.index}).reverse(),ut=ct.map(function(t){return t.index}).reverse(),xt=W.map(function(t){return t.index}).reverse();return Et.unshift(ut[ut.length-1]),Et.push(at[0]),xt.unshift(at[at.length-1]),xt.push(ut[0]),{vertices:_t,indices:new Uint16Array(v),maximumHeight:J,minimumHeight:z,encoding:It,boundingSphere3D:Qt,orientedBoundingBox:Rt,occludeePointInScaledSpace:Jt,vertexCountWithoutSkirts:Mt,indexCountWithoutSkirts:jt,westIndicesSouthToNorth:at,southIndicesEastToWest:Et,eastIndicesNorthToSouth:ut,northIndicesWestToEast:xt}}function gt(n,l,e,i,c,et,m,ot,T,nt,it){let I=ot.length;for(let h=0;h<I;++h){let E=ot[h],f=E.cartographic,x=E.index,p=n.length,X=f.longitude,A=f.latitude;A=r.clamp(A,-r.PI_OVER_TWO,r.PI_OVER_TWO);let V=f.height-m.skirtHeight;m.hMin=Math.min(m.hMin,V),N.fromRadians(X,A,V,u),nt&&(u.longitude+=T),nt?h===I-1?u.latitude+=it:h===0&&(u.latitude-=it):u.latitude+=T;let j=m.ellipsoid.cartographicToCartesian(u);n.push(j),l.push(V),e.push(wt.clone(e[x])),i.length>0&&i.push(i[x]),c.length>0&&c.push(c[x]),$.multiplyByPoint(m.toENU,j,G);let O=m.minimum,Q=m.maximum;P.minimumByComponent(G,O,O),P.maximumByComponent(G,Q,Q);let ft=m.lastBorderPoint;if(ht(ft)){let y=ft.index;et.push(y,p-1,p,p,x,y)}m.lastBorderPoint=E}}var Ae=kt(oe);export{Ae as default}; | ||
import{a as Gt,b as Xt}from"./chunk-7CWUAQKI.js";import{a as kt}from"./chunk-F3CCIWXX.js";import{a as lt}from"./chunk-WEQDXQHF.js";import{a as Dt}from"./chunk-3HMIEL3B.js";import"./chunk-JAMWPWOV.js";import"./chunk-7E5ZATSO.js";import{a as qt}from"./chunk-XOMW5SDY.js";import"./chunk-QC62DG5W.js";import"./chunk-R6IH5WM5.js";import{d as zt,h as Lt}from"./chunk-DXGEUDM7.js";import"./chunk-5IUHFVP3.js";import"./chunk-OE3P25NW.js";import{b as $,c as Ot}from"./chunk-HIT4T4MS.js";import"./chunk-3KRBUMEX.js";import{a as P,b as N,c as wt,d as Ht}from"./chunk-PQ6NV4GA.js";import{a as r}from"./chunk-74I3QBVP.js";import"./chunk-BLVYEJBC.js";import{a as Vt}from"./chunk-A6PYE4JS.js";import{a as Ut}from"./chunk-T23IKWCM.js";import"./chunk-HJ33TVGP.js";import{e as ht}from"./chunk-WL4PTXMO.js";var te=Uint16Array.BYTES_PER_ELEMENT,mt=Int32Array.BYTES_PER_ELEMENT,Pt=Uint32Array.BYTES_PER_ELEMENT,ee=Float32Array.BYTES_PER_ELEMENT,H=Float64Array.BYTES_PER_ELEMENT;function tt(n,l,e){e=Ut(e,r);let i=n.length;for(let c=0;c<i;++c)if(e.equalsEpsilon(n[c],l,r.EPSILON12))return c;return-1}function oe(n,l){n.ellipsoid=Ht.clone(n.ellipsoid),n.rectangle=Ot.clone(n.rectangle);let e=se(n.buffer,n.relativeToCenter,n.ellipsoid,n.rectangle,n.nativeRectangle,n.exaggeration,n.exaggerationRelativeHeight,n.skirtHeight,n.includeWebMercatorT,n.negativeAltitudeExponentBias,n.negativeElevationThreshold),i=e.vertices;l.push(i.buffer);let c=e.indices;return l.push(c.buffer),{vertices:i.buffer,indices:c.buffer,numberOfAttributes:e.encoding.stride,minimumHeight:e.minimumHeight,maximumHeight:e.maximumHeight,boundingSphere3D:e.boundingSphere3D,orientedBoundingBox:e.orientedBoundingBox,occludeePointInScaledSpace:e.occludeePointInScaledSpace,encoding:e.encoding,vertexCountWithoutSkirts:e.vertexCountWithoutSkirts,indexCountWithoutSkirts:e.indexCountWithoutSkirts,westIndicesSouthToNorth:e.westIndicesSouthToNorth,southIndicesEastToWest:e.southIndicesEastToWest,eastIndicesNorthToSouth:e.eastIndicesNorthToSouth,northIndicesWestToEast:e.northIndicesWestToEast}}var u=new N,G=new P,ne=new P,ie=new P,re=new $;function se(n,l,e,i,c,et,m,ot,T,nt,it){let I,h,E,f,x,p;ht(i)?(I=i.west,h=i.south,E=i.east,f=i.north,x=i.width,p=i.height):(I=r.toRadians(c.west),h=r.toRadians(c.south),E=r.toRadians(c.east),f=r.toRadians(c.north),x=r.toRadians(i.width),p=r.toRadians(i.height));let X=[h,f],A=[I,E],V=Lt.eastNorthUpToFixedFrame(l,e),j=$.inverseTransformation(V,re),O,Q;T&&(O=lt.geodeticLatitudeToMercatorAngle(h),Q=1/(lt.geodeticLatitudeToMercatorAngle(f)-O));let y=et!==1,a=new DataView(n),z=Number.POSITIVE_INFINITY,J=Number.NEGATIVE_INFINITY,b=ne;b.x=Number.POSITIVE_INFINITY,b.y=Number.POSITIVE_INFINITY,b.z=Number.POSITIVE_INFINITY;let M=ie;M.x=Number.NEGATIVE_INFINITY,M.y=Number.NEGATIVE_INFINITY,M.z=Number.NEGATIVE_INFINITY;let o=0,S=0,At=0,rt,L;for(L=0;L<4;++L){let t=o;rt=a.getUint32(t,!0),t+=Pt;let d=r.toRadians(a.getFloat64(t,!0)*180);t+=H,tt(A,d)===-1&&A.push(d);let Y=r.toRadians(a.getFloat64(t,!0)*180);t+=H,tt(X,Y)===-1&&X.push(Y),t+=2*H;let B=a.getInt32(t,!0);t+=mt,S+=B,B=a.getInt32(t,!0),At+=B*3,o+=rt+Pt}let yt=[],bt=[],g=new Array(S),R=new Array(S),_=new Array(S),C=T?new Array(S):[],F=y?new Array(S):[],v=new Array(At),k=[],st=[],ct=[],W=[],s=0,pt=0;for(o=0,L=0;L<4;++L){rt=a.getUint32(o,!0),o+=Pt;let t=o,d=r.toRadians(a.getFloat64(o,!0)*180);o+=H;let Y=r.toRadians(a.getFloat64(o,!0)*180);o+=H;let B=r.toRadians(a.getFloat64(o,!0)*180),Ft=B*.5;o+=H;let vt=r.toRadians(a.getFloat64(o,!0)*180),Wt=vt*.5;o+=H;let Yt=a.getInt32(o,!0);o+=mt;let Zt=a.getInt32(o,!0);o+=mt,o+=mt;let St=new Array(Yt);for(let U=0;U<Yt;++U){let Z=d+a.getUint8(o++)*B;u.longitude=Z;let D=Y+a.getUint8(o++)*vt;u.latitude=D;let w=a.getFloat32(o,!0);if(o+=ee,w!==0&&w<it&&(w*=-Math.pow(2,nt)),w*=6371010,u.height=w,tt(A,Z)!==-1||tt(X,D)!==-1){let dt=tt(yt,u,N);if(dt===-1)yt.push(N.clone(u)),bt.push(s);else{St[U]=bt[dt];continue}}St[U]=s,Math.abs(Z-I)<Ft?k.push({index:s,cartographic:N.clone(u)}):Math.abs(Z-E)<Ft?ct.push({index:s,cartographic:N.clone(u)}):Math.abs(D-h)<Wt?st.push({index:s,cartographic:N.clone(u)}):Math.abs(D-f)<Wt&&W.push({index:s,cartographic:N.clone(u)}),z=Math.min(w,z),J=Math.max(w,J),_[s]=w;let Nt=e.cartographicToCartesian(u);if(g[s]=Nt,T&&(C[s]=(lt.geodeticLatitudeToMercatorAngle(D)-O)*Q),y){let dt=e.geodeticSurfaceNormal(Nt);F[s]=dt}$.multiplyByPoint(j,Nt,G),P.minimumByComponent(G,b,b),P.maximumByComponent(G,M,M);let Tt=(Z-I)/(E-I);Tt=r.clamp(Tt,0,1);let Bt=(D-h)/(f-h);Bt=r.clamp(Bt,0,1),R[s]=new wt(Tt,Bt),++s}let $t=Zt*3;for(let U=0;U<$t;++U,++pt)v[pt]=St[a.getUint16(o,!0)],o+=te;if(rt!==o-t)throw new Vt("Invalid terrain tile.")}g.length=s,R.length=s,_.length=s,T&&(C.length=s),y&&(F.length=s);let Mt=s,jt=pt,K={hMin:z,lastBorderPoint:void 0,skirtHeight:ot,toENU:j,ellipsoid:e,minimum:b,maximum:M};k.sort(function(t,d){return d.cartographic.latitude-t.cartographic.latitude}),st.sort(function(t,d){return t.cartographic.longitude-d.cartographic.longitude}),ct.sort(function(t,d){return t.cartographic.latitude-d.cartographic.latitude}),W.sort(function(t,d){return d.cartographic.longitude-t.cartographic.longitude});let q=1e-5;if(gt(g,_,R,C,F,v,K,k,-q*x,!0,-q*p),gt(g,_,R,C,F,v,K,st,-q*p,!1),gt(g,_,R,C,F,v,K,ct,q*x,!0,q*p),gt(g,_,R,C,F,v,K,W,q*p,!1),k.length>0&&W.length>0){let t=k[0].index,d=Mt,Y=W[W.length-1].index,B=g.length-1;v.push(Y,B,d,d,t,Y)}S=g.length;let Qt=zt.fromPoints(g),Rt;ht(i)&&(Rt=Dt.fromRectangle(i,z,J,e));let Jt=new Gt(e).computeHorizonCullingPointPossiblyUnderEllipsoid(l,g,z),Kt=new qt(b,M,l),It=new Xt(l,Kt,K.hMin,J,V,!1,T,y,et,m),_t=new Float32Array(S*It.stride),Ct=0;for(let t=0;t<S;++t)Ct=It.encode(_t,Ct,g[t],R[t],_[t],void 0,C[t],F[t]);let at=k.map(function(t){return t.index}).reverse(),Et=st.map(function(t){return t.index}).reverse(),ut=ct.map(function(t){return t.index}).reverse(),xt=W.map(function(t){return t.index}).reverse();return Et.unshift(ut[ut.length-1]),Et.push(at[0]),xt.unshift(at[at.length-1]),xt.push(ut[0]),{vertices:_t,indices:new Uint16Array(v),maximumHeight:J,minimumHeight:z,encoding:It,boundingSphere3D:Qt,orientedBoundingBox:Rt,occludeePointInScaledSpace:Jt,vertexCountWithoutSkirts:Mt,indexCountWithoutSkirts:jt,westIndicesSouthToNorth:at,southIndicesEastToWest:Et,eastIndicesNorthToSouth:ut,northIndicesWestToEast:xt}}function gt(n,l,e,i,c,et,m,ot,T,nt,it){let I=ot.length;for(let h=0;h<I;++h){let E=ot[h],f=E.cartographic,x=E.index,p=n.length,X=f.longitude,A=f.latitude;A=r.clamp(A,-r.PI_OVER_TWO,r.PI_OVER_TWO);let V=f.height-m.skirtHeight;m.hMin=Math.min(m.hMin,V),N.fromRadians(X,A,V,u),nt&&(u.longitude+=T),nt?h===I-1?u.latitude+=it:h===0&&(u.latitude-=it):u.latitude+=T;let j=m.ellipsoid.cartographicToCartesian(u);n.push(j),l.push(V),e.push(wt.clone(e[x])),i.length>0&&i.push(i[x]),c.length>0&&c.push(c[x]),$.multiplyByPoint(m.toENU,j,G);let O=m.minimum,Q=m.maximum;P.minimumByComponent(G,O,O),P.maximumByComponent(G,Q,Q);let ft=m.lastBorderPoint;if(ht(ft)){let y=ft.index;et.push(y,p-1,p,p,x,y)}m.lastBorderPoint=E}}var Ae=kt(oe);export{Ae as default}; |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.116 | ||
* Version 1.116.1 | ||
* | ||
@@ -26,2 +26,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
import{a as sr,b as fr}from"./chunk-JDDR7LGD.js";import{a as tr}from"./chunk-4PZYNNSN.js";import{a as Ue}from"./chunk-TM5U646E.js";import{a as ar}from"./chunk-XORBV237.js";import"./chunk-BMTOWA7K.js";import"./chunk-YPW76GEP.js";import{a as nr}from"./chunk-GKRM7KEL.js";import"./chunk-LGFQRF3V.js";import"./chunk-AHZBRYZA.js";import{d as rr,h as ir}from"./chunk-HTNJJ6YO.js";import"./chunk-63E276CT.js";import"./chunk-NRW2R4YV.js";import{b as xe,c as ae}from"./chunk-NSILPUHD.js";import"./chunk-M7WODBAD.js";import{a as ie,c as er,d as Ie}from"./chunk-J26GWQSN.js";import{a as ge}from"./chunk-PYB3IV2X.js";import"./chunk-H7FFK4U5.js";import{a as He}from"./chunk-YEUII2A5.js";import{a as Y}from"./chunk-4353PD6R.js";import{a as he}from"./chunk-2S4UUFD6.js";import{c as Ir,d as xr,e as G}from"./chunk-42VHSORI.js";var ur=Ir((qr,Te)=>{/* Copyright 2015-2018 Esri. 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 @preserve */(function(){var D=function(){var A={};A.defaultNoDataValue=-34027999387901484e22,A.decode=function(r,a){a=a||{};var t=a.encodedMaskData||a.encodedMaskData===null,i=n(r,a.inputOffset||0,t),o=a.noDataValue!==null?a.noDataValue:A.defaultNoDataValue,s=V(i,a.pixelType||Float32Array,a.encodedMaskData,o,a.returnMask),u={width:i.width,height:i.height,pixelData:s.resultPixels,minValue:s.minValue,maxValue:i.pixels.maxValue,noDataValue:o};return s.resultMask&&(u.maskData=s.resultMask),a.returnEncodedMask&&i.mask&&(u.encodedMaskData=i.mask.bitset?i.mask.bitset:null),a.returnFileInfo&&(u.fileInfo=b(i),a.computeUsedBitDepths&&(u.fileInfo.bitDepths=X(i))),u};var V=function(r,a,t,i,o){var s=0,u=r.pixels.numBlocksX,m=r.pixels.numBlocksY,l=Math.floor(r.width/u),f=Math.floor(r.height/m),h=2*r.maxZError,c=Number.MAX_VALUE,g;t=t||(r.mask?r.mask.bitset:null);var v,U;v=new a(r.width*r.height),o&&t&&(U=new Uint8Array(r.width*r.height));for(var M=new Float32Array(l*f),S,I,k=0;k<=m;k++){var w=k!==m?f:r.height%m;if(w!==0)for(var d=0;d<=u;d++){var x=d!==u?l:r.width%u;if(x!==0){var T=k*r.width*f+d*l,y=r.width-x,p=r.pixels.blocks[s],L,B,E;p.encoding<2?(p.encoding===0?L=p.rawData:(e(p.stuffedData,p.bitsPerPixel,p.numValidPixels,p.offset,h,M,r.pixels.maxValue),L=M),B=0):p.encoding===2?E=0:E=p.offset;var O;if(t)for(I=0;I<w;I++){for(T&7&&(O=t[T>>3],O<<=T&7),S=0;S<x;S++)T&7||(O=t[T>>3]),O&128?(U&&(U[T]=1),g=p.encoding<2?L[B++]:E,c=c>g?g:c,v[T++]=g):(U&&(U[T]=0),v[T++]=i),O<<=1;T+=y}else if(p.encoding<2)for(I=0;I<w;I++){for(S=0;S<x;S++)g=L[B++],c=c>g?g:c,v[T++]=g;T+=y}else for(c=c>E?E:c,I=0;I<w;I++){for(S=0;S<x;S++)v[T++]=E;T+=y}if(p.encoding===1&&B!==p.numValidPixels)throw"Block and Mask do not match";s++}}}return{resultPixels:v,resultMask:U,minValue:c}},b=function(r){return{fileIdentifierString:r.fileIdentifierString,fileVersion:r.fileVersion,imageType:r.imageType,height:r.height,width:r.width,maxZError:r.maxZError,eofOffset:r.eofOffset,mask:r.mask?{numBlocksX:r.mask.numBlocksX,numBlocksY:r.mask.numBlocksY,numBytes:r.mask.numBytes,maxValue:r.mask.maxValue}:null,pixels:{numBlocksX:r.pixels.numBlocksX,numBlocksY:r.pixels.numBlocksY,numBytes:r.pixels.numBytes,maxValue:r.pixels.maxValue,noDataValue:r.noDataValue}}},X=function(r){for(var a=r.pixels.numBlocksX*r.pixels.numBlocksY,t={},i=0;i<a;i++){var o=r.pixels.blocks[i];o.encoding===0?t.float32=!0:o.encoding===1?t[o.bitsPerPixel]=!0:t[0]=!0}return Object.keys(t)},n=function(r,a,t){var i={},o=new Uint8Array(r,a,10);if(i.fileIdentifierString=String.fromCharCode.apply(null,o),i.fileIdentifierString.trim()!=="CntZImage")throw"Unexpected file identifier string: "+i.fileIdentifierString;a+=10;var s=new DataView(r,a,24);if(i.fileVersion=s.getInt32(0,!0),i.imageType=s.getInt32(4,!0),i.height=s.getUint32(8,!0),i.width=s.getUint32(12,!0),i.maxZError=s.getFloat64(16,!0),a+=24,!t)if(s=new DataView(r,a,16),i.mask={},i.mask.numBlocksY=s.getUint32(0,!0),i.mask.numBlocksX=s.getUint32(4,!0),i.mask.numBytes=s.getUint32(8,!0),i.mask.maxValue=s.getFloat32(12,!0),a+=16,i.mask.numBytes>0){var u=new Uint8Array(Math.ceil(i.width*i.height/8));s=new DataView(r,a,i.mask.numBytes);var m=s.getInt16(0,!0),l=2,f=0;do{if(m>0)for(;m--;)u[f++]=s.getUint8(l++);else{var h=s.getUint8(l++);for(m=-m;m--;)u[f++]=h}m=s.getInt16(l,!0),l+=2}while(l<i.mask.numBytes);if(m!==-32768||f<u.length)throw"Unexpected end of mask RLE encoding";i.mask.bitset=u,a+=i.mask.numBytes}else i.mask.numBytes|i.mask.numBlocksY|i.mask.maxValue||(i.mask.bitset=new Uint8Array(Math.ceil(i.width*i.height/8)));s=new DataView(r,a,16),i.pixels={},i.pixels.numBlocksY=s.getUint32(0,!0),i.pixels.numBlocksX=s.getUint32(4,!0),i.pixels.numBytes=s.getUint32(8,!0),i.pixels.maxValue=s.getFloat32(12,!0),a+=16;var c=i.pixels.numBlocksX,g=i.pixels.numBlocksY,v=c+(i.width%c>0?1:0),U=g+(i.height%g>0?1:0);i.pixels.blocks=new Array(v*U);for(var M=0,S=0;S<U;S++)for(var I=0;I<v;I++){var k=0,w=r.byteLength-a;s=new DataView(r,a,Math.min(10,w));var d={};i.pixels.blocks[M++]=d;var x=s.getUint8(0);if(k++,d.encoding=x&63,d.encoding>3)throw"Invalid block encoding ("+d.encoding+")";if(d.encoding===2){a++;continue}if(x!==0&&x!==2){if(x>>=6,d.offsetType=x,x===2)d.offset=s.getInt8(1),k++;else if(x===1)d.offset=s.getInt16(1,!0),k+=2;else if(x===0)d.offset=s.getFloat32(1,!0),k+=4;else throw"Invalid block offset type";if(d.encoding===1)if(x=s.getUint8(k),k++,d.bitsPerPixel=x&63,x>>=6,d.numValidPixelsType=x,x===2)d.numValidPixels=s.getUint8(k),k++;else if(x===1)d.numValidPixels=s.getUint16(k,!0),k+=2;else if(x===0)d.numValidPixels=s.getUint32(k,!0),k+=4;else throw"Invalid valid pixel count type"}if(a+=k,d.encoding!==3){var T,y;if(d.encoding===0){var p=(i.pixels.numBytes-1)/4;if(p!==Math.floor(p))throw"uncompressed block has invalid length";T=new ArrayBuffer(p*4),y=new Uint8Array(T),y.set(new Uint8Array(r,a,p*4));var L=new Float32Array(T);d.rawData=L,a+=p*4}else if(d.encoding===1){var B=Math.ceil(d.numValidPixels*d.bitsPerPixel/8),E=Math.ceil(B/4);T=new ArrayBuffer(E*4),y=new Uint8Array(T),y.set(new Uint8Array(r,a,B)),d.stuffedData=new Uint32Array(T),a+=B}}}return i.eofOffset=a,i},e=function(r,a,t,i,o,s,u){var m=(1<<a)-1,l=0,f,h=0,c,g,v=Math.ceil((u-i)/o),U=r.length*4-Math.ceil(a*t/8);for(r[r.length-1]<<=8*U,f=0;f<t;f++){if(h===0&&(g=r[l++],h=32),h>=a)c=g>>>h-a&m,h-=a;else{var M=a-h;c=(g&m)<<M&m,g=r[l++],h=32-M,c+=g>>>h}s[f]=c<v?i+c*o:u}return s};return A}(),se=function(){"use strict";var A={unstuff:function(n,e,r,a,t,i,o,s){var u=(1<<r)-1,m=0,l,f=0,h,c,g,v,U=n.length*4-Math.ceil(r*a/8);if(n[n.length-1]<<=8*U,t)for(l=0;l<a;l++)f===0&&(c=n[m++],f=32),f>=r?(h=c>>>f-r&u,f-=r):(g=r-f,h=(c&u)<<g&u,c=n[m++],f=32-g,h+=c>>>f),e[l]=t[h];else for(v=Math.ceil((s-i)/o),l=0;l<a;l++)f===0&&(c=n[m++],f=32),f>=r?(h=c>>>f-r&u,f-=r):(g=r-f,h=(c&u)<<g&u,c=n[m++],f=32-g,h+=c>>>f),e[l]=h<v?i+h*o:s},unstuffLUT:function(n,e,r,a,t,i){var o=(1<<e)-1,s=0,u=0,m=0,l=0,f=0,h,c=[],g=n.length*4-Math.ceil(e*r/8);n[n.length-1]<<=8*g;var v=Math.ceil((i-a)/t);for(u=0;u<r;u++)l===0&&(h=n[s++],l=32),l>=e?(f=h>>>l-e&o,l-=e):(m=e-l,f=(h&o)<<m&o,h=n[s++],l=32-m,f+=h>>>l),c[u]=f<v?a+f*t:i;return c.unshift(a),c},unstuff2:function(n,e,r,a,t,i,o,s){var u=(1<<r)-1,m=0,l,f=0,h=0,c,g,v;if(t)for(l=0;l<a;l++)f===0&&(g=n[m++],f=32,h=0),f>=r?(c=g>>>h&u,f-=r,h+=r):(v=r-f,c=g>>>h&u,g=n[m++],f=32-v,c|=(g&(1<<v)-1)<<r-v,h=v),e[l]=t[c];else{var U=Math.ceil((s-i)/o);for(l=0;l<a;l++)f===0&&(g=n[m++],f=32,h=0),f>=r?(c=g>>>h&u,f-=r,h+=r):(v=r-f,c=g>>>h&u,g=n[m++],f=32-v,c|=(g&(1<<v)-1)<<r-v,h=v),e[l]=c<U?i+c*o:s}return e},unstuffLUT2:function(n,e,r,a,t,i){var o=(1<<e)-1,s=0,u=0,m=0,l=0,f=0,h=0,c,g=[],v=Math.ceil((i-a)/t);for(u=0;u<r;u++)l===0&&(c=n[s++],l=32,h=0),l>=e?(f=c>>>h&o,l-=e,h+=e):(m=e-l,f=c>>>h&o,c=n[s++],l=32-m,f|=(c&(1<<m)-1)<<e-m,h=m),g[u]=f<v?a+f*t:i;return g.unshift(a),g},originalUnstuff:function(n,e,r,a){var t=(1<<r)-1,i=0,o,s=0,u,m,l,f=n.length*4-Math.ceil(r*a/8);for(n[n.length-1]<<=8*f,o=0;o<a;o++)s===0&&(m=n[i++],s=32),s>=r?(u=m>>>s-r&t,s-=r):(l=r-s,u=(m&t)<<l&t,m=n[i++],s=32-l,u+=m>>>s),e[o]=u;return e},originalUnstuff2:function(n,e,r,a){var t=(1<<r)-1,i=0,o,s=0,u=0,m,l,f;for(o=0;o<a;o++)s===0&&(l=n[i++],s=32,u=0),s>=r?(m=l>>>u&t,s-=r,u+=r):(f=r-s,m=l>>>u&t,l=n[i++],s=32-f,m|=(l&(1<<f)-1)<<r-f,u=f),e[o]=m;return e}},V={HUFFMAN_LUT_BITS_MAX:12,computeChecksumFletcher32:function(n){for(var e=65535,r=65535,a=n.length,t=Math.floor(a/2),i=0;t;){var o=t>=359?359:t;t-=o;do e+=n[i++]<<8,r+=e+=n[i++];while(--o);e=(e&65535)+(e>>>16),r=(r&65535)+(r>>>16)}return a&1&&(r+=e+=n[i]<<8),e=(e&65535)+(e>>>16),r=(r&65535)+(r>>>16),(r<<16|e)>>>0},readHeaderInfo:function(n,e){var r=e.ptr,a=new Uint8Array(n,r,6),t={};if(t.fileIdentifierString=String.fromCharCode.apply(null,a),t.fileIdentifierString.lastIndexOf("Lerc2",0)!==0)throw"Unexpected file identifier string (expect Lerc2 ): "+t.fileIdentifierString;r+=6;var i=new DataView(n,r,8),o=i.getInt32(0,!0);t.fileVersion=o,r+=4,o>=3&&(t.checksum=i.getUint32(4,!0),r+=4),i=new DataView(n,r,12),t.height=i.getUint32(0,!0),t.width=i.getUint32(4,!0),r+=8,o>=4?(t.numDims=i.getUint32(8,!0),r+=4):t.numDims=1,i=new DataView(n,r,40),t.numValidPixel=i.getUint32(0,!0),t.microBlockSize=i.getInt32(4,!0),t.blobSize=i.getInt32(8,!0),t.imageType=i.getInt32(12,!0),t.maxZError=i.getFloat64(16,!0),t.zMin=i.getFloat64(24,!0),t.zMax=i.getFloat64(32,!0),r+=40,e.headerInfo=t,e.ptr=r;var s,u;if(o>=3&&(u=o>=4?52:48,s=this.computeChecksumFletcher32(new Uint8Array(n,r-u,t.blobSize-14)),s!==t.checksum))throw"Checksum failed.";return!0},checkMinMaxRanges:function(n,e){var r=e.headerInfo,a=this.getDataTypeArray(r.imageType),t=r.numDims*this.getDataTypeSize(r.imageType),i=this.readSubArray(n,e.ptr,a,t),o=this.readSubArray(n,e.ptr+t,a,t);e.ptr+=2*t;var s,u=!0;for(s=0;s<r.numDims;s++)if(i[s]!==o[s]){u=!1;break}return r.minValues=i,r.maxValues=o,u},readSubArray:function(n,e,r,a){var t;if(r===Uint8Array)t=new Uint8Array(n,e,a);else{var i=new ArrayBuffer(a),o=new Uint8Array(i);o.set(new Uint8Array(n,e,a)),t=new r(i)}return t},readMask:function(n,e){var r=e.ptr,a=e.headerInfo,t=a.width*a.height,i=a.numValidPixel,o=new DataView(n,r,4),s={};if(s.numBytes=o.getUint32(0,!0),r+=4,(i===0||t===i)&&s.numBytes!==0)throw"invalid mask";var u,m;if(i===0)u=new Uint8Array(Math.ceil(t/8)),s.bitset=u,m=new Uint8Array(t),e.pixels.resultMask=m,r+=s.numBytes;else if(s.numBytes>0){u=new Uint8Array(Math.ceil(t/8)),o=new DataView(n,r,s.numBytes);var l=o.getInt16(0,!0),f=2,h=0,c=0;do{if(l>0)for(;l--;)u[h++]=o.getUint8(f++);else for(c=o.getUint8(f++),l=-l;l--;)u[h++]=c;l=o.getInt16(f,!0),f+=2}while(f<s.numBytes);if(l!==-32768||h<u.length)throw"Unexpected end of mask RLE encoding";m=new Uint8Array(t);var g=0,v=0;for(v=0;v<t;v++)v&7?(g=u[v>>3],g<<=v&7):g=u[v>>3],g&128&&(m[v]=1);e.pixels.resultMask=m,s.bitset=u,r+=s.numBytes}return e.ptr=r,e.mask=s,!0},readDataOneSweep:function(n,e,r){var a=e.ptr,t=e.headerInfo,i=t.numDims,o=t.width*t.height,s=t.imageType,u=t.numValidPixel*V.getDataTypeSize(s)*i,m,l=e.pixels.resultMask;if(r===Uint8Array)m=new Uint8Array(n,a,u);else{var f=new ArrayBuffer(u),h=new Uint8Array(f);h.set(new Uint8Array(n,a,u)),m=new r(f)}if(m.length===o*i)e.pixels.resultPixels=m;else{e.pixels.resultPixels=new r(o*i);var c=0,g=0,v=0,U=0;if(i>1)for(v=0;v<i;v++)for(U=v*o,g=0;g<o;g++)l[g]&&(e.pixels.resultPixels[U+g]=m[c++]);else for(g=0;g<o;g++)l[g]&&(e.pixels.resultPixels[g]=m[c++])}return a+=u,e.ptr=a,!0},readHuffmanTree:function(n,e){var r=this.HUFFMAN_LUT_BITS_MAX,a=new DataView(n,e.ptr,16);e.ptr+=16;var t=a.getInt32(0,!0);if(t<2)throw"unsupported Huffman version";var i=a.getInt32(4,!0),o=a.getInt32(8,!0),s=a.getInt32(12,!0);if(o>=s)return!1;var u=new Uint32Array(s-o);V.decodeBits(n,e,u);var m=[],l,f,h,c;for(l=o;l<s;l++)f=l-(l<i?0:i),m[f]={first:u[l-o],second:null};var g=n.byteLength-e.ptr,v=Math.ceil(g/4),U=new ArrayBuffer(v*4),M=new Uint8Array(U);M.set(new Uint8Array(n,e.ptr,g));var S=new Uint32Array(U),I=0,k,w=0;for(k=S[0],l=o;l<s;l++)f=l-(l<i?0:i),c=m[f].first,c>0&&(m[f].second=k<<I>>>32-c,32-I>=c?(I+=c,I===32&&(I=0,w++,k=S[w])):(I+=c-32,w++,k=S[w],m[f].second|=k>>>32-I));var d=0,x=0,T=new b;for(l=0;l<m.length;l++)m[l]!==void 0&&(d=Math.max(d,m[l].first));d>=r?x=r:x=d,d>=30&&console.log("WARning, large NUM LUT BITS IS "+d);var y=[],p,L,B,E,O,F;for(l=o;l<s;l++)if(f=l-(l<i?0:i),c=m[f].first,c>0)if(p=[c,f],c<=x)for(L=m[f].second<<x-c,B=1<<x-c,h=0;h<B;h++)y[L|h]=p;else for(L=m[f].second,F=T,E=c-1;E>=0;E--)O=L>>>E&1,O?(F.right||(F.right=new b),F=F.right):(F.left||(F.left=new b),F=F.left),E===0&&!F.val&&(F.val=p[1]);return{decodeLut:y,numBitsLUTQick:x,numBitsLUT:d,tree:T,stuffedData:S,srcPtr:w,bitPos:I}},readHuffman:function(n,e,r){var a=e.headerInfo,t=a.numDims,i=e.headerInfo.height,o=e.headerInfo.width,s=o*i,u=this.readHuffmanTree(n,e),m=u.decodeLut,l=u.tree,f=u.stuffedData,h=u.srcPtr,c=u.bitPos,g=u.numBitsLUTQick,v=u.numBitsLUT,U=e.headerInfo.imageType===0?128:0,M,S,I,k=e.pixels.resultMask,w,d,x,T,y,p,L,B=0;c>0&&(h++,c=0);var E=f[h],O=e.encodeMode===1,F=new r(s*t),N=F,z;for(z=0;z<a.numDims;z++){if(t>1&&(N=new r(F.buffer,s*z,s),B=0),e.headerInfo.numValidPixel===o*i)for(p=0,T=0;T<i;T++)for(y=0;y<o;y++,p++){if(S=0,w=E<<c>>>32-g,d=w,32-c<g&&(w|=f[h+1]>>>64-c-g,d=w),m[d])S=m[d][1],c+=m[d][0];else for(w=E<<c>>>32-v,d=w,32-c<v&&(w|=f[h+1]>>>64-c-v,d=w),M=l,L=0;L<v;L++)if(x=w>>>v-L-1&1,M=x?M.right:M.left,!(M.left||M.right)){S=M.val,c=c+L+1;break}c>=32&&(c-=32,h++,E=f[h]),I=S-U,O?(y>0?I+=B:T>0?I+=N[p-o]:I+=B,I&=255,N[p]=I,B=I):N[p]=I}else for(p=0,T=0;T<i;T++)for(y=0;y<o;y++,p++)if(k[p]){if(S=0,w=E<<c>>>32-g,d=w,32-c<g&&(w|=f[h+1]>>>64-c-g,d=w),m[d])S=m[d][1],c+=m[d][0];else for(w=E<<c>>>32-v,d=w,32-c<v&&(w|=f[h+1]>>>64-c-v,d=w),M=l,L=0;L<v;L++)if(x=w>>>v-L-1&1,M=x?M.right:M.left,!(M.left||M.right)){S=M.val,c=c+L+1;break}c>=32&&(c-=32,h++,E=f[h]),I=S-U,O?(y>0&&k[p-1]?I+=B:T>0&&k[p-o]?I+=N[p-o]:I+=B,I&=255,N[p]=I,B=I):N[p]=I}e.ptr=e.ptr+(h+1)*4+(c>0?4:0)}e.pixels.resultPixels=F},decodeBits:function(n,e,r,a,t){{var i=e.headerInfo,o=i.fileVersion,s=0,u=new DataView(n,e.ptr,5),m=u.getUint8(0);s++;var l=m>>6,f=l===0?4:3-l,h=(m&32)>0,c=m&31,g=0;if(f===1)g=u.getUint8(s),s++;else if(f===2)g=u.getUint16(s,!0),s+=2;else if(f===4)g=u.getUint32(s,!0),s+=4;else throw"Invalid valid pixel count type";var v=2*i.maxZError,U,M,S,I,k,w,d,x,T,y,p=i.numDims>1?i.maxValues[t]:i.zMax;if(h){for(e.counter.lut++,x=u.getUint8(s),T=c,s++,I=Math.ceil((x-1)*c/8),k=Math.ceil(I/4),M=new ArrayBuffer(k*4),S=new Uint8Array(M),e.ptr+=s,S.set(new Uint8Array(n,e.ptr,I)),d=new Uint32Array(M),e.ptr+=I,y=0;x-1>>>y;)y++;I=Math.ceil(g*y/8),k=Math.ceil(I/4),M=new ArrayBuffer(k*4),S=new Uint8Array(M),S.set(new Uint8Array(n,e.ptr,I)),U=new Uint32Array(M),e.ptr+=I,o>=3?w=A.unstuffLUT2(d,c,x-1,a,v,p):w=A.unstuffLUT(d,c,x-1,a,v,p),o>=3?A.unstuff2(U,r,y,g,w):A.unstuff(U,r,y,g,w)}else e.counter.bitstuffer++,y=c,e.ptr+=s,y>0&&(I=Math.ceil(g*y/8),k=Math.ceil(I/4),M=new ArrayBuffer(k*4),S=new Uint8Array(M),S.set(new Uint8Array(n,e.ptr,I)),U=new Uint32Array(M),e.ptr+=I,o>=3?a==null?A.originalUnstuff2(U,r,y,g):A.unstuff2(U,r,y,g,!1,a,v,p):a==null?A.originalUnstuff(U,r,y,g):A.unstuff(U,r,y,g,!1,a,v,p))}},readTiles:function(n,e,r){var a=e.headerInfo,t=a.width,i=a.height,o=a.microBlockSize,s=a.imageType,u=V.getDataTypeSize(s),m=Math.ceil(t/o),l=Math.ceil(i/o);e.pixels.numBlocksY=l,e.pixels.numBlocksX=m,e.pixels.ptr=0;var f=0,h=0,c=0,g=0,v=0,U=0,M=0,S=0,I=0,k=0,w=0,d=0,x=0,T=0,y=0,p=0,L,B,E,O,F,N,z=new r(o*o),ke=i%o||o,ye=t%o||o,J,Z,ue=a.numDims,te,j=e.pixels.resultMask,q=e.pixels.resultPixels;for(c=0;c<l;c++)for(v=c!==l-1?o:ke,g=0;g<m;g++)for(U=g!==m-1?o:ye,w=c*t*o+g*o,d=t-U,te=0;te<ue;te++){if(ue>1&&(q=new r(e.pixels.resultPixels.buffer,t*i*te*u,t*i)),M=n.byteLength-e.ptr,L=new DataView(n,e.ptr,Math.min(10,M)),B={},p=0,S=L.getUint8(0),p++,I=S>>6&255,k=S>>2&15,k!==(g*o>>3&15))throw"integrity issue";if(N=S&3,N>3)throw e.ptr+=p,"Invalid block encoding ("+N+")";if(N===2){e.counter.constant++,e.ptr+=p;continue}else if(N===0){if(e.counter.uncompressed++,e.ptr+=p,x=v*U*u,T=n.byteLength-e.ptr,x=x<T?x:T,E=new ArrayBuffer(x%u===0?x:x+u-x%u),O=new Uint8Array(E),O.set(new Uint8Array(n,e.ptr,x)),F=new r(E),y=0,j)for(f=0;f<v;f++){for(h=0;h<U;h++)j[w]&&(q[w]=F[y++]),w++;w+=d}else for(f=0;f<v;f++){for(h=0;h<U;h++)q[w++]=F[y++];w+=d}e.ptr+=y*u}else if(J=V.getDataTypeUsed(s,I),Z=V.getOnePixel(B,p,J,L),p+=V.getDataTypeSize(J),N===3)if(e.ptr+=p,e.counter.constantoffset++,j)for(f=0;f<v;f++){for(h=0;h<U;h++)j[w]&&(q[w]=Z),w++;w+=d}else for(f=0;f<v;f++){for(h=0;h<U;h++)q[w++]=Z;w+=d}else if(e.ptr+=p,V.decodeBits(n,e,z,Z,te),p=0,j)for(f=0;f<v;f++){for(h=0;h<U;h++)j[w]&&(q[w]=z[p++]),w++;w+=d}else for(f=0;f<v;f++){for(h=0;h<U;h++)q[w++]=z[p++];w+=d}}},formatFileInfo:function(n){return{fileIdentifierString:n.headerInfo.fileIdentifierString,fileVersion:n.headerInfo.fileVersion,imageType:n.headerInfo.imageType,height:n.headerInfo.height,width:n.headerInfo.width,numValidPixel:n.headerInfo.numValidPixel,microBlockSize:n.headerInfo.microBlockSize,blobSize:n.headerInfo.blobSize,maxZError:n.headerInfo.maxZError,pixelType:V.getPixelType(n.headerInfo.imageType),eofOffset:n.eofOffset,mask:n.mask?{numBytes:n.mask.numBytes}:null,pixels:{numBlocksX:n.pixels.numBlocksX,numBlocksY:n.pixels.numBlocksY,maxValue:n.headerInfo.zMax,minValue:n.headerInfo.zMin,noDataValue:n.noDataValue}}},constructConstantSurface:function(n){var e=n.headerInfo.zMax,r=n.headerInfo.numDims,a=n.headerInfo.height*n.headerInfo.width,t=a*r,i=0,o=0,s=0,u=n.pixels.resultMask;if(u)if(r>1)for(i=0;i<r;i++)for(s=i*a,o=0;o<a;o++)u[o]&&(n.pixels.resultPixels[s+o]=e);else for(o=0;o<a;o++)u[o]&&(n.pixels.resultPixels[o]=e);else if(n.pixels.resultPixels.fill)n.pixels.resultPixels.fill(e);else for(o=0;o<t;o++)n.pixels.resultPixels[o]=e},getDataTypeArray:function(n){var e;switch(n){case 0:e=Int8Array;break;case 1:e=Uint8Array;break;case 2:e=Int16Array;break;case 3:e=Uint16Array;break;case 4:e=Int32Array;break;case 5:e=Uint32Array;break;case 6:e=Float32Array;break;case 7:e=Float64Array;break;default:e=Float32Array}return e},getPixelType:function(n){var e;switch(n){case 0:e="S8";break;case 1:e="U8";break;case 2:e="S16";break;case 3:e="U16";break;case 4:e="S32";break;case 5:e="U32";break;case 6:e="F32";break;case 7:e="F64";break;default:e="F32"}return e},isValidPixelValue:function(n,e){if(e==null)return!1;var r;switch(n){case 0:r=e>=-128&&e<=127;break;case 1:r=e>=0&&e<=255;break;case 2:r=e>=-32768&&e<=32767;break;case 3:r=e>=0&&e<=65536;break;case 4:r=e>=-2147483648&&e<=2147483647;break;case 5:r=e>=0&&e<=4294967296;break;case 6:r=e>=-34027999387901484e22&&e<=34027999387901484e22;break;case 7:r=e>=5e-324&&e<=17976931348623157e292;break;default:r=!1}return r},getDataTypeSize:function(n){var e=0;switch(n){case 0:case 1:e=1;break;case 2:case 3:e=2;break;case 4:case 5:case 6:e=4;break;case 7:e=8;break;default:e=n}return e},getDataTypeUsed:function(n,e){var r=n;switch(n){case 2:case 4:r=n-e;break;case 3:case 5:r=n-2*e;break;case 6:e===0?r=n:e===1?r=2:r=1;break;case 7:e===0?r=n:r=n-2*e+1;break;default:r=n;break}return r},getOnePixel:function(n,e,r,a){var t=0;switch(r){case 0:t=a.getInt8(e);break;case 1:t=a.getUint8(e);break;case 2:t=a.getInt16(e,!0);break;case 3:t=a.getUint16(e,!0);break;case 4:t=a.getInt32(e,!0);break;case 5:t=a.getUInt32(e,!0);break;case 6:t=a.getFloat32(e,!0);break;case 7:t=a.getFloat64(e,!0);break;default:throw"the decoder does not understand this pixel type"}return t}},b=function(n,e,r){this.val=n,this.left=e,this.right=r},X={decode:function(n,e){e=e||{};var r=e.noDataValue,a=0,t={};if(t.ptr=e.inputOffset||0,t.pixels={},!!V.readHeaderInfo(n,t)){var i=t.headerInfo,o=i.fileVersion,s=V.getDataTypeArray(i.imageType);V.readMask(n,t),i.numValidPixel!==i.width*i.height&&!t.pixels.resultMask&&(t.pixels.resultMask=e.maskData);var u=i.width*i.height;if(t.pixels.resultPixels=new s(u*i.numDims),t.counter={onesweep:0,uncompressed:0,lut:0,bitstuffer:0,constant:0,constantoffset:0},i.numValidPixel!==0)if(i.zMax===i.zMin)V.constructConstantSurface(t);else if(o>=4&&V.checkMinMaxRanges(n,t))V.constructConstantSurface(t);else{var m=new DataView(n,t.ptr,2),l=m.getUint8(0);if(t.ptr++,l)V.readDataOneSweep(n,t,s);else if(o>1&&i.imageType<=1&&Math.abs(i.maxZError-.5)<1e-5){var f=m.getUint8(1);if(t.ptr++,t.encodeMode=f,f>2||o<4&&f>1)throw"Invalid Huffman flag "+f;f?V.readHuffman(n,t,s):V.readTiles(n,t,s)}else V.readTiles(n,t,s)}t.eofOffset=t.ptr;var h;e.inputOffset?(h=t.headerInfo.blobSize+e.inputOffset-t.ptr,Math.abs(h)>=1&&(t.eofOffset=e.inputOffset+t.headerInfo.blobSize)):(h=t.headerInfo.blobSize-t.ptr,Math.abs(h)>=1&&(t.eofOffset=t.headerInfo.blobSize));var c={width:i.width,height:i.height,pixelData:t.pixels.resultPixels,minValue:i.zMin,maxValue:i.zMax,validPixelCount:i.numValidPixel,dimCount:i.numDims,dimStats:{minValues:i.minValues,maxValues:i.maxValues},maskData:t.pixels.resultMask};if(t.pixels.resultMask&&V.isValidPixelValue(i.imageType,r)){var g=t.pixels.resultMask;for(a=0;a<u;a++)g[a]||(c.pixelData[a]=r);c.noDataValue=r}return t.noDataValue=r,e.returnFileInfo&&(c.fileInfo=V.formatFileInfo(t)),c}},getBandCount:function(n){var e=0,r=0,a={};for(a.ptr=0,a.pixels={};r<n.byteLength-58;)V.readHeaderInfo(n,a),r+=a.headerInfo.blobSize,e++,a.ptr=r;return e}};return X}(),C=function(){var A=new ArrayBuffer(4),V=new Uint8Array(A),b=new Uint32Array(A);return b[0]=1,V[0]===1}(),re={decode:function(A,V){if(!C)throw"Big endian system is not supported.";V=V||{};var b=V.inputOffset||0,X=new Uint8Array(A,b,10),n=String.fromCharCode.apply(null,X),e,r;if(n.trim()==="CntZImage")e=D,r=1;else if(n.substring(0,5)==="Lerc2")e=se,r=2;else throw"Unexpected file identifier string: "+n;for(var a=0,t=A.byteLength-10,i,o=[],s,u,m={width:0,height:0,pixels:[],pixelType:V.pixelType,mask:null,statistics:[]};b<t;){var l=e.decode(A,{inputOffset:b,encodedMaskData:i,maskData:u,returnMask:a===0,returnEncodedMask:a===0,returnFileInfo:!0,pixelType:V.pixelType||null,noDataValue:V.noDataValue||null});b=l.fileInfo.eofOffset,a===0&&(i=l.encodedMaskData,u=l.maskData,m.width=l.width,m.height=l.height,m.dimCount=l.dimCount||1,m.pixelType=l.pixelType||l.fileInfo.pixelType,m.mask=l.maskData),r>1&&l.fileInfo.mask&&l.fileInfo.mask.numBytes>0&&o.push(l.maskData),a++,m.pixels.push(l.pixelData),m.statistics.push({minValue:l.minValue,maxValue:l.maxValue,noDataValue:l.noDataValue,dimStats:l.dimStats})}var f,h,c;if(r>1&&o.length>1){for(c=m.width*m.height,m.bandMasks=o,u=new Uint8Array(c),u.set(o[0]),f=1;f<o.length;f++)for(s=o[f],h=0;h<c;h++)u[h]=u[h]&s[h];m.maskData=u}return m}};typeof define=="function"&&define.amd?define([],function(){return re}):typeof Te<"u"&&Te.exports?Te.exports=re:this.Lerc=re})()});var Ur={NONE:0,LERC:1},or=Object.freeze(Ur);var Q={};Q.DEFAULT_STRUCTURE=Object.freeze({heightScale:1,heightOffset:0,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1});var Ye=new ie,Tr=new xe,kr=new ie,yr=new ie;Q.computeVertices=function(D){if(!G(D)||!G(D.heightmap))throw new he("options.heightmap is required.");if(!G(D.width)||!G(D.height))throw new he("options.width and options.height are required.");if(!G(D.nativeRectangle))throw new he("options.nativeRectangle is required.");if(!G(D.skirtHeight))throw new he("options.skirtHeight is required.");let se=Math.cos,C=Math.sin,re=Math.sqrt,A=Math.atan,V=Math.exp,b=ge.PI_OVER_TWO,X=ge.toRadians,n=D.heightmap,e=D.width,r=D.height,a=D.skirtHeight,t=a>0,i=Y(D.isGeographic,!0),o=Y(D.ellipsoid,Ie.WGS84),s=1/o.maximumRadius,u=ae.clone(D.nativeRectangle),m=ae.clone(D.rectangle),l,f,h,c;G(m)?(l=m.west,f=m.south,h=m.east,c=m.north):i?(l=X(u.west),f=X(u.south),h=X(u.east),c=X(u.north)):(l=u.west*s,f=b-2*A(V(-u.south*s)),h=u.east*s,c=b-2*A(V(-u.north*s)));let g=D.relativeToCenter,v=G(g);g=v?g:ie.ZERO;let U=Y(D.includeWebMercatorT,!1),M=Y(D.exaggeration,1),S=Y(D.exaggerationRelativeHeight,0),k=M!==1,w=Y(D.structure,Q.DEFAULT_STRUCTURE),d=Y(w.heightScale,Q.DEFAULT_STRUCTURE.heightScale),x=Y(w.heightOffset,Q.DEFAULT_STRUCTURE.heightOffset),T=Y(w.elementsPerHeight,Q.DEFAULT_STRUCTURE.elementsPerHeight),y=Y(w.stride,Q.DEFAULT_STRUCTURE.stride),p=Y(w.elementMultiplier,Q.DEFAULT_STRUCTURE.elementMultiplier),L=Y(w.isBigEndian,Q.DEFAULT_STRUCTURE.isBigEndian),B=ae.computeWidth(u),E=ae.computeHeight(u),O=B/(e-1),F=E/(r-1);i||(B*=s,E*=s);let N=o.radiiSquared,z=N.x,ke=N.y,ye=N.z,J=65536,Z=-65536,ue=ir.eastNorthUpToFixedFrame(g,o),te=xe.inverseTransformation(ue,Tr),j,q;U&&(j=Ue.geodeticLatitudeToMercatorAngle(f),q=1/(Ue.geodeticLatitudeToMercatorAngle(c)-j));let fe=kr;fe.x=Number.POSITIVE_INFINITY,fe.y=Number.POSITIVE_INFINITY,fe.z=Number.POSITIVE_INFINITY;let oe=yr;oe.x=Number.NEGATIVE_INFINITY,oe.y=Number.NEGATIVE_INFINITY,oe.z=Number.NEGATIVE_INFINITY;let Me=Number.POSITIVE_INFINITY,ce=e*r,mr=a>0?e*2+r*2:0,ne=ce+mr,ve=new Array(ne),Xe=new Array(ne),_e=new Array(ne),ze=U?new Array(ne):[],Ze=k?new Array(ne):[],Se=0,Ve=r,De=0,Ae=e;t&&(--Se,++Ve,--De,++Ae);let de=1e-5;for(let H=Se;H<Ve;++H){let K=H;K<0&&(K=0),K>=r&&(K=r-1);let W=u.north-F*K;i?W=X(W):W=b-2*A(V(-W*s));let Le=(W-f)/(c-f);Le=ge.clamp(Le,0,1);let we=H===Se,pe=H===Ve-1;a>0&&(we?W+=de*E:pe&&(W-=de*E));let Qe=se(W),Be=C(W),Je=ye*Be,Ke;U&&(Ke=(Ue.geodeticLatitudeToMercatorAngle(W)-j)*q);for(let me=De;me<Ae;++me){let $=me;$<0&&($=0),$>=e&&($=e-1);let Fe=K*(e*y)+$*y,R;if(T===1)R=n[Fe];else{R=0;let _;if(L)for(_=0;_<T;++_)R=R*p+n[Fe+_];else for(_=T-1;_>=0;--_)R=R*p+n[Fe+_]}R=R*d+x,Z=Math.max(Z,R),J=Math.min(J,R);let P=u.west+O*$;i?P=X(P):P=P*s;let be=(P-l)/(h-l);be=ge.clamp(be,0,1);let ee=K*e+$;if(a>0){let _=me===De,Re=me===Ae-1,pr=we||pe||_||Re;if((we||pe)&&(_||Re))continue;pr&&(R-=a,_?(ee=ce+(r-K-1),P-=de*B):pe?ee=ce+r+(e-$-1):Re?(ee=ce+r+e+K,P+=de*B):we&&(ee=ce+r+e+r+$))}let Ne=Qe*se(P),Ce=Qe*C(P),$e=z*Ne,Pe=ke*Ce,Oe=1/re($e*Ne+Pe*Ce+Je*Be),vr=$e*Oe,dr=Pe*Oe,wr=Je*Oe,le=new ie;le.x=vr+Ne*R,le.y=dr+Ce*R,le.z=wr+Be*R,xe.multiplyByPoint(te,le,Ye),ie.minimumByComponent(Ye,fe,fe),ie.maximumByComponent(Ye,oe,oe),Me=Math.min(Me,R),ve[ee]=le,_e[ee]=new er(be,Le),Xe[ee]=R,U&&(ze[ee]=Ke),k&&(Ze[ee]=o.geodeticSurfaceNormal(le))}}let hr=rr.fromPoints(ve),je;G(m)&&(je=ar.fromRectangle(m,J,Z,o));let qe;v&&(qe=new sr(o).computeHorizonCullingPointPossiblyUnderEllipsoid(g,ve,J));let gr=new nr(fe,oe,g),Ee=new fr(g,gr,Me,Z,ue,!1,U,k,M,S),We=new Float32Array(ne*Ee.stride),Ge=0;for(let H=0;H<ne;++H)Ge=Ee.encode(We,Ge,ve[H],_e[H],Xe[H],void 0,ze[H],Ze[H]);return{vertices:We,maximumHeight:Z,minimumHeight:J,encoding:Ee,boundingSphere3D:hr,orientedBoundingBox:je,occludeePointInScaledSpace:qe}};var lr=Q;var cr=xr(ur(),1);function Mr(D,se){if(D.encoding===or.LERC){let A;try{A=cr.default.decode(D.heightmap)}catch(b){throw new He(b)}if(A.statistics[0].minValue===Number.MAX_VALUE)throw new He("Invalid tile data");D.heightmap=A.pixels[0],D.width=A.width,D.height=A.height}D.ellipsoid=Ie.clone(D.ellipsoid),D.rectangle=ae.clone(D.rectangle);let C=lr.computeVertices(D),re=C.vertices;return se.push(re.buffer),{vertices:re.buffer,numberOfAttributes:C.encoding.stride,minimumHeight:C.minimumHeight,maximumHeight:C.maximumHeight,gridWidth:D.width,gridHeight:D.height,boundingSphere3D:C.boundingSphere3D,orientedBoundingBox:C.orientedBoundingBox,occludeePointInScaledSpace:C.occludeePointInScaledSpace,encoding:C.encoding,westIndicesSouthToNorth:C.westIndicesSouthToNorth,southIndicesEastToWest:C.southIndicesEastToWest,eastIndicesNorthToSouth:C.eastIndicesNorthToSouth,northIndicesWestToEast:C.northIndicesWestToEast}}var Pr=tr(Mr);export{Pr as default}; | ||
import{a as sr,b as fr}from"./chunk-7CWUAQKI.js";import{a as tr}from"./chunk-F3CCIWXX.js";import{a as Ue}from"./chunk-WEQDXQHF.js";import{a as ar}from"./chunk-3HMIEL3B.js";import"./chunk-JAMWPWOV.js";import"./chunk-7E5ZATSO.js";import{a as nr}from"./chunk-XOMW5SDY.js";import"./chunk-QC62DG5W.js";import"./chunk-R6IH5WM5.js";import{d as rr,h as ir}from"./chunk-DXGEUDM7.js";import"./chunk-5IUHFVP3.js";import"./chunk-OE3P25NW.js";import{b as xe,c as ae}from"./chunk-HIT4T4MS.js";import"./chunk-3KRBUMEX.js";import{a as ie,c as er,d as Ie}from"./chunk-PQ6NV4GA.js";import{a as ge}from"./chunk-74I3QBVP.js";import"./chunk-BLVYEJBC.js";import{a as He}from"./chunk-A6PYE4JS.js";import{a as Y}from"./chunk-T23IKWCM.js";import{a as he}from"./chunk-HJ33TVGP.js";import{c as Ir,d as xr,e as G}from"./chunk-WL4PTXMO.js";var ur=Ir((qr,Te)=>{/* Copyright 2015-2018 Esri. 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 @preserve */(function(){var D=function(){var A={};A.defaultNoDataValue=-34027999387901484e22,A.decode=function(r,a){a=a||{};var t=a.encodedMaskData||a.encodedMaskData===null,i=n(r,a.inputOffset||0,t),o=a.noDataValue!==null?a.noDataValue:A.defaultNoDataValue,s=V(i,a.pixelType||Float32Array,a.encodedMaskData,o,a.returnMask),u={width:i.width,height:i.height,pixelData:s.resultPixels,minValue:s.minValue,maxValue:i.pixels.maxValue,noDataValue:o};return s.resultMask&&(u.maskData=s.resultMask),a.returnEncodedMask&&i.mask&&(u.encodedMaskData=i.mask.bitset?i.mask.bitset:null),a.returnFileInfo&&(u.fileInfo=b(i),a.computeUsedBitDepths&&(u.fileInfo.bitDepths=X(i))),u};var V=function(r,a,t,i,o){var s=0,u=r.pixels.numBlocksX,m=r.pixels.numBlocksY,l=Math.floor(r.width/u),f=Math.floor(r.height/m),h=2*r.maxZError,c=Number.MAX_VALUE,g;t=t||(r.mask?r.mask.bitset:null);var v,U;v=new a(r.width*r.height),o&&t&&(U=new Uint8Array(r.width*r.height));for(var M=new Float32Array(l*f),S,I,k=0;k<=m;k++){var w=k!==m?f:r.height%m;if(w!==0)for(var d=0;d<=u;d++){var x=d!==u?l:r.width%u;if(x!==0){var T=k*r.width*f+d*l,y=r.width-x,p=r.pixels.blocks[s],L,B,E;p.encoding<2?(p.encoding===0?L=p.rawData:(e(p.stuffedData,p.bitsPerPixel,p.numValidPixels,p.offset,h,M,r.pixels.maxValue),L=M),B=0):p.encoding===2?E=0:E=p.offset;var O;if(t)for(I=0;I<w;I++){for(T&7&&(O=t[T>>3],O<<=T&7),S=0;S<x;S++)T&7||(O=t[T>>3]),O&128?(U&&(U[T]=1),g=p.encoding<2?L[B++]:E,c=c>g?g:c,v[T++]=g):(U&&(U[T]=0),v[T++]=i),O<<=1;T+=y}else if(p.encoding<2)for(I=0;I<w;I++){for(S=0;S<x;S++)g=L[B++],c=c>g?g:c,v[T++]=g;T+=y}else for(c=c>E?E:c,I=0;I<w;I++){for(S=0;S<x;S++)v[T++]=E;T+=y}if(p.encoding===1&&B!==p.numValidPixels)throw"Block and Mask do not match";s++}}}return{resultPixels:v,resultMask:U,minValue:c}},b=function(r){return{fileIdentifierString:r.fileIdentifierString,fileVersion:r.fileVersion,imageType:r.imageType,height:r.height,width:r.width,maxZError:r.maxZError,eofOffset:r.eofOffset,mask:r.mask?{numBlocksX:r.mask.numBlocksX,numBlocksY:r.mask.numBlocksY,numBytes:r.mask.numBytes,maxValue:r.mask.maxValue}:null,pixels:{numBlocksX:r.pixels.numBlocksX,numBlocksY:r.pixels.numBlocksY,numBytes:r.pixels.numBytes,maxValue:r.pixels.maxValue,noDataValue:r.noDataValue}}},X=function(r){for(var a=r.pixels.numBlocksX*r.pixels.numBlocksY,t={},i=0;i<a;i++){var o=r.pixels.blocks[i];o.encoding===0?t.float32=!0:o.encoding===1?t[o.bitsPerPixel]=!0:t[0]=!0}return Object.keys(t)},n=function(r,a,t){var i={},o=new Uint8Array(r,a,10);if(i.fileIdentifierString=String.fromCharCode.apply(null,o),i.fileIdentifierString.trim()!=="CntZImage")throw"Unexpected file identifier string: "+i.fileIdentifierString;a+=10;var s=new DataView(r,a,24);if(i.fileVersion=s.getInt32(0,!0),i.imageType=s.getInt32(4,!0),i.height=s.getUint32(8,!0),i.width=s.getUint32(12,!0),i.maxZError=s.getFloat64(16,!0),a+=24,!t)if(s=new DataView(r,a,16),i.mask={},i.mask.numBlocksY=s.getUint32(0,!0),i.mask.numBlocksX=s.getUint32(4,!0),i.mask.numBytes=s.getUint32(8,!0),i.mask.maxValue=s.getFloat32(12,!0),a+=16,i.mask.numBytes>0){var u=new Uint8Array(Math.ceil(i.width*i.height/8));s=new DataView(r,a,i.mask.numBytes);var m=s.getInt16(0,!0),l=2,f=0;do{if(m>0)for(;m--;)u[f++]=s.getUint8(l++);else{var h=s.getUint8(l++);for(m=-m;m--;)u[f++]=h}m=s.getInt16(l,!0),l+=2}while(l<i.mask.numBytes);if(m!==-32768||f<u.length)throw"Unexpected end of mask RLE encoding";i.mask.bitset=u,a+=i.mask.numBytes}else i.mask.numBytes|i.mask.numBlocksY|i.mask.maxValue||(i.mask.bitset=new Uint8Array(Math.ceil(i.width*i.height/8)));s=new DataView(r,a,16),i.pixels={},i.pixels.numBlocksY=s.getUint32(0,!0),i.pixels.numBlocksX=s.getUint32(4,!0),i.pixels.numBytes=s.getUint32(8,!0),i.pixels.maxValue=s.getFloat32(12,!0),a+=16;var c=i.pixels.numBlocksX,g=i.pixels.numBlocksY,v=c+(i.width%c>0?1:0),U=g+(i.height%g>0?1:0);i.pixels.blocks=new Array(v*U);for(var M=0,S=0;S<U;S++)for(var I=0;I<v;I++){var k=0,w=r.byteLength-a;s=new DataView(r,a,Math.min(10,w));var d={};i.pixels.blocks[M++]=d;var x=s.getUint8(0);if(k++,d.encoding=x&63,d.encoding>3)throw"Invalid block encoding ("+d.encoding+")";if(d.encoding===2){a++;continue}if(x!==0&&x!==2){if(x>>=6,d.offsetType=x,x===2)d.offset=s.getInt8(1),k++;else if(x===1)d.offset=s.getInt16(1,!0),k+=2;else if(x===0)d.offset=s.getFloat32(1,!0),k+=4;else throw"Invalid block offset type";if(d.encoding===1)if(x=s.getUint8(k),k++,d.bitsPerPixel=x&63,x>>=6,d.numValidPixelsType=x,x===2)d.numValidPixels=s.getUint8(k),k++;else if(x===1)d.numValidPixels=s.getUint16(k,!0),k+=2;else if(x===0)d.numValidPixels=s.getUint32(k,!0),k+=4;else throw"Invalid valid pixel count type"}if(a+=k,d.encoding!==3){var T,y;if(d.encoding===0){var p=(i.pixels.numBytes-1)/4;if(p!==Math.floor(p))throw"uncompressed block has invalid length";T=new ArrayBuffer(p*4),y=new Uint8Array(T),y.set(new Uint8Array(r,a,p*4));var L=new Float32Array(T);d.rawData=L,a+=p*4}else if(d.encoding===1){var B=Math.ceil(d.numValidPixels*d.bitsPerPixel/8),E=Math.ceil(B/4);T=new ArrayBuffer(E*4),y=new Uint8Array(T),y.set(new Uint8Array(r,a,B)),d.stuffedData=new Uint32Array(T),a+=B}}}return i.eofOffset=a,i},e=function(r,a,t,i,o,s,u){var m=(1<<a)-1,l=0,f,h=0,c,g,v=Math.ceil((u-i)/o),U=r.length*4-Math.ceil(a*t/8);for(r[r.length-1]<<=8*U,f=0;f<t;f++){if(h===0&&(g=r[l++],h=32),h>=a)c=g>>>h-a&m,h-=a;else{var M=a-h;c=(g&m)<<M&m,g=r[l++],h=32-M,c+=g>>>h}s[f]=c<v?i+c*o:u}return s};return A}(),se=function(){"use strict";var A={unstuff:function(n,e,r,a,t,i,o,s){var u=(1<<r)-1,m=0,l,f=0,h,c,g,v,U=n.length*4-Math.ceil(r*a/8);if(n[n.length-1]<<=8*U,t)for(l=0;l<a;l++)f===0&&(c=n[m++],f=32),f>=r?(h=c>>>f-r&u,f-=r):(g=r-f,h=(c&u)<<g&u,c=n[m++],f=32-g,h+=c>>>f),e[l]=t[h];else for(v=Math.ceil((s-i)/o),l=0;l<a;l++)f===0&&(c=n[m++],f=32),f>=r?(h=c>>>f-r&u,f-=r):(g=r-f,h=(c&u)<<g&u,c=n[m++],f=32-g,h+=c>>>f),e[l]=h<v?i+h*o:s},unstuffLUT:function(n,e,r,a,t,i){var o=(1<<e)-1,s=0,u=0,m=0,l=0,f=0,h,c=[],g=n.length*4-Math.ceil(e*r/8);n[n.length-1]<<=8*g;var v=Math.ceil((i-a)/t);for(u=0;u<r;u++)l===0&&(h=n[s++],l=32),l>=e?(f=h>>>l-e&o,l-=e):(m=e-l,f=(h&o)<<m&o,h=n[s++],l=32-m,f+=h>>>l),c[u]=f<v?a+f*t:i;return c.unshift(a),c},unstuff2:function(n,e,r,a,t,i,o,s){var u=(1<<r)-1,m=0,l,f=0,h=0,c,g,v;if(t)for(l=0;l<a;l++)f===0&&(g=n[m++],f=32,h=0),f>=r?(c=g>>>h&u,f-=r,h+=r):(v=r-f,c=g>>>h&u,g=n[m++],f=32-v,c|=(g&(1<<v)-1)<<r-v,h=v),e[l]=t[c];else{var U=Math.ceil((s-i)/o);for(l=0;l<a;l++)f===0&&(g=n[m++],f=32,h=0),f>=r?(c=g>>>h&u,f-=r,h+=r):(v=r-f,c=g>>>h&u,g=n[m++],f=32-v,c|=(g&(1<<v)-1)<<r-v,h=v),e[l]=c<U?i+c*o:s}return e},unstuffLUT2:function(n,e,r,a,t,i){var o=(1<<e)-1,s=0,u=0,m=0,l=0,f=0,h=0,c,g=[],v=Math.ceil((i-a)/t);for(u=0;u<r;u++)l===0&&(c=n[s++],l=32,h=0),l>=e?(f=c>>>h&o,l-=e,h+=e):(m=e-l,f=c>>>h&o,c=n[s++],l=32-m,f|=(c&(1<<m)-1)<<e-m,h=m),g[u]=f<v?a+f*t:i;return g.unshift(a),g},originalUnstuff:function(n,e,r,a){var t=(1<<r)-1,i=0,o,s=0,u,m,l,f=n.length*4-Math.ceil(r*a/8);for(n[n.length-1]<<=8*f,o=0;o<a;o++)s===0&&(m=n[i++],s=32),s>=r?(u=m>>>s-r&t,s-=r):(l=r-s,u=(m&t)<<l&t,m=n[i++],s=32-l,u+=m>>>s),e[o]=u;return e},originalUnstuff2:function(n,e,r,a){var t=(1<<r)-1,i=0,o,s=0,u=0,m,l,f;for(o=0;o<a;o++)s===0&&(l=n[i++],s=32,u=0),s>=r?(m=l>>>u&t,s-=r,u+=r):(f=r-s,m=l>>>u&t,l=n[i++],s=32-f,m|=(l&(1<<f)-1)<<r-f,u=f),e[o]=m;return e}},V={HUFFMAN_LUT_BITS_MAX:12,computeChecksumFletcher32:function(n){for(var e=65535,r=65535,a=n.length,t=Math.floor(a/2),i=0;t;){var o=t>=359?359:t;t-=o;do e+=n[i++]<<8,r+=e+=n[i++];while(--o);e=(e&65535)+(e>>>16),r=(r&65535)+(r>>>16)}return a&1&&(r+=e+=n[i]<<8),e=(e&65535)+(e>>>16),r=(r&65535)+(r>>>16),(r<<16|e)>>>0},readHeaderInfo:function(n,e){var r=e.ptr,a=new Uint8Array(n,r,6),t={};if(t.fileIdentifierString=String.fromCharCode.apply(null,a),t.fileIdentifierString.lastIndexOf("Lerc2",0)!==0)throw"Unexpected file identifier string (expect Lerc2 ): "+t.fileIdentifierString;r+=6;var i=new DataView(n,r,8),o=i.getInt32(0,!0);t.fileVersion=o,r+=4,o>=3&&(t.checksum=i.getUint32(4,!0),r+=4),i=new DataView(n,r,12),t.height=i.getUint32(0,!0),t.width=i.getUint32(4,!0),r+=8,o>=4?(t.numDims=i.getUint32(8,!0),r+=4):t.numDims=1,i=new DataView(n,r,40),t.numValidPixel=i.getUint32(0,!0),t.microBlockSize=i.getInt32(4,!0),t.blobSize=i.getInt32(8,!0),t.imageType=i.getInt32(12,!0),t.maxZError=i.getFloat64(16,!0),t.zMin=i.getFloat64(24,!0),t.zMax=i.getFloat64(32,!0),r+=40,e.headerInfo=t,e.ptr=r;var s,u;if(o>=3&&(u=o>=4?52:48,s=this.computeChecksumFletcher32(new Uint8Array(n,r-u,t.blobSize-14)),s!==t.checksum))throw"Checksum failed.";return!0},checkMinMaxRanges:function(n,e){var r=e.headerInfo,a=this.getDataTypeArray(r.imageType),t=r.numDims*this.getDataTypeSize(r.imageType),i=this.readSubArray(n,e.ptr,a,t),o=this.readSubArray(n,e.ptr+t,a,t);e.ptr+=2*t;var s,u=!0;for(s=0;s<r.numDims;s++)if(i[s]!==o[s]){u=!1;break}return r.minValues=i,r.maxValues=o,u},readSubArray:function(n,e,r,a){var t;if(r===Uint8Array)t=new Uint8Array(n,e,a);else{var i=new ArrayBuffer(a),o=new Uint8Array(i);o.set(new Uint8Array(n,e,a)),t=new r(i)}return t},readMask:function(n,e){var r=e.ptr,a=e.headerInfo,t=a.width*a.height,i=a.numValidPixel,o=new DataView(n,r,4),s={};if(s.numBytes=o.getUint32(0,!0),r+=4,(i===0||t===i)&&s.numBytes!==0)throw"invalid mask";var u,m;if(i===0)u=new Uint8Array(Math.ceil(t/8)),s.bitset=u,m=new Uint8Array(t),e.pixels.resultMask=m,r+=s.numBytes;else if(s.numBytes>0){u=new Uint8Array(Math.ceil(t/8)),o=new DataView(n,r,s.numBytes);var l=o.getInt16(0,!0),f=2,h=0,c=0;do{if(l>0)for(;l--;)u[h++]=o.getUint8(f++);else for(c=o.getUint8(f++),l=-l;l--;)u[h++]=c;l=o.getInt16(f,!0),f+=2}while(f<s.numBytes);if(l!==-32768||h<u.length)throw"Unexpected end of mask RLE encoding";m=new Uint8Array(t);var g=0,v=0;for(v=0;v<t;v++)v&7?(g=u[v>>3],g<<=v&7):g=u[v>>3],g&128&&(m[v]=1);e.pixels.resultMask=m,s.bitset=u,r+=s.numBytes}return e.ptr=r,e.mask=s,!0},readDataOneSweep:function(n,e,r){var a=e.ptr,t=e.headerInfo,i=t.numDims,o=t.width*t.height,s=t.imageType,u=t.numValidPixel*V.getDataTypeSize(s)*i,m,l=e.pixels.resultMask;if(r===Uint8Array)m=new Uint8Array(n,a,u);else{var f=new ArrayBuffer(u),h=new Uint8Array(f);h.set(new Uint8Array(n,a,u)),m=new r(f)}if(m.length===o*i)e.pixels.resultPixels=m;else{e.pixels.resultPixels=new r(o*i);var c=0,g=0,v=0,U=0;if(i>1)for(v=0;v<i;v++)for(U=v*o,g=0;g<o;g++)l[g]&&(e.pixels.resultPixels[U+g]=m[c++]);else for(g=0;g<o;g++)l[g]&&(e.pixels.resultPixels[g]=m[c++])}return a+=u,e.ptr=a,!0},readHuffmanTree:function(n,e){var r=this.HUFFMAN_LUT_BITS_MAX,a=new DataView(n,e.ptr,16);e.ptr+=16;var t=a.getInt32(0,!0);if(t<2)throw"unsupported Huffman version";var i=a.getInt32(4,!0),o=a.getInt32(8,!0),s=a.getInt32(12,!0);if(o>=s)return!1;var u=new Uint32Array(s-o);V.decodeBits(n,e,u);var m=[],l,f,h,c;for(l=o;l<s;l++)f=l-(l<i?0:i),m[f]={first:u[l-o],second:null};var g=n.byteLength-e.ptr,v=Math.ceil(g/4),U=new ArrayBuffer(v*4),M=new Uint8Array(U);M.set(new Uint8Array(n,e.ptr,g));var S=new Uint32Array(U),I=0,k,w=0;for(k=S[0],l=o;l<s;l++)f=l-(l<i?0:i),c=m[f].first,c>0&&(m[f].second=k<<I>>>32-c,32-I>=c?(I+=c,I===32&&(I=0,w++,k=S[w])):(I+=c-32,w++,k=S[w],m[f].second|=k>>>32-I));var d=0,x=0,T=new b;for(l=0;l<m.length;l++)m[l]!==void 0&&(d=Math.max(d,m[l].first));d>=r?x=r:x=d,d>=30&&console.log("WARning, large NUM LUT BITS IS "+d);var y=[],p,L,B,E,O,F;for(l=o;l<s;l++)if(f=l-(l<i?0:i),c=m[f].first,c>0)if(p=[c,f],c<=x)for(L=m[f].second<<x-c,B=1<<x-c,h=0;h<B;h++)y[L|h]=p;else for(L=m[f].second,F=T,E=c-1;E>=0;E--)O=L>>>E&1,O?(F.right||(F.right=new b),F=F.right):(F.left||(F.left=new b),F=F.left),E===0&&!F.val&&(F.val=p[1]);return{decodeLut:y,numBitsLUTQick:x,numBitsLUT:d,tree:T,stuffedData:S,srcPtr:w,bitPos:I}},readHuffman:function(n,e,r){var a=e.headerInfo,t=a.numDims,i=e.headerInfo.height,o=e.headerInfo.width,s=o*i,u=this.readHuffmanTree(n,e),m=u.decodeLut,l=u.tree,f=u.stuffedData,h=u.srcPtr,c=u.bitPos,g=u.numBitsLUTQick,v=u.numBitsLUT,U=e.headerInfo.imageType===0?128:0,M,S,I,k=e.pixels.resultMask,w,d,x,T,y,p,L,B=0;c>0&&(h++,c=0);var E=f[h],O=e.encodeMode===1,F=new r(s*t),N=F,z;for(z=0;z<a.numDims;z++){if(t>1&&(N=new r(F.buffer,s*z,s),B=0),e.headerInfo.numValidPixel===o*i)for(p=0,T=0;T<i;T++)for(y=0;y<o;y++,p++){if(S=0,w=E<<c>>>32-g,d=w,32-c<g&&(w|=f[h+1]>>>64-c-g,d=w),m[d])S=m[d][1],c+=m[d][0];else for(w=E<<c>>>32-v,d=w,32-c<v&&(w|=f[h+1]>>>64-c-v,d=w),M=l,L=0;L<v;L++)if(x=w>>>v-L-1&1,M=x?M.right:M.left,!(M.left||M.right)){S=M.val,c=c+L+1;break}c>=32&&(c-=32,h++,E=f[h]),I=S-U,O?(y>0?I+=B:T>0?I+=N[p-o]:I+=B,I&=255,N[p]=I,B=I):N[p]=I}else for(p=0,T=0;T<i;T++)for(y=0;y<o;y++,p++)if(k[p]){if(S=0,w=E<<c>>>32-g,d=w,32-c<g&&(w|=f[h+1]>>>64-c-g,d=w),m[d])S=m[d][1],c+=m[d][0];else for(w=E<<c>>>32-v,d=w,32-c<v&&(w|=f[h+1]>>>64-c-v,d=w),M=l,L=0;L<v;L++)if(x=w>>>v-L-1&1,M=x?M.right:M.left,!(M.left||M.right)){S=M.val,c=c+L+1;break}c>=32&&(c-=32,h++,E=f[h]),I=S-U,O?(y>0&&k[p-1]?I+=B:T>0&&k[p-o]?I+=N[p-o]:I+=B,I&=255,N[p]=I,B=I):N[p]=I}e.ptr=e.ptr+(h+1)*4+(c>0?4:0)}e.pixels.resultPixels=F},decodeBits:function(n,e,r,a,t){{var i=e.headerInfo,o=i.fileVersion,s=0,u=new DataView(n,e.ptr,5),m=u.getUint8(0);s++;var l=m>>6,f=l===0?4:3-l,h=(m&32)>0,c=m&31,g=0;if(f===1)g=u.getUint8(s),s++;else if(f===2)g=u.getUint16(s,!0),s+=2;else if(f===4)g=u.getUint32(s,!0),s+=4;else throw"Invalid valid pixel count type";var v=2*i.maxZError,U,M,S,I,k,w,d,x,T,y,p=i.numDims>1?i.maxValues[t]:i.zMax;if(h){for(e.counter.lut++,x=u.getUint8(s),T=c,s++,I=Math.ceil((x-1)*c/8),k=Math.ceil(I/4),M=new ArrayBuffer(k*4),S=new Uint8Array(M),e.ptr+=s,S.set(new Uint8Array(n,e.ptr,I)),d=new Uint32Array(M),e.ptr+=I,y=0;x-1>>>y;)y++;I=Math.ceil(g*y/8),k=Math.ceil(I/4),M=new ArrayBuffer(k*4),S=new Uint8Array(M),S.set(new Uint8Array(n,e.ptr,I)),U=new Uint32Array(M),e.ptr+=I,o>=3?w=A.unstuffLUT2(d,c,x-1,a,v,p):w=A.unstuffLUT(d,c,x-1,a,v,p),o>=3?A.unstuff2(U,r,y,g,w):A.unstuff(U,r,y,g,w)}else e.counter.bitstuffer++,y=c,e.ptr+=s,y>0&&(I=Math.ceil(g*y/8),k=Math.ceil(I/4),M=new ArrayBuffer(k*4),S=new Uint8Array(M),S.set(new Uint8Array(n,e.ptr,I)),U=new Uint32Array(M),e.ptr+=I,o>=3?a==null?A.originalUnstuff2(U,r,y,g):A.unstuff2(U,r,y,g,!1,a,v,p):a==null?A.originalUnstuff(U,r,y,g):A.unstuff(U,r,y,g,!1,a,v,p))}},readTiles:function(n,e,r){var a=e.headerInfo,t=a.width,i=a.height,o=a.microBlockSize,s=a.imageType,u=V.getDataTypeSize(s),m=Math.ceil(t/o),l=Math.ceil(i/o);e.pixels.numBlocksY=l,e.pixels.numBlocksX=m,e.pixels.ptr=0;var f=0,h=0,c=0,g=0,v=0,U=0,M=0,S=0,I=0,k=0,w=0,d=0,x=0,T=0,y=0,p=0,L,B,E,O,F,N,z=new r(o*o),ke=i%o||o,ye=t%o||o,J,Z,ue=a.numDims,te,j=e.pixels.resultMask,q=e.pixels.resultPixels;for(c=0;c<l;c++)for(v=c!==l-1?o:ke,g=0;g<m;g++)for(U=g!==m-1?o:ye,w=c*t*o+g*o,d=t-U,te=0;te<ue;te++){if(ue>1&&(q=new r(e.pixels.resultPixels.buffer,t*i*te*u,t*i)),M=n.byteLength-e.ptr,L=new DataView(n,e.ptr,Math.min(10,M)),B={},p=0,S=L.getUint8(0),p++,I=S>>6&255,k=S>>2&15,k!==(g*o>>3&15))throw"integrity issue";if(N=S&3,N>3)throw e.ptr+=p,"Invalid block encoding ("+N+")";if(N===2){e.counter.constant++,e.ptr+=p;continue}else if(N===0){if(e.counter.uncompressed++,e.ptr+=p,x=v*U*u,T=n.byteLength-e.ptr,x=x<T?x:T,E=new ArrayBuffer(x%u===0?x:x+u-x%u),O=new Uint8Array(E),O.set(new Uint8Array(n,e.ptr,x)),F=new r(E),y=0,j)for(f=0;f<v;f++){for(h=0;h<U;h++)j[w]&&(q[w]=F[y++]),w++;w+=d}else for(f=0;f<v;f++){for(h=0;h<U;h++)q[w++]=F[y++];w+=d}e.ptr+=y*u}else if(J=V.getDataTypeUsed(s,I),Z=V.getOnePixel(B,p,J,L),p+=V.getDataTypeSize(J),N===3)if(e.ptr+=p,e.counter.constantoffset++,j)for(f=0;f<v;f++){for(h=0;h<U;h++)j[w]&&(q[w]=Z),w++;w+=d}else for(f=0;f<v;f++){for(h=0;h<U;h++)q[w++]=Z;w+=d}else if(e.ptr+=p,V.decodeBits(n,e,z,Z,te),p=0,j)for(f=0;f<v;f++){for(h=0;h<U;h++)j[w]&&(q[w]=z[p++]),w++;w+=d}else for(f=0;f<v;f++){for(h=0;h<U;h++)q[w++]=z[p++];w+=d}}},formatFileInfo:function(n){return{fileIdentifierString:n.headerInfo.fileIdentifierString,fileVersion:n.headerInfo.fileVersion,imageType:n.headerInfo.imageType,height:n.headerInfo.height,width:n.headerInfo.width,numValidPixel:n.headerInfo.numValidPixel,microBlockSize:n.headerInfo.microBlockSize,blobSize:n.headerInfo.blobSize,maxZError:n.headerInfo.maxZError,pixelType:V.getPixelType(n.headerInfo.imageType),eofOffset:n.eofOffset,mask:n.mask?{numBytes:n.mask.numBytes}:null,pixels:{numBlocksX:n.pixels.numBlocksX,numBlocksY:n.pixels.numBlocksY,maxValue:n.headerInfo.zMax,minValue:n.headerInfo.zMin,noDataValue:n.noDataValue}}},constructConstantSurface:function(n){var e=n.headerInfo.zMax,r=n.headerInfo.numDims,a=n.headerInfo.height*n.headerInfo.width,t=a*r,i=0,o=0,s=0,u=n.pixels.resultMask;if(u)if(r>1)for(i=0;i<r;i++)for(s=i*a,o=0;o<a;o++)u[o]&&(n.pixels.resultPixels[s+o]=e);else for(o=0;o<a;o++)u[o]&&(n.pixels.resultPixels[o]=e);else if(n.pixels.resultPixels.fill)n.pixels.resultPixels.fill(e);else for(o=0;o<t;o++)n.pixels.resultPixels[o]=e},getDataTypeArray:function(n){var e;switch(n){case 0:e=Int8Array;break;case 1:e=Uint8Array;break;case 2:e=Int16Array;break;case 3:e=Uint16Array;break;case 4:e=Int32Array;break;case 5:e=Uint32Array;break;case 6:e=Float32Array;break;case 7:e=Float64Array;break;default:e=Float32Array}return e},getPixelType:function(n){var e;switch(n){case 0:e="S8";break;case 1:e="U8";break;case 2:e="S16";break;case 3:e="U16";break;case 4:e="S32";break;case 5:e="U32";break;case 6:e="F32";break;case 7:e="F64";break;default:e="F32"}return e},isValidPixelValue:function(n,e){if(e==null)return!1;var r;switch(n){case 0:r=e>=-128&&e<=127;break;case 1:r=e>=0&&e<=255;break;case 2:r=e>=-32768&&e<=32767;break;case 3:r=e>=0&&e<=65536;break;case 4:r=e>=-2147483648&&e<=2147483647;break;case 5:r=e>=0&&e<=4294967296;break;case 6:r=e>=-34027999387901484e22&&e<=34027999387901484e22;break;case 7:r=e>=5e-324&&e<=17976931348623157e292;break;default:r=!1}return r},getDataTypeSize:function(n){var e=0;switch(n){case 0:case 1:e=1;break;case 2:case 3:e=2;break;case 4:case 5:case 6:e=4;break;case 7:e=8;break;default:e=n}return e},getDataTypeUsed:function(n,e){var r=n;switch(n){case 2:case 4:r=n-e;break;case 3:case 5:r=n-2*e;break;case 6:e===0?r=n:e===1?r=2:r=1;break;case 7:e===0?r=n:r=n-2*e+1;break;default:r=n;break}return r},getOnePixel:function(n,e,r,a){var t=0;switch(r){case 0:t=a.getInt8(e);break;case 1:t=a.getUint8(e);break;case 2:t=a.getInt16(e,!0);break;case 3:t=a.getUint16(e,!0);break;case 4:t=a.getInt32(e,!0);break;case 5:t=a.getUInt32(e,!0);break;case 6:t=a.getFloat32(e,!0);break;case 7:t=a.getFloat64(e,!0);break;default:throw"the decoder does not understand this pixel type"}return t}},b=function(n,e,r){this.val=n,this.left=e,this.right=r},X={decode:function(n,e){e=e||{};var r=e.noDataValue,a=0,t={};if(t.ptr=e.inputOffset||0,t.pixels={},!!V.readHeaderInfo(n,t)){var i=t.headerInfo,o=i.fileVersion,s=V.getDataTypeArray(i.imageType);V.readMask(n,t),i.numValidPixel!==i.width*i.height&&!t.pixels.resultMask&&(t.pixels.resultMask=e.maskData);var u=i.width*i.height;if(t.pixels.resultPixels=new s(u*i.numDims),t.counter={onesweep:0,uncompressed:0,lut:0,bitstuffer:0,constant:0,constantoffset:0},i.numValidPixel!==0)if(i.zMax===i.zMin)V.constructConstantSurface(t);else if(o>=4&&V.checkMinMaxRanges(n,t))V.constructConstantSurface(t);else{var m=new DataView(n,t.ptr,2),l=m.getUint8(0);if(t.ptr++,l)V.readDataOneSweep(n,t,s);else if(o>1&&i.imageType<=1&&Math.abs(i.maxZError-.5)<1e-5){var f=m.getUint8(1);if(t.ptr++,t.encodeMode=f,f>2||o<4&&f>1)throw"Invalid Huffman flag "+f;f?V.readHuffman(n,t,s):V.readTiles(n,t,s)}else V.readTiles(n,t,s)}t.eofOffset=t.ptr;var h;e.inputOffset?(h=t.headerInfo.blobSize+e.inputOffset-t.ptr,Math.abs(h)>=1&&(t.eofOffset=e.inputOffset+t.headerInfo.blobSize)):(h=t.headerInfo.blobSize-t.ptr,Math.abs(h)>=1&&(t.eofOffset=t.headerInfo.blobSize));var c={width:i.width,height:i.height,pixelData:t.pixels.resultPixels,minValue:i.zMin,maxValue:i.zMax,validPixelCount:i.numValidPixel,dimCount:i.numDims,dimStats:{minValues:i.minValues,maxValues:i.maxValues},maskData:t.pixels.resultMask};if(t.pixels.resultMask&&V.isValidPixelValue(i.imageType,r)){var g=t.pixels.resultMask;for(a=0;a<u;a++)g[a]||(c.pixelData[a]=r);c.noDataValue=r}return t.noDataValue=r,e.returnFileInfo&&(c.fileInfo=V.formatFileInfo(t)),c}},getBandCount:function(n){var e=0,r=0,a={};for(a.ptr=0,a.pixels={};r<n.byteLength-58;)V.readHeaderInfo(n,a),r+=a.headerInfo.blobSize,e++,a.ptr=r;return e}};return X}(),C=function(){var A=new ArrayBuffer(4),V=new Uint8Array(A),b=new Uint32Array(A);return b[0]=1,V[0]===1}(),re={decode:function(A,V){if(!C)throw"Big endian system is not supported.";V=V||{};var b=V.inputOffset||0,X=new Uint8Array(A,b,10),n=String.fromCharCode.apply(null,X),e,r;if(n.trim()==="CntZImage")e=D,r=1;else if(n.substring(0,5)==="Lerc2")e=se,r=2;else throw"Unexpected file identifier string: "+n;for(var a=0,t=A.byteLength-10,i,o=[],s,u,m={width:0,height:0,pixels:[],pixelType:V.pixelType,mask:null,statistics:[]};b<t;){var l=e.decode(A,{inputOffset:b,encodedMaskData:i,maskData:u,returnMask:a===0,returnEncodedMask:a===0,returnFileInfo:!0,pixelType:V.pixelType||null,noDataValue:V.noDataValue||null});b=l.fileInfo.eofOffset,a===0&&(i=l.encodedMaskData,u=l.maskData,m.width=l.width,m.height=l.height,m.dimCount=l.dimCount||1,m.pixelType=l.pixelType||l.fileInfo.pixelType,m.mask=l.maskData),r>1&&l.fileInfo.mask&&l.fileInfo.mask.numBytes>0&&o.push(l.maskData),a++,m.pixels.push(l.pixelData),m.statistics.push({minValue:l.minValue,maxValue:l.maxValue,noDataValue:l.noDataValue,dimStats:l.dimStats})}var f,h,c;if(r>1&&o.length>1){for(c=m.width*m.height,m.bandMasks=o,u=new Uint8Array(c),u.set(o[0]),f=1;f<o.length;f++)for(s=o[f],h=0;h<c;h++)u[h]=u[h]&s[h];m.maskData=u}return m}};typeof define=="function"&&define.amd?define([],function(){return re}):typeof Te<"u"&&Te.exports?Te.exports=re:this.Lerc=re})()});var Ur={NONE:0,LERC:1},or=Object.freeze(Ur);var Q={};Q.DEFAULT_STRUCTURE=Object.freeze({heightScale:1,heightOffset:0,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1});var Ye=new ie,Tr=new xe,kr=new ie,yr=new ie;Q.computeVertices=function(D){if(!G(D)||!G(D.heightmap))throw new he("options.heightmap is required.");if(!G(D.width)||!G(D.height))throw new he("options.width and options.height are required.");if(!G(D.nativeRectangle))throw new he("options.nativeRectangle is required.");if(!G(D.skirtHeight))throw new he("options.skirtHeight is required.");let se=Math.cos,C=Math.sin,re=Math.sqrt,A=Math.atan,V=Math.exp,b=ge.PI_OVER_TWO,X=ge.toRadians,n=D.heightmap,e=D.width,r=D.height,a=D.skirtHeight,t=a>0,i=Y(D.isGeographic,!0),o=Y(D.ellipsoid,Ie.WGS84),s=1/o.maximumRadius,u=ae.clone(D.nativeRectangle),m=ae.clone(D.rectangle),l,f,h,c;G(m)?(l=m.west,f=m.south,h=m.east,c=m.north):i?(l=X(u.west),f=X(u.south),h=X(u.east),c=X(u.north)):(l=u.west*s,f=b-2*A(V(-u.south*s)),h=u.east*s,c=b-2*A(V(-u.north*s)));let g=D.relativeToCenter,v=G(g);g=v?g:ie.ZERO;let U=Y(D.includeWebMercatorT,!1),M=Y(D.exaggeration,1),S=Y(D.exaggerationRelativeHeight,0),k=M!==1,w=Y(D.structure,Q.DEFAULT_STRUCTURE),d=Y(w.heightScale,Q.DEFAULT_STRUCTURE.heightScale),x=Y(w.heightOffset,Q.DEFAULT_STRUCTURE.heightOffset),T=Y(w.elementsPerHeight,Q.DEFAULT_STRUCTURE.elementsPerHeight),y=Y(w.stride,Q.DEFAULT_STRUCTURE.stride),p=Y(w.elementMultiplier,Q.DEFAULT_STRUCTURE.elementMultiplier),L=Y(w.isBigEndian,Q.DEFAULT_STRUCTURE.isBigEndian),B=ae.computeWidth(u),E=ae.computeHeight(u),O=B/(e-1),F=E/(r-1);i||(B*=s,E*=s);let N=o.radiiSquared,z=N.x,ke=N.y,ye=N.z,J=65536,Z=-65536,ue=ir.eastNorthUpToFixedFrame(g,o),te=xe.inverseTransformation(ue,Tr),j,q;U&&(j=Ue.geodeticLatitudeToMercatorAngle(f),q=1/(Ue.geodeticLatitudeToMercatorAngle(c)-j));let fe=kr;fe.x=Number.POSITIVE_INFINITY,fe.y=Number.POSITIVE_INFINITY,fe.z=Number.POSITIVE_INFINITY;let oe=yr;oe.x=Number.NEGATIVE_INFINITY,oe.y=Number.NEGATIVE_INFINITY,oe.z=Number.NEGATIVE_INFINITY;let Me=Number.POSITIVE_INFINITY,ce=e*r,mr=a>0?e*2+r*2:0,ne=ce+mr,ve=new Array(ne),Xe=new Array(ne),_e=new Array(ne),ze=U?new Array(ne):[],Ze=k?new Array(ne):[],Se=0,Ve=r,De=0,Ae=e;t&&(--Se,++Ve,--De,++Ae);let de=1e-5;for(let H=Se;H<Ve;++H){let K=H;K<0&&(K=0),K>=r&&(K=r-1);let W=u.north-F*K;i?W=X(W):W=b-2*A(V(-W*s));let Le=(W-f)/(c-f);Le=ge.clamp(Le,0,1);let we=H===Se,pe=H===Ve-1;a>0&&(we?W+=de*E:pe&&(W-=de*E));let Qe=se(W),Be=C(W),Je=ye*Be,Ke;U&&(Ke=(Ue.geodeticLatitudeToMercatorAngle(W)-j)*q);for(let me=De;me<Ae;++me){let $=me;$<0&&($=0),$>=e&&($=e-1);let Fe=K*(e*y)+$*y,R;if(T===1)R=n[Fe];else{R=0;let _;if(L)for(_=0;_<T;++_)R=R*p+n[Fe+_];else for(_=T-1;_>=0;--_)R=R*p+n[Fe+_]}R=R*d+x,Z=Math.max(Z,R),J=Math.min(J,R);let P=u.west+O*$;i?P=X(P):P=P*s;let be=(P-l)/(h-l);be=ge.clamp(be,0,1);let ee=K*e+$;if(a>0){let _=me===De,Re=me===Ae-1,pr=we||pe||_||Re;if((we||pe)&&(_||Re))continue;pr&&(R-=a,_?(ee=ce+(r-K-1),P-=de*B):pe?ee=ce+r+(e-$-1):Re?(ee=ce+r+e+K,P+=de*B):we&&(ee=ce+r+e+r+$))}let Ne=Qe*se(P),Ce=Qe*C(P),$e=z*Ne,Pe=ke*Ce,Oe=1/re($e*Ne+Pe*Ce+Je*Be),vr=$e*Oe,dr=Pe*Oe,wr=Je*Oe,le=new ie;le.x=vr+Ne*R,le.y=dr+Ce*R,le.z=wr+Be*R,xe.multiplyByPoint(te,le,Ye),ie.minimumByComponent(Ye,fe,fe),ie.maximumByComponent(Ye,oe,oe),Me=Math.min(Me,R),ve[ee]=le,_e[ee]=new er(be,Le),Xe[ee]=R,U&&(ze[ee]=Ke),k&&(Ze[ee]=o.geodeticSurfaceNormal(le))}}let hr=rr.fromPoints(ve),je;G(m)&&(je=ar.fromRectangle(m,J,Z,o));let qe;v&&(qe=new sr(o).computeHorizonCullingPointPossiblyUnderEllipsoid(g,ve,J));let gr=new nr(fe,oe,g),Ee=new fr(g,gr,Me,Z,ue,!1,U,k,M,S),We=new Float32Array(ne*Ee.stride),Ge=0;for(let H=0;H<ne;++H)Ge=Ee.encode(We,Ge,ve[H],_e[H],Xe[H],void 0,ze[H],Ze[H]);return{vertices:We,maximumHeight:Z,minimumHeight:J,encoding:Ee,boundingSphere3D:hr,orientedBoundingBox:je,occludeePointInScaledSpace:qe}};var lr=Q;var cr=xr(ur(),1);function Mr(D,se){if(D.encoding===or.LERC){let A;try{A=cr.default.decode(D.heightmap)}catch(b){throw new He(b)}if(A.statistics[0].minValue===Number.MAX_VALUE)throw new He("Invalid tile data");D.heightmap=A.pixels[0],D.width=A.width,D.height=A.height}D.ellipsoid=Ie.clone(D.ellipsoid),D.rectangle=ae.clone(D.rectangle);let C=lr.computeVertices(D),re=C.vertices;return se.push(re.buffer),{vertices:re.buffer,numberOfAttributes:C.encoding.stride,minimumHeight:C.minimumHeight,maximumHeight:C.maximumHeight,gridWidth:D.width,gridHeight:D.height,boundingSphere3D:C.boundingSphere3D,orientedBoundingBox:C.orientedBoundingBox,occludeePointInScaledSpace:C.occludeePointInScaledSpace,encoding:C.encoding,westIndicesSouthToNorth:C.westIndicesSouthToNorth,southIndicesEastToWest:C.southIndicesEastToWest,eastIndicesNorthToSouth:C.eastIndicesNorthToSouth,northIndicesWestToEast:C.northIndicesWestToEast}}var Pr=tr(Mr);export{Pr as default}; |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.116 | ||
* Version 1.116.1 | ||
* | ||
@@ -26,2 +26,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
import{a as Ct,b as vt}from"./chunk-JDDR7LGD.js";import{a as Mt}from"./chunk-4PZYNNSN.js";import{a as z}from"./chunk-TM5U646E.js";import"./chunk-BMTOWA7K.js";import{a as Wt}from"./chunk-GKRM7KEL.js";import{a as X}from"./chunk-TWAPNO4J.js";import{h as At}from"./chunk-HTNJJ6YO.js";import"./chunk-63E276CT.js";import"./chunk-NRW2R4YV.js";import{b as U,c as bt}from"./chunk-NSILPUHD.js";import"./chunk-M7WODBAD.js";import{a as P,b as wt,c as lt,d as pt}from"./chunk-J26GWQSN.js";import{a as f}from"./chunk-PYB3IV2X.js";import"./chunk-H7FFK4U5.js";import"./chunk-YEUII2A5.js";import"./chunk-4353PD6R.js";import{a as m}from"./chunk-2S4UUFD6.js";import{e as w}from"./chunk-42VHSORI.js";function T(){m.throwInstantiationError()}Object.defineProperties(T.prototype,{errorEvent:{get:m.throwInstantiationError},credit:{get:m.throwInstantiationError},tilingScheme:{get:m.throwInstantiationError},hasWaterMask:{get:m.throwInstantiationError},hasVertexNormals:{get:m.throwInstantiationError},availability:{get:m.throwInstantiationError}});var Ot=[];T.getRegularGridIndices=function(t,n){if(t*n>=f.FOUR_GIGABYTES)throw new m("The total number of vertices (width * height) must be less than 4,294,967,296.");let o=Ot[t];w(o)||(Ot[t]=o=[]);let e=o[n];return w(e)||(t*n<f.SIXTY_FOUR_KILOBYTES?e=o[n]=new Uint16Array((t-1)*(n-1)*6):e=o[n]=new Uint32Array((t-1)*(n-1)*6),Pt(t,n,e,0)),e};var Gt=[];T.getRegularGridIndicesAndEdgeIndices=function(t,n){if(t*n>=f.FOUR_GIGABYTES)throw new m("The total number of vertices (width * height) must be less than 4,294,967,296.");let o=Gt[t];w(o)||(Gt[t]=o=[]);let e=o[n];if(!w(e)){let r=T.getRegularGridIndices(t,n),s=Lt(t,n),i=s.westIndicesSouthToNorth,c=s.southIndicesEastToWest,h=s.eastIndicesNorthToSouth,E=s.northIndicesWestToEast;e=o[n]={indices:r,westIndicesSouthToNorth:i,southIndicesEastToWest:c,eastIndicesNorthToSouth:h,northIndicesWestToEast:E}}return e};var kt=[];T.getRegularGridAndSkirtIndicesAndEdgeIndices=function(t,n){if(t*n>=f.FOUR_GIGABYTES)throw new m("The total number of vertices (width * height) must be less than 4,294,967,296.");let o=kt[t];w(o)||(kt[t]=o=[]);let e=o[n];if(!w(e)){let r=t*n,s=(t-1)*(n-1)*6,i=t*2+n*2,c=Math.max(0,i-4)*6,h=r+i,E=s+c,g=Lt(t,n),d=g.westIndicesSouthToNorth,p=g.southIndicesEastToWest,b=g.eastIndicesNorthToSouth,L=g.northIndicesWestToEast,N=X.createTypedArray(h,E);Pt(t,n,N,0),T.addSkirtIndices(d,p,b,L,r,N,s),e=o[n]={indices:N,westIndicesSouthToNorth:d,southIndicesEastToWest:p,eastIndicesNorthToSouth:b,northIndicesWestToEast:L,indexCountWithoutSkirts:s}}return e};T.addSkirtIndices=function(t,n,o,e,r,s,i){let c=r;i=Z(t,c,s,i),c+=t.length,i=Z(n,c,s,i),c+=n.length,i=Z(o,c,s,i),c+=o.length,Z(e,c,s,i)};function Lt(t,n){let o=new Array(n),e=new Array(t),r=new Array(n),s=new Array(t),i;for(i=0;i<t;++i)s[i]=i,e[i]=t*n-1-i;for(i=0;i<n;++i)r[i]=(i+1)*t-1,o[i]=(n-i-1)*t;return{westIndicesSouthToNorth:o,southIndicesEastToWest:e,eastIndicesNorthToSouth:r,northIndicesWestToEast:s}}function Pt(t,n,o,e){let r=0;for(let s=0;s<n-1;++s){for(let i=0;i<t-1;++i){let c=r,h=c+t,E=h+1,g=c+1;o[e++]=c,o[e++]=h,o[e++]=g,o[e++]=g,o[e++]=h,o[e++]=E,++r}++r}}function Z(t,n,o,e){let r=t[0],s=t.length;for(let i=1;i<s;++i){let c=t[i];o[e++]=r,o[e++]=c,o[e++]=n,o[e++]=n,o[e++]=c,o[e++]=n+1,r=c,++n}return e}T.heightmapTerrainQuality=.25;T.getEstimatedLevelZeroGeometricErrorForAHeightmap=function(t,n,o){return t.maximumRadius*2*Math.PI*T.heightmapTerrainQuality/(n*o)};T.prototype.requestTileGeometry=m.throwInstantiationError;T.prototype.getLevelMaximumGeometricError=m.throwInstantiationError;T.prototype.getTileDataAvailable=m.throwInstantiationError;T.prototype.loadTileDataAvailability=m.throwInstantiationError;var Vt=T;var ht=32767,D=new P,Xt=new P,Zt=new P,u=new wt,Y=new lt;function Jt(t,n){let o=t.quantizedVertices,e=o.length/3,r=t.octEncodedNormals,s=t.westIndices.length+t.eastIndices.length+t.southIndices.length+t.northIndices.length,i=t.includeWebMercatorT,c=t.exaggeration,h=t.exaggerationRelativeHeight,g=c!==1,d=bt.clone(t.rectangle),p=d.west,b=d.south,L=d.east,N=d.north,I=pt.clone(t.ellipsoid),y=t.minimumHeight,v=t.maximumHeight,S=t.relativeToCenter,_=At.eastNorthUpToFixedFrame(S,I),O=U.inverseTransformation(_,new U),G,A;i&&(G=z.geodeticLatitudeToMercatorAngle(b),A=1/(z.geodeticLatitudeToMercatorAngle(N)-G));let j=o.subarray(0,e),q=o.subarray(e,2*e),Q=o.subarray(e*2,3*e),R=w(r),l=new Array(e),M=new Array(e),et=new Array(e),It=i?new Array(e):[],gt=g?new Array(e):[],W=Xt;W.x=Number.POSITIVE_INFINITY,W.y=Number.POSITIVE_INFINITY,W.z=Number.POSITIVE_INFINITY;let C=Zt;C.x=Number.NEGATIVE_INFINITY,C.y=Number.NEGATIVE_INFINITY,C.z=Number.NEGATIVE_INFINITY;let ot=Number.POSITIVE_INFINITY,nt=Number.NEGATIVE_INFINITY,it=Number.POSITIVE_INFINITY,rt=Number.NEGATIVE_INFINITY;for(let a=0;a<e;++a){let x=j[a],Kt=q[a],St=x/ht,xt=Kt/ht,yt=f.lerp(y,v,Q[a]/ht);u.longitude=f.lerp(p,L,St),u.latitude=f.lerp(b,N,xt),u.height=yt,ot=Math.min(u.longitude,ot),nt=Math.max(u.longitude,nt),it=Math.min(u.latitude,it),rt=Math.max(u.latitude,rt);let dt=I.cartographicToCartesian(u);l[a]=new lt(St,xt),M[a]=yt,et[a]=dt,i&&(It[a]=(z.geodeticLatitudeToMercatorAngle(u.latitude)-G)*A),g&&(gt[a]=I.geodeticSurfaceNormal(dt)),U.multiplyByPoint(O,dt,D),P.minimumByComponent(D,W,W),P.maximumByComponent(D,C,C)}let st=tt(t.westIndices,function(a,x){return l[a].y-l[x].y}),ct=tt(t.eastIndices,function(a,x){return l[x].y-l[a].y}),at=tt(t.southIndices,function(a,x){return l[x].x-l[a].x}),ut=tt(t.northIndices,function(a,x){return l[a].x-l[x].x}),mt;y<0&&(mt=new Ct(I).computeHorizonCullingPointPossiblyUnderEllipsoid(S,et,y));let k=y;k=Math.min(k,J(t.westIndices,t.westSkirtHeight,M,l,d,I,O,W,C)),k=Math.min(k,J(t.southIndices,t.southSkirtHeight,M,l,d,I,O,W,C)),k=Math.min(k,J(t.eastIndices,t.eastSkirtHeight,M,l,d,I,O,W,C)),k=Math.min(k,J(t.northIndices,t.northSkirtHeight,M,l,d,I,O,W,C));let Ft=new Wt(W,C,S),V=new vt(S,Ft,k,v,_,R,i,g,c,h),F=V.stride,Bt=e*F+s*F,B=new Float32Array(Bt),ft=0;for(let a=0;a<e;++a){if(R){let x=a*2;Y.x=r[x],Y.y=r[x+1]}ft=V.encode(B,ft,et[a],l[a],M[a],Y,It[a],gt[a])}let Ht=Math.max(0,(s-4)*2),_t=t.indices.length+Ht*3,K=X.createTypedArray(e+s,_t);K.set(t.indices,0);let Tt=1e-4,Et=(nt-ot)*Tt,Nt=(rt-it)*Tt,Yt=-Et,Rt=0,Ut=Et,zt=0,Dt=0,jt=Nt,qt=0,Qt=-Nt,H=e*F;return $(B,H,st,V,M,l,r,I,d,t.westSkirtHeight,G,A,Yt,Rt),H+=t.westIndices.length*F,$(B,H,at,V,M,l,r,I,d,t.southSkirtHeight,G,A,qt,Qt),H+=t.southIndices.length*F,$(B,H,ct,V,M,l,r,I,d,t.eastSkirtHeight,G,A,Ut,zt),H+=t.eastIndices.length*F,$(B,H,ut,V,M,l,r,I,d,t.northSkirtHeight,G,A,Dt,jt),Vt.addSkirtIndices(st,at,ct,ut,e,K,t.indices.length),n.push(B.buffer,K.buffer),{vertices:B.buffer,indices:K.buffer,westIndicesSouthToNorth:st,southIndicesEastToWest:at,eastIndicesNorthToSouth:ct,northIndicesWestToEast:ut,vertexStride:F,center:S,minimumHeight:y,maximumHeight:v,occludeePointInScaledSpace:mt,encoding:V,indexCountWithoutSkirts:t.indices.length}}function J(t,n,o,e,r,s,i,c,h){let E=Number.POSITIVE_INFINITY,g=r.north,d=r.south,p=r.east,b=r.west;p<b&&(p+=f.TWO_PI);let L=t.length;for(let N=0;N<L;++N){let I=t[N],y=o[I],v=e[I];u.longitude=f.lerp(b,p,v.x),u.latitude=f.lerp(d,g,v.y),u.height=y-n;let S=s.cartographicToCartesian(u,D);U.multiplyByPoint(i,S,S),P.minimumByComponent(S,c,c),P.maximumByComponent(S,h,h),E=Math.min(E,u.height)}return E}function $(t,n,o,e,r,s,i,c,h,E,g,d,p,b){let L=w(i),N=h.north,I=h.south,y=h.east,v=h.west;y<v&&(y+=f.TWO_PI);let S=o.length;for(let _=0;_<S;++_){let O=o[_],G=r[O],A=s[O];u.longitude=f.lerp(v,y,A.x)+p,u.latitude=f.lerp(I,N,A.y)+b,u.height=G-E;let j=c.cartographicToCartesian(u,D);if(L){let R=O*2;Y.x=i[R],Y.y=i[R+1]}let q;e.hasWebMercatorT&&(q=(z.geodeticLatitudeToMercatorAngle(u.latitude)-g)*d);let Q;e.hasGeodeticSurfaceNormals&&(Q=c.geodeticSurfaceNormal(j)),n=e.encode(t,n,j,A,u.height,Y,q,Q)}}function tt(t,n){let o;return typeof t.slice=="function"&&(o=t.slice(),typeof o.sort!="function"&&(o=void 0)),w(o)||(o=Array.prototype.slice.call(t)),o.sort(n),o}var Se=Mt(Jt);export{Se as default}; | ||
import{a as Ct,b as vt}from"./chunk-7CWUAQKI.js";import{a as Mt}from"./chunk-F3CCIWXX.js";import{a as z}from"./chunk-WEQDXQHF.js";import"./chunk-JAMWPWOV.js";import{a as Wt}from"./chunk-XOMW5SDY.js";import{a as X}from"./chunk-ROROM35N.js";import{h as At}from"./chunk-DXGEUDM7.js";import"./chunk-5IUHFVP3.js";import"./chunk-OE3P25NW.js";import{b as U,c as bt}from"./chunk-HIT4T4MS.js";import"./chunk-3KRBUMEX.js";import{a as P,b as wt,c as lt,d as pt}from"./chunk-PQ6NV4GA.js";import{a as f}from"./chunk-74I3QBVP.js";import"./chunk-BLVYEJBC.js";import"./chunk-A6PYE4JS.js";import"./chunk-T23IKWCM.js";import{a as m}from"./chunk-HJ33TVGP.js";import{e as w}from"./chunk-WL4PTXMO.js";function T(){m.throwInstantiationError()}Object.defineProperties(T.prototype,{errorEvent:{get:m.throwInstantiationError},credit:{get:m.throwInstantiationError},tilingScheme:{get:m.throwInstantiationError},hasWaterMask:{get:m.throwInstantiationError},hasVertexNormals:{get:m.throwInstantiationError},availability:{get:m.throwInstantiationError}});var Ot=[];T.getRegularGridIndices=function(t,n){if(t*n>=f.FOUR_GIGABYTES)throw new m("The total number of vertices (width * height) must be less than 4,294,967,296.");let o=Ot[t];w(o)||(Ot[t]=o=[]);let e=o[n];return w(e)||(t*n<f.SIXTY_FOUR_KILOBYTES?e=o[n]=new Uint16Array((t-1)*(n-1)*6):e=o[n]=new Uint32Array((t-1)*(n-1)*6),Pt(t,n,e,0)),e};var Gt=[];T.getRegularGridIndicesAndEdgeIndices=function(t,n){if(t*n>=f.FOUR_GIGABYTES)throw new m("The total number of vertices (width * height) must be less than 4,294,967,296.");let o=Gt[t];w(o)||(Gt[t]=o=[]);let e=o[n];if(!w(e)){let r=T.getRegularGridIndices(t,n),s=Lt(t,n),i=s.westIndicesSouthToNorth,c=s.southIndicesEastToWest,h=s.eastIndicesNorthToSouth,E=s.northIndicesWestToEast;e=o[n]={indices:r,westIndicesSouthToNorth:i,southIndicesEastToWest:c,eastIndicesNorthToSouth:h,northIndicesWestToEast:E}}return e};var kt=[];T.getRegularGridAndSkirtIndicesAndEdgeIndices=function(t,n){if(t*n>=f.FOUR_GIGABYTES)throw new m("The total number of vertices (width * height) must be less than 4,294,967,296.");let o=kt[t];w(o)||(kt[t]=o=[]);let e=o[n];if(!w(e)){let r=t*n,s=(t-1)*(n-1)*6,i=t*2+n*2,c=Math.max(0,i-4)*6,h=r+i,E=s+c,g=Lt(t,n),d=g.westIndicesSouthToNorth,p=g.southIndicesEastToWest,b=g.eastIndicesNorthToSouth,L=g.northIndicesWestToEast,N=X.createTypedArray(h,E);Pt(t,n,N,0),T.addSkirtIndices(d,p,b,L,r,N,s),e=o[n]={indices:N,westIndicesSouthToNorth:d,southIndicesEastToWest:p,eastIndicesNorthToSouth:b,northIndicesWestToEast:L,indexCountWithoutSkirts:s}}return e};T.addSkirtIndices=function(t,n,o,e,r,s,i){let c=r;i=Z(t,c,s,i),c+=t.length,i=Z(n,c,s,i),c+=n.length,i=Z(o,c,s,i),c+=o.length,Z(e,c,s,i)};function Lt(t,n){let o=new Array(n),e=new Array(t),r=new Array(n),s=new Array(t),i;for(i=0;i<t;++i)s[i]=i,e[i]=t*n-1-i;for(i=0;i<n;++i)r[i]=(i+1)*t-1,o[i]=(n-i-1)*t;return{westIndicesSouthToNorth:o,southIndicesEastToWest:e,eastIndicesNorthToSouth:r,northIndicesWestToEast:s}}function Pt(t,n,o,e){let r=0;for(let s=0;s<n-1;++s){for(let i=0;i<t-1;++i){let c=r,h=c+t,E=h+1,g=c+1;o[e++]=c,o[e++]=h,o[e++]=g,o[e++]=g,o[e++]=h,o[e++]=E,++r}++r}}function Z(t,n,o,e){let r=t[0],s=t.length;for(let i=1;i<s;++i){let c=t[i];o[e++]=r,o[e++]=c,o[e++]=n,o[e++]=n,o[e++]=c,o[e++]=n+1,r=c,++n}return e}T.heightmapTerrainQuality=.25;T.getEstimatedLevelZeroGeometricErrorForAHeightmap=function(t,n,o){return t.maximumRadius*2*Math.PI*T.heightmapTerrainQuality/(n*o)};T.prototype.requestTileGeometry=m.throwInstantiationError;T.prototype.getLevelMaximumGeometricError=m.throwInstantiationError;T.prototype.getTileDataAvailable=m.throwInstantiationError;T.prototype.loadTileDataAvailability=m.throwInstantiationError;var Vt=T;var ht=32767,D=new P,Xt=new P,Zt=new P,u=new wt,Y=new lt;function Jt(t,n){let o=t.quantizedVertices,e=o.length/3,r=t.octEncodedNormals,s=t.westIndices.length+t.eastIndices.length+t.southIndices.length+t.northIndices.length,i=t.includeWebMercatorT,c=t.exaggeration,h=t.exaggerationRelativeHeight,g=c!==1,d=bt.clone(t.rectangle),p=d.west,b=d.south,L=d.east,N=d.north,I=pt.clone(t.ellipsoid),y=t.minimumHeight,v=t.maximumHeight,S=t.relativeToCenter,_=At.eastNorthUpToFixedFrame(S,I),O=U.inverseTransformation(_,new U),G,A;i&&(G=z.geodeticLatitudeToMercatorAngle(b),A=1/(z.geodeticLatitudeToMercatorAngle(N)-G));let j=o.subarray(0,e),q=o.subarray(e,2*e),Q=o.subarray(e*2,3*e),R=w(r),l=new Array(e),M=new Array(e),et=new Array(e),It=i?new Array(e):[],gt=g?new Array(e):[],W=Xt;W.x=Number.POSITIVE_INFINITY,W.y=Number.POSITIVE_INFINITY,W.z=Number.POSITIVE_INFINITY;let C=Zt;C.x=Number.NEGATIVE_INFINITY,C.y=Number.NEGATIVE_INFINITY,C.z=Number.NEGATIVE_INFINITY;let ot=Number.POSITIVE_INFINITY,nt=Number.NEGATIVE_INFINITY,it=Number.POSITIVE_INFINITY,rt=Number.NEGATIVE_INFINITY;for(let a=0;a<e;++a){let x=j[a],Kt=q[a],St=x/ht,xt=Kt/ht,yt=f.lerp(y,v,Q[a]/ht);u.longitude=f.lerp(p,L,St),u.latitude=f.lerp(b,N,xt),u.height=yt,ot=Math.min(u.longitude,ot),nt=Math.max(u.longitude,nt),it=Math.min(u.latitude,it),rt=Math.max(u.latitude,rt);let dt=I.cartographicToCartesian(u);l[a]=new lt(St,xt),M[a]=yt,et[a]=dt,i&&(It[a]=(z.geodeticLatitudeToMercatorAngle(u.latitude)-G)*A),g&&(gt[a]=I.geodeticSurfaceNormal(dt)),U.multiplyByPoint(O,dt,D),P.minimumByComponent(D,W,W),P.maximumByComponent(D,C,C)}let st=tt(t.westIndices,function(a,x){return l[a].y-l[x].y}),ct=tt(t.eastIndices,function(a,x){return l[x].y-l[a].y}),at=tt(t.southIndices,function(a,x){return l[x].x-l[a].x}),ut=tt(t.northIndices,function(a,x){return l[a].x-l[x].x}),mt;y<0&&(mt=new Ct(I).computeHorizonCullingPointPossiblyUnderEllipsoid(S,et,y));let k=y;k=Math.min(k,J(t.westIndices,t.westSkirtHeight,M,l,d,I,O,W,C)),k=Math.min(k,J(t.southIndices,t.southSkirtHeight,M,l,d,I,O,W,C)),k=Math.min(k,J(t.eastIndices,t.eastSkirtHeight,M,l,d,I,O,W,C)),k=Math.min(k,J(t.northIndices,t.northSkirtHeight,M,l,d,I,O,W,C));let Ft=new Wt(W,C,S),V=new vt(S,Ft,k,v,_,R,i,g,c,h),F=V.stride,Bt=e*F+s*F,B=new Float32Array(Bt),ft=0;for(let a=0;a<e;++a){if(R){let x=a*2;Y.x=r[x],Y.y=r[x+1]}ft=V.encode(B,ft,et[a],l[a],M[a],Y,It[a],gt[a])}let Ht=Math.max(0,(s-4)*2),_t=t.indices.length+Ht*3,K=X.createTypedArray(e+s,_t);K.set(t.indices,0);let Tt=1e-4,Et=(nt-ot)*Tt,Nt=(rt-it)*Tt,Yt=-Et,Rt=0,Ut=Et,zt=0,Dt=0,jt=Nt,qt=0,Qt=-Nt,H=e*F;return $(B,H,st,V,M,l,r,I,d,t.westSkirtHeight,G,A,Yt,Rt),H+=t.westIndices.length*F,$(B,H,at,V,M,l,r,I,d,t.southSkirtHeight,G,A,qt,Qt),H+=t.southIndices.length*F,$(B,H,ct,V,M,l,r,I,d,t.eastSkirtHeight,G,A,Ut,zt),H+=t.eastIndices.length*F,$(B,H,ut,V,M,l,r,I,d,t.northSkirtHeight,G,A,Dt,jt),Vt.addSkirtIndices(st,at,ct,ut,e,K,t.indices.length),n.push(B.buffer,K.buffer),{vertices:B.buffer,indices:K.buffer,westIndicesSouthToNorth:st,southIndicesEastToWest:at,eastIndicesNorthToSouth:ct,northIndicesWestToEast:ut,vertexStride:F,center:S,minimumHeight:y,maximumHeight:v,occludeePointInScaledSpace:mt,encoding:V,indexCountWithoutSkirts:t.indices.length}}function J(t,n,o,e,r,s,i,c,h){let E=Number.POSITIVE_INFINITY,g=r.north,d=r.south,p=r.east,b=r.west;p<b&&(p+=f.TWO_PI);let L=t.length;for(let N=0;N<L;++N){let I=t[N],y=o[I],v=e[I];u.longitude=f.lerp(b,p,v.x),u.latitude=f.lerp(d,g,v.y),u.height=y-n;let S=s.cartographicToCartesian(u,D);U.multiplyByPoint(i,S,S),P.minimumByComponent(S,c,c),P.maximumByComponent(S,h,h),E=Math.min(E,u.height)}return E}function $(t,n,o,e,r,s,i,c,h,E,g,d,p,b){let L=w(i),N=h.north,I=h.south,y=h.east,v=h.west;y<v&&(y+=f.TWO_PI);let S=o.length;for(let _=0;_<S;++_){let O=o[_],G=r[O],A=s[O];u.longitude=f.lerp(v,y,A.x)+p,u.latitude=f.lerp(I,N,A.y)+b,u.height=G-E;let j=c.cartographicToCartesian(u,D);if(L){let R=O*2;Y.x=i[R],Y.y=i[R+1]}let q;e.hasWebMercatorT&&(q=(z.geodeticLatitudeToMercatorAngle(u.latitude)-g)*d);let Q;e.hasGeodeticSurfaceNormals&&(Q=c.geodeticSurfaceNormal(j)),n=e.encode(t,n,j,A,u.height,Y,q,Q)}}function tt(t,n){let o;return typeof t.slice=="function"&&(o=t.slice(),typeof o.sort!="function"&&(o=void 0)),w(o)||(o=Array.prototype.slice.call(t)),o.sort(n),o}var Se=Mt(Jt);export{Se as default}; |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.116 | ||
* Version 1.116.1 | ||
* | ||
@@ -26,2 +26,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
import{a as nt}from"./chunk-UT4RPIUP.js";import"./chunk-2QAZKO32.js";import"./chunk-M5A47EM2.js";import{a as _}from"./chunk-TK2AA6M2.js";import"./chunk-5CBMSEPD.js";import"./chunk-2DF4CAYN.js";import"./chunk-LGFQRF3V.js";import"./chunk-AHZBRYZA.js";import{a as ot}from"./chunk-TWAPNO4J.js";import{a as it}from"./chunk-FSXLPWHR.js";import{b as tt,c as et,d as R}from"./chunk-37KLWU3W.js";import{d as I}from"./chunk-HTNJJ6YO.js";import"./chunk-63E276CT.js";import"./chunk-NRW2R4YV.js";import"./chunk-NSILPUHD.js";import{a as S}from"./chunk-M7WODBAD.js";import{a as s,d as l}from"./chunk-J26GWQSN.js";import{a as J}from"./chunk-PYB3IV2X.js";import"./chunk-H7FFK4U5.js";import"./chunk-YEUII2A5.js";import{a as w}from"./chunk-4353PD6R.js";import{a as P}from"./chunk-2S4UUFD6.js";import{e as r}from"./chunk-42VHSORI.js";var Q=new s,Y=new s,lt=new s,st=new s,pt=new s,ut=new s,ft=new s;function k(t){t=w(t,w.EMPTY_OBJECT);let e=t.positions,o=t.maximumHeights,n=t.minimumHeights;if(!r(e))throw new P("options.positions is required.");if(r(o)&&o.length!==e.length)throw new P("options.positions and options.maximumHeights must have the same length.");if(r(n)&&n.length!==e.length)throw new P("options.positions and options.minimumHeights must have the same length.");let i=w(t.vertexFormat,_.DEFAULT),c=w(t.granularity,J.RADIANS_PER_DEGREE),a=w(t.ellipsoid,l.WGS84);this._positions=e,this._minimumHeights=n,this._maximumHeights=o,this._vertexFormat=_.clone(i),this._granularity=c,this._ellipsoid=l.clone(a),this._workerName="createWallGeometry";let m=1+e.length*s.packedLength+2;r(n)&&(m+=n.length),r(o)&&(m+=o.length),this.packedLength=m+l.packedLength+_.packedLength+1}k.pack=function(t,e,o){if(!r(t))throw new P("value is required");if(!r(e))throw new P("array is required");o=w(o,0);let n,i=t._positions,c=i.length;for(e[o++]=c,n=0;n<c;++n,o+=s.packedLength)s.pack(i[n],e,o);let a=t._minimumHeights;if(c=r(a)?a.length:0,e[o++]=c,r(a))for(n=0;n<c;++n)e[o++]=a[n];let m=t._maximumHeights;if(c=r(m)?m.length:0,e[o++]=c,r(m))for(n=0;n<c;++n)e[o++]=m[n];return l.pack(t._ellipsoid,e,o),o+=l.packedLength,_.pack(t._vertexFormat,e,o),o+=_.packedLength,e[o]=t._granularity,e};var mt=l.clone(l.UNIT_SPHERE),rt=new _,M={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:mt,vertexFormat:rt,granularity:void 0};k.unpack=function(t,e,o){if(!r(t))throw new P("array is required");e=w(e,0);let n,i=t[e++],c=new Array(i);for(n=0;n<i;++n,e+=s.packedLength)c[n]=s.unpack(t,e);i=t[e++];let a;if(i>0)for(a=new Array(i),n=0;n<i;++n)a[n]=t[e++];i=t[e++];let m;if(i>0)for(m=new Array(i),n=0;n<i;++n)m[n]=t[e++];let q=l.unpack(t,e,mt);e+=l.packedLength;let H=_.unpack(t,e,rt);e+=_.packedLength;let f=t[e];return r(o)?(o._positions=c,o._minimumHeights=a,o._maximumHeights=m,o._ellipsoid=l.clone(q,o._ellipsoid),o._vertexFormat=_.clone(H,o._vertexFormat),o._granularity=f,o):(M.positions=c,M.minimumHeights=a,M.maximumHeights=m,M.granularity=f,new k(M))};k.fromConstantHeights=function(t){t=w(t,w.EMPTY_OBJECT);let e=t.positions;if(!r(e))throw new P("options.positions is required.");let o,n,i=t.minimumHeight,c=t.maximumHeight,a=r(i),m=r(c);if(a||m){let H=e.length;o=a?new Array(H):void 0,n=m?new Array(H):void 0;for(let f=0;f<H;++f)a&&(o[f]=i),m&&(n[f]=c)}let q={positions:e,maximumHeights:n,minimumHeights:o,ellipsoid:t.ellipsoid,vertexFormat:t.vertexFormat};return new k(q)};k.createGeometry=function(t){let e=t._positions,o=t._minimumHeights,n=t._maximumHeights,i=t._vertexFormat,c=t._granularity,a=t._ellipsoid,m=nt.computePositions(a,e,n,o,c,!0);if(!r(m))return;let q=m.bottomPositions,H=m.topPositions,f=m.numCorners,W=H.length,y=W*2,h=i.position?new Float64Array(y):void 0,b=i.normal?new Float32Array(y):void 0,x=i.tangent?new Float32Array(y):void 0,F=i.bitangent?new Float32Array(y):void 0,B=i.st?new Float32Array(y/3*2):void 0,v=0,T=0,C=0,z=0,U=0,g=ft,d=ut,A=pt,Z=!0;W/=3;let p,j=0,ct=1/(W-f-1);for(p=0;p<W;++p){let E=p*3,u=s.fromArray(H,E,Q),G=s.fromArray(q,E,Y);if(i.position&&(h[v++]=G.x,h[v++]=G.y,h[v++]=G.z,h[v++]=u.x,h[v++]=u.y,h[v++]=u.z),i.st&&(B[U++]=j,B[U++]=0,B[U++]=j,B[U++]=1),i.normal||i.tangent||i.bitangent){let N=s.clone(s.ZERO,st),K=s.subtract(u,a.geodeticSurfaceNormal(u,Y),Y);if(p+1<W&&(N=s.fromArray(H,E+3,st)),Z){let V=s.subtract(N,u,lt),at=s.subtract(K,u,Q);g=s.normalize(s.cross(at,V,g),g),Z=!1}s.equalsEpsilon(u,N,J.EPSILON10)?Z=!0:(j+=ct,i.tangent&&(d=s.normalize(s.subtract(N,u,d),d)),i.bitangent&&(A=s.normalize(s.cross(g,d,A),A))),i.normal&&(b[T++]=g.x,b[T++]=g.y,b[T++]=g.z,b[T++]=g.x,b[T++]=g.y,b[T++]=g.z),i.tangent&&(x[z++]=d.x,x[z++]=d.y,x[z++]=d.z,x[z++]=d.x,x[z++]=d.y,x[z++]=d.z),i.bitangent&&(F[C++]=A.x,F[C++]=A.y,F[C++]=A.z,F[C++]=A.x,F[C++]=A.y,F[C++]=A.z)}}let D=new it;i.position&&(D.position=new R({componentDatatype:S.DOUBLE,componentsPerAttribute:3,values:h})),i.normal&&(D.normal=new R({componentDatatype:S.FLOAT,componentsPerAttribute:3,values:b})),i.tangent&&(D.tangent=new R({componentDatatype:S.FLOAT,componentsPerAttribute:3,values:x})),i.bitangent&&(D.bitangent=new R({componentDatatype:S.FLOAT,componentsPerAttribute:3,values:F})),i.st&&(D.st=new R({componentDatatype:S.FLOAT,componentsPerAttribute:2,values:B}));let $=y/3;y-=6*(f+1);let L=ot.createTypedArray($,y),O=0;for(p=0;p<$-2;p+=2){let E=p,u=p+2,G=s.fromArray(h,E*3,Q),N=s.fromArray(h,u*3,Y);if(s.equalsEpsilon(G,N,J.EPSILON10))continue;let K=p+1,V=p+3;L[O++]=K,L[O++]=E,L[O++]=V,L[O++]=V,L[O++]=E,L[O++]=u}return new et({attributes:D,indices:L,primitiveType:tt.TRIANGLES,boundingSphere:new I.fromVertices(h)})};var X=k;function ht(t,e){return r(e)&&(t=X.unpack(t,e)),t._ellipsoid=l.clone(t._ellipsoid),X.createGeometry(t)}var Ot=ht;export{Ot as default}; | ||
import{a as nt}from"./chunk-ULEYW2KA.js";import"./chunk-IZNUAC5V.js";import"./chunk-3CPQXNZI.js";import{a as _}from"./chunk-64WQCGAE.js";import"./chunk-OBENGMDT.js";import"./chunk-LH3GDPJ4.js";import"./chunk-QC62DG5W.js";import"./chunk-R6IH5WM5.js";import{a as ot}from"./chunk-ROROM35N.js";import{a as it}from"./chunk-F5TB5EI7.js";import{b as tt,c as et,d as R}from"./chunk-VAPKZ5PR.js";import{d as I}from"./chunk-DXGEUDM7.js";import"./chunk-5IUHFVP3.js";import"./chunk-OE3P25NW.js";import"./chunk-HIT4T4MS.js";import{a as S}from"./chunk-3KRBUMEX.js";import{a as s,d as l}from"./chunk-PQ6NV4GA.js";import{a as J}from"./chunk-74I3QBVP.js";import"./chunk-BLVYEJBC.js";import"./chunk-A6PYE4JS.js";import{a as w}from"./chunk-T23IKWCM.js";import{a as P}from"./chunk-HJ33TVGP.js";import{e as r}from"./chunk-WL4PTXMO.js";var Q=new s,Y=new s,lt=new s,st=new s,pt=new s,ut=new s,ft=new s;function k(t){t=w(t,w.EMPTY_OBJECT);let e=t.positions,o=t.maximumHeights,n=t.minimumHeights;if(!r(e))throw new P("options.positions is required.");if(r(o)&&o.length!==e.length)throw new P("options.positions and options.maximumHeights must have the same length.");if(r(n)&&n.length!==e.length)throw new P("options.positions and options.minimumHeights must have the same length.");let i=w(t.vertexFormat,_.DEFAULT),c=w(t.granularity,J.RADIANS_PER_DEGREE),a=w(t.ellipsoid,l.WGS84);this._positions=e,this._minimumHeights=n,this._maximumHeights=o,this._vertexFormat=_.clone(i),this._granularity=c,this._ellipsoid=l.clone(a),this._workerName="createWallGeometry";let m=1+e.length*s.packedLength+2;r(n)&&(m+=n.length),r(o)&&(m+=o.length),this.packedLength=m+l.packedLength+_.packedLength+1}k.pack=function(t,e,o){if(!r(t))throw new P("value is required");if(!r(e))throw new P("array is required");o=w(o,0);let n,i=t._positions,c=i.length;for(e[o++]=c,n=0;n<c;++n,o+=s.packedLength)s.pack(i[n],e,o);let a=t._minimumHeights;if(c=r(a)?a.length:0,e[o++]=c,r(a))for(n=0;n<c;++n)e[o++]=a[n];let m=t._maximumHeights;if(c=r(m)?m.length:0,e[o++]=c,r(m))for(n=0;n<c;++n)e[o++]=m[n];return l.pack(t._ellipsoid,e,o),o+=l.packedLength,_.pack(t._vertexFormat,e,o),o+=_.packedLength,e[o]=t._granularity,e};var mt=l.clone(l.UNIT_SPHERE),rt=new _,M={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:mt,vertexFormat:rt,granularity:void 0};k.unpack=function(t,e,o){if(!r(t))throw new P("array is required");e=w(e,0);let n,i=t[e++],c=new Array(i);for(n=0;n<i;++n,e+=s.packedLength)c[n]=s.unpack(t,e);i=t[e++];let a;if(i>0)for(a=new Array(i),n=0;n<i;++n)a[n]=t[e++];i=t[e++];let m;if(i>0)for(m=new Array(i),n=0;n<i;++n)m[n]=t[e++];let q=l.unpack(t,e,mt);e+=l.packedLength;let H=_.unpack(t,e,rt);e+=_.packedLength;let f=t[e];return r(o)?(o._positions=c,o._minimumHeights=a,o._maximumHeights=m,o._ellipsoid=l.clone(q,o._ellipsoid),o._vertexFormat=_.clone(H,o._vertexFormat),o._granularity=f,o):(M.positions=c,M.minimumHeights=a,M.maximumHeights=m,M.granularity=f,new k(M))};k.fromConstantHeights=function(t){t=w(t,w.EMPTY_OBJECT);let e=t.positions;if(!r(e))throw new P("options.positions is required.");let o,n,i=t.minimumHeight,c=t.maximumHeight,a=r(i),m=r(c);if(a||m){let H=e.length;o=a?new Array(H):void 0,n=m?new Array(H):void 0;for(let f=0;f<H;++f)a&&(o[f]=i),m&&(n[f]=c)}let q={positions:e,maximumHeights:n,minimumHeights:o,ellipsoid:t.ellipsoid,vertexFormat:t.vertexFormat};return new k(q)};k.createGeometry=function(t){let e=t._positions,o=t._minimumHeights,n=t._maximumHeights,i=t._vertexFormat,c=t._granularity,a=t._ellipsoid,m=nt.computePositions(a,e,n,o,c,!0);if(!r(m))return;let q=m.bottomPositions,H=m.topPositions,f=m.numCorners,W=H.length,y=W*2,h=i.position?new Float64Array(y):void 0,b=i.normal?new Float32Array(y):void 0,x=i.tangent?new Float32Array(y):void 0,F=i.bitangent?new Float32Array(y):void 0,B=i.st?new Float32Array(y/3*2):void 0,v=0,T=0,C=0,z=0,U=0,g=ft,d=ut,A=pt,Z=!0;W/=3;let p,j=0,ct=1/(W-f-1);for(p=0;p<W;++p){let E=p*3,u=s.fromArray(H,E,Q),G=s.fromArray(q,E,Y);if(i.position&&(h[v++]=G.x,h[v++]=G.y,h[v++]=G.z,h[v++]=u.x,h[v++]=u.y,h[v++]=u.z),i.st&&(B[U++]=j,B[U++]=0,B[U++]=j,B[U++]=1),i.normal||i.tangent||i.bitangent){let N=s.clone(s.ZERO,st),K=s.subtract(u,a.geodeticSurfaceNormal(u,Y),Y);if(p+1<W&&(N=s.fromArray(H,E+3,st)),Z){let V=s.subtract(N,u,lt),at=s.subtract(K,u,Q);g=s.normalize(s.cross(at,V,g),g),Z=!1}s.equalsEpsilon(u,N,J.EPSILON10)?Z=!0:(j+=ct,i.tangent&&(d=s.normalize(s.subtract(N,u,d),d)),i.bitangent&&(A=s.normalize(s.cross(g,d,A),A))),i.normal&&(b[T++]=g.x,b[T++]=g.y,b[T++]=g.z,b[T++]=g.x,b[T++]=g.y,b[T++]=g.z),i.tangent&&(x[z++]=d.x,x[z++]=d.y,x[z++]=d.z,x[z++]=d.x,x[z++]=d.y,x[z++]=d.z),i.bitangent&&(F[C++]=A.x,F[C++]=A.y,F[C++]=A.z,F[C++]=A.x,F[C++]=A.y,F[C++]=A.z)}}let D=new it;i.position&&(D.position=new R({componentDatatype:S.DOUBLE,componentsPerAttribute:3,values:h})),i.normal&&(D.normal=new R({componentDatatype:S.FLOAT,componentsPerAttribute:3,values:b})),i.tangent&&(D.tangent=new R({componentDatatype:S.FLOAT,componentsPerAttribute:3,values:x})),i.bitangent&&(D.bitangent=new R({componentDatatype:S.FLOAT,componentsPerAttribute:3,values:F})),i.st&&(D.st=new R({componentDatatype:S.FLOAT,componentsPerAttribute:2,values:B}));let $=y/3;y-=6*(f+1);let L=ot.createTypedArray($,y),O=0;for(p=0;p<$-2;p+=2){let E=p,u=p+2,G=s.fromArray(h,E*3,Q),N=s.fromArray(h,u*3,Y);if(s.equalsEpsilon(G,N,J.EPSILON10))continue;let K=p+1,V=p+3;L[O++]=K,L[O++]=E,L[O++]=V,L[O++]=V,L[O++]=E,L[O++]=u}return new et({attributes:D,indices:L,primitiveType:tt.TRIANGLES,boundingSphere:new I.fromVertices(h)})};var X=k;function ht(t,e){return r(e)&&(t=X.unpack(t,e)),t._ellipsoid=l.clone(t._ellipsoid),X.createGeometry(t)}var Ot=ht;export{Ot as default}; |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.116 | ||
* Version 1.116.1 | ||
* | ||
@@ -26,2 +26,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
import{a as B}from"./chunk-UT4RPIUP.js";import"./chunk-2QAZKO32.js";import"./chunk-M5A47EM2.js";import"./chunk-5CBMSEPD.js";import"./chunk-2DF4CAYN.js";import"./chunk-LGFQRF3V.js";import"./chunk-AHZBRYZA.js";import{a as N}from"./chunk-TWAPNO4J.js";import{a as M}from"./chunk-FSXLPWHR.js";import{b as q,c as R,d as W}from"./chunk-37KLWU3W.js";import{d as D}from"./chunk-HTNJJ6YO.js";import"./chunk-63E276CT.js";import"./chunk-NRW2R4YV.js";import"./chunk-NSILPUHD.js";import{a as S}from"./chunk-M7WODBAD.js";import{a as p,d as l}from"./chunk-J26GWQSN.js";import{a as O}from"./chunk-PYB3IV2X.js";import"./chunk-H7FFK4U5.js";import"./chunk-YEUII2A5.js";import{a as d}from"./chunk-4353PD6R.js";import{a as _}from"./chunk-2S4UUFD6.js";import{e as m}from"./chunk-42VHSORI.js";var G=new p,U=new p;function w(i){i=d(i,d.EMPTY_OBJECT);let t=i.positions,e=i.maximumHeights,o=i.minimumHeights;if(!m(t))throw new _("options.positions is required.");if(m(e)&&e.length!==t.length)throw new _("options.positions and options.maximumHeights must have the same length.");if(m(o)&&o.length!==t.length)throw new _("options.positions and options.minimumHeights must have the same length.");let s=d(i.granularity,O.RADIANS_PER_DEGREE),r=d(i.ellipsoid,l.WGS84);this._positions=t,this._minimumHeights=o,this._maximumHeights=e,this._granularity=s,this._ellipsoid=l.clone(r),this._workerName="createWallOutlineGeometry";let n=1+t.length*p.packedLength+2;m(o)&&(n+=o.length),m(e)&&(n+=e.length),this.packedLength=n+l.packedLength+1}w.pack=function(i,t,e){if(!m(i))throw new _("value is required");if(!m(t))throw new _("array is required");e=d(e,0);let o,s=i._positions,r=s.length;for(t[e++]=r,o=0;o<r;++o,e+=p.packedLength)p.pack(s[o],t,e);let n=i._minimumHeights;if(r=m(n)?n.length:0,t[e++]=r,m(n))for(o=0;o<r;++o)t[e++]=n[o];let c=i._maximumHeights;if(r=m(c)?c.length:0,t[e++]=r,m(c))for(o=0;o<r;++o)t[e++]=c[o];return l.pack(i._ellipsoid,t,e),e+=l.packedLength,t[e]=i._granularity,t};var z=l.clone(l.UNIT_SPHERE),b={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:z,granularity:void 0};w.unpack=function(i,t,e){if(!m(i))throw new _("array is required");t=d(t,0);let o,s=i[t++],r=new Array(s);for(o=0;o<s;++o,t+=p.packedLength)r[o]=p.unpack(i,t);s=i[t++];let n;if(s>0)for(n=new Array(s),o=0;o<s;++o)n[o]=i[t++];s=i[t++];let c;if(s>0)for(c=new Array(s),o=0;o<s;++o)c[o]=i[t++];let E=l.unpack(i,t,z);t+=l.packedLength;let u=i[t];return m(e)?(e._positions=r,e._minimumHeights=n,e._maximumHeights=c,e._ellipsoid=l.clone(E,e._ellipsoid),e._granularity=u,e):(b.positions=r,b.minimumHeights=n,b.maximumHeights=c,b.granularity=u,new w(b))};w.fromConstantHeights=function(i){i=d(i,d.EMPTY_OBJECT);let t=i.positions;if(!m(t))throw new _("options.positions is required.");let e,o,s=i.minimumHeight,r=i.maximumHeight,n=m(s),c=m(r);if(n||c){let u=t.length;e=n?new Array(u):void 0,o=c?new Array(u):void 0;for(let g=0;g<u;++g)n&&(e[g]=s),c&&(o[g]=r)}let E={positions:t,maximumHeights:o,minimumHeights:e,ellipsoid:i.ellipsoid};return new w(E)};w.createGeometry=function(i){let t=i._positions,e=i._minimumHeights,o=i._maximumHeights,s=i._granularity,r=i._ellipsoid,n=B.computePositions(r,t,o,e,s,!1);if(!m(n))return;let c=n.bottomPositions,E=n.topPositions,u=E.length,g=u*2,f=new Float64Array(g),P=0;u/=3;let h;for(h=0;h<u;++h){let A=h*3,k=p.fromArray(E,A,G),L=p.fromArray(c,A,U);f[P++]=L.x,f[P++]=L.y,f[P++]=L.z,f[P++]=k.x,f[P++]=k.y,f[P++]=k.z}let V=new M({position:new W({componentDatatype:S.DOUBLE,componentsPerAttribute:3,values:f})}),y=g/3;g=2*y-4+y;let a=N.createTypedArray(y,g),H=0;for(h=0;h<y-2;h+=2){let A=h,k=h+2,L=p.fromArray(f,A*3,G),v=p.fromArray(f,k*3,U);if(p.equalsEpsilon(L,v,O.EPSILON10))continue;let T=h+1,x=h+3;a[H++]=T,a[H++]=A,a[H++]=T,a[H++]=x,a[H++]=A,a[H++]=k}return a[H++]=y-2,a[H++]=y-1,new R({attributes:V,indices:a,primitiveType:q.LINES,boundingSphere:new D.fromVertices(f)})};var C=w;function J(i,t){return m(t)&&(i=C.unpack(i,t)),i._ellipsoid=l.clone(i._ellipsoid),C.createGeometry(i)}var pi=J;export{pi as default}; | ||
import{a as B}from"./chunk-ULEYW2KA.js";import"./chunk-IZNUAC5V.js";import"./chunk-3CPQXNZI.js";import"./chunk-OBENGMDT.js";import"./chunk-LH3GDPJ4.js";import"./chunk-QC62DG5W.js";import"./chunk-R6IH5WM5.js";import{a as N}from"./chunk-ROROM35N.js";import{a as M}from"./chunk-F5TB5EI7.js";import{b as q,c as R,d as W}from"./chunk-VAPKZ5PR.js";import{d as D}from"./chunk-DXGEUDM7.js";import"./chunk-5IUHFVP3.js";import"./chunk-OE3P25NW.js";import"./chunk-HIT4T4MS.js";import{a as S}from"./chunk-3KRBUMEX.js";import{a as p,d as l}from"./chunk-PQ6NV4GA.js";import{a as O}from"./chunk-74I3QBVP.js";import"./chunk-BLVYEJBC.js";import"./chunk-A6PYE4JS.js";import{a as d}from"./chunk-T23IKWCM.js";import{a as _}from"./chunk-HJ33TVGP.js";import{e as m}from"./chunk-WL4PTXMO.js";var G=new p,U=new p;function w(i){i=d(i,d.EMPTY_OBJECT);let t=i.positions,e=i.maximumHeights,o=i.minimumHeights;if(!m(t))throw new _("options.positions is required.");if(m(e)&&e.length!==t.length)throw new _("options.positions and options.maximumHeights must have the same length.");if(m(o)&&o.length!==t.length)throw new _("options.positions and options.minimumHeights must have the same length.");let s=d(i.granularity,O.RADIANS_PER_DEGREE),r=d(i.ellipsoid,l.WGS84);this._positions=t,this._minimumHeights=o,this._maximumHeights=e,this._granularity=s,this._ellipsoid=l.clone(r),this._workerName="createWallOutlineGeometry";let n=1+t.length*p.packedLength+2;m(o)&&(n+=o.length),m(e)&&(n+=e.length),this.packedLength=n+l.packedLength+1}w.pack=function(i,t,e){if(!m(i))throw new _("value is required");if(!m(t))throw new _("array is required");e=d(e,0);let o,s=i._positions,r=s.length;for(t[e++]=r,o=0;o<r;++o,e+=p.packedLength)p.pack(s[o],t,e);let n=i._minimumHeights;if(r=m(n)?n.length:0,t[e++]=r,m(n))for(o=0;o<r;++o)t[e++]=n[o];let c=i._maximumHeights;if(r=m(c)?c.length:0,t[e++]=r,m(c))for(o=0;o<r;++o)t[e++]=c[o];return l.pack(i._ellipsoid,t,e),e+=l.packedLength,t[e]=i._granularity,t};var z=l.clone(l.UNIT_SPHERE),b={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:z,granularity:void 0};w.unpack=function(i,t,e){if(!m(i))throw new _("array is required");t=d(t,0);let o,s=i[t++],r=new Array(s);for(o=0;o<s;++o,t+=p.packedLength)r[o]=p.unpack(i,t);s=i[t++];let n;if(s>0)for(n=new Array(s),o=0;o<s;++o)n[o]=i[t++];s=i[t++];let c;if(s>0)for(c=new Array(s),o=0;o<s;++o)c[o]=i[t++];let E=l.unpack(i,t,z);t+=l.packedLength;let u=i[t];return m(e)?(e._positions=r,e._minimumHeights=n,e._maximumHeights=c,e._ellipsoid=l.clone(E,e._ellipsoid),e._granularity=u,e):(b.positions=r,b.minimumHeights=n,b.maximumHeights=c,b.granularity=u,new w(b))};w.fromConstantHeights=function(i){i=d(i,d.EMPTY_OBJECT);let t=i.positions;if(!m(t))throw new _("options.positions is required.");let e,o,s=i.minimumHeight,r=i.maximumHeight,n=m(s),c=m(r);if(n||c){let u=t.length;e=n?new Array(u):void 0,o=c?new Array(u):void 0;for(let g=0;g<u;++g)n&&(e[g]=s),c&&(o[g]=r)}let E={positions:t,maximumHeights:o,minimumHeights:e,ellipsoid:i.ellipsoid};return new w(E)};w.createGeometry=function(i){let t=i._positions,e=i._minimumHeights,o=i._maximumHeights,s=i._granularity,r=i._ellipsoid,n=B.computePositions(r,t,o,e,s,!1);if(!m(n))return;let c=n.bottomPositions,E=n.topPositions,u=E.length,g=u*2,f=new Float64Array(g),P=0;u/=3;let h;for(h=0;h<u;++h){let A=h*3,k=p.fromArray(E,A,G),L=p.fromArray(c,A,U);f[P++]=L.x,f[P++]=L.y,f[P++]=L.z,f[P++]=k.x,f[P++]=k.y,f[P++]=k.z}let V=new M({position:new W({componentDatatype:S.DOUBLE,componentsPerAttribute:3,values:f})}),y=g/3;g=2*y-4+y;let a=N.createTypedArray(y,g),H=0;for(h=0;h<y-2;h+=2){let A=h,k=h+2,L=p.fromArray(f,A*3,G),v=p.fromArray(f,k*3,U);if(p.equalsEpsilon(L,v,O.EPSILON10))continue;let T=h+1,x=h+3;a[H++]=T,a[H++]=A,a[H++]=T,a[H++]=x,a[H++]=A,a[H++]=k}return a[H++]=y-2,a[H++]=y-1,new R({attributes:V,indices:a,primitiveType:q.LINES,boundingSphere:new D.fromVertices(f)})};var C=w;function J(i,t){return m(t)&&(i=C.unpack(i,t)),i._ellipsoid=l.clone(i._ellipsoid),C.createGeometry(i)}var pi=J;export{pi as default}; |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.116 | ||
* Version 1.116.1 | ||
* | ||
@@ -26,2 +26,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
import{a as O}from"./chunk-NRKRIGW5.js";import{a as I}from"./chunk-4PZYNNSN.js";import{a as m}from"./chunk-TWAPNO4J.js";import{a as w}from"./chunk-M7WODBAD.js";import"./chunk-PYB3IV2X.js";import"./chunk-H7FFK4U5.js";import{a as A}from"./chunk-YEUII2A5.js";import"./chunk-4353PD6R.js";import"./chunk-2S4UUFD6.js";import{d as D,e as d}from"./chunk-42VHSORI.js";var b=D(O(),1),o;function F(t,e){let i=t.num_points(),a=t.num_faces(),n=new o.DracoInt32Array,s=a*3,r=m.createTypedArray(i,s),u=0;for(let c=0;c<a;++c)e.GetFaceFromMesh(t,c,n),r[u+0]=n.GetValue(0),r[u+1]=n.GetValue(1),r[u+2]=n.GetValue(2),u+=3;return o.destroy(n),{typedArray:r,numberOfIndices:s}}function U(t,e,i,a,n){let s,r;a.quantizationBits<=8?(r=new o.DracoUInt8Array,s=new Uint8Array(n),e.GetAttributeUInt8ForAllPoints(t,i,r)):a.quantizationBits<=16?(r=new o.DracoUInt16Array,s=new Uint16Array(n),e.GetAttributeUInt16ForAllPoints(t,i,r)):(r=new o.DracoFloat32Array,s=new Float32Array(n),e.GetAttributeFloatForAllPoints(t,i,r));for(let u=0;u<n;++u)s[u]=r.GetValue(u);return o.destroy(r),s}function k(t,e,i,a){let n,s;switch(i.data_type()){case 1:case 11:s=new o.DracoInt8Array,n=new Int8Array(a),e.GetAttributeInt8ForAllPoints(t,i,s);break;case 2:s=new o.DracoUInt8Array,n=new Uint8Array(a),e.GetAttributeUInt8ForAllPoints(t,i,s);break;case 3:s=new o.DracoInt16Array,n=new Int16Array(a),e.GetAttributeInt16ForAllPoints(t,i,s);break;case 4:s=new o.DracoUInt16Array,n=new Uint16Array(a),e.GetAttributeUInt16ForAllPoints(t,i,s);break;case 5:case 7:s=new o.DracoInt32Array,n=new Int32Array(a),e.GetAttributeInt32ForAllPoints(t,i,s);break;case 6:case 8:s=new o.DracoUInt32Array,n=new Uint32Array(a),e.GetAttributeUInt32ForAllPoints(t,i,s);break;case 9:case 10:s=new o.DracoFloat32Array,n=new Float32Array(a),e.GetAttributeFloatForAllPoints(t,i,s);break}for(let r=0;r<a;++r)n[r]=s.GetValue(r);return o.destroy(s),n}function p(t,e,i){let a=t.num_points(),n=i.num_components(),s,r=new o.AttributeQuantizationTransform;if(r.InitFromAttribute(i)){let y=new Array(n);for(let f=0;f<n;++f)y[f]=r.min_value(f);s={quantizationBits:r.quantization_bits(),minValues:y,range:r.range(),octEncoded:!1}}o.destroy(r),r=new o.AttributeOctahedronTransform,r.InitFromAttribute(i)&&(s={quantizationBits:r.quantization_bits(),octEncoded:!0}),o.destroy(r);let u=a*n,c;d(s)?c=U(t,e,i,s,u):c=k(t,e,i,u);let l=w.fromTypedArray(c);return{array:c,data:{componentsPerAttribute:n,componentDatatype:l,byteOffset:i.byte_offset(),byteStride:w.getSizeInBytes(l)*n,normalized:i.normalized(),quantization:s}}}function _(t){let e=new o.Decoder;t.dequantizeInShader&&(e.SkipAttributeTransform(o.POSITION),e.SkipAttributeTransform(o.NORMAL));let i=new o.DecoderBuffer;if(i.Init(t.buffer,t.buffer.length),e.GetEncodedGeometryType(i)!==o.POINT_CLOUD)throw new A("Draco geometry type must be POINT_CLOUD.");let n=new o.PointCloud,s=e.DecodeBufferToPointCloud(i,n);if(!s.ok()||n.ptr===0)throw new A(`Error decoding draco point cloud: ${s.error_msg()}`);o.destroy(i);let r={},u=t.properties;for(let c in u)if(u.hasOwnProperty(c)){let l;if(c==="POSITION"||c==="NORMAL"){let y=e.GetAttributeId(n,o[c]);l=e.GetAttribute(n,y)}else{let y=u[c];l=e.GetAttributeByUniqueId(n,y)}r[c]=p(n,e,l)}return o.destroy(n),o.destroy(e),r}function g(t){let e=new o.Decoder,i=["POSITION","NORMAL","COLOR","TEX_COORD"];if(t.dequantizeInShader)for(let f=0;f<i.length;++f)e.SkipAttributeTransform(o[i[f]]);let a=t.bufferView,n=new o.DecoderBuffer;if(n.Init(t.array,a.byteLength),e.GetEncodedGeometryType(n)!==o.TRIANGULAR_MESH)throw new A("Unsupported draco mesh geometry type.");let r=new o.Mesh,u=e.DecodeBufferToMesh(n,r);if(!u.ok()||r.ptr===0)throw new A(`Error decoding draco mesh geometry: ${u.error_msg()}`);o.destroy(n);let c={},l=t.compressedAttributes;for(let f in l)if(l.hasOwnProperty(f)){let P=l[f],T=e.GetAttributeByUniqueId(r,P);c[f]=p(r,e,T)}let y={indexArray:F(r,e),attributeData:c};return o.destroy(r),o.destroy(e),y}async function z(t,e){return d(t.bufferView)?g(t):_(t)}async function C(t,e){let i=t.webAssemblyConfig;return d(i)&&d(i.wasmBinaryFile)?o=await(0,b.default)(i):o=await(0,b.default)(),!0}async function G(t,e){let i=t.webAssemblyConfig;return d(i)?C(t,e):z(t,e)}var h=I(G);export{h as default}; | ||
import{a as O}from"./chunk-ZQH2HGVZ.js";import{a as I}from"./chunk-F3CCIWXX.js";import{a as m}from"./chunk-ROROM35N.js";import{a as w}from"./chunk-3KRBUMEX.js";import"./chunk-74I3QBVP.js";import"./chunk-BLVYEJBC.js";import{a as A}from"./chunk-A6PYE4JS.js";import"./chunk-T23IKWCM.js";import"./chunk-HJ33TVGP.js";import{d as D,e as d}from"./chunk-WL4PTXMO.js";var b=D(O(),1),o;function F(t,e){let i=t.num_points(),a=t.num_faces(),n=new o.DracoInt32Array,s=a*3,r=m.createTypedArray(i,s),u=0;for(let c=0;c<a;++c)e.GetFaceFromMesh(t,c,n),r[u+0]=n.GetValue(0),r[u+1]=n.GetValue(1),r[u+2]=n.GetValue(2),u+=3;return o.destroy(n),{typedArray:r,numberOfIndices:s}}function U(t,e,i,a,n){let s,r;a.quantizationBits<=8?(r=new o.DracoUInt8Array,s=new Uint8Array(n),e.GetAttributeUInt8ForAllPoints(t,i,r)):a.quantizationBits<=16?(r=new o.DracoUInt16Array,s=new Uint16Array(n),e.GetAttributeUInt16ForAllPoints(t,i,r)):(r=new o.DracoFloat32Array,s=new Float32Array(n),e.GetAttributeFloatForAllPoints(t,i,r));for(let u=0;u<n;++u)s[u]=r.GetValue(u);return o.destroy(r),s}function k(t,e,i,a){let n,s;switch(i.data_type()){case 1:case 11:s=new o.DracoInt8Array,n=new Int8Array(a),e.GetAttributeInt8ForAllPoints(t,i,s);break;case 2:s=new o.DracoUInt8Array,n=new Uint8Array(a),e.GetAttributeUInt8ForAllPoints(t,i,s);break;case 3:s=new o.DracoInt16Array,n=new Int16Array(a),e.GetAttributeInt16ForAllPoints(t,i,s);break;case 4:s=new o.DracoUInt16Array,n=new Uint16Array(a),e.GetAttributeUInt16ForAllPoints(t,i,s);break;case 5:case 7:s=new o.DracoInt32Array,n=new Int32Array(a),e.GetAttributeInt32ForAllPoints(t,i,s);break;case 6:case 8:s=new o.DracoUInt32Array,n=new Uint32Array(a),e.GetAttributeUInt32ForAllPoints(t,i,s);break;case 9:case 10:s=new o.DracoFloat32Array,n=new Float32Array(a),e.GetAttributeFloatForAllPoints(t,i,s);break}for(let r=0;r<a;++r)n[r]=s.GetValue(r);return o.destroy(s),n}function p(t,e,i){let a=t.num_points(),n=i.num_components(),s,r=new o.AttributeQuantizationTransform;if(r.InitFromAttribute(i)){let y=new Array(n);for(let f=0;f<n;++f)y[f]=r.min_value(f);s={quantizationBits:r.quantization_bits(),minValues:y,range:r.range(),octEncoded:!1}}o.destroy(r),r=new o.AttributeOctahedronTransform,r.InitFromAttribute(i)&&(s={quantizationBits:r.quantization_bits(),octEncoded:!0}),o.destroy(r);let u=a*n,c;d(s)?c=U(t,e,i,s,u):c=k(t,e,i,u);let l=w.fromTypedArray(c);return{array:c,data:{componentsPerAttribute:n,componentDatatype:l,byteOffset:i.byte_offset(),byteStride:w.getSizeInBytes(l)*n,normalized:i.normalized(),quantization:s}}}function _(t){let e=new o.Decoder;t.dequantizeInShader&&(e.SkipAttributeTransform(o.POSITION),e.SkipAttributeTransform(o.NORMAL));let i=new o.DecoderBuffer;if(i.Init(t.buffer,t.buffer.length),e.GetEncodedGeometryType(i)!==o.POINT_CLOUD)throw new A("Draco geometry type must be POINT_CLOUD.");let n=new o.PointCloud,s=e.DecodeBufferToPointCloud(i,n);if(!s.ok()||n.ptr===0)throw new A(`Error decoding draco point cloud: ${s.error_msg()}`);o.destroy(i);let r={},u=t.properties;for(let c in u)if(u.hasOwnProperty(c)){let l;if(c==="POSITION"||c==="NORMAL"){let y=e.GetAttributeId(n,o[c]);l=e.GetAttribute(n,y)}else{let y=u[c];l=e.GetAttributeByUniqueId(n,y)}r[c]=p(n,e,l)}return o.destroy(n),o.destroy(e),r}function g(t){let e=new o.Decoder,i=["POSITION","NORMAL","COLOR","TEX_COORD"];if(t.dequantizeInShader)for(let f=0;f<i.length;++f)e.SkipAttributeTransform(o[i[f]]);let a=t.bufferView,n=new o.DecoderBuffer;if(n.Init(t.array,a.byteLength),e.GetEncodedGeometryType(n)!==o.TRIANGULAR_MESH)throw new A("Unsupported draco mesh geometry type.");let r=new o.Mesh,u=e.DecodeBufferToMesh(n,r);if(!u.ok()||r.ptr===0)throw new A(`Error decoding draco mesh geometry: ${u.error_msg()}`);o.destroy(n);let c={},l=t.compressedAttributes;for(let f in l)if(l.hasOwnProperty(f)){let P=l[f],T=e.GetAttributeByUniqueId(r,P);c[f]=p(r,e,T)}let y={indexArray:F(r,e),attributeData:c};return o.destroy(r),o.destroy(e),y}async function z(t,e){return d(t.bufferView)?g(t):_(t)}async function C(t,e){let i=t.webAssemblyConfig;return d(i)&&d(i.wasmBinaryFile)?o=await(0,b.default)(i):o=await(0,b.default)(),!0}async function G(t,e){let i=t.webAssemblyConfig;return d(i)?C(t,e):z(t,e)}var h=I(G);export{h as default}; |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.116 | ||
* Version 1.116.1 | ||
* | ||
@@ -26,2 +26,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
import{a as Se}from"./chunk-4PZYNNSN.js";import{a as D}from"./chunk-YEUII2A5.js";import{b as ae}from"./chunk-2S4UUFD6.js";import{c as R,d as Ot,e as me}from"./chunk-42VHSORI.js";var Ie=R((Li,Ae)=>{"use strict";var zt=(t,i,e,r)=>{let s=t&65535|0,n=t>>>16&65535|0,c=0;for(;e!==0;){c=e>2e3?2e3:e,e-=c;do s=s+i[r++]|0,n=n+s|0;while(--c);s%=65521,n%=65521}return s|n<<16|0};Ae.exports=zt});var De=R((Pi,Re)=>{"use strict";var Ht=()=>{let t,i=[];for(var e=0;e<256;e++){t=e;for(var r=0;r<8;r++)t=t&1?3988292384^t>>>1:t>>>1;i[e]=t}return i},Ft=new Uint32Array(Ht()),Vt=(t,i,e,r)=>{let s=Ft,n=r+e;t^=-1;for(let c=r;c<n;c++)t=t>>>8^s[(t^i[c])&255];return t^-1};Re.exports=Vt});var Oe=R((zi,Ue)=>{"use strict";Ue.exports=function(i,e){let r,s,n,c,f,_,a,o,v,w,l,u,I,p,x,T,g,d,E,A,h,S,k,b,m=i.state;r=i.next_in,k=i.input,s=r+(i.avail_in-5),n=i.next_out,b=i.output,c=n-(e-i.avail_out),f=n+(i.avail_out-257),_=m.dmax,a=m.wsize,o=m.whave,v=m.wnext,w=m.window,l=m.hold,u=m.bits,I=m.lencode,p=m.distcode,x=(1<<m.lenbits)-1,T=(1<<m.distbits)-1;e:do{u<15&&(l+=k[r++]<<u,u+=8,l+=k[r++]<<u,u+=8),g=I[l&x];t:for(;;){if(d=g>>>24,l>>>=d,u-=d,d=g>>>16&255,d===0)b[n++]=g&65535;else if(d&16){E=g&65535,d&=15,d&&(u<d&&(l+=k[r++]<<u,u+=8),E+=l&(1<<d)-1,l>>>=d,u-=d),u<15&&(l+=k[r++]<<u,u+=8,l+=k[r++]<<u,u+=8),g=p[l&T];i:for(;;){if(d=g>>>24,l>>>=d,u-=d,d=g>>>16&255,d&16){if(A=g&65535,d&=15,u<d&&(l+=k[r++]<<u,u+=8,u<d&&(l+=k[r++]<<u,u+=8)),A+=l&(1<<d)-1,A>_){i.msg="invalid distance too far back",m.mode=16209;break e}if(l>>>=d,u-=d,d=n-c,A>d){if(d=A-d,d>o&&m.sane){i.msg="invalid distance too far back",m.mode=16209;break e}if(h=0,S=w,v===0){if(h+=a-d,d<E){E-=d;do b[n++]=w[h++];while(--d);h=n-A,S=b}}else if(v<d){if(h+=a+v-d,d-=v,d<E){E-=d;do b[n++]=w[h++];while(--d);if(h=0,v<E){d=v,E-=d;do b[n++]=w[h++];while(--d);h=n-A,S=b}}}else if(h+=v-d,d<E){E-=d;do b[n++]=w[h++];while(--d);h=n-A,S=b}for(;E>2;)b[n++]=S[h++],b[n++]=S[h++],b[n++]=S[h++],E-=3;E&&(b[n++]=S[h++],E>1&&(b[n++]=S[h++]))}else{h=n-A;do b[n++]=b[h++],b[n++]=b[h++],b[n++]=b[h++],E-=3;while(E>2);E&&(b[n++]=b[h++],E>1&&(b[n++]=b[h++]))}}else if(d&64){i.msg="invalid distance code",m.mode=16209;break e}else{g=p[(g&65535)+(l&(1<<d)-1)];continue i}break}}else if(d&64)if(d&32){m.mode=16191;break e}else{i.msg="invalid literal/length code",m.mode=16209;break e}else{g=I[(g&65535)+(l&(1<<d)-1)];continue t}break}}while(r<s&&n<f);E=u>>3,r-=E,u-=E<<3,l&=(1<<u)-1,i.next_in=r,i.next_out=n,i.avail_in=r<s?5+(s-r):5-(r-s),i.avail_out=n<f?257+(f-n):257-(n-f),m.hold=l,m.bits=u}});var Me=R((Hi,Ne)=>{"use strict";var Gt=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),Yt=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),Xt=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),qt=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),Kt=(t,i,e,r,s,n,c,f)=>{let _=f.bits,a=0,o=0,v=0,w=0,l=0,u=0,I=0,p=0,x=0,T=0,g,d,E,A,h,S=null,k,b=new Uint16Array(16),m=new Uint16Array(16),L=null,Ee,W,Q;for(a=0;a<=15;a++)b[a]=0;for(o=0;o<r;o++)b[i[e+o]]++;for(l=_,w=15;w>=1&&b[w]===0;w--);if(l>w&&(l=w),w===0)return s[n++]=1<<24|64<<16|0,s[n++]=1<<24|64<<16|0,f.bits=1,0;for(v=1;v<w&&b[v]===0;v++);for(l<v&&(l=v),p=1,a=1;a<=15;a++)if(p<<=1,p-=b[a],p<0)return-1;if(p>0&&(t===0||w!==1))return-1;for(m[1]=0,a=1;a<15;a++)m[a+1]=m[a]+b[a];for(o=0;o<r;o++)i[e+o]!==0&&(c[m[i[e+o]]++]=o);if(t===0?(S=L=c,k=20):t===1?(S=Gt,L=Yt,k=257):(S=Xt,L=qt,k=0),T=0,o=0,a=v,h=n,u=l,I=0,E=-1,x=1<<l,A=x-1,t===1&&x>852||t===2&&x>592)return 1;for(;;){Ee=a-I,c[o]+1<k?(W=0,Q=c[o]):c[o]>=k?(W=L[c[o]-k],Q=S[c[o]-k]):(W=96,Q=0),g=1<<a-I,d=1<<u,v=d;do d-=g,s[h+(T>>I)+d]=Ee<<24|W<<16|Q|0;while(d!==0);for(g=1<<a-1;T&g;)g>>=1;if(g!==0?(T&=g-1,T+=g):T=0,o++,--b[a]===0){if(a===w)break;a=i[e+c[o]]}if(a>l&&(T&A)!==E){for(I===0&&(I=l),h+=v,u=a-I,p=1<<u;u+I<w&&(p-=b[u+I],!(p<=0));)u++,p<<=1;if(x+=1<<u,t===1&&x>852||t===2&&x>592)return 1;E=T&A,s[E]=l<<24|u<<16|h-n|0}}return T!==0&&(s[h+T]=a-I<<24|64<<16|0),f.bits=l,0};Ne.exports=Kt});var J=R((Fi,Ze)=>{"use strict";Ze.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}});var bt=R((Vi,O)=>{"use strict";var he=Ie(),M=De(),jt=Oe(),X=Me(),Wt=0,st=1,ft=2,{Z_FINISH:Be,Z_BLOCK:Qt,Z_TREES:$,Z_OK:P,Z_STREAM_END:Jt,Z_NEED_DICT:$t,Z_STREAM_ERROR:U,Z_DATA_ERROR:lt,Z_MEM_ERROR:ue,Z_BUF_ERROR:ei,Z_DEFLATED:Ce}=J(),ne=16180,Le=16181,Pe=16182,ze=16183,He=16184,Fe=16185,Ve=16186,Ge=16187,Ye=16188,Xe=16189,ie=16190,Z=16191,se=16192,qe=16193,fe=16194,Ke=16195,je=16196,We=16197,Qe=16198,ee=16199,te=16200,Je=16201,$e=16202,et=16203,tt=16204,it=16205,le=16206,nt=16207,rt=16208,y=16209,we=16210,ct=16211,ti=852,ii=592,ni=15,ri=ni,at=t=>(t>>>24&255)+(t>>>8&65280)+((t&65280)<<8)+((t&255)<<24);function ai(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var z=t=>{if(!t)return 1;let i=t.state;return!i||i.strm!==t||i.mode<ne||i.mode>ct?1:0},dt=t=>{if(z(t))return U;let i=t.state;return t.total_in=t.total_out=i.total=0,t.msg="",i.wrap&&(t.adler=i.wrap&1),i.mode=ne,i.last=0,i.havedict=0,i.flags=-1,i.dmax=32768,i.head=null,i.hold=0,i.bits=0,i.lencode=i.lendyn=new Int32Array(ti),i.distcode=i.distdyn=new Int32Array(ii),i.sane=1,i.back=-1,P},ht=t=>{if(z(t))return U;let i=t.state;return i.wsize=0,i.whave=0,i.wnext=0,dt(t)},ut=(t,i)=>{let e;if(z(t))return U;let r=t.state;return i<0?(e=0,i=-i):(e=(i>>4)+5,i<48&&(i&=15)),i&&(i<8||i>15)?U:(r.window!==null&&r.wbits!==i&&(r.window=null),r.wrap=e,r.wbits=i,ht(t))},wt=(t,i)=>{if(!t)return U;let e=new ai;t.state=e,e.strm=t,e.window=null,e.mode=ne;let r=ut(t,i);return r!==P&&(t.state=null),r},oi=t=>wt(t,ri),ot=!0,ce,de,si=t=>{if(ot){ce=new Int32Array(512),de=new Int32Array(32);let i=0;for(;i<144;)t.lens[i++]=8;for(;i<256;)t.lens[i++]=9;for(;i<280;)t.lens[i++]=7;for(;i<288;)t.lens[i++]=8;for(X(st,t.lens,0,288,ce,0,t.work,{bits:9}),i=0;i<32;)t.lens[i++]=5;X(ft,t.lens,0,32,de,0,t.work,{bits:5}),ot=!1}t.lencode=ce,t.lenbits=9,t.distcode=de,t.distbits=5},xt=(t,i,e,r)=>{let s,n=t.state;return n.window===null&&(n.wsize=1<<n.wbits,n.wnext=0,n.whave=0,n.window=new Uint8Array(n.wsize)),r>=n.wsize?(n.window.set(i.subarray(e-n.wsize,e),0),n.wnext=0,n.whave=n.wsize):(s=n.wsize-n.wnext,s>r&&(s=r),n.window.set(i.subarray(e-r,e-r+s),n.wnext),r-=s,r?(n.window.set(i.subarray(e-r,e),0),n.wnext=r,n.whave=n.wsize):(n.wnext+=s,n.wnext===n.wsize&&(n.wnext=0),n.whave<n.wsize&&(n.whave+=s))),0},fi=(t,i)=>{let e,r,s,n,c,f,_,a,o,v,w,l,u,I,p=0,x,T,g,d,E,A,h,S,k=new Uint8Array(4),b,m,L=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(z(t)||!t.output||!t.input&&t.avail_in!==0)return U;e=t.state,e.mode===Z&&(e.mode=se),c=t.next_out,s=t.output,_=t.avail_out,n=t.next_in,r=t.input,f=t.avail_in,a=e.hold,o=e.bits,v=f,w=_,S=P;e:for(;;)switch(e.mode){case ne:if(e.wrap===0){e.mode=se;break}for(;o<16;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(e.wrap&2&&a===35615){e.wbits===0&&(e.wbits=15),e.check=0,k[0]=a&255,k[1]=a>>>8&255,e.check=M(e.check,k,2,0),a=0,o=0,e.mode=Le;break}if(e.head&&(e.head.done=!1),!(e.wrap&1)||(((a&255)<<8)+(a>>8))%31){t.msg="incorrect header check",e.mode=y;break}if((a&15)!==Ce){t.msg="unknown compression method",e.mode=y;break}if(a>>>=4,o-=4,h=(a&15)+8,e.wbits===0&&(e.wbits=h),h>15||h>e.wbits){t.msg="invalid window size",e.mode=y;break}e.dmax=1<<e.wbits,e.flags=0,t.adler=e.check=1,e.mode=a&512?Xe:Z,a=0,o=0;break;case Le:for(;o<16;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(e.flags=a,(e.flags&255)!==Ce){t.msg="unknown compression method",e.mode=y;break}if(e.flags&57344){t.msg="unknown header flags set",e.mode=y;break}e.head&&(e.head.text=a>>8&1),e.flags&512&&e.wrap&4&&(k[0]=a&255,k[1]=a>>>8&255,e.check=M(e.check,k,2,0)),a=0,o=0,e.mode=Pe;case Pe:for(;o<32;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}e.head&&(e.head.time=a),e.flags&512&&e.wrap&4&&(k[0]=a&255,k[1]=a>>>8&255,k[2]=a>>>16&255,k[3]=a>>>24&255,e.check=M(e.check,k,4,0)),a=0,o=0,e.mode=ze;case ze:for(;o<16;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}e.head&&(e.head.xflags=a&255,e.head.os=a>>8),e.flags&512&&e.wrap&4&&(k[0]=a&255,k[1]=a>>>8&255,e.check=M(e.check,k,2,0)),a=0,o=0,e.mode=He;case He:if(e.flags&1024){for(;o<16;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}e.length=a,e.head&&(e.head.extra_len=a),e.flags&512&&e.wrap&4&&(k[0]=a&255,k[1]=a>>>8&255,e.check=M(e.check,k,2,0)),a=0,o=0}else e.head&&(e.head.extra=null);e.mode=Fe;case Fe:if(e.flags&1024&&(l=e.length,l>f&&(l=f),l&&(e.head&&(h=e.head.extra_len-e.length,e.head.extra||(e.head.extra=new Uint8Array(e.head.extra_len)),e.head.extra.set(r.subarray(n,n+l),h)),e.flags&512&&e.wrap&4&&(e.check=M(e.check,r,l,n)),f-=l,n+=l,e.length-=l),e.length))break e;e.length=0,e.mode=Ve;case Ve:if(e.flags&2048){if(f===0)break e;l=0;do h=r[n+l++],e.head&&h&&e.length<65536&&(e.head.name+=String.fromCharCode(h));while(h&&l<f);if(e.flags&512&&e.wrap&4&&(e.check=M(e.check,r,l,n)),f-=l,n+=l,h)break e}else e.head&&(e.head.name=null);e.length=0,e.mode=Ge;case Ge:if(e.flags&4096){if(f===0)break e;l=0;do h=r[n+l++],e.head&&h&&e.length<65536&&(e.head.comment+=String.fromCharCode(h));while(h&&l<f);if(e.flags&512&&e.wrap&4&&(e.check=M(e.check,r,l,n)),f-=l,n+=l,h)break e}else e.head&&(e.head.comment=null);e.mode=Ye;case Ye:if(e.flags&512){for(;o<16;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(e.wrap&4&&a!==(e.check&65535)){t.msg="header crc mismatch",e.mode=y;break}a=0,o=0}e.head&&(e.head.hcrc=e.flags>>9&1,e.head.done=!0),t.adler=e.check=0,e.mode=Z;break;case Xe:for(;o<32;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}t.adler=e.check=at(a),a=0,o=0,e.mode=ie;case ie:if(e.havedict===0)return t.next_out=c,t.avail_out=_,t.next_in=n,t.avail_in=f,e.hold=a,e.bits=o,$t;t.adler=e.check=1,e.mode=Z;case Z:if(i===Qt||i===$)break e;case se:if(e.last){a>>>=o&7,o-=o&7,e.mode=le;break}for(;o<3;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}switch(e.last=a&1,a>>>=1,o-=1,a&3){case 0:e.mode=qe;break;case 1:if(si(e),e.mode=ee,i===$){a>>>=2,o-=2;break e}break;case 2:e.mode=je;break;case 3:t.msg="invalid block type",e.mode=y}a>>>=2,o-=2;break;case qe:for(a>>>=o&7,o-=o&7;o<32;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if((a&65535)!==(a>>>16^65535)){t.msg="invalid stored block lengths",e.mode=y;break}if(e.length=a&65535,a=0,o=0,e.mode=fe,i===$)break e;case fe:e.mode=Ke;case Ke:if(l=e.length,l){if(l>f&&(l=f),l>_&&(l=_),l===0)break e;s.set(r.subarray(n,n+l),c),f-=l,n+=l,_-=l,c+=l,e.length-=l;break}e.mode=Z;break;case je:for(;o<14;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(e.nlen=(a&31)+257,a>>>=5,o-=5,e.ndist=(a&31)+1,a>>>=5,o-=5,e.ncode=(a&15)+4,a>>>=4,o-=4,e.nlen>286||e.ndist>30){t.msg="too many length or distance symbols",e.mode=y;break}e.have=0,e.mode=We;case We:for(;e.have<e.ncode;){for(;o<3;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}e.lens[L[e.have++]]=a&7,a>>>=3,o-=3}for(;e.have<19;)e.lens[L[e.have++]]=0;if(e.lencode=e.lendyn,e.lenbits=7,b={bits:e.lenbits},S=X(Wt,e.lens,0,19,e.lencode,0,e.work,b),e.lenbits=b.bits,S){t.msg="invalid code lengths set",e.mode=y;break}e.have=0,e.mode=Qe;case Qe:for(;e.have<e.nlen+e.ndist;){for(;p=e.lencode[a&(1<<e.lenbits)-1],x=p>>>24,T=p>>>16&255,g=p&65535,!(x<=o);){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(g<16)a>>>=x,o-=x,e.lens[e.have++]=g;else{if(g===16){for(m=x+2;o<m;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(a>>>=x,o-=x,e.have===0){t.msg="invalid bit length repeat",e.mode=y;break}h=e.lens[e.have-1],l=3+(a&3),a>>>=2,o-=2}else if(g===17){for(m=x+3;o<m;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}a>>>=x,o-=x,h=0,l=3+(a&7),a>>>=3,o-=3}else{for(m=x+7;o<m;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}a>>>=x,o-=x,h=0,l=11+(a&127),a>>>=7,o-=7}if(e.have+l>e.nlen+e.ndist){t.msg="invalid bit length repeat",e.mode=y;break}for(;l--;)e.lens[e.have++]=h}}if(e.mode===y)break;if(e.lens[256]===0){t.msg="invalid code -- missing end-of-block",e.mode=y;break}if(e.lenbits=9,b={bits:e.lenbits},S=X(st,e.lens,0,e.nlen,e.lencode,0,e.work,b),e.lenbits=b.bits,S){t.msg="invalid literal/lengths set",e.mode=y;break}if(e.distbits=6,e.distcode=e.distdyn,b={bits:e.distbits},S=X(ft,e.lens,e.nlen,e.ndist,e.distcode,0,e.work,b),e.distbits=b.bits,S){t.msg="invalid distances set",e.mode=y;break}if(e.mode=ee,i===$)break e;case ee:e.mode=te;case te:if(f>=6&&_>=258){t.next_out=c,t.avail_out=_,t.next_in=n,t.avail_in=f,e.hold=a,e.bits=o,jt(t,w),c=t.next_out,s=t.output,_=t.avail_out,n=t.next_in,r=t.input,f=t.avail_in,a=e.hold,o=e.bits,e.mode===Z&&(e.back=-1);break}for(e.back=0;p=e.lencode[a&(1<<e.lenbits)-1],x=p>>>24,T=p>>>16&255,g=p&65535,!(x<=o);){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(T&&!(T&240)){for(d=x,E=T,A=g;p=e.lencode[A+((a&(1<<d+E)-1)>>d)],x=p>>>24,T=p>>>16&255,g=p&65535,!(d+x<=o);){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}a>>>=d,o-=d,e.back+=d}if(a>>>=x,o-=x,e.back+=x,e.length=g,T===0){e.mode=it;break}if(T&32){e.back=-1,e.mode=Z;break}if(T&64){t.msg="invalid literal/length code",e.mode=y;break}e.extra=T&15,e.mode=Je;case Je:if(e.extra){for(m=e.extra;o<m;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}e.length+=a&(1<<e.extra)-1,a>>>=e.extra,o-=e.extra,e.back+=e.extra}e.was=e.length,e.mode=$e;case $e:for(;p=e.distcode[a&(1<<e.distbits)-1],x=p>>>24,T=p>>>16&255,g=p&65535,!(x<=o);){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(!(T&240)){for(d=x,E=T,A=g;p=e.distcode[A+((a&(1<<d+E)-1)>>d)],x=p>>>24,T=p>>>16&255,g=p&65535,!(d+x<=o);){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}a>>>=d,o-=d,e.back+=d}if(a>>>=x,o-=x,e.back+=x,T&64){t.msg="invalid distance code",e.mode=y;break}e.offset=g,e.extra=T&15,e.mode=et;case et:if(e.extra){for(m=e.extra;o<m;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}e.offset+=a&(1<<e.extra)-1,a>>>=e.extra,o-=e.extra,e.back+=e.extra}if(e.offset>e.dmax){t.msg="invalid distance too far back",e.mode=y;break}e.mode=tt;case tt:if(_===0)break e;if(l=w-_,e.offset>l){if(l=e.offset-l,l>e.whave&&e.sane){t.msg="invalid distance too far back",e.mode=y;break}l>e.wnext?(l-=e.wnext,u=e.wsize-l):u=e.wnext-l,l>e.length&&(l=e.length),I=e.window}else I=s,u=c-e.offset,l=e.length;l>_&&(l=_),_-=l,e.length-=l;do s[c++]=I[u++];while(--l);e.length===0&&(e.mode=te);break;case it:if(_===0)break e;s[c++]=e.length,_--,e.mode=te;break;case le:if(e.wrap){for(;o<32;){if(f===0)break e;f--,a|=r[n++]<<o,o+=8}if(w-=_,t.total_out+=w,e.total+=w,e.wrap&4&&w&&(t.adler=e.check=e.flags?M(e.check,s,w,c-w):he(e.check,s,w,c-w)),w=_,e.wrap&4&&(e.flags?a:at(a))!==e.check){t.msg="incorrect data check",e.mode=y;break}a=0,o=0}e.mode=nt;case nt:if(e.wrap&&e.flags){for(;o<32;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(e.wrap&4&&a!==(e.total&4294967295)){t.msg="incorrect length check",e.mode=y;break}a=0,o=0}e.mode=rt;case rt:S=Jt;break e;case y:S=lt;break e;case we:return ue;case ct:default:return U}return t.next_out=c,t.avail_out=_,t.next_in=n,t.avail_in=f,e.hold=a,e.bits=o,(e.wsize||w!==t.avail_out&&e.mode<y&&(e.mode<le||i!==Be))&&xt(t,t.output,t.next_out,w-t.avail_out)?(e.mode=we,ue):(v-=t.avail_in,w-=t.avail_out,t.total_in+=v,t.total_out+=w,e.total+=w,e.wrap&4&&w&&(t.adler=e.check=e.flags?M(e.check,s,w,t.next_out-w):he(e.check,s,w,t.next_out-w)),t.data_type=e.bits+(e.last?64:0)+(e.mode===Z?128:0)+(e.mode===ee||e.mode===fe?256:0),(v===0&&w===0||i===Be)&&S===P&&(S=ei),S)},li=t=>{if(z(t))return U;let i=t.state;return i.window&&(i.window=null),t.state=null,P},ci=(t,i)=>{if(z(t))return U;let e=t.state;return e.wrap&2?(e.head=i,i.done=!1,P):U},di=(t,i)=>{let e=i.length,r,s,n;return z(t)||(r=t.state,r.wrap!==0&&r.mode!==ie)?U:r.mode===ie&&(s=1,s=he(s,i,e,0),s!==r.check)?lt:(n=xt(t,i,e,e),n?(r.mode=we,ue):(r.havedict=1,P))};O.exports.inflateReset=ht;O.exports.inflateReset2=ut;O.exports.inflateResetKeep=dt;O.exports.inflateInit=oi;O.exports.inflateInit2=wt;O.exports.inflate=fi;O.exports.inflateEnd=li;O.exports.inflateGetHeader=ci;O.exports.inflateSetDictionary=di;O.exports.inflateInfo="pako inflate (from Nodeca project)"});var _t=R((Gi,xe)=>{"use strict";var hi=(t,i)=>Object.prototype.hasOwnProperty.call(t,i);xe.exports.assign=function(t){let i=Array.prototype.slice.call(arguments,1);for(;i.length;){let e=i.shift();if(e){if(typeof e!="object")throw new TypeError(e+"must be non-object");for(let r in e)hi(e,r)&&(t[r]=e[r])}}return t};xe.exports.flattenChunks=t=>{let i=0;for(let r=0,s=t.length;r<s;r++)i+=t[r].length;let e=new Uint8Array(i);for(let r=0,s=0,n=t.length;r<n;r++){let c=t[r];e.set(c,s),s+=c.length}return e}});var kt=R((Yi,re)=>{"use strict";var gt=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{gt=!1}var q=new Uint8Array(256);for(let t=0;t<256;t++)q[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;q[254]=q[254]=1;re.exports.string2buf=t=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(t);let i,e,r,s,n,c=t.length,f=0;for(s=0;s<c;s++)e=t.charCodeAt(s),(e&64512)===55296&&s+1<c&&(r=t.charCodeAt(s+1),(r&64512)===56320&&(e=65536+(e-55296<<10)+(r-56320),s++)),f+=e<128?1:e<2048?2:e<65536?3:4;for(i=new Uint8Array(f),n=0,s=0;n<f;s++)e=t.charCodeAt(s),(e&64512)===55296&&s+1<c&&(r=t.charCodeAt(s+1),(r&64512)===56320&&(e=65536+(e-55296<<10)+(r-56320),s++)),e<128?i[n++]=e:e<2048?(i[n++]=192|e>>>6,i[n++]=128|e&63):e<65536?(i[n++]=224|e>>>12,i[n++]=128|e>>>6&63,i[n++]=128|e&63):(i[n++]=240|e>>>18,i[n++]=128|e>>>12&63,i[n++]=128|e>>>6&63,i[n++]=128|e&63);return i};var ui=(t,i)=>{if(i<65534&&t.subarray&>)return String.fromCharCode.apply(null,t.length===i?t:t.subarray(0,i));let e="";for(let r=0;r<i;r++)e+=String.fromCharCode(t[r]);return e};re.exports.buf2string=(t,i)=>{let e=i||t.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(t.subarray(0,i));let r,s,n=new Array(e*2);for(s=0,r=0;r<e;){let c=t[r++];if(c<128){n[s++]=c;continue}let f=q[c];if(f>4){n[s++]=65533,r+=f-1;continue}for(c&=f===2?31:f===3?15:7;f>1&&r<e;)c=c<<6|t[r++]&63,f--;if(f>1){n[s++]=65533;continue}c<65536?n[s++]=c:(c-=65536,n[s++]=55296|c>>10&1023,n[s++]=56320|c&1023)}return ui(n,s)};re.exports.utf8border=(t,i)=>{i=i||t.length,i>t.length&&(i=t.length);let e=i-1;for(;e>=0&&(t[e]&192)===128;)e--;return e<0||e===0?i:e+q[t[e]]>i?e:i}});var Et=R((Xi,pt)=>{"use strict";pt.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}});var St=R((qi,mt)=>{"use strict";function wi(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}mt.exports=wi});var vt=R((Ki,Tt)=>{"use strict";function xi(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}Tt.exports=xi});var Rt=R((ji,V)=>{"use strict";var B=bt(),At=_t(),ge=kt(),ke=Et(),bi=St(),_i=vt(),It=Object.prototype.toString,{Z_NO_FLUSH:gi,Z_FINISH:ki,Z_OK:K,Z_STREAM_END:be,Z_NEED_DICT:_e,Z_STREAM_ERROR:pi,Z_DATA_ERROR:yt,Z_MEM_ERROR:Ei}=J();function j(t){this.options=At.assign({chunkSize:1024*64,windowBits:15,to:""},t||{});let i=this.options;i.raw&&i.windowBits>=0&&i.windowBits<16&&(i.windowBits=-i.windowBits,i.windowBits===0&&(i.windowBits=-15)),i.windowBits>=0&&i.windowBits<16&&!(t&&t.windowBits)&&(i.windowBits+=32),i.windowBits>15&&i.windowBits<48&&(i.windowBits&15||(i.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new bi,this.strm.avail_out=0;let e=B.inflateInit2(this.strm,i.windowBits);if(e!==K)throw new Error(ke[e]);if(this.header=new _i,B.inflateGetHeader(this.strm,this.header),i.dictionary&&(typeof i.dictionary=="string"?i.dictionary=ge.string2buf(i.dictionary):It.call(i.dictionary)==="[object ArrayBuffer]"&&(i.dictionary=new Uint8Array(i.dictionary)),i.raw&&(e=B.inflateSetDictionary(this.strm,i.dictionary),e!==K)))throw new Error(ke[e])}j.prototype.push=function(t,i){let e=this.strm,r=this.options.chunkSize,s=this.options.dictionary,n,c,f;if(this.ended)return!1;for(i===~~i?c=i:c=i===!0?ki:gi,It.call(t)==="[object ArrayBuffer]"?e.input=new Uint8Array(t):e.input=t,e.next_in=0,e.avail_in=e.input.length;;){for(e.avail_out===0&&(e.output=new Uint8Array(r),e.next_out=0,e.avail_out=r),n=B.inflate(e,c),n===_e&&s&&(n=B.inflateSetDictionary(e,s),n===K?n=B.inflate(e,c):n===yt&&(n=_e));e.avail_in>0&&n===be&&e.state.wrap>0&&t[e.next_in]!==0;)B.inflateReset(e),n=B.inflate(e,c);switch(n){case pi:case yt:case _e:case Ei:return this.onEnd(n),this.ended=!0,!1}if(f=e.avail_out,e.next_out&&(e.avail_out===0||n===be))if(this.options.to==="string"){let _=ge.utf8border(e.output,e.next_out),a=e.next_out-_,o=ge.buf2string(e.output,_);e.next_out=a,e.avail_out=r-a,a&&e.output.set(e.output.subarray(_,_+a),0),this.onData(o)}else this.onData(e.output.length===e.next_out?e.output:e.output.subarray(0,e.next_out));if(!(n===K&&f===0)){if(n===be)return n=B.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,!0;if(e.avail_in===0)break}}return!0};j.prototype.onData=function(t){this.chunks.push(t)};j.prototype.onEnd=function(t){t===K&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=At.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function pe(t,i){let e=new j(i);if(e.push(t),e.err)throw e.msg||ke[e.err];return e.result}function mi(t,i){return i=i||{},i.raw=!0,pe(t,i)}V.exports.Inflate=j;V.exports.inflate=pe;V.exports.inflateRaw=mi;V.exports.ungzip=pe;V.exports.constants=J()});var Nt=1953029805,Mt=2917034100;function oe(t,i){if(oe.passThroughDataForTesting)return i;ae.typeOf.object("key",t),ae.typeOf.object("data",i);let e=t.byteLength;if(e===0||e%4!==0)throw new D("The length of key must be greater than 0 and a multiple of 4.");let r=new DataView(i),s=r.getUint32(0,!0);if(s===Nt||s===Mt)return i;let n=new DataView(t),c=0,f=i.byteLength,_=f-f%8,a=e,o,v=8;for(;c<_;)for(v=(v+8)%24,o=v;c<_&&o<a;)r.setUint32(c,r.getUint32(c,!0)^n.getUint32(o,!0),!0),r.setUint32(c+4,r.getUint32(c+4,!0)^n.getUint32(o+4,!0),!0),c+=8,o+=24;if(c<f)for(o>=a&&(v=(v+8)%24,o=v);c<f;)r.setUint8(c,r.getUint8(c)^n.getUint8(o)),c++,o++}oe.passThroughDataForTesting=!1;var Te=oe;function Zt(t,i){return(t&i)!==0}var F=Zt;var Bt=[1,2,4,8],ve=15,Ct=16,Lt=64,Pt=128;function N(t,i,e,r,s,n){this._bits=t,this.cnodeVersion=i,this.imageryVersion=e,this.terrainVersion=r,this.imageryProvider=s,this.terrainProvider=n,this.ancestorHasTerrain=!1,this.terrainState=void 0}N.clone=function(t,i){return me(i)?(i._bits=t._bits,i.cnodeVersion=t.cnodeVersion,i.imageryVersion=t.imageryVersion,i.terrainVersion=t.terrainVersion,i.imageryProvider=t.imageryProvider,i.terrainProvider=t.terrainProvider):i=new N(t._bits,t.cnodeVersion,t.imageryVersion,t.terrainVersion,t.imageryProvider,t.terrainProvider),i.ancestorHasTerrain=t.ancestorHasTerrain,i.terrainState=t.terrainState,i};N.prototype.setParent=function(t){this.ancestorHasTerrain=t.ancestorHasTerrain||this.hasTerrain()};N.prototype.hasSubtree=function(){return F(this._bits,Ct)};N.prototype.hasImagery=function(){return F(this._bits,Lt)};N.prototype.hasTerrain=function(){return F(this._bits,Pt)};N.prototype.hasChildren=function(){return F(this._bits,ve)};N.prototype.hasChild=function(t){return F(this._bits,Bt[t])};N.prototype.getChildBitmask=function(){return this._bits&ve};var ye=N;var Ut=Ot(Rt(),1);var G=Uint16Array.BYTES_PER_ELEMENT,H=Int32Array.BYTES_PER_ELEMENT,Y=Uint32Array.BYTES_PER_ELEMENT,C={METADATA:0,TERRAIN:1,DBROOT:2};C.fromString=function(t){if(t==="Metadata")return C.METADATA;if(t==="Terrain")return C.TERRAIN;if(t==="DbRoot")return C.DBROOT};function Si(t,i){let e=C.fromString(t.type),r=t.buffer;Te(t.key,r);let s=Di(r);r=s.buffer;let n=s.length;switch(e){case C.METADATA:return vi(r,n,t.quadKey);case C.TERRAIN:return Ii(r,n,i);case C.DBROOT:return i.push(r),{buffer:r}}}var Ti=32301;function vi(t,i,e){let r=new DataView(t),s=0,n=r.getUint32(s,!0);if(s+=Y,n!==Ti)throw new D("Invalid magic");let c=r.getUint32(s,!0);if(s+=Y,c!==1)throw new D("Invalid data type. Must be 1 for QuadTreePacket");let f=r.getUint32(s,!0);if(s+=Y,f!==2)throw new D("Invalid QuadTreePacket version. Only version 2 is supported.");let _=r.getInt32(s,!0);s+=H;let a=r.getInt32(s,!0);if(s+=H,a!==32)throw new D("Invalid instance size.");let o=r.getInt32(s,!0);s+=H;let v=r.getInt32(s,!0);s+=H;let w=r.getInt32(s,!0);if(s+=H,o!==_*a+s)throw new D("Invalid dataBufferOffset");if(o+v+w!==i)throw new D("Invalid packet offsets");let l=[];for(let g=0;g<_;++g){let d=r.getUint8(s);++s,++s;let E=r.getUint16(s,!0);s+=G;let A=r.getUint16(s,!0);s+=G;let h=r.getUint16(s,!0);s+=G,s+=G,s+=G,s+=H,s+=H,s+=8;let S=r.getUint8(s++),k=r.getUint8(s++);s+=G,l.push(new ye(d,E,A,h,S,k))}let u=[],I=0;function p(g,d,E){let A=!1;if(E===4){if(d.hasSubtree())return;A=!0}for(let h=0;h<4;++h){let S=g+h.toString();if(A)u[S]=null;else if(E<4)if(!d.hasChild(h))u[S]=null;else{if(I===_){console.log("Incorrect number of instances");return}let k=l[I++];u[S]=k,p(S,k,E+1)}}}let x=0,T=l[I++];return e===""?++x:u[e]=T,p(e,T,x),u}var yi=5,Ai=4;function Ii(t,i,e){let r=new DataView(t),s=function(f){for(let _=0;_<Ai;++_){let a=r.getUint32(f,!0);if(f+=Y,f+=a,f>i)throw new D("Malformed terrain packet found.")}return f},n=0,c=[];for(;c.length<yi;){let f=n;n=s(n);let _=t.slice(f,n);e.push(_),c.push(_)}return c}var Dt=1953029805,Ri=2917034100;function Di(t){let i=new DataView(t),e=0,r=i.getUint32(e,!0);if(e+=Y,r!==Dt&&r!==Ri)throw new D("Invalid magic");let s=i.getUint32(e,r===Dt);e+=Y;let n=new Uint8Array(t,e),c=Ut.default.inflate(n);if(c.length!==s)throw new D("Size of packet doesn't match header");return c}var en=Se(Si);export{en as default}; | ||
import{a as Se}from"./chunk-F3CCIWXX.js";import{a as D}from"./chunk-A6PYE4JS.js";import{b as ae}from"./chunk-HJ33TVGP.js";import{c as R,d as Ot,e as me}from"./chunk-WL4PTXMO.js";var Ie=R((Li,Ae)=>{"use strict";var zt=(t,i,e,r)=>{let s=t&65535|0,n=t>>>16&65535|0,c=0;for(;e!==0;){c=e>2e3?2e3:e,e-=c;do s=s+i[r++]|0,n=n+s|0;while(--c);s%=65521,n%=65521}return s|n<<16|0};Ae.exports=zt});var De=R((Pi,Re)=>{"use strict";var Ht=()=>{let t,i=[];for(var e=0;e<256;e++){t=e;for(var r=0;r<8;r++)t=t&1?3988292384^t>>>1:t>>>1;i[e]=t}return i},Ft=new Uint32Array(Ht()),Vt=(t,i,e,r)=>{let s=Ft,n=r+e;t^=-1;for(let c=r;c<n;c++)t=t>>>8^s[(t^i[c])&255];return t^-1};Re.exports=Vt});var Oe=R((zi,Ue)=>{"use strict";Ue.exports=function(i,e){let r,s,n,c,f,_,a,o,v,w,l,u,I,p,x,T,g,d,E,A,h,S,k,b,m=i.state;r=i.next_in,k=i.input,s=r+(i.avail_in-5),n=i.next_out,b=i.output,c=n-(e-i.avail_out),f=n+(i.avail_out-257),_=m.dmax,a=m.wsize,o=m.whave,v=m.wnext,w=m.window,l=m.hold,u=m.bits,I=m.lencode,p=m.distcode,x=(1<<m.lenbits)-1,T=(1<<m.distbits)-1;e:do{u<15&&(l+=k[r++]<<u,u+=8,l+=k[r++]<<u,u+=8),g=I[l&x];t:for(;;){if(d=g>>>24,l>>>=d,u-=d,d=g>>>16&255,d===0)b[n++]=g&65535;else if(d&16){E=g&65535,d&=15,d&&(u<d&&(l+=k[r++]<<u,u+=8),E+=l&(1<<d)-1,l>>>=d,u-=d),u<15&&(l+=k[r++]<<u,u+=8,l+=k[r++]<<u,u+=8),g=p[l&T];i:for(;;){if(d=g>>>24,l>>>=d,u-=d,d=g>>>16&255,d&16){if(A=g&65535,d&=15,u<d&&(l+=k[r++]<<u,u+=8,u<d&&(l+=k[r++]<<u,u+=8)),A+=l&(1<<d)-1,A>_){i.msg="invalid distance too far back",m.mode=16209;break e}if(l>>>=d,u-=d,d=n-c,A>d){if(d=A-d,d>o&&m.sane){i.msg="invalid distance too far back",m.mode=16209;break e}if(h=0,S=w,v===0){if(h+=a-d,d<E){E-=d;do b[n++]=w[h++];while(--d);h=n-A,S=b}}else if(v<d){if(h+=a+v-d,d-=v,d<E){E-=d;do b[n++]=w[h++];while(--d);if(h=0,v<E){d=v,E-=d;do b[n++]=w[h++];while(--d);h=n-A,S=b}}}else if(h+=v-d,d<E){E-=d;do b[n++]=w[h++];while(--d);h=n-A,S=b}for(;E>2;)b[n++]=S[h++],b[n++]=S[h++],b[n++]=S[h++],E-=3;E&&(b[n++]=S[h++],E>1&&(b[n++]=S[h++]))}else{h=n-A;do b[n++]=b[h++],b[n++]=b[h++],b[n++]=b[h++],E-=3;while(E>2);E&&(b[n++]=b[h++],E>1&&(b[n++]=b[h++]))}}else if(d&64){i.msg="invalid distance code",m.mode=16209;break e}else{g=p[(g&65535)+(l&(1<<d)-1)];continue i}break}}else if(d&64)if(d&32){m.mode=16191;break e}else{i.msg="invalid literal/length code",m.mode=16209;break e}else{g=I[(g&65535)+(l&(1<<d)-1)];continue t}break}}while(r<s&&n<f);E=u>>3,r-=E,u-=E<<3,l&=(1<<u)-1,i.next_in=r,i.next_out=n,i.avail_in=r<s?5+(s-r):5-(r-s),i.avail_out=n<f?257+(f-n):257-(n-f),m.hold=l,m.bits=u}});var Me=R((Hi,Ne)=>{"use strict";var Gt=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),Yt=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),Xt=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),qt=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),Kt=(t,i,e,r,s,n,c,f)=>{let _=f.bits,a=0,o=0,v=0,w=0,l=0,u=0,I=0,p=0,x=0,T=0,g,d,E,A,h,S=null,k,b=new Uint16Array(16),m=new Uint16Array(16),L=null,Ee,W,Q;for(a=0;a<=15;a++)b[a]=0;for(o=0;o<r;o++)b[i[e+o]]++;for(l=_,w=15;w>=1&&b[w]===0;w--);if(l>w&&(l=w),w===0)return s[n++]=1<<24|64<<16|0,s[n++]=1<<24|64<<16|0,f.bits=1,0;for(v=1;v<w&&b[v]===0;v++);for(l<v&&(l=v),p=1,a=1;a<=15;a++)if(p<<=1,p-=b[a],p<0)return-1;if(p>0&&(t===0||w!==1))return-1;for(m[1]=0,a=1;a<15;a++)m[a+1]=m[a]+b[a];for(o=0;o<r;o++)i[e+o]!==0&&(c[m[i[e+o]]++]=o);if(t===0?(S=L=c,k=20):t===1?(S=Gt,L=Yt,k=257):(S=Xt,L=qt,k=0),T=0,o=0,a=v,h=n,u=l,I=0,E=-1,x=1<<l,A=x-1,t===1&&x>852||t===2&&x>592)return 1;for(;;){Ee=a-I,c[o]+1<k?(W=0,Q=c[o]):c[o]>=k?(W=L[c[o]-k],Q=S[c[o]-k]):(W=96,Q=0),g=1<<a-I,d=1<<u,v=d;do d-=g,s[h+(T>>I)+d]=Ee<<24|W<<16|Q|0;while(d!==0);for(g=1<<a-1;T&g;)g>>=1;if(g!==0?(T&=g-1,T+=g):T=0,o++,--b[a]===0){if(a===w)break;a=i[e+c[o]]}if(a>l&&(T&A)!==E){for(I===0&&(I=l),h+=v,u=a-I,p=1<<u;u+I<w&&(p-=b[u+I],!(p<=0));)u++,p<<=1;if(x+=1<<u,t===1&&x>852||t===2&&x>592)return 1;E=T&A,s[E]=l<<24|u<<16|h-n|0}}return T!==0&&(s[h+T]=a-I<<24|64<<16|0),f.bits=l,0};Ne.exports=Kt});var J=R((Fi,Ze)=>{"use strict";Ze.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}});var bt=R((Vi,O)=>{"use strict";var he=Ie(),M=De(),jt=Oe(),X=Me(),Wt=0,st=1,ft=2,{Z_FINISH:Be,Z_BLOCK:Qt,Z_TREES:$,Z_OK:P,Z_STREAM_END:Jt,Z_NEED_DICT:$t,Z_STREAM_ERROR:U,Z_DATA_ERROR:lt,Z_MEM_ERROR:ue,Z_BUF_ERROR:ei,Z_DEFLATED:Ce}=J(),ne=16180,Le=16181,Pe=16182,ze=16183,He=16184,Fe=16185,Ve=16186,Ge=16187,Ye=16188,Xe=16189,ie=16190,Z=16191,se=16192,qe=16193,fe=16194,Ke=16195,je=16196,We=16197,Qe=16198,ee=16199,te=16200,Je=16201,$e=16202,et=16203,tt=16204,it=16205,le=16206,nt=16207,rt=16208,y=16209,we=16210,ct=16211,ti=852,ii=592,ni=15,ri=ni,at=t=>(t>>>24&255)+(t>>>8&65280)+((t&65280)<<8)+((t&255)<<24);function ai(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var z=t=>{if(!t)return 1;let i=t.state;return!i||i.strm!==t||i.mode<ne||i.mode>ct?1:0},dt=t=>{if(z(t))return U;let i=t.state;return t.total_in=t.total_out=i.total=0,t.msg="",i.wrap&&(t.adler=i.wrap&1),i.mode=ne,i.last=0,i.havedict=0,i.flags=-1,i.dmax=32768,i.head=null,i.hold=0,i.bits=0,i.lencode=i.lendyn=new Int32Array(ti),i.distcode=i.distdyn=new Int32Array(ii),i.sane=1,i.back=-1,P},ht=t=>{if(z(t))return U;let i=t.state;return i.wsize=0,i.whave=0,i.wnext=0,dt(t)},ut=(t,i)=>{let e;if(z(t))return U;let r=t.state;return i<0?(e=0,i=-i):(e=(i>>4)+5,i<48&&(i&=15)),i&&(i<8||i>15)?U:(r.window!==null&&r.wbits!==i&&(r.window=null),r.wrap=e,r.wbits=i,ht(t))},wt=(t,i)=>{if(!t)return U;let e=new ai;t.state=e,e.strm=t,e.window=null,e.mode=ne;let r=ut(t,i);return r!==P&&(t.state=null),r},oi=t=>wt(t,ri),ot=!0,ce,de,si=t=>{if(ot){ce=new Int32Array(512),de=new Int32Array(32);let i=0;for(;i<144;)t.lens[i++]=8;for(;i<256;)t.lens[i++]=9;for(;i<280;)t.lens[i++]=7;for(;i<288;)t.lens[i++]=8;for(X(st,t.lens,0,288,ce,0,t.work,{bits:9}),i=0;i<32;)t.lens[i++]=5;X(ft,t.lens,0,32,de,0,t.work,{bits:5}),ot=!1}t.lencode=ce,t.lenbits=9,t.distcode=de,t.distbits=5},xt=(t,i,e,r)=>{let s,n=t.state;return n.window===null&&(n.wsize=1<<n.wbits,n.wnext=0,n.whave=0,n.window=new Uint8Array(n.wsize)),r>=n.wsize?(n.window.set(i.subarray(e-n.wsize,e),0),n.wnext=0,n.whave=n.wsize):(s=n.wsize-n.wnext,s>r&&(s=r),n.window.set(i.subarray(e-r,e-r+s),n.wnext),r-=s,r?(n.window.set(i.subarray(e-r,e),0),n.wnext=r,n.whave=n.wsize):(n.wnext+=s,n.wnext===n.wsize&&(n.wnext=0),n.whave<n.wsize&&(n.whave+=s))),0},fi=(t,i)=>{let e,r,s,n,c,f,_,a,o,v,w,l,u,I,p=0,x,T,g,d,E,A,h,S,k=new Uint8Array(4),b,m,L=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(z(t)||!t.output||!t.input&&t.avail_in!==0)return U;e=t.state,e.mode===Z&&(e.mode=se),c=t.next_out,s=t.output,_=t.avail_out,n=t.next_in,r=t.input,f=t.avail_in,a=e.hold,o=e.bits,v=f,w=_,S=P;e:for(;;)switch(e.mode){case ne:if(e.wrap===0){e.mode=se;break}for(;o<16;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(e.wrap&2&&a===35615){e.wbits===0&&(e.wbits=15),e.check=0,k[0]=a&255,k[1]=a>>>8&255,e.check=M(e.check,k,2,0),a=0,o=0,e.mode=Le;break}if(e.head&&(e.head.done=!1),!(e.wrap&1)||(((a&255)<<8)+(a>>8))%31){t.msg="incorrect header check",e.mode=y;break}if((a&15)!==Ce){t.msg="unknown compression method",e.mode=y;break}if(a>>>=4,o-=4,h=(a&15)+8,e.wbits===0&&(e.wbits=h),h>15||h>e.wbits){t.msg="invalid window size",e.mode=y;break}e.dmax=1<<e.wbits,e.flags=0,t.adler=e.check=1,e.mode=a&512?Xe:Z,a=0,o=0;break;case Le:for(;o<16;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(e.flags=a,(e.flags&255)!==Ce){t.msg="unknown compression method",e.mode=y;break}if(e.flags&57344){t.msg="unknown header flags set",e.mode=y;break}e.head&&(e.head.text=a>>8&1),e.flags&512&&e.wrap&4&&(k[0]=a&255,k[1]=a>>>8&255,e.check=M(e.check,k,2,0)),a=0,o=0,e.mode=Pe;case Pe:for(;o<32;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}e.head&&(e.head.time=a),e.flags&512&&e.wrap&4&&(k[0]=a&255,k[1]=a>>>8&255,k[2]=a>>>16&255,k[3]=a>>>24&255,e.check=M(e.check,k,4,0)),a=0,o=0,e.mode=ze;case ze:for(;o<16;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}e.head&&(e.head.xflags=a&255,e.head.os=a>>8),e.flags&512&&e.wrap&4&&(k[0]=a&255,k[1]=a>>>8&255,e.check=M(e.check,k,2,0)),a=0,o=0,e.mode=He;case He:if(e.flags&1024){for(;o<16;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}e.length=a,e.head&&(e.head.extra_len=a),e.flags&512&&e.wrap&4&&(k[0]=a&255,k[1]=a>>>8&255,e.check=M(e.check,k,2,0)),a=0,o=0}else e.head&&(e.head.extra=null);e.mode=Fe;case Fe:if(e.flags&1024&&(l=e.length,l>f&&(l=f),l&&(e.head&&(h=e.head.extra_len-e.length,e.head.extra||(e.head.extra=new Uint8Array(e.head.extra_len)),e.head.extra.set(r.subarray(n,n+l),h)),e.flags&512&&e.wrap&4&&(e.check=M(e.check,r,l,n)),f-=l,n+=l,e.length-=l),e.length))break e;e.length=0,e.mode=Ve;case Ve:if(e.flags&2048){if(f===0)break e;l=0;do h=r[n+l++],e.head&&h&&e.length<65536&&(e.head.name+=String.fromCharCode(h));while(h&&l<f);if(e.flags&512&&e.wrap&4&&(e.check=M(e.check,r,l,n)),f-=l,n+=l,h)break e}else e.head&&(e.head.name=null);e.length=0,e.mode=Ge;case Ge:if(e.flags&4096){if(f===0)break e;l=0;do h=r[n+l++],e.head&&h&&e.length<65536&&(e.head.comment+=String.fromCharCode(h));while(h&&l<f);if(e.flags&512&&e.wrap&4&&(e.check=M(e.check,r,l,n)),f-=l,n+=l,h)break e}else e.head&&(e.head.comment=null);e.mode=Ye;case Ye:if(e.flags&512){for(;o<16;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(e.wrap&4&&a!==(e.check&65535)){t.msg="header crc mismatch",e.mode=y;break}a=0,o=0}e.head&&(e.head.hcrc=e.flags>>9&1,e.head.done=!0),t.adler=e.check=0,e.mode=Z;break;case Xe:for(;o<32;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}t.adler=e.check=at(a),a=0,o=0,e.mode=ie;case ie:if(e.havedict===0)return t.next_out=c,t.avail_out=_,t.next_in=n,t.avail_in=f,e.hold=a,e.bits=o,$t;t.adler=e.check=1,e.mode=Z;case Z:if(i===Qt||i===$)break e;case se:if(e.last){a>>>=o&7,o-=o&7,e.mode=le;break}for(;o<3;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}switch(e.last=a&1,a>>>=1,o-=1,a&3){case 0:e.mode=qe;break;case 1:if(si(e),e.mode=ee,i===$){a>>>=2,o-=2;break e}break;case 2:e.mode=je;break;case 3:t.msg="invalid block type",e.mode=y}a>>>=2,o-=2;break;case qe:for(a>>>=o&7,o-=o&7;o<32;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if((a&65535)!==(a>>>16^65535)){t.msg="invalid stored block lengths",e.mode=y;break}if(e.length=a&65535,a=0,o=0,e.mode=fe,i===$)break e;case fe:e.mode=Ke;case Ke:if(l=e.length,l){if(l>f&&(l=f),l>_&&(l=_),l===0)break e;s.set(r.subarray(n,n+l),c),f-=l,n+=l,_-=l,c+=l,e.length-=l;break}e.mode=Z;break;case je:for(;o<14;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(e.nlen=(a&31)+257,a>>>=5,o-=5,e.ndist=(a&31)+1,a>>>=5,o-=5,e.ncode=(a&15)+4,a>>>=4,o-=4,e.nlen>286||e.ndist>30){t.msg="too many length or distance symbols",e.mode=y;break}e.have=0,e.mode=We;case We:for(;e.have<e.ncode;){for(;o<3;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}e.lens[L[e.have++]]=a&7,a>>>=3,o-=3}for(;e.have<19;)e.lens[L[e.have++]]=0;if(e.lencode=e.lendyn,e.lenbits=7,b={bits:e.lenbits},S=X(Wt,e.lens,0,19,e.lencode,0,e.work,b),e.lenbits=b.bits,S){t.msg="invalid code lengths set",e.mode=y;break}e.have=0,e.mode=Qe;case Qe:for(;e.have<e.nlen+e.ndist;){for(;p=e.lencode[a&(1<<e.lenbits)-1],x=p>>>24,T=p>>>16&255,g=p&65535,!(x<=o);){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(g<16)a>>>=x,o-=x,e.lens[e.have++]=g;else{if(g===16){for(m=x+2;o<m;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(a>>>=x,o-=x,e.have===0){t.msg="invalid bit length repeat",e.mode=y;break}h=e.lens[e.have-1],l=3+(a&3),a>>>=2,o-=2}else if(g===17){for(m=x+3;o<m;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}a>>>=x,o-=x,h=0,l=3+(a&7),a>>>=3,o-=3}else{for(m=x+7;o<m;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}a>>>=x,o-=x,h=0,l=11+(a&127),a>>>=7,o-=7}if(e.have+l>e.nlen+e.ndist){t.msg="invalid bit length repeat",e.mode=y;break}for(;l--;)e.lens[e.have++]=h}}if(e.mode===y)break;if(e.lens[256]===0){t.msg="invalid code -- missing end-of-block",e.mode=y;break}if(e.lenbits=9,b={bits:e.lenbits},S=X(st,e.lens,0,e.nlen,e.lencode,0,e.work,b),e.lenbits=b.bits,S){t.msg="invalid literal/lengths set",e.mode=y;break}if(e.distbits=6,e.distcode=e.distdyn,b={bits:e.distbits},S=X(ft,e.lens,e.nlen,e.ndist,e.distcode,0,e.work,b),e.distbits=b.bits,S){t.msg="invalid distances set",e.mode=y;break}if(e.mode=ee,i===$)break e;case ee:e.mode=te;case te:if(f>=6&&_>=258){t.next_out=c,t.avail_out=_,t.next_in=n,t.avail_in=f,e.hold=a,e.bits=o,jt(t,w),c=t.next_out,s=t.output,_=t.avail_out,n=t.next_in,r=t.input,f=t.avail_in,a=e.hold,o=e.bits,e.mode===Z&&(e.back=-1);break}for(e.back=0;p=e.lencode[a&(1<<e.lenbits)-1],x=p>>>24,T=p>>>16&255,g=p&65535,!(x<=o);){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(T&&!(T&240)){for(d=x,E=T,A=g;p=e.lencode[A+((a&(1<<d+E)-1)>>d)],x=p>>>24,T=p>>>16&255,g=p&65535,!(d+x<=o);){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}a>>>=d,o-=d,e.back+=d}if(a>>>=x,o-=x,e.back+=x,e.length=g,T===0){e.mode=it;break}if(T&32){e.back=-1,e.mode=Z;break}if(T&64){t.msg="invalid literal/length code",e.mode=y;break}e.extra=T&15,e.mode=Je;case Je:if(e.extra){for(m=e.extra;o<m;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}e.length+=a&(1<<e.extra)-1,a>>>=e.extra,o-=e.extra,e.back+=e.extra}e.was=e.length,e.mode=$e;case $e:for(;p=e.distcode[a&(1<<e.distbits)-1],x=p>>>24,T=p>>>16&255,g=p&65535,!(x<=o);){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(!(T&240)){for(d=x,E=T,A=g;p=e.distcode[A+((a&(1<<d+E)-1)>>d)],x=p>>>24,T=p>>>16&255,g=p&65535,!(d+x<=o);){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}a>>>=d,o-=d,e.back+=d}if(a>>>=x,o-=x,e.back+=x,T&64){t.msg="invalid distance code",e.mode=y;break}e.offset=g,e.extra=T&15,e.mode=et;case et:if(e.extra){for(m=e.extra;o<m;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}e.offset+=a&(1<<e.extra)-1,a>>>=e.extra,o-=e.extra,e.back+=e.extra}if(e.offset>e.dmax){t.msg="invalid distance too far back",e.mode=y;break}e.mode=tt;case tt:if(_===0)break e;if(l=w-_,e.offset>l){if(l=e.offset-l,l>e.whave&&e.sane){t.msg="invalid distance too far back",e.mode=y;break}l>e.wnext?(l-=e.wnext,u=e.wsize-l):u=e.wnext-l,l>e.length&&(l=e.length),I=e.window}else I=s,u=c-e.offset,l=e.length;l>_&&(l=_),_-=l,e.length-=l;do s[c++]=I[u++];while(--l);e.length===0&&(e.mode=te);break;case it:if(_===0)break e;s[c++]=e.length,_--,e.mode=te;break;case le:if(e.wrap){for(;o<32;){if(f===0)break e;f--,a|=r[n++]<<o,o+=8}if(w-=_,t.total_out+=w,e.total+=w,e.wrap&4&&w&&(t.adler=e.check=e.flags?M(e.check,s,w,c-w):he(e.check,s,w,c-w)),w=_,e.wrap&4&&(e.flags?a:at(a))!==e.check){t.msg="incorrect data check",e.mode=y;break}a=0,o=0}e.mode=nt;case nt:if(e.wrap&&e.flags){for(;o<32;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(e.wrap&4&&a!==(e.total&4294967295)){t.msg="incorrect length check",e.mode=y;break}a=0,o=0}e.mode=rt;case rt:S=Jt;break e;case y:S=lt;break e;case we:return ue;case ct:default:return U}return t.next_out=c,t.avail_out=_,t.next_in=n,t.avail_in=f,e.hold=a,e.bits=o,(e.wsize||w!==t.avail_out&&e.mode<y&&(e.mode<le||i!==Be))&&xt(t,t.output,t.next_out,w-t.avail_out)?(e.mode=we,ue):(v-=t.avail_in,w-=t.avail_out,t.total_in+=v,t.total_out+=w,e.total+=w,e.wrap&4&&w&&(t.adler=e.check=e.flags?M(e.check,s,w,t.next_out-w):he(e.check,s,w,t.next_out-w)),t.data_type=e.bits+(e.last?64:0)+(e.mode===Z?128:0)+(e.mode===ee||e.mode===fe?256:0),(v===0&&w===0||i===Be)&&S===P&&(S=ei),S)},li=t=>{if(z(t))return U;let i=t.state;return i.window&&(i.window=null),t.state=null,P},ci=(t,i)=>{if(z(t))return U;let e=t.state;return e.wrap&2?(e.head=i,i.done=!1,P):U},di=(t,i)=>{let e=i.length,r,s,n;return z(t)||(r=t.state,r.wrap!==0&&r.mode!==ie)?U:r.mode===ie&&(s=1,s=he(s,i,e,0),s!==r.check)?lt:(n=xt(t,i,e,e),n?(r.mode=we,ue):(r.havedict=1,P))};O.exports.inflateReset=ht;O.exports.inflateReset2=ut;O.exports.inflateResetKeep=dt;O.exports.inflateInit=oi;O.exports.inflateInit2=wt;O.exports.inflate=fi;O.exports.inflateEnd=li;O.exports.inflateGetHeader=ci;O.exports.inflateSetDictionary=di;O.exports.inflateInfo="pako inflate (from Nodeca project)"});var _t=R((Gi,xe)=>{"use strict";var hi=(t,i)=>Object.prototype.hasOwnProperty.call(t,i);xe.exports.assign=function(t){let i=Array.prototype.slice.call(arguments,1);for(;i.length;){let e=i.shift();if(e){if(typeof e!="object")throw new TypeError(e+"must be non-object");for(let r in e)hi(e,r)&&(t[r]=e[r])}}return t};xe.exports.flattenChunks=t=>{let i=0;for(let r=0,s=t.length;r<s;r++)i+=t[r].length;let e=new Uint8Array(i);for(let r=0,s=0,n=t.length;r<n;r++){let c=t[r];e.set(c,s),s+=c.length}return e}});var kt=R((Yi,re)=>{"use strict";var gt=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{gt=!1}var q=new Uint8Array(256);for(let t=0;t<256;t++)q[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;q[254]=q[254]=1;re.exports.string2buf=t=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(t);let i,e,r,s,n,c=t.length,f=0;for(s=0;s<c;s++)e=t.charCodeAt(s),(e&64512)===55296&&s+1<c&&(r=t.charCodeAt(s+1),(r&64512)===56320&&(e=65536+(e-55296<<10)+(r-56320),s++)),f+=e<128?1:e<2048?2:e<65536?3:4;for(i=new Uint8Array(f),n=0,s=0;n<f;s++)e=t.charCodeAt(s),(e&64512)===55296&&s+1<c&&(r=t.charCodeAt(s+1),(r&64512)===56320&&(e=65536+(e-55296<<10)+(r-56320),s++)),e<128?i[n++]=e:e<2048?(i[n++]=192|e>>>6,i[n++]=128|e&63):e<65536?(i[n++]=224|e>>>12,i[n++]=128|e>>>6&63,i[n++]=128|e&63):(i[n++]=240|e>>>18,i[n++]=128|e>>>12&63,i[n++]=128|e>>>6&63,i[n++]=128|e&63);return i};var ui=(t,i)=>{if(i<65534&&t.subarray&>)return String.fromCharCode.apply(null,t.length===i?t:t.subarray(0,i));let e="";for(let r=0;r<i;r++)e+=String.fromCharCode(t[r]);return e};re.exports.buf2string=(t,i)=>{let e=i||t.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(t.subarray(0,i));let r,s,n=new Array(e*2);for(s=0,r=0;r<e;){let c=t[r++];if(c<128){n[s++]=c;continue}let f=q[c];if(f>4){n[s++]=65533,r+=f-1;continue}for(c&=f===2?31:f===3?15:7;f>1&&r<e;)c=c<<6|t[r++]&63,f--;if(f>1){n[s++]=65533;continue}c<65536?n[s++]=c:(c-=65536,n[s++]=55296|c>>10&1023,n[s++]=56320|c&1023)}return ui(n,s)};re.exports.utf8border=(t,i)=>{i=i||t.length,i>t.length&&(i=t.length);let e=i-1;for(;e>=0&&(t[e]&192)===128;)e--;return e<0||e===0?i:e+q[t[e]]>i?e:i}});var Et=R((Xi,pt)=>{"use strict";pt.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}});var St=R((qi,mt)=>{"use strict";function wi(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}mt.exports=wi});var vt=R((Ki,Tt)=>{"use strict";function xi(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}Tt.exports=xi});var Rt=R((ji,V)=>{"use strict";var B=bt(),At=_t(),ge=kt(),ke=Et(),bi=St(),_i=vt(),It=Object.prototype.toString,{Z_NO_FLUSH:gi,Z_FINISH:ki,Z_OK:K,Z_STREAM_END:be,Z_NEED_DICT:_e,Z_STREAM_ERROR:pi,Z_DATA_ERROR:yt,Z_MEM_ERROR:Ei}=J();function j(t){this.options=At.assign({chunkSize:1024*64,windowBits:15,to:""},t||{});let i=this.options;i.raw&&i.windowBits>=0&&i.windowBits<16&&(i.windowBits=-i.windowBits,i.windowBits===0&&(i.windowBits=-15)),i.windowBits>=0&&i.windowBits<16&&!(t&&t.windowBits)&&(i.windowBits+=32),i.windowBits>15&&i.windowBits<48&&(i.windowBits&15||(i.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new bi,this.strm.avail_out=0;let e=B.inflateInit2(this.strm,i.windowBits);if(e!==K)throw new Error(ke[e]);if(this.header=new _i,B.inflateGetHeader(this.strm,this.header),i.dictionary&&(typeof i.dictionary=="string"?i.dictionary=ge.string2buf(i.dictionary):It.call(i.dictionary)==="[object ArrayBuffer]"&&(i.dictionary=new Uint8Array(i.dictionary)),i.raw&&(e=B.inflateSetDictionary(this.strm,i.dictionary),e!==K)))throw new Error(ke[e])}j.prototype.push=function(t,i){let e=this.strm,r=this.options.chunkSize,s=this.options.dictionary,n,c,f;if(this.ended)return!1;for(i===~~i?c=i:c=i===!0?ki:gi,It.call(t)==="[object ArrayBuffer]"?e.input=new Uint8Array(t):e.input=t,e.next_in=0,e.avail_in=e.input.length;;){for(e.avail_out===0&&(e.output=new Uint8Array(r),e.next_out=0,e.avail_out=r),n=B.inflate(e,c),n===_e&&s&&(n=B.inflateSetDictionary(e,s),n===K?n=B.inflate(e,c):n===yt&&(n=_e));e.avail_in>0&&n===be&&e.state.wrap>0&&t[e.next_in]!==0;)B.inflateReset(e),n=B.inflate(e,c);switch(n){case pi:case yt:case _e:case Ei:return this.onEnd(n),this.ended=!0,!1}if(f=e.avail_out,e.next_out&&(e.avail_out===0||n===be))if(this.options.to==="string"){let _=ge.utf8border(e.output,e.next_out),a=e.next_out-_,o=ge.buf2string(e.output,_);e.next_out=a,e.avail_out=r-a,a&&e.output.set(e.output.subarray(_,_+a),0),this.onData(o)}else this.onData(e.output.length===e.next_out?e.output:e.output.subarray(0,e.next_out));if(!(n===K&&f===0)){if(n===be)return n=B.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,!0;if(e.avail_in===0)break}}return!0};j.prototype.onData=function(t){this.chunks.push(t)};j.prototype.onEnd=function(t){t===K&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=At.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function pe(t,i){let e=new j(i);if(e.push(t),e.err)throw e.msg||ke[e.err];return e.result}function mi(t,i){return i=i||{},i.raw=!0,pe(t,i)}V.exports.Inflate=j;V.exports.inflate=pe;V.exports.inflateRaw=mi;V.exports.ungzip=pe;V.exports.constants=J()});var Nt=1953029805,Mt=2917034100;function oe(t,i){if(oe.passThroughDataForTesting)return i;ae.typeOf.object("key",t),ae.typeOf.object("data",i);let e=t.byteLength;if(e===0||e%4!==0)throw new D("The length of key must be greater than 0 and a multiple of 4.");let r=new DataView(i),s=r.getUint32(0,!0);if(s===Nt||s===Mt)return i;let n=new DataView(t),c=0,f=i.byteLength,_=f-f%8,a=e,o,v=8;for(;c<_;)for(v=(v+8)%24,o=v;c<_&&o<a;)r.setUint32(c,r.getUint32(c,!0)^n.getUint32(o,!0),!0),r.setUint32(c+4,r.getUint32(c+4,!0)^n.getUint32(o+4,!0),!0),c+=8,o+=24;if(c<f)for(o>=a&&(v=(v+8)%24,o=v);c<f;)r.setUint8(c,r.getUint8(c)^n.getUint8(o)),c++,o++}oe.passThroughDataForTesting=!1;var Te=oe;function Zt(t,i){return(t&i)!==0}var F=Zt;var Bt=[1,2,4,8],ve=15,Ct=16,Lt=64,Pt=128;function N(t,i,e,r,s,n){this._bits=t,this.cnodeVersion=i,this.imageryVersion=e,this.terrainVersion=r,this.imageryProvider=s,this.terrainProvider=n,this.ancestorHasTerrain=!1,this.terrainState=void 0}N.clone=function(t,i){return me(i)?(i._bits=t._bits,i.cnodeVersion=t.cnodeVersion,i.imageryVersion=t.imageryVersion,i.terrainVersion=t.terrainVersion,i.imageryProvider=t.imageryProvider,i.terrainProvider=t.terrainProvider):i=new N(t._bits,t.cnodeVersion,t.imageryVersion,t.terrainVersion,t.imageryProvider,t.terrainProvider),i.ancestorHasTerrain=t.ancestorHasTerrain,i.terrainState=t.terrainState,i};N.prototype.setParent=function(t){this.ancestorHasTerrain=t.ancestorHasTerrain||this.hasTerrain()};N.prototype.hasSubtree=function(){return F(this._bits,Ct)};N.prototype.hasImagery=function(){return F(this._bits,Lt)};N.prototype.hasTerrain=function(){return F(this._bits,Pt)};N.prototype.hasChildren=function(){return F(this._bits,ve)};N.prototype.hasChild=function(t){return F(this._bits,Bt[t])};N.prototype.getChildBitmask=function(){return this._bits&ve};var ye=N;var Ut=Ot(Rt(),1);var G=Uint16Array.BYTES_PER_ELEMENT,H=Int32Array.BYTES_PER_ELEMENT,Y=Uint32Array.BYTES_PER_ELEMENT,C={METADATA:0,TERRAIN:1,DBROOT:2};C.fromString=function(t){if(t==="Metadata")return C.METADATA;if(t==="Terrain")return C.TERRAIN;if(t==="DbRoot")return C.DBROOT};function Si(t,i){let e=C.fromString(t.type),r=t.buffer;Te(t.key,r);let s=Di(r);r=s.buffer;let n=s.length;switch(e){case C.METADATA:return vi(r,n,t.quadKey);case C.TERRAIN:return Ii(r,n,i);case C.DBROOT:return i.push(r),{buffer:r}}}var Ti=32301;function vi(t,i,e){let r=new DataView(t),s=0,n=r.getUint32(s,!0);if(s+=Y,n!==Ti)throw new D("Invalid magic");let c=r.getUint32(s,!0);if(s+=Y,c!==1)throw new D("Invalid data type. Must be 1 for QuadTreePacket");let f=r.getUint32(s,!0);if(s+=Y,f!==2)throw new D("Invalid QuadTreePacket version. Only version 2 is supported.");let _=r.getInt32(s,!0);s+=H;let a=r.getInt32(s,!0);if(s+=H,a!==32)throw new D("Invalid instance size.");let o=r.getInt32(s,!0);s+=H;let v=r.getInt32(s,!0);s+=H;let w=r.getInt32(s,!0);if(s+=H,o!==_*a+s)throw new D("Invalid dataBufferOffset");if(o+v+w!==i)throw new D("Invalid packet offsets");let l=[];for(let g=0;g<_;++g){let d=r.getUint8(s);++s,++s;let E=r.getUint16(s,!0);s+=G;let A=r.getUint16(s,!0);s+=G;let h=r.getUint16(s,!0);s+=G,s+=G,s+=G,s+=H,s+=H,s+=8;let S=r.getUint8(s++),k=r.getUint8(s++);s+=G,l.push(new ye(d,E,A,h,S,k))}let u=[],I=0;function p(g,d,E){let A=!1;if(E===4){if(d.hasSubtree())return;A=!0}for(let h=0;h<4;++h){let S=g+h.toString();if(A)u[S]=null;else if(E<4)if(!d.hasChild(h))u[S]=null;else{if(I===_){console.log("Incorrect number of instances");return}let k=l[I++];u[S]=k,p(S,k,E+1)}}}let x=0,T=l[I++];return e===""?++x:u[e]=T,p(e,T,x),u}var yi=5,Ai=4;function Ii(t,i,e){let r=new DataView(t),s=function(f){for(let _=0;_<Ai;++_){let a=r.getUint32(f,!0);if(f+=Y,f+=a,f>i)throw new D("Malformed terrain packet found.")}return f},n=0,c=[];for(;c.length<yi;){let f=n;n=s(n);let _=t.slice(f,n);e.push(_),c.push(_)}return c}var Dt=1953029805,Ri=2917034100;function Di(t){let i=new DataView(t),e=0,r=i.getUint32(e,!0);if(e+=Y,r!==Dt&&r!==Ri)throw new D("Invalid magic");let s=i.getUint32(e,r===Dt);e+=Y;let n=new Uint8Array(t,e),c=Ut.default.inflate(n);if(c.length!==s)throw new D("Size of packet doesn't match header");return c}var en=Se(Si);export{en as default}; |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.116 | ||
* Version 1.116.1 | ||
* | ||
@@ -26,2 +26,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
import{a as xt}from"./chunk-NRKRIGW5.js";import{a as P}from"./chunk-ZK2UTPA3.js";import{a as yt}from"./chunk-4PZYNNSN.js";import{a as ht}from"./chunk-TM5U646E.js";import"./chunk-63E276CT.js";import{a as g,b as ot,d as st,e as it}from"./chunk-J26GWQSN.js";import{a as M}from"./chunk-PYB3IV2X.js";import{a as ft}from"./chunk-4353PD6R.js";import{b as lt}from"./chunk-2S4UUFD6.js";import{d as mt,e as h}from"./chunk-42VHSORI.js";var at=mt(xt(),1);function wt(n){return lt.defined("value",n),n<=.04045?n*.07739938080495357:Math.pow((n+.055)*.9478672985781991,2.4)}var k=wt;var ut;function It(n,t,e,o,a,i){let r=e*(1-n)+o*n,s=a*(1-n)+i*n;return r*(1-t)+s*t}function H(n,t,e,o){let a=n+t*e;return o[a]}function At(n,t,e){let o=e.nativeExtent,a=(n-o.west)/(o.east-o.west)*(e.width-1),i=(t-o.south)/(o.north-o.south)*(e.height-1),r=Math.floor(a),s=Math.floor(i);a-=r,i-=s;let c=r<e.width?r+1:r,u=s<e.height?s+1:s;s=e.height-1-s,u=e.height-1-u;let l=H(r,s,e.width,e.buffer),f=H(c,s,e.width,e.buffer),p=H(r,u,e.width,e.buffer),m=H(c,u,e.width,e.buffer),d=It(a,i,l,f,p,m);return d=d*e.scale+e.offset,d}function bt(n,t,e){for(let o=0;o<e.length;o++){let a=e[o].nativeExtent,i=new g;if(e[o].projectionType==="WebMercator"){let r=e[o].projection._ellipsoid._radii;i=new ht(new st(r.x,r.y,r.z)).project(new ot(n,t,0))}else i.x=n,i.y=t;if(i.x>a.west&&i.x<a.east&&i.y>a.south&&i.y<a.north)return At(i.x,i.y,e[o])}return 0}function Lt(n,t,e,o,a,i,r){if(r)return;let s=bt(a.longitude,a.latitude,i);for(let c=0;c<n;++c){let u=bt(a.longitude+M.toRadians(e*t[c*3]),a.latitude+M.toRadians(o*t[c*3+1]),i);t[c*3+2]+=u-s}}function Ot(n,t,e,o,a,i,r,s,c){if(n===0||!h(t)||t.length===0)return;let u=new st(Math.sqrt(r.x),Math.sqrt(r.y),Math.sqrt(r.z));for(let l=0;l<n;++l){let f=l*3,p=f+1,m=f+2,d=new ot;d.longitude=o.longitude+M.toRadians(s*t[f]),d.latitude=o.latitude+M.toRadians(c*t[p]),d.height=o.height+t[m];let b={};u.cartographicToCartesian(d,b),b.x-=a.x,b.y-=a.y,b.z-=a.z;let x={};if(it.multiplyByVector(i,b,x),t[f]=x.x,t[p]=x.y,t[m]=x.z,h(e)){let T=new g(e[f],e[p],e[m]),I={};it.multiplyByVector(i,T,I),e[f]=I.x,e[p]=I.y,e[m]=I.z}}}function Tt(n,t,e){for(let o=0;o<n;++o){let a=e[o*4]/65535,i=e[o*4+1]/65535,r=(e[o*4+2]-e[o*4])/65535,s=(e[o*4+3]-e[o*4+1])/65535;t[o*2]*=r,t[o*2]+=a,t[o*2+1]*=s,t[o*2+1]+=i}}function Ct(n,t,e,o){let a=new Uint32Array(n),i=h(t)?s=>t[s]:s=>s,r=0;if(o&&h(e)){let s=c=>e[i(c)*4+3]<255;for(let c=0;c<n;c+=3)!s(c)&&!s(c+1)&&!s(c+2)&&(a[r++]=i(c),a[r++]=i(c+1),a[r++]=i(c+2));if(r>0){let c=r;for(let u=0;u<n;u+=3)(s(u)||s(u+1)||s(u+2))&&(a[c++]=i(u),a[c++]=i(u+1),a[c++]=i(u+2))}else for(let c=0;c<n;++c)a[c]=i(c)}else{r=n;for(let s=0;s<n;++s)a[s]=i(s)}return{indexArray:a,transparentVertexOffset:r}}function Ft(n,t,e){let o=t[e];if(h(o))return o;let a=t[e]={positions:{},indices:{},edges:{}},i=ft(n[e],n.default);return a.hasOutline=h(i?.edges),a}function Ut(n,t,e,o){if(!h(n[e])){let a=e*3,i=t;for(let r=0;r<3;r++){let s=o[a+r];h(i[s])||(i[s]={}),i=i[s]}h(i.index)||(i.index=e),n[e]=i.index}}function Vt(n,t,e,o,a,i){let r,s;o<a?(r=o,s=a):(r=a,s=o);let c=n[r];h(c)||(c=n[r]={});let u=c[s];h(u)||(u=c[s]={normalsIndex:[],outlines:[]}),u.normalsIndex.push(i),(u.outlines.length===0||t!==o||e!==a)&&u.outlines.push(t,e)}function Et(n,t,e,o){let a=[];for(let i=0;i<e.length;i+=3){let r=h(t)?t[e[i]]:"default",s=Ft(n,a,r);if(!s.hasOutline)continue;let c=s.indices,u=s.positions;for(let f=0;f<3;f++){let p=e[i+f];Ut(c,u,p,o)}let l=s.edges;for(let f=0;f<3;f++){let p=e[i+f],m=e[i+(f+1)%3],d=c[p],b=c[m];Vt(l,p,m,d,b,i)}}return a}var O=new g,X=new g,Y=new g;function gt(n,t,e,o){let a=e[t]*3,i=e[t+1]*3,r=e[t+2]*3;g.fromArray(o,a,O),g.fromArray(o,i,X),g.fromArray(o,r,Y),g.subtract(X,O,X),g.subtract(Y,O,Y),g.cross(X,Y,O);let s=g.magnitude(O);s!==0&&g.divideByScalar(O,s,O);let c=t*3,u=(t+1)*3,l=(t+2)*3;g.pack(O,n,c),g.pack(O,n,u),g.pack(O,n,l)}var z=new g,ct=new g;function _t(n,t,e){g.fromArray(n,t,z),g.fromArray(n,e,ct);let o=g.dot(z,ct),a=g.magnitude(g.cross(z,ct,z));return Math.atan2(a,o)<.25}function Rt(n,t,e,o,a){if(t.normalsIndex.length>1){let i=o.length===a.length;for(let r=0;r<t.normalsIndex.length;r++){let s=t.normalsIndex[r];if(h(a[s*3])||gt(a,s,e,o),r!==0)for(let c=0;c<r;c++){let u=t.normalsIndex[c],l=i?e[s]*3:s*3,f=i?e[u]*3:u*3;if(_t(a,l,f))return}}}n.push(...t.outlines)}function Nt(n,t,e,o,a){let i=Object.keys(t);for(let r=0;r<i.length;r++){let s=t[i[r]],c=Object.keys(s);for(let u=0;u<c.length;u++){let l=s[c[u]];Rt(n,l,e,o,a)}}}function Bt(n,t,e,o){let a=[],i=Object.keys(n);for(let r=0;r<i.length;r++){let s=n[i[r]].edges;Nt(a,s,t,e,o)}return a}function Gt(n,t,e,o,a){if(!h(n)||Object.keys(n).length===0)return;let i=Et(n,t,e,o);(!h(a)||e.length*3!==a.length)&&(a=[]);let r=Bt(i,e,o,a);return r.length>0?new Uint32Array(r):void 0}function St(n){let t=new Float32Array(n.length);for(let e=0;e<n.length;e+=4)t[e]=k(P.byteToFloat(n[e])),t[e+1]=k(P.byteToFloat(n[e+1])),t[e+2]=k(P.byteToFloat(n[e+2])),t[e+3]=P.byteToFloat(n[e+3]);return t}function vt(n,t,e,o,a,i,r){let s={normals:void 0,positions:void 0,uv0s:void 0,colors:void 0,featureIndex:void 0,vertexCount:void 0};if(n===0||!h(e)||e.length===0||h(o))return s;if(h(t)){s.vertexCount=t.length,s.positions=new Float32Array(t.length*3),s.uv0s=h(a)?new Float32Array(t.length*2):void 0,s.colors=h(i)?new Uint8Array(t.length*4):void 0,s.featureIndex=h(r)?new Array(t.length):void 0;for(let c=0;c<t.length;c++){let u=t[c];s.positions[c*3]=e[u*3],s.positions[c*3+1]=e[u*3+1],s.positions[c*3+2]=e[u*3+2],h(s.uv0s)&&(s.uv0s[c*2]=a[u*2],s.uv0s[c*2+1]=a[u*2+1]),h(s.colors)&&(s.colors[c*4]=i[u*4],s.colors[c*4+1]=i[u*4+1],s.colors[c*4+2]=i[u*4+2],s.colors[c*4+3]=i[u*4+3]),h(s.featureIndex)&&(s.featureIndex[c]=r[u])}n=t.length,e=s.positions}t=new Array(n);for(let c=0;c<n;c++)t[c]=c;s.normals=new Float32Array(t.length*3);for(let c=0;c<t.length;c+=3)gt(s.normals,c,t,e);return s}function Mt(n,t,e,o,a,i,r,s){if(n===0||!h(e)||e.length===0)return{buffers:[],bufferViews:[],accessors:[],meshes:[],nodes:[],nodesInScene:[]};let c=[],u=[],l=[],f=[],p=[],m=[],d={},b=[];h(t)&&(n=t.length);let{indexArray:x,transparentVertexOffset:T}=Ct(n,t,i,s.splitGeometryByColorTransparency),I=new Blob([x],{type:"application/binary"}),A=URL.createObjectURL(I),w=n,F=s.enableFeatures&&h(r)?new Float32Array(r.length):void 0,C=0;if(h(F))for(let y=0;y<r.length;++y){F[y]=r[y];let E=r[y]+1;C<E&&(C=E)}let U,R=Gt(s.symbologyData,r,x,e,o);if(h(R)){let y=new Blob([R],{type:"application/binary"});U=URL.createObjectURL(y)}let L=e.subarray(0,w*3),dt=new Blob([L],{type:"application/binary"}),pt=URL.createObjectURL(dt),D=Number.POSITIVE_INFINITY,K=Number.NEGATIVE_INFINITY,Q=Number.POSITIVE_INFINITY,Z=Number.NEGATIVE_INFINITY,J=Number.POSITIVE_INFINITY,$=Number.NEGATIVE_INFINITY;for(let y=0;y<L.length/3;y++)D=Math.min(D,L[y*3+0]),K=Math.max(K,L[y*3+0]),Q=Math.min(Q,L[y*3+1]),Z=Math.max(Z,L[y*3+1]),J=Math.min(J,L[y*3+2]),$=Math.max($,L[y*3+2]);let N=o?o.subarray(0,w*3):void 0,q;if(h(N)){let y=new Blob([N],{type:"application/binary"});q=URL.createObjectURL(y)}let B=a?a.subarray(0,w*2):void 0,tt;if(h(B)){let y=new Blob([B],{type:"application/binary"});tt=URL.createObjectURL(y)}let G=h(i)?St(i.subarray(0,w*4)):void 0,et;if(h(G)){let y=new Blob([G],{type:"application/binary"});et=URL.createObjectURL(y)}let S=h(F)?F.subarray(0,w):void 0,nt;if(h(S)){let y=new Blob([S],{type:"application/binary"});nt=URL.createObjectURL(y)}let _=h(F)?new Float32Array(C):void 0,rt;if(h(_)){for(let E=0;E<_.length;++E)_[E]=E;let y=new Blob([_],{type:"application/binary"});rt=URL.createObjectURL(y)}let V={},j={};V.POSITION=l.length,c.push({uri:pt,byteLength:L.byteLength}),u.push({buffer:c.length-1,byteOffset:0,byteLength:L.byteLength,target:34962}),l.push({bufferView:u.length-1,byteOffset:0,componentType:5126,count:L.length/3,type:"VEC3",max:[D,Q,J],min:[K,Z,$]}),h(q)&&(V.NORMAL=l.length,c.push({uri:q,byteLength:N.byteLength}),u.push({buffer:c.length-1,byteOffset:0,byteLength:N.byteLength,target:34962}),l.push({bufferView:u.length-1,byteOffset:0,componentType:5126,count:N.length/3,type:"VEC3"})),h(tt)&&(V.TEXCOORD_0=l.length,c.push({uri:tt,byteLength:B.byteLength}),u.push({buffer:c.length-1,byteOffset:0,byteLength:B.byteLength,target:34962}),l.push({bufferView:u.length-1,byteOffset:0,componentType:5126,count:B.length/2,type:"VEC2"})),h(et)&&(V.COLOR_0=l.length,c.push({uri:et,byteLength:G.byteLength}),u.push({buffer:c.length-1,byteOffset:0,byteLength:G.byteLength,target:34962}),l.push({bufferView:u.length-1,byteOffset:0,componentType:5126,count:G.length/4,type:"VEC4"})),h(nt)&&(V._FEATURE_ID_0=l.length,c.push({uri:nt,byteLength:S.byteLength}),u.push({buffer:c.length-1,byteOffset:0,byteLength:S.byteLength,target:34963}),l.push({bufferView:u.length-1,byteOffset:0,componentType:5126,count:S.length,type:"SCALAR"}),j.EXT_mesh_features={featureIds:[{attribute:0,propertyTable:0,featureCount:C}]},b.push("EXT_mesh_features")),h(rt)&&(c.push({uri:rt,byteLength:_.byteLength}),u.push({buffer:c.length-1,byteOffset:0,byteLength:_.byteLength,target:34963}),d.EXT_structural_metadata={schema:{id:"i3s-metadata-schema-001",name:"I3S metadata schema 001",description:"The schema for I3S metadata",version:"1.0",classes:{feature:{name:"feature",description:"Feature metadata",properties:{index:{description:"The feature index",type:"SCALAR",componentType:"FLOAT32",required:!0}}}}},propertyTables:[{name:"feature-indices-mapping",class:"feature",count:C,properties:{index:{values:u.length-1}}}]},b.push("EXT_structural_metadata")),h(U)&&(c.push({uri:U,byteLength:R.byteLength}),u.push({buffer:c.length-1,byteOffset:0,byteLength:R.byteLength,target:34963}),l.push({bufferView:u.length-1,byteOffset:0,componentType:5125,count:R.length,type:"SCALAR"}),j.CESIUM_primitive_outline={indices:l.length-1},b.push("CESIUM_primitive_outline")),c.push({uri:A,byteLength:x.byteLength}),u.push({buffer:c.length-1,byteOffset:0,byteLength:x.byteLength,target:34963});let v=[];return T>0&&(l.push({bufferView:u.length-1,byteOffset:0,componentType:5125,count:T,type:"SCALAR"}),v.push({attributes:V,indices:l.length-1,material:v.length,extensions:j})),T<n&&(l.push({bufferView:u.length-1,byteOffset:4*T,componentType:5125,count:n-T,type:"SCALAR"}),v.push({attributes:V,indices:l.length-1,material:v.length,extensions:j,extra:{isTransparent:!0}})),f.push({primitives:v}),m.push(0),p.push({mesh:0}),{buffers:c,bufferViews:u,accessors:l,meshes:f,nodes:p,nodesInScene:m,rootExtensions:d,extensionsUsed:b}}function Pt(n,t,e,o){let a=new Uint8Array(n,0,5);return a[0]===68&&a[1]===82&&a[2]===65&&a[3]===67&&a[4]===79?jt(n,e):Ht(n,t,e,o)}function jt(n){let t=ut,e=new t.DecoderBuffer,o=new Uint8Array(n);e.Init(o,o.length);let a=new t.Decoder,i=a.GetEncodedGeometryType(e),r=new t.MetadataQuerier,s,c;i===t.TRIANGULAR_MESH&&(s=new t.Mesh,c=a.DecodeBufferToMesh(e,s));let u={vertexCount:[0],featureCount:0};if(h(c)&&c.ok()&&s.ptr!==0){let l=s.num_faces(),f=s.num_attributes(),p=s.num_points();u.indices=new Uint32Array(l*3);let m=u.indices;u.vertexCount[0]=p,u.scale_x=1,u.scale_y=1;let d=new t.DracoInt32Array(3);for(let b=0;b<l;++b)a.GetFaceFromMesh(s,b,d),m[b*3]=d.GetValue(0),m[b*3+1]=d.GetValue(1),m[b*3+2]=d.GetValue(2);t.destroy(d);for(let b=0;b<f;++b){let x=a.GetAttribute(s,b),T=kt(t,a,s,x,p),I=x.attribute_type(),A="unknown";I===t.POSITION?A="positions":I===t.NORMAL?A="normals":I===t.COLOR?A="colors":I===t.TEX_COORD&&(A="uv0s");let w=a.GetAttributeMetadata(s,b);if(w.ptr!==0){let F=r.NumEntries(w);for(let C=0;C<F;++C){let U=r.GetEntryName(w,C);U==="i3s-scale_x"?u.scale_x=r.GetDoubleEntry(w,"i3s-scale_x"):U==="i3s-scale_y"?u.scale_y=r.GetDoubleEntry(w,"i3s-scale_y"):U==="i3s-attribute-type"&&(A=r.GetStringEntry(w,"i3s-attribute-type"))}}h(u[A])&&console.log("Attribute already exists",A),u[A]=T,A==="feature-index"&&u.featureCount++}t.destroy(s)}return t.destroy(r),t.destroy(a),u}function kt(n,t,e,o,a){let i=o.num_components()*a,r,c=[function(){},function(){r=new n.DracoInt8Array(i),t.GetAttributeInt8ForAllPoints(e,o,r)||console.error("Bad stream");let l=new Int8Array(i);for(let f=0;f<i;++f)l[f]=r.GetValue(f);return l},function(){r=new n.DracoInt8Array(i),t.GetAttributeUInt8ForAllPoints(e,o,r)||console.error("Bad stream");let l=new Uint8Array(i);for(let f=0;f<i;++f)l[f]=r.GetValue(f);return l},function(){r=new n.DracoInt16Array(i),t.GetAttributeInt16ForAllPoints(e,o,r)||console.error("Bad stream");let l=new Int16Array(i);for(let f=0;f<i;++f)l[f]=r.GetValue(f);return l},function(){r=new n.DracoInt16Array(i),t.GetAttributeUInt16ForAllPoints(e,o,r)||console.error("Bad stream");let l=new Uint16Array(i);for(let f=0;f<i;++f)l[f]=r.GetValue(f);return l},function(){r=new n.DracoInt32Array(i),t.GetAttributeInt32ForAllPoints(e,o,r)||console.error("Bad stream");let l=new Int32Array(i);for(let f=0;f<i;++f)l[f]=r.GetValue(f);return l},function(){r=new n.DracoInt32Array(i),t.GetAttributeUInt32ForAllPoints(e,o,r)||console.error("Bad stream");let l=new Uint32Array(i);for(let f=0;f<i;++f)l[f]=r.GetValue(f);return l},function(){},function(){},function(){r=new n.DracoFloat32Array(i),t.GetAttributeFloatForAllPoints(e,o,r)||console.error("Bad stream");let l=new Float32Array(i);for(let f=0;f<i;++f)l[f]=r.GetValue(f);return l},function(){},function(){r=new n.DracoUInt8Array(i),t.GetAttributeUInt8ForAllPoints(e,o,r)||console.error("Bad stream");let l=new Uint8Array(i);for(let f=0;f<i;++f)l[f]=r.GetValue(f);return l}][o.data_type()]();return h(r)&&n.destroy(r),c}var W={position:function(n,t,e){let o=n.vertexCount*3;return n.positions=new Float32Array(t,e,o),e+=o*4,e},normal:function(n,t,e){let o=n.vertexCount*3;return n.normals=new Float32Array(t,e,o),e+=o*4,e},uv0:function(n,t,e){let o=n.vertexCount*2;return n.uv0s=new Float32Array(t,e,o),e+=o*4,e},color:function(n,t,e){let o=n.vertexCount*4;return n.colors=new Uint8Array(t,e,o),e+=o,e},featureId:function(n,t,e){let o=n.featureCount;return e+=o*8,e},id:function(n,t,e){let o=n.featureCount;return e+=o*8,e},faceRange:function(n,t,e){let o=n.featureCount*2;return n.faceRange=new Uint32Array(t,e,o),e+=o*4,e},uvRegion:function(n,t,e){let o=n.vertexCount*4;return n["uv-region"]=new Uint16Array(t,e,o),e+=o*2,e},region:function(n,t,e){let o=n.vertexCount*4;return n["uv-region"]=new Uint16Array(t,e,o),e+=o*2,e}};function Ht(n,t,e,o){let a={vertexCount:0},i=new DataView(n);try{let r=0;if(a.vertexCount=i.getUint32(r,1),r+=4,a.featureCount=i.getUint32(r,1),r+=4,h(e))for(let s=0;s<e.attributes.length;s++)h(W[e.attributes[s]])?r=W[e.attributes[s]](a,n,r):console.error("Unknown decoder for",e.attributes[s]);else{let s=t.ordering,c=t.featureAttributeOrder;h(o)&&h(o.geometryData)&&h(o.geometryData[0])&&h(o.geometryData[0].params)&&(s=Object.keys(o.geometryData[0].params.vertexAttributes),c=Object.keys(o.geometryData[0].params.featureAttributes));for(let u=0;u<s.length;u++){let l=W[s[u]];r=l(a,n,r)}for(let u=0;u<c.length;u++){let l=W[c[u]];r=l(a,n,r)}}}catch(r){console.error(r)}return a.scale_x=1,a.scale_y=1,a}function Xt(n){let t=Pt(n.binaryData,n.schema,n.bufferInfo,n.featureData);h(n.geoidDataList)&&n.geoidDataList.length>0&&Lt(t.vertexCount,t.positions,t.scale_x,t.scale_y,n.cartographicCenter,n.geoidDataList,!1),Ot(t.vertexCount,t.positions,t.normals,n.cartographicCenter,n.cartesianCenter,n.parentRotation,n.ellipsoidRadiiSquare,t.scale_x,t.scale_y),h(t.uv0s)&&h(t["uv-region"])&&Tt(t.vertexCount,t.uv0s,t["uv-region"]);let e;if(h(t["feature-index"]))e=t["feature-index"];else if(h(t.faceRange)){e=new Array(t.vertexCount);for(let r=0;r<t.faceRange.length-1;r+=2){let s=r/2,c=t.faceRange[r],u=t.faceRange[r+1];for(let l=c;l<=u;l++)e[l*3]=s,e[l*3+1]=s,e[l*3+2]=s}}if(n.calculateNormals){let r=vt(t.vertexCount,t.indices,t.positions,t.normals,t.uv0s,t.colors,e);h(r.normals)&&(t.normals=r.normals,h(r.vertexCount)&&(t.vertexCount=r.vertexCount,t.indices=r.indices,t.positions=r.positions,t.uv0s=r.uv0s,t.colors=r.colors,e=r.featureIndex))}let o=Mt(t.vertexCount,t.indices,t.positions,t.normals,t.uv0s,t.colors,e,n),a={positions:t.positions,indices:t.indices,featureIndex:e,sourceURL:n.url,cartesianCenter:n.cartesianCenter,parentRotation:n.parentRotation};return o._customAttributes=a,{meshData:o}}async function Yt(n,t){let e=n.webAssemblyConfig;return h(e)&&h(e.wasmBinaryFile)?ut=await(0,at.default)(e):ut=await(0,at.default)(),!0}function zt(n,t){let e=n.webAssemblyConfig;return h(e)?Yt(n,t):Xt(n,t)}var se=yt(zt);export{se as default}; | ||
import{a as xt}from"./chunk-ZQH2HGVZ.js";import{a as P}from"./chunk-I7F5J7U6.js";import{a as yt}from"./chunk-F3CCIWXX.js";import{a as ht}from"./chunk-WEQDXQHF.js";import"./chunk-5IUHFVP3.js";import{a as g,b as ot,d as st,e as it}from"./chunk-PQ6NV4GA.js";import{a as M}from"./chunk-74I3QBVP.js";import{a as ft}from"./chunk-T23IKWCM.js";import{b as lt}from"./chunk-HJ33TVGP.js";import{d as mt,e as h}from"./chunk-WL4PTXMO.js";var at=mt(xt(),1);function wt(n){return lt.defined("value",n),n<=.04045?n*.07739938080495357:Math.pow((n+.055)*.9478672985781991,2.4)}var k=wt;var ut;function It(n,t,e,o,a,i){let r=e*(1-n)+o*n,s=a*(1-n)+i*n;return r*(1-t)+s*t}function H(n,t,e,o){let a=n+t*e;return o[a]}function At(n,t,e){let o=e.nativeExtent,a=(n-o.west)/(o.east-o.west)*(e.width-1),i=(t-o.south)/(o.north-o.south)*(e.height-1),r=Math.floor(a),s=Math.floor(i);a-=r,i-=s;let c=r<e.width?r+1:r,u=s<e.height?s+1:s;s=e.height-1-s,u=e.height-1-u;let l=H(r,s,e.width,e.buffer),f=H(c,s,e.width,e.buffer),p=H(r,u,e.width,e.buffer),m=H(c,u,e.width,e.buffer),d=It(a,i,l,f,p,m);return d=d*e.scale+e.offset,d}function bt(n,t,e){for(let o=0;o<e.length;o++){let a=e[o].nativeExtent,i=new g;if(e[o].projectionType==="WebMercator"){let r=e[o].projection._ellipsoid._radii;i=new ht(new st(r.x,r.y,r.z)).project(new ot(n,t,0))}else i.x=n,i.y=t;if(i.x>a.west&&i.x<a.east&&i.y>a.south&&i.y<a.north)return At(i.x,i.y,e[o])}return 0}function Lt(n,t,e,o,a,i,r){if(r)return;let s=bt(a.longitude,a.latitude,i);for(let c=0;c<n;++c){let u=bt(a.longitude+M.toRadians(e*t[c*3]),a.latitude+M.toRadians(o*t[c*3+1]),i);t[c*3+2]+=u-s}}function Ot(n,t,e,o,a,i,r,s,c){if(n===0||!h(t)||t.length===0)return;let u=new st(Math.sqrt(r.x),Math.sqrt(r.y),Math.sqrt(r.z));for(let l=0;l<n;++l){let f=l*3,p=f+1,m=f+2,d=new ot;d.longitude=o.longitude+M.toRadians(s*t[f]),d.latitude=o.latitude+M.toRadians(c*t[p]),d.height=o.height+t[m];let b={};u.cartographicToCartesian(d,b),b.x-=a.x,b.y-=a.y,b.z-=a.z;let x={};if(it.multiplyByVector(i,b,x),t[f]=x.x,t[p]=x.y,t[m]=x.z,h(e)){let T=new g(e[f],e[p],e[m]),I={};it.multiplyByVector(i,T,I),e[f]=I.x,e[p]=I.y,e[m]=I.z}}}function Tt(n,t,e){for(let o=0;o<n;++o){let a=e[o*4]/65535,i=e[o*4+1]/65535,r=(e[o*4+2]-e[o*4])/65535,s=(e[o*4+3]-e[o*4+1])/65535;t[o*2]*=r,t[o*2]+=a,t[o*2+1]*=s,t[o*2+1]+=i}}function Ct(n,t,e,o){let a=new Uint32Array(n),i=h(t)?s=>t[s]:s=>s,r=0;if(o&&h(e)){let s=c=>e[i(c)*4+3]<255;for(let c=0;c<n;c+=3)!s(c)&&!s(c+1)&&!s(c+2)&&(a[r++]=i(c),a[r++]=i(c+1),a[r++]=i(c+2));if(r>0){let c=r;for(let u=0;u<n;u+=3)(s(u)||s(u+1)||s(u+2))&&(a[c++]=i(u),a[c++]=i(u+1),a[c++]=i(u+2))}else for(let c=0;c<n;++c)a[c]=i(c)}else{r=n;for(let s=0;s<n;++s)a[s]=i(s)}return{indexArray:a,transparentVertexOffset:r}}function Ft(n,t,e){let o=t[e];if(h(o))return o;let a=t[e]={positions:{},indices:{},edges:{}},i=ft(n[e],n.default);return a.hasOutline=h(i?.edges),a}function Ut(n,t,e,o){if(!h(n[e])){let a=e*3,i=t;for(let r=0;r<3;r++){let s=o[a+r];h(i[s])||(i[s]={}),i=i[s]}h(i.index)||(i.index=e),n[e]=i.index}}function Vt(n,t,e,o,a,i){let r,s;o<a?(r=o,s=a):(r=a,s=o);let c=n[r];h(c)||(c=n[r]={});let u=c[s];h(u)||(u=c[s]={normalsIndex:[],outlines:[]}),u.normalsIndex.push(i),(u.outlines.length===0||t!==o||e!==a)&&u.outlines.push(t,e)}function Et(n,t,e,o){let a=[];for(let i=0;i<e.length;i+=3){let r=h(t)?t[e[i]]:"default",s=Ft(n,a,r);if(!s.hasOutline)continue;let c=s.indices,u=s.positions;for(let f=0;f<3;f++){let p=e[i+f];Ut(c,u,p,o)}let l=s.edges;for(let f=0;f<3;f++){let p=e[i+f],m=e[i+(f+1)%3],d=c[p],b=c[m];Vt(l,p,m,d,b,i)}}return a}var O=new g,X=new g,Y=new g;function gt(n,t,e,o){let a=e[t]*3,i=e[t+1]*3,r=e[t+2]*3;g.fromArray(o,a,O),g.fromArray(o,i,X),g.fromArray(o,r,Y),g.subtract(X,O,X),g.subtract(Y,O,Y),g.cross(X,Y,O);let s=g.magnitude(O);s!==0&&g.divideByScalar(O,s,O);let c=t*3,u=(t+1)*3,l=(t+2)*3;g.pack(O,n,c),g.pack(O,n,u),g.pack(O,n,l)}var z=new g,ct=new g;function _t(n,t,e){g.fromArray(n,t,z),g.fromArray(n,e,ct);let o=g.dot(z,ct),a=g.magnitude(g.cross(z,ct,z));return Math.atan2(a,o)<.25}function Rt(n,t,e,o,a){if(t.normalsIndex.length>1){let i=o.length===a.length;for(let r=0;r<t.normalsIndex.length;r++){let s=t.normalsIndex[r];if(h(a[s*3])||gt(a,s,e,o),r!==0)for(let c=0;c<r;c++){let u=t.normalsIndex[c],l=i?e[s]*3:s*3,f=i?e[u]*3:u*3;if(_t(a,l,f))return}}}n.push(...t.outlines)}function Nt(n,t,e,o,a){let i=Object.keys(t);for(let r=0;r<i.length;r++){let s=t[i[r]],c=Object.keys(s);for(let u=0;u<c.length;u++){let l=s[c[u]];Rt(n,l,e,o,a)}}}function Bt(n,t,e,o){let a=[],i=Object.keys(n);for(let r=0;r<i.length;r++){let s=n[i[r]].edges;Nt(a,s,t,e,o)}return a}function Gt(n,t,e,o,a){if(!h(n)||Object.keys(n).length===0)return;let i=Et(n,t,e,o);(!h(a)||e.length*3!==a.length)&&(a=[]);let r=Bt(i,e,o,a);return r.length>0?new Uint32Array(r):void 0}function St(n){let t=new Float32Array(n.length);for(let e=0;e<n.length;e+=4)t[e]=k(P.byteToFloat(n[e])),t[e+1]=k(P.byteToFloat(n[e+1])),t[e+2]=k(P.byteToFloat(n[e+2])),t[e+3]=P.byteToFloat(n[e+3]);return t}function vt(n,t,e,o,a,i,r){let s={normals:void 0,positions:void 0,uv0s:void 0,colors:void 0,featureIndex:void 0,vertexCount:void 0};if(n===0||!h(e)||e.length===0||h(o))return s;if(h(t)){s.vertexCount=t.length,s.positions=new Float32Array(t.length*3),s.uv0s=h(a)?new Float32Array(t.length*2):void 0,s.colors=h(i)?new Uint8Array(t.length*4):void 0,s.featureIndex=h(r)?new Array(t.length):void 0;for(let c=0;c<t.length;c++){let u=t[c];s.positions[c*3]=e[u*3],s.positions[c*3+1]=e[u*3+1],s.positions[c*3+2]=e[u*3+2],h(s.uv0s)&&(s.uv0s[c*2]=a[u*2],s.uv0s[c*2+1]=a[u*2+1]),h(s.colors)&&(s.colors[c*4]=i[u*4],s.colors[c*4+1]=i[u*4+1],s.colors[c*4+2]=i[u*4+2],s.colors[c*4+3]=i[u*4+3]),h(s.featureIndex)&&(s.featureIndex[c]=r[u])}n=t.length,e=s.positions}t=new Array(n);for(let c=0;c<n;c++)t[c]=c;s.normals=new Float32Array(t.length*3);for(let c=0;c<t.length;c+=3)gt(s.normals,c,t,e);return s}function Mt(n,t,e,o,a,i,r,s){if(n===0||!h(e)||e.length===0)return{buffers:[],bufferViews:[],accessors:[],meshes:[],nodes:[],nodesInScene:[]};let c=[],u=[],l=[],f=[],p=[],m=[],d={},b=[];h(t)&&(n=t.length);let{indexArray:x,transparentVertexOffset:T}=Ct(n,t,i,s.splitGeometryByColorTransparency),I=new Blob([x],{type:"application/binary"}),A=URL.createObjectURL(I),w=n,F=s.enableFeatures&&h(r)?new Float32Array(r.length):void 0,C=0;if(h(F))for(let y=0;y<r.length;++y){F[y]=r[y];let E=r[y]+1;C<E&&(C=E)}let U,R=Gt(s.symbologyData,r,x,e,o);if(h(R)){let y=new Blob([R],{type:"application/binary"});U=URL.createObjectURL(y)}let L=e.subarray(0,w*3),dt=new Blob([L],{type:"application/binary"}),pt=URL.createObjectURL(dt),D=Number.POSITIVE_INFINITY,K=Number.NEGATIVE_INFINITY,Q=Number.POSITIVE_INFINITY,Z=Number.NEGATIVE_INFINITY,J=Number.POSITIVE_INFINITY,$=Number.NEGATIVE_INFINITY;for(let y=0;y<L.length/3;y++)D=Math.min(D,L[y*3+0]),K=Math.max(K,L[y*3+0]),Q=Math.min(Q,L[y*3+1]),Z=Math.max(Z,L[y*3+1]),J=Math.min(J,L[y*3+2]),$=Math.max($,L[y*3+2]);let N=o?o.subarray(0,w*3):void 0,q;if(h(N)){let y=new Blob([N],{type:"application/binary"});q=URL.createObjectURL(y)}let B=a?a.subarray(0,w*2):void 0,tt;if(h(B)){let y=new Blob([B],{type:"application/binary"});tt=URL.createObjectURL(y)}let G=h(i)?St(i.subarray(0,w*4)):void 0,et;if(h(G)){let y=new Blob([G],{type:"application/binary"});et=URL.createObjectURL(y)}let S=h(F)?F.subarray(0,w):void 0,nt;if(h(S)){let y=new Blob([S],{type:"application/binary"});nt=URL.createObjectURL(y)}let _=h(F)?new Float32Array(C):void 0,rt;if(h(_)){for(let E=0;E<_.length;++E)_[E]=E;let y=new Blob([_],{type:"application/binary"});rt=URL.createObjectURL(y)}let V={},j={};V.POSITION=l.length,c.push({uri:pt,byteLength:L.byteLength}),u.push({buffer:c.length-1,byteOffset:0,byteLength:L.byteLength,target:34962}),l.push({bufferView:u.length-1,byteOffset:0,componentType:5126,count:L.length/3,type:"VEC3",max:[D,Q,J],min:[K,Z,$]}),h(q)&&(V.NORMAL=l.length,c.push({uri:q,byteLength:N.byteLength}),u.push({buffer:c.length-1,byteOffset:0,byteLength:N.byteLength,target:34962}),l.push({bufferView:u.length-1,byteOffset:0,componentType:5126,count:N.length/3,type:"VEC3"})),h(tt)&&(V.TEXCOORD_0=l.length,c.push({uri:tt,byteLength:B.byteLength}),u.push({buffer:c.length-1,byteOffset:0,byteLength:B.byteLength,target:34962}),l.push({bufferView:u.length-1,byteOffset:0,componentType:5126,count:B.length/2,type:"VEC2"})),h(et)&&(V.COLOR_0=l.length,c.push({uri:et,byteLength:G.byteLength}),u.push({buffer:c.length-1,byteOffset:0,byteLength:G.byteLength,target:34962}),l.push({bufferView:u.length-1,byteOffset:0,componentType:5126,count:G.length/4,type:"VEC4"})),h(nt)&&(V._FEATURE_ID_0=l.length,c.push({uri:nt,byteLength:S.byteLength}),u.push({buffer:c.length-1,byteOffset:0,byteLength:S.byteLength,target:34963}),l.push({bufferView:u.length-1,byteOffset:0,componentType:5126,count:S.length,type:"SCALAR"}),j.EXT_mesh_features={featureIds:[{attribute:0,propertyTable:0,featureCount:C}]},b.push("EXT_mesh_features")),h(rt)&&(c.push({uri:rt,byteLength:_.byteLength}),u.push({buffer:c.length-1,byteOffset:0,byteLength:_.byteLength,target:34963}),d.EXT_structural_metadata={schema:{id:"i3s-metadata-schema-001",name:"I3S metadata schema 001",description:"The schema for I3S metadata",version:"1.0",classes:{feature:{name:"feature",description:"Feature metadata",properties:{index:{description:"The feature index",type:"SCALAR",componentType:"FLOAT32",required:!0}}}}},propertyTables:[{name:"feature-indices-mapping",class:"feature",count:C,properties:{index:{values:u.length-1}}}]},b.push("EXT_structural_metadata")),h(U)&&(c.push({uri:U,byteLength:R.byteLength}),u.push({buffer:c.length-1,byteOffset:0,byteLength:R.byteLength,target:34963}),l.push({bufferView:u.length-1,byteOffset:0,componentType:5125,count:R.length,type:"SCALAR"}),j.CESIUM_primitive_outline={indices:l.length-1},b.push("CESIUM_primitive_outline")),c.push({uri:A,byteLength:x.byteLength}),u.push({buffer:c.length-1,byteOffset:0,byteLength:x.byteLength,target:34963});let v=[];return T>0&&(l.push({bufferView:u.length-1,byteOffset:0,componentType:5125,count:T,type:"SCALAR"}),v.push({attributes:V,indices:l.length-1,material:v.length,extensions:j})),T<n&&(l.push({bufferView:u.length-1,byteOffset:4*T,componentType:5125,count:n-T,type:"SCALAR"}),v.push({attributes:V,indices:l.length-1,material:v.length,extensions:j,extra:{isTransparent:!0}})),f.push({primitives:v}),m.push(0),p.push({mesh:0}),{buffers:c,bufferViews:u,accessors:l,meshes:f,nodes:p,nodesInScene:m,rootExtensions:d,extensionsUsed:b}}function Pt(n,t,e,o){let a=new Uint8Array(n,0,5);return a[0]===68&&a[1]===82&&a[2]===65&&a[3]===67&&a[4]===79?jt(n,e):Ht(n,t,e,o)}function jt(n){let t=ut,e=new t.DecoderBuffer,o=new Uint8Array(n);e.Init(o,o.length);let a=new t.Decoder,i=a.GetEncodedGeometryType(e),r=new t.MetadataQuerier,s,c;i===t.TRIANGULAR_MESH&&(s=new t.Mesh,c=a.DecodeBufferToMesh(e,s));let u={vertexCount:[0],featureCount:0};if(h(c)&&c.ok()&&s.ptr!==0){let l=s.num_faces(),f=s.num_attributes(),p=s.num_points();u.indices=new Uint32Array(l*3);let m=u.indices;u.vertexCount[0]=p,u.scale_x=1,u.scale_y=1;let d=new t.DracoInt32Array(3);for(let b=0;b<l;++b)a.GetFaceFromMesh(s,b,d),m[b*3]=d.GetValue(0),m[b*3+1]=d.GetValue(1),m[b*3+2]=d.GetValue(2);t.destroy(d);for(let b=0;b<f;++b){let x=a.GetAttribute(s,b),T=kt(t,a,s,x,p),I=x.attribute_type(),A="unknown";I===t.POSITION?A="positions":I===t.NORMAL?A="normals":I===t.COLOR?A="colors":I===t.TEX_COORD&&(A="uv0s");let w=a.GetAttributeMetadata(s,b);if(w.ptr!==0){let F=r.NumEntries(w);for(let C=0;C<F;++C){let U=r.GetEntryName(w,C);U==="i3s-scale_x"?u.scale_x=r.GetDoubleEntry(w,"i3s-scale_x"):U==="i3s-scale_y"?u.scale_y=r.GetDoubleEntry(w,"i3s-scale_y"):U==="i3s-attribute-type"&&(A=r.GetStringEntry(w,"i3s-attribute-type"))}}h(u[A])&&console.log("Attribute already exists",A),u[A]=T,A==="feature-index"&&u.featureCount++}t.destroy(s)}return t.destroy(r),t.destroy(a),u}function kt(n,t,e,o,a){let i=o.num_components()*a,r,c=[function(){},function(){r=new n.DracoInt8Array(i),t.GetAttributeInt8ForAllPoints(e,o,r)||console.error("Bad stream");let l=new Int8Array(i);for(let f=0;f<i;++f)l[f]=r.GetValue(f);return l},function(){r=new n.DracoInt8Array(i),t.GetAttributeUInt8ForAllPoints(e,o,r)||console.error("Bad stream");let l=new Uint8Array(i);for(let f=0;f<i;++f)l[f]=r.GetValue(f);return l},function(){r=new n.DracoInt16Array(i),t.GetAttributeInt16ForAllPoints(e,o,r)||console.error("Bad stream");let l=new Int16Array(i);for(let f=0;f<i;++f)l[f]=r.GetValue(f);return l},function(){r=new n.DracoInt16Array(i),t.GetAttributeUInt16ForAllPoints(e,o,r)||console.error("Bad stream");let l=new Uint16Array(i);for(let f=0;f<i;++f)l[f]=r.GetValue(f);return l},function(){r=new n.DracoInt32Array(i),t.GetAttributeInt32ForAllPoints(e,o,r)||console.error("Bad stream");let l=new Int32Array(i);for(let f=0;f<i;++f)l[f]=r.GetValue(f);return l},function(){r=new n.DracoInt32Array(i),t.GetAttributeUInt32ForAllPoints(e,o,r)||console.error("Bad stream");let l=new Uint32Array(i);for(let f=0;f<i;++f)l[f]=r.GetValue(f);return l},function(){},function(){},function(){r=new n.DracoFloat32Array(i),t.GetAttributeFloatForAllPoints(e,o,r)||console.error("Bad stream");let l=new Float32Array(i);for(let f=0;f<i;++f)l[f]=r.GetValue(f);return l},function(){},function(){r=new n.DracoUInt8Array(i),t.GetAttributeUInt8ForAllPoints(e,o,r)||console.error("Bad stream");let l=new Uint8Array(i);for(let f=0;f<i;++f)l[f]=r.GetValue(f);return l}][o.data_type()]();return h(r)&&n.destroy(r),c}var W={position:function(n,t,e){let o=n.vertexCount*3;return n.positions=new Float32Array(t,e,o),e+=o*4,e},normal:function(n,t,e){let o=n.vertexCount*3;return n.normals=new Float32Array(t,e,o),e+=o*4,e},uv0:function(n,t,e){let o=n.vertexCount*2;return n.uv0s=new Float32Array(t,e,o),e+=o*4,e},color:function(n,t,e){let o=n.vertexCount*4;return n.colors=new Uint8Array(t,e,o),e+=o,e},featureId:function(n,t,e){let o=n.featureCount;return e+=o*8,e},id:function(n,t,e){let o=n.featureCount;return e+=o*8,e},faceRange:function(n,t,e){let o=n.featureCount*2;return n.faceRange=new Uint32Array(t,e,o),e+=o*4,e},uvRegion:function(n,t,e){let o=n.vertexCount*4;return n["uv-region"]=new Uint16Array(t,e,o),e+=o*2,e},region:function(n,t,e){let o=n.vertexCount*4;return n["uv-region"]=new Uint16Array(t,e,o),e+=o*2,e}};function Ht(n,t,e,o){let a={vertexCount:0},i=new DataView(n);try{let r=0;if(a.vertexCount=i.getUint32(r,1),r+=4,a.featureCount=i.getUint32(r,1),r+=4,h(e))for(let s=0;s<e.attributes.length;s++)h(W[e.attributes[s]])?r=W[e.attributes[s]](a,n,r):console.error("Unknown decoder for",e.attributes[s]);else{let s=t.ordering,c=t.featureAttributeOrder;h(o)&&h(o.geometryData)&&h(o.geometryData[0])&&h(o.geometryData[0].params)&&(s=Object.keys(o.geometryData[0].params.vertexAttributes),c=Object.keys(o.geometryData[0].params.featureAttributes));for(let u=0;u<s.length;u++){let l=W[s[u]];r=l(a,n,r)}for(let u=0;u<c.length;u++){let l=W[c[u]];r=l(a,n,r)}}}catch(r){console.error(r)}return a.scale_x=1,a.scale_y=1,a}function Xt(n){let t=Pt(n.binaryData,n.schema,n.bufferInfo,n.featureData);h(n.geoidDataList)&&n.geoidDataList.length>0&&Lt(t.vertexCount,t.positions,t.scale_x,t.scale_y,n.cartographicCenter,n.geoidDataList,!1),Ot(t.vertexCount,t.positions,t.normals,n.cartographicCenter,n.cartesianCenter,n.parentRotation,n.ellipsoidRadiiSquare,t.scale_x,t.scale_y),h(t.uv0s)&&h(t["uv-region"])&&Tt(t.vertexCount,t.uv0s,t["uv-region"]);let e;if(h(t["feature-index"]))e=t["feature-index"];else if(h(t.faceRange)){e=new Array(t.vertexCount);for(let r=0;r<t.faceRange.length-1;r+=2){let s=r/2,c=t.faceRange[r],u=t.faceRange[r+1];for(let l=c;l<=u;l++)e[l*3]=s,e[l*3+1]=s,e[l*3+2]=s}}if(n.calculateNormals){let r=vt(t.vertexCount,t.indices,t.positions,t.normals,t.uv0s,t.colors,e);h(r.normals)&&(t.normals=r.normals,h(r.vertexCount)&&(t.vertexCount=r.vertexCount,t.indices=r.indices,t.positions=r.positions,t.uv0s=r.uv0s,t.colors=r.colors,e=r.featureIndex))}let o=Mt(t.vertexCount,t.indices,t.positions,t.normals,t.uv0s,t.colors,e,n),a={positions:t.positions,indices:t.indices,featureIndex:e,sourceURL:n.url,cartesianCenter:n.cartesianCenter,parentRotation:n.parentRotation};return o._customAttributes=a,{meshData:o}}async function Yt(n,t){let e=n.webAssemblyConfig;return h(e)&&h(e.wasmBinaryFile)?ut=await(0,at.default)(e):ut=await(0,at.default)(),!0}function zt(n,t){let e=n.webAssemblyConfig;return h(e)?Yt(n,t):Xt(n,t)}var se=yt(zt);export{se as default}; |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.116 | ||
* Version 1.116.1 | ||
* | ||
@@ -26,32 +26,32 @@ * Copyright 2011-2022 Cesium Contributors | ||
import{a as rn}from"./chunk-4PZYNNSN.js";import{a as M}from"./chunk-H7FFK4U5.js";import{a as ie}from"./chunk-YEUII2A5.js";import{a as _n}from"./chunk-4353PD6R.js";import{b as nn}from"./chunk-2S4UUFD6.js";import{a as Gt,c as or,d as sr,e as ge}from"./chunk-42VHSORI.js";var Rn=or((it,pt)=>{var Nt=function(){var i=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return typeof __filename<"u"&&(i=i||__filename),function(f){f=f||{};var r=typeof f<"u"?f:{},B,l;r.ready=new Promise(function(e,t){B=e,l=t});var p={},C;for(C in r)r.hasOwnProperty(C)&&(p[C]=r[C]);var U=[],y="./this.program",m=function(e,t){throw t},V=!1,d=!1,P=!1,Q=!1;V=typeof window=="object",d=typeof importScripts=="function",P=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",Q=!V&&!P&&!d;var u="";function X(e){return r.locateFile?r.locateFile(e,u):u+e}var oe,le,W,J,g,Fe;P?(d?u=Gt("path").dirname(u)+"/":u=__dirname+"/",oe=function(t,n){return g||(g=Gt("fs")),Fe||(Fe=Gt("path")),t=Fe.normalize(t),g.readFileSync(t,n?null:"utf8")},W=function(t){var n=oe(t,!0);return n.buffer||(n=new Uint8Array(n)),Se(n.buffer),n},process.argv.length>1&&(y=process.argv[1].replace(/\\/g,"/")),U=process.argv.slice(2),process.on("uncaughtException",function(e){if(!(e instanceof rr))throw e}),process.on("unhandledRejection",Me),m=function(e){process.exit(e)},r.inspect=function(){return"[Emscripten Module object]"}):Q?(typeof read<"u"&&(oe=function(t){return read(t)}),W=function(t){var n;return typeof readbuffer=="function"?new Uint8Array(readbuffer(t)):(n=read(t,"binary"),Se(typeof n=="object"),n)},typeof scriptArgs<"u"?U=scriptArgs:typeof arguments<"u"&&(U=arguments),typeof quit=="function"&&(m=function(e){quit(e)}),typeof print<"u"&&(typeof console>"u"&&(console={}),console.log=print,console.warn=console.error=typeof printErr<"u"?printErr:print)):(V||d)&&(d?u=self.location.href:typeof document<"u"&&document.currentScript&&(u=document.currentScript.src),i&&(u=i),u.indexOf("blob:")!==0?u=u.substr(0,u.lastIndexOf("/")+1):u="",oe=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},d&&(W=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),le=function(e,t,n){var _=new XMLHttpRequest;_.open("GET",e,!0),_.responseType="arraybuffer",_.onload=function(){if(_.status==200||_.status==0&&_.response){t(_.response);return}n()},_.onerror=n,_.send(null)},J=function(e){document.title=e});var ot=r.print||console.log.bind(console),ee=r.printErr||console.warn.bind(console);for(C in p)p.hasOwnProperty(C)&&(r[C]=p[C]);p=null,r.arguments&&(U=r.arguments),r.thisProgram&&(y=r.thisProgram),r.quit&&(m=r.quit);var De=0,Ie=function(e){De=e},ae;r.wasmBinary&&(ae=r.wasmBinary);var st=r.noExitRuntime||!0;typeof WebAssembly!="object"&&Me("no native wasm support detected");var ce,de=!1,be;function Se(e,t){e||Me("Assertion failed: "+t)}var we=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function He(e,t,n){for(var _=t+n,o=t;e[o]&&!(o>=_);)++o;if(o-t>16&&e.subarray&&we)return we.decode(e.subarray(t,o));for(var a="";t<o;){var c=e[t++];if(!(c&128)){a+=String.fromCharCode(c);continue}var s=e[t++]&63;if((c&224)==192){a+=String.fromCharCode((c&31)<<6|s);continue}var R=e[t++]&63;if((c&240)==224?c=(c&15)<<12|s<<6|R:c=(c&7)<<18|s<<12|R<<6|e[t++]&63,c<65536)a+=String.fromCharCode(c);else{var T=c-65536;a+=String.fromCharCode(55296|T>>10,56320|T&1023)}}return a}function Xe(e,t){return e?He(D,e,t):""}function Rt(e,t,n,_){if(!(_>0))return 0;for(var o=n,a=n+_-1,c=0;c<e.length;++c){var s=e.charCodeAt(c);if(s>=55296&&s<=57343){var R=e.charCodeAt(++c);s=65536+((s&1023)<<10)|R&1023}if(s<=127){if(n>=a)break;t[n++]=s}else if(s<=2047){if(n+1>=a)break;t[n++]=192|s>>6,t[n++]=128|s&63}else if(s<=65535){if(n+2>=a)break;t[n++]=224|s>>12,t[n++]=128|s>>6&63,t[n++]=128|s&63}else{if(n+3>=a)break;t[n++]=240|s>>18,t[n++]=128|s>>12&63,t[n++]=128|s>>6&63,t[n++]=128|s&63}}return t[n]=0,n-o}function L(e,t,n){return Rt(e,D,t,n)}function j(e){for(var t=0,n=0;n<e.length;++n){var _=e.charCodeAt(n);_>=55296&&_<=57343&&(_=65536+((_&1023)<<10)|e.charCodeAt(++n)&1023),_<=127?++t:_<=2047?t+=2:_<=65535?t+=3:t+=4}return t}var Ae=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0;function at(e,t){for(var n=e,_=n>>1,o=_+t/2;!(_>=o)&&Ge[_];)++_;if(n=_<<1,n-e>32&&Ae)return Ae.decode(D.subarray(e,n));for(var a="",c=0;!(c>=t/2);++c){var s=fe[e+c*2>>1];if(s==0)break;a+=String.fromCharCode(s)}return a}function xe(e,t,n){if(n===void 0&&(n=2147483647),n<2)return 0;n-=2;for(var _=t,o=n<e.length*2?n/2:e.length,a=0;a<o;++a){var c=e.charCodeAt(a);fe[t>>1]=c,t+=2}return fe[t>>1]=0,t-_}function Tn(e){return e.length*2}function un(e,t){for(var n=0,_="";!(n>=t/4);){var o=H[e+n*4>>2];if(o==0)break;if(++n,o>=65536){var a=o-65536;_+=String.fromCharCode(55296|a>>10,56320|a&1023)}else _+=String.fromCharCode(o)}return _}function On(e,t,n){if(n===void 0&&(n=2147483647),n<4)return 0;for(var _=t,o=_+n-4,a=0;a<e.length;++a){var c=e.charCodeAt(a);if(c>=55296&&c<=57343){var s=e.charCodeAt(++a);c=65536+((c&1023)<<10)|s&1023}if(H[t>>2]=c,t+=4,t+4>o)break}return H[t>>2]=0,t-_}function ln(e){for(var t=0,n=0;n<e.length;++n){var _=e.charCodeAt(n);_>=55296&&_<=57343&&++n,t+=4}return t}function Mn(e,t){return e%t>0&&(e+=t-e%t),e}var ct,ke,D,fe,Ge,H,Y,Pt,Et;function vt(e){ct=e,r.HEAP8=ke=new Int8Array(e),r.HEAP16=fe=new Int16Array(e),r.HEAP32=H=new Int32Array(e),r.HEAPU8=D=new Uint8Array(e),r.HEAPU16=Ge=new Uint16Array(e),r.HEAPU32=Y=new Uint32Array(e),r.HEAPF32=Pt=new Float32Array(e),r.HEAPF64=Et=new Float64Array(e)}var ur=r.INITIAL_MEMORY||16777216,Ve,ht=[],Ut=[],Kn=[],yt=[],Bn=!1;function Cn(){if(r.preRun)for(typeof r.preRun=="function"&&(r.preRun=[r.preRun]);r.preRun.length;)Gn(r.preRun.shift());$e(ht)}function Fn(){Bn=!0,$e(Ut)}function dn(){$e(Kn)}function Sn(){if(r.postRun)for(typeof r.postRun=="function"&&(r.postRun=[r.postRun]);r.postRun.length;)Nn(r.postRun.shift());$e(yt)}function Gn(e){ht.unshift(e)}function Vn(e){Ut.unshift(e)}function Nn(e){yt.unshift(e)}var Te=0,At=null,Ne=null;function pn(e){Te++,r.monitorRunDependencies&&r.monitorRunDependencies(Te)}function Pn(e){if(Te--,r.monitorRunDependencies&&r.monitorRunDependencies(Te),Te==0&&(At!==null&&(clearInterval(At),At=null),Ne)){var t=Ne;Ne=null,t()}}r.preloadedImages={},r.preloadedAudios={};function Me(e){r.onAbort&&r.onAbort(e),e+="",ee(e),de=!0,be=1,e="abort("+e+"). Build with -s ASSERTIONS=1 for more info.";var t=new WebAssembly.RuntimeError(e);throw l(t),t}function gt(e,t){return String.prototype.startsWith?e.startsWith(t):e.indexOf(t)===0}var En="data:application/octet-stream;base64,";function Lt(e){return gt(e,En)}var vn="file://";function mt(e){return gt(e,vn)}var x="basis_transcoder.wasm";Lt(x)||(x=X(x));function Dt(e){try{if(e==x&&ae)return new Uint8Array(ae);if(W)return W(e);throw"both async and sync fetching of the wasm failed"}catch(t){Me(t)}}function hn(){if(!ae&&(V||d)){if(typeof fetch=="function"&&!mt(x))return fetch(x,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load wasm binary file at '"+x+"'";return e.arrayBuffer()}).catch(function(){return Dt(x)});if(le)return new Promise(function(e,t){le(x,function(n){e(new Uint8Array(n))},t)})}return Promise.resolve().then(function(){return Dt(x)})}function Un(){var e={a:er};function t(c,s){var R=c.exports;r.asm=R,ce=r.asm.K,vt(ce.buffer),Ve=r.asm.O,Vn(r.asm.L),Pn("wasm-instantiate")}pn("wasm-instantiate");function n(c){t(c.instance)}function _(c){return hn().then(function(s){var R=WebAssembly.instantiate(s,e);return R}).then(c,function(s){ee("failed to asynchronously prepare wasm: "+s),Me(s)})}function o(){return!ae&&typeof WebAssembly.instantiateStreaming=="function"&&!Lt(x)&&!mt(x)&&typeof fetch=="function"?fetch(x,{credentials:"same-origin"}).then(function(c){var s=WebAssembly.instantiateStreaming(c,e);return s.then(n,function(R){return ee("wasm streaming compile failed: "+R),ee("falling back to ArrayBuffer instantiation"),_(n)})}):_(n)}if(r.instantiateWasm)try{var a=r.instantiateWasm(e,t);return a}catch(c){return ee("Module.instantiateWasm callback failed with error: "+c),!1}return o().catch(l),{}}function $e(e){for(;e.length>0;){var t=e.shift();if(typeof t=="function"){t(r);continue}var n=t.func;typeof n=="number"?t.arg===void 0?Ve.get(n)():Ve.get(n)(t.arg):n(t.arg===void 0?null:t.arg)}}var We={};function je(e){for(;e.length;){var t=e.pop(),n=e.pop();n(t)}}function pe(e){return this.fromWireType(Y[e>>2])}var Ke={},ue={},ze={},yn=48,gn=57;function Ye(e){if(e===void 0)return"_unknown";e=e.replace(/[^a-zA-Z0-9_]/g,"$");var t=e.charCodeAt(0);return t>=yn&&t<=gn?"_"+e:e}function qe(e,t){return e=Ye(e),new Function("body","return function "+e+`() { | ||
import{a as r_}from"./chunk-F3CCIWXX.js";import{a as K}from"./chunk-BLVYEJBC.js";import{a as ie}from"./chunk-A6PYE4JS.js";import{a as n_}from"./chunk-T23IKWCM.js";import{b as __}from"./chunk-HJ33TVGP.js";import{a as Gt,c as sr,d as or,e as ge}from"./chunk-WL4PTXMO.js";var o_=sr((it,Pt)=>{var Nt=function(){var i=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return typeof __filename<"u"&&(i=i||__filename),function(f){f=f||{};var r=typeof f<"u"?f:{},B,l;r.ready=new Promise(function(e,t){B=e,l=t});var P={},C;for(C in r)r.hasOwnProperty(C)&&(P[C]=r[C]);var h=[],y="./this.program",m=function(e,t){throw t},V=!1,d=!1,p=!1,Q=!1;V=typeof window=="object",d=typeof importScripts=="function",p=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",Q=!V&&!p&&!d;var u="";function X(e){return r.locateFile?r.locateFile(e,u):u+e}var se,le,W,J,g,Fe;p?(d?u=Gt("path").dirname(u)+"/":u=__dirname+"/",se=function(t,_){return g||(g=Gt("fs")),Fe||(Fe=Gt("path")),t=Fe.normalize(t),g.readFileSync(t,_?null:"utf8")},W=function(t){var _=se(t,!0);return _.buffer||(_=new Uint8Array(_)),Se(_.buffer),_},process.argv.length>1&&(y=process.argv[1].replace(/\\/g,"/")),h=process.argv.slice(2),process.on("uncaughtException",function(e){if(!(e instanceof rr))throw e}),process.on("unhandledRejection",Ke),m=function(e){process.exit(e)},r.inspect=function(){return"[Emscripten Module object]"}):Q?(typeof read<"u"&&(se=function(t){return read(t)}),W=function(t){var _;return typeof readbuffer=="function"?new Uint8Array(readbuffer(t)):(_=read(t,"binary"),Se(typeof _=="object"),_)},typeof scriptArgs<"u"?h=scriptArgs:typeof arguments<"u"&&(h=arguments),typeof quit=="function"&&(m=function(e){quit(e)}),typeof print<"u"&&(typeof console>"u"&&(console={}),console.log=print,console.warn=console.error=typeof printErr<"u"?printErr:print)):(V||d)&&(d?u=self.location.href:typeof document<"u"&&document.currentScript&&(u=document.currentScript.src),i&&(u=i),u.indexOf("blob:")!==0?u=u.substr(0,u.lastIndexOf("/")+1):u="",se=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},d&&(W=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),le=function(e,t,_){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){if(n.status==200||n.status==0&&n.response){t(n.response);return}_()},n.onerror=_,n.send(null)},J=function(e){document.title=e});var st=r.print||console.log.bind(console),ee=r.printErr||console.warn.bind(console);for(C in P)P.hasOwnProperty(C)&&(r[C]=P[C]);P=null,r.arguments&&(h=r.arguments),r.thisProgram&&(y=r.thisProgram),r.quit&&(m=r.quit);var De=0,Ie=function(e){De=e},ae;r.wasmBinary&&(ae=r.wasmBinary);var ot=r.noExitRuntime||!0;typeof WebAssembly!="object"&&Ke("no native wasm support detected");var ce,de=!1,be;function Se(e,t){e||Ke("Assertion failed: "+t)}var we=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function He(e,t,_){for(var n=t+_,s=t;e[s]&&!(s>=n);)++s;if(s-t>16&&e.subarray&&we)return we.decode(e.subarray(t,s));for(var a="";t<s;){var c=e[t++];if(!(c&128)){a+=String.fromCharCode(c);continue}var o=e[t++]&63;if((c&224)==192){a+=String.fromCharCode((c&31)<<6|o);continue}var R=e[t++]&63;if((c&240)==224?c=(c&15)<<12|o<<6|R:c=(c&7)<<18|o<<12|R<<6|e[t++]&63,c<65536)a+=String.fromCharCode(c);else{var T=c-65536;a+=String.fromCharCode(55296|T>>10,56320|T&1023)}}return a}function Xe(e,t){return e?He(D,e,t):""}function Rt(e,t,_,n){if(!(n>0))return 0;for(var s=_,a=_+n-1,c=0;c<e.length;++c){var o=e.charCodeAt(c);if(o>=55296&&o<=57343){var R=e.charCodeAt(++c);o=65536+((o&1023)<<10)|R&1023}if(o<=127){if(_>=a)break;t[_++]=o}else if(o<=2047){if(_+1>=a)break;t[_++]=192|o>>6,t[_++]=128|o&63}else if(o<=65535){if(_+2>=a)break;t[_++]=224|o>>12,t[_++]=128|o>>6&63,t[_++]=128|o&63}else{if(_+3>=a)break;t[_++]=240|o>>18,t[_++]=128|o>>12&63,t[_++]=128|o>>6&63,t[_++]=128|o&63}}return t[_]=0,_-s}function L(e,t,_){return Rt(e,D,t,_)}function j(e){for(var t=0,_=0;_<e.length;++_){var n=e.charCodeAt(_);n>=55296&&n<=57343&&(n=65536+((n&1023)<<10)|e.charCodeAt(++_)&1023),n<=127?++t:n<=2047?t+=2:n<=65535?t+=3:t+=4}return t}var Ae=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0;function at(e,t){for(var _=e,n=_>>1,s=n+t/2;!(n>=s)&&Ge[n];)++n;if(_=n<<1,_-e>32&&Ae)return Ae.decode(D.subarray(e,_));for(var a="",c=0;!(c>=t/2);++c){var o=fe[e+c*2>>1];if(o==0)break;a+=String.fromCharCode(o)}return a}function xe(e,t,_){if(_===void 0&&(_=2147483647),_<2)return 0;_-=2;for(var n=t,s=_<e.length*2?_/2:e.length,a=0;a<s;++a){var c=e.charCodeAt(a);fe[t>>1]=c,t+=2}return fe[t>>1]=0,t-n}function f_(e){return e.length*2}function T_(e,t){for(var _=0,n="";!(_>=t/4);){var s=H[e+_*4>>2];if(s==0)break;if(++_,s>=65536){var a=s-65536;n+=String.fromCharCode(55296|a>>10,56320|a&1023)}else n+=String.fromCharCode(s)}return n}function u_(e,t,_){if(_===void 0&&(_=2147483647),_<4)return 0;for(var n=t,s=n+_-4,a=0;a<e.length;++a){var c=e.charCodeAt(a);if(c>=55296&&c<=57343){var o=e.charCodeAt(++a);c=65536+((c&1023)<<10)|o&1023}if(H[t>>2]=c,t+=4,t+4>s)break}return H[t>>2]=0,t-n}function O_(e){for(var t=0,_=0;_<e.length;++_){var n=e.charCodeAt(_);n>=55296&&n<=57343&&++_,t+=4}return t}function l_(e,t){return e%t>0&&(e+=t-e%t),e}var ct,$e,D,fe,Ge,H,z,pt,Et;function Ut(e){ct=e,r.HEAP8=$e=new Int8Array(e),r.HEAP16=fe=new Int16Array(e),r.HEAP32=H=new Int32Array(e),r.HEAPU8=D=new Uint8Array(e),r.HEAPU16=Ge=new Uint16Array(e),r.HEAPU32=z=new Uint32Array(e),r.HEAPF32=pt=new Float32Array(e),r.HEAPF64=Et=new Float64Array(e)}var ur=r.INITIAL_MEMORY||16777216,Ve,vt=[],ht=[],K_=[],yt=[],M_=!1;function B_(){if(r.preRun)for(typeof r.preRun=="function"&&(r.preRun=[r.preRun]);r.preRun.length;)S_(r.preRun.shift());ke(vt)}function C_(){M_=!0,ke(ht)}function F_(){ke(K_)}function d_(){if(r.postRun)for(typeof r.postRun=="function"&&(r.postRun=[r.postRun]);r.postRun.length;)V_(r.postRun.shift());ke(yt)}function S_(e){vt.unshift(e)}function G_(e){ht.unshift(e)}function V_(e){yt.unshift(e)}var Te=0,At=null,Ne=null;function N_(e){Te++,r.monitorRunDependencies&&r.monitorRunDependencies(Te)}function P_(e){if(Te--,r.monitorRunDependencies&&r.monitorRunDependencies(Te),Te==0&&(At!==null&&(clearInterval(At),At=null),Ne)){var t=Ne;Ne=null,t()}}r.preloadedImages={},r.preloadedAudios={};function Ke(e){r.onAbort&&r.onAbort(e),e+="",ee(e),de=!0,be=1,e="abort("+e+"). Build with -s ASSERTIONS=1 for more info.";var t=new WebAssembly.RuntimeError(e);throw l(t),t}function gt(e,t){return String.prototype.startsWith?e.startsWith(t):e.indexOf(t)===0}var p_="data:application/octet-stream;base64,";function Lt(e){return gt(e,p_)}var E_="file://";function mt(e){return gt(e,E_)}var x="basis_transcoder.wasm";Lt(x)||(x=X(x));function Dt(e){try{if(e==x&&ae)return new Uint8Array(ae);if(W)return W(e);throw"both async and sync fetching of the wasm failed"}catch(t){Ke(t)}}function U_(){if(!ae&&(V||d)){if(typeof fetch=="function"&&!mt(x))return fetch(x,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load wasm binary file at '"+x+"'";return e.arrayBuffer()}).catch(function(){return Dt(x)});if(le)return new Promise(function(e,t){le(x,function(_){e(new Uint8Array(_))},t)})}return Promise.resolve().then(function(){return Dt(x)})}function v_(){var e={a:er};function t(c,o){var R=c.exports;r.asm=R,ce=r.asm.K,Ut(ce.buffer),Ve=r.asm.O,G_(r.asm.L),P_("wasm-instantiate")}N_("wasm-instantiate");function _(c){t(c.instance)}function n(c){return U_().then(function(o){var R=WebAssembly.instantiate(o,e);return R}).then(c,function(o){ee("failed to asynchronously prepare wasm: "+o),Ke(o)})}function s(){return!ae&&typeof WebAssembly.instantiateStreaming=="function"&&!Lt(x)&&!mt(x)&&typeof fetch=="function"?fetch(x,{credentials:"same-origin"}).then(function(c){var o=WebAssembly.instantiateStreaming(c,e);return o.then(_,function(R){return ee("wasm streaming compile failed: "+R),ee("falling back to ArrayBuffer instantiation"),n(_)})}):n(_)}if(r.instantiateWasm)try{var a=r.instantiateWasm(e,t);return a}catch(c){return ee("Module.instantiateWasm callback failed with error: "+c),!1}return s().catch(l),{}}function ke(e){for(;e.length>0;){var t=e.shift();if(typeof t=="function"){t(r);continue}var _=t.func;typeof _=="number"?t.arg===void 0?Ve.get(_)():Ve.get(_)(t.arg):_(t.arg===void 0?null:t.arg)}}var We={};function je(e){for(;e.length;){var t=e.pop(),_=e.pop();_(t)}}function Pe(e){return this.fromWireType(z[e>>2])}var Me={},ue={},Ye={},h_=48,y_=57;function ze(e){if(e===void 0)return"_unknown";e=e.replace(/[^a-zA-Z0-9_]/g,"$");var t=e.charCodeAt(0);return t>=h_&&t<=y_?"_"+e:e}function qe(e,t){return e=ze(e),new Function("body","return function "+e+`() { | ||
"use strict"; return body.apply(this, arguments); | ||
}; | ||
`)(t)}function ft(e,t){var n=qe(t,function(_){this.name=t,this.message=_;var o=new Error(_).stack;o!==void 0&&(this.stack=this.toString()+` | ||
`+o.replace(/^Error(:[^\n]*)?\n/,""))});return n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.prototype.toString=function(){return this.message===void 0?this.name:this.name+": "+this.message},n}var It=void 0;function Ze(e){throw new It(e)}function se(e,t,n){e.forEach(function(s){ze[s]=t});function _(s){var R=n(s);R.length!==e.length&&Ze("Mismatched type converter count");for(var T=0;T<e.length;++T)q(e[T],R[T])}var o=new Array(t.length),a=[],c=0;t.forEach(function(s,R){ue.hasOwnProperty(s)?o[R]=ue[s]:(a.push(s),Ke.hasOwnProperty(s)||(Ke[s]=[]),Ke[s].push(function(){o[R]=ue[s],++c,c===a.length&&_(o)}))}),a.length===0&&_(o)}function Ln(e){var t=We[e];delete We[e];var n=t.rawConstructor,_=t.rawDestructor,o=t.fields,a=o.map(function(c){return c.getterReturnType}).concat(o.map(function(c){return c.setterArgumentType}));se([e],a,function(c){var s={};return o.forEach(function(R,T){var O=R.fieldName,K=c[T],G=R.getter,N=R.getterContext,h=c[T+o.length],I=R.setter,$=R.setterContext;s[O]={read:function(Z){return K.fromWireType(G(N,Z))},write:function(Z,ye){var re=[];I($,Z,h.toWireType(re,ye)),je(re)}}}),[{name:t.name,fromWireType:function(R){var T={};for(var O in s)T[O]=s[O].read(R);return _(R),T},toWireType:function(R,T){for(var O in s)if(!(O in T))throw new TypeError('Missing field: "'+O+'"');var K=n();for(O in s)s[O].write(K,T[O]);return R!==null&&R.push(_,K),K},argPackAdvance:8,readValueFromPointer:pe,destructorFunction:_}]})}function Qe(e){switch(e){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+e)}}function mn(){for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);bt=e}var bt=void 0;function v(e){for(var t="",n=e;D[n];)t+=bt[D[n++]];return t}var Be=void 0;function S(e){throw new Be(e)}function q(e,t,n){if(n=n||{},!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");var _=t.name;if(e||S('type "'+_+'" must have a positive integer typeid pointer'),ue.hasOwnProperty(e)){if(n.ignoreDuplicateRegistrations)return;S("Cannot register type '"+_+"' twice")}if(ue[e]=t,delete ze[e],Ke.hasOwnProperty(e)){var o=Ke[e];delete Ke[e],o.forEach(function(a){a()})}}function Dn(e,t,n,_,o){var a=Qe(n);t=v(t),q(e,{name:t,fromWireType:function(c){return!!c},toWireType:function(c,s){return s?_:o},argPackAdvance:8,readValueFromPointer:function(c){var s;if(n===1)s=ke;else if(n===2)s=fe;else if(n===4)s=H;else throw new TypeError("Unknown boolean type size: "+t);return this.fromWireType(s[c>>a])},destructorFunction:null})}function In(e){if(!(this instanceof Re)||!(e instanceof Re))return!1;for(var t=this.$$.ptrType.registeredClass,n=this.$$.ptr,_=e.$$.ptrType.registeredClass,o=e.$$.ptr;t.baseClass;)n=t.upcast(n),t=t.baseClass;for(;_.baseClass;)o=_.upcast(o),_=_.baseClass;return t===_&&n===o}function bn(e){return{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}}function Tt(e){function t(n){return n.$$.ptrType.registeredClass.name}S(t(e)+" instance already deleted")}var ut=!1;function wt(e){}function wn(e){e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)}function Ht(e){e.count.value-=1;var t=e.count.value===0;t&&wn(e)}function Pe(e){return typeof FinalizationGroup>"u"?(Pe=function(t){return t},e):(ut=new FinalizationGroup(function(t){for(var n=t.next();!n.done;n=t.next()){var _=n.value;_.ptr?Ht(_):console.warn("object already deleted: "+_.ptr)}}),Pe=function(t){return ut.register(t,t.$$,t.$$),t},wt=function(t){ut.unregister(t.$$)},Pe(e))}function Hn(){if(this.$$.ptr||Tt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=Pe(Object.create(Object.getPrototypeOf(this),{$$:{value:bn(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function Xn(){this.$$.ptr||Tt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&S("Object already scheduled for deletion"),wt(this),Ht(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function xn(){return!this.$$.ptr}var Ee=void 0,ve=[];function Ot(){for(;ve.length;){var e=ve.pop();e.$$.deleteScheduled=!1,e.delete()}}function kn(){return this.$$.ptr||Tt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&S("Object already scheduled for deletion"),ve.push(this),ve.length===1&&Ee&&Ee(Ot),this.$$.deleteScheduled=!0,this}function $n(){Re.prototype.isAliasOf=In,Re.prototype.clone=Hn,Re.prototype.delete=Xn,Re.prototype.isDeleted=xn,Re.prototype.deleteLater=kn}function Re(){}var Xt={};function xt(e,t,n){if(e[t].overloadTable===void 0){var _=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||S("Function '"+n+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+e[t].overloadTable+")!"),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[_.argCount]=_}}function lt(e,t,n){r.hasOwnProperty(e)?((n===void 0||r[e].overloadTable!==void 0&&r[e].overloadTable[n]!==void 0)&&S("Cannot register public name '"+e+"' twice"),xt(r,e,e),r.hasOwnProperty(n)&&S("Cannot register multiple overloads of a function with the same number of arguments ("+n+")!"),r[e].overloadTable[n]=t):(r[e]=t,n!==void 0&&(r[e].numArguments=n))}function Wn(e,t,n,_,o,a,c,s){this.name=e,this.constructor=t,this.instancePrototype=n,this.rawDestructor=_,this.baseClass=o,this.getActualType=a,this.upcast=c,this.downcast=s,this.pureVirtualFunctions=[]}function Mt(e,t,n){for(;t!==n;)t.upcast||S("Expected null or instance of "+n.name+", got an instance of "+t.name),e=t.upcast(e),t=t.baseClass;return e}function jn(e,t){if(t===null)return this.isReference&&S("null is not a valid "+this.name),0;t.$$||S('Cannot pass "'+Ce(t)+'" as a '+this.name),t.$$.ptr||S("Cannot pass deleted object as a pointer of type "+this.name);var n=t.$$.ptrType.registeredClass,_=Mt(t.$$.ptr,n,this.registeredClass);return _}function zn(e,t){var n;if(t===null)return this.isReference&&S("null is not a valid "+this.name),this.isSmartPointer?(n=this.rawConstructor(),e!==null&&e.push(this.rawDestructor,n),n):0;t.$$||S('Cannot pass "'+Ce(t)+'" as a '+this.name),t.$$.ptr||S("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&t.$$.ptrType.isConst&&S("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);var _=t.$$.ptrType.registeredClass;if(n=Mt(t.$$.ptr,_,this.registeredClass),this.isSmartPointer)switch(t.$$.smartPtr===void 0&&S("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?n=t.$$.smartPtr:S("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:n=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)n=t.$$.smartPtr;else{var o=t.clone();n=this.rawShare(n,ne(function(){o.delete()})),e!==null&&e.push(this.rawDestructor,n)}break;default:S("Unsupporting sharing policy")}return n}function Yn(e,t){if(t===null)return this.isReference&&S("null is not a valid "+this.name),0;t.$$||S('Cannot pass "'+Ce(t)+'" as a '+this.name),t.$$.ptr||S("Cannot pass deleted object as a pointer of type "+this.name),t.$$.ptrType.isConst&&S("Cannot convert argument of type "+t.$$.ptrType.name+" to parameter type "+this.name);var n=t.$$.ptrType.registeredClass,_=Mt(t.$$.ptr,n,this.registeredClass);return _}function qn(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function Zn(e){this.rawDestructor&&this.rawDestructor(e)}function Qn(e){e!==null&&e.delete()}function kt(e,t,n){if(t===n)return e;if(n.baseClass===void 0)return null;var _=kt(e,t,n.baseClass);return _===null?null:n.downcast(_)}function Jn(){return Object.keys(he).length}function e_(){var e=[];for(var t in he)he.hasOwnProperty(t)&&e.push(he[t]);return e}function t_(e){Ee=e,ve.length&&Ee&&Ee(Ot)}function n_(){r.getInheritedInstanceCount=Jn,r.getLiveInheritedInstances=e_,r.flushPendingDeletes=Ot,r.setDelayFunction=t_}var he={};function __(e,t){for(t===void 0&&S("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t}function r_(e,t){return t=__(e,t),he[t]}function Je(e,t){(!t.ptrType||!t.ptr)&&Ze("makeClassHandle requires ptr and ptrType");var n=!!t.smartPtrType,_=!!t.smartPtr;return n!==_&&Ze("Both smartPtrType and smartPtr must be specified"),t.count={value:1},Pe(Object.create(e,{$$:{value:t}}))}function i_(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var n=r_(this.registeredClass,t);if(n!==void 0){if(n.$$.count.value===0)return n.$$.ptr=t,n.$$.smartPtr=e,n.clone();var _=n.clone();return this.destructor(e),_}function o(){return this.isSmartPointer?Je(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):Je(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var a=this.registeredClass.getActualType(t),c=Xt[a];if(!c)return o.call(this);var s;this.isConst?s=c.constPointerType:s=c.pointerType;var R=kt(t,this.registeredClass,s.registeredClass);return R===null?o.call(this):this.isSmartPointer?Je(s.registeredClass.instancePrototype,{ptrType:s,ptr:R,smartPtrType:this,smartPtr:e}):Je(s.registeredClass.instancePrototype,{ptrType:s,ptr:R})}function o_(){te.prototype.getPointee=qn,te.prototype.destructor=Zn,te.prototype.argPackAdvance=8,te.prototype.readValueFromPointer=pe,te.prototype.deleteObject=Qn,te.prototype.fromWireType=i_}function te(e,t,n,_,o,a,c,s,R,T,O){this.name=e,this.registeredClass=t,this.isReference=n,this.isConst=_,this.isSmartPointer=o,this.pointeeType=a,this.sharingPolicy=c,this.rawGetPointee=s,this.rawConstructor=R,this.rawShare=T,this.rawDestructor=O,!o&&t.baseClass===void 0?_?(this.toWireType=jn,this.destructorFunction=null):(this.toWireType=Yn,this.destructorFunction=null):this.toWireType=zn}function $t(e,t,n){r.hasOwnProperty(e)||Ze("Replacing nonexistant public symbol"),r[e].overloadTable!==void 0&&n!==void 0?r[e].overloadTable[n]=t:(r[e]=t,r[e].argCount=n)}function s_(e,t,n){var _=r["dynCall_"+e];return n&&n.length?_.apply(null,[t].concat(n)):_.call(null,t)}function R_(e,t,n){return e.indexOf("j")!=-1?s_(e,t,n):Ve.get(t).apply(null,n)}function a_(e,t){var n=[];return function(){n.length=arguments.length;for(var _=0;_<arguments.length;_++)n[_]=arguments[_];return R_(e,t,n)}}function z(e,t){e=v(e);function n(){return e.indexOf("j")!=-1?a_(e,t):Ve.get(t)}var _=n();return typeof _!="function"&&S("unknown function pointer with signature "+e+": "+t),_}var Wt=void 0;function jt(e){var t=Qt(e),n=v(t);return _e(t),n}function et(e,t){var n=[],_={};function o(a){if(!_[a]&&!ue[a]){if(ze[a]){ze[a].forEach(o);return}n.push(a),_[a]=!0}}throw t.forEach(o),new Wt(e+": "+n.map(jt).join([", "]))}function c_(e,t,n,_,o,a,c,s,R,T,O,K,G){O=v(O),a=z(o,a),s&&(s=z(c,s)),T&&(T=z(R,T)),G=z(K,G);var N=Ye(O);lt(N,function(){et("Cannot construct "+O+" due to unbound types",[_])}),se([e,t,n],_?[_]:[],function(h){h=h[0];var I,$;_?(I=h.registeredClass,$=I.instancePrototype):$=Re.prototype;var Z=qe(N,function(){if(Object.getPrototypeOf(this)!==ye)throw new Be("Use 'new' to construct "+O);if(re.constructor_body===void 0)throw new Be(O+" has no accessible constructor");var tn=re.constructor_body[arguments.length];if(tn===void 0)throw new Be("Tried to invoke ctor of "+O+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(re.constructor_body).toString()+") parameters instead!");return tn.apply(this,arguments)}),ye=Object.create($,{constructor:{value:Z}});Z.prototype=ye;var re=new Wn(O,Z,ye,G,I,a,s,T),ir=new te(O,re,!0,!1,!1),Jt=new te(O+"*",re,!1,!1,!1),en=new te(O+" const*",re,!1,!0,!1);return Xt[e]={pointerType:Jt,constPointerType:en},$t(N,Z),[ir,Jt,en]})}function Kt(e,t){for(var n=[],_=0;_<e;_++)n.push(H[(t>>2)+_]);return n}function A_(e,t,n,_,o,a){Se(t>0);var c=Kt(t,n);o=z(_,o);var s=[a],R=[];se([],[e],function(T){T=T[0];var O="constructor "+T.name;if(T.registeredClass.constructor_body===void 0&&(T.registeredClass.constructor_body=[]),T.registeredClass.constructor_body[t-1]!==void 0)throw new Be("Cannot register multiple constructors with identical number of parameters ("+(t-1)+") for class '"+T.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return T.registeredClass.constructor_body[t-1]=function(){et("Cannot construct "+T.name+" due to unbound types",c)},se([],c,function(K){return T.registeredClass.constructor_body[t-1]=function(){arguments.length!==t-1&&S(O+" called with "+arguments.length+" arguments, expected "+(t-1)),R.length=0,s.length=t;for(var N=1;N<t;++N)s[N]=K[N].toWireType(R,arguments[N-1]);var h=o.apply(null,s);return je(R),K[0].fromWireType(h)},[]}),[]})}function zt(e,t){if(!(e instanceof Function))throw new TypeError("new_ called with constructor type "+typeof e+" which is not a function");var n=qe(e.name||"unknownFunctionName",function(){});n.prototype=e.prototype;var _=new n,o=e.apply(_,t);return o instanceof Object?o:_}function Yt(e,t,n,_,o){var a=t.length;a<2&&S("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var c=t[1]!==null&&n!==null,s=!1,R=1;R<t.length;++R)if(t[R]!==null&&t[R].destructorFunction===void 0){s=!0;break}for(var T=t[0].name!=="void",O="",K="",R=0;R<a-2;++R)O+=(R!==0?", ":"")+"arg"+R,K+=(R!==0?", ":"")+"arg"+R+"Wired";var G="return function "+Ye(e)+"("+O+`) { | ||
`)(t)}function ft(e,t){var _=qe(t,function(n){this.name=t,this.message=n;var s=new Error(n).stack;s!==void 0&&(this.stack=this.toString()+` | ||
`+s.replace(/^Error(:[^\n]*)?\n/,""))});return _.prototype=Object.create(e.prototype),_.prototype.constructor=_,_.prototype.toString=function(){return this.message===void 0?this.name:this.name+": "+this.message},_}var It=void 0;function Ze(e){throw new It(e)}function oe(e,t,_){e.forEach(function(o){Ye[o]=t});function n(o){var R=_(o);R.length!==e.length&&Ze("Mismatched type converter count");for(var T=0;T<e.length;++T)q(e[T],R[T])}var s=new Array(t.length),a=[],c=0;t.forEach(function(o,R){ue.hasOwnProperty(o)?s[R]=ue[o]:(a.push(o),Me.hasOwnProperty(o)||(Me[o]=[]),Me[o].push(function(){s[R]=ue[o],++c,c===a.length&&n(s)}))}),a.length===0&&n(s)}function g_(e){var t=We[e];delete We[e];var _=t.rawConstructor,n=t.rawDestructor,s=t.fields,a=s.map(function(c){return c.getterReturnType}).concat(s.map(function(c){return c.setterArgumentType}));oe([e],a,function(c){var o={};return s.forEach(function(R,T){var O=R.fieldName,M=c[T],G=R.getter,N=R.getterContext,v=c[T+s.length],I=R.setter,k=R.setterContext;o[O]={read:function(Z){return M.fromWireType(G(N,Z))},write:function(Z,ye){var re=[];I(k,Z,v.toWireType(re,ye)),je(re)}}}),[{name:t.name,fromWireType:function(R){var T={};for(var O in o)T[O]=o[O].read(R);return n(R),T},toWireType:function(R,T){for(var O in o)if(!(O in T))throw new TypeError('Missing field: "'+O+'"');var M=_();for(O in o)o[O].write(M,T[O]);return R!==null&&R.push(n,M),M},argPackAdvance:8,readValueFromPointer:Pe,destructorFunction:n}]})}function Qe(e){switch(e){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+e)}}function L_(){for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);bt=e}var bt=void 0;function U(e){for(var t="",_=e;D[_];)t+=bt[D[_++]];return t}var Be=void 0;function S(e){throw new Be(e)}function q(e,t,_){if(_=_||{},!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=t.name;if(e||S('type "'+n+'" must have a positive integer typeid pointer'),ue.hasOwnProperty(e)){if(_.ignoreDuplicateRegistrations)return;S("Cannot register type '"+n+"' twice")}if(ue[e]=t,delete Ye[e],Me.hasOwnProperty(e)){var s=Me[e];delete Me[e],s.forEach(function(a){a()})}}function m_(e,t,_,n,s){var a=Qe(_);t=U(t),q(e,{name:t,fromWireType:function(c){return!!c},toWireType:function(c,o){return o?n:s},argPackAdvance:8,readValueFromPointer:function(c){var o;if(_===1)o=$e;else if(_===2)o=fe;else if(_===4)o=H;else throw new TypeError("Unknown boolean type size: "+t);return this.fromWireType(o[c>>a])},destructorFunction:null})}function D_(e){if(!(this instanceof Re)||!(e instanceof Re))return!1;for(var t=this.$$.ptrType.registeredClass,_=this.$$.ptr,n=e.$$.ptrType.registeredClass,s=e.$$.ptr;t.baseClass;)_=t.upcast(_),t=t.baseClass;for(;n.baseClass;)s=n.upcast(s),n=n.baseClass;return t===n&&_===s}function I_(e){return{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}}function Tt(e){function t(_){return _.$$.ptrType.registeredClass.name}S(t(e)+" instance already deleted")}var ut=!1;function wt(e){}function b_(e){e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)}function Ht(e){e.count.value-=1;var t=e.count.value===0;t&&b_(e)}function pe(e){return typeof FinalizationGroup>"u"?(pe=function(t){return t},e):(ut=new FinalizationGroup(function(t){for(var _=t.next();!_.done;_=t.next()){var n=_.value;n.ptr?Ht(n):console.warn("object already deleted: "+n.ptr)}}),pe=function(t){return ut.register(t,t.$$,t.$$),t},wt=function(t){ut.unregister(t.$$)},pe(e))}function w_(){if(this.$$.ptr||Tt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=pe(Object.create(Object.getPrototypeOf(this),{$$:{value:I_(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function H_(){this.$$.ptr||Tt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&S("Object already scheduled for deletion"),wt(this),Ht(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function X_(){return!this.$$.ptr}var Ee=void 0,Ue=[];function Ot(){for(;Ue.length;){var e=Ue.pop();e.$$.deleteScheduled=!1,e.delete()}}function x_(){return this.$$.ptr||Tt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&S("Object already scheduled for deletion"),Ue.push(this),Ue.length===1&&Ee&&Ee(Ot),this.$$.deleteScheduled=!0,this}function $_(){Re.prototype.isAliasOf=D_,Re.prototype.clone=w_,Re.prototype.delete=H_,Re.prototype.isDeleted=X_,Re.prototype.deleteLater=x_}function Re(){}var Xt={};function xt(e,t,_){if(e[t].overloadTable===void 0){var n=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||S("Function '"+_+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+e[t].overloadTable+")!"),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[n.argCount]=n}}function lt(e,t,_){r.hasOwnProperty(e)?((_===void 0||r[e].overloadTable!==void 0&&r[e].overloadTable[_]!==void 0)&&S("Cannot register public name '"+e+"' twice"),xt(r,e,e),r.hasOwnProperty(_)&&S("Cannot register multiple overloads of a function with the same number of arguments ("+_+")!"),r[e].overloadTable[_]=t):(r[e]=t,_!==void 0&&(r[e].numArguments=_))}function k_(e,t,_,n,s,a,c,o){this.name=e,this.constructor=t,this.instancePrototype=_,this.rawDestructor=n,this.baseClass=s,this.getActualType=a,this.upcast=c,this.downcast=o,this.pureVirtualFunctions=[]}function Kt(e,t,_){for(;t!==_;)t.upcast||S("Expected null or instance of "+_.name+", got an instance of "+t.name),e=t.upcast(e),t=t.baseClass;return e}function W_(e,t){if(t===null)return this.isReference&&S("null is not a valid "+this.name),0;t.$$||S('Cannot pass "'+Ce(t)+'" as a '+this.name),t.$$.ptr||S("Cannot pass deleted object as a pointer of type "+this.name);var _=t.$$.ptrType.registeredClass,n=Kt(t.$$.ptr,_,this.registeredClass);return n}function j_(e,t){var _;if(t===null)return this.isReference&&S("null is not a valid "+this.name),this.isSmartPointer?(_=this.rawConstructor(),e!==null&&e.push(this.rawDestructor,_),_):0;t.$$||S('Cannot pass "'+Ce(t)+'" as a '+this.name),t.$$.ptr||S("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&t.$$.ptrType.isConst&&S("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);var n=t.$$.ptrType.registeredClass;if(_=Kt(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(t.$$.smartPtr===void 0&&S("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?_=t.$$.smartPtr:S("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:_=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)_=t.$$.smartPtr;else{var s=t.clone();_=this.rawShare(_,_e(function(){s.delete()})),e!==null&&e.push(this.rawDestructor,_)}break;default:S("Unsupporting sharing policy")}return _}function Y_(e,t){if(t===null)return this.isReference&&S("null is not a valid "+this.name),0;t.$$||S('Cannot pass "'+Ce(t)+'" as a '+this.name),t.$$.ptr||S("Cannot pass deleted object as a pointer of type "+this.name),t.$$.ptrType.isConst&&S("Cannot convert argument of type "+t.$$.ptrType.name+" to parameter type "+this.name);var _=t.$$.ptrType.registeredClass,n=Kt(t.$$.ptr,_,this.registeredClass);return n}function z_(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function q_(e){this.rawDestructor&&this.rawDestructor(e)}function Z_(e){e!==null&&e.delete()}function $t(e,t,_){if(t===_)return e;if(_.baseClass===void 0)return null;var n=$t(e,t,_.baseClass);return n===null?null:_.downcast(n)}function Q_(){return Object.keys(ve).length}function J_(){var e=[];for(var t in ve)ve.hasOwnProperty(t)&&e.push(ve[t]);return e}function en(e){Ee=e,Ue.length&&Ee&&Ee(Ot)}function tn(){r.getInheritedInstanceCount=Q_,r.getLiveInheritedInstances=J_,r.flushPendingDeletes=Ot,r.setDelayFunction=en}var ve={};function _n(e,t){for(t===void 0&&S("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t}function nn(e,t){return t=_n(e,t),ve[t]}function Je(e,t){(!t.ptrType||!t.ptr)&&Ze("makeClassHandle requires ptr and ptrType");var _=!!t.smartPtrType,n=!!t.smartPtr;return _!==n&&Ze("Both smartPtrType and smartPtr must be specified"),t.count={value:1},pe(Object.create(e,{$$:{value:t}}))}function rn(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var _=nn(this.registeredClass,t);if(_!==void 0){if(_.$$.count.value===0)return _.$$.ptr=t,_.$$.smartPtr=e,_.clone();var n=_.clone();return this.destructor(e),n}function s(){return this.isSmartPointer?Je(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):Je(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var a=this.registeredClass.getActualType(t),c=Xt[a];if(!c)return s.call(this);var o;this.isConst?o=c.constPointerType:o=c.pointerType;var R=$t(t,this.registeredClass,o.registeredClass);return R===null?s.call(this):this.isSmartPointer?Je(o.registeredClass.instancePrototype,{ptrType:o,ptr:R,smartPtrType:this,smartPtr:e}):Je(o.registeredClass.instancePrototype,{ptrType:o,ptr:R})}function sn(){te.prototype.getPointee=z_,te.prototype.destructor=q_,te.prototype.argPackAdvance=8,te.prototype.readValueFromPointer=Pe,te.prototype.deleteObject=Z_,te.prototype.fromWireType=rn}function te(e,t,_,n,s,a,c,o,R,T,O){this.name=e,this.registeredClass=t,this.isReference=_,this.isConst=n,this.isSmartPointer=s,this.pointeeType=a,this.sharingPolicy=c,this.rawGetPointee=o,this.rawConstructor=R,this.rawShare=T,this.rawDestructor=O,!s&&t.baseClass===void 0?n?(this.toWireType=W_,this.destructorFunction=null):(this.toWireType=Y_,this.destructorFunction=null):this.toWireType=j_}function kt(e,t,_){r.hasOwnProperty(e)||Ze("Replacing nonexistant public symbol"),r[e].overloadTable!==void 0&&_!==void 0?r[e].overloadTable[_]=t:(r[e]=t,r[e].argCount=_)}function on(e,t,_){var n=r["dynCall_"+e];return _&&_.length?n.apply(null,[t].concat(_)):n.call(null,t)}function Rn(e,t,_){return e.indexOf("j")!=-1?on(e,t,_):Ve.get(t).apply(null,_)}function an(e,t){var _=[];return function(){_.length=arguments.length;for(var n=0;n<arguments.length;n++)_[n]=arguments[n];return Rn(e,t,_)}}function Y(e,t){e=U(e);function _(){return e.indexOf("j")!=-1?an(e,t):Ve.get(t)}var n=_();return typeof n!="function"&&S("unknown function pointer with signature "+e+": "+t),n}var Wt=void 0;function jt(e){var t=Qt(e),_=U(t);return ne(t),_}function et(e,t){var _=[],n={};function s(a){if(!n[a]&&!ue[a]){if(Ye[a]){Ye[a].forEach(s);return}_.push(a),n[a]=!0}}throw t.forEach(s),new Wt(e+": "+_.map(jt).join([", "]))}function cn(e,t,_,n,s,a,c,o,R,T,O,M,G){O=U(O),a=Y(s,a),o&&(o=Y(c,o)),T&&(T=Y(R,T)),G=Y(M,G);var N=ze(O);lt(N,function(){et("Cannot construct "+O+" due to unbound types",[n])}),oe([e,t,_],n?[n]:[],function(v){v=v[0];var I,k;n?(I=v.registeredClass,k=I.instancePrototype):k=Re.prototype;var Z=qe(N,function(){if(Object.getPrototypeOf(this)!==ye)throw new Be("Use 'new' to construct "+O);if(re.constructor_body===void 0)throw new Be(O+" has no accessible constructor");var t_=re.constructor_body[arguments.length];if(t_===void 0)throw new Be("Tried to invoke ctor of "+O+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(re.constructor_body).toString()+") parameters instead!");return t_.apply(this,arguments)}),ye=Object.create(k,{constructor:{value:Z}});Z.prototype=ye;var re=new k_(O,Z,ye,G,I,a,o,T),ir=new te(O,re,!0,!1,!1),Jt=new te(O+"*",re,!1,!1,!1),e_=new te(O+" const*",re,!1,!0,!1);return Xt[e]={pointerType:Jt,constPointerType:e_},kt(N,Z),[ir,Jt,e_]})}function Mt(e,t){for(var _=[],n=0;n<e;n++)_.push(H[(t>>2)+n]);return _}function An(e,t,_,n,s,a){Se(t>0);var c=Mt(t,_);s=Y(n,s);var o=[a],R=[];oe([],[e],function(T){T=T[0];var O="constructor "+T.name;if(T.registeredClass.constructor_body===void 0&&(T.registeredClass.constructor_body=[]),T.registeredClass.constructor_body[t-1]!==void 0)throw new Be("Cannot register multiple constructors with identical number of parameters ("+(t-1)+") for class '"+T.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return T.registeredClass.constructor_body[t-1]=function(){et("Cannot construct "+T.name+" due to unbound types",c)},oe([],c,function(M){return T.registeredClass.constructor_body[t-1]=function(){arguments.length!==t-1&&S(O+" called with "+arguments.length+" arguments, expected "+(t-1)),R.length=0,o.length=t;for(var N=1;N<t;++N)o[N]=M[N].toWireType(R,arguments[N-1]);var v=s.apply(null,o);return je(R),M[0].fromWireType(v)},[]}),[]})}function Yt(e,t){if(!(e instanceof Function))throw new TypeError("new_ called with constructor type "+typeof e+" which is not a function");var _=qe(e.name||"unknownFunctionName",function(){});_.prototype=e.prototype;var n=new _,s=e.apply(n,t);return s instanceof Object?s:n}function zt(e,t,_,n,s){var a=t.length;a<2&&S("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var c=t[1]!==null&&_!==null,o=!1,R=1;R<t.length;++R)if(t[R]!==null&&t[R].destructorFunction===void 0){o=!0;break}for(var T=t[0].name!=="void",O="",M="",R=0;R<a-2;++R)O+=(R!==0?", ":"")+"arg"+R,M+=(R!==0?", ":"")+"arg"+R+"Wired";var G="return function "+ze(e)+"("+O+`) { | ||
if (arguments.length !== `+(a-2)+`) { | ||
throwBindingError('function `+e+" called with ' + arguments.length + ' arguments, expected "+(a-2)+` args!'); | ||
} | ||
`;s&&(G+=`var destructors = []; | ||
`);var N=s?"destructors":"null",h=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],I=[S,_,o,je,t[0],t[1]];c&&(G+="var thisWired = classParam.toWireType("+N+`, this); | ||
`;o&&(G+=`var destructors = []; | ||
`);var N=o?"destructors":"null",v=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],I=[S,n,s,je,t[0],t[1]];c&&(G+="var thisWired = classParam.toWireType("+N+`, this); | ||
`);for(var R=0;R<a-2;++R)G+="var arg"+R+"Wired = argType"+R+".toWireType("+N+", arg"+R+"); // "+t[R+2].name+` | ||
`,h.push("argType"+R),I.push(t[R+2]);if(c&&(K="thisWired"+(K.length>0?", ":"")+K),G+=(T?"var rv = ":"")+"invoker(fn"+(K.length>0?", ":"")+K+`); | ||
`,s)G+=`runDestructors(destructors); | ||
`;else for(var R=c?1:2;R<t.length;++R){var $=R===1?"thisWired":"arg"+(R-2)+"Wired";t[R].destructorFunction!==null&&(G+=$+"_dtor("+$+"); // "+t[R].name+` | ||
`,h.push($+"_dtor"),I.push(t[R].destructorFunction))}T&&(G+=`var ret = retType.fromWireType(rv); | ||
`,v.push("argType"+R),I.push(t[R+2]);if(c&&(M="thisWired"+(M.length>0?", ":"")+M),G+=(T?"var rv = ":"")+"invoker(fn"+(M.length>0?", ":"")+M+`); | ||
`,o)G+=`runDestructors(destructors); | ||
`;else for(var R=c?1:2;R<t.length;++R){var k=R===1?"thisWired":"arg"+(R-2)+"Wired";t[R].destructorFunction!==null&&(G+=k+"_dtor("+k+"); // "+t[R].name+` | ||
`,v.push(k+"_dtor"),I.push(t[R].destructorFunction))}T&&(G+=`var ret = retType.fromWireType(rv); | ||
return ret; | ||
`),G+=`} | ||
`,h.push(G);var Z=zt(Function,h).apply(null,I);return Z}function f_(e,t,n,_,o,a,c,s){var R=Kt(n,_);t=v(t),a=z(o,a),se([],[e],function(T){T=T[0];var O=T.name+"."+t;s&&T.registeredClass.pureVirtualFunctions.push(t);function K(){et("Cannot call "+O+" due to unbound types",R)}var G=T.registeredClass.instancePrototype,N=G[t];return N===void 0||N.overloadTable===void 0&&N.className!==T.name&&N.argCount===n-2?(K.argCount=n-2,K.className=T.name,G[t]=K):(xt(G,t,O),G[t].overloadTable[n-2]=K),se([],R,function(h){var I=Yt(O,h,T,a,c);return G[t].overloadTable===void 0?(I.argCount=n-2,G[t]=I):G[t].overloadTable[n-2]=I,[]}),[]})}function T_(e,t,n){e=v(e),se([],[t],function(_){return _=_[0],r[e]=_.fromWireType(n),[]})}var Bt=[],k=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function Ct(e){e>4&&--k[e].refcount===0&&(k[e]=void 0,Bt.push(e))}function u_(){for(var e=0,t=5;t<k.length;++t)k[t]!==void 0&&++e;return e}function O_(){for(var e=5;e<k.length;++e)if(k[e]!==void 0)return k[e];return null}function l_(){r.count_emval_handles=u_,r.get_first_emval=O_}function ne(e){switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:{var t=Bt.length?Bt.pop():k.length;return k[t]={refcount:1,value:e},t}}}function M_(e,t){t=v(t),q(e,{name:t,fromWireType:function(n){var _=k[n].value;return Ct(n),_},toWireType:function(n,_){return ne(_)},argPackAdvance:8,readValueFromPointer:pe,destructorFunction:null})}function K_(e,t,n){switch(t){case 0:return function(_){var o=n?ke:D;return this.fromWireType(o[_])};case 1:return function(_){var o=n?fe:Ge;return this.fromWireType(o[_>>1])};case 2:return function(_){var o=n?H:Y;return this.fromWireType(o[_>>2])};default:throw new TypeError("Unknown integer type: "+e)}}function B_(e,t,n,_){var o=Qe(n);t=v(t);function a(){}a.values={},q(e,{name:t,constructor:a,fromWireType:function(c){return this.constructor.values[c]},toWireType:function(c,s){return s.value},argPackAdvance:8,readValueFromPointer:K_(t,o,_),destructorFunction:null}),lt(t,a)}function tt(e,t){var n=ue[e];return n===void 0&&S(t+" has unknown type "+jt(e)),n}function C_(e,t,n){var _=tt(e,"enum");t=v(t);var o=_.constructor,a=Object.create(_.constructor.prototype,{value:{value:n},constructor:{value:qe(_.name+"_"+t,function(){})}});o.values[n]=a,o[t]=a}function Ce(e){if(e===null)return"null";var t=typeof e;return t==="object"||t==="array"||t==="function"?e.toString():""+e}function F_(e,t){switch(t){case 2:return function(n){return this.fromWireType(Pt[n>>2])};case 3:return function(n){return this.fromWireType(Et[n>>3])};default:throw new TypeError("Unknown float type: "+e)}}function d_(e,t,n){var _=Qe(n);t=v(t),q(e,{name:t,fromWireType:function(o){return o},toWireType:function(o,a){if(typeof a!="number"&&typeof a!="boolean")throw new TypeError('Cannot convert "'+Ce(a)+'" to '+this.name);return a},argPackAdvance:8,readValueFromPointer:F_(t,_),destructorFunction:null})}function S_(e,t,n,_,o,a){var c=Kt(t,n);e=v(e),o=z(_,o),lt(e,function(){et("Cannot call "+e+" due to unbound types",c)},t-1),se([],c,function(s){var R=[s[0],null].concat(s.slice(1));return $t(e,Yt(e,R,null,o,a),t-1),[]})}function G_(e,t,n){switch(t){case 0:return n?function(o){return ke[o]}:function(o){return D[o]};case 1:return n?function(o){return fe[o>>1]}:function(o){return Ge[o>>1]};case 2:return n?function(o){return H[o>>2]}:function(o){return Y[o>>2]};default:throw new TypeError("Unknown integer type: "+e)}}function V_(e,t,n,_,o){t=v(t),o===-1&&(o=4294967295);var a=Qe(n),c=function(T){return T};if(_===0){var s=32-8*n;c=function(T){return T<<s>>>s}}var R=t.indexOf("unsigned")!=-1;q(e,{name:t,fromWireType:c,toWireType:function(T,O){if(typeof O!="number"&&typeof O!="boolean")throw new TypeError('Cannot convert "'+Ce(O)+'" to '+this.name);if(O<_||O>o)throw new TypeError('Passing a number "'+Ce(O)+'" from JS side to C/C++ side to an argument of type "'+t+'", which is outside the valid range ['+_+", "+o+"]!");return R?O>>>0:O|0},argPackAdvance:8,readValueFromPointer:G_(t,a,_!==0),destructorFunction:null})}function N_(e,t,n){var _=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],o=_[t];function a(c){c=c>>2;var s=Y,R=s[c],T=s[c+1];return new o(ct,T,R)}n=v(n),q(e,{name:n,fromWireType:a,argPackAdvance:8,readValueFromPointer:a},{ignoreDuplicateRegistrations:!0})}function p_(e,t){t=v(t);var n=t==="std::string";q(e,{name:t,fromWireType:function(_){var o=Y[_>>2],a;if(n)for(var c=_+4,s=0;s<=o;++s){var R=_+4+s;if(s==o||D[R]==0){var T=R-c,O=Xe(c,T);a===void 0?a=O:(a+="\0",a+=O),c=R+1}}else{for(var K=new Array(o),s=0;s<o;++s)K[s]=String.fromCharCode(D[_+4+s]);a=K.join("")}return _e(_),a},toWireType:function(_,o){o instanceof ArrayBuffer&&(o=new Uint8Array(o));var a,c=typeof o=="string";c||o instanceof Uint8Array||o instanceof Uint8ClampedArray||o instanceof Int8Array||S("Cannot pass non-string to std::string"),n&&c?a=function(){return j(o)}:a=function(){return o.length};var s=a(),R=dt(4+s+1);if(Y[R>>2]=s,n&&c)L(o,R+4,s+1);else if(c)for(var T=0;T<s;++T){var O=o.charCodeAt(T);O>255&&(_e(R),S("String has UTF-16 code units that do not fit in 8 bits")),D[R+4+T]=O}else for(var T=0;T<s;++T)D[R+4+T]=o[T];return _!==null&&_.push(_e,R),R},argPackAdvance:8,readValueFromPointer:pe,destructorFunction:function(_){_e(_)}})}function P_(e,t,n){n=v(n);var _,o,a,c,s;t===2?(_=at,o=xe,c=Tn,a=function(){return Ge},s=1):t===4&&(_=un,o=On,c=ln,a=function(){return Y},s=2),q(e,{name:n,fromWireType:function(R){for(var T=Y[R>>2],O=a(),K,G=R+4,N=0;N<=T;++N){var h=R+4+N*t;if(N==T||O[h>>s]==0){var I=h-G,$=_(G,I);K===void 0?K=$:(K+="\0",K+=$),G=h+t}}return _e(R),K},toWireType:function(R,T){typeof T!="string"&&S("Cannot pass non-string to C++ string type "+n);var O=c(T),K=dt(4+O+t);return Y[K>>2]=O>>s,o(T,K+4,O+t),R!==null&&R.push(_e,K),K},argPackAdvance:8,readValueFromPointer:pe,destructorFunction:function(R){_e(R)}})}function E_(e,t,n,_,o,a){We[e]={name:v(t),rawConstructor:z(n,_),rawDestructor:z(o,a),fields:[]}}function v_(e,t,n,_,o,a,c,s,R,T){We[e].fields.push({fieldName:v(t),getterReturnType:n,getter:z(_,o),getterContext:a,setterArgumentType:c,setter:z(s,R),setterContext:T})}function h_(e,t){t=v(t),q(e,{isVoid:!0,name:t,argPackAdvance:0,fromWireType:function(){},toWireType:function(n,_){}})}function Ue(e){return e||S("Cannot use deleted val. handle = "+e),k[e].value}function U_(e,t,n){e=Ue(e),t=tt(t,"emval::as");var _=[],o=ne(_);return H[n>>2]=o,t.toWireType(_,e)}var y_={};function nt(e){var t=y_[e];return t===void 0?v(e):t}var Ft=[];function g_(e,t,n,_){e=Ft[e],t=Ue(t),n=nt(n),e(t,n,null,_)}function qt(){return typeof globalThis=="object"?globalThis:function(){return Function}()("return this")()}function L_(e){return e===0?ne(qt()):(e=nt(e),ne(qt()[e]))}function m_(e){var t=Ft.length;return Ft.push(e),t}function D_(e,t){for(var n=new Array(e),_=0;_<e;++_)n[_]=tt(H[(t>>2)+_],"parameter "+_);return n}function I_(e,t){for(var n=D_(e,t),_=n[0],o=_.name+"_$"+n.slice(1).map(function(N){return N.name}).join("_")+"$",a=["retType"],c=[_],s="",R=0;R<e-1;++R)s+=(R!==0?", ":"")+"arg"+R,a.push("argType"+R),c.push(n[1+R]);for(var T=Ye("methodCaller_"+o),O="return function "+T+`(handle, name, destructors, args) { | ||
`,K=0,R=0;R<e-1;++R)O+=" var arg"+R+" = argType"+R+".readValueFromPointer(args"+(K?"+"+K:"")+`); | ||
`,K+=n[R+1].argPackAdvance;O+=" var rv = handle[name]("+s+`); | ||
`;for(var R=0;R<e-1;++R)n[R+1].deleteObject&&(O+=" argType"+R+".deleteObject(arg"+R+`); | ||
`);_.isVoid||(O+=` return retType.toWireType(destructors, rv); | ||
`,v.push(G);var Z=Yt(Function,v).apply(null,I);return Z}function fn(e,t,_,n,s,a,c,o){var R=Mt(_,n);t=U(t),a=Y(s,a),oe([],[e],function(T){T=T[0];var O=T.name+"."+t;o&&T.registeredClass.pureVirtualFunctions.push(t);function M(){et("Cannot call "+O+" due to unbound types",R)}var G=T.registeredClass.instancePrototype,N=G[t];return N===void 0||N.overloadTable===void 0&&N.className!==T.name&&N.argCount===_-2?(M.argCount=_-2,M.className=T.name,G[t]=M):(xt(G,t,O),G[t].overloadTable[_-2]=M),oe([],R,function(v){var I=zt(O,v,T,a,c);return G[t].overloadTable===void 0?(I.argCount=_-2,G[t]=I):G[t].overloadTable[_-2]=I,[]}),[]})}function Tn(e,t,_){e=U(e),oe([],[t],function(n){return n=n[0],r[e]=n.fromWireType(_),[]})}var Bt=[],$=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function Ct(e){e>4&&--$[e].refcount===0&&($[e]=void 0,Bt.push(e))}function un(){for(var e=0,t=5;t<$.length;++t)$[t]!==void 0&&++e;return e}function On(){for(var e=5;e<$.length;++e)if($[e]!==void 0)return $[e];return null}function ln(){r.count_emval_handles=un,r.get_first_emval=On}function _e(e){switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:{var t=Bt.length?Bt.pop():$.length;return $[t]={refcount:1,value:e},t}}}function Kn(e,t){t=U(t),q(e,{name:t,fromWireType:function(_){var n=$[_].value;return Ct(_),n},toWireType:function(_,n){return _e(n)},argPackAdvance:8,readValueFromPointer:Pe,destructorFunction:null})}function Mn(e,t,_){switch(t){case 0:return function(n){var s=_?$e:D;return this.fromWireType(s[n])};case 1:return function(n){var s=_?fe:Ge;return this.fromWireType(s[n>>1])};case 2:return function(n){var s=_?H:z;return this.fromWireType(s[n>>2])};default:throw new TypeError("Unknown integer type: "+e)}}function Bn(e,t,_,n){var s=Qe(_);t=U(t);function a(){}a.values={},q(e,{name:t,constructor:a,fromWireType:function(c){return this.constructor.values[c]},toWireType:function(c,o){return o.value},argPackAdvance:8,readValueFromPointer:Mn(t,s,n),destructorFunction:null}),lt(t,a)}function tt(e,t){var _=ue[e];return _===void 0&&S(t+" has unknown type "+jt(e)),_}function Cn(e,t,_){var n=tt(e,"enum");t=U(t);var s=n.constructor,a=Object.create(n.constructor.prototype,{value:{value:_},constructor:{value:qe(n.name+"_"+t,function(){})}});s.values[_]=a,s[t]=a}function Ce(e){if(e===null)return"null";var t=typeof e;return t==="object"||t==="array"||t==="function"?e.toString():""+e}function Fn(e,t){switch(t){case 2:return function(_){return this.fromWireType(pt[_>>2])};case 3:return function(_){return this.fromWireType(Et[_>>3])};default:throw new TypeError("Unknown float type: "+e)}}function dn(e,t,_){var n=Qe(_);t=U(t),q(e,{name:t,fromWireType:function(s){return s},toWireType:function(s,a){if(typeof a!="number"&&typeof a!="boolean")throw new TypeError('Cannot convert "'+Ce(a)+'" to '+this.name);return a},argPackAdvance:8,readValueFromPointer:Fn(t,n),destructorFunction:null})}function Sn(e,t,_,n,s,a){var c=Mt(t,_);e=U(e),s=Y(n,s),lt(e,function(){et("Cannot call "+e+" due to unbound types",c)},t-1),oe([],c,function(o){var R=[o[0],null].concat(o.slice(1));return kt(e,zt(e,R,null,s,a),t-1),[]})}function Gn(e,t,_){switch(t){case 0:return _?function(s){return $e[s]}:function(s){return D[s]};case 1:return _?function(s){return fe[s>>1]}:function(s){return Ge[s>>1]};case 2:return _?function(s){return H[s>>2]}:function(s){return z[s>>2]};default:throw new TypeError("Unknown integer type: "+e)}}function Vn(e,t,_,n,s){t=U(t),s===-1&&(s=4294967295);var a=Qe(_),c=function(T){return T};if(n===0){var o=32-8*_;c=function(T){return T<<o>>>o}}var R=t.indexOf("unsigned")!=-1;q(e,{name:t,fromWireType:c,toWireType:function(T,O){if(typeof O!="number"&&typeof O!="boolean")throw new TypeError('Cannot convert "'+Ce(O)+'" to '+this.name);if(O<n||O>s)throw new TypeError('Passing a number "'+Ce(O)+'" from JS side to C/C++ side to an argument of type "'+t+'", which is outside the valid range ['+n+", "+s+"]!");return R?O>>>0:O|0},argPackAdvance:8,readValueFromPointer:Gn(t,a,n!==0),destructorFunction:null})}function Nn(e,t,_){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],s=n[t];function a(c){c=c>>2;var o=z,R=o[c],T=o[c+1];return new s(ct,T,R)}_=U(_),q(e,{name:_,fromWireType:a,argPackAdvance:8,readValueFromPointer:a},{ignoreDuplicateRegistrations:!0})}function Pn(e,t){t=U(t);var _=t==="std::string";q(e,{name:t,fromWireType:function(n){var s=z[n>>2],a;if(_)for(var c=n+4,o=0;o<=s;++o){var R=n+4+o;if(o==s||D[R]==0){var T=R-c,O=Xe(c,T);a===void 0?a=O:(a+="\0",a+=O),c=R+1}}else{for(var M=new Array(s),o=0;o<s;++o)M[o]=String.fromCharCode(D[n+4+o]);a=M.join("")}return ne(n),a},toWireType:function(n,s){s instanceof ArrayBuffer&&(s=new Uint8Array(s));var a,c=typeof s=="string";c||s instanceof Uint8Array||s instanceof Uint8ClampedArray||s instanceof Int8Array||S("Cannot pass non-string to std::string"),_&&c?a=function(){return j(s)}:a=function(){return s.length};var o=a(),R=dt(4+o+1);if(z[R>>2]=o,_&&c)L(s,R+4,o+1);else if(c)for(var T=0;T<o;++T){var O=s.charCodeAt(T);O>255&&(ne(R),S("String has UTF-16 code units that do not fit in 8 bits")),D[R+4+T]=O}else for(var T=0;T<o;++T)D[R+4+T]=s[T];return n!==null&&n.push(ne,R),R},argPackAdvance:8,readValueFromPointer:Pe,destructorFunction:function(n){ne(n)}})}function pn(e,t,_){_=U(_);var n,s,a,c,o;t===2?(n=at,s=xe,c=f_,a=function(){return Ge},o=1):t===4&&(n=T_,s=u_,c=O_,a=function(){return z},o=2),q(e,{name:_,fromWireType:function(R){for(var T=z[R>>2],O=a(),M,G=R+4,N=0;N<=T;++N){var v=R+4+N*t;if(N==T||O[v>>o]==0){var I=v-G,k=n(G,I);M===void 0?M=k:(M+="\0",M+=k),G=v+t}}return ne(R),M},toWireType:function(R,T){typeof T!="string"&&S("Cannot pass non-string to C++ string type "+_);var O=c(T),M=dt(4+O+t);return z[M>>2]=O>>o,s(T,M+4,O+t),R!==null&&R.push(ne,M),M},argPackAdvance:8,readValueFromPointer:Pe,destructorFunction:function(R){ne(R)}})}function En(e,t,_,n,s,a){We[e]={name:U(t),rawConstructor:Y(_,n),rawDestructor:Y(s,a),fields:[]}}function Un(e,t,_,n,s,a,c,o,R,T){We[e].fields.push({fieldName:U(t),getterReturnType:_,getter:Y(n,s),getterContext:a,setterArgumentType:c,setter:Y(o,R),setterContext:T})}function vn(e,t){t=U(t),q(e,{isVoid:!0,name:t,argPackAdvance:0,fromWireType:function(){},toWireType:function(_,n){}})}function he(e){return e||S("Cannot use deleted val. handle = "+e),$[e].value}function hn(e,t,_){e=he(e),t=tt(t,"emval::as");var n=[],s=_e(n);return H[_>>2]=s,t.toWireType(n,e)}var yn={};function _t(e){var t=yn[e];return t===void 0?U(e):t}var Ft=[];function gn(e,t,_,n){e=Ft[e],t=he(t),_=_t(_),e(t,_,null,n)}function qt(){return typeof globalThis=="object"?globalThis:function(){return Function}()("return this")()}function Ln(e){return e===0?_e(qt()):(e=_t(e),_e(qt()[e]))}function mn(e){var t=Ft.length;return Ft.push(e),t}function Dn(e,t){for(var _=new Array(e),n=0;n<e;++n)_[n]=tt(H[(t>>2)+n],"parameter "+n);return _}function In(e,t){for(var _=Dn(e,t),n=_[0],s=n.name+"_$"+_.slice(1).map(function(N){return N.name}).join("_")+"$",a=["retType"],c=[n],o="",R=0;R<e-1;++R)o+=(R!==0?", ":"")+"arg"+R,a.push("argType"+R),c.push(_[1+R]);for(var T=ze("methodCaller_"+s),O="return function "+T+`(handle, name, destructors, args) { | ||
`,M=0,R=0;R<e-1;++R)O+=" var arg"+R+" = argType"+R+".readValueFromPointer(args"+(M?"+"+M:"")+`); | ||
`,M+=_[R+1].argPackAdvance;O+=" var rv = handle[name]("+o+`); | ||
`;for(var R=0;R<e-1;++R)_[R+1].deleteObject&&(O+=" argType"+R+".deleteObject(arg"+R+`); | ||
`);n.isVoid||(O+=` return retType.toWireType(destructors, rv); | ||
`),O+=`}; | ||
`,a.push(O);var G=zt(Function,a).apply(null,c);return m_(G)}function b_(e){return e=nt(e),ne(r[e])}function w_(e,t){return e=Ue(e),t=Ue(t),ne(e[t])}function H_(e){e>4&&(k[e].refcount+=1)}function X_(e){for(var t="",n=0;n<e;++n)t+=(n!==0?", ":"")+"arg"+n;for(var _="return function emval_allocator_"+e+`(constructor, argTypes, args) { | ||
`,n=0;n<e;++n)_+="var argType"+n+" = requireRegisteredType(Module['HEAP32'][(argTypes >>> 2) + "+n+'], "parameter '+n+`"); | ||
var arg`+n+" = argType"+n+`.readValueFromPointer(args); | ||
args += argType`+n+`['argPackAdvance']; | ||
`;return _+="var obj = new constructor("+t+`); | ||
`,a.push(O);var G=Yt(Function,a).apply(null,c);return mn(G)}function bn(e){return e=_t(e),_e(r[e])}function wn(e,t){return e=he(e),t=he(t),_e(e[t])}function Hn(e){e>4&&($[e].refcount+=1)}function Xn(e){for(var t="",_=0;_<e;++_)t+=(_!==0?", ":"")+"arg"+_;for(var n="return function emval_allocator_"+e+`(constructor, argTypes, args) { | ||
`,_=0;_<e;++_)n+="var argType"+_+" = requireRegisteredType(Module['HEAP32'][(argTypes >>> 2) + "+_+'], "parameter '+_+`"); | ||
var arg`+_+" = argType"+_+`.readValueFromPointer(args); | ||
args += argType`+_+`['argPackAdvance']; | ||
`;return n+="var obj = new constructor("+t+`); | ||
return __emval_register(obj); | ||
} | ||
`,new Function("requireRegisteredType","Module","__emval_register",_)(tt,r,ne)}var Zt={};function x_(e,t,n,_){e=Ue(e);var o=Zt[t];return o||(o=X_(t),Zt[t]=o),o(e,n,_)}function k_(e){return ne(nt(e))}function $_(e){var t=k[e].value;je(t),Ct(e)}function W_(){Me()}function j_(e,t,n){D.copyWithin(e,t,t+n)}function z_(e){try{return ce.grow(e-ct.byteLength+65535>>>16),vt(ce.buffer),1}catch{}}function Y_(e){var t=D.length;e=e>>>0;var n=2147483648;if(e>n)return!1;for(var _=1;_<=4;_*=2){var o=t*(1+.2/_);o=Math.min(o,e+100663296);var a=Math.min(n,Mn(Math.max(e,o),65536)),c=z_(a);if(c)return!0}return!1}var _t={mappings:{},buffers:[null,[],[]],printChar:function(e,t){var n=_t.buffers[e];t===0||t===10?((e===1?ot:ee)(He(n,0)),n.length=0):n.push(t)},varargs:void 0,get:function(){_t.varargs+=4;var e=H[_t.varargs-4>>2];return e},getStr:function(e){var t=Xe(e);return t},get64:function(e,t){return e}};function q_(e){return 0}function Z_(e,t,n,_,o){}function Q_(e,t,n,_){for(var o=0,a=0;a<n;a++){for(var c=H[t+a*8>>2],s=H[t+(a*8+4)>>2],R=0;R<s;R++)_t.printChar(e,D[c+R]);o+=s}return H[_>>2]=o,0}function J_(e){Ie(e|0)}It=r.InternalError=ft(Error,"InternalError"),mn(),Be=r.BindingError=ft(Error,"BindingError"),$n(),o_(),n_(),Wt=r.UnboundTypeError=ft(Error,"UnboundTypeError"),l_();var er={t:Ln,I:Dn,x:c_,w:A_,d:f_,k:T_,H:M_,n:B_,a:C_,A:d_,i:S_,j:V_,h:N_,B:p_,v:P_,u:E_,c:v_,J:h_,m:U_,s:g_,b:Ct,y:L_,p:I_,r:b_,e:w_,g:H_,q:x_,f:k_,l:$_,o:W_,E:j_,F:Y_,G:q_,C:Z_,z:Q_,D:J_},Or=Un(),tr=r.___wasm_call_ctors=function(){return(tr=r.___wasm_call_ctors=r.asm.L).apply(null,arguments)},dt=r._malloc=function(){return(dt=r._malloc=r.asm.M).apply(null,arguments)},_e=r._free=function(){return(_e=r._free=r.asm.N).apply(null,arguments)},Qt=r.___getTypeName=function(){return(Qt=r.___getTypeName=r.asm.P).apply(null,arguments)},nr=r.___embind_register_native_and_builtin_types=function(){return(nr=r.___embind_register_native_and_builtin_types=r.asm.Q).apply(null,arguments)},_r=r.dynCall_jiji=function(){return(_r=r.dynCall_jiji=r.asm.R).apply(null,arguments)},rt;function rr(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}Ne=function e(){rt||St(),rt||(Ne=e)};function St(e){if(e=e||U,Te>0||(Cn(),Te>0))return;function t(){rt||(rt=!0,r.calledRun=!0,!de&&(Fn(),dn(),B(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),Sn()))}r.setStatus?(r.setStatus("Running..."),setTimeout(function(){setTimeout(function(){r.setStatus("")},1),t()},1)):t()}if(r.run=St,r.preInit)for(typeof r.preInit=="function"&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();return St(),f.ready}}();typeof it=="object"&&typeof pt=="object"?pt.exports=Nt:typeof define=="function"&&define.amd?define([],function(){return Nt}):typeof it=="object"&&(it.BASIS=Nt)});var F={UNSIGNED_BYTE:M.UNSIGNED_BYTE,UNSIGNED_SHORT:M.UNSIGNED_SHORT,UNSIGNED_INT:M.UNSIGNED_INT,FLOAT:M.FLOAT,HALF_FLOAT:M.HALF_FLOAT_OES,UNSIGNED_INT_24_8:M.UNSIGNED_INT_24_8,UNSIGNED_SHORT_4_4_4_4:M.UNSIGNED_SHORT_4_4_4_4,UNSIGNED_SHORT_5_5_5_1:M.UNSIGNED_SHORT_5_5_5_1,UNSIGNED_SHORT_5_6_5:M.UNSIGNED_SHORT_5_6_5};F.toWebGLConstant=function(i,f){switch(i){case F.UNSIGNED_BYTE:return M.UNSIGNED_BYTE;case F.UNSIGNED_SHORT:return M.UNSIGNED_SHORT;case F.UNSIGNED_INT:return M.UNSIGNED_INT;case F.FLOAT:return M.FLOAT;case F.HALF_FLOAT:return f.webgl2?M.HALF_FLOAT:M.HALF_FLOAT_OES;case F.UNSIGNED_INT_24_8:return M.UNSIGNED_INT_24_8;case F.UNSIGNED_SHORT_4_4_4_4:return M.UNSIGNED_SHORT_4_4_4_4;case F.UNSIGNED_SHORT_5_5_5_1:return M.UNSIGNED_SHORT_5_5_5_1;case F.UNSIGNED_SHORT_5_6_5:return F.UNSIGNED_SHORT_5_6_5}};F.isPacked=function(i){return i===F.UNSIGNED_INT_24_8||i===F.UNSIGNED_SHORT_4_4_4_4||i===F.UNSIGNED_SHORT_5_5_5_1||i===F.UNSIGNED_SHORT_5_6_5};F.sizeInBytes=function(i){switch(i){case F.UNSIGNED_BYTE:return 1;case F.UNSIGNED_SHORT:case F.UNSIGNED_SHORT_4_4_4_4:case F.UNSIGNED_SHORT_5_5_5_1:case F.UNSIGNED_SHORT_5_6_5:case F.HALF_FLOAT:return 2;case F.UNSIGNED_INT:case F.FLOAT:case F.UNSIGNED_INT_24_8:return 4}};F.validate=function(i){return i===F.UNSIGNED_BYTE||i===F.UNSIGNED_SHORT||i===F.UNSIGNED_INT||i===F.FLOAT||i===F.HALF_FLOAT||i===F.UNSIGNED_INT_24_8||i===F.UNSIGNED_SHORT_4_4_4_4||i===F.UNSIGNED_SHORT_5_5_5_1||i===F.UNSIGNED_SHORT_5_6_5};var b=Object.freeze(F);var A={DEPTH_COMPONENT:M.DEPTH_COMPONENT,DEPTH_STENCIL:M.DEPTH_STENCIL,ALPHA:M.ALPHA,RED:M.RED,RG:M.RG,RGB:M.RGB,RGBA:M.RGBA,LUMINANCE:M.LUMINANCE,LUMINANCE_ALPHA:M.LUMINANCE_ALPHA,RGB_DXT1:M.COMPRESSED_RGB_S3TC_DXT1_EXT,RGBA_DXT1:M.COMPRESSED_RGBA_S3TC_DXT1_EXT,RGBA_DXT3:M.COMPRESSED_RGBA_S3TC_DXT3_EXT,RGBA_DXT5:M.COMPRESSED_RGBA_S3TC_DXT5_EXT,RGB_PVRTC_4BPPV1:M.COMPRESSED_RGB_PVRTC_4BPPV1_IMG,RGB_PVRTC_2BPPV1:M.COMPRESSED_RGB_PVRTC_2BPPV1_IMG,RGBA_PVRTC_4BPPV1:M.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,RGBA_PVRTC_2BPPV1:M.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG,RGBA_ASTC:M.COMPRESSED_RGBA_ASTC_4x4_WEBGL,RGB_ETC1:M.COMPRESSED_RGB_ETC1_WEBGL,RGB8_ETC2:M.COMPRESSED_RGB8_ETC2,RGBA8_ETC2_EAC:M.COMPRESSED_RGBA8_ETC2_EAC,RGBA_BC7:M.COMPRESSED_RGBA_BPTC_UNORM};A.componentsLength=function(i){switch(i){case A.RGB:return 3;case A.RGBA:return 4;case A.LUMINANCE_ALPHA:case A.RG:return 2;case A.ALPHA:case A.RED:case A.LUMINANCE:return 1;default:return 1}};A.validate=function(i){return i===A.DEPTH_COMPONENT||i===A.DEPTH_STENCIL||i===A.ALPHA||i===A.RED||i===A.RG||i===A.RGB||i===A.RGBA||i===A.LUMINANCE||i===A.LUMINANCE_ALPHA||i===A.RGB_DXT1||i===A.RGBA_DXT1||i===A.RGBA_DXT3||i===A.RGBA_DXT5||i===A.RGB_PVRTC_4BPPV1||i===A.RGB_PVRTC_2BPPV1||i===A.RGBA_PVRTC_4BPPV1||i===A.RGBA_PVRTC_2BPPV1||i===A.RGBA_ASTC||i===A.RGB_ETC1||i===A.RGB8_ETC2||i===A.RGBA8_ETC2_EAC||i===A.RGBA_BC7};A.isColorFormat=function(i){return i===A.ALPHA||i===A.RGB||i===A.RGBA||i===A.LUMINANCE||i===A.LUMINANCE_ALPHA};A.isDepthFormat=function(i){return i===A.DEPTH_COMPONENT||i===A.DEPTH_STENCIL};A.isCompressedFormat=function(i){return i===A.RGB_DXT1||i===A.RGBA_DXT1||i===A.RGBA_DXT3||i===A.RGBA_DXT5||i===A.RGB_PVRTC_4BPPV1||i===A.RGB_PVRTC_2BPPV1||i===A.RGBA_PVRTC_4BPPV1||i===A.RGBA_PVRTC_2BPPV1||i===A.RGBA_ASTC||i===A.RGB_ETC1||i===A.RGB8_ETC2||i===A.RGBA8_ETC2_EAC||i===A.RGBA_BC7};A.isDXTFormat=function(i){return i===A.RGB_DXT1||i===A.RGBA_DXT1||i===A.RGBA_DXT3||i===A.RGBA_DXT5};A.isPVRTCFormat=function(i){return i===A.RGB_PVRTC_4BPPV1||i===A.RGB_PVRTC_2BPPV1||i===A.RGBA_PVRTC_4BPPV1||i===A.RGBA_PVRTC_2BPPV1};A.isASTCFormat=function(i){return i===A.RGBA_ASTC};A.isETC1Format=function(i){return i===A.RGB_ETC1};A.isETC2Format=function(i){return i===A.RGB8_ETC2||i===A.RGBA8_ETC2_EAC};A.isBC7Format=function(i){return i===A.RGBA_BC7};A.compressedTextureSizeInBytes=function(i,f,r){switch(i){case A.RGB_DXT1:case A.RGBA_DXT1:case A.RGB_ETC1:case A.RGB8_ETC2:return Math.floor((f+3)/4)*Math.floor((r+3)/4)*8;case A.RGBA_DXT3:case A.RGBA_DXT5:case A.RGBA_ASTC:case A.RGBA8_ETC2_EAC:return Math.floor((f+3)/4)*Math.floor((r+3)/4)*16;case A.RGB_PVRTC_4BPPV1:case A.RGBA_PVRTC_4BPPV1:return Math.floor((Math.max(f,8)*Math.max(r,8)*4+7)/8);case A.RGB_PVRTC_2BPPV1:case A.RGBA_PVRTC_2BPPV1:return Math.floor((Math.max(f,16)*Math.max(r,8)*2+7)/8);case A.RGBA_BC7:return Math.ceil(f/4)*Math.ceil(r/4)*16;default:return 0}};A.textureSizeInBytes=function(i,f,r,B){let l=A.componentsLength(i);return b.isPacked(f)&&(l=1),l*b.sizeInBytes(f)*r*B};A.alignmentInBytes=function(i,f,r){let B=A.textureSizeInBytes(i,f,r,1)%4;return B===0?4:B===2?2:1};A.createTypedArray=function(i,f,r,B){let l,p=b.sizeInBytes(f);p===Uint8Array.BYTES_PER_ELEMENT?l=Uint8Array:p===Uint16Array.BYTES_PER_ELEMENT?l=Uint16Array:p===Float32Array.BYTES_PER_ELEMENT&&f===b.FLOAT?l=Float32Array:l=Uint32Array;let C=A.componentsLength(i)*r*B;return new l(C)};A.flipY=function(i,f,r,B,l){if(l===1)return i;let p=A.createTypedArray(f,r,B,l),C=A.componentsLength(f),U=B*C;for(let y=0;y<l;++y){let m=y*B*C,V=(l-y-1)*B*C;for(let d=0;d<U;++d)p[V+d]=i[m+d]}return p};A.toInternalFormat=function(i,f,r){if(!r.webgl2)return i;if(i===A.DEPTH_STENCIL)return M.DEPTH24_STENCIL8;if(i===A.DEPTH_COMPONENT){if(f===b.UNSIGNED_SHORT)return M.DEPTH_COMPONENT16;if(f===b.UNSIGNED_INT)return M.DEPTH_COMPONENT24}if(f===b.FLOAT)switch(i){case A.RGBA:return M.RGBA32F;case A.RGB:return M.RGB32F;case A.RG:return M.RG32F;case A.RED:return M.R32F}if(f===b.HALF_FLOAT)switch(i){case A.RGBA:return M.RGBA16F;case A.RGB:return M.RGB16F;case A.RG:return M.RG16F;case A.RED:return M.R16F}return i};var E=Object.freeze(A);var Rr={VK_FORMAT_UNDEFINED:0,VK_FORMAT_R4G4_UNORM_PACK8:1,VK_FORMAT_R4G4B4A4_UNORM_PACK16:2,VK_FORMAT_B4G4R4A4_UNORM_PACK16:3,VK_FORMAT_R5G6B5_UNORM_PACK16:4,VK_FORMAT_B5G6R5_UNORM_PACK16:5,VK_FORMAT_R5G5B5A1_UNORM_PACK16:6,VK_FORMAT_B5G5R5A1_UNORM_PACK16:7,VK_FORMAT_A1R5G5B5_UNORM_PACK16:8,VK_FORMAT_R8_UNORM:9,VK_FORMAT_R8_SNORM:10,VK_FORMAT_R8_USCALED:11,VK_FORMAT_R8_SSCALED:12,VK_FORMAT_R8_UINT:13,VK_FORMAT_R8_SINT:14,VK_FORMAT_R8_SRGB:15,VK_FORMAT_R8G8_UNORM:16,VK_FORMAT_R8G8_SNORM:17,VK_FORMAT_R8G8_USCALED:18,VK_FORMAT_R8G8_SSCALED:19,VK_FORMAT_R8G8_UINT:20,VK_FORMAT_R8G8_SINT:21,VK_FORMAT_R8G8_SRGB:22,VK_FORMAT_R8G8B8_UNORM:23,VK_FORMAT_R8G8B8_SNORM:24,VK_FORMAT_R8G8B8_USCALED:25,VK_FORMAT_R8G8B8_SSCALED:26,VK_FORMAT_R8G8B8_UINT:27,VK_FORMAT_R8G8B8_SINT:28,VK_FORMAT_R8G8B8_SRGB:29,VK_FORMAT_B8G8R8_UNORM:30,VK_FORMAT_B8G8R8_SNORM:31,VK_FORMAT_B8G8R8_USCALED:32,VK_FORMAT_B8G8R8_SSCALED:33,VK_FORMAT_B8G8R8_UINT:34,VK_FORMAT_B8G8R8_SINT:35,VK_FORMAT_B8G8R8_SRGB:36,VK_FORMAT_R8G8B8A8_UNORM:37,VK_FORMAT_R8G8B8A8_SNORM:38,VK_FORMAT_R8G8B8A8_USCALED:39,VK_FORMAT_R8G8B8A8_SSCALED:40,VK_FORMAT_R8G8B8A8_UINT:41,VK_FORMAT_R8G8B8A8_SINT:42,VK_FORMAT_R8G8B8A8_SRGB:43,VK_FORMAT_B8G8R8A8_UNORM:44,VK_FORMAT_B8G8R8A8_SNORM:45,VK_FORMAT_B8G8R8A8_USCALED:46,VK_FORMAT_B8G8R8A8_SSCALED:47,VK_FORMAT_B8G8R8A8_UINT:48,VK_FORMAT_B8G8R8A8_SINT:49,VK_FORMAT_B8G8R8A8_SRGB:50,VK_FORMAT_A8B8G8R8_UNORM_PACK32:51,VK_FORMAT_A8B8G8R8_SNORM_PACK32:52,VK_FORMAT_A8B8G8R8_USCALED_PACK32:53,VK_FORMAT_A8B8G8R8_SSCALED_PACK32:54,VK_FORMAT_A8B8G8R8_UINT_PACK32:55,VK_FORMAT_A8B8G8R8_SINT_PACK32:56,VK_FORMAT_A8B8G8R8_SRGB_PACK32:57,VK_FORMAT_A2R10G10B10_UNORM_PACK32:58,VK_FORMAT_A2R10G10B10_SNORM_PACK32:59,VK_FORMAT_A2R10G10B10_USCALED_PACK32:60,VK_FORMAT_A2R10G10B10_SSCALED_PACK32:61,VK_FORMAT_A2R10G10B10_UINT_PACK32:62,VK_FORMAT_A2R10G10B10_SINT_PACK32:63,VK_FORMAT_A2B10G10R10_UNORM_PACK32:64,VK_FORMAT_A2B10G10R10_SNORM_PACK32:65,VK_FORMAT_A2B10G10R10_USCALED_PACK32:66,VK_FORMAT_A2B10G10R10_SSCALED_PACK32:67,VK_FORMAT_A2B10G10R10_UINT_PACK32:68,VK_FORMAT_A2B10G10R10_SINT_PACK32:69,VK_FORMAT_R16_UNORM:70,VK_FORMAT_R16_SNORM:71,VK_FORMAT_R16_USCALED:72,VK_FORMAT_R16_SSCALED:73,VK_FORMAT_R16_UINT:74,VK_FORMAT_R16_SINT:75,VK_FORMAT_R16_SFLOAT:76,VK_FORMAT_R16G16_UNORM:77,VK_FORMAT_R16G16_SNORM:78,VK_FORMAT_R16G16_USCALED:79,VK_FORMAT_R16G16_SSCALED:80,VK_FORMAT_R16G16_UINT:81,VK_FORMAT_R16G16_SINT:82,VK_FORMAT_R16G16_SFLOAT:83,VK_FORMAT_R16G16B16_UNORM:84,VK_FORMAT_R16G16B16_SNORM:85,VK_FORMAT_R16G16B16_USCALED:86,VK_FORMAT_R16G16B16_SSCALED:87,VK_FORMAT_R16G16B16_UINT:88,VK_FORMAT_R16G16B16_SINT:89,VK_FORMAT_R16G16B16_SFLOAT:90,VK_FORMAT_R16G16B16A16_UNORM:91,VK_FORMAT_R16G16B16A16_SNORM:92,VK_FORMAT_R16G16B16A16_USCALED:93,VK_FORMAT_R16G16B16A16_SSCALED:94,VK_FORMAT_R16G16B16A16_UINT:95,VK_FORMAT_R16G16B16A16_SINT:96,VK_FORMAT_R16G16B16A16_SFLOAT:97,VK_FORMAT_R32_UINT:98,VK_FORMAT_R32_SINT:99,VK_FORMAT_R32_SFLOAT:100,VK_FORMAT_R32G32_UINT:101,VK_FORMAT_R32G32_SINT:102,VK_FORMAT_R32G32_SFLOAT:103,VK_FORMAT_R32G32B32_UINT:104,VK_FORMAT_R32G32B32_SINT:105,VK_FORMAT_R32G32B32_SFLOAT:106,VK_FORMAT_R32G32B32A32_UINT:107,VK_FORMAT_R32G32B32A32_SINT:108,VK_FORMAT_R32G32B32A32_SFLOAT:109,VK_FORMAT_R64_UINT:110,VK_FORMAT_R64_SINT:111,VK_FORMAT_R64_SFLOAT:112,VK_FORMAT_R64G64_UINT:113,VK_FORMAT_R64G64_SINT:114,VK_FORMAT_R64G64_SFLOAT:115,VK_FORMAT_R64G64B64_UINT:116,VK_FORMAT_R64G64B64_SINT:117,VK_FORMAT_R64G64B64_SFLOAT:118,VK_FORMAT_R64G64B64A64_UINT:119,VK_FORMAT_R64G64B64A64_SINT:120,VK_FORMAT_R64G64B64A64_SFLOAT:121,VK_FORMAT_B10G11R11_UFLOAT_PACK32:122,VK_FORMAT_E5B9G9R9_UFLOAT_PACK32:123,VK_FORMAT_D16_UNORM:124,VK_FORMAT_X8_D24_UNORM_PACK32:125,VK_FORMAT_D32_SFLOAT:126,VK_FORMAT_S8_UINT:127,VK_FORMAT_D16_UNORM_S8_UINT:128,VK_FORMAT_D24_UNORM_S8_UINT:129,VK_FORMAT_D32_SFLOAT_S8_UINT:130,VK_FORMAT_BC1_RGB_UNORM_BLOCK:131,VK_FORMAT_BC1_RGB_SRGB_BLOCK:132,VK_FORMAT_BC1_RGBA_UNORM_BLOCK:133,VK_FORMAT_BC1_RGBA_SRGB_BLOCK:134,VK_FORMAT_BC2_UNORM_BLOCK:135,VK_FORMAT_BC2_SRGB_BLOCK:136,VK_FORMAT_BC3_UNORM_BLOCK:137,VK_FORMAT_BC3_SRGB_BLOCK:138,VK_FORMAT_BC4_UNORM_BLOCK:139,VK_FORMAT_BC4_SNORM_BLOCK:140,VK_FORMAT_BC5_UNORM_BLOCK:141,VK_FORMAT_BC5_SNORM_BLOCK:142,VK_FORMAT_BC6H_UFLOAT_BLOCK:143,VK_FORMAT_BC6H_SFLOAT_BLOCK:144,VK_FORMAT_BC7_UNORM_BLOCK:145,VK_FORMAT_BC7_SRGB_BLOCK:146,VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK:147,VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK:148,VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK:149,VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK:150,VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK:151,VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK:152,VK_FORMAT_EAC_R11_UNORM_BLOCK:153,VK_FORMAT_EAC_R11_SNORM_BLOCK:154,VK_FORMAT_EAC_R11G11_UNORM_BLOCK:155,VK_FORMAT_EAC_R11G11_SNORM_BLOCK:156,VK_FORMAT_ASTC_4x4_UNORM_BLOCK:157,VK_FORMAT_ASTC_4x4_SRGB_BLOCK:158,VK_FORMAT_ASTC_5x4_UNORM_BLOCK:159,VK_FORMAT_ASTC_5x4_SRGB_BLOCK:160,VK_FORMAT_ASTC_5x5_UNORM_BLOCK:161,VK_FORMAT_ASTC_5x5_SRGB_BLOCK:162,VK_FORMAT_ASTC_6x5_UNORM_BLOCK:163,VK_FORMAT_ASTC_6x5_SRGB_BLOCK:164,VK_FORMAT_ASTC_6x6_UNORM_BLOCK:165,VK_FORMAT_ASTC_6x6_SRGB_BLOCK:166,VK_FORMAT_ASTC_8x5_UNORM_BLOCK:167,VK_FORMAT_ASTC_8x5_SRGB_BLOCK:168,VK_FORMAT_ASTC_8x6_UNORM_BLOCK:169,VK_FORMAT_ASTC_8x6_SRGB_BLOCK:170,VK_FORMAT_ASTC_8x8_UNORM_BLOCK:171,VK_FORMAT_ASTC_8x8_SRGB_BLOCK:172,VK_FORMAT_ASTC_10x5_UNORM_BLOCK:173,VK_FORMAT_ASTC_10x5_SRGB_BLOCK:174,VK_FORMAT_ASTC_10x6_UNORM_BLOCK:175,VK_FORMAT_ASTC_10x6_SRGB_BLOCK:176,VK_FORMAT_ASTC_10x8_UNORM_BLOCK:177,VK_FORMAT_ASTC_10x8_SRGB_BLOCK:178,VK_FORMAT_ASTC_10x10_UNORM_BLOCK:179,VK_FORMAT_ASTC_10x10_SRGB_BLOCK:180,VK_FORMAT_ASTC_12x10_UNORM_BLOCK:181,VK_FORMAT_ASTC_12x10_SRGB_BLOCK:182,VK_FORMAT_ASTC_12x12_UNORM_BLOCK:183,VK_FORMAT_ASTC_12x12_SRGB_BLOCK:184,VK_FORMAT_G8B8G8R8_422_UNORM:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM:1000156006,VK_FORMAT_R10X6_UNORM_PACK16:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16:1000156016,VK_FORMAT_R12X4_UNORM_PACK16:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM:1000156033,VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG:1000054e3,VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG:1000054001,VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG:1000054002,VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG:1000054003,VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG:1000054004,VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG:1000054005,VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG:1000054006,VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG:1000054007,VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT:1000066e3,VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT:1000066001,VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT:1000066002,VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT:1000066003,VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT:1000066004,VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT:1000066005,VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT:1000066006,VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT:1000066007,VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT:1000066008,VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT:1000066009,VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT:1000066010,VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT:1000066011,VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT:1000066012,VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT:1000066013,VK_FORMAT_G8B8G8R8_422_UNORM_KHR:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM_KHR:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM_KHR:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM_KHR:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM_KHR:1000156006,VK_FORMAT_R10X6_UNORM_PACK16_KHR:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16_KHR:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR:1000156016,VK_FORMAT_R12X4_UNORM_PACK16_KHR:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16_KHR:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM_KHR:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM_KHR:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM_KHR:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM_KHR:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM_KHR:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM_KHR:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM_KHR:1000156033},Le=Object.freeze(Rr);var Vt=class{constructor(){this.vkFormat=0,this.typeSize=1,this.pixelWidth=0,this.pixelHeight=0,this.pixelDepth=0,this.layerCount=0,this.faceCount=1,this.supercompressionScheme=0,this.levels=[],this.dataFormatDescriptor=[{vendorId:0,descriptorType:0,descriptorBlockSize:0,versionNumber:2,colorModel:0,colorPrimaries:1,transferFunction:2,flags:0,texelBlockDimension:[0,0,0,0],bytesPlane:[0,0,0,0,0,0,0,0],samples:[]}],this.keyValue={},this.globalData=null}},Oe=class{constructor(f,r,B,l){this._dataView=void 0,this._littleEndian=void 0,this._offset=void 0,this._dataView=new DataView(f.buffer,f.byteOffset+r,B),this._littleEndian=l,this._offset=0}_nextUint8(){let f=this._dataView.getUint8(this._offset);return this._offset+=1,f}_nextUint16(){let f=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,f}_nextUint32(){let f=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,f}_nextUint64(){let f=this._dataView.getUint32(this._offset,this._littleEndian),r=this._dataView.getUint32(this._offset+4,this._littleEndian),B=f+2**32*r;return this._offset+=8,B}_nextInt32(){let f=this._dataView.getInt32(this._offset,this._littleEndian);return this._offset+=4,f}_nextUint8Array(f){let r=new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+this._offset,f);return this._offset+=f,r}_skip(f){return this._offset+=f,this}_scan(f,r=0){let B=this._offset,l=0;for(;this._dataView.getUint8(this._offset)!==r&&l<f;)l++,this._offset++;return l<f&&this._offset++,new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+B,l)}};var dr=new Uint8Array([0]),w=[171,75,84,88,32,50,48,187,13,10,26,10];function on(i){return typeof TextDecoder<"u"?new TextDecoder().decode(i):Buffer.from(i).toString("utf8")}function sn(i){let f=new Uint8Array(i.buffer,i.byteOffset,w.length);if(f[0]!==w[0]||f[1]!==w[1]||f[2]!==w[2]||f[3]!==w[3]||f[4]!==w[4]||f[5]!==w[5]||f[6]!==w[6]||f[7]!==w[7]||f[8]!==w[8]||f[9]!==w[9]||f[10]!==w[10]||f[11]!==w[11])throw new Error("Missing KTX 2.0 identifier.");let r=new Vt,B=17*Uint32Array.BYTES_PER_ELEMENT,l=new Oe(i,w.length,B,!0);r.vkFormat=l._nextUint32(),r.typeSize=l._nextUint32(),r.pixelWidth=l._nextUint32(),r.pixelHeight=l._nextUint32(),r.pixelDepth=l._nextUint32(),r.layerCount=l._nextUint32(),r.faceCount=l._nextUint32();let p=l._nextUint32();r.supercompressionScheme=l._nextUint32();let C=l._nextUint32(),U=l._nextUint32(),y=l._nextUint32(),m=l._nextUint32(),V=l._nextUint64(),d=l._nextUint64(),P=p*3*8,Q=new Oe(i,w.length+B,P,!0);for(let L=0;L<p;L++)r.levels.push({levelData:new Uint8Array(i.buffer,i.byteOffset+Q._nextUint64(),Q._nextUint64()),uncompressedByteLength:Q._nextUint64()});let u=new Oe(i,C,U,!0),X={vendorId:u._skip(4)._nextUint16(),descriptorType:u._nextUint16(),versionNumber:u._nextUint16(),descriptorBlockSize:u._nextUint16(),colorModel:u._nextUint8(),colorPrimaries:u._nextUint8(),transferFunction:u._nextUint8(),flags:u._nextUint8(),texelBlockDimension:[u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8()],bytesPlane:[u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8()],samples:[]},W=(X.descriptorBlockSize/4-6)/4;for(let L=0;L<W;L++){let j={bitOffset:u._nextUint16(),bitLength:u._nextUint8(),channelType:u._nextUint8(),samplePosition:[u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8()],sampleLower:-1/0,sampleUpper:1/0};j.channelType&64?(j.sampleLower=u._nextInt32(),j.sampleUpper=u._nextInt32()):(j.sampleLower=u._nextUint32(),j.sampleUpper=u._nextUint32()),X.samples[L]=j}r.dataFormatDescriptor.length=0,r.dataFormatDescriptor.push(X);let J=new Oe(i,y,m,!0);for(;J._offset<m;){let L=J._nextUint32(),j=J._scan(L),Ae=on(j);if(r.keyValue[Ae]=J._nextUint8Array(L-j.byteLength-1),Ae.match(/^ktx/i)){let xe=on(r.keyValue[Ae]);r.keyValue[Ae]=xe.substring(0,xe.lastIndexOf("\0"))}let at=L%4?4-L%4:0;J._skip(at)}if(d<=0)return r;let g=new Oe(i,V,d,!0),Fe=g._nextUint16(),ot=g._nextUint16(),ee=g._nextUint32(),De=g._nextUint32(),Ie=g._nextUint32(),ae=g._nextUint32(),st=[];for(let L=0;L<p;L++)st.push({imageFlags:g._nextUint32(),rgbSliceByteOffset:g._nextUint32(),rgbSliceByteLength:g._nextUint32(),alphaSliceByteOffset:g._nextUint32(),alphaSliceByteLength:g._nextUint32()});let ce=V+g._offset,de=ce+ee,be=de+De,Se=be+Ie,we=new Uint8Array(i.buffer,i.byteOffset+ce,ee),He=new Uint8Array(i.buffer,i.byteOffset+de,De),Xe=new Uint8Array(i.buffer,i.byteOffset+be,Ie),Rt=new Uint8Array(i.buffer,i.byteOffset+Se,ae);return r.globalData={endpointCount:Fe,selectorCount:ot,imageDescs:st,endpointsData:we,selectorsData:He,tablesData:Xe,extendedData:Rt},r}var an=sr(Rn(),1),cn=["positiveX","negativeX","positiveY","negativeY","positiveZ","negativeZ"],An=163,fn=166,me;function ar(i,f){nn.typeOf.object("transcoderModule",me);let r=i.ktx2Buffer,B=i.supportedTargetFormats,l;try{l=sn(r)}catch{throw new ie("Invalid KTX2 file.")}if(l.layerCount!==0)throw new ie("KTX2 texture arrays are not supported.");if(l.pixelDepth!==0)throw new ie("KTX2 3D textures are unsupported.");let p=l.dataFormatDescriptor[0],C=new Array(l.levelCount);return l.vkFormat===0&&(p.colorModel===An||p.colorModel===fn)?Ar(r,l,B,me,f,C):(f.push(r.buffer),cr(l,C)),C}function cr(i,f){let r=i.vkFormat===Le.VK_FORMAT_R8G8B8_SRGB?E.RGB:E.RGBA,B;i.vkFormat===Le.VK_FORMAT_R8G8B8A8_UNORM?B=b.UNSIGNED_BYTE:i.vkFormat===Le.VK_FORMAT_R16G16B16A16_SFLOAT?B=b.HALF_FLOAT:i.vkFormat===Le.VK_FORMAT_R32G32B32A32_SFLOAT&&(B=b.FLOAT);for(let l=0;l<i.levels.length;++l){let p={};f[l]=p;let C=i.levels[l].levelData,U=i.pixelWidth>>l,y=i.pixelHeight>>l,m=U*y*E.componentsLength(r);for(let V=0;V<i.faceCount;++V){let d=C.byteOffset+m*i.typeSize*V,P;!ge(B)||b.sizeInBytes(B)===1?P=new Uint8Array(C.buffer,d,m):b.sizeInBytes(B)===2?P=new Uint16Array(C.buffer,d,m):P=new Float32Array(C.buffer,d,m),p[cn[V]]={internalFormat:r,datatype:B,width:U,height:y,levelBuffer:P}}}}function Ar(i,f,r,B,l,p){let C=new B.KTX2File(i),U=C.getWidth(),y=C.getHeight(),m=C.getLevels(),V=C.getHasAlpha();if(!(U>0)||!(y>0)||!(m>0))throw C.close(),C.delete(),new ie("Invalid KTX2 file");let d,P,Q=f.dataFormatDescriptor[0],u=B.transcoder_texture_format;if(Q.colorModel===An)if(r.etc)d=V?E.RGBA8_ETC2_EAC:E.RGB8_ETC2,P=V?u.cTFETC2_RGBA:u.cTFETC1_RGB;else if(r.etc1&&!V)d=E.RGB_ETC1,P=u.cTFETC1_RGB;else if(r.s3tc)d=V?E.RGBA_DXT5:E.RGB_DXT1,P=V?u.cTFBC3_RGBA:u.cTFBC1_RGB;else if(r.pvrtc)d=V?E.RGBA_PVRTC_4BPPV1:E.RGB_PVRTC_4BPPV1,P=V?u.cTFPVRTC1_4_RGBA:u.cTFPVRTC1_4_RGB;else if(r.astc)d=E.RGBA_ASTC,P=u.cTFASTC_4x4_RGBA;else if(r.bc7)d=E.RGBA_BC7,P=u.cTFBC7_RGBA;else throw new ie("No transcoding format target available for ETC1S compressed ktx2.");else if(Q.colorModel===fn)if(r.astc)d=E.RGBA_ASTC,P=u.cTFASTC_4x4_RGBA;else if(r.bc7)d=E.RGBA_BC7,P=u.cTFBC7_RGBA;else if(r.s3tc)d=V?E.RGBA_DXT5:E.RGB_DXT1,P=V?u.cTFBC3_RGBA:u.cTFBC1_RGB;else if(r.etc)d=V?E.RGBA8_ETC2_EAC:E.RGB8_ETC2,P=V?u.cTFETC2_RGBA:u.cTFETC1_RGB;else if(r.etc1&&!V)d=E.RGB_ETC1,P=u.cTFETC1_RGB;else if(r.pvrtc)d=V?E.RGBA_PVRTC_4BPPV1:E.RGB_PVRTC_4BPPV1,P=V?u.cTFPVRTC1_4_RGBA:u.cTFPVRTC1_4_RGB;else throw new ie("No transcoding format target available for UASTC compressed ktx2.");if(!C.startTranscoding())throw C.close(),C.delete(),new ie("startTranscoding() failed");for(let X=0;X<f.levels.length;++X){let oe={};p[X]=oe,U=f.pixelWidth>>X,y=f.pixelHeight>>X;let le=C.getImageTranscodedSizeInBytes(X,0,0,P.value),W=new Uint8Array(le),J=C.transcodeImage(W,X,0,0,P.value,0,-1,-1);if(!ge(J))throw new ie("transcodeImage() failed.");l.push(W.buffer),oe[cn[0]]={internalFormat:d,width:U,height:y,levelBuffer:W}}return C.close(),C.delete(),p}async function fr(i,f){let r=i.webAssemblyConfig,B=_n(an.default,self.BASIS);return ge(r.wasmBinaryFile)?me=await B(r):me=await B(),me.initializeBasis(),!0}function Tr(i,f){let r=i.webAssemblyConfig;return ge(r)?fr(i,f):ar(i,f)}var yr=rn(Tr);export{yr as default}; | ||
`,new Function("requireRegisteredType","Module","__emval_register",n)(tt,r,_e)}var Zt={};function xn(e,t,_,n){e=he(e);var s=Zt[t];return s||(s=Xn(t),Zt[t]=s),s(e,_,n)}function $n(e){return _e(_t(e))}function kn(e){var t=$[e].value;je(t),Ct(e)}function Wn(){Ke()}function jn(e,t,_){D.copyWithin(e,t,t+_)}function Yn(e){try{return ce.grow(e-ct.byteLength+65535>>>16),Ut(ce.buffer),1}catch{}}function zn(e){var t=D.length;e=e>>>0;var _=2147483648;if(e>_)return!1;for(var n=1;n<=4;n*=2){var s=t*(1+.2/n);s=Math.min(s,e+100663296);var a=Math.min(_,l_(Math.max(e,s),65536)),c=Yn(a);if(c)return!0}return!1}var nt={mappings:{},buffers:[null,[],[]],printChar:function(e,t){var _=nt.buffers[e];t===0||t===10?((e===1?st:ee)(He(_,0)),_.length=0):_.push(t)},varargs:void 0,get:function(){nt.varargs+=4;var e=H[nt.varargs-4>>2];return e},getStr:function(e){var t=Xe(e);return t},get64:function(e,t){return e}};function qn(e){return 0}function Zn(e,t,_,n,s){}function Qn(e,t,_,n){for(var s=0,a=0;a<_;a++){for(var c=H[t+a*8>>2],o=H[t+(a*8+4)>>2],R=0;R<o;R++)nt.printChar(e,D[c+R]);s+=o}return H[n>>2]=s,0}function Jn(e){Ie(e|0)}It=r.InternalError=ft(Error,"InternalError"),L_(),Be=r.BindingError=ft(Error,"BindingError"),$_(),sn(),tn(),Wt=r.UnboundTypeError=ft(Error,"UnboundTypeError"),ln();var er={t:g_,I:m_,x:cn,w:An,d:fn,k:Tn,H:Kn,n:Bn,a:Cn,A:dn,i:Sn,j:Vn,h:Nn,B:Pn,v:pn,u:En,c:Un,J:vn,m:hn,s:gn,b:Ct,y:Ln,p:In,r:bn,e:wn,g:Hn,q:xn,f:$n,l:kn,o:Wn,E:jn,F:zn,G:qn,C:Zn,z:Qn,D:Jn},Or=v_(),tr=r.___wasm_call_ctors=function(){return(tr=r.___wasm_call_ctors=r.asm.L).apply(null,arguments)},dt=r._malloc=function(){return(dt=r._malloc=r.asm.M).apply(null,arguments)},ne=r._free=function(){return(ne=r._free=r.asm.N).apply(null,arguments)},Qt=r.___getTypeName=function(){return(Qt=r.___getTypeName=r.asm.P).apply(null,arguments)},_r=r.___embind_register_native_and_builtin_types=function(){return(_r=r.___embind_register_native_and_builtin_types=r.asm.Q).apply(null,arguments)},nr=r.dynCall_jiji=function(){return(nr=r.dynCall_jiji=r.asm.R).apply(null,arguments)},rt;function rr(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}Ne=function e(){rt||St(),rt||(Ne=e)};function St(e){if(e=e||h,Te>0||(B_(),Te>0))return;function t(){rt||(rt=!0,r.calledRun=!0,!de&&(C_(),F_(),B(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),d_()))}r.setStatus?(r.setStatus("Running..."),setTimeout(function(){setTimeout(function(){r.setStatus("")},1),t()},1)):t()}if(r.run=St,r.preInit)for(typeof r.preInit=="function"&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();return St(),f.ready}}();typeof it=="object"&&typeof Pt=="object"?Pt.exports=Nt:typeof define=="function"&&define.amd?define([],function(){return Nt}):typeof it=="object"&&(it.BASIS=Nt)});var F={UNSIGNED_BYTE:K.UNSIGNED_BYTE,UNSIGNED_SHORT:K.UNSIGNED_SHORT,UNSIGNED_INT:K.UNSIGNED_INT,FLOAT:K.FLOAT,HALF_FLOAT:K.HALF_FLOAT_OES,UNSIGNED_INT_24_8:K.UNSIGNED_INT_24_8,UNSIGNED_SHORT_4_4_4_4:K.UNSIGNED_SHORT_4_4_4_4,UNSIGNED_SHORT_5_5_5_1:K.UNSIGNED_SHORT_5_5_5_1,UNSIGNED_SHORT_5_6_5:K.UNSIGNED_SHORT_5_6_5};F.toWebGLConstant=function(i,f){switch(i){case F.UNSIGNED_BYTE:return K.UNSIGNED_BYTE;case F.UNSIGNED_SHORT:return K.UNSIGNED_SHORT;case F.UNSIGNED_INT:return K.UNSIGNED_INT;case F.FLOAT:return K.FLOAT;case F.HALF_FLOAT:return f.webgl2?K.HALF_FLOAT:K.HALF_FLOAT_OES;case F.UNSIGNED_INT_24_8:return K.UNSIGNED_INT_24_8;case F.UNSIGNED_SHORT_4_4_4_4:return K.UNSIGNED_SHORT_4_4_4_4;case F.UNSIGNED_SHORT_5_5_5_1:return K.UNSIGNED_SHORT_5_5_5_1;case F.UNSIGNED_SHORT_5_6_5:return F.UNSIGNED_SHORT_5_6_5}};F.isPacked=function(i){return i===F.UNSIGNED_INT_24_8||i===F.UNSIGNED_SHORT_4_4_4_4||i===F.UNSIGNED_SHORT_5_5_5_1||i===F.UNSIGNED_SHORT_5_6_5};F.sizeInBytes=function(i){switch(i){case F.UNSIGNED_BYTE:return 1;case F.UNSIGNED_SHORT:case F.UNSIGNED_SHORT_4_4_4_4:case F.UNSIGNED_SHORT_5_5_5_1:case F.UNSIGNED_SHORT_5_6_5:case F.HALF_FLOAT:return 2;case F.UNSIGNED_INT:case F.FLOAT:case F.UNSIGNED_INT_24_8:return 4}};F.validate=function(i){return i===F.UNSIGNED_BYTE||i===F.UNSIGNED_SHORT||i===F.UNSIGNED_INT||i===F.FLOAT||i===F.HALF_FLOAT||i===F.UNSIGNED_INT_24_8||i===F.UNSIGNED_SHORT_4_4_4_4||i===F.UNSIGNED_SHORT_5_5_5_1||i===F.UNSIGNED_SHORT_5_6_5};var b=Object.freeze(F);var A={DEPTH_COMPONENT:K.DEPTH_COMPONENT,DEPTH_STENCIL:K.DEPTH_STENCIL,ALPHA:K.ALPHA,RED:K.RED,RG:K.RG,RGB:K.RGB,RGBA:K.RGBA,LUMINANCE:K.LUMINANCE,LUMINANCE_ALPHA:K.LUMINANCE_ALPHA,RGB_DXT1:K.COMPRESSED_RGB_S3TC_DXT1_EXT,RGBA_DXT1:K.COMPRESSED_RGBA_S3TC_DXT1_EXT,RGBA_DXT3:K.COMPRESSED_RGBA_S3TC_DXT3_EXT,RGBA_DXT5:K.COMPRESSED_RGBA_S3TC_DXT5_EXT,RGB_PVRTC_4BPPV1:K.COMPRESSED_RGB_PVRTC_4BPPV1_IMG,RGB_PVRTC_2BPPV1:K.COMPRESSED_RGB_PVRTC_2BPPV1_IMG,RGBA_PVRTC_4BPPV1:K.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,RGBA_PVRTC_2BPPV1:K.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG,RGBA_ASTC:K.COMPRESSED_RGBA_ASTC_4x4_WEBGL,RGB_ETC1:K.COMPRESSED_RGB_ETC1_WEBGL,RGB8_ETC2:K.COMPRESSED_RGB8_ETC2,RGBA8_ETC2_EAC:K.COMPRESSED_RGBA8_ETC2_EAC,RGBA_BC7:K.COMPRESSED_RGBA_BPTC_UNORM};A.componentsLength=function(i){switch(i){case A.RGB:return 3;case A.RGBA:return 4;case A.LUMINANCE_ALPHA:case A.RG:return 2;case A.ALPHA:case A.RED:case A.LUMINANCE:return 1;default:return 1}};A.validate=function(i){return i===A.DEPTH_COMPONENT||i===A.DEPTH_STENCIL||i===A.ALPHA||i===A.RED||i===A.RG||i===A.RGB||i===A.RGBA||i===A.LUMINANCE||i===A.LUMINANCE_ALPHA||i===A.RGB_DXT1||i===A.RGBA_DXT1||i===A.RGBA_DXT3||i===A.RGBA_DXT5||i===A.RGB_PVRTC_4BPPV1||i===A.RGB_PVRTC_2BPPV1||i===A.RGBA_PVRTC_4BPPV1||i===A.RGBA_PVRTC_2BPPV1||i===A.RGBA_ASTC||i===A.RGB_ETC1||i===A.RGB8_ETC2||i===A.RGBA8_ETC2_EAC||i===A.RGBA_BC7};A.isColorFormat=function(i){return i===A.ALPHA||i===A.RGB||i===A.RGBA||i===A.LUMINANCE||i===A.LUMINANCE_ALPHA};A.isDepthFormat=function(i){return i===A.DEPTH_COMPONENT||i===A.DEPTH_STENCIL};A.isCompressedFormat=function(i){return i===A.RGB_DXT1||i===A.RGBA_DXT1||i===A.RGBA_DXT3||i===A.RGBA_DXT5||i===A.RGB_PVRTC_4BPPV1||i===A.RGB_PVRTC_2BPPV1||i===A.RGBA_PVRTC_4BPPV1||i===A.RGBA_PVRTC_2BPPV1||i===A.RGBA_ASTC||i===A.RGB_ETC1||i===A.RGB8_ETC2||i===A.RGBA8_ETC2_EAC||i===A.RGBA_BC7};A.isDXTFormat=function(i){return i===A.RGB_DXT1||i===A.RGBA_DXT1||i===A.RGBA_DXT3||i===A.RGBA_DXT5};A.isPVRTCFormat=function(i){return i===A.RGB_PVRTC_4BPPV1||i===A.RGB_PVRTC_2BPPV1||i===A.RGBA_PVRTC_4BPPV1||i===A.RGBA_PVRTC_2BPPV1};A.isASTCFormat=function(i){return i===A.RGBA_ASTC};A.isETC1Format=function(i){return i===A.RGB_ETC1};A.isETC2Format=function(i){return i===A.RGB8_ETC2||i===A.RGBA8_ETC2_EAC};A.isBC7Format=function(i){return i===A.RGBA_BC7};A.compressedTextureSizeInBytes=function(i,f,r){switch(i){case A.RGB_DXT1:case A.RGBA_DXT1:case A.RGB_ETC1:case A.RGB8_ETC2:return Math.floor((f+3)/4)*Math.floor((r+3)/4)*8;case A.RGBA_DXT3:case A.RGBA_DXT5:case A.RGBA_ASTC:case A.RGBA8_ETC2_EAC:return Math.floor((f+3)/4)*Math.floor((r+3)/4)*16;case A.RGB_PVRTC_4BPPV1:case A.RGBA_PVRTC_4BPPV1:return Math.floor((Math.max(f,8)*Math.max(r,8)*4+7)/8);case A.RGB_PVRTC_2BPPV1:case A.RGBA_PVRTC_2BPPV1:return Math.floor((Math.max(f,16)*Math.max(r,8)*2+7)/8);case A.RGBA_BC7:return Math.ceil(f/4)*Math.ceil(r/4)*16;default:return 0}};A.textureSizeInBytes=function(i,f,r,B){let l=A.componentsLength(i);return b.isPacked(f)&&(l=1),l*b.sizeInBytes(f)*r*B};A.alignmentInBytes=function(i,f,r){let B=A.textureSizeInBytes(i,f,r,1)%4;return B===0?4:B===2?2:1};A.createTypedArray=function(i,f,r,B){let l,P=b.sizeInBytes(f);P===Uint8Array.BYTES_PER_ELEMENT?l=Uint8Array:P===Uint16Array.BYTES_PER_ELEMENT?l=Uint16Array:P===Float32Array.BYTES_PER_ELEMENT&&f===b.FLOAT?l=Float32Array:l=Uint32Array;let C=A.componentsLength(i)*r*B;return new l(C)};A.flipY=function(i,f,r,B,l){if(l===1)return i;let P=A.createTypedArray(f,r,B,l),C=A.componentsLength(f),h=B*C;for(let y=0;y<l;++y){let m=y*B*C,V=(l-y-1)*B*C;for(let d=0;d<h;++d)P[V+d]=i[m+d]}return P};A.toInternalFormat=function(i,f,r){if(!r.webgl2)return i;if(i===A.DEPTH_STENCIL)return K.DEPTH24_STENCIL8;if(i===A.DEPTH_COMPONENT){if(f===b.UNSIGNED_SHORT)return K.DEPTH_COMPONENT16;if(f===b.UNSIGNED_INT)return K.DEPTH_COMPONENT24}if(f===b.FLOAT)switch(i){case A.RGBA:return K.RGBA32F;case A.RGB:return K.RGB32F;case A.RG:return K.RG32F;case A.RED:return K.R32F}if(f===b.HALF_FLOAT)switch(i){case A.RGBA:return K.RGBA16F;case A.RGB:return K.RGB16F;case A.RG:return K.RG16F;case A.RED:return K.R16F}return i};var E=Object.freeze(A);var Rr={VK_FORMAT_UNDEFINED:0,VK_FORMAT_R4G4_UNORM_PACK8:1,VK_FORMAT_R4G4B4A4_UNORM_PACK16:2,VK_FORMAT_B4G4R4A4_UNORM_PACK16:3,VK_FORMAT_R5G6B5_UNORM_PACK16:4,VK_FORMAT_B5G6R5_UNORM_PACK16:5,VK_FORMAT_R5G5B5A1_UNORM_PACK16:6,VK_FORMAT_B5G5R5A1_UNORM_PACK16:7,VK_FORMAT_A1R5G5B5_UNORM_PACK16:8,VK_FORMAT_R8_UNORM:9,VK_FORMAT_R8_SNORM:10,VK_FORMAT_R8_USCALED:11,VK_FORMAT_R8_SSCALED:12,VK_FORMAT_R8_UINT:13,VK_FORMAT_R8_SINT:14,VK_FORMAT_R8_SRGB:15,VK_FORMAT_R8G8_UNORM:16,VK_FORMAT_R8G8_SNORM:17,VK_FORMAT_R8G8_USCALED:18,VK_FORMAT_R8G8_SSCALED:19,VK_FORMAT_R8G8_UINT:20,VK_FORMAT_R8G8_SINT:21,VK_FORMAT_R8G8_SRGB:22,VK_FORMAT_R8G8B8_UNORM:23,VK_FORMAT_R8G8B8_SNORM:24,VK_FORMAT_R8G8B8_USCALED:25,VK_FORMAT_R8G8B8_SSCALED:26,VK_FORMAT_R8G8B8_UINT:27,VK_FORMAT_R8G8B8_SINT:28,VK_FORMAT_R8G8B8_SRGB:29,VK_FORMAT_B8G8R8_UNORM:30,VK_FORMAT_B8G8R8_SNORM:31,VK_FORMAT_B8G8R8_USCALED:32,VK_FORMAT_B8G8R8_SSCALED:33,VK_FORMAT_B8G8R8_UINT:34,VK_FORMAT_B8G8R8_SINT:35,VK_FORMAT_B8G8R8_SRGB:36,VK_FORMAT_R8G8B8A8_UNORM:37,VK_FORMAT_R8G8B8A8_SNORM:38,VK_FORMAT_R8G8B8A8_USCALED:39,VK_FORMAT_R8G8B8A8_SSCALED:40,VK_FORMAT_R8G8B8A8_UINT:41,VK_FORMAT_R8G8B8A8_SINT:42,VK_FORMAT_R8G8B8A8_SRGB:43,VK_FORMAT_B8G8R8A8_UNORM:44,VK_FORMAT_B8G8R8A8_SNORM:45,VK_FORMAT_B8G8R8A8_USCALED:46,VK_FORMAT_B8G8R8A8_SSCALED:47,VK_FORMAT_B8G8R8A8_UINT:48,VK_FORMAT_B8G8R8A8_SINT:49,VK_FORMAT_B8G8R8A8_SRGB:50,VK_FORMAT_A8B8G8R8_UNORM_PACK32:51,VK_FORMAT_A8B8G8R8_SNORM_PACK32:52,VK_FORMAT_A8B8G8R8_USCALED_PACK32:53,VK_FORMAT_A8B8G8R8_SSCALED_PACK32:54,VK_FORMAT_A8B8G8R8_UINT_PACK32:55,VK_FORMAT_A8B8G8R8_SINT_PACK32:56,VK_FORMAT_A8B8G8R8_SRGB_PACK32:57,VK_FORMAT_A2R10G10B10_UNORM_PACK32:58,VK_FORMAT_A2R10G10B10_SNORM_PACK32:59,VK_FORMAT_A2R10G10B10_USCALED_PACK32:60,VK_FORMAT_A2R10G10B10_SSCALED_PACK32:61,VK_FORMAT_A2R10G10B10_UINT_PACK32:62,VK_FORMAT_A2R10G10B10_SINT_PACK32:63,VK_FORMAT_A2B10G10R10_UNORM_PACK32:64,VK_FORMAT_A2B10G10R10_SNORM_PACK32:65,VK_FORMAT_A2B10G10R10_USCALED_PACK32:66,VK_FORMAT_A2B10G10R10_SSCALED_PACK32:67,VK_FORMAT_A2B10G10R10_UINT_PACK32:68,VK_FORMAT_A2B10G10R10_SINT_PACK32:69,VK_FORMAT_R16_UNORM:70,VK_FORMAT_R16_SNORM:71,VK_FORMAT_R16_USCALED:72,VK_FORMAT_R16_SSCALED:73,VK_FORMAT_R16_UINT:74,VK_FORMAT_R16_SINT:75,VK_FORMAT_R16_SFLOAT:76,VK_FORMAT_R16G16_UNORM:77,VK_FORMAT_R16G16_SNORM:78,VK_FORMAT_R16G16_USCALED:79,VK_FORMAT_R16G16_SSCALED:80,VK_FORMAT_R16G16_UINT:81,VK_FORMAT_R16G16_SINT:82,VK_FORMAT_R16G16_SFLOAT:83,VK_FORMAT_R16G16B16_UNORM:84,VK_FORMAT_R16G16B16_SNORM:85,VK_FORMAT_R16G16B16_USCALED:86,VK_FORMAT_R16G16B16_SSCALED:87,VK_FORMAT_R16G16B16_UINT:88,VK_FORMAT_R16G16B16_SINT:89,VK_FORMAT_R16G16B16_SFLOAT:90,VK_FORMAT_R16G16B16A16_UNORM:91,VK_FORMAT_R16G16B16A16_SNORM:92,VK_FORMAT_R16G16B16A16_USCALED:93,VK_FORMAT_R16G16B16A16_SSCALED:94,VK_FORMAT_R16G16B16A16_UINT:95,VK_FORMAT_R16G16B16A16_SINT:96,VK_FORMAT_R16G16B16A16_SFLOAT:97,VK_FORMAT_R32_UINT:98,VK_FORMAT_R32_SINT:99,VK_FORMAT_R32_SFLOAT:100,VK_FORMAT_R32G32_UINT:101,VK_FORMAT_R32G32_SINT:102,VK_FORMAT_R32G32_SFLOAT:103,VK_FORMAT_R32G32B32_UINT:104,VK_FORMAT_R32G32B32_SINT:105,VK_FORMAT_R32G32B32_SFLOAT:106,VK_FORMAT_R32G32B32A32_UINT:107,VK_FORMAT_R32G32B32A32_SINT:108,VK_FORMAT_R32G32B32A32_SFLOAT:109,VK_FORMAT_R64_UINT:110,VK_FORMAT_R64_SINT:111,VK_FORMAT_R64_SFLOAT:112,VK_FORMAT_R64G64_UINT:113,VK_FORMAT_R64G64_SINT:114,VK_FORMAT_R64G64_SFLOAT:115,VK_FORMAT_R64G64B64_UINT:116,VK_FORMAT_R64G64B64_SINT:117,VK_FORMAT_R64G64B64_SFLOAT:118,VK_FORMAT_R64G64B64A64_UINT:119,VK_FORMAT_R64G64B64A64_SINT:120,VK_FORMAT_R64G64B64A64_SFLOAT:121,VK_FORMAT_B10G11R11_UFLOAT_PACK32:122,VK_FORMAT_E5B9G9R9_UFLOAT_PACK32:123,VK_FORMAT_D16_UNORM:124,VK_FORMAT_X8_D24_UNORM_PACK32:125,VK_FORMAT_D32_SFLOAT:126,VK_FORMAT_S8_UINT:127,VK_FORMAT_D16_UNORM_S8_UINT:128,VK_FORMAT_D24_UNORM_S8_UINT:129,VK_FORMAT_D32_SFLOAT_S8_UINT:130,VK_FORMAT_BC1_RGB_UNORM_BLOCK:131,VK_FORMAT_BC1_RGB_SRGB_BLOCK:132,VK_FORMAT_BC1_RGBA_UNORM_BLOCK:133,VK_FORMAT_BC1_RGBA_SRGB_BLOCK:134,VK_FORMAT_BC2_UNORM_BLOCK:135,VK_FORMAT_BC2_SRGB_BLOCK:136,VK_FORMAT_BC3_UNORM_BLOCK:137,VK_FORMAT_BC3_SRGB_BLOCK:138,VK_FORMAT_BC4_UNORM_BLOCK:139,VK_FORMAT_BC4_SNORM_BLOCK:140,VK_FORMAT_BC5_UNORM_BLOCK:141,VK_FORMAT_BC5_SNORM_BLOCK:142,VK_FORMAT_BC6H_UFLOAT_BLOCK:143,VK_FORMAT_BC6H_SFLOAT_BLOCK:144,VK_FORMAT_BC7_UNORM_BLOCK:145,VK_FORMAT_BC7_SRGB_BLOCK:146,VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK:147,VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK:148,VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK:149,VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK:150,VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK:151,VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK:152,VK_FORMAT_EAC_R11_UNORM_BLOCK:153,VK_FORMAT_EAC_R11_SNORM_BLOCK:154,VK_FORMAT_EAC_R11G11_UNORM_BLOCK:155,VK_FORMAT_EAC_R11G11_SNORM_BLOCK:156,VK_FORMAT_ASTC_4x4_UNORM_BLOCK:157,VK_FORMAT_ASTC_4x4_SRGB_BLOCK:158,VK_FORMAT_ASTC_5x4_UNORM_BLOCK:159,VK_FORMAT_ASTC_5x4_SRGB_BLOCK:160,VK_FORMAT_ASTC_5x5_UNORM_BLOCK:161,VK_FORMAT_ASTC_5x5_SRGB_BLOCK:162,VK_FORMAT_ASTC_6x5_UNORM_BLOCK:163,VK_FORMAT_ASTC_6x5_SRGB_BLOCK:164,VK_FORMAT_ASTC_6x6_UNORM_BLOCK:165,VK_FORMAT_ASTC_6x6_SRGB_BLOCK:166,VK_FORMAT_ASTC_8x5_UNORM_BLOCK:167,VK_FORMAT_ASTC_8x5_SRGB_BLOCK:168,VK_FORMAT_ASTC_8x6_UNORM_BLOCK:169,VK_FORMAT_ASTC_8x6_SRGB_BLOCK:170,VK_FORMAT_ASTC_8x8_UNORM_BLOCK:171,VK_FORMAT_ASTC_8x8_SRGB_BLOCK:172,VK_FORMAT_ASTC_10x5_UNORM_BLOCK:173,VK_FORMAT_ASTC_10x5_SRGB_BLOCK:174,VK_FORMAT_ASTC_10x6_UNORM_BLOCK:175,VK_FORMAT_ASTC_10x6_SRGB_BLOCK:176,VK_FORMAT_ASTC_10x8_UNORM_BLOCK:177,VK_FORMAT_ASTC_10x8_SRGB_BLOCK:178,VK_FORMAT_ASTC_10x10_UNORM_BLOCK:179,VK_FORMAT_ASTC_10x10_SRGB_BLOCK:180,VK_FORMAT_ASTC_12x10_UNORM_BLOCK:181,VK_FORMAT_ASTC_12x10_SRGB_BLOCK:182,VK_FORMAT_ASTC_12x12_UNORM_BLOCK:183,VK_FORMAT_ASTC_12x12_SRGB_BLOCK:184,VK_FORMAT_G8B8G8R8_422_UNORM:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM:1000156006,VK_FORMAT_R10X6_UNORM_PACK16:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16:1000156016,VK_FORMAT_R12X4_UNORM_PACK16:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM:1000156033,VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG:1000054e3,VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG:1000054001,VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG:1000054002,VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG:1000054003,VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG:1000054004,VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG:1000054005,VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG:1000054006,VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG:1000054007,VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT:1000066e3,VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT:1000066001,VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT:1000066002,VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT:1000066003,VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT:1000066004,VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT:1000066005,VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT:1000066006,VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT:1000066007,VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT:1000066008,VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT:1000066009,VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT:1000066010,VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT:1000066011,VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT:1000066012,VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT:1000066013,VK_FORMAT_G8B8G8R8_422_UNORM_KHR:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM_KHR:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM_KHR:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM_KHR:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM_KHR:1000156006,VK_FORMAT_R10X6_UNORM_PACK16_KHR:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16_KHR:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR:1000156016,VK_FORMAT_R12X4_UNORM_PACK16_KHR:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16_KHR:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM_KHR:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM_KHR:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM_KHR:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM_KHR:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM_KHR:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM_KHR:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM_KHR:1000156033},Le=Object.freeze(Rr);var Vt=class{constructor(){this.vkFormat=0,this.typeSize=1,this.pixelWidth=0,this.pixelHeight=0,this.pixelDepth=0,this.layerCount=0,this.faceCount=1,this.supercompressionScheme=0,this.levels=[],this.dataFormatDescriptor=[{vendorId:0,descriptorType:0,descriptorBlockSize:0,versionNumber:2,colorModel:0,colorPrimaries:1,transferFunction:2,flags:0,texelBlockDimension:[0,0,0,0],bytesPlane:[0,0,0,0,0,0,0,0],samples:[]}],this.keyValue={},this.globalData=null}},Oe=class{constructor(f,r,B,l){this._dataView=void 0,this._littleEndian=void 0,this._offset=void 0,this._dataView=new DataView(f.buffer,f.byteOffset+r,B),this._littleEndian=l,this._offset=0}_nextUint8(){let f=this._dataView.getUint8(this._offset);return this._offset+=1,f}_nextUint16(){let f=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,f}_nextUint32(){let f=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,f}_nextUint64(){let f=this._dataView.getUint32(this._offset,this._littleEndian),r=this._dataView.getUint32(this._offset+4,this._littleEndian),B=f+2**32*r;return this._offset+=8,B}_nextInt32(){let f=this._dataView.getInt32(this._offset,this._littleEndian);return this._offset+=4,f}_nextUint8Array(f){let r=new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+this._offset,f);return this._offset+=f,r}_skip(f){return this._offset+=f,this}_scan(f,r=0){let B=this._offset,l=0;for(;this._dataView.getUint8(this._offset)!==r&&l<f;)l++,this._offset++;return l<f&&this._offset++,new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+B,l)}};var dr=new Uint8Array([0]),w=[171,75,84,88,32,50,48,187,13,10,26,10];function i_(i){return typeof TextDecoder<"u"?new TextDecoder().decode(i):Buffer.from(i).toString("utf8")}function s_(i){let f=new Uint8Array(i.buffer,i.byteOffset,w.length);if(f[0]!==w[0]||f[1]!==w[1]||f[2]!==w[2]||f[3]!==w[3]||f[4]!==w[4]||f[5]!==w[5]||f[6]!==w[6]||f[7]!==w[7]||f[8]!==w[8]||f[9]!==w[9]||f[10]!==w[10]||f[11]!==w[11])throw new Error("Missing KTX 2.0 identifier.");let r=new Vt,B=17*Uint32Array.BYTES_PER_ELEMENT,l=new Oe(i,w.length,B,!0);r.vkFormat=l._nextUint32(),r.typeSize=l._nextUint32(),r.pixelWidth=l._nextUint32(),r.pixelHeight=l._nextUint32(),r.pixelDepth=l._nextUint32(),r.layerCount=l._nextUint32(),r.faceCount=l._nextUint32();let P=l._nextUint32();r.supercompressionScheme=l._nextUint32();let C=l._nextUint32(),h=l._nextUint32(),y=l._nextUint32(),m=l._nextUint32(),V=l._nextUint64(),d=l._nextUint64(),p=P*3*8,Q=new Oe(i,w.length+B,p,!0);for(let L=0;L<P;L++)r.levels.push({levelData:new Uint8Array(i.buffer,i.byteOffset+Q._nextUint64(),Q._nextUint64()),uncompressedByteLength:Q._nextUint64()});let u=new Oe(i,C,h,!0),X={vendorId:u._skip(4)._nextUint16(),descriptorType:u._nextUint16(),versionNumber:u._nextUint16(),descriptorBlockSize:u._nextUint16(),colorModel:u._nextUint8(),colorPrimaries:u._nextUint8(),transferFunction:u._nextUint8(),flags:u._nextUint8(),texelBlockDimension:[u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8()],bytesPlane:[u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8()],samples:[]},W=(X.descriptorBlockSize/4-6)/4;for(let L=0;L<W;L++){let j={bitOffset:u._nextUint16(),bitLength:u._nextUint8(),channelType:u._nextUint8(),samplePosition:[u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8()],sampleLower:-1/0,sampleUpper:1/0};j.channelType&64?(j.sampleLower=u._nextInt32(),j.sampleUpper=u._nextInt32()):(j.sampleLower=u._nextUint32(),j.sampleUpper=u._nextUint32()),X.samples[L]=j}r.dataFormatDescriptor.length=0,r.dataFormatDescriptor.push(X);let J=new Oe(i,y,m,!0);for(;J._offset<m;){let L=J._nextUint32(),j=J._scan(L),Ae=i_(j);if(r.keyValue[Ae]=J._nextUint8Array(L-j.byteLength-1),Ae.match(/^ktx/i)){let xe=i_(r.keyValue[Ae]);r.keyValue[Ae]=xe.substring(0,xe.lastIndexOf("\0"))}let at=L%4?4-L%4:0;J._skip(at)}if(d<=0)return r;let g=new Oe(i,V,d,!0),Fe=g._nextUint16(),st=g._nextUint16(),ee=g._nextUint32(),De=g._nextUint32(),Ie=g._nextUint32(),ae=g._nextUint32(),ot=[];for(let L=0;L<P;L++)ot.push({imageFlags:g._nextUint32(),rgbSliceByteOffset:g._nextUint32(),rgbSliceByteLength:g._nextUint32(),alphaSliceByteOffset:g._nextUint32(),alphaSliceByteLength:g._nextUint32()});let ce=V+g._offset,de=ce+ee,be=de+De,Se=be+Ie,we=new Uint8Array(i.buffer,i.byteOffset+ce,ee),He=new Uint8Array(i.buffer,i.byteOffset+de,De),Xe=new Uint8Array(i.buffer,i.byteOffset+be,Ie),Rt=new Uint8Array(i.buffer,i.byteOffset+Se,ae);return r.globalData={endpointCount:Fe,selectorCount:st,imageDescs:ot,endpointsData:we,selectorsData:He,tablesData:Xe,extendedData:Rt},r}var R_=or(o_(),1),a_=["positiveX","negativeX","positiveY","negativeY","positiveZ","negativeZ"],c_=163,A_=166,me;function ar(i,f){__.typeOf.object("transcoderModule",me);let r=i.ktx2Buffer,B=i.supportedTargetFormats,l;try{l=s_(r)}catch{throw new ie("Invalid KTX2 file.")}if(l.layerCount!==0)throw new ie("KTX2 texture arrays are not supported.");if(l.pixelDepth!==0)throw new ie("KTX2 3D textures are unsupported.");let P=l.dataFormatDescriptor[0],C=new Array(l.levelCount);return l.vkFormat===0&&(P.colorModel===c_||P.colorModel===A_)?Ar(r,l,B,me,f,C):(f.push(r.buffer),cr(l,C)),C}function cr(i,f){let r=i.vkFormat===Le.VK_FORMAT_R8G8B8_SRGB?E.RGB:E.RGBA,B;i.vkFormat===Le.VK_FORMAT_R8G8B8A8_UNORM?B=b.UNSIGNED_BYTE:i.vkFormat===Le.VK_FORMAT_R16G16B16A16_SFLOAT?B=b.HALF_FLOAT:i.vkFormat===Le.VK_FORMAT_R32G32B32A32_SFLOAT&&(B=b.FLOAT);for(let l=0;l<i.levels.length;++l){let P={};f[l]=P;let C=i.levels[l].levelData,h=i.pixelWidth>>l,y=i.pixelHeight>>l,m=h*y*E.componentsLength(r);for(let V=0;V<i.faceCount;++V){let d=C.byteOffset+m*i.typeSize*V,p;!ge(B)||b.sizeInBytes(B)===1?p=new Uint8Array(C.buffer,d,m):b.sizeInBytes(B)===2?p=new Uint16Array(C.buffer,d,m):p=new Float32Array(C.buffer,d,m),P[a_[V]]={internalFormat:r,datatype:B,width:h,height:y,levelBuffer:p}}}}function Ar(i,f,r,B,l,P){let C=new B.KTX2File(i),h=C.getWidth(),y=C.getHeight(),m=C.getLevels(),V=C.getHasAlpha();if(!(h>0)||!(y>0)||!(m>0))throw C.close(),C.delete(),new ie("Invalid KTX2 file");let d,p,Q=f.dataFormatDescriptor[0],u=B.transcoder_texture_format;if(Q.colorModel===c_)if(r.etc)d=V?E.RGBA8_ETC2_EAC:E.RGB8_ETC2,p=V?u.cTFETC2_RGBA:u.cTFETC1_RGB;else if(r.etc1&&!V)d=E.RGB_ETC1,p=u.cTFETC1_RGB;else if(r.s3tc)d=V?E.RGBA_DXT5:E.RGB_DXT1,p=V?u.cTFBC3_RGBA:u.cTFBC1_RGB;else if(r.pvrtc)d=V?E.RGBA_PVRTC_4BPPV1:E.RGB_PVRTC_4BPPV1,p=V?u.cTFPVRTC1_4_RGBA:u.cTFPVRTC1_4_RGB;else if(r.astc)d=E.RGBA_ASTC,p=u.cTFASTC_4x4_RGBA;else if(r.bc7)d=E.RGBA_BC7,p=u.cTFBC7_RGBA;else throw new ie("No transcoding format target available for ETC1S compressed ktx2.");else if(Q.colorModel===A_)if(r.astc)d=E.RGBA_ASTC,p=u.cTFASTC_4x4_RGBA;else if(r.bc7)d=E.RGBA_BC7,p=u.cTFBC7_RGBA;else if(r.s3tc)d=V?E.RGBA_DXT5:E.RGB_DXT1,p=V?u.cTFBC3_RGBA:u.cTFBC1_RGB;else if(r.etc)d=V?E.RGBA8_ETC2_EAC:E.RGB8_ETC2,p=V?u.cTFETC2_RGBA:u.cTFETC1_RGB;else if(r.etc1&&!V)d=E.RGB_ETC1,p=u.cTFETC1_RGB;else if(r.pvrtc)d=V?E.RGBA_PVRTC_4BPPV1:E.RGB_PVRTC_4BPPV1,p=V?u.cTFPVRTC1_4_RGBA:u.cTFPVRTC1_4_RGB;else throw new ie("No transcoding format target available for UASTC compressed ktx2.");if(!C.startTranscoding())throw C.close(),C.delete(),new ie("startTranscoding() failed");for(let X=0;X<f.levels.length;++X){let se={};P[X]=se,h=f.pixelWidth>>X,y=f.pixelHeight>>X;let le=C.getImageTranscodedSizeInBytes(X,0,0,p.value),W=new Uint8Array(le),J=C.transcodeImage(W,X,0,0,p.value,0,-1,-1);if(!ge(J))throw new ie("transcodeImage() failed.");l.push(W.buffer),se[a_[0]]={internalFormat:d,width:h,height:y,levelBuffer:W}}return C.close(),C.delete(),P}async function fr(i,f){let r=i.webAssemblyConfig,B=n_(R_.default,self.BASIS);return ge(r.wasmBinaryFile)?me=await B(r):me=await B(),me.initializeBasis(),!0}function Tr(i,f){let r=i.webAssemblyConfig;return ge(r)?fr(i,f):ar(i,f)}var yr=r_(Tr);export{yr as default}; |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.116 | ||
* Version 1.116.1 | ||
* | ||
@@ -6,0 +6,0 @@ * Copyright 2011-2022 Cesium Contributors |
/** | ||
* @license | ||
* Cesium - https://github.com/CesiumGS/cesium | ||
* Version 1.116 | ||
* Version 1.116.1 | ||
* | ||
@@ -26,2 +26,2 @@ * Copyright 2011-2022 Cesium Contributors | ||
import{a as be,b as Ne}from"./chunk-JDDR7LGD.js";import{a as Ae}from"./chunk-4PZYNNSN.js";import{a as ue}from"./chunk-XORBV237.js";import{a as ee}from"./chunk-BMTOWA7K.js";import"./chunk-YPW76GEP.js";import"./chunk-GKRM7KEL.js";import"./chunk-LGFQRF3V.js";import"./chunk-AHZBRYZA.js";import{a as Ve}from"./chunk-TWAPNO4J.js";import{d as de}from"./chunk-HTNJJ6YO.js";import"./chunk-63E276CT.js";import"./chunk-NRW2R4YV.js";import{c as Se}from"./chunk-NSILPUHD.js";import"./chunk-M7WODBAD.js";import{a as A,b as Ie,c as Z,d as Ce}from"./chunk-J26GWQSN.js";import{a as N}from"./chunk-PYB3IV2X.js";import"./chunk-H7FFK4U5.js";import"./chunk-YEUII2A5.js";import"./chunk-4353PD6R.js";import{a as V,b as q}from"./chunk-2S4UUFD6.js";import{e as f}from"./chunk-42VHSORI.js";var ne={};ne.clipTriangleAtAxisAlignedThreshold=function(n,h,o,i,s,e){if(!f(n))throw new V("threshold is required.");if(!f(h))throw new V("keepAbove is required.");if(!f(o))throw new V("u0 is required.");if(!f(i))throw new V("u1 is required.");if(!f(s))throw new V("u2 is required.");f(e)?e.length=0:e=[];let g,w,c;h?(g=o<n,w=i<n,c=s<n):(g=o>n,w=i>n,c=s>n);let p=g+w+c,d,u,r,l,I,C;return p===1?g?(d=(n-o)/(i-o),u=(n-o)/(s-o),e.push(1),e.push(2),u!==1&&(e.push(-1),e.push(0),e.push(2),e.push(u)),d!==1&&(e.push(-1),e.push(0),e.push(1),e.push(d))):w?(r=(n-i)/(s-i),l=(n-i)/(o-i),e.push(2),e.push(0),l!==1&&(e.push(-1),e.push(1),e.push(0),e.push(l)),r!==1&&(e.push(-1),e.push(1),e.push(2),e.push(r))):c&&(I=(n-s)/(o-s),C=(n-s)/(i-s),e.push(0),e.push(1),C!==1&&(e.push(-1),e.push(2),e.push(1),e.push(C)),I!==1&&(e.push(-1),e.push(2),e.push(0),e.push(I))):p===2?!g&&o!==n?(l=(n-i)/(o-i),I=(n-s)/(o-s),e.push(0),e.push(-1),e.push(1),e.push(0),e.push(l),e.push(-1),e.push(2),e.push(0),e.push(I)):!w&&i!==n?(C=(n-s)/(i-s),d=(n-o)/(i-o),e.push(1),e.push(-1),e.push(2),e.push(1),e.push(C),e.push(-1),e.push(0),e.push(1),e.push(d)):!c&&s!==n&&(u=(n-o)/(s-o),r=(n-i)/(s-i),e.push(2),e.push(-1),e.push(0),e.push(2),e.push(u),e.push(-1),e.push(1),e.push(2),e.push(r)):p!==3&&(e.push(0),e.push(1),e.push(2)),e};ne.computeBarycentricCoordinates=function(n,h,o,i,s,e,g,w,c){if(!f(n))throw new V("x is required.");if(!f(h))throw new V("y is required.");if(!f(o))throw new V("x1 is required.");if(!f(i))throw new V("y1 is required.");if(!f(s))throw new V("x2 is required.");if(!f(e))throw new V("y2 is required.");if(!f(g))throw new V("x3 is required.");if(!f(w))throw new V("y3 is required.");let p=o-g,d=g-s,u=e-w,r=i-w,l=1/(u*p+d*r),I=h-w,C=n-g,R=(u*C+d*I)*l,O=(-r*C+p*I)*l,W=1-R-O;return f(c)?(c.x=R,c.y=O,c.z=W,c):new A(R,O,W)};ne.computeLineSegmentLineSegmentIntersection=function(n,h,o,i,s,e,g,w,c){q.typeOf.number("x00",n),q.typeOf.number("y00",h),q.typeOf.number("x01",o),q.typeOf.number("y01",i),q.typeOf.number("x10",s),q.typeOf.number("y10",e),q.typeOf.number("x11",g),q.typeOf.number("y11",w);let p=(g-s)*(h-e)-(w-e)*(n-s),d=(o-n)*(h-e)-(i-h)*(n-s),u=(w-e)*(o-n)-(g-s)*(i-h);if(u===0)return;let r=p/u,l=d/u;if(r>=0&&r<=1&&l>=0&&l<=1)return f(c)||(c=new Z),c.x=n+r*(o-n),c.y=h+r*(i-h),c};var ie=ne;var a=32767,z=a/2|0,Me=[],ze=[],Xe=[],te=new Ie,E=new A,Ke=[],We=[],Ye=[],Le=[],_e=[],Je=new A,Qe=new de,Ze=new ue,Ge=new Z,$e=new A;function je(n,h){let o=n.isEastChild,i=n.isNorthChild,s=o?z:0,e=o?a:z,g=i?z:0,w=i?a:z,c=Ke,p=We,d=Ye,u=_e;c.length=0,p.length=0,d.length=0,u.length=0;let r=Le;r.length=0;let l={},I=n.vertices,C=n.indices;C=C.subarray(0,n.indexCountWithoutSkirts);let R=Ne.clone(n.encoding),O=R.hasVertexNormals,W=0,Y=n.vertexCountWithoutSkirts,se=n.minimumHeight,ae=n.maximumHeight,D=new Array(Y),G=new Array(Y),L=new Array(Y),F=O?new Array(Y*2):void 0,$=20,H,t,k,x,y;for(t=0,k=0;t<Y;++t,k+=2){let v=R.decodeTextureCoordinates(I,t,Ge);if(H=R.decodeHeight(I,t),x=N.clamp(v.x*a|0,0,a),y=N.clamp(v.y*a|0,0,a),L[t]=N.clamp((H-se)/(ae-se)*a|0,0,a),x<$&&(x=0),y<$&&(y=0),a-x<$&&(x=a),a-y<$&&(y=a),D[t]=x,G[t]=y,O){let Q=R.getOctEncodedNormal(I,t,$e);F[k]=Q.x,F[k+1]=Q.y}(o&&x>=z||!o&&x<=z)&&(i&&y>=z||!i&&y<=z)&&(l[t]=W,c.push(x),p.push(y),d.push(L[t]),O&&(u.push(F[k]),u.push(F[k+1])),++W)}let T=[];T.push(new m),T.push(new m),T.push(new m);let B=[];B.push(new m),B.push(new m),B.push(new m);let b,j;for(t=0;t<C.length;t+=3){let v=C[t],Q=C[t+1],Be=C[t+2],De=D[v],Fe=D[Q],ke=D[Be];T[0].initializeIndexed(D,G,L,F,v),T[1].initializeIndexed(D,G,L,F,Q),T[2].initializeIndexed(D,G,L,F,Be);let P=ie.clipTriangleAtAxisAlignedThreshold(z,o,De,Fe,ke,Me);b=0,!(b>=P.length)&&(b=B[0].initializeFromClipResult(P,b,T),!(b>=P.length)&&(b=B[1].initializeFromClipResult(P,b,T),!(b>=P.length)&&(b=B[2].initializeFromClipResult(P,b,T),j=ie.clipTriangleAtAxisAlignedThreshold(z,i,B[0].getV(),B[1].getV(),B[2].getV(),ze),Oe(c,p,d,u,r,l,j,B,O),b<P.length&&(B[2].clone(B[1]),B[2].initializeFromClipResult(P,b,T),j=ie.clipTriangleAtAxisAlignedThreshold(z,i,B[0].getV(),B[1].getV(),B[2].getV(),ze),Oe(c,p,d,u,r,l,j,B,O)))))}let He=o?-a:0,qe=i?-a:0,me=[],ge=[],le=[],we=[],U=Number.MAX_VALUE,_=-U,M=Xe;M.length=0;let re=Ce.clone(n.ellipsoid),J=Se.clone(n.childRectangle),Ee=J.north,Re=J.south,ce=J.east,xe=J.west;for(ce<xe&&(ce+=N.TWO_PI),t=0;t<c.length;++t)x=Math.round(c[t]),x<=s?(me.push(t),x=0):x>=e?(le.push(t),x=a):x=x*2+He,c[t]=x,y=Math.round(p[t]),y<=g?(ge.push(t),y=0):y>=w?(we.push(t),y=a):y=y*2+qe,p[t]=y,H=N.lerp(se,ae,d[t]/a),H<U&&(U=H),H>_&&(_=H),d[t]=H,te.longitude=N.lerp(xe,ce,x/a),te.latitude=N.lerp(Re,Ee,y/a),te.height=H,re.cartographicToCartesian(te,E),M.push(E.x),M.push(E.y),M.push(E.z);let he=de.fromVertices(M,A.ZERO,3,Qe),Ue=ue.fromRectangle(J,U,_,re,Ze),ve=new be(re).computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid(he.center,M,3,he.center,U,Je),Pe=_-U,X=new Uint16Array(c.length+p.length+d.length);for(t=0;t<c.length;++t)X[t]=c[t];let fe=c.length;for(t=0;t<p.length;++t)X[fe+t]=p[t];for(fe+=p.length,t=0;t<d.length;++t)X[fe+t]=a*(d[t]-U)/Pe;let pe=Ve.createTypedArray(c.length,r),ye;if(O){let v=new Uint8Array(u);h.push(X.buffer,pe.buffer,v.buffer),ye=v.buffer}else h.push(X.buffer,pe.buffer);return{vertices:X.buffer,encodedNormals:ye,indices:pe.buffer,minimumHeight:U,maximumHeight:_,westIndices:me,southIndices:ge,eastIndices:le,northIndices:we,boundingSphere:he,orientedBoundingBox:Ue,horizonOcclusionPoint:ve}}function m(){this.vertexBuffer=void 0,this.index=void 0,this.first=void 0,this.second=void 0,this.ratio=void 0}m.prototype.clone=function(n){return f(n)||(n=new m),n.uBuffer=this.uBuffer,n.vBuffer=this.vBuffer,n.heightBuffer=this.heightBuffer,n.normalBuffer=this.normalBuffer,n.index=this.index,n.first=this.first,n.second=this.second,n.ratio=this.ratio,n};m.prototype.initializeIndexed=function(n,h,o,i,s){this.uBuffer=n,this.vBuffer=h,this.heightBuffer=o,this.normalBuffer=i,this.index=s,this.first=void 0,this.second=void 0,this.ratio=void 0};m.prototype.initializeFromClipResult=function(n,h,o){let i=h+1;return n[h]!==-1?o[n[h]].clone(this):(this.vertexBuffer=void 0,this.index=void 0,this.first=o[n[i]],++i,this.second=o[n[i]],++i,this.ratio=n[i],++i),i};m.prototype.getKey=function(){return this.isIndexed()?this.index:JSON.stringify({first:this.first.getKey(),second:this.second.getKey(),ratio:this.ratio})};m.prototype.isIndexed=function(){return f(this.index)};m.prototype.getH=function(){return f(this.index)?this.heightBuffer[this.index]:N.lerp(this.first.getH(),this.second.getH(),this.ratio)};m.prototype.getU=function(){return f(this.index)?this.uBuffer[this.index]:N.lerp(this.first.getU(),this.second.getU(),this.ratio)};m.prototype.getV=function(){return f(this.index)?this.vBuffer[this.index]:N.lerp(this.first.getV(),this.second.getV(),this.ratio)};var K=new Z,oe=-1,en=[new A,new A],nn=[new A,new A];function Te(n,h){++oe;let o=en[oe],i=nn[oe];return o=ee.octDecode(n.first.getNormalX(),n.first.getNormalY(),o),i=ee.octDecode(n.second.getNormalX(),n.second.getNormalY(),i),E=A.lerp(o,i,n.ratio,E),A.normalize(E,E),ee.octEncode(E,h),--oe,h}m.prototype.getNormalX=function(){return f(this.index)?this.normalBuffer[this.index*2]:(K=Te(this,K),K.x)};m.prototype.getNormalY=function(){return f(this.index)?this.normalBuffer[this.index*2+1]:(K=Te(this,K),K.y)};var S=[];S.push(new m);S.push(new m);S.push(new m);S.push(new m);function Oe(n,h,o,i,s,e,g,w,c){if(g.length===0)return;let p=0,d=0;for(;d<g.length;)d=S[p++].initializeFromClipResult(g,d,w);for(let u=0;u<p;++u){let r=S[u];if(r.isIndexed())r.newIndex=e[r.index],r.uBuffer=n,r.vBuffer=h,r.heightBuffer=o,c&&(r.normalBuffer=i);else{let l=r.getKey();if(f(e[l]))r.newIndex=e[l];else{let I=n.length;n.push(r.getU()),h.push(r.getV()),o.push(r.getH()),c&&(i.push(r.getNormalX()),i.push(r.getNormalY())),r.newIndex=I,e[l]=I}}}p===3?(s.push(S[0].newIndex),s.push(S[1].newIndex),s.push(S[2].newIndex)):p===4&&(s.push(S[0].newIndex),s.push(S[1].newIndex),s.push(S[2].newIndex),s.push(S[0].newIndex),s.push(S[2].newIndex),s.push(S[3].newIndex))}var An=Ae(je);export{An as default}; | ||
import{a as be,b as Ne}from"./chunk-7CWUAQKI.js";import{a as Ae}from"./chunk-F3CCIWXX.js";import{a as ue}from"./chunk-3HMIEL3B.js";import{a as ee}from"./chunk-JAMWPWOV.js";import"./chunk-7E5ZATSO.js";import"./chunk-XOMW5SDY.js";import"./chunk-QC62DG5W.js";import"./chunk-R6IH5WM5.js";import{a as Ve}from"./chunk-ROROM35N.js";import{d as de}from"./chunk-DXGEUDM7.js";import"./chunk-5IUHFVP3.js";import"./chunk-OE3P25NW.js";import{c as Se}from"./chunk-HIT4T4MS.js";import"./chunk-3KRBUMEX.js";import{a as A,b as Ie,c as Z,d as Ce}from"./chunk-PQ6NV4GA.js";import{a as N}from"./chunk-74I3QBVP.js";import"./chunk-BLVYEJBC.js";import"./chunk-A6PYE4JS.js";import"./chunk-T23IKWCM.js";import{a as V,b as q}from"./chunk-HJ33TVGP.js";import{e as f}from"./chunk-WL4PTXMO.js";var ne={};ne.clipTriangleAtAxisAlignedThreshold=function(n,h,o,i,s,e){if(!f(n))throw new V("threshold is required.");if(!f(h))throw new V("keepAbove is required.");if(!f(o))throw new V("u0 is required.");if(!f(i))throw new V("u1 is required.");if(!f(s))throw new V("u2 is required.");f(e)?e.length=0:e=[];let g,w,c;h?(g=o<n,w=i<n,c=s<n):(g=o>n,w=i>n,c=s>n);let p=g+w+c,d,u,r,l,I,C;return p===1?g?(d=(n-o)/(i-o),u=(n-o)/(s-o),e.push(1),e.push(2),u!==1&&(e.push(-1),e.push(0),e.push(2),e.push(u)),d!==1&&(e.push(-1),e.push(0),e.push(1),e.push(d))):w?(r=(n-i)/(s-i),l=(n-i)/(o-i),e.push(2),e.push(0),l!==1&&(e.push(-1),e.push(1),e.push(0),e.push(l)),r!==1&&(e.push(-1),e.push(1),e.push(2),e.push(r))):c&&(I=(n-s)/(o-s),C=(n-s)/(i-s),e.push(0),e.push(1),C!==1&&(e.push(-1),e.push(2),e.push(1),e.push(C)),I!==1&&(e.push(-1),e.push(2),e.push(0),e.push(I))):p===2?!g&&o!==n?(l=(n-i)/(o-i),I=(n-s)/(o-s),e.push(0),e.push(-1),e.push(1),e.push(0),e.push(l),e.push(-1),e.push(2),e.push(0),e.push(I)):!w&&i!==n?(C=(n-s)/(i-s),d=(n-o)/(i-o),e.push(1),e.push(-1),e.push(2),e.push(1),e.push(C),e.push(-1),e.push(0),e.push(1),e.push(d)):!c&&s!==n&&(u=(n-o)/(s-o),r=(n-i)/(s-i),e.push(2),e.push(-1),e.push(0),e.push(2),e.push(u),e.push(-1),e.push(1),e.push(2),e.push(r)):p!==3&&(e.push(0),e.push(1),e.push(2)),e};ne.computeBarycentricCoordinates=function(n,h,o,i,s,e,g,w,c){if(!f(n))throw new V("x is required.");if(!f(h))throw new V("y is required.");if(!f(o))throw new V("x1 is required.");if(!f(i))throw new V("y1 is required.");if(!f(s))throw new V("x2 is required.");if(!f(e))throw new V("y2 is required.");if(!f(g))throw new V("x3 is required.");if(!f(w))throw new V("y3 is required.");let p=o-g,d=g-s,u=e-w,r=i-w,l=1/(u*p+d*r),I=h-w,C=n-g,R=(u*C+d*I)*l,O=(-r*C+p*I)*l,W=1-R-O;return f(c)?(c.x=R,c.y=O,c.z=W,c):new A(R,O,W)};ne.computeLineSegmentLineSegmentIntersection=function(n,h,o,i,s,e,g,w,c){q.typeOf.number("x00",n),q.typeOf.number("y00",h),q.typeOf.number("x01",o),q.typeOf.number("y01",i),q.typeOf.number("x10",s),q.typeOf.number("y10",e),q.typeOf.number("x11",g),q.typeOf.number("y11",w);let p=(g-s)*(h-e)-(w-e)*(n-s),d=(o-n)*(h-e)-(i-h)*(n-s),u=(w-e)*(o-n)-(g-s)*(i-h);if(u===0)return;let r=p/u,l=d/u;if(r>=0&&r<=1&&l>=0&&l<=1)return f(c)||(c=new Z),c.x=n+r*(o-n),c.y=h+r*(i-h),c};var ie=ne;var a=32767,z=a/2|0,Me=[],ze=[],Xe=[],te=new Ie,E=new A,Ke=[],We=[],Ye=[],Le=[],_e=[],Je=new A,Qe=new de,Ze=new ue,Ge=new Z,$e=new A;function je(n,h){let o=n.isEastChild,i=n.isNorthChild,s=o?z:0,e=o?a:z,g=i?z:0,w=i?a:z,c=Ke,p=We,d=Ye,u=_e;c.length=0,p.length=0,d.length=0,u.length=0;let r=Le;r.length=0;let l={},I=n.vertices,C=n.indices;C=C.subarray(0,n.indexCountWithoutSkirts);let R=Ne.clone(n.encoding),O=R.hasVertexNormals,W=0,Y=n.vertexCountWithoutSkirts,se=n.minimumHeight,ae=n.maximumHeight,D=new Array(Y),G=new Array(Y),L=new Array(Y),F=O?new Array(Y*2):void 0,$=20,H,t,k,x,y;for(t=0,k=0;t<Y;++t,k+=2){let v=R.decodeTextureCoordinates(I,t,Ge);if(H=R.decodeHeight(I,t),x=N.clamp(v.x*a|0,0,a),y=N.clamp(v.y*a|0,0,a),L[t]=N.clamp((H-se)/(ae-se)*a|0,0,a),x<$&&(x=0),y<$&&(y=0),a-x<$&&(x=a),a-y<$&&(y=a),D[t]=x,G[t]=y,O){let Q=R.getOctEncodedNormal(I,t,$e);F[k]=Q.x,F[k+1]=Q.y}(o&&x>=z||!o&&x<=z)&&(i&&y>=z||!i&&y<=z)&&(l[t]=W,c.push(x),p.push(y),d.push(L[t]),O&&(u.push(F[k]),u.push(F[k+1])),++W)}let T=[];T.push(new m),T.push(new m),T.push(new m);let B=[];B.push(new m),B.push(new m),B.push(new m);let b,j;for(t=0;t<C.length;t+=3){let v=C[t],Q=C[t+1],Be=C[t+2],De=D[v],Fe=D[Q],ke=D[Be];T[0].initializeIndexed(D,G,L,F,v),T[1].initializeIndexed(D,G,L,F,Q),T[2].initializeIndexed(D,G,L,F,Be);let P=ie.clipTriangleAtAxisAlignedThreshold(z,o,De,Fe,ke,Me);b=0,!(b>=P.length)&&(b=B[0].initializeFromClipResult(P,b,T),!(b>=P.length)&&(b=B[1].initializeFromClipResult(P,b,T),!(b>=P.length)&&(b=B[2].initializeFromClipResult(P,b,T),j=ie.clipTriangleAtAxisAlignedThreshold(z,i,B[0].getV(),B[1].getV(),B[2].getV(),ze),Oe(c,p,d,u,r,l,j,B,O),b<P.length&&(B[2].clone(B[1]),B[2].initializeFromClipResult(P,b,T),j=ie.clipTriangleAtAxisAlignedThreshold(z,i,B[0].getV(),B[1].getV(),B[2].getV(),ze),Oe(c,p,d,u,r,l,j,B,O)))))}let He=o?-a:0,qe=i?-a:0,me=[],ge=[],le=[],we=[],U=Number.MAX_VALUE,_=-U,M=Xe;M.length=0;let re=Ce.clone(n.ellipsoid),J=Se.clone(n.childRectangle),Ee=J.north,Re=J.south,ce=J.east,xe=J.west;for(ce<xe&&(ce+=N.TWO_PI),t=0;t<c.length;++t)x=Math.round(c[t]),x<=s?(me.push(t),x=0):x>=e?(le.push(t),x=a):x=x*2+He,c[t]=x,y=Math.round(p[t]),y<=g?(ge.push(t),y=0):y>=w?(we.push(t),y=a):y=y*2+qe,p[t]=y,H=N.lerp(se,ae,d[t]/a),H<U&&(U=H),H>_&&(_=H),d[t]=H,te.longitude=N.lerp(xe,ce,x/a),te.latitude=N.lerp(Re,Ee,y/a),te.height=H,re.cartographicToCartesian(te,E),M.push(E.x),M.push(E.y),M.push(E.z);let he=de.fromVertices(M,A.ZERO,3,Qe),Ue=ue.fromRectangle(J,U,_,re,Ze),ve=new be(re).computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid(he.center,M,3,he.center,U,Je),Pe=_-U,X=new Uint16Array(c.length+p.length+d.length);for(t=0;t<c.length;++t)X[t]=c[t];let fe=c.length;for(t=0;t<p.length;++t)X[fe+t]=p[t];for(fe+=p.length,t=0;t<d.length;++t)X[fe+t]=a*(d[t]-U)/Pe;let pe=Ve.createTypedArray(c.length,r),ye;if(O){let v=new Uint8Array(u);h.push(X.buffer,pe.buffer,v.buffer),ye=v.buffer}else h.push(X.buffer,pe.buffer);return{vertices:X.buffer,encodedNormals:ye,indices:pe.buffer,minimumHeight:U,maximumHeight:_,westIndices:me,southIndices:ge,eastIndices:le,northIndices:we,boundingSphere:he,orientedBoundingBox:Ue,horizonOcclusionPoint:ve}}function m(){this.vertexBuffer=void 0,this.index=void 0,this.first=void 0,this.second=void 0,this.ratio=void 0}m.prototype.clone=function(n){return f(n)||(n=new m),n.uBuffer=this.uBuffer,n.vBuffer=this.vBuffer,n.heightBuffer=this.heightBuffer,n.normalBuffer=this.normalBuffer,n.index=this.index,n.first=this.first,n.second=this.second,n.ratio=this.ratio,n};m.prototype.initializeIndexed=function(n,h,o,i,s){this.uBuffer=n,this.vBuffer=h,this.heightBuffer=o,this.normalBuffer=i,this.index=s,this.first=void 0,this.second=void 0,this.ratio=void 0};m.prototype.initializeFromClipResult=function(n,h,o){let i=h+1;return n[h]!==-1?o[n[h]].clone(this):(this.vertexBuffer=void 0,this.index=void 0,this.first=o[n[i]],++i,this.second=o[n[i]],++i,this.ratio=n[i],++i),i};m.prototype.getKey=function(){return this.isIndexed()?this.index:JSON.stringify({first:this.first.getKey(),second:this.second.getKey(),ratio:this.ratio})};m.prototype.isIndexed=function(){return f(this.index)};m.prototype.getH=function(){return f(this.index)?this.heightBuffer[this.index]:N.lerp(this.first.getH(),this.second.getH(),this.ratio)};m.prototype.getU=function(){return f(this.index)?this.uBuffer[this.index]:N.lerp(this.first.getU(),this.second.getU(),this.ratio)};m.prototype.getV=function(){return f(this.index)?this.vBuffer[this.index]:N.lerp(this.first.getV(),this.second.getV(),this.ratio)};var K=new Z,oe=-1,en=[new A,new A],nn=[new A,new A];function Te(n,h){++oe;let o=en[oe],i=nn[oe];return o=ee.octDecode(n.first.getNormalX(),n.first.getNormalY(),o),i=ee.octDecode(n.second.getNormalX(),n.second.getNormalY(),i),E=A.lerp(o,i,n.ratio,E),A.normalize(E,E),ee.octEncode(E,h),--oe,h}m.prototype.getNormalX=function(){return f(this.index)?this.normalBuffer[this.index*2]:(K=Te(this,K),K.x)};m.prototype.getNormalY=function(){return f(this.index)?this.normalBuffer[this.index*2+1]:(K=Te(this,K),K.y)};var S=[];S.push(new m);S.push(new m);S.push(new m);S.push(new m);function Oe(n,h,o,i,s,e,g,w,c){if(g.length===0)return;let p=0,d=0;for(;d<g.length;)d=S[p++].initializeFromClipResult(g,d,w);for(let u=0;u<p;++u){let r=S[u];if(r.isIndexed())r.newIndex=e[r.index],r.uBuffer=n,r.vBuffer=h,r.heightBuffer=o,c&&(r.normalBuffer=i);else{let l=r.getKey();if(f(e[l]))r.newIndex=e[l];else{let I=n.length;n.push(r.getU()),h.push(r.getV()),o.push(r.getH()),c&&(i.push(r.getNormalX()),i.push(r.getNormalY())),r.newIndex=I,e[l]=I}}}p===3?(s.push(S[0].newIndex),s.push(S[1].newIndex),s.push(S[2].newIndex)):p===4&&(s.push(S[0].newIndex),s.push(S[1].newIndex),s.push(S[2].newIndex),s.push(S[0].newIndex),s.push(S[2].newIndex),s.push(S[3].newIndex))}var An=Ae(je);export{An as default}; |
{ | ||
"name": "mars3d-cesium", | ||
"version": "1.116.0", | ||
"version": "1.116.1", | ||
"description": "CesiumJS是一个JavaScript库,用于在web浏览器中无需插件创建3D地球仪和2D地图,mars3d-cesium是火星科技修改版本的CesiumJS。", | ||
@@ -5,0 +5,0 @@ "type": "module", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
0
4
11
21688331
382
110309